@hyperframes/studio 0.8.9 → 0.8.10
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-OP68oEBG.js → hyperframes-player-DoTrWV8q.js} +1 -1
- package/dist/assets/{index-D1Sa69m2.js → index-BQs1fahB.js} +1 -1
- package/dist/assets/{index-57oMsXQN.js → index-C6m2nHiX.js} +3 -3
- package/dist/assets/{index-BIdEpMGS.js → index-DV45YLqR.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/renders/useRenderQueue.ts +9 -2
- package/src/components/renders/useRenderQueueTransportError.test.tsx +49 -0
|
@@ -46,7 +46,7 @@ var iwe=Object.defineProperty;var swe=(t,e,n)=>e in t?iwe(t,e,{enumerable:!0,con
|
|
|
46
46
|
`+Ee[D].replace(" at new "," at ");return p.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",p.displayName)),Ge}while(1<=D&&0<=B);break}}}finally{Ae=!1,Error.prepareStackTrace=k}return(k=p?p.displayName||p.name:"")?me(k):""}function Se(p,A){switch(p.tag){case 26:case 27:case 5:return me(p.type);case 16:return me("Lazy");case 13:return p.child!==A&&A!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return De(p.type,!1);case 11:return De(p.type.render,!1);case 1:return De(p.type,!0);case 31:return me("Activity");default:return""}}function ye(p){try{var A="",k=null;do A+=Se(p,k),k=p,p=p.return;while(p);return A}catch(D){return`
|
|
47
47
|
Error generating stack: `+D.message+`
|
|
48
48
|
`+D.stack}}var we=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Pe=t.unstable_cancelCallback,Ve=t.unstable_shouldYield,Ke=t.unstable_requestPaint,ze=t.unstable_now,Ye=t.unstable_getCurrentPriorityLevel,pt=t.unstable_ImmediatePriority,st=t.unstable_UserBlockingPriority,St=t.unstable_NormalPriority,$e=t.unstable_LowPriority,qe=t.unstable_IdlePriority,tt=t.log,Gt=t.unstable_setDisableYieldValue,Dt=null,We=null;function wt(p){if(typeof tt=="function"&&Gt(p),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(Dt,p)}catch{}}var ut=Math.clz32?Math.clz32:nn,dt=Math.log,cn=Math.LN2;function nn(p){return p>>>=0,p===0?32:31-(dt(p)/cn|0)|0}var rn=256,zt=262144,Ne=4194304;function Me(p){var A=p&42;if(A!==0)return A;switch(p&-p){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return p&261888;case 262144:case 524288:case 1048576:case 2097152:return p&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return p&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return p}}function Ze(p,A,k){var D=p.pendingLanes;if(D===0)return 0;var B=0,G=p.suspendedLanes,se=p.pingedLanes;p=p.warmLanes;var de=D&134217727;return de!==0?(D=de&~G,D!==0?B=Me(D):(se&=de,se!==0?B=Me(se):k||(k=de&~p,k!==0&&(B=Me(k))))):(de=D&~G,de!==0?B=Me(de):se!==0?B=Me(se):k||(k=D&~p,k!==0&&(B=Me(k)))),B===0?0:A!==0&&A!==B&&(A&G)===0&&(G=B&-B,k=A&-A,G>=k||G===32&&(k&4194048)!==0)?A:B}function nt(p,A){return(p.pendingLanes&~(p.suspendedLanes&~p.pingedLanes)&A)===0}function Wt(p,A){switch(p){case 1:case 2:case 4:case 8:case 64:return A+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return A+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mn(){var p=Ne;return Ne<<=1,(Ne&62914560)===0&&(Ne=4194304),p}function Pn(p){for(var A=[],k=0;31>k;k++)A.push(p);return A}function qt(p,A){p.pendingLanes|=A,A!==268435456&&(p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0)}function hr(p,A,k,D,B,G){var se=p.pendingLanes;p.pendingLanes=k,p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0,p.expiredLanes&=k,p.entangledLanes&=k,p.errorRecoveryDisabledLanes&=k,p.shellSuspendCounter=0;var de=p.entanglements,Ee=p.expirationTimes,Le=p.hiddenUpdates;for(k=se&~k;0<k;){var Ge=31-ut(k),Xe=1<<Ge;de[Ge]=0,Ee[Ge]=-1;var Fe=Le[Ge];if(Fe!==null)for(Le[Ge]=null,Ge=0;Ge<Fe.length;Ge++){var He=Fe[Ge];He!==null&&(He.lane&=-536870913)}k&=~Xe}D!==0&>(p,D,0),G!==0&&B===0&&p.tag!==0&&(p.suspendedLanes|=G&~(se&~A))}function gt(p,A,k){p.pendingLanes|=A,p.suspendedLanes&=~A;var D=31-ut(A);p.entangledLanes|=A,p.entanglements[D]=p.entanglements[D]|1073741824|k&261930}function hn(p,A){var k=p.entangledLanes|=A;for(p=p.entanglements;k;){var D=31-ut(k),B=1<<D;B&A|p[D]&A&&(p[D]|=A),k&=~B}}function gn(p,A){var k=A&-A;return k=(k&42)!==0?1:Zn(k),(k&(p.suspendedLanes|A))!==0?0:k}function Zn(p){switch(p){case 2:p=1;break;case 8:p=4;break;case 32:p=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:p=128;break;case 268435456:p=134217728;break;default:p=0}return p}function un(p){return p&=-p,2<p?8<p?(p&134217727)!==0?32:268435456:8:2}function yt(){var p=J.p;return p!==0?p:(p=window.event,p===void 0?32:xZ(p.type))}function $t(p,A){var k=J.p;try{return J.p=p,A()}finally{J.p=k}}var _t=Math.random().toString(36).slice(2),ln="__reactFiber$"+_t,yn="__reactProps$"+_t,kn="__reactContainer$"+_t,dn="__reactEvents$"+_t,Sr="__reactListeners$"+_t,mr="__reactHandles$"+_t,wr="__reactResources$"+_t,xt="__reactMarker$"+_t;function Wn(p){delete p[ln],delete p[yn],delete p[dn],delete p[Sr],delete p[mr]}function Mn(p){var A=p[ln];if(A)return A;for(var k=p.parentNode;k;){if(A=k[kn]||k[ln]){if(k=A.alternate,A.child!==null||k!==null&&k.child!==null)for(p=nZ(p);p!==null;){if(k=p[ln])return k;p=nZ(p)}return A}p=k,k=p.parentNode}return null}function Rn(p){if(p=p[ln]||p[kn]){var A=p.tag;if(A===5||A===6||A===13||A===31||A===26||A===27||A===3)return p}return null}function On(p){var A=p.tag;if(A===5||A===26||A===27||A===6)return p.stateNode;throw Error(r(33))}function rt(p){var A=p[wr];return A||(A=p[wr]={hoistableStyles:new Map,hoistableScripts:new Map}),A}function Ot(p){p[xt]=!0}var Vt=new Set,kt={};function Lt(p,A){bt(p,A),bt(p+"Capture",A)}function bt(p,A){for(kt[p]=A,p=0;p<A.length;p++)Vt.add(A[p])}var Pt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),or={},er={};function ai(p){return we.call(er,p)?!0:we.call(or,p)?!1:Pt.test(p)?er[p]=!0:(or[p]=!0,!1)}function Nn(p,A,k){if(ai(A))if(k===null)p.removeAttribute(A);else{switch(typeof k){case"undefined":case"function":case"symbol":p.removeAttribute(A);return;case"boolean":var D=A.toLowerCase().slice(0,5);if(D!=="data-"&&D!=="aria-"){p.removeAttribute(A);return}}p.setAttribute(A,""+k)}}function yi(p,A,k){if(k===null)p.removeAttribute(A);else{switch(typeof k){case"undefined":case"function":case"symbol":case"boolean":p.removeAttribute(A);return}p.setAttribute(A,""+k)}}function Yn(p,A,k,D){if(D===null)p.removeAttribute(k);else{switch(typeof D){case"undefined":case"function":case"symbol":case"boolean":p.removeAttribute(k);return}p.setAttributeNS(A,k,""+D)}}function xi(p){switch(typeof p){case"bigint":case"boolean":case"number":case"string":case"undefined":return p;case"object":return p;default:return""}}function Ms(p){var A=p.type;return(p=p.nodeName)&&p.toLowerCase()==="input"&&(A==="checkbox"||A==="radio")}function os(p,A,k){var D=Object.getOwnPropertyDescriptor(p.constructor.prototype,A);if(!p.hasOwnProperty(A)&&typeof D<"u"&&typeof D.get=="function"&&typeof D.set=="function"){var B=D.get,G=D.set;return Object.defineProperty(p,A,{configurable:!0,get:function(){return B.call(this)},set:function(se){k=""+se,G.call(this,se)}}),Object.defineProperty(p,A,{enumerable:D.enumerable}),{getValue:function(){return k},setValue:function(se){k=""+se},stopTracking:function(){p._valueTracker=null,delete p[A]}}}}function Ys(p){if(!p._valueTracker){var A=Ms(p)?"checked":"value";p._valueTracker=os(p,A,""+p[A])}}function qs(p){if(!p)return!1;var A=p._valueTracker;if(!A)return!0;var k=A.getValue(),D="";return p&&(D=Ms(p)?p.checked?"true":"false":p.value),p=D,p!==k?(A.setValue(p),!0):!1}function Ks(p){if(p=p||(typeof document<"u"?document:void 0),typeof p>"u")return null;try{return p.activeElement||p.body}catch{return p.body}}var ei=/[\n"\\]/g;function Lr(p){return p.replace(ei,function(A){return"\\"+A.charCodeAt(0).toString(16)+" "})}function va(p,A,k,D,B,G,se,de){p.name="",se!=null&&typeof se!="function"&&typeof se!="symbol"&&typeof se!="boolean"?p.type=se:p.removeAttribute("type"),A!=null?se==="number"?(A===0&&p.value===""||p.value!=A)&&(p.value=""+xi(A)):p.value!==""+xi(A)&&(p.value=""+xi(A)):se!=="submit"&&se!=="reset"||p.removeAttribute("value"),A!=null?xe(p,se,xi(A)):k!=null?xe(p,se,xi(k)):D!=null&&p.removeAttribute("value"),B==null&&G!=null&&(p.defaultChecked=!!G),B!=null&&(p.checked=B&&typeof B!="function"&&typeof B!="symbol"),de!=null&&typeof de!="function"&&typeof de!="symbol"&&typeof de!="boolean"?p.name=""+xi(de):p.removeAttribute("name")}function ft(p,A,k,D,B,G,se,de){if(G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"&&(p.type=G),A!=null||k!=null){if(!(G!=="submit"&&G!=="reset"||A!=null)){Ys(p);return}k=k!=null?""+xi(k):"",A=A!=null?""+xi(A):k,de||A===p.value||(p.value=A),p.defaultValue=A}D=D??B,D=typeof D!="function"&&typeof D!="symbol"&&!!D,p.checked=de?p.checked:!!D,p.defaultChecked=!!D,se!=null&&typeof se!="function"&&typeof se!="symbol"&&typeof se!="boolean"&&(p.name=se),Ys(p)}function xe(p,A,k){A==="number"&&Ks(p.ownerDocument)===p||p.defaultValue===""+k||(p.defaultValue=""+k)}function _e(p,A,k,D){if(p=p.options,A){A={};for(var B=0;B<k.length;B++)A["$"+k[B]]=!0;for(k=0;k<p.length;k++)B=A.hasOwnProperty("$"+p[k].value),p[k].selected!==B&&(p[k].selected=B),B&&D&&(p[k].defaultSelected=!0)}else{for(k=""+xi(k),A=null,B=0;B<p.length;B++){if(p[B].value===k){p[B].selected=!0,D&&(p[B].defaultSelected=!0);return}A!==null||p[B].disabled||(A=p[B])}A!==null&&(A.selected=!0)}}function at(p,A,k){if(A!=null&&(A=""+xi(A),A!==p.value&&(p.value=A),k==null)){p.defaultValue!==A&&(p.defaultValue=A);return}p.defaultValue=k!=null?""+xi(k):""}function At(p,A,k,D){if(A==null){if(D!=null){if(k!=null)throw Error(r(92));if(W(D)){if(1<D.length)throw Error(r(93));D=D[0]}k=D}k==null&&(k=""),A=k}k=xi(A),p.defaultValue=k,D=p.textContent,D===k&&D!==""&&D!==null&&(p.value=D),Ys(p)}function Jt(p,A){if(A){var k=p.firstChild;if(k&&k===p.lastChild&&k.nodeType===3){k.nodeValue=A;return}}p.textContent=A}var En=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Fr(p,A,k){var D=A.indexOf("--")===0;k==null||typeof k=="boolean"||k===""?D?p.setProperty(A,""):A==="float"?p.cssFloat="":p[A]="":D?p.setProperty(A,k):typeof k!="number"||k===0||En.has(A)?A==="float"?p.cssFloat=k:p[A]=(""+k).trim():p[A]=k+"px"}function ir(p,A,k){if(A!=null&&typeof A!="object")throw Error(r(62));if(p=p.style,k!=null){for(var D in k)!k.hasOwnProperty(D)||A!=null&&A.hasOwnProperty(D)||(D.indexOf("--")===0?p.setProperty(D,""):D==="float"?p.cssFloat="":p[D]="");for(var B in A)D=A[B],A.hasOwnProperty(B)&&k[B]!==D&&Fr(p,B,D)}else for(var G in A)A.hasOwnProperty(G)&&Fr(p,G,A[G])}function bi(p){if(p.indexOf("-")===-1)return!1;switch(p){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 ls=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ql=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $r(p){return Ql.test(""+p)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":p}function ys(){}var Nc=null;function Eu(p){return p=p.target||p.srcElement||window,p.correspondingUseElement&&(p=p.correspondingUseElement),p.nodeType===3?p.parentNode:p}var Aa=null,Sa=null;function Dc(p){var A=Rn(p);if(A&&(p=A.stateNode)){var k=p[yn]||null;e:switch(p=A.stateNode,A.type){case"input":if(va(p,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name),A=k.name,k.type==="radio"&&A!=null){for(k=p;k.parentNode;)k=k.parentNode;for(k=k.querySelectorAll('input[name="'+Lr(""+A)+'"][type="radio"]'),A=0;A<k.length;A++){var D=k[A];if(D!==p&&D.form===p.form){var B=D[yn]||null;if(!B)throw Error(r(90));va(D,B.value,B.defaultValue,B.defaultValue,B.checked,B.defaultChecked,B.type,B.name)}}for(A=0;A<k.length;A++)D=k[A],D.form===p.form&&qs(D)}break e;case"textarea":at(p,k.value,k.defaultValue);break e;case"select":A=k.value,A!=null&&_e(p,!!k.multiple,A,!1)}}}var Tu=!1;function Zl(p,A,k){if(Tu)return p(A,k);Tu=!0;try{var D=p(A);return D}finally{if(Tu=!1,(Aa!==null||Sa!==null)&&(Ww(),Aa&&(A=Aa,p=Sa,Sa=Aa=null,Dc(A),p)))for(A=0;A<p.length;A++)Dc(p[A])}}function zl(p,A){var k=p.stateNode;if(k===null)return null;var D=k[yn]||null;if(D===null)return null;k=D[A];e:switch(A){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(D=!D.disabled)||(p=p.type,D=!(p==="button"||p==="input"||p==="select"||p==="textarea")),p=!D;break e;default:p=!1}if(p)return null;if(k&&typeof k!="function")throw Error(r(231,A,typeof k));return k}var Ns=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pu=!1;if(Ns)try{var Br={};Object.defineProperty(Br,"passive",{get:function(){Pu=!0}}),window.addEventListener("test",Br,Br),window.removeEventListener("test",Br,Br)}catch{Pu=!1}var ot=null,Mt=null,cs=null;function rh(){if(cs)return cs;var p,A=Mt,k=A.length,D,B="value"in ot?ot.value:ot.textContent,G=B.length;for(p=0;p<k&&A[p]===B[p];p++);var se=k-p;for(D=1;D<=se&&A[k-D]===B[G-D];D++);return cs=B.slice(p,1<D?1-D:void 0)}function z0(p){var A=p.keyCode;return"charCode"in p?(p=p.charCode,p===0&&A===13&&(p=13)):p=A,p===10&&(p=13),32<=p||p===13?p:0}function G0(){return!0}function nw(){return!1}function Ds(p){function A(k,D,B,G,se){this._reactName=k,this._targetInst=B,this.type=D,this.nativeEvent=G,this.target=se,this.currentTarget=null;for(var de in p)p.hasOwnProperty(de)&&(k=p[de],this[de]=k?k(G):G[de]);return this.isDefaultPrevented=(G.defaultPrevented!=null?G.defaultPrevented:G.returnValue===!1)?G0:nw,this.isPropagationStopped=nw,this}return f(A.prototype,{preventDefault:function(){this.defaultPrevented=!0;var k=this.nativeEvent;k&&(k.preventDefault?k.preventDefault():typeof k.returnValue!="unknown"&&(k.returnValue=!1),this.isDefaultPrevented=G0)},stopPropagation:function(){var k=this.nativeEvent;k&&(k.stopPropagation?k.stopPropagation():typeof k.cancelBubble!="unknown"&&(k.cancelBubble=!0),this.isPropagationStopped=G0)},persist:function(){},isPersistent:G0}),A}var Mu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(p){return p.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$d=Ds(Mu),ih=f({},Mu,{view:0,detail:0}),X3=Ds(ih),Iy,U0,sh,X0=f({},ih,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:W0,button:0,buttons:0,relatedTarget:function(p){return p.relatedTarget===void 0?p.fromElement===p.srcElement?p.toElement:p.fromElement:p.relatedTarget},movementX:function(p){return"movementX"in p?p.movementX:(p!==sh&&(sh&&p.type==="mousemove"?(Iy=p.screenX-sh.screenX,U0=p.screenY-sh.screenY):U0=Iy=0,sh=p),Iy)},movementY:function(p){return"movementY"in p?p.movementY:U0}}),_y=Ds(X0),W3=f({},X0,{dataTransfer:0}),Y3=Ds(W3),Ry=f({},ih,{relatedTarget:0}),jy=Ds(Ry),q3=f({},Mu,{animationName:0,elapsedTime:0,pseudoElement:0}),Ly=Ds(q3),K3=f({},Mu,{clipboardData:function(p){return"clipboardData"in p?p.clipboardData:window.clipboardData}}),J3=Ds(K3),rw=f({},Mu,{data:0}),iw=Ds(rw),e5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t5={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"},n5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bd(p){var A=this.nativeEvent;return A.getModifierState?A.getModifierState(p):(p=n5[p])?!!A[p]:!1}function W0(){return Bd}var r5=f({},ih,{key:function(p){if(p.key){var A=e5[p.key]||p.key;if(A!=="Unidentified")return A}return p.type==="keypress"?(p=z0(p),p===13?"Enter":String.fromCharCode(p)):p.type==="keydown"||p.type==="keyup"?t5[p.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:W0,charCode:function(p){return p.type==="keypress"?z0(p):0},keyCode:function(p){return p.type==="keydown"||p.type==="keyup"?p.keyCode:0},which:function(p){return p.type==="keypress"?z0(p):p.type==="keydown"||p.type==="keyup"?p.keyCode:0}}),re=Ds(r5),T=f({},X0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),S=Ds(T),P=f({},ih,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:W0}),R=Ds(P),X=f({},Mu,{propertyName:0,elapsedTime:0,pseudoElement:0}),ae=Ds(X),ce=f({},X0,{deltaX:function(p){return"deltaX"in p?p.deltaX:"wheelDeltaX"in p?-p.wheelDeltaX:0},deltaY:function(p){return"deltaY"in p?p.deltaY:"wheelDeltaY"in p?-p.wheelDeltaY:"wheelDelta"in p?-p.wheelDelta:0},deltaZ:0,deltaMode:0}),ge=Ds(ce),ve=f({},Mu,{newState:0,oldState:0}),Ce=Ds(ve),Be=[9,13,27,32],Je=Ns&&"CompositionEvent"in window,it=null;Ns&&"documentMode"in document&&(it=document.documentMode);var Nt=Ns&&"TextEvent"in window&&!it,Fn=Ns&&(!Je||it&&8<it&&11>=it),Or=" ",pn=!1;function gr(p,A){switch(p){case"keyup":return Be.indexOf(A.keyCode)!==-1;case"keydown":return A.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ic(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var wa=!1;function sw(p,A){switch(p){case"compositionend":return Ic(A);case"keypress":return A.which!==32?null:(pn=!0,Or);case"textInput":return p=A.data,p===Or&&pn?null:p;default:return null}}function aw(p,A){if(wa)return p==="compositionend"||!Je&&gr(p,A)?(p=rh(),cs=Mt=ot=null,wa=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(A.ctrlKey||A.altKey||A.metaKey)||A.ctrlKey&&A.altKey){if(A.char&&1<A.char.length)return A.char;if(A.which)return String.fromCharCode(A.which)}return null;case"compositionend":return Fn&&A.locale!=="ko"?null:A.data;default:return null}}var ow={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 Fy(p){var A=p&&p.nodeName&&p.nodeName.toLowerCase();return A==="input"?!!ow[p.type]:A==="textarea"}function $y(p,A,k,D){Aa?Sa?Sa.push(D):Sa=[D]:Aa=D,A=n8(A,"onChange"),0<A.length&&(k=new $d("onChange","change",null,k,D),p.push({event:k,listeners:A}))}var ah=null,oh=null;function lw(p){HQ(p,0)}function Vd(p){var A=On(p);if(qs(A))return p}function By(p,A){if(p==="change")return A}var Vy=!1;if(Ns){var Y0;if(Ns){var q0="oninput"in document;if(!q0){var Hy=document.createElement("div");Hy.setAttribute("oninput","return;"),q0=typeof Hy.oninput=="function"}Y0=q0}else Y0=!1;Vy=Y0&&(!document.documentMode||9<document.documentMode)}function Qy(){ah&&(ah.detachEvent("onpropertychange",Zy),oh=ah=null)}function Zy(p){if(p.propertyName==="value"&&Vd(oh)){var A=[];$y(A,oh,p,Eu(p)),Zl(lw,A)}}function cw(p,A,k){p==="focusin"?(Qy(),ah=A,oh=k,ah.attachEvent("onpropertychange",Zy)):p==="focusout"&&Qy()}function uw(p){if(p==="selectionchange"||p==="keyup"||p==="keydown")return Vd(oh)}function fw(p,A){if(p==="click")return Vd(A)}function hw(p,A){if(p==="input"||p==="change")return Vd(A)}function dw(p,A){return p===A&&(p!==0||1/p===1/A)||p!==p&&A!==A}var Js=typeof Object.is=="function"?Object.is:dw;function lh(p,A){if(Js(p,A))return!0;if(typeof p!="object"||p===null||typeof A!="object"||A===null)return!1;var k=Object.keys(p),D=Object.keys(A);if(k.length!==D.length)return!1;for(D=0;D<k.length;D++){var B=k[D];if(!we.call(A,B)||!Js(p[B],A[B]))return!1}return!0}function zy(p){for(;p&&p.firstChild;)p=p.firstChild;return p}function Gy(p,A){var k=zy(p);p=0;for(var D;k;){if(k.nodeType===3){if(D=p+k.textContent.length,p<=A&&D>=A)return{node:k,offset:A-p};p=D}e:{for(;k;){if(k.nextSibling){k=k.nextSibling;break e}k=k.parentNode}k=void 0}k=zy(k)}}function Uy(p,A){return p&&A?p===A?!0:p&&p.nodeType===3?!1:A&&A.nodeType===3?Uy(p,A.parentNode):"contains"in p?p.contains(A):p.compareDocumentPosition?!!(p.compareDocumentPosition(A)&16):!1:!1}function Xy(p){p=p!=null&&p.ownerDocument!=null&&p.ownerDocument.defaultView!=null?p.ownerDocument.defaultView:window;for(var A=Ks(p.document);A instanceof p.HTMLIFrameElement;){try{var k=typeof A.contentWindow.location.href=="string"}catch{k=!1}if(k)p=A.contentWindow;else break;A=Ks(p.document)}return A}function K0(p){var A=p&&p.nodeName&&p.nodeName.toLowerCase();return A&&(A==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||A==="textarea"||p.contentEditable==="true")}var pw=Ns&&"documentMode"in document&&11>=document.documentMode,Nu=null,i5=null,Wy=null,s5=!1;function gV(p,A,k){var D=k.window===k?k.document:k.nodeType===9?k:k.ownerDocument;s5||Nu==null||Nu!==Ks(D)||(D=Nu,"selectionStart"in D&&K0(D)?D={start:D.selectionStart,end:D.selectionEnd}:(D=(D.ownerDocument&&D.ownerDocument.defaultView||window).getSelection(),D={anchorNode:D.anchorNode,anchorOffset:D.anchorOffset,focusNode:D.focusNode,focusOffset:D.focusOffset}),Wy&&lh(Wy,D)||(Wy=D,D=n8(i5,"onSelect"),0<D.length&&(A=new $d("onSelect","select",null,A,k),p.push({event:A,listeners:D}),A.target=Nu)))}function Hd(p,A){var k={};return k[p.toLowerCase()]=A.toLowerCase(),k["Webkit"+p]="webkit"+A,k["Moz"+p]="moz"+A,k}var J0={animationend:Hd("Animation","AnimationEnd"),animationiteration:Hd("Animation","AnimationIteration"),animationstart:Hd("Animation","AnimationStart"),transitionrun:Hd("Transition","TransitionRun"),transitionstart:Hd("Transition","TransitionStart"),transitioncancel:Hd("Transition","TransitionCancel"),transitionend:Hd("Transition","TransitionEnd")},a5={},yV={};Ns&&(yV=document.createElement("div").style,"AnimationEvent"in window||(delete J0.animationend.animation,delete J0.animationiteration.animation,delete J0.animationstart.animation),"TransitionEvent"in window||delete J0.transitionend.transition);function Qd(p){if(a5[p])return a5[p];if(!J0[p])return p;var A=J0[p],k;for(k in A)if(A.hasOwnProperty(k)&&k in yV)return a5[p]=A[k];return p}var xV=Qd("animationend"),bV=Qd("animationiteration"),vV=Qd("animationstart"),FAe=Qd("transitionrun"),$Ae=Qd("transitionstart"),BAe=Qd("transitioncancel"),AV=Qd("transitionend"),SV=new Map,o5="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");o5.push("scrollEnd");function Gl(p,A){SV.set(p,A),Lt(A,[p])}var mw=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var A=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(A))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)},rl=[],em=0,l5=0;function gw(){for(var p=em,A=l5=em=0;A<p;){var k=rl[A];rl[A++]=null;var D=rl[A];rl[A++]=null;var B=rl[A];rl[A++]=null;var G=rl[A];if(rl[A++]=null,D!==null&&B!==null){var se=D.pending;se===null?B.next=B:(B.next=se.next,se.next=B),D.pending=B}G!==0&&wV(k,B,G)}}function yw(p,A,k,D){rl[em++]=p,rl[em++]=A,rl[em++]=k,rl[em++]=D,l5|=D,p.lanes|=D,p=p.alternate,p!==null&&(p.lanes|=D)}function c5(p,A,k,D){return yw(p,A,k,D),xw(p)}function Zd(p,A){return yw(p,null,null,A),xw(p)}function wV(p,A,k){p.lanes|=k;var D=p.alternate;D!==null&&(D.lanes|=k);for(var B=!1,G=p.return;G!==null;)G.childLanes|=k,D=G.alternate,D!==null&&(D.childLanes|=k),G.tag===22&&(p=G.stateNode,p===null||p._visibility&1||(B=!0)),p=G,G=G.return;return p.tag===3?(G=p.stateNode,B&&A!==null&&(B=31-ut(k),p=G.hiddenUpdates,D=p[B],D===null?p[B]=[A]:D.push(A),A.lane=k|536870912),G):null}function xw(p){if(50<yx)throw yx=0,xT=null,Error(r(185));for(var A=p.return;A!==null;)p=A,A=p.return;return p.tag===3?p.stateNode:null}var tm={};function VAe(p,A,k,D){this.tag=p,this.key=k,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=A,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=D,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xo(p,A,k,D){return new VAe(p,A,k,D)}function u5(p){return p=p.prototype,!(!p||!p.isReactComponent)}function Du(p,A){var k=p.alternate;return k===null?(k=xo(p.tag,A,p.key,p.mode),k.elementType=p.elementType,k.type=p.type,k.stateNode=p.stateNode,k.alternate=p,p.alternate=k):(k.pendingProps=A,k.type=p.type,k.flags=0,k.subtreeFlags=0,k.deletions=null),k.flags=p.flags&65011712,k.childLanes=p.childLanes,k.lanes=p.lanes,k.child=p.child,k.memoizedProps=p.memoizedProps,k.memoizedState=p.memoizedState,k.updateQueue=p.updateQueue,A=p.dependencies,k.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext},k.sibling=p.sibling,k.index=p.index,k.ref=p.ref,k.refCleanup=p.refCleanup,k}function OV(p,A){p.flags&=65011714;var k=p.alternate;return k===null?(p.childLanes=0,p.lanes=A,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=k.childLanes,p.lanes=k.lanes,p.child=k.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=k.memoizedProps,p.memoizedState=k.memoizedState,p.updateQueue=k.updateQueue,p.type=k.type,A=k.dependencies,p.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext}),p}function bw(p,A,k,D,B,G){var se=0;if(D=p,typeof p=="function")u5(p)&&(se=1);else if(typeof p=="string")se=GSe(p,k,z.current)?26:p==="html"||p==="head"||p==="body"?27:5;else e:switch(p){case _:return p=xo(31,k,A,B),p.elementType=_,p.lanes=G,p;case g:return zd(k.children,B,G,A);case v:se=8,B|=24;break;case b:return p=xo(12,k,A,B|2),p.elementType=b,p.lanes=G,p;case E:return p=xo(13,k,A,B),p.elementType=E,p.lanes=G,p;case M:return p=xo(19,k,A,B),p.elementType=M,p.lanes=G,p;default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case O:se=10;break e;case w:se=9;break e;case C:se=11;break e;case N:se=14;break e;case I:se=16,D=null;break e}se=29,k=Error(r(130,p===null?"null":typeof p,"")),D=null}return A=xo(se,k,A,B),A.elementType=p,A.type=D,A.lanes=G,A}function zd(p,A,k,D){return p=xo(7,p,D,A),p.lanes=k,p}function f5(p,A,k){return p=xo(6,p,null,A),p.lanes=k,p}function kV(p){var A=xo(18,null,null,0);return A.stateNode=p,A}function h5(p,A,k){return A=xo(4,p.children!==null?p.children:[],p.key,A),A.lanes=k,A.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},A}var CV=new WeakMap;function il(p,A){if(typeof p=="object"&&p!==null){var k=CV.get(p);return k!==void 0?k:(A={value:p,source:A,stack:ye(A)},CV.set(p,A),A)}return{value:p,source:A,stack:ye(A)}}var nm=[],rm=0,vw=null,Yy=0,sl=[],al=0,ch=null,_c=1,Rc="";function Iu(p,A){nm[rm++]=Yy,nm[rm++]=vw,vw=p,Yy=A}function EV(p,A,k){sl[al++]=_c,sl[al++]=Rc,sl[al++]=ch,ch=p;var D=_c;p=Rc;var B=32-ut(D)-1;D&=~(1<<B),k+=1;var G=32-ut(A)+B;if(30<G){var se=B-B%5;G=(D&(1<<se)-1).toString(32),D>>=se,B-=se,_c=1<<32-ut(A)+B|k<<B|D,Rc=G+p}else _c=1<<G|k<<B|D,Rc=p}function d5(p){p.return!==null&&(Iu(p,1),EV(p,1,0))}function p5(p){for(;p===vw;)vw=nm[--rm],nm[rm]=null,Yy=nm[--rm],nm[rm]=null;for(;p===ch;)ch=sl[--al],sl[al]=null,Rc=sl[--al],sl[al]=null,_c=sl[--al],sl[al]=null}function TV(p,A){sl[al++]=_c,sl[al++]=Rc,sl[al++]=ch,_c=A.id,Rc=A.overflow,ch=p}var Is=null,ti=null,qn=!1,uh=null,ol=!1,m5=Error(r(519));function fh(p){var A=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qy(il(A,p)),m5}function PV(p){var A=p.stateNode,k=p.type,D=p.memoizedProps;switch(A[ln]=p,A[yn]=D,k){case"dialog":Bn("cancel",A),Bn("close",A);break;case"iframe":case"object":case"embed":Bn("load",A);break;case"video":case"audio":for(k=0;k<bx.length;k++)Bn(bx[k],A);break;case"source":Bn("error",A);break;case"img":case"image":case"link":Bn("error",A),Bn("load",A);break;case"details":Bn("toggle",A);break;case"input":Bn("invalid",A),ft(A,D.value,D.defaultValue,D.checked,D.defaultChecked,D.type,D.name,!0);break;case"select":Bn("invalid",A);break;case"textarea":Bn("invalid",A),At(A,D.value,D.defaultValue,D.children)}k=D.children,typeof k!="string"&&typeof k!="number"&&typeof k!="bigint"||A.textContent===""+k||D.suppressHydrationWarning===!0||GQ(A.textContent,k)?(D.popover!=null&&(Bn("beforetoggle",A),Bn("toggle",A)),D.onScroll!=null&&Bn("scroll",A),D.onScrollEnd!=null&&Bn("scrollend",A),D.onClick!=null&&(A.onclick=ys),A=!0):A=!1,A||fh(p,!0)}function MV(p){for(Is=p.return;Is;)switch(Is.tag){case 5:case 31:case 13:ol=!1;return;case 27:case 3:ol=!0;return;default:Is=Is.return}}function im(p){if(p!==Is)return!1;if(!qn)return MV(p),qn=!0,!1;var A=p.tag,k;if((k=A!==3&&A!==27)&&((k=A===5)&&(k=p.type,k=!(k!=="form"&&k!=="button")||IT(p.type,p.memoizedProps)),k=!k),k&&ti&&fh(p),MV(p),A===13){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));ti=tZ(p)}else if(A===31){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));ti=tZ(p)}else A===27?(A=ti,kh(p.type)?(p=FT,FT=null,ti=p):ti=A):ti=Is?cl(p.stateNode.nextSibling):null;return!0}function Gd(){ti=Is=null,qn=!1}function g5(){var p=uh;return p!==null&&(Za===null?Za=p:Za.push.apply(Za,p),uh=null),p}function qy(p){uh===null?uh=[p]:uh.push(p)}var y5=q(null),Ud=null,_u=null;function hh(p,A,k){U(y5,A._currentValue),A._currentValue=k}function Ru(p){p._currentValue=y5.current,F(y5)}function x5(p,A,k){for(;p!==null;){var D=p.alternate;if((p.childLanes&A)!==A?(p.childLanes|=A,D!==null&&(D.childLanes|=A)):D!==null&&(D.childLanes&A)!==A&&(D.childLanes|=A),p===k)break;p=p.return}}function b5(p,A,k,D){var B=p.child;for(B!==null&&(B.return=p);B!==null;){var G=B.dependencies;if(G!==null){var se=B.child;G=G.firstContext;e:for(;G!==null;){var de=G;G=B;for(var Ee=0;Ee<A.length;Ee++)if(de.context===A[Ee]){G.lanes|=k,de=G.alternate,de!==null&&(de.lanes|=k),x5(G.return,k,p),D||(se=null);break e}G=de.next}}else if(B.tag===18){if(se=B.return,se===null)throw Error(r(341));se.lanes|=k,G=se.alternate,G!==null&&(G.lanes|=k),x5(se,k,p),se=null}else se=B.child;if(se!==null)se.return=B;else for(se=B;se!==null;){if(se===p){se=null;break}if(B=se.sibling,B!==null){B.return=se.return,se=B;break}se=se.return}B=se}}function sm(p,A,k,D){p=null;for(var B=A,G=!1;B!==null;){if(!G){if((B.flags&524288)!==0)G=!0;else if((B.flags&262144)!==0)break}if(B.tag===10){var se=B.alternate;if(se===null)throw Error(r(387));if(se=se.memoizedProps,se!==null){var de=B.type;Js(B.pendingProps.value,se.value)||(p!==null?p.push(de):p=[de])}}else if(B===ee.current){if(se=B.alternate,se===null)throw Error(r(387));se.memoizedState.memoizedState!==B.memoizedState.memoizedState&&(p!==null?p.push(Ox):p=[Ox])}B=B.return}p!==null&&b5(A,p,k,D),A.flags|=262144}function Aw(p){for(p=p.firstContext;p!==null;){if(!Js(p.context._currentValue,p.memoizedValue))return!0;p=p.next}return!1}function Xd(p){Ud=p,_u=null,p=p.dependencies,p!==null&&(p.firstContext=null)}function _s(p){return NV(Ud,p)}function Sw(p,A){return Ud===null&&Xd(p),NV(p,A)}function NV(p,A){var k=A._currentValue;if(A={context:A,memoizedValue:k,next:null},_u===null){if(p===null)throw Error(r(308));_u=A,p.dependencies={lanes:0,firstContext:A},p.flags|=524288}else _u=_u.next=A;return k}var HAe=typeof AbortController<"u"?AbortController:function(){var p=[],A=this.signal={aborted:!1,addEventListener:function(k,D){p.push(D)}};this.abort=function(){A.aborted=!0,p.forEach(function(k){return k()})}},QAe=t.unstable_scheduleCallback,ZAe=t.unstable_NormalPriority,Ui={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function v5(){return{controller:new HAe,data:new Map,refCount:0}}function Ky(p){p.refCount--,p.refCount===0&&QAe(ZAe,function(){p.controller.abort()})}var Jy=null,A5=0,am=0,om=null;function zAe(p,A){if(Jy===null){var k=Jy=[];A5=0,am=OT(),om={status:"pending",value:void 0,then:function(D){k.push(D)}}}return A5++,A.then(DV,DV),A}function DV(){if(--A5===0&&Jy!==null){om!==null&&(om.status="fulfilled");var p=Jy;Jy=null,am=0,om=null;for(var A=0;A<p.length;A++)(0,p[A])()}}function GAe(p,A){var k=[],D={status:"pending",value:null,reason:null,then:function(B){k.push(B)}};return p.then(function(){D.status="fulfilled",D.value=A;for(var B=0;B<k.length;B++)(0,k[B])(A)},function(B){for(D.status="rejected",D.reason=B,B=0;B<k.length;B++)(0,k[B])(void 0)}),D}var IV=Y.S;Y.S=function(p,A){gQ=ze(),typeof A=="object"&&A!==null&&typeof A.then=="function"&&zAe(p,A),IV!==null&&IV(p,A)};var Wd=q(null);function S5(){var p=Wd.current;return p!==null?p:Vr.pooledCache}function ww(p,A){A===null?U(Wd,Wd.current):U(Wd,A.pool)}function _V(){var p=S5();return p===null?null:{parent:Ui._currentValue,pool:p}}var lm=Error(r(460)),w5=Error(r(474)),Ow=Error(r(542)),kw={then:function(){}};function RV(p){return p=p.status,p==="fulfilled"||p==="rejected"}function jV(p,A,k){switch(k=p[k],k===void 0?p.push(A):k!==A&&(A.then(ys,ys),A=k),A.status){case"fulfilled":return A.value;case"rejected":throw p=A.reason,FV(p),p;default:if(typeof A.status=="string")A.then(ys,ys);else{if(p=Vr,p!==null&&100<p.shellSuspendCounter)throw Error(r(482));p=A,p.status="pending",p.then(function(D){if(A.status==="pending"){var B=A;B.status="fulfilled",B.value=D}},function(D){if(A.status==="pending"){var B=A;B.status="rejected",B.reason=D}})}switch(A.status){case"fulfilled":return A.value;case"rejected":throw p=A.reason,FV(p),p}throw qd=A,lm}}function Yd(p){try{var A=p._init;return A(p._payload)}catch(k){throw k!==null&&typeof k=="object"&&typeof k.then=="function"?(qd=k,lm):k}}var qd=null;function LV(){if(qd===null)throw Error(r(459));var p=qd;return qd=null,p}function FV(p){if(p===lm||p===Ow)throw Error(r(483))}var cm=null,ex=0;function Cw(p){var A=ex;return ex+=1,cm===null&&(cm=[]),jV(cm,p,A)}function tx(p,A){A=A.props.ref,p.ref=A!==void 0?A:null}function Ew(p,A){throw A.$$typeof===h?Error(r(525)):(p=Object.prototype.toString.call(A),Error(r(31,p==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":p)))}function $V(p){function A(Ie,Te){if(p){var je=Ie.deletions;je===null?(Ie.deletions=[Te],Ie.flags|=16):je.push(Te)}}function k(Ie,Te){if(!p)return null;for(;Te!==null;)A(Ie,Te),Te=Te.sibling;return null}function D(Ie){for(var Te=new Map;Ie!==null;)Ie.key!==null?Te.set(Ie.key,Ie):Te.set(Ie.index,Ie),Ie=Ie.sibling;return Te}function B(Ie,Te){return Ie=Du(Ie,Te),Ie.index=0,Ie.sibling=null,Ie}function G(Ie,Te,je){return Ie.index=je,p?(je=Ie.alternate,je!==null?(je=je.index,je<Te?(Ie.flags|=67108866,Te):je):(Ie.flags|=67108866,Te)):(Ie.flags|=1048576,Te)}function se(Ie){return p&&Ie.alternate===null&&(Ie.flags|=67108866),Ie}function de(Ie,Te,je,Ue){return Te===null||Te.tag!==6?(Te=f5(je,Ie.mode,Ue),Te.return=Ie,Te):(Te=B(Te,je),Te.return=Ie,Te)}function Ee(Ie,Te,je,Ue){var Kt=je.type;return Kt===g?Ge(Ie,Te,je.props.children,Ue,je.key):Te!==null&&(Te.elementType===Kt||typeof Kt=="object"&&Kt!==null&&Kt.$$typeof===I&&Yd(Kt)===Te.type)?(Te=B(Te,je.props),tx(Te,je),Te.return=Ie,Te):(Te=bw(je.type,je.key,je.props,null,Ie.mode,Ue),tx(Te,je),Te.return=Ie,Te)}function Le(Ie,Te,je,Ue){return Te===null||Te.tag!==4||Te.stateNode.containerInfo!==je.containerInfo||Te.stateNode.implementation!==je.implementation?(Te=h5(je,Ie.mode,Ue),Te.return=Ie,Te):(Te=B(Te,je.children||[]),Te.return=Ie,Te)}function Ge(Ie,Te,je,Ue,Kt){return Te===null||Te.tag!==7?(Te=zd(je,Ie.mode,Ue,Kt),Te.return=Ie,Te):(Te=B(Te,je),Te.return=Ie,Te)}function Xe(Ie,Te,je){if(typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint")return Te=f5(""+Te,Ie.mode,je),Te.return=Ie,Te;if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case d:return je=bw(Te.type,Te.key,Te.props,null,Ie.mode,je),tx(je,Te),je.return=Ie,je;case y:return Te=h5(Te,Ie.mode,je),Te.return=Ie,Te;case I:return Te=Yd(Te),Xe(Ie,Te,je)}if(W(Te)||V(Te))return Te=zd(Te,Ie.mode,je,null),Te.return=Ie,Te;if(typeof Te.then=="function")return Xe(Ie,Cw(Te),je);if(Te.$$typeof===O)return Xe(Ie,Sw(Ie,Te),je);Ew(Ie,Te)}return null}function Fe(Ie,Te,je,Ue){var Kt=Te!==null?Te.key:null;if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return Kt!==null?null:de(Ie,Te,""+je,Ue);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case d:return je.key===Kt?Ee(Ie,Te,je,Ue):null;case y:return je.key===Kt?Le(Ie,Te,je,Ue):null;case I:return je=Yd(je),Fe(Ie,Te,je,Ue)}if(W(je)||V(je))return Kt!==null?null:Ge(Ie,Te,je,Ue,null);if(typeof je.then=="function")return Fe(Ie,Te,Cw(je),Ue);if(je.$$typeof===O)return Fe(Ie,Te,Sw(Ie,je),Ue);Ew(Ie,je)}return null}function He(Ie,Te,je,Ue,Kt){if(typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint")return Ie=Ie.get(je)||null,de(Te,Ie,""+Ue,Kt);if(typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case d:return Ie=Ie.get(Ue.key===null?je:Ue.key)||null,Ee(Te,Ie,Ue,Kt);case y:return Ie=Ie.get(Ue.key===null?je:Ue.key)||null,Le(Te,Ie,Ue,Kt);case I:return Ue=Yd(Ue),He(Ie,Te,je,Ue,Kt)}if(W(Ue)||V(Ue))return Ie=Ie.get(je)||null,Ge(Te,Ie,Ue,Kt,null);if(typeof Ue.then=="function")return He(Ie,Te,je,Cw(Ue),Kt);if(Ue.$$typeof===O)return He(Ie,Te,je,Sw(Te,Ue),Kt);Ew(Te,Ue)}return null}function Ft(Ie,Te,je,Ue){for(var Kt=null,lr=null,Qt=Te,Tn=Te=0,Gn=null;Qt!==null&&Tn<je.length;Tn++){Qt.index>Tn?(Gn=Qt,Qt=null):Gn=Qt.sibling;var cr=Fe(Ie,Qt,je[Tn],Ue);if(cr===null){Qt===null&&(Qt=Gn);break}p&&Qt&&cr.alternate===null&&A(Ie,Qt),Te=G(cr,Te,Tn),lr===null?Kt=cr:lr.sibling=cr,lr=cr,Qt=Gn}if(Tn===je.length)return k(Ie,Qt),qn&&Iu(Ie,Tn),Kt;if(Qt===null){for(;Tn<je.length;Tn++)Qt=Xe(Ie,je[Tn],Ue),Qt!==null&&(Te=G(Qt,Te,Tn),lr===null?Kt=Qt:lr.sibling=Qt,lr=Qt);return qn&&Iu(Ie,Tn),Kt}for(Qt=D(Qt);Tn<je.length;Tn++)Gn=He(Qt,Ie,Tn,je[Tn],Ue),Gn!==null&&(p&&Gn.alternate!==null&&Qt.delete(Gn.key===null?Tn:Gn.key),Te=G(Gn,Te,Tn),lr===null?Kt=Gn:lr.sibling=Gn,lr=Gn);return p&&Qt.forEach(function(Mh){return A(Ie,Mh)}),qn&&Iu(Ie,Tn),Kt}function sn(Ie,Te,je,Ue){if(je==null)throw Error(r(151));for(var Kt=null,lr=null,Qt=Te,Tn=Te=0,Gn=null,cr=je.next();Qt!==null&&!cr.done;Tn++,cr=je.next()){Qt.index>Tn?(Gn=Qt,Qt=null):Gn=Qt.sibling;var Mh=Fe(Ie,Qt,cr.value,Ue);if(Mh===null){Qt===null&&(Qt=Gn);break}p&&Qt&&Mh.alternate===null&&A(Ie,Qt),Te=G(Mh,Te,Tn),lr===null?Kt=Mh:lr.sibling=Mh,lr=Mh,Qt=Gn}if(cr.done)return k(Ie,Qt),qn&&Iu(Ie,Tn),Kt;if(Qt===null){for(;!cr.done;Tn++,cr=je.next())cr=Xe(Ie,cr.value,Ue),cr!==null&&(Te=G(cr,Te,Tn),lr===null?Kt=cr:lr.sibling=cr,lr=cr);return qn&&Iu(Ie,Tn),Kt}for(Qt=D(Qt);!cr.done;Tn++,cr=je.next())cr=He(Qt,Ie,Tn,cr.value,Ue),cr!==null&&(p&&cr.alternate!==null&&Qt.delete(cr.key===null?Tn:cr.key),Te=G(cr,Te,Tn),lr===null?Kt=cr:lr.sibling=cr,lr=cr);return p&&Qt.forEach(function(rwe){return A(Ie,rwe)}),qn&&Iu(Ie,Tn),Kt}function Nr(Ie,Te,je,Ue){if(typeof je=="object"&&je!==null&&je.type===g&&je.key===null&&(je=je.props.children),typeof je=="object"&&je!==null){switch(je.$$typeof){case d:e:{for(var Kt=je.key;Te!==null;){if(Te.key===Kt){if(Kt=je.type,Kt===g){if(Te.tag===7){k(Ie,Te.sibling),Ue=B(Te,je.props.children),Ue.return=Ie,Ie=Ue;break e}}else if(Te.elementType===Kt||typeof Kt=="object"&&Kt!==null&&Kt.$$typeof===I&&Yd(Kt)===Te.type){k(Ie,Te.sibling),Ue=B(Te,je.props),tx(Ue,je),Ue.return=Ie,Ie=Ue;break e}k(Ie,Te);break}else A(Ie,Te);Te=Te.sibling}je.type===g?(Ue=zd(je.props.children,Ie.mode,Ue,je.key),Ue.return=Ie,Ie=Ue):(Ue=bw(je.type,je.key,je.props,null,Ie.mode,Ue),tx(Ue,je),Ue.return=Ie,Ie=Ue)}return se(Ie);case y:e:{for(Kt=je.key;Te!==null;){if(Te.key===Kt)if(Te.tag===4&&Te.stateNode.containerInfo===je.containerInfo&&Te.stateNode.implementation===je.implementation){k(Ie,Te.sibling),Ue=B(Te,je.children||[]),Ue.return=Ie,Ie=Ue;break e}else{k(Ie,Te);break}else A(Ie,Te);Te=Te.sibling}Ue=h5(je,Ie.mode,Ue),Ue.return=Ie,Ie=Ue}return se(Ie);case I:return je=Yd(je),Nr(Ie,Te,je,Ue)}if(W(je))return Ft(Ie,Te,je,Ue);if(V(je)){if(Kt=V(je),typeof Kt!="function")throw Error(r(150));return je=Kt.call(je),sn(Ie,Te,je,Ue)}if(typeof je.then=="function")return Nr(Ie,Te,Cw(je),Ue);if(je.$$typeof===O)return Nr(Ie,Te,Sw(Ie,je),Ue);Ew(Ie,je)}return typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint"?(je=""+je,Te!==null&&Te.tag===6?(k(Ie,Te.sibling),Ue=B(Te,je),Ue.return=Ie,Ie=Ue):(k(Ie,Te),Ue=f5(je,Ie.mode,Ue),Ue.return=Ie,Ie=Ue),se(Ie)):k(Ie,Te)}return function(Ie,Te,je,Ue){try{ex=0;var Kt=Nr(Ie,Te,je,Ue);return cm=null,Kt}catch(Qt){if(Qt===lm||Qt===Ow)throw Qt;var lr=xo(29,Qt,null,Ie.mode);return lr.lanes=Ue,lr.return=Ie,lr}finally{}}}var Kd=$V(!0),BV=$V(!1),dh=!1;function O5(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function k5(p,A){p=p.updateQueue,A.updateQueue===p&&(A.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,callbacks:null})}function ph(p){return{lane:p,tag:0,payload:null,callback:null,next:null}}function mh(p,A,k){var D=p.updateQueue;if(D===null)return null;if(D=D.shared,(dr&2)!==0){var B=D.pending;return B===null?A.next=A:(A.next=B.next,B.next=A),D.pending=A,A=xw(p),wV(p,null,k),A}return yw(p,D,A,k),xw(p)}function nx(p,A,k){if(A=A.updateQueue,A!==null&&(A=A.shared,(k&4194048)!==0)){var D=A.lanes;D&=p.pendingLanes,k|=D,A.lanes=k,hn(p,k)}}function C5(p,A){var k=p.updateQueue,D=p.alternate;if(D!==null&&(D=D.updateQueue,k===D)){var B=null,G=null;if(k=k.firstBaseUpdate,k!==null){do{var se={lane:k.lane,tag:k.tag,payload:k.payload,callback:null,next:null};G===null?B=G=se:G=G.next=se,k=k.next}while(k!==null);G===null?B=G=A:G=G.next=A}else B=G=A;k={baseState:D.baseState,firstBaseUpdate:B,lastBaseUpdate:G,shared:D.shared,callbacks:D.callbacks},p.updateQueue=k;return}p=k.lastBaseUpdate,p===null?k.firstBaseUpdate=A:p.next=A,k.lastBaseUpdate=A}var E5=!1;function rx(){if(E5){var p=om;if(p!==null)throw p}}function ix(p,A,k,D){E5=!1;var B=p.updateQueue;dh=!1;var G=B.firstBaseUpdate,se=B.lastBaseUpdate,de=B.shared.pending;if(de!==null){B.shared.pending=null;var Ee=de,Le=Ee.next;Ee.next=null,se===null?G=Le:se.next=Le,se=Ee;var Ge=p.alternate;Ge!==null&&(Ge=Ge.updateQueue,de=Ge.lastBaseUpdate,de!==se&&(de===null?Ge.firstBaseUpdate=Le:de.next=Le,Ge.lastBaseUpdate=Ee))}if(G!==null){var Xe=B.baseState;se=0,Ge=Le=Ee=null,de=G;do{var Fe=de.lane&-536870913,He=Fe!==de.lane;if(He?(zn&Fe)===Fe:(D&Fe)===Fe){Fe!==0&&Fe===am&&(E5=!0),Ge!==null&&(Ge=Ge.next={lane:0,tag:de.tag,payload:de.payload,callback:null,next:null});e:{var Ft=p,sn=de;Fe=A;var Nr=k;switch(sn.tag){case 1:if(Ft=sn.payload,typeof Ft=="function"){Xe=Ft.call(Nr,Xe,Fe);break e}Xe=Ft;break e;case 3:Ft.flags=Ft.flags&-65537|128;case 0:if(Ft=sn.payload,Fe=typeof Ft=="function"?Ft.call(Nr,Xe,Fe):Ft,Fe==null)break e;Xe=f({},Xe,Fe);break e;case 2:dh=!0}}Fe=de.callback,Fe!==null&&(p.flags|=64,He&&(p.flags|=8192),He=B.callbacks,He===null?B.callbacks=[Fe]:He.push(Fe))}else He={lane:Fe,tag:de.tag,payload:de.payload,callback:de.callback,next:null},Ge===null?(Le=Ge=He,Ee=Xe):Ge=Ge.next=He,se|=Fe;if(de=de.next,de===null){if(de=B.shared.pending,de===null)break;He=de,de=He.next,He.next=null,B.lastBaseUpdate=He,B.shared.pending=null}}while(!0);Ge===null&&(Ee=Xe),B.baseState=Ee,B.firstBaseUpdate=Le,B.lastBaseUpdate=Ge,G===null&&(B.shared.lanes=0),vh|=se,p.lanes=se,p.memoizedState=Xe}}function VV(p,A){if(typeof p!="function")throw Error(r(191,p));p.call(A)}function HV(p,A){var k=p.callbacks;if(k!==null)for(p.callbacks=null,p=0;p<k.length;p++)VV(k[p],A)}var um=q(null),Tw=q(0);function QV(p,A){p=Zu,U(Tw,p),U(um,A),Zu=p|A.baseLanes}function T5(){U(Tw,Zu),U(um,um.current)}function P5(){Zu=Tw.current,F(um),F(Tw)}var bo=q(null),ll=null;function gh(p){var A=p.alternate;U(Fi,Fi.current&1),U(bo,p),ll===null&&(A===null||um.current!==null||A.memoizedState!==null)&&(ll=p)}function M5(p){U(Fi,Fi.current),U(bo,p),ll===null&&(ll=p)}function ZV(p){p.tag===22?(U(Fi,Fi.current),U(bo,p),ll===null&&(ll=p)):yh()}function yh(){U(Fi,Fi.current),U(bo,bo.current)}function vo(p){F(bo),ll===p&&(ll=null),F(Fi)}var Fi=q(0);function Pw(p){for(var A=p;A!==null;){if(A.tag===13){var k=A.memoizedState;if(k!==null&&(k=k.dehydrated,k===null||jT(k)||LT(k)))return A}else if(A.tag===19&&(A.memoizedProps.revealOrder==="forwards"||A.memoizedProps.revealOrder==="backwards"||A.memoizedProps.revealOrder==="unstable_legacy-backwards"||A.memoizedProps.revealOrder==="together")){if((A.flags&128)!==0)return A}else if(A.child!==null){A.child.return=A,A=A.child;continue}if(A===p)break;for(;A.sibling===null;){if(A.return===null||A.return===p)return null;A=A.return}A.sibling.return=A.return,A=A.sibling}return null}var ju=0,Cn=null,Pr=null,Xi=null,Mw=!1,fm=!1,Jd=!1,Nw=0,sx=0,hm=null,UAe=0;function Ei(){throw Error(r(321))}function N5(p,A){if(A===null)return!1;for(var k=0;k<A.length&&k<p.length;k++)if(!Js(p[k],A[k]))return!1;return!0}function D5(p,A,k,D,B,G){return ju=G,Cn=A,A.memoizedState=null,A.updateQueue=null,A.lanes=0,Y.H=p===null||p.memoizedState===null?EH:U5,Jd=!1,G=k(D,B),Jd=!1,fm&&(G=GV(A,k,D,B)),zV(p),G}function zV(p){Y.H=lx;var A=Pr!==null&&Pr.next!==null;if(ju=0,Xi=Pr=Cn=null,Mw=!1,sx=0,hm=null,A)throw Error(r(300));p===null||Wi||(p=p.dependencies,p!==null&&Aw(p)&&(Wi=!0))}function GV(p,A,k,D){Cn=p;var B=0;do{if(fm&&(hm=null),sx=0,fm=!1,25<=B)throw Error(r(301));if(B+=1,Xi=Pr=null,p.updateQueue!=null){var G=p.updateQueue;G.lastEffect=null,G.events=null,G.stores=null,G.memoCache!=null&&(G.memoCache.index=0)}Y.H=TH,G=A(k,D)}while(fm);return G}function XAe(){var p=Y.H,A=p.useState()[0];return A=typeof A.then=="function"?ax(A):A,p=p.useState()[0],(Pr!==null?Pr.memoizedState:null)!==p&&(Cn.flags|=1024),A}function I5(){var p=Nw!==0;return Nw=0,p}function _5(p,A,k){A.updateQueue=p.updateQueue,A.flags&=-2053,p.lanes&=~k}function R5(p){if(Mw){for(p=p.memoizedState;p!==null;){var A=p.queue;A!==null&&(A.pending=null),p=p.next}Mw=!1}ju=0,Xi=Pr=Cn=null,fm=!1,sx=Nw=0,hm=null}function Oa(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xi===null?Cn.memoizedState=Xi=p:Xi=Xi.next=p,Xi}function $i(){if(Pr===null){var p=Cn.alternate;p=p!==null?p.memoizedState:null}else p=Pr.next;var A=Xi===null?Cn.memoizedState:Xi.next;if(A!==null)Xi=A,Pr=p;else{if(p===null)throw Cn.alternate===null?Error(r(467)):Error(r(310));Pr=p,p={memoizedState:Pr.memoizedState,baseState:Pr.baseState,baseQueue:Pr.baseQueue,queue:Pr.queue,next:null},Xi===null?Cn.memoizedState=Xi=p:Xi=Xi.next=p}return Xi}function Dw(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ax(p){var A=sx;return sx+=1,hm===null&&(hm=[]),p=jV(hm,p,A),A=Cn,(Xi===null?A.memoizedState:Xi.next)===null&&(A=A.alternate,Y.H=A===null||A.memoizedState===null?EH:U5),p}function Iw(p){if(p!==null&&typeof p=="object"){if(typeof p.then=="function")return ax(p);if(p.$$typeof===O)return _s(p)}throw Error(r(438,String(p)))}function j5(p){var A=null,k=Cn.updateQueue;if(k!==null&&(A=k.memoCache),A==null){var D=Cn.alternate;D!==null&&(D=D.updateQueue,D!==null&&(D=D.memoCache,D!=null&&(A={data:D.data.map(function(B){return B.slice()}),index:0})))}if(A==null&&(A={data:[],index:0}),k===null&&(k=Dw(),Cn.updateQueue=k),k.memoCache=A,k=A.data[A.index],k===void 0)for(k=A.data[A.index]=Array(p),D=0;D<p;D++)k[D]=j;return A.index++,k}function Lu(p,A){return typeof A=="function"?A(p):A}function _w(p){var A=$i();return L5(A,Pr,p)}function L5(p,A,k){var D=p.queue;if(D===null)throw Error(r(311));D.lastRenderedReducer=k;var B=p.baseQueue,G=D.pending;if(G!==null){if(B!==null){var se=B.next;B.next=G.next,G.next=se}A.baseQueue=B=G,D.pending=null}if(G=p.baseState,B===null)p.memoizedState=G;else{A=B.next;var de=se=null,Ee=null,Le=A,Ge=!1;do{var Xe=Le.lane&-536870913;if(Xe!==Le.lane?(zn&Xe)===Xe:(ju&Xe)===Xe){var Fe=Le.revertLane;if(Fe===0)Ee!==null&&(Ee=Ee.next={lane:0,revertLane:0,gesture:null,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),Xe===am&&(Ge=!0);else if((ju&Fe)===Fe){Le=Le.next,Fe===am&&(Ge=!0);continue}else Xe={lane:0,revertLane:Le.revertLane,gesture:null,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null},Ee===null?(de=Ee=Xe,se=G):Ee=Ee.next=Xe,Cn.lanes|=Fe,vh|=Fe;Xe=Le.action,Jd&&k(G,Xe),G=Le.hasEagerState?Le.eagerState:k(G,Xe)}else Fe={lane:Xe,revertLane:Le.revertLane,gesture:Le.gesture,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null},Ee===null?(de=Ee=Fe,se=G):Ee=Ee.next=Fe,Cn.lanes|=Xe,vh|=Xe;Le=Le.next}while(Le!==null&&Le!==A);if(Ee===null?se=G:Ee.next=de,!Js(G,p.memoizedState)&&(Wi=!0,Ge&&(k=om,k!==null)))throw k;p.memoizedState=G,p.baseState=se,p.baseQueue=Ee,D.lastRenderedState=G}return B===null&&(D.lanes=0),[p.memoizedState,D.dispatch]}function F5(p){var A=$i(),k=A.queue;if(k===null)throw Error(r(311));k.lastRenderedReducer=p;var D=k.dispatch,B=k.pending,G=A.memoizedState;if(B!==null){k.pending=null;var se=B=B.next;do G=p(G,se.action),se=se.next;while(se!==B);Js(G,A.memoizedState)||(Wi=!0),A.memoizedState=G,A.baseQueue===null&&(A.baseState=G),k.lastRenderedState=G}return[G,D]}function UV(p,A,k){var D=Cn,B=$i(),G=qn;if(G){if(k===void 0)throw Error(r(407));k=k()}else k=A();var se=!Js((Pr||B).memoizedState,k);if(se&&(B.memoizedState=k,Wi=!0),B=B.queue,V5(YV.bind(null,D,B,p),[p]),B.getSnapshot!==A||se||Xi!==null&&Xi.memoizedState.tag&1){if(D.flags|=2048,dm(9,{destroy:void 0},WV.bind(null,D,B,k,A),null),Vr===null)throw Error(r(349));G||(ju&127)!==0||XV(D,A,k)}return k}function XV(p,A,k){p.flags|=16384,p={getSnapshot:A,value:k},A=Cn.updateQueue,A===null?(A=Dw(),Cn.updateQueue=A,A.stores=[p]):(k=A.stores,k===null?A.stores=[p]:k.push(p))}function WV(p,A,k,D){A.value=k,A.getSnapshot=D,qV(A)&&KV(p)}function YV(p,A,k){return k(function(){qV(A)&&KV(p)})}function qV(p){var A=p.getSnapshot;p=p.value;try{var k=A();return!Js(p,k)}catch{return!0}}function KV(p){var A=Zd(p,2);A!==null&&za(A,p,2)}function $5(p){var A=Oa();if(typeof p=="function"){var k=p;if(p=k(),Jd){wt(!0);try{k()}finally{wt(!1)}}}return A.memoizedState=A.baseState=p,A.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:p},A}function JV(p,A,k,D){return p.baseState=k,L5(p,Pr,typeof D=="function"?D:Lu)}function WAe(p,A,k,D,B){if(Lw(p))throw Error(r(485));if(p=A.action,p!==null){var G={payload:B,action:p,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(se){G.listeners.push(se)}};Y.T!==null?k(!0):G.isTransition=!1,D(G),k=A.pending,k===null?(G.next=A.pending=G,eH(A,G)):(G.next=k.next,A.pending=k.next=G)}}function eH(p,A){var k=A.action,D=A.payload,B=p.state;if(A.isTransition){var G=Y.T,se={};Y.T=se;try{var de=k(B,D),Ee=Y.S;Ee!==null&&Ee(se,de),tH(p,A,de)}catch(Le){B5(p,A,Le)}finally{G!==null&&se.types!==null&&(G.types=se.types),Y.T=G}}else try{G=k(B,D),tH(p,A,G)}catch(Le){B5(p,A,Le)}}function tH(p,A,k){k!==null&&typeof k=="object"&&typeof k.then=="function"?k.then(function(D){nH(p,A,D)},function(D){return B5(p,A,D)}):nH(p,A,k)}function nH(p,A,k){A.status="fulfilled",A.value=k,rH(A),p.state=k,A=p.pending,A!==null&&(k=A.next,k===A?p.pending=null:(k=k.next,A.next=k,eH(p,k)))}function B5(p,A,k){var D=p.pending;if(p.pending=null,D!==null){D=D.next;do A.status="rejected",A.reason=k,rH(A),A=A.next;while(A!==D)}p.action=null}function rH(p){p=p.listeners;for(var A=0;A<p.length;A++)(0,p[A])()}function iH(p,A){return A}function sH(p,A){if(qn){var k=Vr.formState;if(k!==null){e:{var D=Cn;if(qn){if(ti){t:{for(var B=ti,G=ol;B.nodeType!==8;){if(!G){B=null;break t}if(B=cl(B.nextSibling),B===null){B=null;break t}}G=B.data,B=G==="F!"||G==="F"?B:null}if(B){ti=cl(B.nextSibling),D=B.data==="F!";break e}}fh(D)}D=!1}D&&(A=k[0])}}return k=Oa(),k.memoizedState=k.baseState=A,D={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iH,lastRenderedState:A},k.queue=D,k=OH.bind(null,Cn,D),D.dispatch=k,D=$5(!1),G=G5.bind(null,Cn,!1,D.queue),D=Oa(),B={state:A,dispatch:null,action:p,pending:null},D.queue=B,k=WAe.bind(null,Cn,B,G,k),B.dispatch=k,D.memoizedState=p,[A,k,!1]}function aH(p){var A=$i();return oH(A,Pr,p)}function oH(p,A,k){if(A=L5(p,A,iH)[0],p=_w(Lu)[0],typeof A=="object"&&A!==null&&typeof A.then=="function")try{var D=ax(A)}catch(se){throw se===lm?Ow:se}else D=A;A=$i();var B=A.queue,G=B.dispatch;return k!==A.memoizedState&&(Cn.flags|=2048,dm(9,{destroy:void 0},YAe.bind(null,B,k),null)),[D,G,p]}function YAe(p,A){p.action=A}function lH(p){var A=$i(),k=Pr;if(k!==null)return oH(A,k,p);$i(),A=A.memoizedState,k=$i();var D=k.queue.dispatch;return k.memoizedState=p,[A,D,!1]}function dm(p,A,k,D){return p={tag:p,create:k,deps:D,inst:A,next:null},A=Cn.updateQueue,A===null&&(A=Dw(),Cn.updateQueue=A),k=A.lastEffect,k===null?A.lastEffect=p.next=p:(D=k.next,k.next=p,p.next=D,A.lastEffect=p),p}function cH(){return $i().memoizedState}function Rw(p,A,k,D){var B=Oa();Cn.flags|=p,B.memoizedState=dm(1|A,{destroy:void 0},k,D===void 0?null:D)}function jw(p,A,k,D){var B=$i();D=D===void 0?null:D;var G=B.memoizedState.inst;Pr!==null&&D!==null&&N5(D,Pr.memoizedState.deps)?B.memoizedState=dm(A,G,k,D):(Cn.flags|=p,B.memoizedState=dm(1|A,G,k,D))}function uH(p,A){Rw(8390656,8,p,A)}function V5(p,A){jw(2048,8,p,A)}function qAe(p){Cn.flags|=4;var A=Cn.updateQueue;if(A===null)A=Dw(),Cn.updateQueue=A,A.events=[p];else{var k=A.events;k===null?A.events=[p]:k.push(p)}}function fH(p){var A=$i().memoizedState;return qAe({ref:A,nextImpl:p}),function(){if((dr&2)!==0)throw Error(r(440));return A.impl.apply(void 0,arguments)}}function hH(p,A){return jw(4,2,p,A)}function dH(p,A){return jw(4,4,p,A)}function pH(p,A){if(typeof A=="function"){p=p();var k=A(p);return function(){typeof k=="function"?k():A(null)}}if(A!=null)return p=p(),A.current=p,function(){A.current=null}}function mH(p,A,k){k=k!=null?k.concat([p]):null,jw(4,4,pH.bind(null,A,p),k)}function H5(){}function gH(p,A){var k=$i();A=A===void 0?null:A;var D=k.memoizedState;return A!==null&&N5(A,D[1])?D[0]:(k.memoizedState=[p,A],p)}function yH(p,A){var k=$i();A=A===void 0?null:A;var D=k.memoizedState;if(A!==null&&N5(A,D[1]))return D[0];if(D=p(),Jd){wt(!0);try{p()}finally{wt(!1)}}return k.memoizedState=[D,A],D}function Q5(p,A,k){return k===void 0||(ju&1073741824)!==0&&(zn&261930)===0?p.memoizedState=A:(p.memoizedState=k,p=xQ(),Cn.lanes|=p,vh|=p,k)}function xH(p,A,k,D){return Js(k,A)?k:um.current!==null?(p=Q5(p,k,D),Js(p,A)||(Wi=!0),p):(ju&42)===0||(ju&1073741824)!==0&&(zn&261930)===0?(Wi=!0,p.memoizedState=k):(p=xQ(),Cn.lanes|=p,vh|=p,A)}function bH(p,A,k,D,B){var G=J.p;J.p=G!==0&&8>G?G:8;var se=Y.T,de={};Y.T=de,G5(p,!1,A,k);try{var Ee=B(),Le=Y.S;if(Le!==null&&Le(de,Ee),Ee!==null&&typeof Ee=="object"&&typeof Ee.then=="function"){var Ge=GAe(Ee,D);ox(p,A,Ge,wo(p))}else ox(p,A,D,wo(p))}catch(Xe){ox(p,A,{then:function(){},status:"rejected",reason:Xe},wo())}finally{J.p=G,se!==null&&de.types!==null&&(se.types=de.types),Y.T=se}}function KAe(){}function Z5(p,A,k,D){if(p.tag!==5)throw Error(r(476));var B=vH(p).queue;bH(p,B,A,ne,k===null?KAe:function(){return AH(p),k(D)})}function vH(p){var A=p.memoizedState;if(A!==null)return A;A={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:ne},next:null};var k={};return A.next={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:k},next:null},p.memoizedState=A,p=p.alternate,p!==null&&(p.memoizedState=A),A}function AH(p){var A=vH(p);A.next===null&&(A=p.alternate.memoizedState),ox(p,A.next.queue,{},wo())}function z5(){return _s(Ox)}function SH(){return $i().memoizedState}function wH(){return $i().memoizedState}function JAe(p){for(var A=p.return;A!==null;){switch(A.tag){case 24:case 3:var k=wo();p=ph(k);var D=mh(A,p,k);D!==null&&(za(D,A,k),nx(D,A,k)),A={cache:v5()},p.payload=A;return}A=A.return}}function eSe(p,A,k){var D=wo();k={lane:D,revertLane:0,gesture:null,action:k,hasEagerState:!1,eagerState:null,next:null},Lw(p)?kH(A,k):(k=c5(p,A,k,D),k!==null&&(za(k,p,D),CH(k,A,D)))}function OH(p,A,k){var D=wo();ox(p,A,k,D)}function ox(p,A,k,D){var B={lane:D,revertLane:0,gesture:null,action:k,hasEagerState:!1,eagerState:null,next:null};if(Lw(p))kH(A,B);else{var G=p.alternate;if(p.lanes===0&&(G===null||G.lanes===0)&&(G=A.lastRenderedReducer,G!==null))try{var se=A.lastRenderedState,de=G(se,k);if(B.hasEagerState=!0,B.eagerState=de,Js(de,se))return yw(p,A,B,0),Vr===null&&gw(),!1}catch{}finally{}if(k=c5(p,A,B,D),k!==null)return za(k,p,D),CH(k,A,D),!0}return!1}function G5(p,A,k,D){if(D={lane:2,revertLane:OT(),gesture:null,action:D,hasEagerState:!1,eagerState:null,next:null},Lw(p)){if(A)throw Error(r(479))}else A=c5(p,k,D,2),A!==null&&za(A,p,2)}function Lw(p){var A=p.alternate;return p===Cn||A!==null&&A===Cn}function kH(p,A){fm=Mw=!0;var k=p.pending;k===null?A.next=A:(A.next=k.next,k.next=A),p.pending=A}function CH(p,A,k){if((k&4194048)!==0){var D=A.lanes;D&=p.pendingLanes,k|=D,A.lanes=k,hn(p,k)}}var lx={readContext:_s,use:Iw,useCallback:Ei,useContext:Ei,useEffect:Ei,useImperativeHandle:Ei,useLayoutEffect:Ei,useInsertionEffect:Ei,useMemo:Ei,useReducer:Ei,useRef:Ei,useState:Ei,useDebugValue:Ei,useDeferredValue:Ei,useTransition:Ei,useSyncExternalStore:Ei,useId:Ei,useHostTransitionStatus:Ei,useFormState:Ei,useActionState:Ei,useOptimistic:Ei,useMemoCache:Ei,useCacheRefresh:Ei};lx.useEffectEvent=Ei;var EH={readContext:_s,use:Iw,useCallback:function(p,A){return Oa().memoizedState=[p,A===void 0?null:A],p},useContext:_s,useEffect:uH,useImperativeHandle:function(p,A,k){k=k!=null?k.concat([p]):null,Rw(4194308,4,pH.bind(null,A,p),k)},useLayoutEffect:function(p,A){return Rw(4194308,4,p,A)},useInsertionEffect:function(p,A){Rw(4,2,p,A)},useMemo:function(p,A){var k=Oa();A=A===void 0?null:A;var D=p();if(Jd){wt(!0);try{p()}finally{wt(!1)}}return k.memoizedState=[D,A],D},useReducer:function(p,A,k){var D=Oa();if(k!==void 0){var B=k(A);if(Jd){wt(!0);try{k(A)}finally{wt(!1)}}}else B=A;return D.memoizedState=D.baseState=B,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:B},D.queue=p,p=p.dispatch=eSe.bind(null,Cn,p),[D.memoizedState,p]},useRef:function(p){var A=Oa();return p={current:p},A.memoizedState=p},useState:function(p){p=$5(p);var A=p.queue,k=OH.bind(null,Cn,A);return A.dispatch=k,[p.memoizedState,k]},useDebugValue:H5,useDeferredValue:function(p,A){var k=Oa();return Q5(k,p,A)},useTransition:function(){var p=$5(!1);return p=bH.bind(null,Cn,p.queue,!0,!1),Oa().memoizedState=p,[!1,p]},useSyncExternalStore:function(p,A,k){var D=Cn,B=Oa();if(qn){if(k===void 0)throw Error(r(407));k=k()}else{if(k=A(),Vr===null)throw Error(r(349));(zn&127)!==0||XV(D,A,k)}B.memoizedState=k;var G={value:k,getSnapshot:A};return B.queue=G,uH(YV.bind(null,D,G,p),[p]),D.flags|=2048,dm(9,{destroy:void 0},WV.bind(null,D,G,k,A),null),k},useId:function(){var p=Oa(),A=Vr.identifierPrefix;if(qn){var k=Rc,D=_c;k=(D&~(1<<32-ut(D)-1)).toString(32)+k,A="_"+A+"R_"+k,k=Nw++,0<k&&(A+="H"+k.toString(32)),A+="_"}else k=UAe++,A="_"+A+"r_"+k.toString(32)+"_";return p.memoizedState=A},useHostTransitionStatus:z5,useFormState:sH,useActionState:sH,useOptimistic:function(p){var A=Oa();A.memoizedState=A.baseState=p;var k={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return A.queue=k,A=G5.bind(null,Cn,!0,k),k.dispatch=A,[p,A]},useMemoCache:j5,useCacheRefresh:function(){return Oa().memoizedState=JAe.bind(null,Cn)},useEffectEvent:function(p){var A=Oa(),k={impl:p};return A.memoizedState=k,function(){if((dr&2)!==0)throw Error(r(440));return k.impl.apply(void 0,arguments)}}},U5={readContext:_s,use:Iw,useCallback:gH,useContext:_s,useEffect:V5,useImperativeHandle:mH,useInsertionEffect:hH,useLayoutEffect:dH,useMemo:yH,useReducer:_w,useRef:cH,useState:function(){return _w(Lu)},useDebugValue:H5,useDeferredValue:function(p,A){var k=$i();return xH(k,Pr.memoizedState,p,A)},useTransition:function(){var p=_w(Lu)[0],A=$i().memoizedState;return[typeof p=="boolean"?p:ax(p),A]},useSyncExternalStore:UV,useId:SH,useHostTransitionStatus:z5,useFormState:aH,useActionState:aH,useOptimistic:function(p,A){var k=$i();return JV(k,Pr,p,A)},useMemoCache:j5,useCacheRefresh:wH};U5.useEffectEvent=fH;var TH={readContext:_s,use:Iw,useCallback:gH,useContext:_s,useEffect:V5,useImperativeHandle:mH,useInsertionEffect:hH,useLayoutEffect:dH,useMemo:yH,useReducer:F5,useRef:cH,useState:function(){return F5(Lu)},useDebugValue:H5,useDeferredValue:function(p,A){var k=$i();return Pr===null?Q5(k,p,A):xH(k,Pr.memoizedState,p,A)},useTransition:function(){var p=F5(Lu)[0],A=$i().memoizedState;return[typeof p=="boolean"?p:ax(p),A]},useSyncExternalStore:UV,useId:SH,useHostTransitionStatus:z5,useFormState:lH,useActionState:lH,useOptimistic:function(p,A){var k=$i();return Pr!==null?JV(k,Pr,p,A):(k.baseState=p,[p,k.queue.dispatch])},useMemoCache:j5,useCacheRefresh:wH};TH.useEffectEvent=fH;function X5(p,A,k,D){A=p.memoizedState,k=k(D,A),k=k==null?A:f({},A,k),p.memoizedState=k,p.lanes===0&&(p.updateQueue.baseState=k)}var W5={enqueueSetState:function(p,A,k){p=p._reactInternals;var D=wo(),B=ph(D);B.payload=A,k!=null&&(B.callback=k),A=mh(p,B,D),A!==null&&(za(A,p,D),nx(A,p,D))},enqueueReplaceState:function(p,A,k){p=p._reactInternals;var D=wo(),B=ph(D);B.tag=1,B.payload=A,k!=null&&(B.callback=k),A=mh(p,B,D),A!==null&&(za(A,p,D),nx(A,p,D))},enqueueForceUpdate:function(p,A){p=p._reactInternals;var k=wo(),D=ph(k);D.tag=2,A!=null&&(D.callback=A),A=mh(p,D,k),A!==null&&(za(A,p,k),nx(A,p,k))}};function PH(p,A,k,D,B,G,se){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate(D,G,se):A.prototype&&A.prototype.isPureReactComponent?!lh(k,D)||!lh(B,G):!0}function MH(p,A,k,D){p=A.state,typeof A.componentWillReceiveProps=="function"&&A.componentWillReceiveProps(k,D),typeof A.UNSAFE_componentWillReceiveProps=="function"&&A.UNSAFE_componentWillReceiveProps(k,D),A.state!==p&&W5.enqueueReplaceState(A,A.state,null)}function ep(p,A){var k=A;if("ref"in A){k={};for(var D in A)D!=="ref"&&(k[D]=A[D])}if(p=p.defaultProps){k===A&&(k=f({},k));for(var B in p)k[B]===void 0&&(k[B]=p[B])}return k}function NH(p){mw(p)}function DH(p){console.error(p)}function IH(p){mw(p)}function Fw(p,A){try{var k=p.onUncaughtError;k(A.value,{componentStack:A.stack})}catch(D){setTimeout(function(){throw D})}}function _H(p,A,k){try{var D=p.onCaughtError;D(k.value,{componentStack:k.stack,errorBoundary:A.tag===1?A.stateNode:null})}catch(B){setTimeout(function(){throw B})}}function Y5(p,A,k){return k=ph(k),k.tag=3,k.payload={element:null},k.callback=function(){Fw(p,A)},k}function RH(p){return p=ph(p),p.tag=3,p}function jH(p,A,k,D){var B=k.type.getDerivedStateFromError;if(typeof B=="function"){var G=D.value;p.payload=function(){return B(G)},p.callback=function(){_H(A,k,D)}}var se=k.stateNode;se!==null&&typeof se.componentDidCatch=="function"&&(p.callback=function(){_H(A,k,D),typeof B!="function"&&(Ah===null?Ah=new Set([this]):Ah.add(this));var de=D.stack;this.componentDidCatch(D.value,{componentStack:de!==null?de:""})})}function tSe(p,A,k,D,B){if(k.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){if(A=k.alternate,A!==null&&sm(A,k,B,!0),k=bo.current,k!==null){switch(k.tag){case 31:case 13:return ll===null?Yw():k.alternate===null&&Ti===0&&(Ti=3),k.flags&=-257,k.flags|=65536,k.lanes=B,D===kw?k.flags|=16384:(A=k.updateQueue,A===null?k.updateQueue=new Set([D]):A.add(D),AT(p,D,B)),!1;case 22:return k.flags|=65536,D===kw?k.flags|=16384:(A=k.updateQueue,A===null?(A={transitions:null,markerInstances:null,retryQueue:new Set([D])},k.updateQueue=A):(k=A.retryQueue,k===null?A.retryQueue=new Set([D]):k.add(D)),AT(p,D,B)),!1}throw Error(r(435,k.tag))}return AT(p,D,B),Yw(),!1}if(qn)return A=bo.current,A!==null?((A.flags&65536)===0&&(A.flags|=256),A.flags|=65536,A.lanes=B,D!==m5&&(p=Error(r(422),{cause:D}),qy(il(p,k)))):(D!==m5&&(A=Error(r(423),{cause:D}),qy(il(A,k))),p=p.current.alternate,p.flags|=65536,B&=-B,p.lanes|=B,D=il(D,k),B=Y5(p.stateNode,D,B),C5(p,B),Ti!==4&&(Ti=2)),!1;var G=Error(r(520),{cause:D});if(G=il(G,k),gx===null?gx=[G]:gx.push(G),Ti!==4&&(Ti=2),A===null)return!0;D=il(D,k),k=A;do{switch(k.tag){case 3:return k.flags|=65536,p=B&-B,k.lanes|=p,p=Y5(k.stateNode,D,p),C5(k,p),!1;case 1:if(A=k.type,G=k.stateNode,(k.flags&128)===0&&(typeof A.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(Ah===null||!Ah.has(G))))return k.flags|=65536,B&=-B,k.lanes|=B,B=RH(B),jH(B,p,k,D),C5(k,B),!1}k=k.return}while(k!==null);return!1}var q5=Error(r(461)),Wi=!1;function Rs(p,A,k,D){A.child=p===null?BV(A,null,k,D):Kd(A,p.child,k,D)}function LH(p,A,k,D,B){k=k.render;var G=A.ref;if("ref"in D){var se={};for(var de in D)de!=="ref"&&(se[de]=D[de])}else se=D;return Xd(A),D=D5(p,A,k,se,G,B),de=I5(),p!==null&&!Wi?(_5(p,A,B),Fu(p,A,B)):(qn&&de&&d5(A),A.flags|=1,Rs(p,A,D,B),A.child)}function FH(p,A,k,D,B){if(p===null){var G=k.type;return typeof G=="function"&&!u5(G)&&G.defaultProps===void 0&&k.compare===null?(A.tag=15,A.type=G,$H(p,A,G,D,B)):(p=bw(k.type,null,D,A,A.mode,B),p.ref=A.ref,p.return=A,A.child=p)}if(G=p.child,!sT(p,B)){var se=G.memoizedProps;if(k=k.compare,k=k!==null?k:lh,k(se,D)&&p.ref===A.ref)return Fu(p,A,B)}return A.flags|=1,p=Du(G,D),p.ref=A.ref,p.return=A,A.child=p}function $H(p,A,k,D,B){if(p!==null){var G=p.memoizedProps;if(lh(G,D)&&p.ref===A.ref)if(Wi=!1,A.pendingProps=D=G,sT(p,B))(p.flags&131072)!==0&&(Wi=!0);else return A.lanes=p.lanes,Fu(p,A,B)}return K5(p,A,k,D,B)}function BH(p,A,k,D){var B=D.children,G=p!==null?p.memoizedState:null;if(p===null&&A.stateNode===null&&(A.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),D.mode==="hidden"){if((A.flags&128)!==0){if(G=G!==null?G.baseLanes|k:k,p!==null){for(D=A.child=p.child,B=0;D!==null;)B=B|D.lanes|D.childLanes,D=D.sibling;D=B&~G}else D=0,A.child=null;return VH(p,A,G,k,D)}if((k&536870912)!==0)A.memoizedState={baseLanes:0,cachePool:null},p!==null&&ww(A,G!==null?G.cachePool:null),G!==null?QV(A,G):T5(),ZV(A);else return D=A.lanes=536870912,VH(p,A,G!==null?G.baseLanes|k:k,k,D)}else G!==null?(ww(A,G.cachePool),QV(A,G),yh(),A.memoizedState=null):(p!==null&&ww(A,null),T5(),yh());return Rs(p,A,B,k),A.child}function cx(p,A){return p!==null&&p.tag===22||A.stateNode!==null||(A.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),A.sibling}function VH(p,A,k,D,B){var G=S5();return G=G===null?null:{parent:Ui._currentValue,pool:G},A.memoizedState={baseLanes:k,cachePool:G},p!==null&&ww(A,null),T5(),ZV(A),p!==null&&sm(p,A,D,!0),A.childLanes=B,null}function $w(p,A){return A=Vw({mode:A.mode,children:A.children},p.mode),A.ref=p.ref,p.child=A,A.return=p,A}function HH(p,A,k){return Kd(A,p.child,null,k),p=$w(A,A.pendingProps),p.flags|=2,vo(A),A.memoizedState=null,p}function nSe(p,A,k){var D=A.pendingProps,B=(A.flags&128)!==0;if(A.flags&=-129,p===null){if(qn){if(D.mode==="hidden")return p=$w(A,D),A.lanes=536870912,cx(null,p);if(M5(A),(p=ti)?(p=eZ(p,ol),p=p!==null&&p.data==="&"?p:null,p!==null&&(A.memoizedState={dehydrated:p,treeContext:ch!==null?{id:_c,overflow:Rc}:null,retryLane:536870912,hydrationErrors:null},k=kV(p),k.return=A,A.child=k,Is=A,ti=null)):p=null,p===null)throw fh(A);return A.lanes=536870912,null}return $w(A,D)}var G=p.memoizedState;if(G!==null){var se=G.dehydrated;if(M5(A),B)if(A.flags&256)A.flags&=-257,A=HH(p,A,k);else if(A.memoizedState!==null)A.child=p.child,A.flags|=128,A=null;else throw Error(r(558));else if(Wi||sm(p,A,k,!1),B=(k&p.childLanes)!==0,Wi||B){if(D=Vr,D!==null&&(se=gn(D,k),se!==0&&se!==G.retryLane))throw G.retryLane=se,Zd(p,se),za(D,p,se),q5;Yw(),A=HH(p,A,k)}else p=G.treeContext,ti=cl(se.nextSibling),Is=A,qn=!0,uh=null,ol=!1,p!==null&&TV(A,p),A=$w(A,D),A.flags|=4096;return A}return p=Du(p.child,{mode:D.mode,children:D.children}),p.ref=A.ref,A.child=p,p.return=A,p}function Bw(p,A){var k=A.ref;if(k===null)p!==null&&p.ref!==null&&(A.flags|=4194816);else{if(typeof k!="function"&&typeof k!="object")throw Error(r(284));(p===null||p.ref!==k)&&(A.flags|=4194816)}}function K5(p,A,k,D,B){return Xd(A),k=D5(p,A,k,D,void 0,B),D=I5(),p!==null&&!Wi?(_5(p,A,B),Fu(p,A,B)):(qn&&D&&d5(A),A.flags|=1,Rs(p,A,k,B),A.child)}function QH(p,A,k,D,B,G){return Xd(A),A.updateQueue=null,k=GV(A,D,k,B),zV(p),D=I5(),p!==null&&!Wi?(_5(p,A,G),Fu(p,A,G)):(qn&&D&&d5(A),A.flags|=1,Rs(p,A,k,G),A.child)}function ZH(p,A,k,D,B){if(Xd(A),A.stateNode===null){var G=tm,se=k.contextType;typeof se=="object"&&se!==null&&(G=_s(se)),G=new k(D,G),A.memoizedState=G.state!==null&&G.state!==void 0?G.state:null,G.updater=W5,A.stateNode=G,G._reactInternals=A,G=A.stateNode,G.props=D,G.state=A.memoizedState,G.refs={},O5(A),se=k.contextType,G.context=typeof se=="object"&&se!==null?_s(se):tm,G.state=A.memoizedState,se=k.getDerivedStateFromProps,typeof se=="function"&&(X5(A,k,se,D),G.state=A.memoizedState),typeof k.getDerivedStateFromProps=="function"||typeof G.getSnapshotBeforeUpdate=="function"||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(se=G.state,typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount(),se!==G.state&&W5.enqueueReplaceState(G,G.state,null),ix(A,D,G,B),rx(),G.state=A.memoizedState),typeof G.componentDidMount=="function"&&(A.flags|=4194308),D=!0}else if(p===null){G=A.stateNode;var de=A.memoizedProps,Ee=ep(k,de);G.props=Ee;var Le=G.context,Ge=k.contextType;se=tm,typeof Ge=="object"&&Ge!==null&&(se=_s(Ge));var Xe=k.getDerivedStateFromProps;Ge=typeof Xe=="function"||typeof G.getSnapshotBeforeUpdate=="function",de=A.pendingProps!==de,Ge||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(de||Le!==se)&&MH(A,G,D,se),dh=!1;var Fe=A.memoizedState;G.state=Fe,ix(A,D,G,B),rx(),Le=A.memoizedState,de||Fe!==Le||dh?(typeof Xe=="function"&&(X5(A,k,Xe,D),Le=A.memoizedState),(Ee=dh||PH(A,k,Ee,D,Fe,Le,se))?(Ge||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount()),typeof G.componentDidMount=="function"&&(A.flags|=4194308)):(typeof G.componentDidMount=="function"&&(A.flags|=4194308),A.memoizedProps=D,A.memoizedState=Le),G.props=D,G.state=Le,G.context=se,D=Ee):(typeof G.componentDidMount=="function"&&(A.flags|=4194308),D=!1)}else{G=A.stateNode,k5(p,A),se=A.memoizedProps,Ge=ep(k,se),G.props=Ge,Xe=A.pendingProps,Fe=G.context,Le=k.contextType,Ee=tm,typeof Le=="object"&&Le!==null&&(Ee=_s(Le)),de=k.getDerivedStateFromProps,(Le=typeof de=="function"||typeof G.getSnapshotBeforeUpdate=="function")||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(se!==Xe||Fe!==Ee)&&MH(A,G,D,Ee),dh=!1,Fe=A.memoizedState,G.state=Fe,ix(A,D,G,B),rx();var He=A.memoizedState;se!==Xe||Fe!==He||dh||p!==null&&p.dependencies!==null&&Aw(p.dependencies)?(typeof de=="function"&&(X5(A,k,de,D),He=A.memoizedState),(Ge=dh||PH(A,k,Ge,D,Fe,He,Ee)||p!==null&&p.dependencies!==null&&Aw(p.dependencies))?(Le||typeof G.UNSAFE_componentWillUpdate!="function"&&typeof G.componentWillUpdate!="function"||(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(D,He,Ee),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(D,He,Ee)),typeof G.componentDidUpdate=="function"&&(A.flags|=4),typeof G.getSnapshotBeforeUpdate=="function"&&(A.flags|=1024)):(typeof G.componentDidUpdate!="function"||se===p.memoizedProps&&Fe===p.memoizedState||(A.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||se===p.memoizedProps&&Fe===p.memoizedState||(A.flags|=1024),A.memoizedProps=D,A.memoizedState=He),G.props=D,G.state=He,G.context=Ee,D=Ge):(typeof G.componentDidUpdate!="function"||se===p.memoizedProps&&Fe===p.memoizedState||(A.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||se===p.memoizedProps&&Fe===p.memoizedState||(A.flags|=1024),D=!1)}return G=D,Bw(p,A),D=(A.flags&128)!==0,G||D?(G=A.stateNode,k=D&&typeof k.getDerivedStateFromError!="function"?null:G.render(),A.flags|=1,p!==null&&D?(A.child=Kd(A,p.child,null,B),A.child=Kd(A,null,k,B)):Rs(p,A,k,B),A.memoizedState=G.state,p=A.child):p=Fu(p,A,B),p}function zH(p,A,k,D){return Gd(),A.flags|=256,Rs(p,A,k,D),A.child}var J5={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function eT(p){return{baseLanes:p,cachePool:_V()}}function tT(p,A,k){return p=p!==null?p.childLanes&~k:0,A&&(p|=So),p}function GH(p,A,k){var D=A.pendingProps,B=!1,G=(A.flags&128)!==0,se;if((se=G)||(se=p!==null&&p.memoizedState===null?!1:(Fi.current&2)!==0),se&&(B=!0,A.flags&=-129),se=(A.flags&32)!==0,A.flags&=-33,p===null){if(qn){if(B?gh(A):yh(),(p=ti)?(p=eZ(p,ol),p=p!==null&&p.data!=="&"?p:null,p!==null&&(A.memoizedState={dehydrated:p,treeContext:ch!==null?{id:_c,overflow:Rc}:null,retryLane:536870912,hydrationErrors:null},k=kV(p),k.return=A,A.child=k,Is=A,ti=null)):p=null,p===null)throw fh(A);return LT(p)?A.lanes=32:A.lanes=536870912,null}var de=D.children;return D=D.fallback,B?(yh(),B=A.mode,de=Vw({mode:"hidden",children:de},B),D=zd(D,B,k,null),de.return=A,D.return=A,de.sibling=D,A.child=de,D=A.child,D.memoizedState=eT(k),D.childLanes=tT(p,se,k),A.memoizedState=J5,cx(null,D)):(gh(A),nT(A,de))}var Ee=p.memoizedState;if(Ee!==null&&(de=Ee.dehydrated,de!==null)){if(G)A.flags&256?(gh(A),A.flags&=-257,A=rT(p,A,k)):A.memoizedState!==null?(yh(),A.child=p.child,A.flags|=128,A=null):(yh(),de=D.fallback,B=A.mode,D=Vw({mode:"visible",children:D.children},B),de=zd(de,B,k,null),de.flags|=2,D.return=A,de.return=A,D.sibling=de,A.child=D,Kd(A,p.child,null,k),D=A.child,D.memoizedState=eT(k),D.childLanes=tT(p,se,k),A.memoizedState=J5,A=cx(null,D));else if(gh(A),LT(de)){if(se=de.nextSibling&&de.nextSibling.dataset,se)var Le=se.dgst;se=Le,D=Error(r(419)),D.stack="",D.digest=se,qy({value:D,source:null,stack:null}),A=rT(p,A,k)}else if(Wi||sm(p,A,k,!1),se=(k&p.childLanes)!==0,Wi||se){if(se=Vr,se!==null&&(D=gn(se,k),D!==0&&D!==Ee.retryLane))throw Ee.retryLane=D,Zd(p,D),za(se,p,D),q5;jT(de)||Yw(),A=rT(p,A,k)}else jT(de)?(A.flags|=192,A.child=p.child,A=null):(p=Ee.treeContext,ti=cl(de.nextSibling),Is=A,qn=!0,uh=null,ol=!1,p!==null&&TV(A,p),A=nT(A,D.children),A.flags|=4096);return A}return B?(yh(),de=D.fallback,B=A.mode,Ee=p.child,Le=Ee.sibling,D=Du(Ee,{mode:"hidden",children:D.children}),D.subtreeFlags=Ee.subtreeFlags&65011712,Le!==null?de=Du(Le,de):(de=zd(de,B,k,null),de.flags|=2),de.return=A,D.return=A,D.sibling=de,A.child=D,cx(null,D),D=A.child,de=p.child.memoizedState,de===null?de=eT(k):(B=de.cachePool,B!==null?(Ee=Ui._currentValue,B=B.parent!==Ee?{parent:Ee,pool:Ee}:B):B=_V(),de={baseLanes:de.baseLanes|k,cachePool:B}),D.memoizedState=de,D.childLanes=tT(p,se,k),A.memoizedState=J5,cx(p.child,D)):(gh(A),k=p.child,p=k.sibling,k=Du(k,{mode:"visible",children:D.children}),k.return=A,k.sibling=null,p!==null&&(se=A.deletions,se===null?(A.deletions=[p],A.flags|=16):se.push(p)),A.child=k,A.memoizedState=null,k)}function nT(p,A){return A=Vw({mode:"visible",children:A},p.mode),A.return=p,p.child=A}function Vw(p,A){return p=xo(22,p,null,A),p.lanes=0,p}function rT(p,A,k){return Kd(A,p.child,null,k),p=nT(A,A.pendingProps.children),p.flags|=2,A.memoizedState=null,p}function UH(p,A,k){p.lanes|=A;var D=p.alternate;D!==null&&(D.lanes|=A),x5(p.return,A,k)}function iT(p,A,k,D,B,G){var se=p.memoizedState;se===null?p.memoizedState={isBackwards:A,rendering:null,renderingStartTime:0,last:D,tail:k,tailMode:B,treeForkCount:G}:(se.isBackwards=A,se.rendering=null,se.renderingStartTime=0,se.last=D,se.tail=k,se.tailMode=B,se.treeForkCount=G)}function XH(p,A,k){var D=A.pendingProps,B=D.revealOrder,G=D.tail;D=D.children;var se=Fi.current,de=(se&2)!==0;if(de?(se=se&1|2,A.flags|=128):se&=1,U(Fi,se),Rs(p,A,D,k),D=qn?Yy:0,!de&&p!==null&&(p.flags&128)!==0)e:for(p=A.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&UH(p,k,A);else if(p.tag===19)UH(p,k,A);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===A)break e;for(;p.sibling===null;){if(p.return===null||p.return===A)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}switch(B){case"forwards":for(k=A.child,B=null;k!==null;)p=k.alternate,p!==null&&Pw(p)===null&&(B=k),k=k.sibling;k=B,k===null?(B=A.child,A.child=null):(B=k.sibling,k.sibling=null),iT(A,!1,B,k,G,D);break;case"backwards":case"unstable_legacy-backwards":for(k=null,B=A.child,A.child=null;B!==null;){if(p=B.alternate,p!==null&&Pw(p)===null){A.child=B;break}p=B.sibling,B.sibling=k,k=B,B=p}iT(A,!0,k,null,G,D);break;case"together":iT(A,!1,null,null,void 0,D);break;default:A.memoizedState=null}return A.child}function Fu(p,A,k){if(p!==null&&(A.dependencies=p.dependencies),vh|=A.lanes,(k&A.childLanes)===0)if(p!==null){if(sm(p,A,k,!1),(k&A.childLanes)===0)return null}else return null;if(p!==null&&A.child!==p.child)throw Error(r(153));if(A.child!==null){for(p=A.child,k=Du(p,p.pendingProps),A.child=k,k.return=A;p.sibling!==null;)p=p.sibling,k=k.sibling=Du(p,p.pendingProps),k.return=A;k.sibling=null}return A.child}function sT(p,A){return(p.lanes&A)!==0?!0:(p=p.dependencies,!!(p!==null&&Aw(p)))}function rSe(p,A,k){switch(A.tag){case 3:H(A,A.stateNode.containerInfo),hh(A,Ui,p.memoizedState.cache),Gd();break;case 27:case 5:oe(A);break;case 4:H(A,A.stateNode.containerInfo);break;case 10:hh(A,A.type,A.memoizedProps.value);break;case 31:if(A.memoizedState!==null)return A.flags|=128,M5(A),null;break;case 13:var D=A.memoizedState;if(D!==null)return D.dehydrated!==null?(gh(A),A.flags|=128,null):(k&A.child.childLanes)!==0?GH(p,A,k):(gh(A),p=Fu(p,A,k),p!==null?p.sibling:null);gh(A);break;case 19:var B=(p.flags&128)!==0;if(D=(k&A.childLanes)!==0,D||(sm(p,A,k,!1),D=(k&A.childLanes)!==0),B){if(D)return XH(p,A,k);A.flags|=128}if(B=A.memoizedState,B!==null&&(B.rendering=null,B.tail=null,B.lastEffect=null),U(Fi,Fi.current),D)break;return null;case 22:return A.lanes=0,BH(p,A,k,A.pendingProps);case 24:hh(A,Ui,p.memoizedState.cache)}return Fu(p,A,k)}function WH(p,A,k){if(p!==null)if(p.memoizedProps!==A.pendingProps)Wi=!0;else{if(!sT(p,k)&&(A.flags&128)===0)return Wi=!1,rSe(p,A,k);Wi=(p.flags&131072)!==0}else Wi=!1,qn&&(A.flags&1048576)!==0&&EV(A,Yy,A.index);switch(A.lanes=0,A.tag){case 16:e:{var D=A.pendingProps;if(p=Yd(A.elementType),A.type=p,typeof p=="function")u5(p)?(D=ep(p,D),A.tag=1,A=ZH(null,A,p,D,k)):(A.tag=0,A=K5(null,A,p,D,k));else{if(p!=null){var B=p.$$typeof;if(B===C){A.tag=11,A=LH(null,A,p,D,k);break e}else if(B===N){A.tag=14,A=FH(null,A,p,D,k);break e}}throw A=Z(p)||p,Error(r(306,A,""))}}return A;case 0:return K5(p,A,A.type,A.pendingProps,k);case 1:return D=A.type,B=ep(D,A.pendingProps),ZH(p,A,D,B,k);case 3:e:{if(H(A,A.stateNode.containerInfo),p===null)throw Error(r(387));D=A.pendingProps;var G=A.memoizedState;B=G.element,k5(p,A),ix(A,D,null,k);var se=A.memoizedState;if(D=se.cache,hh(A,Ui,D),D!==G.cache&&b5(A,[Ui],k,!0),rx(),D=se.element,G.isDehydrated)if(G={element:D,isDehydrated:!1,cache:se.cache},A.updateQueue.baseState=G,A.memoizedState=G,A.flags&256){A=zH(p,A,D,k);break e}else if(D!==B){B=il(Error(r(424)),A),qy(B),A=zH(p,A,D,k);break e}else{switch(p=A.stateNode.containerInfo,p.nodeType){case 9:p=p.body;break;default:p=p.nodeName==="HTML"?p.ownerDocument.body:p}for(ti=cl(p.firstChild),Is=A,qn=!0,uh=null,ol=!0,k=BV(A,null,D,k),A.child=k;k;)k.flags=k.flags&-3|4096,k=k.sibling}else{if(Gd(),D===B){A=Fu(p,A,k);break e}Rs(p,A,D,k)}A=A.child}return A;case 26:return Bw(p,A),p===null?(k=aZ(A.type,null,A.pendingProps,null))?A.memoizedState=k:qn||(k=A.type,p=A.pendingProps,D=r8(te.current).createElement(k),D[ln]=A,D[yn]=p,js(D,k,p),Ot(D),A.stateNode=D):A.memoizedState=aZ(A.type,p.memoizedProps,A.pendingProps,p.memoizedState),null;case 27:return oe(A),p===null&&qn&&(D=A.stateNode=rZ(A.type,A.pendingProps,te.current),Is=A,ol=!0,B=ti,kh(A.type)?(FT=B,ti=cl(D.firstChild)):ti=B),Rs(p,A,A.pendingProps.children,k),Bw(p,A),p===null&&(A.flags|=4194304),A.child;case 5:return p===null&&qn&&((B=D=ti)&&(D=ISe(D,A.type,A.pendingProps,ol),D!==null?(A.stateNode=D,Is=A,ti=cl(D.firstChild),ol=!1,B=!0):B=!1),B||fh(A)),oe(A),B=A.type,G=A.pendingProps,se=p!==null?p.memoizedProps:null,D=G.children,IT(B,G)?D=null:se!==null&&IT(B,se)&&(A.flags|=32),A.memoizedState!==null&&(B=D5(p,A,XAe,null,null,k),Ox._currentValue=B),Bw(p,A),Rs(p,A,D,k),A.child;case 6:return p===null&&qn&&((p=k=ti)&&(k=_Se(k,A.pendingProps,ol),k!==null?(A.stateNode=k,Is=A,ti=null,p=!0):p=!1),p||fh(A)),null;case 13:return GH(p,A,k);case 4:return H(A,A.stateNode.containerInfo),D=A.pendingProps,p===null?A.child=Kd(A,null,D,k):Rs(p,A,D,k),A.child;case 11:return LH(p,A,A.type,A.pendingProps,k);case 7:return Rs(p,A,A.pendingProps,k),A.child;case 8:return Rs(p,A,A.pendingProps.children,k),A.child;case 12:return Rs(p,A,A.pendingProps.children,k),A.child;case 10:return D=A.pendingProps,hh(A,A.type,D.value),Rs(p,A,D.children,k),A.child;case 9:return B=A.type._context,D=A.pendingProps.children,Xd(A),B=_s(B),D=D(B),A.flags|=1,Rs(p,A,D,k),A.child;case 14:return FH(p,A,A.type,A.pendingProps,k);case 15:return $H(p,A,A.type,A.pendingProps,k);case 19:return XH(p,A,k);case 31:return nSe(p,A,k);case 22:return BH(p,A,k,A.pendingProps);case 24:return Xd(A),D=_s(Ui),p===null?(B=S5(),B===null&&(B=Vr,G=v5(),B.pooledCache=G,G.refCount++,G!==null&&(B.pooledCacheLanes|=k),B=G),A.memoizedState={parent:D,cache:B},O5(A),hh(A,Ui,B)):((p.lanes&k)!==0&&(k5(p,A),ix(A,null,null,k),rx()),B=p.memoizedState,G=A.memoizedState,B.parent!==D?(B={parent:D,cache:D},A.memoizedState=B,A.lanes===0&&(A.memoizedState=A.updateQueue.baseState=B),hh(A,Ui,D)):(D=G.cache,hh(A,Ui,D),D!==B.cache&&b5(A,[Ui],k,!0))),Rs(p,A,A.pendingProps.children,k),A.child;case 29:throw A.pendingProps}throw Error(r(156,A.tag))}function $u(p){p.flags|=4}function aT(p,A,k,D,B){if((A=(p.mode&32)!==0)&&(A=!1),A){if(p.flags|=16777216,(B&335544128)===B)if(p.stateNode.complete)p.flags|=8192;else if(SQ())p.flags|=8192;else throw qd=kw,w5}else p.flags&=-16777217}function YH(p,A){if(A.type!=="stylesheet"||(A.state.loading&4)!==0)p.flags&=-16777217;else if(p.flags|=16777216,!fZ(A))if(SQ())p.flags|=8192;else throw qd=kw,w5}function Hw(p,A){A!==null&&(p.flags|=4),p.flags&16384&&(A=p.tag!==22?mn():536870912,p.lanes|=A,ym|=A)}function ux(p,A){if(!qn)switch(p.tailMode){case"hidden":A=p.tail;for(var k=null;A!==null;)A.alternate!==null&&(k=A),A=A.sibling;k===null?p.tail=null:k.sibling=null;break;case"collapsed":k=p.tail;for(var D=null;k!==null;)k.alternate!==null&&(D=k),k=k.sibling;D===null?A||p.tail===null?p.tail=null:p.tail.sibling=null:D.sibling=null}}function ni(p){var A=p.alternate!==null&&p.alternate.child===p.child,k=0,D=0;if(A)for(var B=p.child;B!==null;)k|=B.lanes|B.childLanes,D|=B.subtreeFlags&65011712,D|=B.flags&65011712,B.return=p,B=B.sibling;else for(B=p.child;B!==null;)k|=B.lanes|B.childLanes,D|=B.subtreeFlags,D|=B.flags,B.return=p,B=B.sibling;return p.subtreeFlags|=D,p.childLanes=k,A}function iSe(p,A,k){var D=A.pendingProps;switch(p5(A),A.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ni(A),null;case 1:return ni(A),null;case 3:return k=A.stateNode,D=null,p!==null&&(D=p.memoizedState.cache),A.memoizedState.cache!==D&&(A.flags|=2048),Ru(Ui),Q(),k.pendingContext&&(k.context=k.pendingContext,k.pendingContext=null),(p===null||p.child===null)&&(im(A)?$u(A):p===null||p.memoizedState.isDehydrated&&(A.flags&256)===0||(A.flags|=1024,g5())),ni(A),null;case 26:var B=A.type,G=A.memoizedState;return p===null?($u(A),G!==null?(ni(A),YH(A,G)):(ni(A),aT(A,B,null,D,k))):G?G!==p.memoizedState?($u(A),ni(A),YH(A,G)):(ni(A),A.flags&=-16777217):(p=p.memoizedProps,p!==D&&$u(A),ni(A),aT(A,B,p,D,k)),null;case 27:if(fe(A),k=te.current,B=A.type,p!==null&&A.stateNode!=null)p.memoizedProps!==D&&$u(A);else{if(!D){if(A.stateNode===null)throw Error(r(166));return ni(A),null}p=z.current,im(A)?PV(A):(p=rZ(B,D,k),A.stateNode=p,$u(A))}return ni(A),null;case 5:if(fe(A),B=A.type,p!==null&&A.stateNode!=null)p.memoizedProps!==D&&$u(A);else{if(!D){if(A.stateNode===null)throw Error(r(166));return ni(A),null}if(G=z.current,im(A))PV(A);else{var se=r8(te.current);switch(G){case 1:G=se.createElementNS("http://www.w3.org/2000/svg",B);break;case 2:G=se.createElementNS("http://www.w3.org/1998/Math/MathML",B);break;default:switch(B){case"svg":G=se.createElementNS("http://www.w3.org/2000/svg",B);break;case"math":G=se.createElementNS("http://www.w3.org/1998/Math/MathML",B);break;case"script":G=se.createElement("div"),G.innerHTML="<script><\/script>",G=G.removeChild(G.firstChild);break;case"select":G=typeof D.is=="string"?se.createElement("select",{is:D.is}):se.createElement("select"),D.multiple?G.multiple=!0:D.size&&(G.size=D.size);break;default:G=typeof D.is=="string"?se.createElement(B,{is:D.is}):se.createElement(B)}}G[ln]=A,G[yn]=D;e:for(se=A.child;se!==null;){if(se.tag===5||se.tag===6)G.appendChild(se.stateNode);else if(se.tag!==4&&se.tag!==27&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===A)break e;for(;se.sibling===null;){if(se.return===null||se.return===A)break e;se=se.return}se.sibling.return=se.return,se=se.sibling}A.stateNode=G;e:switch(js(G,B,D),B){case"button":case"input":case"select":case"textarea":D=!!D.autoFocus;break e;case"img":D=!0;break e;default:D=!1}D&&$u(A)}}return ni(A),aT(A,A.type,p===null?null:p.memoizedProps,A.pendingProps,k),null;case 6:if(p&&A.stateNode!=null)p.memoizedProps!==D&&$u(A);else{if(typeof D!="string"&&A.stateNode===null)throw Error(r(166));if(p=te.current,im(A)){if(p=A.stateNode,k=A.memoizedProps,D=null,B=Is,B!==null)switch(B.tag){case 27:case 5:D=B.memoizedProps}p[ln]=A,p=!!(p.nodeValue===k||D!==null&&D.suppressHydrationWarning===!0||GQ(p.nodeValue,k)),p||fh(A,!0)}else p=r8(p).createTextNode(D),p[ln]=A,A.stateNode=p}return ni(A),null;case 31:if(k=A.memoizedState,p===null||p.memoizedState!==null){if(D=im(A),k!==null){if(p===null){if(!D)throw Error(r(318));if(p=A.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(557));p[ln]=A}else Gd(),(A.flags&128)===0&&(A.memoizedState=null),A.flags|=4;ni(A),p=!1}else k=g5(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=k),p=!0;if(!p)return A.flags&256?(vo(A),A):(vo(A),null);if((A.flags&128)!==0)throw Error(r(558))}return ni(A),null;case 13:if(D=A.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(B=im(A),D!==null&&D.dehydrated!==null){if(p===null){if(!B)throw Error(r(318));if(B=A.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(r(317));B[ln]=A}else Gd(),(A.flags&128)===0&&(A.memoizedState=null),A.flags|=4;ni(A),B=!1}else B=g5(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=B),B=!0;if(!B)return A.flags&256?(vo(A),A):(vo(A),null)}return vo(A),(A.flags&128)!==0?(A.lanes=k,A):(k=D!==null,p=p!==null&&p.memoizedState!==null,k&&(D=A.child,B=null,D.alternate!==null&&D.alternate.memoizedState!==null&&D.alternate.memoizedState.cachePool!==null&&(B=D.alternate.memoizedState.cachePool.pool),G=null,D.memoizedState!==null&&D.memoizedState.cachePool!==null&&(G=D.memoizedState.cachePool.pool),G!==B&&(D.flags|=2048)),k!==p&&k&&(A.child.flags|=8192),Hw(A,A.updateQueue),ni(A),null);case 4:return Q(),p===null&&TT(A.stateNode.containerInfo),ni(A),null;case 10:return Ru(A.type),ni(A),null;case 19:if(F(Fi),D=A.memoizedState,D===null)return ni(A),null;if(B=(A.flags&128)!==0,G=D.rendering,G===null)if(B)ux(D,!1);else{if(Ti!==0||p!==null&&(p.flags&128)!==0)for(p=A.child;p!==null;){if(G=Pw(p),G!==null){for(A.flags|=128,ux(D,!1),p=G.updateQueue,A.updateQueue=p,Hw(A,p),A.subtreeFlags=0,p=k,k=A.child;k!==null;)OV(k,p),k=k.sibling;return U(Fi,Fi.current&1|2),qn&&Iu(A,D.treeForkCount),A.child}p=p.sibling}D.tail!==null&&ze()>Uw&&(A.flags|=128,B=!0,ux(D,!1),A.lanes=4194304)}else{if(!B)if(p=Pw(G),p!==null){if(A.flags|=128,B=!0,p=p.updateQueue,A.updateQueue=p,Hw(A,p),ux(D,!0),D.tail===null&&D.tailMode==="hidden"&&!G.alternate&&!qn)return ni(A),null}else 2*ze()-D.renderingStartTime>Uw&&k!==536870912&&(A.flags|=128,B=!0,ux(D,!1),A.lanes=4194304);D.isBackwards?(G.sibling=A.child,A.child=G):(p=D.last,p!==null?p.sibling=G:A.child=G,D.last=G)}return D.tail!==null?(p=D.tail,D.rendering=p,D.tail=p.sibling,D.renderingStartTime=ze(),p.sibling=null,k=Fi.current,U(Fi,B?k&1|2:k&1),qn&&Iu(A,D.treeForkCount),p):(ni(A),null);case 22:case 23:return vo(A),P5(),D=A.memoizedState!==null,p!==null?p.memoizedState!==null!==D&&(A.flags|=8192):D&&(A.flags|=8192),D?(k&536870912)!==0&&(A.flags&128)===0&&(ni(A),A.subtreeFlags&6&&(A.flags|=8192)):ni(A),k=A.updateQueue,k!==null&&Hw(A,k.retryQueue),k=null,p!==null&&p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(k=p.memoizedState.cachePool.pool),D=null,A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(D=A.memoizedState.cachePool.pool),D!==k&&(A.flags|=2048),p!==null&&F(Wd),null;case 24:return k=null,p!==null&&(k=p.memoizedState.cache),A.memoizedState.cache!==k&&(A.flags|=2048),Ru(Ui),ni(A),null;case 25:return null;case 30:return null}throw Error(r(156,A.tag))}function sSe(p,A){switch(p5(A),A.tag){case 1:return p=A.flags,p&65536?(A.flags=p&-65537|128,A):null;case 3:return Ru(Ui),Q(),p=A.flags,(p&65536)!==0&&(p&128)===0?(A.flags=p&-65537|128,A):null;case 26:case 27:case 5:return fe(A),null;case 31:if(A.memoizedState!==null){if(vo(A),A.alternate===null)throw Error(r(340));Gd()}return p=A.flags,p&65536?(A.flags=p&-65537|128,A):null;case 13:if(vo(A),p=A.memoizedState,p!==null&&p.dehydrated!==null){if(A.alternate===null)throw Error(r(340));Gd()}return p=A.flags,p&65536?(A.flags=p&-65537|128,A):null;case 19:return F(Fi),null;case 4:return Q(),null;case 10:return Ru(A.type),null;case 22:case 23:return vo(A),P5(),p!==null&&F(Wd),p=A.flags,p&65536?(A.flags=p&-65537|128,A):null;case 24:return Ru(Ui),null;case 25:return null;default:return null}}function qH(p,A){switch(p5(A),A.tag){case 3:Ru(Ui),Q();break;case 26:case 27:case 5:fe(A);break;case 4:Q();break;case 31:A.memoizedState!==null&&vo(A);break;case 13:vo(A);break;case 19:F(Fi);break;case 10:Ru(A.type);break;case 22:case 23:vo(A),P5(),p!==null&&F(Wd);break;case 24:Ru(Ui)}}function fx(p,A){try{var k=A.updateQueue,D=k!==null?k.lastEffect:null;if(D!==null){var B=D.next;k=B;do{if((k.tag&p)===p){D=void 0;var G=k.create,se=k.inst;D=G(),se.destroy=D}k=k.next}while(k!==B)}}catch(de){Cr(A,A.return,de)}}function xh(p,A,k){try{var D=A.updateQueue,B=D!==null?D.lastEffect:null;if(B!==null){var G=B.next;D=G;do{if((D.tag&p)===p){var se=D.inst,de=se.destroy;if(de!==void 0){se.destroy=void 0,B=A;var Ee=k,Le=de;try{Le()}catch(Ge){Cr(B,Ee,Ge)}}}D=D.next}while(D!==G)}}catch(Ge){Cr(A,A.return,Ge)}}function KH(p){var A=p.updateQueue;if(A!==null){var k=p.stateNode;try{HV(A,k)}catch(D){Cr(p,p.return,D)}}}function JH(p,A,k){k.props=ep(p.type,p.memoizedProps),k.state=p.memoizedState;try{k.componentWillUnmount()}catch(D){Cr(p,A,D)}}function hx(p,A){try{var k=p.ref;if(k!==null){switch(p.tag){case 26:case 27:case 5:var D=p.stateNode;break;case 30:D=p.stateNode;break;default:D=p.stateNode}typeof k=="function"?p.refCleanup=k(D):k.current=D}}catch(B){Cr(p,A,B)}}function jc(p,A){var k=p.ref,D=p.refCleanup;if(k!==null)if(typeof D=="function")try{D()}catch(B){Cr(p,A,B)}finally{p.refCleanup=null,p=p.alternate,p!=null&&(p.refCleanup=null)}else if(typeof k=="function")try{k(null)}catch(B){Cr(p,A,B)}else k.current=null}function eQ(p){var A=p.type,k=p.memoizedProps,D=p.stateNode;try{e:switch(A){case"button":case"input":case"select":case"textarea":k.autoFocus&&D.focus();break e;case"img":k.src?D.src=k.src:k.srcSet&&(D.srcset=k.srcSet)}}catch(B){Cr(p,p.return,B)}}function oT(p,A,k){try{var D=p.stateNode;ESe(D,p.type,k,A),D[yn]=A}catch(B){Cr(p,p.return,B)}}function tQ(p){return p.tag===5||p.tag===3||p.tag===26||p.tag===27&&kh(p.type)||p.tag===4}function lT(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||tQ(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.tag===27&&kh(p.type)||p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function cT(p,A,k){var D=p.tag;if(D===5||D===6)p=p.stateNode,A?(k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k).insertBefore(p,A):(A=k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k,A.appendChild(p),k=k._reactRootContainer,k!=null||A.onclick!==null||(A.onclick=ys));else if(D!==4&&(D===27&&kh(p.type)&&(k=p.stateNode,A=null),p=p.child,p!==null))for(cT(p,A,k),p=p.sibling;p!==null;)cT(p,A,k),p=p.sibling}function Qw(p,A,k){var D=p.tag;if(D===5||D===6)p=p.stateNode,A?k.insertBefore(p,A):k.appendChild(p);else if(D!==4&&(D===27&&kh(p.type)&&(k=p.stateNode),p=p.child,p!==null))for(Qw(p,A,k),p=p.sibling;p!==null;)Qw(p,A,k),p=p.sibling}function nQ(p){var A=p.stateNode,k=p.memoizedProps;try{for(var D=p.type,B=A.attributes;B.length;)A.removeAttributeNode(B[0]);js(A,D,k),A[ln]=p,A[yn]=k}catch(G){Cr(p,p.return,G)}}var Bu=!1,Yi=!1,uT=!1,rQ=typeof WeakSet=="function"?WeakSet:Set,xs=null;function aSe(p,A){if(p=p.containerInfo,NT=u8,p=Xy(p),K0(p)){if("selectionStart"in p)var k={start:p.selectionStart,end:p.selectionEnd};else e:{k=(k=p.ownerDocument)&&k.defaultView||window;var D=k.getSelection&&k.getSelection();if(D&&D.rangeCount!==0){k=D.anchorNode;var B=D.anchorOffset,G=D.focusNode;D=D.focusOffset;try{k.nodeType,G.nodeType}catch{k=null;break e}var se=0,de=-1,Ee=-1,Le=0,Ge=0,Xe=p,Fe=null;t:for(;;){for(var He;Xe!==k||B!==0&&Xe.nodeType!==3||(de=se+B),Xe!==G||D!==0&&Xe.nodeType!==3||(Ee=se+D),Xe.nodeType===3&&(se+=Xe.nodeValue.length),(He=Xe.firstChild)!==null;)Fe=Xe,Xe=He;for(;;){if(Xe===p)break t;if(Fe===k&&++Le===B&&(de=se),Fe===G&&++Ge===D&&(Ee=se),(He=Xe.nextSibling)!==null)break;Xe=Fe,Fe=Xe.parentNode}Xe=He}k=de===-1||Ee===-1?null:{start:de,end:Ee}}else k=null}k=k||{start:0,end:0}}else k=null;for(DT={focusedElem:p,selectionRange:k},u8=!1,xs=A;xs!==null;)if(A=xs,p=A.child,(A.subtreeFlags&1028)!==0&&p!==null)p.return=A,xs=p;else for(;xs!==null;){switch(A=xs,G=A.alternate,p=A.flags,A.tag){case 0:if((p&4)!==0&&(p=A.updateQueue,p=p!==null?p.events:null,p!==null))for(k=0;k<p.length;k++)B=p[k],B.ref.impl=B.nextImpl;break;case 11:case 15:break;case 1:if((p&1024)!==0&&G!==null){p=void 0,k=A,B=G.memoizedProps,G=G.memoizedState,D=k.stateNode;try{var Ft=ep(k.type,B);p=D.getSnapshotBeforeUpdate(Ft,G),D.__reactInternalSnapshotBeforeUpdate=p}catch(sn){Cr(k,k.return,sn)}}break;case 3:if((p&1024)!==0){if(p=A.stateNode.containerInfo,k=p.nodeType,k===9)RT(p);else if(k===1)switch(p.nodeName){case"HEAD":case"HTML":case"BODY":RT(p);break;default:p.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&1024)!==0)throw Error(r(163))}if(p=A.sibling,p!==null){p.return=A.return,xs=p;break}xs=A.return}}function iQ(p,A,k){var D=k.flags;switch(k.tag){case 0:case 11:case 15:Hu(p,k),D&4&&fx(5,k);break;case 1:if(Hu(p,k),D&4)if(p=k.stateNode,A===null)try{p.componentDidMount()}catch(se){Cr(k,k.return,se)}else{var B=ep(k.type,A.memoizedProps);A=A.memoizedState;try{p.componentDidUpdate(B,A,p.__reactInternalSnapshotBeforeUpdate)}catch(se){Cr(k,k.return,se)}}D&64&&KH(k),D&512&&hx(k,k.return);break;case 3:if(Hu(p,k),D&64&&(p=k.updateQueue,p!==null)){if(A=null,k.child!==null)switch(k.child.tag){case 27:case 5:A=k.child.stateNode;break;case 1:A=k.child.stateNode}try{HV(p,A)}catch(se){Cr(k,k.return,se)}}break;case 27:A===null&&D&4&&nQ(k);case 26:case 5:Hu(p,k),A===null&&D&4&&eQ(k),D&512&&hx(k,k.return);break;case 12:Hu(p,k);break;case 31:Hu(p,k),D&4&&oQ(p,k);break;case 13:Hu(p,k),D&4&&lQ(p,k),D&64&&(p=k.memoizedState,p!==null&&(p=p.dehydrated,p!==null&&(k=mSe.bind(null,k),RSe(p,k))));break;case 22:if(D=k.memoizedState!==null||Bu,!D){A=A!==null&&A.memoizedState!==null||Yi,B=Bu;var G=Yi;Bu=D,(Yi=A)&&!G?Qu(p,k,(k.subtreeFlags&8772)!==0):Hu(p,k),Bu=B,Yi=G}break;case 30:break;default:Hu(p,k)}}function sQ(p){var A=p.alternate;A!==null&&(p.alternate=null,sQ(A)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(A=p.stateNode,A!==null&&Wn(A)),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}var oi=null,Va=!1;function Vu(p,A,k){for(k=k.child;k!==null;)aQ(p,A,k),k=k.sibling}function aQ(p,A,k){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount(Dt,k)}catch{}switch(k.tag){case 26:Yi||jc(k,A),Vu(p,A,k),k.memoizedState?k.memoizedState.count--:k.stateNode&&(k=k.stateNode,k.parentNode.removeChild(k));break;case 27:Yi||jc(k,A);var D=oi,B=Va;kh(k.type)&&(oi=k.stateNode,Va=!1),Vu(p,A,k),Ax(k.stateNode),oi=D,Va=B;break;case 5:Yi||jc(k,A);case 6:if(D=oi,B=Va,oi=null,Vu(p,A,k),oi=D,Va=B,oi!==null)if(Va)try{(oi.nodeType===9?oi.body:oi.nodeName==="HTML"?oi.ownerDocument.body:oi).removeChild(k.stateNode)}catch(G){Cr(k,A,G)}else try{oi.removeChild(k.stateNode)}catch(G){Cr(k,A,G)}break;case 18:oi!==null&&(Va?(p=oi,KQ(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,k.stateNode),km(p)):KQ(oi,k.stateNode));break;case 4:D=oi,B=Va,oi=k.stateNode.containerInfo,Va=!0,Vu(p,A,k),oi=D,Va=B;break;case 0:case 11:case 14:case 15:xh(2,k,A),Yi||xh(4,k,A),Vu(p,A,k);break;case 1:Yi||(jc(k,A),D=k.stateNode,typeof D.componentWillUnmount=="function"&&JH(k,A,D)),Vu(p,A,k);break;case 21:Vu(p,A,k);break;case 22:Yi=(D=Yi)||k.memoizedState!==null,Vu(p,A,k),Yi=D;break;default:Vu(p,A,k)}}function oQ(p,A){if(A.memoizedState===null&&(p=A.alternate,p!==null&&(p=p.memoizedState,p!==null))){p=p.dehydrated;try{km(p)}catch(k){Cr(A,A.return,k)}}}function lQ(p,A){if(A.memoizedState===null&&(p=A.alternate,p!==null&&(p=p.memoizedState,p!==null&&(p=p.dehydrated,p!==null))))try{km(p)}catch(k){Cr(A,A.return,k)}}function oSe(p){switch(p.tag){case 31:case 13:case 19:var A=p.stateNode;return A===null&&(A=p.stateNode=new rQ),A;case 22:return p=p.stateNode,A=p._retryCache,A===null&&(A=p._retryCache=new rQ),A;default:throw Error(r(435,p.tag))}}function Zw(p,A){var k=oSe(p);A.forEach(function(D){if(!k.has(D)){k.add(D);var B=gSe.bind(null,p,D);D.then(B,B)}})}function Ha(p,A){var k=A.deletions;if(k!==null)for(var D=0;D<k.length;D++){var B=k[D],G=p,se=A,de=se;e:for(;de!==null;){switch(de.tag){case 27:if(kh(de.type)){oi=de.stateNode,Va=!1;break e}break;case 5:oi=de.stateNode,Va=!1;break e;case 3:case 4:oi=de.stateNode.containerInfo,Va=!0;break e}de=de.return}if(oi===null)throw Error(r(160));aQ(G,se,B),oi=null,Va=!1,G=B.alternate,G!==null&&(G.return=null),B.return=null}if(A.subtreeFlags&13886)for(A=A.child;A!==null;)cQ(A,p),A=A.sibling}var Ul=null;function cQ(p,A){var k=p.alternate,D=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:Ha(A,p),Qa(p),D&4&&(xh(3,p,p.return),fx(3,p),xh(5,p,p.return));break;case 1:Ha(A,p),Qa(p),D&512&&(Yi||k===null||jc(k,k.return)),D&64&&Bu&&(p=p.updateQueue,p!==null&&(D=p.callbacks,D!==null&&(k=p.shared.hiddenCallbacks,p.shared.hiddenCallbacks=k===null?D:k.concat(D))));break;case 26:var B=Ul;if(Ha(A,p),Qa(p),D&512&&(Yi||k===null||jc(k,k.return)),D&4){var G=k!==null?k.memoizedState:null;if(D=p.memoizedState,k===null)if(D===null)if(p.stateNode===null){e:{D=p.type,k=p.memoizedProps,B=B.ownerDocument||B;t:switch(D){case"title":G=B.getElementsByTagName("title")[0],(!G||G[xt]||G[ln]||G.namespaceURI==="http://www.w3.org/2000/svg"||G.hasAttribute("itemprop"))&&(G=B.createElement(D),B.head.insertBefore(G,B.querySelector("head > title"))),js(G,D,k),G[ln]=p,Ot(G),D=G;break e;case"link":var se=cZ("link","href",B).get(D+(k.href||""));if(se){for(var de=0;de<se.length;de++)if(G=se[de],G.getAttribute("href")===(k.href==null||k.href===""?null:k.href)&&G.getAttribute("rel")===(k.rel==null?null:k.rel)&&G.getAttribute("title")===(k.title==null?null:k.title)&&G.getAttribute("crossorigin")===(k.crossOrigin==null?null:k.crossOrigin)){se.splice(de,1);break t}}G=B.createElement(D),js(G,D,k),B.head.appendChild(G);break;case"meta":if(se=cZ("meta","content",B).get(D+(k.content||""))){for(de=0;de<se.length;de++)if(G=se[de],G.getAttribute("content")===(k.content==null?null:""+k.content)&&G.getAttribute("name")===(k.name==null?null:k.name)&&G.getAttribute("property")===(k.property==null?null:k.property)&&G.getAttribute("http-equiv")===(k.httpEquiv==null?null:k.httpEquiv)&&G.getAttribute("charset")===(k.charSet==null?null:k.charSet)){se.splice(de,1);break t}}G=B.createElement(D),js(G,D,k),B.head.appendChild(G);break;default:throw Error(r(468,D))}G[ln]=p,Ot(G),D=G}p.stateNode=D}else uZ(B,p.type,p.stateNode);else p.stateNode=lZ(B,D,p.memoizedProps);else G!==D?(G===null?k.stateNode!==null&&(k=k.stateNode,k.parentNode.removeChild(k)):G.count--,D===null?uZ(B,p.type,p.stateNode):lZ(B,D,p.memoizedProps)):D===null&&p.stateNode!==null&&oT(p,p.memoizedProps,k.memoizedProps)}break;case 27:Ha(A,p),Qa(p),D&512&&(Yi||k===null||jc(k,k.return)),k!==null&&D&4&&oT(p,p.memoizedProps,k.memoizedProps);break;case 5:if(Ha(A,p),Qa(p),D&512&&(Yi||k===null||jc(k,k.return)),p.flags&32){B=p.stateNode;try{Jt(B,"")}catch(Ft){Cr(p,p.return,Ft)}}D&4&&p.stateNode!=null&&(B=p.memoizedProps,oT(p,B,k!==null?k.memoizedProps:B)),D&1024&&(uT=!0);break;case 6:if(Ha(A,p),Qa(p),D&4){if(p.stateNode===null)throw Error(r(162));D=p.memoizedProps,k=p.stateNode;try{k.nodeValue=D}catch(Ft){Cr(p,p.return,Ft)}}break;case 3:if(a8=null,B=Ul,Ul=i8(A.containerInfo),Ha(A,p),Ul=B,Qa(p),D&4&&k!==null&&k.memoizedState.isDehydrated)try{km(A.containerInfo)}catch(Ft){Cr(p,p.return,Ft)}uT&&(uT=!1,uQ(p));break;case 4:D=Ul,Ul=i8(p.stateNode.containerInfo),Ha(A,p),Qa(p),Ul=D;break;case 12:Ha(A,p),Qa(p);break;case 31:Ha(A,p),Qa(p),D&4&&(D=p.updateQueue,D!==null&&(p.updateQueue=null,Zw(p,D)));break;case 13:Ha(A,p),Qa(p),p.child.flags&8192&&p.memoizedState!==null!=(k!==null&&k.memoizedState!==null)&&(Gw=ze()),D&4&&(D=p.updateQueue,D!==null&&(p.updateQueue=null,Zw(p,D)));break;case 22:B=p.memoizedState!==null;var Ee=k!==null&&k.memoizedState!==null,Le=Bu,Ge=Yi;if(Bu=Le||B,Yi=Ge||Ee,Ha(A,p),Yi=Ge,Bu=Le,Qa(p),D&8192)e:for(A=p.stateNode,A._visibility=B?A._visibility&-2:A._visibility|1,B&&(k===null||Ee||Bu||Yi||tp(p)),k=null,A=p;;){if(A.tag===5||A.tag===26){if(k===null){Ee=k=A;try{if(G=Ee.stateNode,B)se=G.style,typeof se.setProperty=="function"?se.setProperty("display","none","important"):se.display="none";else{de=Ee.stateNode;var Xe=Ee.memoizedProps.style,Fe=Xe!=null&&Xe.hasOwnProperty("display")?Xe.display:null;de.style.display=Fe==null||typeof Fe=="boolean"?"":(""+Fe).trim()}}catch(Ft){Cr(Ee,Ee.return,Ft)}}}else if(A.tag===6){if(k===null){Ee=A;try{Ee.stateNode.nodeValue=B?"":Ee.memoizedProps}catch(Ft){Cr(Ee,Ee.return,Ft)}}}else if(A.tag===18){if(k===null){Ee=A;try{var He=Ee.stateNode;B?JQ(He,!0):JQ(Ee.stateNode,!1)}catch(Ft){Cr(Ee,Ee.return,Ft)}}}else if((A.tag!==22&&A.tag!==23||A.memoizedState===null||A===p)&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===p)break e;for(;A.sibling===null;){if(A.return===null||A.return===p)break e;k===A&&(k=null),A=A.return}k===A&&(k=null),A.sibling.return=A.return,A=A.sibling}D&4&&(D=p.updateQueue,D!==null&&(k=D.retryQueue,k!==null&&(D.retryQueue=null,Zw(p,k))));break;case 19:Ha(A,p),Qa(p),D&4&&(D=p.updateQueue,D!==null&&(p.updateQueue=null,Zw(p,D)));break;case 30:break;case 21:break;default:Ha(A,p),Qa(p)}}function Qa(p){var A=p.flags;if(A&2){try{for(var k,D=p.return;D!==null;){if(tQ(D)){k=D;break}D=D.return}if(k==null)throw Error(r(160));switch(k.tag){case 27:var B=k.stateNode,G=lT(p);Qw(p,G,B);break;case 5:var se=k.stateNode;k.flags&32&&(Jt(se,""),k.flags&=-33);var de=lT(p);Qw(p,de,se);break;case 3:case 4:var Ee=k.stateNode.containerInfo,Le=lT(p);cT(p,Le,Ee);break;default:throw Error(r(161))}}catch(Ge){Cr(p,p.return,Ge)}p.flags&=-3}A&4096&&(p.flags&=-4097)}function uQ(p){if(p.subtreeFlags&1024)for(p=p.child;p!==null;){var A=p;uQ(A),A.tag===5&&A.flags&1024&&A.stateNode.reset(),p=p.sibling}}function Hu(p,A){if(A.subtreeFlags&8772)for(A=A.child;A!==null;)iQ(p,A.alternate,A),A=A.sibling}function tp(p){for(p=p.child;p!==null;){var A=p;switch(A.tag){case 0:case 11:case 14:case 15:xh(4,A,A.return),tp(A);break;case 1:jc(A,A.return);var k=A.stateNode;typeof k.componentWillUnmount=="function"&&JH(A,A.return,k),tp(A);break;case 27:Ax(A.stateNode);case 26:case 5:jc(A,A.return),tp(A);break;case 22:A.memoizedState===null&&tp(A);break;case 30:tp(A);break;default:tp(A)}p=p.sibling}}function Qu(p,A,k){for(k=k&&(A.subtreeFlags&8772)!==0,A=A.child;A!==null;){var D=A.alternate,B=p,G=A,se=G.flags;switch(G.tag){case 0:case 11:case 15:Qu(B,G,k),fx(4,G);break;case 1:if(Qu(B,G,k),D=G,B=D.stateNode,typeof B.componentDidMount=="function")try{B.componentDidMount()}catch(Le){Cr(D,D.return,Le)}if(D=G,B=D.updateQueue,B!==null){var de=D.stateNode;try{var Ee=B.shared.hiddenCallbacks;if(Ee!==null)for(B.shared.hiddenCallbacks=null,B=0;B<Ee.length;B++)VV(Ee[B],de)}catch(Le){Cr(D,D.return,Le)}}k&&se&64&&KH(G),hx(G,G.return);break;case 27:nQ(G);case 26:case 5:Qu(B,G,k),k&&D===null&&se&4&&eQ(G),hx(G,G.return);break;case 12:Qu(B,G,k);break;case 31:Qu(B,G,k),k&&se&4&&oQ(B,G);break;case 13:Qu(B,G,k),k&&se&4&&lQ(B,G);break;case 22:G.memoizedState===null&&Qu(B,G,k),hx(G,G.return);break;case 30:break;default:Qu(B,G,k)}A=A.sibling}}function fT(p,A){var k=null;p!==null&&p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(k=p.memoizedState.cachePool.pool),p=null,A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(p=A.memoizedState.cachePool.pool),p!==k&&(p!=null&&p.refCount++,k!=null&&Ky(k))}function hT(p,A){p=null,A.alternate!==null&&(p=A.alternate.memoizedState.cache),A=A.memoizedState.cache,A!==p&&(A.refCount++,p!=null&&Ky(p))}function Xl(p,A,k,D){if(A.subtreeFlags&10256)for(A=A.child;A!==null;)fQ(p,A,k,D),A=A.sibling}function fQ(p,A,k,D){var B=A.flags;switch(A.tag){case 0:case 11:case 15:Xl(p,A,k,D),B&2048&&fx(9,A);break;case 1:Xl(p,A,k,D);break;case 3:Xl(p,A,k,D),B&2048&&(p=null,A.alternate!==null&&(p=A.alternate.memoizedState.cache),A=A.memoizedState.cache,A!==p&&(A.refCount++,p!=null&&Ky(p)));break;case 12:if(B&2048){Xl(p,A,k,D),p=A.stateNode;try{var G=A.memoizedProps,se=G.id,de=G.onPostCommit;typeof de=="function"&&de(se,A.alternate===null?"mount":"update",p.passiveEffectDuration,-0)}catch(Ee){Cr(A,A.return,Ee)}}else Xl(p,A,k,D);break;case 31:Xl(p,A,k,D);break;case 13:Xl(p,A,k,D);break;case 23:break;case 22:G=A.stateNode,se=A.alternate,A.memoizedState!==null?G._visibility&2?Xl(p,A,k,D):dx(p,A):G._visibility&2?Xl(p,A,k,D):(G._visibility|=2,pm(p,A,k,D,(A.subtreeFlags&10256)!==0||!1)),B&2048&&fT(se,A);break;case 24:Xl(p,A,k,D),B&2048&&hT(A.alternate,A);break;default:Xl(p,A,k,D)}}function pm(p,A,k,D,B){for(B=B&&((A.subtreeFlags&10256)!==0||!1),A=A.child;A!==null;){var G=p,se=A,de=k,Ee=D,Le=se.flags;switch(se.tag){case 0:case 11:case 15:pm(G,se,de,Ee,B),fx(8,se);break;case 23:break;case 22:var Ge=se.stateNode;se.memoizedState!==null?Ge._visibility&2?pm(G,se,de,Ee,B):dx(G,se):(Ge._visibility|=2,pm(G,se,de,Ee,B)),B&&Le&2048&&fT(se.alternate,se);break;case 24:pm(G,se,de,Ee,B),B&&Le&2048&&hT(se.alternate,se);break;default:pm(G,se,de,Ee,B)}A=A.sibling}}function dx(p,A){if(A.subtreeFlags&10256)for(A=A.child;A!==null;){var k=p,D=A,B=D.flags;switch(D.tag){case 22:dx(k,D),B&2048&&fT(D.alternate,D);break;case 24:dx(k,D),B&2048&&hT(D.alternate,D);break;default:dx(k,D)}A=A.sibling}}var px=8192;function mm(p,A,k){if(p.subtreeFlags&px)for(p=p.child;p!==null;)hQ(p,A,k),p=p.sibling}function hQ(p,A,k){switch(p.tag){case 26:mm(p,A,k),p.flags&px&&p.memoizedState!==null&&USe(k,Ul,p.memoizedState,p.memoizedProps);break;case 5:mm(p,A,k);break;case 3:case 4:var D=Ul;Ul=i8(p.stateNode.containerInfo),mm(p,A,k),Ul=D;break;case 22:p.memoizedState===null&&(D=p.alternate,D!==null&&D.memoizedState!==null?(D=px,px=16777216,mm(p,A,k),px=D):mm(p,A,k));break;default:mm(p,A,k)}}function dQ(p){var A=p.alternate;if(A!==null&&(p=A.child,p!==null)){A.child=null;do A=p.sibling,p.sibling=null,p=A;while(p!==null)}}function mx(p){var A=p.deletions;if((p.flags&16)!==0){if(A!==null)for(var k=0;k<A.length;k++){var D=A[k];xs=D,mQ(D,p)}dQ(p)}if(p.subtreeFlags&10256)for(p=p.child;p!==null;)pQ(p),p=p.sibling}function pQ(p){switch(p.tag){case 0:case 11:case 15:mx(p),p.flags&2048&&xh(9,p,p.return);break;case 3:mx(p);break;case 12:mx(p);break;case 22:var A=p.stateNode;p.memoizedState!==null&&A._visibility&2&&(p.return===null||p.return.tag!==13)?(A._visibility&=-3,zw(p)):mx(p);break;default:mx(p)}}function zw(p){var A=p.deletions;if((p.flags&16)!==0){if(A!==null)for(var k=0;k<A.length;k++){var D=A[k];xs=D,mQ(D,p)}dQ(p)}for(p=p.child;p!==null;){switch(A=p,A.tag){case 0:case 11:case 15:xh(8,A,A.return),zw(A);break;case 22:k=A.stateNode,k._visibility&2&&(k._visibility&=-3,zw(A));break;default:zw(A)}p=p.sibling}}function mQ(p,A){for(;xs!==null;){var k=xs;switch(k.tag){case 0:case 11:case 15:xh(8,k,A);break;case 23:case 22:if(k.memoizedState!==null&&k.memoizedState.cachePool!==null){var D=k.memoizedState.cachePool.pool;D!=null&&D.refCount++}break;case 24:Ky(k.memoizedState.cache)}if(D=k.child,D!==null)D.return=k,xs=D;else e:for(k=p;xs!==null;){D=xs;var B=D.sibling,G=D.return;if(sQ(D),D===k){xs=null;break e}if(B!==null){B.return=G,xs=B;break e}xs=G}}}var lSe={getCacheForType:function(p){var A=_s(Ui),k=A.data.get(p);return k===void 0&&(k=p(),A.data.set(p,k)),k},cacheSignal:function(){return _s(Ui).controller.signal}},cSe=typeof WeakMap=="function"?WeakMap:Map,dr=0,Vr=null,$n=null,zn=0,kr=0,Ao=null,bh=!1,gm=!1,dT=!1,Zu=0,Ti=0,vh=0,np=0,pT=0,So=0,ym=0,gx=null,Za=null,mT=!1,Gw=0,gQ=0,Uw=1/0,Xw=null,Ah=null,us=0,Sh=null,xm=null,zu=0,gT=0,yT=null,yQ=null,yx=0,xT=null;function wo(){return(dr&2)!==0&&zn!==0?zn&-zn:Y.T!==null?OT():yt()}function xQ(){if(So===0)if((zn&536870912)===0||qn){var p=zt;zt<<=1,(zt&3932160)===0&&(zt=262144),So=p}else So=536870912;return p=bo.current,p!==null&&(p.flags|=32),So}function za(p,A,k){(p===Vr&&(kr===2||kr===9)||p.cancelPendingCommit!==null)&&(bm(p,0),wh(p,zn,So,!1)),qt(p,k),((dr&2)===0||p!==Vr)&&(p===Vr&&((dr&2)===0&&(np|=k),Ti===4&&wh(p,zn,So,!1)),Lc(p))}function bQ(p,A,k){if((dr&6)!==0)throw Error(r(327));var D=!k&&(A&127)===0&&(A&p.expiredLanes)===0||nt(p,A),B=D?hSe(p,A):vT(p,A,!0),G=D;do{if(B===0){gm&&!D&&wh(p,A,0,!1);break}else{if(k=p.current.alternate,G&&!uSe(k)){B=vT(p,A,!1),G=!1;continue}if(B===2){if(G=A,p.errorRecoveryDisabledLanes&G)var se=0;else se=p.pendingLanes&-536870913,se=se!==0?se:se&536870912?536870912:0;if(se!==0){A=se;e:{var de=p;B=gx;var Ee=de.current.memoizedState.isDehydrated;if(Ee&&(bm(de,se).flags|=256),se=vT(de,se,!1),se!==2){if(dT&&!Ee){de.errorRecoveryDisabledLanes|=G,np|=G,B=4;break e}G=Za,Za=B,G!==null&&(Za===null?Za=G:Za.push.apply(Za,G))}B=se}if(G=!1,B!==2)continue}}if(B===1){bm(p,0),wh(p,A,0,!0);break}e:{switch(D=p,G=B,G){case 0:case 1:throw Error(r(345));case 4:if((A&4194048)!==A)break;case 6:wh(D,A,So,!bh);break e;case 2:Za=null;break;case 3:case 5:break;default:throw Error(r(329))}if((A&62914560)===A&&(B=Gw+300-ze(),10<B)){if(wh(D,A,So,!bh),Ze(D,0,!0)!==0)break e;zu=A,D.timeoutHandle=YQ(vQ.bind(null,D,k,Za,Xw,mT,A,So,np,ym,bh,G,"Throttled",-0,0),B);break e}vQ(D,k,Za,Xw,mT,A,So,np,ym,bh,G,null,-0,0)}}break}while(!0);Lc(p)}function vQ(p,A,k,D,B,G,se,de,Ee,Le,Ge,Xe,Fe,He){if(p.timeoutHandle=-1,Xe=A.subtreeFlags,Xe&8192||(Xe&16785408)===16785408){Xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ys},hQ(A,G,Xe);var Ft=(G&62914560)===G?Gw-ze():(G&4194048)===G?gQ-ze():0;if(Ft=XSe(Xe,Ft),Ft!==null){zu=G,p.cancelPendingCommit=Ft(TQ.bind(null,p,A,G,k,D,B,se,de,Ee,Ge,Xe,null,Fe,He)),wh(p,G,se,!Le);return}}TQ(p,A,G,k,D,B,se,de,Ee)}function uSe(p){for(var A=p;;){var k=A.tag;if((k===0||k===11||k===15)&&A.flags&16384&&(k=A.updateQueue,k!==null&&(k=k.stores,k!==null)))for(var D=0;D<k.length;D++){var B=k[D],G=B.getSnapshot;B=B.value;try{if(!Js(G(),B))return!1}catch{return!1}}if(k=A.child,A.subtreeFlags&16384&&k!==null)k.return=A,A=k;else{if(A===p)break;for(;A.sibling===null;){if(A.return===null||A.return===p)return!0;A=A.return}A.sibling.return=A.return,A=A.sibling}}return!0}function wh(p,A,k,D){A&=~pT,A&=~np,p.suspendedLanes|=A,p.pingedLanes&=~A,D&&(p.warmLanes|=A),D=p.expirationTimes;for(var B=A;0<B;){var G=31-ut(B),se=1<<G;D[G]=-1,B&=~se}k!==0&>(p,k,A)}function Ww(){return(dr&6)===0?(xx(0),!1):!0}function bT(){if($n!==null){if(kr===0)var p=$n.return;else p=$n,_u=Ud=null,R5(p),cm=null,ex=0,p=$n;for(;p!==null;)qH(p.alternate,p),p=p.return;$n=null}}function bm(p,A){var k=p.timeoutHandle;k!==-1&&(p.timeoutHandle=-1,MSe(k)),k=p.cancelPendingCommit,k!==null&&(p.cancelPendingCommit=null,k()),zu=0,bT(),Vr=p,$n=k=Du(p.current,null),zn=A,kr=0,Ao=null,bh=!1,gm=nt(p,A),dT=!1,ym=So=pT=np=vh=Ti=0,Za=gx=null,mT=!1,(A&8)!==0&&(A|=A&32);var D=p.entangledLanes;if(D!==0)for(p=p.entanglements,D&=A;0<D;){var B=31-ut(D),G=1<<B;A|=p[B],D&=~G}return Zu=A,gw(),k}function AQ(p,A){Cn=null,Y.H=lx,A===lm||A===Ow?(A=LV(),kr=3):A===w5?(A=LV(),kr=4):kr=A===q5?8:A!==null&&typeof A=="object"&&typeof A.then=="function"?6:1,Ao=A,$n===null&&(Ti=1,Fw(p,il(A,p.current)))}function SQ(){var p=bo.current;return p===null?!0:(zn&4194048)===zn?ll===null:(zn&62914560)===zn||(zn&536870912)!==0?p===ll:!1}function wQ(){var p=Y.H;return Y.H=lx,p===null?lx:p}function OQ(){var p=Y.A;return Y.A=lSe,p}function Yw(){Ti=4,bh||(zn&4194048)!==zn&&bo.current!==null||(gm=!0),(vh&134217727)===0&&(np&134217727)===0||Vr===null||wh(Vr,zn,So,!1)}function vT(p,A,k){var D=dr;dr|=2;var B=wQ(),G=OQ();(Vr!==p||zn!==A)&&(Xw=null,bm(p,A)),A=!1;var se=Ti;e:do try{if(kr!==0&&$n!==null){var de=$n,Ee=Ao;switch(kr){case 8:bT(),se=6;break e;case 3:case 2:case 9:case 6:bo.current===null&&(A=!0);var Le=kr;if(kr=0,Ao=null,vm(p,de,Ee,Le),k&&gm){se=0;break e}break;default:Le=kr,kr=0,Ao=null,vm(p,de,Ee,Le)}}fSe(),se=Ti;break}catch(Ge){AQ(p,Ge)}while(!0);return A&&p.shellSuspendCounter++,_u=Ud=null,dr=D,Y.H=B,Y.A=G,$n===null&&(Vr=null,zn=0,gw()),se}function fSe(){for(;$n!==null;)kQ($n)}function hSe(p,A){var k=dr;dr|=2;var D=wQ(),B=OQ();Vr!==p||zn!==A?(Xw=null,Uw=ze()+500,bm(p,A)):gm=nt(p,A);e:do try{if(kr!==0&&$n!==null){A=$n;var G=Ao;t:switch(kr){case 1:kr=0,Ao=null,vm(p,A,G,1);break;case 2:case 9:if(RV(G)){kr=0,Ao=null,CQ(A);break}A=function(){kr!==2&&kr!==9||Vr!==p||(kr=7),Lc(p)},G.then(A,A);break e;case 3:kr=7;break e;case 4:kr=5;break e;case 7:RV(G)?(kr=0,Ao=null,CQ(A)):(kr=0,Ao=null,vm(p,A,G,7));break;case 5:var se=null;switch($n.tag){case 26:se=$n.memoizedState;case 5:case 27:var de=$n;if(se?fZ(se):de.stateNode.complete){kr=0,Ao=null;var Ee=de.sibling;if(Ee!==null)$n=Ee;else{var Le=de.return;Le!==null?($n=Le,qw(Le)):$n=null}break t}}kr=0,Ao=null,vm(p,A,G,5);break;case 6:kr=0,Ao=null,vm(p,A,G,6);break;case 8:bT(),Ti=6;break e;default:throw Error(r(462))}}dSe();break}catch(Ge){AQ(p,Ge)}while(!0);return _u=Ud=null,Y.H=D,Y.A=B,dr=k,$n!==null?0:(Vr=null,zn=0,gw(),Ti)}function dSe(){for(;$n!==null&&!Ve();)kQ($n)}function kQ(p){var A=WH(p.alternate,p,Zu);p.memoizedProps=p.pendingProps,A===null?qw(p):$n=A}function CQ(p){var A=p,k=A.alternate;switch(A.tag){case 15:case 0:A=QH(k,A,A.pendingProps,A.type,void 0,zn);break;case 11:A=QH(k,A,A.pendingProps,A.type.render,A.ref,zn);break;case 5:R5(A);default:qH(k,A),A=$n=OV(A,Zu),A=WH(k,A,Zu)}p.memoizedProps=p.pendingProps,A===null?qw(p):$n=A}function vm(p,A,k,D){_u=Ud=null,R5(A),cm=null,ex=0;var B=A.return;try{if(tSe(p,B,A,k,zn)){Ti=1,Fw(p,il(k,p.current)),$n=null;return}}catch(G){if(B!==null)throw $n=B,G;Ti=1,Fw(p,il(k,p.current)),$n=null;return}A.flags&32768?(qn||D===1?p=!0:gm||(zn&536870912)!==0?p=!1:(bh=p=!0,(D===2||D===9||D===3||D===6)&&(D=bo.current,D!==null&&D.tag===13&&(D.flags|=16384))),EQ(A,p)):qw(A)}function qw(p){var A=p;do{if((A.flags&32768)!==0){EQ(A,bh);return}p=A.return;var k=iSe(A.alternate,A,Zu);if(k!==null){$n=k;return}if(A=A.sibling,A!==null){$n=A;return}$n=A=p}while(A!==null);Ti===0&&(Ti=5)}function EQ(p,A){do{var k=sSe(p.alternate,p);if(k!==null){k.flags&=32767,$n=k;return}if(k=p.return,k!==null&&(k.flags|=32768,k.subtreeFlags=0,k.deletions=null),!A&&(p=p.sibling,p!==null)){$n=p;return}$n=p=k}while(p!==null);Ti=6,$n=null}function TQ(p,A,k,D,B,G,se,de,Ee){p.cancelPendingCommit=null;do Kw();while(us!==0);if((dr&6)!==0)throw Error(r(327));if(A!==null){if(A===p.current)throw Error(r(177));if(G=A.lanes|A.childLanes,G|=l5,hr(p,k,G,se,de,Ee),p===Vr&&($n=Vr=null,zn=0),xm=A,Sh=p,zu=k,gT=G,yT=B,yQ=D,(A.subtreeFlags&10256)!==0||(A.flags&10256)!==0?(p.callbackNode=null,p.callbackPriority=0,ySe(St,function(){return IQ(),null})):(p.callbackNode=null,p.callbackPriority=0),D=(A.flags&13878)!==0,(A.subtreeFlags&13878)!==0||D){D=Y.T,Y.T=null,B=J.p,J.p=2,se=dr,dr|=4;try{aSe(p,A,k)}finally{dr=se,J.p=B,Y.T=D}}us=1,PQ(),MQ(),NQ()}}function PQ(){if(us===1){us=0;var p=Sh,A=xm,k=(A.flags&13878)!==0;if((A.subtreeFlags&13878)!==0||k){k=Y.T,Y.T=null;var D=J.p;J.p=2;var B=dr;dr|=4;try{cQ(A,p);var G=DT,se=Xy(p.containerInfo),de=G.focusedElem,Ee=G.selectionRange;if(se!==de&&de&&de.ownerDocument&&Uy(de.ownerDocument.documentElement,de)){if(Ee!==null&&K0(de)){var Le=Ee.start,Ge=Ee.end;if(Ge===void 0&&(Ge=Le),"selectionStart"in de)de.selectionStart=Le,de.selectionEnd=Math.min(Ge,de.value.length);else{var Xe=de.ownerDocument||document,Fe=Xe&&Xe.defaultView||window;if(Fe.getSelection){var He=Fe.getSelection(),Ft=de.textContent.length,sn=Math.min(Ee.start,Ft),Nr=Ee.end===void 0?sn:Math.min(Ee.end,Ft);!He.extend&&sn>Nr&&(se=Nr,Nr=sn,sn=se);var Ie=Gy(de,sn),Te=Gy(de,Nr);if(Ie&&Te&&(He.rangeCount!==1||He.anchorNode!==Ie.node||He.anchorOffset!==Ie.offset||He.focusNode!==Te.node||He.focusOffset!==Te.offset)){var je=Xe.createRange();je.setStart(Ie.node,Ie.offset),He.removeAllRanges(),sn>Nr?(He.addRange(je),He.extend(Te.node,Te.offset)):(je.setEnd(Te.node,Te.offset),He.addRange(je))}}}}for(Xe=[],He=de;He=He.parentNode;)He.nodeType===1&&Xe.push({element:He,left:He.scrollLeft,top:He.scrollTop});for(typeof de.focus=="function"&&de.focus(),de=0;de<Xe.length;de++){var Ue=Xe[de];Ue.element.scrollLeft=Ue.left,Ue.element.scrollTop=Ue.top}}u8=!!NT,DT=NT=null}finally{dr=B,J.p=D,Y.T=k}}p.current=A,us=2}}function MQ(){if(us===2){us=0;var p=Sh,A=xm,k=(A.flags&8772)!==0;if((A.subtreeFlags&8772)!==0||k){k=Y.T,Y.T=null;var D=J.p;J.p=2;var B=dr;dr|=4;try{iQ(p,A.alternate,A)}finally{dr=B,J.p=D,Y.T=k}}us=3}}function NQ(){if(us===4||us===3){us=0,Ke();var p=Sh,A=xm,k=zu,D=yQ;(A.subtreeFlags&10256)!==0||(A.flags&10256)!==0?us=5:(us=0,xm=Sh=null,DQ(p,p.pendingLanes));var B=p.pendingLanes;if(B===0&&(Ah=null),un(k),A=A.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot(Dt,A,void 0,(A.current.flags&128)===128)}catch{}if(D!==null){A=Y.T,B=J.p,J.p=2,Y.T=null;try{for(var G=p.onRecoverableError,se=0;se<D.length;se++){var de=D[se];G(de.value,{componentStack:de.stack})}}finally{Y.T=A,J.p=B}}(zu&3)!==0&&Kw(),Lc(p),B=p.pendingLanes,(k&261930)!==0&&(B&42)!==0?p===xT?yx++:(yx=0,xT=p):yx=0,xx(0)}}function DQ(p,A){(p.pooledCacheLanes&=A)===0&&(A=p.pooledCache,A!=null&&(p.pooledCache=null,Ky(A)))}function Kw(){return PQ(),MQ(),NQ(),IQ()}function IQ(){if(us!==5)return!1;var p=Sh,A=gT;gT=0;var k=un(zu),D=Y.T,B=J.p;try{J.p=32>k?32:k,Y.T=null,k=yT,yT=null;var G=Sh,se=zu;if(us=0,xm=Sh=null,zu=0,(dr&6)!==0)throw Error(r(331));var de=dr;if(dr|=4,pQ(G.current),fQ(G,G.current,se,k),dr=de,xx(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(Dt,G)}catch{}return!0}finally{J.p=B,Y.T=D,DQ(p,A)}}function _Q(p,A,k){A=il(k,A),A=Y5(p.stateNode,A,2),p=mh(p,A,2),p!==null&&(qt(p,2),Lc(p))}function Cr(p,A,k){if(p.tag===3)_Q(p,p,k);else for(;A!==null;){if(A.tag===3){_Q(A,p,k);break}else if(A.tag===1){var D=A.stateNode;if(typeof A.type.getDerivedStateFromError=="function"||typeof D.componentDidCatch=="function"&&(Ah===null||!Ah.has(D))){p=il(k,p),k=RH(2),D=mh(A,k,2),D!==null&&(jH(k,D,A,p),qt(D,2),Lc(D));break}}A=A.return}}function AT(p,A,k){var D=p.pingCache;if(D===null){D=p.pingCache=new cSe;var B=new Set;D.set(A,B)}else B=D.get(A),B===void 0&&(B=new Set,D.set(A,B));B.has(k)||(dT=!0,B.add(k),p=pSe.bind(null,p,A,k),A.then(p,p))}function pSe(p,A,k){var D=p.pingCache;D!==null&&D.delete(A),p.pingedLanes|=p.suspendedLanes&k,p.warmLanes&=~k,Vr===p&&(zn&k)===k&&(Ti===4||Ti===3&&(zn&62914560)===zn&&300>ze()-Gw?(dr&2)===0&&bm(p,0):pT|=k,ym===zn&&(ym=0)),Lc(p)}function RQ(p,A){A===0&&(A=mn()),p=Zd(p,A),p!==null&&(qt(p,A),Lc(p))}function mSe(p){var A=p.memoizedState,k=0;A!==null&&(k=A.retryLane),RQ(p,k)}function gSe(p,A){var k=0;switch(p.tag){case 31:case 13:var D=p.stateNode,B=p.memoizedState;B!==null&&(k=B.retryLane);break;case 19:D=p.stateNode;break;case 22:D=p.stateNode._retryCache;break;default:throw Error(r(314))}D!==null&&D.delete(A),RQ(p,k)}function ySe(p,A){return ke(p,A)}var Jw=null,Am=null,ST=!1,e8=!1,wT=!1,Oh=0;function Lc(p){p!==Am&&p.next===null&&(Am===null?Jw=Am=p:Am=Am.next=p),e8=!0,ST||(ST=!0,bSe())}function xx(p,A){if(!wT&&e8){wT=!0;do for(var k=!1,D=Jw;D!==null;){if(p!==0){var B=D.pendingLanes;if(B===0)var G=0;else{var se=D.suspendedLanes,de=D.pingedLanes;G=(1<<31-ut(42|p)+1)-1,G&=B&~(se&~de),G=G&201326741?G&201326741|1:G?G|2:0}G!==0&&(k=!0,$Q(D,G))}else G=zn,G=Ze(D,D===Vr?G:0,D.cancelPendingCommit!==null||D.timeoutHandle!==-1),(G&3)===0||nt(D,G)||(k=!0,$Q(D,G));D=D.next}while(k);wT=!1}}function xSe(){jQ()}function jQ(){e8=ST=!1;var p=0;Oh!==0&&PSe()&&(p=Oh);for(var A=ze(),k=null,D=Jw;D!==null;){var B=D.next,G=LQ(D,A);G===0?(D.next=null,k===null?Jw=B:k.next=B,B===null&&(Am=k)):(k=D,(p!==0||(G&3)!==0)&&(e8=!0)),D=B}us!==0&&us!==5||xx(p),Oh!==0&&(Oh=0)}function LQ(p,A){for(var k=p.suspendedLanes,D=p.pingedLanes,B=p.expirationTimes,G=p.pendingLanes&-62914561;0<G;){var se=31-ut(G),de=1<<se,Ee=B[se];Ee===-1?((de&k)===0||(de&D)!==0)&&(B[se]=Wt(de,A)):Ee<=A&&(p.expiredLanes|=de),G&=~de}if(A=Vr,k=zn,k=Ze(p,p===A?k:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),D=p.callbackNode,k===0||p===A&&(kr===2||kr===9)||p.cancelPendingCommit!==null)return D!==null&&D!==null&&Pe(D),p.callbackNode=null,p.callbackPriority=0;if((k&3)===0||nt(p,k)){if(A=k&-k,A===p.callbackPriority)return A;switch(D!==null&&Pe(D),un(k)){case 2:case 8:k=st;break;case 32:k=St;break;case 268435456:k=qe;break;default:k=St}return D=FQ.bind(null,p),k=ke(k,D),p.callbackPriority=A,p.callbackNode=k,A}return D!==null&&D!==null&&Pe(D),p.callbackPriority=2,p.callbackNode=null,2}function FQ(p,A){if(us!==0&&us!==5)return p.callbackNode=null,p.callbackPriority=0,null;var k=p.callbackNode;if(Kw()&&p.callbackNode!==k)return null;var D=zn;return D=Ze(p,p===Vr?D:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),D===0?null:(bQ(p,D,A),LQ(p,ze()),p.callbackNode!=null&&p.callbackNode===k?FQ.bind(null,p):null)}function $Q(p,A){if(Kw())return null;bQ(p,A,!0)}function bSe(){NSe(function(){(dr&6)!==0?ke(pt,xSe):jQ()})}function OT(){if(Oh===0){var p=am;p===0&&(p=rn,rn<<=1,(rn&261888)===0&&(rn=256)),Oh=p}return Oh}function BQ(p){return p==null||typeof p=="symbol"||typeof p=="boolean"?null:typeof p=="function"?p:$r(""+p)}function VQ(p,A){var k=A.ownerDocument.createElement("input");return k.name=A.name,k.value=A.value,p.id&&k.setAttribute("form",p.id),A.parentNode.insertBefore(k,A),p=new FormData(p),k.parentNode.removeChild(k),p}function vSe(p,A,k,D,B){if(A==="submit"&&k&&k.stateNode===B){var G=BQ((B[yn]||null).action),se=D.submitter;se&&(A=(A=se[yn]||null)?BQ(A.formAction):se.getAttribute("formAction"),A!==null&&(G=A,se=null));var de=new $d("action","action",null,D,B);p.push({event:de,listeners:[{instance:null,listener:function(){if(D.defaultPrevented){if(Oh!==0){var Ee=se?VQ(B,se):new FormData(B);Z5(k,{pending:!0,data:Ee,method:B.method,action:G},null,Ee)}}else typeof G=="function"&&(de.preventDefault(),Ee=se?VQ(B,se):new FormData(B),Z5(k,{pending:!0,data:Ee,method:B.method,action:G},G,Ee))},currentTarget:B}]})}}for(var kT=0;kT<o5.length;kT++){var CT=o5[kT],ASe=CT.toLowerCase(),SSe=CT[0].toUpperCase()+CT.slice(1);Gl(ASe,"on"+SSe)}Gl(xV,"onAnimationEnd"),Gl(bV,"onAnimationIteration"),Gl(vV,"onAnimationStart"),Gl("dblclick","onDoubleClick"),Gl("focusin","onFocus"),Gl("focusout","onBlur"),Gl(FAe,"onTransitionRun"),Gl($Ae,"onTransitionStart"),Gl(BAe,"onTransitionCancel"),Gl(AV,"onTransitionEnd"),bt("onMouseEnter",["mouseout","mouseover"]),bt("onMouseLeave",["mouseout","mouseover"]),bt("onPointerEnter",["pointerout","pointerover"]),bt("onPointerLeave",["pointerout","pointerover"]),Lt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Lt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Lt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Lt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Lt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Lt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bx="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(" "),wSe=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bx));function HQ(p,A){A=(A&4)!==0;for(var k=0;k<p.length;k++){var D=p[k],B=D.event;D=D.listeners;e:{var G=void 0;if(A)for(var se=D.length-1;0<=se;se--){var de=D[se],Ee=de.instance,Le=de.currentTarget;if(de=de.listener,Ee!==G&&B.isPropagationStopped())break e;G=de,B.currentTarget=Le;try{G(B)}catch(Ge){mw(Ge)}B.currentTarget=null,G=Ee}else for(se=0;se<D.length;se++){if(de=D[se],Ee=de.instance,Le=de.currentTarget,de=de.listener,Ee!==G&&B.isPropagationStopped())break e;G=de,B.currentTarget=Le;try{G(B)}catch(Ge){mw(Ge)}B.currentTarget=null,G=Ee}}}}function Bn(p,A){var k=A[dn];k===void 0&&(k=A[dn]=new Set);var D=p+"__bubble";k.has(D)||(QQ(A,p,2,!1),k.add(D))}function ET(p,A,k){var D=0;A&&(D|=4),QQ(k,p,D,A)}var t8="_reactListening"+Math.random().toString(36).slice(2);function TT(p){if(!p[t8]){p[t8]=!0,Vt.forEach(function(k){k!=="selectionchange"&&(wSe.has(k)||ET(k,!1,p),ET(k,!0,p))});var A=p.nodeType===9?p:p.ownerDocument;A===null||A[t8]||(A[t8]=!0,ET("selectionchange",!1,A))}}function QQ(p,A,k,D){switch(xZ(A)){case 2:var B=qSe;break;case 8:B=KSe;break;default:B=QT}k=B.bind(null,A,k,p),B=void 0,!Pu||A!=="touchstart"&&A!=="touchmove"&&A!=="wheel"||(B=!0),D?B!==void 0?p.addEventListener(A,k,{capture:!0,passive:B}):p.addEventListener(A,k,!0):B!==void 0?p.addEventListener(A,k,{passive:B}):p.addEventListener(A,k,!1)}function PT(p,A,k,D,B){var G=D;if((A&1)===0&&(A&2)===0&&D!==null)e:for(;;){if(D===null)return;var se=D.tag;if(se===3||se===4){var de=D.stateNode.containerInfo;if(de===B)break;if(se===4)for(se=D.return;se!==null;){var Ee=se.tag;if((Ee===3||Ee===4)&&se.stateNode.containerInfo===B)return;se=se.return}for(;de!==null;){if(se=Mn(de),se===null)return;if(Ee=se.tag,Ee===5||Ee===6||Ee===26||Ee===27){D=G=se;continue e}de=de.parentNode}}D=D.return}Zl(function(){var Le=G,Ge=Eu(k),Xe=[];e:{var Fe=SV.get(p);if(Fe!==void 0){var He=$d,Ft=p;switch(p){case"keypress":if(z0(k)===0)break e;case"keydown":case"keyup":He=re;break;case"focusin":Ft="focus",He=jy;break;case"focusout":Ft="blur",He=jy;break;case"beforeblur":case"afterblur":He=jy;break;case"click":if(k.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":He=_y;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=Y3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=R;break;case xV:case bV:case vV:He=Ly;break;case AV:He=ae;break;case"scroll":case"scrollend":He=X3;break;case"wheel":He=ge;break;case"copy":case"cut":case"paste":He=J3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=S;break;case"toggle":case"beforetoggle":He=Ce}var sn=(A&4)!==0,Nr=!sn&&(p==="scroll"||p==="scrollend"),Ie=sn?Fe!==null?Fe+"Capture":null:Fe;sn=[];for(var Te=Le,je;Te!==null;){var Ue=Te;if(je=Ue.stateNode,Ue=Ue.tag,Ue!==5&&Ue!==26&&Ue!==27||je===null||Ie===null||(Ue=zl(Te,Ie),Ue!=null&&sn.push(vx(Te,Ue,je))),Nr)break;Te=Te.return}0<sn.length&&(Fe=new He(Fe,Ft,null,k,Ge),Xe.push({event:Fe,listeners:sn}))}}if((A&7)===0){e:{if(Fe=p==="mouseover"||p==="pointerover",He=p==="mouseout"||p==="pointerout",Fe&&k!==Nc&&(Ft=k.relatedTarget||k.fromElement)&&(Mn(Ft)||Ft[kn]))break e;if((He||Fe)&&(Fe=Ge.window===Ge?Ge:(Fe=Ge.ownerDocument)?Fe.defaultView||Fe.parentWindow:window,He?(Ft=k.relatedTarget||k.toElement,He=Le,Ft=Ft?Mn(Ft):null,Ft!==null&&(Nr=s(Ft),sn=Ft.tag,Ft!==Nr||sn!==5&&sn!==27&&sn!==6)&&(Ft=null)):(He=null,Ft=Le),He!==Ft)){if(sn=_y,Ue="onMouseLeave",Ie="onMouseEnter",Te="mouse",(p==="pointerout"||p==="pointerover")&&(sn=S,Ue="onPointerLeave",Ie="onPointerEnter",Te="pointer"),Nr=He==null?Fe:On(He),je=Ft==null?Fe:On(Ft),Fe=new sn(Ue,Te+"leave",He,k,Ge),Fe.target=Nr,Fe.relatedTarget=je,Ue=null,Mn(Ge)===Le&&(sn=new sn(Ie,Te+"enter",Ft,k,Ge),sn.target=je,sn.relatedTarget=Nr,Ue=sn),Nr=Ue,He&&Ft)t:{for(sn=OSe,Ie=He,Te=Ft,je=0,Ue=Ie;Ue;Ue=sn(Ue))je++;Ue=0;for(var Kt=Te;Kt;Kt=sn(Kt))Ue++;for(;0<je-Ue;)Ie=sn(Ie),je--;for(;0<Ue-je;)Te=sn(Te),Ue--;for(;je--;){if(Ie===Te||Te!==null&&Ie===Te.alternate){sn=Ie;break t}Ie=sn(Ie),Te=sn(Te)}sn=null}else sn=null;He!==null&&ZQ(Xe,Fe,He,sn,!1),Ft!==null&&Nr!==null&&ZQ(Xe,Nr,Ft,sn,!0)}}e:{if(Fe=Le?On(Le):window,He=Fe.nodeName&&Fe.nodeName.toLowerCase(),He==="select"||He==="input"&&Fe.type==="file")var lr=By;else if(Fy(Fe))if(Vy)lr=hw;else{lr=uw;var Qt=cw}else He=Fe.nodeName,!He||He.toLowerCase()!=="input"||Fe.type!=="checkbox"&&Fe.type!=="radio"?Le&&bi(Le.elementType)&&(lr=By):lr=fw;if(lr&&(lr=lr(p,Le))){$y(Xe,lr,k,Ge);break e}Qt&&Qt(p,Fe,Le),p==="focusout"&&Le&&Fe.type==="number"&&Le.memoizedProps.value!=null&&xe(Fe,"number",Fe.value)}switch(Qt=Le?On(Le):window,p){case"focusin":(Fy(Qt)||Qt.contentEditable==="true")&&(Nu=Qt,i5=Le,Wy=null);break;case"focusout":Wy=i5=Nu=null;break;case"mousedown":s5=!0;break;case"contextmenu":case"mouseup":case"dragend":s5=!1,gV(Xe,k,Ge);break;case"selectionchange":if(pw)break;case"keydown":case"keyup":gV(Xe,k,Ge)}var Tn;if(Je)e:{switch(p){case"compositionstart":var Gn="onCompositionStart";break e;case"compositionend":Gn="onCompositionEnd";break e;case"compositionupdate":Gn="onCompositionUpdate";break e}Gn=void 0}else wa?gr(p,k)&&(Gn="onCompositionEnd"):p==="keydown"&&k.keyCode===229&&(Gn="onCompositionStart");Gn&&(Fn&&k.locale!=="ko"&&(wa||Gn!=="onCompositionStart"?Gn==="onCompositionEnd"&&wa&&(Tn=rh()):(ot=Ge,Mt="value"in ot?ot.value:ot.textContent,wa=!0)),Qt=n8(Le,Gn),0<Qt.length&&(Gn=new iw(Gn,p,null,k,Ge),Xe.push({event:Gn,listeners:Qt}),Tn?Gn.data=Tn:(Tn=Ic(k),Tn!==null&&(Gn.data=Tn)))),(Tn=Nt?sw(p,k):aw(p,k))&&(Gn=n8(Le,"onBeforeInput"),0<Gn.length&&(Qt=new iw("onBeforeInput","beforeinput",null,k,Ge),Xe.push({event:Qt,listeners:Gn}),Qt.data=Tn)),vSe(Xe,p,Le,k,Ge)}HQ(Xe,A)})}function vx(p,A,k){return{instance:p,listener:A,currentTarget:k}}function n8(p,A){for(var k=A+"Capture",D=[];p!==null;){var B=p,G=B.stateNode;if(B=B.tag,B!==5&&B!==26&&B!==27||G===null||(B=zl(p,k),B!=null&&D.unshift(vx(p,B,G)),B=zl(p,A),B!=null&&D.push(vx(p,B,G))),p.tag===3)return D;p=p.return}return[]}function OSe(p){if(p===null)return null;do p=p.return;while(p&&p.tag!==5&&p.tag!==27);return p||null}function ZQ(p,A,k,D,B){for(var G=A._reactName,se=[];k!==null&&k!==D;){var de=k,Ee=de.alternate,Le=de.stateNode;if(de=de.tag,Ee!==null&&Ee===D)break;de!==5&&de!==26&&de!==27||Le===null||(Ee=Le,B?(Le=zl(k,G),Le!=null&&se.unshift(vx(k,Le,Ee))):B||(Le=zl(k,G),Le!=null&&se.push(vx(k,Le,Ee)))),k=k.return}se.length!==0&&p.push({event:A,listeners:se})}var kSe=/\r\n?/g,CSe=/\u0000|\uFFFD/g;function zQ(p){return(typeof p=="string"?p:""+p).replace(kSe,`
|
|
49
|
-
`).replace(CSe,"")}function GQ(p,A){return A=zQ(A),zQ(p)===A}function Mr(p,A,k,D,B,G){switch(k){case"children":typeof D=="string"?A==="body"||A==="textarea"&&D===""||Jt(p,D):(typeof D=="number"||typeof D=="bigint")&&A!=="body"&&Jt(p,""+D);break;case"className":yi(p,"class",D);break;case"tabIndex":yi(p,"tabindex",D);break;case"dir":case"role":case"viewBox":case"width":case"height":yi(p,k,D);break;case"style":ir(p,D,G);break;case"data":if(A!=="object"){yi(p,"data",D);break}case"src":case"href":if(D===""&&(A!=="a"||k!=="href")){p.removeAttribute(k);break}if(D==null||typeof D=="function"||typeof D=="symbol"||typeof D=="boolean"){p.removeAttribute(k);break}D=$r(""+D),p.setAttribute(k,D);break;case"action":case"formAction":if(typeof D=="function"){p.setAttribute(k,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof G=="function"&&(k==="formAction"?(A!=="input"&&Mr(p,A,"name",B.name,B,null),Mr(p,A,"formEncType",B.formEncType,B,null),Mr(p,A,"formMethod",B.formMethod,B,null),Mr(p,A,"formTarget",B.formTarget,B,null)):(Mr(p,A,"encType",B.encType,B,null),Mr(p,A,"method",B.method,B,null),Mr(p,A,"target",B.target,B,null)));if(D==null||typeof D=="symbol"||typeof D=="boolean"){p.removeAttribute(k);break}D=$r(""+D),p.setAttribute(k,D);break;case"onClick":D!=null&&(p.onclick=ys);break;case"onScroll":D!=null&&Bn("scroll",p);break;case"onScrollEnd":D!=null&&Bn("scrollend",p);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));p.innerHTML=k}}break;case"multiple":p.multiple=D&&typeof D!="function"&&typeof D!="symbol";break;case"muted":p.muted=D&&typeof D!="function"&&typeof D!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(D==null||typeof D=="function"||typeof D=="boolean"||typeof D=="symbol"){p.removeAttribute("xlink:href");break}k=$r(""+D),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",k);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":D!=null&&typeof D!="function"&&typeof D!="symbol"?p.setAttribute(k,""+D):p.removeAttribute(k);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":D&&typeof D!="function"&&typeof D!="symbol"?p.setAttribute(k,""):p.removeAttribute(k);break;case"capture":case"download":D===!0?p.setAttribute(k,""):D!==!1&&D!=null&&typeof D!="function"&&typeof D!="symbol"?p.setAttribute(k,D):p.removeAttribute(k);break;case"cols":case"rows":case"size":case"span":D!=null&&typeof D!="function"&&typeof D!="symbol"&&!isNaN(D)&&1<=D?p.setAttribute(k,D):p.removeAttribute(k);break;case"rowSpan":case"start":D==null||typeof D=="function"||typeof D=="symbol"||isNaN(D)?p.removeAttribute(k):p.setAttribute(k,D);break;case"popover":Bn("beforetoggle",p),Bn("toggle",p),Nn(p,"popover",D);break;case"xlinkActuate":Yn(p,"http://www.w3.org/1999/xlink","xlink:actuate",D);break;case"xlinkArcrole":Yn(p,"http://www.w3.org/1999/xlink","xlink:arcrole",D);break;case"xlinkRole":Yn(p,"http://www.w3.org/1999/xlink","xlink:role",D);break;case"xlinkShow":Yn(p,"http://www.w3.org/1999/xlink","xlink:show",D);break;case"xlinkTitle":Yn(p,"http://www.w3.org/1999/xlink","xlink:title",D);break;case"xlinkType":Yn(p,"http://www.w3.org/1999/xlink","xlink:type",D);break;case"xmlBase":Yn(p,"http://www.w3.org/XML/1998/namespace","xml:base",D);break;case"xmlLang":Yn(p,"http://www.w3.org/XML/1998/namespace","xml:lang",D);break;case"xmlSpace":Yn(p,"http://www.w3.org/XML/1998/namespace","xml:space",D);break;case"is":Nn(p,"is",D);break;case"innerText":case"textContent":break;default:(!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(k=ls.get(k)||k,Nn(p,k,D))}}function MT(p,A,k,D,B,G){switch(k){case"style":ir(p,D,G);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));p.innerHTML=k}}break;case"children":typeof D=="string"?Jt(p,D):(typeof D=="number"||typeof D=="bigint")&&Jt(p,""+D);break;case"onScroll":D!=null&&Bn("scroll",p);break;case"onScrollEnd":D!=null&&Bn("scrollend",p);break;case"onClick":D!=null&&(p.onclick=ys);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kt.hasOwnProperty(k))e:{if(k[0]==="o"&&k[1]==="n"&&(B=k.endsWith("Capture"),A=k.slice(2,B?k.length-7:void 0),G=p[yn]||null,G=G!=null?G[k]:null,typeof G=="function"&&p.removeEventListener(A,G,B),typeof D=="function")){typeof G!="function"&&G!==null&&(k in p?p[k]=null:p.hasAttribute(k)&&p.removeAttribute(k)),p.addEventListener(A,D,B);break e}k in p?p[k]=D:D===!0?p.setAttribute(k,""):Nn(p,k,D)}}}function js(p,A,k){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bn("error",p),Bn("load",p);var D=!1,B=!1,G;for(G in k)if(k.hasOwnProperty(G)){var se=k[G];if(se!=null)switch(G){case"src":D=!0;break;case"srcSet":B=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:Mr(p,A,G,se,k,null)}}B&&Mr(p,A,"srcSet",k.srcSet,k,null),D&&Mr(p,A,"src",k.src,k,null);return;case"input":Bn("invalid",p);var de=G=se=B=null,Ee=null,Le=null;for(D in k)if(k.hasOwnProperty(D)){var Ge=k[D];if(Ge!=null)switch(D){case"name":B=Ge;break;case"type":se=Ge;break;case"checked":Ee=Ge;break;case"defaultChecked":Le=Ge;break;case"value":G=Ge;break;case"defaultValue":de=Ge;break;case"children":case"dangerouslySetInnerHTML":if(Ge!=null)throw Error(r(137,A));break;default:Mr(p,A,D,Ge,k,null)}}ft(p,G,de,Ee,Le,se,B,!1);return;case"select":Bn("invalid",p),D=se=G=null;for(B in k)if(k.hasOwnProperty(B)&&(de=k[B],de!=null))switch(B){case"value":G=de;break;case"defaultValue":se=de;break;case"multiple":D=de;default:Mr(p,A,B,de,k,null)}A=G,k=se,p.multiple=!!D,A!=null?_e(p,!!D,A,!1):k!=null&&_e(p,!!D,k,!0);return;case"textarea":Bn("invalid",p),G=B=D=null;for(se in k)if(k.hasOwnProperty(se)&&(de=k[se],de!=null))switch(se){case"value":D=de;break;case"defaultValue":B=de;break;case"children":G=de;break;case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(91));break;default:Mr(p,A,se,de,k,null)}At(p,D,B,G);return;case"option":for(Ee in k)if(k.hasOwnProperty(Ee)&&(D=k[Ee],D!=null))switch(Ee){case"selected":p.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:Mr(p,A,Ee,D,k,null)}return;case"dialog":Bn("beforetoggle",p),Bn("toggle",p),Bn("cancel",p),Bn("close",p);break;case"iframe":case"object":Bn("load",p);break;case"video":case"audio":for(D=0;D<bx.length;D++)Bn(bx[D],p);break;case"image":Bn("error",p),Bn("load",p);break;case"details":Bn("toggle",p);break;case"embed":case"source":case"link":Bn("error",p),Bn("load",p);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Le in k)if(k.hasOwnProperty(Le)&&(D=k[Le],D!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:Mr(p,A,Le,D,k,null)}return;default:if(bi(A)){for(Ge in k)k.hasOwnProperty(Ge)&&(D=k[Ge],D!==void 0&&MT(p,A,Ge,D,k,void 0));return}}for(de in k)k.hasOwnProperty(de)&&(D=k[de],D!=null&&Mr(p,A,de,D,k,null))}function ESe(p,A,k,D){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var B=null,G=null,se=null,de=null,Ee=null,Le=null,Ge=null;for(He in k){var Xe=k[He];if(k.hasOwnProperty(He)&&Xe!=null)switch(He){case"checked":break;case"value":break;case"defaultValue":Ee=Xe;default:D.hasOwnProperty(He)||Mr(p,A,He,null,D,Xe)}}for(var Fe in D){var He=D[Fe];if(Xe=k[Fe],D.hasOwnProperty(Fe)&&(He!=null||Xe!=null))switch(Fe){case"type":G=He;break;case"name":B=He;break;case"checked":Le=He;break;case"defaultChecked":Ge=He;break;case"value":se=He;break;case"defaultValue":de=He;break;case"children":case"dangerouslySetInnerHTML":if(He!=null)throw Error(r(137,A));break;default:He!==Xe&&Mr(p,A,Fe,He,D,Xe)}}va(p,se,de,Ee,Le,Ge,G,B);return;case"select":He=se=de=Fe=null;for(G in k)if(Ee=k[G],k.hasOwnProperty(G)&&Ee!=null)switch(G){case"value":break;case"multiple":He=Ee;default:D.hasOwnProperty(G)||Mr(p,A,G,null,D,Ee)}for(B in D)if(G=D[B],Ee=k[B],D.hasOwnProperty(B)&&(G!=null||Ee!=null))switch(B){case"value":Fe=G;break;case"defaultValue":de=G;break;case"multiple":se=G;default:G!==Ee&&Mr(p,A,B,G,D,Ee)}A=de,k=se,D=He,Fe!=null?_e(p,!!k,Fe,!1):!!D!=!!k&&(A!=null?_e(p,!!k,A,!0):_e(p,!!k,k?[]:"",!1));return;case"textarea":He=Fe=null;for(de in k)if(B=k[de],k.hasOwnProperty(de)&&B!=null&&!D.hasOwnProperty(de))switch(de){case"value":break;case"children":break;default:Mr(p,A,de,null,D,B)}for(se in D)if(B=D[se],G=k[se],D.hasOwnProperty(se)&&(B!=null||G!=null))switch(se){case"value":Fe=B;break;case"defaultValue":He=B;break;case"children":break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:B!==G&&Mr(p,A,se,B,D,G)}at(p,Fe,He);return;case"option":for(var Ft in k)if(Fe=k[Ft],k.hasOwnProperty(Ft)&&Fe!=null&&!D.hasOwnProperty(Ft))switch(Ft){case"selected":p.selected=!1;break;default:Mr(p,A,Ft,null,D,Fe)}for(Ee in D)if(Fe=D[Ee],He=k[Ee],D.hasOwnProperty(Ee)&&Fe!==He&&(Fe!=null||He!=null))switch(Ee){case"selected":p.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:Mr(p,A,Ee,Fe,D,He)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var sn in k)Fe=k[sn],k.hasOwnProperty(sn)&&Fe!=null&&!D.hasOwnProperty(sn)&&Mr(p,A,sn,null,D,Fe);for(Le in D)if(Fe=D[Le],He=k[Le],D.hasOwnProperty(Le)&&Fe!==He&&(Fe!=null||He!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(r(137,A));break;default:Mr(p,A,Le,Fe,D,He)}return;default:if(bi(A)){for(var Nr in k)Fe=k[Nr],k.hasOwnProperty(Nr)&&Fe!==void 0&&!D.hasOwnProperty(Nr)&&MT(p,A,Nr,void 0,D,Fe);for(Ge in D)Fe=D[Ge],He=k[Ge],!D.hasOwnProperty(Ge)||Fe===He||Fe===void 0&&He===void 0||MT(p,A,Ge,Fe,D,He);return}}for(var Ie in k)Fe=k[Ie],k.hasOwnProperty(Ie)&&Fe!=null&&!D.hasOwnProperty(Ie)&&Mr(p,A,Ie,null,D,Fe);for(Xe in D)Fe=D[Xe],He=k[Xe],!D.hasOwnProperty(Xe)||Fe===He||Fe==null&&He==null||Mr(p,A,Xe,Fe,D,He)}function UQ(p){switch(p){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TSe(){if(typeof performance.getEntriesByType=="function"){for(var p=0,A=0,k=performance.getEntriesByType("resource"),D=0;D<k.length;D++){var B=k[D],G=B.transferSize,se=B.initiatorType,de=B.duration;if(G&&de&&UQ(se)){for(se=0,de=B.responseEnd,D+=1;D<k.length;D++){var Ee=k[D],Le=Ee.startTime;if(Le>de)break;var Ge=Ee.transferSize,Xe=Ee.initiatorType;Ge&&UQ(Xe)&&(Ee=Ee.responseEnd,se+=Ge*(Ee<de?1:(de-Le)/(Ee-Le)))}if(--D,A+=8*(G+se)/(B.duration/1e3),p++,10<p)break}}if(0<p)return A/p/1e6}return navigator.connection&&(p=navigator.connection.downlink,typeof p=="number")?p:5}var NT=null,DT=null;function r8(p){return p.nodeType===9?p:p.ownerDocument}function XQ(p){switch(p){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WQ(p,A){if(p===0)switch(A){case"svg":return 1;case"math":return 2;default:return 0}return p===1&&A==="foreignObject"?0:p}function IT(p,A){return p==="textarea"||p==="noscript"||typeof A.children=="string"||typeof A.children=="number"||typeof A.children=="bigint"||typeof A.dangerouslySetInnerHTML=="object"&&A.dangerouslySetInnerHTML!==null&&A.dangerouslySetInnerHTML.__html!=null}var _T=null;function PSe(){var p=window.event;return p&&p.type==="popstate"?p===_T?!1:(_T=p,!0):(_T=null,!1)}var YQ=typeof setTimeout=="function"?setTimeout:void 0,MSe=typeof clearTimeout=="function"?clearTimeout:void 0,qQ=typeof Promise=="function"?Promise:void 0,NSe=typeof queueMicrotask=="function"?queueMicrotask:typeof qQ<"u"?function(p){return qQ.resolve(null).then(p).catch(DSe)}:YQ;function DSe(p){setTimeout(function(){throw p})}function kh(p){return p==="head"}function KQ(p,A){var k=A,D=0;do{var B=k.nextSibling;if(p.removeChild(k),B&&B.nodeType===8)if(k=B.data,k==="/$"||k==="/&"){if(D===0){p.removeChild(B),km(A);return}D--}else if(k==="$"||k==="$?"||k==="$~"||k==="$!"||k==="&")D++;else if(k==="html")Ax(p.ownerDocument.documentElement);else if(k==="head"){k=p.ownerDocument.head,Ax(k);for(var G=k.firstChild;G;){var se=G.nextSibling,de=G.nodeName;G[xt]||de==="SCRIPT"||de==="STYLE"||de==="LINK"&&G.rel.toLowerCase()==="stylesheet"||k.removeChild(G),G=se}}else k==="body"&&Ax(p.ownerDocument.body);k=B}while(k);km(A)}function JQ(p,A){var k=p;p=0;do{var D=k.nextSibling;if(k.nodeType===1?A?(k._stashedDisplay=k.style.display,k.style.display="none"):(k.style.display=k._stashedDisplay||"",k.getAttribute("style")===""&&k.removeAttribute("style")):k.nodeType===3&&(A?(k._stashedText=k.nodeValue,k.nodeValue=""):k.nodeValue=k._stashedText||""),D&&D.nodeType===8)if(k=D.data,k==="/$"){if(p===0)break;p--}else k!=="$"&&k!=="$?"&&k!=="$~"&&k!=="$!"||p++;k=D}while(k)}function RT(p){var A=p.firstChild;for(A&&A.nodeType===10&&(A=A.nextSibling);A;){var k=A;switch(A=A.nextSibling,k.nodeName){case"HTML":case"HEAD":case"BODY":RT(k),Wn(k);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(k.rel.toLowerCase()==="stylesheet")continue}p.removeChild(k)}}function ISe(p,A,k,D){for(;p.nodeType===1;){var B=k;if(p.nodeName.toLowerCase()!==A.toLowerCase()){if(!D&&(p.nodeName!=="INPUT"||p.type!=="hidden"))break}else if(D){if(!p[xt])switch(A){case"meta":if(!p.hasAttribute("itemprop"))break;return p;case"link":if(G=p.getAttribute("rel"),G==="stylesheet"&&p.hasAttribute("data-precedence"))break;if(G!==B.rel||p.getAttribute("href")!==(B.href==null||B.href===""?null:B.href)||p.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin)||p.getAttribute("title")!==(B.title==null?null:B.title))break;return p;case"style":if(p.hasAttribute("data-precedence"))break;return p;case"script":if(G=p.getAttribute("src"),(G!==(B.src==null?null:B.src)||p.getAttribute("type")!==(B.type==null?null:B.type)||p.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin))&&G&&p.hasAttribute("async")&&!p.hasAttribute("itemprop"))break;return p;default:return p}}else if(A==="input"&&p.type==="hidden"){var G=B.name==null?null:""+B.name;if(B.type==="hidden"&&p.getAttribute("name")===G)return p}else return p;if(p=cl(p.nextSibling),p===null)break}return null}function _Se(p,A,k){if(A==="")return null;for(;p.nodeType!==3;)if((p.nodeType!==1||p.nodeName!=="INPUT"||p.type!=="hidden")&&!k||(p=cl(p.nextSibling),p===null))return null;return p}function eZ(p,A){for(;p.nodeType!==8;)if((p.nodeType!==1||p.nodeName!=="INPUT"||p.type!=="hidden")&&!A||(p=cl(p.nextSibling),p===null))return null;return p}function jT(p){return p.data==="$?"||p.data==="$~"}function LT(p){return p.data==="$!"||p.data==="$?"&&p.ownerDocument.readyState!=="loading"}function RSe(p,A){var k=p.ownerDocument;if(p.data==="$~")p._reactRetry=A;else if(p.data!=="$?"||k.readyState!=="loading")A();else{var D=function(){A(),k.removeEventListener("DOMContentLoaded",D)};k.addEventListener("DOMContentLoaded",D),p._reactRetry=D}}function cl(p){for(;p!=null;p=p.nextSibling){var A=p.nodeType;if(A===1||A===3)break;if(A===8){if(A=p.data,A==="$"||A==="$!"||A==="$?"||A==="$~"||A==="&"||A==="F!"||A==="F")break;if(A==="/$"||A==="/&")return null}}return p}var FT=null;function tZ(p){p=p.nextSibling;for(var A=0;p;){if(p.nodeType===8){var k=p.data;if(k==="/$"||k==="/&"){if(A===0)return cl(p.nextSibling);A--}else k!=="$"&&k!=="$!"&&k!=="$?"&&k!=="$~"&&k!=="&"||A++}p=p.nextSibling}return null}function nZ(p){p=p.previousSibling;for(var A=0;p;){if(p.nodeType===8){var k=p.data;if(k==="$"||k==="$!"||k==="$?"||k==="$~"||k==="&"){if(A===0)return p;A--}else k!=="/$"&&k!=="/&"||A++}p=p.previousSibling}return null}function rZ(p,A,k){switch(A=r8(k),p){case"html":if(p=A.documentElement,!p)throw Error(r(452));return p;case"head":if(p=A.head,!p)throw Error(r(453));return p;case"body":if(p=A.body,!p)throw Error(r(454));return p;default:throw Error(r(451))}}function Ax(p){for(var A=p.attributes;A.length;)p.removeAttributeNode(A[0]);Wn(p)}var ul=new Map,iZ=new Set;function i8(p){return typeof p.getRootNode=="function"?p.getRootNode():p.nodeType===9?p:p.ownerDocument}var Gu=J.d;J.d={f:jSe,r:LSe,D:FSe,C:$Se,L:BSe,m:VSe,X:QSe,S:HSe,M:ZSe};function jSe(){var p=Gu.f(),A=Ww();return p||A}function LSe(p){var A=Rn(p);A!==null&&A.tag===5&&A.type==="form"?AH(A):Gu.r(p)}var Sm=typeof document>"u"?null:document;function sZ(p,A,k){var D=Sm;if(D&&typeof A=="string"&&A){var B=Lr(A);B='link[rel="'+p+'"][href="'+B+'"]',typeof k=="string"&&(B+='[crossorigin="'+k+'"]'),iZ.has(B)||(iZ.add(B),p={rel:p,crossOrigin:k,href:A},D.querySelector(B)===null&&(A=D.createElement("link"),js(A,"link",p),Ot(A),D.head.appendChild(A)))}}function FSe(p){Gu.D(p),sZ("dns-prefetch",p,null)}function $Se(p,A){Gu.C(p,A),sZ("preconnect",p,A)}function BSe(p,A,k){Gu.L(p,A,k);var D=Sm;if(D&&p&&A){var B='link[rel="preload"][as="'+Lr(A)+'"]';A==="image"&&k&&k.imageSrcSet?(B+='[imagesrcset="'+Lr(k.imageSrcSet)+'"]',typeof k.imageSizes=="string"&&(B+='[imagesizes="'+Lr(k.imageSizes)+'"]')):B+='[href="'+Lr(p)+'"]';var G=B;switch(A){case"style":G=wm(p);break;case"script":G=Om(p)}ul.has(G)||(p=f({rel:"preload",href:A==="image"&&k&&k.imageSrcSet?void 0:p,as:A},k),ul.set(G,p),D.querySelector(B)!==null||A==="style"&&D.querySelector(Sx(G))||A==="script"&&D.querySelector(wx(G))||(A=D.createElement("link"),js(A,"link",p),Ot(A),D.head.appendChild(A)))}}function VSe(p,A){Gu.m(p,A);var k=Sm;if(k&&p){var D=A&&typeof A.as=="string"?A.as:"script",B='link[rel="modulepreload"][as="'+Lr(D)+'"][href="'+Lr(p)+'"]',G=B;switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":G=Om(p)}if(!ul.has(G)&&(p=f({rel:"modulepreload",href:p},A),ul.set(G,p),k.querySelector(B)===null)){switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(k.querySelector(wx(G)))return}D=k.createElement("link"),js(D,"link",p),Ot(D),k.head.appendChild(D)}}}function HSe(p,A,k){Gu.S(p,A,k);var D=Sm;if(D&&p){var B=rt(D).hoistableStyles,G=wm(p);A=A||"default";var se=B.get(G);if(!se){var de={loading:0,preload:null};if(se=D.querySelector(Sx(G)))de.loading=5;else{p=f({rel:"stylesheet",href:p,"data-precedence":A},k),(k=ul.get(G))&&$T(p,k);var Ee=se=D.createElement("link");Ot(Ee),js(Ee,"link",p),Ee._p=new Promise(function(Le,Ge){Ee.onload=Le,Ee.onerror=Ge}),Ee.addEventListener("load",function(){de.loading|=1}),Ee.addEventListener("error",function(){de.loading|=2}),de.loading|=4,s8(se,A,D)}se={type:"stylesheet",instance:se,count:1,state:de},B.set(G,se)}}}function QSe(p,A){Gu.X(p,A);var k=Sm;if(k&&p){var D=rt(k).hoistableScripts,B=Om(p),G=D.get(B);G||(G=k.querySelector(wx(B)),G||(p=f({src:p,async:!0},A),(A=ul.get(B))&&BT(p,A),G=k.createElement("script"),Ot(G),js(G,"link",p),k.head.appendChild(G)),G={type:"script",instance:G,count:1,state:null},D.set(B,G))}}function ZSe(p,A){Gu.M(p,A);var k=Sm;if(k&&p){var D=rt(k).hoistableScripts,B=Om(p),G=D.get(B);G||(G=k.querySelector(wx(B)),G||(p=f({src:p,async:!0,type:"module"},A),(A=ul.get(B))&&BT(p,A),G=k.createElement("script"),Ot(G),js(G,"link",p),k.head.appendChild(G)),G={type:"script",instance:G,count:1,state:null},D.set(B,G))}}function aZ(p,A,k,D){var B=(B=te.current)?i8(B):null;if(!B)throw Error(r(446));switch(p){case"meta":case"title":return null;case"style":return typeof k.precedence=="string"&&typeof k.href=="string"?(A=wm(k.href),k=rt(B).hoistableStyles,D=k.get(A),D||(D={type:"style",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};case"link":if(k.rel==="stylesheet"&&typeof k.href=="string"&&typeof k.precedence=="string"){p=wm(k.href);var G=rt(B).hoistableStyles,se=G.get(p);if(se||(B=B.ownerDocument||B,se={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},G.set(p,se),(G=B.querySelector(Sx(p)))&&!G._p&&(se.instance=G,se.state.loading=5),ul.has(p)||(k={rel:"preload",as:"style",href:k.href,crossOrigin:k.crossOrigin,integrity:k.integrity,media:k.media,hrefLang:k.hrefLang,referrerPolicy:k.referrerPolicy},ul.set(p,k),G||zSe(B,p,k,se.state))),A&&D===null)throw Error(r(528,""));return se}if(A&&D!==null)throw Error(r(529,""));return null;case"script":return A=k.async,k=k.src,typeof k=="string"&&A&&typeof A!="function"&&typeof A!="symbol"?(A=Om(k),k=rt(B).hoistableScripts,D=k.get(A),D||(D={type:"script",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,p))}}function wm(p){return'href="'+Lr(p)+'"'}function Sx(p){return'link[rel="stylesheet"]['+p+"]"}function oZ(p){return f({},p,{"data-precedence":p.precedence,precedence:null})}function zSe(p,A,k,D){p.querySelector('link[rel="preload"][as="style"]['+A+"]")?D.loading=1:(A=p.createElement("link"),D.preload=A,A.addEventListener("load",function(){return D.loading|=1}),A.addEventListener("error",function(){return D.loading|=2}),js(A,"link",k),Ot(A),p.head.appendChild(A))}function Om(p){return'[src="'+Lr(p)+'"]'}function wx(p){return"script[async]"+p}function lZ(p,A,k){if(A.count++,A.instance===null)switch(A.type){case"style":var D=p.querySelector('style[data-href~="'+Lr(k.href)+'"]');if(D)return A.instance=D,Ot(D),D;var B=f({},k,{"data-href":k.href,"data-precedence":k.precedence,href:null,precedence:null});return D=(p.ownerDocument||p).createElement("style"),Ot(D),js(D,"style",B),s8(D,k.precedence,p),A.instance=D;case"stylesheet":B=wm(k.href);var G=p.querySelector(Sx(B));if(G)return A.state.loading|=4,A.instance=G,Ot(G),G;D=oZ(k),(B=ul.get(B))&&$T(D,B),G=(p.ownerDocument||p).createElement("link"),Ot(G);var se=G;return se._p=new Promise(function(de,Ee){se.onload=de,se.onerror=Ee}),js(G,"link",D),A.state.loading|=4,s8(G,k.precedence,p),A.instance=G;case"script":return G=Om(k.src),(B=p.querySelector(wx(G)))?(A.instance=B,Ot(B),B):(D=k,(B=ul.get(G))&&(D=f({},k),BT(D,B)),p=p.ownerDocument||p,B=p.createElement("script"),Ot(B),js(B,"link",D),p.head.appendChild(B),A.instance=B);case"void":return null;default:throw Error(r(443,A.type))}else A.type==="stylesheet"&&(A.state.loading&4)===0&&(D=A.instance,A.state.loading|=4,s8(D,k.precedence,p));return A.instance}function s8(p,A,k){for(var D=k.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),B=D.length?D[D.length-1]:null,G=B,se=0;se<D.length;se++){var de=D[se];if(de.dataset.precedence===A)G=de;else if(G!==B)break}G?G.parentNode.insertBefore(p,G.nextSibling):(A=k.nodeType===9?k.head:k,A.insertBefore(p,A.firstChild))}function $T(p,A){p.crossOrigin==null&&(p.crossOrigin=A.crossOrigin),p.referrerPolicy==null&&(p.referrerPolicy=A.referrerPolicy),p.title==null&&(p.title=A.title)}function BT(p,A){p.crossOrigin==null&&(p.crossOrigin=A.crossOrigin),p.referrerPolicy==null&&(p.referrerPolicy=A.referrerPolicy),p.integrity==null&&(p.integrity=A.integrity)}var a8=null;function cZ(p,A,k){if(a8===null){var D=new Map,B=a8=new Map;B.set(k,D)}else B=a8,D=B.get(k),D||(D=new Map,B.set(k,D));if(D.has(p))return D;for(D.set(p,null),k=k.getElementsByTagName(p),B=0;B<k.length;B++){var G=k[B];if(!(G[xt]||G[ln]||p==="link"&&G.getAttribute("rel")==="stylesheet")&&G.namespaceURI!=="http://www.w3.org/2000/svg"){var se=G.getAttribute(A)||"";se=p+se;var de=D.get(se);de?de.push(G):D.set(se,[G])}}return D}function uZ(p,A,k){p=p.ownerDocument||p,p.head.insertBefore(k,A==="title"?p.querySelector("head > title"):null)}function GSe(p,A,k){if(k===1||A.itemProp!=null)return!1;switch(p){case"meta":case"title":return!0;case"style":if(typeof A.precedence!="string"||typeof A.href!="string"||A.href==="")break;return!0;case"link":if(typeof A.rel!="string"||typeof A.href!="string"||A.href===""||A.onLoad||A.onError)break;switch(A.rel){case"stylesheet":return p=A.disabled,typeof A.precedence=="string"&&p==null;default:return!0}case"script":if(A.async&&typeof A.async!="function"&&typeof A.async!="symbol"&&!A.onLoad&&!A.onError&&A.src&&typeof A.src=="string")return!0}return!1}function fZ(p){return!(p.type==="stylesheet"&&(p.state.loading&3)===0)}function USe(p,A,k,D){if(k.type==="stylesheet"&&(typeof D.media!="string"||matchMedia(D.media).matches!==!1)&&(k.state.loading&4)===0){if(k.instance===null){var B=wm(D.href),G=A.querySelector(Sx(B));if(G){A=G._p,A!==null&&typeof A=="object"&&typeof A.then=="function"&&(p.count++,p=o8.bind(p),A.then(p,p)),k.state.loading|=4,k.instance=G,Ot(G);return}G=A.ownerDocument||A,D=oZ(D),(B=ul.get(B))&&$T(D,B),G=G.createElement("link"),Ot(G);var se=G;se._p=new Promise(function(de,Ee){se.onload=de,se.onerror=Ee}),js(G,"link",D),k.instance=G}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(k,A),(A=k.state.preload)&&(k.state.loading&3)===0&&(p.count++,k=o8.bind(p),A.addEventListener("load",k),A.addEventListener("error",k))}}var VT=0;function XSe(p,A){return p.stylesheets&&p.count===0&&c8(p,p.stylesheets),0<p.count||0<p.imgCount?function(k){var D=setTimeout(function(){if(p.stylesheets&&c8(p,p.stylesheets),p.unsuspend){var G=p.unsuspend;p.unsuspend=null,G()}},6e4+A);0<p.imgBytes&&VT===0&&(VT=62500*TSe());var B=setTimeout(function(){if(p.waitingForImages=!1,p.count===0&&(p.stylesheets&&c8(p,p.stylesheets),p.unsuspend)){var G=p.unsuspend;p.unsuspend=null,G()}},(p.imgBytes>VT?50:800)+A);return p.unsuspend=k,function(){p.unsuspend=null,clearTimeout(D),clearTimeout(B)}}:null}function o8(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)c8(this,this.stylesheets);else if(this.unsuspend){var p=this.unsuspend;this.unsuspend=null,p()}}}var l8=null;function c8(p,A){p.stylesheets=null,p.unsuspend!==null&&(p.count++,l8=new Map,A.forEach(WSe,p),l8=null,o8.call(p))}function WSe(p,A){if(!(A.state.loading&4)){var k=l8.get(p);if(k)var D=k.get(null);else{k=new Map,l8.set(p,k);for(var B=p.querySelectorAll("link[data-precedence],style[data-precedence]"),G=0;G<B.length;G++){var se=B[G];(se.nodeName==="LINK"||se.getAttribute("media")!=="not all")&&(k.set(se.dataset.precedence,se),D=se)}D&&k.set(null,D)}B=A.instance,se=B.getAttribute("data-precedence"),G=k.get(se)||D,G===D&&k.set(null,B),k.set(se,B),this.count++,D=o8.bind(this),B.addEventListener("load",D),B.addEventListener("error",D),G?G.parentNode.insertBefore(B,G.nextSibling):(p=p.nodeType===9?p.head:p,p.insertBefore(B,p.firstChild)),A.state.loading|=4}}var Ox={$$typeof:O,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function YSe(p,A,k,D,B,G,se,de,Ee){this.tag=1,this.containerInfo=p,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pn(0),this.hiddenUpdates=Pn(null),this.identifierPrefix=D,this.onUncaughtError=B,this.onCaughtError=G,this.onRecoverableError=se,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ee,this.incompleteTransitions=new Map}function hZ(p,A,k,D,B,G,se,de,Ee,Le,Ge,Xe){return p=new YSe(p,A,k,se,Ee,Le,Ge,Xe,de),A=1,G===!0&&(A|=24),G=xo(3,null,null,A),p.current=G,G.stateNode=p,A=v5(),A.refCount++,p.pooledCache=A,A.refCount++,G.memoizedState={element:D,isDehydrated:k,cache:A},O5(G),p}function dZ(p){return p?(p=tm,p):tm}function pZ(p,A,k,D,B,G){B=dZ(B),D.context===null?D.context=B:D.pendingContext=B,D=ph(A),D.payload={element:k},G=G===void 0?null:G,G!==null&&(D.callback=G),k=mh(p,D,A),k!==null&&(za(k,p,A),nx(k,p,A))}function mZ(p,A){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var k=p.retryLane;p.retryLane=k!==0&&k<A?k:A}}function HT(p,A){mZ(p,A),(p=p.alternate)&&mZ(p,A)}function gZ(p){if(p.tag===13||p.tag===31){var A=Zd(p,67108864);A!==null&&za(A,p,67108864),HT(p,67108864)}}function yZ(p){if(p.tag===13||p.tag===31){var A=wo();A=Zn(A);var k=Zd(p,A);k!==null&&za(k,p,A),HT(p,A)}}var u8=!0;function qSe(p,A,k,D){var B=Y.T;Y.T=null;var G=J.p;try{J.p=2,QT(p,A,k,D)}finally{J.p=G,Y.T=B}}function KSe(p,A,k,D){var B=Y.T;Y.T=null;var G=J.p;try{J.p=8,QT(p,A,k,D)}finally{J.p=G,Y.T=B}}function QT(p,A,k,D){if(u8){var B=ZT(D);if(B===null)PT(p,A,D,f8,k),bZ(p,D);else if(ewe(B,p,A,k,D))D.stopPropagation();else if(bZ(p,D),A&4&&-1<JSe.indexOf(p)){for(;B!==null;){var G=Rn(B);if(G!==null)switch(G.tag){case 3:if(G=G.stateNode,G.current.memoizedState.isDehydrated){var se=Me(G.pendingLanes);if(se!==0){var de=G;for(de.pendingLanes|=2,de.entangledLanes|=2;se;){var Ee=1<<31-ut(se);de.entanglements[1]|=Ee,se&=~Ee}Lc(G),(dr&6)===0&&(Uw=ze()+500,xx(0))}}break;case 31:case 13:de=Zd(G,2),de!==null&&za(de,G,2),Ww(),HT(G,2)}if(G=ZT(D),G===null&&PT(p,A,D,f8,k),G===B)break;B=G}B!==null&&D.stopPropagation()}else PT(p,A,D,null,k)}}function ZT(p){return p=Eu(p),zT(p)}var f8=null;function zT(p){if(f8=null,p=Mn(p),p!==null){var A=s(p);if(A===null)p=null;else{var k=A.tag;if(k===13){if(p=a(A),p!==null)return p;p=null}else if(k===31){if(p=o(A),p!==null)return p;p=null}else if(k===3){if(A.stateNode.current.memoizedState.isDehydrated)return A.tag===3?A.stateNode.containerInfo:null;p=null}else A!==p&&(p=null)}}return f8=p,null}function xZ(p){switch(p){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ye()){case pt:return 2;case st:return 8;case St:case $e:return 32;case qe:return 268435456;default:return 32}default:return 32}}var GT=!1,Ch=null,Eh=null,Th=null,kx=new Map,Cx=new Map,Ph=[],JSe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function bZ(p,A){switch(p){case"focusin":case"focusout":Ch=null;break;case"dragenter":case"dragleave":Eh=null;break;case"mouseover":case"mouseout":Th=null;break;case"pointerover":case"pointerout":kx.delete(A.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cx.delete(A.pointerId)}}function Ex(p,A,k,D,B,G){return p===null||p.nativeEvent!==G?(p={blockedOn:A,domEventName:k,eventSystemFlags:D,nativeEvent:G,targetContainers:[B]},A!==null&&(A=Rn(A),A!==null&&gZ(A)),p):(p.eventSystemFlags|=D,A=p.targetContainers,B!==null&&A.indexOf(B)===-1&&A.push(B),p)}function ewe(p,A,k,D,B){switch(A){case"focusin":return Ch=Ex(Ch,p,A,k,D,B),!0;case"dragenter":return Eh=Ex(Eh,p,A,k,D,B),!0;case"mouseover":return Th=Ex(Th,p,A,k,D,B),!0;case"pointerover":var G=B.pointerId;return kx.set(G,Ex(kx.get(G)||null,p,A,k,D,B)),!0;case"gotpointercapture":return G=B.pointerId,Cx.set(G,Ex(Cx.get(G)||null,p,A,k,D,B)),!0}return!1}function vZ(p){var A=Mn(p.target);if(A!==null){var k=s(A);if(k!==null){if(A=k.tag,A===13){if(A=a(k),A!==null){p.blockedOn=A,$t(p.priority,function(){yZ(k)});return}}else if(A===31){if(A=o(k),A!==null){p.blockedOn=A,$t(p.priority,function(){yZ(k)});return}}else if(A===3&&k.stateNode.current.memoizedState.isDehydrated){p.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}p.blockedOn=null}function h8(p){if(p.blockedOn!==null)return!1;for(var A=p.targetContainers;0<A.length;){var k=ZT(p.nativeEvent);if(k===null){k=p.nativeEvent;var D=new k.constructor(k.type,k);Nc=D,k.target.dispatchEvent(D),Nc=null}else return A=Rn(k),A!==null&&gZ(A),p.blockedOn=k,!1;A.shift()}return!0}function AZ(p,A,k){h8(p)&&k.delete(A)}function twe(){GT=!1,Ch!==null&&h8(Ch)&&(Ch=null),Eh!==null&&h8(Eh)&&(Eh=null),Th!==null&&h8(Th)&&(Th=null),kx.forEach(AZ),Cx.forEach(AZ)}function d8(p,A){p.blockedOn===A&&(p.blockedOn=null,GT||(GT=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,twe)))}var p8=null;function SZ(p){p8!==p&&(p8=p,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){p8===p&&(p8=null);for(var A=0;A<p.length;A+=3){var k=p[A],D=p[A+1],B=p[A+2];if(typeof D!="function"){if(zT(D||k)===null)continue;break}var G=Rn(k);G!==null&&(p.splice(A,3),A-=3,Z5(G,{pending:!0,data:B,method:k.method,action:D},D,B))}}))}function km(p){function A(Ee){return d8(Ee,p)}Ch!==null&&d8(Ch,p),Eh!==null&&d8(Eh,p),Th!==null&&d8(Th,p),kx.forEach(A),Cx.forEach(A);for(var k=0;k<Ph.length;k++){var D=Ph[k];D.blockedOn===p&&(D.blockedOn=null)}for(;0<Ph.length&&(k=Ph[0],k.blockedOn===null);)vZ(k),k.blockedOn===null&&Ph.shift();if(k=(p.ownerDocument||p).$$reactFormReplay,k!=null)for(D=0;D<k.length;D+=3){var B=k[D],G=k[D+1],se=B[yn]||null;if(typeof G=="function")se||SZ(k);else if(se){var de=null;if(G&&G.hasAttribute("formAction")){if(B=G,se=G[yn]||null)de=se.formAction;else if(zT(B)!==null)continue}else de=se.action;typeof de=="function"?k[D+1]=de:(k.splice(D,3),D-=3),SZ(k)}}}function wZ(){function p(G){G.canIntercept&&G.info==="react-transition"&&G.intercept({handler:function(){return new Promise(function(se){return B=se})},focusReset:"manual",scroll:"manual"})}function A(){B!==null&&(B(),B=null),D||setTimeout(k,20)}function k(){if(!D&&!navigation.transition){var G=navigation.currentEntry;G&&G.url!=null&&navigation.navigate(G.url,{state:G.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var D=!1,B=null;return navigation.addEventListener("navigate",p),navigation.addEventListener("navigatesuccess",A),navigation.addEventListener("navigateerror",A),setTimeout(k,100),function(){D=!0,navigation.removeEventListener("navigate",p),navigation.removeEventListener("navigatesuccess",A),navigation.removeEventListener("navigateerror",A),B!==null&&(B(),B=null)}}}function UT(p){this._internalRoot=p}m8.prototype.render=UT.prototype.render=function(p){var A=this._internalRoot;if(A===null)throw Error(r(409));var k=A.current,D=wo();pZ(k,D,p,A,null,null)},m8.prototype.unmount=UT.prototype.unmount=function(){var p=this._internalRoot;if(p!==null){this._internalRoot=null;var A=p.containerInfo;pZ(p.current,2,null,p,null,null),Ww(),A[kn]=null}};function m8(p){this._internalRoot=p}m8.prototype.unstable_scheduleHydration=function(p){if(p){var A=yt();p={blockedOn:null,target:p,priority:A};for(var k=0;k<Ph.length&&A!==0&&A<Ph[k].priority;k++);Ph.splice(k,0,p),k===0&&vZ(p)}};var OZ=e.version;if(OZ!=="19.2.6")throw Error(r(527,OZ,"19.2.6"));J.findDOMNode=function(p){var A=p._reactInternals;if(A===void 0)throw typeof p.render=="function"?Error(r(188)):(p=Object.keys(p).join(","),Error(r(268,p)));return p=c(A),p=p!==null?u(p):null,p=p===null?null:p.stateNode,p};var nwe={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var g8=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!g8.isDisabled&&g8.supportsFiber)try{Dt=g8.inject(nwe),We=g8}catch{}}return Px.createRoot=function(p,A){if(!i(p))throw Error(r(299));var k=!1,D="",B=NH,G=DH,se=IH;return A!=null&&(A.unstable_strictMode===!0&&(k=!0),A.identifierPrefix!==void 0&&(D=A.identifierPrefix),A.onUncaughtError!==void 0&&(B=A.onUncaughtError),A.onCaughtError!==void 0&&(G=A.onCaughtError),A.onRecoverableError!==void 0&&(se=A.onRecoverableError)),A=hZ(p,1,!1,null,null,k,D,null,B,G,se,wZ),p[kn]=A.current,TT(p),new UT(A)},Px.hydrateRoot=function(p,A,k){if(!i(p))throw Error(r(299));var D=!1,B="",G=NH,se=DH,de=IH,Ee=null;return k!=null&&(k.unstable_strictMode===!0&&(D=!0),k.identifierPrefix!==void 0&&(B=k.identifierPrefix),k.onUncaughtError!==void 0&&(G=k.onUncaughtError),k.onCaughtError!==void 0&&(se=k.onCaughtError),k.onRecoverableError!==void 0&&(de=k.onRecoverableError),k.formState!==void 0&&(Ee=k.formState)),A=hZ(p,1,!0,A,k??null,D,B,Ee,G,se,de,wZ),A.context=dZ(null),k=A.current,D=wo(),D=Zn(D),B=ph(D),B.callback=null,mh(k,B,D),k=D,A.current.lanes=k,qt(A,k),Lc(A),p[kn]=A.current,TT(p),new m8(A)},Px.version="19.2.6",Px}var _Z;function dwe(){if(_Z)return YT.exports;_Z=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),YT.exports=hwe(),YT.exports}var pwe=dwe();function mf(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function FA(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function mR(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}const lre="hyperframes-studio:anonymousId",cre="hf-studio-anon-id";let rp=null;function mwe(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_DISTINCT_ID;return typeof t=="string"&&t.length>0?t:null}catch{return null}}function eP(t,e){for(const n of[lre,cre])try{t.setItem(n,e)}catch{}}function gR(){if(rp)return rp;const t=FA(),e=mwe();if(e)return rp=e,t&&eP(t,e),e;if(t){let r=null;try{r=t.getItem(lre)??t.getItem(cre)}catch{}if(r)return rp=r,eP(t,r),r}else return rp=mf(),rp;const n=mf();return rp=n,eP(t,n),n}const gwe="hyperframes-studio:telemetryDisabled",ure="hyperframes-studio:telemetryNoticeShown";function fre(){return gR()}function hre(t){var e;try{return((e=FA())==null?void 0:e.getItem(t))==="1"}catch{return!1}}function ywe(){return hre(gwe)}function xwe(){return hre(ure)}function bwe(){var t;try{(t=FA())==null||t.setItem(ure,"1")}catch{}}const dre="hyperframes-studio:sessionStartFired";function vwe(){var t;return((t=mR())==null?void 0:t.getItem(dre))==="1"}function Awe(){var t;try{(t=mR())==null||t.setItem(dre,"1")}catch{}}const Swe="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",wwe="hf-studio-telemetry-opt-out";function Owe(){try{return localStorage.getItem(wwe)==="1"}catch{return!1}}function kwe(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function Cwe(){return Swe.startsWith("phc_")}function Ewe(){try{return!1}catch{return!1}}function Twe(){try{return!1}catch{return!1}}function $A(){try{return Pwe()}catch{return!1}}function Pwe(){return Cwe()&&!Ewe()&&!Twe()&&!ywe()&&!Owe()&&!kwe()}let Cm;function Mwe(){if(Cm!==void 0)return Cm;if(typeof window>"u")return Cm=null,Cm;const t=window.__HF_CLI_AGENT_RUNTIME;return Cm=typeof t=="string"&&t.length>0?t:null,Cm}function pre(){return Mwe()??"none"}const Nwe={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1,studio_version:"dev",agent_runtime:"none"};let Em=null;function Dwe(){if(Em)return Em;if(typeof navigator>"u"||typeof window>"u")return Em=Nwe,Em;const t=navigator.userAgent,e=window.screen;return Em={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t),studio_version:"0.8.9",agent_runtime:pre()},Em}function Iwe(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e>>>0}function _we(t,e){return Iwe(`${t}:${e}`)%100}function Rwe(t){var i;if(t.override===!0)return{enabled:!0,reason:"forced_on"};if(t.override===!1)return{enabled:!1,reason:"forced_off"};const e=Math.max(0,Math.min(100,Math.trunc(t.percentage)));if(e<=0)return{enabled:!1,reason:"out_of_cohort"};if(e>=100)return{enabled:!0,reason:"in_cohort"};if(t.exclude)return{enabled:!1,reason:"excluded"};const n=(i=t.unitId)==null?void 0:i.trim();if(!n)return{enabled:!1,reason:"no_unit_id"};const r=_we(t.feature,n);return r<e?{enabled:!0,reason:"in_cohort",bucket:r}:{enabled:!1,reason:"out_of_cohort",bucket:r}}function RZ(t){const e=t==null?void 0:t.trim().toLowerCase();if(!(e===void 0||e==="")){if(e==="1"||e==="true"||e==="on"||e==="yes")return!0;if(e==="0"||e==="false"||e==="off"||e==="no")return!1}}const jwe="$feature/canary-";function Lwe(t){return`${jwe}${t}`}function Fwe(t){return`canary_reason_${t.replace(/[^A-Za-z0-9]+/g,"_")}`}function $we(t){const e={};for(const n of t)e[Lwe(n.name)]=n.enabled?"true":"false",n.reason!==void 0&&(e[Fwe(n.name)]=n.reason);return e}const mre=[{name:"calibration-10",percentage:10,description:"Inert. Validates rollout accuracy and cumulative-exposure drift at 10%.",owner:"vance",sunsetAfter:"2026-09-15"},{name:"calibration-50",percentage:50,description:"Inert. Second calibration point, and an independence check against calibration-10.",owner:"vance",sunsetAfter:"2026-09-15"}];function Bwe(t){return mre.find(e=>e.name===t)}function Vwe(t){return`hf_canary_${t.toLowerCase().replace(/[^a-z0-9]+/g,"_")}`}function Hwe(t){var e;try{if(typeof window>"u")return;const n=(e=window.__HF_CLI_CANARY_DECISIONS)==null?void 0:e[t];return typeof(n==null?void 0:n.enabled)!="boolean"?void 0:{enabled:n.enabled,forced:n.forced===!0}}catch{return}}function Qwe(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_BUCKET_SEED;if(typeof t=="string"&&t.length>0)return t}catch{}return gR()}const Zwe="hyperframes-studio:canary:";function zwe(t){if(typeof window>"u")return;const e=Vwe(t),n=`${Zwe}${t}`,r=mR();let i=null;try{i=new URLSearchParams(window.location.search).get(e)}catch{i=null}if(i!==null){if(i.trim().toLowerCase()==="reset"){r==null||r.removeItem(n);return}try{r==null||r.setItem(n,i)}catch{}return RZ(i)}return RZ((r==null?void 0:r.getItem(n))??void 0)}function jZ(){return typeof navigator>"u"?!1:navigator.webdriver===!0}const LZ=new Map,FZ=t=>({enabled:t,reason:t?"forced_on":"forced_off"}),Gwe=t=>({enabled:t,reason:t?"in_cohort":"out_of_cohort"});function Uwe(t){const e=Bwe(t);if(!e)return{enabled:!1,reason:"out_of_cohort"};const n=Hwe(e.name);if(n!=null&&n.forced)return FZ(n.enabled);const r=zwe(e.name);if(r===void 0){if(!$A())return{enabled:!1,reason:"telemetry_opt_out"};if(jZ())return{enabled:!1,reason:"excluded"};if(n!==void 0)return Gwe(n.enabled)}return r!==void 0?FZ(r):Rwe({feature:e.name,unitId:Qwe(),percentage:e.percentage,exclude:jZ()})}function Xwe(t){const e=LZ.get(t);if(e)return e;const n=Uwe(t);return LZ.set(t,n),n}function gre(){return $we(mre.map(t=>{const{enabled:e,reason:n}=Xwe(t.name);return{name:t.name,enabled:e,reason:n}}))}const Wwe=14,Ywe=["action","tab","panel","status","mode","reason","format","via"],r4=[],qwe=Date.now();function Kwe(t){for(const e of Ywe){const n=t[e];if(typeof n=="string"&&n.length>0&&n.length<=24)return`:${n}`;if(typeof n=="number"||typeof n=="boolean")return`:${String(n)}`}return""}function Jwe(t,e){const n=t.replace(/^studio[:_]/,"");r4.push({at:Date.now()-qwe,label:`${n}${Kwe(e)}`}),r4.length>Wwe&&r4.shift()}function e8e(){return r4.map(t=>`${(t.at/1e3).toFixed(1)} ${t.label}`).join(" > ")}const t8e="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",n8e="https://us.i.posthog.com",r8e=1e3;let i4=[],tP=null;function i8e(){return $A()}function Yo(t,e={}){if(!i8e())return;Jwe(t,e);const n=Dwe();i4.push({event:t,properties:{...e,...n,...gre()},timestamp:new Date().toISOString()}),tP===null&&(tP=setTimeout(()=>{tP=null,iI()},r8e)),a8e()}function iI(){if(i4.length===0)return;const t=fre(),e=i4.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));i4=[],s8e(`${n8e}/batch/`,JSON.stringify({api_key:t8e,batch:e}))}function s8e(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function a8e(){xwe()||(bwe(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>iI(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&iI()}));function o8e(t){Yo("studio_session_start",{has_project:t.has_project})}function l8e(t){Yo("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function c8e(t){Yo("studio_timeline_performance",t)}function u8e(){var t,e;try{const n=navigator,i=[`ua=${((t=n.userAgentData)==null?void 0:t.platform)??navigator.platform??"unknown"}`,`screen=${screen.width}x${screen.height}@${devicePixelRatio}x`,`lang=${navigator.language}`];return n.deviceMemory&&i.push(`mem=${n.deviceMemory}GB`),(e=n.connection)!=null&&e.effectiveType&&i.push(`net=${n.connection.effectiveType}`),navigator.hardwareConcurrency&&i.push(`cpu=${navigator.hardwareConcurrency}cores`),i.join(" ")}catch{return""}}function f8e(t){Yo("studio_razor_split",{mode:t.mode,count:t.count})}function Tm(t){Yo("studio_expanded_clip_edit",{action:t.action})}function $Z(t){Yo("studio_keyframe_lane_expand",{expanded:t.expanded})}function yR(t){Yo("studio_segment_ease_edit",{action:t.action,ease:t.ease})}function h8e(t){Yo("studio_feedback_shown",{reason:t.reason,render_id:t.render_id,source:"studio"})}function d8e(t){Yo("studio_feedback_dismissed",{reason:t.reason,render_id:t.render_id,via:t.via,had_rating:t.had_rating,source:"studio"})}function p8e(t){Yo("studio_feedback_interview_click",{reason:t.reason,source:"studio"})}function m8e(t){Yo("studio_feedback",{...t.rating===void 0?{}:{rating:t.rating,rating_scale:10},...t.comment?{comment:t.comment}:{},...t.context,reason:t.reason,render_id:t.render_id,question:t.question,answer_kind:t.answer_kind,doctor_summary:u8e(),breadcrumbs:e8e(),source:"studio"})}function y8(t){Yo("studio_block_param_commit",{tone:t.tone,block_name:t.blockName,param_key:t.key})}async function g8e(t){try{const e=await t.json();if(typeof e=="object"&&e!==null){const{error:n,hint:r}=e;if(typeof n=="string"&&n)return typeof r=="string"&&r?`${n}. ${r}`:n}}catch{}return`Server error (${t.status}). Check the terminal for details.`}function y8e(t){const e=(t==null?void 0:t.title)??"FFmpeg not found",n=(t==null?void 0:t.command)??(t==null?void 0:t.hint);return n?`${e}. Install it with: ${n}`:`${e}. Install FFmpeg to export.`}let Mx=null;const x8=t=>typeof t=="string"&&t?t:void 0;function x8e(t){if(typeof t!="object"||t===null)return null;const{ok:e,title:n,detail:r,hint:i,command:s}=t;return typeof e!="boolean"?null:{ok:e,title:x8(n),detail:x8(r),hint:x8(i),command:x8(s)}}async function b8e(){try{const t=await fetch("/api/environment/ffmpeg");return t.ok?x8e(await t.json()):null}catch{return null}}function v8e(){const[t,e]=x.useState(Mx),[n,r]=x.useState(Mx===null),i=x.useRef(!0);x.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const s=x.useCallback(async()=>{r(!0);const o=await b8e();Mx=o,i.current&&(e(o),r(!1))},[]);x.useEffect(()=>{Mx===null&&s()},[s]);const a=x.useCallback(()=>{Mx=null,s()},[s]);return{status:t,checking:n,recheck:a}}function BZ(t){return t!=="render_complete"}const VZ=[{id:"remove",prompt:"What would you cut from Studio?",placeholder:"The part you never use",presets:[{label:"Layers panel",hint:"The layer tree on the right"},{label:"Variables panel",hint:"Composition variables on the right"},{label:"Blocks browser",hint:"The block library in the sidebar"},{label:"Storyboard mode",hint:"The storyboard view next to Preview"},{label:"Caption editing",hint:"Editing caption words and presets in Studio"},{label:"Render history",hint:"The list of past exports"},{label:"Nothing",hint:"It all earns its place"}]},{id:"workaround",prompt:"What did you have to do outside Studio?",placeholder:"The step you finished somewhere else",presets:[{label:"Fix the exported file",hint:"Remuxing or re-encoding the output by hand"},{label:"Convert source media",hint:"Re-encoding footage before it would import cleanly"},{label:"Match loudness",hint:"Normalising levels across the finished audio"},{label:"Make images or graphics",hint:"Creating visual assets in another tool"},{label:"Record footage",hint:"Capturing screen or camera video"},{label:"Nothing, it was all here",hint:"No outside tools needed"}]},{id:"fix",prompt:"What should we fix first?",placeholder:"The thing that slowed you down",presets:[{label:"Audio mixing",hint:"Levels, ducking or the balance in the exported mix"},{label:"Export encoding",hint:"The render fails, or the finished file is wrong"},{label:"Export matches preview",hint:"The exported video differs from the preview"},{label:"Media and fonts",hint:"Adding video, images or fonts to a project"},{label:"Render speed",hint:"Exports take too long to finish"},{label:"Re-rendering everything",hint:"A small change means rendering the whole thing"},{label:"Checks and warnings",hint:"Lint flags things that are fine, or misses real ones"}]}],A8e={id:"detractor",prompt:"What went wrong?",placeholder:"The thing that made that a low score",presets:[{label:"Export failed",hint:"The render did not finish"},{label:"Output looked wrong",hint:"It rendered, but not the way I built it"},{label:"Crashed or froze",hint:"The editor stopped responding"},{label:"Lost my edits",hint:"Changes did not save, or came back changed"},{label:"Too slow",hint:"Waiting on renders, or the editor itself lagging"},{label:"Could not figure it out",hint:"Could not find or understand something"}]},S8e=6;function w8e(t){return t<=S8e?A8e:VZ[Math.floor(Math.random()*VZ.length)]}const e6={dismissedAt:"hyperframes-studio:feedbackDismissedAt",answeredAt:"hyperframes-studio:feedbackAnsweredAt"},yre="hyperframes-studio:feedbackAskedThisSession",xre=864e5,O8e=30*xre,k8e=7*xre;let S2=null;function C8e(){try{return!1}catch{return!1}}function HZ(t){try{return parseInt(window.localStorage.getItem(t)||"0",10)||0}catch{return 0}}function bre(t,e){try{window.localStorage.setItem(t,String(e))}catch{}}function E8e(){try{return window.sessionStorage.getItem(yre)==="1"}catch{return!0}}function T8e(){try{window.sessionStorage.setItem(yre,"1")}catch{}}function P8e(t){return!(C8e()||!$A()||E8e()||t-HZ(e6.answeredAt)<O8e||t-HZ(e6.dismissedAt)<k8e)}function vre(t){S2&&P8e(Date.now())&&(T8e(),S2(t))}function M8e(t){return S2=t,()=>{S2===t&&(S2=null)}}function N8e(){bre(e6.answeredAt,Date.now())}function D8e(){bre(e6.dismissedAt,Date.now())}function Are(t){return`hf-studio-hidden-renders:${t}`}function QZ(t){try{const e=window.localStorage.getItem(Are(t)),n=e?JSON.parse(e):[];return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function I8e(t,e){try{window.localStorage.setItem(Are(t),JSON.stringify([...e].slice(-200)))}catch{}}function _8e(t){const[e,n]=x.useState([]),[r,i]=x.useState(null),[s,a]=x.useState(null),{status:o,checking:l,recheck:c}=v8e(),u=o!==null&&!o.ok,f=x.useRef(null),h=x.useRef(null),d=x.useRef(new Map),y=x.useRef(new Set),g=x.useCallback((I,_)=>{d.current.set(I.id,_),n(j=>[...j,I])},[]),v=x.useCallback(I=>{var _;I&&h.current!==I||((_=f.current)==null||_.close(),f.current=null,h.current=null)},[]),b=x.useCallback(async()=>{if(t)try{const I=await fetch(`/api/projects/${t}/renders`);if(!I.ok){i(`Couldn't load render history (server error ${I.status}).`);return}const _=await I.json();if(i(null),Array.isArray(_.renders)){const j=QZ(t);n(L=>{const V=new Set(L.map(Z=>Z.id)),$=_.renders.filter(Z=>!V.has(Z.id)&&!j.has(Z.id)).map(Z=>({id:Z.id,status:Z.status==="failed"?"failed":"complete",progress:100,filename:Z.filename,createdAt:Z.createdAt,durationMs:Z.durationMs}));return[...L,...$]})}}catch{i("Couldn't load render history. Is the studio server running?")}},[t]);x.useEffect(()=>{b()},[b]);const w=x.useCallback(async(I={})=>{if(!t)return;if(u){g({id:mf(),status:"failed",progress:0,error:y8e(o),filename:"Export blocked",createdAt:Date.now()},{});return}const _=I.fps??30,j=I.quality??"standard",L=I.format??"mp4",V=I.resolution,$=I.composition;l8e({fps:_,quality:j,format:L,resolution:V,composition:$});const Z=Date.now(),W={render_format:L,render_quality:j,render_fps:_,render_resolution:V??"auto",render_composition:$??"index.html",render_has_variables:!!(I.variables&&Object.keys(I.variables).length>0)},Y={fps:_,quality:j,format:L};$A()?Y.telemetryDistinctId=fre():Y.telemetryOptOut=!0,V&&V!=="auto"&&(Y.resolution=V),$&&(Y.composition=$),I.variables&&Object.keys(I.variables).length>0&&(Y.variables=I.variables);let J;try{J=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)})}catch{const U={id:mf(),status:"failed",progress:0,error:"Could not reach render server. Use `hyperframes render` from the CLI instead.",filename:"Export failed",createdAt:Z};g(U,W);return}if(!J.ok){const U={id:mf(),status:"failed",progress:0,error:await g8e(J),filename:"Export failed",createdAt:Z};g(U,W);return}const{jobId:ne}=await J.json(),le={mp4:".mp4",webm:".webm",mov:".mov"}[L]??".mp4",q={id:ne,status:"rendering",progress:0,filename:`${ne}${le}`,createdAt:Z};g(q,W),h.current=ne;const F=new EventSource(`/api/render/${ne}/progress`);return f.current=F,F.addEventListener("progress",U=>{try{const z=JSON.parse(U.data),K=z.status==="complete"||z.status==="failed"||z.status==="cancelled";n(te=>te.map(ee=>ee.id===ne?{...ee,progress:z.progress??ee.progress,stage:z.stage??z.message??ee.stage,status:K?z.status:ee.status,durationMs:z.status==="complete"?Date.now()-Z:void 0,error:z.error??ee.error}:ee)),K&&v(ne)}catch{}}),F.onerror=()=>{F.close(),n(U=>U.map(z=>z.id===ne&&z.status==="rendering"?{...z,status:"failed",error:"Connection lost. Is the render server running?"}:z)),h.current=null},ne},[t,v,g,o,u]),O=x.useCallback(async I=>{a(null),v(I),n(_=>_.map(j=>j.id===I&&j.status==="rendering"?{...j,status:"cancelled"}:j));try{const _=await fetch(`/api/render/${I}/cancel`,{method:"POST"});if(!_.ok&&_.status!==404){a("Couldn't cancel on the server — the render may still be running.");return}if(_.ok){const j=await _.json().catch(()=>null);j!=null&&j.status&&j.status!=="cancelled"&&b()}}catch{a("Couldn't reach the server to cancel — the render may still be running.")}},[v,b]),C=x.useCallback(async I=>{a(null),v(I);try{if(!(await fetch(`/api/render/${I}`,{method:"DELETE"})).ok){a("Couldn't delete the render — it's still on disk.");return}}catch{a("Couldn't reach the server to delete the render.");return}n(_=>_.filter(j=>j.id!==I))},[v]),E=x.useCallback(()=>{n(I=>{const _=I.filter(j=>j.status!=="rendering");if(t&&_.length>0){const j=QZ(t);for(const L of _)j.add(L.id);I8e(t,j)}return I.filter(j=>j.status==="rendering")})},[t]),M=x.useCallback(()=>a(null),[]);x.useEffect(()=>{for(const I of e){if(I.status==="rendering"||I.status==="cancelled")continue;const _=d.current.get(I.id);!_||y.current.has(I.id)||(y.current.add(I.id),vre({reason:I.status==="complete"?"render_complete":"render_failed",renderId:I.id,detail:I.error,context:{..._,render_progress:I.progress,render_duration_ms:I.durationMs??Date.now()-I.createdAt,render_stage:I.stage,render_error:I.error,renders_this_session:d.current.size}}))}},[e]),x.useEffect(()=>()=>{var I;(I=f.current)==null||I.close(),f.current=null},[t]);const N=e.some(I=>I.status==="rendering");return x.useMemo(()=>({jobs:e,isRendering:N,loadError:r,actionError:s,dismissActionError:M,reloadRenders:b,deleteRender:C,cancelRender:O,clearCompleted:E,startRender:w,ffmpeg:o,ffmpegMissing:u,ffmpegChecking:l,recheckFfmpeg:c}),[e,N,r,s,M,b,C,O,E,w,o,u,l,c])}const R8e="modulepreload",j8e=function(t){return"/"+t},ZZ={},BA=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=a(n.map(c=>{if(c=j8e(c),c in ZZ)return;ZZ[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":R8e,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((d,y)=>{h.addEventListener("load",d),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};function L8e(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function Ar(t){x.useEffect(t,[])}const zZ=t=>{let e;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const h=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(d=>d(e,h))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=e=t(r,i,o);return o},F8e=(t=>t?zZ(t):zZ),$8e=t=>t;function B8e(t,e=$8e){const n=Ab.useSyncExternalStore(t.subscribe,Ab.useCallback(()=>e(t.getState()),[t,e]),Ab.useCallback(()=>e(t.getInitialState()),[t,e]));return Ab.useDebugValue(n),n}const GZ=t=>{const e=F8e(t),n=r=>B8e(e,r);return Object.assign(n,e),n},ZC=(t=>t?GZ(t):GZ),yv=ZC(t=>({values:null,setValues:e=>t({values:e&&Object.keys(e).length>0?e:null})}));function Sre(t){const e=yv.getState().values;e?t.searchParams.set("variables",JSON.stringify(e)):t.searchParams.delete("variables")}const wre={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","enabled:hover:bg-neutral-200","enabled:active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","enabled:hover:bg-surface-hover enabled:hover:text-white enabled:hover:border-border-strong","enabled:active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","enabled:hover:bg-red-600","enabled:active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","enabled:hover:bg-surface-hover enabled:hover:text-white","enabled:active:scale-[0.98]"].join(" ")},V8e={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"},$o=x.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:s="",disabled:a,...o},l)=>m.jsxs("button",{ref:l,disabled:a||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",wre[t],V8e[e],s].join(" "),...o,children:[n?m.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?m.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&m.jsx("span",{children:i})]}));$o.displayName="Button";const H8e={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"},Q8e=x.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},s)=>m.jsx("button",{ref:s,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",wre[n],H8e[e],r].join(" "),...i,children:t}));Q8e.displayName="IconButton";function UZ({title:t,detail:e,mono:n,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 m.jsxs("div",{className:"hf-loader",role:"status",draggable:!1,children:[m.jsx("div",{className:"hf-loader-mark-frame",style:{width:a,height:a},draggable:!1,children:m.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:[m.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:m.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:m.jsxs("g",{transform:"translate(-50 -50)",children:[m.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)"}),m.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)"})]})})}),m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),m.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),m.jsx("div",{className:"hf-loader-title",children:t}),e&&m.jsx("div",{className:"hf-loader-detail",children:e}),s!==void 0&&m.jsx("div",{className:"hf-loader-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s*100),children:m.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${s})`}})}),n&&m.jsx("div",{className:"hf-loader-mono",children:n})]})}var _l=ore();function s4(t,e,n){return Math.max(e,Math.min(n,t))}function Z8e(t,e,n,r){const i=e/2,s=i+r;return s4(t,s,Math.max(s,n-i-r))}function Ore(t,e,n,r){const i=(r==null?void 0:r.offset)??8,s=(r==null?void 0:r.margin)??12,a=Math.max(s,e.width-n.width-s),o=t.left+t.width/2-n.width/2,l=s4(o,s,a),c=t.bottom+i,u=t.top-n.height-i,f=c+n.height<=e.height-s,h=u>=s;return f||!h?{left:l,top:s4(c,s,Math.max(s,e.height-n.height-s)),placement:"bottom"}:{left:l,top:s4(u,s,Math.max(s,e.height-n.height-s)),placement:"top"}}const XZ=28,nP=8;function yr({label:t,children:e,delay:n=400,side:r="top"}){const[i,s]=x.useState(!1),[a,o]=x.useState({x:0,y:0}),[l,c]=x.useState(r),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),[d,y]=x.useState(0),g=x.useId(),v=x.useCallback(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{const O=f.current;if(!O)return;const E=(O.firstElementChild??O).getBoundingClientRect();if(E.width===0&&E.height===0)return;let M=r;r==="top"&&E.top-XZ-6<nP?M="bottom":r==="bottom"&&E.bottom+XZ+6>window.innerHeight-nP&&(M="top"),c(M),o({x:E.left+E.width/2,y:M==="top"?E.top-6:E.bottom+6}),s(!0)},n)},[n,r]),b=x.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),s(!1)},[]);x.useLayoutEffect(()=>{var O;y(i?((O=h.current)==null?void 0:O.offsetWidth)??0:0)},[i,t]),x.useEffect(()=>{if(!i)return;const O=C=>{C.key==="Escape"&&b()};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[i,b]);const w=Z8e(a.x,d,window.innerWidth,nP);return m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:f,onPointerEnter:v,onPointerLeave:b,onFocus:v,onBlur:b,"aria-describedby":i?g:void 0,className:"contents",children:e}),i&&_l.createPortal(m.jsx("div",{className:"fixed z-[200] pointer-events-none",style:{left:w,top:a.y,transform:l==="top"?"translate(-50%, -100%)":"translate(-50%, 0)"},children:m.jsx("div",{ref:h,role:"tooltip",id:g,className:"px-2 py-1 rounded-md bg-neutral-800 border border-neutral-700/50 text-[10px] font-medium text-neutral-200 whitespace-nowrap shadow-lg",children:t})}),document.body)]})}const z8e=3,G8e=3;function sI(t){return typeof t=="object"&&t!==null}function U8e(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!sI(e))return null;const n=e.state;return sI(n)?n.loading===!0&&n.ready!==!0:null}const X8e=400,WZ="The composition preview did not become ready.";function W8e(t){return!(t instanceof CustomEvent)||!sI(t.detail)?WZ:typeof t.detail.message=="string"&&t.detail.message.trim()?t.detail.message:WZ}function Y8e(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function q8e(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function YZ(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const s of r.querySelectorAll("video, audio"))if(q8e(s)&&!s.error&&s.networkState!==G8e&&s.readyState<z8e)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const s of i)if(!L8e(s))return!0}return!1}catch{return e}}const aI=x.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:s,suppressLoadingOverlay:a},o)=>{const l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),d=x.useRef(0),[y,g]=x.useState(!1),[v,b]=x.useState(!1),[w,O]=x.useState(!1),[C,E]=x.useState(!1),[M,N]=x.useState(!1),[I,_]=x.useState(!0),[j,L]=x.useState(!0),[V,$]=x.useState(null);x.useEffect(()=>{if(!I){L(!0);return}const J=setTimeout(()=>L(!1),X8e);return()=>clearTimeout(J)},[I]),Ar(()=>{const J=l.current;if(!J)return;let ne=!1,ie;return BA(()=>import("./hyperframes-player-OP68oEBG.js"),[]).then(()=>{if(ne)return;const le=document.createElement("hyperframes-player"),q=new URL(e||`/api/projects/${t}/preview`,window.location.origin);Sre(q);const F=q.pathname+q.search,U=()=>{d.current+=1;const oe=new URL(F,window.location.origin);oe.searchParams.set("_hfStudioRetry",String(d.current)),$(null),_(!0),le.setAttribute("src",oe.pathname+oe.search)};h.current=U;const z=le.iframeElement,K=oe=>oe.stopImmediatePropagation(),te=oe=>{const fe=U8e(oe);fe!==null&&N(fe)},ee=()=>{$(null),_(!1)},H=oe=>{$(W8e(oe)),_(!1)},Q=()=>{if(c.current++,$(null),N(!1),_(!0),c.current>1){J.classList.remove("preview-revealing"),J.offsetWidth,J.classList.add("preview-revealing");const pe=()=>J.classList.remove("preview-revealing");J.addEventListener("animationend",pe,{once:!0})}n(),u.current&&clearInterval(u.current);let fe=c.current>1?!1:YZ(z,!1);if(fe){g(!0);let pe=0;u.current=setInterval(()=>{pe+=1,fe=YZ(z,fe),(!fe||pe>100)&&(fe&&pe>100&&console.debug("[studio] asset readiness poll hit the 10s cap — continuing with unloaded assets"),u.current&&clearInterval(u.current),u.current=null,g(!1))},100)}else g(!1)};if(z.addEventListener("load",Q),le.addEventListener("click",K,{capture:!0}),le.addEventListener("shadertransitionstate",te),le.addEventListener("ready",ee),le.addEventListener("error",H),typeof o=="function"?o(z):o&&(o.current=z),le.setAttribute("shader-capture-scale","1"),le.setAttribute("shader-loading","player"),le.setAttribute("width",String(i?1080:1920)),le.setAttribute("height",String(i?1920:1080)),le.style.width="100%",le.style.height="100%",le.style.display="block",le.style.background="transparent",le.setAttribute("src",F),J.appendChild(le),le.shadowRoot){const oe=document.createElement("style");oe.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",le.shadowRoot.appendChild(oe)}Y8e(le),ie=()=>{if(z.removeEventListener("load",Q),le.removeEventListener("click",K,{capture:!0}),le.removeEventListener("shadertransitionstate",te),le.removeEventListener("ready",ee),le.removeEventListener("error",H),u.current&&clearInterval(u.current),u.current=null,le.remove(),h.current===U&&(h.current=null),typeof o!="function"){if(o){const oe=o;oe.current===z&&(oe.current=null)}}}}),()=>{ne=!0,ie==null||ie()}}),x.useEffect(()=>{if(!y){E(!1);return}const J=setTimeout(()=>E(!0),3e3);return()=>clearTimeout(J)},[y]),x.useEffect(()=>{if(f.current&&(clearTimeout(f.current),f.current=null),y){b(!0),O(!1);return}return O(!0),f.current=setTimeout(()=>{b(!1),O(!1),f.current=null},240),()=>{f.current&&(clearTimeout(f.current),f.current=null)}},[y]);const Z=()=>{u.current&&(clearInterval(u.current),u.current=null),g(!1)},W=!a&&!j&&I,Y=v&&!M&&!W&&!V;return x.useEffect(()=>{r==null||r(W||Y)},[r,W,Y]),m.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:s,children:[m.jsx("div",{ref:l,className:"w-full h-full"}),W&&m.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:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),onPointerDown:J=>J.preventDefault(),children:m.jsx(UZ,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),Y&&m.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:w?0:1,pointerEvents:w?"none":"auto",transition:"opacity 180ms ease-in"},onDragStart:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),children:m.jsxs("div",{className:"flex flex-col items-center gap-3",children:[m.jsx(UZ,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56}),C&&m.jsx("button",{type:"button",onClick:Z,className:"px-3 py-1.5 text-[11px] rounded-md border border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800 transition-colors",children:"Continue anyway"})]})}),V&&m.jsx("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/90 px-6 text-center","data-hyperframes-ignore":"","data-testid":"composition-preview-error",children:m.jsxs("div",{className:"max-w-sm",children:[m.jsx("p",{className:"text-sm font-semibold text-white",children:"Preview failed to load"}),m.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:V}),m.jsx("button",{type:"button",className:"mt-4 rounded-md bg-white px-3 py-1.5 text-xs font-semibold text-black transition-colors hover:bg-neutral-200",onClick:()=>{var J;return(J=h.current)==null?void 0:J.call(h)},children:"Retry preview"})]})})]})});aI.displayName="Player";function Yu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kre(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
|
|
49
|
+
`).replace(CSe,"")}function GQ(p,A){return A=zQ(A),zQ(p)===A}function Mr(p,A,k,D,B,G){switch(k){case"children":typeof D=="string"?A==="body"||A==="textarea"&&D===""||Jt(p,D):(typeof D=="number"||typeof D=="bigint")&&A!=="body"&&Jt(p,""+D);break;case"className":yi(p,"class",D);break;case"tabIndex":yi(p,"tabindex",D);break;case"dir":case"role":case"viewBox":case"width":case"height":yi(p,k,D);break;case"style":ir(p,D,G);break;case"data":if(A!=="object"){yi(p,"data",D);break}case"src":case"href":if(D===""&&(A!=="a"||k!=="href")){p.removeAttribute(k);break}if(D==null||typeof D=="function"||typeof D=="symbol"||typeof D=="boolean"){p.removeAttribute(k);break}D=$r(""+D),p.setAttribute(k,D);break;case"action":case"formAction":if(typeof D=="function"){p.setAttribute(k,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof G=="function"&&(k==="formAction"?(A!=="input"&&Mr(p,A,"name",B.name,B,null),Mr(p,A,"formEncType",B.formEncType,B,null),Mr(p,A,"formMethod",B.formMethod,B,null),Mr(p,A,"formTarget",B.formTarget,B,null)):(Mr(p,A,"encType",B.encType,B,null),Mr(p,A,"method",B.method,B,null),Mr(p,A,"target",B.target,B,null)));if(D==null||typeof D=="symbol"||typeof D=="boolean"){p.removeAttribute(k);break}D=$r(""+D),p.setAttribute(k,D);break;case"onClick":D!=null&&(p.onclick=ys);break;case"onScroll":D!=null&&Bn("scroll",p);break;case"onScrollEnd":D!=null&&Bn("scrollend",p);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));p.innerHTML=k}}break;case"multiple":p.multiple=D&&typeof D!="function"&&typeof D!="symbol";break;case"muted":p.muted=D&&typeof D!="function"&&typeof D!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(D==null||typeof D=="function"||typeof D=="boolean"||typeof D=="symbol"){p.removeAttribute("xlink:href");break}k=$r(""+D),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",k);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":D!=null&&typeof D!="function"&&typeof D!="symbol"?p.setAttribute(k,""+D):p.removeAttribute(k);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":D&&typeof D!="function"&&typeof D!="symbol"?p.setAttribute(k,""):p.removeAttribute(k);break;case"capture":case"download":D===!0?p.setAttribute(k,""):D!==!1&&D!=null&&typeof D!="function"&&typeof D!="symbol"?p.setAttribute(k,D):p.removeAttribute(k);break;case"cols":case"rows":case"size":case"span":D!=null&&typeof D!="function"&&typeof D!="symbol"&&!isNaN(D)&&1<=D?p.setAttribute(k,D):p.removeAttribute(k);break;case"rowSpan":case"start":D==null||typeof D=="function"||typeof D=="symbol"||isNaN(D)?p.removeAttribute(k):p.setAttribute(k,D);break;case"popover":Bn("beforetoggle",p),Bn("toggle",p),Nn(p,"popover",D);break;case"xlinkActuate":Yn(p,"http://www.w3.org/1999/xlink","xlink:actuate",D);break;case"xlinkArcrole":Yn(p,"http://www.w3.org/1999/xlink","xlink:arcrole",D);break;case"xlinkRole":Yn(p,"http://www.w3.org/1999/xlink","xlink:role",D);break;case"xlinkShow":Yn(p,"http://www.w3.org/1999/xlink","xlink:show",D);break;case"xlinkTitle":Yn(p,"http://www.w3.org/1999/xlink","xlink:title",D);break;case"xlinkType":Yn(p,"http://www.w3.org/1999/xlink","xlink:type",D);break;case"xmlBase":Yn(p,"http://www.w3.org/XML/1998/namespace","xml:base",D);break;case"xmlLang":Yn(p,"http://www.w3.org/XML/1998/namespace","xml:lang",D);break;case"xmlSpace":Yn(p,"http://www.w3.org/XML/1998/namespace","xml:space",D);break;case"is":Nn(p,"is",D);break;case"innerText":case"textContent":break;default:(!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(k=ls.get(k)||k,Nn(p,k,D))}}function MT(p,A,k,D,B,G){switch(k){case"style":ir(p,D,G);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));p.innerHTML=k}}break;case"children":typeof D=="string"?Jt(p,D):(typeof D=="number"||typeof D=="bigint")&&Jt(p,""+D);break;case"onScroll":D!=null&&Bn("scroll",p);break;case"onScrollEnd":D!=null&&Bn("scrollend",p);break;case"onClick":D!=null&&(p.onclick=ys);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kt.hasOwnProperty(k))e:{if(k[0]==="o"&&k[1]==="n"&&(B=k.endsWith("Capture"),A=k.slice(2,B?k.length-7:void 0),G=p[yn]||null,G=G!=null?G[k]:null,typeof G=="function"&&p.removeEventListener(A,G,B),typeof D=="function")){typeof G!="function"&&G!==null&&(k in p?p[k]=null:p.hasAttribute(k)&&p.removeAttribute(k)),p.addEventListener(A,D,B);break e}k in p?p[k]=D:D===!0?p.setAttribute(k,""):Nn(p,k,D)}}}function js(p,A,k){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bn("error",p),Bn("load",p);var D=!1,B=!1,G;for(G in k)if(k.hasOwnProperty(G)){var se=k[G];if(se!=null)switch(G){case"src":D=!0;break;case"srcSet":B=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:Mr(p,A,G,se,k,null)}}B&&Mr(p,A,"srcSet",k.srcSet,k,null),D&&Mr(p,A,"src",k.src,k,null);return;case"input":Bn("invalid",p);var de=G=se=B=null,Ee=null,Le=null;for(D in k)if(k.hasOwnProperty(D)){var Ge=k[D];if(Ge!=null)switch(D){case"name":B=Ge;break;case"type":se=Ge;break;case"checked":Ee=Ge;break;case"defaultChecked":Le=Ge;break;case"value":G=Ge;break;case"defaultValue":de=Ge;break;case"children":case"dangerouslySetInnerHTML":if(Ge!=null)throw Error(r(137,A));break;default:Mr(p,A,D,Ge,k,null)}}ft(p,G,de,Ee,Le,se,B,!1);return;case"select":Bn("invalid",p),D=se=G=null;for(B in k)if(k.hasOwnProperty(B)&&(de=k[B],de!=null))switch(B){case"value":G=de;break;case"defaultValue":se=de;break;case"multiple":D=de;default:Mr(p,A,B,de,k,null)}A=G,k=se,p.multiple=!!D,A!=null?_e(p,!!D,A,!1):k!=null&&_e(p,!!D,k,!0);return;case"textarea":Bn("invalid",p),G=B=D=null;for(se in k)if(k.hasOwnProperty(se)&&(de=k[se],de!=null))switch(se){case"value":D=de;break;case"defaultValue":B=de;break;case"children":G=de;break;case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(91));break;default:Mr(p,A,se,de,k,null)}At(p,D,B,G);return;case"option":for(Ee in k)if(k.hasOwnProperty(Ee)&&(D=k[Ee],D!=null))switch(Ee){case"selected":p.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:Mr(p,A,Ee,D,k,null)}return;case"dialog":Bn("beforetoggle",p),Bn("toggle",p),Bn("cancel",p),Bn("close",p);break;case"iframe":case"object":Bn("load",p);break;case"video":case"audio":for(D=0;D<bx.length;D++)Bn(bx[D],p);break;case"image":Bn("error",p),Bn("load",p);break;case"details":Bn("toggle",p);break;case"embed":case"source":case"link":Bn("error",p),Bn("load",p);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Le in k)if(k.hasOwnProperty(Le)&&(D=k[Le],D!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:Mr(p,A,Le,D,k,null)}return;default:if(bi(A)){for(Ge in k)k.hasOwnProperty(Ge)&&(D=k[Ge],D!==void 0&&MT(p,A,Ge,D,k,void 0));return}}for(de in k)k.hasOwnProperty(de)&&(D=k[de],D!=null&&Mr(p,A,de,D,k,null))}function ESe(p,A,k,D){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var B=null,G=null,se=null,de=null,Ee=null,Le=null,Ge=null;for(He in k){var Xe=k[He];if(k.hasOwnProperty(He)&&Xe!=null)switch(He){case"checked":break;case"value":break;case"defaultValue":Ee=Xe;default:D.hasOwnProperty(He)||Mr(p,A,He,null,D,Xe)}}for(var Fe in D){var He=D[Fe];if(Xe=k[Fe],D.hasOwnProperty(Fe)&&(He!=null||Xe!=null))switch(Fe){case"type":G=He;break;case"name":B=He;break;case"checked":Le=He;break;case"defaultChecked":Ge=He;break;case"value":se=He;break;case"defaultValue":de=He;break;case"children":case"dangerouslySetInnerHTML":if(He!=null)throw Error(r(137,A));break;default:He!==Xe&&Mr(p,A,Fe,He,D,Xe)}}va(p,se,de,Ee,Le,Ge,G,B);return;case"select":He=se=de=Fe=null;for(G in k)if(Ee=k[G],k.hasOwnProperty(G)&&Ee!=null)switch(G){case"value":break;case"multiple":He=Ee;default:D.hasOwnProperty(G)||Mr(p,A,G,null,D,Ee)}for(B in D)if(G=D[B],Ee=k[B],D.hasOwnProperty(B)&&(G!=null||Ee!=null))switch(B){case"value":Fe=G;break;case"defaultValue":de=G;break;case"multiple":se=G;default:G!==Ee&&Mr(p,A,B,G,D,Ee)}A=de,k=se,D=He,Fe!=null?_e(p,!!k,Fe,!1):!!D!=!!k&&(A!=null?_e(p,!!k,A,!0):_e(p,!!k,k?[]:"",!1));return;case"textarea":He=Fe=null;for(de in k)if(B=k[de],k.hasOwnProperty(de)&&B!=null&&!D.hasOwnProperty(de))switch(de){case"value":break;case"children":break;default:Mr(p,A,de,null,D,B)}for(se in D)if(B=D[se],G=k[se],D.hasOwnProperty(se)&&(B!=null||G!=null))switch(se){case"value":Fe=B;break;case"defaultValue":He=B;break;case"children":break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:B!==G&&Mr(p,A,se,B,D,G)}at(p,Fe,He);return;case"option":for(var Ft in k)if(Fe=k[Ft],k.hasOwnProperty(Ft)&&Fe!=null&&!D.hasOwnProperty(Ft))switch(Ft){case"selected":p.selected=!1;break;default:Mr(p,A,Ft,null,D,Fe)}for(Ee in D)if(Fe=D[Ee],He=k[Ee],D.hasOwnProperty(Ee)&&Fe!==He&&(Fe!=null||He!=null))switch(Ee){case"selected":p.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:Mr(p,A,Ee,Fe,D,He)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var sn in k)Fe=k[sn],k.hasOwnProperty(sn)&&Fe!=null&&!D.hasOwnProperty(sn)&&Mr(p,A,sn,null,D,Fe);for(Le in D)if(Fe=D[Le],He=k[Le],D.hasOwnProperty(Le)&&Fe!==He&&(Fe!=null||He!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(r(137,A));break;default:Mr(p,A,Le,Fe,D,He)}return;default:if(bi(A)){for(var Nr in k)Fe=k[Nr],k.hasOwnProperty(Nr)&&Fe!==void 0&&!D.hasOwnProperty(Nr)&&MT(p,A,Nr,void 0,D,Fe);for(Ge in D)Fe=D[Ge],He=k[Ge],!D.hasOwnProperty(Ge)||Fe===He||Fe===void 0&&He===void 0||MT(p,A,Ge,Fe,D,He);return}}for(var Ie in k)Fe=k[Ie],k.hasOwnProperty(Ie)&&Fe!=null&&!D.hasOwnProperty(Ie)&&Mr(p,A,Ie,null,D,Fe);for(Xe in D)Fe=D[Xe],He=k[Xe],!D.hasOwnProperty(Xe)||Fe===He||Fe==null&&He==null||Mr(p,A,Xe,Fe,D,He)}function UQ(p){switch(p){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TSe(){if(typeof performance.getEntriesByType=="function"){for(var p=0,A=0,k=performance.getEntriesByType("resource"),D=0;D<k.length;D++){var B=k[D],G=B.transferSize,se=B.initiatorType,de=B.duration;if(G&&de&&UQ(se)){for(se=0,de=B.responseEnd,D+=1;D<k.length;D++){var Ee=k[D],Le=Ee.startTime;if(Le>de)break;var Ge=Ee.transferSize,Xe=Ee.initiatorType;Ge&&UQ(Xe)&&(Ee=Ee.responseEnd,se+=Ge*(Ee<de?1:(de-Le)/(Ee-Le)))}if(--D,A+=8*(G+se)/(B.duration/1e3),p++,10<p)break}}if(0<p)return A/p/1e6}return navigator.connection&&(p=navigator.connection.downlink,typeof p=="number")?p:5}var NT=null,DT=null;function r8(p){return p.nodeType===9?p:p.ownerDocument}function XQ(p){switch(p){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WQ(p,A){if(p===0)switch(A){case"svg":return 1;case"math":return 2;default:return 0}return p===1&&A==="foreignObject"?0:p}function IT(p,A){return p==="textarea"||p==="noscript"||typeof A.children=="string"||typeof A.children=="number"||typeof A.children=="bigint"||typeof A.dangerouslySetInnerHTML=="object"&&A.dangerouslySetInnerHTML!==null&&A.dangerouslySetInnerHTML.__html!=null}var _T=null;function PSe(){var p=window.event;return p&&p.type==="popstate"?p===_T?!1:(_T=p,!0):(_T=null,!1)}var YQ=typeof setTimeout=="function"?setTimeout:void 0,MSe=typeof clearTimeout=="function"?clearTimeout:void 0,qQ=typeof Promise=="function"?Promise:void 0,NSe=typeof queueMicrotask=="function"?queueMicrotask:typeof qQ<"u"?function(p){return qQ.resolve(null).then(p).catch(DSe)}:YQ;function DSe(p){setTimeout(function(){throw p})}function kh(p){return p==="head"}function KQ(p,A){var k=A,D=0;do{var B=k.nextSibling;if(p.removeChild(k),B&&B.nodeType===8)if(k=B.data,k==="/$"||k==="/&"){if(D===0){p.removeChild(B),km(A);return}D--}else if(k==="$"||k==="$?"||k==="$~"||k==="$!"||k==="&")D++;else if(k==="html")Ax(p.ownerDocument.documentElement);else if(k==="head"){k=p.ownerDocument.head,Ax(k);for(var G=k.firstChild;G;){var se=G.nextSibling,de=G.nodeName;G[xt]||de==="SCRIPT"||de==="STYLE"||de==="LINK"&&G.rel.toLowerCase()==="stylesheet"||k.removeChild(G),G=se}}else k==="body"&&Ax(p.ownerDocument.body);k=B}while(k);km(A)}function JQ(p,A){var k=p;p=0;do{var D=k.nextSibling;if(k.nodeType===1?A?(k._stashedDisplay=k.style.display,k.style.display="none"):(k.style.display=k._stashedDisplay||"",k.getAttribute("style")===""&&k.removeAttribute("style")):k.nodeType===3&&(A?(k._stashedText=k.nodeValue,k.nodeValue=""):k.nodeValue=k._stashedText||""),D&&D.nodeType===8)if(k=D.data,k==="/$"){if(p===0)break;p--}else k!=="$"&&k!=="$?"&&k!=="$~"&&k!=="$!"||p++;k=D}while(k)}function RT(p){var A=p.firstChild;for(A&&A.nodeType===10&&(A=A.nextSibling);A;){var k=A;switch(A=A.nextSibling,k.nodeName){case"HTML":case"HEAD":case"BODY":RT(k),Wn(k);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(k.rel.toLowerCase()==="stylesheet")continue}p.removeChild(k)}}function ISe(p,A,k,D){for(;p.nodeType===1;){var B=k;if(p.nodeName.toLowerCase()!==A.toLowerCase()){if(!D&&(p.nodeName!=="INPUT"||p.type!=="hidden"))break}else if(D){if(!p[xt])switch(A){case"meta":if(!p.hasAttribute("itemprop"))break;return p;case"link":if(G=p.getAttribute("rel"),G==="stylesheet"&&p.hasAttribute("data-precedence"))break;if(G!==B.rel||p.getAttribute("href")!==(B.href==null||B.href===""?null:B.href)||p.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin)||p.getAttribute("title")!==(B.title==null?null:B.title))break;return p;case"style":if(p.hasAttribute("data-precedence"))break;return p;case"script":if(G=p.getAttribute("src"),(G!==(B.src==null?null:B.src)||p.getAttribute("type")!==(B.type==null?null:B.type)||p.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin))&&G&&p.hasAttribute("async")&&!p.hasAttribute("itemprop"))break;return p;default:return p}}else if(A==="input"&&p.type==="hidden"){var G=B.name==null?null:""+B.name;if(B.type==="hidden"&&p.getAttribute("name")===G)return p}else return p;if(p=cl(p.nextSibling),p===null)break}return null}function _Se(p,A,k){if(A==="")return null;for(;p.nodeType!==3;)if((p.nodeType!==1||p.nodeName!=="INPUT"||p.type!=="hidden")&&!k||(p=cl(p.nextSibling),p===null))return null;return p}function eZ(p,A){for(;p.nodeType!==8;)if((p.nodeType!==1||p.nodeName!=="INPUT"||p.type!=="hidden")&&!A||(p=cl(p.nextSibling),p===null))return null;return p}function jT(p){return p.data==="$?"||p.data==="$~"}function LT(p){return p.data==="$!"||p.data==="$?"&&p.ownerDocument.readyState!=="loading"}function RSe(p,A){var k=p.ownerDocument;if(p.data==="$~")p._reactRetry=A;else if(p.data!=="$?"||k.readyState!=="loading")A();else{var D=function(){A(),k.removeEventListener("DOMContentLoaded",D)};k.addEventListener("DOMContentLoaded",D),p._reactRetry=D}}function cl(p){for(;p!=null;p=p.nextSibling){var A=p.nodeType;if(A===1||A===3)break;if(A===8){if(A=p.data,A==="$"||A==="$!"||A==="$?"||A==="$~"||A==="&"||A==="F!"||A==="F")break;if(A==="/$"||A==="/&")return null}}return p}var FT=null;function tZ(p){p=p.nextSibling;for(var A=0;p;){if(p.nodeType===8){var k=p.data;if(k==="/$"||k==="/&"){if(A===0)return cl(p.nextSibling);A--}else k!=="$"&&k!=="$!"&&k!=="$?"&&k!=="$~"&&k!=="&"||A++}p=p.nextSibling}return null}function nZ(p){p=p.previousSibling;for(var A=0;p;){if(p.nodeType===8){var k=p.data;if(k==="$"||k==="$!"||k==="$?"||k==="$~"||k==="&"){if(A===0)return p;A--}else k!=="/$"&&k!=="/&"||A++}p=p.previousSibling}return null}function rZ(p,A,k){switch(A=r8(k),p){case"html":if(p=A.documentElement,!p)throw Error(r(452));return p;case"head":if(p=A.head,!p)throw Error(r(453));return p;case"body":if(p=A.body,!p)throw Error(r(454));return p;default:throw Error(r(451))}}function Ax(p){for(var A=p.attributes;A.length;)p.removeAttributeNode(A[0]);Wn(p)}var ul=new Map,iZ=new Set;function i8(p){return typeof p.getRootNode=="function"?p.getRootNode():p.nodeType===9?p:p.ownerDocument}var Gu=J.d;J.d={f:jSe,r:LSe,D:FSe,C:$Se,L:BSe,m:VSe,X:QSe,S:HSe,M:ZSe};function jSe(){var p=Gu.f(),A=Ww();return p||A}function LSe(p){var A=Rn(p);A!==null&&A.tag===5&&A.type==="form"?AH(A):Gu.r(p)}var Sm=typeof document>"u"?null:document;function sZ(p,A,k){var D=Sm;if(D&&typeof A=="string"&&A){var B=Lr(A);B='link[rel="'+p+'"][href="'+B+'"]',typeof k=="string"&&(B+='[crossorigin="'+k+'"]'),iZ.has(B)||(iZ.add(B),p={rel:p,crossOrigin:k,href:A},D.querySelector(B)===null&&(A=D.createElement("link"),js(A,"link",p),Ot(A),D.head.appendChild(A)))}}function FSe(p){Gu.D(p),sZ("dns-prefetch",p,null)}function $Se(p,A){Gu.C(p,A),sZ("preconnect",p,A)}function BSe(p,A,k){Gu.L(p,A,k);var D=Sm;if(D&&p&&A){var B='link[rel="preload"][as="'+Lr(A)+'"]';A==="image"&&k&&k.imageSrcSet?(B+='[imagesrcset="'+Lr(k.imageSrcSet)+'"]',typeof k.imageSizes=="string"&&(B+='[imagesizes="'+Lr(k.imageSizes)+'"]')):B+='[href="'+Lr(p)+'"]';var G=B;switch(A){case"style":G=wm(p);break;case"script":G=Om(p)}ul.has(G)||(p=f({rel:"preload",href:A==="image"&&k&&k.imageSrcSet?void 0:p,as:A},k),ul.set(G,p),D.querySelector(B)!==null||A==="style"&&D.querySelector(Sx(G))||A==="script"&&D.querySelector(wx(G))||(A=D.createElement("link"),js(A,"link",p),Ot(A),D.head.appendChild(A)))}}function VSe(p,A){Gu.m(p,A);var k=Sm;if(k&&p){var D=A&&typeof A.as=="string"?A.as:"script",B='link[rel="modulepreload"][as="'+Lr(D)+'"][href="'+Lr(p)+'"]',G=B;switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":G=Om(p)}if(!ul.has(G)&&(p=f({rel:"modulepreload",href:p},A),ul.set(G,p),k.querySelector(B)===null)){switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(k.querySelector(wx(G)))return}D=k.createElement("link"),js(D,"link",p),Ot(D),k.head.appendChild(D)}}}function HSe(p,A,k){Gu.S(p,A,k);var D=Sm;if(D&&p){var B=rt(D).hoistableStyles,G=wm(p);A=A||"default";var se=B.get(G);if(!se){var de={loading:0,preload:null};if(se=D.querySelector(Sx(G)))de.loading=5;else{p=f({rel:"stylesheet",href:p,"data-precedence":A},k),(k=ul.get(G))&&$T(p,k);var Ee=se=D.createElement("link");Ot(Ee),js(Ee,"link",p),Ee._p=new Promise(function(Le,Ge){Ee.onload=Le,Ee.onerror=Ge}),Ee.addEventListener("load",function(){de.loading|=1}),Ee.addEventListener("error",function(){de.loading|=2}),de.loading|=4,s8(se,A,D)}se={type:"stylesheet",instance:se,count:1,state:de},B.set(G,se)}}}function QSe(p,A){Gu.X(p,A);var k=Sm;if(k&&p){var D=rt(k).hoistableScripts,B=Om(p),G=D.get(B);G||(G=k.querySelector(wx(B)),G||(p=f({src:p,async:!0},A),(A=ul.get(B))&&BT(p,A),G=k.createElement("script"),Ot(G),js(G,"link",p),k.head.appendChild(G)),G={type:"script",instance:G,count:1,state:null},D.set(B,G))}}function ZSe(p,A){Gu.M(p,A);var k=Sm;if(k&&p){var D=rt(k).hoistableScripts,B=Om(p),G=D.get(B);G||(G=k.querySelector(wx(B)),G||(p=f({src:p,async:!0,type:"module"},A),(A=ul.get(B))&&BT(p,A),G=k.createElement("script"),Ot(G),js(G,"link",p),k.head.appendChild(G)),G={type:"script",instance:G,count:1,state:null},D.set(B,G))}}function aZ(p,A,k,D){var B=(B=te.current)?i8(B):null;if(!B)throw Error(r(446));switch(p){case"meta":case"title":return null;case"style":return typeof k.precedence=="string"&&typeof k.href=="string"?(A=wm(k.href),k=rt(B).hoistableStyles,D=k.get(A),D||(D={type:"style",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};case"link":if(k.rel==="stylesheet"&&typeof k.href=="string"&&typeof k.precedence=="string"){p=wm(k.href);var G=rt(B).hoistableStyles,se=G.get(p);if(se||(B=B.ownerDocument||B,se={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},G.set(p,se),(G=B.querySelector(Sx(p)))&&!G._p&&(se.instance=G,se.state.loading=5),ul.has(p)||(k={rel:"preload",as:"style",href:k.href,crossOrigin:k.crossOrigin,integrity:k.integrity,media:k.media,hrefLang:k.hrefLang,referrerPolicy:k.referrerPolicy},ul.set(p,k),G||zSe(B,p,k,se.state))),A&&D===null)throw Error(r(528,""));return se}if(A&&D!==null)throw Error(r(529,""));return null;case"script":return A=k.async,k=k.src,typeof k=="string"&&A&&typeof A!="function"&&typeof A!="symbol"?(A=Om(k),k=rt(B).hoistableScripts,D=k.get(A),D||(D={type:"script",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,p))}}function wm(p){return'href="'+Lr(p)+'"'}function Sx(p){return'link[rel="stylesheet"]['+p+"]"}function oZ(p){return f({},p,{"data-precedence":p.precedence,precedence:null})}function zSe(p,A,k,D){p.querySelector('link[rel="preload"][as="style"]['+A+"]")?D.loading=1:(A=p.createElement("link"),D.preload=A,A.addEventListener("load",function(){return D.loading|=1}),A.addEventListener("error",function(){return D.loading|=2}),js(A,"link",k),Ot(A),p.head.appendChild(A))}function Om(p){return'[src="'+Lr(p)+'"]'}function wx(p){return"script[async]"+p}function lZ(p,A,k){if(A.count++,A.instance===null)switch(A.type){case"style":var D=p.querySelector('style[data-href~="'+Lr(k.href)+'"]');if(D)return A.instance=D,Ot(D),D;var B=f({},k,{"data-href":k.href,"data-precedence":k.precedence,href:null,precedence:null});return D=(p.ownerDocument||p).createElement("style"),Ot(D),js(D,"style",B),s8(D,k.precedence,p),A.instance=D;case"stylesheet":B=wm(k.href);var G=p.querySelector(Sx(B));if(G)return A.state.loading|=4,A.instance=G,Ot(G),G;D=oZ(k),(B=ul.get(B))&&$T(D,B),G=(p.ownerDocument||p).createElement("link"),Ot(G);var se=G;return se._p=new Promise(function(de,Ee){se.onload=de,se.onerror=Ee}),js(G,"link",D),A.state.loading|=4,s8(G,k.precedence,p),A.instance=G;case"script":return G=Om(k.src),(B=p.querySelector(wx(G)))?(A.instance=B,Ot(B),B):(D=k,(B=ul.get(G))&&(D=f({},k),BT(D,B)),p=p.ownerDocument||p,B=p.createElement("script"),Ot(B),js(B,"link",D),p.head.appendChild(B),A.instance=B);case"void":return null;default:throw Error(r(443,A.type))}else A.type==="stylesheet"&&(A.state.loading&4)===0&&(D=A.instance,A.state.loading|=4,s8(D,k.precedence,p));return A.instance}function s8(p,A,k){for(var D=k.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),B=D.length?D[D.length-1]:null,G=B,se=0;se<D.length;se++){var de=D[se];if(de.dataset.precedence===A)G=de;else if(G!==B)break}G?G.parentNode.insertBefore(p,G.nextSibling):(A=k.nodeType===9?k.head:k,A.insertBefore(p,A.firstChild))}function $T(p,A){p.crossOrigin==null&&(p.crossOrigin=A.crossOrigin),p.referrerPolicy==null&&(p.referrerPolicy=A.referrerPolicy),p.title==null&&(p.title=A.title)}function BT(p,A){p.crossOrigin==null&&(p.crossOrigin=A.crossOrigin),p.referrerPolicy==null&&(p.referrerPolicy=A.referrerPolicy),p.integrity==null&&(p.integrity=A.integrity)}var a8=null;function cZ(p,A,k){if(a8===null){var D=new Map,B=a8=new Map;B.set(k,D)}else B=a8,D=B.get(k),D||(D=new Map,B.set(k,D));if(D.has(p))return D;for(D.set(p,null),k=k.getElementsByTagName(p),B=0;B<k.length;B++){var G=k[B];if(!(G[xt]||G[ln]||p==="link"&&G.getAttribute("rel")==="stylesheet")&&G.namespaceURI!=="http://www.w3.org/2000/svg"){var se=G.getAttribute(A)||"";se=p+se;var de=D.get(se);de?de.push(G):D.set(se,[G])}}return D}function uZ(p,A,k){p=p.ownerDocument||p,p.head.insertBefore(k,A==="title"?p.querySelector("head > title"):null)}function GSe(p,A,k){if(k===1||A.itemProp!=null)return!1;switch(p){case"meta":case"title":return!0;case"style":if(typeof A.precedence!="string"||typeof A.href!="string"||A.href==="")break;return!0;case"link":if(typeof A.rel!="string"||typeof A.href!="string"||A.href===""||A.onLoad||A.onError)break;switch(A.rel){case"stylesheet":return p=A.disabled,typeof A.precedence=="string"&&p==null;default:return!0}case"script":if(A.async&&typeof A.async!="function"&&typeof A.async!="symbol"&&!A.onLoad&&!A.onError&&A.src&&typeof A.src=="string")return!0}return!1}function fZ(p){return!(p.type==="stylesheet"&&(p.state.loading&3)===0)}function USe(p,A,k,D){if(k.type==="stylesheet"&&(typeof D.media!="string"||matchMedia(D.media).matches!==!1)&&(k.state.loading&4)===0){if(k.instance===null){var B=wm(D.href),G=A.querySelector(Sx(B));if(G){A=G._p,A!==null&&typeof A=="object"&&typeof A.then=="function"&&(p.count++,p=o8.bind(p),A.then(p,p)),k.state.loading|=4,k.instance=G,Ot(G);return}G=A.ownerDocument||A,D=oZ(D),(B=ul.get(B))&&$T(D,B),G=G.createElement("link"),Ot(G);var se=G;se._p=new Promise(function(de,Ee){se.onload=de,se.onerror=Ee}),js(G,"link",D),k.instance=G}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(k,A),(A=k.state.preload)&&(k.state.loading&3)===0&&(p.count++,k=o8.bind(p),A.addEventListener("load",k),A.addEventListener("error",k))}}var VT=0;function XSe(p,A){return p.stylesheets&&p.count===0&&c8(p,p.stylesheets),0<p.count||0<p.imgCount?function(k){var D=setTimeout(function(){if(p.stylesheets&&c8(p,p.stylesheets),p.unsuspend){var G=p.unsuspend;p.unsuspend=null,G()}},6e4+A);0<p.imgBytes&&VT===0&&(VT=62500*TSe());var B=setTimeout(function(){if(p.waitingForImages=!1,p.count===0&&(p.stylesheets&&c8(p,p.stylesheets),p.unsuspend)){var G=p.unsuspend;p.unsuspend=null,G()}},(p.imgBytes>VT?50:800)+A);return p.unsuspend=k,function(){p.unsuspend=null,clearTimeout(D),clearTimeout(B)}}:null}function o8(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)c8(this,this.stylesheets);else if(this.unsuspend){var p=this.unsuspend;this.unsuspend=null,p()}}}var l8=null;function c8(p,A){p.stylesheets=null,p.unsuspend!==null&&(p.count++,l8=new Map,A.forEach(WSe,p),l8=null,o8.call(p))}function WSe(p,A){if(!(A.state.loading&4)){var k=l8.get(p);if(k)var D=k.get(null);else{k=new Map,l8.set(p,k);for(var B=p.querySelectorAll("link[data-precedence],style[data-precedence]"),G=0;G<B.length;G++){var se=B[G];(se.nodeName==="LINK"||se.getAttribute("media")!=="not all")&&(k.set(se.dataset.precedence,se),D=se)}D&&k.set(null,D)}B=A.instance,se=B.getAttribute("data-precedence"),G=k.get(se)||D,G===D&&k.set(null,B),k.set(se,B),this.count++,D=o8.bind(this),B.addEventListener("load",D),B.addEventListener("error",D),G?G.parentNode.insertBefore(B,G.nextSibling):(p=p.nodeType===9?p.head:p,p.insertBefore(B,p.firstChild)),A.state.loading|=4}}var Ox={$$typeof:O,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function YSe(p,A,k,D,B,G,se,de,Ee){this.tag=1,this.containerInfo=p,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pn(0),this.hiddenUpdates=Pn(null),this.identifierPrefix=D,this.onUncaughtError=B,this.onCaughtError=G,this.onRecoverableError=se,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ee,this.incompleteTransitions=new Map}function hZ(p,A,k,D,B,G,se,de,Ee,Le,Ge,Xe){return p=new YSe(p,A,k,se,Ee,Le,Ge,Xe,de),A=1,G===!0&&(A|=24),G=xo(3,null,null,A),p.current=G,G.stateNode=p,A=v5(),A.refCount++,p.pooledCache=A,A.refCount++,G.memoizedState={element:D,isDehydrated:k,cache:A},O5(G),p}function dZ(p){return p?(p=tm,p):tm}function pZ(p,A,k,D,B,G){B=dZ(B),D.context===null?D.context=B:D.pendingContext=B,D=ph(A),D.payload={element:k},G=G===void 0?null:G,G!==null&&(D.callback=G),k=mh(p,D,A),k!==null&&(za(k,p,A),nx(k,p,A))}function mZ(p,A){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var k=p.retryLane;p.retryLane=k!==0&&k<A?k:A}}function HT(p,A){mZ(p,A),(p=p.alternate)&&mZ(p,A)}function gZ(p){if(p.tag===13||p.tag===31){var A=Zd(p,67108864);A!==null&&za(A,p,67108864),HT(p,67108864)}}function yZ(p){if(p.tag===13||p.tag===31){var A=wo();A=Zn(A);var k=Zd(p,A);k!==null&&za(k,p,A),HT(p,A)}}var u8=!0;function qSe(p,A,k,D){var B=Y.T;Y.T=null;var G=J.p;try{J.p=2,QT(p,A,k,D)}finally{J.p=G,Y.T=B}}function KSe(p,A,k,D){var B=Y.T;Y.T=null;var G=J.p;try{J.p=8,QT(p,A,k,D)}finally{J.p=G,Y.T=B}}function QT(p,A,k,D){if(u8){var B=ZT(D);if(B===null)PT(p,A,D,f8,k),bZ(p,D);else if(ewe(B,p,A,k,D))D.stopPropagation();else if(bZ(p,D),A&4&&-1<JSe.indexOf(p)){for(;B!==null;){var G=Rn(B);if(G!==null)switch(G.tag){case 3:if(G=G.stateNode,G.current.memoizedState.isDehydrated){var se=Me(G.pendingLanes);if(se!==0){var de=G;for(de.pendingLanes|=2,de.entangledLanes|=2;se;){var Ee=1<<31-ut(se);de.entanglements[1]|=Ee,se&=~Ee}Lc(G),(dr&6)===0&&(Uw=ze()+500,xx(0))}}break;case 31:case 13:de=Zd(G,2),de!==null&&za(de,G,2),Ww(),HT(G,2)}if(G=ZT(D),G===null&&PT(p,A,D,f8,k),G===B)break;B=G}B!==null&&D.stopPropagation()}else PT(p,A,D,null,k)}}function ZT(p){return p=Eu(p),zT(p)}var f8=null;function zT(p){if(f8=null,p=Mn(p),p!==null){var A=s(p);if(A===null)p=null;else{var k=A.tag;if(k===13){if(p=a(A),p!==null)return p;p=null}else if(k===31){if(p=o(A),p!==null)return p;p=null}else if(k===3){if(A.stateNode.current.memoizedState.isDehydrated)return A.tag===3?A.stateNode.containerInfo:null;p=null}else A!==p&&(p=null)}}return f8=p,null}function xZ(p){switch(p){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ye()){case pt:return 2;case st:return 8;case St:case $e:return 32;case qe:return 268435456;default:return 32}default:return 32}}var GT=!1,Ch=null,Eh=null,Th=null,kx=new Map,Cx=new Map,Ph=[],JSe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function bZ(p,A){switch(p){case"focusin":case"focusout":Ch=null;break;case"dragenter":case"dragleave":Eh=null;break;case"mouseover":case"mouseout":Th=null;break;case"pointerover":case"pointerout":kx.delete(A.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cx.delete(A.pointerId)}}function Ex(p,A,k,D,B,G){return p===null||p.nativeEvent!==G?(p={blockedOn:A,domEventName:k,eventSystemFlags:D,nativeEvent:G,targetContainers:[B]},A!==null&&(A=Rn(A),A!==null&&gZ(A)),p):(p.eventSystemFlags|=D,A=p.targetContainers,B!==null&&A.indexOf(B)===-1&&A.push(B),p)}function ewe(p,A,k,D,B){switch(A){case"focusin":return Ch=Ex(Ch,p,A,k,D,B),!0;case"dragenter":return Eh=Ex(Eh,p,A,k,D,B),!0;case"mouseover":return Th=Ex(Th,p,A,k,D,B),!0;case"pointerover":var G=B.pointerId;return kx.set(G,Ex(kx.get(G)||null,p,A,k,D,B)),!0;case"gotpointercapture":return G=B.pointerId,Cx.set(G,Ex(Cx.get(G)||null,p,A,k,D,B)),!0}return!1}function vZ(p){var A=Mn(p.target);if(A!==null){var k=s(A);if(k!==null){if(A=k.tag,A===13){if(A=a(k),A!==null){p.blockedOn=A,$t(p.priority,function(){yZ(k)});return}}else if(A===31){if(A=o(k),A!==null){p.blockedOn=A,$t(p.priority,function(){yZ(k)});return}}else if(A===3&&k.stateNode.current.memoizedState.isDehydrated){p.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}p.blockedOn=null}function h8(p){if(p.blockedOn!==null)return!1;for(var A=p.targetContainers;0<A.length;){var k=ZT(p.nativeEvent);if(k===null){k=p.nativeEvent;var D=new k.constructor(k.type,k);Nc=D,k.target.dispatchEvent(D),Nc=null}else return A=Rn(k),A!==null&&gZ(A),p.blockedOn=k,!1;A.shift()}return!0}function AZ(p,A,k){h8(p)&&k.delete(A)}function twe(){GT=!1,Ch!==null&&h8(Ch)&&(Ch=null),Eh!==null&&h8(Eh)&&(Eh=null),Th!==null&&h8(Th)&&(Th=null),kx.forEach(AZ),Cx.forEach(AZ)}function d8(p,A){p.blockedOn===A&&(p.blockedOn=null,GT||(GT=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,twe)))}var p8=null;function SZ(p){p8!==p&&(p8=p,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){p8===p&&(p8=null);for(var A=0;A<p.length;A+=3){var k=p[A],D=p[A+1],B=p[A+2];if(typeof D!="function"){if(zT(D||k)===null)continue;break}var G=Rn(k);G!==null&&(p.splice(A,3),A-=3,Z5(G,{pending:!0,data:B,method:k.method,action:D},D,B))}}))}function km(p){function A(Ee){return d8(Ee,p)}Ch!==null&&d8(Ch,p),Eh!==null&&d8(Eh,p),Th!==null&&d8(Th,p),kx.forEach(A),Cx.forEach(A);for(var k=0;k<Ph.length;k++){var D=Ph[k];D.blockedOn===p&&(D.blockedOn=null)}for(;0<Ph.length&&(k=Ph[0],k.blockedOn===null);)vZ(k),k.blockedOn===null&&Ph.shift();if(k=(p.ownerDocument||p).$$reactFormReplay,k!=null)for(D=0;D<k.length;D+=3){var B=k[D],G=k[D+1],se=B[yn]||null;if(typeof G=="function")se||SZ(k);else if(se){var de=null;if(G&&G.hasAttribute("formAction")){if(B=G,se=G[yn]||null)de=se.formAction;else if(zT(B)!==null)continue}else de=se.action;typeof de=="function"?k[D+1]=de:(k.splice(D,3),D-=3),SZ(k)}}}function wZ(){function p(G){G.canIntercept&&G.info==="react-transition"&&G.intercept({handler:function(){return new Promise(function(se){return B=se})},focusReset:"manual",scroll:"manual"})}function A(){B!==null&&(B(),B=null),D||setTimeout(k,20)}function k(){if(!D&&!navigation.transition){var G=navigation.currentEntry;G&&G.url!=null&&navigation.navigate(G.url,{state:G.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var D=!1,B=null;return navigation.addEventListener("navigate",p),navigation.addEventListener("navigatesuccess",A),navigation.addEventListener("navigateerror",A),setTimeout(k,100),function(){D=!0,navigation.removeEventListener("navigate",p),navigation.removeEventListener("navigatesuccess",A),navigation.removeEventListener("navigateerror",A),B!==null&&(B(),B=null)}}}function UT(p){this._internalRoot=p}m8.prototype.render=UT.prototype.render=function(p){var A=this._internalRoot;if(A===null)throw Error(r(409));var k=A.current,D=wo();pZ(k,D,p,A,null,null)},m8.prototype.unmount=UT.prototype.unmount=function(){var p=this._internalRoot;if(p!==null){this._internalRoot=null;var A=p.containerInfo;pZ(p.current,2,null,p,null,null),Ww(),A[kn]=null}};function m8(p){this._internalRoot=p}m8.prototype.unstable_scheduleHydration=function(p){if(p){var A=yt();p={blockedOn:null,target:p,priority:A};for(var k=0;k<Ph.length&&A!==0&&A<Ph[k].priority;k++);Ph.splice(k,0,p),k===0&&vZ(p)}};var OZ=e.version;if(OZ!=="19.2.6")throw Error(r(527,OZ,"19.2.6"));J.findDOMNode=function(p){var A=p._reactInternals;if(A===void 0)throw typeof p.render=="function"?Error(r(188)):(p=Object.keys(p).join(","),Error(r(268,p)));return p=c(A),p=p!==null?u(p):null,p=p===null?null:p.stateNode,p};var nwe={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var g8=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!g8.isDisabled&&g8.supportsFiber)try{Dt=g8.inject(nwe),We=g8}catch{}}return Px.createRoot=function(p,A){if(!i(p))throw Error(r(299));var k=!1,D="",B=NH,G=DH,se=IH;return A!=null&&(A.unstable_strictMode===!0&&(k=!0),A.identifierPrefix!==void 0&&(D=A.identifierPrefix),A.onUncaughtError!==void 0&&(B=A.onUncaughtError),A.onCaughtError!==void 0&&(G=A.onCaughtError),A.onRecoverableError!==void 0&&(se=A.onRecoverableError)),A=hZ(p,1,!1,null,null,k,D,null,B,G,se,wZ),p[kn]=A.current,TT(p),new UT(A)},Px.hydrateRoot=function(p,A,k){if(!i(p))throw Error(r(299));var D=!1,B="",G=NH,se=DH,de=IH,Ee=null;return k!=null&&(k.unstable_strictMode===!0&&(D=!0),k.identifierPrefix!==void 0&&(B=k.identifierPrefix),k.onUncaughtError!==void 0&&(G=k.onUncaughtError),k.onCaughtError!==void 0&&(se=k.onCaughtError),k.onRecoverableError!==void 0&&(de=k.onRecoverableError),k.formState!==void 0&&(Ee=k.formState)),A=hZ(p,1,!0,A,k??null,D,B,Ee,G,se,de,wZ),A.context=dZ(null),k=A.current,D=wo(),D=Zn(D),B=ph(D),B.callback=null,mh(k,B,D),k=D,A.current.lanes=k,qt(A,k),Lc(A),p[kn]=A.current,TT(p),new m8(A)},Px.version="19.2.6",Px}var _Z;function dwe(){if(_Z)return YT.exports;_Z=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),YT.exports=hwe(),YT.exports}var pwe=dwe();function mf(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function FA(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function mR(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}const lre="hyperframes-studio:anonymousId",cre="hf-studio-anon-id";let rp=null;function mwe(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_DISTINCT_ID;return typeof t=="string"&&t.length>0?t:null}catch{return null}}function eP(t,e){for(const n of[lre,cre])try{t.setItem(n,e)}catch{}}function gR(){if(rp)return rp;const t=FA(),e=mwe();if(e)return rp=e,t&&eP(t,e),e;if(t){let r=null;try{r=t.getItem(lre)??t.getItem(cre)}catch{}if(r)return rp=r,eP(t,r),r}else return rp=mf(),rp;const n=mf();return rp=n,eP(t,n),n}const gwe="hyperframes-studio:telemetryDisabled",ure="hyperframes-studio:telemetryNoticeShown";function fre(){return gR()}function hre(t){var e;try{return((e=FA())==null?void 0:e.getItem(t))==="1"}catch{return!1}}function ywe(){return hre(gwe)}function xwe(){return hre(ure)}function bwe(){var t;try{(t=FA())==null||t.setItem(ure,"1")}catch{}}const dre="hyperframes-studio:sessionStartFired";function vwe(){var t;return((t=mR())==null?void 0:t.getItem(dre))==="1"}function Awe(){var t;try{(t=mR())==null||t.setItem(dre,"1")}catch{}}const Swe="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",wwe="hf-studio-telemetry-opt-out";function Owe(){try{return localStorage.getItem(wwe)==="1"}catch{return!1}}function kwe(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function Cwe(){return Swe.startsWith("phc_")}function Ewe(){try{return!1}catch{return!1}}function Twe(){try{return!1}catch{return!1}}function $A(){try{return Pwe()}catch{return!1}}function Pwe(){return Cwe()&&!Ewe()&&!Twe()&&!ywe()&&!Owe()&&!kwe()}let Cm;function Mwe(){if(Cm!==void 0)return Cm;if(typeof window>"u")return Cm=null,Cm;const t=window.__HF_CLI_AGENT_RUNTIME;return Cm=typeof t=="string"&&t.length>0?t:null,Cm}function pre(){return Mwe()??"none"}const Nwe={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1,studio_version:"dev",agent_runtime:"none"};let Em=null;function Dwe(){if(Em)return Em;if(typeof navigator>"u"||typeof window>"u")return Em=Nwe,Em;const t=navigator.userAgent,e=window.screen;return Em={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t),studio_version:"0.8.10",agent_runtime:pre()},Em}function Iwe(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e>>>0}function _we(t,e){return Iwe(`${t}:${e}`)%100}function Rwe(t){var i;if(t.override===!0)return{enabled:!0,reason:"forced_on"};if(t.override===!1)return{enabled:!1,reason:"forced_off"};const e=Math.max(0,Math.min(100,Math.trunc(t.percentage)));if(e<=0)return{enabled:!1,reason:"out_of_cohort"};if(e>=100)return{enabled:!0,reason:"in_cohort"};if(t.exclude)return{enabled:!1,reason:"excluded"};const n=(i=t.unitId)==null?void 0:i.trim();if(!n)return{enabled:!1,reason:"no_unit_id"};const r=_we(t.feature,n);return r<e?{enabled:!0,reason:"in_cohort",bucket:r}:{enabled:!1,reason:"out_of_cohort",bucket:r}}function RZ(t){const e=t==null?void 0:t.trim().toLowerCase();if(!(e===void 0||e==="")){if(e==="1"||e==="true"||e==="on"||e==="yes")return!0;if(e==="0"||e==="false"||e==="off"||e==="no")return!1}}const jwe="$feature/canary-";function Lwe(t){return`${jwe}${t}`}function Fwe(t){return`canary_reason_${t.replace(/[^A-Za-z0-9]+/g,"_")}`}function $we(t){const e={};for(const n of t)e[Lwe(n.name)]=n.enabled?"true":"false",n.reason!==void 0&&(e[Fwe(n.name)]=n.reason);return e}const mre=[{name:"calibration-10",percentage:10,description:"Inert. Validates rollout accuracy and cumulative-exposure drift at 10%.",owner:"vance",sunsetAfter:"2026-09-15"},{name:"calibration-50",percentage:50,description:"Inert. Second calibration point, and an independence check against calibration-10.",owner:"vance",sunsetAfter:"2026-09-15"}];function Bwe(t){return mre.find(e=>e.name===t)}function Vwe(t){return`hf_canary_${t.toLowerCase().replace(/[^a-z0-9]+/g,"_")}`}function Hwe(t){var e;try{if(typeof window>"u")return;const n=(e=window.__HF_CLI_CANARY_DECISIONS)==null?void 0:e[t];return typeof(n==null?void 0:n.enabled)!="boolean"?void 0:{enabled:n.enabled,forced:n.forced===!0}}catch{return}}function Qwe(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_BUCKET_SEED;if(typeof t=="string"&&t.length>0)return t}catch{}return gR()}const Zwe="hyperframes-studio:canary:";function zwe(t){if(typeof window>"u")return;const e=Vwe(t),n=`${Zwe}${t}`,r=mR();let i=null;try{i=new URLSearchParams(window.location.search).get(e)}catch{i=null}if(i!==null){if(i.trim().toLowerCase()==="reset"){r==null||r.removeItem(n);return}try{r==null||r.setItem(n,i)}catch{}return RZ(i)}return RZ((r==null?void 0:r.getItem(n))??void 0)}function jZ(){return typeof navigator>"u"?!1:navigator.webdriver===!0}const LZ=new Map,FZ=t=>({enabled:t,reason:t?"forced_on":"forced_off"}),Gwe=t=>({enabled:t,reason:t?"in_cohort":"out_of_cohort"});function Uwe(t){const e=Bwe(t);if(!e)return{enabled:!1,reason:"out_of_cohort"};const n=Hwe(e.name);if(n!=null&&n.forced)return FZ(n.enabled);const r=zwe(e.name);if(r===void 0){if(!$A())return{enabled:!1,reason:"telemetry_opt_out"};if(jZ())return{enabled:!1,reason:"excluded"};if(n!==void 0)return Gwe(n.enabled)}return r!==void 0?FZ(r):Rwe({feature:e.name,unitId:Qwe(),percentage:e.percentage,exclude:jZ()})}function Xwe(t){const e=LZ.get(t);if(e)return e;const n=Uwe(t);return LZ.set(t,n),n}function gre(){return $we(mre.map(t=>{const{enabled:e,reason:n}=Xwe(t.name);return{name:t.name,enabled:e,reason:n}}))}const Wwe=14,Ywe=["action","tab","panel","status","mode","reason","format","via"],r4=[],qwe=Date.now();function Kwe(t){for(const e of Ywe){const n=t[e];if(typeof n=="string"&&n.length>0&&n.length<=24)return`:${n}`;if(typeof n=="number"||typeof n=="boolean")return`:${String(n)}`}return""}function Jwe(t,e){const n=t.replace(/^studio[:_]/,"");r4.push({at:Date.now()-qwe,label:`${n}${Kwe(e)}`}),r4.length>Wwe&&r4.shift()}function e8e(){return r4.map(t=>`${(t.at/1e3).toFixed(1)} ${t.label}`).join(" > ")}const t8e="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",n8e="https://us.i.posthog.com",r8e=1e3;let i4=[],tP=null;function i8e(){return $A()}function Yo(t,e={}){if(!i8e())return;Jwe(t,e);const n=Dwe();i4.push({event:t,properties:{...e,...n,...gre()},timestamp:new Date().toISOString()}),tP===null&&(tP=setTimeout(()=>{tP=null,iI()},r8e)),a8e()}function iI(){if(i4.length===0)return;const t=fre(),e=i4.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));i4=[],s8e(`${n8e}/batch/`,JSON.stringify({api_key:t8e,batch:e}))}function s8e(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function a8e(){xwe()||(bwe(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>iI(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&iI()}));function o8e(t){Yo("studio_session_start",{has_project:t.has_project})}function l8e(t){Yo("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function c8e(t){Yo("studio_timeline_performance",t)}function u8e(){var t,e;try{const n=navigator,i=[`ua=${((t=n.userAgentData)==null?void 0:t.platform)??navigator.platform??"unknown"}`,`screen=${screen.width}x${screen.height}@${devicePixelRatio}x`,`lang=${navigator.language}`];return n.deviceMemory&&i.push(`mem=${n.deviceMemory}GB`),(e=n.connection)!=null&&e.effectiveType&&i.push(`net=${n.connection.effectiveType}`),navigator.hardwareConcurrency&&i.push(`cpu=${navigator.hardwareConcurrency}cores`),i.join(" ")}catch{return""}}function f8e(t){Yo("studio_razor_split",{mode:t.mode,count:t.count})}function Tm(t){Yo("studio_expanded_clip_edit",{action:t.action})}function $Z(t){Yo("studio_keyframe_lane_expand",{expanded:t.expanded})}function yR(t){Yo("studio_segment_ease_edit",{action:t.action,ease:t.ease})}function h8e(t){Yo("studio_feedback_shown",{reason:t.reason,render_id:t.render_id,source:"studio"})}function d8e(t){Yo("studio_feedback_dismissed",{reason:t.reason,render_id:t.render_id,via:t.via,had_rating:t.had_rating,source:"studio"})}function p8e(t){Yo("studio_feedback_interview_click",{reason:t.reason,source:"studio"})}function m8e(t){Yo("studio_feedback",{...t.rating===void 0?{}:{rating:t.rating,rating_scale:10},...t.comment?{comment:t.comment}:{},...t.context,reason:t.reason,render_id:t.render_id,question:t.question,answer_kind:t.answer_kind,doctor_summary:u8e(),breadcrumbs:e8e(),source:"studio"})}function y8(t){Yo("studio_block_param_commit",{tone:t.tone,block_name:t.blockName,param_key:t.key})}async function g8e(t){try{const e=await t.json();if(typeof e=="object"&&e!==null){const{error:n,hint:r}=e;if(typeof n=="string"&&n)return typeof r=="string"&&r?`${n}. ${r}`:n}}catch{}return`Server error (${t.status}). Check the terminal for details.`}function y8e(t){const e=(t==null?void 0:t.title)??"FFmpeg not found",n=(t==null?void 0:t.command)??(t==null?void 0:t.hint);return n?`${e}. Install it with: ${n}`:`${e}. Install FFmpeg to export.`}let Mx=null;const x8=t=>typeof t=="string"&&t?t:void 0;function x8e(t){if(typeof t!="object"||t===null)return null;const{ok:e,title:n,detail:r,hint:i,command:s}=t;return typeof e!="boolean"?null:{ok:e,title:x8(n),detail:x8(r),hint:x8(i),command:x8(s)}}async function b8e(){try{const t=await fetch("/api/environment/ffmpeg");return t.ok?x8e(await t.json()):null}catch{return null}}function v8e(){const[t,e]=x.useState(Mx),[n,r]=x.useState(Mx===null),i=x.useRef(!0);x.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const s=x.useCallback(async()=>{r(!0);const o=await b8e();Mx=o,i.current&&(e(o),r(!1))},[]);x.useEffect(()=>{Mx===null&&s()},[s]);const a=x.useCallback(()=>{Mx=null,s()},[s]);return{status:t,checking:n,recheck:a}}function BZ(t){return t!=="render_complete"}const VZ=[{id:"remove",prompt:"What would you cut from Studio?",placeholder:"The part you never use",presets:[{label:"Layers panel",hint:"The layer tree on the right"},{label:"Variables panel",hint:"Composition variables on the right"},{label:"Blocks browser",hint:"The block library in the sidebar"},{label:"Storyboard mode",hint:"The storyboard view next to Preview"},{label:"Caption editing",hint:"Editing caption words and presets in Studio"},{label:"Render history",hint:"The list of past exports"},{label:"Nothing",hint:"It all earns its place"}]},{id:"workaround",prompt:"What did you have to do outside Studio?",placeholder:"The step you finished somewhere else",presets:[{label:"Fix the exported file",hint:"Remuxing or re-encoding the output by hand"},{label:"Convert source media",hint:"Re-encoding footage before it would import cleanly"},{label:"Match loudness",hint:"Normalising levels across the finished audio"},{label:"Make images or graphics",hint:"Creating visual assets in another tool"},{label:"Record footage",hint:"Capturing screen or camera video"},{label:"Nothing, it was all here",hint:"No outside tools needed"}]},{id:"fix",prompt:"What should we fix first?",placeholder:"The thing that slowed you down",presets:[{label:"Audio mixing",hint:"Levels, ducking or the balance in the exported mix"},{label:"Export encoding",hint:"The render fails, or the finished file is wrong"},{label:"Export matches preview",hint:"The exported video differs from the preview"},{label:"Media and fonts",hint:"Adding video, images or fonts to a project"},{label:"Render speed",hint:"Exports take too long to finish"},{label:"Re-rendering everything",hint:"A small change means rendering the whole thing"},{label:"Checks and warnings",hint:"Lint flags things that are fine, or misses real ones"}]}],A8e={id:"detractor",prompt:"What went wrong?",placeholder:"The thing that made that a low score",presets:[{label:"Export failed",hint:"The render did not finish"},{label:"Output looked wrong",hint:"It rendered, but not the way I built it"},{label:"Crashed or froze",hint:"The editor stopped responding"},{label:"Lost my edits",hint:"Changes did not save, or came back changed"},{label:"Too slow",hint:"Waiting on renders, or the editor itself lagging"},{label:"Could not figure it out",hint:"Could not find or understand something"}]},S8e=6;function w8e(t){return t<=S8e?A8e:VZ[Math.floor(Math.random()*VZ.length)]}const e6={dismissedAt:"hyperframes-studio:feedbackDismissedAt",answeredAt:"hyperframes-studio:feedbackAnsweredAt"},yre="hyperframes-studio:feedbackAskedThisSession",xre=864e5,O8e=30*xre,k8e=7*xre;let S2=null;function C8e(){try{return!1}catch{return!1}}function HZ(t){try{return parseInt(window.localStorage.getItem(t)||"0",10)||0}catch{return 0}}function bre(t,e){try{window.localStorage.setItem(t,String(e))}catch{}}function E8e(){try{return window.sessionStorage.getItem(yre)==="1"}catch{return!0}}function T8e(){try{window.sessionStorage.setItem(yre,"1")}catch{}}function P8e(t){return!(C8e()||!$A()||E8e()||t-HZ(e6.answeredAt)<O8e||t-HZ(e6.dismissedAt)<k8e)}function vre(t){S2&&P8e(Date.now())&&(T8e(),S2(t))}function M8e(t){return S2=t,()=>{S2===t&&(S2=null)}}function N8e(){bre(e6.answeredAt,Date.now())}function D8e(){bre(e6.dismissedAt,Date.now())}function Are(t){return`hf-studio-hidden-renders:${t}`}function QZ(t){try{const e=window.localStorage.getItem(Are(t)),n=e?JSON.parse(e):[];return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function I8e(t,e){try{window.localStorage.setItem(Are(t),JSON.stringify([...e].slice(-200)))}catch{}}function _8e(t){const[e,n]=x.useState([]),[r,i]=x.useState(null),[s,a]=x.useState(null),{status:o,checking:l,recheck:c}=v8e(),u=o!==null&&!o.ok,f=x.useRef(null),h=x.useRef(null),d=x.useRef(new Map),y=x.useRef(new Set),g=x.useCallback((I,_)=>{d.current.set(I.id,_),n(j=>[...j,I])},[]),v=x.useCallback(I=>{var _;I&&h.current!==I||((_=f.current)==null||_.close(),f.current=null,h.current=null)},[]),b=x.useCallback(async()=>{if(t)try{const I=await fetch(`/api/projects/${t}/renders`);if(!I.ok){i(`Couldn't load render history (server error ${I.status}).`);return}const _=await I.json();if(i(null),Array.isArray(_.renders)){const j=QZ(t);n(L=>{const V=new Set(L.map(Z=>Z.id)),$=_.renders.filter(Z=>!V.has(Z.id)&&!j.has(Z.id)).map(Z=>({id:Z.id,status:Z.status==="failed"?"failed":"complete",progress:100,filename:Z.filename,createdAt:Z.createdAt,durationMs:Z.durationMs}));return[...L,...$]})}}catch{i("Couldn't load render history. Is the studio server running?")}},[t]);x.useEffect(()=>{b()},[b]);const w=x.useCallback(async(I={})=>{if(!t)return;if(u){g({id:mf(),status:"failed",progress:0,error:y8e(o),filename:"Export blocked",createdAt:Date.now()},{});return}const _=I.fps??30,j=I.quality??"standard",L=I.format??"mp4",V=I.resolution,$=I.composition;l8e({fps:_,quality:j,format:L,resolution:V,composition:$});const Z=Date.now(),W={render_format:L,render_quality:j,render_fps:_,render_resolution:V??"auto",render_composition:$??"index.html",render_has_variables:!!(I.variables&&Object.keys(I.variables).length>0)},Y={fps:_,quality:j,format:L};$A()?Y.telemetryDistinctId=fre():Y.telemetryOptOut=!0,V&&V!=="auto"&&(Y.resolution=V),$&&(Y.composition=$),I.variables&&Object.keys(I.variables).length>0&&(Y.variables=I.variables);let J;try{J=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)})}catch(U){const z=U instanceof Error?U.message:String(U),K={id:mf(),status:"failed",progress:0,error:`Could not reach render server: ${z}. Use \`hyperframes render\` from the CLI instead.`,filename:"Export failed",createdAt:Z};g(K,W);return}if(!J.ok){const U={id:mf(),status:"failed",progress:0,error:await g8e(J),filename:"Export failed",createdAt:Z};g(U,W);return}const{jobId:ne}=await J.json(),le={mp4:".mp4",webm:".webm",mov:".mov"}[L]??".mp4",q={id:ne,status:"rendering",progress:0,filename:`${ne}${le}`,createdAt:Z};g(q,W),h.current=ne;const F=new EventSource(`/api/render/${ne}/progress`);return f.current=F,F.addEventListener("progress",U=>{try{const z=JSON.parse(U.data),K=z.status==="complete"||z.status==="failed"||z.status==="cancelled";n(te=>te.map(ee=>ee.id===ne?{...ee,progress:z.progress??ee.progress,stage:z.stage??z.message??ee.stage,status:K?z.status:ee.status,durationMs:z.status==="complete"?Date.now()-Z:void 0,error:z.error??ee.error}:ee)),K&&v(ne)}catch{}}),F.onerror=()=>{F.close(),n(U=>U.map(z=>z.id===ne&&z.status==="rendering"?{...z,status:"failed",error:"Connection lost. Is the render server running?"}:z)),h.current=null},ne},[t,v,g,o,u]),O=x.useCallback(async I=>{a(null),v(I),n(_=>_.map(j=>j.id===I&&j.status==="rendering"?{...j,status:"cancelled"}:j));try{const _=await fetch(`/api/render/${I}/cancel`,{method:"POST"});if(!_.ok&&_.status!==404){a("Couldn't cancel on the server — the render may still be running.");return}if(_.ok){const j=await _.json().catch(()=>null);j!=null&&j.status&&j.status!=="cancelled"&&b()}}catch{a("Couldn't reach the server to cancel — the render may still be running.")}},[v,b]),C=x.useCallback(async I=>{a(null),v(I);try{if(!(await fetch(`/api/render/${I}`,{method:"DELETE"})).ok){a("Couldn't delete the render — it's still on disk.");return}}catch{a("Couldn't reach the server to delete the render.");return}n(_=>_.filter(j=>j.id!==I))},[v]),E=x.useCallback(()=>{n(I=>{const _=I.filter(j=>j.status!=="rendering");if(t&&_.length>0){const j=QZ(t);for(const L of _)j.add(L.id);I8e(t,j)}return I.filter(j=>j.status==="rendering")})},[t]),M=x.useCallback(()=>a(null),[]);x.useEffect(()=>{for(const I of e){if(I.status==="rendering"||I.status==="cancelled")continue;const _=d.current.get(I.id);!_||y.current.has(I.id)||(y.current.add(I.id),vre({reason:I.status==="complete"?"render_complete":"render_failed",renderId:I.id,detail:I.error,context:{..._,render_progress:I.progress,render_duration_ms:I.durationMs??Date.now()-I.createdAt,render_stage:I.stage,render_error:I.error,renders_this_session:d.current.size}}))}},[e]),x.useEffect(()=>()=>{var I;(I=f.current)==null||I.close(),f.current=null},[t]);const N=e.some(I=>I.status==="rendering");return x.useMemo(()=>({jobs:e,isRendering:N,loadError:r,actionError:s,dismissActionError:M,reloadRenders:b,deleteRender:C,cancelRender:O,clearCompleted:E,startRender:w,ffmpeg:o,ffmpegMissing:u,ffmpegChecking:l,recheckFfmpeg:c}),[e,N,r,s,M,b,C,O,E,w,o,u,l,c])}const R8e="modulepreload",j8e=function(t){return"/"+t},ZZ={},BA=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=a(n.map(c=>{if(c=j8e(c),c in ZZ)return;ZZ[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":R8e,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((d,y)=>{h.addEventListener("load",d),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};function L8e(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function Ar(t){x.useEffect(t,[])}const zZ=t=>{let e;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const h=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(d=>d(e,h))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=e=t(r,i,o);return o},F8e=(t=>t?zZ(t):zZ),$8e=t=>t;function B8e(t,e=$8e){const n=Ab.useSyncExternalStore(t.subscribe,Ab.useCallback(()=>e(t.getState()),[t,e]),Ab.useCallback(()=>e(t.getInitialState()),[t,e]));return Ab.useDebugValue(n),n}const GZ=t=>{const e=F8e(t),n=r=>B8e(e,r);return Object.assign(n,e),n},ZC=(t=>t?GZ(t):GZ),yv=ZC(t=>({values:null,setValues:e=>t({values:e&&Object.keys(e).length>0?e:null})}));function Sre(t){const e=yv.getState().values;e?t.searchParams.set("variables",JSON.stringify(e)):t.searchParams.delete("variables")}const wre={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","enabled:hover:bg-neutral-200","enabled:active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","enabled:hover:bg-surface-hover enabled:hover:text-white enabled:hover:border-border-strong","enabled:active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","enabled:hover:bg-red-600","enabled:active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","enabled:hover:bg-surface-hover enabled:hover:text-white","enabled:active:scale-[0.98]"].join(" ")},V8e={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"},$o=x.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:s="",disabled:a,...o},l)=>m.jsxs("button",{ref:l,disabled:a||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",wre[t],V8e[e],s].join(" "),...o,children:[n?m.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?m.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&m.jsx("span",{children:i})]}));$o.displayName="Button";const H8e={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"},Q8e=x.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},s)=>m.jsx("button",{ref:s,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",wre[n],H8e[e],r].join(" "),...i,children:t}));Q8e.displayName="IconButton";function UZ({title:t,detail:e,mono:n,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 m.jsxs("div",{className:"hf-loader",role:"status",draggable:!1,children:[m.jsx("div",{className:"hf-loader-mark-frame",style:{width:a,height:a},draggable:!1,children:m.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:[m.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:m.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:m.jsxs("g",{transform:"translate(-50 -50)",children:[m.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)"}),m.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)"})]})})}),m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),m.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),m.jsx("div",{className:"hf-loader-title",children:t}),e&&m.jsx("div",{className:"hf-loader-detail",children:e}),s!==void 0&&m.jsx("div",{className:"hf-loader-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s*100),children:m.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${s})`}})}),n&&m.jsx("div",{className:"hf-loader-mono",children:n})]})}var _l=ore();function s4(t,e,n){return Math.max(e,Math.min(n,t))}function Z8e(t,e,n,r){const i=e/2,s=i+r;return s4(t,s,Math.max(s,n-i-r))}function Ore(t,e,n,r){const i=(r==null?void 0:r.offset)??8,s=(r==null?void 0:r.margin)??12,a=Math.max(s,e.width-n.width-s),o=t.left+t.width/2-n.width/2,l=s4(o,s,a),c=t.bottom+i,u=t.top-n.height-i,f=c+n.height<=e.height-s,h=u>=s;return f||!h?{left:l,top:s4(c,s,Math.max(s,e.height-n.height-s)),placement:"bottom"}:{left:l,top:s4(u,s,Math.max(s,e.height-n.height-s)),placement:"top"}}const XZ=28,nP=8;function yr({label:t,children:e,delay:n=400,side:r="top"}){const[i,s]=x.useState(!1),[a,o]=x.useState({x:0,y:0}),[l,c]=x.useState(r),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),[d,y]=x.useState(0),g=x.useId(),v=x.useCallback(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{const O=f.current;if(!O)return;const E=(O.firstElementChild??O).getBoundingClientRect();if(E.width===0&&E.height===0)return;let M=r;r==="top"&&E.top-XZ-6<nP?M="bottom":r==="bottom"&&E.bottom+XZ+6>window.innerHeight-nP&&(M="top"),c(M),o({x:E.left+E.width/2,y:M==="top"?E.top-6:E.bottom+6}),s(!0)},n)},[n,r]),b=x.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),s(!1)},[]);x.useLayoutEffect(()=>{var O;y(i?((O=h.current)==null?void 0:O.offsetWidth)??0:0)},[i,t]),x.useEffect(()=>{if(!i)return;const O=C=>{C.key==="Escape"&&b()};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[i,b]);const w=Z8e(a.x,d,window.innerWidth,nP);return m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:f,onPointerEnter:v,onPointerLeave:b,onFocus:v,onBlur:b,"aria-describedby":i?g:void 0,className:"contents",children:e}),i&&_l.createPortal(m.jsx("div",{className:"fixed z-[200] pointer-events-none",style:{left:w,top:a.y,transform:l==="top"?"translate(-50%, -100%)":"translate(-50%, 0)"},children:m.jsx("div",{ref:h,role:"tooltip",id:g,className:"px-2 py-1 rounded-md bg-neutral-800 border border-neutral-700/50 text-[10px] font-medium text-neutral-200 whitespace-nowrap shadow-lg",children:t})}),document.body)]})}const z8e=3,G8e=3;function sI(t){return typeof t=="object"&&t!==null}function U8e(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!sI(e))return null;const n=e.state;return sI(n)?n.loading===!0&&n.ready!==!0:null}const X8e=400,WZ="The composition preview did not become ready.";function W8e(t){return!(t instanceof CustomEvent)||!sI(t.detail)?WZ:typeof t.detail.message=="string"&&t.detail.message.trim()?t.detail.message:WZ}function Y8e(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function q8e(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function YZ(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const s of r.querySelectorAll("video, audio"))if(q8e(s)&&!s.error&&s.networkState!==G8e&&s.readyState<z8e)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const s of i)if(!L8e(s))return!0}return!1}catch{return e}}const aI=x.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:s,suppressLoadingOverlay:a},o)=>{const l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),d=x.useRef(0),[y,g]=x.useState(!1),[v,b]=x.useState(!1),[w,O]=x.useState(!1),[C,E]=x.useState(!1),[M,N]=x.useState(!1),[I,_]=x.useState(!0),[j,L]=x.useState(!0),[V,$]=x.useState(null);x.useEffect(()=>{if(!I){L(!0);return}const J=setTimeout(()=>L(!1),X8e);return()=>clearTimeout(J)},[I]),Ar(()=>{const J=l.current;if(!J)return;let ne=!1,ie;return BA(()=>import("./hyperframes-player-DoTrWV8q.js"),[]).then(()=>{if(ne)return;const le=document.createElement("hyperframes-player"),q=new URL(e||`/api/projects/${t}/preview`,window.location.origin);Sre(q);const F=q.pathname+q.search,U=()=>{d.current+=1;const oe=new URL(F,window.location.origin);oe.searchParams.set("_hfStudioRetry",String(d.current)),$(null),_(!0),le.setAttribute("src",oe.pathname+oe.search)};h.current=U;const z=le.iframeElement,K=oe=>oe.stopImmediatePropagation(),te=oe=>{const fe=U8e(oe);fe!==null&&N(fe)},ee=()=>{$(null),_(!1)},H=oe=>{$(W8e(oe)),_(!1)},Q=()=>{if(c.current++,$(null),N(!1),_(!0),c.current>1){J.classList.remove("preview-revealing"),J.offsetWidth,J.classList.add("preview-revealing");const pe=()=>J.classList.remove("preview-revealing");J.addEventListener("animationend",pe,{once:!0})}n(),u.current&&clearInterval(u.current);let fe=c.current>1?!1:YZ(z,!1);if(fe){g(!0);let pe=0;u.current=setInterval(()=>{pe+=1,fe=YZ(z,fe),(!fe||pe>100)&&(fe&&pe>100&&console.debug("[studio] asset readiness poll hit the 10s cap — continuing with unloaded assets"),u.current&&clearInterval(u.current),u.current=null,g(!1))},100)}else g(!1)};if(z.addEventListener("load",Q),le.addEventListener("click",K,{capture:!0}),le.addEventListener("shadertransitionstate",te),le.addEventListener("ready",ee),le.addEventListener("error",H),typeof o=="function"?o(z):o&&(o.current=z),le.setAttribute("shader-capture-scale","1"),le.setAttribute("shader-loading","player"),le.setAttribute("width",String(i?1080:1920)),le.setAttribute("height",String(i?1920:1080)),le.style.width="100%",le.style.height="100%",le.style.display="block",le.style.background="transparent",le.setAttribute("src",F),J.appendChild(le),le.shadowRoot){const oe=document.createElement("style");oe.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",le.shadowRoot.appendChild(oe)}Y8e(le),ie=()=>{if(z.removeEventListener("load",Q),le.removeEventListener("click",K,{capture:!0}),le.removeEventListener("shadertransitionstate",te),le.removeEventListener("ready",ee),le.removeEventListener("error",H),u.current&&clearInterval(u.current),u.current=null,le.remove(),h.current===U&&(h.current=null),typeof o!="function"){if(o){const oe=o;oe.current===z&&(oe.current=null)}}}}),()=>{ne=!0,ie==null||ie()}}),x.useEffect(()=>{if(!y){E(!1);return}const J=setTimeout(()=>E(!0),3e3);return()=>clearTimeout(J)},[y]),x.useEffect(()=>{if(f.current&&(clearTimeout(f.current),f.current=null),y){b(!0),O(!1);return}return O(!0),f.current=setTimeout(()=>{b(!1),O(!1),f.current=null},240),()=>{f.current&&(clearTimeout(f.current),f.current=null)}},[y]);const Z=()=>{u.current&&(clearInterval(u.current),u.current=null),g(!1)},W=!a&&!j&&I,Y=v&&!M&&!W&&!V;return x.useEffect(()=>{r==null||r(W||Y)},[r,W,Y]),m.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:s,children:[m.jsx("div",{ref:l,className:"w-full h-full"}),W&&m.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:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),onPointerDown:J=>J.preventDefault(),children:m.jsx(UZ,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),Y&&m.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:w?0:1,pointerEvents:w?"none":"auto",transition:"opacity 180ms ease-in"},onDragStart:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),children:m.jsxs("div",{className:"flex flex-col items-center gap-3",children:[m.jsx(UZ,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56}),C&&m.jsx("button",{type:"button",onClick:Z,className:"px-3 py-1.5 text-[11px] rounded-md border border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800 transition-colors",children:"Continue anyway"})]})}),V&&m.jsx("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/90 px-6 text-center","data-hyperframes-ignore":"","data-testid":"composition-preview-error",children:m.jsxs("div",{className:"max-w-sm",children:[m.jsx("p",{className:"text-sm font-semibold text-white",children:"Preview failed to load"}),m.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:V}),m.jsx("button",{type:"button",className:"mt-4 rounded-md bg-white px-3 py-1.5 text-xs font-semibold text-black transition-colors hover:bg-neutral-200",onClick:()=>{var J;return(J=h.current)==null?void 0:J.call(h)},children:"Retry preview"})]})})]})});aI.displayName="Player";function Yu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kre(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
|
|
50
50
|
* GSAP 3.15.0
|
|
51
51
|
* https://gsap.com
|
|
52
52
|
*
|
|
@@ -67,7 +67,7 @@ Error generating stack: `+D.message+`
|
|
|
67
67
|
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
68
68
|
* Subject to the terms at https://gsap.com/standard-license
|
|
69
69
|
* @author: Jack Doyle, jack@greensock.com
|
|
70
|
-
*/var y4e=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,x4e=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,b4e=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,v4e=/(^[#\.][a-z]|[a-y][a-z])/i,A4e=Math.PI/180,v8=Math.sin,A8=Math.cos,oc=Math.abs,tf=Math.sqrt,S8=Math.atan2,mz=1e8,gz=function(e){return typeof e=="string"},Aie=function(e){return typeof e=="number"},yz=1e5,Ki=function(e){return Math.round(e*yz)/yz||0},xz=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001},S4e=function(e,n,r){var i=e.length,s=~~(r*i);if(e[s]>n){for(;--s&&e[s]>n;);s<0&&(s=0)}else for(;e[++s]<n&&s<i;);return s<i?s:i-1};function w4e(t){t=gz(t)&&v4e.test(t)&&document.querySelector(t)||t;var e=t.getAttribute?t:0,n;return e&&(t=t.getAttribute("d"))?(e._gsPath||(e._gsPath={}),n=e._gsPath[t],n&&!n._dirty?n:e._gsPath[t]=uf(t)):t?gz(t)?uf(t):Aie(t[0])?[t]:t:console.warn("Expecting a <path> element or an SVG path data string")}function Ob(t){var e=0,n;for(t.reverse();e<t.length;e+=2)n=t[e],t[e]=t[e+1],t[e+1]=n;t.reversed=!t.reversed}var O4e=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=[].slice.call(e.attributes),s=i.length,a;for(n=","+n+",";--s>-1;)a=i[s].nodeName.toLowerCase(),n.indexOf(","+a+",")<0&&r.setAttributeNS(null,a,i[s].nodeValue);return r},k4e={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"},C4e=function(e,n){for(var r=n?n.split(","):[],i={},s=r.length;--s>-1;)i[r[s]]=+e.getAttribute(r[s])||0;return i};function Sie(t,e){var n=t.tagName.toLowerCase(),r=.552284749831,i,s,a,o,l,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I,_;return n==="path"||!t.getBBox?t:(c=O4e(t,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),_=C4e(t,k4e[n]),n==="rect"?(o=_.rx,l=_.ry||o,s=_.x,a=_.y,d=_.width-o*2,y=_.height-l*2,o||l?(g=s+o*(1-r),v=s+o,b=v+d,w=b+o*r,O=b+o,C=a+l*(1-r),E=a+l,M=E+y,N=M+l*r,I=M+l,i="M"+O+","+E+" V"+M+" C"+[O,N,w,I,b,I,b-(b-v)/3,I,v+(b-v)/3,I,v,I,g,I,s,N,s,M,s,M-(M-E)/3,s,E+(M-E)/3,s,E,s,C,g,a,v,a,v+(b-v)/3,a,b-(b-v)/3,a,b,a,w,a,O,C,O,E].join(",")+"z"):i="M"+(s+d)+","+a+" v"+y+" h"+-d+" v"+-y+" h"+d+"z"):n==="circle"||n==="ellipse"?(n==="circle"?(o=l=_.r,f=o*r):(o=_.rx,l=_.ry,f=l*r),s=_.cx,a=_.cy,u=o*r,i="M"+(s+o)+","+a+" C"+[s+o,a+f,s+u,a+l,s,a+l,s-u,a+l,s-o,a+f,s-o,a,s-o,a-f,s-u,a-l,s,a-l,s+u,a-l,s+o,a-f,s+o,a].join(",")+"z"):n==="line"?i="M"+_.x1+","+_.y1+" L"+_.x2+","+_.y2:(n==="polyline"||n==="polygon")&&(h=(t.getAttribute("points")+"").match(x4e)||[],s=h.shift(),a=h.shift(),i="M"+s+","+a+" L"+h.join(","),n==="polygon"&&(i+=","+s+","+a+"z")),c.setAttribute("d",Tp(c._gsRawPath=uf(i))),e&&t.parentNode&&(t.parentNode.insertBefore(c,t),t.parentNode.removeChild(t)),c)}function wie(t,e,n){e=e||0,t.samples||(t.samples=[],t.lookup=[]);var r=~~t.resolution||12,i=1/r,s=t.length,a=t[e],o=t[e+1],l=e?e/6*r:0,c=t.samples,u=t.lookup,f=(e?t.minLength:mz)||mz,h=c[l+n*r-1],d=e?c[l-1]:0,y,g,v,b,w,O,C,E,M,N,I,_,j,L,V,$,Z;for(c.length=u.length=0,g=e+2;g<s;g+=6){if(v=t[g+4]-a,b=t[g+2]-a,w=t[g]-a,E=t[g+5]-o,M=t[g+3]-o,N=t[g+1]-o,O=C=I=_=0,oc(v)<.01&&oc(E)<.01&&oc(w)+oc(N)<.01)t.length>8&&(t.splice(g,6),g-=6,s-=6);else for(y=1;y<=r;y++)L=i*y,j=1-L,O=C-(C=(L*L*v+3*j*(L*b+j*w))*L),I=_-(_=(L*L*E+3*j*(L*M+j*N))*L),$=tf(I*I+O*O),$<f&&(f=$),d+=$,c[l++]=d;a+=v,o+=E}if(h)for(h-=d;l<c.length;l++)c[l]+=h;if(c.length&&f){if(t.totalLength=Z=c[c.length-1]||0,t.minLength=f,Z/f<9999)for($=V=0,y=0;y<Z;y+=f)u[$++]=c[V]<y?++V:V}else t.totalLength=c[0]=0;return e?d-c[e/2-1]:d}function Oie(t,e){var n,r,i;for(i=n=r=0;i<t.length;i++)t[i].resolution=12,n+=wie(t[i]),r+=t[i].length;return t.totalPoints=r,t.totalLength=n,t}function E4e(t,e,n,r,i,s,a,o,l){if(!(t===o&&e===l)){n=oc(n),r=oc(r);var c=i%360*A4e,u=A8(c),f=v8(c),h=Math.PI,d=h*2,y=(t-o)/2,g=(e-l)/2,v=u*y+f*g,b=-f*y+u*g,w=v*v,O=b*b,C=w/(n*n)+O/(r*r);C>1&&(n=tf(C)*n,r=tf(C)*r);var E=n*n,M=r*r,N=(E*M-E*O-M*w)/(E*O+M*w);N<0&&(N=0);var I=(s===a?-1:1)*tf(N),_=I*(n*b/r),j=I*-(r*v/n),L=(t+o)/2,V=(e+l)/2,$=L+(u*_-f*j),Z=V+(f*_+u*j),W=(v-_)/n,Y=(b-j)/r,J=(-v-_)/n,ne=(-b-j)/r,ie=W*W+Y*Y,le=(Y<0?-1:1)*Math.acos(W/tf(ie)),q=(W*ne-Y*J<0?-1:1)*Math.acos((W*J+Y*ne)/tf(ie*(J*J+ne*ne)));isNaN(q)&&(q=h),!a&&q>0?q-=d:a&&q<0&&(q+=d),le%=d,q%=d;var F=Math.ceil(oc(q)/(d/4)),U=[],z=q/F,K=4/3*v8(z/2)/(1+A8(z/2)),te=u*n,ee=f*n,H=f*-r,Q=u*r,oe;for(oe=0;oe<F;oe++)i=le+oe*z,v=A8(i),b=v8(i),W=A8(i+=z),Y=v8(i),U.push(v-K*b,b+K*v,W+K*Y,Y-K*W,W,Y);for(oe=0;oe<U.length;oe+=2)v=U[oe],b=U[oe+1],U[oe]=v*te+b*H+$,U[oe+1]=v*ee+b*Q+Z;return U[oe-2]=o,U[oe-1]=l,U}}function uf(t){var e=(t+"").replace(b4e,function(_){var j=+_;return j<1e-4&&j>-1e-4?0:j}).match(y4e)||[],n=[],r=0,i=0,s=2/3,a=e.length,o=0,l="ERROR: malformed path: "+t,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I=function(j,L,V,$){w=(V-j)/3,O=($-L)/3,g.push(j+w,L+O,V-w,$-O,V,$)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(l),n;for(c=0;c<a;c++)if(E=d,isNaN(e[c])?(d=e[c].toUpperCase(),y=d!==e[c]):c--,f=+e[c+1],h=+e[c+2],y&&(f+=r,h+=i),c||(v=f,b=h),d==="M")g&&(g.length<8?n.length-=1:o+=g.length,xz(g)),r=v=f,i=b=h,g=[f,h],n.push(g),c+=2,d="L";else if(d==="C")g||(g=[0,0]),y||(r=i=0),g.push(f,h,r+e[c+3]*1,i+e[c+4]*1,r+=e[c+5]*1,i+=e[c+6]*1),c+=6;else if(d==="S")w=r,O=i,(E==="C"||E==="S")&&(w+=r-g[g.length-4],O+=i-g[g.length-3]),y||(r=i=0),g.push(w,O,f,h,r+=e[c+3]*1,i+=e[c+4]*1),c+=4;else if(d==="Q")w=r+(f-r)*s,O=i+(h-i)*s,y||(r=i=0),r+=e[c+3]*1,i+=e[c+4]*1,g.push(w,O,r+(f-r)*s,i+(h-i)*s,r,i),c+=4;else if(d==="T")w=r-g[g.length-4],O=i-g[g.length-3],g.push(r+w,i+O,f+(r+w*1.5-f)*s,h+(i+O*1.5-h)*s,r=f,i=h),c+=2;else if(d==="H")I(r,i,r=f,i),c+=1;else if(d==="V")I(r,i,r,i=f+(y?i-r:0)),c+=1;else if(d==="L"||d==="Z")d==="Z"&&(f=v,h=b,g.closed=!0),(d==="L"||oc(r-f)>.5||oc(i-h)>.5)&&(I(r,i,f,h),d==="L"&&(c+=2)),r=f,i=h;else if(d==="A"){if(M=e[c+4],N=e[c+5],w=e[c+6],O=e[c+7],u=7,M.length>1&&(M.length<3?(O=w,w=N,u--):(O=N,w=M.substr(2),u-=2),N=M.charAt(1),M=M.charAt(0)),C=E4e(r,i,+e[c+1],+e[c+2],+e[c+3],+M,+N,(y?r:0)+w*1,(y?i:0)+O*1),c+=u,C)for(u=0;u<C.length;u++)g.push(C[u]);r=g[g.length-2],i=g[g.length-1]}else console.log(l);return c=g.length,c<6?(n.pop(),c=0):xz(g),n.totalPoints=o+c,n}function T4e(t,e){t.samples||wie(t);for(var n=t.samples,r=t.lookup,i=t.resolution,s=t.totalLength,a=t.slice(0,2),o=[],l=t.length-4,c=6,u=.2,f=0,h=0,d,y,g,v,b,w,O,C,E,M,N,I,_,j;c<l;c+=6)Math.abs(S8(t[c+1]-t[c-1],t[c]-t[c-2])-S8(t[c+3]-t[c+1],t[c+2]-t[c]))>u&&o.push(c);if(o.push(t.length-2),l=o.length,a.nonSmooth=I=[1],e>l)for(e-=l,b=0;b<l;b++){for(_=o[b],j=Math.round(_/6*i),E=n[j-1]-f,y=Math.round(n[j-1]/s*e)-h,h+=y,w=1/(y+1),O=1;O<=y;O++)M=f+E*O*w,c=r.length?r[M<s?~~(M/t.minLength):r.length-1]||0:S4e(n,M,M/s),g=c?n[c-1]:0,v=n[c],v<M&&(g=v,v=n[++c]),d=1/i*((M-g)/(v-g)+c%i)||0,C=1-d,c=~~(c/i)*6,N=t[c],a.push(Ki((d*d*(t[c+6]-N)+3*C*(d*(t[c+4]-N)+C*(t[c+2]-N)))*d+N),Ki((d*d*(t[c+7]-(N=t[c+1]))+3*C*(d*(t[c+5]-N)+C*(t[c+3]-N)))*d+N));I[a.length]=1,a.push(t[_],t[_+1]),f+=E}return c=t.length-2,t.closed&&Math.abs(S8(t[c+1]-t[c-1],t[c]-t[c-2])-S8(t[3]-t[1],t[2]-t[0]))<=u&&(I[0]=I[I.length-1]=0),a}function P4e(t,e){oc(t[0]-t[2])<1e-4&&oc(t[1]-t[3])<1e-4&&(t=t.slice(2));var n=t.length-2,r=+t[0],i=+t[1],s=+t[2],a=+t[3],o=[r,i,r,i],l=s-r,c=a-i,u=t.nonSmooth||[],f=Math.abs(t[n]-r)<.001&&Math.abs(t[n+1]-i)<.001,h,d,y,g,v,b,w,O,C,E,M,N,I,_,j;if(!n)return[r,i,r,i,r,i,r,i];for(f&&(t.push(s,a),s=r,a=i,r=t[n-2],i=t[n-1],t.unshift(r,i),n+=4,u=[0,0].concat(u)),e=e||e===0?+e:1,y=2;y<n;y+=2)if(h=r,d=i,r=s,i=a,s=+t[y+2],a=+t[y+3],!(r===s&&i===a)){if(g=l,v=c,l=s-r,c=a-i,u[y]){o.push(r-(r-h)/4,i-(i-d)/4,r,i,r+(s-r)/4,i+(a-i)/4);continue}b=tf(g*g+v*v),w=tf(l*l+c*c),O=tf(Math.pow(l/w+g/b,2)+Math.pow(c/w+v/b,2)),C=(b+w)*e*.25/O,E=r-(r-h)*(b?C/b:0),M=r+(s-r)*(w?C/w:0),N=r-(E+((M-E)*(b*3/(b+w)+.5)/4||0)),I=i-(i-d)*(b?C/b:0),_=i+(a-i)*(w?C/w:0),j=i-(I+((_-I)*(b*3/(b+w)+.5)/4||0)),o.push(Ki(E+N),Ki(I+j),Ki(r),Ki(i),Ki(M+N),Ki(_+j))}return r!==s||i!==a||o.length<4?o.push(Ki(s),Ki(a),Ki(s),Ki(a)):o.length-=2,o.length===2?o.push(r,i,r,i,r,i):f&&(o.splice(0,6),o.length-=6),o.closed=f,o}function Tp(t){Aie(t[0])&&(t=[t]);var e="",n=t.length,r,i,s,a;for(i=0;i<n;i++){for(a=t[i],e+="M"+Ki(a[0])+","+Ki(a[1])+" C",r=a.length,s=2;s<r;s++)e+=Ki(a[s++])+","+Ki(a[s++])+" "+Ki(a[s++])+","+Ki(a[s++])+" "+Ki(a[s++])+","+Ki(a[s])+" ";a.closed&&(e+="z")}return e}function l6(){return l6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l6.apply(this,arguments)}var xl,jR,kb,kie,Cb,Cie,Eie=function(){return xl||typeof window<"u"&&(xl=window.gsap)&&xl.registerPlugin&&xl},fP=function(e){return typeof e=="function"},c6=Math.atan2,bz=Math.cos,vz=Math.sin,Jp=Math.sqrt,XC=Math.PI,Az=XC*2,M4e=XC*.3,N4e=XC*.7,LR=1e20,Ev=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,D4e=/(^[#.][a-z]|[a-y][a-z])/i,I4e=/[achlmqstvz]/i,zh=function(e){return console&&console.warn(e)},Fc=function(e){return Math.round(e*1e5)/1e5||0},Sz=function(e){var n=e.length,r=0,i=0,s;for(s=0;s<n;s++)r+=e[s++],i+=e[s];return[r/(n/2),i/(n/2)]},_1=function(e){var n=e.length,r=e[0],i=r,s=e[1],a=s,o,l,c;for(c=6;c<n;c+=6)o=e[c],l=e[c+1],o>r?r=o:o<i&&(i=o),l>s?s=l:l<a&&(a=l);return e.centerX=(r+i)/2,e.centerY=(s+a)/2,e.size=(r-i)*(s-a)},C2=function(e,n){n===void 0&&(n=3);for(var r=e.length,i=e[0][0],s=i,a=e[0][1],o=a,l=1/n,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I;--r>-1;)for(d=e[r],c=d.length,h=6;h<c;h+=6)for(b=d[h],w=d[h+1],O=d[h+2]-b,M=d[h+3]-w,C=d[h+4]-b,N=d[h+5]-w,E=d[h+6]-b,I=d[h+7]-w,y=n;--y>-1;)g=l*y,v=1-g,u=(g*g*E+3*v*(g*C+v*O))*g+b,f=(g*g*I+3*v*(g*N+v*M))*g+w,u>i?i=u:u<s&&(s=u),f>a?a=f:f<o&&(o=f);return e.centerX=(i+s)/2,e.centerY=(a+o)/2,e.left=s,e.width=i-s,e.top=o,e.height=a-o,e.size=(i-s)*(a-o)},Tie=function(e,n){return n.length-e.length},wz=function(e,n){var r=e.size||_1(e),i=n.size||_1(n);return Math.abs(i-r)<(r+i)/20?n.centerX-e.centerX||n.centerY-e.centerY:i-r},Oz=function(e,n){var r=e.slice(0),i=e.length,s=i-2,a,o;for(n=n|0,a=0;a<i;a++)o=(a+n)%s,e[a++]=r[o],e[a]=r[o+1]},hP=function(e,n,r,i,s){var a=e.length,o=0,l=a-2,c,u,f,h;for(r*=6,u=0;u<a;u+=6)c=(u+r)%l,h=e[c]-(n[u]-i),f=e[c+1]-(n[u+1]-s),o+=Jp(f*f+h*h);return o},_4e=function(e,n,r){var i=e.length,s=Sz(e),a=Sz(n),o=a[0]-s[0],l=a[1]-s[1],c=hP(e,n,0,o,l),u=0,f,h,d;for(d=6;d<i;d+=6)h=hP(e,n,d/6,o,l),h<c&&(c=h,u=d);if(r)for(f=e.slice(0),Ob(f),d=6;d<i;d+=6)h=hP(f,n,d/6,o,l),h<c&&(c=h,u=-d);return u/6},R4e=function(e,n,r){for(var i=e.length,s=LR,a=0,o=0,l,c,u,f,h,d;--i>-1;)for(l=e[i],d=l.length,h=0;h<d;h+=6)c=l[h]-n,u=l[h+1]-r,f=Jp(c*c+u*u),f<s&&(s=f,a=l[h],o=l[h+1]);return[a,o]},j4e=function(e,n,r,i,s,a){var o=n.length,l=0,c=Math.min(e.size||_1(e),n[r].size||_1(n[r]))*i,u=LR,f=e.centerX+s,h=e.centerY+a,d,y,g,v,b;for(y=r;y<o&&(d=n[y].size||_1(n[y]),!(d<c));y++)g=n[y].centerX-f,v=n[y].centerY-h,b=Jp(g*g+v*v),b<u&&(l=y,u=b);return b=n[l],n.splice(l,1),b},L4e=function(e,n,r){r===void 0&&(r=1);for(var i=e[n],s=e[n+1],a=e[n+2],o=e[n+3],l=e[n+4],c=e[n+5],u=e[n+6],f=e[n+7],h,d,y,g,v,b,w,O,C;r-- >0;)h=1-1/(r+2),d=i+(a-i)*h,y=a+(l-a)*h,g=s+(o-s)*h,v=o+(c-o)*h,b=d+(y-d)*h,w=g+(v-g)*h,O=l+(u-l)*h,C=c+(f-c)*h,y+=(O-y)*h,v+=(C-v)*h,e.splice(n+2,4,a=Fc(d),o=Fc(g),l=Fc(b),c=Fc(w),u=Fc(b+(y-b)*h),f=Fc(w+(v-w)*h),Fc(y),Fc(v),Fc(O),Fc(C))},F4e=function(e){for(var n=e.length,r=-LR,i;n--;)e[n]>r&&(r=e[n],i=n);return i},c4=function(e,n){for(var r=[],i=[],s=e.length-2,a=0;a<s;a+=6)r.push(Math.pow(e[a]-e[a+6],2)+Math.pow(e[a+1]-e[a+7],2));for(;n--;)a=F4e(r),i[a]=s=(i[a]||0)+1,r[a]*=s/(s+1);for(a=r.length;a--;)i[a]&&L4e(e,a*6,i[a])},AI=function(e,n){return n||Oie(e),Math.max(4,Math.round(e.totalLength/4))},kz=function(e){return e.slice(0).sort(Tie)},Pie=function(e){for(var n=e[0],r=e[1],i=2;i<e.length;i+=2)if(Math.abs(e[i]-n)>.01||Math.abs(e[i+1]-r)>.01)return!1;return!0},dP=function(e,n){n=n||{};var r=n,i=r.redraw,s=r.points,a=r.maxSegments,o=a===void 0?999:a,l=0,c=e,u=Array.isArray(s)?s:0,f,h,d,y,g;if(i=i!==!1,i)Oie(e);else for(e.totalPoints=0,h=e.length;h--;)e.totalPoints+=e[h].length;for(u?(c=kz(e),u=kz(u),g=u[0].totalLength/Math.round(u[0].length/6)):((!s||s==="auto")&&(s=AI(e,i),i||(s-=Math.round(e.totalPoints/6))),s=Math.max(i?10:4,Math.min(999,s))),h=0;h<c.length;h++){if(d=c[h],f=Math.max(i?10:4,u?Math.round(u[h]?u[h].length/6:c[h].totalLength/g||0):Math.round((l/s+(i?d.totalLength/e.totalLength:d.length/e.totalPoints))*s)-l),!(h>=o||u&&(!u[h]||Pie(u[h]))))if(i){var v;y=P4e(T4e(d,f),n.curviness),d.length=0,(v=d).push.apply(v,y)}else c4(d,f);l+=f}return e},SI=function(e,n,r,i,s){var a=n.length-e.length,o=a>0?n:e,l=a>0?e:n,c=0,u=i==="complexity"?Tie:wz,f=i==="position"?0:typeof i=="number"?i:.8,h=l.length,d=typeof r=="object"&&r.push?r.slice(0):[r],y=d[0]==="reverse"||d[0]<0,g=r==="log",v,b,w,O,C,E,M;if(l[0]){if(o.length>1&&(e.sort(u),n.sort(u),o.size||C2(o),l.size||C2(l),E=o.centerX-l.centerX,M=o.centerY-l.centerY,u===wz))for(h=0;h<l.length;h++)o.splice(h,0,j4e(l[h],o,h,f,E,M));if(a)for(a<0&&(a=-a),o[0].length>l[0].length&&c4(l[0],(o[0].length-l[0].length)/6|0),h=l.length;c<a;)O=o[h].size||_1(o[h]),w=R4e(l,o[h].centerX,o[h].centerY),O=w[0],C=w[1],l[h++]=[O,C,O,C,O,C,O,C],l.totalPoints+=8,c++;for(h=0;h<e.length;h++)v=n[h],b=e[h],a=v.length-b.length,a<0?c4(v,-a/6|0):a>0&&c4(b,a/6|0),y&&s!==!1&&!b.reversed&&Ob(b),r=d[h]||d[h]===0?d[h]:"auto",r&&(b.closed||Math.abs(b[0]-b[b.length-2])<.5&&Math.abs(b[1]-b[b.length-1])<.5?r==="auto"||r==="log"?(d[h]=r=_4e(b,v,!h||s===!1),r<0&&(y=!0,Ob(b),r=-r),Oz(b,r*6)):r!=="reverse"&&(h&&r<0&&Ob(b),Oz(b,(r<0?-r:r)*6)):!y&&(r==="auto"&&Math.abs(v[0]-b[0])+Math.abs(v[1]-b[1])+Math.abs(v[v.length-2]-b[b.length-2])+Math.abs(v[v.length-1]-b[b.length-1])>Math.abs(v[0]-b[b.length-2])+Math.abs(v[1]-b[b.length-1])+Math.abs(v[v.length-2]-b[0])+Math.abs(v[v.length-1]-b[1])||r%2)?(Ob(b),d[h]=-1,y=!0):r==="auto"?d[h]=0:r==="reverse"&&(d[h]=-1),b.closed!==v.closed&&(b.closed=v.closed=!1));return g&&zh("shapeIndex:["+d.join(",")+"]"),e.shapeIndex=d,d}},Cz=function(e,n,r,i,s){var a=uf(e[0]),o=uf(e[1]);SI(a,o,n||n===0?n:"auto",r,s)&&(e[0]=Tp(a),e[1]=Tp(o),(i==="log"||i===!0)&&zh('precompile:["'+e[0]+'","'+e[1]+'"]'))},$4e=function(e,n){if(!n)return e;var r=e.match(Ev)||[],i=r.length,s="",a,o,l;for(n==="reverse"?(o=i-1,a=-2):(o=((parseInt(n,10)||0)*2+1+i*100)%i,a=2),l=0;l<i;l+=2)s+=r[o-1]+","+r[o]+" ",o=(o+a)%i;return s},Ez=function(e,n){var r=0,i=parseFloat(e[0]),s=parseFloat(e[1]),a=i+","+s+" ",o=.999999,l,c,u,f,h,d,y;for(u=e.length,l=n*.5/(u*.5-1),c=0;c<u-2;c+=2){if(r+=l,d=parseFloat(e[c+2]),y=parseFloat(e[c+3]),r>o)for(h=1/(Math.floor(r)+1),f=1;r>o;)a+=(i+(d-i)*h*f).toFixed(2)+","+(s+(y-s)*h*f).toFixed(2)+" ",r--,f++;a+=d+","+y+" ",i=d,s=y}return a},wI=function(e){var n=e[0].match(Ev)||[],r=e[1].match(Ev)||[],i=r.length-n.length;i>0?e[0]=Ez(n,i):e[1]=Ez(r,-i)},B4e=function(e){return isNaN(e)?wI:function(n){wI(n),n[1]=$4e(n[1],parseInt(e,10))}},V4e=function(e,n,r){var i=typeof e=="string",s,a;return(!i||D4e.test(e)||(e.match(Ev)||[]).length<3)&&(s=jR(e)[0],s?(a=(s.nodeName+"").toUpperCase(),n&&a!=="PATH"&&(s=Sie(s,!1),a="PATH"),e=s.getAttribute(a==="PATH"?"d":"points")||"",s===r&&(e=s.getAttributeNS(null,"data-original")||e)):(zh("WARNING: invalid morph to: "+e),e=!1)),e},Tz=function(e){for(var n=e.length,r,i,s,a,o,l,c,u;--n>-1;)for(r=e[n],u=r.cpData=r.cpData||[],u.length=0,c=r.length-2,l=0;l<c;l+=6)i=r[l]-r[l+2],s=r[l+1]-r[l+3],a=r[l+6]-r[l+4],o=r[l+7]-r[l+5],u[l+2]=c6(s,i),u[l+3]=Jp(i*i+s*s),u[l+4]=c6(o,a),u[l+5]=Jp(a*a+o*o);return e},Pz=function(e){var n=e.trim().split(" "),r=~e.indexOf("left")?0:~e.indexOf("right")?100:isNaN(parseFloat(n[0]))?50:parseFloat(n[0]),i=~e.indexOf("top")?0:~e.indexOf("bottom")?100:isNaN(parseFloat(n[1]))?50:parseFloat(n[1]);return{x:r/100,y:i/100}},Mie=function(e){return e!==e%XC?e+(e<0?Az:-Az):e},Mz="Use MorphSVGPlugin.convertToPath() to convert to a path before morphing.",H4e=function(e,n,r,i){var s=this._origin,a=this._eOrigin,o=e[r]-s.x,l=e[r+1]-s.y,c=Jp(o*o+l*l),u=c6(l,o),f,h;return o=n[r]-a.x,l=n[r+1]-a.y,f=c6(l,o)-u,h=Mie(f),!i&&kb&&Math.abs(h+kb.ca)<M4e&&(i=kb),this._anchorPT=kb={_next:this._anchorPT,t:e,sa:u,ca:i&&h*i.ca<0&&Math.abs(h)>N4e?f:h,sl:c,cl:Jp(o*o+l*l)-c,i:r}},Nz=function(e){xl=Eie(),Cb=Cb||xl&&xl.plugins.morphSVG,xl&&Cb?(jR=xl.utils.toArray,Cie=xl.core.reverting||function(){},Cb.prototype._tweenRotation=H4e,kie=1):e&&zh("Please gsap.registerPlugin(MorphSVGPlugin)")},u1={version:"3.15.0",name:"morphSVG",rawVars:1,register:function(e,n){xl=e,Cb=n,Nz()},init:function(e,n,r,i,s){if(kie||Nz(1),!n)return zh("invalid shape"),!1;fP(n)&&(n=n.call(r,i,e,s));var a,o,l,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I,_;if(typeof n=="string"||n.getBBox||n[0])n={shape:n};else if(typeof n=="object"){a={};for(o in n)a[o]=fP(n[o])&&o!=="render"?n[o].call(r,i,e,s):n[o];n=a}var j=e.nodeType?window.getComputedStyle(e):{},L=j.fill+"",V=!(L==="none"||(L.match(Ev)||[])[3]==="0"||j.fillRule==="evenodd"),$=n.smooth,Z=(n.origin||"50 50").split(",");if($===!0||$==="auto"?$={}:typeof $=="number"&&($={points:$}),a=(e.nodeName+"").toUpperCase(),u=a==="POLYLINE"||a==="POLYGON",a!=="PATH"&&!u&&!n.prop)return zh("Cannot morph a <"+a+"> element. "+Mz),!1;if(o=a==="PATH"?"d":"points",!n.prop&&!fP(e.setAttribute))return!1;if(c=V4e(n.shape||n.d||n.points||"",o==="d",e),u&&I4e.test(c))return zh("A <"+a+"> cannot accept path data. "+Mz),!1;if(f=n.shapeIndex||n.shapeIndex===0?n.shapeIndex:"auto",h=n.map||u1.defaultMap,this._prop=n.prop,this._render=n.render||u1.defaultRender,this._apply="updateTarget"in n?n.updateTarget:u1.defaultUpdateTarget,this._rnd=Math.pow(10,isNaN(n.precision)?2:+n.precision),this._tween=r,c){if(this._target=e,M=typeof n.precompile=="object",g=this._original=this._prop?e[this._prop]:e.getAttribute(o),!this._prop&&!e.getAttributeNS(null,"data-original")&&e.setAttributeNS(null,"data-original",g),o==="d"||this._prop){if(g=uf(M?n.precompile[0]:g),v=uf(M?n.precompile[1]:c),$){for(w=g.length;--w;)Pie(g[w])&&g.splice(w,1);dP(g,l6({},$,{points:+$.points||Math.max(AI(g),AI(v)),maxSegments:v.length})),dP(v,$.redraw===!1?$:l6({},$,{points:g}))}if(!M&&!SI(g,v,f,h,V))return!1;for((n.precompile==="log"||n.precompile===!0)&&zh('precompile:["'+Tp(g)+'","'+Tp(v)+'"]'),I=(n.type||u1.defaultType)!=="linear",_=n.curveMode||I,Tz(g),Tz(v),I&&(g.size||C2(g),v.size||C2(v),N=Pz(Z[0]),this._origin=g.origin={x:g.left+N.x*g.width,y:g.top+N.y*g.height},Z[1]&&(N=Pz(Z[1])),this._eOrigin={x:v.left+N.x*v.width,y:v.top+N.y*v.height}),this._rawPath=e._gsRawPath=g,w=g.length;--w>-1;){for(C=g[w],E=v[w],d=C.cpData,y=E.cpData,O=C.length,kb=0,b=0;b<O;b+=6)(E[b]!==C[b]||E[b+1]!==C[b+1])&&(I?l=this._tweenRotation(C,E,b):(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1),l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l));for(b=0;b<O;b+=2)_&&(d[b]!==y[b]||d[b+1]!==y[b+1])&&d[b+1]&&y[b+1]?this._controlPT={_next:this._controlPT,i:b,j:w,ai:b%6>3?b+2:b-2,sa:d[b],ca:Mie(y[b]-d[b]),sl:d[b+1],cl:y[b+1]-d[b+1]}:(E[b]!==C[b]&&(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1)),E[b+1]!==C[b+1]&&(l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l))}}else l=this.add(e,"setAttribute",e.getAttribute(o)+"",c+"",i,s,0,B4e(f),o);I&&(this.add(this._origin,"x",this._origin.x,this._eOrigin.x,0,0,0,0,0,1),l=this.add(this._origin,"y",this._origin.y,this._eOrigin.y,0,0,0,0,0,1)),l&&(this._props.push("morphSVG"),l.end=$&&$.persist!==!1?Tp(v):c,l.endProp=o)}return 1},render:function(e,n){for(var r=n._rawPath,i=n._controlPT,s=n._anchorPT,a=n._rnd,o=n._target,l=n._pt,c,u,f,h,d,y,g,v,b;l;)l.r(e,l.d),l=l._next;if(e===1&&n._apply)for(l=n._pt;l;)l.end&&(n._prop?o[n._prop]=l.end:o.setAttribute(l.endProp,l.end)),l=l._next;else if(r){for(;s;)d=s.sa+e*s.ca,h=s.sl+e*s.cl,s.t[s.i]=n._origin.x+bz(d)*h,s.t[s.i+1]=n._origin.y+vz(d)*h,s=s._next;for(;i;)f=r[i.j],y=i.i,d=i.sa+e*i.ca,v=vz(d),b=bz(d),h=i.sl+e*i.cl,f[y]=f[i.ai]-b*h,f[y+1]=f[i.ai+1]-v*h,i=i._next;if(!e&&Cie()&&(r=uf(n._original)),o._gsRawPath=r,n._apply){for(c="",u=" ",g=0;g<r.length;g++){for(f=r[g],h=f.length,c+="M"+(f[0]*a|0)/a+u+(f[1]*a|0)/a+" C",y=2;y<h;y++)c+=(f[y]*a|0)/a+u;f.closed&&(c+="z")}n._prop?o[n._prop]=c:o.setAttribute("d",c)}}n._render&&r&&n._render.call(n._tween,r,o)},kill:function(e){this._pt=this._rawPath=0},getRawPath:w4e,stringToRawPath:uf,rawPathToString:Tp,smoothRawPath:dP,normalizeStrings:function(e,n,r){var i=r.shapeIndex,s=r.map,a=[e,n];return Cz(a,i,s),a},pathFilter:Cz,pointsFilter:wI,getTotalSize:C2,equalizeSegmentQuantity:SI,convertToPath:function(e,n){return jR(e).map(function(r){return Sie(r,n!==!1)})},defaultType:"linear",defaultUpdateTarget:!0,defaultMap:"size"};Eie()&&xl.registerPlugin(u1);const Md=30;function ns(t){if(!Number.isFinite(t)||t<0)return"00:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function Tv(t,e=Md){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function FR(t,e=Md){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function Q4e(t,e,n=Md){const r=Tv(t,n),i=Math.max(0,r+e);return FR(i,n)}function Dz(t,e,n=Md){const r=Tv(t,n),i=Tv(e,n);return`${r}f / ${i}f`}const Nie="hf-studio-ui-preferences";function Iz(t){return typeof t=="object"&&t!==null}function Die(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function Iie(t){if(!t)return{};try{const e=t.getItem(Nie);if(!e)return{};const n=JSON.parse(e);if(!Iz(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.leftWidth=="number"&&Number.isFinite(n.leftWidth)&&(r.leftWidth=n.leftWidth),typeof n.rightWidth=="number"&&Number.isFinite(n.rightWidth)&&(r.rightWidth=n.rightWidth),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.timelineHeight=="number"&&Number.isFinite(n.timelineHeight)&&(r.timelineHeight=n.timelineHeight),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),typeof n.audioVolume=="number"&&Number.isFinite(n.audioVolume)&&n.audioVolume>=0&&n.audioVolume<=1&&(r.audioVolume=n.audioVolume),n.thumbnailMode==="adaptive"||n.thumbnailMode==="hidden"?r.thumbnailMode=n.thumbnailMode:typeof n.thumbnailsEnabled=="boolean"&&(r.thumbnailMode=n.thumbnailsEnabled?"adaptive":"hidden"),Iz(n.previewZoom)){const{zoomPercent:i,panX:s,panY:a}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof s=="number"&&Number.isFinite(s)&&typeof a=="number"&&Number.isFinite(a)&&(r.previewZoom={zoomPercent:i,panX:s,panY:a})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),typeof n.snapEnabled=="boolean"&&(r.snapEnabled=n.snapEnabled),typeof n.gridVisible=="boolean"&&(r.gridVisible=n.gridVisible),typeof n.gridSpacing=="number"&&Number.isFinite(n.gridSpacing)&&(r.gridSpacing=n.gridSpacing),typeof n.snapToGrid=="boolean"&&(r.snapToGrid=n.snapToGrid),typeof n.timelineSnapEnabled=="boolean"&&(r.timelineSnapEnabled=n.timelineSnapEnabled),(n.timeDisplayMode==="time"||n.timeDisplayMode==="frame")&&(r.timeDisplayMode=n.timeDisplayMode),(n.timelineZoomMode==="fit"||n.timelineZoomMode==="manual")&&(r.timelineZoomMode=n.timelineZoomMode),typeof n.timelineManualZoomPercent=="number"&&Number.isFinite(n.timelineManualZoomPercent)&&(r.timelineManualZoomPercent=n.timelineManualZoomPercent),r}catch{return{}}}function jo(t=Die()){return Iie(t)}function bl(t,e=Die()){if(e)try{const n={...Iie(e),...t};e.setItem(Nie,JSON.stringify(n))}catch{}}const _ie=10,Z4e=48,z4e=.5,G4e=2,U4e=.014;function $R(t){if(!Number.isFinite(t)||t<=0)return 100;const e=Md*Z4e;return Math.max(100,Math.round(e/t*100))}function T0(t,e){if(!Number.isFinite(t))return 100;const n=$R(e);return Math.max(_ie,Math.min(n,Math.round(t)))}function WC(t,e,n){return t==="fit"?100:T0(e,n)}function X4e(t,e){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?100:T0(t/e*100,e)}function W4e(t,e,n){if(!Number.isFinite(t)||t<=0)return 100;const r=WC(e,n,t);return e==="fit"?t:t*(r/100)}function _z(t,e,n,r){const i=WC(e,n,r),s=t==="in"?i*G4e:i*z4e;return T0(s,r)}function Y4e(t,e,n,r){const i=WC(e,n,r);return!Number.isFinite(t)||t===0?i:T0(i*Math.exp(-t*U4e),r)}const u6=Math.log(_ie);function q4e(t,e){const n=T0(t,e),r=Math.log($R(e));return(Math.log(n)-u6)/(r-u6)*100}function K4e(t,e){const n=Math.max(0,Math.min(100,t)),r=Math.log($R(e)),i=u6+n/100*(r-u6);return T0(Math.exp(i),e)}function Rie(t,e){return t.projectId===e.timelineProjectId&&t.sessionEpoch===e.timelineSessionEpoch&&t.elementId===e.selectedElementId}function J4e(t,e){return{selectedKeyframes:new Set,toggleSelectedKeyframe:n=>t(r=>{const i=new Set(r.selectedKeyframes);return i.has(n)?i.delete(n):i.add(n),{selectedKeyframes:i}}),clearSelectedKeyframes:()=>t({selectedKeyframes:new Set}),expandedClipIds:new Set,toggleClipExpanded:n=>t(r=>{const i=new Set(r.expandedClipIds);return i.has(n)?i.delete(n):i.add(n),{expandedClipIds:i}}),setClipExpanded:(n,r)=>t(i=>{if(i.expandedClipIds.has(n)===r)return i;const s=new Set(i.expandedClipIds);return r?s.add(n):s.delete(n),{expandedClipIds:s}}),expandClips:n=>t(r=>{if(n.every(s=>r.expandedClipIds.has(s)))return r;const i=new Set(r.expandedClipIds);for(const s of n)i.add(s);return{expandedClipIds:i}}),expandedGroupIds:new Set,toggleGroupExpanded:n=>t(r=>{const i=new Set(r.expandedGroupIds);return i.has(n)?i.delete(n):i.add(n),{expandedGroupIds:i}}),expandedLaneOwnerIds:new Set,toggleLaneOwnerExpanded:n=>t(r=>{const i=new Set(r.expandedLaneOwnerIds);return i.has(n)?i.delete(n):i.add(n),{expandedLaneOwnerIds:i}}),focusedEaseSegment:null,focusedEaseRequestNonce:0,setFocusedEaseSegment:n=>t(r=>{const i=r.focusedEaseRequestNonce+1,{timelineProjectId:s,timelineSessionEpoch:a}=e();return{focusedEaseRequestNonce:i,focusedEaseSegment:{...n,projectId:s,sessionEpoch:a,nonce:i}}}),clearFocusedEaseSegment:n=>t(r=>{var i;return((i=r.focusedEaseSegment)==null?void 0:i.nonce)===n?{focusedEaseSegment:null}:r}),keyframeCache:new Map,setKeyframeCache:(n,r)=>t(i=>{if(r?i.keyframeCache.get(n)===r:!i.keyframeCache.has(n))return i;const s=new Map(i.keyframeCache);return r?s.set(n,r):s.delete(n),{keyframeCache:s}}),gsapAnimations:new Map,setGsapAnimations:(n,r)=>t(i=>{if(r?i.gsapAnimations.get(n)===r:!i.gsapAnimations.has(n))return i;const s=new Map(i.gsapAnimations);return r?s.set(n,r):s.delete(n),{gsapAnimations:s}})}}function e6e(t){return{automationSelection:null,setAutomationSelection:e=>t({automationSelection:{...e,t0:Math.min(e.t0,e.t1),t1:Math.max(e.t0,e.t1),v0:Math.min(e.v0,e.v1),v1:Math.max(e.v0,e.v1)}}),clearAutomationSelection:()=>t({automationSelection:null})}}function t6e(t,e,n,r){return{id:t,projectId:e,sessionEpoch:n,nonce:r}}const jie="follow-preference";function n6e(t,e=jie){return t??(e==="legacy-default"?"hidden":"adaptive")}function r6e(t,e=jie){return e==="force-hidden"?"hidden":t}function i6e(t){return{thumbnailMode:n6e(jo().thumbnailMode),setThumbnailMode:e=>{bl({thumbnailMode:e}),t({thumbnailMode:e})}}}const Da="data-fx-chain",Lie=Da.slice(5),e0=1,Dx=(t="frequency",e="Frequency",n=1e3,r=20,i=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:r,max:i,step:1,default:n,scale:"log",automatable:!0}),pP=(t=.707,e="Bandwidth — higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),w8=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),Rz={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},HA=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[w8(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[Dx("frequency","Frequency",1e3),w8(-40,40,0),pP(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[Dx("frequency","Frequency",200,20,2e3),w8(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[Dx("frequency","Frequency",4e3,500,2e4),w8(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies — the usual fix for rumble on a voice.",params:[Dx("frequency","Cutoff",300,20,2e4),pP(.707),Rz],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies — darkens or muffles a track.",params:[Dx("frequency","Cutoff",8e3,100,2e4),pP(.707),Rz],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Hard ceiling — nothing gets past the limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times — a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],YC=new Map(HA.map(t=>[t.id,t]));function QA(t){return YC.get(t)}HA.map(t=>t.id);function Mf(t){const e=YC.get(t);if(!e)return{};const n={};for(const r of e.params)n[r.key]=r.default;return n}function Nd(t,e){const n=YC.get(t);if(!n)return{};const r={};for(const i of n.params){const s=e==null?void 0:e[i.key];if(i.kind==="enum"){const o=i.options.some(l=>l.value===s);r[i.key]=o?s:i.default;continue}const a=typeof s=="number"?s:typeof s=="string"&&s.trim()!==""?Number(s):Number.NaN;r[i.key]=Number.isFinite(a)?Math.min(i.max,Math.max(i.min,a)):i.default}return r}class Mm extends Error{constructor(e){super(e),this.name="AudioFxChainError"}}function qC(t){let e;try{e=JSON.parse(t)}catch(i){throw new Mm(`Chain file is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new Mm("Chain file must be a JSON object.");const n=e;if(n.version!==e0)throw new Mm(`Unsupported chain version: ${String(n.version)}`);if(!Array.isArray(n.nodes))throw new Mm("Chain file is missing a `nodes` array.");const r=n.nodes.map((i,s)=>{if(typeof i!="object"||i===null)throw new Mm(`Node ${s} is not an object.`);const a=i;if(typeof a.type!="string"||!YC.has(a.type))throw new Mm(`Node ${s} has unknown effect type: ${String(a.type)}`);return{type:a.type,...typeof a.id=="string"&&a.id?{id:a.id}:{},...a.fromCarve===!0?{fromCarve:!0}:{},...typeof a.fromPreset=="string"&&a.fromPreset?{fromPreset:a.fromPreset}:{},...typeof a.label=="string"&&a.label?{label:a.label}:{},...typeof a.fromEq=="string"&&a.fromEq?{fromEq:a.fromEq}:{},...a.fromLeveller===!0?{fromLeveller:!0}:{},...typeof a.presetAmount=="number"&&Number.isFinite(a.presetAmount)?{presetAmount:Math.min(1,Math.max(0,a.presetAmount))}:{},enabled:a.enabled!==!1,params:Nd(a.type,a.params??void 0)}});return{version:e0,nodes:r}}function s6e(t){return t.nodes.filter(e=>e.enabled!==!1)}function cu(t){return JSON.stringify({version:e0,nodes:t.nodes.map(e=>({type:e.type,...e.id?{id:e.id}:{},...e.fromCarve===!0?{fromCarve:!0}:{},...e.fromPreset?{fromPreset:e.fromPreset}:{},...e.label?{label:e.label}:{},...e.fromEq?{fromEq:e.fromEq}:{},...e.fromLeveller===!0?{fromLeveller:!0}:{},...typeof e.presetAmount=="number"&&e.presetAmount!==1?{presetAmount:e.presetAmount}:{},...e.enabled===!1?{enabled:!1}:{},params:Nd(e.type,e.params)}))})}function qg(t){const e=new Set(t.nodes.map(n=>n.id).filter(Boolean));for(let n=1;;n+=1){const r=`n${n}`;if(!e.has(r))return r}}const BR=12,Fie=10**(BR/20),rd=-100,og=100,$ie=-60;function VR(t){return Number.isFinite(t)?Math.max(0,Math.min(Fie,t)):1}function Bie(t){return VR(t).toFixed(6).replace(/\.?0+$/,"")}function OI(t){const e=Math.max(rd,Math.min(og,t));return e===rd?0:10**((e<0?e/Math.abs(rd)*Math.abs($ie):e/og*BR)/20)}function Vie(t){const e=VR(t);if(e===0)return rd;const n=20*Math.log10(e),r=n<0?n/Math.abs($ie)*Math.abs(rd):n/BR*og;return Math.max(rd,Math.min(og,r))}function kI(t){const e=VR(t);if(e===0)return"-∞ dB";const n=20*Math.log10(e),r=Math.abs(n)<.05?0:n;return(r>0?"+":"")+r.toFixed(1)+" dB"}const kl="data-automation",Hie=kl.slice(5),KC=1,Qie=512;class ap extends Error{constructor(e){super(e),this.name="AudioAutomationError"}}const E2="volume";function ZA(t){if(t===E2)return{kind:"volume"};const e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===Zie){const i=e[2];return i?{kind:"preset",presetId:i}:null}if(e.length!==3||e[0]!=="fx")return null;const[,n,r]=e;return!n||!r?null:{kind:"fx",nodeId:n,param:r}}function md(t,e){return`fx.${t}.${e}`}const Zie="preset";function mP(t){return`fx.${Zie}.${t}`}const a6e={min:0,max:1,step:.01,unit:"",label:"Amount",scale:"linear",default:1},zie={min:0,max:Fie,step:.01,unit:"",label:"Volume",scale:"linear",default:1};function t0(t,e){const n=ZA(t);if(!n)return null;if(n.kind==="volume")return zie;if(n.kind==="preset")return(e==null?void 0:e.nodes.some(o=>o.fromPreset===n.presetId))?{...a6e,label:`${n.presetId} · Amount`}:null;const r=e==null?void 0:e.nodes.find(a=>a.id===n.nodeId);if(!r)return null;const i=QA(r.type),s=i==null?void 0:i.params.find(a=>a.key===n.param);return!s||s.kind!=="number"?null:{min:s.min,max:s.max,step:s.step,unit:s.unit,label:`${(i==null?void 0:i.label)??r.type} · ${s.label}`,scale:s.scale==="log"&&s.min>0?"log":"linear",default:s.default}}function Pv(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){const e=Number(t);return Number.isFinite(e)?e:null}return null}function o6e(t){const e=Pv(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function HR(t,e){const n=Pv(t),r=Pv(e);if(n===null||r===null)return null;const i=o=>Math.min(.999,Math.max(.001,o)),s=i(n),a=i(r);return Math.abs(s-a)<1e-6?null:{x:s,y:a}}function l6e(t,e){const n=HR(t,e);return n?{viaX:n.x,viaY:n.y}:null}function c6e(t){const e=o6e(t==null?void 0:t.curve),n=HR(t==null?void 0:t.viaX,t==null?void 0:t.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function u6e(t,e){const n=Pv(t==null?void 0:t.t),r=Pv(t==null?void 0:t.v);if(n===null||r===null)return null;const i=e?Math.min(e.max,Math.max(e.min,r)):r;return{t:Math.max(0,n),v:i,...c6e(t)}}function Gie(t,e){const n=t.map(i=>u6e(i,e)).filter(i=>i!==null).sort((i,s)=>i.t-s.t),r=[];for(const i of n)r.length>0&&r[r.length-1].t===i.t?r[r.length-1]=i:r.push(i);return r.slice(0,Qie)}function f6e(t){const e=[];for(const n of t.lanes){if(!ZA(n.target))continue;const r=n.target===E2?zie:null,i=Gie(n.points??[],r);i.length>0&&e.push({target:n.target,points:i})}return{version:KC,lanes:e}}function Uie(t,e){const n=[];for(const r of t.lanes){const i=t0(r.target,e);if(!i)continue;const s=Gie(r.points,i);s.length>0&&n.push({target:r.target,points:s})}return{version:KC,lanes:n}}function Xie(t){let e;try{e=JSON.parse(t)}catch(i){throw new ap(`Automation is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new ap("Automation must be a JSON object.");const n=e;if(n.version!==KC)throw new ap(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new ap("Automation is missing a `lanes` array.");const r=n.lanes.map((i,s)=>{if(typeof i!="object"||i===null)throw new ap(`Lane ${s} is not an object.`);const a=i;if(typeof a.target!="string"||!ZA(a.target))throw new ap(`Lane ${s} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new ap(`Lane ${s} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return f6e({lanes:r})}function Wie(t){return JSON.stringify({version:KC,lanes:t.lanes.map(e=>({target:e.target,points:e.points.map(n=>({t:n.t,v:n.v,...n.curve?{curve:n.curve}:{},...n.viaX!==void 0&&n.viaY!==void 0?{viaX:n.viaX,viaY:n.viaY}:{}}))}))})}function h6e(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function d6e(t,e){const n=t-.5,r=e-.5,i=.999,s=1e6,a=n>0?n/(i-t):n<0?-n/(t-(1-i)):0,o=r>0?r/(i-e):r<0?-r/(e-(1-i)):0,l=Math.min(s,Math.max(1,a,o));return{cx:t+n/l,cy:e+r/l,w:l}}function p6e(t,e,n){const{cx:r,cy:i,w:s}=d6e(e,n),a=2-2*s,o=t*a-1+2*s*r,l=-t*a-2*s*r,c=m6e(o,l,t),u=1-c,f=u*u+2*s*c*u+c*c;return f>0?(2*s*i*c*u+c*c)/f:t}function m6e(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;const r=Math.sqrt(Math.max(0,e*e-4*t*n)),i=(-e+r)/(2*t),s=(-e-r)/(2*t),a=o=>o>=-1e-9&&o<=1+1e-9;return a(i)?Math.min(1,Math.max(0,i)):a(s)?Math.min(1,Math.max(0,s)):n}function g6e(t,e){const n=HR(e.viaX,e.viaY);return n?p6e(Math.min(1,Math.max(0,t)),n.x,n.y):h6e(t,e.curve)}function y6e(t,e,n,r){return r==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function n0(t,e,n="linear"){const r=t.points;if(r.length===0)return 0;const i=r[0];if(e<=i.t)return i.v;const s=r[r.length-1];if(e>=s.t)return s.v;let a=0,o=r.length-1;for(;o-a>1;){const f=a+o>>1;r[f].t<=e?a=f:o=f}const l=r[a],c=r[o],u=c.t-l.t;return u<=0?c.v:y6e(l.v,c.v,g6e((e-l.t)/u,l),n)}const Yie="hf-audio-group",Mv="data-audio-group",x6e=`audio[${Mv}]`;function b6e(t){const e=t==null?void 0:t.getAttribute("data-volume"),n=e?parseFloat(e):1;return Number.isFinite(n)?n:1}function v6e(t,e,n){const r=n==null?void 0:n.getAttribute(Da),i=n==null?void 0:n.getAttribute(kl);return{id:t,label:(n==null?void 0:n.getAttribute("data-label"))||t,memberIds:e,...r?{fxChain:r}:{},...i?{automation:i}:{},volume:b6e(n),hidden:(n==null?void 0:n.hasAttribute("data-hidden"))??!1}}function Kg(t){const e=new Map;for(const i of t.querySelectorAll(x6e)){const s=i.getAttribute(Mv);if(!s||!i.id)continue;const a=e.get(s);a?a.push(i.id):e.set(s,[i.id])}const n=new Map;for(const i of t.querySelectorAll(Yie))i.id&&n.set(i.id,i);const r=[];for(const[i,s]of e)r.push(v6e(i,s,n.get(i)));return r}function A6e(t,e){const n=new Map(Kg(t).map(a=>[a.id,a])),r=new Set,i=[],s=a=>{r.has(a)||(r.add(a),i.push(a))};for(const a of e){const o=n.get(a);o?o.memberIds.forEach(s):t.getElementById(a)&&s(a)}return i}function S6e(t,e,n){return t.size===0||t.has(e)?!1:n.some(r=>t.has(r))}function w6e(t,e){return{soloed:new Set,toggleSolo:(n,r)=>{const i=e().soloed;if(r!=null&&r.add){const a=new Set(i);a.has(n)?a.delete(n):a.add(n),t({soloed:a});return}const s=i.size===1&&i.has(n);t({soloed:s?new Set:new Set([n])})},clearSolo:()=>t({soloed:new Set})}}function O6e(t){return{motionPathArmed:!1,setMotionPathArmed:e=>t({motionPathArmed:e}),motionPathCreateAvailable:!1,setMotionPathCreateAvailable:e=>t({motionPathCreateAvailable:e}),autoKeyframeEnabled:!0,setAutoKeyframeEnabled:e=>t({autoKeyframeEnabled:e})}}const gP=new Set,pa={notify:t=>gP.forEach(e=>e(t)),subscribe:t=>(gP.add(t),()=>gP.delete(t))};function yP(t,e){const n=new Set(t);return n.size===0?{selectedElementIds:n,selectedElementId:null}:e&&n.has(e)?{selectedElementIds:n,selectedElementId:e}:{selectedElementIds:n,selectedElementId:n.values().next().value??null}}function CI(){return{isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,beatDragging:!1,elements:[],selectedElementId:null,zEditVersion:0,inPoint:null,outPoint:null,activeTool:"select",activeKeyframePct:null,motionPathArmed:!1,motionPathCreateAvailable:!1,selectedKeyframes:new Set,automationSelection:null,expandedClipIds:new Set,expandedGroupIds:new Set,expandedLaneOwnerIds:new Set,focusedEaseSegment:null,selectedElementIds:new Set,requestedSeekTime:null,lintFindingsByElement:new Map,timelineFocus:null,keyframeCache:new Map,gsapAnimations:new Map,beatAnalysis:null,beatEdits:null,beatUndo:[],beatRedo:[],beatPersist:null,clipManifest:null,clipParentMap:new Map,domClipChildren:[]}}const ue=ZC((t,e)=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,timelineSessionEpoch:0,timelineProjectId:null,beatDragging:!1,elements:[],selectedElementId:null,playbackRate:jo().playbackRate??1,audioMuted:jo().audioMuted??!1,audioVolume:jo().audioVolume??1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,zEditVersion:0,timelinePps:100,timelineFitPps:100,inPoint:null,outPoint:null,activeTool:"select",setActiveTool:n=>t({activeTool:n}),...J4e(t,()=>({timelineProjectId:e().timelineProjectId,timelineSessionEpoch:e().timelineSessionEpoch})),...i6e(t),...e6e(t),...w6e(t,e),...O6e(t),activeKeyframePct:null,setActiveKeyframePct:n=>t({activeKeyframePct:n}),selectedElementIds:new Set,setSelection:(n,r)=>t(yP(n,r)),addSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.add(n),yP(i,r.selectedElementId)}),toggleSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.has(n)?i.delete(n):i.add(n),yP(i,r.selectedElementId)}),clearSelection:()=>t({selectedElementId:null,selectedElementIds:new Set}),requestedSeekTime:null,requestSeek:n=>t({requestedSeekTime:n}),clearSeekRequest:()=>t({requestedSeekTime:null}),playbackRequest:null,requestPlayback:(n,r=null)=>t(i=>{var s;return{playbackRequest:{playing:n,returnTo:r,nonce:(((s=i.playbackRequest)==null?void 0:s.nonce)??0)+1}}}),clearPlaybackRequest:()=>t({playbackRequest:null}),clipRevealRequest:null,requestClipReveal:n=>t(r=>{var i;return{clipRevealRequest:{elementId:n,nonce:(((i=r.clipRevealRequest)==null?void 0:i.nonce)??0)+1}}}),clearClipRevealRequest:()=>t({clipRevealRequest:null}),timelineFocus:null,timelineFocusNonce:0,requestTimelineFocus:n=>t(r=>{const i=r.timelineFocusNonce+1;return{timelineFocusNonce:i,timelineFocus:t6e(n,r.timelineProjectId,r.timelineSessionEpoch,i)}}),clearTimelineFocus:n=>t(r=>{var i;return((i=r.timelineFocus)==null?void 0:i.nonce)===n?{timelineFocus:null}:r}),lintFindingsByElement:new Map,setLintFindingsByElement:n=>t({lintFindingsByElement:n}),beatAnalysis:null,setBeatAnalysis:n=>t({beatAnalysis:n}),beatEdits:null,setBeatEdits:n=>t({beatEdits:n}),beatUndo:[],beatRedo:[],beatPersist:null,setBeatPersist:n=>t({beatPersist:n}),commitBeatEdits:(n,r)=>{var i,s;t(a=>({beatEdits:n,beatUndo:[...a.beatUndo,{restore:a.beatEdits,at:Date.now(),label:r}],beatRedo:[]})),(s=(i=e()).beatPersist)==null||s.call(i)},undoBeatEdits:()=>{var i,s;const n=e(),r=n.beatUndo[n.beatUndo.length-1];return r?(t({beatEdits:r.restore,beatUndo:n.beatUndo.slice(0,-1),beatRedo:[...n.beatRedo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},resetBeatHistory:()=>t({beatUndo:[],beatRedo:[]}),redoBeatEdits:()=>{var i,s;const n=e(),r=n.beatRedo[n.beatRedo.length-1];return r?(t({beatEdits:r.restore,beatRedo:n.beatRedo.slice(0,-1),beatUndo:[...n.beatUndo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},clipManifest:null,setClipManifest:n=>t({clipManifest:n}),clipParentMap:new Map,setClipParentMap:n=>t({clipParentMap:n}),domClipChildren:[],setDomClipChildren:n=>t({domClipChildren:n}),setIsPlaying:n=>{e().isPlaying!==n&&t({isPlaying:n})},setPlaybackRate:n=>{bl({playbackRate:n}),t({playbackRate:n})},setAudioMuted:n=>{bl({audioMuted:n}),t({audioMuted:n})},setAudioVolume:n=>{const r=Number.isFinite(n)?Math.max(0,Math.min(1,n)):1;bl({audioVolume:r}),t({audioVolume:r})},setLoopEnabled:n=>t({loopEnabled:n}),setZoomMode:n=>t({zoomMode:n}),clearSelectedElementIds:()=>t({selectedElementIds:new Set}),setSelectedElementIds:n=>t({selectedElementIds:new Set(n)}),timelineSnapEnabled:jo().timelineSnapEnabled??!0,setTimelineSnapEnabled:n=>{bl({timelineSnapEnabled:n}),t({timelineSnapEnabled:n})},timeDisplayMode:jo().timeDisplayMode??"time",setTimeDisplayMode:n=>{bl({timeDisplayMode:n}),t({timeDisplayMode:n})},pinTimelineZoom:(n,r)=>t(i=>{if(i.zoomMode==="manual")return{};const s=X4e(n,r);return bl({timelineZoomMode:"manual",timelineManualZoomPercent:s}),{zoomMode:"manual",manualZoomPercent:s}}),setTimelineScale:(n,r)=>{const i=e();i.timelinePps===n&&i.timelineFitPps===r||t({timelinePps:n,timelineFitPps:r})},setInPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{inPoint:i,outPoint:i!==null&&r.outPoint!==null&&i>=r.outPoint?null:r.outPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setOutPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{outPoint:i,inPoint:i!==null&&r.inPoint!==null&&i<=r.inPoint?null:r.inPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setManualZoomPercent:n=>t(r=>({manualZoomPercent:T0(n,r.timelineFitPps)})),bumpZEditVersion:()=>t(n=>({zEditVersion:n.zEditVersion+1})),setCurrentTime:n=>t({currentTime:Number.isFinite(n)?n:0}),setDuration:n=>t({duration:Number.isFinite(n)?n:0}),setTimelineReady:n=>t({timelineReady:n}),setBeatDragging:n=>t({beatDragging:n}),setElements:n=>t({elements:n}),setSelectedElementId:(n,r)=>t(i=>{const a=!!(r!=null&&r.preserveSet&&n&&i.selectedElementIds.has(n))?new Set(i.selectedElementIds):r!=null&&r.preserveSet?new Set:n?new Set([n]):new Set;return n!==i.selectedElementId?{selectedElementId:n,selectedElementIds:a,activeKeyframePct:null,motionPathArmed:!1,focusedEaseSegment:null}:{selectedElementId:n,selectedElementIds:a}}),setSelectionAnchor:n=>t(r=>n!=null&&r.selectedElementIds.size>1&&r.selectedElementIds.has(n)?{selectedElementId:n,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}:{selectedElementId:n,selectedElementIds:n?new Set([n]):new Set,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}),updateElement:(n,r)=>t(i=>({elements:i.elements.map(s=>(s.key??s.id)===n?{...s,...r}:s)})),beginTimelineSession:n=>t(r=>r.timelineProjectId===n?r:{...CI(),timelineSessionEpoch:r.timelineSessionEpoch+1,timelineProjectId:n}),reset:()=>t(CI())}));function k6e(){try{return!1}catch{return!1}}k6e()&&typeof window<"u"&&(window.__playerStore=ue);const qie="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",Kie="https://us.i.posthog.com",C6e=3e4,E6e=5e3;let Nv=[],T2=null;function T6e(){return gR()}function P6e(){return $A()}function M6e(){var t,e;return{studio_version:"0.8.9",agent_runtime:pre(),screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"").split("?")[0]}}function Tt(t,e={}){P6e()&&(Nv.push({event:`studio:${t}`,properties:{...M6e(),...gre(),...e},timestamp:new Date().toISOString()}),T2||(T2=setInterval(N6e,C6e)))}function Jie(){const t=Nv.map(e=>({event:e.event,properties:{...e.properties,$ip:null},distinct_id:T6e(),timestamp:e.timestamp}));return Nv=[],t}async function N6e(){if(Nv.length===0)return;const t=Jie(),e=new AbortController,n=setTimeout(()=>e.abort(),E6e);try{await fetch(`${Kie}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:qie,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}function ese(){if(T2&&(clearInterval(T2),T2=null),Nv.length===0)return;const t=Jie(),e=JSON.stringify({api_key:qie,batch:t});try{navigator.sendBeacon(`${Kie}/batch/`,e)}catch{}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ese()});function tse(t){return Number.isFinite(t)&&t>0}function jz(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function u4(t){if(!t)return 0;try{const e=Number(t.getDuration());return tse(e)?e:0}catch{return 0}}function D6e(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function I6e(t,e,n,r=()=>1){var d;const i=Math.max(0,Number.isFinite(e)?e:0);let s=jz(Number(((d=t.getTime)==null?void 0:d.call(t))??0),i),a=!1,o=0,l=s,c=n.now();const u=y=>{var g;if(s=jz(y,i),typeof t.renderSeek=="function"){t.renderSeek(s);return}(g=t.seek)==null||g.call(t,s)},f=()=>{o&&(n.cancelAnimationFrame(o),o=0)},h=y=>{if(!a)return;const g=Math.max(.1,Number(r())||1),v=(y-c)/1e3*g;if(u(l+v),s>=i){a=!1,o=0;return}o=n.requestAnimationFrame(h)};return{play:()=>{a||i<=0||(s>=i&&u(0),a=!0,l=s,c=n.now(),f(),o=n.requestAnimationFrame(h))},pause:()=>{a=!1,f()},seek:(y,g)=>{if(u(y),g!=null&&g.keepPlaying){a&&(l=s,c=n.now());return}a=!1,f()},getTime:()=>s,getDuration:()=>i,isPlaying:()=>a}}function O8(t,e){var n;(n=t.current)==null||n.adapter.pause(),t.current=null,e.current=!1}function _6e(t){const{cache:e,warned:n,bestAdapter:r,effectiveDuration:i,docDuration:s}=t,a=e.current;if((a==null?void 0:a.player)===r&&a.duration===i)return a.adapter;a==null||a.adapter.pause(),n.current||(n.current=!0,console.warn(`[useTimelinePlayer] Selected adapter duration (${u4(r)}s) does not cover the document duration (${s}s); falling back to seek-driven playback, which never starts media elements or WebAudio. Audio will not play in preview — extend the GSAP timeline to cover the declared data-duration.`));const o=I6e(r,i,t.clock,t.getPlaybackRate);return e.current={player:r,duration:i,adapter:o},o}function Lz(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{const r=!(n!=null&&n.keepPlaying);r&&t.pause(),t.seek(e),r&&t.pause()},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function nse(t,e,n,r,i){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const s=r??"index.html",o=Array.from(t.querySelectorAll(n)).filter(l=>(i(l)??"index.html")===s).indexOf(e);return o>=0?o:void 0}catch{return}}const Nf="data-hf-reveal-prior-z",r0="data-hf-reveal-prior-pos";function QR(t){const e=t.getAttribute(Nf);if(e==null)return null;const n=Number.parseInt(e,10);return Number.isFinite(n)?n:null}function JC(t){var a,o;const e=QR(t);if(e!=null)return e;const n=t,r=l=>{if(l==null||l===""||l==="auto")return null;const c=Number.parseInt(l,10);return Number.isFinite(c)?c:null},i=r((a=n.style)==null?void 0:a.zIndex);if(i!=null)return i;const s=(o=t.ownerDocument)==null?void 0:o.defaultView;if(s!=null&&s.getComputedStyle){const l=r(s.getComputedStyle(n).zIndex);if(l!=null)return l}return 0}function rse(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return tse(e)?e:0}function ise(t){return Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1}function eE(t){return!!t.closest(["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-hf-color-grading-canvas]"].join(","))}function ZR(t){if(!t)return 0;const e=t.querySelector("[data-composition-id]");let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){if(r===e||eE(r))continue;const i=Number.parseFloat(r.getAttribute("data-start")??""),s=rse(r);!Number.isFinite(i)||i<0||s<=0||(n=Math.max(n,i+s))}return n}function sse(t){if(!t)return 0;const e=rse(t.querySelector("[data-composition-id]"));return e>0?e:ZR(t)}function zR(t){return t?ZR(new DOMParser().parseFromString(t,"text/html")):0}function EI(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function ase(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function R6e(t,e){const n=e.getAttribute("data-playback-start"),r=e.getAttribute("data-media-start"),i=n??r;if(i!=null){const a=parseFloat(i);Number.isFinite(a)&&(t.playbackStart=a)}n!=null?t.playbackStartAttr="playback-start":r!=null&&(t.playbackStartAttr="media-start");const s=Number.parseFloat(e.getAttribute("data-playback-rate")??"");Number.isFinite(s)&&s>0&&(t.playbackRate=ise(s))}function ose(t,e){R6e(t,e);const n=ase(e);if(!n)return;t.tag=n.tagName.toLowerCase();const r=n.getAttribute("src");r&&(t.src=r);const s=(n.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof s>"u"||!(n instanceof s))return;const a=e.getAttribute("data-source-duration")??n.getAttribute("data-source-duration"),o=a?parseFloat(a):n.duration;Number.isFinite(o)&&o>0&&(t.sourceDuration=o);const l=n.defaultPlaybackRate;t.playbackRate==null&&Number.isFinite(l)&&l>0&&(t.playbackRate=ise(l))}function i0(t){var i,s,a;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(s=t.id)==null?void 0:s.trim();if(n)return n;const r=(a=t.tag)==null?void 0:a.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const j6e=new Set(["base","link","meta","noscript","script","style","template"]);function Fz(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function L6e(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return Fz(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?Fz(r):i0({tag:t.tagName})}function s0(t){if(EI(t)&&t.id)return`#${CSS.escape(t.id)}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${CSS.escape(e)}"]`;if(EI(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${CSS.escape(r)}`}}function a0(t){var n;const e=(n=t.parentElement)==null?void 0:n.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 Dv(t,e,n){return nse(t,e,n,a0(e),a0)}function Iv(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function TI(t){const e=t.lastIndexOf("#");return e<0?{sourceFile:null,domId:t}:{sourceFile:t.slice(0,e),domId:t.slice(e+1)}}function _v(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||Iv({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=Iv({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function Hn(t){return t.key??t.id}function R1(t){if(!(!t.domId&&!t.selector))return Iv({id:"",fallbackIndex:0,...t})}function F6e(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e&&!eE(n))}function $6e(t,e){return Math.abs(t-e)<.001}const B6e=[["data-start",t=>t.start],["data-duration",t=>t.duration],["data-track-index",t=>t.track]];function V6e(t,e){var r;const n=(r=e.tagName)==null?void 0:r.toLowerCase();return n&&t.tagName.toLowerCase()!==n?!1:B6e.every(([i,s])=>{const a=Number.parseFloat(t.getAttribute(i)??"");return!Number.isFinite(a)||$6e(a,s(e))})}function H6e(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${CSS.escape(e)}"]`)??t.querySelector(`.${CSS.escape(e)}`)??null}function Q6e(t,e,n,r=new Set){const i=e.id?H6e(t,e.id):null;if(i&&!r.has(i))return i;const s=F6e(t).filter(o=>!r.has(o)),a=s.find(o=>V6e(o,e));return a||(s[n]??null)}function Z6e(t,e){if(!EI(e)||eE(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return j6e.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!s0(e)}function z6e(t){const e=ue(n=>n.soloed);x.useEffect(()=>{var r,i,s;const n=(r=t.current)==null?void 0:r.contentWindow;(s=(i=n==null?void 0:n.__hf)==null?void 0:i.setAudioSolo)==null||s.call(i,[...e])},[e,t])}function G6e(t,e){const n=t==null?void 0:t.getElementById(e);return n?n.tagName.toLowerCase()===Yie?i0({id:e,label:n.getAttribute("data-label")}):i0({id:e,label:n.getAttribute("data-timeline-label")??n.getAttribute("data-label"),tag:n.tagName}):e}function U6e(t){const e=ue(n=>n.soloed);return x.useMemo(()=>{var n;if(e.size===0)return null;if(e.size===1){const r=(n=t.current)==null?void 0:n.contentDocument;return G6e(r,[...e][0])}return`${e.size} tracks`},[e,t])}function P0(t){const e=x.useRef(null),n=x.useCallback(r=>{var i;if(r instanceof KeyboardEvent){r.key==="Escape"&&t();return}(i=e.current)!=null&&i.contains(r.target)||t()},[t]);return x.useEffect(()=>(document.addEventListener("pointerdown",n,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("keydown",n),()=>{document.removeEventListener("pointerdown",n,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",n)}),[n]),e}const X6e=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Keyframes (when an element is selected)",hints:[{key:"K",label:"Add keyframe at playhead"},{key:"Del",label:"Delete selected keyframe"},{key:"H",label:"Toggle hold / bezier"},{key:"U",label:"Expand / collapse properties"},{key:"R",label:"Record gesture"}]},{title:"Editing",hints:[{key:"⌘Z",label:"Undo"},{key:"⌘⇧Z",label:"Redo"},{key:"⌘C",label:"Copy element"},{key:"⌘V",label:"Paste element"},{key:"⌘X",label:"Cut element"},{key:"S",label:"Split clip at playhead"},{key:"⇧Click",label:"Razor tool: split all tracks"},{key:"⌘G",label:"Group elements"},{key:"⌘⇧G",label:"Ungroup"},{key:"Del",label:"Delete selected element (no keyframe selected)"}]},{title:"Gesture recording modifiers",hints:[{key:"Drag",label:"Record x / y position"},{key:"Scroll",label:"Record z depth"},{key:"⇧ Drag",label:"Record rotationX / rotationY"},{key:"⌥ Drag",label:"Record rotation"},{key:"⌘ Drag↕",label:"Record opacity"},{key:"⌘ Scroll",label:"Record scale"}]},{title:"Canvas",hints:[{key:"Drag",label:"Move element / add keyframe"},{key:"⌥ Drag",label:"Move entire animation path"},{key:"⇧ Drag",label:"Uniform resize"}]},{title:"Crop",hints:[{key:"Drag edge",label:"Crop a side"},{key:"Drag center",label:"Reposition the crop"}]},{title:"Panels",hints:[{key:"⌘1",label:"Compositions tab"},{key:"⌘2",label:"Assets tab"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}],W6e=x.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,setInPoint:s,setOutPoint:a,onSeek:o}){const[l,c]=x.useState(!1),[u,f]=x.useState(""),h=x.useId(),d=x.useCallback(()=>c(!1),[]),y=P0(d),g=x.useRef(null),v=x.useRef(null);x.useEffect(()=>{var E;if(!l)return;const C=v.current;return(E=g.current)==null||E.focus(),()=>{C==null||C.focus()}},[l]);const b=x.useCallback(()=>{if(e)return;const C=Number.parseInt(u,10);!Number.isFinite(C)||n<=0||o(Math.min(n,FR(Math.max(0,C))))},[e,n,u,o]),w=x.useCallback(C=>{C.preventDefault(),b()},[b]),O=x.useCallback(C=>{C.key==="Enter"&&(C.preventDefault(),b())},[b]);return m.jsxs("div",{ref:y,className:"relative flex-shrink-0",children:[m.jsx(yr,{label:"Shortcuts and tools",children:m.jsx("button",{ref:v,type:"button",onClick:()=>c(C=>!C),className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors ${l?"text-neutral-200":"text-neutral-600 hover:text-neutral-300"}`,"aria-label":"Shortcuts and tools","aria-expanded":l,"aria-controls":h,children:m.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),m.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})})}),l&&m.jsxs("div",{id:h,ref:g,tabIndex:-1,role:"dialog","aria-label":"Keyboard shortcuts and tools",className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto outline-none",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[m.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),m.jsxs("form",{onSubmit:w,className:"flex items-center gap-1.5",children:[m.jsx("input",{value:u,onChange:C=>f(C.target.value),disabled:e,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded 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:O,onBlur:b}),m.jsx(yr,{label:"Jump to frame",children:m.jsx("button",{type:"submit",disabled:e,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:r!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:ns(r)}),m.jsx(yr,{label:"Clear in-point",children:m.jsx("button",{type:"button",onClick:()=>s(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:i!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:ns(i)}),m.jsx(yr,{label:"Clear out-point",children:m.jsx("button",{type:"button",onClick:()=>a(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:X6e.map(C=>m.jsxs("div",{children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:C.title}),m.jsx("div",{className:"flex flex-col gap-1",children:C.hints.map(E=>m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:E.key}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:E.label})]},E.key))})]},C.title))})]})]})}),Y6e=[.25,.5,1,1.5,2],q6e=x.memo(function({playbackRate:e,setPlaybackRate:n,disabled:r}){const[i,s]=x.useState(!1),a=x.useCallback(()=>s(!1),[]),o=P0(a);return m.jsxs("div",{ref:o,className:"relative flex-shrink-0",children:[m.jsx(yr,{label:"Playback speed",children:m.jsx("button",{type:"button",onClick:()=>s(l=>!l),disabled:r,"aria-haspopup":"menu","aria-expanded":i,"aria-label":"Playback speed",className:"h-7 w-8 rounded-md font-mono text-[10px] tabular-nums text-neutral-500 transition-colors hover:text-neutral-200 disabled:opacity-30",children:e===1?"1x":`${e}x`})}),i&&m.jsx("div",{role:"menu","aria-label":"Playback speed options",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:Y6e.map(l=>{const c=l===e;return m.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":c,onClick:()=>{Tt("playback",{action:"speed_change",rate:l}),n(l),s(!1)},className:`block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors outline-none focus-visible:bg-white/[0.04] ${c?"text-neutral-50 bg-white/[0.06]":"text-neutral-500 hover:bg-white/[0.04]"}`,children:[l,"x"]},l)})})]})});function K6e({muted:t,volume:e}){const n=t||e===0;return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),n?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"m19 9-6 6"}),m.jsx("path",{d:"m13 9 6 6"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),e>=.5?m.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"}):null]})]})}const J6e=x.memo(function({audioMuted:e,audioVolume:n,disabled:r,setAudioMuted:i,setAudioVolume:s}){const a=Math.round(n*100),o=e||n===0,l=o?"Unmute audio":"Mute audio";return m.jsxs("div",{className:"group flex flex-shrink-0 items-center",children:[m.jsx("div",{className:"w-0 overflow-hidden opacity-0 transition-[width,opacity] duration-150 ease-out group-hover:w-14 group-hover:opacity-100 group-focus-within:w-14 group-focus-within:opacity-100",children:m.jsxs("div",{className:"relative mx-1 flex h-6 w-12 items-center",children:[m.jsx("div",{className:"absolute inset-x-0 h-0.5 overflow-hidden rounded-full bg-neutral-700",children:m.jsx("div",{className:"h-full rounded-full bg-neutral-300",style:{width:`${a}%`}})}),m.jsx("input",{type:"range",min:"0",max:"100",step:"1",value:a,disabled:r,"aria-label":"Preview volume","aria-valuetext":`${a}%`,title:`Preview volume: ${a}%`,onChange:c=>{const u=Number(c.currentTarget.value)/100;s(u),e&&u>0&&i(!1)},className:"hf-preview-volume-range absolute inset-0 w-full disabled:pointer-events-none"})]})}),m.jsx(yr,{label:l,children:m.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"mute_toggle",muted:!o}),o&&n===0&&s(1),i(!o)},disabled:r,"aria-label":l,"aria-pressed":o,className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors disabled:pointer-events-none disabled:opacity-30 ${o?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,children:m.jsx(K6e,{muted:e,volume:n})})})]})});Cv.registerPlugin(u1);const $z="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",Bz="M56 28H67V71H56Z M73 28H84V71H73Z";function eke({playing:t}){const e=x.useRef(null),n=x.useRef(!0);return x.useEffect(()=>{var o;const r=e.current;if(!r)return;const i=t?Bz:$z,s=typeof window<"u"&&((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)").matches);if(n.current||s){n.current=!1,Cv.set(r,{morphSVG:i});return}const a=Cv.to(r,{duration:.28,ease:"power2.inOut",morphSVG:i});return()=>{a.kill()}},[t]),m.jsx("span",{className:"relative inline-flex h-3 w-3 items-center justify-center","aria-hidden":"true",children:m.jsx("svg",{width:"12",height:"12",viewBox:"46 21 54 56",fill:"#FAFAFA",children:m.jsx("path",{ref:e,d:t?Bz:$z})})})}const tke=x.memo(function({loopEnabled:e,disabled:n,setLoopEnabled:r}){return m.jsx(yr,{label:"Loop playback",children:m.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"loop_toggle",enabled:!e}),r(!e)},disabled:n,className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors disabled:opacity-30 ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Disable loop playback":"Enable loop playback","aria-pressed":e,children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M17 2l4 4-4 4"}),m.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),m.jsx("path",{d:"M7 22l-4-4 4-4"}),m.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})})})}),nke=x.memo(function({isFullscreen:e,onToggleFullscreen:n}){return m.jsx(yr,{label:e?"Exit fullscreen (F)":"Enter fullscreen (F)",children:m.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"fullscreen_toggle",active:!e}),n()},className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Exit fullscreen":"Enter fullscreen",children:m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),m.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),m.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),m.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),m.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),m.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),m.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})})})})}),rke=x.memo(function({previewIframeRef:e}){const n=U6e(e),r=ue.getState().clearSolo;return n===null?null:m.jsxs("div",{role:"status",className:"flex h-7 items-center justify-center gap-2 border-b border-neutral-800 bg-neutral-900/90 px-3 text-[11px] text-neutral-300",children:[m.jsxs("span",{children:["Hearing only ",m.jsx("span",{className:"font-medium text-neutral-100",children:n})," — your export is not affected"]}),m.jsx("button",{type:"button",onClick:()=>r(),className:"rounded px-1.5 py-0.5 font-medium text-studio-accent transition-colors hover:text-white",children:"Clear"})]})}),ike=x.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:s,previewIframeRef:a}){const o=ue($=>$.isPlaying),l=ue($=>$.duration),c=ue($=>$.timelineReady),u=ue($=>$.playbackRate),f=ue($=>$.audioMuted),h=ue($=>$.audioVolume),d=ue($=>$.loopEnabled),y=ue.getState().setPlaybackRate,g=ue.getState().setAudioMuted,v=ue.getState().setAudioVolume,b=ue.getState().setLoopEnabled,w=ue($=>$.inPoint),O=ue($=>$.outPoint),C=ue.getState().setInPoint,E=ue.getState().setOutPoint,M=ue($=>$.timeDisplayMode),N=ue.getState().setTimeDisplayMode,I=x.useRef(null),_=x.useRef(0),j=x.useRef(M);j.current=M;const L=x.useRef(l);L.current=l;const V=r||!c;return x.useEffect(()=>{if(!I.current)return;const $=_.current;I.current.textContent=M==="frame"?Dz($,l):ns($)},[l,M]),Ar(()=>{const $=W=>{if(_.current=W,!I.current)return;const Y=L.current;I.current.textContent=j.current==="frame"?Dz(W,Y):ns(W)},Z=pa.subscribe($);return $(ue.getState().currentTime),Z}),m.jsxs("div",{children:[a&&m.jsx(rke,{previewIframeRef:a}),m.jsxs("div",{className:"grid h-10 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center px-3","aria-disabled":r||void 0,style:{paddingBottom:"env(safe-area-inset-bottom)"},children:[m.jsx(yr,{label:M==="time"?"Switch to frame display":"Switch to time display",children:m.jsxs("button",{type:"button",onClick:()=>N(M==="time"?"frame":"time"),disabled:r,className:"min-w-0 justify-self-start whitespace-nowrap font-mono text-[11px] tabular-nums text-neutral-400 transition-colors hover:text-neutral-200 disabled:pointer-events-none",children:[m.jsx("span",{ref:I,children:ns(0)}),M==="time"?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mx-0.5 text-neutral-700",children:"/"}),m.jsx("span",{className:"text-neutral-600",children:ns(l)})]}):null]})}),m.jsx(yr,{label:o?"Pause":"Play",children:m.jsx("button",{type:"button","aria-label":o?"Pause":"Play",onClick:()=>{Tt("playback",{action:o?"pause":"play"}),e()},disabled:V,className:"flex h-8 w-8 items-center justify-center justify-self-center rounded-md text-neutral-100 transition-colors hover:text-white disabled:pointer-events-none disabled:opacity-30",children:m.jsx(eke,{playing:o})})}),m.jsxs("div",{className:"flex min-w-0 items-center justify-self-end",children:[m.jsx(J6e,{audioMuted:f,audioVolume:h,disabled:V,setAudioMuted:g,setAudioVolume:v}),m.jsx(q6e,{playbackRate:u,setPlaybackRate:y,disabled:r}),m.jsx(tke,{loopEnabled:d,disabled:r,setLoopEnabled:b}),s&&m.jsx(nke,{isFullscreen:i,onToggleFullscreen:s}),m.jsx(W6e,{disabled:r,duration:l,inPoint:w,outPoint:O,setInPoint:C,setOutPoint:E,onSeek:n})]})]})]})}),ske=new Set(["audio","music","sfx","sound","narration"]),ake=/\.(aac|flac|m4a|mp3|ogg|opus|wav)(?:[?#].*)?$/i,oke=/\b(music|bgm|soundtrack|background[-_]?music)\b/i;function Rl(t){if(!t)return!1;const e=t.tag.trim().toLowerCase();return ske.has(e)?!0:!!(t.src&&ake.test(t.src))}function Jg(t){if(!t||!Rl(t))return!1;if(t.timelineRole==="music")return!0;if(t.timelineRole&&t.timelineRole!=="music")return!1;const e=t.domId??t.id??"";return oke.test(e)}function lke(t){const e=t.find(Jg);if(e)return{element:e,isFallback:!1};let n=null;for(const r of t)Rl(r)&&(r.timelineRole&&r.timelineRole!=="music"||(!n||r.duration>n.duration)&&(n=r));return n?{element:n,isFallback:!0}:null}let k8=null;const Vz=()=>BA(()=>import("./index-D1Sa69m2.js").then(t=>t.i),[]);function cke(t=Vz){const e=t===Vz;if(e&&k8)return k8;const n=t().then(r=>(r.default??r)||null).catch(()=>(e&&(k8=null),null));return e&&(k8=n),n}const xP=1024,Hz=512,uke=.05;function lse(t,e,n){const r=Math.floor(e*uke),i=Math.floor(n*e),s=Math.max(0,i-r),a=Math.min(t.length,i+r);let o=0;for(let l=s;l<a;l++){const c=t[l]??0;o+=c*c}return Math.sqrt(o/Math.max(a-s,1))}function cse(t,e){return!t.channelData||t.peak<=0?.5:Math.min(1,lse(t.channelData,t.sampleRate,e)/t.peak)}async function fke(t){const e=t.getChannelData(0),n=t.sampleRate,r=[];for(let a=0;a<e.length-xP;a+=Hz){let o=0;for(let l=0;l<xP;l++){const c=e[a+l];o+=c*c}r.push(o/xP)}const i=[],s=20;for(let a=s;a<r.length-s;a++){let o=0;for(let u=a-s;u<a+s;u++)o+=r[u];o/=s*2;const l=o*1.5,c=r[a];if(c>l&&c>(r[a-1]??0)&&c>(r[a+1]??0)){const u=a*Hz/n;(i.length===0||u-i[i.length-1]>.1)&&i.push(Math.round(u*1e3)/1e3)}}return i}function hke(t){if(t.length<4)return null;const e=[];for(let s=1;s<t.length;s++)e.push(t[s]-t[s-1]);const n=[...e].sort((s,a)=>s-a),r=Math.floor(n.length/2),i=n.length%2===0?(n[r-1]+n[r])/2:n[r];return i<=0?null:Math.round(60/i*10)/10}function bP(t){let e=t;for(;e>120;)e/=2;for(;e<60;)e*=2;return e}function dke(t,e){const n=[t/2,t,t*2];let r=t,i=Number.POSITIVE_INFINITY;for(const s of n){if(s<=0)continue;const a=Math.abs(s-e);a<i&&(i=a,r=s)}return r}function pke(t,e,n){if(t.length===0||e<=0||n<=0)return t;const r=60/e;if(r<.125)return t;const i=r*.25;let s=0,a=-1;for(const l of t.slice(0,10)){const c=(l%r+r)%r;let u=0;for(const f of t){const h=(f%r+r)%r;Math.min(Math.abs(h-c),r-Math.abs(h-c))<i&&u++}u>a&&(a=u,s=c)}const o=[];for(let l=s;l<=n+.001;l+=r)o.push(Math.round(l*1e3)/1e3);return o}function mke(t,e,n){if(t.length===0)return{times:t,strengths:[],peak:1e-6};const r=t.map(l=>lse(e,n,l)),i=Math.max(...r,1e-6),s=i*.12,a=[],o=[];for(let l=0;l<t.length;l++)r[l]>=s&&(a.push(t[l]),o.push(Math.min(1,r[l]/i)));return{times:a,strengths:o,peak:i}}async function gke(t){const e=t.getChannelData(0),n=t.sampleRate,r=t.duration,i=await fke(t),s=hke(i);let a=null;try{const h=await cke();h&&(a=h(t))}catch{}let o=s,l="uncertain",c=null;if(s!==null&&a!==null){const h=Math.abs(bP(s)-bP(a))/bP(a);h<.05?(o=dke(a,s),l="high",c=o):h<.1?(o=Math.round((s+a)/2),l="low",c=o):(o=s,l="uncertain")}else s!==null?(o=s,l="low",c=s):a!==null&&(o=a,l="low",c=a);const u=c!==null?pke(i,c,r):i,f=mke(u,e,n);return{beatTimes:f.times,beatStrengths:f.strengths,bpm:o,bpmConfidence:l,channelData:e,sampleRate:n,peak:f.peak}}async function yke(t){const e=new AudioContext;try{const r=await(await fetch(t)).arrayBuffer(),i=await e.decodeAudioData(r);return gke(i)}finally{await e.close()}}function use(t){if(!t||/^(blob:|data:)/i.test(t))return null;let e=null;const n="/preview/",r=t.indexOf(n);if(r!==-1){let i=t.slice(r+n.length);const s=i.search(/[?#]/);s!==-1&&(i=i.slice(0,s)),i.startsWith("comp/")&&(i=i.slice(5)),e=i?decodeURIComponent(i):null}if(!e)try{e=decodeURIComponent(new URL(t,"http://_").pathname)}catch{e=t}return e?(e=e.replace(/^\/+/,""),e||null):null}function Qz(t){const e=use(t);return e?`beats/${e}.json`:null}function xke(t,e,n){const r=t.map((s,a)=>({time:Math.round(s*1e3)/1e3,strength:Math.round((e[a]??.5)*1e3)/1e3}));return`${JSON.stringify({version:1,audio:n,beats:r},null,2)}
|
|
70
|
+
*/var y4e=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,x4e=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,b4e=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,v4e=/(^[#\.][a-z]|[a-y][a-z])/i,A4e=Math.PI/180,v8=Math.sin,A8=Math.cos,oc=Math.abs,tf=Math.sqrt,S8=Math.atan2,mz=1e8,gz=function(e){return typeof e=="string"},Aie=function(e){return typeof e=="number"},yz=1e5,Ki=function(e){return Math.round(e*yz)/yz||0},xz=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001},S4e=function(e,n,r){var i=e.length,s=~~(r*i);if(e[s]>n){for(;--s&&e[s]>n;);s<0&&(s=0)}else for(;e[++s]<n&&s<i;);return s<i?s:i-1};function w4e(t){t=gz(t)&&v4e.test(t)&&document.querySelector(t)||t;var e=t.getAttribute?t:0,n;return e&&(t=t.getAttribute("d"))?(e._gsPath||(e._gsPath={}),n=e._gsPath[t],n&&!n._dirty?n:e._gsPath[t]=uf(t)):t?gz(t)?uf(t):Aie(t[0])?[t]:t:console.warn("Expecting a <path> element or an SVG path data string")}function Ob(t){var e=0,n;for(t.reverse();e<t.length;e+=2)n=t[e],t[e]=t[e+1],t[e+1]=n;t.reversed=!t.reversed}var O4e=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=[].slice.call(e.attributes),s=i.length,a;for(n=","+n+",";--s>-1;)a=i[s].nodeName.toLowerCase(),n.indexOf(","+a+",")<0&&r.setAttributeNS(null,a,i[s].nodeValue);return r},k4e={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"},C4e=function(e,n){for(var r=n?n.split(","):[],i={},s=r.length;--s>-1;)i[r[s]]=+e.getAttribute(r[s])||0;return i};function Sie(t,e){var n=t.tagName.toLowerCase(),r=.552284749831,i,s,a,o,l,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I,_;return n==="path"||!t.getBBox?t:(c=O4e(t,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),_=C4e(t,k4e[n]),n==="rect"?(o=_.rx,l=_.ry||o,s=_.x,a=_.y,d=_.width-o*2,y=_.height-l*2,o||l?(g=s+o*(1-r),v=s+o,b=v+d,w=b+o*r,O=b+o,C=a+l*(1-r),E=a+l,M=E+y,N=M+l*r,I=M+l,i="M"+O+","+E+" V"+M+" C"+[O,N,w,I,b,I,b-(b-v)/3,I,v+(b-v)/3,I,v,I,g,I,s,N,s,M,s,M-(M-E)/3,s,E+(M-E)/3,s,E,s,C,g,a,v,a,v+(b-v)/3,a,b-(b-v)/3,a,b,a,w,a,O,C,O,E].join(",")+"z"):i="M"+(s+d)+","+a+" v"+y+" h"+-d+" v"+-y+" h"+d+"z"):n==="circle"||n==="ellipse"?(n==="circle"?(o=l=_.r,f=o*r):(o=_.rx,l=_.ry,f=l*r),s=_.cx,a=_.cy,u=o*r,i="M"+(s+o)+","+a+" C"+[s+o,a+f,s+u,a+l,s,a+l,s-u,a+l,s-o,a+f,s-o,a,s-o,a-f,s-u,a-l,s,a-l,s+u,a-l,s+o,a-f,s+o,a].join(",")+"z"):n==="line"?i="M"+_.x1+","+_.y1+" L"+_.x2+","+_.y2:(n==="polyline"||n==="polygon")&&(h=(t.getAttribute("points")+"").match(x4e)||[],s=h.shift(),a=h.shift(),i="M"+s+","+a+" L"+h.join(","),n==="polygon"&&(i+=","+s+","+a+"z")),c.setAttribute("d",Tp(c._gsRawPath=uf(i))),e&&t.parentNode&&(t.parentNode.insertBefore(c,t),t.parentNode.removeChild(t)),c)}function wie(t,e,n){e=e||0,t.samples||(t.samples=[],t.lookup=[]);var r=~~t.resolution||12,i=1/r,s=t.length,a=t[e],o=t[e+1],l=e?e/6*r:0,c=t.samples,u=t.lookup,f=(e?t.minLength:mz)||mz,h=c[l+n*r-1],d=e?c[l-1]:0,y,g,v,b,w,O,C,E,M,N,I,_,j,L,V,$,Z;for(c.length=u.length=0,g=e+2;g<s;g+=6){if(v=t[g+4]-a,b=t[g+2]-a,w=t[g]-a,E=t[g+5]-o,M=t[g+3]-o,N=t[g+1]-o,O=C=I=_=0,oc(v)<.01&&oc(E)<.01&&oc(w)+oc(N)<.01)t.length>8&&(t.splice(g,6),g-=6,s-=6);else for(y=1;y<=r;y++)L=i*y,j=1-L,O=C-(C=(L*L*v+3*j*(L*b+j*w))*L),I=_-(_=(L*L*E+3*j*(L*M+j*N))*L),$=tf(I*I+O*O),$<f&&(f=$),d+=$,c[l++]=d;a+=v,o+=E}if(h)for(h-=d;l<c.length;l++)c[l]+=h;if(c.length&&f){if(t.totalLength=Z=c[c.length-1]||0,t.minLength=f,Z/f<9999)for($=V=0,y=0;y<Z;y+=f)u[$++]=c[V]<y?++V:V}else t.totalLength=c[0]=0;return e?d-c[e/2-1]:d}function Oie(t,e){var n,r,i;for(i=n=r=0;i<t.length;i++)t[i].resolution=12,n+=wie(t[i]),r+=t[i].length;return t.totalPoints=r,t.totalLength=n,t}function E4e(t,e,n,r,i,s,a,o,l){if(!(t===o&&e===l)){n=oc(n),r=oc(r);var c=i%360*A4e,u=A8(c),f=v8(c),h=Math.PI,d=h*2,y=(t-o)/2,g=(e-l)/2,v=u*y+f*g,b=-f*y+u*g,w=v*v,O=b*b,C=w/(n*n)+O/(r*r);C>1&&(n=tf(C)*n,r=tf(C)*r);var E=n*n,M=r*r,N=(E*M-E*O-M*w)/(E*O+M*w);N<0&&(N=0);var I=(s===a?-1:1)*tf(N),_=I*(n*b/r),j=I*-(r*v/n),L=(t+o)/2,V=(e+l)/2,$=L+(u*_-f*j),Z=V+(f*_+u*j),W=(v-_)/n,Y=(b-j)/r,J=(-v-_)/n,ne=(-b-j)/r,ie=W*W+Y*Y,le=(Y<0?-1:1)*Math.acos(W/tf(ie)),q=(W*ne-Y*J<0?-1:1)*Math.acos((W*J+Y*ne)/tf(ie*(J*J+ne*ne)));isNaN(q)&&(q=h),!a&&q>0?q-=d:a&&q<0&&(q+=d),le%=d,q%=d;var F=Math.ceil(oc(q)/(d/4)),U=[],z=q/F,K=4/3*v8(z/2)/(1+A8(z/2)),te=u*n,ee=f*n,H=f*-r,Q=u*r,oe;for(oe=0;oe<F;oe++)i=le+oe*z,v=A8(i),b=v8(i),W=A8(i+=z),Y=v8(i),U.push(v-K*b,b+K*v,W+K*Y,Y-K*W,W,Y);for(oe=0;oe<U.length;oe+=2)v=U[oe],b=U[oe+1],U[oe]=v*te+b*H+$,U[oe+1]=v*ee+b*Q+Z;return U[oe-2]=o,U[oe-1]=l,U}}function uf(t){var e=(t+"").replace(b4e,function(_){var j=+_;return j<1e-4&&j>-1e-4?0:j}).match(y4e)||[],n=[],r=0,i=0,s=2/3,a=e.length,o=0,l="ERROR: malformed path: "+t,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I=function(j,L,V,$){w=(V-j)/3,O=($-L)/3,g.push(j+w,L+O,V-w,$-O,V,$)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(l),n;for(c=0;c<a;c++)if(E=d,isNaN(e[c])?(d=e[c].toUpperCase(),y=d!==e[c]):c--,f=+e[c+1],h=+e[c+2],y&&(f+=r,h+=i),c||(v=f,b=h),d==="M")g&&(g.length<8?n.length-=1:o+=g.length,xz(g)),r=v=f,i=b=h,g=[f,h],n.push(g),c+=2,d="L";else if(d==="C")g||(g=[0,0]),y||(r=i=0),g.push(f,h,r+e[c+3]*1,i+e[c+4]*1,r+=e[c+5]*1,i+=e[c+6]*1),c+=6;else if(d==="S")w=r,O=i,(E==="C"||E==="S")&&(w+=r-g[g.length-4],O+=i-g[g.length-3]),y||(r=i=0),g.push(w,O,f,h,r+=e[c+3]*1,i+=e[c+4]*1),c+=4;else if(d==="Q")w=r+(f-r)*s,O=i+(h-i)*s,y||(r=i=0),r+=e[c+3]*1,i+=e[c+4]*1,g.push(w,O,r+(f-r)*s,i+(h-i)*s,r,i),c+=4;else if(d==="T")w=r-g[g.length-4],O=i-g[g.length-3],g.push(r+w,i+O,f+(r+w*1.5-f)*s,h+(i+O*1.5-h)*s,r=f,i=h),c+=2;else if(d==="H")I(r,i,r=f,i),c+=1;else if(d==="V")I(r,i,r,i=f+(y?i-r:0)),c+=1;else if(d==="L"||d==="Z")d==="Z"&&(f=v,h=b,g.closed=!0),(d==="L"||oc(r-f)>.5||oc(i-h)>.5)&&(I(r,i,f,h),d==="L"&&(c+=2)),r=f,i=h;else if(d==="A"){if(M=e[c+4],N=e[c+5],w=e[c+6],O=e[c+7],u=7,M.length>1&&(M.length<3?(O=w,w=N,u--):(O=N,w=M.substr(2),u-=2),N=M.charAt(1),M=M.charAt(0)),C=E4e(r,i,+e[c+1],+e[c+2],+e[c+3],+M,+N,(y?r:0)+w*1,(y?i:0)+O*1),c+=u,C)for(u=0;u<C.length;u++)g.push(C[u]);r=g[g.length-2],i=g[g.length-1]}else console.log(l);return c=g.length,c<6?(n.pop(),c=0):xz(g),n.totalPoints=o+c,n}function T4e(t,e){t.samples||wie(t);for(var n=t.samples,r=t.lookup,i=t.resolution,s=t.totalLength,a=t.slice(0,2),o=[],l=t.length-4,c=6,u=.2,f=0,h=0,d,y,g,v,b,w,O,C,E,M,N,I,_,j;c<l;c+=6)Math.abs(S8(t[c+1]-t[c-1],t[c]-t[c-2])-S8(t[c+3]-t[c+1],t[c+2]-t[c]))>u&&o.push(c);if(o.push(t.length-2),l=o.length,a.nonSmooth=I=[1],e>l)for(e-=l,b=0;b<l;b++){for(_=o[b],j=Math.round(_/6*i),E=n[j-1]-f,y=Math.round(n[j-1]/s*e)-h,h+=y,w=1/(y+1),O=1;O<=y;O++)M=f+E*O*w,c=r.length?r[M<s?~~(M/t.minLength):r.length-1]||0:S4e(n,M,M/s),g=c?n[c-1]:0,v=n[c],v<M&&(g=v,v=n[++c]),d=1/i*((M-g)/(v-g)+c%i)||0,C=1-d,c=~~(c/i)*6,N=t[c],a.push(Ki((d*d*(t[c+6]-N)+3*C*(d*(t[c+4]-N)+C*(t[c+2]-N)))*d+N),Ki((d*d*(t[c+7]-(N=t[c+1]))+3*C*(d*(t[c+5]-N)+C*(t[c+3]-N)))*d+N));I[a.length]=1,a.push(t[_],t[_+1]),f+=E}return c=t.length-2,t.closed&&Math.abs(S8(t[c+1]-t[c-1],t[c]-t[c-2])-S8(t[3]-t[1],t[2]-t[0]))<=u&&(I[0]=I[I.length-1]=0),a}function P4e(t,e){oc(t[0]-t[2])<1e-4&&oc(t[1]-t[3])<1e-4&&(t=t.slice(2));var n=t.length-2,r=+t[0],i=+t[1],s=+t[2],a=+t[3],o=[r,i,r,i],l=s-r,c=a-i,u=t.nonSmooth||[],f=Math.abs(t[n]-r)<.001&&Math.abs(t[n+1]-i)<.001,h,d,y,g,v,b,w,O,C,E,M,N,I,_,j;if(!n)return[r,i,r,i,r,i,r,i];for(f&&(t.push(s,a),s=r,a=i,r=t[n-2],i=t[n-1],t.unshift(r,i),n+=4,u=[0,0].concat(u)),e=e||e===0?+e:1,y=2;y<n;y+=2)if(h=r,d=i,r=s,i=a,s=+t[y+2],a=+t[y+3],!(r===s&&i===a)){if(g=l,v=c,l=s-r,c=a-i,u[y]){o.push(r-(r-h)/4,i-(i-d)/4,r,i,r+(s-r)/4,i+(a-i)/4);continue}b=tf(g*g+v*v),w=tf(l*l+c*c),O=tf(Math.pow(l/w+g/b,2)+Math.pow(c/w+v/b,2)),C=(b+w)*e*.25/O,E=r-(r-h)*(b?C/b:0),M=r+(s-r)*(w?C/w:0),N=r-(E+((M-E)*(b*3/(b+w)+.5)/4||0)),I=i-(i-d)*(b?C/b:0),_=i+(a-i)*(w?C/w:0),j=i-(I+((_-I)*(b*3/(b+w)+.5)/4||0)),o.push(Ki(E+N),Ki(I+j),Ki(r),Ki(i),Ki(M+N),Ki(_+j))}return r!==s||i!==a||o.length<4?o.push(Ki(s),Ki(a),Ki(s),Ki(a)):o.length-=2,o.length===2?o.push(r,i,r,i,r,i):f&&(o.splice(0,6),o.length-=6),o.closed=f,o}function Tp(t){Aie(t[0])&&(t=[t]);var e="",n=t.length,r,i,s,a;for(i=0;i<n;i++){for(a=t[i],e+="M"+Ki(a[0])+","+Ki(a[1])+" C",r=a.length,s=2;s<r;s++)e+=Ki(a[s++])+","+Ki(a[s++])+" "+Ki(a[s++])+","+Ki(a[s++])+" "+Ki(a[s++])+","+Ki(a[s])+" ";a.closed&&(e+="z")}return e}function l6(){return l6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l6.apply(this,arguments)}var xl,jR,kb,kie,Cb,Cie,Eie=function(){return xl||typeof window<"u"&&(xl=window.gsap)&&xl.registerPlugin&&xl},fP=function(e){return typeof e=="function"},c6=Math.atan2,bz=Math.cos,vz=Math.sin,Jp=Math.sqrt,XC=Math.PI,Az=XC*2,M4e=XC*.3,N4e=XC*.7,LR=1e20,Ev=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,D4e=/(^[#.][a-z]|[a-y][a-z])/i,I4e=/[achlmqstvz]/i,zh=function(e){return console&&console.warn(e)},Fc=function(e){return Math.round(e*1e5)/1e5||0},Sz=function(e){var n=e.length,r=0,i=0,s;for(s=0;s<n;s++)r+=e[s++],i+=e[s];return[r/(n/2),i/(n/2)]},_1=function(e){var n=e.length,r=e[0],i=r,s=e[1],a=s,o,l,c;for(c=6;c<n;c+=6)o=e[c],l=e[c+1],o>r?r=o:o<i&&(i=o),l>s?s=l:l<a&&(a=l);return e.centerX=(r+i)/2,e.centerY=(s+a)/2,e.size=(r-i)*(s-a)},C2=function(e,n){n===void 0&&(n=3);for(var r=e.length,i=e[0][0],s=i,a=e[0][1],o=a,l=1/n,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I;--r>-1;)for(d=e[r],c=d.length,h=6;h<c;h+=6)for(b=d[h],w=d[h+1],O=d[h+2]-b,M=d[h+3]-w,C=d[h+4]-b,N=d[h+5]-w,E=d[h+6]-b,I=d[h+7]-w,y=n;--y>-1;)g=l*y,v=1-g,u=(g*g*E+3*v*(g*C+v*O))*g+b,f=(g*g*I+3*v*(g*N+v*M))*g+w,u>i?i=u:u<s&&(s=u),f>a?a=f:f<o&&(o=f);return e.centerX=(i+s)/2,e.centerY=(a+o)/2,e.left=s,e.width=i-s,e.top=o,e.height=a-o,e.size=(i-s)*(a-o)},Tie=function(e,n){return n.length-e.length},wz=function(e,n){var r=e.size||_1(e),i=n.size||_1(n);return Math.abs(i-r)<(r+i)/20?n.centerX-e.centerX||n.centerY-e.centerY:i-r},Oz=function(e,n){var r=e.slice(0),i=e.length,s=i-2,a,o;for(n=n|0,a=0;a<i;a++)o=(a+n)%s,e[a++]=r[o],e[a]=r[o+1]},hP=function(e,n,r,i,s){var a=e.length,o=0,l=a-2,c,u,f,h;for(r*=6,u=0;u<a;u+=6)c=(u+r)%l,h=e[c]-(n[u]-i),f=e[c+1]-(n[u+1]-s),o+=Jp(f*f+h*h);return o},_4e=function(e,n,r){var i=e.length,s=Sz(e),a=Sz(n),o=a[0]-s[0],l=a[1]-s[1],c=hP(e,n,0,o,l),u=0,f,h,d;for(d=6;d<i;d+=6)h=hP(e,n,d/6,o,l),h<c&&(c=h,u=d);if(r)for(f=e.slice(0),Ob(f),d=6;d<i;d+=6)h=hP(f,n,d/6,o,l),h<c&&(c=h,u=-d);return u/6},R4e=function(e,n,r){for(var i=e.length,s=LR,a=0,o=0,l,c,u,f,h,d;--i>-1;)for(l=e[i],d=l.length,h=0;h<d;h+=6)c=l[h]-n,u=l[h+1]-r,f=Jp(c*c+u*u),f<s&&(s=f,a=l[h],o=l[h+1]);return[a,o]},j4e=function(e,n,r,i,s,a){var o=n.length,l=0,c=Math.min(e.size||_1(e),n[r].size||_1(n[r]))*i,u=LR,f=e.centerX+s,h=e.centerY+a,d,y,g,v,b;for(y=r;y<o&&(d=n[y].size||_1(n[y]),!(d<c));y++)g=n[y].centerX-f,v=n[y].centerY-h,b=Jp(g*g+v*v),b<u&&(l=y,u=b);return b=n[l],n.splice(l,1),b},L4e=function(e,n,r){r===void 0&&(r=1);for(var i=e[n],s=e[n+1],a=e[n+2],o=e[n+3],l=e[n+4],c=e[n+5],u=e[n+6],f=e[n+7],h,d,y,g,v,b,w,O,C;r-- >0;)h=1-1/(r+2),d=i+(a-i)*h,y=a+(l-a)*h,g=s+(o-s)*h,v=o+(c-o)*h,b=d+(y-d)*h,w=g+(v-g)*h,O=l+(u-l)*h,C=c+(f-c)*h,y+=(O-y)*h,v+=(C-v)*h,e.splice(n+2,4,a=Fc(d),o=Fc(g),l=Fc(b),c=Fc(w),u=Fc(b+(y-b)*h),f=Fc(w+(v-w)*h),Fc(y),Fc(v),Fc(O),Fc(C))},F4e=function(e){for(var n=e.length,r=-LR,i;n--;)e[n]>r&&(r=e[n],i=n);return i},c4=function(e,n){for(var r=[],i=[],s=e.length-2,a=0;a<s;a+=6)r.push(Math.pow(e[a]-e[a+6],2)+Math.pow(e[a+1]-e[a+7],2));for(;n--;)a=F4e(r),i[a]=s=(i[a]||0)+1,r[a]*=s/(s+1);for(a=r.length;a--;)i[a]&&L4e(e,a*6,i[a])},AI=function(e,n){return n||Oie(e),Math.max(4,Math.round(e.totalLength/4))},kz=function(e){return e.slice(0).sort(Tie)},Pie=function(e){for(var n=e[0],r=e[1],i=2;i<e.length;i+=2)if(Math.abs(e[i]-n)>.01||Math.abs(e[i+1]-r)>.01)return!1;return!0},dP=function(e,n){n=n||{};var r=n,i=r.redraw,s=r.points,a=r.maxSegments,o=a===void 0?999:a,l=0,c=e,u=Array.isArray(s)?s:0,f,h,d,y,g;if(i=i!==!1,i)Oie(e);else for(e.totalPoints=0,h=e.length;h--;)e.totalPoints+=e[h].length;for(u?(c=kz(e),u=kz(u),g=u[0].totalLength/Math.round(u[0].length/6)):((!s||s==="auto")&&(s=AI(e,i),i||(s-=Math.round(e.totalPoints/6))),s=Math.max(i?10:4,Math.min(999,s))),h=0;h<c.length;h++){if(d=c[h],f=Math.max(i?10:4,u?Math.round(u[h]?u[h].length/6:c[h].totalLength/g||0):Math.round((l/s+(i?d.totalLength/e.totalLength:d.length/e.totalPoints))*s)-l),!(h>=o||u&&(!u[h]||Pie(u[h]))))if(i){var v;y=P4e(T4e(d,f),n.curviness),d.length=0,(v=d).push.apply(v,y)}else c4(d,f);l+=f}return e},SI=function(e,n,r,i,s){var a=n.length-e.length,o=a>0?n:e,l=a>0?e:n,c=0,u=i==="complexity"?Tie:wz,f=i==="position"?0:typeof i=="number"?i:.8,h=l.length,d=typeof r=="object"&&r.push?r.slice(0):[r],y=d[0]==="reverse"||d[0]<0,g=r==="log",v,b,w,O,C,E,M;if(l[0]){if(o.length>1&&(e.sort(u),n.sort(u),o.size||C2(o),l.size||C2(l),E=o.centerX-l.centerX,M=o.centerY-l.centerY,u===wz))for(h=0;h<l.length;h++)o.splice(h,0,j4e(l[h],o,h,f,E,M));if(a)for(a<0&&(a=-a),o[0].length>l[0].length&&c4(l[0],(o[0].length-l[0].length)/6|0),h=l.length;c<a;)O=o[h].size||_1(o[h]),w=R4e(l,o[h].centerX,o[h].centerY),O=w[0],C=w[1],l[h++]=[O,C,O,C,O,C,O,C],l.totalPoints+=8,c++;for(h=0;h<e.length;h++)v=n[h],b=e[h],a=v.length-b.length,a<0?c4(v,-a/6|0):a>0&&c4(b,a/6|0),y&&s!==!1&&!b.reversed&&Ob(b),r=d[h]||d[h]===0?d[h]:"auto",r&&(b.closed||Math.abs(b[0]-b[b.length-2])<.5&&Math.abs(b[1]-b[b.length-1])<.5?r==="auto"||r==="log"?(d[h]=r=_4e(b,v,!h||s===!1),r<0&&(y=!0,Ob(b),r=-r),Oz(b,r*6)):r!=="reverse"&&(h&&r<0&&Ob(b),Oz(b,(r<0?-r:r)*6)):!y&&(r==="auto"&&Math.abs(v[0]-b[0])+Math.abs(v[1]-b[1])+Math.abs(v[v.length-2]-b[b.length-2])+Math.abs(v[v.length-1]-b[b.length-1])>Math.abs(v[0]-b[b.length-2])+Math.abs(v[1]-b[b.length-1])+Math.abs(v[v.length-2]-b[0])+Math.abs(v[v.length-1]-b[1])||r%2)?(Ob(b),d[h]=-1,y=!0):r==="auto"?d[h]=0:r==="reverse"&&(d[h]=-1),b.closed!==v.closed&&(b.closed=v.closed=!1));return g&&zh("shapeIndex:["+d.join(",")+"]"),e.shapeIndex=d,d}},Cz=function(e,n,r,i,s){var a=uf(e[0]),o=uf(e[1]);SI(a,o,n||n===0?n:"auto",r,s)&&(e[0]=Tp(a),e[1]=Tp(o),(i==="log"||i===!0)&&zh('precompile:["'+e[0]+'","'+e[1]+'"]'))},$4e=function(e,n){if(!n)return e;var r=e.match(Ev)||[],i=r.length,s="",a,o,l;for(n==="reverse"?(o=i-1,a=-2):(o=((parseInt(n,10)||0)*2+1+i*100)%i,a=2),l=0;l<i;l+=2)s+=r[o-1]+","+r[o]+" ",o=(o+a)%i;return s},Ez=function(e,n){var r=0,i=parseFloat(e[0]),s=parseFloat(e[1]),a=i+","+s+" ",o=.999999,l,c,u,f,h,d,y;for(u=e.length,l=n*.5/(u*.5-1),c=0;c<u-2;c+=2){if(r+=l,d=parseFloat(e[c+2]),y=parseFloat(e[c+3]),r>o)for(h=1/(Math.floor(r)+1),f=1;r>o;)a+=(i+(d-i)*h*f).toFixed(2)+","+(s+(y-s)*h*f).toFixed(2)+" ",r--,f++;a+=d+","+y+" ",i=d,s=y}return a},wI=function(e){var n=e[0].match(Ev)||[],r=e[1].match(Ev)||[],i=r.length-n.length;i>0?e[0]=Ez(n,i):e[1]=Ez(r,-i)},B4e=function(e){return isNaN(e)?wI:function(n){wI(n),n[1]=$4e(n[1],parseInt(e,10))}},V4e=function(e,n,r){var i=typeof e=="string",s,a;return(!i||D4e.test(e)||(e.match(Ev)||[]).length<3)&&(s=jR(e)[0],s?(a=(s.nodeName+"").toUpperCase(),n&&a!=="PATH"&&(s=Sie(s,!1),a="PATH"),e=s.getAttribute(a==="PATH"?"d":"points")||"",s===r&&(e=s.getAttributeNS(null,"data-original")||e)):(zh("WARNING: invalid morph to: "+e),e=!1)),e},Tz=function(e){for(var n=e.length,r,i,s,a,o,l,c,u;--n>-1;)for(r=e[n],u=r.cpData=r.cpData||[],u.length=0,c=r.length-2,l=0;l<c;l+=6)i=r[l]-r[l+2],s=r[l+1]-r[l+3],a=r[l+6]-r[l+4],o=r[l+7]-r[l+5],u[l+2]=c6(s,i),u[l+3]=Jp(i*i+s*s),u[l+4]=c6(o,a),u[l+5]=Jp(a*a+o*o);return e},Pz=function(e){var n=e.trim().split(" "),r=~e.indexOf("left")?0:~e.indexOf("right")?100:isNaN(parseFloat(n[0]))?50:parseFloat(n[0]),i=~e.indexOf("top")?0:~e.indexOf("bottom")?100:isNaN(parseFloat(n[1]))?50:parseFloat(n[1]);return{x:r/100,y:i/100}},Mie=function(e){return e!==e%XC?e+(e<0?Az:-Az):e},Mz="Use MorphSVGPlugin.convertToPath() to convert to a path before morphing.",H4e=function(e,n,r,i){var s=this._origin,a=this._eOrigin,o=e[r]-s.x,l=e[r+1]-s.y,c=Jp(o*o+l*l),u=c6(l,o),f,h;return o=n[r]-a.x,l=n[r+1]-a.y,f=c6(l,o)-u,h=Mie(f),!i&&kb&&Math.abs(h+kb.ca)<M4e&&(i=kb),this._anchorPT=kb={_next:this._anchorPT,t:e,sa:u,ca:i&&h*i.ca<0&&Math.abs(h)>N4e?f:h,sl:c,cl:Jp(o*o+l*l)-c,i:r}},Nz=function(e){xl=Eie(),Cb=Cb||xl&&xl.plugins.morphSVG,xl&&Cb?(jR=xl.utils.toArray,Cie=xl.core.reverting||function(){},Cb.prototype._tweenRotation=H4e,kie=1):e&&zh("Please gsap.registerPlugin(MorphSVGPlugin)")},u1={version:"3.15.0",name:"morphSVG",rawVars:1,register:function(e,n){xl=e,Cb=n,Nz()},init:function(e,n,r,i,s){if(kie||Nz(1),!n)return zh("invalid shape"),!1;fP(n)&&(n=n.call(r,i,e,s));var a,o,l,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I,_;if(typeof n=="string"||n.getBBox||n[0])n={shape:n};else if(typeof n=="object"){a={};for(o in n)a[o]=fP(n[o])&&o!=="render"?n[o].call(r,i,e,s):n[o];n=a}var j=e.nodeType?window.getComputedStyle(e):{},L=j.fill+"",V=!(L==="none"||(L.match(Ev)||[])[3]==="0"||j.fillRule==="evenodd"),$=n.smooth,Z=(n.origin||"50 50").split(",");if($===!0||$==="auto"?$={}:typeof $=="number"&&($={points:$}),a=(e.nodeName+"").toUpperCase(),u=a==="POLYLINE"||a==="POLYGON",a!=="PATH"&&!u&&!n.prop)return zh("Cannot morph a <"+a+"> element. "+Mz),!1;if(o=a==="PATH"?"d":"points",!n.prop&&!fP(e.setAttribute))return!1;if(c=V4e(n.shape||n.d||n.points||"",o==="d",e),u&&I4e.test(c))return zh("A <"+a+"> cannot accept path data. "+Mz),!1;if(f=n.shapeIndex||n.shapeIndex===0?n.shapeIndex:"auto",h=n.map||u1.defaultMap,this._prop=n.prop,this._render=n.render||u1.defaultRender,this._apply="updateTarget"in n?n.updateTarget:u1.defaultUpdateTarget,this._rnd=Math.pow(10,isNaN(n.precision)?2:+n.precision),this._tween=r,c){if(this._target=e,M=typeof n.precompile=="object",g=this._original=this._prop?e[this._prop]:e.getAttribute(o),!this._prop&&!e.getAttributeNS(null,"data-original")&&e.setAttributeNS(null,"data-original",g),o==="d"||this._prop){if(g=uf(M?n.precompile[0]:g),v=uf(M?n.precompile[1]:c),$){for(w=g.length;--w;)Pie(g[w])&&g.splice(w,1);dP(g,l6({},$,{points:+$.points||Math.max(AI(g),AI(v)),maxSegments:v.length})),dP(v,$.redraw===!1?$:l6({},$,{points:g}))}if(!M&&!SI(g,v,f,h,V))return!1;for((n.precompile==="log"||n.precompile===!0)&&zh('precompile:["'+Tp(g)+'","'+Tp(v)+'"]'),I=(n.type||u1.defaultType)!=="linear",_=n.curveMode||I,Tz(g),Tz(v),I&&(g.size||C2(g),v.size||C2(v),N=Pz(Z[0]),this._origin=g.origin={x:g.left+N.x*g.width,y:g.top+N.y*g.height},Z[1]&&(N=Pz(Z[1])),this._eOrigin={x:v.left+N.x*v.width,y:v.top+N.y*v.height}),this._rawPath=e._gsRawPath=g,w=g.length;--w>-1;){for(C=g[w],E=v[w],d=C.cpData,y=E.cpData,O=C.length,kb=0,b=0;b<O;b+=6)(E[b]!==C[b]||E[b+1]!==C[b+1])&&(I?l=this._tweenRotation(C,E,b):(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1),l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l));for(b=0;b<O;b+=2)_&&(d[b]!==y[b]||d[b+1]!==y[b+1])&&d[b+1]&&y[b+1]?this._controlPT={_next:this._controlPT,i:b,j:w,ai:b%6>3?b+2:b-2,sa:d[b],ca:Mie(y[b]-d[b]),sl:d[b+1],cl:y[b+1]-d[b+1]}:(E[b]!==C[b]&&(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1)),E[b+1]!==C[b+1]&&(l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l))}}else l=this.add(e,"setAttribute",e.getAttribute(o)+"",c+"",i,s,0,B4e(f),o);I&&(this.add(this._origin,"x",this._origin.x,this._eOrigin.x,0,0,0,0,0,1),l=this.add(this._origin,"y",this._origin.y,this._eOrigin.y,0,0,0,0,0,1)),l&&(this._props.push("morphSVG"),l.end=$&&$.persist!==!1?Tp(v):c,l.endProp=o)}return 1},render:function(e,n){for(var r=n._rawPath,i=n._controlPT,s=n._anchorPT,a=n._rnd,o=n._target,l=n._pt,c,u,f,h,d,y,g,v,b;l;)l.r(e,l.d),l=l._next;if(e===1&&n._apply)for(l=n._pt;l;)l.end&&(n._prop?o[n._prop]=l.end:o.setAttribute(l.endProp,l.end)),l=l._next;else if(r){for(;s;)d=s.sa+e*s.ca,h=s.sl+e*s.cl,s.t[s.i]=n._origin.x+bz(d)*h,s.t[s.i+1]=n._origin.y+vz(d)*h,s=s._next;for(;i;)f=r[i.j],y=i.i,d=i.sa+e*i.ca,v=vz(d),b=bz(d),h=i.sl+e*i.cl,f[y]=f[i.ai]-b*h,f[y+1]=f[i.ai+1]-v*h,i=i._next;if(!e&&Cie()&&(r=uf(n._original)),o._gsRawPath=r,n._apply){for(c="",u=" ",g=0;g<r.length;g++){for(f=r[g],h=f.length,c+="M"+(f[0]*a|0)/a+u+(f[1]*a|0)/a+" C",y=2;y<h;y++)c+=(f[y]*a|0)/a+u;f.closed&&(c+="z")}n._prop?o[n._prop]=c:o.setAttribute("d",c)}}n._render&&r&&n._render.call(n._tween,r,o)},kill:function(e){this._pt=this._rawPath=0},getRawPath:w4e,stringToRawPath:uf,rawPathToString:Tp,smoothRawPath:dP,normalizeStrings:function(e,n,r){var i=r.shapeIndex,s=r.map,a=[e,n];return Cz(a,i,s),a},pathFilter:Cz,pointsFilter:wI,getTotalSize:C2,equalizeSegmentQuantity:SI,convertToPath:function(e,n){return jR(e).map(function(r){return Sie(r,n!==!1)})},defaultType:"linear",defaultUpdateTarget:!0,defaultMap:"size"};Eie()&&xl.registerPlugin(u1);const Md=30;function ns(t){if(!Number.isFinite(t)||t<0)return"00:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function Tv(t,e=Md){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function FR(t,e=Md){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function Q4e(t,e,n=Md){const r=Tv(t,n),i=Math.max(0,r+e);return FR(i,n)}function Dz(t,e,n=Md){const r=Tv(t,n),i=Tv(e,n);return`${r}f / ${i}f`}const Nie="hf-studio-ui-preferences";function Iz(t){return typeof t=="object"&&t!==null}function Die(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function Iie(t){if(!t)return{};try{const e=t.getItem(Nie);if(!e)return{};const n=JSON.parse(e);if(!Iz(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.leftWidth=="number"&&Number.isFinite(n.leftWidth)&&(r.leftWidth=n.leftWidth),typeof n.rightWidth=="number"&&Number.isFinite(n.rightWidth)&&(r.rightWidth=n.rightWidth),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.timelineHeight=="number"&&Number.isFinite(n.timelineHeight)&&(r.timelineHeight=n.timelineHeight),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),typeof n.audioVolume=="number"&&Number.isFinite(n.audioVolume)&&n.audioVolume>=0&&n.audioVolume<=1&&(r.audioVolume=n.audioVolume),n.thumbnailMode==="adaptive"||n.thumbnailMode==="hidden"?r.thumbnailMode=n.thumbnailMode:typeof n.thumbnailsEnabled=="boolean"&&(r.thumbnailMode=n.thumbnailsEnabled?"adaptive":"hidden"),Iz(n.previewZoom)){const{zoomPercent:i,panX:s,panY:a}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof s=="number"&&Number.isFinite(s)&&typeof a=="number"&&Number.isFinite(a)&&(r.previewZoom={zoomPercent:i,panX:s,panY:a})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),typeof n.snapEnabled=="boolean"&&(r.snapEnabled=n.snapEnabled),typeof n.gridVisible=="boolean"&&(r.gridVisible=n.gridVisible),typeof n.gridSpacing=="number"&&Number.isFinite(n.gridSpacing)&&(r.gridSpacing=n.gridSpacing),typeof n.snapToGrid=="boolean"&&(r.snapToGrid=n.snapToGrid),typeof n.timelineSnapEnabled=="boolean"&&(r.timelineSnapEnabled=n.timelineSnapEnabled),(n.timeDisplayMode==="time"||n.timeDisplayMode==="frame")&&(r.timeDisplayMode=n.timeDisplayMode),(n.timelineZoomMode==="fit"||n.timelineZoomMode==="manual")&&(r.timelineZoomMode=n.timelineZoomMode),typeof n.timelineManualZoomPercent=="number"&&Number.isFinite(n.timelineManualZoomPercent)&&(r.timelineManualZoomPercent=n.timelineManualZoomPercent),r}catch{return{}}}function jo(t=Die()){return Iie(t)}function bl(t,e=Die()){if(e)try{const n={...Iie(e),...t};e.setItem(Nie,JSON.stringify(n))}catch{}}const _ie=10,Z4e=48,z4e=.5,G4e=2,U4e=.014;function $R(t){if(!Number.isFinite(t)||t<=0)return 100;const e=Md*Z4e;return Math.max(100,Math.round(e/t*100))}function T0(t,e){if(!Number.isFinite(t))return 100;const n=$R(e);return Math.max(_ie,Math.min(n,Math.round(t)))}function WC(t,e,n){return t==="fit"?100:T0(e,n)}function X4e(t,e){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?100:T0(t/e*100,e)}function W4e(t,e,n){if(!Number.isFinite(t)||t<=0)return 100;const r=WC(e,n,t);return e==="fit"?t:t*(r/100)}function _z(t,e,n,r){const i=WC(e,n,r),s=t==="in"?i*G4e:i*z4e;return T0(s,r)}function Y4e(t,e,n,r){const i=WC(e,n,r);return!Number.isFinite(t)||t===0?i:T0(i*Math.exp(-t*U4e),r)}const u6=Math.log(_ie);function q4e(t,e){const n=T0(t,e),r=Math.log($R(e));return(Math.log(n)-u6)/(r-u6)*100}function K4e(t,e){const n=Math.max(0,Math.min(100,t)),r=Math.log($R(e)),i=u6+n/100*(r-u6);return T0(Math.exp(i),e)}function Rie(t,e){return t.projectId===e.timelineProjectId&&t.sessionEpoch===e.timelineSessionEpoch&&t.elementId===e.selectedElementId}function J4e(t,e){return{selectedKeyframes:new Set,toggleSelectedKeyframe:n=>t(r=>{const i=new Set(r.selectedKeyframes);return i.has(n)?i.delete(n):i.add(n),{selectedKeyframes:i}}),clearSelectedKeyframes:()=>t({selectedKeyframes:new Set}),expandedClipIds:new Set,toggleClipExpanded:n=>t(r=>{const i=new Set(r.expandedClipIds);return i.has(n)?i.delete(n):i.add(n),{expandedClipIds:i}}),setClipExpanded:(n,r)=>t(i=>{if(i.expandedClipIds.has(n)===r)return i;const s=new Set(i.expandedClipIds);return r?s.add(n):s.delete(n),{expandedClipIds:s}}),expandClips:n=>t(r=>{if(n.every(s=>r.expandedClipIds.has(s)))return r;const i=new Set(r.expandedClipIds);for(const s of n)i.add(s);return{expandedClipIds:i}}),expandedGroupIds:new Set,toggleGroupExpanded:n=>t(r=>{const i=new Set(r.expandedGroupIds);return i.has(n)?i.delete(n):i.add(n),{expandedGroupIds:i}}),expandedLaneOwnerIds:new Set,toggleLaneOwnerExpanded:n=>t(r=>{const i=new Set(r.expandedLaneOwnerIds);return i.has(n)?i.delete(n):i.add(n),{expandedLaneOwnerIds:i}}),focusedEaseSegment:null,focusedEaseRequestNonce:0,setFocusedEaseSegment:n=>t(r=>{const i=r.focusedEaseRequestNonce+1,{timelineProjectId:s,timelineSessionEpoch:a}=e();return{focusedEaseRequestNonce:i,focusedEaseSegment:{...n,projectId:s,sessionEpoch:a,nonce:i}}}),clearFocusedEaseSegment:n=>t(r=>{var i;return((i=r.focusedEaseSegment)==null?void 0:i.nonce)===n?{focusedEaseSegment:null}:r}),keyframeCache:new Map,setKeyframeCache:(n,r)=>t(i=>{if(r?i.keyframeCache.get(n)===r:!i.keyframeCache.has(n))return i;const s=new Map(i.keyframeCache);return r?s.set(n,r):s.delete(n),{keyframeCache:s}}),gsapAnimations:new Map,setGsapAnimations:(n,r)=>t(i=>{if(r?i.gsapAnimations.get(n)===r:!i.gsapAnimations.has(n))return i;const s=new Map(i.gsapAnimations);return r?s.set(n,r):s.delete(n),{gsapAnimations:s}})}}function e6e(t){return{automationSelection:null,setAutomationSelection:e=>t({automationSelection:{...e,t0:Math.min(e.t0,e.t1),t1:Math.max(e.t0,e.t1),v0:Math.min(e.v0,e.v1),v1:Math.max(e.v0,e.v1)}}),clearAutomationSelection:()=>t({automationSelection:null})}}function t6e(t,e,n,r){return{id:t,projectId:e,sessionEpoch:n,nonce:r}}const jie="follow-preference";function n6e(t,e=jie){return t??(e==="legacy-default"?"hidden":"adaptive")}function r6e(t,e=jie){return e==="force-hidden"?"hidden":t}function i6e(t){return{thumbnailMode:n6e(jo().thumbnailMode),setThumbnailMode:e=>{bl({thumbnailMode:e}),t({thumbnailMode:e})}}}const Da="data-fx-chain",Lie=Da.slice(5),e0=1,Dx=(t="frequency",e="Frequency",n=1e3,r=20,i=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:r,max:i,step:1,default:n,scale:"log",automatable:!0}),pP=(t=.707,e="Bandwidth — higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),w8=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),Rz={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},HA=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[w8(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[Dx("frequency","Frequency",1e3),w8(-40,40,0),pP(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[Dx("frequency","Frequency",200,20,2e3),w8(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[Dx("frequency","Frequency",4e3,500,2e4),w8(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies — the usual fix for rumble on a voice.",params:[Dx("frequency","Cutoff",300,20,2e4),pP(.707),Rz],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies — darkens or muffles a track.",params:[Dx("frequency","Cutoff",8e3,100,2e4),pP(.707),Rz],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Hard ceiling — nothing gets past the limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times — a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],YC=new Map(HA.map(t=>[t.id,t]));function QA(t){return YC.get(t)}HA.map(t=>t.id);function Mf(t){const e=YC.get(t);if(!e)return{};const n={};for(const r of e.params)n[r.key]=r.default;return n}function Nd(t,e){const n=YC.get(t);if(!n)return{};const r={};for(const i of n.params){const s=e==null?void 0:e[i.key];if(i.kind==="enum"){const o=i.options.some(l=>l.value===s);r[i.key]=o?s:i.default;continue}const a=typeof s=="number"?s:typeof s=="string"&&s.trim()!==""?Number(s):Number.NaN;r[i.key]=Number.isFinite(a)?Math.min(i.max,Math.max(i.min,a)):i.default}return r}class Mm extends Error{constructor(e){super(e),this.name="AudioFxChainError"}}function qC(t){let e;try{e=JSON.parse(t)}catch(i){throw new Mm(`Chain file is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new Mm("Chain file must be a JSON object.");const n=e;if(n.version!==e0)throw new Mm(`Unsupported chain version: ${String(n.version)}`);if(!Array.isArray(n.nodes))throw new Mm("Chain file is missing a `nodes` array.");const r=n.nodes.map((i,s)=>{if(typeof i!="object"||i===null)throw new Mm(`Node ${s} is not an object.`);const a=i;if(typeof a.type!="string"||!YC.has(a.type))throw new Mm(`Node ${s} has unknown effect type: ${String(a.type)}`);return{type:a.type,...typeof a.id=="string"&&a.id?{id:a.id}:{},...a.fromCarve===!0?{fromCarve:!0}:{},...typeof a.fromPreset=="string"&&a.fromPreset?{fromPreset:a.fromPreset}:{},...typeof a.label=="string"&&a.label?{label:a.label}:{},...typeof a.fromEq=="string"&&a.fromEq?{fromEq:a.fromEq}:{},...a.fromLeveller===!0?{fromLeveller:!0}:{},...typeof a.presetAmount=="number"&&Number.isFinite(a.presetAmount)?{presetAmount:Math.min(1,Math.max(0,a.presetAmount))}:{},enabled:a.enabled!==!1,params:Nd(a.type,a.params??void 0)}});return{version:e0,nodes:r}}function s6e(t){return t.nodes.filter(e=>e.enabled!==!1)}function cu(t){return JSON.stringify({version:e0,nodes:t.nodes.map(e=>({type:e.type,...e.id?{id:e.id}:{},...e.fromCarve===!0?{fromCarve:!0}:{},...e.fromPreset?{fromPreset:e.fromPreset}:{},...e.label?{label:e.label}:{},...e.fromEq?{fromEq:e.fromEq}:{},...e.fromLeveller===!0?{fromLeveller:!0}:{},...typeof e.presetAmount=="number"&&e.presetAmount!==1?{presetAmount:e.presetAmount}:{},...e.enabled===!1?{enabled:!1}:{},params:Nd(e.type,e.params)}))})}function qg(t){const e=new Set(t.nodes.map(n=>n.id).filter(Boolean));for(let n=1;;n+=1){const r=`n${n}`;if(!e.has(r))return r}}const BR=12,Fie=10**(BR/20),rd=-100,og=100,$ie=-60;function VR(t){return Number.isFinite(t)?Math.max(0,Math.min(Fie,t)):1}function Bie(t){return VR(t).toFixed(6).replace(/\.?0+$/,"")}function OI(t){const e=Math.max(rd,Math.min(og,t));return e===rd?0:10**((e<0?e/Math.abs(rd)*Math.abs($ie):e/og*BR)/20)}function Vie(t){const e=VR(t);if(e===0)return rd;const n=20*Math.log10(e),r=n<0?n/Math.abs($ie)*Math.abs(rd):n/BR*og;return Math.max(rd,Math.min(og,r))}function kI(t){const e=VR(t);if(e===0)return"-∞ dB";const n=20*Math.log10(e),r=Math.abs(n)<.05?0:n;return(r>0?"+":"")+r.toFixed(1)+" dB"}const kl="data-automation",Hie=kl.slice(5),KC=1,Qie=512;class ap extends Error{constructor(e){super(e),this.name="AudioAutomationError"}}const E2="volume";function ZA(t){if(t===E2)return{kind:"volume"};const e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===Zie){const i=e[2];return i?{kind:"preset",presetId:i}:null}if(e.length!==3||e[0]!=="fx")return null;const[,n,r]=e;return!n||!r?null:{kind:"fx",nodeId:n,param:r}}function md(t,e){return`fx.${t}.${e}`}const Zie="preset";function mP(t){return`fx.${Zie}.${t}`}const a6e={min:0,max:1,step:.01,unit:"",label:"Amount",scale:"linear",default:1},zie={min:0,max:Fie,step:.01,unit:"",label:"Volume",scale:"linear",default:1};function t0(t,e){const n=ZA(t);if(!n)return null;if(n.kind==="volume")return zie;if(n.kind==="preset")return(e==null?void 0:e.nodes.some(o=>o.fromPreset===n.presetId))?{...a6e,label:`${n.presetId} · Amount`}:null;const r=e==null?void 0:e.nodes.find(a=>a.id===n.nodeId);if(!r)return null;const i=QA(r.type),s=i==null?void 0:i.params.find(a=>a.key===n.param);return!s||s.kind!=="number"?null:{min:s.min,max:s.max,step:s.step,unit:s.unit,label:`${(i==null?void 0:i.label)??r.type} · ${s.label}`,scale:s.scale==="log"&&s.min>0?"log":"linear",default:s.default}}function Pv(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){const e=Number(t);return Number.isFinite(e)?e:null}return null}function o6e(t){const e=Pv(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function HR(t,e){const n=Pv(t),r=Pv(e);if(n===null||r===null)return null;const i=o=>Math.min(.999,Math.max(.001,o)),s=i(n),a=i(r);return Math.abs(s-a)<1e-6?null:{x:s,y:a}}function l6e(t,e){const n=HR(t,e);return n?{viaX:n.x,viaY:n.y}:null}function c6e(t){const e=o6e(t==null?void 0:t.curve),n=HR(t==null?void 0:t.viaX,t==null?void 0:t.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function u6e(t,e){const n=Pv(t==null?void 0:t.t),r=Pv(t==null?void 0:t.v);if(n===null||r===null)return null;const i=e?Math.min(e.max,Math.max(e.min,r)):r;return{t:Math.max(0,n),v:i,...c6e(t)}}function Gie(t,e){const n=t.map(i=>u6e(i,e)).filter(i=>i!==null).sort((i,s)=>i.t-s.t),r=[];for(const i of n)r.length>0&&r[r.length-1].t===i.t?r[r.length-1]=i:r.push(i);return r.slice(0,Qie)}function f6e(t){const e=[];for(const n of t.lanes){if(!ZA(n.target))continue;const r=n.target===E2?zie:null,i=Gie(n.points??[],r);i.length>0&&e.push({target:n.target,points:i})}return{version:KC,lanes:e}}function Uie(t,e){const n=[];for(const r of t.lanes){const i=t0(r.target,e);if(!i)continue;const s=Gie(r.points,i);s.length>0&&n.push({target:r.target,points:s})}return{version:KC,lanes:n}}function Xie(t){let e;try{e=JSON.parse(t)}catch(i){throw new ap(`Automation is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new ap("Automation must be a JSON object.");const n=e;if(n.version!==KC)throw new ap(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new ap("Automation is missing a `lanes` array.");const r=n.lanes.map((i,s)=>{if(typeof i!="object"||i===null)throw new ap(`Lane ${s} is not an object.`);const a=i;if(typeof a.target!="string"||!ZA(a.target))throw new ap(`Lane ${s} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new ap(`Lane ${s} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return f6e({lanes:r})}function Wie(t){return JSON.stringify({version:KC,lanes:t.lanes.map(e=>({target:e.target,points:e.points.map(n=>({t:n.t,v:n.v,...n.curve?{curve:n.curve}:{},...n.viaX!==void 0&&n.viaY!==void 0?{viaX:n.viaX,viaY:n.viaY}:{}}))}))})}function h6e(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function d6e(t,e){const n=t-.5,r=e-.5,i=.999,s=1e6,a=n>0?n/(i-t):n<0?-n/(t-(1-i)):0,o=r>0?r/(i-e):r<0?-r/(e-(1-i)):0,l=Math.min(s,Math.max(1,a,o));return{cx:t+n/l,cy:e+r/l,w:l}}function p6e(t,e,n){const{cx:r,cy:i,w:s}=d6e(e,n),a=2-2*s,o=t*a-1+2*s*r,l=-t*a-2*s*r,c=m6e(o,l,t),u=1-c,f=u*u+2*s*c*u+c*c;return f>0?(2*s*i*c*u+c*c)/f:t}function m6e(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;const r=Math.sqrt(Math.max(0,e*e-4*t*n)),i=(-e+r)/(2*t),s=(-e-r)/(2*t),a=o=>o>=-1e-9&&o<=1+1e-9;return a(i)?Math.min(1,Math.max(0,i)):a(s)?Math.min(1,Math.max(0,s)):n}function g6e(t,e){const n=HR(e.viaX,e.viaY);return n?p6e(Math.min(1,Math.max(0,t)),n.x,n.y):h6e(t,e.curve)}function y6e(t,e,n,r){return r==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function n0(t,e,n="linear"){const r=t.points;if(r.length===0)return 0;const i=r[0];if(e<=i.t)return i.v;const s=r[r.length-1];if(e>=s.t)return s.v;let a=0,o=r.length-1;for(;o-a>1;){const f=a+o>>1;r[f].t<=e?a=f:o=f}const l=r[a],c=r[o],u=c.t-l.t;return u<=0?c.v:y6e(l.v,c.v,g6e((e-l.t)/u,l),n)}const Yie="hf-audio-group",Mv="data-audio-group",x6e=`audio[${Mv}]`;function b6e(t){const e=t==null?void 0:t.getAttribute("data-volume"),n=e?parseFloat(e):1;return Number.isFinite(n)?n:1}function v6e(t,e,n){const r=n==null?void 0:n.getAttribute(Da),i=n==null?void 0:n.getAttribute(kl);return{id:t,label:(n==null?void 0:n.getAttribute("data-label"))||t,memberIds:e,...r?{fxChain:r}:{},...i?{automation:i}:{},volume:b6e(n),hidden:(n==null?void 0:n.hasAttribute("data-hidden"))??!1}}function Kg(t){const e=new Map;for(const i of t.querySelectorAll(x6e)){const s=i.getAttribute(Mv);if(!s||!i.id)continue;const a=e.get(s);a?a.push(i.id):e.set(s,[i.id])}const n=new Map;for(const i of t.querySelectorAll(Yie))i.id&&n.set(i.id,i);const r=[];for(const[i,s]of e)r.push(v6e(i,s,n.get(i)));return r}function A6e(t,e){const n=new Map(Kg(t).map(a=>[a.id,a])),r=new Set,i=[],s=a=>{r.has(a)||(r.add(a),i.push(a))};for(const a of e){const o=n.get(a);o?o.memberIds.forEach(s):t.getElementById(a)&&s(a)}return i}function S6e(t,e,n){return t.size===0||t.has(e)?!1:n.some(r=>t.has(r))}function w6e(t,e){return{soloed:new Set,toggleSolo:(n,r)=>{const i=e().soloed;if(r!=null&&r.add){const a=new Set(i);a.has(n)?a.delete(n):a.add(n),t({soloed:a});return}const s=i.size===1&&i.has(n);t({soloed:s?new Set:new Set([n])})},clearSolo:()=>t({soloed:new Set})}}function O6e(t){return{motionPathArmed:!1,setMotionPathArmed:e=>t({motionPathArmed:e}),motionPathCreateAvailable:!1,setMotionPathCreateAvailable:e=>t({motionPathCreateAvailable:e}),autoKeyframeEnabled:!0,setAutoKeyframeEnabled:e=>t({autoKeyframeEnabled:e})}}const gP=new Set,pa={notify:t=>gP.forEach(e=>e(t)),subscribe:t=>(gP.add(t),()=>gP.delete(t))};function yP(t,e){const n=new Set(t);return n.size===0?{selectedElementIds:n,selectedElementId:null}:e&&n.has(e)?{selectedElementIds:n,selectedElementId:e}:{selectedElementIds:n,selectedElementId:n.values().next().value??null}}function CI(){return{isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,beatDragging:!1,elements:[],selectedElementId:null,zEditVersion:0,inPoint:null,outPoint:null,activeTool:"select",activeKeyframePct:null,motionPathArmed:!1,motionPathCreateAvailable:!1,selectedKeyframes:new Set,automationSelection:null,expandedClipIds:new Set,expandedGroupIds:new Set,expandedLaneOwnerIds:new Set,focusedEaseSegment:null,selectedElementIds:new Set,requestedSeekTime:null,lintFindingsByElement:new Map,timelineFocus:null,keyframeCache:new Map,gsapAnimations:new Map,beatAnalysis:null,beatEdits:null,beatUndo:[],beatRedo:[],beatPersist:null,clipManifest:null,clipParentMap:new Map,domClipChildren:[]}}const ue=ZC((t,e)=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,timelineSessionEpoch:0,timelineProjectId:null,beatDragging:!1,elements:[],selectedElementId:null,playbackRate:jo().playbackRate??1,audioMuted:jo().audioMuted??!1,audioVolume:jo().audioVolume??1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,zEditVersion:0,timelinePps:100,timelineFitPps:100,inPoint:null,outPoint:null,activeTool:"select",setActiveTool:n=>t({activeTool:n}),...J4e(t,()=>({timelineProjectId:e().timelineProjectId,timelineSessionEpoch:e().timelineSessionEpoch})),...i6e(t),...e6e(t),...w6e(t,e),...O6e(t),activeKeyframePct:null,setActiveKeyframePct:n=>t({activeKeyframePct:n}),selectedElementIds:new Set,setSelection:(n,r)=>t(yP(n,r)),addSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.add(n),yP(i,r.selectedElementId)}),toggleSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.has(n)?i.delete(n):i.add(n),yP(i,r.selectedElementId)}),clearSelection:()=>t({selectedElementId:null,selectedElementIds:new Set}),requestedSeekTime:null,requestSeek:n=>t({requestedSeekTime:n}),clearSeekRequest:()=>t({requestedSeekTime:null}),playbackRequest:null,requestPlayback:(n,r=null)=>t(i=>{var s;return{playbackRequest:{playing:n,returnTo:r,nonce:(((s=i.playbackRequest)==null?void 0:s.nonce)??0)+1}}}),clearPlaybackRequest:()=>t({playbackRequest:null}),clipRevealRequest:null,requestClipReveal:n=>t(r=>{var i;return{clipRevealRequest:{elementId:n,nonce:(((i=r.clipRevealRequest)==null?void 0:i.nonce)??0)+1}}}),clearClipRevealRequest:()=>t({clipRevealRequest:null}),timelineFocus:null,timelineFocusNonce:0,requestTimelineFocus:n=>t(r=>{const i=r.timelineFocusNonce+1;return{timelineFocusNonce:i,timelineFocus:t6e(n,r.timelineProjectId,r.timelineSessionEpoch,i)}}),clearTimelineFocus:n=>t(r=>{var i;return((i=r.timelineFocus)==null?void 0:i.nonce)===n?{timelineFocus:null}:r}),lintFindingsByElement:new Map,setLintFindingsByElement:n=>t({lintFindingsByElement:n}),beatAnalysis:null,setBeatAnalysis:n=>t({beatAnalysis:n}),beatEdits:null,setBeatEdits:n=>t({beatEdits:n}),beatUndo:[],beatRedo:[],beatPersist:null,setBeatPersist:n=>t({beatPersist:n}),commitBeatEdits:(n,r)=>{var i,s;t(a=>({beatEdits:n,beatUndo:[...a.beatUndo,{restore:a.beatEdits,at:Date.now(),label:r}],beatRedo:[]})),(s=(i=e()).beatPersist)==null||s.call(i)},undoBeatEdits:()=>{var i,s;const n=e(),r=n.beatUndo[n.beatUndo.length-1];return r?(t({beatEdits:r.restore,beatUndo:n.beatUndo.slice(0,-1),beatRedo:[...n.beatRedo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},resetBeatHistory:()=>t({beatUndo:[],beatRedo:[]}),redoBeatEdits:()=>{var i,s;const n=e(),r=n.beatRedo[n.beatRedo.length-1];return r?(t({beatEdits:r.restore,beatRedo:n.beatRedo.slice(0,-1),beatUndo:[...n.beatUndo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},clipManifest:null,setClipManifest:n=>t({clipManifest:n}),clipParentMap:new Map,setClipParentMap:n=>t({clipParentMap:n}),domClipChildren:[],setDomClipChildren:n=>t({domClipChildren:n}),setIsPlaying:n=>{e().isPlaying!==n&&t({isPlaying:n})},setPlaybackRate:n=>{bl({playbackRate:n}),t({playbackRate:n})},setAudioMuted:n=>{bl({audioMuted:n}),t({audioMuted:n})},setAudioVolume:n=>{const r=Number.isFinite(n)?Math.max(0,Math.min(1,n)):1;bl({audioVolume:r}),t({audioVolume:r})},setLoopEnabled:n=>t({loopEnabled:n}),setZoomMode:n=>t({zoomMode:n}),clearSelectedElementIds:()=>t({selectedElementIds:new Set}),setSelectedElementIds:n=>t({selectedElementIds:new Set(n)}),timelineSnapEnabled:jo().timelineSnapEnabled??!0,setTimelineSnapEnabled:n=>{bl({timelineSnapEnabled:n}),t({timelineSnapEnabled:n})},timeDisplayMode:jo().timeDisplayMode??"time",setTimeDisplayMode:n=>{bl({timeDisplayMode:n}),t({timeDisplayMode:n})},pinTimelineZoom:(n,r)=>t(i=>{if(i.zoomMode==="manual")return{};const s=X4e(n,r);return bl({timelineZoomMode:"manual",timelineManualZoomPercent:s}),{zoomMode:"manual",manualZoomPercent:s}}),setTimelineScale:(n,r)=>{const i=e();i.timelinePps===n&&i.timelineFitPps===r||t({timelinePps:n,timelineFitPps:r})},setInPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{inPoint:i,outPoint:i!==null&&r.outPoint!==null&&i>=r.outPoint?null:r.outPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setOutPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{outPoint:i,inPoint:i!==null&&r.inPoint!==null&&i<=r.inPoint?null:r.inPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setManualZoomPercent:n=>t(r=>({manualZoomPercent:T0(n,r.timelineFitPps)})),bumpZEditVersion:()=>t(n=>({zEditVersion:n.zEditVersion+1})),setCurrentTime:n=>t({currentTime:Number.isFinite(n)?n:0}),setDuration:n=>t({duration:Number.isFinite(n)?n:0}),setTimelineReady:n=>t({timelineReady:n}),setBeatDragging:n=>t({beatDragging:n}),setElements:n=>t({elements:n}),setSelectedElementId:(n,r)=>t(i=>{const a=!!(r!=null&&r.preserveSet&&n&&i.selectedElementIds.has(n))?new Set(i.selectedElementIds):r!=null&&r.preserveSet?new Set:n?new Set([n]):new Set;return n!==i.selectedElementId?{selectedElementId:n,selectedElementIds:a,activeKeyframePct:null,motionPathArmed:!1,focusedEaseSegment:null}:{selectedElementId:n,selectedElementIds:a}}),setSelectionAnchor:n=>t(r=>n!=null&&r.selectedElementIds.size>1&&r.selectedElementIds.has(n)?{selectedElementId:n,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}:{selectedElementId:n,selectedElementIds:n?new Set([n]):new Set,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}),updateElement:(n,r)=>t(i=>({elements:i.elements.map(s=>(s.key??s.id)===n?{...s,...r}:s)})),beginTimelineSession:n=>t(r=>r.timelineProjectId===n?r:{...CI(),timelineSessionEpoch:r.timelineSessionEpoch+1,timelineProjectId:n}),reset:()=>t(CI())}));function k6e(){try{return!1}catch{return!1}}k6e()&&typeof window<"u"&&(window.__playerStore=ue);const qie="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",Kie="https://us.i.posthog.com",C6e=3e4,E6e=5e3;let Nv=[],T2=null;function T6e(){return gR()}function P6e(){return $A()}function M6e(){var t,e;return{studio_version:"0.8.10",agent_runtime:pre(),screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"").split("?")[0]}}function Tt(t,e={}){P6e()&&(Nv.push({event:`studio:${t}`,properties:{...M6e(),...gre(),...e},timestamp:new Date().toISOString()}),T2||(T2=setInterval(N6e,C6e)))}function Jie(){const t=Nv.map(e=>({event:e.event,properties:{...e.properties,$ip:null},distinct_id:T6e(),timestamp:e.timestamp}));return Nv=[],t}async function N6e(){if(Nv.length===0)return;const t=Jie(),e=new AbortController,n=setTimeout(()=>e.abort(),E6e);try{await fetch(`${Kie}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:qie,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}function ese(){if(T2&&(clearInterval(T2),T2=null),Nv.length===0)return;const t=Jie(),e=JSON.stringify({api_key:qie,batch:t});try{navigator.sendBeacon(`${Kie}/batch/`,e)}catch{}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ese()});function tse(t){return Number.isFinite(t)&&t>0}function jz(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function u4(t){if(!t)return 0;try{const e=Number(t.getDuration());return tse(e)?e:0}catch{return 0}}function D6e(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function I6e(t,e,n,r=()=>1){var d;const i=Math.max(0,Number.isFinite(e)?e:0);let s=jz(Number(((d=t.getTime)==null?void 0:d.call(t))??0),i),a=!1,o=0,l=s,c=n.now();const u=y=>{var g;if(s=jz(y,i),typeof t.renderSeek=="function"){t.renderSeek(s);return}(g=t.seek)==null||g.call(t,s)},f=()=>{o&&(n.cancelAnimationFrame(o),o=0)},h=y=>{if(!a)return;const g=Math.max(.1,Number(r())||1),v=(y-c)/1e3*g;if(u(l+v),s>=i){a=!1,o=0;return}o=n.requestAnimationFrame(h)};return{play:()=>{a||i<=0||(s>=i&&u(0),a=!0,l=s,c=n.now(),f(),o=n.requestAnimationFrame(h))},pause:()=>{a=!1,f()},seek:(y,g)=>{if(u(y),g!=null&&g.keepPlaying){a&&(l=s,c=n.now());return}a=!1,f()},getTime:()=>s,getDuration:()=>i,isPlaying:()=>a}}function O8(t,e){var n;(n=t.current)==null||n.adapter.pause(),t.current=null,e.current=!1}function _6e(t){const{cache:e,warned:n,bestAdapter:r,effectiveDuration:i,docDuration:s}=t,a=e.current;if((a==null?void 0:a.player)===r&&a.duration===i)return a.adapter;a==null||a.adapter.pause(),n.current||(n.current=!0,console.warn(`[useTimelinePlayer] Selected adapter duration (${u4(r)}s) does not cover the document duration (${s}s); falling back to seek-driven playback, which never starts media elements or WebAudio. Audio will not play in preview — extend the GSAP timeline to cover the declared data-duration.`));const o=I6e(r,i,t.clock,t.getPlaybackRate);return e.current={player:r,duration:i,adapter:o},o}function Lz(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{const r=!(n!=null&&n.keepPlaying);r&&t.pause(),t.seek(e),r&&t.pause()},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function nse(t,e,n,r,i){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const s=r??"index.html",o=Array.from(t.querySelectorAll(n)).filter(l=>(i(l)??"index.html")===s).indexOf(e);return o>=0?o:void 0}catch{return}}const Nf="data-hf-reveal-prior-z",r0="data-hf-reveal-prior-pos";function QR(t){const e=t.getAttribute(Nf);if(e==null)return null;const n=Number.parseInt(e,10);return Number.isFinite(n)?n:null}function JC(t){var a,o;const e=QR(t);if(e!=null)return e;const n=t,r=l=>{if(l==null||l===""||l==="auto")return null;const c=Number.parseInt(l,10);return Number.isFinite(c)?c:null},i=r((a=n.style)==null?void 0:a.zIndex);if(i!=null)return i;const s=(o=t.ownerDocument)==null?void 0:o.defaultView;if(s!=null&&s.getComputedStyle){const l=r(s.getComputedStyle(n).zIndex);if(l!=null)return l}return 0}function rse(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return tse(e)?e:0}function ise(t){return Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1}function eE(t){return!!t.closest(["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-hf-color-grading-canvas]"].join(","))}function ZR(t){if(!t)return 0;const e=t.querySelector("[data-composition-id]");let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){if(r===e||eE(r))continue;const i=Number.parseFloat(r.getAttribute("data-start")??""),s=rse(r);!Number.isFinite(i)||i<0||s<=0||(n=Math.max(n,i+s))}return n}function sse(t){if(!t)return 0;const e=rse(t.querySelector("[data-composition-id]"));return e>0?e:ZR(t)}function zR(t){return t?ZR(new DOMParser().parseFromString(t,"text/html")):0}function EI(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function ase(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function R6e(t,e){const n=e.getAttribute("data-playback-start"),r=e.getAttribute("data-media-start"),i=n??r;if(i!=null){const a=parseFloat(i);Number.isFinite(a)&&(t.playbackStart=a)}n!=null?t.playbackStartAttr="playback-start":r!=null&&(t.playbackStartAttr="media-start");const s=Number.parseFloat(e.getAttribute("data-playback-rate")??"");Number.isFinite(s)&&s>0&&(t.playbackRate=ise(s))}function ose(t,e){R6e(t,e);const n=ase(e);if(!n)return;t.tag=n.tagName.toLowerCase();const r=n.getAttribute("src");r&&(t.src=r);const s=(n.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof s>"u"||!(n instanceof s))return;const a=e.getAttribute("data-source-duration")??n.getAttribute("data-source-duration"),o=a?parseFloat(a):n.duration;Number.isFinite(o)&&o>0&&(t.sourceDuration=o);const l=n.defaultPlaybackRate;t.playbackRate==null&&Number.isFinite(l)&&l>0&&(t.playbackRate=ise(l))}function i0(t){var i,s,a;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(s=t.id)==null?void 0:s.trim();if(n)return n;const r=(a=t.tag)==null?void 0:a.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const j6e=new Set(["base","link","meta","noscript","script","style","template"]);function Fz(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function L6e(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return Fz(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?Fz(r):i0({tag:t.tagName})}function s0(t){if(EI(t)&&t.id)return`#${CSS.escape(t.id)}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${CSS.escape(e)}"]`;if(EI(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${CSS.escape(r)}`}}function a0(t){var n;const e=(n=t.parentElement)==null?void 0:n.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 Dv(t,e,n){return nse(t,e,n,a0(e),a0)}function Iv(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function TI(t){const e=t.lastIndexOf("#");return e<0?{sourceFile:null,domId:t}:{sourceFile:t.slice(0,e),domId:t.slice(e+1)}}function _v(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||Iv({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=Iv({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function Hn(t){return t.key??t.id}function R1(t){if(!(!t.domId&&!t.selector))return Iv({id:"",fallbackIndex:0,...t})}function F6e(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e&&!eE(n))}function $6e(t,e){return Math.abs(t-e)<.001}const B6e=[["data-start",t=>t.start],["data-duration",t=>t.duration],["data-track-index",t=>t.track]];function V6e(t,e){var r;const n=(r=e.tagName)==null?void 0:r.toLowerCase();return n&&t.tagName.toLowerCase()!==n?!1:B6e.every(([i,s])=>{const a=Number.parseFloat(t.getAttribute(i)??"");return!Number.isFinite(a)||$6e(a,s(e))})}function H6e(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${CSS.escape(e)}"]`)??t.querySelector(`.${CSS.escape(e)}`)??null}function Q6e(t,e,n,r=new Set){const i=e.id?H6e(t,e.id):null;if(i&&!r.has(i))return i;const s=F6e(t).filter(o=>!r.has(o)),a=s.find(o=>V6e(o,e));return a||(s[n]??null)}function Z6e(t,e){if(!EI(e)||eE(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return j6e.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!s0(e)}function z6e(t){const e=ue(n=>n.soloed);x.useEffect(()=>{var r,i,s;const n=(r=t.current)==null?void 0:r.contentWindow;(s=(i=n==null?void 0:n.__hf)==null?void 0:i.setAudioSolo)==null||s.call(i,[...e])},[e,t])}function G6e(t,e){const n=t==null?void 0:t.getElementById(e);return n?n.tagName.toLowerCase()===Yie?i0({id:e,label:n.getAttribute("data-label")}):i0({id:e,label:n.getAttribute("data-timeline-label")??n.getAttribute("data-label"),tag:n.tagName}):e}function U6e(t){const e=ue(n=>n.soloed);return x.useMemo(()=>{var n;if(e.size===0)return null;if(e.size===1){const r=(n=t.current)==null?void 0:n.contentDocument;return G6e(r,[...e][0])}return`${e.size} tracks`},[e,t])}function P0(t){const e=x.useRef(null),n=x.useCallback(r=>{var i;if(r instanceof KeyboardEvent){r.key==="Escape"&&t();return}(i=e.current)!=null&&i.contains(r.target)||t()},[t]);return x.useEffect(()=>(document.addEventListener("pointerdown",n,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("keydown",n),()=>{document.removeEventListener("pointerdown",n,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",n)}),[n]),e}const X6e=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Keyframes (when an element is selected)",hints:[{key:"K",label:"Add keyframe at playhead"},{key:"Del",label:"Delete selected keyframe"},{key:"H",label:"Toggle hold / bezier"},{key:"U",label:"Expand / collapse properties"},{key:"R",label:"Record gesture"}]},{title:"Editing",hints:[{key:"⌘Z",label:"Undo"},{key:"⌘⇧Z",label:"Redo"},{key:"⌘C",label:"Copy element"},{key:"⌘V",label:"Paste element"},{key:"⌘X",label:"Cut element"},{key:"S",label:"Split clip at playhead"},{key:"⇧Click",label:"Razor tool: split all tracks"},{key:"⌘G",label:"Group elements"},{key:"⌘⇧G",label:"Ungroup"},{key:"Del",label:"Delete selected element (no keyframe selected)"}]},{title:"Gesture recording modifiers",hints:[{key:"Drag",label:"Record x / y position"},{key:"Scroll",label:"Record z depth"},{key:"⇧ Drag",label:"Record rotationX / rotationY"},{key:"⌥ Drag",label:"Record rotation"},{key:"⌘ Drag↕",label:"Record opacity"},{key:"⌘ Scroll",label:"Record scale"}]},{title:"Canvas",hints:[{key:"Drag",label:"Move element / add keyframe"},{key:"⌥ Drag",label:"Move entire animation path"},{key:"⇧ Drag",label:"Uniform resize"}]},{title:"Crop",hints:[{key:"Drag edge",label:"Crop a side"},{key:"Drag center",label:"Reposition the crop"}]},{title:"Panels",hints:[{key:"⌘1",label:"Compositions tab"},{key:"⌘2",label:"Assets tab"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}],W6e=x.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,setInPoint:s,setOutPoint:a,onSeek:o}){const[l,c]=x.useState(!1),[u,f]=x.useState(""),h=x.useId(),d=x.useCallback(()=>c(!1),[]),y=P0(d),g=x.useRef(null),v=x.useRef(null);x.useEffect(()=>{var E;if(!l)return;const C=v.current;return(E=g.current)==null||E.focus(),()=>{C==null||C.focus()}},[l]);const b=x.useCallback(()=>{if(e)return;const C=Number.parseInt(u,10);!Number.isFinite(C)||n<=0||o(Math.min(n,FR(Math.max(0,C))))},[e,n,u,o]),w=x.useCallback(C=>{C.preventDefault(),b()},[b]),O=x.useCallback(C=>{C.key==="Enter"&&(C.preventDefault(),b())},[b]);return m.jsxs("div",{ref:y,className:"relative flex-shrink-0",children:[m.jsx(yr,{label:"Shortcuts and tools",children:m.jsx("button",{ref:v,type:"button",onClick:()=>c(C=>!C),className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors ${l?"text-neutral-200":"text-neutral-600 hover:text-neutral-300"}`,"aria-label":"Shortcuts and tools","aria-expanded":l,"aria-controls":h,children:m.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),m.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})})}),l&&m.jsxs("div",{id:h,ref:g,tabIndex:-1,role:"dialog","aria-label":"Keyboard shortcuts and tools",className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto outline-none",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[m.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),m.jsxs("form",{onSubmit:w,className:"flex items-center gap-1.5",children:[m.jsx("input",{value:u,onChange:C=>f(C.target.value),disabled:e,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded 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:O,onBlur:b}),m.jsx(yr,{label:"Jump to frame",children:m.jsx("button",{type:"submit",disabled:e,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:r!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:ns(r)}),m.jsx(yr,{label:"Clear in-point",children:m.jsx("button",{type:"button",onClick:()=>s(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:i!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:ns(i)}),m.jsx(yr,{label:"Clear out-point",children:m.jsx("button",{type:"button",onClick:()=>a(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:X6e.map(C=>m.jsxs("div",{children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:C.title}),m.jsx("div",{className:"flex flex-col gap-1",children:C.hints.map(E=>m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:E.key}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:E.label})]},E.key))})]},C.title))})]})]})}),Y6e=[.25,.5,1,1.5,2],q6e=x.memo(function({playbackRate:e,setPlaybackRate:n,disabled:r}){const[i,s]=x.useState(!1),a=x.useCallback(()=>s(!1),[]),o=P0(a);return m.jsxs("div",{ref:o,className:"relative flex-shrink-0",children:[m.jsx(yr,{label:"Playback speed",children:m.jsx("button",{type:"button",onClick:()=>s(l=>!l),disabled:r,"aria-haspopup":"menu","aria-expanded":i,"aria-label":"Playback speed",className:"h-7 w-8 rounded-md font-mono text-[10px] tabular-nums text-neutral-500 transition-colors hover:text-neutral-200 disabled:opacity-30",children:e===1?"1x":`${e}x`})}),i&&m.jsx("div",{role:"menu","aria-label":"Playback speed options",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:Y6e.map(l=>{const c=l===e;return m.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":c,onClick:()=>{Tt("playback",{action:"speed_change",rate:l}),n(l),s(!1)},className:`block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors outline-none focus-visible:bg-white/[0.04] ${c?"text-neutral-50 bg-white/[0.06]":"text-neutral-500 hover:bg-white/[0.04]"}`,children:[l,"x"]},l)})})]})});function K6e({muted:t,volume:e}){const n=t||e===0;return m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),n?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"m19 9-6 6"}),m.jsx("path",{d:"m13 9 6 6"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),e>=.5?m.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"}):null]})]})}const J6e=x.memo(function({audioMuted:e,audioVolume:n,disabled:r,setAudioMuted:i,setAudioVolume:s}){const a=Math.round(n*100),o=e||n===0,l=o?"Unmute audio":"Mute audio";return m.jsxs("div",{className:"group flex flex-shrink-0 items-center",children:[m.jsx("div",{className:"w-0 overflow-hidden opacity-0 transition-[width,opacity] duration-150 ease-out group-hover:w-14 group-hover:opacity-100 group-focus-within:w-14 group-focus-within:opacity-100",children:m.jsxs("div",{className:"relative mx-1 flex h-6 w-12 items-center",children:[m.jsx("div",{className:"absolute inset-x-0 h-0.5 overflow-hidden rounded-full bg-neutral-700",children:m.jsx("div",{className:"h-full rounded-full bg-neutral-300",style:{width:`${a}%`}})}),m.jsx("input",{type:"range",min:"0",max:"100",step:"1",value:a,disabled:r,"aria-label":"Preview volume","aria-valuetext":`${a}%`,title:`Preview volume: ${a}%`,onChange:c=>{const u=Number(c.currentTarget.value)/100;s(u),e&&u>0&&i(!1)},className:"hf-preview-volume-range absolute inset-0 w-full disabled:pointer-events-none"})]})}),m.jsx(yr,{label:l,children:m.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"mute_toggle",muted:!o}),o&&n===0&&s(1),i(!o)},disabled:r,"aria-label":l,"aria-pressed":o,className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors disabled:pointer-events-none disabled:opacity-30 ${o?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,children:m.jsx(K6e,{muted:e,volume:n})})})]})});Cv.registerPlugin(u1);const $z="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",Bz="M56 28H67V71H56Z M73 28H84V71H73Z";function eke({playing:t}){const e=x.useRef(null),n=x.useRef(!0);return x.useEffect(()=>{var o;const r=e.current;if(!r)return;const i=t?Bz:$z,s=typeof window<"u"&&((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)").matches);if(n.current||s){n.current=!1,Cv.set(r,{morphSVG:i});return}const a=Cv.to(r,{duration:.28,ease:"power2.inOut",morphSVG:i});return()=>{a.kill()}},[t]),m.jsx("span",{className:"relative inline-flex h-3 w-3 items-center justify-center","aria-hidden":"true",children:m.jsx("svg",{width:"12",height:"12",viewBox:"46 21 54 56",fill:"#FAFAFA",children:m.jsx("path",{ref:e,d:t?Bz:$z})})})}const tke=x.memo(function({loopEnabled:e,disabled:n,setLoopEnabled:r}){return m.jsx(yr,{label:"Loop playback",children:m.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"loop_toggle",enabled:!e}),r(!e)},disabled:n,className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors disabled:opacity-30 ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Disable loop playback":"Enable loop playback","aria-pressed":e,children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M17 2l4 4-4 4"}),m.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),m.jsx("path",{d:"M7 22l-4-4 4-4"}),m.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})})})}),nke=x.memo(function({isFullscreen:e,onToggleFullscreen:n}){return m.jsx(yr,{label:e?"Exit fullscreen (F)":"Enter fullscreen (F)",children:m.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"fullscreen_toggle",active:!e}),n()},className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Exit fullscreen":"Enter fullscreen",children:m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),m.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),m.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),m.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),m.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),m.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),m.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})})})})}),rke=x.memo(function({previewIframeRef:e}){const n=U6e(e),r=ue.getState().clearSolo;return n===null?null:m.jsxs("div",{role:"status",className:"flex h-7 items-center justify-center gap-2 border-b border-neutral-800 bg-neutral-900/90 px-3 text-[11px] text-neutral-300",children:[m.jsxs("span",{children:["Hearing only ",m.jsx("span",{className:"font-medium text-neutral-100",children:n})," — your export is not affected"]}),m.jsx("button",{type:"button",onClick:()=>r(),className:"rounded px-1.5 py-0.5 font-medium text-studio-accent transition-colors hover:text-white",children:"Clear"})]})}),ike=x.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:s,previewIframeRef:a}){const o=ue($=>$.isPlaying),l=ue($=>$.duration),c=ue($=>$.timelineReady),u=ue($=>$.playbackRate),f=ue($=>$.audioMuted),h=ue($=>$.audioVolume),d=ue($=>$.loopEnabled),y=ue.getState().setPlaybackRate,g=ue.getState().setAudioMuted,v=ue.getState().setAudioVolume,b=ue.getState().setLoopEnabled,w=ue($=>$.inPoint),O=ue($=>$.outPoint),C=ue.getState().setInPoint,E=ue.getState().setOutPoint,M=ue($=>$.timeDisplayMode),N=ue.getState().setTimeDisplayMode,I=x.useRef(null),_=x.useRef(0),j=x.useRef(M);j.current=M;const L=x.useRef(l);L.current=l;const V=r||!c;return x.useEffect(()=>{if(!I.current)return;const $=_.current;I.current.textContent=M==="frame"?Dz($,l):ns($)},[l,M]),Ar(()=>{const $=W=>{if(_.current=W,!I.current)return;const Y=L.current;I.current.textContent=j.current==="frame"?Dz(W,Y):ns(W)},Z=pa.subscribe($);return $(ue.getState().currentTime),Z}),m.jsxs("div",{children:[a&&m.jsx(rke,{previewIframeRef:a}),m.jsxs("div",{className:"grid h-10 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center px-3","aria-disabled":r||void 0,style:{paddingBottom:"env(safe-area-inset-bottom)"},children:[m.jsx(yr,{label:M==="time"?"Switch to frame display":"Switch to time display",children:m.jsxs("button",{type:"button",onClick:()=>N(M==="time"?"frame":"time"),disabled:r,className:"min-w-0 justify-self-start whitespace-nowrap font-mono text-[11px] tabular-nums text-neutral-400 transition-colors hover:text-neutral-200 disabled:pointer-events-none",children:[m.jsx("span",{ref:I,children:ns(0)}),M==="time"?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"mx-0.5 text-neutral-700",children:"/"}),m.jsx("span",{className:"text-neutral-600",children:ns(l)})]}):null]})}),m.jsx(yr,{label:o?"Pause":"Play",children:m.jsx("button",{type:"button","aria-label":o?"Pause":"Play",onClick:()=>{Tt("playback",{action:o?"pause":"play"}),e()},disabled:V,className:"flex h-8 w-8 items-center justify-center justify-self-center rounded-md text-neutral-100 transition-colors hover:text-white disabled:pointer-events-none disabled:opacity-30",children:m.jsx(eke,{playing:o})})}),m.jsxs("div",{className:"flex min-w-0 items-center justify-self-end",children:[m.jsx(J6e,{audioMuted:f,audioVolume:h,disabled:V,setAudioMuted:g,setAudioVolume:v}),m.jsx(q6e,{playbackRate:u,setPlaybackRate:y,disabled:r}),m.jsx(tke,{loopEnabled:d,disabled:r,setLoopEnabled:b}),s&&m.jsx(nke,{isFullscreen:i,onToggleFullscreen:s}),m.jsx(W6e,{disabled:r,duration:l,inPoint:w,outPoint:O,setInPoint:C,setOutPoint:E,onSeek:n})]})]})]})}),ske=new Set(["audio","music","sfx","sound","narration"]),ake=/\.(aac|flac|m4a|mp3|ogg|opus|wav)(?:[?#].*)?$/i,oke=/\b(music|bgm|soundtrack|background[-_]?music)\b/i;function Rl(t){if(!t)return!1;const e=t.tag.trim().toLowerCase();return ske.has(e)?!0:!!(t.src&&ake.test(t.src))}function Jg(t){if(!t||!Rl(t))return!1;if(t.timelineRole==="music")return!0;if(t.timelineRole&&t.timelineRole!=="music")return!1;const e=t.domId??t.id??"";return oke.test(e)}function lke(t){const e=t.find(Jg);if(e)return{element:e,isFallback:!1};let n=null;for(const r of t)Rl(r)&&(r.timelineRole&&r.timelineRole!=="music"||(!n||r.duration>n.duration)&&(n=r));return n?{element:n,isFallback:!0}:null}let k8=null;const Vz=()=>BA(()=>import("./index-BQs1fahB.js").then(t=>t.i),[]);function cke(t=Vz){const e=t===Vz;if(e&&k8)return k8;const n=t().then(r=>(r.default??r)||null).catch(()=>(e&&(k8=null),null));return e&&(k8=n),n}const xP=1024,Hz=512,uke=.05;function lse(t,e,n){const r=Math.floor(e*uke),i=Math.floor(n*e),s=Math.max(0,i-r),a=Math.min(t.length,i+r);let o=0;for(let l=s;l<a;l++){const c=t[l]??0;o+=c*c}return Math.sqrt(o/Math.max(a-s,1))}function cse(t,e){return!t.channelData||t.peak<=0?.5:Math.min(1,lse(t.channelData,t.sampleRate,e)/t.peak)}async function fke(t){const e=t.getChannelData(0),n=t.sampleRate,r=[];for(let a=0;a<e.length-xP;a+=Hz){let o=0;for(let l=0;l<xP;l++){const c=e[a+l];o+=c*c}r.push(o/xP)}const i=[],s=20;for(let a=s;a<r.length-s;a++){let o=0;for(let u=a-s;u<a+s;u++)o+=r[u];o/=s*2;const l=o*1.5,c=r[a];if(c>l&&c>(r[a-1]??0)&&c>(r[a+1]??0)){const u=a*Hz/n;(i.length===0||u-i[i.length-1]>.1)&&i.push(Math.round(u*1e3)/1e3)}}return i}function hke(t){if(t.length<4)return null;const e=[];for(let s=1;s<t.length;s++)e.push(t[s]-t[s-1]);const n=[...e].sort((s,a)=>s-a),r=Math.floor(n.length/2),i=n.length%2===0?(n[r-1]+n[r])/2:n[r];return i<=0?null:Math.round(60/i*10)/10}function bP(t){let e=t;for(;e>120;)e/=2;for(;e<60;)e*=2;return e}function dke(t,e){const n=[t/2,t,t*2];let r=t,i=Number.POSITIVE_INFINITY;for(const s of n){if(s<=0)continue;const a=Math.abs(s-e);a<i&&(i=a,r=s)}return r}function pke(t,e,n){if(t.length===0||e<=0||n<=0)return t;const r=60/e;if(r<.125)return t;const i=r*.25;let s=0,a=-1;for(const l of t.slice(0,10)){const c=(l%r+r)%r;let u=0;for(const f of t){const h=(f%r+r)%r;Math.min(Math.abs(h-c),r-Math.abs(h-c))<i&&u++}u>a&&(a=u,s=c)}const o=[];for(let l=s;l<=n+.001;l+=r)o.push(Math.round(l*1e3)/1e3);return o}function mke(t,e,n){if(t.length===0)return{times:t,strengths:[],peak:1e-6};const r=t.map(l=>lse(e,n,l)),i=Math.max(...r,1e-6),s=i*.12,a=[],o=[];for(let l=0;l<t.length;l++)r[l]>=s&&(a.push(t[l]),o.push(Math.min(1,r[l]/i)));return{times:a,strengths:o,peak:i}}async function gke(t){const e=t.getChannelData(0),n=t.sampleRate,r=t.duration,i=await fke(t),s=hke(i);let a=null;try{const h=await cke();h&&(a=h(t))}catch{}let o=s,l="uncertain",c=null;if(s!==null&&a!==null){const h=Math.abs(bP(s)-bP(a))/bP(a);h<.05?(o=dke(a,s),l="high",c=o):h<.1?(o=Math.round((s+a)/2),l="low",c=o):(o=s,l="uncertain")}else s!==null?(o=s,l="low",c=s):a!==null&&(o=a,l="low",c=a);const u=c!==null?pke(i,c,r):i,f=mke(u,e,n);return{beatTimes:f.times,beatStrengths:f.strengths,bpm:o,bpmConfidence:l,channelData:e,sampleRate:n,peak:f.peak}}async function yke(t){const e=new AudioContext;try{const r=await(await fetch(t)).arrayBuffer(),i=await e.decodeAudioData(r);return gke(i)}finally{await e.close()}}function use(t){if(!t||/^(blob:|data:)/i.test(t))return null;let e=null;const n="/preview/",r=t.indexOf(n);if(r!==-1){let i=t.slice(r+n.length);const s=i.search(/[?#]/);s!==-1&&(i=i.slice(0,s)),i.startsWith("comp/")&&(i=i.slice(5)),e=i?decodeURIComponent(i):null}if(!e)try{e=decodeURIComponent(new URL(t,"http://_").pathname)}catch{e=t}return e?(e=e.replace(/^\/+/,""),e||null):null}function Qz(t){const e=use(t);return e?`beats/${e}.json`:null}function xke(t,e,n){const r=t.map((s,a)=>({time:Math.round(s*1e3)/1e3,strength:Math.round((e[a]??.5)*1e3)/1e3}));return`${JSON.stringify({version:1,audio:n,beats:r},null,2)}
|
|
71
71
|
`}function fse(t){try{const e=JSON.parse(t);if(!e||e.version!==1||!Array.isArray(e.beats))return null;const n=[],r=[];for(const i of e.beats)if(i&&typeof i.time=="number"&&Number.isFinite(i.time)){n.push(i.time);const s=typeof i.strength=="number"&&Number.isFinite(i.strength)?i.strength:.5;r.push(Math.max(0,Math.min(1,s)))}return{times:n,strengths:r}}catch{return null}}const GR=x.createContext(null);function M0(){const t=x.useContext(GR);if(!t)throw new Error("useFileManagerContext must be used within FileManagerProvider");return t}function hse(){return x.useContext(GR)}function bke({value:{editingFile:t,setEditingFile:e,projectDir:n,fileTree:r,fileTreeLoaded:i,setFileTree:s,editingPathRef:a,projectIdRef:o,saveRafRef:l,flushPendingSourceSave:c,discardPendingSourceSave:u,getPendingSourceCandidate:f,importedFontAssetsRef:h,readProjectFile:d,writeProjectFile:y,overwriteExternalConflict:g,readOptionalProjectFile:v,observeProjectFileVersion:b,updateEditingFileContent:w,revealSourceOffset:O,openSourceForSelection:C,handleFileSelect:E,handleContentChange:M,refreshFileTree:N,uploadProjectFiles:I,handleCreateFile:_,handleCreateFolder:j,handleDeleteFile:L,handleRenameFile:V,handleDuplicateFile:$,handleMoveFile:Z,handleImportFiles:W,handleImportFonts:Y,compositions:J,assets:ne,fontAssets:ie},children:le}){const q=x.useMemo(()=>({editingFile:t,setEditingFile:e,projectDir:n,fileTree:r,fileTreeLoaded:i,setFileTree:s,editingPathRef:a,projectIdRef:o,saveRafRef:l,flushPendingSourceSave:c,discardPendingSourceSave:u,getPendingSourceCandidate:f,importedFontAssetsRef:h,readProjectFile:d,writeProjectFile:y,overwriteExternalConflict:g,readOptionalProjectFile:v,observeProjectFileVersion:b,updateEditingFileContent:w,revealSourceOffset:O,openSourceForSelection:C,handleFileSelect:E,handleContentChange:M,refreshFileTree:N,uploadProjectFiles:I,handleCreateFile:_,handleCreateFolder:j,handleDeleteFile:L,handleRenameFile:V,handleDuplicateFile:$,handleMoveFile:Z,handleImportFiles:W,handleImportFonts:Y,compositions:J,assets:ne,fontAssets:ie}),[t,e,n,r,i,s,a,o,l,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I,_,j,L,V,$,Z,W,Y,J,ne,ie]);return m.jsx(GR,{value:q,children:le})}const vke=.015;function rc(t,e){return Math.abs(t-e)<vke}function tE(t,e){return t&&e&&t.src===e?t:null}function UR(t,e,n,r){const i=tE(n,r),s=(i==null?void 0:i.removed)??[],a=[];for(let o=0;o<t.length;o++){const l=t[o];s.some(c=>rc(c,l))||a.push({time:l,strength:e[o]??.5})}if(i)for(const o of i.added)a.some(l=>rc(l.time,o.time))||a.push(o);return a.sort((o,l)=>o.time-l.time),{times:a.map(o=>o.time),strengths:a.map(o=>o.strength)}}function dse(t,e){const n=tE(t,e);return n?{...n,added:[...n.added],removed:[...n.removed]}:{src:e,added:[],removed:[]}}function pse(t,e,n,r=[]){const i=tE(t,e);if(r.some(l=>rc(l,n.time))&&!((i==null?void 0:i.removed)??[]).some(l=>rc(l,n.time))||((i==null?void 0:i.added)??[]).some(l=>rc(l.time,n.time)))return t;const a=dse(t,e),o=a.removed.findIndex(l=>rc(l,n.time));return o>=0?(a.removed.splice(o,1),a):(a.added.push(n),a)}function mse(t,e,n,r){const i=tE(t,e),s=((i==null?void 0:i.added)??[]).some(u=>rc(u.time,r)),a=n.find(u=>rc(u,r)),o=a!==void 0&&((i==null?void 0:i.removed)??[]).some(u=>rc(u,a));if(!s&&(a===void 0||o))return t;const l=dse(t,e),c=l.added.findIndex(u=>rc(u.time,r));return c>=0?(l.added.splice(c,1),l):(a!==void 0&&!l.removed.some(u=>rc(u,a))&&l.removed.push(a),l)}function Ake(t,e,n,r,i){const s=mse(t,e,n,r);return pse(s,e,i,n)??s}const Zz=new WeakMap;function o0(t){const e=Zz.get(t);if(e)return e;const n=new Map,r=[],i=new Set;let s=null;for(const o of t)n.set(Hn(o),o),o.src&&r.push(o),Rl(o)&&i.add(o.track),!s&&Jg(o)&&(s=o);const a=Object.freeze({byKey:n,musicElement:s,mediaElements:Object.freeze(r),audioTracks:i});return Zz.set(t,a),a}function gse(t,e,n){if(!t||!e)return null;const r=UR(t.beatTimes,t.beatStrengths,n,e.src??null),i=e.playbackStart??0,s=i+e.duration,a=e.start-i,o=[],l=[];return r.times.forEach((c,u)=>{c>=i&&c<=s&&(o.push(Math.round((c+a)*1e3)/1e3),l.push(r.strengths[u]??1))}),{...t,beatTimes:o,beatStrengths:l}}function nE(){const t=ue.getState(),e=t.elements.find(Jg),n=t.beatAnalysis;return!e||!n||!e.src?null:{s:t,music:e,analysis:n,src:e.src}}function f6(t,e,n){return e+(n-t)}function XR(t){return t.duration>0?t.duration:t.sourceDuration&&t.sourceDuration>0?t.sourceDuration:Number.POSITIVE_INFINITY}function Ske(t){const e=nE();return e?t>=e.music.start&&t<=e.music.start+XR(e.music):!1}function wke(t){const e=nE();if(!e)return;const n=e.music.playbackStart??0,r=f6(e.music.start,n,t);if(r<n||r>n+XR(e.music))return;const i=cse(e.analysis,r),s=pse(e.s.beatEdits,e.src,{time:r,strength:i},e.analysis.beatTimes);s!==e.s.beatEdits&&e.s.commitBeatEdits(s,"add beat")}function Oke(t){const e=nE();if(!e)return;const n=f6(e.music.start,e.music.playbackStart??0,t),r=mse(e.s.beatEdits,e.src,e.analysis.beatTimes,n);r!==e.s.beatEdits&&e.s.commitBeatEdits(r,"delete beat")}function kke(t,e){const n=nE();if(!n)return;const r=n.music.playbackStart??0,i=f6(n.music.start,r,t),s=f6(n.music.start,r,e),a=Math.max(r,Math.min(r+XR(n.music),s)),o=cse(n.analysis,a),l=Ake(n.s.beatEdits,n.src,n.analysis.beatTimes,i,{time:a,strength:o});l!==n.s.beatEdits&&n.s.commitBeatEdits(l,"move beat")}const f1=new Map,Cke=4,Eke=350;function Tke(t,e){for(f1.set(t,e);f1.size>Cke;){const n=f1.keys().next().value;if(n===void 0)break;f1.delete(n)}}async function Pke(t,e,n){if(!t)return{...e,hasFile:!1};try{const r=await n.readOptionalProjectFile(t),i=r?fse(r):null;if(i&&i.times.length>0)return{times:i.times,strengths:i.strengths,hasFile:!0}}catch{}return{...e,hasFile:!1}}async function Mke(t,e){try{const n=await t.readOptionalProjectFile(e),r=n?fse(n):null;return!!(r&&r.times.length>0)}catch{return!1}}async function Nke(t,e,n){let r=f1.get(t);r||(r=yke(t),Tke(t,r));try{const i=await r,s={times:i.beatTimes,strengths:i.beatStrengths},{times:a,strengths:o}=await Pke(e,s,n);return{analysis:i,times:a,strengths:o}}catch{return null}}function Dke(){const t=ue(r=>r.beatAnalysis),e=ue(r=>o0(r.elements).musicElement),n=ue(r=>r.beatEdits);return x.useMemo(()=>gse(t,e,n),[t,e,n])}function Ike(){const t=ue(f=>f.elements),e=ue(f=>f.setBeatAnalysis),n=ue(f=>f.setBeatEdits),r=ue(f=>f.setBeatPersist),i=ue(f=>f.resetBeatHistory),s=hse(),a=s==null?void 0:s.readOptionalProjectFile,o=s==null?void 0:s.writeProjectFile,l=x.useRef(null);l.current=a&&o?{readOptionalProjectFile:a,writeProjectFile:o}:null;const{musicSrc:c,isFallbackTrack:u}=x.useMemo(()=>{const f=lke(t);return{musicSrc:(f==null?void 0:f.element.src)??null,isFallbackTrack:(f==null?void 0:f.isFallback)??!1}},[t]);x.useEffect(()=>{if(!c){e(null),n(null),i();return}if(!l.current){e(null),n(null),i();return}let f=!1;const h=Qz(c),d=l.current;return(async()=>{if(!h||!d)return;if(!u){const g=await Mke(d,h);if(f)return;if(!g){e(null);return}}if(f)return;const y=await Nke(c,h,d);if(!f){if(!y){e(null),f1.delete(c);return}n(null),i(),e({...y.analysis,beatTimes:y.times,beatStrengths:y.strengths})}})(),()=>{f=!0}},[c,u,e,n,i]),x.useEffect(()=>{const f=Qz(c);if(!c||!f||!l.current){r(null);return}const h=l.current,d=use(c)??"audio";let y=null,g=null;const v=()=>{if(g===null)return;const w=g;g=null,h.writeProjectFile(f,w).catch(()=>{})};return r(()=>{const w=ue.getState(),O=w.beatAnalysis;if(!O)return;const C=UR(O.beatTimes,O.beatStrengths,w.beatEdits,c);g=xke(C.times,C.strengths,d),y&&clearTimeout(y),y=setTimeout(()=>{y=null,v()},Eke)}),()=>{y&&clearTimeout(y),v(),r(null)}},[c,r])}const vP="css:root",yse=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],_ke=new Set([...yse,"contain","isolation","mask-border","mix-blend-mode","opacity"]),Rke=new Set(["absolute","relative"]),jke=new Set(["flex","inline-flex","grid","inline-grid"]),Lke=new Set(["layout","paint","strict","content"]),Fke=new Set(["size","inline-size"]);function $ke(t){return t.position==="fixed"||t.position==="sticky"}function Bke(t,e){var r;if(e.zIndex==="auto"||e.zIndex==="")return!1;if(Rke.has(e.position))return!0;const n=t.parentElement?(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t.parentElement).display:null;return n!=null&&jke.has(n)}function Vke(t){const e=Number.parseFloat(t.opacity);if(Number.isFinite(e)&&e<1||t.getPropertyValue("isolation")==="isolate")return!0;const n=t.getPropertyValue("mix-blend-mode");return n&&n!=="normal"?!0:yse.some(r=>{const i=t.getPropertyValue(r);return i!==""&&i!=="none"})}function Hke(t){return t.getPropertyValue("contain").split(/\s+/).some(n=>Lke.has(n))?!0:Fke.has(t.getPropertyValue("container-type"))}function Qke(t){return t.getPropertyValue("will-change").split(",").map(e=>e.trim()).some(e=>_ke.has(e))}function Zke(t,e){return $ke(e)||Bke(t,e)||Vke(e)||Hke(e)?!0:Qke(e)}function zke(t){const e=[];let n=t;for(;n!=null&&n.parentElement;)e.push(Array.prototype.indexOf.call(n.parentElement.children,n)),n=n.parentElement;return`css:${e.reverse().join(".")}`}function WR(t){const e=t.ownerDocument.defaultView;if(!e)return vP;let n=t.parentElement;for(;n&&n!==t.ownerDocument.documentElement;){try{if(Zke(n,e.getComputedStyle(n)))return zke(n)}catch{return vP}n=n.parentElement}return vP}const Dn=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"});Object.freeze([Dn.start,Dn.duration,Dn.trackIndex]);Object.freeze([Dn.derivedEnd]);Object.freeze([Dn.derivedEnd,Dn.legacyTrack]);class zA extends Error{constructor(n,r){super(r);Ct(this,"code");this.name="ClipTimingWriteError",this.code=n}}function ey(t){if(t==null||t.trim()==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}const xse=/^[A-Za-z0-9_.:-]+$/;function bse(t,e){const n=t.charCodeAt(e);return n>=48&&n<=57}function zz(t,e){let n=e;for(;n>=0&&bse(t,n);)n--;return n}function Gke(t,e){let n=e;for(;n>=0&&(t[n]??"").trim()==="";)n--;return n}function Uke(t){const e=t.length-1;if(!bse(t,e))return null;let n=zz(t,e);return t[n]==="."&&(n=zz(t,n-1)),n+1}function Xke(t){const e=Uke(t);if(e==null)return null;const n=Gke(t,e-1),r=t[n];if(r!=="+"&&r!=="-")return null;const i=t.slice(0,n).trim();if(!xse.test(i))return null;const s=Number(t.slice(e));return Number.isFinite(s)?{refId:i,operator:r,magnitude:s}:null}function vse(t){const e=(t??"").trim();if(!e)return null;const n=ey(e);if(n!=null)return{kind:"absolute",value:n};if(xse.test(e))return{kind:"reference",refId:e,offset:0};const r=Xke(e);return r?{kind:"reference",refId:r.refId,offset:r.operator==="-"?-r.magnitude:r.magnitude}:null}function Ma(t,e,n,r){t.push({code:e,attribute:n,value:r})}function Wke(t,e,n,r){var s;if(e==null||e.trim()==="")return n.defaultStart===void 0?0:n.defaultStart;if(!t)return Ma(r,"invalid-start",Dn.start,e),null;if(t.kind==="absolute")return Math.max(0,t.value);const i=(s=n.resolveReferenceEnd)==null?void 0:s.call(n,t.refId);return i==null||!Number.isFinite(i)?(Ma(r,"unresolved-start-reference",Dn.start,e),null):Math.max(0,i+t.offset)}const Yke=1e-9;function qke(t,e){return Math.abs(t-e)<=Yke}function Kke(t,e,n){const r=ey(t);if(r==null){Ma(n,"deprecated-end",Dn.derivedEnd,t),Ma(n,"invalid-end",Dn.derivedEnd,t);return}if(e==null){Ma(n,"deprecated-end",Dn.derivedEnd,t);return}qke(r,e)||(Ma(n,"deprecated-end",Dn.derivedEnd,t),Ma(n,"conflicting-end",Dn.derivedEnd,t))}function Jke(t,e,n){const r=ey(t);return r==null||r<0?(Ma(n,"invalid-duration",Dn.duration,t),{duration:null,end:null,durationSource:"invalid"}):{duration:r,end:e==null?null:e+r,durationSource:"duration"}}function eCe(t,e,n){Ma(n,"deprecated-end",Dn.derivedEnd,t);const r=ey(t);return r==null?(Ma(n,"invalid-end",Dn.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:r,durationSource:"legacy-end"}:r<e?(Ma(n,"end-before-start",Dn.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):{duration:r-e,end:r,durationSource:"legacy-end"}}function tCe(t,e,n){const r=t.getAttribute(Dn.duration),i=t.getAttribute(Dn.derivedEnd);if(r==null)return i==null?{duration:null,end:null,durationSource:"missing"}:eCe(i,e,n);const s=Jke(r,e,n);return i!=null&&Kke(i,s.end,n),s}function Gz(t,e,n,r){const i=ey(t);return i==null||!Number.isInteger(i)?(Ma(r,"invalid-track-index",e,t),{trackIndex:0,trackSource:"invalid"}):{trackIndex:i,trackSource:n}}function nCe(t,e){const n=t.getAttribute(Dn.trackIndex),r=t.getAttribute(Dn.legacyTrack);if(n==null&&r==null)return{trackIndex:0,trackSource:"default"};if(n==null&&r!=null)return Ma(e,"deprecated-layer",Dn.legacyTrack,r),Gz(r,Dn.legacyTrack,"legacy-layer",e);const i=Gz(n??"",Dn.trackIndex,"track-index",e);if(r==null)return i;Ma(e,"deprecated-layer",Dn.legacyTrack,r);const s=ey(r);return s!=null&&s!==i.trackIndex&&Ma(e,"conflicting-layer",Dn.legacyTrack,r),i}function gd(t,e={}){const n=[],r=t.getAttribute(Dn.start),i=vse(r),s=Wke(i,r,e,n),a=tCe(t,s,n),o=nCe(t,n);return{startExpression:i,start:s,...a,...o,diagnostics:n}}function Ase(t){if(!Number.isFinite(t))throw new zA("invalid-start","start must be finite");return String(t)}function rCe(t){if(t.kind==="absolute")return Ase(t.value);if(!t.refId||!Number.isFinite(t.offset))throw new zA("invalid-start","reference start must have an id and finite offset");return t.offset===0?t.refId:`${t.refId} ${t.offset<0?"-":"+"} ${Math.abs(t.offset)}`}function iCe(t){if(typeof t=="number")return Ase(t);if(typeof t=="object"&&t!=null)return rCe(t);if(typeof t=="string"&&vse(t))return t.trim();throw new zA("invalid-start",`invalid start expression: ${t??""}`)}function sCe(t,e,n){if(e===null){t.removeAttribute(Dn.duration);return}if(e===void 0){t.getAttribute(Dn.duration)==null&&n.duration!=null&&t.setAttribute(Dn.duration,String(n.duration));return}if(!Number.isFinite(e)||e<0)throw new zA("invalid-duration","duration must be a finite, non-negative number");t.setAttribute(Dn.duration,String(e))}function aCe(t,e,n){if(e===null){t.removeAttribute(Dn.trackIndex);return}if(e===void 0){t.getAttribute(Dn.trackIndex)==null&&n.trackSource==="legacy-layer"&&t.setAttribute(Dn.trackIndex,String(n.trackIndex));return}if(!Number.isFinite(e)||!Number.isInteger(e))throw new zA("invalid-track-index","trackIndex must be a finite integer");t.setAttribute(Dn.trackIndex,String(e))}function oCe(t,e){const n=gd(t);return e.start!==void 0&&t.setAttribute(Dn.start,iCe(e.start)),sCe(t,e.duration,n),aCe(t,e.trackIndex,n),e.duration===void 0&&t.getAttribute(Dn.duration)==null&&t.getAttribute(Dn.derivedEnd)!=null&&n.duration==null||t.removeAttribute(Dn.derivedEnd),t.removeAttribute(Dn.legacyTrack),gd(t)}const Sse=1,lCe=["seconds-time","rational-fps","seek-keep-playing","composition-manifest-v1"];function cCe(t,e){let n=Math.abs(t),r=Math.abs(e);for(;r!==0;){const i=n%r;n=r,r=i}return n||1}function uCe(t){const e=Number.isFinite(t)&&t>0?t:30,n=Number.isInteger(e)?1:1e6,r=Math.round(e*n),i=cCe(r,n);return{numerator:r/i,denominator:n/i}}function fCe(t){if(typeof t!="object"||t===null)return null;const e=t;return!Number.isFinite(e.numerator)||!Number.isFinite(e.denominator)||(e.numerator??0)<=0||(e.denominator??0)<=0?null:Number(e.numerator)/Number(e.denominator)}function hCe(t){return{protocolVersion:Sse,capabilities:lCe,fps:uCe(t)}}function dCe(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")}function pCe(t,e=30){if(typeof t!="object"||t===null)return{status:"legacy",fps:e};const n=t;if(n.protocolVersion===void 0)return{status:"legacy",fps:e};if(n.protocolVersion!==Sse)return{status:"unsupported",code:"unsupported_protocol_version",receivedVersion:n.protocolVersion};const r=fCe(n.fps);return r===null||!dCe(n.capabilities)?{status:"unsupported",code:"invalid_protocol_metadata",receivedVersion:n.protocolVersion}:{status:"supported",fps:r,metadata:n}}function mCe(t,e={},n=30){return{...e,source:"hf-parent",type:"control",action:t,...hCe(n)}}function PI(t,e,n={},r=30){t==null||t.postMessage(mCe(e,n,r),"*")}function YR(t){return pCe(t,30)}function gCe(t){t.status==="unsupported"&&window.dispatchEvent(new CustomEvent("runtimeprotocolerror",{detail:{code:t.code,receivedVersion:t.receivedVersion}}))}function rE(t){const e=YR(t);return e.status!=="unsupported"?e:(gCe(e),null)}function yCe(t){const e=YR(t);return e.status==="supported"?e.fps:30}function xCe(t,e){t.documentElement&&(t.documentElement.style.overflow="hidden",t.documentElement.style.margin="0"),t.body&&(t.body.style.overflow="hidden",t.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function bCe(t){const e=/data-composition-id=["']([^"']+)["']/gi,n=new Set,r=Array.from(t.querySelectorAll("style, script"));for(const a of r){const o=a.textContent||"";if(!o)continue;let l;for(;(l=e.exec(o))!==null;){const c=(l[1]||"").trim();c&&n.add(c)}}if(n.size===0)return;const i=new Set,s=Array.from(t.querySelectorAll("[data-composition-id]"));for(const a of s){const o=a.getAttribute("data-composition-id");o&&i.add(o)}for(const a of n){if(a==="root"||i.has(a))continue;const o=t.getElementById(`${a}-layer`)||t.getElementById(`${a}-comp`)||t.getElementById(a);o&&(o.getAttribute("data-composition-id")||o.setAttribute("data-composition-id",a))}}function wse(t){return Number.isFinite(t)?Math.max(0,Math.min(1,t)):1}function vCe(t){return t instanceof HTMLElement}function qR(t){const e=t.getRootNode();return typeof ShadowRoot<"u"&&e instanceof ShadowRoot&&vCe(e.host)?e.host:null}function KR(t,e,n){PI(t.contentWindow,e,n)}function Ose(t,e){if(t)try{const n=qR(t);if(n&&typeof n.muted=="boolean"){n.muted=e;return}KR(t,"set-muted",{muted:e})}catch{}}function ACe(t,e){if(!t)return;const n=wse(e);try{const r=qR(t);if(r&&typeof r.volume=="number"){r.volume=n;return}KR(t,"set-volume",{volume:n})}catch{}}function SCe(t,e){if(!t)return;const n=Number.isFinite(e)&&e>0?e:1;try{const r=qR(t);if(r&&typeof r.playbackRate=="number"){r.playbackRate=n;return}KR(t,"set-playback-rate",{playbackRate:n})}catch{}}const wCe=.25;let P2=null,j1=null,M2=null,N2=null;function OCe(t,e){if(e){const n=t.getElementById(e);if(n instanceof HTMLAudioElement)return n}return t.querySelector("audio[data-timeline-role='music']")??t.querySelector("audio")}function kCe(t,e,n){P2&&P2!==t&&Rv(),M2===null&&(M2=t.muted),N2===null&&(N2=t.volume),P2=t;try{t.muted=!1,t.volume=wCe*wse(n),Math.abs(t.currentTime-e)>.04&&(t.currentTime=e),t.paused&&t.play().catch(()=>{})}catch{}j1&&clearTimeout(j1),j1=setTimeout(Rv,140)}function CCe(t,e,n,r=1){if(!t)return;if(e===null){Rv();return}let i=null;try{i=t.contentDocument}catch{return}if(!i)return;const s=OCe(i,n);s&&kCe(s,e,r)}function Rv(){j1&&(clearTimeout(j1),j1=null);const t=P2;if(P2=null,!!t){try{t.pause(),M2!==null&&(t.muted=M2),N2!==null&&(t.volume=N2)}catch{}M2=null,N2=null}}function kse(t,e){var n,r,i;return((i=(r=(n=t.__timelines)==null?void 0:n[e])==null?void 0:r.duration)==null?void 0:i.call(r))??0}function ECe(t){const e=new Map;for(const n of t.querySelectorAll("[data-start]"))for(const r of[n.id,n.getAttribute("data-hf-id"),n.getAttribute("data-composition-id")])r&&e.set(r,n);return e}function TCe(t,e){const n=(r,i)=>{if(i.has(r))return null;const s=t.get(r);if(!s)return null;const a=new Set(i).add(r),o=gd(s,{resolveReferenceEnd:u=>n(u,a)});if(o.end!=null)return o.end;const l=s.getAttribute("data-composition-id"),c=l?kse(e,l):0;return o.start==null||c<=0?null:o.start+c};return n}function PCe(t,e,n){if(!Number.isFinite(e)||e<=0)return null;const r=Number.isFinite(t)?t:0;if(!Number.isFinite(n)||n<=0)return{start:r,duration:e};if(r>=n)return null;const i=Math.min(e,Math.max(0,n-r));return i>0?{start:r,duration:i}:null}function MCe(t,e){return t||e}function f4(t){return t||void 0}function NCe(t,e,n){if(n)return{...t,compositionSrc:n};const r=e.querySelector("video[src]");return r?{...t,src:f4(r.getAttribute("src")),tag:"video"}:t}function DCe(t){const{doc:e,iframeWin:n,element:r,compositionId:i,rootDuration:s,fallbackIndex:a,resolveEnd:o}=t,l=gd(r,{resolveReferenceEnd:w=>o(w,new Set([i]))}),c=PCe(l.start??0,l.duration??kse(n,i),s);if(!c)return null;const u=MCe(r.id,i),f=r.getAttribute("data-composition-src")??r.getAttribute("data-composition-file"),h=s0(r),d=a0(r),y=Dv(e,r,h),g=i0({id:u,label:r.getAttribute("data-timeline-label")??r.getAttribute("data-label"),tag:r.tagName}),v=_v({preferredId:u,label:g,fallbackIndex:a,domId:f4(r.id),selector:h,selectorIndex:y,sourceFile:d}),b={id:v.id,label:g,key:v.key,tag:r.tagName.toLowerCase(),start:c.start,duration:c.duration,track:l.trackIndex,domId:f4(r.id),hfId:f4(r.getAttribute("data-hf-id")),selector:h,selectorIndex:y,sourceFile:d,zIndex:JC(r)};return NCe(b,r,f)}function ICe(t,e,n,r){const i=new Set(n.map(h=>h.id)),s=t.querySelector("[data-composition-id]"),a=s==null?void 0:s.getAttribute("data-composition-id"),o=t.querySelectorAll("[data-composition-id][data-start]"),l=[],c=TCe(ECe(t),e);for(const h of o){const d=h,y=d.getAttribute("data-composition-id");if(!y||y===a||i.has(d.id)||i.has(y))continue;const g=DCe({doc:t,iframeWin:e,element:d,compositionId:y,rootDuration:r,fallbackIndex:l.length,resolveEnd:c});g&&l.push(g)}let u=!1;const f=n.map(h=>{if(h.compositionSrc)return h;const d=t.getElementById(h.id)??t.querySelector(`[data-composition-id="${CSS.escape(h.id)}"]`);if(!d)return h;const y=d.getAttribute("data-composition-src")||d.getAttribute("data-composition-file");return y?(u=!0,{...h,compositionSrc:y}):h});return{missing:l,updatedEls:f,patched:u}}function Uz(t){return t.tagName||t.kind||"div"}const Xz=new WeakMap;function Cse(t,e){if(!t)return{label:e,volume:1,hidden:!1};let n=Xz.get(t);return n||(n=new Map(Kg(t).map(r=>[r.id,{label:r.label,volume:r.volume,hidden:r.hidden,...r.fxChain?{fxChain:r.fxChain}:{}}])),Xz.set(t,n)),n.get(e)??{label:e,volume:1,hidden:!1}}function Ese(t){const{clip:e,fallbackIndex:n,doc:r}=t;let i=t.hostEl??null;const s=i0({id:e.id,label:e.label,tag:Uz(e)});let a,o,l,c,u;i&&(a=i.id||void 0,u=i.getAttribute("data-hf-id")||void 0,o=s0(i),l=r&&o?Dv(r,i,o):void 0,c=a0(i));const f=_v({preferredId:e.id,label:s,fallbackIndex:n,domId:a,selector:o,selectorIndex:l,sourceFile:c}),h={id:f.id,label:s,key:f.key,kind:e.kind,tag:Uz(e),start:e.start,duration:e.duration,track:e.track,authoredTrack:e.track,stackingContextId:e.stackingContextId??null,domId:a,hfId:u,selector:o,selectorIndex:l,sourceFile:c,playbackStart:e.playbackStart,playbackRate:e.playbackRate};if(i){ose(h,i),i.hasAttribute("data-hidden")&&(h.hidden=!0);const d=i.getAttribute("data-timeline-role");d&&(h.timelineRole=d);const y=i.getAttribute("data-audio-group");if(y){h.audioGroup=y;const b=Cse(r??i.ownerDocument,y);h.audioGroupLabel=b.label,h.audioGroupVolume=b.volume,h.audioGroupHidden=b.hidden,b.fxChain&&(h.audioGroupFxChain=b.fxChain)}const g=i.getAttribute("data-fx-chain");g&&(h.fxChain=g);const v=i.getAttribute("data-automation");v&&(h.automation=v),h.zIndex=JC(i)}if(e.assetUrl&&(h.src=e.assetUrl),e.kind==="composition"&&e.compositionId){h.playbackStart??(h.playbackStart=0),h.playbackRate??(h.playbackRate=1);let d=e.compositionSrc;if(d||(i=(r==null?void 0:r.querySelector(`[data-composition-id="${CSS.escape(e.compositionId)}"]`))??i,d=(i==null?void 0:i.getAttribute("data-composition-src"))??(i==null?void 0:i.getAttribute("data-composition-file"))??null),d)h.compositionSrc=d;else if(i){const y=i.querySelector("video[src]");y&&(h.src=y.getAttribute("src")||void 0,h.tag="video")}if(i){h.domId=i.id||void 0,h.hfId=i.getAttribute("data-hf-id")||void 0,h.selector=s0(i),h.selectorIndex=r&&h.selector?Dv(r,i,h.selector):void 0,h.sourceFile=a0(i);const y=_v({preferredId:e.id,label:s,fallbackIndex:n,domId:h.domId,selector:h.selector,selectorIndex:h.selectorIndex,sourceFile:h.sourceFile});h.id=y.id,h.key=y.key}}return h}function Tse(t,e,n=[]){if(!Number.isFinite(e)||e<=0)return[];const r=t.querySelector("[data-composition-id]");if(!r)return[];const i=new Set(n.map(Hn)),s=n.reduce((o,l)=>Math.max(o,Number.isFinite(l.track)?l.track:0),-1),a=[];for(const o of Array.from(r.children)){if(!Z6e(r,o))continue;const l=s0(o);if(!l)continue;const c=Dv(t,o,l),u=a0(o),f=L6e(o),h=_v({preferredId:o.id||null,label:f,fallbackIndex:n.length+a.length,domId:o.id||void 0,selector:l,selectorIndex:c,sourceFile:u});i.has(h.key)||i.has(h.id)||a.push({domId:o.id||void 0,hfId:o.getAttribute("data-hf-id")||void 0,zIndex:JC(o),duration:e,id:h.id,key:h.key,label:f,selector:l,selectorIndex:c,sourceFile:u,stackingContextId:WR(o),start:0,tag:o.tagName.toLowerCase(),timingSource:"implicit",track:s+1+a.length})}return a}function Pse(t,e){const n=t.querySelector("[data-composition-id]"),r=t.querySelectorAll("[data-start]"),i=[];let s=0;return r.forEach(a=>{if(a===n||eE(a))return;const o=a,l=gd(o),c=l.start;if(c==null||Number.isFinite(e)&&e>0&&c>=e)return;const u=o.tagName.toLowerCase();let f=l.duration??0;if(f<=0&&(f=Math.max(0,e-c)),Number.isFinite(e)&&e>0&&(f=Math.min(f,Math.max(0,e-c))),!Number.isFinite(f)||f<=0)return;const h=l.trackSource==="default"?s++:l.trackIndex,d=o.getAttribute("data-composition-id"),y=s0(o),g=a0(o),v=Dv(t,o,y),b=i0({id:o.id||d||null,label:o.getAttribute("data-timeline-label")??o.getAttribute("data-label"),tag:u}),w=_v({preferredId:o.id||d||null,label:b,fallbackIndex:i.length,domId:o.id||void 0,selector:y,selectorIndex:v,sourceFile:g}),O={id:w.id,label:b,key:w.key,kind:d&&d!==(n==null?void 0:n.getAttribute("data-composition-id"))?"composition":u==="video"||u==="audio"?u:u==="img"?"image":"element",tag:u,start:c,duration:f,track:h,domId:o.id||void 0,hfId:o.getAttribute("data-hf-id")||void 0,selector:y,selectorIndex:v,sourceFile:g,stackingContextId:WR(o),timingSource:"authored",zIndex:JC(o)},C=ase(o);if(ose(O,o),C){C.tagName==="IMG"&&(O.tag="img");const j=o.getAttribute("data-volume")??C.getAttribute("data-volume");j&&(O.volume=parseFloat(j));const L=C.src||void 0;L&&(O.src=L)}const E=o.getAttribute("data-fx-chain");E&&(O.fxChain=E);const M=o.getAttribute("data-automation");M&&(O.automation=M),o.hasAttribute("data-timeline-locked")&&(O.timelineLocked=!0),o.hasAttribute("data-hidden")&&(O.hidden=!0);const N=o.getAttribute("data-timeline-role");N&&(O.timelineRole=N);const I=o.getAttribute("data-audio-group");if(I){O.audioGroup=I;const j=Cse(t,I);O.audioGroupLabel=j.label,O.audioGroupVolume=j.volume,O.audioGroupHidden=j.hidden,j.fxChain&&(O.audioGroupFxChain=j.fxChain)}const _=o.getAttribute("data-composition-src")||o.getAttribute("data-composition-file");if(_)O.compositionSrc=_;else if(d&&d!==(n==null?void 0:n.getAttribute("data-composition-id"))){const j=o.querySelector("video[src]");j&&(O.src=j.getAttribute("src")||void 0,O.tag="video")}O.kind==="composition"&&(O.playbackStart??(O.playbackStart=0),O.playbackRate??(O.playbackRate=1)),i.push(O)}),[...i,...Tse(t,e,i)]}function _Ce(t,e,n,r){const i=Number.isFinite(n)?n:0,s=Number.isFinite(r)?r:0;if(t.length===0||e.length>=t.length||s>i)return e;const a=new Set(e.map(Hn)),o=t.filter(l=>!a.has(Hn(l))&&l.compositionSrc!=null);return o.length===0?e:[...e,...o]}function RCe(t){const e=t.match(/\/preview\/comp\/(.+?)(?:\?|$)/);return e?decodeURIComponent(e[1]):void 0}function jCe(t){if(!Number.isFinite(t.rootDuration)||t.rootDuration<=0)return null;const e=RCe(t.iframeSrc);return{id:t.compositionId,label:i0({id:t.compositionId,tag:t.tagName}),key:Iv({id:t.compositionId,fallbackIndex:0,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:e}),tag:t.tagName.toLowerCase()||"div",start:0,duration:t.rootDuration,track:0,compositionSrc:e,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:e}}function LCe(t,e){let n=e.get(t);if(!n)return null;const r=new Set;for(r.add(t);e.has(n);){if(r.has(n))return n;r.add(n);const i=e.get(n);if(!i)return n;n=i}return n}function Mse(t,e,n){if(!t)return null;const r=TI(t).domId;if(n.has(r))return r;if(n.has(t))return t;const i=e.find(s=>s.label===t||s.label===r);return i!=null&&i.id&&n.has(i.id)?i.id:null}function FCe(t,e){return Number.isFinite(e)&&e>=t.start&&e<t.start+t.duration}function $Ce(t,e){return Number.isFinite(e)&&e>=t.start&&e<=t.start+t.duration}function BCe(t,e,n){let r=0,i=e.get(t);const s=new Set;for(s.add(t);i;){if(s.has(i))return r;s.add(i),n.has(i)&&(r+=1),i=e.get(i)}return r}function VCe(t,e,n){const r=new Set(n.values()),i=c=>{const u=new Set;for(const f of e)f.id&&r.has(f.id)&&c(f,t)&&u.add(f.id);return u},s=i(FCe),a=s.size>0?s:i($Ce);let o=null,l=-1;for(const c of a){const u=BCe(c,n,a);u<=l||(o=c,l=u)}return o}function HCe({selectedElementId:t,currentTime:e,manifest:n,parentMap:r}){const i=Mse(t,n,r);return i||VCe(e,n,r)}function D2(t,e){return e.size===0?t:t.filter(n=>!e.has(n.domId??n.id))}function QCe(t,e,n){const r=t.start+t.duration;if(t.start>=n||r<=e)return null;const i=Math.max(t.start,e),s=Math.min(r,n)-i;return s>0?{start:i,duration:s}:null}function ZCe(t){return t?{hidden:t.hidden,timelineLocked:t.timelineLocked,timelineRole:t.timelineRole,fxChain:t.fxChain,automation:t.automation}:{}}function zCe(t,e,n,r,i){const s=[];for(const a of t){const o=QCe(a,e.start,e.end);if(!o)continue;const l=Ese({clip:a,fallbackIndex:s.length}),c=a.id??void 0,u=a.id?`#${a.id}`:void 0,f=Iv({id:l.id,fallbackIndex:s.length,domId:c,selector:u,selectorIndex:l.selectorIndex,sourceFile:n.sourceFile});s.push({...l,...ZCe(i.find(h=>h.key===f)),key:f,start:o.start,duration:o.duration,track:e.track+(s.length+1)/(t.length+2),authoredTrack:l.authoredTrack,stackingContextId:l.stackingContextId,expandedParentStart:n.start,expandedHostKey:r,domId:c,selector:u,sourceFile:n.sourceFile,timingSource:"authored"})}return s}function GCe(t,e,n){return t.filter(r=>r.parentId===e).map(r=>({id:r.id,label:r.label,start:n.start,duration:n.duration,track:n.track,kind:"element",tagName:null,compositionId:null,parentCompositionId:n.id??null,compositionSrc:n.compositionSrc??null,assetUrl:null,stackingContextId:r.stackingContextId}))}function UCe(t,e,n,r,i,s=[]){const a=t.find(y=>y.id===r||y.domId===r);if(!a)return D2(t,n);const o=e.find(y=>y.id===i),l=(()=>{const y=e.filter(g=>g.id!=null&&n.get(g.id)===i);return y.length>0?y:GCe(s,i,o??a)})();if(l.length===0)return D2(t,n);const c={start:(o==null?void 0:o.start)??a.start,sourceFile:(o==null?void 0:o.compositionSrc)??a.compositionSrc??void 0},u=a.key??a.id,f=zCe(l,{start:a.start,end:a.start+a.duration,track:a.track},c,u,t);if(f.length===0)return D2(t,n);const h=new Set;for(let y=i;y&&!(h.has(y)||(h.add(y),y===r));)y=n.get(y);const d=y=>h.has(i)&&t.some(g=>(g.domId??g.id)===i)?(y.domId??y.id)===i:(y.key??y.id)===u;return t.filter(y=>(y.key??y.id)===u||h.has(y.domId??y.id)||!n.has(y.domId??y.id)).flatMap(y=>d(y)?[y,...f]:[y])}function GA(){const t=ue(l=>l.elements),e=ue(l=>l.clipManifest),n=ue(l=>l.clipParentMap),r=ue(l=>l.domClipChildren),i=ue(l=>l.selectedElementId),s=ue(l=>l.currentTime),{rawId:a,selectedRawId:o}=x.useMemo(()=>!e||e.length===0||n.size===0?{rawId:null,selectedRawId:null}:{rawId:HCe({selectedElementId:i,currentTime:s,manifest:e,parentMap:n}),selectedRawId:Mse(i,e,n)},[e,n,i,s]);return x.useMemo(()=>{if(!e||e.length===0||n.size===0)return t;if(!a)return D2(t,n);const l=o?n.get(a):a;if(!l)return D2(t,n);const c=LCe(a,n)??l;return UCe(t,e,n,c,l,r)},[t,e,n,r,a,o])}const XCe={clip:"rgba(255,255,255,0.055)",clipActive:"rgba(60,230,172,0.16)",accent:"#3CE6AC",label:"rgba(255,255,255,0.5)"},JR={shellBackground:"#0A0A0B",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.16)",rowBackground:"#101014",rowBorder:"rgba(255,255,255,0.06)",gutterBackground:"#0E0F12",gutterBorder:"rgba(255,255,255,0.10)",textPrimary:"rgba(255,255,255,0.92)",textSecondary:"rgba(255,255,255,0.62)",tickText:"rgba(255,255,255,0.34)",tickMajor:"rgba(255,255,255,0.10)",tickMinor:"rgba(255,255,255,0.06)",clipBackground:"#141922",clipBackgroundActive:"#181e28",clipBorder:"rgba(255,255,255,0.10)",clipBorderHover:"rgba(255,255,255,0.18)",clipBorderActive:"rgba(255,255,255,0.24)",clipShadow:"none",clipShadowHover:"0 2px 8px rgba(0,0,0,0.2)",clipShadowActive:"0 2px 8px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.04)",clipShadowDragging:"0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06)",handleColor:"rgba(255,255,255,0.2)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"8px"};function WCe(t){return XCe}function YCe({isHovered:t,isSelected:e,isDragging:n}){return n?.95:e?.82:t?.76:0}function qCe({element:t,draggedElementId:e,previewStart:n,previewTrack:r}){return(t.key??t.id)!==e||n===null||r===null?t:{...t,start:n,track:r}}function Yt(t){return Math.round(t*1e3)/1e3}function ga(t){return Math.round(t*100)/100}function MI(t){var e,n;try{const r=QR(t);if(r!=null)return r;const i=(e=t.style)==null?void 0:e.zIndex;if(i&&i!=="auto"){const l=parseInt(i,10);if(Number.isFinite(l))return l}const s=(n=t.ownerDocument)==null?void 0:n.defaultView;if(!s)return 0;const a=s.getComputedStyle(t).zIndex;if(a==="auto"||a==="")return 0;const o=parseInt(a,10);return Number.isFinite(o)?o:0}catch{return 0}}function Nse(t){return t.stackingContextId??t.parentCompositionId??t.compositionAncestors[0]??""}function Dse(t){return{key:Hn(t),track:t.track,zIndex:t.zIndex??0,stackingContextId:t.stackingContextId??null,parentCompositionId:t.parentCompositionId??null,compositionAncestors:t.compositionAncestors??[]}}function KCe(t,e){return t.start<e.start+e.duration&&e.start<t.start+t.duration}const AP=.35;function Ise(t){var e;return((e=t.tag)==null?void 0:e.toLowerCase())==="audio"}function JCe(t,e){return t.elements.some(n=>Hn(n)===e)}function _se(t,e,n){return t.elements.some(r=>Hn(r)!==n&&KCe(r,e))}function Rse(t,e,n){(e.zIndex??0)!==n&&t.push({key:Hn(e),zIndex:n,domId:e.domId,selector:e.selector,selectorIndex:e.selectorIndex,sourceFile:e.sourceFile})}function jse(t,e,n,r){let i=0;for(const s of e.elements){if(Hn(s)===r)continue;const o=t.length;Rse(t,s,n),t.length>o&&(i+=1)}return i}function eEe(t,e){return t.filter(n=>n.kind==="visual"&&n.contextKey===e)}function jv(t,e){return t.find(n=>n.id===e)??null}function UA(t){const e=[];return Rse(e,t.element,t.targetZIndex),e}function tEe(t){const e=Hn(t.element),n=t.bottomZIndex+1,r=UA({element:t.element,targetZIndex:n});let i=0,s=n+1;for(let a=t.beforeIndex;a>=0;a-=1){const o=t.layers[a];if(!o)continue;const l=o.zIndex>=s?o.zIndex:s;i+=jse(r,o,l,e),s=l+1}return{changes:r,siblingChanges:i}}function nEe(t){const e=Hn(t.element),n=t.topZIndex-1,r=UA({element:t.element,targetZIndex:n});let i=0,s=n-1;for(let a=t.afterIndex;a<t.layers.length;a+=1){const o=t.layers[a];if(!o)continue;const l=o.zIndex<=s?o.zIndex:s;i+=jse(r,o,l,e),s=l-1}return{changes:r,siblingChanges:i}}function rEe(t){const e=t.beforeLayer.zIndex,n=t.afterLayer.zIndex;if(e-n>1)return UA({element:t.element,targetZIndex:Math.floor((e+n)/2)});const r=t.layers.findIndex(o=>o.id===t.beforeLayer.id),i=t.layers.findIndex(o=>o.id===t.afterLayer.id),s=tEe({element:t.element,layers:t.layers,beforeIndex:r,bottomZIndex:n}),a=nEe({element:t.element,layers:t.layers,afterIndex:i,topZIndex:e});return s.siblingChanges<=a.siblingChanges?s.changes:a.changes}function iEe(t){const e=jv(t.layers,t.layerId);return!e||_se(e,t.element,Hn(t.element))?null:UA({element:t.element,targetZIndex:e.zIndex})}function Wz(t){const e=jv(t.layers,t.layerId);return e?UA({element:t.element,targetZIndex:e.zIndex+t.offset}):null}function sEe(t){switch(t.placement.type){case"onto":return iEe({element:t.element,layers:t.layers,layerId:t.placement.layerId});case"above":return Wz({element:t.element,layers:t.layers,layerId:t.placement.layerId,offset:1});case"below":return Wz({element:t.element,layers:t.layers,layerId:t.placement.layerId,offset:-1});case"between":{const e=jv(t.layers,t.placement.beforeLayerId),n=jv(t.layers,t.placement.afterLayerId);return e&&n?rEe({element:t.element,layers:t.layers,beforeLayer:e,afterLayer:n}):null}}}function aEe(t){if(Ise(t.element))return null;const e=Nse(Dse(t.element)),n=eEe(t.layers,e),r=sEe({element:t.element,layers:n,placement:t.placement});return r&&r.length>0?{contextKey:e,placement:t.placement,zIndexChanges:r}:null}function oEe(t,e){const n=t[0],r=t[t.length-1];if(!n||!r)return null;if(e<-AP)return{type:"above",layerId:n.id};if(e>t.length-1+AP)return{type:"below",layerId:r.id};const i=Math.round(e),s=t[i];if(s&&Math.abs(e-i)<=AP)return{type:"onto",layerId:s.id};const a=Math.max(0,Math.min(t.length,Math.ceil(e)));if(a<=0)return{type:"above",layerId:n.id};if(a>=t.length)return{type:"below",layerId:r.id};const o=t[a-1],l=t[a];return o&&l?{type:"between",beforeLayerId:o.id,afterLayerId:l.id}:null}function lEe(t){if(t.placement.type!=="onto")return t.placement;const e=jv(t.layers,t.placement.layerId);return e?_se(e,t.element,t.draggedKey)?t.targetPosition<t.currentIndex?{type:"above",layerId:e.id}:t.targetPosition>t.currentIndex?{type:"below",layerId:e.id}:t.placement:t.placement:null}function cEe(t,e){return e.type==="onto"?e.layerId:e.type==="between"?`preview:${t}:between:${e.beforeLayerId}:${e.afterLayerId}`:`preview:${t}:${e.type}:${e.layerId}`}function uEe(t,e){if(e.type==="onto")return Math.max(0,t.indexOf(e.layerId));if(e.type==="between")return Math.max(0,t.indexOf(e.afterLayerId));const n=Math.max(0,t.indexOf(e.layerId));return e.type==="above"?n:n+1}function fEe(t){if(Ise(t.element))return null;const e=Nse(Dse(t.element)),n=new Map(t.layers.map(c=>[c.id,c])),r=t.layerOrder.map(c=>n.get(c)??null).filter(c=>c!=null&&c.kind==="visual"&&c.contextKey===e),i=Hn(t.element),s=r.findIndex(c=>JCe(c,i));if(s<0)return null;const a=s+t.trackDeltaRaw,o=oEe(r,a);if(!o)return null;const l=lEe({layers:r,element:t.element,draggedKey:i,placement:o,targetPosition:a,currentIndex:s});return l?{previewLayerId:cEe(i,l),previewLayerIndex:uEe(t.layerOrder,l),stackingReorder:aEe({element:t.element,layers:r,placement:l})}:null}const XA=72,I2=32,nf=232,hs=48,lg=28,Lse=40,Ia=24,ca=3,hEe=18;function dEe(t,e){let n=0,r=t.length;for(;n<r;){const i=Math.floor((n+r)/2);(t[i]??Number.POSITIVE_INFINITY)<e?n=i+1:r=i}return n}function ej(t,e,n,r=new Set){if(!(t!=null&&t.length))return[];const i=(n==null?void 0:n.start)??Number.NEGATIVE_INFINITY,s=(n==null?void 0:n.end)??Number.POSITIVE_INFINITY,a=new Set;for(let o=dEe(t,i);o<t.length;o++){const l=t[o];if(l===void 0||l>=s)break;a.add(o)}for(const o of r)o>=0&&o<t.length&&a.add(o);return[...a].sort((o,l)=>o-l).map(o=>({index:o,time:t[o],strength:e==null?void 0:e[o]}))}function cg(t){return hs+Math.max(0,Math.trunc(t))*lg}const pEe=ca/hs,zp=50,Fse=Math.round(hs*1.5),mEe=48;function gEe(t,e){return t.map(n=>{let r=0,i=0;for(const s of n)e!=null&&e.has(s.clipId)&&(r=Math.max(r,s.laneCount),i=Math.max(i,s.automationLaneCount??0));return hs+Math.max(0,Math.trunc(r))*lg+i*XA})}function h6(t){return t===void 0||!Number.isFinite(t)||t<=0?hs:t}const NI=new WeakMap,iE=Object.freeze([]);function tj(t,e){const n=Object.freeze(e.map(h6)),r=Object.freeze(n.map((f,h)=>{const d=t[h];return d!==void 0&&Number.isFinite(d)?d:h})),i=[0];for(const f of n)i.push((i.at(-1)??0)+f);Object.freeze(i);const s=new Map(r.map((f,h)=>[f,h])),a=f=>h6(n[f]),o=f=>{if(n.length===0)return f*hs;if(f<=0)return f*a(0);if(f>=n.length)return(i[n.length]??0)+(f-n.length)*hs;const h=Math.floor(f);return(i[h]??0)+(f-h)*a(h)},l=f=>{const h=f-Ia-zp;if(n.length===0)return h/hs;if(h<0)return h/a(0);const d=i[n.length]??0;if(h>=d)return n.length+(h-d)/hs;let y=1,g=n.length;for(;y<g;){const b=Math.floor((y+g)/2);(i[b]??0)>h?g=b:y=b+1}const v=y-1;return v+(h-(i[v]??0))/a(v)},c={rowKeys:r,rowHeights:n,rowOffsets:i,rowsHeight:i.at(-1)??0,canvasHeight:Ia+zp+(i.at(-1)??0)+Fse,getRowIndex:f=>s.get(f)??-1,getRowHeight:a,getRowTop:f=>Ia+zp+o(f),getRowFromY:l,getRowPositionFromY:f=>{const h=l(f),d=Math.floor(h);return{rowFloat:h,row:d,fraction:h-d,rowHeight:a(d)}}},u=Object.freeze(c);return NI.set(n,u),u}function nj(t){const e=NI.get(t);if(e)return e;const n=tj(t.map((r,i)=>i),t);return NI.set(t,n),n}function $se(t,e=iE){return h6(e[t])}function yEe(t,e){return nj(e).getRowTop(t)-Ia-zp}function SP(t,e=iE){return Ia+zp+yEe(t,e)}function DI(t,e=iE){return nj(e).getRowFromY(t)}function xEe(t,e=iE){return nj(e).getRowPositionFromY(t)}function bEe(t){return ca/h6(t)}const Yz=160,Bse=60,vEe=1.2;function AEe(t,e,n){const r=Number.isFinite(e)&&e>0?e:0,i=Math.max(r*vEe,Bse);return!Number.isFinite(t)||t<=n?100:(t-n-2)/i}function SEe(t){const e=Number.isFinite(t.pps)?Math.max(t.pps,0):0;return Math.max(t.trackContentWidth,t.viewportWidth-t.contentOrigin-2,t.dragGhostEndPx??0,t.resizeGhostEndPx??0,Bse*e)}function sE(t){return t.clientX-t.rectLeft+t.scrollLeft-t.contentOrigin}function wEe(t,e,n){return t==="fit"||!Number.isFinite(e)||!Number.isFinite(n)?!1:e-n>1}function OEe(t,e,n){return e==="fit"?0:n}function qz(t){const e=Math.max(0,t.currentPixelsPerSecond),n=Math.max(0,t.nextPixelsPerSecond);if(!Number.isFinite(t.pointerX)||!Number.isFinite(t.currentScrollLeft)||!Number.isFinite(t.duration)||t.duration<=0||e<=0||n<=0)return Math.max(0,t.currentScrollLeft);const r=Math.max(0,sE({clientX:t.pointerX,rectLeft:0,scrollLeft:t.currentScrollLeft,contentOrigin:t.contentOrigin})),i=Math.max(0,Math.min(t.duration,r/e));return Math.max(0,t.contentOrigin+i*n-t.pointerX)}const d6=9;function II(t,e,n){return!Number.isFinite(t)||!Number.isFinite(e)?n-d6/2:n+Math.max(0,t)*Math.max(0,e)-d6/2}function Vse(t){const{clientX:e,viewportLeft:n,scrollLeft:r,contentOrigin:i,pixelsPerSecond:s,duration:a}=t;if(!(s>0)||!Number.isFinite(a))return 0;const o=sE({clientX:e,rectLeft:n,scrollLeft:r,contentOrigin:i});return Math.max(0,Math.min(a,o/s))}const Kz=.75;function kEe(t){const e=Number.isFinite(t.currentScrollLeft)?Math.max(0,t.currentScrollLeft):0,n=Number.isFinite(t.maxScrollLeft)?Math.max(0,t.maxScrollLeft):0,r=t.viewportWidth-t.contentOrigin;if(!Number.isFinite(t.playheadX)||!Number.isFinite(t.contentOrigin)||!Number.isFinite(r)||r<=0||n<=0)return Math.min(n,e);const i=e+t.contentOrigin,s=i+r*Kz;let a=e;return t.playheadX>s?a=t.playheadX-t.contentOrigin-r*Kz:t.playheadX<i&&(a=t.playheadX-t.contentOrigin),Math.max(0,Math.min(n,a))}function CEe(t,e){return!Number.isFinite(t)||!Number.isFinite(e)?!0:t-e<=1}function EEe(t,e){return t.length===0?0:e==null||e<0?t[0]:e>=t.length?Math.max(...t)+1:t[e]??t[t.length-1]??0}function TEe(t,e,n){const r=sE({clientX:e,rectLeft:t.rectLeft,scrollLeft:t.scrollLeft,contentOrigin:t.contentOrigin}),i=n-t.rectTop+t.scrollTop,s=Math.round(r/Math.max(t.pixelsPerSecond,1)*100)/100,a=Math.max(0,t.clampStartToDuration===!1?s:Math.min(t.duration,s)),o=Math.floor(DI(i,t.rowHeights));return{start:a,track:EEe(t.trackOrder,o)}}function PEe(t){return t.kind==="composition"||t.compositionSrc||t.playbackStartAttr!=null||t.sourceDuration!=null&&Number.isFinite(t.sourceDuration)&&t.sourceDuration>0?!0:["video","audio","img"].includes(t.tag.toLowerCase())}function MEe(t){return!!(t.domId||t.selector)}function WA(t){if(t.timingSource==="implicit"||t.timelineLocked)return{canMove:!1,canTrimStart:!1,canTrimEnd:!1};const e=MEe(t),n=Number.isFinite(t.duration)&&t.duration>0,r=PEe(t);return{canMove:e&&(r||n),canTrimEnd:e&&n,canTrimStart:e&&n}}const NEe=.1,DEe=.05;function IEe(t,e,n){return Math.min(Math.max(t,e),n)}function h1(t){return ga(t)}function aE(t){return Math.max(DEe,t??NEe)}function Hse(t){return Math.max(.1,t??1)}function Qse(t,e,n){const r=Hse(t.playbackRate),i=t.playbackStart!=null?t.playbackStart/r:Number.POSITIVE_INFINITY;return{minDelta:-Math.min(t.start-e,i),maxDelta:t.duration-n}}function Zse(t,e){const n=Hse(t.playbackRate);return{start:t.start+e,duration:t.duration-e,playbackStart:t.playbackStart!=null?Math.max(0,t.playbackStart+e*n):void 0}}function _Ee(t,e,n,r=aE()){if(e.length===0)return 0;if(n==="end"){const o=Math.max(...e.map(l=>r-l.duration));return h1(Math.max(t,o))}const i=e.map(o=>Qse(o,0,r)),s=Math.max(...i.map(o=>o.minDelta)),a=Math.min(...i.map(o=>o.maxDelta));return h1(IEe(t,s,a))}function REe(t,e,n,r=aE()){const i=_Ee(n,t,e,r);return{delta:i,members:t.map(s=>{if(e==="end")return{start:s.start,duration:h1(s.duration+i),playbackStart:s.playbackStart};const a=Zse(s,i);return{start:h1(a.start),duration:h1(a.duration),playbackStart:a.playbackStart!=null?h1(a.playbackStart):void 0}})}}function Jz(t){return t.key??t.id}function jEe(t){const e=t.tag.toLowerCase();return t.kind==="composition"||e==="audio"||e==="video"}function LEe(t,e){const n=WA({tag:t.tag,kind:t.kind,duration:t.duration,domId:t.domId,selector:t.selector,compositionSrc:t.compositionSrc,playbackStart:t.playbackStart,playbackStartAttr:t.playbackStartAttr,sourceDuration:t.sourceDuration,timingSource:t.timingSource,timelineLocked:t.timelineLocked});return e==="start"?n.canTrimStart:n.canTrimEnd}function FEe(t,e,n,r){if(e.size<=1||!e.has(n))return null;const i=t.filter(s=>e.has(Jz(s)));return i.length<=1||!i.every(s=>LEe(s,r))?null:i.map(s=>({element:s,key:Jz(s),start:s.start,duration:s.duration,playbackStart:r==="start"&&jEe(s)?s.playbackStart??0:s.playbackStart,playbackRate:s.playbackRate}))}function $Ee(t,e,n,r=aE()){return REe(t,e,n,r).members.map((s,a)=>({element:t[a].element,key:t[a].key,start:s.start,duration:s.duration,playbackStart:s.playbackStart}))}function BEe(t,e){const n=t.members.find(s=>s.key===t.grabbedKey),r=t.edge==="start"?e.previewStart-((n==null?void 0:n.start)??e.previewStart):e.previewDuration-((n==null?void 0:n.duration)??e.previewDuration),i=$Ee(t.members,t.edge,r);return t.changes=i,t.hasChanged=i.some((s,a)=>s.start!==t.members[a].start||s.duration!==t.members[a].duration||s.playbackStart!==t.members[a].playbackStart),i.find(s=>s.key===t.grabbedKey)}const d1=ga;function Lv(t,e,n){return Math.min(Math.max(t,e),n)}const eG=.55,C8=40,tG=12;function rj(t,e,n,r=0){const i=(a,o,l)=>{if(l<a+C8){const c=Math.min(1,Math.max(0,1-(l-a)/C8));return-Math.round(tG*c)}if(l>o-C8){const c=Math.min(1,Math.max(0,1-(o-l)/C8));return Math.round(tG*c)}return 0},s=Math.min(t.right,t.left+Math.max(0,r));return{x:i(s,t.right,e),y:i(t.top,t.bottom,n)}}function VEe(t,e,n){const r=(t.currentScrollLeft??0)-(t.originScrollLeft??0),i=(e-t.originClientX+r)/Math.max(t.pixelsPerSecond,1),s=n-t.originRow,a=Math.round(s),o=Lv(d1(t.start+i),0,Math.max(0,t.maxStart));if(t.stackingElement){const v=t.timelineLayers&&t.layerOrder?fEe({element:{...t.stackingElement,duration:t.duration},layers:t.timelineLayers,layerOrder:t.layerOrder,trackDeltaRaw:s}):null;return{start:o,track:t.track,previewLayerId:v==null?void 0:v.previewLayerId,previewLayerIndex:v==null?void 0:v.previewLayerIndex,stackingReorder:(v==null?void 0:v.stackingReorder)??null}}const l=Math.max(0,t.trackOrder.indexOf(t.track)),c=l+a,u=Lv(c,0,Math.max(0,t.trackOrder.length-1)),f=Math.min(...t.trackOrder),h=Math.max(...t.trackOrder);let d=t.trackOrder[u]??t.track;const y=l===0,g=l===t.trackOrder.length-1;return y&&c<0&&l+s<=-eG?d=f-1:g&&c>t.trackOrder.length-1&&l+s>=t.trackOrder.length-1+eG&&(d=h+1),{start:o,track:d}}function HEe(t,e,n){const r=aE(t.minDuration),i=(n-t.originClientX)/Math.max(t.pixelsPerSecond,1);if(e==="end"){const c=Lv(d1(t.duration+i),r,Math.max(r,t.maxEnd-t.start));return{start:t.start,duration:c,playbackStart:t.playbackStart}}const{minDelta:s,maxDelta:a}=Qse(t,t.minStart,r),o=Lv(i,s,a),l=Zse(t,o);return{start:d1(l.start),duration:d1(l.duration),playbackStart:l.playbackStart!=null?d1(l.playbackStart):void 0}}function QEe(t){if(t.capabilities.canMove)return null;const e=Math.max(0,t.width),n=Lv(t.offsetX,0,e),r=Math.max(0,t.handleWidth);return n<=r&&!t.capabilities.canTrimStart?"resize-start":n>=Math.max(0,e-r)&&!t.capabilities.canTrimEnd?"resize-end":"move"}function ZEe(t,e){return{start:t.start,end:t.start+t.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function zEe({rangeStart:t,rangeEnd:e,elements:n,prompt:r}){const i=Math.min(t,e),s=Math.max(t,e),a=n.map(o=>`- #${o.id} (${o.tag}) - ${ns(o.start)} to ${ns(o.start+o.duration)}, track ${o.track}`).join(`
|
|
72
72
|
`);return`Edit the following HyperFrames composition:
|
|
73
73
|
|
|
@@ -201,7 +201,7 @@ Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=1
|
|
|
201
201
|
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};Qn.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
|
|
202
202
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Df(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,e=this.input.charCodeAt(this.pos),(r!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-r.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return ty(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}};Qn.readHexChar=function(t){var e=this.pos,n=this.readInt(16,t);return n===null&&this.invalidStringToken(e,"Bad character escape sequence"),n};Qn.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(xd(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,t+=this.input.slice(n,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(e?Au:xd)(a,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=Df(a),n=this.pos}else break;e=!1}return t+this.input.slice(n,this.pos)};Qn.readWord=function(){var t=this.readWord1(),e=he.name;return this.keywords.test(t)&&(e=Cj[t]),this.finishToken(e,t)};var jPe="8.17.0";ps.acorn={Parser:ps,version:jPe,defaultOptions:ZI,Position:$v,SourceLocation:pE,getLineInfo:Ioe,Node:xE,TokenType:sr,tokTypes:he,keywordTypes:Cj,TokContext:Yl,tokContexts:pi,isIdentifierChar:xd,isIdentifierStart:Au,Token:Dj,isNewLine:ty,lineBreak:po,lineBreakG:iPe,nonASCIIwhitespace:Noe};function Bv(t,e){return ps.parse(t,e)}function _0(t,e,n,r,i){n||(n=mt),(function s(a,o,l){var c=l||a.type;_j(n,c,a,o,s),e[c]&&e[c](a,o)})(t,r,i)}function xf(t,e,n,r,i){var s=[];n||(n=mt),(function a(o,l,c){var u=c||o.type,f=o!==s[s.length-1];f&&s.push(o),_j(n,u,o,l,a),e[u]&&e[u](o,l||s,s),f&&s.pop()})(t,r,i)}function LPe(t,e,n,r,i){n||(n=mt);var s;(function a(o,l,c){var u=c||o.type;_j(n,u,o,l,a),s!==o&&(e(o,l,u),s=o)})(t,r,i)}function Ij(t,e,n){n(t,e)}function R0(t,e,n){}function _j(t,e,n,r,i){if(t[e]==null)throw new Error("No walker function defined for node type "+e);t[e](n,r,i)}var mt={};mt.Program=mt.BlockStatement=mt.StaticBlock=function(t,e,n){for(var r=0,i=t.body;r<i.length;r+=1){var s=i[r];n(s,e,"Statement")}};mt.Statement=Ij;mt.EmptyStatement=R0;mt.ExpressionStatement=mt.ParenthesizedExpression=mt.ChainExpression=function(t,e,n){return n(t.expression,e,"Expression")};mt.IfStatement=function(t,e,n){n(t.test,e,"Expression"),n(t.consequent,e,"Statement"),t.alternate&&n(t.alternate,e,"Statement")};mt.LabeledStatement=function(t,e,n){return n(t.body,e,"Statement")};mt.BreakStatement=mt.ContinueStatement=R0;mt.WithStatement=function(t,e,n){n(t.object,e,"Expression"),n(t.body,e,"Statement")};mt.SwitchStatement=function(t,e,n){n(t.discriminant,e,"Expression");for(var r=0,i=t.cases;r<i.length;r+=1){var s=i[r];n(s,e)}};mt.SwitchCase=function(t,e,n){t.test&&n(t.test,e,"Expression");for(var r=0,i=t.consequent;r<i.length;r+=1){var s=i[r];n(s,e,"Statement")}};mt.ReturnStatement=mt.YieldExpression=mt.AwaitExpression=function(t,e,n){t.argument&&n(t.argument,e,"Expression")};mt.ThrowStatement=mt.SpreadElement=function(t,e,n){return n(t.argument,e,"Expression")};mt.TryStatement=function(t,e,n){n(t.block,e,"Statement"),t.handler&&n(t.handler,e),t.finalizer&&n(t.finalizer,e,"Statement")};mt.CatchClause=function(t,e,n){t.param&&n(t.param,e,"Pattern"),n(t.body,e,"Statement")};mt.WhileStatement=mt.DoWhileStatement=function(t,e,n){n(t.test,e,"Expression"),n(t.body,e,"Statement")};mt.ForStatement=function(t,e,n){t.init&&n(t.init,e,"ForInit"),t.test&&n(t.test,e,"Expression"),t.update&&n(t.update,e,"Expression"),n(t.body,e,"Statement")};mt.ForInStatement=mt.ForOfStatement=function(t,e,n){n(t.left,e,"ForInit"),n(t.right,e,"Expression"),n(t.body,e,"Statement")};mt.ForInit=function(t,e,n){t.type==="VariableDeclaration"?n(t,e):n(t,e,"Expression")};mt.DebuggerStatement=R0;mt.FunctionDeclaration=function(t,e,n){return n(t,e,"Function")};mt.VariableDeclaration=function(t,e,n){for(var r=0,i=t.declarations;r<i.length;r+=1){var s=i[r];n(s,e)}};mt.VariableDeclarator=function(t,e,n){n(t.id,e,"Pattern"),t.init&&n(t.init,e,"Expression")};mt.Function=function(t,e,n){t.id&&n(t.id,e,"Pattern");for(var r=0,i=t.params;r<i.length;r+=1){var s=i[r];n(s,e,"Pattern")}n(t.body,e,t.expression?"Expression":"Statement")};mt.Pattern=function(t,e,n){t.type==="Identifier"?n(t,e,"VariablePattern"):t.type==="MemberExpression"?n(t,e,"MemberPattern"):n(t,e)};mt.VariablePattern=R0;mt.MemberPattern=Ij;mt.RestElement=function(t,e,n){return n(t.argument,e,"Pattern")};mt.ArrayPattern=function(t,e,n){for(var r=0,i=t.elements;r<i.length;r+=1){var s=i[r];s&&n(s,e,"Pattern")}};mt.ObjectPattern=function(t,e,n){for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];s.type==="Property"?(s.computed&&n(s.key,e,"Expression"),n(s.value,e,"Pattern")):s.type==="RestElement"&&n(s.argument,e,"Pattern")}};mt.Expression=Ij;mt.ThisExpression=mt.Super=mt.MetaProperty=R0;mt.ArrayExpression=function(t,e,n){for(var r=0,i=t.elements;r<i.length;r+=1){var s=i[r];s&&n(s,e,"Expression")}};mt.ObjectExpression=function(t,e,n){for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];n(s,e)}};mt.FunctionExpression=mt.ArrowFunctionExpression=mt.FunctionDeclaration;mt.SequenceExpression=function(t,e,n){for(var r=0,i=t.expressions;r<i.length;r+=1){var s=i[r];n(s,e,"Expression")}};mt.TemplateLiteral=function(t,e,n){for(var r=0,i=t.quasis;r<i.length;r+=1){var s=i[r];n(s,e)}for(var a=0,o=t.expressions;a<o.length;a+=1){var l=o[a];n(l,e,"Expression")}};mt.TemplateElement=R0;mt.UnaryExpression=mt.UpdateExpression=function(t,e,n){n(t.argument,e,"Expression")};mt.BinaryExpression=mt.LogicalExpression=function(t,e,n){n(t.left,e,"Expression"),n(t.right,e,"Expression")};mt.AssignmentExpression=mt.AssignmentPattern=function(t,e,n){n(t.left,e,"Pattern"),n(t.right,e,"Expression")};mt.ConditionalExpression=function(t,e,n){n(t.test,e,"Expression"),n(t.consequent,e,"Expression"),n(t.alternate,e,"Expression")};mt.NewExpression=mt.CallExpression=function(t,e,n){if(n(t.callee,e,"Expression"),t.arguments)for(var r=0,i=t.arguments;r<i.length;r+=1){var s=i[r];n(s,e,"Expression")}};mt.MemberExpression=function(t,e,n){n(t.object,e,"Expression"),t.computed&&n(t.property,e,"Expression")};mt.ExportNamedDeclaration=mt.ExportDefaultDeclaration=function(t,e,n){if(t.declaration&&n(t.declaration,e,t.type==="ExportNamedDeclaration"||t.declaration.id?"Statement":"Expression"),t.source&&n(t.source,e,"Expression"),t.attributes)for(var r=0,i=t.attributes;r<i.length;r+=1){var s=i[r];n(s,e)}};mt.ExportAllDeclaration=function(t,e,n){if(t.exported&&n(t.exported,e),n(t.source,e,"Expression"),t.attributes)for(var r=0,i=t.attributes;r<i.length;r+=1){var s=i[r];n(s,e)}};mt.ImportAttribute=function(t,e,n){n(t.value,e,"Expression")};mt.ImportDeclaration=function(t,e,n){for(var r=0,i=t.specifiers;r<i.length;r+=1){var s=i[r];n(s,e)}if(n(t.source,e,"Expression"),t.attributes)for(var a=0,o=t.attributes;a<o.length;a+=1){var l=o[a];n(l,e)}};mt.ImportExpression=function(t,e,n){n(t.source,e,"Expression"),t.options&&n(t.options,e,"Expression")};mt.ImportSpecifier=mt.ImportDefaultSpecifier=mt.ImportNamespaceSpecifier=mt.Identifier=mt.PrivateIdentifier=mt.Literal=R0;mt.TaggedTemplateExpression=function(t,e,n){n(t.tag,e,"Expression"),n(t.quasi,e,"Expression")};mt.ClassDeclaration=mt.ClassExpression=function(t,e,n){return n(t,e,"Class")};mt.Class=function(t,e,n){t.id&&n(t.id,e,"Pattern"),t.superClass&&n(t.superClass,e,"Expression"),n(t.body,e)};mt.ClassBody=function(t,e,n){for(var r=0,i=t.body;r<i.length;r+=1){var s=i[r];n(s,e)}};mt.MethodDefinition=mt.PropertyDefinition=mt.Property=function(t,e,n){t.computed&&n(t.key,e,"Expression"),t.value&&n(t.value,e,"Expression")};const Rj=new Set(["type","start","end","loc","range","__hfProvenance","__hfOrder"]),FPe=new Set(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration"]),$Pe=new Set(["set","to","from","fromTo"]),BPe=8,VPe=512;function jj(t){return!!t&&FPe.has(t.type)}function vE(t){return!!t&&typeof t=="object"&&typeof t.type=="string"}function ule(t,e){for(const n of Object.keys(t)){if(Rj.has(n)||fle(t,n))continue;const r=t[n];if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=e(r[i]);else t[n]=e(r)}}function Lj(t){return structuredClone(t)}function UI(t,e){(t==null?void 0:t.type)==="Identifier"?e.add(t.name):(t==null?void 0:t.type)==="AssignmentPattern"?UI(t.left,e):(t==null?void 0:t.type)==="RestElement"&&UI(t.argument,e)}function HPe(t){var e;return jj(t)?t.params??[]:t.type==="VariableDeclarator"?[t.id]:t.type==="CatchClause"?[t.param]:t.type==="AssignmentExpression"&&((e=t.left)==null?void 0:e.type)==="Identifier"?[t.left]:[]}function QPe(t){const e=new Set,n=r=>{if(!vE(r))return r;for(const i of HPe(r))UI(i,e);return ule(r,n),r};return n(t),e}function fle(t,e){return t.computed?!1:t.type==="MemberExpression"&&e==="property"||t.type==="Property"&&e==="key"}function hle(t,e){const n=QPe(t);let r=e;if(n.size>0){r=new Map(e);for(const i of n)r.delete(i)}return r.size===0?t:dle(t,r)}function dle(t,e){return vE(t)?t.type==="Identifier"&&e.has(t.name)?Lj(e.get(t.name)):(ule(t,n=>dle(n,e)),t):t}function ple(t,e){return t&&typeof t=="object"&&(t.__hfProvenance=e),t}function d4(t){return t==null?void 0:t.__hfProvenance}function mle(t){return{type:"Literal",value:t,raw:String(t)}}function fg(t,e){if(vE(t)){e(t);for(const n of Object.keys(t)){if(Rj.has(n))continue;const r=t[n];if(Array.isArray(r))for(const i of r)fg(i,e);else fg(r,e)}}}function ZPe(t){var n,r;let e=(n=t.callee)==null?void 0:n.object;for(;(e==null?void 0:e.type)==="CallExpression";)e=(r=e.callee)==null?void 0:r.object;return(e==null?void 0:e.type)==="Identifier"?e.name:null}function gle(t,e){var n,r;return ZPe(t)!==e?!1:((r=(n=t.callee)==null?void 0:n.property)==null?void 0:r.type)==="Identifier"&&$Pe.has(t.callee.property.name)}function zPe(t,e){let n=!1;return fg(t,r=>{r.type==="CallExpression"&&gle(r,e)&&(n=!0)}),n}function AE(t){return typeof t.start=="number"&&typeof t.end=="number"?[t.start,t.end]:void 0}const GPe=new Set(["ArrayExpression","BinaryExpression","ChainExpression","ConditionalExpression","Identifier","Literal","LogicalExpression","MemberExpression","ObjectExpression","Property","SpreadElement","TemplateElement","TemplateLiteral","UnaryExpression"]);function UPe(t,e){let n=!0;const r=(i,s,a)=>{if(!(!vE(i)||!n)){if(!GPe.has(i.type)){n=!1;return}if(i.type==="UnaryExpression"&&i.operator==="delete"){n=!1;return}if(i.type==="Identifier"){!(s&&a?fle(s,a):!1)&&i.name!=="undefined"&&!e.has(i.name)&&(n=!1);return}for(const o of Object.keys(i)){if(Rj.has(o))continue;const l=i[o];if(Array.isArray(l))for(const c of l)r(c,i,o);else r(l,i,o)}}};return r(t),n}const _8=new WeakMap;function XPe(t,e){var n;return t.type==="Identifier"?{name:t.name}:t.type!=="AssignmentPattern"||((n=t.left)==null?void 0:n.type)!=="Identifier"||!UPe(t.right,e)?null:{name:t.left.name,defaultExpression:t.right}}function Fj(t){if(_8.has(t))return _8.get(t)??null;const e=[],n=new Set;for(const r of t.params??[]){const i=XPe(r,n);if(!i)return _8.set(t,null),null;e.push(i),n.add(i.name)}return _8.set(t,e),e}function yle(t){var e;return jj(t)&&((e=t.body)==null?void 0:e.type)==="BlockStatement"&&Fj(t)!==null}function WPe(t,e){let n=!1;return fg(t,r=>{var i;r.type==="CallExpression"&&((i=r.callee)==null?void 0:i.type)==="Identifier"&&e.has(r.callee.name)&&(n=!0)}),n}function YPe(t){var n,r;if(((n=t.declarations)==null?void 0:n.length)!==1)return null;const e=t.declarations[0];return((r=e.id)==null?void 0:r.type)==="Identifier"&&yle(e.init)?[e.id.name,e.init]:null}function qPe(t){return t.type==="FunctionDeclaration"?t.id&&yle(t)?[t.id.name,t]:null:t.type==="VariableDeclaration"?YPe(t):null}function KPe(t){const e=new Map;for(const n of t.body??[]){const r=qPe(n);r&&e.set(r[0],r[1])}return e}function JPe(t,e){const n=new Set;for(const[r,i]of t)zPe(i.body,e)&&n.add(r);for(let r=!0;r;){r=!1;for(const[i,s]of t)!n.has(i)&&WPe(s.body,n)&&(n.add(i),r=!0)}return n}function OU(t,e){t.set(e,(t.get(e)??0)+1)}function eMe(){return{type:"Identifier",name:"undefined"}}function tMe(t){var e;return(t==null?void 0:t.type)==="Identifier"&&t.name==="undefined"||(t==null?void 0:t.type)==="UnaryExpression"&&t.operator==="void"&&((e=t.argument)==null?void 0:e.type)==="Literal"&&t.argument.value===0}function xle(t,e){var r,i;if((r=t.arguments)!=null&&r.some(s=>(s==null?void 0:s.type)==="SpreadElement"))return null;const n=new Map;for(let s=0;s<e.length;s++){const a=e[s],o=(i=t.arguments)==null?void 0:i[s];o&&!tMe(o)?n.set(a.name,o):a.defaultExpression?n.set(a.name,hle(Lj(a.defaultExpression),n)):n.set(a.name,eMe())}return n}function nMe(t,e){var r;if(t.type!=="ExpressionStatement")return;const n=t.expression;if(!((n==null?void 0:n.type)!=="CallExpression"||((r=n.callee)==null?void 0:r.type)!=="Identifier"))return e.has(n.callee.name)?n:void 0}function rMe(t,e){const n=new Set(e.keys()),r=new Map,i=new Map,s=new Set;fg(t,o=>{o.type==="Identifier"&&n.has(o.name)&&OU(r,o.name);const l=nMe(o,n);if(!l)return;OU(i,l.callee.name);const c=e.get(l.callee.name),u=c&&Fj(c);(!u||!xle(l,u))&&s.add(l.callee.name)});const a=new Map;for(const[o,l]of e)!s.has(o)&&(r.get(o)??0)===1+(i.get(o)??0)&&a.set(o,l);return a}function iMe(t,e){const n=KPe(t);if(n.size===0)return n;const r=JPe(n,e);for(const i of[...n.keys()])r.has(i)||n.delete(i);return n.size===0?n:rMe(t,n)}function sMe(t,e){var n,r;if(t.type==="FunctionDeclaration")return!!t.id&&e.get(t.id.name)===t;if(t.type==="VariableDeclaration"&&((n=t.declarations)==null?void 0:n.length)===1){const i=t.declarations[0];return((r=i.id)==null?void 0:r.type)==="Identifier"&&e.get(i.id.name)===i.init}return!1}function $j(t){return(t==null?void 0:t.type)==="BlockStatement"?t.body??[]:t?[{type:"ExpressionStatement",expression:t}]:[]}function aMe(t,e,n){for(const r of t)fg(r,i=>{i.type==="CallExpression"&&gle(i,n.timelineVar)&&(ple(i,{...e}),i.__hfOrder=n.order.n++)})}function Bj(t,e,n,r){const i=hle(Lj({type:"BlockStatement",body:t}),e);return ple(i,n),aMe(i.body,n,r),i.body=vle(i.body,{...r,depth:r.depth+1}),[i]}function oMe(t,e){const n=e.helpers.get(t.callee.name);if(!n)return null;const r=Fj(n);if(!r)return null;const i=xle(t,r);if(!i)return null;const s={kind:"helper",fn:t.callee.name,callSite:++e.site.n,sourceRange:AE(t)};return Bj(n.body.body,i,s,e)}function lMe(t,e){var n;if(t.operator==="+=")return F2(e(t.right));if(t.operator==="-="){const r=F2(e(t.right));return r===void 0?void 0:-r}if(t.operator==="="&&((n=t.right)==null?void 0:n.type)==="BinaryExpression")return F2(e(t.right.right))}function cMe(t){var e,n;return(t==null?void 0:t.type)==="UpdateExpression"?((e=t.argument)==null?void 0:e.name)??null:(t==null?void 0:t.type)==="AssignmentExpression"?((n=t.left)==null?void 0:n.name)??null:null}function uMe(t,e,n){if(cMe(t)===e)return t.type==="UpdateExpression"?t.operator==="++"?1:-1:lMe(t,n)}function F2(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function fMe(t,e,n){return t==="<"?e<n:t==="<="?e<=n:t===">"?e>n:t===">="?e>=n:!1}function hMe(t){var n,r;if((t==null?void 0:t.type)!=="VariableDeclaration"||((n=t.declarations)==null?void 0:n.length)!==1)return null;const e=t.declarations[0];return((r=e.id)==null?void 0:r.type)==="Identifier"?{name:e.id.name,initExpr:e.init}:null}function dMe(t,e){var o;const n=hMe(t.init),r=t.test;if(!n||(r==null?void 0:r.type)!=="BinaryExpression"||((o=r.left)==null?void 0:o.name)!==n.name)return null;const i=F2(e(n.initExpr)),s=F2(e(r.right)),a=uMe(t.update,n.name,e);return i===void 0||s===void 0||!a?null:{v:n.name,start:i,end:s,op:r.operator,step:a}}function pMe(t,e){const n=dMe(t,e.resolve);if(!n)return null;const r=$j(t.body),i=[],s=++e.site.n;let a=0;for(let o=n.start;fMe(n.op,o,n.end);o+=n.step){if(a>=VPe)return null;const l={kind:"loop",callSite:s,iteration:a,sourceRange:AE(t)};i.push(...Bj(r,new Map([[n.v,mle(o)]]),l,e)),a++}return i}function mMe(t){var e,n;if((t==null?void 0:t.type)==="VariableDeclaration"){const r=(n=(e=t.declarations)==null?void 0:e[0])==null?void 0:n.id;return(r==null?void 0:r.type)==="Identifier"?r.name:null}return(t==null?void 0:t.type)==="Identifier"?t.name:null}function ble(t,e,n,r,i,s){const a=[],o=++s.site.n;return t.forEach((l,c)=>{if(!l)return;const u=new Map;n&&u.set(n,l),r&&u.set(r,mle(c));const f={kind:"loop",callSite:o,iteration:c,sourceRange:i};a.push(...Bj(e,u,f,s))}),a}function gMe(t,e){var r;if(((r=t.right)==null?void 0:r.type)!=="ArrayExpression")return null;const n=mMe(t.left);return n?ble(t.right.elements??[],$j(t.body),n,null,AE(t),e):null}function yMe(t){var n,r;const e=[];for(const i of[(n=t.params)==null?void 0:n[0],(r=t.params)==null?void 0:r[1]])if(!i)e.push(null);else{if(i.type!=="Identifier")return null;e.push(i.name)}return{el:e[0],idx:e[1]}}function xMe(t){var e,n;return(t==null?void 0:t.type)==="MemberExpression"&&((e=t.property)==null?void 0:e.name)==="forEach"&&((n=t.object)==null?void 0:n.type)==="ArrayExpression"}function bMe(t){var n;if(!xMe(t.callee))return null;const e=(n=t.arguments)==null?void 0:n[0];return jj(e)?{elements:t.callee.object.elements??[],cb:e}:null}function vMe(t,e){const n=bMe(t);if(!n)return null;const r=yMe(n.cb);return r?ble(n.elements,$j(n.cb.body),r.el,r.idx,AE(t),e):null}function AMe(t,e){var n;return((n=t.callee)==null?void 0:n.type)==="Identifier"&&e.helpers.has(t.callee.name)?oMe(t,e):vMe(t,e)}function SMe(t,e){var n;return e.depth>=BPe?null:t.type==="ForStatement"?pMe(t,e):t.type==="ForOfStatement"?gMe(t,e):t.type==="ExpressionStatement"&&((n=t.expression)==null?void 0:n.type)==="CallExpression"?AMe(t.expression,e):null}function vle(t,e){const n=[];for(const r of t){const i=SMe(r,e);i?n.push(...i):n.push(r)}return n}function wMe(t,e,n){const r=iMe(t,e),i={helpers:r,timelineVar:e,resolve:n,depth:0,site:{n:0},order:{n:0}},s=(t.body??[]).filter(a=>!sMe(a,r));t.body=vle(s,i)}const OMe=new Set(["set","to","from","fromTo"]),kMe=new Set(["querySelector","querySelectorAll"]),CMe=new Set(["forEach","map"]),Ale=new Set(["Program","BlockStatement","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function EMe(t){try{return Bv(t,{ecmaVersion:"latest",sourceType:"script",locations:!0})}catch{return Bv(t,{ecmaVersion:"latest",sourceType:"module",locations:!0})}}const Sle=Symbol("hf.constNodes");function TMe(t){return t[Sle]}const PMe=new Set(["min","max","round","floor","ceil","abs","sqrt","sign","trunc"]),MMe={PI:Math.PI,E:Math.E,SQRT2:Math.SQRT2};function NMe(t,e){var i,s,a,o,l;if(((i=t.object)==null?void 0:i.type)==="Identifier"&&t.object.name==="Math"){const c=(s=t.property)==null?void 0:s.name;return typeof c=="string"?MMe[c]:void 0}const n=Vj(t.object,e);if(!n)return;let r;if(t.computed){const c=rs(t.property,e);n.type==="ArrayExpression"&&typeof c=="number"?r=(a=n.elements)==null?void 0:a[c]:n.type==="ObjectExpression"&&(typeof c=="string"||typeof c=="number")&&(r=bd(n,String(c)))}else n.type==="ObjectExpression"&&(r=bd(n,((o=t.property)==null?void 0:o.name)??((l=t.property)==null?void 0:l.value)));return r?rs(r,e):void 0}function DMe(t,e,n){var i,s,a;if(!e.computed)return t.type==="ObjectExpression"?bd(t,((i=e.property)==null?void 0:i.name)??((s=e.property)==null?void 0:s.value)):void 0;const r=rs(e.property,n);if(t.type==="ArrayExpression"&&typeof r=="number")return(a=t.elements)==null?void 0:a[r];if(t.type==="ObjectExpression")return bd(t,String(r))}function Vj(t,e){var r;if(!t)return;if(t.type==="ArrayExpression"||t.type==="ObjectExpression")return t;if(t.type==="Identifier")return(r=TMe(e))==null?void 0:r.get(t.name);if(t.type!=="MemberExpression")return;const n=Vj(t.object,e);return n?DMe(n,t,e):void 0}function rs(t,e){var n,r,i,s,a,o,l;if(t){if(t.type==="NumericLiteral"||t.type==="Literal"&&typeof t.value=="number"||t.type==="StringLiteral"||t.type==="Literal"&&typeof t.value=="string"||t.type==="BooleanLiteral"||t.type==="Literal"&&typeof t.value=="boolean")return t.value;if(t.type==="UnaryExpression"&&t.operator==="-"&&t.argument){const c=rs(t.argument,e);return typeof c=="number"?-c:void 0}if(t.type==="BinaryExpression"){const c=rs(t.left,e),u=rs(t.right,e);if(typeof c=="number"&&typeof u=="number")switch(t.operator){case"+":return c+u;case"-":return c-u;case"*":return c*u;case"/":return u!==0?c/u:void 0}if(typeof c=="string"&&t.operator==="+")return c+String(u??"");if(typeof u=="string"&&t.operator==="+")return String(c??"")+u}if(t.type==="Identifier"&&e.has(t.name))return e.get(t.name);if(t.type==="TemplateLiteral"&&((n=t.expressions)==null?void 0:n.length)===0)return((s=(i=(r=t.quasis)==null?void 0:r[0])==null?void 0:i.value)==null?void 0:s.cooked)??void 0;if(t.type==="MemberExpression")return NMe(t,e);if(t.type==="CallExpression"&&((a=t.callee)==null?void 0:a.type)==="MemberExpression"&&((o=t.callee.object)==null?void 0:o.type)==="Identifier"&&t.callee.object.name==="Math"&&PMe.has((l=t.callee.property)==null?void 0:l.name)){const c=(t.arguments??[]).map(u=>rs(u,e));if(c.every(u=>typeof u=="number"))return Math[t.callee.property.name](...c)}}}function IMe(t,e){return rs(t,e)}function O6(t,e){var s,a;if((t==null?void 0:t.type)!=="CallExpression")return null;const n=t.callee;if((n==null?void 0:n.type)!=="MemberExpression"||((s=n.property)==null?void 0:s.type)!=="Identifier")return null;const r=n.property.name,i=rs((a=t.arguments)==null?void 0:a[0],e);return typeof i!="string"||i.length===0?null:kMe.has(r)||r==="toArray"?i:r==="getElementById"?`#${i}`:null}function p4(t,e=!0){for(let n=t.length-2;n>=0;n--){const r=t[n];if(r&&Ale.has(r.type)&&(e||r.type!=="BlockStatement"))return r}return null}function wle(t){const e=[];for(let n=t.length-1;n>=0;n--){const r=t[n];r&&Ale.has(r.type)&&e.push(r)}return e}function Hj(t){for(let e=t.length-2;e>=0;e--){const n=t[e];if((n==null?void 0:n.type)==="BlockStatement"&&d4(n))return n}}function Qj(t,e,n,r=Number.POSITIVE_INFINITY){const i=n.declarationsByName.get(t)??[],s=Hj(e);for(const a of wle(e)){const o=i.filter(l=>l.scopeNode===a&&(!l.expandedScopeNode||l.expandedScopeNode===s)&&(l.kind==="var"||l.kind==="param"||l.node.start<r)).sort((l,c)=>c.node.start-l.node.start);if(o[0])return o[0]}}function Ole(t){const e=new Map,n=new Set;xf(t,{VariableDeclarator(s,a,o){var g;const l=(g=s.id)==null?void 0:g.name;if(!l)return;const c=o.at(-2),u=c==null?void 0:c.kind;if(!u)return;const f=(c==null?void 0:c.type)!=="VariableDeclaration"||u!=="var",h=p4(o,f),d=Hj(o),y=e.get(l)??[];y.push({node:s,scopeNode:h,expandedScopeNode:d,name:l,kind:u}),e.set(l,y)},FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i});const r={declarationsByName:e,reassignedDeclarations:n};return xf(t,{AssignmentExpression(s,a,o){var u;const l=((u=s.left)==null?void 0:u.type)==="Identifier"?s.left.name:void 0;if(!l)return;const c=Qj(l,o,r,s.start);c&&n.add(c.node)}}),r;function i(s){for(const a of s.params??[]){if((a==null?void 0:a.type)!=="Identifier")continue;const o=e.get(a.name)??[];o.push({node:a,scopeNode:s,name:a.name,kind:"param"}),e.set(a.name,o)}}}function R8(t,e,n,r){let i=t.get(e);i||(i=new Map,t.set(e,i)),i.has(n)||i.set(n,r)}function k6(t,e,n){var r,i;for(const s of wle(e)){const a=(r=n.get(s))==null?void 0:r.get(t);if(a!==void 0)return a}return((i=n.get(null))==null?void 0:i.get(t))??null}function _Me(t){return(t==null?void 0:t.type)==="ArrowFunctionExpression"||(t==null?void 0:t.type)==="FunctionExpression"||(t==null?void 0:t.type)==="FunctionDeclaration"}function RMe(t,e,n,r){return(t==null?void 0:t.type)==="Identifier"?k6(t.name,e,r):(t==null?void 0:t.type)==="CallExpression"?O6(t,n):null}function Zj(t){const e=new Map,n=new Set,r=new Map;return Object.defineProperty(e,Sle,{value:r,enumerable:!1}),_0(t,{VariableDeclarator(i){var c;const s=(c=i.id)==null?void 0:c.name,a=i.init;if(!s||!a)return;if(a.type==="ArrayExpression"||a.type==="ObjectExpression"){r.set(s,a);return}const o=rs(a,e);if(o===void 0||n.has(s))return;const l=e.get(s);l!==void 0&&l!==o?(e.delete(s),n.add(s)):l===void 0&&e.set(s,o)}}),e}function kle(t,e,n){const r=new Map;xf(t,{VariableDeclarator(s,a,o){var u;const l=(u=s.id)==null?void 0:u.name,c=O6(s.init,e);if(l&&c!==null){const f=o.at(-2),h=(f==null?void 0:f.type)!=="VariableDeclaration"||f.kind!=="var";R8(r,p4(o,h),l,c)}},AssignmentExpression(s,a,o){const l=s.left,c=O6(s.right,e);if((l==null?void 0:l.type)==="Identifier"&&c!==null){const u=Qj(l.name,o,n,s.start);R8(r,(u==null?void 0:u.scopeNode)??Hj(o)??p4(o),l.name,c)}}}),xf(t,{CallExpression(s,a,o){var c,u,f;const l=s.callee;if((l==null?void 0:l.type)==="MemberExpression"&&((c=l.property)==null?void 0:c.type)==="Identifier"&&CMe.has(l.property.name)){const h=RMe(l.object,o,e,r),d=(u=s.arguments)==null?void 0:u[0],y=(f=d==null?void 0:d.params)==null?void 0:f[0];h&&(y==null?void 0:y.type)==="Identifier"&&_Me(d)&&R8(r,d,y.name,h)}}});const i=new Set(["slice","filter","concat","reverse"]);return xf(t,{VariableDeclarator(s,a,o){var h,d,y,g,v;const l=(h=s.id)==null?void 0:h.name,c=s.init;if(!l||!c)return;let u;if(c.type==="MemberExpression"&&((d=c.object)==null?void 0:d.type)==="Identifier"?u=c.object.name:c.type==="CallExpression"&&((y=c.callee)==null?void 0:y.type)==="MemberExpression"&&((g=c.callee.object)==null?void 0:g.type)==="Identifier"&&((v=c.callee.property)==null?void 0:v.type)==="Identifier"&&i.has(c.callee.property.name)&&(u=c.callee.object.name),!u)return;const f=k6(u,o,r);f&&R8(r,p4(o),l,f)}}),r}function zj(t,e,n,r){var i;if(!t)return null;if(t.type==="StringLiteral"||t.type==="Literal")return typeof t.value=="string"?t.value:null;if(t.type==="Identifier")return k6(t.name,e,r);if(t.type==="CallExpression")return O6(t,n);if(t.type==="ArrayExpression"){const s=t.elements.map(a=>zj(a,e,n,r)).filter(a=>typeof a=="string"&&a.length>0);return s.length>0?s.join(", "):null}return t.type==="MemberExpression"&&((i=t.object)==null?void 0:i.type)==="Identifier"?k6(t.object.name,e,r):null}function jMe(t,e,n){const r=(t==null?void 0:t.type)==="ObjectExpression"?t:(t==null?void 0:t.type)==="Identifier"?Vj(t,n):void 0;if((r==null?void 0:r.type)!=="ObjectExpression")return null;const i=bd(e,"onUpdate"),s=i?FMe(i):void 0;return s?`proxy → ${s}`:"dwell/hold"}function LMe(t){var e,n,r;return(t==null?void 0:t.type)==="MemberExpression"&&((e=t.object)==null?void 0:e.type)==="MemberExpression"&&((n=t.object.property)==null?void 0:n.name)==="style"&&!!((r=t.property)!=null&&r.name)}function FMe(t){let e;return _0(t,{CallExpression(n){var r,i,s,a;((r=n.callee)==null?void 0:r.type)==="MemberExpression"&&((i=n.callee.property)==null?void 0:i.name)==="setAttribute"&&typeof((a=(s=n.arguments)==null?void 0:s[0])==null?void 0:a.value)=="string"&&(e??(e=n.arguments[0].value))},AssignmentExpression(n){const r=n.left;LMe(r)&&(e??(e=`style.${r.property.name}`))}}),e}function Vv(t){return(t==null?void 0:t.type)==="ObjectProperty"||(t==null?void 0:t.type)==="Property"}function C6(t){var e,n;return((e=t==null?void 0:t.key)==null?void 0:e.name)??((n=t==null?void 0:t.key)==null?void 0:n.value)}function bd(t,e){if((t==null?void 0:t.type)==="ObjectExpression"){for(const n of t.properties??[])if(Vv(n)&&C6(n)===e)return n.value}}function $Me(t,e,n){const r=bd(t,e);return r?n.slice(r.start,r.end):void 0}function f0(t,e,n){var i,s;const r={};if((t==null?void 0:t.type)!=="ObjectExpression")return r;for(const a of t.properties??[]){if(!Vv(a))continue;const o=((i=a.key)==null?void 0:i.name)??((s=a.key)==null?void 0:s.value);if(!o)continue;const l=rs(a.value,e);l!==void 0?r[o]=l:r[o]=`__raw:${n.slice(a.value.start,a.value.end)}`}return r}function kU(t){var e,n,r;return(t==null?void 0:t.type)==="CallExpression"&&((e=t.callee)==null?void 0:e.type)==="MemberExpression"&&((n=t.callee.object)==null?void 0:n.name)==="gsap"&&((r=t.callee.property)==null?void 0:r.name)==="timeline"}function m4(t){var e;if(!t||t.type!=="MemberExpression")return null;if(t.computed){const n=t.property;return(n==null?void 0:n.type)==="Literal"&&typeof n.value=="string"?n.value:null}return((e=t.property)==null?void 0:e.type)==="Identifier"?t.property.name:null}function BMe(t){return(t==null?void 0:t.type)==="MemberExpression"&&m4(t)!==null}function SE(t,e){if((t==null?void 0:t.type)!=="MemberExpression"||(e==null?void 0:e.type)!=="MemberExpression"||m4(t)!==m4(e)||m4(t)===null)return!1;const n=t.object,r=e.object;return(n==null?void 0:n.type)==="Identifier"&&(r==null?void 0:r.type)==="Identifier"?n.name===r.name:(n==null?void 0:n.type)==="MemberExpression"&&(r==null?void 0:r.type)==="MemberExpression"?SE(n,r):!1}function Cle(t,e){return t.kind==="identifier"?t.name:e.slice(t.node.start,t.node.end)}function VMe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GP(t,e){var s,a;const n=(s=t.arguments)==null?void 0:s[0];if(!n||n.type!=="ObjectExpression")return;const r=(a=n.properties)==null?void 0:a.find(o=>Vv(o)&&C6(o)==="defaults");if(!(r!=null&&r.value)||r.value.type!=="ObjectExpression")return;const i={};for(const o of r.value.properties??[]){if(!Vv(o))continue;const l=C6(o),c=rs(o.value,e);l==="ease"&&typeof c=="string"&&(i.ease=c),l==="duration"&&typeof c=="number"&&(i.duration=c)}return Object.keys(i).length>0?i:void 0}function Gj(t,e){let n=null,r=null,i=0,s;const a=e??new Map;return _0(t,{VariableDeclarator(o){var l;kU(o.init)&&(i+=1,!r&&((l=o.id)==null?void 0:l.type)==="Identifier"&&(n=o.id.name,r={kind:"identifier",name:o.id.name},s=GP(o.init,a)))},AssignmentExpression(o){if(kU(o.right)&&(i+=1,!r)){const l=o.left;(l==null?void 0:l.type)==="Identifier"?(n=l.name,r={kind:"identifier",name:l.name},s=GP(o.right,a)):BMe(l)&&(r={kind:"member",node:l},s=GP(o.right,a))}}}),{timelineVar:n,ref:r,timelineCount:i,defaults:s}}const HMe=new Set(["duration","ease","delay"]),QMe=new Set(["onComplete","onStart","onUpdate","onRepeat"]),ZMe=new Set(["stagger","yoyo","repeat","repeatDelay","snap","overwrite","immediateRender"]);function zMe(t,e){var r,i;let n=(r=t.callee)==null?void 0:r.object;for(;(n==null?void 0:n.type)==="CallExpression";)n=(i=n.callee)==null?void 0:i.object;return e.kind==="identifier"?(n==null?void 0:n.type)==="Identifier"&&n.name===e.name:SE(n,e.node)}function Ele(t,e,n,r){const i=[];function s(a,o){var c,u,f,h;if(!a||typeof a!="object")return;const l=[...o,a];if(a.type==="CallExpression"){const d=a.callee,y=(c=a.arguments)==null?void 0:c[0],g=(d==null?void 0:d.type)==="MemberExpression"&&((u=d.object)==null?void 0:u.type)==="Identifier"&&d.object.name==="gsap"&&((f=d.property)==null?void 0:f.type)==="Identifier"&&d.property.name==="set"&&((y==null?void 0:y.type)==="StringLiteral"||(y==null?void 0:y.type)==="Literal"&&typeof y.value=="string");if((d==null?void 0:d.type)==="MemberExpression"&&((h=d.property)==null?void 0:h.type)==="Identifier"&&(zMe(a,e)||g)&&OMe.has(d.property.name)){const v=d.property.name,b=a.arguments,w=b.length>=1?zj(b[0],l,n,r)??"__unresolved__":"__unresolved__";v==="fromTo"&&b.length>=3?i.push({node:a,ancestors:l,method:"fromTo",selector:w,fromArg:b[1],varsArg:b[2],positionArg:b[3]}):v!=="fromTo"&&b.length>=2&&i.push({node:a,ancestors:l,method:v,selector:w,varsArg:b[1],positionArg:b[2],...g?{global:!0}:{}})}}for(const d of Object.keys(a)){if(d==="type"||d==="start"||d==="end"||d==="loc")continue;const y=a[d];if(Array.isArray(y))for(const g of y)g&&typeof g=="object"&&g.type&&s(g,l);else y&&typeof y=="object"&&y.type&&s(y,l)}}return s(t,[]),i}const Tle=/^(\d+(?:\.\d+)?)%$/;function E6(t,e){const n=rs(t,e);return typeof n=="string"?n:void 0}function GMe(t,e,n){var a,o;const r=[];let i,s;for(const l of t.properties??[]){if(l.type!=="ObjectProperty"&&l.type!=="Property")continue;const c=((a=l.key)==null?void 0:a.value)??((o=l.key)==null?void 0:o.name);if(typeof c!="string")continue;const u=Tle.exec(c);if(u){const f=Number.parseFloat(u[1]??"0"),h=f0(l.value,e,n),d={};let y;for(const[g,v]of Object.entries(h))if(g==="ease"&&typeof v=="string")y=v;else{if(g==="duration")continue;(typeof v=="number"||typeof v=="string")&&(d[g]=v)}r.push({percentage:f,properties:d,...y?{ease:y}:{}})}else c==="ease"?i=E6(l.value,e)??i:c==="easeEach"&&(s=E6(l.value,e)??s)}return r.sort((l,c)=>l.percentage-c.percentage),{format:"percentage",keyframes:r,...i?{ease:i}:{},...s?{easeEach:s}:{}}}function UMe(t,e,n){var s,a;const r=(s=(t.properties??[]).find(o=>{var l,c;return(((l=o.key)==null?void 0:l.name)??((c=o.key)==null?void 0:c.value))==="keyframes"}))==null?void 0:s.value;if(!r||r.type!=="ArrayExpression")return;const i=[];for(const o of r.elements??[]){if(!o||o.type!=="ObjectExpression")continue;const l=f0(o,e,n);i.push(l.duration)}return(a=dE(i))==null?void 0:a.totalDuration}function XMe(t,e,n){const r=t.elements??[],i=[];for(const o of r){if(!o||o.type!=="ObjectExpression")continue;const l=f0(o,e,n),c={};let u,f;for(const[h,d]of Object.entries(l))h==="duration"?u=d:h==="ease"&&typeof d=="string"?f=d:(typeof d=="number"||typeof d=="string")&&(c[h]=d);i.push({properties:c,duration:u,ease:f})}const s=dE(i.map(o=>o.duration));return s?{format:"object-array",keyframes:i.map((o,l)=>({percentage:s.percentages[l],properties:o.properties,...o.ease?{ease:o.ease}:{}}))}:void 0}function WMe(t,e){var o,l,c;const n=new Map;let r,i;for(const u of t.properties??[]){if(u.type!=="ObjectProperty"&&u.type!=="Property")continue;const f=((o=u.key)==null?void 0:o.name)??((l=u.key)==null?void 0:l.value);if(typeof f=="string")if(((c=u.value)==null?void 0:c.type)==="ArrayExpression"){const h=[];for(const d of u.value.elements??[]){const y=rs(d,e);(typeof y=="number"||typeof y=="string")&&h.push(y)}h.length>0&&n.set(f,h)}else f==="ease"?r=E6(u.value,e)??r:f==="easeEach"&&(i=E6(u.value,e)??i)}const s=Math.max(...[...n.values()].map(u=>u.length),0),a=[];for(let u=0;u<s;u++){const f=s>1?Math.round(u/(s-1)*100):0,h={};for(const[d,y]of n)u<y.length&&(h[d]=y[u]);a.push({percentage:f,properties:h})}return{format:"simple-array",keyframes:a,...r?{ease:r}:{},...i?{easeEach:i}:{}}}function YMe(t,e,n){var a,o,l;if(!t)return;if(t.type==="ArrayExpression")return XMe(t,e,n);if(t.type!=="ObjectExpression")return;const r=t.properties??[];let i=!1,s=!1;for(const c of r){if(c.type!=="ObjectProperty"&&c.type!=="Property")continue;const u=((a=c.key)==null?void 0:a.value)??((o=c.key)==null?void 0:o.name);if(typeof u=="string"&&Tle.test(u)){i=!0;break}((l=c.value)==null?void 0:l.type)==="ArrayExpression"&&(s=!0)}if(i)return GMe(t,e,n);if(s)return WMe(t,e)}function qMe(t,e,n){if(!t)return;let r,i=!1,s=1,a=!1;if(t.type==="ObjectExpression")for(const c of t.properties??[]){if(!Vv(c))continue;const u=C6(c);if(u==="path")r=c.value;else if(u==="autoRotate"){const f=rs(c.value,e);i=typeof f=="number"?f:f===!0}else if(u==="curviness"){const f=rs(c.value,e);typeof f=="number"&&(s=f)}else u==="type"&&rs(c.value,e)==="cubic"&&(a=!0)}else t.type==="ArrayExpression"&&(r=t);if(!r||r.type!=="ArrayExpression")return;const o=r.elements??[],l=[];for(const c of o){if(!c||c.type!=="ObjectExpression")continue;const u=f0(c,e,n),f=typeof u.x=="number"?u.x:void 0,h=typeof u.y=="number"?u.y:void 0;f!==void 0&&h!==void 0&&l.push({x:f,y:h})}return jae(l,s,i,a)}function Ple(t,e,n,r){var E,M;const i=d4(t.node),s=f0(t.varsArg,e,n),a={},o={};let l,c=!1,u;for(const[N,I]of Object.entries(s))if(!HMe.has(N)&&!QMe.has(N)){if(N==="keyframes"){const _=bd(t.varsArg,"keyframes");l=YMe(_,e,n),!l&&_&&(c=!0);continue}if(N==="motionPath"){const _=bd(t.varsArg,"motionPath");u=qMe(_,e,n);continue}if(N!=="easeEach"){if(ZMe.has(N)){const _=$Me(t.varsArg,N,n);_!==void 0?o[N]=`__raw:${_}`:I!==void 0&&(o[N]=I);continue}(typeof I=="number"||typeof I=="string")&&(a[N]=I)}}if(l&&typeof s.easeEach=="string"&&(l.easeEach=s.easeEach),u){const{waypoints:N}=u;if(!l)l={format:"percentage",keyframes:N.map((_,j)=>({percentage:N.length>1?Math.round(j/(N.length-1)*100):0,properties:{x:_.x,y:_.y}}))};else{const I=l.keyframes;if(I.length===N.length)for(let _=0;_<I.length;_++){const j=I[_],L=N[_];j&&L&&(j.properties.x=L.x,j.properties.y=L.y)}}}let f;if(t.method==="fromTo"&&t.fromArg){f={};const N=f0(t.fromArg,e,n);for(const[I,_]of Object.entries(N))(typeof _=="number"||typeof _=="string")&&(f[I]=_)}const h=!!t.positionArg,d=h?IMe(t.positionArg,e):0,y=typeof d=="number"||typeof d=="string"?d:h?`__raw:${n.slice(t.positionArg.start,t.positionArg.end)}`:0;let g=typeof s.duration=="number"?s.duration:void 0;const v=typeof s.ease=="string"?s.ease:void 0;g===void 0&&l&&(g=UMe(t.varsArg,e,n));let b=t.selector,w;if(b==="__unresolved__"){const N=(E=t.node.arguments)==null?void 0:E[0],I=jMe(N,t.varsArg,e);if(I&&(b=I,(N==null?void 0:N.type)==="Identifier")){const _=Qj(N.name,t.ancestors,r,t.node.start);if(((M=_==null?void 0:_.node.init)==null?void 0:M.type)==="ObjectExpression"&&!r.reassignedDeclarations.has(_.node)){const j=d4(_.scopeNode)??d4(_.expandedScopeNode),L=j&&(j.kind==="helper"||j.kind==="loop")?`:${j.kind}:${j.callSite??""}:${j.iteration??""}`:"";w=`proxy:${N.name}@${_.node.start}${L}`}}}const O={targetSelector:b,method:t.method,position:y,properties:a,fromProperties:f,duration:g,ease:v};w&&(O.targetIdentity=w),h||(O.implicitPosition=!0);let C=pG(a);if(!C&&l){const N={};for(const I of l.keyframes)for(const _ of Object.keys(I.properties))N[_]=!0;C=pG(N)}return C&&(O.propertyGroup=C),t.global&&(O.global=!0),Object.keys(o).length>0&&(O.extras=o),l&&(O.keyframes=l),u&&(O.arcPath=u.arcPath),c&&(O.hasUnresolvedKeyframes=!0),b==="__unresolved__"&&(O.hasUnresolvedSelector=!0),i&&(O.provenance=i),O}function KMe(t){if(typeof t=="number")return t;if(typeof t!="string")return;const e=t.startsWith("__raw:")?t.slice(6):t,n=/(?:each\s*:\s*)?(-?\d+(?:\.\d+)?)/.exec(e);if(!n)return;const r=Number.parseFloat(n[1]);return Number.isFinite(r)?r:void 0}function CU(t){return t==="opacity"||t.startsWith("scale")?1:0}function JMe(t,e){const n={...t.properties};let r,i;if(t.method==="fromTo")r={...t.fromProperties??{}},i=n;else if(t.method==="from"){r=n,i={};for(const s of Object.keys(n))i[s]=CU(s)}else{r={...t.fromProperties??{}};for(const s of Object.keys(n))r[s]===void 0&&(r[s]=CU(s));i=n}return[{percentage:0,properties:{...r,stagger:e}},{percentage:100,properties:{...i,stagger:e}}]}function eNe(t){var e;for(const n of t){if(n.keyframes||n.arcPath)continue;const r=KMe((e=n.extras)==null?void 0:e.stagger);r!==void 0&&(n.keyframes={format:"percentage",keyframes:JMe(n,r)})}}const tNe=.5;function nNe(t,e,n){const r=t.trim();if(r==="")return e;if(r.startsWith("+=")){const s=Number.parseFloat(r.slice(2));return Number.isFinite(s)?e+s:null}if(r.startsWith("-=")){const s=Number.parseFloat(r.slice(2));return Number.isFinite(s)?e-s:null}if(r==="<")return n;if(r===">")return e;if(r.startsWith("<")){const s=Number.parseFloat(r.slice(1));return Number.isFinite(s)?n+s:null}if(r.startsWith(">")){const s=Number.parseFloat(r.slice(1));return Number.isFinite(s)?e+s:null}const i=Number.parseFloat(r);return Number.isFinite(i)?i:null}function rNe(t,e,n,r){const i=new Map;return xf(t,{CallExpression(s,a,o){var h,d,y,g;const l=s.callee;if((l==null?void 0:l.type)!=="MemberExpression"||((h=l.object)==null?void 0:h.name)!=="gsap"||((d=l.property)==null?void 0:d.name)!=="set")return;const c=zj((y=s.arguments)==null?void 0:y[0],o,e,n);if(!c)return;const u=f0((g=s.arguments)==null?void 0:g[1],e,r),f=i.get(c)??{};for(const[v,b]of Object.entries(u))(typeof b=="number"||typeof b=="string")&&(f[v]=b);i.set(c,f)}}),i}function EU(t,e){for(const[n,r]of Object.entries(e))t[n]=r;return t}function iNe(t,e){const n={...t.fromProperties??{}};let r=!1;for(const i of Object.keys(t.properties))n[i]===void 0&&e[i]!==void 0&&(n[i]=e[i],r=!0);r&&(t.fromProperties=n)}function sNe(t,e){const n=new Map;for(const[r,i]of e)n.set(r,{...i});for(const r of t){const i=r.targetSelector;if(r.method==="set"){n.set(i,EU(n.get(i)??{},r.properties));continue}const s=n.get(i);r.method==="to"&&s&&iNe(r,s),n.set(i,EU(n.get(i)??{},r.properties))}}function Mle(t,e){if(e)for(const n of t)n.method!=="set"&&(n.duration===void 0&&e.duration!==void 0&&(n.duration=e.duration),n.ease===void 0&&e.ease!==void 0&&(n.ease=e.ease))}function Nle(t,e,n){const r=/^([A-Za-z_$][\w$]*)\s*(?:([+-])=\s*([\d.]+))?$/.exec(t.trim());if(!r)return null;const i=r[1];let s=e.get(i);if(s===void 0&&(s=n,e.set(i,s)),r[2]&&r[3]){const a=Number.parseFloat(r[3]);if(Number.isFinite(a))return r[2]==="+"?s+a:s-a}return s}function aNe(t,e,n,r){return t.implicitPosition?e:typeof t.position=="number"?t.position:typeof t.position=="string"?Nle(t.position,r,e)??nNe(t.position,e,n):e}function Dle(t,e=[]){let n=0,r=0;const i=new Map;let s=0;const a=[...e].sort((l,c)=>l.order-c.order),o=l=>{let c;typeof l.position=="number"?c=l.position:typeof l.position=="string"?c=Nle(l.position,i,n)??n:c=n,i.set(l.name,Math.max(0,c))};for(t.forEach((l,c)=>{for(;s<a.length&&a[s].order<=c;)o(a[s]),s++;if(l.method==="set"&&l.global){l.resolvedStart=0;return}const u=l.method==="set"?0:l.duration??tNe,f=aNe(l,n,r,i);f!=null&&(l.resolvedStart=Math.max(0,f),r=l.resolvedStart,n=Math.max(n,l.resolvedStart+u))});s<a.length;)o(a[s++])}function oNe(t,e,n,r){const i=r.map(a=>{var o,l,c;return(c=(l=(o=a.node.callee)==null?void 0:o.property)==null?void 0:l.loc)==null?void 0:c.start}),s=[];return _0(t,{CallExpression(a){var g,v,b,w,O,C;const o=a.callee,l=e.kind==="identifier"?((g=o.object)==null?void 0:g.type)==="Identifier"&&o.object.name===e.name:SE(o.object,e.node);if((o==null?void 0:o.type)!=="MemberExpression"||!l||((v=o.property)==null?void 0:v.name)!=="addLabel")return;const c=(b=a.arguments)==null?void 0:b[0],u=typeof(c==null?void 0:c.value)=="string"?c.value:void 0;if(!u)return;const f=rs((w=a.arguments)==null?void 0:w[1],n),h=typeof f=="number"||typeof f=="string"?f:void 0,d=(C=(O=o.property)==null?void 0:O.loc)==null?void 0:C.start;let y=r.length;d&&(y=i.findIndex(E=>E&&(E.line>d.line||E.line===d.line&&E.column>d.column)),y===-1&&(y=r.length)),s.push({name:u,position:h,order:y})}}),s}function lNe(t,e){var i,s,a,o,l,c;const n=(a=(s=(i=t.node.callee)==null?void 0:i.property)==null?void 0:s.loc)==null?void 0:a.start,r=(c=(l=(o=e.node.callee)==null?void 0:o.property)==null?void 0:l.loc)==null?void 0:c.start;return!n||!r?0:n.line-r.line||n.column-r.column}function cNe(t,e){const n=t.node.__hfOrder,r=e.node.__hfOrder;return n===void 0&&r===void 0?lNe(t,e):n===void 0?-1:r===void 0?1:n-r}function Ile(t){t.sort(cNe)}function _le(t){const e=new Map;return t.map(n=>{const r=typeof n.position=="number"?String(Math.round(n.position*1e3)):String(n.position),i=n.propertyGroup?`-${n.propertyGroup}`:"",s=`${n.targetSelector}-${n.method}-${r}${i}`,a=(e.get(s)??0)+1;e.set(s,a);const o=a===1?s:`${s}-${a}`;return{...n,id:o}})}function rr(t){try{const e=Bv(t,{ecmaVersion:"latest",sourceType:"script",locations:!0}),n=Zj(e),r=Ole(e),i=kle(e,n,r),s=Gj(e,n),a=s.ref??{kind:"identifier",name:"tl"},o=Cle(a,t),l=Ele(e,a,n,i);Ile(l);const c=l.map(h=>Ple(h,n,t,r));Mle(c,s.defaults),Dle(c);const u=_le(c),f=l.map((h,d)=>({id:u[d].id,call:h,animation:u[d]}));return{ast:e,timelineVar:o,hasTimeline:s.ref!==null,located:f}}catch{return null}}function uNe(t){try{const e=EMe(t),n=Zj(e),r=Gj(e,n),i=r.ref??{kind:"identifier",name:"tl"},s=Cle(i,t);if(i.kind==="identifier")try{wMe(e,s,O=>rs(O,n))}catch{}const a=Ole(e),o=kle(e,n,a),l=Ele(e,i,n,o);Ile(l);const c=l.map(O=>Ple(O,n,t,a));Mle(c,r.defaults),sNe(c,rNe(e,n,o,t));const u=oNe(e,i,n,l);Dle(c,u),eNe(c);const f=_le(c),h=i.kind==="identifier"?`(?:const|let|var)\\s+${s}\\s*=\\s*gsap\\.timeline\\s*\\([^)]*\\)\\s*;?`:`${VMe(s)}\\s*=\\s*gsap\\.timeline\\s*\\([^)]*\\)\\s*;?`,d=t.match(new RegExp(`^[\\s\\S]*?${h}`)),y=i.kind==="identifier"?`const ${s} = gsap.timeline({ paused: true });`:`${s} = gsap.timeline({ paused: true });`,g=(d==null?void 0:d[0])??y,v=t.lastIndexOf(`${s}.`);let b="";if(v!==-1){const C=t.slice(v).indexOf(";");C!==-1&&(b=t.slice(v+C+1).trim())}const w={animations:f,timelineVar:s,preamble:g,postamble:b};return r.timelineCount>1&&(w.multipleTimelines=!0),r.timelineCount>0&&r.ref===null&&(w.unsupportedTimelinePattern=!0),w}catch{return{animations:[],timelineVar:"tl",preamble:"",postamble:""}}}function fNe(t){try{const e=Bv(t,{ecmaVersion:"latest",sourceType:"script",locations:!0}),n=Zj(e),i=Gj(e,n).ref??{kind:"identifier",name:"tl"},s=[];return _0(e,{ExpressionStatement(a){var y,g;const o=a.expression;if(!o||o.type!=="CallExpression")return;const l=o.callee,c=i.kind==="identifier"?((y=l.object)==null?void 0:y.type)==="Identifier"&&l.object.name===i.name:SE(l.object,i.node);if((l==null?void 0:l.type)!=="MemberExpression"||!c||((g=l.property)==null?void 0:g.name)!=="addLabel")return;const u=o.arguments??[],f=u[0],h=u[1];if((f==null?void 0:f.type)!=="Literal"||typeof f.value!="string"||!h)return;const d=rs(h,n);typeof d!="number"||!Number.isFinite(d)||s.push({name:f.value,position:d})}}),s}catch{return[]}}function Hv(t,e,n){if(n<=0)return 0;const r=(t-e)/n*100;return Math.max(0,Math.min(100,Math.round(r*1e3)/1e3))}function iS(t,e,n){return t>=e&&t<=e+n}function ri(t){if(t.resolvedStart!=null)return t.resolvedStart;if(typeof t.position=="number")return t.position;const e=Number.parseFloat(t.position);return Number.isNaN(e)?null:e}function Gi(t,e=.5){return t.duration??e}function hNe(t,e,n){for(const r of e){if(!dNe(r.targetSelector,n))continue;const i=ri(r);if(i===null)continue;const s=Gi(r);if(iS(t,i,s))return r}return null}function Rle(t,e){const n=ri(e);if(n===null)return null;const r=Gi(e);return Hv(t,n,r)}function dNe(t,e){return t.split(",").some(n=>n.trim()===e)}const hg={opacity:1,x:0,y:0,scale:1,scaleX:1,scaleY:1,rotation:0,width:100,height:100};function Ho(t){return t.method==="set"||(t.method==="to"||t.method==="fromTo")&&Gi(t)===0}const pNe=/^-?[A-Za-z_][\w-]*$/,h0=1;function dg(t){return pNe.test(t)?`#${t}`:`[id="${t.replace(/(["\\])/g,"\\$1")}"]`}function jle(t){if(!t)return null;const e=t.match(/^#([\w-]+)/);if(e)return e[1]??null;const n=t.match(/^\[id="((?:\\.|[^"\\])*)"\]/);return n?(n[1]??"").replace(/\\(["\\])/g,"$1"):null}const mNe=/^(#[\w-]+|\[id="(?:\\.|[^"\\])*"\])$/;function TU(t){const e=t.trim();return mNe.test(e)?jle(e):null}function XI(t,e){const n=TU(t);if(n)return[n];const r=new Set;for(const i of t.split(",")){const s=i.trim();if(s){if(!e){const a=TU(s);a&&r.add(a);continue}try{for(const a of Array.from(e.querySelectorAll(s)))a.id&&r.add(a.id)}catch{const a=jle(s);a&&r.add(a)}}}return Array.from(r)}function Lle(t){return t.start-(t.expandedParentStart??0)}function hc(t){return t.id?dg(t.id):t.selector?t.selector:null}function Fle(t,e){return`[${t}="${e.replace(/(["\\])/g,"\\$1")}"]`}function wE(t,e,n){try{const r=t.querySelectorAll(e);return r.length===1&&r[0]===n}catch{return!1}}function gNe(t){const e=t.ownerDocument;if(!e)return null;const n=[];for(let i=t;i;i=i.parentElement){if(i!==t){const o=i instanceof HTMLElement?i.id:"",l=i.getAttribute("data-hf-id");if(o){n.unshift(dg(o));break}if(l){n.unshift(Fle("data-hf-id",l));break}}const s=i.parentElement;if(!s)break;const a=[...s.children].indexOf(i)+1;if(a<1)return null;n.unshift(`${i.tagName.toLowerCase()}:nth-child(${a})`)}if(n.length===0)return null;const r=n.join(" > ");return wE(e,r,t)?r:null}function xc(t){if(t.id)return dg(t.id);if(t.hfId)return Fle("data-hf-id",t.hfId);const e=t.element,n=e==null?void 0:e.ownerDocument;return e&&n?t.selector&&wE(n,t.selector,e)?t.selector:gNe(e):t.selector??null}function Uj(t,e){return t.targetSelector&&!t.hasUnresolvedSelector?t.targetSelector:hc(e)}function iy(t,e,n){if(t===e)return!0;const r=n==null?void 0:n.ownerDocument;return!n||!r?!1:wE(r,t,n)}function ff(t,e){var r;const n=Number.parseFloat(((r=e.dataAttributes)==null?void 0:r.duration)??"");return Gi(t,Number.isFinite(n)&&n>0?n:.5)}function sS(t,e,n){var s,a;if(n){const o=ri(n),l=ff(n,e);if(l<=0)return 0;if(o!==null)return Hv(t,o,l)}const r=Number.parseFloat(((s=e.dataAttributes)==null?void 0:s.start)??"0")||0,i=Number.parseFloat(((a=e.dataAttributes)==null?void 0:a.duration)??"1")||1;return Hv(t,r,i)}function Xj(t){if(!(t!=null&&t.contentWindow))return null;try{const e=t.contentWindow.gsap;return e!=null&&e.getProperty?e:null}catch{return null}}function Wj(t,e){var n;try{return((n=t==null?void 0:t.contentDocument)==null?void 0:n.querySelector(e))??null}catch{return null}}function PU(t){const e={};for(const[n,r]of Object.entries(t))n!=="ease"&&(typeof r=="number"?e[n]=Math.round(r*1e3)/1e3:typeof r=="string"&&(e[n]=r));return e}function yNe(t){const e=[];let n;if(Array.isArray(t)){const r=t;return r.forEach((i,s)=>{if(!i||typeof i!="object")return;const a=r.length>1?Math.round(s/(r.length-1)*1e3)/10:0,o=PU(i);Object.keys(o).length>0&&e.push({percentage:a,properties:o})}),e.length>0?{keyframes:e}:null}for(const[r,i]of Object.entries(t)){if(r==="easeEach"){typeof i=="string"&&(n=i);continue}const s=r.match(/^(\d+(?:\.\d+)?)%$/);if(!s||!i||typeof i!="object")continue;const a=parseFloat(s[1]),o=PU(i);Object.keys(o).length>0&&e.push({percentage:a,properties:o})}return e.length===0?null:(e.sort((r,i)=>r.percentage-i.percentage),{keyframes:e,easeEach:n})}function Yj(t,e,n){return t+n/100*e}function OE(t,e,n,r){var o;const i=n.find(l=>l.domId===t||(l.key??l.id)===`${e}#${t}`);if(i){const l=i.parentCompositionId,c=l?n.find(f=>f.domId===l||f.id===l):void 0,u=i.expandedParentStart??(c==null?void 0:c.start);return u!==void 0?{elStart:i.start-u,elDuration:i.duration}:l?{elStart:0,elDuration:i.duration}:{elStart:i.start,elDuration:i.duration}}const s=(o=r.find(l=>l.id===t))==null?void 0:o.hostId,a=s?n.find(l=>l.domId===s||(l.key??l.id)===`index.html#${s}`):void 0;return{elStart:0,elDuration:(a==null?void 0:a.duration)??1}}function $le(t,e,n,r){return n<=0?r:Math.round((t-e)/n*1e5)/1e3}function qj(t,e,n,r){const i=e.resolvedStart??(typeof e.position=="number"?e.position:0),s=e.duration??r;return t.map(a=>({...a,percentage:$le(Yj(i,s,a.percentage),n,r,a.percentage),tweenPercentage:a.percentage,propertyGroup:e.propertyGroup,animationId:e.id}))}function WI(t){if(t.keyframes||t.method!=="set"&&(t.duration??0)!==0)return!1;const e=Object.keys(t.properties).filter(n=>n!=="immediateRender");return e.length>0&&e.every(n=>n==="x"||n==="y")}function xNe(t,e){const n=t.animationId;if(n===e.animationId)return;const r=t.collidingAnimationTargets;r!=null&&r.some(i=>i.animationId===e.animationId)||(t.collidingAnimationTargets=[...r===void 0||r.length===0?[{animationId:n,tweenPercentage:t.tweenPercentage}]:r,{animationId:e.animationId,tweenPercentage:e.tweenPercentage}])}function Kj(t){var n;const e=new Map;for(const r of t){const i=e.get(r.percentage);i?(i.properties={...i.properties,...r.properties},xNe(i,r),(((n=i.collidingAnimationTargets)==null?void 0:n.length)??0)>1?delete i.ease:r.ease&&(i.ease=r.ease)):e.set(r.percentage,{...r,properties:{...r.properties}})}return Array.from(e.values()).sort((r,i)=>r.percentage-i.percentage)}function pg(t){var c;const e=((c=t.extras)==null?void 0:c.immediateRender)==="__raw:true";if(t.method==="set"||t.duration===0&&e)return null;const n=t.properties,r=t.fromProperties;if(!n||Object.keys(n).length===0)return null;const i={},s={};if(t.method==="from")for(const[u,f]of Object.entries(n))i[u]=f,s[u]=hg[u]??0;else if(t.method==="fromTo"&&r)Object.assign(i,r),Object.assign(s,n);else for(const[u,f]of Object.entries(n))i[u]=hg[u]??0,s[u]=f;const a=Object.keys(s).filter(u=>typeof i[u]=="number"&&typeof s[u]=="number");if(a.length===0)return null;const o=Object.fromEntries(a.map(u=>[u,i[u]])),l=Object.fromEntries(a.map(u=>[u,s[u]]));return{format:"percentage",keyframes:[{percentage:0,properties:o},{percentage:100,properties:l,...t.ease?{ease:t.ease}:{}}],...t.ease?{ease:t.ease}:{}}}const bNe=new Set(["transformOrigin","_auto","data"]);function Ble(t){return!bNe.has(t)}function vNe(t,e){return Object.keys(t).some(n=>Ble(n)&&qo(n)===e)}function Vle(t){var e,n;return((e=t.keyframes)==null?void 0:e.keyframes)??((n=pg(t))==null?void 0:n.keyframes)??[]}function kE(t){const e=new Set;for(const n of Vle(t))for(const r of Object.keys(n.properties))Ble(r)&&e.add(qo(r));return Array.from(e)}function ANe(t,e,n){const r=qo(t),i=e==null?void 0:e.find(s=>kE(s).includes(r));return(i==null?void 0:i.id)??n??""}function Hle(t){return kE(t).length>0}function SNe(t){const e=new Map;for(const n of t)for(const r of kE(n)){const i=e.get(r)??[];i.push(n),e.set(r,i)}return e}function wNe(t,e){var n;return t.ease??((n=e.keyframes)==null?void 0:n.easeEach)??e.ease}function ONe(t,e,n,r){const i=[];for(const s of t){const a=Vle(s).filter(o=>vNe(o.properties,e));for(const o of qj(a,s,n,r))i.push({...o,propertyGroup:e,ease:wNe(o,s)})}return i}function Jj(t,e,n){return n<=0?[]:Array.from(SNe(t),([r,i])=>({group:r,animations:i,keyframes:ONe(i,r,e,n)})).filter(r=>r.keyframes.length>0)}function kNe({id:t,animations:e,clipStart:n,clipDuration:r,clipLeftPx:i,clipWidthPx:s,accentColor:a,isSelected:o,currentPercentage:l,elementId:c,selectedKeyframes:u,rovingTargetId:f=null,onSelectSegment:h,onClickKeyframe:d,onShiftClickKeyframe:y,onContextMenuKeyframe:g,onMoveKeyframe:v,suppressClickRef:b}){const w=x.useMemo(()=>s<20||r<=0?[]:Jj(e,n,r),[e,n,r,s]),O=x.useMemo(()=>w.map(C=>({...C,keyframesData:{format:"percentage",keyframes:C.keyframes}})),[w]);return m.jsx("div",{id:t,children:O.map(({group:C,keyframesData:E},M)=>m.jsx("div",{id:g6(t,j2(c,C),"content"),role:"group","aria-label":`${C} keyframes`,"data-property-group":C,"data-timeline-element-id":c,"data-timeline-property-lane":"","data-timeline-lane-top":cg(M),className:"absolute",style:{left:i,top:cg(M),width:s,height:lg},children:m.jsx(Iae,{keyframesData:E,clipWidthPx:s,clipHeightPx:lg,accentColor:a,isSelected:o,currentPercentage:l,elementId:c,clipStart:n,clipDuration:r,selectedKeyframes:u,rovingTargetId:f,onSelectSegment:h,onClickKeyframe:d,onShiftClickKeyframe:y,onContextMenuKeyframe:g,onMoveKeyframe:v,suppressClickRef:b,groupAware:!0})},C))})}const YI=.02,qI=.001,Qle=7,MU=64,gl=Qle+2;function dc(t,e){const{min:n,max:r}=t;return r<=n?0:t.scale==="log"&&n>0&&e>0?(Math.log(e)-Math.log(n))/(Math.log(r)-Math.log(n)):(e-n)/(r-n)}function CE(t,e){const n=Math.min(1,Math.max(0,e)),{min:r,max:i}=t;return t.scale==="log"&&r>0?Math.exp(Math.log(r)+n*(Math.log(i)-Math.log(r))):r+n*(i-r)}function CNe(t,e){const n=t.step>=1?0:t.step>=.1?1:2,r=t.unit===""&&t.max===1?`${Math.round(e*100)}%`:e.toFixed(n);return t.unit?`${r} ${t.unit}`:r}function ENe(t){const{range:e,a:n,b:r,t:i,v:s}=t,a=r.t-n.t;if(a<=0)return null;const o=(i-n.t)/a;if(o<=.001||o>=.999)return null;const l=dc(e,n.v),c=dc(e,r.v);if(Math.abs(c-l)<.001)return null;const u=(dc(e,s)-l)/(c-l);return u<=.001||u>=.999?null:l6e(o,u)}function Zle(t){const{origin:e,raw:n,xOf:r,yOf:i}=t;return Math.abs(r(n.t)-r(e.t))>Math.abs(i(n.v)-i(e.v))?"time":"value"}function TNe(t){const{range:e,origin:n,raw:r}=t;if((t.axis??Zle(t))==="time")return{t:r.t,v:n.v};const s=dc(e,n.v);return{t:n.t,v:CE(e,s+(dc(e,r.v)-s)*.25)}}function eL(t,e,n){let r=t,i=n;for(const s of e){const a=Math.abs(s-t);a<i&&(i=a,r=s)}return r}function PNe(t){const{lane:e,range:n,widthPx:r,xOf:i,yOf:s}=t,a=e.points[0],o=e.points[e.points.length-1];if(!a||!o){const c=s(n.default??(n.min+n.max)/2);return`M ${gl} ${c} L ${gl+r} ${c}`}const l=[`M ${gl} ${s(a.v)}`,`L ${i(a.t)} ${s(a.v)}`];for(let c=0;c+1<e.points.length;c+=1){const u=e.points[c],f=e.points[c+1];if(!(!u||!f)){if(!u.curve&&u.viaX===void 0&&n.scale==="linear"){l.push(`L ${i(f.t)} ${s(f.v)}`);continue}for(let h=1;h<=MU;h+=1){const d=u.t+(f.t-u.t)*h/MU;l.push(`L ${i(d)} ${s(n0(e,d,n.scale))}`)}}}return l.push(`L ${gl+r} ${s(o.v)}`),l.join(" ")}function tL(t,e){return t.lanes.find(n=>n.target===e)??{target:e,points:[]}}function nL(t,e){const n=e.points.length===0,r=t.lanes.some(s=>s.target===e.target),i=t.lanes.map(s=>s.target===e.target?e:s).filter(s=>s.points.length>0);return!r&&!n&&i.push(e),{version:1,lanes:i}}function T6(t,e,n){return t.points.filter(r=>r.t>=e&&r.t<=n)}function NU(t,e,n,r){return r.some(i=>Math.abs(i.t-n)<=YI)?[]:[{t:n,v:n0(t,n,e.scale)}]}function MNe(t,e){if(e<=0)return[];if(t.length<=e)return[...t];if(e===1){const i=t[0];return i?[i]:[]}const n=[],r=(t.length-1)/(e-1);for(let i=0;i<e;i+=1){const s=t[Math.round(i*r)];s&&n.push(s)}return n}function P6(t){const{lane:e,range:n,t0:r,t1:i,inner:s}=t;if(e.points.length===0&&s.length===0)return[];const a=e.points.filter(u=>u.t<r||u.t>i),o=e.points.length===0?[]:[...NU(e,n,r,s),...NU(e,n,i,s)],l=Math.max(0,Qie-a.length-o.length),c=s.length<=l?s:MNe(s,l);return[...a,...o,...c].sort((u,f)=>u.t-f.t)}function mg(t,e){return t.t>=e.t0&&t.t<=e.t1&&t.v>=e.v0&&t.v<=e.v1}function NNe(t){const{lane:e,range:n,t0:r,t1:i,newT0:s,newT1:a}=t,o=i-r,l=a-s;if(o<=0||l<=0)return e.points;const c=T6(e,r,i).map(u=>({...u,t:s+(u.t-r)*l/o}));return P6({lane:e,range:n,t0:Math.min(r,s),t1:Math.max(i,a),inner:c})}function rL(t){var e,n;(n=(e=t.currentTarget).setPointerCapture)==null||n.call(e,t.pointerId)}const DU=8,DNe=3,IU=.02;function INe(t,e,n,r){return t==="t0"?Math.max(0,Math.min(e,n.t1-IU)):Math.min(r,Math.max(e,n.t0+IU))}function _Ne({getBox:t,lane:e,range:n,pointAt:r,xOf:i,commitPoints:s,duration:a,readOnly:o,rangeSelection:l,pointInSelectionAt:c,onRangeSelect:u,onRangeClear:f,onHint:h}){const[d,y]=x.useState(null),g=x.useRef(!1),[v,b]=x.useState(!1),w=x.useCallback(I=>{if(!l)return null;const _=t();if(!_)return null;const j=I-_.left,L=i(l.t0),V=i(l.t1),$=Math.abs(L-j)<=DU,Z=Math.abs(V-j)<=DU;return $&&Z?j<=(L+V)/2?"t0":"t1":$?"t0":Z?"t1":null},[l,t,i]),O=x.useCallback(I=>{if(o||!l)return!1;const _=w(I.clientX);return!_||c!=null&&c(I.clientX,I.clientY)?!1:(I.preventDefault(),rL(I),b(!1),g.current=!1,y({edge:_,origin:l,current:_==="t0"?l.t0:l.t1,points:e.points}),!0)},[o,l,w,e,c]),C=x.useCallback(I=>{if(d===null)return;const{edge:_,origin:j,points:L}=d,V=INe(_,r(I.clientX,I.clientY).t,j,a);if(y({edge:_,origin:j,current:V,points:L}),!g.current){const W=_==="t0"?j.t0:j.t1;if(Math.abs(i(V)-i(W))<=DNe)return;g.current=!0}const $=_==="t0"?V:j.t0,Z=_==="t1"?V:j.t1;h(`${$.toFixed(2)}s → ${Z.toFixed(2)}s`),u==null||u($,Z,j.v0,j.v1),s(NNe({lane:{target:e.target,points:L},range:n,t0:j.t0,t1:j.t1,newT0:$,newT1:Z}),!1)},[d,r,a,i,h,u,s,e.target,n]),E=x.useCallback(()=>{if(d===null)return;const{edge:I,origin:_,current:j}=d;if(y(null),h(null),!g.current){f==null||f();return}g.current=!1,s(e.points,!0),u==null||u(I==="t0"?j:_.t0,I==="t1"?j:_.t1,_.v0,_.v1)},[d,h,f,s,e,u]),M=x.useCallback(()=>{if(d===null)return;const{origin:I,points:_}=d;y(null),h(null),g.current&&(g.current=!1,s(_,!1),u==null||u(I.t0,I.t1,I.v0,I.v1))},[d,h,s,u]),N=x.useCallback(I=>{o||b(w(I.clientX)!==null)},[o,w]);return{edge:(d==null?void 0:d.edge)??null,hover:v,arm:O,move:C,finish:E,cancel:M,updateHover:N}}const iL=.04;function RNe(t,e,n){return!n||!e||!mg(e,n)?[]:t.points.flatMap((r,i)=>mg(r,n)?[i]:[])}function jNe(t,e,n){const r=RNe(t,e,n);return r.length<=1||!e?null:{points:t.points.map(i=>({...i})),indices:r,anchor:{t:e.t,v:e.v},selection:n?{...n}:{t0:0,t1:0,v0:0,v1:0}}}function LNe(t){const{group:e,raw:n,shiftKey:r,altKey:i,range:s,duration:a,snapTimes:o,xOf:l,yOf:c}=t,u=e.indices.map(b=>e.points[b]);let f=n.t-e.anchor.t,h=n.v-e.anchor.v;if(r){const b=Math.abs(f*(l(1)-l(0))),w=Math.abs(h*(c(s.min)-c(s.max))/(s.max-s.min));b>=w?h=0:f=0}else if(!i){const b=e.points.filter((w,O)=>!e.indices.includes(O)).map(w=>w.t);f=eL(e.anchor.t+f,[...o??[],...b],iL)-e.anchor.t}const d=u.map(b=>b.t),y=u.map(b=>b.v),g=b=>e.indices.flatMap(w=>{const O=e.points[w+b];return!O||e.indices.includes(w+b)?[]:[Math.max(0,Math.abs(O.t-e.points[w].t)-qI)]});return f=Math.min(Math.max(f,-Math.min(Math.min(...d),...g(-1))),Math.min(a-Math.max(...d),...g(1))),h=Math.min(Math.max(h,s.min-Math.min(...y)),s.max-Math.max(...y)),{points:e.points.map((b,w)=>e.indices.includes(w)?{...b,t:b.t+f,v:b.v+h}:b),selection:{t0:e.selection.t0+f,t1:e.selection.t1+f,v0:e.selection.v0+h,v1:e.selection.v1+h},hint:`${e.indices.length} points ${f>=0?"+":""}${f.toFixed(2)}s`}}function FNe(t){var w,O,C;const{raw:e,origin:n,shiftKey:r,altKey:i,range:s,duration:a,snapTimes:o,lane:l,dragIndex:c,xOf:u,yOf:f}=t;let h=r?t.shiftAxis:null,{t:d,v:y}=e;if(r&&n&&(h??(h=Zle({origin:n,raw:e,xOf:u,yOf:f})),{t:d,v:y}=TNe({range:s,origin:n,raw:e,xOf:u,yOf:f,axis:h})),!i&&!r){const E=l.points.filter((M,N)=>N!==c).map(M=>M.t);d=eL(d,[...o??[],...E],iL)}const g=(((w=l.points[c-1])==null?void 0:w.t)??-1/0)+qI,v=(((O=l.points[c+1])==null?void 0:O.t)??1/0)-qI,b=((C=l.points[c])==null?void 0:C.t)??d;return d=v>=g?Math.min(v,Math.max(g,Math.min(a,Math.max(0,d)))):b,{t:d,v:y,shiftAxis:h}}function _U(t,e){const n=e.pointAt(t.clientX,t.clientY),r=Math.min(e.duration,Math.max(0,n.t));return{t:t.altKey?r:eL(r,e.snapTimes??[],iL),v:n.v}}function $Ne({pointAt:t,xOf:e,yOf:n,duration:r,snapTimes:i,onRangeSelect:s,onRangeClear:a}){const[o,l]=x.useState(null),c=x.useRef(!1),u=x.useCallback(d=>{if(!s)return;d.preventDefault(),rL(d);const y=_U(d,{pointAt:t,duration:r,snapTimes:i});c.current=!1,l({from:y,to:y})},[s,t,r,i]),f=x.useCallback(d=>{if(o===null)return;const y=_U(d,{pointAt:t,duration:r,snapTimes:i}),{from:g}=o;l({from:g,to:y}),!(Math.max(Math.abs(e(y.t)-e(g.t)),Math.abs(n(y.v)-n(g.v)))<=3)&&(c.current=!0,s==null||s(Math.min(g.t,y.t),Math.max(g.t,y.t),Math.min(g.v,y.v),Math.max(g.v,y.v)))},[o,t,r,i,e,n,s]),h=x.useCallback(()=>{c.current||a==null||a(),c.current=!1,l(null)},[a]);return{dragging:o!==null,arm:u,move:f,finish:h}}const BNe=3;function VNe(t){return t?{t:t.t,v:t.v}:{t:0,v:0}}function HNe({getBox:t,lane:e,range:n,pointAt:r,xOf:i,yOf:s,commitPoints:a,snapTimes:o,readOnly:l,onSelect:c,onRangeSelect:u,onRangeClear:f,duration:h,rangeSelection:d}){const[y,g]=x.useState(null),[v,b]=x.useState(null),[w,O]=x.useState(null),C=_Ne({getBox:t,lane:e,range:n,pointAt:r,xOf:i,commitPoints:a,duration:h,readOnly:l,rangeSelection:d,pointInSelectionAt:(ee,H)=>{if(!d)return!1;const Q=Y(ee,H),oe=Q===null?null:e.points[Q];return oe?mg(oe,d):!1},onRangeSelect:u,onRangeClear:f,onHint:O}),E=x.useRef(null),M=x.useRef(null),[N,I]=x.useState(null),_=$Ne({pointAt:r,xOf:i,yOf:s,duration:h,snapTimes:o,onRangeSelect:u,onRangeClear:f}),j=x.useRef(null),L=x.useRef(!1),V=x.useRef(null),$=x.useCallback(ee=>{I(H=>H?{index:H.index,text:ee}:null)},[]),Z=x.useCallback(()=>I(null),[]),W=x.useCallback(()=>{const ee=N;if(I(null),!ee)return;const H=Number(ee.text);if(!Number.isFinite(H))return;const Q=Math.min(n.max,Math.max(n.min,H));a(e.points.map((oe,fe)=>fe===ee.index?{...oe,v:Q}:oe),!0)},[N,e,n,a]),Y=x.useCallback((ee,H)=>{const Q=t();if(!Q)return null;const oe=ee-Q.left,fe=H-Q.top;for(let pe=0;pe<e.points.length;pe+=1){const be=e.points[pe];if(be&&Math.hypot(i(be.t)-oe,s(be.v)-fe)<=Qle*1.6)return pe}return null},[t,e,i,s]),J=x.useCallback((ee,H)=>{const{t:Q}=r(ee,H);for(let oe=0;oe+1<e.points.length;oe+=1){const fe=e.points[oe],pe=e.points[oe+1];if(fe&&pe&&Q>fe.t&&Q<pe.t)return oe}return null},[e,r]),ne=x.useCallback(ee=>{const H=Y(ee.clientX,ee.clientY);if(H!==null)return{curve:!1,index:H};if(!ee.altKey)return null;const Q=J(ee.clientX,ee.clientY);return Q===null?null:{curve:!0,index:Q}},[Y,J]),ie=x.useCallback(ee=>{if(ee.button!==0)return;if(ee.stopPropagation(),N&&W(),l){c==null||c(),_.arm(ee);return}if(C.arm(ee))return;const H=ne(ee);if(!H){_.arm(ee);return}if(ee.preventDefault(),rL(ee),H.curve){b(H.index);return}E.current=VNe(e.points[H.index]),M.current=jNe(e,e.points[H.index],d),j.current={x:ee.clientX,y:ee.clientY},L.current=!1,g(H.index)},[ne,e,l,c,_,N,W,d,C]),le=x.useCallback((ee,H)=>{if(v===null)return;const Q=e.points[v],oe=e.points[v+1];if(!Q||!oe)return;const{t:fe,v:pe}=r(ee,H),be=ENe({range:n,a:Q,b:oe,t:fe,v:pe});be!==null&&(O(`bend ${Math.round(be.viaX*100)}%`),a(e.points.map((me,Ae)=>Ae===v?{...me,curve:void 0,viaX:be.viaX,viaY:be.viaY}:me),!1))},[v,e,r,n,a]),q=x.useCallback((ee,H)=>{const{points:Q,selection:oe,hint:fe}=LNe({group:H,raw:r(ee.clientX,ee.clientY),shiftKey:ee.shiftKey,altKey:ee.altKey,range:n,duration:h,snapTimes:o,xOf:i,yOf:s});u==null||u(oe.t0,oe.t1,oe.v0,oe.v1),O(fe),a(Q,!1)},[a,h,u,r,n,o,i,s]),F=x.useCallback(ee=>{if(y===null)return;const H=M.current;if(H){q(ee,H);return}ee.shiftKey||(V.current=null);const{t:Q,v:oe,shiftAxis:fe}=FNe({raw:r(ee.clientX,ee.clientY),origin:E.current,shiftKey:ee.shiftKey,altKey:ee.altKey,shiftAxis:V.current,range:n,duration:h,snapTimes:o,lane:e,dragIndex:y,xOf:i,yOf:s});V.current=fe;const pe=e.points.map((be,me)=>me===y?{...be,t:Q,v:oe}:be);O(`${CNe(n,oe)} @ ${Q.toFixed(2)}s`),a(pe,!1)},[y,h,e,r,n,a,o,i,s,q]),U=x.useCallback(ee=>{if(C.edge!==null){ee.stopPropagation(),ee.buttons===0?C.cancel():C.move(ee);return}if(_.dragging){ee.stopPropagation(),_.move(ee);return}if(v===null&&y===null){C.updateHover(ee);return}ee.stopPropagation();const H=j.current;H&&Math.hypot(ee.clientX-H.x,ee.clientY-H.y)>BNe&&(L.current=!0),v!==null?le(ee.clientX,ee.clientY):F(ee)},[_,v,y,le,F,C]),z=x.useCallback(ee=>{if(C.edge!==null){ee.stopPropagation(),C.finish();return}if(_.dragging){ee.stopPropagation(),_.finish();return}if(y===null&&v===null)return;ee.stopPropagation();const H=y,Q=H!==null&&ee.shiftKey&&!L.current;if(g(null),b(null),E.current=null,M.current=null,V.current=null,j.current=null,O(null),Q){a(e.points.filter((oe,fe)=>fe!==H),!0);return}a(e.points,!0)},[_,v,y,e,a,C]),K=x.useCallback(ee=>{if(C.edge!==null){ee.stopPropagation(),C.cancel();return}z(ee)},[C,z]),te=x.useCallback(ee=>{if(l)return;ee.stopPropagation(),ee.preventDefault();const H=Y(ee.clientX,ee.clientY);if(ee.altKey){const be=H??J(ee.clientX,ee.clientY);if(be===null)return;a(e.points.map((me,Ae)=>Ae===be?{t:me.t,v:me.v}:me),!0);return}if(H!==null){const be=e.points[H];be&&I({index:H,text:String(Number(be.v.toFixed(3)))});return}const{t:Q,v:oe}=r(ee.clientX,ee.clientY),fe=e.points.filter(be=>Math.abs(be.t-Q)>YI),pe=e.points.length===0&&Q>YI?[{t:0,v:oe}]:[];a([...pe,...fe,{t:Q,v:oe}].sort((be,me)=>be.t-me.t),!0)},[e,r,a,l,Y,J]);return{dragIndex:y,curveIndex:v,edgeDrag:C.edge,edgeHover:C.hover,cancelDrag:K,hint:w,hitIndex:Y,segmentIndex:J,onPointerDown:ie,onPointerMove:U,endDrag:z,onDoubleClick:te,editing:N,setEditingText:$,commitEdit:W,cancelEdit:Z}}function QNe({text:t,leftPx:e,label:n,onChange:r,onCommit:i,onCancel:s}){return m.jsx("input",{className:"hf-automation-value pointer-events-auto absolute rounded-[3px] border border-panel-border-input bg-panel-bg-2 px-1 font-mono text-[9px] text-panel-text-1",style:{left:e,top:1,width:44,zIndex:4},onPointerDown:a=>a.stopPropagation(),onKeyDown:a=>{a.stopPropagation(),a.key==="Enter"&&i(),a.key==="Escape"&&s()},onChange:a=>r(a.target.value),onBlur:i,value:t,"aria-label":`${n} value`,autoFocus:!0})}const RU=[{id:"ramp-up",label:"Ramp up"},{id:"ramp-down",label:"Ramp down"},{id:"swell",label:"Swell"},{id:"dip",label:"Dip"}],j8=.4,ZNe=.25;function jU(t,e,n){return t.points.length===0?e.default??(e.min+e.max)/2:n0(t,n,e.scale)}function zNe(t){const{shape:e,lane:n,range:r,t0:i,t1:s}=t,a=jU(n,r,i),o=jU(n,r,s),l=(i+s)/2;switch(e){case"ramp-up":return[{t:i,v:r.min},{t:s,v:o}];case"ramp-down":return[{t:i,v:a},{t:s,v:r.min}];case"swell":return[{t:i,v:a,curve:j8},{t:l,v:r.max,curve:-j8},{t:s,v:o}];case"dip":return[{t:i,v:a,curve:-j8},{t:l,v:CE(r,dc(r,a)*ZNe),curve:j8},{t:s,v:o}]}}const GNe=x.memo(function({x:e,y:n,onClose:r,onInsertShape:i,onSimplify:s,canSimplify:a}){const o=P0(r),l="block w-full px-2 py-1 text-left text-[11px] text-panel-text-1 hover:bg-panel-bg-3 disabled:opacity-40",c=140,u=RU.length*24+32,f=n+u-window.innerHeight,h=e+c>window.innerWidth?e-c:e,d=f>0?n-f-8:n;return _l.createPortal(m.jsxs("div",{ref:o,className:"hf-automation-menu fixed z-[200] min-w-[140px] rounded border border-panel-border-input bg-panel-bg-2 py-1 shadow-lg",style:{left:h,top:d},children:[RU.map(y=>m.jsx("button",{type:"button",className:l,onClick:()=>{i(y.id),r()},children:y.label},y.id)),m.jsx("div",{className:"my-1 border-t border-panel-border-input"}),m.jsx("button",{type:"button",className:l,disabled:!a,title:a?void 0:"Fewer than three points in the selection",onClick:()=>{s(),r()},children:"Simplify"})]}),document.body)});function UNe(t,e,n=.02){if(t.length<=2)return t;const r=new Array(t.length).fill(!1),i=r.length-1;r[0]=!0,r[i]=!0;const s=[[0,i]];for(;s.length>0;){const a=s.pop();if(!a)break;const[o,l]=a,c=t[o],u=t[l];if(!c||!u||l-o<2)continue;const f=dc(e,c.v),h=dc(e,u.v),d=u.t-c.t;let y=-1,g=n;for(let v=o+1;v<l;v+=1){const b=t[v];if(!b)continue;const w=d>0?(b.t-c.t)/d:0,O=Math.abs(dc(e,b.v)-(f+w*(h-f)));O>g&&(g=O,y=v)}y>=0&&(r[y]=!0,s.push([o,y],[y,l]))}return t.filter((a,o)=>r[o])}const XNe=4.9,WNe=JR.rowBorder;function YNe(t,e){return!!e&&mg(t,e)}function qNe(t,e){return{radius:XNe*(e?1.3:t?1.15:1),stroke:t?"#fff":"rgba(0,0,0,0.5)",strokeWidth:t?1.5:1}}function KNe(t,e,n){return n?"col-resize":t?"pointer":e?"grabbing":"crosshair"}function JNe({duration:t,widthPx:e,leftPx:n,topPx:r,automation:i,target:s,range:a,accentColor:o,playheadSec:l,onPreview:c,onCommit:u,snapTimes:f,readOnly:h,onSelect:d,rangeSelection:y,onRangeSelect:g,onRangeClear:v}){var fe;const b=tL(i,s),w=x.useRef(null),[O,C]=x.useState(null),E=x.useMemo(()=>O?{target:s,points:O.points}:b,[O,s,b]);x.useEffect(()=>{O&&O.basedOn!==i&&C(null)},[i,O]),x.useEffect(()=>{C(null)},[s]);const M=XA,N=6,I=M-N*2,_=x.useCallback(pe=>gl+(t>0?pe/t*e:0),[t,e]),j=x.useCallback(pe=>N+(1-dc(a,pe))*I,[a,I]),L=x.useCallback((pe,be)=>{var Se;const me=(Se=w.current)==null?void 0:Se.getBoundingClientRect();if(!me||me.width<=0)return{t:0,v:a.default??a.min};const Ae=Math.min(t,Math.max(0,(pe-me.left-gl)/e*t)),De=1-(be-me.top-N)/I;return{t:Ae,v:CE(a,De)}},[t,I,a,e]),V=x.useMemo(()=>PNe({lane:E,range:a,widthPx:e,xOf:_,yOf:j}),[E,a,e,_,j]),$=x.useCallback((pe,be)=>{C({points:pe,basedOn:i});const me=nL(i,{target:s,points:pe});be?u(me):c(me)},[i,s,u,c]),Z=x.useCallback(()=>{var pe;return((pe=w.current)==null?void 0:pe.getBoundingClientRect())??null},[]),W=HNe({getBox:Z,lane:E,range:a,pointAt:L,xOf:_,yOf:j,commitPoints:$,snapTimes:f,readOnly:h,onSelect:d,onRangeSelect:g,onRangeClear:v,duration:t,rangeSelection:y}),{dragIndex:Y,curveIndex:J,edgeDrag:ne,edgeHover:ie,hint:le,editing:q}=W,F=x.useCallback(pe=>{h||$(E.points.filter((be,me)=>me!==pe),!0)},[E,$,h]),[U,z]=x.useState(null),[K,te]=x.useState(!1),ee=x.useCallback(pe=>{if(!y)return;const be=zNe({shape:pe,lane:E,range:a,t0:y.t0,t1:y.t1});$(P6({lane:E,range:a,t0:y.t0,t1:y.t1,inner:be}),!0)},[y,E,a,$]),H=x.useCallback(()=>{if(!y)return;const pe=UNe(T6(E,y.t0,y.t1),a);$(P6({lane:E,range:a,t0:y.t0,t1:y.t1,inner:pe}),!0)},[y,E,a,$]),Q=x.useCallback(pe=>{h||!y||mg(L(pe.clientX,pe.clientY),y)&&(pe.preventDefault(),z({x:pe.clientX,y:pe.clientY}))},[h,y,L]),oe=E.points.length>0&&l!==null?n0(E,l,a.scale):null;return m.jsxs("div",{className:"hf-automation-lane pointer-events-none absolute",style:{top:r,left:0,right:0,height:M},"data-automation-lane":s,children:[m.jsx("div",{"data-automation-lane-border":"",className:"hf-automation-lane-border pointer-events-none absolute",style:{top:0,left:0,right:0,height:1,background:WNe,zIndex:1}}),m.jsxs("svg",{ref:w,className:"hf-automation-svg pointer-events-auto absolute",style:{left:n-gl,top:0,width:e+gl*2,height:M,cursor:KNe(h,Y!==null||J!==null,ne!==null||ie),opacity:h?.55:1,touchAction:"none"},width:e+gl*2,height:M,onPointerEnter:()=>te(!0),onPointerLeave:()=>te(!1),onPointerDown:W.onPointerDown,onPointerMove:W.onPointerMove,onPointerUp:W.endDrag,onPointerCancel:W.cancelDrag,onDoubleClick:W.onDoubleClick,onContextMenu:Q,role:"group","aria-label":`${a.label} automation`,children:[m.jsx("title",{children:h?"Drag a box to select points, which also selects this clip; then double-click to add a point":"Double-click to add a point, drag to shape, double-click a point to type a value, right-click or Shift+click to remove it. Drag the background to draw a box around points, then Delete to remove them or drag one to move them all. Alt-drag the line to curve it. Shift locks an axis mid-drag; Alt ignores the grid."}),m.jsx("line",{x1:gl,x2:gl+e,y1:N+I/2,y2:N+I/2,stroke:"rgba(255,255,255,0.08)",strokeDasharray:"3 4"}),y?m.jsx("rect",{"data-automation-selection":"",x:_(y.t0),y:j(y.v1),width:Math.max(0,_(y.t1)-_(y.t0)),height:Math.max(0,j(y.v0)-j(y.v1)),fill:o,opacity:.15,stroke:o,strokeOpacity:.6,pointerEvents:"none"}):null,m.jsx("path",{d:V,fill:"none",stroke:o,strokeWidth:1.5,opacity:E.points.length===0?.35:.95}),E.points.map((pe,be)=>{const me=YNe(pe,y),{radius:Ae,stroke:De,strokeWidth:Se}=qNe(me,be===Y);return m.jsx("circle",{"data-automation-point":be,...me?{"data-automation-point-in-range":""}:{},cx:_(pe.t),cy:j(pe.v),r:Ae,fill:o,stroke:De,strokeWidth:Se,style:{cursor:h?"default":"grab",opacity:K||Y!==null||y?1:0},onContextMenu:ye=>{ye.preventDefault(),ye.stopPropagation(),F(be)}},`${be}-${pe.t}`)}),l!==null&&oe!==null?m.jsx("circle",{"data-automation-playhead":"",cx:_(l),cy:j(oe),r:2.5,fill:"#fff",opacity:.8,pointerEvents:"none"}):null]}),q?m.jsx(QNe,{text:q.text,leftPx:n+_(((fe=E.points[q.index])==null?void 0:fe.t)??0)-gl-18,label:a.label,onChange:W.setEditingText,onCommit:W.commitEdit,onCancel:W.cancelEdit}):null,le?m.jsx("div",{className:"hf-automation-hint pointer-events-none absolute rounded-[3px] bg-black/80 px-1 py-0.5 font-mono text-[9px] text-white",style:{left:n+6,top:2,zIndex:3},children:le}):null,U&&y?m.jsx(GNe,{x:U.x,y:U.y,onClose:()=>z(null),onInsertShape:ee,onSimplify:H,canSimplify:T6(E,y.t0,y.t1).length>=3}):null]})}const LU={version:1,lanes:[]},eDe=new Map,tDe=new Map,nDe=64;function zle(t,e,n){const r=t.get(e);if(r!==void 0)return t.delete(e),t.set(e,r),r;const i=n();if(t.size>=nDe){const s=t.keys().next();s.done||t.delete(s.value)}return t.set(e,i),i}function sL(t){const e=t.fxChain;return e?zle(eDe,e,()=>{try{return qC(e)}catch{return null}}):null}function Gle(t){const e=t.automation;if(!e)return LU;const n=sL(t);return zle(tDe,`${e}\0${t.fxChain??""}`,()=>{try{const r=Uie(Xie(e),n??void 0);return{...r,lanes:rDe(r.lanes,n)}}catch{return LU}})}function Ule(t){return Gle(t).lanes}function Xle(t,e){var s;const n=ZA(t);if(!n||n.kind!=="fx")return null;const r=e==null?void 0:e.nodes.find(a=>a.id===n.nodeId),i=(s=r==null?void 0:r.params)==null?void 0:s.frequency;return typeof i=="number"?i:null}function rDe(t,e){const n=[],r=[];for(const i of t){const s=Xle(i.target,e);s===null?r.push(i):n.push({lane:i,freq:s})}return n.sort((i,s)=>s.freq-i.freq),[...n.map(i=>i.lane),...r]}function Wle(t){if(t<1e3)return`${Math.round(t)} Hz`;const e=t/1e3;return`${e>=10?Math.round(e):Number(e.toFixed(1))} kHz`}function Yle(t,e){const n=t0(t,e??void 0);if(!n)return null;const r=n.label.split(" · "),i=r.at(-1)??n.label,s=r.length>1?r.slice(0,-1).join(" · "):null,a=Xle(t,e),o=[s,a===null?null:Wle(a)].filter(Boolean).join(" ");return{name:o||i,param:o?i:""}}function iDe(t,e){return sDe(t,e)}function aS(t){const e=new Map;for(const n of t){if(!Rl(n))continue;const r=sL(n);for(const i of Ule(n)){const s=iDe(i.target,r),a=Yle(i.target,r);if(!s||!a)continue;const o=e.get(s);o?o.entries.push({element:n,lane:i}):e.set(s,{key:s,name:a.name,param:a.param,entries:[{element:n,lane:i}]})}}return[...e.values()]}function sDe(t,e){const n=Yle(t,e);return n?n.param?`${n.name} · ${n.param}`:n.name:null}function aDe({element:t,rows:e,isSelected:n,lanes:r,pps:i,top:s,accentColor:a,currentTime:o,beatTimes:l}){const c=x.useMemo(()=>(l??[]).filter(h=>h>=t.start&&h<=t.start+t.duration).map(h=>h-t.start),[l,t.start,t.duration]),u=r.bind(t,n);if(x.useEffect(()=>{var d;const h=(d=u.selection)==null?void 0:d.target;h!==void 0&&!u.lanes.some(y=>y.target===h)&&u.onRangeClear()},[u]),e.length===0)return null;const f=o>=t.start&&o<=t.start+t.duration;return m.jsx(m.Fragment,{children:e.map(({lane:h,rowIndex:d})=>{var g;const y=t0(h.target,u.chain??void 0);return y?m.jsx(JNe,{duration:t.duration,widthPx:Math.max(t.duration*i,4),leftPx:t.start*i,topPx:s+d*XA,automation:u.automation,target:h.target,range:y,accentColor:a,playheadSec:f?o-t.start:null,onPreview:u.onPreview,onCommit:u.onCommit,onSelect:u.onSelect,snapTimes:c,readOnly:u.readOnly,rangeSelection:((g=u.selection)==null?void 0:g.target)===h.target?{t0:u.selection.t0,t1:u.selection.t1,v0:u.selection.v0,v1:u.selection.v1}:null,onRangeSelect:(v,b,w,O)=>u.onRangeSelect(h.target,v,b,w,O),onRangeClear:u.onRangeClear},h.target):null})})}function oDe({elements:t,isSelected:e,lanes:n,pps:r,laneCount:i,accentColor:s,currentTime:a,beatTimes:o}){const l=t.filter(Rl),c=new Map;aS(l).forEach((f,h)=>{for(const d of f.entries){const y=Hn(d.element),g=c.get(y);g?g.push({lane:d.lane,rowIndex:h}):c.set(y,[{lane:d.lane,rowIndex:h}])}});const u=cg(i);return m.jsx(m.Fragment,{children:l.map(f=>m.jsx(aDe,{element:f,rows:c.get(Hn(f))??[],isSelected:e(f),lanes:n,pps:r,top:u,accentColor:s,currentTime:a,beatTimes:o},Hn(f)))})}const aL=x.createContext(null),oL=x.createContext(null);function EE(){const t=x.useContext(aL);if(!t)throw new Error("useDomEditActionsContext must be used within DomEditProvider");return t}function oS(){return x.useContext(aL)}function lS(){const t=x.useContext(oL);if(!t)throw new Error("useDomEditSelectionContext must be used within DomEditProvider");return t}function lDe(){return x.useContext(oL)}function TE(){return{...EE(),...lS()}}function cDe({value:{domEditSelection:t,domEditGroupSelections:e,domEditHoverSelection:n,agentModalOpen:r,agentModalAnchorPoint:i,copiedAgentPrompt:s,agentPromptSelectionContext:a,domEditSelectionRef:o,handleTimelineElementSelect:l,handlePreviewCanvasMouseDown:c,handlePreviewCanvasPointerMove:u,handlePreviewCanvasPointerLeave:f,applyDomSelection:h,clearDomSelection:d,handleDomStyleCommit:y,handleDomAttributeCommit:g,handleDomAttributeLiveCommit:v,handleDomAttributeQuietCommit:b,handleDomHtmlAttributeCommit:w,handleDomAttributesCommit:O,handleDomPathOffsetCommit:C,handleDomGroupPathOffsetCommit:E,handleDomZIndexReorderCommit:M,handleDomBoxSizeCommit:N,handleDomRotationCommit:I,handleDomManualEditsReset:_,handleDomTextCommit:j,handleDomRichTextCommit:L,handleDomTextFieldStyleCommit:V,handleDomAddTextField:$,handleDomRemoveTextField:Z,handleAskAgent:W,handleAgentModalSubmit:Y,handleBlockedDomMove:J,handleDomManualDragStart:ne,handleDomEditElementDelete:ie,handleGroupSelection:le,handleUngroupSelection:q,setActiveGroupElement:F,activeGroupElement:U,buildDomSelectionFromTarget:z,buildDomSelectionForTimelineElement:K,updateDomEditHoverSelection:te,resolveImportedFontAsset:ee,setAgentModalOpen:H,setAgentPromptSelectionContext:Q,setAgentModalAnchorPoint:oe,selectedGsapAnimations:fe,gsapMultipleTimelines:pe,gsapUnsupportedTimelinePattern:be,handleGsapUpdateProperty:me,handleGsapUpdateMeta:Ae,handleGsapDeleteAnimation:De,handleGsapDeleteAllForElement:Se,handleGsapAddAnimation:ye,handleGsapAddProperty:we,handleGsapRemoveProperty:ke,handleGsapUpdateFromProperty:Pe,handleGsapAddFromProperty:Ve,handleGsapRemoveFromProperty:Ke,handleGsapAddKeyframe:ze,handleGsapAddKeyframeBatch:Ye,handleGsapRemoveKeyframe:pt,handleGsapMoveKeyframeToPlayhead:st,handleGsapMoveKeyframe:St,handleGsapResizeKeyframedTween:$e,handleGsapConvertToKeyframes:qe,handleGsapRemoveAllKeyframes:tt,handleResetSelectedElementKeyframes:Gt,commitAnimatedProperty:Dt,commitAnimatedProperties:We,handleSetArcPath:wt,handleUpdateArcSegment:ut,handleUnroll:dt,invalidateGsapCache:cn,previewIframeRef:nn,commitMutation:rn,applyMarqueeSelection:zt,handleUpdateKeyframeEase:Ne,handleUpdateSegmentEase:Me,handleSetAllKeyframeEases:Ze},children:nt}){const Wt=x.useRef(rn);Wt.current=rn;const mn=x.useCallback((hr,gt)=>Wt.current(hr,gt),[]),Pn=x.useMemo(()=>({handleTimelineElementSelect:l,handlePreviewCanvasMouseDown:c,handlePreviewCanvasPointerMove:u,handlePreviewCanvasPointerLeave:f,applyDomSelection:h,clearDomSelection:d,handleDomStyleCommit:y,handleDomAttributeCommit:g,handleDomAttributeLiveCommit:v,handleDomAttributeQuietCommit:b,handleDomHtmlAttributeCommit:w,handleDomAttributesCommit:O,handleDomPathOffsetCommit:C,handleDomGroupPathOffsetCommit:E,handleDomZIndexReorderCommit:M,handleDomBoxSizeCommit:N,handleDomRotationCommit:I,handleDomManualEditsReset:_,handleDomTextCommit:j,handleDomRichTextCommit:L,handleDomTextFieldStyleCommit:V,handleDomAddTextField:$,handleDomRemoveTextField:Z,handleAskAgent:W,handleAgentModalSubmit:Y,handleBlockedDomMove:J,handleDomManualDragStart:ne,handleDomEditElementDelete:ie,handleGroupSelection:le,handleUngroupSelection:q,setActiveGroupElement:F,buildDomSelectionFromTarget:z,buildDomSelectionForTimelineElement:K,updateDomEditHoverSelection:te,resolveImportedFontAsset:ee,setAgentModalOpen:H,setAgentPromptSelectionContext:Q,setAgentModalAnchorPoint:oe,handleGsapUpdateProperty:me,handleGsapUpdateMeta:Ae,handleGsapDeleteAnimation:De,handleGsapDeleteAllForElement:Se,handleGsapAddAnimation:ye,handleGsapAddProperty:we,handleGsapRemoveProperty:ke,handleGsapUpdateFromProperty:Pe,handleGsapAddFromProperty:Ve,handleGsapRemoveFromProperty:Ke,handleGsapAddKeyframe:ze,handleGsapAddKeyframeBatch:Ye,handleGsapRemoveKeyframe:pt,handleGsapMoveKeyframeToPlayhead:st,handleGsapMoveKeyframe:St,handleGsapResizeKeyframedTween:$e,handleGsapConvertToKeyframes:qe,handleGsapRemoveAllKeyframes:tt,handleResetSelectedElementKeyframes:Gt,commitAnimatedProperty:Dt,commitAnimatedProperties:We,handleSetArcPath:wt,handleUpdateArcSegment:ut,handleUnroll:dt,invalidateGsapCache:cn,previewIframeRef:nn,commitMutation:mn,applyMarqueeSelection:zt,handleUpdateKeyframeEase:Ne,handleUpdateSegmentEase:Me,handleSetAllKeyframeEases:Ze}),[l,c,u,f,h,d,y,g,v,b,w,O,C,E,M,N,I,_,j,L,V,$,Z,W,Y,J,ne,ie,le,q,F,z,K,te,ee,H,Q,oe,me,Ae,De,Se,ye,we,ke,Pe,Ve,Ke,ze,Ye,pt,st,St,$e,qe,tt,Gt,Dt,We,wt,ut,dt,cn,nn,mn,zt,Ne,Me,Ze]),qt=x.useMemo(()=>({domEditSelection:t,domEditGroupSelections:e,domEditHoverSelection:n,activeGroupElement:U,domEditSelectionRef:o,selectedGsapAnimations:fe,gsapMultipleTimelines:pe,gsapUnsupportedTimelinePattern:be,agentModalOpen:r,agentModalAnchorPoint:i,copiedAgentPrompt:s,agentPromptSelectionContext:a}),[t,e,n,U,o,fe,pe,be,r,i,s,a]);return m.jsx(aL,{value:Pn,children:m.jsx(oL,{value:qt,children:nt})})}function _f(t){const e=fDe(t);return e?e.isContentEditable?!0:e.closest(uDe)!==null:!1}const uDe=["input","textarea","select","[contenteditable]:not([contenteditable='false'])","[role='textbox']","[role='searchbox']","[role='combobox']",".cm-editor"].join(",");function fDe(t){return!t||typeof t!="object"?null:typeof t.closest=="function"?t:null}function qle(t){return t.label||t.id||t.tag}function FU(t){const e=t.trim(),n=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(n).replace(/\\/g,"/").replace(/^\.?\//,"")}function hDe(t,e){const n=FU(t).split("/").filter(Boolean),r=FU(e).split("/").filter(Boolean);for(n.pop();n.length>0&&r.length>0&&n[0]===r[0];)n.shift(),r.shift();return[...n.map(()=>".."),...r].join("/")||e}function dDe(t){return/^(?:\/|[A-Za-z]:[\\/]|\\\\)/.test(t)}function pDe(t,e){const n=e.trim();if(!n)return;const r=n.replace(/\\/g,"/");if(dDe(r))return r;const i=t==null?void 0:t.trim().replace(/\\/g,"/").replace(/\/+$/,"");if(i)return`${i}/${r.replace(/^\.?\//,"")}`}function KI(t,e){const n=e.trim();return n&&(["border-radius","border-width","font-size","letter-spacing"].includes(t)&&/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n)}function mDe(t){return/^url\(/i.test(t.trim())}function gDe(t){return t==="left"||t==="top"||t==="width"||t==="height"}function Kle(t){if(!t||typeof t!="object")return null;const e=t;return e.nodeType===1?t:e.nodeType===3&&e.parentElement?e.parentElement:null}function Jle(t){return _f(t)}function L8(t){const n=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/i.test(navigator.platform)?"Cmd":"Ctrl";return t==="undo"?`${n}+Z`:`${n}+Shift+Z`}function yDe(t,e,n){return t.id?e.domId===t.id&&(e.sourceFile||"index.html")===n:!1}function xDe(t,e){return!t.isCompositionHost||!t.compositionSrc?!1:e.compositionSrc===t.compositionSrc}function bDe(t,e){return t.selector?e.selector===t.selector&&(e.selectorIndex??0)===(t.selectorIndex??0)&&(e.sourceFile??"index.html")===t.sourceFile:!1}function lL(t,e){const n=t.sourceFile||"index.html",r=t.id?e.find(a=>yDe(t,a,n)):void 0;if(r)return r.key??r.id;const i=t.selector?e.find(a=>bDe(t,a)):void 0;if(i)return i.key??i.id;const s=e.find(a=>xDe(t,a));return s?s.key??s.id:t.id&&n!=="index.html"?`${n}#${t.id}`:null}function ece(t,e,n){let r=(t==null?void 0:t.parentElement)??null;for(;r;){const i=r.id;if(i){const s=e.find(a=>a.domId===i&&(a.sourceFile??"index.html")===n);if(s)return s.key??s.id}r=r.parentElement}return null}function M6(t,e,n){return lL(t,e)??ece(t.element,e,t.sourceFile||n||"index.html")}function vDe(t,e,n){return t.map(r=>M6(r,e,n)).filter(r=>r!==null)}function ADe(t,e){if(!e||!Number.isFinite(e.start)||!Number.isFinite(e.duration))return null;const n=Math.max(0,e.start),r=Math.max(n,n+Math.max(0,e.duration)),i=Number.isFinite(t)?t:n;return Er(i,n,r)}function Er(t,e,n){return n<e?e:Math.min(Math.max(t,e),n)}function cL(t){return Array.from(t.matchAll(/\bid="([^"]+)"/g),e=>e[1]??"")}const F8={image:3,video:5,audio:5};async function $U(t,e,n){if(n==="image")return F8.image;const r=document.createElement(n==="video"?"video":"audio");r.preload="metadata",r.src=`/api/projects/${t}/preview/${e}`;const i=await new Promise(s=>{const a=window.setTimeout(()=>s(F8[n]),3e3),o=l=>{window.clearTimeout(a),s(l)};r.addEventListener("loadedmetadata",()=>{const l=Number(r.duration);o(Number.isFinite(l)&&l>0?ga(l):F8[n])},{once:!0}),r.addEventListener("error",()=>o(F8[n]),{once:!0})});return r.src="",r.load(),i}function SDe(t=()=>`automation-gesture:${++wDe}`){let e=null;const n=r=>({key:r,ms:Number.POSITIVE_INFINITY});return{live:()=>(e??(e=t()),n(e)),commit:()=>{const r=e??t();return e=null,n(r)}}}let wDe=0;function ODe(){var c;const t=x.useRef(SDe()),e=oS(),n=((c=lDe())==null?void 0:c.domEditSelection)??null,r=ue(u=>u.elements),i=ue(u=>u.automationSelection),s=ue(u=>u.setAutomationSelection),a=ue(u=>u.clearAutomationSelection),o=x.useMemo(()=>n?M6(n,r,null):null,[n,r]),l=x.useCallback((u,f)=>{const h=sL(u),d=Gle(u),y=Hn(u),g=(v,b)=>{if(!e||!f)return;const w=v.lanes.length>0?Wie(v):"",O=b?t.current.commit():t.current.live();b?e.handleDomAttributeQuietCommit(kl,w,O):e.handleDomAttributeLiveCommit(kl,w||null,void 0,{coalesce:O,previewOnly:!0})};return{automation:d,lanes:d.lanes,chain:h,onPreview:v=>g(v,!1),onCommit:v=>g(v,!0),onSelect:()=>void(e==null?void 0:e.handleTimelineElementSelect(u)),readOnly:!e||!f,commitTargetKey:e?o:null,selection:(i==null?void 0:i.elementKey)===y?i:null,onRangeSelect:(v,b,w,O,C)=>{e&&s({elementKey:y,target:v,t0:b,t1:w,v0:O,v1:C})},onRangeClear:()=>a()}},[e,o,i,s,a]);return x.useMemo(()=>({bind:l}),[l])}let BU=null,uL=null,wp=null;function tce(t){t!==BU&&(BU=t,uL=null,wp=null)}function kDe(t,e,n,r,i){const s=T6(e,r,i).map(a=>({...a,t:a.t-r}));return s.length===0&&e.points.length===0?!1:(tce(t),uL={sourceRange:n,span:i-r,points:s.length>0?s:[{t:0,v:n0(e,r,n.scale)},{t:i-r,v:n0(e,i,n.scale)}]},!0)}function nce(t){return tce(t),uL}function CDe(t,e,n){return t.points.map(r=>({...r,t:n+r.t,v:CE(e,dc(t.sourceRange,r.v))}))}function EDe(t){wp={...t}}function TDe(t){return wp?wp.elementKey===t.elementKey&&wp.target===t.target&&wp.t0===t.t0&&wp.t1===t.t1:!1}function rce(t){if(!t)return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"?!0:t instanceof HTMLElement&&t.isContentEditable}function N6(t,e){return(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===e}function fL(t){return t.key??t.id}function hL(t,e){return e?t.find(n=>fL(n)===e)??null:null}function ice(t,e,n){const r=hL(t.elements,n.elementKey);if(!r)return null;const i=e.bind(r,n.elementKey===t.selectedElementId);if(i.readOnly)return null;const s=t0(n.target,i.chain??void 0);return s?{binding:i,lane:tL(i.automation,n.target),range:s}:null}function PDe(t,e,n){const r=ice(t,e,n);if(!r)return null;const i=r.lane.points.filter(s=>!mg(s,n));return i.length===r.lane.points.length?null:{onCommit:r.binding.onCommit,next:nL(r.binding.automation,{target:n.target,points:i})}}function MDe(t,e,n){var r;return n&&n.elementKey===e?n.target:(r=t.lanes[0])==null?void 0:r.target}function NDe(t,e,n){const r=hL(t.elements,t.selectedElementId);if(!r)return null;const i=fL(r),s=e.bind(r,!0);if(s.readOnly||s.commitTargetKey!==i)return null;const a=MDe(s,i,n);if(!a)return null;const o=t0(a,s.chain??void 0);return o?{elementKey:i,element:r,target:a,binding:s,lane:tL(s.automation,a),range:o}:null}function DDe(t,e){return t.currentTime>=e.start&&t.currentTime<=e.start+e.duration}function sce(t,e,n,r){if(n>e.duration)return null;const s=r!==null&&r.elementKey===fL(e)?TDe(r)?r.t1:r.t0:DDe(t,e)?t.currentTime-e.start:null;return s===null?null:Er(s,0,e.duration-n)}function IDe(t,e,n){if(!N6(t,"v"))return!1;const r=nce(e.timelineProjectId);if(!r)return!1;const i=e.automationSelection,s=NDe(e,n,i);if(!s)return!1;const a=sce(e,s.element,r.span,i);if(a===null)return!1;const o=a+r.span,l=CDe(r,s.range,a),c=P6({lane:s.lane,range:s.range,t0:a,t1:o,inner:l});t.preventDefault(),t.stopImmediatePropagation(),s.binding.onCommit(nL(s.binding.automation,{target:s.target,points:c}));const u={elementKey:s.elementKey,target:s.target,t0:a,t1:o,v0:s.range.min,v1:s.range.max};return e.setAutomationSelection(u),EDe(u),!0}function _De(t,e,n,r){if(!N6(t,"c"))return!1;const i=ice(e,n,r);return!i||!kDe(e.timelineProjectId,i.lane,i.range,r.t0,r.t1)?!1:(t.preventDefault(),t.stopImmediatePropagation(),!0)}function RDe(t){if(rce(document.activeElement))return!1;const e=ue.getState();if(N6(t,"c"))return e.automationSelection!==null;if(!N6(t,"v"))return!1;const n=nce(e.timelineProjectId);if(!n)return!1;const r=hL(e.elements,e.selectedElementId);return r?sce(e,r,n.span,e.automationSelection)!==null:!1}function jDe(t,e,n,r){if(!(t.key==="Delete"||t.key==="Backspace")||t.metaKey||t.ctrlKey)return!1;const s=PDe(e,n,r);return s?(t.preventDefault(),t.stopImmediatePropagation(),s.onCommit(s.next),!0):!1}function LDe({lanes:t}){x.useEffect(()=>{const e=n=>{if(rce(document.activeElement)||n.defaultPrevented)return;const r=ue.getState();if(IDe(n,r,t))return;const i=r.automationSelection;if(i){if(n.key==="Escape"){r.clearAutomationSelection();return}_De(n,r,t,i)||jDe(n,r,t,i)}};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[t])}const D6="data-fx-carve",FDe=[160,250,400,630,1e3,1600,2500,4e3,6e3],qr=4096,$De=2048,BDe=/sfx|foley|whoosh|impact|riser|stinger|swoosh|thud|boom|click|ding|beep|ambien|room[-_ ]?tone/i,VDe="(?<![a-z0-9])",HDe="(?![a-z0-9])",$2=t=>`${VDe}${t}${HDe}`,QDe=new RegExp(`music|bgm|${$2("bed")}|soundtrack|score|${$2("song")}|theme|instrumental|track\\d`,"i"),ZDe=new RegExp(`voice|${$2("vo")}|${$2("vox")}|narrat|speech|dialog|monolog|announce|${$2("tts")}|talk|interview|podcast|recap|script`,"i");function Qv(...t){const e=t.filter(Boolean).join(" ");return ZDe.test(e)?"voice":BDe.test(e)?"sfx":QDe.test(e)?"music":"unknown"}function zDe(t,e){const n=r=>typeof r.duration=="number"&&Number.isFinite(r.duration)?r.start+Math.max(0,r.duration):Number.POSITIVE_INFINITY;return t.start<n(e)&&e.start<n(t)}const gg={enabled:!0,sources:[],strength:.25};function GDe(t){const e=Number.isFinite(t)?Math.min(1,Math.max(0,t)):.5;return{maxCutDb:Number((2+e*16).toFixed(2)),bands:Math.max(1,Math.min(6,Math.round(1+e*6))),q:Number((1.1+e*1.2).toFixed(2)),intelligibilityBias:Number(Math.min(1,.6+e*.4).toFixed(2)),duckDb:Number((e*24).toFixed(2)),headroomDb:Number((6+e*12).toFixed(2))}}function ace(t){const e=t,n=o=>{const l=typeof o=="number"?o:Number(o);return Number.isFinite(l)?l:null};if(t==null)return{...gg};const r=n(t==null?void 0:t.strength),i=n(t==null?void 0:t.maxCutDb),s=r!==null?r:i!==null?(i-2)/16:gg.strength,a=Array.isArray(t==null?void 0:t.sources)?t.sources:typeof(e==null?void 0:e.source)=="string"?[e.source]:[];return{enabled:(t==null?void 0:t.enabled)!==!1,sources:a.filter(o=>typeof o=="string"&&o!==""),strength:Math.min(1,Math.max(0,s))}}function UDe(t,e){const n=t.map(s=>({samples:s.samples,at:Math.round(s.offsetSeconds*e)})),r=n.reduce((s,a)=>Math.max(s,a.at+a.samples.length),0);if(r<=0)return new Float32Array(0);const i=new Float32Array(r);for(const{samples:s,at:a}of n){const o=a<0?-a:0;for(let l=o;l<s.length;l+=1){const c=a+l;c<0||c>=r||(i[c]=(i[c]??0)+(s[l]??0))}}return i}function XDe(t,e){const n=Math.max(t.length,qr),r=t.length>=qr?t:(()=>{const h=new Float32Array(qr);return h.set(t),h})(),i=new Float32Array(qr);for(let h=0;h<qr;h++)i[h]=.5-.5*Math.cos(2*Math.PI*h/(qr-1));const s=qr/2+1,a=new Float64Array(s),o=new Float64Array(qr),l=new Float64Array(qr);let c=0;for(let h=0;h+qr<=n;h+=$De){l.fill(0);for(let d=0;d<qr;d++)o[d]=(r[h+d]??0)*i[d];oce(o,l);for(let d=0;d<s;d++)a[d]+=o[d]*o[d]+l[d]*l[d];c++}c===0&&(c=1);const u=[],f=[];for(let h=0;h<s;h++)u.push(h*e/qr),f.push(a[h]/c);return{freqs:u,power:f}}function oce(t,e){const n=t.length;for(let r=1,i=0;r<n;r++){let s=n>>1;for(;i&s;s>>=1)i^=s;i^=s,r<i&&([t[r],t[i]]=[t[i],t[r]],[e[r],e[i]]=[e[i],e[r]])}for(let r=2;r<=n;r<<=1){const i=-2*Math.PI/r,s=Math.cos(i),a=Math.sin(i);for(let o=0;o<n;o+=r){let l=1,c=0;for(let u=0;u<r/2;u++){const f=t[o+u],h=e[o+u],d=t[o+u+r/2]*l-e[o+u+r/2]*c,y=t[o+u+r/2]*c+e[o+u+r/2]*l;t[o+u]=f+d,e[o+u]=h+y,t[o+u+r/2]=f-d,e[o+u+r/2]=h-y;const g=l*s-c*a;c=l*a+c*s,l=g}}}}function lce(t,e,n){const r=n/Math.pow(2,.16666666666666666),i=n*Math.pow(2,1/6);let s=0,a=0;for(let o=0;o<t.length;o++)t[o]>=r&&t[o]<i&&(s+=e[o],a++);return a>0?s/a:0}const WDe=30;function YDe(t,e){const n=Math.log2(t/2e3),r=Math.exp(-(n*n)/2);return e*WDe*(1-r)}function qDe(t,e,n){if(t.length===0)return[];const{freqs:r,power:i}=XDe(t,e),a=FDe.map(l=>{const c=lce(r,i,l);return{center:l,hasEnergy:c>0,scoreDb:c>0?10*Math.log10(c)-YDe(l,n.intelligibilityBias):Number.NEGATIVE_INFINITY}}).sort((l,c)=>c.scoreDb-l.scoreDb).slice(0,Math.max(1,n.bands)).filter(l=>l.hasEnergy);if(a.length===0)return[];const o=a[0].scoreDb;return a.map(({center:l,scoreDb:c})=>{const u=Math.pow(10,(c-o)/10),f=Math.min(n.maxCutDb,Math.max(n.maxCutDb/2,n.maxCutDb*u));return{freq:l,gainDb:-Number(f.toFixed(2)),q:n.q}}).sort((l,c)=>l.freq-c.freq)}const cce=30,uce=.05,KDe=.25,JDe=1.6,fce=400,g4=.2,hce=.5;function dce(t,e){const n=[{t:0,v:0}];let r=0,i=-1;return t.forEach((s,a)=>{a!==t.length-1&&Math.abs(s.v-r)<e||(a>0&&i!==a-1&&n.push(t[a-1]),n.push(s),r=s.v,i=a)}),n}function eIe(t,e,n){if(t.length===0||n.length===0)return[];const r=new Float32Array(qr);for(let y=0;y<qr;y++)r[y]=.5-.5*Math.cos(2*Math.PI*y/(qr-1));const i=Math.max(qr,Math.ceil(t.length/fce)),s=qr/2+1,a=[];for(let y=0;y<s;y++)a.push(y*e/qr);const o=[],l=n.map(()=>[]),c=new Float64Array(qr),u=new Float64Array(qr);for(let y=0;y<t.length;y+=i){u.fill(0);for(let v=0;v<qr;v++)c[v]=(t[y+v]??0)*r[v];oce(c,u);const g=[];for(let v=0;v<s;v++)g.push(c[v]*c[v]+u[v]*u[v]);o.push((y+qr/2)/e),n.forEach((v,b)=>l[b].push(lce(a,g,v.freq)))}const f=t.length/e,h=1-Math.exp(-(i/e)/uce),d=1-Math.exp(-(i/e)/KDe);return n.map((y,g)=>{const v=l[g],b=Math.max(...v);let w=0;const O=[];v.forEach((E,M)=>{const N=E>0&&b>0?Math.max(0,1+10*Math.log10(E/b)/cce):0;w+=(N>w?h:d)*(N-w);const I=y.gainDb*w,_=Math.abs(I)<g4?0:Number(I.toFixed(1));O.push({t:Number(o[M].toFixed(3)),v:_})});const C=dce(O,hce);return C.push({t:Number(Math.max(f,C.at(-1).t).toFixed(3)),v:0}),{freq:y.freq,points:C}})}function VU(t,e,n){let r=0,i=0;for(let a=e;a<e+n;a++){const o=t[a];if(o===void 0)break;r+=o*o,i+=1}if(i===0)return Number.NEGATIVE_INFINITY;const s=Math.sqrt(r/i);return s>0?20*Math.log10(s):Number.NEGATIVE_INFINITY}function tIe(t,e,n,r,i){if(t.length===0||r.duckDb<=0)return[];const s=Math.max(qr,Math.ceil(t.length/fce)),a=Math.round(i*n),o=[],l=[],c=[];for(let M=0;M<t.length;M+=s)o.push(VU(t,M,qr)),l.push(VU(e,M+a,qr)),c.push((M+qr/2)/n);const f=Math.max(...o)-cce,h=1-Math.exp(-(s/n)/uce),d=1-Math.exp(-(s/n)/JDe);let y=0;const g=[];o.forEach((M,N)=>{const I=l[N]??Number.NEGATIVE_INFINITY,_=M>f&&Number.isFinite(I)?I-(M-r.headroomDb):0,j=Math.min(r.duckDb,Math.max(0,_));y+=(j>y?h:d)*(j-y);const L=y<g4?0:-Number(y.toFixed(1));g.push({t:Number(c[N].toFixed(3)),v:L})});const v=s/n;let b=c.at(-1)??0;for(;y>=g4;)y+=d*-y,b+=v,g.push({t:Number(b.toFixed(3)),v:y<g4?0:-Number(y.toFixed(1))});const w=dce(g,hce),O=t.length/n,C=w.at(-1),E=Number(Math.max(O,C.t).toFixed(3));return C.v===0&&C.t>=E||w.push({t:E,v:0}),w}function nIe(t){const e=t.map(n=>({type:"peaking",enabled:!0,params:{...Mf("peaking"),frequency:n.freq,gain:n.gainDb,q:n.q}}));return{version:e0,nodes:e}}const rIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),iIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),sIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),aIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,128,128,232,24,128,128,24Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),oIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),lIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),cIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),x.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",x.createElement(x.Fragment,null,x.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,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),uIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),fIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M172,164a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,164Zm-12-52H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm60-64V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V48A20,20,0,0,1,56,28H90.53a51.88,51.88,0,0,1,74.94,0H200A20,20,0,0,1,220,48ZM100.29,60h55.42a28,28,0,0,0-55.42,0ZM196,52H178.59A52.13,52.13,0,0,1,180,64v8a12,12,0,0,1-12,12H88A12,12,0,0,1,76,72V64a52.13,52.13,0,0,1,1.41-12H60V212H196Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,48V216a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H96a39.83,39.83,0,0,0-8,24v8h80V64a39.83,39.83,0,0,0-8-24h40A8,8,0,0,1,208,48Z",opacity:"0.2"}),x.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm32,128H96a8,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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M166,152a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,152Zm-6-38H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm54-66V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V48A14,14,0,0,1,56,34H93.17a45.91,45.91,0,0,1,69.66,0H200A14,14,0,0,1,214,48ZM94,64v2h68V64a34,34,0,0,0-68,0ZM202,48a2,2,0,0,0-2-2H170.33A45.77,45.77,0,0,1,174,64v8a6,6,0,0,1-6,6H88a6,6,0,0,1-6-6V64a45.77,45.77,0,0,1,3.67-18H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200a2,2,0,0,0,2-2Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M164,152a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,152Zm-4-36H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm52-68V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V48A12,12,0,0,1,56,36H94.08a44,44,0,0,1,67.84,0H200A12,12,0,0,1,212,48ZM92,64v4h72V64a36,36,0,0,0-72,0ZM204,48a4,4,0,0,0-4-4H167.17A43.71,43.71,0,0,1,172,64v8a4,4,0,0,1-4,4H88a4,4,0,0,1-4-4V64a43.71,43.71,0,0,1,4.83-20H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200a4,4,0,0,0,4-4Z"}))]]),hIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),dIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),pIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),mIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,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,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",x.createElement(x.Fragment,null,x.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"}),x.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,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,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,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,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.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.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),gIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,67.24a39.77,39.77,0,0,0-12.51-28.52C199.91,24,174.71,24.5,159.29,39.93L142.48,56.84a28,28,0,0,0-35.64,3.29l-9,9a20,20,0,0,0-.73,27.49L48.9,144.84A43.76,43.76,0,0,0,37,185.28l-7.5,17.19a17.66,17.66,0,0,0,3.71,19.65,19.9,19.9,0,0,0,22.15,4.19l16.31-7.13a43.88,43.88,0,0,0,39.45-12.09l48.24-48.26a20,20,0,0,0,27.47-.73l9-9a28.06,28.06,0,0,0,3.26-35.72l17.23-17.33A39.69,39.69,0,0,0,228,67.24ZM94.15,190.11a20,20,0,0,1-20,5,11.93,11.93,0,0,0-8.32.47L57,199.38,60.69,191a12,12,0,0,0,.37-8.64,19.92,19.92,0,0,1,4.81-20.55l48.2-48.22,28.28,28.3Zm105.14-111-25.37,25.52a12,12,0,0,0,0,16.95l4.88,4.89a4,4,0,0,1,0,5.66l-6.14,6.15-55-55.05,6.14-6.14a4,4,0,0,1,5.65,0L134.35,82a12,12,0,0,0,8.49,3.51h0A12,12,0,0,0,151.34,82l24.94-25.08c6.3-6.3,16.48-6.63,22.71-.74a16,16,0,0,1,.3,23Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207.8,87.6l-25.37,25.53,4.89,4.88a16,16,0,0,1,0,22.64l-9,9a8,8,0,0,1-11.32,0l-60.68-60.7a8,8,0,0,1,0-11.32l9-9a16,16,0,0,1,22.63,0l4.88,4.89,25-25.11c10.79-10.79,28.37-11.45,39.45-1A28,28,0,0,1,207.8,87.6Z",opacity:"0.2"}),x.createElement("path",{d:"M224,67.3a35.79,35.79,0,0,0-11.26-25.66c-14-13.28-36.72-12.78-50.62,1.13L142.8,62.2a24,24,0,0,0-33.14.77l-9,9a16,16,0,0,0,0,22.64l2,2.06-51,51a39.75,39.75,0,0,0-10.53,38l-8,18.41A13.68,13.68,0,0,0,36,219.3a15.92,15.92,0,0,0,17.71,3.35L71.23,215a39.89,39.89,0,0,0,37.06-10.75l51-51,2.06,2.06a16,16,0,0,0,22.62,0l9-9a24,24,0,0,0,.74-33.18l19.75-19.87A35.75,35.75,0,0,0,224,67.3ZM97,193a24,24,0,0,1-24,6,8,8,0,0,0-5.55.31l-18.1,7.91L57,189.41a8,8,0,0,0,.25-5.75A23.88,23.88,0,0,1,63,159l51-51,33.94,34ZM202.13,82l-25.37,25.52a8,8,0,0,0,0,11.3l4.89,4.89a8,8,0,0,1,0,11.32l-9,9L112,83.26l9-9a8,8,0,0,1,11.31,0l4.89,4.89a8,8,0,0,0,5.65,2.34h0a8,8,0,0,0,5.66-2.36l24.94-25.09c7.81-7.82,20.5-8.18,28.29-.81a20,20,0,0,1,.39,28.7Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,67.3a35.79,35.79,0,0,0-11.26-25.66c-14-13.28-36.72-12.78-50.62,1.13L138.8,66.2a24,24,0,0,0-33.14.77l-5,5a16,16,0,0,0,0,22.64l2,2.06-51,51a39.75,39.75,0,0,0-10.53,38l-8,18.41A13.68,13.68,0,0,0,36,219.3a15.92,15.92,0,0,0,17.71,3.35L71.23,215a39.89,39.89,0,0,0,37.06-10.75l51-51,2.06,2.06a16,16,0,0,0,22.62,0l5-5a24,24,0,0,0,.74-33.18l23.75-23.87A35.75,35.75,0,0,0,224,67.3ZM97,193a24,24,0,0,1-24,6,8,8,0,0,0-5.55.31l-18.1,7.91L57,189.41a8,8,0,0,0,.25-5.75A23.88,23.88,0,0,1,63,159l51-51,33.94,34Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,67.34a33.81,33.81,0,0,0-10.64-24.25C198.12,30.56,176.68,31,163.54,44.18L142.82,65l-.63-.63a22,22,0,0,0-31.11,0l-9,9a14,14,0,0,0,0,19.81l3.47,3.47L53.14,149.1a37.79,37.79,0,0,0-9.84,36.73l-8.31,19a11.68,11.68,0,0,0,2.46,13A13.91,13.91,0,0,0,47.32,222,14.15,14.15,0,0,0,53,220.82L71,212.92a37.92,37.92,0,0,0,35.84-10.07l52.44-52.46,3.47,3.48a14,14,0,0,0,19.8,0l9-9a22,22,0,0,0,0-31.12l-.66-.66L212,91.85A33.76,33.76,0,0,0,222,67.34Zm-123.61,127a26,26,0,0,1-26,6.47,6,6,0,0,0-4.16.24l-20,8.75a2,2,0,0,1-2.09-.31l9.12-20.9a5.94,5.94,0,0,0,.19-4.31,25.88,25.88,0,0,1,6.26-26.72l52.44-52.45,36.76,36.78Zm105.16-111L178.17,108.9a6,6,0,0,0,0,8.47l4.88,4.89a10,10,0,0,1,0,14.15l-9,9a2,2,0,0,1-2.82,0l-60.69-60.7a2,2,0,0,1,0-2.83l9-9a10,10,0,0,1,14.14,0l4.89,4.89a6,6,0,0,0,4.24,1.75h0a6,6,0,0,0,4.25-1.77L172,52.66c8.58-8.58,22.52-9,31.08-.85a22,22,0,0,1,.44,31.57Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,67.3a35.79,35.79,0,0,0-11.26-25.66c-14-13.28-36.72-12.78-50.62,1.13L142.8,62.2a24,24,0,0,0-33.14.77l-9,9a16,16,0,0,0,0,22.64l2,2.06-51,51a39.75,39.75,0,0,0-10.53,38l-8,18.41A13.68,13.68,0,0,0,36,219.3a15.92,15.92,0,0,0,17.71,3.35L71.23,215a39.89,39.89,0,0,0,37.06-10.75l51-51,2.06,2.06a16,16,0,0,0,22.62,0l9-9a24,24,0,0,0,.74-33.18l19.75-19.87A35.75,35.75,0,0,0,224,67.3ZM97,193a24,24,0,0,1-24,6,8,8,0,0,0-5.55.31l-18.1,7.91L57,189.41a8,8,0,0,0,.25-5.75A23.88,23.88,0,0,1,63,159l51-51,33.94,34ZM202.13,82l-25.37,25.52a8,8,0,0,0,0,11.3l4.89,4.89a8,8,0,0,1,0,11.32l-9,9L112,83.26l9-9a8,8,0,0,1,11.31,0l4.89,4.89a8,8,0,0,0,11.33,0l24.94-25.09c7.81-7.82,20.5-8.18,28.29-.81a20,20,0,0,1,.39,28.7Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,67.37a31.82,31.82,0,0,0-10-22.82c-12.46-11.8-32.66-11.33-45,1.05L142.82,67.86l-2-2a20,20,0,0,0-28.28,0l-9,9a12,12,0,0,0,0,17l4.89,4.89L54.55,150.52A35.81,35.81,0,0,0,45.42,186l-8.6,19.7a9.7,9.7,0,0,0,2,10.79A12,12,0,0,0,52.15,219l18.72-8.18a35.9,35.9,0,0,0,34.59-9.37l53.86-53.87,4.88,4.89a12,12,0,0,0,17,0l9-9a20,20,0,0,0,0-28.3l-2.06-2.06,22.55-22.69A31.75,31.75,0,0,0,220,67.37ZM99.81,195.78a28,28,0,0,1-28,7,4,4,0,0,0-2.78.15l-20,8.75a4,4,0,0,1-4.43-.84,1.73,1.73,0,0,1-.36-1.93l9.19-21.06a4,4,0,0,0,.12-2.88,27.87,27.87,0,0,1,6.74-28.77l53.85-53.87,39.6,39.61Zm79.78-85.47a4,4,0,0,0,0,5.65l4.89,4.89a12,12,0,0,1,0,17l-9,9a4,4,0,0,1-5.66,0L109.18,86.1a4,4,0,0,1,0-5.66l9-9a12,12,0,0,1,17,0L140,76.36a4,4,0,0,0,2.83,1.17h0a4,4,0,0,0,2.83-1.18l25-25.1c9.33-9.34,24.52-9.73,33.87-.89A24,24,0,0,1,205,84.79Z"}))]]),yIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),xIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),bIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),vIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),AIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),SIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),wIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),OIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),kIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),CIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),EIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),TIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),PIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),MIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),NIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),DIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,100h72v56H44Zm96-24V60h24V76Zm-24,0H92V60h24Zm0,104v16H92V180Zm24,0h24v16H140Zm0-24V100h72v56Zm72-80H188V60h24ZM68,60V76H44V60ZM44,180H68v16H44Zm144,16V180h24v16Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M32,176H224v24a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8ZM216,48H40a8,8,0,0,0-8,8V80H224V56A8,8,0,0,0,216,48Z",opacity:"0.2"}),x.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,40ZM40,88h80v80H40Zm96-16V56h32V72Zm-16,0H88V56h32Zm0,112v16H88V184Zm16,0h32v16H136Zm0-16V88h80v80Zm80-96H184V56h32ZM72,56V72H40V56ZM40,184H72v16H40Zm176,16H184V184h32v16Z"}))],["fill",x.createElement(x.Fragment,null,x.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,40ZM184,56h32V72H184ZM72,200H40V184H72ZM72,72H40V56H72Zm48,128H88V184h32Zm0-128H88V56h32Zm48,128H136V184h32Zm0-128H136V56h32Zm48,128H184V184h32v16Z"}))],["light",x.createElement(x.Fragment,null,x.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,42ZM38,86h84v84H38Zm96-12V54h36V74Zm-12,0H86V54h36Zm0,108v20H86V182Zm12,0h36v20H134Zm0-12V86h84v84ZM218,56V74H182V54h34A2,2,0,0,1,218,56ZM40,54H74V74H38V56A2,2,0,0,1,40,54ZM38,200V182H74v20H40A2,2,0,0,1,38,200Zm178,2H182V182h36v18A2,2,0,0,1,216,202Z"}))],["regular",x.createElement(x.Fragment,null,x.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,40ZM40,88h80v80H40Zm96-16V56h32V72Zm-16,0H88V56h32Zm0,112v16H88V184Zm16,0h32v16H136Zm0-16V88h80v80Zm80-96H184V56h32ZM72,56V72H40V56ZM40,184H72v16H40Zm176,16H184V184h32v16Z"}))],["thin",x.createElement(x.Fragment,null,x.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,44ZM36,84h88v88H36Zm96-8V52h40V76Zm-8,0H84V52h40Zm0,104v24H84V180Zm8,0h40v24H132Zm0-8V84h88v88ZM220,56V76H180V52h36A4,4,0,0,1,220,56ZM40,52H76V76H36V56A4,4,0,0,1,40,52ZM36,200V180H76v24H40A4,4,0,0,1,36,200Zm180,4H180V180h40v20A4,4,0,0,1,216,204Z"}))]]),IIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),_Ie=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),RIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),jIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),LIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),FIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),$Ie=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M209.84,47.44A91.42,91.42,0,0,0,144.62,20h-.35A91.44,91.44,0,0,0,79.15,47L17.76,109.17a20,20,0,0,0,.08,28.21L46.5,166a19.89,19.89,0,0,0,14.15,5.86h.11a19.86,19.86,0,0,0,14.2-6l60.87-62.39a12.07,12.07,0,0,1,16.77-.12,11.63,11.63,0,0,1,3.5,8.35,12.85,12.85,0,0,1-3.66,9.11L90.19,181a20,20,0,0,0-.21,28.5l28.66,28.66a20.08,20.08,0,0,0,28.15.14l61.76-60.44.09-.09C244.65,141.78,245.18,83.31,209.84,47.44ZM60.62,146.21l-23-23L55.81,104.8l22.88,22.88Zm72.2,72.18-23-23,18.61-18,22.88,22.87Zm58.89-57.62L168.48,183.5,145.7,160.73,169.21,138l.15-.14a37,37,0,0,0,10.74-26.37,35.44,35.44,0,0,0-10.85-25.41,36.2,36.2,0,0,0-50.44.48l-.1.11L95.46,110.49,72.68,87.72l23.5-23.8A67.55,67.55,0,0,1,144.27,44h.26a67.62,67.62,0,0,1,48.21,20.29C218.85,90.78,218.38,134.05,191.71,160.77Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168.36,200.36l-30,29.35a8,8,0,0,1-11.26-.05L98.46,201a8,8,0,0,1,.08-11.4l30-29Zm-142-82.76a8,8,0,0,0,0,11.28L55,157.54a8,8,0,0,0,11.38-.06l29.18-29.92L55.77,87.77Z",opacity:"0.2"}),x.createElement("path",{d:"M207,50.25A87.46,87.46,0,0,0,144.6,24h-.33A87.48,87.48,0,0,0,82,49.81L50.11,82.11h0L20.61,112a16,16,0,0,0,.06,22.56l28.66,28.66a15.92,15.92,0,0,0,11.32,4.69h.09a16,16,0,0,0,11.36-4.82L133,100.69a16.08,16.08,0,0,1,22.41-.21,15.6,15.6,0,0,1,4.73,11.19,16.89,16.89,0,0,1-4.85,12L93,183.88a16,16,0,0,0-.17,22.79l28.66,28.66a16.06,16.06,0,0,0,22.52.12L205.81,175C240.26,140.5,240.79,84.56,207,50.25ZM60.65,151.89,32,123.24,55.8,99.12l28.52,28.52ZM132.79,224l-28.68-28.65,24.38-23.57L157,200.32Zm61.76-60.44-26.11,25.54L140,160.68l26.44-25.57.1-.09a33,33,0,0,0,9.57-23.5A31.44,31.44,0,0,0,166.47,89a32.2,32.2,0,0,0-44.9.5L95.49,116.18,67,87.74,93.35,61.09A71.51,71.51,0,0,1,144.27,40h.27a71.55,71.55,0,0,1,51.05,21.48C223.25,89.55,222.75,135.38,194.55,163.58Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207,50.25A87.46,87.46,0,0,0,144.6,24h-.33A87.48,87.48,0,0,0,82,49.81L20.61,112a16,16,0,0,0,.06,22.56l28.66,28.66a15.92,15.92,0,0,0,11.32,4.69h.09a16,16,0,0,0,11.36-4.82L133,100.69a16.08,16.08,0,0,1,22.41-.21,15.6,15.6,0,0,1,4.73,11.19,16.89,16.89,0,0,1-4.85,12L93,183.88a16,16,0,0,0-.17,22.79l28.66,28.66a16.06,16.06,0,0,0,22.52.12L205.81,175C240.26,140.5,240.79,84.56,207,50.25ZM60.65,151.89,32,123.24,61.42,93.43,89.9,121.91ZM132.79,224l-28.68-28.65,30.13-29.13,28.49,28.48Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M205.56,51.65A85.5,85.5,0,0,0,144.6,26h-.33A85.45,85.45,0,0,0,83.42,51.22L22,113.39a14,14,0,0,0,.06,19.74l28.66,28.66a13.89,13.89,0,0,0,9.9,4.1h.08a13.9,13.9,0,0,0,9.94-4.21l60.87-62.4A18.1,18.1,0,0,1,156.76,99a17.63,17.63,0,0,1,5.34,12.62,19,19,0,0,1-5.44,13.44L94.37,185.31a14,14,0,0,0-.15,19.95l28.67,28.66a14.05,14.05,0,0,0,19.7.1l61.8-60.49C238.07,139.86,238.6,85.18,205.56,51.65ZM62.08,153.29a2,2,0,0,1-1.42.6,2.15,2.15,0,0,1-1.42-.58L30.57,124.65a2,2,0,0,1,0-2.82L55.79,96.28l31.34,31.34Zm72.11,72.15a2,2,0,0,1-2.82,0l-28.66-28.66a2,2,0,0,1-.59-1.43,2,2,0,0,1,.6-1.41L128.51,169l31.34,31.33ZM196,165l-27.52,26.94-31.29-31.29,27.9-27,.07-.08a30.93,30.93,0,0,0,9-22.06,29.47,29.47,0,0,0-9-21.15,30.17,30.17,0,0,0-42.08.46L95.51,119,64.22,87.74,91.94,59.68A73.47,73.47,0,0,1,144.27,38h.28A73.52,73.52,0,0,1,197,60.08C225.44,88.92,224.94,136,196,165Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207,50.25A87.46,87.46,0,0,0,144.6,24h-.33A87.48,87.48,0,0,0,82,49.81L20.61,112a16,16,0,0,0,.06,22.56l28.66,28.66a15.92,15.92,0,0,0,11.32,4.69h.09a16,16,0,0,0,11.36-4.82L133,100.69a16.08,16.08,0,0,1,22.41-.21,15.6,15.6,0,0,1,4.73,11.19,16.89,16.89,0,0,1-4.85,12L93,183.88a16,16,0,0,0-.17,22.79l28.66,28.66a16.06,16.06,0,0,0,22.52.12L205.81,175C240.26,140.5,240.79,84.56,207,50.25ZM60.65,151.89,32,123.24,55.8,99.12l28.52,28.52ZM132.79,224l-28.68-28.65,24.38-23.57L157,200.32Zm61.76-60.44-26.11,25.54L140,160.68l26.44-25.57.1-.09a33,33,0,0,0,9.57-23.5A31.44,31.44,0,0,0,166.47,89a32.2,32.2,0,0,0-44.9.5L95.49,116.18,67,87.74,93.35,61.09A71.51,71.51,0,0,1,144.27,40h.27a71.55,71.55,0,0,1,51.05,21.48C223.25,89.55,222.75,135.38,194.55,163.58Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M204.13,53.06A83.41,83.41,0,0,0,144.59,28h-.32A83.46,83.46,0,0,0,84.85,52.62L23.46,114.8a12,12,0,0,0,0,16.92l28.67,28.66a11.89,11.89,0,0,0,8.48,3.51h.07a12,12,0,0,0,8.52-3.61l60.89-62.42a20.1,20.1,0,0,1,28-.27,19.54,19.54,0,0,1,6,14,20.87,20.87,0,0,1-6,14.86L95.76,186.75a12,12,0,0,0-.12,17.09L124.3,232.5a12,12,0,0,0,16.89.08L203,172.12C235.88,139.21,236.4,85.8,204.13,53.06ZM63.51,154.69a3.93,3.93,0,0,1-2.83,1.2h0a4,4,0,0,1-2.83-1.17L29.16,126.06a4,4,0,0,1,0-5.64l26.63-27L89.94,127.6Zm72.08,72.18a4,4,0,0,1-5.63,0l-28.67-28.66a4,4,0,0,1,0-5.69l27.2-26.3,34.16,34.15Zm61.76-60.44-28.94,28.32-34.12-34.12,29.41-28.44a29,29,0,0,0,8.4-20.64,27.51,27.51,0,0,0-8.41-19.72,28.14,28.14,0,0,0-39.25.41L95.53,121.87,61.4,87.75,90.52,58.26A75.51,75.51,0,0,1,144.27,36h.29a75.53,75.53,0,0,1,53.87,22.67C227.63,88.3,227.13,136.65,197.35,166.43Z"}))]]),BIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,36H160a20,20,0,0,0-20,20v88a12,12,0,0,1-24,0V56A20,20,0,0,0,96,36H56A20,20,0,0,0,36,56v88a92,92,0,0,0,92,92h.71c50.34-.38,91.3-42.1,91.3-93V56A20,20,0,0,0,200,36Zm-4,24V84H164V60ZM92,60V84H60V60Zm36.52,152H128a68,68,0,0,1-68-68V108H92v36a36,36,0,0,0,72,0V108h32v35C196,180.77,165.73,211.72,128.52,212Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M104,56V96H48V56a8,8,0,0,1,8-8H96A8,8,0,0,1,104,56Zm96-8H160a8,8,0,0,0-8,8V96h56V56A8,8,0,0,0,200,48Z",opacity:"0.2"}),x.createElement("path",{d:"M200,40H160a16,16,0,0,0-16,16v88a16,16,0,0,1-32,0V56A16,16,0,0,0,96,40H56A16,16,0,0,0,40,56v88a88,88,0,0,0,88,88h.67c48.15-.36,87.33-40.29,87.33-89V56A16,16,0,0,0,200,40Zm0,16V88H160V56ZM96,56V88H56V56Zm32.55,160A72,72,0,0,1,56,144V104H96v40a32,32,0,0,0,64,0V104h40v39C200,183,168,215.71,128.55,216Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H160a16,16,0,0,0-16,16v88a16,16,0,0,1-32,0V56A16,16,0,0,0,96,40H56A16,16,0,0,0,40,56v88a88,88,0,0,0,88,88h.67c48.15-.36,87.33-40.29,87.33-89V56A16,16,0,0,0,200,40Zm0,16V96H160V56ZM96,56V96H56V56Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,42H160a14,14,0,0,0-14,14v88a18,18,0,0,1-36,0V56A14,14,0,0,0,96,42H56A14,14,0,0,0,42,56v88a86,86,0,0,0,86,86h.65c47.06-.35,85.35-39.38,85.35-87V56A14,14,0,0,0,200,42ZM160,54h40a2,2,0,0,1,2,2V90H158V56A2,2,0,0,1,160,54ZM56,54H96a2,2,0,0,1,2,2V90H54V56A2,2,0,0,1,56,54Zm72.56,164H128a74,74,0,0,1-74-74V102H98v42a30,30,0,0,0,60,0V102h44v41C202,184.05,169.06,217.7,128.56,218Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H160a16,16,0,0,0-16,16v88a16,16,0,0,1-32,0V56A16,16,0,0,0,96,40H56A16,16,0,0,0,40,56v88a88,88,0,0,0,88,88h.67c48.15-.36,87.33-40.29,87.33-89V56A16,16,0,0,0,200,40Zm0,16V88H160V56ZM96,56V88H56V56Zm32.55,160A72,72,0,0,1,56,144V104H96v40a32,32,0,0,0,64,0V104h40v39C200,183,168,215.71,128.55,216Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,44H160a12,12,0,0,0-12,12v88a20,20,0,0,1-40,0V56A12,12,0,0,0,96,44H56A12,12,0,0,0,44,56v88a84,84,0,0,0,84,84h.64c46-.34,83.36-38.47,83.36-85V56A12,12,0,0,0,200,44Zm-40,8h40a4,4,0,0,1,4,4V92H156V56A4,4,0,0,1,160,52ZM56,52H96a4,4,0,0,1,4,4V92H52V56A4,4,0,0,1,56,52Zm72.58,168H128a76,76,0,0,1-76-76V100h48v44a28,28,0,0,0,56,0V100h48v43C204,185.15,170.17,219.69,128.58,220Z"}))]]),VIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M156,112a12,12,0,0,1-12,12H80a12,12,0,0,1,0-24h64A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H80a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M150,112a6,6,0,0,1-6,6H80a6,6,0,0,1,0-12h64A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M148,112a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h64A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"}))]]),HIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M156,112a12,12,0,0,1-12,12H124v20a12,12,0,0,1-24,0V124H80a12,12,0,0,1,0-24h20V80a12,12,0,0,1,24,0v20h20A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M150,112a6,6,0,0,1-6,6H118v26a6,6,0,0,1-12,0V118H80a6,6,0,0,1,0-12h26V80a6,6,0,0,1,12,0v26h26A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M152,112a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M148,112a4,4,0,0,1-4,4H116v28a4,4,0,0,1-8,0V116H80a4,4,0,0,1,0-8h28V80a4,4,0,0,1,8,0v28h28A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"}))]]),QIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.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"}),x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["fill",x.createElement(x.Fragment,null,x.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,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z"}))]]),ZIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M211.45,52.51l-80-24A12,12,0,0,0,116,40V140.22A52,52,0,1,0,140,184V104.13l64.55,19.36A12,12,0,0,0,220,112V64A12,12,0,0,0,211.45,52.51ZM88,212a28,28,0,1,1,28-28A28,28,0,0,1,88,212ZM196,95.87l-56-16.8V56.13l56,16.8Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,184a40,40,0,1,1-40-40A40,40,0,0,1,128,184Z",opacity:"0.2"}),x.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34ZM88,216a32,32,0,1,1,32-32A32,32,0,0,1,88,216ZM200,101.25l-64-19.2V50.75L200,70Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M209.72,58.25l-80-24A6,6,0,0,0,122,40V153.05A46,46,0,1,0,134,184V96.06l72.28,21.69A6,6,0,0,0,214,112V64A6,6,0,0,0,209.72,58.25ZM88,218a34,34,0,1,1,34-34A34,34,0,0,1,88,218ZM202,103.94l-68-20.4V48.06l68,20.4Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34ZM88,216a32,32,0,1,1,32-32A32,32,0,0,1,88,216ZM200,101.25l-64-19.2V50.75L200,70Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M209.15,60.17l-80-24A4,4,0,0,0,124,40V158.75A44,44,0,1,0,132,184V93.38l74.85,22.45A4,4,0,0,0,212,112V64A4,4,0,0,0,209.15,60.17ZM88,220a36,36,0,1,1,36-36A36,36,0,0,1,88,220ZM204,106.62,132,85V45.38L204,67Z"}))]]),zIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),GIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,164a36.07,36.07,0,0,0-33.94,24H72a28,28,0,0,1,0-56h96a44,44,0,0,0,0-88H72a12,12,0,0,0,0,24h96a20,20,0,0,1,0,40H72a52,52,0,0,0,0,104h94.06A36,36,0,1,0,200,164Zm0,48a12,12,0,1,1,12-12A12,12,0,0,1,200,212Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,200a24,24,0,1,1-24-24A24,24,0,0,1,224,200Z",opacity:"0.2"}),x.createElement("path",{d:"M200,168a32.06,32.06,0,0,0-31,24H72a32,32,0,0,1,0-64h96a40,40,0,0,0,0-80H72a8,8,0,0,0,0,16h96a24,24,0,0,1,0,48H72a48,48,0,0,0,0,96h97a32,32,0,1,0,31-40Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,200,216Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,200a28,28,0,0,1-54.83,8H72a48,48,0,0,1,0-96h96a24,24,0,0,0,0-48H72a8,8,0,0,1,0-16h96a40,40,0,0,1,0,80H72a32,32,0,0,0,0,64H173.17A28,28,0,0,1,228,200Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,170a30.05,30.05,0,0,0-29.4,24H72a34,34,0,0,1,0-68h96a38,38,0,0,0,0-76H72a6,6,0,0,0,0,12h96a26,26,0,0,1,0,52H72a46,46,0,0,0,0,92h98.6A30,30,0,1,0,200,170Zm0,48a18,18,0,1,1,18-18A18,18,0,0,1,200,218Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,168a32.06,32.06,0,0,0-31,24H72a32,32,0,0,1,0-64h96a40,40,0,0,0,0-80H72a8,8,0,0,0,0,16h96a24,24,0,0,1,0,48H72a48,48,0,0,0,0,96h97a32,32,0,1,0,31-40Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,200,216Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,172a28,28,0,0,0-27.71,24H72a36,36,0,0,1,0-72h96a36,36,0,0,0,0-72H72a4,4,0,0,0,0,8h96a28,28,0,0,1,0,56H72a44,44,0,0,0,0,88H172.29A28,28,0,1,0,200,172Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,200,220Z"}))]]),UIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),XIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),WIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M238.78,183.79,98.28,87.65A40.18,40.18,0,0,0,100,76a40,40,0,1,0-15.29,31.45l30,20.56-30,20.56a40,40,0,1,0,3.57,59.74h0A39.73,39.73,0,0,0,100,180a40.18,40.18,0,0,0-1.72-11.66L136,142.54l89.22,61.06a12,12,0,0,0,13.56-19.81ZM71.31,191.33h0A16,16,0,1,1,76,180,16,16,0,0,1,71.31,191.33ZM48.69,87.3a16,16,0,1,1,22.62,0h0A16,16,0,0,1,48.69,87.3Zm112.82,23.24a12,12,0,0,1,3.13-16.68L225.22,52.4a12,12,0,0,1,13.56,19.81l-60.59,41.46a12,12,0,0,1-16.68-3.13Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M40.2,95.8a28,28,0,1,1,39.6,0A28,28,0,0,1,40.2,95.8Zm0,64.4a28,28,0,1,0,39.6,0A28,28,0,0,0,40.2,160.2Z",opacity:"0.2"}),x.createElement("path",{d:"M157.73,113.13A8,8,0,0,1,159.82,102L227.48,55.7a8,8,0,0,1,9,13.21l-67.67,46.3a7.92,7.92,0,0,1-4.51,1.4A8,8,0,0,1,157.73,113.13Zm80.87,85.09a8,8,0,0,1-11.12,2.08L136,137.7,93.49,166.78a36,36,0,1,1-9-13.19L121.83,128,84.44,102.41a35.86,35.86,0,1,1,9-13.19l143,97.87A8,8,0,0,1,238.6,198.22ZM80,180a20,20,0,1,0-5.86,14.14A19.85,19.85,0,0,0,80,180ZM74.14,90.13a20,20,0,1,0-28.28,0A19.85,19.85,0,0,0,74.14,90.13Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M236.52,187.09l-143-97.87a36,36,0,1,0-14.38,17.27l21.39,21.69L79.15,149.54l0,0a35.91,35.91,0,1,0,14.38,17.27l26.91-18.41L170,198.64a32.26,32.26,0,0,0,22.7,9.37,31.52,31.52,0,0,0,4.11-.27l.28,0,36.27-6.11a8,8,0,0,0,3.19-14.5Zm-162.38-97A20,20,0,1,1,80,76,20,20,0,0,1,74.14,90.13Zm0,104A20,20,0,1,1,80,180,20,20,0,0,1,74.14,194.15Zm61-101.5L169.94,57.4a32.19,32.19,0,0,1,26.84-9.14l.28,0,36,6.07a8.21,8.21,0,0,1,6.09,4.42,8,8,0,0,1-2.67,10.12l-69.93,47.85a4,4,0,0,1-4.51,0l-26.31-18A4,4,0,0,1,135.18,92.65Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M159.38,112a6,6,0,0,1,1.57-8.34l67.66-46.31a6,6,0,0,1,6.78,9.91l-67.67,46.3a6,6,0,0,1-8.34-1.56ZM237,197.09a6,6,0,0,1-8.34,1.56L136,135.27,91,166.06A34,34,0,1,1,84,156a1.8,1.8,0,0,0,.19.2L125.37,128,84.23,99.84,84,100a34,34,0,1,1,7-10.1l144.38,98.8A6,6,0,0,1,237,197.09ZM75.56,91.55a22,22,0,1,0-31.12,0,21.88,21.88,0,0,0,31.12,0ZM82,180a22,22,0,1,0-6.44,15.56h0A21.88,21.88,0,0,0,82,180Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M157.73,113.13A8,8,0,0,1,159.82,102L227.48,55.7a8,8,0,0,1,9,13.21l-67.67,46.3a7.92,7.92,0,0,1-4.51,1.4A8,8,0,0,1,157.73,113.13Zm80.87,85.09a8,8,0,0,1-11.12,2.08L136,137.7,93.49,166.78a36,36,0,1,1-9-13.19L121.83,128,84.44,102.41a35.86,35.86,0,1,1,9-13.19l143,97.87A8,8,0,0,1,238.6,198.22ZM80,180a20,20,0,1,0-5.86,14.14A19.85,19.85,0,0,0,80,180ZM74.14,90.13a20,20,0,1,0-28.28,0A19.85,19.85,0,0,0,74.14,90.13Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M161,110.87a4,4,0,0,1,1.05-5.56L229.74,59a4,4,0,0,1,4.52,6.61l-67.67,46.3a4,4,0,0,1-5.56-1ZM235.3,196a4,4,0,0,1-5.56,1L136,132.85,88.47,165.38a32,32,0,1,1-5.84-8c.45.45.89.92,1.31,1.4l45-30.78-45-30.78c-.42.48-.86,1-1.31,1.4a31.86,31.86,0,1,1,5.84-8l49.69,34h0l96.09,65.76A4,4,0,0,1,235.3,196ZM77,93a24.42,24.42,0,0,0,2.82-3.38s0,0,0,0l0,0A24,24,0,1,0,77,93ZM84,180a23.75,23.75,0,0,0-4.15-13.49l0-.06,0,0A24.5,24.5,0,0,0,77,163,24,24,0,1,0,77,197h0A23.85,23.85,0,0,0,84,180Z"}))]]),YIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M157.27,21.22a12,12,0,0,0-12.64,1.31L75.88,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V32A12,12,0,0,0,157.27,21.22ZM36,100H68v56H36Zm104,99.46L92,162.13V93.87l48-37.33ZM212,128a44,44,0,0,1-11,29.11,12,12,0,1,1-18-15.88,20,20,0,0,0,0-26.43,12,12,0,0,1,18-15.86A43.94,43.94,0,0,1,212,128Zm40,0a83.87,83.87,0,0,1-21.39,56,12,12,0,0,1-17.89-16,60,60,0,0,0,0-80,12,12,0,1,1,17.88-16A83.87,83.87,0,0,1,252,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M80,88v80H32a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8Z",opacity:"0.2"}),x.createElement("path",{d:"M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M160,32.25V223.69a8.29,8.29,0,0,1-3.91,7.18,8,8,0,0,1-9-.56l-65.57-51A4,4,0,0,1,80,176.16V79.84a4,4,0,0,1,1.55-3.15l65.57-51a8,8,0,0,1,10,.16A8.27,8.27,0,0,1,160,32.25ZM60,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H60a4,4,0,0,0,4-4V84A4,4,0,0,0,60,80Zm126.77,20.84a8,8,0,0,0-.72,11.3,24,24,0,0,1,0,31.72,8,8,0,1,0,12,10.58,40,40,0,0,0,0-52.88A8,8,0,0,0,186.74,100.84Zm40.89-26.17a8,8,0,1,0-11.92,10.66,64,64,0,0,1,0,85.34,8,8,0,1,0,11.92,10.66,80,80,0,0,0,0-106.66Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M154.64,26.61a6,6,0,0,0-6.32.65L77.94,82H32A14,14,0,0,0,18,96v64a14,14,0,0,0,14,14H77.94l70.38,54.74A6,6,0,0,0,158,224V32A6,6,0,0,0,154.64,26.61ZM30,160V96a2,2,0,0,1,2-2H74v68H32A2,2,0,0,1,30,160Zm116,51.73L86,165.07V90.93l60-46.66Zm50.53-108.85a38,38,0,0,1,0,50.24,6,6,0,1,1-9-7.94,26,26,0,0,0,0-34.37,6,6,0,0,1,9-7.93ZM246,128a77.86,77.86,0,0,1-19.86,52,6,6,0,1,1-8.94-8,66,66,0,0,0,0-88,6,6,0,1,1,8.94-8A77.86,77.86,0,0,1,246,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M153.76,28.41a4,4,0,0,0-4.22.43L78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V32A4,4,0,0,0,153.76,28.41ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l64-49.78Zm47-111.61a36,36,0,0,1,0,47.59,4,4,0,1,1-6-5.3,28,28,0,0,0,0-37,4,4,0,0,1,6-5.28ZM244,128a75.88,75.88,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,68,68,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.88,75.88,0,0,1,244,128Z"}))]]),qIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07L64.51,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V185.44l35.12,38.63a12,12,0,0,0,17.76-16.14ZM36,100H68v56H36Zm104,99.46L92,162.13V106.24L140,159Zm-31-134a12,12,0,0,1,2.11-16.84l33.51-26.07A12,12,0,0,1,164,32V94.94a12,12,0,0,1-24,0V56.54l-14.15,11A12,12,0,0,1,109,65.44Zm74,49.35a12,12,0,0,1,18-15.85,44,44,0,0,1,5.55,50.21,12,12,0,0,1-21-11.55A19.67,19.67,0,0,0,188,128,20,20,0,0,0,183,114.79ZM252,128a84.18,84.18,0,0,1-19.11,53.35,12,12,0,1,1-18.53-15.25A60,60,0,0,0,212.73,88a12,12,0,1,1,17.88-16A83.87,83.87,0,0,1,252,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M80,88v80H32a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8Z",opacity:"0.2"}),x.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L73.55,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V175.09l42.08,46.29a8,8,0,1,0,11.84-10.76ZM32,96H72v64H32ZM144,207.64,88,164.09V95.89l56,61.6Zm42-63.77a24,24,0,0,0,0-31.72,8,8,0,1,1,12-10.57,40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.59Zm-80.16-76a8,8,0,0,1,1.4-11.23l39.85-31A8,8,0,0,1,160,32v74.83a8,8,0,0,1-16,0V48.36l-26.94,21A8,8,0,0,1,105.84,67.91ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.92,210.62a8,8,0,1,1-11.84,10.76L160,175.09v48.6a8.29,8.29,0,0,1-3.91,7.18,8,8,0,0,1-9-.56l-65.55-51A4,4,0,0,1,80,176.18V87.09L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-27.21-55.46a8,8,0,0,0,11.29-.7,40,40,0,0,0,0-52.88,8,8,0,1,0-12,10.57,24,24,0,0,1,0,31.72A8,8,0,0,0,186.71,155.16Zm40.92-80.49a8,8,0,1,0-11.92,10.66,64,64,0,0,1,0,85.34,8,8,0,1,0,11.92,10.66,80,80,0,0,0,0-106.66ZM153,119.87a4,4,0,0,0,7-2.7V32.25a8.27,8.27,0,0,0-2.88-6.4,8,8,0,0,0-10-.16L103.83,59.33a4,4,0,0,0-.5,5.85ZM60,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H60a4,4,0,0,0,4-4V84A4,4,0,0,0,60,80Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L78,81.94l-.08.06H32A14,14,0,0,0,18,96v64a14,14,0,0,0,14,14H77.94l70.38,54.74A6,6,0,0,0,158,224V169.92L203.56,220a6,6,0,0,0,8.88-8.08ZM30,160V96a2,2,0,0,1,2-2H74v68H32A2,2,0,0,1,30,160Zm116,51.73L86,165.07V90.93l.11-.08L146,156.72Zm41.5-66.53a26,26,0,0,0,0-34.37,6,6,0,1,1,9-7.93,38,38,0,0,1,0,50.24,6,6,0,0,1-9-7.94ZM107.41,66.68a6,6,0,0,1,1.06-8.42l39.85-31A6,6,0,0,1,158,32v74.83a6,6,0,0,1-12,0V44.27L115.83,67.73A6,6,0,0,1,107.41,66.68ZM246,128a77.86,77.86,0,0,1-19.86,52,6,6,0,1,1-8.94-8,66,66,0,0,0,0-88,6,6,0,1,1,8.94-8A77.86,77.86,0,0,1,246,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L73.55,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V175.09l42.08,46.29a8,8,0,1,0,11.84-10.76ZM32,96H72v64H32ZM144,207.64,88,164.09V95.89l56,61.6Zm42-63.77a24,24,0,0,0,0-31.72,8,8,0,1,1,12-10.57,40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.59Zm-80.16-76a8,8,0,0,1,1.4-11.23l39.85-31A8,8,0,0,1,160,32v74.83a8,8,0,0,1-16,0V48.36l-26.94,21A8,8,0,0,1,105.84,67.91ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L81,82.19,78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V164.75l49,53.94a4,4,0,1,0,5.92-5.38ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l2.35-1.83L148,156Zm41-69.3a28,28,0,0,0,0-37,4,4,0,1,1,6-5.29,36,36,0,0,1,0,47.59,4,4,0,1,1-6-5.29ZM109,65.45a4,4,0,0,1,.7-5.61l39.85-31A4,4,0,0,1,156,32v74.83a4,4,0,0,1-8,0V40.18l-33.39,26A4,4,0,0,1,109,65.45ZM244,128a75.88,75.88,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,68,68,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.88,75.88,0,0,1,244,128Z"}))]]),KIe=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),JIe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,24v56H60V60ZM60,196V140H196v56Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,16v64H56V56Zm0,144H56V136H200v64Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H44a4,4,0,0,1-4-4V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Zm-4,80H44a4,4,0,0,0-4,4v60a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42ZM56,54H200a2,2,0,0,1,2,2v66H54V56A2,2,0,0,1,56,54ZM200,202H56a2,2,0,0,1-2-2V134H202v66A2,2,0,0,1,200,202Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,16v64H56V56Zm0,144H56V136H200v64Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44ZM56,52H200a4,4,0,0,1,4,4v68H52V56A4,4,0,0,1,56,52ZM200,204H56a4,4,0,0,1-4-4V132H204v68A4,4,0,0,1,200,204Z"}))]]),e_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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"}),x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),t_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),n_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,56V184a16,16,0,0,1-16,16H72a16,16,0,0,1-16-16V56Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),r_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),i_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),s_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,96v64H48V96Z",opacity:"0.2"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),a_e=new Map([["bold",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}),x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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",x.createElement(x.Fragment,null,x.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"}))]]),o_e=x.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Xt=x.forwardRef((t,e)=>{const{alt:n,color:r,size:i,weight:s,mirrored:a,children:o,weights:l,...c}=t,{color:u="currentColor",size:f,weight:h="regular",mirrored:d=!1,...y}=x.useContext(o_e);return x.createElement("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:i??f,height:i??f,fill:r??u,viewBox:"0 0 256 256",transform:a||d?"scale(-1, 1)":void 0,...y,...c},!!n&&x.createElement("title",null,n),o,l.get(s??h))});Xt.displayName="IconBase";const pce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:rIe}));pce.displayName="ArrowClockwiseIcon";const l_e=pce,mce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:iIe}));mce.displayName="ArrowCounterClockwiseIcon";const c_e=mce,gce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:sIe}));gce.displayName="ArrowLeftIcon";const u_e=gce,yce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:aIe}));yce.displayName="ArrowsOutCardinalIcon";const f_e=yce,xce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:oIe}));xce.displayName="CameraIcon";const h_e=xce,I6=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:lIe}));I6.displayName="CaretRightIcon";const dL=I6,bce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:cIe}));bce.displayName="CheckIcon";const vce=bce,Ace=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:uIe}));Ace.displayName="CheckCircleIcon";const Sce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:fIe}));Sce.displayName="ClipboardTextIcon";const d_e=Sce,wce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:hIe}));wce.displayName="ClockIcon";const p_e=wce,Oce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:dIe}));Oce.displayName="CopyIcon";const kce=Oce,Cce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:pIe}));Cce.displayName="EyeIcon";const PE=Cce,Ece=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:mIe}));Ece.displayName="EyeSlashIcon";const pL=Ece,Tce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:gIe}));Tce.displayName="EyedropperIcon";const m_e=Tce,Pce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:yIe}));Pce.displayName="FileIcon";const g_e=Pce,Mce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:xIe}));Mce.displayName="FileCodeIcon";const y_e=Mce,Nce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:bIe}));Nce.displayName="FileCssIcon";const x_e=Nce,Dce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:vIe}));Dce.displayName="FileHtmlIcon";const b_e=Dce,Ice=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:AIe}));Ice.displayName="FileJpgIcon";const v_e=Ice,_ce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:SIe}));_ce.displayName="FileJsIcon";const A_e=_ce,Rce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:wIe}));Rce.displayName="FileJsxIcon";const S_e=Rce,jce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:OIe}));jce.displayName="FileMdIcon";const w_e=jce,Lce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:kIe}));Lce.displayName="FilePlusIcon";const HU=Lce,Fce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:CIe}));Fce.displayName="FilePngIcon";const O_e=Fce,$ce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:EIe}));$ce.displayName="FileSvgIcon";const k_e=$ce,Bce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:TIe}));Bce.displayName="FileTsIcon";const C_e=Bce,Vce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:PIe}));Vce.displayName="FileTsxIcon";const E_e=Vce,Hce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:MIe}));Hce.displayName="FileTxtIcon";const T_e=Hce,Qce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:NIe}));Qce.displayName="FileVideoIcon";const P_e=Qce,Zce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:DIe}));Zce.displayName="FilmStripIcon";const M_e=Zce,zce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:IIe}));zce.displayName="FolderSimpleIcon";const N_e=zce,Gce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:_Ie}));Gce.displayName="FolderSimplePlusIcon";const Uce=Gce,Xce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:RIe}));Xce.displayName="GearIcon";const D_e=Xce,Wce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:jIe}));Wce.displayName="GridFourIcon";const I_e=Wce,Yce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:LIe}));Yce.displayName="ImageIcon";const qce=Yce,Kce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:FIe}));Kce.displayName="LightningIcon";const __e=Kce,Jce=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:$Ie}));Jce.displayName="MagnetIcon";const R_e=Jce,eue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:BIe}));eue.displayName="MagnetStraightIcon";const j_e=eue,tue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:VIe}));tue.displayName="MagnifyingGlassMinusIcon";const L_e=tue,nue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:HIe}));nue.displayName="MagnifyingGlassPlusIcon";const F_e=nue,rue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:QIe}));rue.displayName="MinusIcon";const $_e=rue,iue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:ZIe}));iue.displayName="MusicNoteIcon";const B_e=iue,sue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:zIe}));sue.displayName="PaletteIcon";const V_e=sue,aue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:GIe}));aue.displayName="PathIcon";const H_e=aue,oue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:UIe}));oue.displayName="PencilSimpleIcon";const Q_e=oue,lue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:XIe}));lue.displayName="PlusIcon";const cue=lue,uue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:WIe}));uue.displayName="ScissorsIcon";const Z_e=uue,fue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:YIe}));fue.displayName="SpeakerHighIcon";const hue=fue,due=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:qIe}));due.displayName="SpeakerSlashIcon";const pue=due,mue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:KIe}));mue.displayName="SquareIcon";const z_e=mue,gue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:JIe}));gue.displayName="SquareSplitVerticalIcon";const G_e=gue,yue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:e_e}));yue.displayName="StackIcon";const U_e=yue,xue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:t_e}));xue.displayName="TextAaIcon";const X_e=xue,bue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:n_e}));bue.displayName="TextTIcon";const W_e=bue,vue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:r_e}));vue.displayName="TrashIcon";const Aue=vue,y4=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:i_e}));y4.displayName="WarningIcon";const Sue=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:s_e}));Sue.displayName="WaveformIcon";const Y_e=Sue,mL=x.forwardRef((t,e)=>x.createElement(Xt,{ref:e,...t,weights:a_e}));mL.displayName="XIcon";const q_e=mL,mi=t=>({title:n,...r})=>m.jsx(t,{alt:n,"aria-label":n,"aria-hidden":n?void 0:!0,...r}),wue=mi(vce),K_e=mi(p_e),gL=mi(PE),ME=mi(M_e),yg=mi(U_e),J_e=mi(f_e),Oue=mi(B_e),kue=mi(V_e),e7e=mi($_e),Qo=mi(cue),Cue=mi(z_e),Eue=mi(G_e),JI=mi(W_e),vd=mi(q_e),t7e=mi(__e),Tue=({title:t,style:e,...n})=>{const r=e!=null&&e.transform?`${e.transform} rotate(90deg)`:"rotate(90deg)";return m.jsx(dL,{alt:t,"aria-label":t,"aria-hidden":t?void 0:!0,style:{...e,transform:r},...n})},Pue=mi(dL),yL=mi(d_e),Uo=mi(c_e),n7e=mi(h_e),Mue=mi(l_e),_6=mi(D_e),Nue=mi(Z_e),r7e=mi(m_e),i7e=mi(Aue);function s7e({isSoloed:t,onToggle:e}){return m.jsx("button",{type:"button",tabIndex:-1,"aria-pressed":t,"aria-label":"Hear only this",title:"Hear only this",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-[13px] font-semibold transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-[-1px] focus-visible:outline-[#3CE6AC] ${t?"text-[#F5C542] hover:text-white":"text-white/35 hover:text-white/75"}`,onPointerDown:n=>n.stopPropagation(),onClick:n=>{n.stopPropagation(),e({add:n.metaKey||n.ctrlKey})},children:m.jsx("span",{"aria-hidden":"true",children:"⌗"})})}function Due({clipCount:t}){return t<2?null:m.jsx("span",{"aria-label":`${t} clips`,title:`${t} clips`,className:"shrink-0 rounded-full bg-white/10 px-1 text-[9px] leading-[14px] tabular-nums text-white/55",children:t})}function a7e(t){return[...new Set(t.map(e=>e.track))].sort((e,n)=>e-n)}function Iue(t,e){const n=t.indexOf(e);return n<0?null:n+1}function NE(t){return t===null?"":` ${t}`}function o7e(t,e,n){return t?e?`Unmute track${n}`:`Mute track${n}`:e?`Show track${n}`:`Hide track${n}`}function l7e(t,e){const n=t?e?pue:hue:e?pL:PE;return m.jsx(n,{size:14,weight:"bold","aria-hidden":"true"})}function _ue({hidden:t,trackNumber:e,trackDisplayNumber:n,visible:r,isAudioTrack:i,onToggle:s}){if(!r)return m.jsx("span",{"aria-hidden":"true",className:"h-6 w-6 shrink-0"});const a=NE(n),o=!!i,l=o7e(o,t,a);return m.jsx("button",{type:"button","aria-label":l,title:l,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-[-1px] focus-visible:outline-[#3CE6AC] ${t?"text-[#3CE6AC] hover:text-white":"text-white/35 hover:text-white/75"}`,onPointerDown:c=>c.stopPropagation(),onClick:c=>{c.stopPropagation(),s==null||s(e,!t,n)},children:l7e(o,t)})}function c7e({trackNumber:t,trackDisplayNumber:e,trackLabel:n,clipCount:r,showTrackLabel:i,isTrackHidden:s,isAudioTrack:a,isGroupMuted:o,isSoloed:l,onToggleSolo:c,onToggleTrackHidden:u}){return m.jsxs(m.Fragment,{children:[a&&m.jsx(Oue,{size:12,weight:"fill","aria-hidden":"true",className:"text-white/35"}),i&&m.jsx("span",{className:`min-w-0 flex-1 truncate text-[11px] ${a&&(s||o)?"line-through":""}`,title:o&&!s?`${n} (group muted)`:n,children:n}),i&&m.jsx(Due,{clipCount:r}),m.jsx(_ue,{hidden:s,trackNumber:t,trackDisplayNumber:e,visible:!0,isAudioTrack:a,onToggle:u}),a&&c&&m.jsx(s7e,{isSoloed:l,onToggle:c})]})}function Rue(t){const e=new Set([...Kg(t).map(r=>r.id),...Array.from(t.querySelectorAll("[id]")).map(r=>r.id)]);if(!e.has("voiceover"))return"voiceover";let n=2;for(;e.has(`voiceover-${n}`);)n+=1;return`voiceover-${n}`}function u7e(t){return typeof(t==null?void 0:t.then)=="function"}function f7e(t,e,n){if(!n||e.sources.length<2)return e;const r=new Set(Kg(t).map(s=>s.id));if(e.sources.some(s=>r.has(s)))return e;const i=Rue(t);return n(e.sources,i).then(()=>({...e,sources:[i]}))}function h7e(t,e,n){return t&&e?f7e(e,t,n):t}function d7e(t,e,n){const r=new Map(Kg(t).flatMap(a=>a.memberIds.map(o=>[o,a]))),i=new Set,s=[];for(const a of e){const o=r.get(a.id);if(!o){n(a)&&s.push({id:a.id,label:a.id,kind:Qv(a.id,a.getAttribute("src"))});continue}if(i.has(o.id))continue;const l=o.memberIds.map(c=>t.getElementById(c)).filter(c=>(c==null?void 0:c.tagName)==="AUDIO");l.some(n)&&(i.add(o.id),s.push({id:o.id,label:`${o.label} (${l.length})`,kind:Qv(o.label,...l.flatMap(c=>[c.id,c.getAttribute("src")]))}))}return s}const Pi=(t,e,n,r,i)=>({id:t,label:n,family:e,description:r,nodes:i}),QU=(t,e,n)=>[{type:t,label:n,params:{frequency:e,q:.707,poles:"2"}},{type:t,label:n,params:{frequency:e,q:.707,poles:"2"}}],xL=[Pi("voice-clean","voice","Clean Voice","Cuts rumble and mud, evens out the level, adds a little clarity.",[{type:"highpass",label:"Remove Rumble",params:{frequency:80,q:.707,poles:"2"}},{type:"peaking",label:"Reduce Mud",params:{frequency:250,gain:-3,q:1.2}},{type:"compressor",label:"Even Out Loudness",params:{threshold:-20,ratio:3,attack:12,release:180,makeup:3}},{type:"peaking",label:"Add Clarity",params:{frequency:3e3,gain:2.5,q:1}},{type:"limiter",label:"Peak Ceiling",params:{limit:-1,attack:5,release:50}}]),Pi("voice-broadcast","voice","Broadcast","Denser and more forward — a radio-presenter sound.",[{type:"highpass",label:"Remove Rumble",params:{frequency:90,q:.707,poles:"2"}},{type:"peaking",label:"Reduce Boxiness",params:{frequency:400,gain:-3,q:1.4}},{type:"compressor",label:"Even Out Loudness",params:{threshold:-24,ratio:4,attack:8,release:150,makeup:5}},{type:"peaking",label:"Add Clarity",params:{frequency:2500,gain:3,q:.9}},{type:"highshelf",label:"Add Air",params:{frequency:8e3,gain:2}},{type:"saturate",label:"Warmth",params:{type:"tanh",threshold:-12,output:0}},{type:"limiter",label:"Peak Ceiling",params:{limit:-1,attack:5,release:60}}]),Pi("voice-warm","voice","Close & Warm","Intimate and lightly handled, for a voice close to the mic.",[{type:"highpass",label:"Remove Rumble",params:{frequency:70,q:.707,poles:"2"}},{type:"lowshelf",label:"Add Weight",params:{frequency:180,gain:2}},{type:"compressor",label:"Even Out Loudness",params:{threshold:-18,ratio:2.5,attack:20,release:250,makeup:2}},{type:"peaking",label:"Add Clarity",params:{frequency:3e3,gain:1.5,q:.8}},{type:"limiter",label:"Peak Ceiling",params:{limit:-1.5}}]),Pi("rumble-cut","repair","Cut Rumble","Removes traffic, handling and air-conditioning from under a voice.",[{type:"highpass",label:"Cut Rumble",params:{frequency:100,q:.707,poles:"2"}}]),Pi("room-gate","repair","Quiet Between Phrases","Silences the gaps between words. Room tone under speech stays — this closes the pauses, it does not remove noise.",[{type:"gate",label:"Silence the Gaps",params:{threshold:-45,range:-18,ratio:10,attack:2,release:180}}]),Pi("boom-tame","repair","Tame Boominess","Takes out the chestiness of a voice too close to the mic.",[{type:"peaking",label:"Tame Boominess",params:{frequency:200,gain:-4,q:1.4}}]),Pi("harsh-tame","repair","Soften Harshness","Rounds off a brittle upper-mid. Broad and always-on; sibilance proper wants the measuring version.",[{type:"peaking",label:"Soften Harshness",params:{frequency:3200,gain:-3,q:1.6}}]),Pi("telephone","character","Telephone","Down the line — the narrow band of a phone call.",[...QU("highpass",300,"Strip the Bass"),...QU("lowpass",3400,"Strip the Treble"),{type:"peaking",label:"Phone Honk",params:{frequency:1200,gain:6,q:1.2}},{type:"peaking",label:"De-mud",params:{frequency:550,gain:-4,q:1}},{type:"saturate",label:"Circuit Grit",params:{type:"tanh",threshold:-9,output:-2}}]),Pi("radio-am","character","AM Radio","Narrow, gritty and a little crushed.",[{type:"highpass",label:"Strip the Bass",params:{frequency:220,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:2200,q:.707,poles:"2"}},{type:"peaking",label:"IF Droop",params:{frequency:1200,gain:-5,q:.9}},{type:"lowshelf",label:"Boxy",params:{frequency:500,gain:4}},{type:"saturate",label:"Radio Grit",params:{type:"tanh",threshold:-8,output:-1}},{type:"bitcrush",label:"Carrier Hiss",params:{bits:8,samples:1,mix:.45}}]),Pi("megaphone","character","Megaphone","Shouted through a horn, with the slap that comes with it.",[{type:"highpass",label:"Strip the Bass",params:{frequency:700,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:4e3,q:.707,poles:"2"}},{type:"peaking",label:"Horn Honk",params:{frequency:1900,gain:14,q:3}},{type:"peaking",label:"Horn Ring",params:{frequency:3200,gain:6,q:3}},{type:"saturate",label:"Overdrive",params:{type:"hard",threshold:-5,output:-3}},{type:"delay",label:"Horn Slap",params:{time:65,feedback:.2,mix:.28}}]),Pi("lofi-tape","character","Tape","Worn, warm and slightly unsteady, like a played-out cassette.",[{type:"lowpass",label:"Tape Rolloff",params:{frequency:6500,q:.707,poles:"2"}},{type:"lowshelf",label:"Add Weight",params:{frequency:120,gain:2}},{type:"saturate",label:"Tape Warmth",params:{type:"tanh",threshold:-14,output:0}},{type:"bitcrush",label:"Tape Noise",params:{bits:12,samples:2,mix:.35}},{type:"chorus",label:"Wow & Flutter",params:{delay:6,depth:.6,speed:.4,mix:.15}}]),Pi("pa-system","character","Tannoy","Announced across a concourse.",[{type:"highpass",label:"Strip the Bass",params:{frequency:250,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:5e3,q:.707,poles:"2"}},{type:"peaking",label:"Tannoy Honk",params:{frequency:2400,gain:9,q:2}},{type:"saturate",label:"Driver Grit",params:{type:"tanh",threshold:-10,output:-1}},{type:"reverb",label:"Concourse",params:{size:.54,damping:.48,wet:.25,dry:.8}}]),Pi("intercom","character","Intercom","Buzzed through a door panel, squelch and all.",[{type:"gate",label:"Squelch",params:{threshold:-40,range:-30,ratio:10,attack:1,release:120}},{type:"highpass",label:"Strip the Bass",params:{frequency:500,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:3e3,q:.707,poles:"2"}},{type:"peaking",label:"Panel Honk",params:{frequency:2e3,gain:6,q:2}},{type:"bitcrush",label:"Crunch",params:{bits:11,samples:1,mix:.3}}]),Pi("doofus-worble","character","Doofus Worble","Seasick and wobbling — no straight signal left.",[{type:"chorus",label:"Worble",params:{delay:14.6,depth:2.57,speed:10,mix:1}}]),Pi("chipmunk","character","Chipmunk","Small, fast and squeaky.",[{type:"pitchshift",label:"Up High",params:{semitones:7,mix:1}},{type:"highshelf",label:"Extra Sparkle",params:{frequency:4e3,gain:3}}]),Pi("giant","character","Giant","Huge, slow and deep.",[{type:"pitchshift",label:"Down Low",params:{semitones:-5,mix:1}},{type:"lowshelf",label:"Add Weight",params:{frequency:150,gain:4}},{type:"compressor",label:"Hold It Together",params:{threshold:-18,ratio:3,attack:10,release:120,knee:6,makeup:2,mix:1}}]),Pi("monster","character","Monster","Deep, rough and too close.",[{type:"pitchshift",label:"Down Low",params:{semitones:-8,mix:1}},{type:"saturate",label:"Growl",params:{type:"tanh",threshold:-12,output:-1}},{type:"reverb",label:"Right Behind You",params:{size:.3,damping:.5,wet:.22,dry:.85}}]),Pi("room-tight","space","Tight Room","A small hard room — presence without wash.",[{type:"reverb",label:"Tight Room",params:{size:.25,damping:.6,wet:.18,dry:.9}}]),Pi("room-natural","space","Natural Room","Sounds recorded somewhere rather than nowhere.",[{type:"reverb",label:"Natural Room",params:{size:.5,damping:.5,wet:.25,dry:.85}}]),Pi("hall","space","Hall","Long and open, for something that should sit far back.",[{type:"reverb",label:"Hall",params:{size:.9,damping:.3,wet:.4,dry:.75}}]),Pi("slap-echo","space","Slap Echo","One quick repeat — rockabilly vocal, not a wash.",[{type:"delay",label:"Slap Echo",params:{time:110,feedback:.12,mix:.22}}]),Pi("dub-throw","space","Dub Throw","Repeats that trail off well behind the beat.",[{type:"delay",label:"Dub Throw",params:{time:375,feedback:.55,mix:.3}}])];xL.map(t=>t.id);const p7e=new Map(xL.map(t=>[t.id,t]));function bL(t){return p7e.get(t)}const ZU=["voice","repair","character","space"];function m7e(t){return xL.filter(e=>e.family===t)}function UP(t,e){const n=[];let r={...e,nodes:[...e.nodes]};for(const i of t.nodes){const s={type:i.type,id:qg(r),fromPreset:t.id,...i.label?{label:i.label}:{},enabled:!0,params:Nd(i.type,i.params)};n.push(s),r={...r,nodes:[...r.nodes,s]}}return n}function jue(t,e,n={}){if(n.replaceChain)return{version:e0,nodes:UP(e,{version:e0,nodes:[]})};const r=t.nodes.findIndex(l=>l.fromPreset===e.id);if(r===-1)return{...t,nodes:[...t.nodes,...UP(e,t)]};const i=t.nodes.filter(l=>l.fromPreset!==e.id),s=i.slice(0,r),a=i.slice(r),o=UP(e,{...t,nodes:i});return{...t,nodes:[...s,...o,...a]}}const Gp={gain:{title:"Volume",does:"Turns this track up or down.",reachFor:"It's too loud, or too quiet, against everything else.",primary:"gain",primaryEnds:{low:"Silent",high:"Louder"},params:{gain:{label:"Level",ends:{low:"Silent",high:"Louder"}}}},highpass:{title:"Remove Rumble",does:"Cuts the very bottom — traffic, footsteps, air conditioning, hands on the mic.",reachFor:"There's a low hum or thump under everything.",primary:"frequency",primaryEnds:{low:"Only the deepest",high:"Thins it out"},band:[20,300],params:{frequency:{label:"Cut below",hint:"Everything under this is removed.",ends:{low:"Only the deepest",high:"Thins it out"}},q:{label:"Sharpness",hint:"How abruptly the cut starts."},poles:{label:"Steepness",hint:"How fast it falls away below the point."}}},lowpass:{title:"Muffle",does:"Takes the top off, like the sound is coming through a door.",reachFor:"You want something to sound distant, or behind something else.",primary:"frequency",primaryEnds:{low:"Very muffled",high:"Barely changed"},band:[1e3,2e4],params:{frequency:{label:"Cut above",ends:{low:"Very muffled",high:"Barely changed"}},q:{label:"Sharpness"},poles:{label:"Steepness"}}},peaking:{title:"Shape One Range",does:"Lifts or lowers one part of the sound and leaves the rest alone.",reachFor:"One quality is wrong — boomy, boxy, harsh — but the rest is fine.",primary:"gain",primaryEnds:{low:"Take it out",high:"Bring it forward"},band:[20,2e4],params:{frequency:{label:"Where",hint:"Which part of the sound to change."},gain:{label:"How much",ends:{low:"Take it out",high:"Bring it forward"}},q:{label:"How wide",hint:"A narrow setting fixes one note; a wide one changes the whole character."}}},lowshelf:{title:"Bass",does:"More or less weight underneath everything.",reachFor:"It sounds thin, or too heavy.",primary:"gain",primaryEnds:{low:"Thinner",high:"Heavier"},band:[20,300],params:{frequency:{label:"Up to",hint:"Everything below this is lifted or dropped."},gain:{label:"How much",ends:{low:"Thinner",high:"Heavier"}}}},highshelf:{title:"Brightness",does:"More or less sparkle at the top.",reachFor:"It sounds dull, or too fizzy.",primary:"gain",primaryEnds:{low:"Duller",high:"Brighter"},band:[2e3,2e4],params:{frequency:{label:"From",hint:"Everything above this is lifted or dropped."},gain:{label:"How much",ends:{low:"Duller",high:"Brighter"}}}},compressor:{title:"Even Out Loudness",does:"Brings the quiet parts up and holds the loud parts down, so nothing jumps out at the listener.",reachFor:"Some parts are much louder than others.",primary:"strength",primaryEnds:{low:"Barely touched",high:"Very even, quite squashed"},params:{threshold:{label:"Starts working at",hint:"Anything louder than this gets held down."},ratio:{label:"How hard",hint:"How much of the excess is removed."},attack:{label:"How fast it grabs",ends:{low:"Instant",high:"Lets peaks through"}},release:{label:"How fast it lets go",ends:{low:"Snappy",high:"Smooth"}},knee:{label:"How gradual"},makeup:{label:"Volume back up",hint:"Compression makes things quieter; this puts the level back."},mix:{label:"Blend with the original"}}},limiter:{title:"Peak Ceiling",does:"Nothing gets louder than this, ever. A safety net at the end of the chain.",reachFor:"You want to be sure it never clips or spikes.",primary:"limit",primaryEnds:{low:"A lot of headroom",high:"Right up to the edge"},params:{limit:{label:"Never exceed",ends:{low:"A lot of headroom",high:"Right up to the edge"}},attack:{label:"How fast it catches"},release:{label:"How fast it recovers"},level_out:{label:"Level after"}}},gate:{title:"Silence the Gaps",does:"Mutes the pauses. Whatever sits underneath stays — this closes the gaps, it does not remove noise.",reachFor:"You can hear the room in the gaps.",primary:"strength",primaryEnds:{low:"Only true silence",high:"Cuts quiet parts too"},params:{threshold:{label:"Quieter than this is a gap"},range:{label:"How far to duck the gaps",hint:"Not all the way down, usually — total silence sounds broken."},ratio:{label:"How hard"},attack:{label:"How fast it opens"},release:{label:"How fast it closes",ends:{low:"Clips tails short",high:"Leaves tails intact"}},knee:{label:"How gradual"}}},saturate:{title:"Warmth",does:"Adds a little grit and density, the way analogue gear does.",reachFor:"It sounds clean but lifeless.",primary:"strength",primaryEnds:{low:"Just a sheen",high:"Openly distorted"},params:{type:{label:"Character",hint:"Different flavours of the same idea. Tanh is the gentle one."},threshold:{label:"How much drive",ends:{low:"Just a sheen",high:"Openly distorted"}},output:{label:"Level after",hint:"Drive makes things louder; this puts it back."},oversample:{label:"Quality",hint:"Higher costs more but sounds cleaner."}}},bitcrush:{title:"Lo-Fi",does:"Crushes the sound down to fewer steps, like an old sampler or a bad phone line.",reachFor:"You want it to sound cheap or digital on purpose.",primary:"strength",primaryEnds:{low:"Slightly gritty",high:"Destroyed"},params:{bits:{label:"How many steps",ends:{low:"Destroyed",high:"Clean"}},samples:{label:"How rough",hint:"Holds each value for longer, which dulls and grits it."},mix:{label:"Blend with the original"}}},pitchshift:{title:"Higher or Lower",does:"Shifts everything up or down without changing its speed.",reachFor:"It should sound squeakier, or deeper.",primary:"semitones",primaryEnds:{low:"Much deeper",high:"Much higher"},params:{semitones:{label:"How far",ends:{low:"Much deeper",high:"Much higher"}},mix:{label:"Blend with the original"}}},delay:{title:"Echo",does:"Repeats the sound after a gap.",reachFor:"You want space, or a rhythmic effect.",primary:"mix",primaryEnds:{low:"A hint",high:"Washed out"},params:{time:{label:"Gap between repeats"},feedback:{label:"How many repeats",ends:{low:"One",high:"Trails away for ages"}},mix:{label:"How loud",ends:{low:"A hint",high:"Washed out"}}}},reverb:{title:"Room",does:"Puts the sound somewhere, instead of nowhere.",reachFor:"It sounds dry and stuck to the speaker.",primary:"strength",primaryEnds:{low:"A small tight room",high:"A big open hall"},params:{size:{label:"How big the space is"},damping:{label:"How soft the walls are",ends:{low:"Hard and bright",high:"Soft and dark"}},wet:{label:"How much room"},dry:{label:"How much original"}}},chorus:{title:"Thicken",does:"Doubles the sound slightly out of tune, which makes it wider and less exact.",reachFor:"It sounds thin or too plain on its own.",primary:"mix",primaryEnds:{low:"Just wider",high:"Obviously wobbling"},params:{delay:{label:"Spread"},depth:{label:"How much wobble"},speed:{label:"How fast it wobbles"},mix:{label:"How much",ends:{low:"Just wider",high:"Obviously wobbling"}}}},phaser:{title:"Swirl",does:"A filter that sweeps up and down, giving a moving, hollow shimmer.",reachFor:"You want movement, or a 1970s flavour.",primary:"out_gain",primaryEnds:{low:"Subtle",high:"Strong"},params:{in_gain:{label:"Depth in"},out_gain:{label:"How strong",ends:{low:"Subtle",high:"Strong"}},delay:{label:"Where it sweeps"},decay:{label:"How resonant"},speed:{label:"How fast it sweeps"},type:{label:"Shape of the sweep"}}}},F1=[{from:20,to:80,name:"Rumble",says:"traffic, footsteps, handling"},{from:80,to:250,name:"Weight",says:"body, warmth, low end"},{from:250,to:600,name:"Mud",says:"boxy, muffled, cardboard"},{from:600,to:2e3,name:"Middle",says:"the body of the sound"},{from:2e3,to:5e3,name:"Presence",says:"definition, consonants"},{from:5e3,to:1e4,name:"Edge",says:"harshness, sibilance"},{from:1e4,to:2e4,name:"Air",says:"sparkle, openness"}];function g7e(t){if(!Number.isFinite(t))return;const e=F1[0],n=F1.at(-1);return e&&t<e.from?e:n&&t>=n.to?n:F1.find(r=>t>=r.from&&t<r.to)}const y7e={"voice-clean":"My voice sounds amateur","voice-broadcast":"I want it to sound like radio","voice-warm":"I want it intimate and close","rumble-cut":"There's a hum or thump underneath","room-gate":"I can hear the room in the gaps","boom-tame":"It sounds boomy","harsh-tame":"It's harsh and tiring to listen to",telephone:"Make it sound like a phone call","radio-am":"Make it sound like an old radio",megaphone:"Make it sound shouted through a horn","lofi-tape":"Make it sound like an old tape","pa-system":"Make it sound like a station announcement",intercom:"Make it sound like a door intercom","doofus-worble":"Make it wobble like it is seasick",chipmunk:"Make it small and squeaky",giant:"Make it huge and deep",monster:"Make it a monster","room-tight":"It sounds dry and stuck to the speaker","room-natural":"It should sound like a real place",hall:"It should sound far away and big","slap-echo":"I want one quick echo","dub-throw":"I want long trailing echoes"},li=(t,e=0)=>typeof t=="number"?t:e,_m=t=>{const e=li(t);return e>=1e3?`${(e/1e3).toFixed(e%1e3===0?0:1)} kHz`:`${Math.round(e)} Hz`},$8=(t,e)=>t<.34?e[0]:t<.67?e[1]:e[2],XP={gain:t=>li(t.gain)===0?"No change":li(t.gain)>0?`Up ${li(t.gain)} dB`:`Down ${Math.abs(li(t.gain))} dB`,highpass:t=>`Cutting everything below ${_m(t.frequency)}`,lowpass:t=>`Muffled above ${_m(t.frequency)}`,peaking:t=>li(t.gain)===0?`Sitting on ${_m(t.frequency)}, doing nothing yet`:`${li(t.gain)>0?"Lifting":"Cutting"} ${_m(t.frequency)} by ${Math.abs(li(t.gain))} dB`,lowshelf:t=>li(t.gain)===0?"Doing nothing yet":`${li(t.gain)>0?"More":"Less"} weight below ${_m(t.frequency)}`,highshelf:t=>li(t.gain)===0?"Doing nothing yet":`${li(t.gain)>0?"More":"Less"} sparkle above ${_m(t.frequency)}`,compressor:t=>`Evening out — ${$8(Math.min(1,(li(t.ratio,3)-1)/7),["gentle","moderate","firm"])}`,limiter:t=>`Nothing louder than ${li(t.limit,-1)} dB`,gate:t=>`Closing gaps quieter than ${li(t.threshold,-45)} dB`,saturate:t=>`${$8(Math.min(1,Math.abs(li(t.threshold,-6))/30),["A little","Some","Heavy"])} warmth`,bitcrush:t=>`Crushed to ${li(t.bits,8)} bits`,pitchshift:t=>li(t.semitones,0)===0?"Unchanged pitch":`${li(t.semitones,0)>0?"Up":"Down"} ${Math.abs(li(t.semitones,0))} semitones`,delay:t=>`Echo every ${li(t.time,250)} ms`,reverb:t=>`${$8(li(t.size,.7),["A small","A medium","A large"])} room, ${$8(li(t.wet,.35),["lightly","moderately","heavily"])}`,chorus:t=>`Thickened${li(t.mix,.5)>.6?", wobbling":""}`,phaser:()=>"Swirling"},x7e={voice:"Voice",repair:"Fix",character:"Character",space:"Space"};function Lue({trackKind:t,onPick:e,onAudition:n,onAuditionTracked:r}){const i=x.useRef(new Set),s=o=>{i.current.has(o)||(i.current.add(o),r==null||r(o))},a=t==="music"||t==="sfx"?ZU.filter(o=>o!=="voice"):ZU;return m.jsx("div",{className:"hf-fx-preset-menu space-y-1.5 rounded-[4px] border border-panel-border-input p-1.5",onMouseLeave:n?()=>n(null):void 0,onBlur:n?()=>n(null):void 0,children:a.map(o=>m.jsxs("div",{className:"hf-fx-preset-group space-y-0.5",children:[m.jsx("span",{className:"hf-fx-preset-group-label block font-mono text-[9px] uppercase tracking-wide text-panel-text-2",children:x7e[o]}),m7e(o).map(l=>m.jsxs("button",{type:"button",className:"hf-fx-preset-item block w-full rounded-[3px] bg-panel-surface py-1 pl-1.5 pr-8 text-left text-panel-text-1 hover:text-panel-text-0",title:`${l.description} (${l.nodes.length} effect${l.nodes.length===1?"":"s"})`,onClick:()=>e(l.id),onMouseEnter:()=>{s(l.id),n==null||n(l.id)},onFocus:()=>{s(l.id),n==null||n(l.id)},children:[m.jsx("span",{className:"hf-fx-preset-problem block truncate text-[10px]",children:y7e[l.id]??l.description}),m.jsx("span",{className:"hf-fx-preset-name block truncate font-mono text-[9px] text-panel-text-2",children:l.label}),n?m.jsxs("span",{className:"hf-fx-preset-wave","aria-hidden":"true",children:[m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{})]}):null]},l.id))]},o))})}function Fa(t,e={}){Tt(`audio_fx_${t}`,e)}function Fue(t){return t.fromPreset?"preset":t.fromCarve?"carve":t.fromEq?"eq":t.fromLeveller?"leveller":"hand"}function b7e(t){const e=(t==null?void 0:t.nodes)??[],n=new Map;for(const r of e){const i=Fue(r);n.set(i,(n.get(i)??0)+1)}return{node_count:e.length,nodes_from_preset:n.get("preset")??0,nodes_from_carve:n.get("carve")??0,nodes_from_eq:n.get("eq")??0,nodes_from_leveller:n.get("leveller")??0,nodes_by_hand:n.get("hand")??0,preset_count:new Set(e.map(r=>r.fromPreset).filter(Boolean)).size,bypassed_count:e.filter(r=>r.enabled===!1).length}}const $l=t=>({track_kind:t.trackKind??"unknown"});function v7e(t,e,n,r,i){Fa("preset_applied",{preset:t,family:e,node_count:n,mode:r,...$l(i)})}function A7e(t,e){Fa("preset_removed",{preset:t,...$l(e)})}function S7e(t,e,n){Fa("preset_amount",{preset:t,amount:e,...$l(n)})}function w7e(t,e,n){Fa("preset_automated",{preset:t,enabled:e,...$l(n)})}function O7e(t,e){Fa("preset_auditioned",{preset:t,...$l(e)})}function WP(t,e,n,r){Fa("node_added",{effect:t,via:e,job:n??"none",...$l(r)})}function k7e(t,e,n){Fa("node_removed",{effect:t,origin:e,...$l(n)})}function C7e(t,e,n){Fa("node_bypassed",{effect:t,bypassed:e,...$l(n)})}function E7e(t,e,n){Fa("node_moved",{effect:t,direction:e,...$l(n)})}function T7e(t,e,n,r,i){Fa("param_committed",{effect:t,param:e,value:n,surface:r,...$l(i)})}function P7e(t,e,n){Fa("profile_committed",{effect:t,strength:e,...$l(n)})}function M7e(t,e){Fa("carve_changed",{action:t,strength:e.strength,source_count:e.sourceCount})}function zU(t){Fa("leveller",{action:t})}function N7e(t,e){Fa("eq_changed",{band:t,value:e})}function D7e(t,e,n){Fa("chain_observed",{...b7e(t),first_sight:e.firstSight,panel_edits:e.panelEdits,authored_outside:e.panelEdits===0,has_carve:e.hasCarve,has_automation:e.hasAutomation,...$l(n)})}function e_(t,e,n){const r=bL(e);if(!r)return null;const i=jue(t,r),s=t.nodes.some(a=>a.fromPreset===r.id);return v7e(r.id,r.family,r.nodes.length,s?"reapply":"append",{trackKind:n}),i}function $ue(t,e,n){const r=x.useRef(null),i=x.useCallback(l=>{e&&(l?(r.current??(r.current=t),e(l(r.current)),n==null||n(!0)):r.current&&(n==null||n(!1),e(r.current),r.current=null))},[t,e,n]),s=x.useCallback(()=>{r.current=null,n==null||n(!1)},[n]),a=x.useRef(e);a.current=e;const o=x.useRef(n);return o.current=n,x.useEffect(()=>()=>{var l,c;r.current&&((l=o.current)==null||l.call(o,!1),(c=a.current)==null||c.call(a,r.current))},[]),{audition:i,clearAudition:s}}const GU=260,Nh=8,I7e=160;function _7e(t){const e=Math.min(Math.max(t.left,Nh),Math.max(Nh,window.innerWidth-GU-Nh)),n=window.innerHeight-t.bottom,r=t.top,i=n<260&&r>n,s=(i?r:n)-Nh-4,a=Math.min(Math.max(I7e,s),window.innerHeight-Nh*2),o=l=>Math.max(Nh,Math.min(l,Math.max(Nh,window.innerHeight-a-Nh)));return{position:"fixed",left:e,width:GU,maxHeight:a,...i?{bottom:o(window.innerHeight-t.top+4)}:{top:o(t.bottom+4)}}}function R7e({anchorRect:t,chain:e,trackKind:n,onClose:r,onChainChange:i,onChainPreview:s,onAuditionTransport:a,onOpenRack:o}){const l=x.useRef(null),{audition:c,clearAudition:u}=$ue(e,s,a);x.useEffect(()=>{const d=y=>{l.current&&!l.current.contains(y.target)&&r()};return document.addEventListener("pointerdown",d,!0),()=>document.removeEventListener("pointerdown",d,!0)},[r]);const f=d=>{const y=e_(e,d,n);y&&(u(),i(y),r())},h=d=>{d.key==="Escape"&&(d.stopPropagation(),c(null),r())};return m.jsxs("div",{ref:l,role:"dialog","aria-label":"Effects",className:"z-[200] flex flex-col overflow-hidden rounded-md border border-white/10 bg-[#1b1b1f] p-2 shadow-xl",style:_7e(t),onKeyDown:h,onPointerDown:d=>d.stopPropagation(),children:[m.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:m.jsx(Lue,{trackKind:n,onPick:f,onAudition:s?d=>c(d?y=>e_(y,d,n)??y:null):void 0})}),m.jsxs("div",{className:"mt-2 flex shrink-0 items-center justify-between border-t border-white/10 pt-2 text-[10px] text-white/55",children:[m.jsx("button",{type:"button",className:"hover:text-white",onClick:()=>{r(),o()},children:"+ effect"}),m.jsx("button",{type:"button",className:"hover:text-white",onClick:()=>{r(),o()},children:"Open rack ›"})]})]})}function j7e(t){if(!t)return{version:1,nodes:[]};try{return qC(t)}catch{return{version:1,nodes:[]}}}function t_(t){const[e,n]=x.useState(!1),r=x.useRef(null),[i,s]=x.useState(null),a=()=>{var c;s(((c=r.current)==null?void 0:c.getBoundingClientRect())??null),n(!0)};if(t.variant==="group-pointer")return m.jsxs("div",{className:"relative shrink-0",children:[m.jsx("button",{type:"button",tabIndex:-1,ref:r,"aria-label":"Effects — group these clips first",title:"Group these clips to add effects to all of them",className:"flex h-6 items-center justify-center rounded border-0 bg-transparent px-1 text-[10px] font-semibold text-white/35 hover:text-white/75",onPointerDown:c=>c.stopPropagation(),onClick:c=>{c.stopPropagation(),a()},children:"FX"}),e&&i&&_l.createPortal(m.jsxs("div",{role:"dialog","aria-label":"Group these clips to add effects",className:"z-[200] w-56 rounded-md border border-white/10 bg-[#1b1b1f] p-2.5 text-[11px] text-white/75 shadow-xl",style:{position:"fixed",left:i.left,top:i.bottom+4},onPointerDown:c=>c.stopPropagation(),children:[m.jsx("p",{children:"Group these clips to add effects to all of them."}),m.jsx("button",{type:"button",className:"mt-2 w-full rounded border border-white/20 py-1 text-[10px] font-semibold text-white hover:bg-white/10",onClick:()=>{n(!1),t.onGroupClips()},children:"Group"})]}),document.body)]});const o=j7e(t.fxChainRaw),l=s6e(o).length;return m.jsxs("div",{className:"relative shrink-0",children:[m.jsxs("button",{type:"button",tabIndex:-1,ref:r,"aria-label":l>0?`Effects — ${l} applied`:"Effects",title:"Effects",className:`flex h-6 items-center justify-center gap-0.5 rounded border-0 bg-transparent px-1 text-[10px] font-semibold transition-colors ${e||l>0?"text-[#3CE6AC]":"text-white/35 hover:text-white/75"}`,onPointerDown:c=>c.stopPropagation(),onClick:c=>{c.stopPropagation(),a()},children:["FX",l>0?` ${l}`:""]}),e&&i&&_l.createPortal(m.jsx(R7e,{anchorRect:i,chain:o,trackKind:t.trackKind,onClose:()=>n(!1),onChainChange:t.onChainChange,onChainPreview:t.onChainPreview,onAuditionTransport:t.onAuditionTransport,onOpenRack:t.onOpenRack}),document.body)]})}function L7e({name:t,clipCount:e,isExpanded:n,gutterBackground:r,columnWidth:i,lanesId:s,onToggleClipExpanded:a,children:o}){return m.jsxs("div",{className:"absolute left-0 top-0 flex items-center gap-1.5 overflow-hidden px-1.5 text-[11px]",style:{width:i,height:hs,color:"#ffffff",background:r},children:[m.jsx("button",{type:"button",tabIndex:-1,"aria-expanded":n,"aria-controls":s,"aria-label":`${n?"Hide":"Show"} ${t} lanes`,title:`${n?"Hide":"Show"} lanes`,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-[11px] leading-none focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${n?"text-[#3CE6AC]":"text-white/55 hover:text-white"}`,onPointerDown:l=>l.stopPropagation(),onClick:l=>{l.stopPropagation(),a()},children:m.jsx("span",{"aria-hidden":"true",children:"∿"})}),m.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-[13px] leading-none text-white/40",children:"◇"}),m.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",title:t,children:t}),m.jsx(Due,{clipCount:e}),o]})}function Zv(t){return String(Math.round(t*100)/100)}function F7e(t,e,n){var i,s;const r=n??((i=e.keyframes)==null?void 0:i.easeEach)??e.ease;return!r||r==="none"?t:((s=Cv.parseEase(r))==null?void 0:s(t))??t}function $7e(t,e){var n;return(((n=t.keyframes)==null?void 0:n.keyframes)??[]).filter(r=>e in r.properties).map(r=>({percentage:r.percentage,value:r.properties[e],ease:r.ease}))}function B7e(t,e){return typeof t.value!="number"||typeof e.value!="number"||t.percentage===e.percentage?null:{from:t.value,to:e.value}}function V7e(t,e,n){const r=$7e(t,e),i=r.filter(l=>l.percentage<=n).at(-1),s=r.find(l=>l.percentage>=n);if(!i)return s==null?void 0:s.value;if(!s)return i.value;const a=B7e(i,s);if(!a)return i.value;const o=(n-i.percentage)/(s.percentage-i.percentage);return a.from+(a.to-a.from)*F7e(o,t,s.ease)}function H7e(t,e,n){var s;const r=new Set;for(const a of((s=t.keyframes)==null?void 0:s.keyframes)??[])for(const o of Object.keys(a.properties))qo(o)===e&&r.add(o);const i={};for(const a of r){const o=V7e(t,a,n);o!==void 0&&(i[a]=o)}return i}function Q7e(t,e){var r,i;if(t==="visual"&&("opacity"in e||"autoAlpha"in e))return"Opacity";if(t!=="other")return`${((r=t[0])==null?void 0:r.toUpperCase())??""}${t.slice(1)}`;const n=Object.keys(e)[0];return n?`${((i=n[0])==null?void 0:i.toUpperCase())??""}${n.slice(1)}`:"Other"}function Z7e(t){return Object.values(t).map(e=>typeof e=="number"?Zv(e):e).join(", ")}function z7e(t){const e=t.x,n=t.y;return typeof e=="number"&&typeof n=="number"?`${Zv(e)}, ${Zv(n)}`:null}function G7e(t){return typeof t.rotation=="number"?`${Zv(t.rotation)}°`:null}function U7e(t){const e=t.opacity??t.autoAlpha;return typeof e=="number"?`${Zv(Math.abs(e)<=1?e*100:e)}%`:null}const YP={position:z7e,rotation:G7e,visual:U7e};function UU(t,e){var n;return((n=YP[t])==null?void 0:n.call(YP,e))??Z7e(e)}function X7e(t,e){return t.keyframes.reduce((n,r)=>!n||Math.abs(r.percentage-e)<Math.abs(n.percentage-e)?r:n,null)}function W7e(t,e){return t.find(n=>{const r=ri(n);return r!==null&&iS(e,r,Gi(n))})}function Y7e(t,e,n,r){var s;const i=((s=e.currentKeyframe)==null?void 0:s.animationId)??(n==null?void 0:n.animationId);return r??t.animations.find(a=>a.id===i)}function q7e(t,e,n,r,i){var s;return((s=t.currentKeyframe)==null?void 0:s.tweenPercentage)??(e?Rle(r,e):null)??Aj(n,i)}function K7e(t,e,n,r,i){return t?{animationId:t.id,propertyGroup:e.group,tweenPercentage:n,properties:r,remove:i.currentKeyframe!==null}:null}function J7e(t,e,n){const r=Nae(t.keyframes,n),i=X7e(t,n),s=W7e(t.animations,e),a=Y7e(t,r,i,s),o=t.keyframes.filter(u=>u.animationId===(a==null?void 0:a.id)),l=q7e(r,a,o,e,n),c=a?H7e(a,t.group,l):{};return{navigation:r,values:c,label:Q7e(t.group,c),toggleTarget:K7e(a,t,l,c,r)}}function e9e({navigation:t,label:e,expandedElement:n,onSeek:r,children:i}){const s="relative h-5 w-3 border-0 bg-transparent p-0 text-white/55 hover:text-white disabled:text-white/15 focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']",a=o=>{o&&(r==null||r(n.start+o.percentage/100*n.duration))};return m.jsxs("span",{className:"flex shrink-0 items-center gap-0.5",children:[m.jsx("button",{type:"button","aria-label":`Previous ${e} keyframe`,disabled:!t.prevKeyframe,className:s,onClick:o=>{o.stopPropagation(),a(t.prevKeyframe)},children:"‹"}),i,m.jsx("button",{type:"button","aria-label":`Next ${e} keyframe`,disabled:!t.nextKeyframe,className:s,onClick:o=>{o.stopPropagation(),a(t.nextKeyframe)},children:"›"})]})}function t9e({lanesId:t,lane:e,laneIndex:n,isLastLane:r,expandedElement:i,currentTime:s,clipPercentage:a,gutterBackground:o,columnWidth:l,onTogglePropertyGroupKeyframe:c,onSeek:u,rovingTargetId:f=null}){const h=i.key??i.id,{navigation:d,values:y,label:g,toggleTarget:v}=J7e(e,s,a);return m.jsxs("div",{id:g6(t,j2(h,e.group),"header"),"data-timeline-focus-id":j2(h,e.group),"data-timeline-element-id":h,tabIndex:f===j2(h,e.group)?0:-1,"data-property-group":e.group,"data-timeline-lane-top":cg(n),className:"absolute left-0 flex items-center gap-1 overflow-hidden px-1.5 text-[10px] text-white/65",style:{top:cg(n),width:l,height:lg,background:o},children:[m.jsxs("span",{className:"relative h-full w-3 shrink-0","aria-hidden":"true",children:[m.jsx("span",{className:"absolute left-1.5 top-0 w-px bg-white/15",style:{height:r?"50%":"100%"}}),m.jsx("span",{className:"absolute left-1.5 top-1/2 h-px w-1.5 bg-white/15"})]}),m.jsx("span",{className:"w-[46px] shrink-0 truncate text-white",title:g,children:g}),m.jsx(e9e,{navigation:d,label:g,expandedElement:i,onSeek:u,children:m.jsx("button",{type:"button","aria-pressed":!!d.currentKeyframe,"aria-label":`${d.currentKeyframe?"Remove":"Add"} ${g} keyframe`,title:`${d.currentKeyframe?"Remove":"Add"} ${g} keyframe`,className:"flex h-6 w-6 shrink-0 items-center justify-center border-0 bg-transparent p-0 text-[11px] text-[#3CE6AC] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",onClick:b=>{b.stopPropagation(),v&&(c==null||c(i,v))},children:d.currentKeyframe?"◆":"◇"})}),m.jsx("span",{className:"min-w-0 flex-1 truncate text-right tabular-nums text-white/45",title:UU(e.group,y),children:UU(e.group,y)})]})}function n9e({target:t,label:e,name:n,param:r,top:i,isLastLane:s,gutterBackground:a,columnWidth:o,onRemove:l}){return m.jsxs("div",{"data-automation-lane-label":e,"data-timeline-lane-top":i,className:"absolute left-0 flex items-center gap-1 overflow-hidden px-1.5 text-[10px] text-white/65",style:{top:i,width:o,height:XA,background:a},children:[m.jsxs("span",{className:"relative h-full w-3 shrink-0","aria-hidden":"true",children:[m.jsx("span",{className:"absolute left-1.5 top-0 w-px bg-white/15",style:{height:s?"50%":"100%"}}),m.jsx("span",{className:"absolute left-1.5 top-1/2 h-px w-1.5 bg-white/15"})]}),m.jsxs("span",{className:"flex min-w-0 flex-1 flex-col justify-center leading-tight",title:e,children:[m.jsx("span",{"data-automation-lane-name":"",className:"truncate font-mono text-[9px] text-white/70",children:n}),r?m.jsx("span",{"data-automation-lane-param":"",className:"truncate font-mono text-[9px] text-white/40",children:r}):null]}),l&&t!==null&&m.jsx("button",{type:"button","aria-label":`Remove ${e} automation`,title:`Remove ${e} automation`,className:"flex h-6 w-6 shrink-0 items-center justify-center border-0 bg-transparent p-0 text-[11px] text-white/35 hover:text-white focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",onPointerDown:c=>c.stopPropagation(),onClick:c=>{c.stopPropagation(),l(t)},children:"×"})]})}function r9e({trackNumber:t,trackDisplayNumber:e,trackLabel:n,lanesId:r,contentOrigin:i,keyframeClip:s,trackElements:a,clipCount:o,isExpanded:l,animations:c,currentTime:u,isTrackHidden:f,isAudioTrack:h,theme:d,onToggleClipExpanded:y,onToggleTrackHidden:g,onTogglePropertyGroupKeyframe:v,onRemoveAutomationLane:b,onSeek:w,rovingTargetId:O=null}){const C=s?(u-s.start)/s.duration*100:0,E=s?Jj(c,Lle(s),s.duration):[],M=i>=nf,N=s?s.key??s.id:null,I=aS(a).map(U=>{var z;return{key:U.key,label:U.key,name:U.name,param:U.param,target:((z=U.entries.find(K=>(K.element.key??K.element.id)===N))==null?void 0:z.lane.target)??null}}),_=E.length>0||I.length>0,j=!!s&&_,L=a[0]?a[0].key??a[0].id:null,V=ue(U=>U.soloed),$=ue(U=>U.toggleSolo),{onGroupClips:Z,onSetElementAttributeLive:W,onSetElementAttributeQuiet:Y}=lE(),J=oS(),ne=h&&o===1&&a.length>0?a[0]:null,ie=a.some(U=>U.audioGroup),le=(U,z,K)=>{const te=z.nodes.length?cu(z):null;K?W==null||W(U,Da,te):Y==null||Y(U,Da,te,"Apply preset")},q=U=>{J==null||J.handleTimelineElementSelect(U)},F=()=>{var K;const U=(K=J==null?void 0:J.previewIframeRef.current)==null?void 0:K.contentDocument;if(!U||!Z)return;const z=a.map(te=>te.key??te.id);Z(z,Rue(U))};return m.jsx("div",{role:"rowheader","aria-colindex":1,className:`sticky left-0 z-[12] shrink-0 ${j?"":M?"flex items-center gap-1 px-1.5 text-white/55":"flex flex-col items-center justify-center gap-0.5"}`,style:{width:M?nf:i,background:d.gutterBackground,borderRight:`1px solid ${d.gutterBorder}`},children:!s||!_?m.jsxs(m.Fragment,{children:[m.jsx(c7e,{trackNumber:t,trackDisplayNumber:e,trackLabel:n,clipCount:o,showTrackLabel:M,isTrackHidden:f,isAudioTrack:h,isGroupMuted:a.some(U=>U.audioGroupHidden),isSoloed:L!==null&&V.has(L),onToggleSolo:L?U=>$(L,U):void 0,onToggleTrackHidden:g}),ne&&m.jsx(t_,{variant:"chain",fxChainRaw:ne.fxChain,trackKind:Qv(ne.id,ne.src),onChainChange:U=>le(ne,U,!1),onChainPreview:U=>le(ne,U,!0),onOpenRack:()=>q(ne)}),h&&o>1&&!ie&&m.jsx(t_,{variant:"group-pointer",onGroupClips:F})]}):m.jsxs(m.Fragment,{children:[m.jsx(L7e,{name:o>1?`Track${NE(e)}`:s.label??s.domId??s.id,clipCount:o,isExpanded:l,gutterBackground:d.gutterBackground,columnWidth:M?nf:i,lanesId:r,onToggleClipExpanded:y,children:m.jsx(_ue,{hidden:f,trackNumber:t,trackDisplayNumber:e,visible:!0,isAudioTrack:h,onToggle:g})}),l&&E.map((U,z)=>m.jsx(t9e,{lanesId:r,lane:U,laneIndex:z,isLastLane:z===E.length-1&&I.length===0,expandedElement:s,currentTime:u,clipPercentage:C,gutterBackground:d.gutterBackground,columnWidth:M?nf:i,onTogglePropertyGroupKeyframe:v,onSeek:w,rovingTargetId:O},U.group)),l&&I.map((U,z)=>m.jsx(n9e,{target:U.target,label:U.label,name:U.name,param:U.param,top:cg(E.length)+z*XA,isLastLane:z===I.length-1,gutterBackground:d.gutterBackground,columnWidth:M?nf:i,onRemove:b},U.key))]})})}function Bue({index:t,rowKey:e,logicalRow:n,propertyRows:r,lanesId:i,headerLanesId:s,top:a,height:o,virtualized:l,background:c,borderColor:u,rovingTargetId:f=null,children:h}){return m.jsxs("div",{role:"rowgroup","data-index":t,"data-timeline-row":t,"data-timeline-row-key":e,className:l?"absolute left-0 right-0":"relative",style:{top:l?a:void 0,height:o,background:c,borderBottom:`1px solid ${u}`},children:[m.jsx("div",{role:"row","aria-rowindex":n.logicalIndex+1,"aria-level":n.level,"aria-expanded":n.expandable?n.expanded:void 0,"data-timeline-logical-row-id":n.id,"data-timeline-focus-id":n.id,tabIndex:f===n.id?0:-1,className:"flex",style:{height:o},children:h}),r.map(d=>{const y=d.propertyGroup,g=d.items.filter(b=>b.kind==="keyframe").length,v=d.items.filter(b=>b.kind==="ease").length;return m.jsxs("div",{role:"row","aria-rowindex":d.logicalIndex+1,"aria-level":d.level,"data-property-group":y,"data-timeline-logical-row-id":d.id,className:"sr-only",children:[m.jsx("div",{role:"rowheader","aria-colindex":1,"aria-owns":g6(s,d.id,"header"),children:y}),m.jsxs("div",{role:"gridcell","aria-colindex":2,"aria-owns":g6(i,d.id,"content"),children:[g," keyframes, ",v," ease controls"]})]},d.id)})]})}function i9e({label:t,memberCount:e,isExpanded:n,onToggleExpanded:r,laneCount:i,isLaneOpen:s,onToggleLanes:a,hidden:o,onToggleHidden:l,isSoloed:c,isHalfLitSolo:u,onToggleSolo:f,fxChain:h,onFxChainChange:d,onFxChainPreview:y,onFxAuditionTransport:g,onOpenFxRack:v,columnWidth:b,theme:w}){return m.jsxs("div",{role:"rowheader","aria-colindex":1,className:"sticky left-0 z-[12] flex shrink-0 items-center gap-1.5 overflow-hidden px-1.5 text-[11px]",style:{width:b,height:hs,color:"#ffffff",background:w.gutterBackground,borderRight:`1px solid ${w.gutterBorder}`},children:[m.jsx("button",{type:"button",tabIndex:-1,"aria-expanded":n,"aria-label":`${n?"Hide":"Show"} ${t} tracks`,title:`${n?"Hide":"Show"} tracks`,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 font-mono text-[13px] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${n?"text-white":"text-white/55 hover:text-white"}`,onPointerDown:O=>O.stopPropagation(),onClick:O=>{O.stopPropagation(),r()},children:m.jsx("span",{"aria-hidden":"true",children:n?"▾":"▸"})}),m.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-[12px] leading-none text-white/50",children:"▤"}),m.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",title:t,children:t}),m.jsx("span",{className:"shrink-0 rounded-full bg-white/10 px-1 text-[9px] leading-[14px] tabular-nums text-white/55","aria-hidden":"true",title:`${e} tracks`,children:e}),m.jsx("button",{type:"button",tabIndex:-1,"aria-label":o?"Unmute group":`Mute group ${t}`,title:o?"Unmute group":`Mute group ${t}`,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-[-1px] focus-visible:outline-[#3CE6AC] ${o?"text-[#3CE6AC] hover:text-white":"text-white/55 hover:text-white"}`,onPointerDown:O=>O.stopPropagation(),onClick:O=>{O.stopPropagation(),l()},children:o?m.jsx(pue,{size:14,weight:"bold","aria-hidden":"true"}):m.jsx(hue,{size:14,weight:"bold","aria-hidden":"true"})}),m.jsx("button",{type:"button",tabIndex:-1,"aria-pressed":c,"aria-label":"Hear only this",title:"Hear only this",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-[13px] font-semibold transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-[-1px] focus-visible:outline-[#3CE6AC] ${c?"text-[#F5C542] hover:text-white":u?"text-[#F5C542]/50 hover:text-white":"text-white/35 hover:text-white/75"}`,onPointerDown:O=>O.stopPropagation(),onClick:O=>{O.stopPropagation(),f({add:O.metaKey||O.ctrlKey})},children:m.jsx("span",{"aria-hidden":"true",children:"⌗"})}),m.jsx(t_,{fxChainRaw:h,onChainChange:d,onChainPreview:y,onAuditionTransport:g,onOpenRack:v}),m.jsxs("button",{type:"button",tabIndex:-1,"aria-expanded":s,"aria-label":`${s?"Hide":"Show"} ${t} lanes`,title:`${s?"Hide":"Show"} lanes`,className:`flex h-6 items-center justify-center gap-0.5 rounded border-0 bg-transparent px-1 text-[11px] leading-none focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${s?"text-[#3CE6AC]":"text-white/55 hover:text-white"}`,onPointerDown:O=>O.stopPropagation(),onClick:O=>{O.stopPropagation(),a()},children:[m.jsx("span",{"aria-hidden":"true",children:"∿"}),i>0&&m.jsx("span",{className:"text-[9px] tabular-nums text-white/55",children:i})]})]})}const qP=new Set;let XU=new Map;const n_={notify:t=>{XU=t,qP.forEach(e=>e(t))},subscribe:t=>(qP.add(t),()=>qP.delete(t)),get:()=>XU};function s9e(t){const e=t==null?void 0:t.levels;return Array.isArray(e)?new Map(e.map(n=>[n.groupId,{level:n.level,clipped:n.clipped}])):null}const a9e=33;function o9e(t){const e=x.useRef(n_.get().get(t)??null),[,n]=x.useState(0);return x.useEffect(()=>{let r=0;const i=n_.subscribe(s=>{e.current=s.get(t)??null,r||(r=setTimeout(()=>{r=0,n(a=>a+1)},a9e))});return()=>{i(),r&&clearTimeout(r)}},[t]),e.current}const l9e=2e3;function WU(t){return Math.min(2,Math.max(0,t))}function c9e({groupId:t,volume:e,memberLabels:n,onVolumeChange:r,onVolumeCommit:i,theme:s}){const[a,o]=x.useState(null),l=o9e(t),[c,u]=x.useState(!1),f=x.useRef(null);x.useEffect(()=>{l!=null&&l.clipped&&(u(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u(!1),l9e))},[l==null?void 0:l.clipped]),x.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const h=a??e,d=Math.min(1,(l==null?void 0:l.level)??0),y=n.length>0?`Holds ${n.join(", ")}`:"Holds nothing yet";return m.jsxs("div",{className:"absolute left-0 right-0 flex items-center gap-2 px-2 text-[10px] text-white/70",style:{top:hs,height:Lse},children:[m.jsx("input",{type:"range","aria-label":"Group volume",min:0,max:2,step:.01,value:h,className:"h-1 w-20 shrink-0 accent-[#3CE6AC]",onChange:g=>{const v=WU(Number(g.currentTarget.value));o(v),r(v)},onPointerUp:g=>{const v=WU(Number(g.currentTarget.value));o(null),i(v)}}),m.jsx("div",{className:"relative h-1.5 w-16 shrink-0 overflow-hidden rounded-full",style:{background:s.gutterBorder},"aria-hidden":"true",children:m.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full",style:{width:`${d*100}%`,background:c?"#ff5c5c":"#3CE6AC"}})}),c&&m.jsx("span",{className:"shrink-0 font-medium text-[#ff5c5c]",children:"Too loud"}),m.jsx("span",{className:"min-w-0 flex-1 truncate",title:y,children:y})]})}function u9e({index:t,rowKey:e,group:n,logicalRow:r,tracks:i,top:s,height:a,virtualized:o,contentOrigin:l,theme:c,rovingTargetId:u=null,expandedGroupIds:f,expandedLaneOwnerIds:h,toggleGroupExpanded:d,toggleLaneOwnerExpanded:y}){const g=n.memberTracks.flatMap(j=>{var L;return((L=i.find(([V])=>V===j))==null?void 0:L[1])??[]}),v=n.memberTracks.map((j,L)=>{var $,Z;const V=(Z=($=i.find(([W])=>W===j))==null?void 0:$[1])==null?void 0:Z.find(W=>W.audioGroup);return(V==null?void 0:V.label)??(V==null?void 0:V.id)??`track ${L+1}`}),b=h.has(n.id),{onSetAudioGroupAttributeLive:w,onSetAudioGroupAttributeQuiet:O}=iae(),C=oS(),E=ue(j=>j.soloed),M=ue(j=>j.toggleSolo),N=g.map(j=>j.key??j.id),I=(j,L)=>{const V=j.nodes.length?cu(j):null;L?w==null||w(n.id,Da,V):O==null||O(n.id,Da,V,"Apply preset")},_=()=>{var L,V;const j=(V=(L=C==null?void 0:C.previewIframeRef.current)==null?void 0:L.contentDocument)==null?void 0:V.getElementById(n.id);j&&(C==null||C.buildDomSelectionFromTarget(j).then($=>$&&C.applyDomSelection($)))};return m.jsxs(Bue,{index:t,rowKey:e,logicalRow:r,propertyRows:[],lanesId:"",headerLanesId:"",top:s,height:a,virtualized:o,background:c.rowBackground,borderColor:c.rowBorder,rovingTargetId:u,children:[m.jsx(i9e,{label:n.label,memberCount:n.memberTracks.length,isExpanded:f.has(n.id),onToggleExpanded:()=>d(n.id),laneCount:aS(g).length,isLaneOpen:b,onToggleLanes:()=>y(n.id),hidden:n.hidden,onToggleHidden:()=>O==null?void 0:O(n.id,"data-hidden",n.hidden?null:"",n.hidden?"Unmute group":`Mute group ${n.label}`),isSoloed:E.has(n.id),isHalfLitSolo:S6e(E,n.id,N),onToggleSolo:j=>M(n.id,j),fxChain:n.fxChain,onFxChainChange:j=>I(j,!1),onFxChainPreview:j=>I(j,!0),onOpenFxRack:_,columnWidth:l>=nf?nf:l,theme:c}),b&&m.jsx(c9e,{groupId:n.id,volume:n.volume,memberLabels:v,onVolumeChange:j=>w==null?void 0:w(n.id,"data-volume",String(j)),onVolumeCommit:j=>O==null?void 0:O(n.id,"data-volume",String(j),"Set group volume"),theme:c})]})}function f9e(){return{expandedGroupIds:ue(t=>t.expandedGroupIds),expandedLaneOwnerIds:ue(t=>t.expandedLaneOwnerIds),toggleGroupExpanded:ue(t=>t.toggleGroupExpanded),toggleLaneOwnerExpanded:ue(t=>t.toggleLaneOwnerExpanded)}}function h9e(t,e){const n=x.useMemo(()=>{const i=new Map;for(const s of t){const a=i.get(s.physicalTrackKey)??[];a.push(s),i.set(s.physicalTrackKey,a)}return i},[t]),r=x.useMemo(()=>new Map(e.map(i=>[i.anchorKey,i])),[e]);return{logicalRowsByTrack:n,groupByAnchor:r}}function Vue(t){return WCe()}function d9e(t){const e=new Map,n=new Map,r=new Map,i=new Map,s=new Map,a=new Map;for(const[o,l]of t){const c=l.find(f=>f.audioGroup);if(!(c!=null&&c.audioGroup))continue;e.set(o,c.audioGroup),r.has(c.audioGroup)||(r.set(c.audioGroup,c.audioGroupLabel??c.audioGroup),i.set(c.audioGroup,c.audioGroupVolume??1),s.set(c.audioGroup,c.audioGroupHidden??!1),a.set(c.audioGroup,c.audioGroupFxChain));const u=n.get(c.audioGroup)??[];u.push(o),n.set(c.audioGroup,u)}return{trackToGroupId:e,memberTracksByGroup:n,labelByGroup:r,volumeByGroup:i,hiddenByGroup:s,fxChainByGroup:a}}function p9e(t,e,n){const r=[...n.memberTracksByGroup.get(t)??[]].sort((s,a)=>s-a),i=n.fxChainByGroup.get(t);return{id:t,label:n.labelByGroup.get(t)??t,anchorKey:(r[0]??e)-.5,memberTracks:r,volume:n.volumeByGroup.get(t)??1,hidden:n.hiddenByGroup.get(t)??!1,...i?{fxChain:i}:{}}}function m9e(t,e,n,r){r.push([t.anchorKey,[]]);for(const i of t.memberTracks)n.set(i,t),r.push([i,e.get(i)??[]])}function g9e(t){const e=d9e(t),n=new Map(t),r=[],i=new Map,s=new Set,a=[];for(const[o,l]of t){const c=e.trackToGroupId.get(o);if(!c){a.push([o,l]);continue}if(s.has(c))continue;s.add(c);const u=p9e(c,o,e);r.push(u),m9e(u,n,i,a)}return{tracks:a,groups:r,trackGroupOf:i}}function y9e(t){const e=x.useMemo(()=>{const o=new Map;for(const l of t){const c=o.get(l.track)??[];c.push(l),o.set(l.track,c)}return Array.from(o.entries()).sort(([l],[c])=>l-c)},[t]),{tracks:n,groups:r,trackGroupOf:i}=x.useMemo(()=>g9e(e),[e]),s=x.useMemo(()=>{var l;const o=new Map;for(const[c,u]of n)o.set(c,Vue(((l=u[0])==null?void 0:l.tag)??""));return o},[n]),a=x.useMemo(()=>n.map(([o])=>o),[n]);return{tracks:n,trackStyles:s,trackOrder:a,groups:r,trackGroupOf:i}}function x9e(t,e,n){return((e==null?void 0:e.length)??0)<2?!1:n.selectedElementId?t.some(r=>(r.key??r.id)===n.selectedElementId):t.some(r=>n.isMusicTrack(r))}function b9e(t){return Rl(t)?Ule(t).length:0}function v9e(t){return aS(t).length}function A9e(t,e){return t.some(n=>e.has(n.key??n.id))}function vL(t,e,n,r,i=b9e){const s=l=>(e.get(l.key??l.id)??0)+i(l),a=t.filter(l=>s(l)>=1);if(a.length===0)return null;const o=a.find(l=>{const c=l.key??l.id;return c===n||r.has(c)});return o||a.reduce((l,c)=>s(c)>s(l)?c:l)}function S9e(t,e){const n=new Map;for(const[,r]of t)for(const i of r){const s=i.key??i.id,a=new Set;for(const o of e.get(s)??[])for(const l of kE(o))a.add(l);n.set(s,a.size)}return n}function w9e(t,e,n,r){if(n.length===0)return e;const i=new Map(n.map(s=>[s.anchorKey,s]));return t.map(([s],a)=>{const o=i.get(s);return!o||!r.has(o.id)?e[a]??hs:hs+Lse})}function O9e(t,e,n,r,i){const s=ue(u=>u.expandedClipIds),a=ue(u=>u.expandedLaneOwnerIds),{laneCounts:o,rowGeometry:l}=x.useMemo(()=>{const u=S9e(t,e),f=t.map(([,d])=>{const y=vL(d,u,n,r);if(!y)return[];const g=y.key??y.id,v=d.find(b=>s.has(b.key??b.id));return[{clipId:v?v.key??v.id:g,laneCount:u.get(g)??0,automationLaneCount:v9e(d)}]}),h=w9e(t,gEe(f,s),i,a);return{laneCounts:u,rowGeometry:tj(t.map(([d])=>d),h)}},[s,a,e,i,t,n,r]),c=x.useRef(l);return c.current=l,{laneCounts:o,rowGeometry:l,rowGeometryRef:c,rowHeights:l.rowHeights}}function k9e(t,e,n,r){const{tracks:i,trackStyles:s,trackOrder:a,groups:o,trackGroupOf:l}=y9e(t),c=x.useRef(a);c.current=a;const{laneCounts:u,rowGeometry:f,rowGeometryRef:h,rowHeights:d}=O9e(i,e,n,r,o);return{tracks:i,trackStyles:s,trackOrder:a,trackOrderRef:c,laneCounts:u,rowGeometry:f,rowGeometryRef:h,rowHeights:d,groups:o,trackGroupOf:l}}function C9e(t,e){return x.useMemo(()=>t.map(n=>{const r=e.getRowIndex(n);return r<0?hs:e.getRowHeight(r)}),[t,e])}function E9e(t,e){return x.useMemo(()=>{if(!(t!=null&&t.started)||e.includes(t.previewTrack))return e;const n=t.previewTrack,r=[];let i=!1;for(const s of e)!i&&Number.isInteger(s)&&s>n&&(r.push(n),i=!0),r.push(s);return i||r.push(n),r},[t,e])}function T9e(t,e,n){const r=E9e(t,e),i=C9e(r,n),s=x.useMemo(()=>tj(r,i),[r,i]);return{displayTrackOrder:r,displayRowHeights:s.rowHeights,rowGeometry:s,totalH:s.canvasHeight}}function AL(t){return t.dragStarted&&t.selectedKeys.size>1&&t.selectedKeys.has(t.draggedKey)}function Hue(t){return AL(t)?t.draggedPreviewStart-t.draggedOriginStart:0}function Que(t,e){return AL(e)&&t!==e.draggedKey&&e.selectedKeys.has(t)}function P9e(t,e,n){if(!Que(t,n))return 0;const r=Number.isFinite(e)?e:0;return Hue(n)*r}function M9e(t,e){if(e.length===0)return t;const n=Math.min(...e),r=n===0?0:-n;return t<r?r:t}function N9e(t,e,n){const r=t&&AL(t)?Hue(t):0;return e&&t&&r!==0?[{range:{start:n.start-r,end:n.end-r},identities:t.selectedKeys}]:[]}function ua(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function YU(t,e){return e==='"'?t.replace(/"/g,"""):t.replace(/'/g,"'")}function SL(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function D9e(t){return t.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function I9e(t){const e=[];let n="",r=null,i=!1,s=0;for(const a of t){if(i){n+=a,a===";"&&(i=!1);continue}if(a==="&"){i=!0,n+=a;continue}if(r){n+=a,a===r&&(r=null);continue}if(a==='"'||a==="'"){r=a,n+=a;continue}if(a==="("){s+=1,n+=a;continue}if(a===")"){s=Math.max(0,s-1),n+=a;continue}if(a===";"&&s===0){e.push(n),n="";continue}n+=a}return n&&e.push(n),e}function _9e(t,e,n,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${ua(e)}\\2[^>]*)>`,"i").exec(t);if(!s)return t;const a=s[1];return Zue(t,a,n,r)}function Zue(t,e,n,r){if(!e)return t;const i=/\bstyle=(["'])([\s\S]*?)\1/.exec(e);if(i){const s=i[2],a=i[1],o=new Map;for(const u of I9e(s)){const f=u.indexOf(":");if(f<0)continue;const h=u.slice(0,f).trim(),d=u.slice(f+1).trim();h&&o.set(h,d)}r===null?o.delete(n):o.set(n,r);const l=Array.from(o.entries()).map(([u,f])=>`${u}: ${YU(f,a)}`).join("; "),c=e.replace(i[0],`style=${a}${l}${a}`);return t.replace(e,c)}else{if(r===null)return t;const s=/\s*\/$/.test(e),o=`${s?e.replace(/\s*\/$/,""):e} style="${n}: ${YU(r,'"')}"${s?" /":""}`;return t.replace(e,o)}}function R9e(t,e,n,r){const i=Rf(t,e);if(!i)return t;const s=Zue(i.tag,i.tag,n,r);return B2(t,i,s)}function B2(t,e,n){return`${t.slice(0,e.start)}${n}${t.slice(e.end)}`}function KP(t,e,n){const i=new RegExp(`(<[^>]*\\b${e}=(["'])${ua(n)}\\2[^>]*)>`,"i").exec(t);return(i==null?void 0:i.index)==null?null:{tag:i[1],start:i.index,end:i.index+i[1].length}}function j9e(t,e){var l;const n=(l=e.selector)==null?void 0:l.match(/^\.([a-zA-Z0-9_-]+)$/);if(!n)return null;const r=n[1],i=new RegExp(`(<[^>]*\\bclass=(["'])[^"']*\\b${ua(r)}\\b[^"']*\\2[^>]*)>`,"gi"),s=e.selectorIndex??0;let a,o=0;for(;(a=i.exec(t))!==null;){if(o===s&&a.index!=null)return{tag:a[1],start:a.index,end:a.index+a[1].length};o+=1}return null}function Rf(t,e){if(e.hfId){const r=KP(t,"data-hf-id",e.hfId);if(r)return r}if(e.id){const r=KP(t,"id",e.id);if(r)return r}if(!e.selector)return null;const n=e.selector.match(/^\[data-composition-id="([^"]+)"\]$/);if(n){const r=KP(t,"data-composition-id",n[1]);if(r)return r}return j9e(t,e)}function qU(t,e,n){const r=Rf(t,e);if(!r)return;const i=n.startsWith("data-")?n:`data-${n}`,s=new RegExp(`\\b${i}=(["'])([^"']*)\\1`).exec(r.tag);return(s==null?void 0:s[2])!=null?D9e(s[2]):void 0}function DE(t,e){const n=Rf(t,e);return n==null?void 0:n.tag}function L9e(t,e,n,r){const i=Rf(t,e);if(!i)return t;const s=n.startsWith("data-")?n:`data-${n}`,a=new RegExp(`\\b${ua(s)}=(["'])([^"']*)\\1`),o=i.tag;if(r===null){if(!new RegExp(`\\b${ua(s)}(?:=(["'])[^"']*\\1)?`).test(o))return t;const f=new RegExp(`\\s+${ua(s)}(?:=(["'])[^"']*\\1)?`),h=o.replace(f,"");return B2(t,i,h)}const l=SL(r);if(a.test(o)){const u=o.replace(a,`${s}="${l}"`);return B2(t,i,u)}const c=o+` ${s}="${l}"`;return B2(t,i,c)}function F9e(t,e,n,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${ua(e)}\\2[^>]*)>`,"i").exec(t);if(!s)return t;const a=s[1],o=n.startsWith("data-")?n:`data-${n}`,l=new RegExp(`\\b${ua(o)}=(["'])([^"']*)\\1`);if(r===null){if(!new RegExp(`\\b${ua(o)}(?:=(["'])[^"']*\\1)?`).test(a))return t;const f=new RegExp(`\\s+${ua(o)}(?:=(["'])[^"']*\\1)?`),h=a.replace(f,"");return t.replace(a,h)}const c=SL(r);if(l.test(a)){const u=a.replace(l,`${o}="${c}"`);return t.replace(a,u)}else{const u=a+` ${o}="${c}"`;return t.replace(a,u)}}function $9e(t,e,n){const i=new RegExp(`(<([a-z0-9-]+)[^>]*\\bid=(["'])${ua(e)}\\3[^>]*>)`,"i").exec(t);if(!i||i.index==null)return t;const s=i[1],a=i[2],o=i.index+s.length,l=zue(t,a,o);return l<0?t:`${t.slice(0,o)}${n}${t.slice(l)}`}function zue(t,e,n){const r=new RegExp(`</?${ua(e)}\\b[^>]*>`,"gi");r.lastIndex=n;let i=1,s;for(;(s=r.exec(t))!==null;){const a=s[0];if(a.startsWith("</")){if(i-=1,i===0)return s.index;continue}a.endsWith("/>")||(i+=1)}return-1}const B9e=new Set(["loop","muted","autoplay","playsinline","controls","default","defer","disabled","hidden","nomodule","open","readonly","required","reversed","selected"]);function Gue(t,e,n,r){if(!e)return t;if(B9e.has(n)){const l=ua(n),c=new RegExp(`(?:^|\\s)${l}(?:\\s|=|$)`).test(e);if(r===null||r===""||r==="false"){if(!c)return t;const f=new RegExp(`\\s+${l}(?:=(["'])[^"']*\\1)?`),h=e.replace(f,"");return t.replace(e,h)}if(c)return t;const u=e+` ${n}`;return t.replace(e,u)}const s=new RegExp(`\\b${ua(n)}=(["'])([^"']*)\\1`);if(r===null){if(!s.test(e))return t;const l=new RegExp(`\\s+${ua(n)}=(["'])[^"']*\\1`),c=e.replace(l,"");return t.replace(e,c)}const a=SL(r);if(s.test(e)){const l=e.replace(s,`${n}="${a}"`);return t.replace(e,l)}const o=e+` ${n}="${a}"`;return t.replace(e,o)}function V9e(t,e,n,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${ua(e)}\\2[^>]*)>`,"i").exec(t);return s?Gue(t,s[1],n,r):t}function H9e(t,e,n,r){const i=Rf(t,e);if(!i)return t;const s=Gue(i.tag,i.tag,n,r);return B2(t,i,s)}function Q9e(t,e,n){const r=Rf(t,e);if(!r)return t;const i=/^<([a-z0-9-]+)/i.exec(r.tag),s=i==null?void 0:i[1];if(!s)return t;const a=zue(t,s,r.end+1);return a<0?t:`${t.slice(0,r.end+1)}${n}${t.slice(a)}`}function Z9e(t,e,n){switch(n.type){case"inline-style":return _9e(t,e,n.property,n.value);case"attribute":return F9e(t,e,n.property,n.value);case"html-attribute":return V9e(t,e,n.property,n.value);case"text-content":return n.value!==null?$9e(t,e,n.value):t;default:return t}}function sd(t,e,n){if(e.id){const r=Z9e(t,e.id,n);if(r!==t||!e.selector)return r}switch(n.type){case"inline-style":return R9e(t,e,n.property,n.value);case"attribute":return L9e(t,e,n.property,n.value);case"html-attribute":return H9e(t,e,n.property,n.value);case"text-content":return n.value!==null?Q9e(t,e,n.value):t;default:return t}}const KU=new WeakMap;function cS(t,e,n){let r=KU.get(t);r||(r=new Map,KU.set(t,r));const s=(r.get(e)??Promise.resolve()).then(n,n);return r.set(e,s),s.then(()=>{(r==null?void 0:r.get(e))===s&&r.delete(e)},()=>{(r==null?void 0:r.get(e))===s&&r.delete(e)}),s}function wL(t,e,n){const r=[...new Set(e)].sort(),i=s=>{const a=r[s];return a===void 0?n():cS(t,a,()=>i(s+1))};return i(0)}const Uue="__studioSaveAttempt";class Up extends Error{constructor(n,r,i={}){super(n);Ct(this,"statusCode");Ct(this,"alreadyToasted");this.name="StudioSaveHttpError",this.statusCode=r,this.alreadyToasted=i.alreadyToasted??!1}}class Xue extends Error{constructor(e,n){super(e,n),this.name="StudioSaveNetworkError"}}class d0 extends Up{constructor(n){super(`Save conflict: ${n.filePath} changed outside this Studio session`,409);Ct(this,"filePath");Ct(this,"currentVersion");Ct(this,"currentContent");Ct(this,"attemptedContent");this.name="StudioFileConflictError",this.filePath=n.filePath,this.currentVersion=n.currentVersion,this.currentContent=n.currentContent,this.attemptedContent=n.attemptedContent}}function x4(t,e){const r=t[e];return typeof r=="number"&&Number.isFinite(r)?r:void 0}function Wue(){if(typeof DOMException<"u")return new DOMException("Save aborted","AbortError");const t=new Error("Save aborted");return t.name="AbortError",t}function JU(t){if(t!=null&&t.aborted)throw Wue()}function z9e(t,e){if(!t||typeof t!="object")return t;try{Object.defineProperty(t,Uue,{value:e,configurable:!0})}catch{}return t}function Su(t){return t instanceof Error&&t.message?t.message:typeof t=="string"&&t.trim()?t:"Unknown save failure"}function eX(t){if(!t||typeof t!="object")return t;try{Object.defineProperty(t,"alreadyToasted",{value:!0,configurable:!0})}catch{}return t}function OL(t){if(!t||typeof t!="object")return!1;if(t.alreadyToasted===!0)return!0;const e=t.cause;return e!==t&&OL(e)}function zv(t){if(!t||typeof t!="object")return;const e=x4(t,"statusCode")??x4(t,"status")??x4(t,"status_code");if(e!=null)return e;const n=t.cause;if(n&&n!==t)return zv(n)}function Yue(t){if(!t||typeof t!="object")return;const e=x4(t,Uue);if(e!=null)return e;const n=t.cause;if(n&&n!==t)return Yue(n)}function G9e(t){return t instanceof Error&&t.name==="AbortError"}function U9e(t){if(G9e(t))return!1;if(t instanceof Xue)return!0;const e=zv(t);return e==null?!1:e===408||e===425||e===429||e>=500}function X9e(t){const e=t.statusCode??zv(t.error)??null,n=t.attempt??Yue(t.error)??void 0;return{source:t.source,error_message:Su(t.error),status_code:e,file_path:t.filePath??t.targetSourceFile??void 0,mutation_type:t.mutationType??void 0,attempt:n,label:t.label??void 0,target_id:t.targetId??void 0,target_selector:t.targetSelector??void 0,target_source_file:t.targetSourceFile??void 0}}function sy(t){Tt("save_failure",X9e(t))}async function Ad(t,e,n={}){let r="";try{r=await t.text()}catch{r=""}const i=r.trim().slice(0,300),s=i?`${e} (${t.status}): ${i}`:`${e} (${t.status})`;return new Up(s,t.status,n)}async function W9e(t,e={}){const n=e.retries??3,r=e.baseDelayMs??500,i=e.maxDelayMs??8e3,s=e.jitterRatio??.25,a=e.random??Math.random,o=e.shouldRetry??U9e,l=e.sleep??((u,f)=>new Promise((h,d)=>{JU(f);const y=()=>{globalThis.clearTimeout(g),d(Wue())},g=globalThis.setTimeout(()=>{f==null||f.removeEventListener("abort",y),h()},u);f==null||f.addEventListener("abort",y,{once:!0})})),c=n+1;for(let u=1;u<=c;u++)try{return JU(e.signal),await t(u)}catch(f){const h=z9e(f,u);if(u>=c||!o(h,u))throw h;const d=u-1,y=Math.min(r*2**d,i),g=y*s,v=Math.round(y+(a()*2-1)*g),b=Math.max(0,Math.min(i,v));await l(b,e.signal)}throw new Error("Save retry loop exited unexpectedly")}async function kL(t,e){const n=await fetch(`/api/projects/${t}/files/${encodeURIComponent(e)}`);if(!n.ok)throw await Ad(n,`Failed to read ${e}`);const r=await n.json();if(typeof r.content!="string")throw new Error(`Missing file contents for ${e}`);return r.content}async function Ko({label:t,kind:e,coalesceKey:n,coalesceMs:r,files:i,readFile:s,writeFile:a,recordEdit:o,diskContent:l}){return wL(a,Object.keys(i),async()=>{const c={};for(const[h,d]of Object.entries(i)){const y=await s(h);y!==d&&(c[h]={before:y,after:d})}const u=Object.keys(c);if(u.length===0)return[];const f=[];try{for(const h of u)await a(h,c[h].after,(l==null?void 0:l[h])??c[h].before),f.push(h);await o({label:t,kind:e,coalesceKey:n,coalesceMs:r,files:c})}catch(h){try{for(const d of f.reverse())await a(d,c[d].before,c[d].after)}catch(d){throw new AggregateError([h,d],"Failed to save project files and rollback did not complete")}throw h}return u})}const Y9e=64,q9e=2,K9e="rec709",Gv=16,que=4,Vn={hueDegrees:{min:0,max:360},unit:{min:0,max:1},signedUnit:{min:-1,max:1},secondaryHueRange:{min:0,max:180},secondaryHueSoftness:{min:0,max:180},secondaryHueCombinedMax:180,secondarySoftRangeSoftness:{min:0,max:.5},secondaryHueShift:{min:-180,max:180},effects:{asciiStyle:{min:0,max:7},bloom:{min:0,max:3},bloomRadius:{min:1,max:100},monoScreenShape:{min:0,max:4}}},J9e=["exposure","contrast","highlights","shadows","whites","blacks","temperature","tint","vibrance","saturation"],eRe=["shadows","midtones","highlights"],tRe=["master","red","green","blue"],nRe=["hueVsHue","hueVsSaturation","hueVsLuma"],rRe=["vignette","vignetteMidpoint","vignetteRoundness","vignetteFeather","grain","grainSize","grainRoughness"],iRe=["blur","pixelate","chromaBleed","tapeDamage","tapeTracking","tapeNoise","tapeSpeed","filmArtifacts","halftone","halftoneSize","twoInkPrint","twoInkPrintSize","ascii","asciiSize","asciiInvert","asciiStyle","asciiColor","asciiRotation","dither","ditherSize","bloom","bloomRadius","monoScreen","monoScreenSize","monoScreenAngle","monoScreenSpread","monoScreenShape","monoScreenInvert","scanlines","scanlineCount","scanlineSoftness","chromaticAberration","chromaticAngle","crtCurvature","digitalGlitch","digitalGlitchColorSplit","digitalGlitchLineTear","digitalGlitchPixelate","digitalGlitchBlockAmount","digitalGlitchBlockDisplacement","digitalGlitchBlockOpacity","digitalGlitchSpeed","engraving","engravingSpacing","engravingMinThickness","engravingMaxThickness","engravingAngle","engravingContrast","engravingSharpness","engravingWave","engravingWaveFrequency","crosshatch","crosshatchSpacing","crosshatchThickness","crosshatchAngle","crosshatchContrast","crosshatchEdges","crosshatchLineWeight","crosshatchWave","crosshatchWaveFrequency","kuwahara","kuwaharaRadius","kuwaharaSharpness","kuwaharaSaturation"],Kue=1024,Uv=Gv;function tX(t,e,n,r){const i=((2*t+e)*n-t*r)/(t+e);return Math.sign(i)!==Math.sign(n)?0:Math.sign(n)!==Math.sign(r)&&Math.abs(i)>3*Math.abs(n)?3*n:i}function Ss(t,e){const n=t[e];if(n===void 0)throw new RangeError("Color curve points must be contiguous");return n}function sRe(t){const e=[],n=[];let r=Ss(t,0);for(const a of t.slice(1)){const o=a[0]-r[0];e.push(o),n.push((a[1]-r[1])/o),r=a}const i=Ss(n,0);if(t.length===2)return[i,i];const s=new Array(t.length);s[0]=tX(Ss(e,0),Ss(e,1),i,Ss(n,1)),s[s.length-1]=tX(Ss(e,e.length-1),Ss(e,e.length-2),Ss(n,n.length-1),Ss(n,n.length-2));for(let a=1;a<t.length-1;a+=1){const o=Ss(n,a-1),l=Ss(n,a);if(o===0||l===0||Math.sign(o)!==Math.sign(l)){s[a]=0;continue}const c=Ss(e,a-1),u=Ss(e,a),f=2*u+c,h=u+2*c;s[a]=(f+h)/(f/o+h/l)}return s}function Jue(t,e){if(t.length<2)throw new RangeError("A color curve requires at least two points");if(!Number.isInteger(e)||e<2)throw new RangeError("Curve LUT size must be at least 2");let n=Number.NEGATIVE_INFINITY;for(const[r,i]of t){if(!Number.isFinite(r)||!Number.isFinite(i))throw new TypeError("Color curve points must be finite");if(r<=n)throw new RangeError("Color curve inputs must be strictly increasing");n=r}}function aRe(t,e,n){if(!Number.isFinite(e)||!Number.isFinite(n)||e>=n)throw new RangeError("Curve output bounds must be finite and increasing");if(t.some(([,r])=>r<e||r>n))throw new RangeError(`Curve outputs must be between ${e} and ${n}`)}function oRe(t,e,n,r,i){const s=n[0]-e[0],a=Math.min(1,Math.max(0,(t-e[0])/s)),o=a*a,l=o*a;return(2*l-3*o+1)*e[1]+(l-2*o+a)*s*r+(-2*l+3*o)*n[1]+(l-o)*s*i}function efe(t,e,n,r,i){aRe(t,r,i);const s=sRe(t),a=new Float32Array(e);let o=0;for(let l=0;l<e;l+=1){const c=n(l);for(;o<t.length-2&&c>Ss(t,o+1)[0];)o+=1;const u=Ss(t,o),f=Ss(t,o+1),h=oRe(c,u,f,Ss(s,o),Ss(s,o+1));a[l]=Math.min(i,Math.max(r,h))}return a}function lRe(t,e=Kue){var n,r;if(Jue(t,e),t.length>Uv)throw new RangeError(`A color curve supports at most ${Uv} points`);if(t.some(([i])=>i<0||i>1))throw new RangeError("Color curve inputs must be between 0 and 1");if(((n=t[0])==null?void 0:n[0])!==0||((r=t[t.length-1])==null?void 0:r[0])!==1)throw new RangeError("Color curves must include input endpoints 0 and 1");return efe(t,e,i=>i/(e-1),0,1)}function cRe(t,e,n,r=Kue){var l;if(t.length<3)throw new RangeError("A hue curve requires at least three points");if(t.length>Uv)throw new RangeError(`A hue curve supports at most ${Uv} points`);const i=[...t].sort((c,u)=>c[0]-u[0]);for(let c=0;c<i.length;c+=1){const u=i[c];if(!u||u[0]<0||u[0]>=360)throw new RangeError("Hue curve inputs must be from 0 up to 360 degrees");if(c>0&&u[0]===((l=i[c-1])==null?void 0:l[0]))throw new RangeError("Hue curve inputs must be unique")}const s=i.slice(-2).map(([c,u])=>[c-360,u]),a=i.slice(0,2).map(([c,u])=>[c+360,u]),o=[...s,...i,...a];return Jue(o,r),efe(o,r,c=>c/r*360,e,n)}const uRe="data-color-grading",IE="data-hf-color-grading-source-hidden",fRe="data-hf-authored-opacity",hRe="__hf_color_grading_",tfe=K9e,R6={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},j6={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},Xv={blur:0,pixelate:0,chromaBleed:0,tapeDamage:0,tapeTracking:0,tapeNoise:1,tapeSpeed:.5,filmArtifacts:0,halftone:0,halftoneSize:0,twoInkPrint:0,twoInkPrintSize:0,ascii:0,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0,dither:0,ditherSize:0,bloom:0,bloomRadius:8,monoScreen:0,monoScreenSize:0,monoScreenAngle:0,monoScreenSpread:0,monoScreenShape:0,monoScreenInvert:0,scanlines:0,scanlineCount:0,scanlineSoftness:0,chromaticAberration:0,chromaticAngle:0,crtCurvature:0,digitalGlitch:0,digitalGlitchColorSplit:0,digitalGlitchLineTear:0,digitalGlitchPixelate:0,digitalGlitchBlockAmount:0,digitalGlitchBlockDisplacement:0,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:0,engraving:0,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9,crosshatch:0,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9,kuwahara:0,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5},nfe=[{id:"noir",label:"Noir",group:"Classic",colors:["#000000","#ffffff"]},{id:"ink-paper",label:"Ink & Paper",group:"Classic",colors:["#1a1a2e","#f5f5dc"]},{id:"terminal",label:"Terminal",group:"Classic",colors:["#001100","#00ff00"]},{id:"amber-glow",label:"Amber Glow",group:"Classic",colors:["#1a0f00","#ffcc00"]},{id:"handheld-green",label:"Handheld Green",group:"Classic",colors:["#0f380f","#306230","#8bac0f","#9bbc0f"]},{id:"golden-hour",label:"Golden Hour",group:"Mood",colors:["#1a1205","#4a3510","#8b6914","#d4a017","#fff8dc"]},{id:"deep-sea",label:"Deep Sea",group:"Mood",colors:["#0a1628","#1a3a5c","#2d6187","#5ba4c9","#a8dce8"]},{id:"arctic-night",label:"Arctic Night",group:"Mood",colors:["#0a0a14","#1a2a4a","#3a5a8a","#6a9aca","#cae8ff"]},{id:"synthwave",label:"Synthwave",group:"Mood",colors:["#120458","#7b2cbf","#e040fb","#ff6ec7","#fff59d"]},{id:"vaporwave",label:"Vaporwave",group:"Mood",colors:["#1a0a2e","#3d1a5c","#ff71ce","#01cdfe","#fffb96"]},{id:"forest",label:"Forest",group:"Mood",colors:["#1a2e1a","#2d4a2d","#4a7c4a","#7ab37a","#c8e6c8"]},{id:"sepia",label:"Sepia",group:"Mono",colors:["#1a1610","#3d3020","#6b5a40","#a89070","#e8dcc8"]},{id:"blueprint",label:"Blueprint",group:"Mono",colors:["#001830","#003060","#0050a0","#0080e0","#e0f0ff"]},{id:"warm-print",label:"Warm Print",group:"HyperFrames",colors:["#17121a","#824c50","#e09873","#f7ddb1"]},{id:"electric-ink",label:"Electric Ink",group:"HyperFrames",colors:["#080717","#3c185f","#7e2278","#d9339f","#ff6b66","#aafae0"]}],CL=J9e,EL=eRe,TL=tRe,PL=nRe,rfe=rRe,ife=iRe,nX={exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},rX={vignette:.18};function bs(t,e,n={},r={},i={},s=1){return{id:t,label:e,intensity:s,adjust:{...R6,...n},details:{...j6,...r},effects:{...Xv,...i}}}const uS=[bs("neutral","Neutral"),bs("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),bs("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),bs("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),bs("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),bs("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),bs("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),bs("vintage-wash","Vintage Wash",nX,rX),bs("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),bs("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),bs("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),bs("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),bs("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06}),bs("creator-camcorder","Creator Camcorder",{contrast:.08,highlights:-.05,shadows:.02,whites:.03,blacks:-.04,temperature:-.03,tint:-.015,vibrance:-.03,saturation:-.06},{vignette:.06,grain:.08,grainSize:.18,grainRoughness:.58},{chromaBleed:.55},.72),bs("vhs-playback","VHS Playback",{contrast:-.04,saturation:-.08},{grain:.16,grainSize:.12,grainRoughness:.72},{tapeDamage:.82,tapeTracking:.85,tapeNoise:.3,tapeSpeed:.5,chromaBleed:.5,chromaticAberration:.18,scanlines:.35,scanlineCount:.17,scanlineSoftness:1,digitalGlitch:.32,digitalGlitchLineTear:.08,digitalGlitchSpeed:.5}),bs("home-movie-8mm","8mm Home Movie",nX,{...rX,vignette:.28,vignetteMidpoint:.54,vignetteFeather:.72,grain:.34,grainSize:.18,grainRoughness:.72},{filmArtifacts:.62},.72),bs("editorial-halftone","Editorial Halftone",{contrast:.04,saturation:.04},{},{halftone:.94,halftoneSize:.36}),bs("two-ink-print","Two-Ink Print",{contrast:.08,highlights:-.06,shadows:.04},{},{twoInkPrint:1,twoInkPrintSize:.42})],dRe=new Map(uS.map(t=>[t.id,t])),sfe={exposure:{min:-2,max:2},contrast:{min:-1,max:1},highlights:{min:-1,max:1},shadows:{min:-1,max:1},whites:{min:-1,max:1},blacks:{min:-1,max:1},temperature:{min:-1,max:1},tint:{min:-1,max:1},vibrance:{min:-1,max:1},saturation:{min:-1,max:1}},Rm={hue:0,amount:0,level:0},L6={amount:Vn.unit,level:Vn.signedUnit},Uh=[[0,0],[1,1]],$1=[],afe={hueVsHue:Vn.secondaryHueShift,hueVsSaturation:Vn.signedUnit,hueVsLuma:Vn.signedUnit},JP={center:0,range:180,softness:0},eM={min:0,max:1,softness:.05},ofe={vignette:Vn.unit,vignetteMidpoint:Vn.unit,vignetteRoundness:Vn.signedUnit,vignetteFeather:Vn.unit,grain:Vn.unit,grainSize:Vn.unit,grainRoughness:Vn.unit},rf=Vn.unit,lfe=Vn.effects,_E=["blur","pixelate","chromaBleed","tapeDamage","filmArtifacts","halftone","twoInkPrint","ascii","dither","bloom","monoScreen","scanlines","chromaticAberration","crtCurvature","digitalGlitch","engraving","crosshatch","kuwahara"],pRe=[{id:"essentials",label:"Essentials",description:"Common optical, focus, and privacy-oriented primitives."},{id:"retro-glitch",label:"Retro & Glitch",description:"Tape, film, CRT, channel separation, and digital disruption."},{id:"print",label:"Print",description:"Halftone, limited-ink, dither, and screen-print rendering."},{id:"art",label:"Art",description:"ASCII, engraved, crosshatched, and painterly rendering."}],mRe={blur:{family:"essentials",label:"Blur",description:"Defocus or soften a full media layer."},pixelate:{family:"essentials",label:"Pixelate",description:"Turn a media layer into a block mosaic."},bloom:{family:"essentials",label:"Bloom",description:"Add thresholded glow around bright image regions."},chromaBleed:{family:"retro-glitch",label:"Chroma Softening",description:"Smear color like low-bandwidth video."},tapeDamage:{family:"retro-glitch",label:"Tape Damage",description:"Add moving tracking errors and tape noise."},filmArtifacts:{family:"retro-glitch",label:"Film Artifacts",description:"Add deterministic dust and film wear."},scanlines:{family:"retro-glitch",label:"Scanlines",description:"Overlay configurable horizontal display lines."},crtCurvature:{family:"retro-glitch",label:"CRT Curvature",description:"Warp media toward curved CRT geometry."},chromaticAberration:{family:"retro-glitch",label:"Channel Separation",description:"Offset color channels by angle."},digitalGlitch:{family:"retro-glitch",label:"Digital Glitch",description:"Compose tears, blocks, and color splits."},halftone:{family:"print",label:"Halftone",description:"Render source color through a print-dot raster."},twoInkPrint:{family:"print",label:"Two-Ink Print",description:"Reduce media to a two-ink print treatment."},dither:{family:"print",label:"Ordered Dither",description:"Quantize media into an ordered limited palette."},monoScreen:{family:"print",label:"Mono Screen",description:"Build monochrome dot, shape, or line artwork."},ascii:{family:"art",label:"ASCII",description:"Render media as configurable procedural glyph cells."},engraving:{family:"art",label:"Engraving",description:"Translate luminance into directional engraved lines."},crosshatch:{family:"art",label:"Crosshatch",description:"Translate media into layered hand-hatched lines."},kuwahara:{family:"art",label:"Kuwahara Paint",description:"Apply edge-preserving painterly smoothing."}},ML=uS.filter(t=>_E.some(e=>t.effects[e]>1e-4)),cfe=uS.filter(t=>!ML.includes(t)),Wv={blur:{blur:.45},pixelate:{pixelate:.55},bloom:{bloom:.55,bloomRadius:8},chromaBleed:{chromaBleed:.55},tapeDamage:{tapeDamage:.65,tapeTracking:.55,tapeNoise:.25,tapeSpeed:.5},filmArtifacts:{filmArtifacts:.55},scanlines:{scanlines:.35,scanlineCount:.17,scanlineSoftness:1},chromaticAberration:{chromaticAberration:.15,chromaticAngle:0},crtCurvature:{crtCurvature:.2},digitalGlitch:{digitalGlitch:.55,digitalGlitchColorSplit:.25,digitalGlitchLineTear:.25,digitalGlitchPixelate:.15,digitalGlitchBlockAmount:.5,digitalGlitchBlockDisplacement:.25,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:.5},halftone:{halftone:.94,halftoneSize:.36},twoInkPrint:{twoInkPrint:1,twoInkPrintSize:.42},ascii:{ascii:1,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0},dither:{dither:1,ditherSize:.5},monoScreen:{monoScreen:1,monoScreenSize:.35,monoScreenAngle:.25,monoScreenSpread:.3,monoScreenShape:0,monoScreenInvert:0},engraving:{engraving:1,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9},crosshatch:{crosshatch:1,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9},kuwahara:{kuwahara:1,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5}},gRe=[{path:"intensity",name:"--hf-color-grading-intensity",min:0,max:1},{path:"lut.intensity",name:"--hf-color-grading-lut-intensity",min:0,max:1},{path:"adjust.exposure",name:"--hf-color-grading-exposure",min:-2,max:2},{path:"effects.blur",name:"--hf-color-grading-blur",min:0,max:1},{path:"effects.bloom",name:"--hf-color-grading-bloom",min:0,max:3},{path:"effects.kuwahara",name:"--hf-color-grading-kuwahara",min:0,max:1},{path:"effects.pixelate",name:"--hf-color-grading-pixelate",min:0,max:1},{path:"effects.ascii",name:"--hf-color-grading-ascii",min:0,max:1},{path:"effects.dither",name:"--hf-color-grading-dither",min:0,max:1}];function yRe(t){return lfe[t]??rf}const xRe=new Set(["ascii","dither","monoScreen","engraving","crosshatch"]),bRe=new Set(["blur","bloom","kuwahara"]);function NL(){return{version:q9e,targetTags:["img","video"],colorSpace:tfe,intensity:{identity:1,min:0,max:1},palette:{minColors:2,maxColors:6,colorFormat:"#rrggbb"},lut:{format:"3d-cube",maxCubeSize:Y9e,intensity:{...rf}},presets:[...cfe,...ML].map(t=>({id:t.id,label:t.label,intensity:t.intensity})),adjustments:CL.map(t=>({key:t,identity:R6[t],...sfe[t]})),wheels:{zones:EL,controls:{hue:{identity:0,unit:"degrees",wrap:!0,min:Vn.hueDegrees.min,maxExclusive:Vn.hueDegrees.max},amount:{identity:0,...L6.amount},level:{identity:0,...L6.level}}},curves:{channels:TL,input:{min:0,max:1},output:{min:0,max:1},minPoints:2,maxPoints:Gv,implicitEndpoints:!0,endpointsCountTowardMax:!0},hueCurves:{channels:PL.map(t=>({key:t,input:{min:0,maxExclusive:360,unit:"degrees",wrap:!0},output:afe[t]})),minPoints:3,maxPoints:Gv},secondaries:{max:que,hue:{center:{min:Vn.hueDegrees.min,maxExclusive:Vn.hueDegrees.max,unit:"degrees",wrap:!0},range:{...Vn.secondaryHueRange,unit:"degrees"},softness:{...Vn.secondaryHueSoftness,unit:"degrees"},rangePlusSoftnessMax:Vn.secondaryHueCombinedMax},saturation:{min:{...rf},max:{...rf},relation:"min < max",softness:{...Vn.secondarySoftRangeSoftness}},luma:{min:{...rf},max:{...rf},relation:"min < max",softness:{...Vn.secondarySoftRangeSoftness}},correction:{hueShift:{...Vn.secondaryHueShift,unit:"degrees"},saturation:{...Vn.signedUnit},luma:{...Vn.signedUnit},temperature:{...Vn.signedUnit},tint:{...Vn.signedUnit}}},effectFamilies:pRe,finishing:rfe.map(t=>({key:t,identity:j6[t],...ofe[t]})),effects:_E.map(t=>{const e=Wv[t];return{key:t,...mRe[t],apply:{...e},supportsPalette:xRe.has(t),renderLane:bRe.has(t)?"multipass":"single-pass",controls:ife.filter(n=>Object.hasOwn(e,n)).map(n=>({key:n,identity:Xv[n],recommended:e[n]??Xv[n],...yRe(n)}))}}),palettes:nfe.map(({id:t,label:e,group:n,colors:r})=>({id:t,label:e,group:n,colors:r})),animatable:gRe}}const vRe=/^#[0-9a-f]{6}$/i;function ARe(t){return!Array.isArray(t)||t.length<2||t.length>6||!t.every(e=>typeof e=="string"&&vRe.test(e))?null:t.map(e=>e.toLowerCase())}function _a(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Yv(t,e,n){return Number.isFinite(t)?Math.min(n,Math.max(e,t)):0}function ufe(t,e){const n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):e}function Na(t,e){const n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?Yv(n,e.min,e.max):0}function DL(t,e=0){const n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?(n%360+360)%360:e}function r_(t,e,n){const r=Yv((n-t)/(e-t),0,1);return r*r*(3-2*r)}function iX(t,e,n,r){return t<e?r<=0?0:r_(e-r,e,t):t>n?r<=0?0:1-r_(n,n+r,t):1}function SRe(t,e,n,r){const i=Math.abs(((t-r.hue.center+540)%360+360)%360-180);return(r.hue.range<179.999&&e<.001?0:i<=r.hue.range?1:r.hue.softness<=0?0:1-r_(r.hue.range,r.hue.range+r.hue.softness,i))*iX(e,r.saturation.min,r.saturation.max,r.saturation.softness)*iX(n,r.luma.min,r.luma.max,r.luma.softness)}function wRe(t){const e=_a(t)?t:{};return EL.reduce((n,r)=>{const i=_a(e[r])?e[r]:{};return n[r]={hue:DL(i.hue,Rm.hue),amount:Na(i.amount??Rm.amount,L6.amount),level:Na(i.level??Rm.level,L6.level)},n},{shadows:{...Rm},midtones:{...Rm},highlights:{...Rm}})}function ORe(t){if(!Array.isArray(t)||t.length!==2)return null;const e=Number(t[0]),n=Number(t[1]);return Number.isFinite(e)&&Number.isFinite(n)?[Yv(e,0,1),Yv(n,0,1)]:null}function ffe(t){return t.some((e,n)=>{var r;return n>0&&e[0]===((r=t[n-1])==null?void 0:r[0])})}function kRe(t){var e,n;(((e=t[0])==null?void 0:e[0])??0)>0&&t.unshift([0,0]),(((n=t.at(-1))==null?void 0:n[0])??1)<1&&t.push([1,1])}function CRe(t){if(!Array.isArray(t)||t.length<2)return Uh;const e=[];for(const n of t){const r=ORe(n);if(!r)return Uh;e.push(r)}return e.sort((n,r)=>n[0]-r[0]),ffe(e)||(kRe(e),e.length>Gv)?Uh:e}function ERe(t){const e=_a(t)?t:{};return TL.reduce((n,r)=>(n[r]=CRe(e[r]),n),{master:Uh,red:Uh,green:Uh,blue:Uh})}function TRe(t,e){if(!Array.isArray(t)||t.length!==2)return null;const n=Number(t[0]),r=Number(t[1]);return Number.isFinite(n)&&Number.isFinite(r)?[DL(n),Yv(r,e.min,e.max)]:null}function PRe(t,e){if(!Array.isArray(t)||t.length<3||t.length>Gv)return $1;const n=[];for(const r of t){const i=TRe(r,e);if(!i)return $1;n.push(i)}return n.sort((r,i)=>r[0]-i[0]),ffe(n)?$1:n}function MRe(t){const e=_a(t)?t:{};return PL.reduce((n,r)=>(n[r]=PRe(e[r],afe[r]),n),{hueVsHue:$1,hueVsSaturation:$1,hueVsLuma:$1})}function sX(t){const e=_a(t)?t:{},n=Na(e.min??eM.min,rf),r=Na(e.max??eM.max,rf);return{min:Math.min(n,r),max:Math.max(n,r),softness:Na(e.softness??eM.softness,Vn.secondarySoftRangeSoftness)}}function NRe(t){const e=_a(t)?t:{},n=Na(e.range??JP.range,Vn.secondaryHueRange);return{center:DL(e.center,JP.center),range:n,softness:Na(e.softness??JP.softness,{min:Vn.secondaryHueSoftness.min,max:Vn.secondaryHueCombinedMax-n})}}function DRe(t){return{hueShift:Na(t.hueShift??0,Vn.secondaryHueShift),saturation:Na(t.saturation??0,Vn.signedUnit),luma:Na(t.luma??0,Vn.signedUnit),temperature:Na(t.temperature??0,Vn.signedUnit),tint:Na(t.tint??0,Vn.signedUnit)}}function IRe(t){return!_a(t)||!_a(t.key)||!_a(t.correction)?null:{enabled:t.enabled!==!1,key:{hue:NRe(t.key.hue),saturation:sX(t.key.saturation),luma:sX(t.key.luma)},correction:DRe(t.correction)}}function _Re(t){if(!Array.isArray(t))return[];const e=[];for(const n of t.slice(0,que)){const r=IRe(n);r&&e.push(r)}return e}function RRe(t){if(t==null)return null;const e=String(t).trim();return e||null}function jRe(t){if(t==null)return null;if(typeof t=="string"){const n=t.trim();return n?{src:n,intensity:1}:null}if(!_a(t))return null;const e=t.src;return typeof e!="string"||e.trim()===""?null:{src:e.trim(),intensity:ufe(t.intensity,1)}}function LRe(t){if(typeof t=="string"){const e=t.trim();if(!e)return null;if(e.startsWith("{"))try{const n=JSON.parse(e);return _a(n)?n:null}catch{return null}return{preset:e}}return _a(t)?t:null}function FRe(t){return t?dRe.get(t)??null:null}function bc(t){const e=LRe(t);if(!e||e.enabled===!1)return null;const n=RRe(e.preset),r=FRe(n),i=(r==null?void 0:r.adjust)??R6,s=(r==null?void 0:r.details)??j6,a=(r==null?void 0:r.effects)??Xv,o=_a(e.adjust)?e.adjust:{},l=_a(e.details)?e.details:{},c=_a(e.effects)?e.effects:{},u=CL.reduce((d,y)=>(d[y]=Na(o[y]??i[y],sfe[y]),d),{...R6}),f=rfe.reduce((d,y)=>(d[y]=Na(l[y]??s[y],ofe[y]),d),{...j6}),h=ife.reduce((d,y)=>(d[y]=Na(c[y]??a[y],lfe[y]??rf),d),{...Xv});return{enabled:!0,preset:n,intensity:ufe(e.intensity,(r==null?void 0:r.intensity)??1),adjust:u,wheels:wRe(e.wheels),curves:ERe(e.curves),hueCurves:MRe(e.hueCurves),secondaries:_Re(e.secondaries),details:f,effects:h,palette:ARe(e.palette),lut:jRe(e.lut),colorSpace:typeof e.colorSpace=="string"&&e.colorSpace.trim()?e.colorSpace.trim():tfe}}function hfe(t){return EL.some(e=>Math.abs(t[e].amount)>1e-4||Math.abs(t[e].level)>1e-4)}function dfe(t){return TL.some(e=>t[e].some(([n,r])=>Math.abs(n-r)>1e-4))}function pfe(t){return PL.some(e=>t[e].some(([,n])=>Math.abs(n)>1e-4))}function $Re(t){return t.some(e=>e.enabled&&Object.values(e.correction).some(n=>Math.abs(n)>1e-4))}function i_(t){const e=bc(t);if(!e)return"";const{enabled:n,wheels:r,curves:i,hueCurves:s,secondaries:a,palette:o,...l}=e;return JSON.stringify({...l,...hfe(r)?{wheels:r}:{},...dfe(i)?{curves:i}:{},...pfe(s)?{hueCurves:s}:{},...a.length>0?{secondaries:a}:{},...o?{palette:o}:{}})}function Xp(t){return t!=null&&t.enabled?Math.abs(t.details.vignette)>1e-4||Math.abs(t.details.grain)>1e-4||_E.some(n=>Math.abs(t.effects[n])>1e-4)?!0:t.intensity===0?!1:t.lut&&t.lut.intensity!==0?!0:CL.some(n=>Math.abs(t.adjust[n])>1e-4)||(t.wheels?hfe(t.wheels):!1)||(t.curves?dfe(t.curves):!1)||(t.hueCurves?pfe(t.hueCurves):!1)||(t.secondaries?$Re(t.secondaries):!1):!1}function aX(t){var e;return t?(e=t.secondaries)!=null&&e.length?!0:Xp(t):!1}function mfe(t){return t.getAttribute(fRe)}function gfe(t,e){e===""?t.removeProperty("opacity"):t.setProperty("opacity",e)}const yfe="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/MotionPathPlugin.min.js";function BRe(t){var r,i;if(!(t!=null&&t.contentWindow)||!t.contentDocument)return;const e=t.contentWindow,n=t.contentDocument;if(e.MotionPathPlugin){try{(r=e.gsap)!=null&&r.registerPlugin&&e.gsap.registerPlugin(e.MotionPathPlugin)}catch{}return}if((i=e.gsap)!=null&&i.registerPlugin&&!e.__hfMotionPathPluginLoading)try{e.__hfMotionPathPluginLoading=!0;const s=n.createElement("script");s.src=yfe;const a=()=>{var o;e.__hfMotionPathPluginLoading=!1;try{e.MotionPathPlugin&&((o=e.gsap)!=null&&o.registerPlugin)&&e.gsap.registerPlugin(e.MotionPathPlugin)}catch{}};s.onload=a,s.onerror=a,n.head.appendChild(s)}catch{e.__hfMotionPathPluginLoading=!1}}function VRe(t){return t.includes("gsap.timeline")||t.includes("__timelines")||t.includes(".to(")||t.includes(".set(")}function RE(t){const e=[],n=t.querySelectorAll("script:not([src])");for(const r of n)VRe(r.textContent||"")&&e.push(r);return e}function F6(t){const e=new DOMParser().parseFromString(t,"text/html"),n=RE(e);return n.length!==1?null:n[0].textContent||null}function HRe(t,e){const n=t.__timelines;return n?e.length>0?e.every(r=>n[r]!=null):Object.keys(n).filter(r=>r!=="__proxied").length>0:!1}function s_(t,e){var n,r,i,s;(r=(n=t.__player)==null?void 0:n.seek)==null||r.call(n,e),(i=t.__hfForceTimelineRebind)==null||i.call(t),(s=t.__hfStudioManualEditsApply)==null||s.call(t)}function xfe(t,e){const n=t==null?void 0:t.contentWindow;if(!(n!=null&&n.__hfForceTimelineRebind))return!1;try{return n.__hfSuppressSceneMutations?n.__hfSuppressSceneMutations(()=>s_(n,e)):s_(n,e),!0}catch{return!1}}function IL(t,e,n={}){var b,w;const{onAsyncFailure:r,currentTimeOverride:i,authoredHtml:s}=n;if(!t||!e)return"cannot-soft-reload";const a=t.contentWindow,o=t.contentDocument;if(!a||!o||!a.gsap||!a.__hfForceTimelineRebind)return"cannot-soft-reload";const l=[...e.matchAll(/__timelines\s*\[\s*["'`]([^"'`]+)["'`]\s*\]/g)].map(O=>O[1]).filter(O=>O!=="__proxied");if(l.length===0)return"cannot-soft-reload";const c=RE(o);if(c.length===0)return"cannot-soft-reload";const u=c.filter(O=>l.some(C=>{const E=O.textContent||"";return E.includes(`__timelines["${C}"]`)||E.includes(`__timelines['${C}']`)}));if(c.length>1&&u.length===0)return"cannot-soft-reload";const f=i??((w=(b=a.__player)==null?void 0:b.getTime)==null?void 0:w.call(b))??0;let h=!1,d;const y=O=>{if(d===void 0)try{d=s?new DOMParser().parseFromString(s,"text/html"):null}catch{d=null}if(!d)return null;const C=O.getAttribute("data-hf-id");return C?d.querySelector(`[data-hf-id="${C}"]`):O.id?d.getElementById(O.id):null},g=O=>{const C=y(O);return C instanceof HTMLElement?C.style.opacity:mfe(O)},v=()=>{var I,_,j;const O=a.__timelines,C=[];if(O)for(const L of l){const V=O[L];if(V){if(V.getChildren)try{for(const $ of V.getChildren(!0))if(typeof $.targets=="function")for(const Z of $.targets())C.push(Z)}catch{}try{(I=V.kill)==null||I.call(V)}catch{}delete O[L]}}const E=new Set(C);for(const L of o.querySelectorAll("[style*='transform']"))L.style.transform&&"_gsap"in L&&!E.has(L)&&(E.add(L),C.push(L));if(C.length>0&&((_=a.gsap)!=null&&_.set)){const L=[];for(const V of C){const $=V;((j=$.style)==null?void 0:j.cssText)!=null&&L.push([$,$.style.cssText])}try{a.gsap.set(C,{clearProps:"all"})}catch{}for(const[V,$]of L){const Z=V.style;Z.cssText=$,Z.removeProperty("transform");const W=g(V);W!==null?gfe(Z,W):V.hasAttribute(IE)&&Z.getPropertyValue("opacity")==="0"&&Z.getPropertyPriority("opacity")==="important"&&Z.removeProperty("opacity")}}for(const L of u)L.remove();const M=()=>{var V;a.MotionPathPlugin&&((V=a.gsap)!=null&&V.registerPlugin)&&a.gsap.registerPlugin(a.MotionPathPlugin);const L=o.createElement("script");L.textContent=`(function(){${e}
|
|
203
203
|
})();`,o.body.appendChild(L),s_(a,f)};if(/motionPath\s*[:{]/.test(e)&&!a.MotionPathPlugin&&a.gsap){if(h=!0,a.__hfMotionPathPluginLoading){const V=Date.now(),$=a.setInterval(()=>{a.MotionPathPlugin?(a.clearInterval($),M()):(!a.__hfMotionPathPluginLoading||Date.now()-V>1e4)&&(a.clearInterval($),r==null||r())},50);return}a.__hfMotionPathPluginLoading=!0;const L=o.createElement("script");L.src=yfe,L.onload=()=>{a.__hfMotionPathPluginLoading=!1,M()},L.onerror=()=>{a.__hfMotionPathPluginLoading=!1,r==null||r()},o.head.appendChild(L);return}M()};try{return a.__hfSuppressSceneMutations?a.__hfSuppressSceneMutations(v):v(),h||HRe(a,l)?"applied":"verify-failed"}catch{return"cannot-soft-reload"}}function QRe(t,e){if(!t||!Number.isFinite(e)||e<=0)return!1;const n=Array.from(t.querySelectorAll("[data-composition-id]")),r=n.find(i=>{var s;return!((s=i.parentElement)!=null&&s.closest("[data-composition-id]"))})??n[0]??null;return r?(r.setAttribute("data-duration",di(e)),!0):!1}const ZRe=5*6e4,qv=new Map;function bfe(t){for(const[e,n]of qv)t-n>=ZRe&&qv.delete(e)}function vfe(t,e=Date.now()){bfe(e),qv.set(t,e)}function zRe(t,e=Date.now()){return bfe(e),!t||!qv.has(t)?!1:(qv.delete(t),!0)}async function GRe(t){const e=new TextEncoder().encode(t),n=await globalThis.crypto.subtle.digest("SHA-256",e);return`"sha256:${Array.from(new Uint8Array(n),i=>i.toString(16).padStart(2,"0")).join("")}"`}async function URe(t,e,n){return n!==void 0?GRe(n):t.get(e)}function XRe(){return globalThis.crypto.randomUUID()}function Bl(){const t=XRe();return vfe(t),{"X-Hyperframes-Write-Token":t}}class Kv extends Error{}class $6 extends Kv{}async function ya(t,e){if(e.includes("\0")||e.includes(".."))throw new Error(`Unsafe path: ${e}`);const n=await fetch(`/api/projects/${encodeURIComponent(t)}/files/${encodeURIComponent(e)}`);if(!n.ok)throw new Error(`Failed to read ${e}`);const r=await n.json();if(typeof r.content!="string")throw new Error(`Missing file contents for ${e}`);return r.content}async function WRe(t){const e=await fetch(`/api/projects/${encodeURIComponent(t)}/gsap-mutation-capabilities`);if(!e.ok)throw new $6("Server does not support owned GSAP mutations");const n=await e.json().catch(()=>null);if(!_L(n)||n.atomicOwnershipPairs!==!0)throw new $6("Invalid GSAP mutation capability response")}async function YRe(t,e,n,r){if(e.includes("\0")||e.includes(".."))throw new Error(`Unsafe path: ${e}`);const i=await fetch(`/api/projects/${encodeURIComponent(t)}/gsap-mutation-rollback/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expected:n,restore:r})});if(!i.ok)throw new Error(`Failed to restore ${e}`);const s=await i.json();if(s.restored===!0&&s.conflict===!1)return"restored";if(s.restored===!1&&s.conflict===!0)return"conflict";throw new Error(`Invalid restore response for ${e}`)}function Afe(t,e){try{QRe((t==null?void 0:t.contentDocument)??null,e)}catch{}}function B6(t){const e=ZR((t==null?void 0:t.contentDocument)??null);e>0&&(ue.getState().setDuration(e),Afe(t,e))}function Jv(t){const e=ue.getState().duration;return()=>{ue.getState().duration!==e&&(ue.getState().setDuration(e),Afe(t,e))}}function _L(t){return typeof t=="object"&&t!==null}function qRe(t){if(!_L(t)||typeof t.mutated!="boolean"||typeof t.before!="string"||typeof t.after!="string"||t.mutated!==(t.before!==t.after)||"changed"in t&&t.changed!==t.mutated)throw new $6("Invalid owned GSAP mutation response");return{mutated:t.mutated,scriptText:typeof t.scriptText=="string"?t.scriptText:null,before:t.before,after:t.after}}function KRe(t,e){return _L(t)&&typeof t.error=="string"?t.error:e}async function Sfe(t,e,n,r){let i;try{i=await fetch(`/api/projects/${encodeURIComponent(t)}/gsap-mutations/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json",...Bl()},body:JSON.stringify(n)})}catch(a){throw new Kv(`${r}: mutation outcome unknown`,{cause:a})}const s=await i.json().catch(()=>null);if(!i.ok)throw new Kv(KRe(s,r));return qRe(s)}function JRe(t,e){return xfe(t,e)}function eje(t,e,n,r,i){if(!e.mutated&&i){JRe(t,n)||r();return}if(!t||!e.scriptText){r();return}IL(t,e.scriptText,{onAsyncFailure:r,currentTimeOverride:n})==="cannot-soft-reload"&&r()}async function wfe(t){let e={mutated:!1,scriptText:null};if(t.gsapMutation)try{e=await t.gsapMutation()}catch(n){t.onGsapError(n),n instanceof Kv&&t.reloadPreview();return}eje(t.iframe,e,ue.getState().currentTime,t.reloadPreview,t.rebindWhenUnmutated)}const tje=1e4;async function nje(t,e,n){let r=!1;for(let i=e.length-1;i>=0;i-=1){const s=e[i];if(!(!s||s.before===s.after))try{await YRe(t,s.path,s.after,s.before)==="conflict"&&(r=!0)}catch(a){r=!0,n(a)}}return r?"convergence-required":"restored"}async function oX(t,e,n,r){throw await nje(t,e,n)==="convergence-required"?new Kv("GSAP rollback could not safely restore every owned write; preview reload required",{cause:r}):r}async function Ofe(t){const e=[],n=async(i,s)=>{const a=s();if(!a)return{mutated:!1,scriptText:null};const o=await a;if(!o.mutated)return o;if(o.before===void 0||o.after===void 0)throw new $6(`GSAP mutation returned no owned before/after pair for ${i}`);const l=[...e].reverse().find(u=>u.path===i),c={path:i,before:o.before,after:o.after};if(e.push(c),l&&l.after!==c.before)throw new Error(`GSAP mutation ownership chain broke for ${i}`);return o};let r;try{await WRe(t.projectId),r=await t.gsapMutation(n)}catch(i){return oX(t.projectId,e,t.onRollbackError,i)}if(r.mutated)try{const i=new Map;for(const a of e){const o=i.get(a.path);o?o.after=a.after:i.set(a.path,{before:a.before,after:a.after})}const s={};for(const[a,o]of i){if(await ya(t.projectId,a)!==o.after)throw new Error(`GSAP mutation ownership lost for ${a}`);o.before!==o.after&&(s[a]=o)}Object.keys(s).length>0&&await t.recordEdit({label:t.label,kind:"timeline",coalesceKey:t.coalesceKey,coalesceMs:tje,files:s})}catch(i){return oX(t.projectId,e,t.onRollbackError,i)}return r}async function kfe(t,e,n,r){return r===0||!n?{mutated:!1,scriptText:null}:Sfe(t,e,{type:"shift-positions",targetSelector:`#${n}`,delta:r},"shift-positions failed")}async function Cfe(t,e,n,r,i,s,a){return!n||i<=0||a<=0?{mutated:!1,scriptText:null}:r===s&&i===a?{mutated:!1,scriptText:null}:Sfe(t,e,{type:"scale-positions",targetSelector:`#${n}`,oldStart:r,oldDuration:i,newStart:s,newDuration:a},"scale-positions failed")}function lX(t){const{projectId:e,targetPath:n,domId:r,edit:i}=t,s=i.kind==="shift"?i.delta!==0:i.from.start!==i.to.start||i.from.duration!==i.to.duration,a=(l,c)=>i.kind==="shift"?kfe(l,n,c,i.delta):Cfe(l,n,c,i.from.start,i.from.duration,i.to.start,i.to.duration),o=l=>console.error(`[Timeline] Failed to ${i.kind} GSAP positions`,l);return wfe({iframe:t.iframe,reloadPreview:t.reloadPreview,gsapMutation:s&&r&&e?()=>Ofe({projectId:e,label:t.label,coalesceKey:t.coalesceKey,recordEdit:t.recordEdit,gsapMutation:l=>l(n,()=>a(e,r)),onRollbackError:o}):void 0,onGsapError:o,rebindWhenUnmutated:!0})}async function cX(t){const e=t.activeCompPath||"index.html",n=t.changes.some(i=>t.resolveChangePath(i.element)!==e),r=i=>console.error(`[Timeline] ${t.errorLabel}`,i);await wfe({iframe:t.iframe,reloadPreview:t.reloadPreview,gsapMutation:()=>Ofe({projectId:t.projectId,label:t.label,coalesceKey:t.coalesceKey,recordEdit:t.recordEdit,gsapMutation:async i=>{let s=!1,a=null;for(const o of t.changes){const l=t.resolveChangePath(o.element),c=await i(l,()=>t.mutateChange(o,l));s=s||c.mutated,l===e&&(a=c.scriptText)}return{mutated:s,scriptText:n?null:a}},onRollbackError:r}),onGsapError:r,rebindWhenUnmutated:!n})}const Efe=["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","object-fit","object-position"];function Xc(t){if(!t)return null;const e=t.trim();if(!e.endsWith("px"))return null;const n=parseFloat(e);return Number.isFinite(n)?n:null}function rje(t){const e=(t??"none").trim();if(!e||e==="none")return!0;const n=e.match(/^matrix\(([^)]+)\)$/i);if(n&&n[1]){const a=n[1].split(",");if(a.length!==6)return!1;const o=a.map(y=>Number.parseFloat(y.trim()));if(o.some(y=>!Number.isFinite(y)))return!1;const[l=0,c=0,u=0,f=0,h=0,d=0]=o;return Math.abs(l-1)<1e-4&&Math.abs(c)<1e-4&&Math.abs(u)<1e-4&&Math.abs(f-1)<1e-4&&Math.abs(h)<1e-4&&Math.abs(d)<1e-4}const r=e.match(/^matrix3d\(([^)]+)\)$/i);if(!r||!r[1])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,o)=>Math.abs(a-(s[o]??0))<1e-4)}function ije(t){if(!t.hasStableTarget||t.isInsideLockedComposition)return{canSelect:!t.isInsideLockedComposition,canEditStyles:!1,canCrop:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:t.isInsideLockedComposition?"This element belongs to a locked composition.":"Studio could not resolve a stable patch target for this element."};if(!t.existsInSource)return{canSelect:!0,canEditStyles:!1,canCrop:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:"This element is generated by a script and cannot be edited visually."};if(t.isCompositionRoot)return{canSelect:!0,canEditStyles:!0,canCrop:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:"The root composition defines the preview bounds."};const e=t.computedStyles??{},n=e.position,r=Xc(t.inlineStyles.left)??Xc(e.left),i=Xc(t.inlineStyles.top)??Xc(e.top),s=Xc(t.inlineStyles.width)??Xc(e.width),a=Xc(t.inlineStyles.height)??Xc(e.height),o=!rje(e.transform),l=(n==="absolute"||n==="fixed")&&r!=null&&i!=null&&!o,c=l&&(s!=null||a!=null),u=!t.isCompositionHost,f=u?void 0:"Select an internal layer to transform it.";return{canSelect:!0,canEditStyles:!(t.isCompositionHost&&t.isMasterView),canCrop:!0,canMove:l,canResize:c,canApplyManualOffset:u,canApplyManualSize:u,canApplyManualRotation:u,reasonIfDisabled:f}}function RL(t){const e=t.tag!=="audio";return{text:t.hasEditableText&&!t.isCompositionHost&&!t.isInsideLockedComposition,media:t.tag==="video"||t.tag==="audio"||t.tag==="img",audioFx:t.tag==="audio",colorGrading:t.tag==="video"||t.tag==="img",timing:t.hasTimingStart||t.animationCount>0,animation:t.animationCount>0,layout:e,style:e}}function sje(t){return{capabilities:ije(t),sections:RL(t)}}function vc(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"&&t.nodeType===1}function aje(t){return["div","span","p","strong","h1","h2","h3","h4","h5","h6"].includes(t)}function Tfe(t){const e=t.ownerDocument.defaultView;if(!e)return!0;let n=t;for(;n;){const r=e.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden")return!1;const i=Number.parseFloat(r.opacity);if(Number.isFinite(i)&&i<=.01&&!n.hasAttribute(IE))return!1;n=n.parentElement}return!0}function Pfe(t){var r;const e={},n=(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t);if(!n)return e;for(const i of Efe){const s=n.getPropertyValue(i);s&&(e[i]=s)}return e}function Mfe(t){const e={};for(const n of Efe){const r=t.style.getPropertyValue(n);r&&(e[n]=r)}return e}function oje(t){const e={};for(const n of t.attributes)n.name.startsWith("data-")&&(e[n.name.slice(5)]=n.value);return e}function a_(t,e){let n=t;for(;n;){const r=n;if(e.some(i=>r.hasAttribute(i)))return r;n=n.parentElement}return null}let b4=new Map;function uX(t){b4=t}function lje(t){if(!t||b4.size===0)return;const e=t.getAttribute("data-hf-original-composition-id"),n=t.getAttribute("data-composition-id");return(e?b4.get(e):void 0)??(n?b4.get(n):void 0)}function fS(t,e){const n=a_(t,["data-composition-file","data-composition-src"]),r=a_(t,["data-composition-id"]),i=(n==null?void 0:n.getAttribute("data-composition-file"))??(n==null?void 0:n.getAttribute("data-composition-src"))??(r==null?void 0:r.getAttribute("data-composition-file"))??(r==null?void 0:r.getAttribute("data-composition-src"))??lje(r)??e??"index.html";return{sourceFile:i,compositionPath:i}}function fX(t){const e=t==null?void 0:t.trim();if(!e)return;let n=e;try{n=new URL(e,"http://studio.local").pathname}catch{n=e}for(const r of["/preview/comp/","/preview/"]){const i=n.indexOf(r);if(i<0)continue;return n.slice(i+r.length).replace(/^\/+/,"")||e}return e}function Nfe(t){const e=globalThis.CSS;if(typeof(e==null?void 0:e.escape)=="function")return e.escape(t);if(t==="-")return"\\-";let n="";for(let r=0;r<t.length;r+=1){const i=t[r]??"",s=i.charCodeAt(0);if(s===0){n+="�";continue}const a=s>=48&&s<=57,o=s>=65&&s<=90,l=s>=97&&s<=122,c=s>=1&&s<=31||s===127,u=r===0&&a,f=r===1&&t.startsWith("-")&&a;if(c||u||f){n+=`\\${s.toString(16)} `;continue}if(o||l||a||i==="-"||i==="_"||s>=128){n+=i;continue}n+=`\\${i}`}return n}function xg(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}function cje(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return[]}}function B8(t){var e;return((e=t.replace(/\.html$/i,"").replace(/^compositions\//i,"").split("/").at(-1))==null?void 0:e.replace(/[-_]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()))??t}function hS(t){if(t.id)return`#${Nfe(t.id)}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${xg(e)}"]`;const n=t.getAttribute("data-hf-group");return n?`[data-hf-group="${xg(n)}"]`:Dfe(t)}function Dfe(t){const e=Array.from(t.classList).map(r=>r.trim()).filter(Boolean);if(e.length===0)return;const n=e.find(r=>r!=="clip"&&!r.startsWith("__hf-"))??e[0];return n?`.${Nfe(n)}`:void 0}function Ife(t){const e=t.getAttribute("data-composition-id");if(e&&e!=="main")return B8(e);const n=t.getAttribute("data-composition-src")??t.getAttribute("data-composition-file");if(n)return B8(n);const r=t.getAttribute("data-hf-group");if(r)return r;if(t.id)return B8(t.id);const i=Dfe(t);if(i)return B8(i.replace(/^\./,""));const s=(t.textContent??"").trim().replace(/\s+/g," ");return s?s.length>40?`${s.slice(0,39)}…`:s:t.tagName.toLowerCase()}function jL(t,e,n,r,i){if(n!=null&&n.startsWith("."))return nse(t,e,n,r,s=>vc(s)?fS(s,i).sourceFile:void 0)}function ay(t){return Tfe(t)}const hX=new Set(["img","video","canvas","svg","audio"]);function uje(t){const e=t.ownerDocument.defaultView;if(!e)return!1;const n=e.getComputedStyle(t);return!!(n.backgroundImage!=="none"||n.backgroundColor&&n.backgroundColor!=="transparent"&&n.backgroundColor!=="rgba(0, 0, 0, 0)"||n.borderWidth&&parseFloat(n.borderWidth)>0&&n.borderStyle!=="none"||n.boxShadow&&n.boxShadow!=="none")}function fje(t){const e=t.tagName.toLowerCase();if(hX.has(e)||uje(t))return!1;const{children:n}=t;if(n.length===0)return(t.textContent??"").trim().length===0;for(let r=0;r<n.length;r+=1){const i=n[r];if(vc(i)&&(hX.has(i.tagName.toLowerCase())||ay(i)))return!1}return!0}function hje(t){const e=t.getBoundingClientRect();return!(e.width<=1||e.height<=1||!ay(t)||fje(t))}const dje=new Set(["base","br","canvas","link","meta","script","source","style","template","track","wbr"]);function pje(t){var r;const e=t.tagName.toLowerCase();if(dje.has(e))return!1;const n=(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t);return!((n==null?void 0:n.display)==="none"||(n==null?void 0:n.visibility)==="hidden")}function bg(t,e){if(!pje(t)||t.hasAttribute("data-composition-id"))return null;const n=hS(t);if(!n)return null;const{sourceFile:r}=fS(t,e);return{id:t.id||void 0,hfId:t.getAttribute("data-hf-id")||void 0,selector:n,selectorIndex:jL(t.ownerDocument,t,n,r,e),sourceFile:r}}function mje(t){let e=t;for(;e;){if(e.classList.contains("clip")&&(!(e.hasAttribute("data-composition-src")||e.hasAttribute("data-composition-file"))||e===t))return e;e=e.parentElement}return null}function gje(t,e){if(e.preferClipAncestor){const n=mje(t);if(n)return n}return t}function yje(t,e){const n=[];for(const s of t)vc(s)&&hje(s)&&bg(s,e.activeCompositionPath)&&n.push(s);if(n.length===0)return[];const r=[];let i=n[0];for(let s=1;s<n.length;s++){const a=n[s];i.contains(a)||r.push(i),i=a}return r.push(i),r}function Ts(t,e,n=null){const r=s=>vc(s)&&(!e.sourceFile||fS(s,n).sourceFile===e.sourceFile),i=s=>cje(t,s).filter(r);if(e.hfId){const s=i(`[data-hf-id="${xg(e.hfId)}"]`)[0];if(s)return s}if(e.id){const s=i(`[id="${xg(e.id)}"]`)[0];if(s)return s}return e.selector?i(e.selector)[e.selectorIndex??0]??null:null}function _fe(t,e,n){var f;const r=typeof e.id=="string"?e.id:"",i=fX(e.compositionSrc)??((f=n.compIdToSrc)==null?void 0:f.get(r)),s=i??fX(e.sourceFile)??n.activeCompositionPath??"index.html",a=xg(r),o=i?xg(i):null,l=e.selector??(i?`[data-composition-src="${o}"],[data-composition-file="${o}"],[data-composition-id="${a}"]`:a?`[data-composition-id="${a}"]`:void 0);if(l||e.domId){const h=Ts(t,{id:e.domId??void 0,selector:l,selectorIndex:e.selectorIndex,sourceFile:s},n.activeCompositionPath);if(h)return h}const c=!!(e.domId||e.selector||i);if(n.isMasterView||c||!n.activeCompositionPath)return null;const u=t.querySelector("[data-composition-id]");return vc(u)&&fS(u,n.activeCompositionPath).sourceFile===s?u:null}function xje(t,e){return Array.from(t.children).filter(n=>vc(n)&&bg(n,e.activeCompositionPath)!==null)}let bje=0;function vje(t){const{selectedKeyframes:e,selectedElementId:n}=ue.getState();if(!n)return;const r=t.selectedGsapAnimations.filter(c=>c.keyframes),i=r.length===1?r[0]:void 0,s=new Map(r.map(c=>[c.id,c])),a=new Map;for(const c of e){const u=G3e(n,c);if(!u)continue;const f=u.animationId?s.get(u.animationId):i;if(!f)continue;const h=u.tweenPercentage??u.percentage;a.set(`${f.id}\0${h}`,{animationId:f.id,percentage:h})}const o=[...a.values()];if(o.length===0)return;const l={coalesceKey:`delete-keyframes:${++bje}`,coalesceMs:Number.POSITIVE_INFINITY};for(const[c,u]of o.entries())t.handleGsapRemoveKeyframe(u.animationId,u.percentage,{...l,...c===o.length-1?{softReload:!0}:{skipReload:!0}})}function Aje(t){var n,r;if(!t)return!1;const e=((r=(n=t.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.HTMLElement)??globalThis.HTMLElement;return t instanceof e}function Sje(t){var s,a;if(t.element.tag==="audio")return Promise.resolve();const e=t.stackingReorder??null;if(e==null||e.zIndexChanges.length===0)return Promise.resolve();const n=new Map(t.timelineElements.map(o=>[Hn(o),o])),r=((s=t.iframe)==null?void 0:s.contentDocument)??null,i=[];for(const o of e.zIndexChanges){const l=n.get(o.key),c=o.domId??(l==null?void 0:l.domId),u=o.selector??(l==null?void 0:l.selector),f=o.selectorIndex??(l==null?void 0:l.selectorIndex),h=o.sourceFile??(l==null?void 0:l.sourceFile)??t.activeCompPath??"index.html",d=r?Ts(r,{id:c,selector:u,selectorIndex:f,sourceFile:h},t.activeCompPath):null;if(!Aje(d))return Promise.resolve();MI(d)!==o.zIndex&&i.push({element:d,zIndex:o.zIndex,id:c??(l==null?void 0:l.id)??o.key,selector:u,selectorIndex:f,sourceFile:h,key:o.key})}return i.length===0?Promise.resolve():Promise.resolve((a=t.commit)==null?void 0:a.call(t,i,t.coalesceKey)).then(()=>{})}function V6(t){const e=ue.getState();return t<=e.duration?!1:(e.setDuration(t),!0)}function _d(t){return t.domId?{id:t.domId,hfId:t.hfId,selector:t.selector,selectorIndex:t.selectorIndex}:t.hfId?{hfId:t.hfId,selector:t.selector,selectorIndex:t.selectorIndex}:t.selector?{selector:t.selector,selectorIndex:t.selectorIndex}:null}function dS(t,e,n=null){try{const r=t==null?void 0:t.contentDocument;return r?e.kind==="composition"&&e.compositionSrc?_fe(r,e,{activeCompositionPath:n,isMasterView:!0}):Ts(r,{hfId:e.hfId,id:e.domId,selector:e.selector,selectorIndex:e.selectorIndex,sourceFile:e.sourceFile||n||"index.html"},n):null}catch{return null}}function H6(t,e,n,r=null){try{const i=dS(t,e,r);if(!i)return;for(const[s,a]of n)i.setAttribute(s,a)}catch{}}function Q6(t){return t.playbackStartAttr==="playback-start"||t.kind==="composition"?"data-playback-start":"data-media-start"}function wje(t,e,n,r){if(r.playbackStart!=null)return{attrName:Q6(n).slice(5),value:r.playbackStart};const i=r.start-n.start;if(i===0)return null;const s=qU(t,e,"playback-start")??qU(t,e,"media-start"),a=s!=null?parseFloat(s):void 0;return a==null||!Number.isFinite(a)?null:{attrName:Q6(n).slice(5),value:Math.max(0,a+i*Math.max(n.playbackRate??1,.1))}}function Rfe(t,e,n,r,i){if(!Number.isFinite(n)||!Number.isFinite(r))return console.warn(`[Timeline] buildTimelineMoveTimingPatch: non-finite timing (start=${n}, duration=${r}) — patch skipped`),t;let s=sd(t,e,{type:"attribute",property:"start",value:di(n)});return i!=null&&Number.isFinite(i)&&(s=sd(s,e,{type:"attribute",property:"track-index",value:di(i)})),oj(s,zR(s))}function jfe(t,e,n,r){const i=wje(t,e,n,r);let s=sd(t,e,{type:"attribute",property:"start",value:di(r.start)});return s=sd(s,e,{type:"attribute",property:"duration",value:di(r.duration)}),i&&(s=sd(s,e,{type:"attribute",property:i.attrName,value:di(i.value)})),oj(s,zR(s))}async function Oje(t){const e=t.element.sourceFile||t.activeCompPath||"index.html",n=await ya(t.projectId,e),r=_d(t.element);if(!r)throw new Error(`Timeline element ${t.element.id} is missing a patchable target`);const i=t.buildPatches(n,r);if(i===n)throw new Error(`Unable to patch timeline element ${t.element.id} in ${e}`);t.pendingTimelineEditPathRef.current.add(e),t.domEditSaveTimestampRef.current=Date.now(),await Ko({projectId:t.projectId,label:t.label,kind:"timeline",coalesceKey:t.coalesceKey,files:{[e]:i},readFile:async()=>n,writeFile:t.writeProjectFile,recordEdit:t.recordEdit}),t.domEditSaveTimestampRef.current=Date.now()}async function kje(t){const e=new Map,n=new Map;for(const i of t.changes){const s=i.element.sourceFile||t.activeCompPath||"index.html",a=e.get(s)??await ya(t.projectId,s);e.set(s,a);const o=_d(i.element);if(!o)throw new Error(`Timeline element ${i.element.id} is missing a patchable target`);const l=n.get(s)??a;if(!Rf(l,o))throw new Error(`Unable to patch timeline element ${i.element.id} in ${s}`);const c=i.buildPatches(l,o);c!==l&&n.set(s,c)}if(n.size===0)return;const r=Object.fromEntries(n);for(const i of Object.keys(r))t.pendingTimelineEditPathRef.current.add(i);t.domEditSaveTimestampRef.current=Date.now(),await Ko({projectId:t.projectId,label:t.label,kind:"timeline",coalesceKey:t.coalesceKey,coalesceMs:t.coalesceMs,files:r,readFile:async i=>e.get(i)??ya(t.projectId,i),writeFile:t.writeProjectFile,recordEdit:t.recordEdit}),t.domEditSaveTimestampRef.current=Date.now()}async function Lfe({projectId:t,targetPath:e,patchTarget:n,attr:r,value:i,label:s,writeProjectFile:a,recordEdit:o,domEditSaveTimestampRef:l,pendingTimelineEditPathRef:c,patchLive:u,readLive:f}){const h=f();u(i);const d=await ya(t,e);if(DE(d,n)===void 0)throw new Error(`Unable to patch element in ${e}`);const g=sd(d,n,{type:"attribute",property:r,value:i});c.current.add(e),l.current=Date.now();try{const v=await Ko({projectId:t,label:s,kind:"timeline",files:{[e]:g},readFile:async b=>b===e?d:ya(t,b),writeFile:a,recordEdit:o});return l.current=Date.now(),v}catch(v){throw u(h),v}}const Z6=.03;function Cje(t,e,n){return t>=e+Z6&&t<=e+n-Z6}function jE(t){const e=!!(t.hfId||t.domId||t.selector),n=t.playbackRate==null||Number.isFinite(t.playbackRate)&&t.playbackRate>0;return!t.timelineLocked&&t.timingSource!=="implicit"&&e&&n&&!!t.duration&&Number.isFinite(t.duration)}function Ffe(t,e){return jE(t)&&Cje(e,t.start,t.duration)}function Eje(t,e){return t.filter(n=>Ffe(n,e))}function Tje(t,e,n,r){return e.button!==0||e.shiftKey||!r?!1:t==="start"?n.canTrimStart:n.canTrimEnd}function Pje(t,e,n){return t?t==="move"?!!n:!!e:!1}function Mje(t,e,n,r){if(t.button!==0)return{kind:"ignore"};if(ue.getState().activeTool==="razor")return{kind:"ignore"};if(t.shiftKey)return{kind:"arm-shift-click"};const i=t.currentTarget.getBoundingClientRect(),s=QEe({width:i.width,offsetX:t.clientX-i.left,handleWidth:hEe,capabilities:e});return Pje(s,n,r)?{kind:"block",intent:s,rect:i}:!r||!e.canMove?{kind:"ignore"}:{kind:"move",rect:i}}function Nje(t,e,n,r,i){const{pps:s,onResizeElement:a,onMoveElement:o,onRazorSplit:l,onRazorSplitAll:c,blockedClipRef:u,shiftClickClipRef:f,suppressClickRef:h,scrollRef:d,setShowPopover:y,setRangeSelection:g,setResizingClip:v,setDraggedClip:b,setSelectedElementId:w,onSelectElement:O}=i;return{onResizeStart:(N,I)=>{var _;Tje(N,I,r,a)&&(I.stopPropagation(),u.current=null,y(!1),g(null),v({pointerId:I.pointerId,element:t,edge:N,originClientX:I.clientX,originScrollLeft:((_=d.current)==null?void 0:_.scrollLeft)??0,previewStart:t.start,previewDuration:t.duration,previewPlaybackStart:t.playbackStart,started:!1}))},onPointerDown:N=>{var j,L;const I=Mje(N,r,a,o);if(I.kind==="ignore")return;if(I.kind==="arm-shift-click"){f.current={element:t,anchorX:N.clientX,anchorY:N.clientY};return}if(I.kind==="block"){u.current={pointerId:N.pointerId,element:t,intent:I.intent,originClientX:N.clientX,originClientY:N.clientY,started:!1};return}const{rect:_}=I;u.current=null,y(!1),g(null),b({pointerId:N.pointerId,element:t,originClientX:N.clientX,originClientY:N.clientY,originScrollLeft:((j=d.current)==null?void 0:j.scrollLeft)??0,originScrollTop:((L=d.current)==null?void 0:L.scrollTop)??0,pointerClientX:N.clientX,pointerClientY:N.clientY,pointerOffsetX:N.clientX-_.left,pointerOffsetY:N.clientY-_.top,previewStart:t.start,previewTrack:t.track,desiredTrack:t.track,insertRow:null,snapTime:null,snapType:null,started:!1})},onClick:N=>{if(N.stopPropagation(),h.current)return;const{activeTool:I}=ue.getState();if(I==="razor"&&l){const _=N.currentTarget.getBoundingClientRect(),j=N.clientX-_.left,L=n.start+j/s,V=Math.max(n.start+Z6,Math.min(n.start+n.duration-Z6,L));N.shiftKey&&c?c(V):l(t,V);return}w(e),O==null||O(t)}}}function Dje(t,e,n){return n?{priority:"interaction",rich:!0}:{priority:t.start<e.end&&t.start+t.duration>e.start?"visible":"overscan",rich:!1}}function Ije({element:t}){const e=ue(n=>n.lintFindingsByElement.get(t.key??t.id));return!e||e.count===0?null:m.jsx("span",{className:"absolute w-1.5 h-1.5 rounded-full bg-amber-400",style:{top:7,right:7},title:e.messages.join(`
|
|
204
|
-
`)})}function $fe(t,e,n,r,i={priority:"visible",rich:!1}){return m.jsxs(m.Fragment,{children:[r==null?void 0:r(t),!n&&m.jsx(Ije,{element:t}),n&&m.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{borderRadius:"inherit"},children:n(t,e,i)})]})}function Bfe(t,e){return Number.isFinite(e)&&!t.hidden&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e>=t.start&&e<=t.end}function Vfe(t,e){return Bfe({start:t.start,end:t.start+Math.max(0,t.duration),hidden:t.hidden===!0},e)}function dX(t){if(t===void 0||t.trim()==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}function _je(t){if(!(t instanceof HTMLElement))return null;const e=t.dataset.elId,n=dX(t.dataset.clipStart),r=dX(t.dataset.clipEnd);return!e||n===null||r===null?null:{id:e,start:n,end:r,hidden:t.dataset.clipHidden==="true",element:t}}function Rje(t){return[...t.querySelectorAll('[data-clip="true"]')].map(_je).filter(e=>e!==null)}function jje(t,e){return new Set(t.filter(n=>Bfe(n,e)).map(n=>n.id))}function pX(t,e,n,r=!1){const i=jje(t,n);for(const s of t){const a=i.has(s.id);(r||e.has(s.id)!==a)&&s.element.toggleAttribute("data-active",a)}e.clear();for(const s of i)e.add(s)}function Lje({scrollRef:t,currentTime:e,clipStateVersion:n,elementStateVersion:r}){const i=x.useRef([]),s=x.useRef(new Set),a=x.useCallback(o=>{const l=t.current;if(!l){i.current=[],s.current.clear();return}i.current=Rje(l),pX(i.current,s.current,o,!0)},[t]);x.useLayoutEffect(()=>{a(e)},[n,e,r,a]),Ar(()=>pa.subscribe(o=>{pX(i.current,s.current,o)}))}const Fje=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function $je(t){return Fje.has(t)}function B1(t){return t.key??t.id}function Bje(t,e){return[...e].sort((n,r)=>n.start-r.start||n.start+n.duration-(r.start+r.duration)||B1(n).localeCompare(B1(r))).map(n=>{const r=B1(n);return{id:KA(r),kind:"clip",rowId:t,elementId:r,time:n.start+n.duration/2}})}function Vje(t,e,n,r,i){const s=vL(t,e,n,r),a=s?B1(s):null,o=s?Jj(i.get(B1(s))??[],s.start,s.duration):[];return{activeClip:s,activeId:a,lanes:o}}function Hje(t){return{percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId,collidingAnimationTargets:t.collidingAnimationTargets}}function Qje(t,e,n){var o;const r=B1(e),i=new Map;for(const l of n){const c=Hje(l),u=gf(r,c);i.has(u)||i.set(u,{target:c,time:e.start+l.percentage/100*e.duration})}const s=[...i.entries()].sort(([l,c],[u,f])=>c.time-f.time||l.localeCompare(u)),a=[];for(let l=0;l<s.length;l+=1){const[,c]=s[l],u=(o=s[l-1])==null?void 0:o[1];u&&c.time>u.time&&c.target.animationId!==void 0&&a.push({id:hae(r,c.target),kind:"ease",rowId:t,elementId:r,time:u.time+(c.time-u.time)/2,keyframeTarget:c.target}),a.push({id:fae(r,c.target),kind:"keyframe",rowId:t,elementId:r,time:c.time,keyframeTarget:c.target})}return a}function Zje(t,e,n){return t===null?!1:e.has(t)||n.has(t)}function zje(t,e,n,r,i,s,a){const o=j2(n,i.group);return{id:o,kind:"row",physicalTrackKey:t,logicalIndex:e,level:s,parentId:a,elementId:n,expandable:!1,expanded:!1,propertyGroup:i.group,items:Qje(o,r,i.keyframes)}}function Gje({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,expandedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){const f=new Map(t),h=new Map(l.map(v=>[v.anchorKey,v])),d=[];function y(v,b,w){const O=f.get(v)??[],C=U3e(v),{activeClip:E,activeId:M,lanes:N}=Vje(O,n,r,i,u),I=Zje(M,s,o)&&N.length>0;if(d.push({id:C,kind:"row",physicalTrackKey:v,logicalIndex:d.length,level:b,parentId:w,elementId:M,expandable:N.length>0,expanded:I,items:Bje(C,O)}),!(!I||!E||!M))for(const _ of N)d.push(zje(v,d.length,M,E,_,b===1?2:3,C))}function g(v){const b=X3e(v.id),w=a.has(v.id);if(d.push({id:b,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:d.length,level:1,parentId:null,elementId:null,groupId:v.id,expandable:v.memberTracks.length>0,expanded:w,items:[]}),o.has(v.id)){const O=v.memberTracks.flatMap(C=>f.get(C)??[]);for(const C of aS(O))d.push({id:`${b}::${C.key}`,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:d.length,level:2,parentId:b,elementId:null,expandable:!1,expanded:!1,items:[]})}if(w)for(const O of v.memberTracks)y(O,2,b)}for(const v of e){const b=h.get(v);if(b){g(b);continue}c.has(v)||y(v,1,null)}return d}function vl(t,e){for(let n=0;n<t.length;n+=1){const r=t[n];if(r.id===e)return{row:r,rowIndex:n,itemIndex:-1,target:r};const i=r.items.findIndex(s=>s.id===e);if(i>=0)return{row:r,rowIndex:n,itemIndex:i,target:r.items[i]}}return null}function Uje(t,e){return[...t.items].sort((n,r)=>Math.abs(n.time-e)-Math.abs(r.time-e)||n.time-r.time||n.id.localeCompare(r.id))[0]??t}function Xje(t,e,n,r={}){var g;const i=vl(t,e);if(!i)return null;const{row:s,rowIndex:a,itemIndex:o,target:l}=i;if(n==="Home"||n==="End"){const v=r.timelineBoundary?n==="Home"?t[0]:t.at(-1):s;return v?r.timelineBoundary||n==="Home"?v:v.items.at(-1)??v:l}if(n==="ArrowLeft")return o<0?s.parentId?((g=vl(t,s.parentId))==null?void 0:g.target)??s:s:o===0?s:s.items[o-1];if(n==="ArrowRight")return o<0?s.items[0]??s:s.items[o+1]??l;const c=n==="ArrowUp"||n==="PageUp"?-1:1,u=n==="PageUp"||n==="PageDown",f=r.pageSize;if(u&&(f===void 0||!Number.isFinite(f)||f<1))return l;const h=u?Math.floor(f):1,d=Math.max(0,Math.min(t.length-1,a+c*h)),y=t[d];return!y||d===a?l:l.kind==="row"?y:Uje(y,l.time)}function Wje(t,e,n){const r=vl(e,n);if(r)return r.target;const i=vl(t,n);if(!i)return null;if(i.itemIndex>=0){for(let a=i.itemIndex-1;a>=0;a-=1){const o=vl(e,i.row.items[a].id);if(o)return o.target}for(let a=i.itemIndex+1;a<i.row.items.length;a+=1){const o=vl(e,i.row.items[a].id);if(o)return o.target}}const s=vl(e,i.row.id);if(s)return s.target;if(i.row.parentId){const a=vl(e,i.row.parentId);if(a)return a.target}return e[i.rowIndex]??e[i.rowIndex-1]??null}function mX(t){if(!(t.target instanceof Element))return null;const e=t.target.closest("button, input, select, textarea, a[href], [contenteditable], [data-timeline-focus-id]");return e!=null&&e.dataset.timelineFocusId&&t.currentTarget.contains(e)?e:null}function Yje(t,e,n,r){if(!r||t.size===0)return 1;const i=n.getRowIndex(e),s=Math.max(0,i>=0?i:Math.floor(n.getRowFromY(r.scrollTop))),a=i>=0?n.getRowTop(i):r.scrollTop,o=Math.min(n.rowKeys.length-1,Math.floor(n.getRowFromY(a+Math.max(0,r.clientHeight-.001))));let l=0;for(let c=s;c<=o;c+=1)l+=t.get(n.rowKeys[c])??0;return Math.max(1,l)}function qje(t){const e=t.getBoundingClientRect();t.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.left+e.width/2,clientY:e.top+e.height/2}))}function Kje({logicalRows:t,focusedTargetId:e,rowGeometry:n,scrollRef:r,onToggleRow:i}){var c,u;const s=(e&&((c=vl(t,e))==null?void 0:c.target.id))??((u=t[0])==null?void 0:u.id)??null,a=x.useMemo(()=>{const f=new Map;for(const h of t)f.set(h.physicalTrackKey,(f.get(h.physicalTrackKey)??0)+1);return f},[t]),o=x.useCallback(f=>{var d;const h=(d=mX(f))==null?void 0:d.dataset.timelineFocusId;h&&h!==e&&ue.getState().requestTimelineFocus(h)},[e]),l=x.useCallback(f=>{const h=mX(f),d=h==null?void 0:h.dataset.timelineFocusId;if(!h||!d)return;const y=vl(t,d);if(y){if($je(f.key)){if(y.target.kind==="row"&&(f.key==="ArrowRight"&&y.target.expandable&&!y.target.expanded||f.key==="ArrowLeft"&&y.target.expandable&&y.target.expanded)){f.preventDefault(),i(y.target);return}const g=Xje(t,d,f.key,{pageSize:Yje(a,y.row.physicalTrackKey,n,r.current),timelineBoundary:f.ctrlKey||f.metaKey});f.preventDefault(),g&&g.id!==d&&ue.getState().requestTimelineFocus(g.id);return}if(f.key==="ContextMenu"||f.key==="F10"&&f.shiftKey){f.preventDefault(),qje(h);return}f.key!=="Enter"&&f.key!==" "||y.target.kind!=="row"||!y.target.expandable||(f.preventDefault(),i(y.target))}},[a,t,i,n,r]);return{rovingTargetId:s,onFocus:o,onKeyDown:l}}function Jje({pps:t,contentOrigin:e,contentGutter:n,trackContentWidth:r,theme:i,displayTrackOrder:s,rowGeometry:a,virtualRows:o,logicalRows:l,focusedTargetId:c,rowsVirtualized:u,clipIndex:f,renderTimeRange:h,visibleTimeRange:d,pinnedClipIdentities:y,trackOrder:g,tracks:v,trackStyles:b,groups:w,laneCounts:O,selectedElementId:C,selectedElementIds:E,hoveredClip:M,draggedClip:N,draggedElement:I,multiDragPreview:_,blockedClipRef:j,suppressClickRef:L,scrollRef:V,renderClipContent:$,renderClipOverlay:Z,onDrillDown:W,onSelectElement:Y,setHoveredClip:J,setShowPopover:ne,setRangeSelection:ie,setResizingClip:le,setDraggedClip:q,setSelectedElementId:F,shiftClickClipRef:U,getPreviewElement:z,getTrackStyle:K,keyframeCache:te,gsapAnimations:ee,selectedKeyframes:H,currentTime:Q,onSeek:oe,onSelectSegment:fe,onClickKeyframe:pe,onShiftClickKeyframe:be,onContextMenuKeyframe:me,onMoveKeyframe:Ae,onContextMenuClip:De,onContextMenuLane:Se,beatAnalysis:ye,onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onResizeElement:Pe,onMoveElement:Ve,onRazorSplit:Ke,onRazorSplitAll:ze}){const Ye=`timeline-lanes${x.useId().replaceAll(":","")}`,pt=ue(zt=>zt.expandedClipIds),{expandedGroupIds:st,expandedLaneOwnerIds:St,toggleGroupExpanded:$e,toggleLaneOwnerExpanded:qe}=f9e(),tt=ODe();LDe({lanes:tt});const Gt=ue(zt=>zt.expandClips),Dt=ue(zt=>zt.setClipExpanded),We=ue(zt=>zt.toggleClipExpanded),{logicalRowsByTrack:wt,groupByAnchor:ut}=h9e(l,w),dt=zt=>{const Ne=!zt.some(Me=>pt.has(Me));if($Z({expanded:Ne}),Ne)Gt(zt);else for(const Me of zt)Dt(Me,!1)},cn=zt=>{const Ne=!pt.has(zt);$Z({expanded:Ne}),We(zt)},nn=N9e(_,u,h),rn=Kje({logicalRows:l,focusedTargetId:c,rowGeometry:a,scrollRef:V,onToggleRow:zt=>{zt.elementId&&cn(zt.elementId)}});return m.jsx("div",{role:"treegrid","aria-label":"Timeline tracks","aria-rowcount":l.length,"aria-colcount":2,onFocus:rn.onFocus,onKeyDown:rn.onKeyDown,className:u?"absolute inset-0":void 0,children:o.map(({index:zt,rowKey:Ne})=>{var xt,Wn,Mn,Rn,On;const Me=s[zt];if(Me===void 0)return null;const Ze=ut.get(Me);if(Ze){const rt=(xt=wt.get(Me))==null?void 0:xt[0];return rt?m.jsx(u9e,{index:zt,rowKey:Ne,group:Ze,logicalRow:rt,tracks:v,top:a.getRowTop(zt),height:a.getRowHeight(zt),virtualized:u,contentOrigin:e,theme:i,rovingTargetId:rn.rovingTargetId,expandedGroupIds:st,expandedLaneOwnerIds:St,toggleGroupExpanded:$e,toggleLaneOwnerExpanded:qe},Ne):null}const nt=Iue(s,Me),Wt=wt.get(Me)??[],mn=Wt[0];if(!mn)return null;const Pn=a.getRowHeight(zt),qt=((Wn=v.find(([rt])=>rt===Me))==null?void 0:Wn[1])??[],hr=u?Xse(f,Me,h,y,nn):qt,gt=b.get(Me)??K(""),hn=(N==null?void 0:N.started)===!0&&!g.includes(Me)&&qt.length===0,gn=i.rowBackground,Zn=x9e(qt,ye==null?void 0:ye.beatTimes,{selectedElementId:C,isMusicTrack:Jg}),un=qt.length>0&&qt.every(rt=>rt.hidden===!0),yt=qt.length>0&&qt.some(Rl),$t=vL(qt,O,C,E),_t=($t==null?void 0:$t.key)??($t==null?void 0:$t.id),ln=A9e(qt,pt),yn=ln?hs-2*ca:void 0,kn=qt.map(z),dn=`${Ye}-track-${zt}`,Sr=`${dn}-automation`,mr=$t&&_t?tt.bind($t,C===_t||E.has(_t)):null,wr=mr&&!mr.readOnly?rt=>mr.onCommit({version:1,lanes:mr.lanes.filter(Ot=>Ot.target!==rt)}):void 0;return m.jsxs(Bue,{index:zt,rowKey:Ne,logicalRow:mn,propertyRows:Wt.slice(1),lanesId:dn,headerLanesId:`${dn} ${Sr}`,top:a.getRowTop(zt),height:Pn,virtualized:u,background:gn,borderColor:i.rowBorder,rovingTargetId:rn.rovingTargetId,children:[m.jsx(r9e,{trackNumber:Me,trackDisplayNumber:nt,trackLabel:((Mn=qt[0])==null?void 0:Mn.label)??((Rn=qt[0])==null?void 0:Rn.domId)??((On=qt[0])==null?void 0:On.id)??`Track${NE(nt)}`,lanesId:`${dn} ${Sr}`,contentOrigin:e,keyframeClip:$t,trackElements:qt,clipCount:qt.length,isExpanded:ln,animations:_t?ee.get(_t)??[]:[],currentTime:Q,isTrackHidden:un,isAudioTrack:yt,theme:i,onToggleClipExpanded:()=>{const rt=qt.map(Hn);rt.length>0&&dt(rt)},onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onRemoveAutomationLane:wr,onSeek:oe,rovingTargetId:rn.rovingTargetId}),m.jsxs("div",{role:"gridcell","aria-colindex":2,style:{width:r,marginLeft:n,opacity:un?.35:1,transition:"opacity 120ms ease"},className:"relative",onContextMenu:rt=>{if(rt.defaultPrevented||!Se)return;const Ot=rt.currentTarget.getBoundingClientRect(),Vt=(rt.clientX-Ot.left)/t;Vt<0||(rt.preventDefault(),Se(rt,Me,Vt))},children:[m.jsx(Z3e,{beatTimes:ye==null?void 0:ye.beatTimes,beatStrengths:ye==null?void 0:ye.beatStrengths,pps:t,highlightTime:N!=null&&N.started&&N.snapType==="beat"?N.snapTime:null,renderTimeRange:u?h:void 0}),Zn&&m.jsx(z3e,{beatTimes:ye==null?void 0:ye.beatTimes,beatStrengths:ye==null?void 0:ye.beatStrengths,pps:t,renderTimeRange:u?h:void 0}),hn&&m.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:gt.label,fontSize:11,letterSpacing:"0.06em",textTransform:"uppercase",opacity:.5},children:"New track"}),hr.map(rt=>{const Ot=K(rt.tag),Vt=Hn(rt),kt=Vt===_t,Lt=kt&&ln,bt=WA(rt),Pt=C===Vt||E.has(Vt),or=!!rt.compositionSrc,er=Vt;if((N==null?void 0:N.started)===!0&&I!=null&&Hn(I)===Vt)return null;const Nn=z(rt),yi=Dje(Nn,d,Pt||M===er||y.has(er)),Yn=_!=null&&Que(er,_),xi=Yn?P9e(er,t,_):0,Ms=Nje(rt,Vt,Nn,bt,{pps:t,onResizeElement:Pe,onMoveElement:Ve,onRazorSplit:Ke,onRazorSplitAll:ze,blockedClipRef:j,shiftClickClipRef:U,suppressClickRef:L,scrollRef:V,setShowPopover:ne,setRangeSelection:ie,setResizingClip:le,setDraggedClip:q,setSelectedElementId:F,onSelectElement:Y}),os=m.jsx(dae,{onContextMenu:ei=>{ei.preventDefault(),De==null||De(ei,rt)},el:Nn,pps:t,clipY:ca,clipHeight:yn,isSelected:Pt,isHovered:M===er,isDragging:!1,isActive:Vfe(Nn,Q),hasCustomContent:!!$,capabilities:bt,theme:i,isComposition:or,tabIndex:rn.rovingTargetId===KA(Vt)?0:-1,onHoverStart:()=>J(er),onHoverEnd:()=>J(null),onResizeStart:Ms.onResizeStart,onPointerDown:Ms.onPointerDown,onClick:Ms.onClick,onDoubleClick:ei=>{ei.stopPropagation(),!L.current&&or&&W&&W(rt)},children:$fe(Nn,Ot,$,Z,yi)},er),Ys=te==null?void 0:te.get(Vt),qs=!Lt&&Ys&&m.jsx(J5e,{element:Nn,elementId:Vt,keyframesData:Ys,pixelsPerSecond:t,rowHeight:Pn,beatsActive:Zn,accentColor:Ot.accent,isSelected:Pt,currentTime:Q,selectedKeyframes:H,rovingTargetId:rn.rovingTargetId,onClickKeyframe:pe,onShiftClickKeyframe:be,onContextMenuKeyframe:me,onMoveKeyframe:Ae,onSelectSegment:fe,suppressClickRef:L},`${er}-diamonds`),Ks=kt&&m.jsx(kNe,{id:dn,animations:Lt?ee.get(Vt)??[]:[],clipStart:Lle(Nn),clipDuration:Nn.duration,clipLeftPx:Nn.start*t,clipWidthPx:Math.max(Nn.duration*t,4),accentColor:Ot.accent,isSelected:Pt,currentPercentage:Nn.duration>0?(Q-Nn.start)/Nn.duration*100:0,elementId:Vt,selectedKeyframes:H,rovingTargetId:rn.rovingTargetId,onSelectSegment:ei=>fe==null?void 0:fe(Vt,ei),onClickKeyframe:ei=>pe==null?void 0:pe(Nn,ei),onShiftClickKeyframe:ei=>be==null?void 0:be(Vt,ei),onContextMenuKeyframe:(ei,Lr)=>me==null?void 0:me(ei,Vt,Lr),onMoveKeyframe:(ei,Lr)=>(Ae==null?void 0:Ae(Vt,ei,Lr))??Promise.resolve(!1),suppressClickRef:L},`${er}-property-lanes`);return Yn?m.jsxs("div",{className:"absolute inset-0",style:{transform:`translateX(${xi}px)`,opacity:.85,zIndex:20,pointerEvents:"none"},children:[os,qs,Ks]},er):m.jsxs(x.Fragment,{children:[os,qs,Ks]},er)}),m.jsx("div",{id:Sr,children:ln?m.jsx(oDe,{elements:kn,isSelected:rt=>{const Ot=Hn(rt);return C===Ot||E.has(Ot)},lanes:tt,pps:t,laneCount:_t?O.get(_t)??0:0,accentColor:K(($t==null?void 0:$t.tag)??"").accent,currentTime:Q,beatTimes:ye==null?void 0:ye.beatTimes}):null})]})]},Ne)})})}const Hfe=8,z6={playhead:0,"clip-edge":1,beat:2};function eLe(t){const e=new Map,n=(r,i)=>{if(!Number.isFinite(r)||r<0)return;const s=Math.round(r*1e3)/1e3,a=e.get(s);(!a||z6[i]<z6[a.type])&&e.set(s,{time:s,type:i})};for(const r of t.beatTimes)n(r,"beat");for(const r of t.elements)t.excludeElementKey!=null&&(r.key??r.id)===t.excludeElementKey||(n(r.start,"clip-edge"),n(r.start+r.duration,"clip-edge"));return t.playheadTime!=null&&n(t.playheadTime,"playhead"),Array.from(e.values()).sort((r,i)=>r.time-i.time)}function G6(t,e,n){let r=null,i=n;for(const s of e){const a=Math.abs(s.time-t);(a<i||a===i&&r&&z6[s.type]<z6[r.type])&&(i=a,r=s)}return r?{time:r.time,target:r}:{time:t,target:null}}function tLe(t,e,n,r,i){if(n.length===0)return{start:t,snapTime:null,snapType:null};const s=Hfe/Math.max(r,1),a=G6(t,n,s),o=G6(t+e,n,s),l=a.target!==null,c=o.target!==null;let u=t,f=null;l&&(!c||Math.abs(a.time-t)<=Math.abs(o.time-(t+e)))?(u=a.time,f=a.target):c&&(u=o.time-e,f=o.target);const h=Math.max(0,i-e),d=Math.round(u*1e3)/1e3,y=Math.max(0,Math.min(h,d));return f&&Math.abs(y-d)>1e-6&&(f=null),{start:y,snapTime:(f==null?void 0:f.time)??null,snapType:(f==null?void 0:f.type)??null}}function nLe(t,e,n,r){if(n<0)return t;const i=e.indexOf(t);return i<0?t:r?i>=n?t:e[n]??t:i<n?t:e[n-1]??t}function gX(t,e,n){return e<0?!0:n?t>=e:t<=e}function rLe(t,e,n,r){if(e.length===0)return n<0?0:n;const i=t.indexOf(e[0]),s=t.indexOf(e[e.length-1])+1;return r<Math.min(...e)?i:s}function iLe(t){var b;const{order:e,audioTracks:n,elements:r,desiredTrack:i,deliberateInsertRow:s}=t,{start:a,duration:o,dragKey:l,isAudio:c,preferInsertAbove:u}=t,f=e.findIndex(w=>n.has(w));if(s!==null&&gX(s,f,c))return{track:i,insertRow:s};const h=nLe(i,e,f,c),d=e.filter(w=>n.has(w)===c),y=aLe({elements:r,desiredTrack:h,start:a,duration:o,trackOrder:d,excludeKey:l}),g=(b=r.find(w=>(w.key??w.id)===l))==null?void 0:b.track,v=g!=null&&h!==g&&y.track===g;if(y.needsInsert||v){const w=e.indexOf(h);if(w<0)return{track:h,insertRow:rLe(e,d,f,h)};const O=g==null?-1:e.indexOf(g),E=(v?O>w:u&&gX(w,f,c))?w:w+1;return{track:h,insertRow:E}}return{track:y.track,insertRow:null}}function sLe(t,e,n=pEe){if(e===0||t<=0)return 0;if(t>=e)return e;const r=Math.floor(t),i=t-r;return i<n?r:i>1-n?r+1:null}function Qfe(t,e,n,r){return t<r&&n<e}function v4(t,e,n,r,i){return!t.some(s=>(s.key??s.id)!==i&&s.track===e&&Qfe(n,r,s.start,s.start+s.duration))}function aLe({elements:t,desiredTrack:e,start:n,duration:r,trackOrder:i,excludeKey:s}){const a=n+r,o=i.indexOf(e);if(o===-1)return{track:e,needsInsert:!0};if(v4(t,e,n,a,s))return{track:e,needsInsert:!1};for(let l=o-1;l>=0;l--)if(v4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};for(let l=o+1;l<i.length;l++)if(v4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};return{track:e,needsInsert:!0}}function oLe(t,e){if(!t.started||!e)return null;const n=e.getBoundingClientRect();return{left:t.pointerClientX-n.left+e.scrollLeft-t.pointerOffsetX,top:t.pointerClientY-n.top+e.scrollTop-t.pointerOffsetY}}function lLe(t,e,n){return Math.max(n,t&&e>0?t.scrollWidth/e:n)}function cLe(t,e,n,r,i){if(i.size<=1||!i.has(n))return t;const s=r.filter(o=>i.has(o.key??o.id)).map(o=>o.start),a=M9e(t-e.start,s);return e.start+a}function uLe(t,e,n,r,i){const{scroll:s,trackOrder:a,rowHeights:o,elements:l}=i,c=s?xEe(e-s.getBoundingClientRect().top+s.scrollTop,o):{rowFloat:0,fraction:0,rowHeight:$se(0,o)},u=sLe(c.rowFloat,a.length,bEe(c.rowHeight)),f=c.fraction<.5,h=i.audioTracks??new Set(l.filter(Rl).map(d=>d.track));return iLe({order:a,audioTracks:h,elements:l,desiredTrack:r,deliberateInsertRow:u,start:n,duration:t.element.duration,dragKey:t.element.key??t.element.id,isAudio:Rl(t.element),preferInsertAbove:f})}function fLe(t,e,n,r){const{scroll:i,pps:s,duration:a,trackOrder:o,elements:l,selectedKeys:c,buildSnapTargets:u}=r,f=lLe(i,s,a),h=(i==null?void 0:i.scrollTop)??t.originScrollTop,d=(i==null?void 0:i.getBoundingClientRect().top)??0,y=DI(t.originClientY-d+t.originScrollTop,r.rowHeights),g=DI(n-d+h,r.rowHeights),v=VEe({start:t.element.start,track:t.element.track,duration:t.element.duration,originClientX:t.originClientX,originRow:y,originScrollLeft:t.originScrollLeft,currentScrollLeft:(i==null?void 0:i.scrollLeft)??t.originScrollLeft,pixelsPerSecond:s,maxStart:f,trackOrder:o},e,g),b=u(t.element.key??t.element.id,!Jg(t.element)),w=tLe(v.start,t.element.duration,b,s,f+t.element.duration),O=t.element.key??t.element.id,C=cLe(w.start,t.element,O,l,c),{track:E,insertRow:M}=uLe(t,n,C,v.track,r);return{...t,started:!0,pointerClientX:e,pointerClientY:n,previewStart:C,previewTrack:E,desiredTrack:v.track,insertRow:M,snapTime:w.snapTime,snapType:w.snapType}}function hLe(t,e,n){const{scroll:r,pps:i,buildSnapTargets:s}=n,a=t.originScrollLeft??(r==null?void 0:r.scrollLeft)??0,o=e+(((r==null?void 0:r.scrollLeft)??a)-a),l=t.element.sourceDuration!=null?Math.max(0,(t.element.sourceDuration-(t.element.playbackStart??0))/Math.max(t.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,c=t.element.tag.toLowerCase(),u=t.element.kind==="composition"||c==="audio"||c==="video",f=Math.max(t.element.playbackRate??1,.1),h=t.element.start+l;let d=HEe({start:t.element.start,duration:t.element.duration,originClientX:t.originClientX,pixelsPerSecond:i,minStart:0,maxEnd:h,playbackStart:t.edge==="start"&&u?t.element.playbackStart??0:t.element.playbackStart,playbackRate:t.element.playbackRate},t.edge,o);const y=s(t.element.key??t.element.id,!Jg(t.element));if(y.length>0){const g=Hfe/Math.max(i,1);if(t.edge==="end"){const v=d.start+d.duration,b=G6(v,y,g).time,w=Math.round((b-d.start)*1e3)/1e3;b!==v&&b<=h+1e-6&&w>=.05&&(d={...d,duration:w})}else{const v=G6(d.start,y,g).time,b=d.start-v,w=d.playbackStart!=null?d.playbackStart/f:Number.POSITIVE_INFINITY,O=Math.round((d.duration+b)*1e3)/1e3;v!==d.start&&v>=0&&b<=w+1e-6&&O>=.05&&(d={...d,start:v,duration:O,playbackStart:d.playbackStart!=null?Math.round(Math.max(0,d.playbackStart-b*f)*1e3)/1e3:void 0})}}return{originScrollLeft:a,previewStart:d.start,previewDuration:d.duration,previewPlaybackStart:d.playbackStart}}function dLe(t,e,n){const r=BEe(t,e);n({originScrollLeft:e.originScrollLeft,previewStart:(r==null?void 0:r.start)??e.previewStart,previewDuration:(r==null?void 0:r.duration)??e.previewDuration,previewPlaybackStart:(r==null?void 0:r.playbackStart)??e.previewPlaybackStart,groupPreview:t.changes})}const pLe=x.memo(function({drag:e,scrollRef:n,pixelsPerSecond:r,rowHeight:i,selectedElementId:s,currentTime:a,theme:o,getTrackStyle:l,renderClipContent:c,renderClipOverlay:u}){const f=(e==null?void 0:e.started)===!0?qCe({element:e.element,draggedElementId:e.element.key??e.element.id,previewStart:e.previewStart,previewTrack:e.previewTrack}):null,h=e?oLe(e,n.current):null;return m.jsx("div",{"data-timeline-gesture-overlay":!0,className:"absolute inset-0 pointer-events-none",children:f&&h&&m.jsx("div",{"data-timeline-gesture-actor":f.key??f.id,className:"absolute",style:{top:h.top,left:h.left,width:Math.max(f.duration*r,4),height:i,zIndex:40},children:m.jsx(dae,{el:{...f,start:0},pps:r,clipY:0,isSelected:s===(f.key??f.id),isHovered:!1,isDragging:!0,isGestureActor:!0,isActive:Vfe(f,a),hasCustomContent:!!c,capabilities:WA(f),theme:o,isComposition:!!f.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:$fe(f,l(f.tag),c,u,{priority:"interaction",rich:!0})})})})}),mLe=x.memo(function(e){const{draggedClip:n,scrollRef:r,selectedElementIds:i,displayTrackOrder:s}=e,a=(n==null?void 0:n.started)===!0?s.indexOf(n.previewTrack):-1,o=$se(a,e.rowHeights),l=Math.min(o,hs)-ca*2,{onResizeElement:c,onMoveElement:u,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onRazorSplit:d,onRazorSplitAll:y}=lE(),g=ue(O=>O.beatDragging),v=(n==null?void 0:n.element)??null,b=v?Hn(v):null,w=(n==null?void 0:n.started)===!0&&v&&b?{dragStarted:!0,draggedKey:b,draggedOriginStart:v.start,draggedPreviewStart:n.previewStart,selectedKeys:i}:null;return m.jsxs("div",{className:"relative",style:{height:e.totalH,width:e.contentOrigin+e.trackContentWidth},children:[m.jsx(_3e,{major:e.major,minor:e.minor,pps:e.pps,trackContentWidth:e.trackContentWidth,totalH:e.totalH,effectiveDuration:e.effectiveDuration,majorTickInterval:e.majorTickInterval,theme:e.theme,beatAnalysis:e.beatAnalysis,contentOrigin:e.contentOrigin,renderTimeRange:e.rowsVirtualized?e.renderTimeRange:void 0}),m.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:zp}}),m.jsx(Jje,{...e,draggedElement:v,multiDragPreview:w,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onResizeElement:c,onMoveElement:u,onRazorSplit:d,onRazorSplitAll:y}),m.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:Fse}}),e.laneGapStrips.map(O=>{const C=s.indexOf(O.track);if(C<0)return null;const E=O.kind==="hover";return(e.rowsVirtualized?O.intervals.filter(N=>N.start<e.renderTimeRange.end&&N.end>e.renderTimeRange.start):O.intervals).map(N=>m.jsx("div",{className:"pointer-events-none absolute",style:{top:SP(C,e.rowHeights)+ca,left:e.contentOrigin+N.start*e.pps,width:Math.max((N.end-N.start)*e.pps,2),height:hs-ca*2,background:E?"rgba(60,230,172,0.18)":"rgba(60,230,172,0.055)",borderRadius:4,zIndex:25}},`gap-${O.kind}-${O.track}-${N.start}`))}),(n==null?void 0:n.started)&&n.insertRow==null&&a>=0&&m.jsx("div",{className:"absolute pointer-events-none",style:{top:SP(a,e.rowHeights)+ca,left:e.contentOrigin+n.previewStart*e.pps,width:Math.max(n.element.duration*e.pps,4),height:l,border:"1px solid rgba(60,230,172,0.55)",background:"rgba(60,230,172,0.12)",borderRadius:4,zIndex:30}}),(n==null?void 0:n.started)&&n.insertRow!=null&&m.jsx("div",{className:"absolute pointer-events-none",style:{top:SP(n.insertRow,e.rowHeights)-.5,left:e.contentOrigin,width:e.trackContentWidth,height:1,background:"#3CE6AC",boxShadow:"0 0 3px rgba(60,230,172,0.5)",zIndex:55}}),(n==null?void 0:n.started)&&n.snapTime!=null&&n.snapType!=="beat"&&m.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+n.snapTime*e.pps,top:Ia,bottom:0,width:1,background:n.snapType==="playhead"?"#3CE6AC":"rgba(255,255,255,0.6)",boxShadow:n.snapType==="playhead"?"0 0 6px rgba(60,230,172,0.5)":"0 0 6px rgba(255,255,255,0.4)",zIndex:60}}),m.jsx(pLe,{drag:n,scrollRef:r,pixelsPerSecond:e.pps,rowHeight:l,selectedElementId:e.selectedElementId,currentTime:e.currentTime,theme:e.theme,getTrackStyle:e.getTrackStyle,renderClipContent:e.renderClipContent,renderClipOverlay:e.renderClipOverlay}),e.marqueeRect&&m.jsx("div",{"aria-hidden":"true",className:"absolute pointer-events-none",style:{left:e.marqueeRect.left,top:e.marqueeRect.top,width:e.marqueeRect.width,height:e.marqueeRect.height,background:"rgba(60,230,172,0.10)",border:"1px dashed rgba(60,230,172,0.7)",borderRadius:2,zIndex:70}}),e.rangeSelection&&m.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+Math.min(e.rangeSelection.start,e.rangeSelection.end)*e.pps,width:Math.abs(e.rangeSelection.end-e.rangeSelection.start)*e.pps,top:Ia,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}}),m.jsx("div",{ref:e.playheadRef,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${II(0,0,e.contentOrigin)}px`,width:d6,zIndex:100,display:g?"none":void 0},children:m.jsx(R3e,{scrubbing:e.isScrubbing})})]})});function pc(t){return Rl(t)?"audio":"visual"}const U6=t=>t.key??t.id,yX=1e-6;function gLe(t,e){return t.start<e.start+e.duration-yX&&e.start<t.start+t.duration-yX}function yLe(t,e){const n=U6(t),r=U6(e);return n<r?-1:n>r?1:0}function xLe(t,e,n){const r=[...t].sort(yLe),i=[];for(const s of r){let a=i.findIndex(o=>o.every(l=>!gLe(l,s)));a===-1&&(a=i.length,i.push([])),i[a].push(s),n.set(U6(s),e+a)}return Math.max(1,i.length)}function xX(t,e,n){const r=new Map;for(const s of t){const a=r.get(s.track);a?a.push(s):r.set(s.track,[s])}let i=0;for(const s of[...r.keys()].sort((a,o)=>a-o))i+=xLe(r.get(s),e+i,n);return i}function Zfe(t){if(t.length===0)return t;const e=new Map,n=[],r=[];for(const o of t)(pc(o)==="audio"?r:n).push(o);let i=0;i+=xX(n,i,e),xX(r,i,e);let s=!1;const a=t.map(o=>{const l=e.get(U6(o));return l==null||l===o.track?o:(s=!0,{...o,track:l,authoredTrack:o.authoredTrack??o.track})});return s?a:t}const bX=1e-6,X6=t=>JSON.stringify([t.sourceFile??null,t.stackingContextId??null]);function LL(t,e){return X6(t)===X6(e)}function bLe(t,e){return t.start<e.start+e.duration-bX&&e.start<t.start+t.duration-bX}function o_(t,e){return t.track<e.track}function vg(t,e){return t.zIndex!==e.zIndex?t.zIndex>e.zIndex:t.domIndex!=null&&e.domIndex!=null?t.domIndex>e.domIndex:!1}function l_(t,e){return t.length>0?e(t.map(n=>n.zIndex)):null}function vLe(t,e,n,r){const i=e.filter(h=>!h.isAudio);if(i.length===0)return!1;const s=i.filter(h=>o_(t,h)),a=i.filter(h=>o_(h,t));if(s.every(h=>vg(t,h))&&a.every(h=>vg(h,t)))return!1;const l=l_(s,h=>Math.max(...h)),c=wLe(t,s,a);if(c!=null)return c!==t.zIndex&&r(t,c),c!==t.zIndex;const u=l!=null?l+1:0,f=Math.max(0,u);return f!==t.zIndex&&r(t,f),OLe(t,n,r),!0}function ALe(t,e,n){if(e-t>=2){const r=Math.floor((t+e)/2);return r>t&&r<e?r:null}return n(e)?e:null}function SLe(t,e){const n=t-1;return n>=0?n:e(t)?t:null}function wLe(t,e,n){const r=l_(e,a=>Math.max(...a)),i=l_(n,a=>Math.min(...a)),s=a=>{const o={...t,zIndex:a};return e.every(l=>vg(o,l))&&n.every(l=>vg(l,o))};return r!=null&&i!=null?ALe(r,i,s):r!=null?r+1:i!=null?SLe(i,s):null}function OLe(t,e,n){const r=[t],i=(s,a)=>{vg(s,a)||(n(s,a.zIndex+1),r.push(s))};for(;r.length>0;){const s=r.shift();for(const a of e(s))o_(a,s)&&!vg(a,s)&&i(a,s)}}function kLe(t,e){const n=new Set(e);if(n.size===0)return[];const r=t.filter(y=>Number.isFinite(y.zIndex)),i=new Set(r.filter(y=>n.has(y.key)).map(X6)),s=r.filter(y=>i.has(X6(y))),a=new Map(s.map(y=>[y.key,{...y}])),o=s.filter(y=>n.has(y.key)&&!y.isAudio).map(y=>a.get(y.key)).sort((y,g)=>g.track-y.track),l=new Map,c=(y,g)=>{y.zIndex=g,l.set(y.key,g)},u=[...a.values()],f=y=>u.filter(g=>g.key!==y.key&&!g.isAudio&&LL(y,g)&&bLe(y,g));for(const y of o)vLe(y,f(y),f,c);const h=new Set,d=[];for(const y of o)l.has(y.key)&&!h.has(y.key)&&(d.push({key:y.key,zIndex:l.get(y.key)}),h.add(y.key));for(const[y,g]of l)h.has(y)||(d.push({key:y,zIndex:g}),h.add(y));return d}function V2(t){return WA({tag:t.tag,kind:t.kind,duration:t.duration,domId:t.domId,selector:t.selector,compositionSrc:t.compositionSrc,playbackStart:t.playbackStart,playbackStartAttr:t.playbackStartAttr,sourceDuration:t.sourceDuration,timingSource:t.timingSource,timelineLocked:t.timelineLocked}).canMove}function CLe(t,e){const n=e.selectedKeys;if(!n)return null;const r=new Set(n),i=e.elements.includes(t.element)?e.elements:[...e.elements,t.element];for(const u of i){const f=u.expandedHostKey,h=Hn(u);f&&r.has(f)&&r.has(h)&&r.delete(h)}const s=t.element.expandedHostKey,a=Hn(t.element);if(!s||r.has(a))return r.size===n.size?null:{drag:t,selectedKeys:r};const o=e.elements.find(u=>Hn(u)===s);if(!o||!V2(o))return null;const l=t.previewStart-t.element.start,c=u=>u===t.element.track?o.track:u;return{drag:{...t,element:o,previewStart:Math.max(0,Math.round((o.start+l)*1e3)/1e3),previewTrack:c(t.previewTrack)??o.track,desiredTrack:c(t.desiredTrack)},selectedKeys:r}}const c_=new WeakMap;function LE(t,e){let n=c_.get(t);n||(n=new Map,c_.set(t,n));const r=new Map;for(const i of e){const s=(n.get(i)??0)+1;n.set(i,s),r.set(i,s)}return r}function W6(t,e,n){var r;return((r=c_.get(t))==null?void 0:r.get(n))===e.get(n)}function u_(t,e,n){for(const r of n)W6(t,e,r.key)&&t(r.key,r.updates)}let V8=null;function FL(t){const e=V8;let n;if(e)n=e.then(t,t);else try{n=Promise.resolve(t())}catch(i){n=Promise.reject(i)}const r=n.then(()=>{},()=>{});return V8=r,r.then(()=>{V8===r&&(V8=null)}),n}function zfe(t){return FL(async()=>{const n=await t.commitZ();return n&&!n.durable?!1:t.mirror()})}function Gfe(t){return FL(async()=>await t.commitLane()?(await t.commitZ(),!0):!1)}function Ag(t,e){return t.then(n=>{var r;return n&&((r=e.refreshAfterLaneMove)==null||r.call(e)),n})}const vX=t=>t.key??t.id,$L=(t,e)=>(t.sourceFile??null)===(e.sourceFile??null);function BL(t,e,n){const r=vX(n),i=e.filter(o=>vX(o)!==r&&$L(o,n)),s=i.find(o=>o.track===t);if(s)return s.authoredTrack??s.track;let a=null;for(const o of i)(!a||Math.abs(o.track-t)<Math.abs(a.track-t))&&(a=o);return a?Math.round((a.authoredTrack??a.track)+(t-a.track)):t}const Zr=t=>t.key??t.id,ELe=t=>Math.round(t*1e3)/1e3;let Ufe=0;function ad(t,e,n,r="timing",i){if(t.length===0)return Promise.resolve(!0);const{updateElement:s,onMoveElement:a,onMoveElements:o}=e;o||console.warn(a?`[Timeline] persistMoveEdits: only single-clip onMoveElement wired — this ${t.length}-clip move degrades to a per-clip persist race (no atomic single-undo)`:`[Timeline] persistMoveEdits: no move persist handler wired — ${t.length} edit(s) applied to the store only, not saved`);const l=t.map(d=>({key:Zr(d.element),start:d.element.start,track:d.element.track,authoredTrack:d.element.authoredTrack})),c=LE(s,t.map(d=>Zr(d.element))),u=d=>{const y=d.persistTrack??(d.updates.track!==d.element.track?d.updates.track:void 0);s(Zr(d.element),y==null?d.updates:{...d.updates,authoredTrack:y})};for(const d of t)u(d);const f=t.map(d=>d.persistTrack==null||d.persistTrack===d.updates.track?d:{element:d.element,updates:{...d.updates,track:d.persistTrack}}),h=o?o(f,n,r,i):Promise.all(f.map(d=>Promise.resolve(a==null?void 0:a(d.element,d.updates))));return Promise.resolve(h).then(()=>{for(const d of t){const y=Zr(d.element);W6(s,c,y)&&u(d)}return!0},d=>{for(const y of l)W6(s,c,y.key)&&s(y.key,{start:y.start,track:y.track,authoredTrack:y.authoredTrack});return console.error("[Timeline] Failed to persist clip edits",d),!1})}function AX(t,e){return t.length===0?0:e<=0?t[0]-.5:e>=t.length?t[t.length-1]+.5:(t[e-1]+t[e])/2}function TLe(t,e){const{elements:n,selectedKeys:r}=e,i=Zr(t.element);if(!r||r.size<=1||!r.has(i))return null;const s=new Set([...r].filter(l=>{const c=n.find(u=>Zr(u)===l);return c?V2(c):!1})),a=t.previewStart-t.element.start;return{keys:s,movedStart:l=>Zr(l)===i?t.previewStart:Math.max(0,ELe(l.start+a))}}function Xfe(t,e){const n=CLe(t,e);if(n){Xfe(n.drag,{...e,selectedKeys:n.selectedKeys});return}const{elements:r,updateElement:i,onMoveElement:s}=e,a=Zr(t.element),o=t.insertRow!=null,l=t.previewTrack!==t.element.track,c=t.desiredTrack??t.previewTrack,u=o||c!==t.element.track,f=TLe(t,e);if(!o&&!l){if(t.previewStart-t.element.start===0)return;if(f){const E=r.filter(M=>f.keys.has(Zr(M))).map(M=>({element:M,updates:{start:f.movedStart(M),track:M.track}})).filter(M=>M.updates.start!==M.element.start);ad(E,e);return}const w={start:t.previewStart,track:t.element.track},O={start:t.element.start,track:t.element.track},C=LE(i,[a]);i(a,w),Promise.resolve(s==null?void 0:s(t.element,w)).catch(E=>{W6(i,C,a)&&i(a,O),console.error("[Timeline] Failed to persist clip edit",E)});return}if(o){PLe(t,e,f);return}const h={element:t.element,updates:{start:t.previewStart,track:t.previewTrack},persistTrack:BL(t.previewTrack,r,t.element)},d=u?`clip-lane-move:${Ufe++}`:void 0,y=[h];if(f)for(const b of r){if(Zr(b)===a||!f.keys.has(Zr(b)))continue;const w=f.movedStart(b);w!==b.start&&y.push({element:b,updates:{start:w,track:b.track}})}const g=r.map(b=>Zr(b)===a?{...b,start:t.previewStart,track:t.previewTrack}:f!=null&&f.keys.has(Zr(b))?{...b,start:f.movedStart(b)}:b),v=f?f.keys:null;if(!u||!e.readZIndex||!e.onStackingPatches){Ag(ad(y,e,d,"lane-reorder"),e);return}Ag(Gfe({commitLane:()=>ad(y,e,d,"lane-reorder"),commitZ:()=>Yfe(g,a,t.element.track,t.previewTrack,v,e,d)}),e).catch(()=>{})}function Wfe(t,e,n,r,i){const{elements:s,trackOrder:a}=i,o=Zr(t);if(t.expandedParentStart!=null)return null;const l=AX(a,n),c=s.map(w=>Zr(w)===o?{...w,start:e,track:l}:r!=null&&r.keys.has(Zr(w))?{...w,start:r.movedStart(w)}:w),u=pc(t),f=w=>$L(w,t)&&pc(w)===u&&w.expandedParentStart==null,h=[...new Set(s.filter(f).map(w=>w.track))].sort((w,O)=>w-O),d=h.filter(w=>w<l).length,y=AX(h,d),g=Zfe(s.filter(f).map(w=>Zr(w)===o?{...w,start:e,track:y}:r!=null&&r.keys.has(Zr(w))?{...w,start:r.movedStart(w)}:w)),v=new Map(s.map(w=>[Zr(w),w]));for(const w of g){const O=v.get(Zr(w));if(O&&f(O)&&!V2(O)&&w.track!==(O.authoredTrack??O.track))return console.warn(`[Timeline] Track insert refused: locked clip ${Zr(O)} would need renumbering`),null}const b=[];if(r)for(const w of s){const O=Zr(w);O!==o&&r.keys.has(O)&&!f(w)&&V2(w)&&b.push({element:w,updates:{start:r.movedStart(w),track:w.track},persistTrack:w.authoredTrack})}for(const w of g){const O=v.get(Zr(w));if(!O||!V2(O))continue;const C=Zr(w)===o||r!=null&&r.keys.has(Zr(w))?(r==null?void 0:r.movedStart(O))??e:O.start;b.push({element:O,updates:{start:C,track:w.track}})}return{candidate:c,edits:b}}function PLe(t,e,n){const r=Zr(t.element),i=Wfe(t.element,t.previewStart,t.insertRow,n,e);if(!i)return;const{candidate:s,edits:a}=i;if(a.length===0)return;const o=`clip-lane-move:${Ufe++}`;if(!e.readZIndex||!e.onStackingPatches){Ag(ad(a,e,o,"track-insert"),e);return}Ag(Gfe({commitLane:()=>ad(a,e,o,"track-insert"),commitZ:()=>Yfe(s,r,t.element.track,t.insertRow,n?n.keys:null,e,o)}),e).catch(()=>{})}function MLe(t,e,n,r,i){if(e.kind==="move"){const a={element:t,updates:{start:t.start,track:e.displayTrack},persistTrack:e.persistTrack};return Ag(ad([a],n,r,"lane-reorder",i),n)}const s=Wfe(t,t.start,e.insertRow,null,n);return!s||s.edits.length===0?Promise.resolve(!1):Ag(ad(s.edits,n,r,"track-insert",i),n)}function Yfe(t,e,n,r,i,s,a){const{readZIndex:o,onStackingPatches:l}=s;if(!o||!l||r===n)return Promise.resolve();const c=t.map((h,d)=>({key:Zr(h),start:h.start,duration:h.duration,track:h.track,zIndex:o(h),isAudio:pc(h)==="audio",sourceFile:h.sourceFile,domIndex:d,stackingContextId:h.stackingContextId??null})),u=[e];if(i)for(const h of i)h!==e&&u.push(h);const f=kLe(c,u);return f.length===0?Promise.resolve():Promise.resolve(l(f,a)).then(()=>{})}function NLe(t,e,n){if(!t.hasChanged)return;const r=t.changes,i=LE(e,r.map(a=>a.key));for(const a of r)e(a.key,{start:a.start,duration:a.duration,playbackStart:a.playbackStart});if(!n){u_(e,i,t.members.map(a=>({key:a.key,updates:a})));return}const s=`clip-group-resize:${r.map(a=>a.key).join(":")}`;Promise.resolve(n(r.map(a=>({element:a.element,start:a.start,duration:a.duration,playbackStart:a.playbackStart})),{coalesceKey:s})).catch(a=>{u_(e,i,t.members.map(o=>({key:o.key,updates:o}))),console.error("[Timeline] Failed to persist group clip resize",a)})}function DLe({lifecycleRef:t,sessionEpochRef:e,cancelGestureRef:n,scrollRef:r,draggedClipRef:i,resizingClipRef:s,blockedClipRef:a,groupResizeRef:o,suppressClickRef:l,gestureSelectedKeysRef:c,elementsRef:u,trackOrderRef:f,setDraggedClipState:h,setResizingClipState:d,setShowPopover:y,setRangeSelectionRef:g,applyResizePointerRef:v,syncClipDragAutoScrollRef:b,stopClipDragAutoScrollRef:w,updateDraggedClipPreviewRef:O,publishDraggedClip:C,updateElement:E,onMoveElementRef:M,onMoveElementsRef:N,onResizeElementRef:I,onResizeElementsRef:_,onBlockedEditAttemptRef:j,readZIndexRef:L,onStackingPatchesRef:V,refreshAfterLaneMoveRef:$}){const Z=()=>{requestAnimationFrame(()=>{l.current=!1})},W=me=>{const Ae=t.current.pointerId;return Ae===null||me.pointerId===Ae},Y=me=>{if(me===null)return;const Ae=r.current;try{Ae!=null&&Ae.hasPointerCapture(me)&&Ae.releasePointerCapture(me)}catch{}},J=me=>{var Ae;if(me!==null)try{(Ae=r.current)==null||Ae.setPointerCapture(me)}catch{}},ne=me=>{i.current=null,s.current=null,o.current=null,me&&(h(null),d(null))},ie=({updateReact:me=!0,suppressClick:Ae=!1}={})=>{const De=t.current;return De.phase!=="active"?!1:(De.phase="cancelled",w.current(),ne(me),Y(De.pointerId),Ae&&(l.current=!0),De.kind=null,De.pointerId=null,De.phase="complete",!0)};n.current=ie;const le=(me,Ae)=>{var Se;const De=Math.abs(me.clientX-Ae.originClientX);!Ae.started&&De<2||(Ae.started||J(Ae.pointerId),y(!1),(Se=g.current)==null||Se.call(g,null),v.current(Ae,me.clientX),b.current(me.clientX,me.clientY))},q=(me,Ae)=>{var ye,we;const De=Math.hypot(me.clientX-Ae.originClientX,me.clientY-Ae.originClientY),Se=Ae.intent==="move"?4:2;!Ae.started&&De<Se||Ae.started||(Ae.started=!0,a.current=Ae,J(Ae.pointerId),l.current=!0,y(!1),(ye=g.current)==null||ye.call(g,null),(we=j.current)==null||we.call(j,Ae.element,Ae.intent))},F=(me,Ae)=>{var Se;const De=Math.hypot(me.clientX-Ae.originClientX,me.clientY-Ae.originClientY);!Ae.started&&De<4||(Ae.started||J(Ae.pointerId),y(!1),(Se=g.current)==null||Se.call(g,null),C(O.current(Ae,me.clientX,me.clientY)),b.current(me.clientX,me.clientY))},U=me=>{const Ae=s.current;if(Ae)return W(me)?le(me,Ae):void 0;const De=a.current;if(De)return De.pointerId!==me.pointerId?void 0:q(me,De);const Se=i.current;Se&&W(me)&&F(me,Se)},z=(me,Ae)=>{var we;if(!me.started)return;if(l.current=!0,Z(),Ae){NLe(Ae,E,_.current);return}if(!(me.previewStart!==me.element.start||me.previewDuration!==me.element.duration||me.previewPlaybackStart!==me.element.playbackStart))return;const Se=me.element.key??me.element.id,ye=LE(E,[Se]);E(Se,{start:me.previewStart,duration:me.previewDuration,playbackStart:me.previewPlaybackStart}),Promise.resolve((we=I.current)==null?void 0:we.call(I,me.element,{start:me.previewStart,duration:me.previewDuration,playbackStart:me.previewPlaybackStart})).catch(ke=>{u_(E,ye,[{key:Se,updates:{start:me.element.start,duration:me.element.duration,playbackStart:me.element.playbackStart}}]),console.error("[Timeline] Failed to persist clip resize",ke)})},K=me=>{a.current=null,me.started&&Z()},te=me=>{me.started&&(l.current=!0,Z(),Xfe(me,{elements:u.current,trackOrder:f.current,updateElement:E,onMoveElement:M.current,onMoveElements:N.current,selectedKeys:c.current,readZIndex:L.current,onStackingPatches:V.current,refreshAfterLaneMove:$.current}))},ee=()=>{var De,Se,ye;const me=((De=o.current)==null?void 0:De.members.map(we=>we.element))??[((Se=s.current)==null?void 0:Se.element)??((ye=i.current)==null?void 0:ye.element)],Ae=new Set(u.current.map(we=>we.key??we.id));return me.every(we=>we===void 0||Ae.has(we.key??we.id))},H=me=>{const Ae=t.current;if(Ae.phase!=="active")return null;if(!W(me))return"ignored";if(Ae.sessionEpoch!==e.current||!ee())return ie(),"ignored";Ae.phase="committing";const De=Ae.kind?{kind:Ae.kind,drag:i.current,resize:s.current,groupResize:o.current}:"ignored";return w.current(),ne(!0),Y(Ae.pointerId),De==="ignored"&&(Ae.phase="complete"),De},Q=me=>{try{me.kind==="resize"&&me.resize?z(me.resize,me.groupResize):me.kind==="drag"&&me.drag&&te(me.drag)}finally{const Ae=t.current;Ae.kind=null,Ae.pointerId=null,Ae.phase="complete"}},oe=me=>{const Ae=H(me);if(Ae==="ignored")return;if(Ae){Q(Ae);return}const De=a.current;if(De)return De.pointerId!==me.pointerId?void 0:K(De);l.current&&Z()},fe=me=>{t.current.phase==="active"&&W(me)&&ie({suppressClick:!0})&&Z();const Ae=a.current;Ae&&Ae.pointerId!==me.pointerId||(a.current=null,l.current&&Z())},pe=me=>{t.current.phase==="active"&&W(me)&&ie({suppressClick:!0})&&Z()},be=me=>{const Ae=GEe({key:me.key,drag:i.current,resize:s.current,blocked:a.current});Ae.cancel&&(me.preventDefault(),a.current=null,ie({suppressClick:Ae.suppressClick}))};return window.addEventListener("pointermove",U),window.addEventListener("pointerup",oe),window.addEventListener("pointercancel",fe),window.addEventListener("lostpointercapture",pe),window.addEventListener("keydown",be),()=>{ie({updateReact:!1}),n.current=()=>!1,window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",oe),window.removeEventListener("pointercancel",fe),window.removeEventListener("lostpointercapture",pe),window.removeEventListener("keydown",be)}}const H8=[];function ILe({scrollRef:t,ppsRef:e,durationRef:n,trackOrderRef:r,rowGeometryRef:i,onMoveElement:s,onMoveElements:a,onResizeElement:o,onResizeElements:l,onBlockedEditAttempt:c,setShowPopover:u,setRangeSelectionRef:f,readZIndex:h,onStackingPatches:d,refreshAfterLaneMove:y,sessionEpoch:g=0}){const v=ue(We=>We.updateElement),b=ue(We=>{var wt;return((wt=We.beatAnalysis)==null?void 0:wt.beatTimes)??H8}),w=ue(We=>{var wt;return((wt=We.beatAnalysis)==null?void 0:wt.beatStrengths)??H8}),O=ue(We=>We.beatEdits),C=ue(We=>o0(We.elements).musicElement),E=(C==null?void 0:C.start)??0,M=(C==null?void 0:C.playbackStart)??0,N=(C==null?void 0:C.duration)??0,I=(C==null?void 0:C.src)??null,_=x.useMemo(()=>{if(b===H8||N===0)return H8;const We=UR(b,w,O,I),wt=M+N,ut=E-M;return We.times.filter(dt=>dt>=M&&dt<=wt).map(dt=>Math.round((dt+ut)*1e3)/1e3)},[b,w,O,I,E,M,N]),j=ue(We=>We.elements),L=ue(We=>We.timelineSnapEnabled),V=x.useRef({beatTimes:[],enabled:!0});V.current={beatTimes:_,enabled:L};const $=x.useRef(j);$.current=j;const Z=x.useRef(new Map),W=x.useRef(null),Y=x.useCallback((We,wt)=>{if(!V.current.enabled)return[];const ut=`${We??""}|${wt?1:0}`,dt=Z.current.get(ut);if(dt)return dt;const cn=eLe({elements:$.current,playheadTime:ue.getState().currentTime,beatTimes:wt?V.current.beatTimes:[],excludeElementKey:We});return Z.current.set(ut,cn),cn},[]),[J,ne]=x.useState(null),ie=x.useRef(null),le=x.useCallback(We=>{ie.current=We,ne(We)},[]),[q,F]=x.useState(null),U=x.useRef(null),z=x.useCallback(We=>{U.current=We,F(We)},[]),K=x.useRef({kind:null,phase:"complete",pointerId:null,sessionEpoch:g}),te=x.useRef(g);te.current=g;const ee=x.useRef(new Set),H=x.useRef(()=>!1),Q=x.useCallback((We,wt)=>{K.current.phase==="active"&&H.current(),K.current={kind:We,phase:"active",pointerId:wt,sessionEpoch:te.current},ee.current=new Set(ue.getState().selectedElementIds)},[]),oe=x.useCallback(We=>{if(!We){H.current();return}Q("drag",We.pointerId),le(We)},[Q,le]),fe=x.useCallback(We=>{if(!We){H.current();return}Q("resize",We.pointerId),z(We)},[Q,z]),pe=x.useRef(null),be=x.useRef(!1),me=x.useRef(null),Ae=x.useRef(s);Ae.current=s;const De=x.useRef(a);De.current=a;const Se=x.useRef(c);Se.current=c;const ye=x.useRef(o);ye.current=o;const we=x.useRef(l);we.current=l;const ke=x.useRef(h);ke.current=h;const Pe=x.useRef(d);Pe.current=d;const Ve=x.useRef(y);Ve.current=y;const Ke=x.useRef(0),ze=x.useRef(null),Ye=x.useCallback((We,wt,ut)=>(W.current||(W.current=o0($.current).audioTracks),fLe(We,wt,ut,{scroll:t.current,pps:e.current,duration:n.current,trackOrder:r.current,rowHeights:i==null?void 0:i.current.rowHeights,elements:$.current,selectedKeys:ee.current,buildSnapTargets:Y,audioTracks:W.current})),[t,e,n,r,i,Y]),pt=x.useCallback((We,wt)=>{const ut=hLe(We,wt,{scroll:t.current,pps:e.current,buildSnapTargets:Y}),dt=rn=>z(U.current?{...U.current,started:!0,...rn}:null),cn=We.element.key??We.element.id;let nn=me.current;if(!nn||nn.grabbedKey!==cn||nn.edge!==We.edge){const rn=FEe($.current,ee.current,cn,We.edge);nn=rn?{grabbedKey:cn,edge:We.edge,members:rn,changes:[],hasChanged:!1}:null,me.current=nn}if(!nn){dt(ut);return}dLe(nn,ut,dt)},[t,e,Y,z]),st=x.useRef(pt);st.current=pt;const St=x.useCallback(()=>{ze.current=null,Ke.current&&(cancelAnimationFrame(Ke.current),Ke.current=0),Z.current.clear(),W.current=null},[]),$e=x.useCallback(()=>{Ke.current=0;const We=ie.current,wt=U.current,ut=ze.current,dt=t.current;!We&&!wt||!ut||!dt||oE(dt,ut.clientX,ut.clientY)&&(We?le(Ye(We,ut.clientX,ut.clientY)):wt&&st.current(wt,ut.clientX),Ke.current=requestAnimationFrame($e))},[le,t,Ye]),qe=x.useCallback((We,wt)=>{ze.current={clientX:We,clientY:wt};const ut=YA(t.current,We,wt,Ke.current!==0);ut==="stop"?(cancelAnimationFrame(Ke.current),Ke.current=0):ut==="start"&&(Ke.current=requestAnimationFrame($e))},[t,$e]),tt=x.useRef(Ye);tt.current=Ye;const Gt=x.useRef(qe);Gt.current=qe;const Dt=x.useRef(St);return Dt.current=St,Ar(()=>DLe({onStackingPatchesRef:Pe,refreshAfterLaneMoveRef:Ve,readZIndexRef:ke,onBlockedEditAttemptRef:Se,onResizeElementsRef:we,onResizeElementRef:ye,onMoveElementsRef:De,onMoveElementRef:Ae,updateElement:v,publishDraggedClip:le,updateDraggedClipPreviewRef:tt,stopClipDragAutoScrollRef:Dt,syncClipDragAutoScrollRef:Gt,applyResizePointerRef:st,setRangeSelectionRef:f,setShowPopover:u,setResizingClipState:F,setDraggedClipState:ne,trackOrderRef:r,elementsRef:$,gestureSelectedKeysRef:ee,suppressClickRef:be,groupResizeRef:me,blockedClipRef:pe,resizingClipRef:U,draggedClipRef:ie,scrollRef:t,cancelGestureRef:H,sessionEpochRef:te,lifecycleRef:K})),x.useEffect(()=>{H.current()},[g]),{draggedClip:J,setDraggedClip:oe,resizingClip:q,setResizingClip:fe,blockedClipRef:pe,suppressClickRef:be,stopClipDragAutoScroll:St}}function SX(t){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=t,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,t.length);try{return document.execCommand("copy")}catch{return!1}finally{e.remove()}}function _Le(){if(typeof navigator>"u")return!1;const t=navigator.userAgent;return/Safari/i.test(t)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(t)}async function jf(t){const e=_Le();if(e&&SX(t))return!0;const n=typeof navigator<"u"?navigator.clipboard:void 0;if(n!=null&&n.writeText)try{return await n.writeText(t),!0}catch{}return!e&&SX(t)}function RLe(t,e){return`hf-edit-draft:${t.toFixed(2)}:${e.toFixed(2)}`}function jLe(t){try{return sessionStorage.getItem(t)??""}catch{return""}}function wX(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function LLe({rangeStart:t,rangeEnd:e,anchorX:n,anchorY:r,onClose:i}){const s=ue(_=>_.elements),a=Math.min(t,e),o=Math.max(t,e),l=RLe(a,o),[c,u]=x.useState(()=>jLe(l)),f=_=>{u(_),wX(l,_)},[h,d]=x.useState(!1),[y,g]=x.useState(!1),[v,b]=x.useState(!1),w=x.useRef(null),O=x.useRef(null),C=x.useMemo(()=>s.filter(_=>{const j=_.start+_.duration;return _.start<o&&j>a}),[s,a,o]);Ar(()=>{setTimeout(()=>{var _;return(_=O.current)==null?void 0:_.focus()},50)}),Ar(()=>{const _=j=>{j.key==="Escape"&&i()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)}),Ar(()=>{const _=j=>{w.current&&!w.current.contains(j.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",_),100),()=>window.removeEventListener("mousedown",_)});const E=x.useCallback(()=>zEe({rangeStart:a,rangeEnd:o,elements:C,prompt:c}),[a,o,C,c]),M=x.useCallback(async()=>{if(!await jf(E())){b(!0);return}b(!1),wX(l,""),d(!0),setTimeout(()=>{d(!1),i()},800)},[E,i,l]),N=x.useCallback(async()=>{const _=nG(c);if(!_)return;if(!await jf(_)){b(!0);return}b(!1),g(!0),setTimeout(()=>{g(!1)},800)},[c]),I={position:"fixed",left:Math.max(8,Math.min(n-160,window.innerWidth-336)),top:Math.max(8,r-280),zIndex:200};return m.jsx("div",{ref:w,style:I,children:m.jsxs("div",{className:"w-80 bg-neutral-900 border border-neutral-700/60 rounded-xl shadow-2xl shadow-black/40 overflow-hidden",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-neutral-800/60",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-studio-accent"}),m.jsxs("span",{className:"text-[11px] font-medium text-neutral-300",children:[ns(a)," — ",ns(o)]})]}),m.jsxs("span",{className:"text-[10px] text-neutral-600",children:[C.length," element",C.length!==1?"s":""]})]}),C.length>0&&m.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:C.map(_=>m.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[m.jsxs("span",{className:"text-[10px] font-mono text-studio-accent/80",children:["#",_.id]}),m.jsx("span",{className:"text-[10px] text-neutral-600",children:_.tag})]},_.id))}),m.jsx("div",{className:"p-3",children:m.jsx("textarea",{ref:O,value:c,onChange:_=>f(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),M())},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"})}),v&&m.jsx("p",{className:"px-3 pb-2 text-[10px] text-red-400",role:"alert",children:"Copy failed — check clipboard permissions and try again."}),m.jsxs("div",{className:"grid grid-cols-2 gap-2 px-3 pb-3",children:[m.jsx("button",{onClick:N,disabled:!nG(c),className:`py-1.5 text-[11px] font-medium rounded-lg transition-all border ${y?"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:y?"Prompt Copied!":"Copy Prompt"}),m.jsxs("button",{onClick:M,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${h?"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:[h?"Copied!":"Copy to Agent",!h&&m.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}function qfe(t){x.useEffect(()=>{var s;const e=t.current;if(!e)return;const n=document.activeElement,r=()=>Array.from(e.querySelectorAll('[role="menuitem"]')).filter(a=>!a.disabled);(s=r()[0])==null||s.focus();const i=a=>{var u;if(a.key!=="ArrowDown"&&a.key!=="ArrowUp"&&a.key!=="Home"&&a.key!=="End")return;const o=r();if(o.length===0)return;a.preventDefault();const l=o.findIndex(f=>f===document.activeElement);let c;a.key==="ArrowDown"?c=l<0?0:(l+1)%o.length:a.key==="ArrowUp"?c=l<0?o.length-1:(l-1+o.length)%o.length:a.key==="Home"?c=0:c=o.length-1,(u=o[c])==null||u.focus()};return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i),n instanceof HTMLElement&&document.contains(n)&&n.focus()}},[t])}const tM="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-200 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",FLe="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left";function Kfe({state:t,onClose:e,onDelete:n,onDeleteAll:r,onEditEase:i,onCopyProperties:s,onMoveToPlayhead:a}){const o=P0(e),l={percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId};qfe(o);const[c,u]=x.useState("idle"),f=async()=>{if(!s)return;if(await s(t.elementId,l)===!1){u("failed"),setTimeout(()=>u("idle"),1500);return}u("copied"),setTimeout(e,700)},h=200,y=10+(1+(a?1:0)+(i?1:0)+(s?1:0)+(n?1:0))*30+9,g=t.y+y-window.innerHeight,v=t.x+h>window.innerWidth?t.x-h:t.x,b=Math.max(8,g>0?t.y-g-8:t.y);return _l.createPortal(m.jsxs("div",{ref:o,role:"menu","aria-label":"Keyframe actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px] overflow-y-auto",style:{left:v,top:b,maxHeight:`calc(100vh - ${b+8}px)`},children:[a&&m.jsx("button",{type:"button",role:"menuitem",className:tM,onClick:()=>{a(t.element,l),e()},children:"Move to Playhead"}),i&&m.jsxs("button",{type:"button",role:"menuitem",className:`${tM} justify-between`,onClick:()=>{i(t.elementId,l),e()},children:[m.jsx("span",{children:"Edit Ease…"}),m.jsx("span",{className:"text-[10px] text-neutral-500",children:t.currentEase??"default"})]}),s&&m.jsx("button",{type:"button",role:"menuitem",className:tM,onClick:()=>{f()},children:c==="copied"?"Copied!":c==="failed"?"Copy failed — check permissions":"Copy Properties"}),n&&m.jsx("button",{type:"button",role:"menuitem",className:FLe,onClick:()=>{n(t.elementId,l),e()},children:"Delete Keyframe"}),m.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),m.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),m.jsx("button",{type:"button",role:"menuitem",className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-red-950/40 focus-visible:bg-red-950/40 outline-none cursor-pointer text-left",onClick:()=>{r(t.element,t.animationId),e()},children:"Delete All Keyframes"})]}),document.body)}const $Le=x.memo(function({x:e,y:n,element:r,currentTime:i,onClose:s,onSplit:a,onDelete:o}){const l=P0(s);qfe(l);const c=200,f=n+80-window.innerHeight,h=e+c>window.innerWidth?e-c:e,d=f>0?n-f-8:n,y=jE(r)&&["video","audio","img"].includes(r.tag),g=y&&i>r.start&&i<r.start+r.duration,v=y?g?`Split at ${i.toFixed(2)}s`:"Split (move playhead inside clip)":null;return _l.createPortal(m.jsxs("div",{ref:l,role:"menu","aria-label":"Clip actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:h,top:d},children:[v&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",role:"menuitem",className:`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left outline-none focus-visible:bg-neutral-800 ${g?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,disabled:!g,onClick:()=>{g&&(a(r,i),s())},children:[m.jsx("span",{children:v}),m.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"S"})]}),m.jsx("div",{className:"my-1 border-t border-neutral-700/60"})]}),m.jsxs("button",{type:"button",role:"menuitem",className:"w-full flex items-center justify-between px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",onClick:()=>{o(r),s()},children:[m.jsx("span",{children:"Delete"}),m.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"⌫"})]})]}),document.body)}),BLe=x.memo(function({x:e,y:n,gapWidth:r,canCloseGap:i,canCloseAllGaps:s,hasAnyGaps:a,onClose:o,onCloseGap:l,onCloseAllGaps:c,onHoverAction:u}){const f=P0(o),h=200,y=n+68-window.innerHeight,g=e+h>window.innerWidth?e-h:e,v=y>0?n-y-8:n,b=C=>`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left ${C?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,w=i?void 0:r==null?"No gap here":"A clip on this track can't be moved",O=s?void 0:a?"A clip on this track can't be moved":"No gaps on this track";return _l.createPortal(m.jsxs("div",{ref:f,className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:g,top:v},onPointerLeave:()=>u(null),children:[m.jsxs("button",{type:"button",className:b(i),disabled:!i,title:w,onPointerEnter:()=>u(i?"close-gap":null),onClick:()=>{i&&(l(),o())},children:[m.jsx("span",{children:"Close gap"}),r!=null&&m.jsxs("span",{className:"text-neutral-500 text-[10px] ml-3",children:[r.toFixed(2),"s"]})]}),m.jsx("button",{type:"button",className:b(s),disabled:!s,title:O,onPointerEnter:()=>u(s?"close-all":null),onClick:()=>{s&&(c(),o())},children:m.jsx("span",{children:"Close all gaps"})})]}),document.body)});function VLe({theme:t}){return m.jsx("div",{className:"absolute bottom-2 right-3 pointer-events-none z-20",children:m.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:t.gutterBorder},children:[m.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:t.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),m.jsx("span",{className:"text-[9px]",style:{color:t.textSecondary},children:"+ drag/click to edit range"})]})})}function f_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:n,selectedElementId:r,elements:i}){const s=t.key??t.id;return e!==n||r!==s?null:i.find(a=>(a.key??a.id)===s)??null}function HLe(t,e,n){const r=ue.getState();return f_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:r.timelineSessionEpoch,selectedElementId:r.selectedElementId,elements:n})}function QLe({elements:t,elementsRef:e,theme:n,showShortcutHint:r,showPopover:i,rangeSelection:s,setShowPopover:a,setRangeSelection:o,kfContextMenu:l,setKfContextMenu:c,onDeleteKeyframe:u,onDeleteAllKeyframes:f,onMoveKeyframeToPlayhead:h,clipContextMenu:d,setClipContextMenu:y,currentTime:g,onSplitElement:v,pinZoomBeforeEdit:b,onDeleteElement:w,gapContextMenu:O,onDismissGapContextMenu:C,onCloseTrackGap:E,onCloseAllTrackGaps:M,onHoverGapAction:N}){const I=ue(W=>W.selectedElementId),_=ue(W=>W.timelineSessionEpoch),j=l==null?void 0:l.sessionEpoch,L=d==null?void 0:d.sessionEpoch,V=l?f_({capturedElement:l.element,targetSessionEpoch:j,sessionEpoch:_,selectedElementId:I,elements:t}):null,$=d?f_({capturedElement:d.element,targetSessionEpoch:L,sessionEpoch:_,selectedElementId:I,elements:t}):null,Z=(W,Y)=>HLe(W,Y,e.current);return x.useEffect(()=>{l&&!V&&c(null)},[V,l,c]),x.useEffect(()=>{d&&!$&&y(null)},[d,$,y]),m.jsxs(m.Fragment,{children:[r&&!i&&!s&&m.jsx(VLe,{theme:n}),i&&s&&m.jsx(LLe,{rangeStart:s.start,rangeEnd:s.end,anchorX:s.anchorX,anchorY:s.anchorY,onClose:()=>{a(!1),o(null)}}),l&&V&&m.jsx(Kfe,{state:{...l,element:V},onClose:()=>c(null),onDelete:(...W)=>{Z(V,j)&&(u==null||u(...W))},onDeleteAll:(W,Y)=>{const J=Z(V,j);J&&(f==null||f(J,Y))},onMoveToPlayhead:h?(W,...Y)=>{const J=Z(V,j);J&&h(J,...Y)}:void 0,onEditEase:l.animationId!==void 0&&l.tweenPercentage!==void 0?(W,Y)=>{Y.animationId===void 0||Y.tweenPercentage===void 0||(ue.getState().setFocusedEaseSegment({animationId:Y.animationId,collidingAnimationTargets:Y.collidingAnimationTargets,tweenPercentage:Y.tweenPercentage,elementId:W}),yR({action:"open"}))}:void 0,onCopyProperties:(W,Y)=>{const J=ue.getState().keyframeCache.get(W),ne=J==null?void 0:J.keyframes.find(ie=>Math.abs(ie.percentage-Y.percentage)<.5);return ne?jf(JSON.stringify(ne.properties,null,2)):!1}}),d&&$&&m.jsx($Le,{x:d.x,y:d.y,element:$,currentTime:g,onClose:()=>y(null),onSplit:(W,Y)=>{const J=Z($,L);J&&(v==null||v(J,Y))},onDelete:()=>{const W=Z($,L);W&&(b(),w==null||w(W))}}),O&&m.jsx(BLe,{x:O.x,y:O.y,gapWidth:O.gapWidth,canCloseGap:O.canCloseGap,canCloseAllGaps:O.canCloseAllGaps,hasAnyGaps:O.hasAnyGaps,onClose:C,onCloseGap:E,onCloseAllGaps:M,onHoverAction:N})]})}function ZLe({ppsRef:t,fitPpsRef:e,onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onFileDrop:a,onAssetDrop:o,onBlockDrop:l,onCompositionDrop:c}){const u=ue(E=>E.pinTimelineZoom),f=x.useCallback(()=>{u(t.current,e.current)},[u,t,e]),h=x.useRef(null),d=x.useMemo(()=>n&&((...E)=>(f(),n(...E))),[n,f]),y=x.useMemo(()=>r&&((...E)=>(f(),r(...E))),[r,f]),g=x.useMemo(()=>i&&((...E)=>(f(),i(...E))),[i,f]),v=x.useMemo(()=>s&&((...E)=>(f(),s(...E))),[s,f]),b=x.useMemo(()=>a&&((...E)=>(f(),a(...E))),[a,f]),w=x.useMemo(()=>o&&((...E)=>(f(),o(...E))),[o,f]),O=x.useMemo(()=>l&&((...E)=>(f(),l(...E))),[l,f]),C=x.useMemo(()=>c&&((...E)=>(f(),c(...E))),[c,f]);return{pinZoomBeforeEdit:f,setRangeSelectionRef:h,pinnedOnMoveElement:d,pinnedOnMoveElements:y,pinnedOnResizeElement:g,pinnedOnResizeElements:v,pinnedOnFileDrop:b,pinnedOnAssetDrop:w,pinnedOnBlockDrop:O,pinnedOnCompositionDrop:C}}const VL=x.createContext(null),HL=x.createContext(null);function Cc(){const t=x.useContext(VL);if(!t)throw new Error("useStudioShellContext must be used within StudioShellProvider");return t}function QL(){return x.useContext(VL)}function oy(){const t=x.useContext(HL);if(!t)throw new Error("useStudioPlaybackContext must be used within StudioPlaybackProvider");return t}function zLe(){return x.useContext(HL)}function GLe({value:t,children:e}){const{projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,handleUndo:l,handleRedo:c,renderQueue:u,compositionDimensions:f,waitForPendingDomEditSaves:h,handlePreviewIframeRef:d}=t,y=x.useMemo(()=>({projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,handleUndo:l,handleRedo:c,renderQueue:u,compositionDimensions:f,waitForPendingDomEditSaves:h,handlePreviewIframeRef:d}),[n,r,f,o,u,i,s,a,l,c,h,d]);return m.jsx(VL,{value:y,children:e})}function ULe({value:t,children:e}){const{captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}=t,c=x.useMemo(()=>({captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}),[n,r,i,a,o,s,l]);return m.jsx(HL,{value:c,children:e})}function XLe(t){var e;try{const n=(e=t.ownerDocument)==null?void 0:e.defaultView;if(!n)return!0;const r=n.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1;const i=Number.parseFloat(r.opacity);return!(Number.isFinite(i)&&i<=.01&&!t.hasAttribute(IE))}catch{return!0}}function OX(t){if(!t||t==="auto")return 0;const e=parseInt(t,10);return Number.isFinite(e)?e:0}function FE(t){var r;const e=QR(t);if(e!=null)return e;const n=t.style.zIndex;if(n&&n!=="auto")return OX(n);try{const i=(r=t.ownerDocument)==null?void 0:r.defaultView;if(i)return OX(i.getComputedStyle(t).zIndex)}catch{}return 0}function Jfe(t){var n;const e=(n=t.ownerDocument)==null?void 0:n.defaultView;return e&&t instanceof e.HTMLElement?!0:t.nodeType===1}const WLe=new Set(["AUDIO","SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function YLe(t){return Jfe(t)&&!WLe.has(t.tagName)}function ehe(t){const e=t.parentElement;if(!e)return{entries:[],targetIndex:-1};const n=[];let r=-1,i=0;for(const s of Array.from(e.children))s!==t&&!YLe(s)||Jfe(s)&&(s===t&&(r=n.length),n.push({element:s,zIndex:FE(s),domIndex:i}),i+=1);return{entries:n,targetIndex:r}}function qLe(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}function KLe(t,e,n){const r=e.filter(a=>a.element===t||n(a.element));let i;try{i=t.getBoundingClientRect()}catch{return r}if(i.width===0&&i.height===0)return r;const s={left:i.left,top:i.top,right:i.right,bottom:i.bottom};return r.filter(a=>{if(a.element===t)return!0;try{const o=a.element.getBoundingClientRect();return qLe(s,{left:o.left,top:o.top,right:o.right,bottom:o.bottom})}catch{return!1}})}function ZL(t){return[...t].sort((e,n)=>e.zIndex-n.zIndex||e.domIndex-n.domIndex)}function JLe(t,e){if(t&&e)return e.zIndex-t.zIndex>=2?t.zIndex+1:null;if(t)return t.zIndex+1;if(e){const n=Math.max(0,e.zIndex-1);return n>=e.zIndex?null:n}return null}function the(t,e,n,r){const i=e.findIndex(l=>l.element===n);if(i===-1)return null;const s=FE(n),a=t.map(l=>l.zIndex);if(!a.some((l,c)=>a.indexOf(l)!==c)){const l=JLe(e[i-1],e[i+1]);if(l!==null)return l===s?null:[{element:n,zIndex:l}]}return eFe(t,e,n,r)}function eFe(t,e,n,r){const i=new Set(e.map(d=>d.element)),s=r.filter(d=>!i.has(d.element)),a=e.length,o=t.map(d=>d.zIndex),l=Math.min(...o),c=Math.max(...o);if(!s.some(d=>d.zIndex>=l&&d.zIndex<=c)){const d=s.filter(w=>w.zIndex<l).map(w=>w.zIndex),y=s.filter(w=>w.zIndex>c).map(w=>w.zIndex),g=d.length>0?Math.max(...d)+1:0,v=y.length>0,b=v?Math.min(...y)-a:Number.POSITIVE_INFINITY;if(g<=b){let w=Math.max(l,g);v&&(w=Math.min(w,b));const O=[];return e.forEach((C,E)=>{C.zIndex!==w+E&&O.push({element:C.element,zIndex:w+E})}),O.length===0?null:O}}const f=tFe(r,e,n),h=[];return f.forEach((d,y)=>{d.zIndex!==y&&h.push({element:d.element,zIndex:y})}),h.length===0?null:h}function tFe(t,e,n){const r=ZL(t),i=r.find(f=>f.element===n),s=r.filter(f=>f.element!==n);if(!i)return s;const a=e.findIndex(f=>f.element===n),o=e[a-1],l=e[a+1],c=o?s.findIndex(f=>f.element===o.element):-1,u=l?s.findIndex(f=>f.element===l.element):-1;return c>=0?s.splice(c+1,0,i):u>=0?s.splice(u,0,i):s.unshift(i),s}function nhe(t,e,n){const{entries:r}=ehe(t);if(r.length<2)return null;const s=e==="bring-to-front"||e==="send-to-back"?r:KLe(t,r,XLe);if(s.length<2)return null;const a=ZL(s),o=a.findIndex(l=>l.element===t);return o===-1?null:{entries:r,order:a,pos:o}}function rhe(t,e,n){const r=nhe(t,e);if(!r)return null;const{entries:i,order:s,pos:a}=r,o=[...s],[l]=o.splice(a,1);switch(e){case"bring-forward":if(a>=s.length-1)return null;o.splice(a+1,0,l);break;case"send-backward":if(a<=0)return null;o.splice(a-1,0,l);break;case"bring-to-front":if(a>=s.length-1)return null;o.push(l);break;case"send-to-back":if(a<=0)return null;o.unshift(l);break}return the(s,o,t,i)}function nFe(t,e){const{entries:n}=ehe(t);if(n.length<2)return null;const r=new Map(n.map(a=>[a.element,a])),i=[];for(const a of e){const o=r.get(a);if(!o)return null;i.push(o)}if(i.length<2||!i.some(a=>a.element===t))return null;const s=ZL(i);return s.every((a,o)=>a.element===i[o].element)?null:the(s,i,t,n)}function rFe(t,e,n){if(e!=="bring-forward"&&e!=="send-backward")return null;const r=nhe(t,e);if(!r)return null;const{order:i,pos:s}=r,a=e==="bring-forward"?i[s+1]:i[s-1];return(a==null?void 0:a.element)??null}function iFe(t,e,n){return rhe(t,e)!==null}function sFe({expandedElementsRef:t}){const e=oS(),n=QL(),r=(e==null?void 0:e.previewIframeRef)??null,i=e==null?void 0:e.handleDomZIndexReorderCommit,s=(n==null?void 0:n.activeCompPath)??null,a=x.useCallback(u=>{var h;const f=((h=r==null?void 0:r.current)==null?void 0:h.contentDocument)??null;return f?Ts(f,{hfId:u.hfId,id:u.domId??u.id,selector:u.selector,selectorIndex:u.selectorIndex,sourceFile:u.sourceFile??s??"index.html"},s):null},[r,s]),o=x.useCallback(u=>{const f=a(u);return f?FE(f):Number.NaN},[a]),l=x.useCallback((u,f)=>{if(!i)return Promise.resolve();const h=u.flatMap(d=>{const y=t.current.find(v=>(v.key??v.id)===d.key),g=y&&a(y);return!y||!g?[]:[{element:g,zIndex:d.zIndex,id:y.domId??y.id,selector:y.selector,selectorIndex:y.selectorIndex,sourceFile:y.sourceFile??s??"index.html",key:d.key}]});return h.length?i(h,f).then(()=>{}):Promise.resolve()},[i,a,s,t]);return{readClipZIndex:o,applyStackingPatches:l,zSyncEnabled:!!(i&&r)}}function aFe({viewportWidth:t,effectiveDuration:e,zoomMode:n,manualZoomPercent:r,ppsRef:i,fitPpsRef:s,draggedClip:a,resizingClip:o,expandedElements:l,isDragging:c,scrollRef:u,lastScrollLeftRef:f,contentOrigin:h}){const d=AEe(t,e,h),y=W4e(d,n,r);i.current=y;const g=Math.max(0,e*y),v=a!=null&&a.started?(a.previewStart+a.element.duration)*y+Yz:0,b=o!=null&&o.started?(o.previewStart+o.previewDuration)*y+Yz:0,w=SEe({trackContentWidth:g,viewportWidth:t,contentOrigin:h,pps:y,dragGhostEndPx:v,resizeGhostEndPx:b}),O=y>0?w/y:e,C=x.useRef(n);C.current=n;const E=x.useRef(r);return E.current=r,s.current=d,x.useEffect(()=>{if(n!=="manual"||c.current)return;const M=u.current,N=f.current;if(!M||N<=0)return;const I=requestAnimationFrame(()=>{const _=Math.max(0,M.scrollWidth-M.clientWidth),j=Math.min(N,_);Math.abs(M.scrollLeft-j)>.5&&(M.scrollLeft=j)});return()=>cancelAnimationFrame(I)},[l,n]),x.useEffect(()=>{ue.getState().setTimelineScale(y,d)},[y,d]),{pps:y,fitPps:d,displayContentWidth:w,displayDuration:O,clipStateVersion:l,zoomModeRef:C,manualZoomPercentRef:E}}function oFe(t,e){for(const r of e)t.has(r)||e.delete(r);const n=[];for(const[r,i]of t)e.has(r)||i.some(Hle)&&n.push(r);return n}function lFe(t){var i;const e=ue(s=>s.expandClips),n=((i=QL())==null?void 0:i.projectId)??null,r=x.useRef({projectId:n,source:t,clips:new Set});x.useEffect(()=>{if(r.current.projectId!==n){const a=r.current.source!==t;if(r.current={projectId:n,source:t,clips:new Set},!a)return}else r.current.source=t;const s=oFe(t,r.current.clips);if(s.length!==0){for(const a of s)r.current.clips.add(a);e(s)}},[t,e,n])}const cFe=!0,uFe=Object.freeze({scrollLeft:0,scrollTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,isScrolling:!1});function fFe(t,e){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,isScrolling:e}}function hFe(t,e){const[n,r]=x.useState(uFe),[i,s]=x.useState(!0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(0),c=x.useRef(null),u=x.useRef(!1),f=x.useCallback((g,v=!1)=>{u.current=v;const b=()=>{l.current=0,r(fFe(g,u.current))};if(v)l.current||(l.current=requestAnimationFrame(b));else{l.current&&cancelAnimationFrame(l.current),b();return}c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,u.current=!1,l.current&&cancelAnimationFrame(l.current),b()},100)},[]),h=x.useCallback(()=>{const g=t.current;s(g?CEe(g.scrollHeight,g.clientHeight):!0)},[t]),d=x.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{o.current=0,h()})},[h]),y=x.useCallback(g=>{if(a.current&&(a.current.disconnect(),a.current=null),t.current=g,!g){c.current&&clearTimeout(c.current),c.current=null,u.current=!1;return}const v=()=>{f(g,u.current),d()};v(),a.current=new ResizeObserver(v),a.current.observe(g)},[t,d,f]);return Ar(()=>()=>{var g;(g=a.current)==null||g.disconnect(),o.current&&cancelAnimationFrame(o.current),l.current&&cancelAnimationFrame(l.current),c.current&&clearTimeout(c.current)}),x.useEffect(()=>{h()},[h,...e]),{viewport:n,showShortcutHint:i,setScrollRef:y,syncScrollViewport:f}}function dFe(t){const e=lE(),{onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onBlockedEditAttempt:a,onSplitElement:o}=t;return x.useMemo(()=>({...e,onMoveElement:n??e.onMoveElement,onMoveElements:r??e.onMoveElements,onResizeElement:i??e.onResizeElement,onResizeElements:s??e.onResizeElements,onBlockedEditAttempt:a??e.onBlockedEditAttempt,onSplitElement:o??e.onSplitElement}),[e,n,r,i,s,a,o])}const $E=.001,Sg=t=>t.key??t.id;function eA(t){return Math.max(0,...t.map(e=>e.expandedParentStart??0))}const ihe=t=>Math.round(t*1e3)/1e3,Y6=t=>t.start+t.duration;function BE(t){return[...t].sort((e,n)=>e.start-n.start||Sg(e).localeCompare(Sg(n)))}function h_(t,e,n=$E,r=0){const i=BE(t);if(i.some(c=>e>=c.start-n&&e<Y6(c)-n))return null;const a=i.filter(c=>c.start>e-n);if(a.length===0)return null;const o=a[0].start,l=Math.max(r,...i.filter(c=>c.start<=e-n).map(c=>Y6(c)));return o-l<=n?null:{gapStart:l,gapEnd:o,followingKeys:a.map(Sg)}}function she(t,e=$E,n=0){const r=[];let i=n;for(const s of BE(t))s.start-i>e&&r.push({start:i,end:s.start}),i=Math.max(i,Y6(s));return r}function ahe(t,e=$E,n=0){const r=[];let i=n;for(const s of BE(t)){const a=ihe(i);Math.abs(a-s.start)>e&&r.push({key:Sg(s),newStart:a}),i+=s.duration}return r}function pFe(t,e,n=$E,r=0){const i=she(t,n,r),s=Math.max(r,...t.map(Y6));return e-s>n&&i.push({start:s,end:e}),i}function ohe(t,e){const n=e.gapEnd-e.gapStart,r=new Set(e.followingKeys);return BE(t).filter(i=>r.has(Sg(i))).map(i=>({key:Sg(i),newStart:Math.max(e.gapStart,ihe(i.start-n))}))}const lhe=t=>t.key??t.id;let mFe=0;function d_(t,e){const n=new Map(t.map(r=>[lhe(r),r]));return e.every(r=>{const i=n.get(r.key);return i!=null&&WA(i).canMove})}function gFe(t,e){if(e.length===0||!d_(t,e))return null;const n=new Map(t.map(r=>[lhe(r),r]));return e.map(r=>{const i=n.get(r.key);return{element:i,updates:{start:r.newStart,track:i.track}}})}function che(t,e,n){const r=gFe(t,e);return r?(ad(r,n,`track-gap-close:${mFe++}`),!0):!1}function yFe(t,e,n){const r=h_(t,e,void 0,eA(t));return r?che(t,ohe(t,r),n):!1}function xFe(t,e){return che(t,ahe(t,void 0,eA(t)),e)}function bFe({tracks:t,expandedElementsRef:e,trackOrderRef:n,onMoveElement:r,onMoveElements:i}){const s=ue(w=>w.updateElement),a=ue(w=>w.timelineSessionEpoch),[o,l]=x.useState(null),[c,u]=x.useState(null),f=x.useMemo(()=>{var w;return(o==null?void 0:o.sessionEpoch)===a?((w=t.find(([O])=>O===o.track))==null?void 0:w[1])??[]:null},[o,a,t]),h=x.useMemo(()=>{if(!o||!f)return null;const w=eA(f),O=h_(f,o.time,void 0,w),C=ahe(f,void 0,w);return{x:o.x,y:o.y,gapWidth:O?O.gapEnd-O.gapStart:null,canCloseGap:O!=null&&d_(f,ohe(f,O)),hasAnyGaps:C.length>0,canCloseAllGaps:C.length>0&&d_(f,C)}},[o,f]),d=x.useMemo(()=>{if(!o||!f||!c)return null;const w=eA(f);if(c==="close-gap"){const C=h_(f,o.time,void 0,w);return C?{track:o.track,intervals:[{start:C.gapStart,end:C.gapEnd}]}:null}const O=she(f,void 0,w);return O.length>0?{track:o.track,intervals:O}:null},[o,f,c]),y=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ue.getState().timelineSessionEpoch||yFe(f,o.time,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),g=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ue.getState().timelineSessionEpoch||xFe(f,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),v=x.useCallback(w=>{u(null),l({...w,sessionEpoch:ue.getState().timelineSessionEpoch})},[]),b=x.useCallback(()=>{u(null),l(null)},[]);return x.useEffect(()=>{o&&o.sessionEpoch!==a&&b()},[b,o,a]),{gapMenuModel:h,gapHighlight:d,setHoveredGapAction:u,openGapMenu:v,dismissGapMenu:b,closeTrackGap:y,closeAllTrackGaps:g}}function vFe(t,e){return e.size===0||e.size===1&&e.has(t)}function AFe(t){var c;const{selectedElementId:e,selectedElementIds:n,expandedElements:r,tracks:i,gapHighlight:s}=t;if(!e||!vFe(e,n))return null;const a=r.find(u=>(u.key??u.id)===e);if(!a||a.track===(s==null?void 0:s.track))return null;const o=((c=i.find(([u])=>u===a.track))==null?void 0:c[1])??[],l=pFe(o,t.displayDuration,void 0,eA(o));return l.length>0?{track:a.track,intervals:l,kind:"selected"}:null}function SFe(t){if(t.dragActive)return[];const e=[];t.gapHighlight&&t.gapHighlight.intervals.length>0&&e.push({...t.gapHighlight,kind:"hover"});const n=AFe(t);return n&&e.push(n),e}function wFe(t){const{gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}=t;return x.useMemo(()=>SFe({gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}),[e,n,r,i,s,a,o])}function OFe({active:t,scrollRef:e,contentOrigin:n,pixelsPerSecond:r,onSplitAll:i}){const[s,a]=x.useState(null),o=x.useCallback(u=>{const f=e.current;if(!t||!f)return;const h=f.getBoundingClientRect();a(u.clientX-h.left+f.scrollLeft)},[t,e]),l=x.useCallback(()=>a(null),[]),c=x.useCallback(u=>{const f=e.current;if(!t||!u.shiftKey||u.button!==0||!f)return!1;const h=f.getBoundingClientRect(),d=sE({clientX:u.clientX,rectLeft:h.left,scrollLeft:f.scrollLeft,contentOrigin:n});return i==null||i(Math.max(0,d/r)),!0},[t,n,i,r,e]);return{razorGuideX:s,updateRazorGuide:o,clearRazorGuide:l,splitAllAtPointer:c}}function kFe({x:t}){return m.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none z-10",style:{left:t,width:1,background:"rgba(239,68,68,0.7)"}})}const CFe=400,EFe=6e4;function kX(t,e){if(t.length===0)return;const n=[...t].sort((i,s)=>i-s),r=Math.min(n.length-1,Math.ceil(n.length*e)-1);return Number(n[Math.max(0,r)].toFixed(2))}function TFe(t,e,n,r){const i=kX(n,.95);if(i===void 0)return null;const s=kX(r,.95);return{total_clip_count:e.totalClipCount,mounted_clip_count:t.querySelectorAll('[data-clip="true"]').length,total_row_count:e.totalRowCount,timeline_dom_node_count:t.querySelectorAll("*").length,viewport_width:t.clientWidth,viewport_height:t.clientHeight,zoom_mode:e.zoomMode,scroll_sample_count:n.length,scroll_frame_latency_p95_ms:i,scroll_frame_latency_max_ms:Number(Math.max(...n).toFixed(2)),...s===void 0?{}:{frame_interval_p95_ms:s}}}function CX(t){t.previousFrameAt=null,t.frameLatencies=[],t.frameIntervals=[]}function PFe(t){const e=x.useRef({frameRequest:0,idleTimer:null,pendingScrollStartedAt:0,previousFrameAt:null,frameLatencies:[],frameIntervals:[],lastEmittedAt:Number.NEGATIVE_INFINITY}),n=r=>{const i=e.current,s=performance.now();i.frameRequest===0&&(i.pendingScrollStartedAt=s,i.frameRequest=requestAnimationFrame(a=>{i.frameRequest=0,i.frameLatencies.push(performance.now()-i.pendingScrollStartedAt),i.previousFrameAt!==null&&i.frameIntervals.push(a-i.previousFrameAt),i.previousFrameAt=a})),i.idleTimer!==null&&clearTimeout(i.idleTimer),i.idleTimer=setTimeout(()=>{if(i.idleTimer=null,i.frameRequest!==0){cancelAnimationFrame(i.frameRequest),i.frameRequest=0,CX(i);return}const a=performance.now();if(a-i.lastEmittedAt>=EFe){const o=TFe(r,t,i.frameLatencies,i.frameIntervals);o&&(c8e(o),i.lastEmittedAt=a)}CX(i)},CFe)};return Ar(()=>()=>{const r=e.current;r.frameRequest!==0&&cancelAnimationFrame(r.frameRequest),r.idleTimer!==null&&clearTimeout(r.idleTimer)}),{recordTimelineScroll:n}}function MFe(t){return Array.from(t.values()).some(e=>e.some(Hle))}function NFe(t,e){const n=Number.isFinite(t)?t:0;if(e.length===0)return n;const r=Math.max(n,...e.map(i=>i.start+i.duration));return Number.isFinite(r)?r:n}function DFe(t,e){var i;const n=Hn(t),r=(i=e==null?void 0:e.groupPreview)==null?void 0:i.find(s=>s.key===n);return r?{...t,...r}:e&&Hn(e.element)===n?{...t,start:e.previewStart,duration:e.previewDuration,playbackStart:e.previewPlaybackStart}:t}function IFe(t,e,n,r){const i=x.useMemo(()=>t.find(o=>Hn(o)===e)??null,[t,e]),s=x.useRef(i);s.current=i;const a=x.useRef(s.current);x.useEffect(()=>{const o=a.current,l=s.current;a.current=l,o&&!l&&(n(!1),r())})}function _Fe(){const[t,e]=x.useState(!1);return Ar(()=>{const n=i=>i.key==="Shift"&&e(i.type==="keydown"),r=()=>e(!1);return window.addEventListener("keydown",n),window.addEventListener("keyup",n),window.addEventListener("blur",r),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",n),window.removeEventListener("blur",r)}}),t}function RFe(t,e,n,r){const i=n==="frame"?Md:void 0;return{...x.useMemo(()=>D3e(t,e,i,r),[t,i,e,r]),majorTickInterval:nae(t,e,i)}}const nM=1024*1024,jFe=1440*60*1e3,Xo=Object.freeze({directScrollSafetyPx:8e6,rowOverscanPerSide:2,timeOverscanViewportRatio:.25,maxMountedRows:64,maxMountedClipRoots:512,maxMountedClipRootsPerRow:128,maxMountedTimelineDescendants:5e3,posterMaxPhysicalWidth:240,posterMaxPhysicalHeight:135,posterDprCap:1.5,richPreviewFrameCount:6,concurrentVideoDecodes:2,concurrentMetadataJobs:4,concurrentCompositionFetches:2,concurrentServerPages:1,thumbnailLoadTimeoutMs:3e4,thumbnailCacheBytes:64*nM,thumbnailCacheEntries:256,thumbnailCacheEntriesPerProject:96,metadataRegistryEntries:512,metadataFailureTtlMs:3e4,waveformCacheBytes:16*nM,waveformCacheEntries:256,compositionDiskCacheBytes:512*nM,compositionDiskCacheMaxAgeMs:14*jFe,interactionP95Ms:50,frameIntervalP95Ms:33.3,constrainedInteractionP95Ms:75,constrainedFrameIntervalP95Ms:75,longTaskLimitMs:50,constrainedLongTaskLimitMs:300,memoryReturnToleranceRatio:.15,posterColdP95Ms:750,posterCachedP95Ms:250,constrainedPosterColdP95Ms:1200,constrainedPosterCachedP95Ms:400,posterCoverageRatio:.9,posterCoverageSettleMs:1500,constrainedPosterCoverageSettleMs:2500,richPreviewP95Ms:750,constrainedRichPreviewP95Ms:1200,supportedFixtureFallbackRatio:.02,scrollSamplesPerRun:21,warmupRuns:3,measuredRuns:5,requiredPassingRuns:4});function LFe(t,e,n,r){if(!(e>0)||!(r>0)||!(t.clientWidth>0))return{start:0,end:0};const i=t.clientWidth*Xo.timeOverscanViewportRatio,s=t.scrollLeft-n-i,a=t.scrollLeft+t.clientWidth-n+i;return{start:Math.min(r,Math.max(0,s/e)),end:Math.min(r,Math.max(0,a/e))}}function FFe(t,e,n,r){if(!(e>0)||!(r>0))return{start:0,end:0};const i=Math.max(0,(t.scrollLeft-n)/e),s=Math.min(r,Math.max(i,(t.scrollLeft+t.clientWidth-n)/e));return{start:Math.min(i,r),end:s}}function $Fe(t,e,n){const r=t.getRowPositionFromY(n+Ia);if(r.row<0||r.row>=t.rowKeys.length)return n;const i=t.rowKeys[r.row];if(i===void 0)return n;const s=e.getRowIndex(i);return s<0?n:Math.max(0,n+e.getRowTop(s)-t.getRowTop(r.row))}function BFe({tracks:t,viewport:e,pixelsPerSecond:n,contentOrigin:r,duration:i,selectedElementId:s,draggedElementId:a,resizingElementIds:o,focusedElementId:l,focusedEaseElementId:c,clipContextMenuElementId:u,keyframeContextMenuElementId:f}){const h=x.useMemo(()=>YEe(t),[t]),d=x.useMemo(()=>LFe(e,n,r,i),[r,i,n,e]),y=x.useMemo(()=>FFe(e,n,r,i),[r,i,n,e]),g=x.useMemo(()=>new Set([s,a,...o??[],l,c,u,f].filter(v=>v!==void 0)),[u,a,c,l,f,o,s]);return{clipIndex:h,renderTimeRange:d,visibleTimeRange:y,pinnedClipIdentities:g}}function VFe(){var e;const t=(e=zLe())==null?void 0:e.setRefreshKey;return x.useCallback(()=>t==null?void 0:t(n=>n+1),[t])}const Q8=12;function EX(t,e,n,r,i){const s=t+n+Q8,a=t+e-Q8,o=a-s;return o<=0||r>=s&&i<=a?null:i-r>o||r<s?Math.max(0,r-n-Q8):Math.max(0,i-e+Q8)}function HFe(t){return{left:t.allowHorizontal?EX(t.scrollLeft,t.viewportWidth,t.stickyLeft,t.clipLeft,t.clipRight):null,top:EX(t.scrollTop,t.viewportHeight,t.stickyTop,t.clipTop,t.clipBottom)}}function TX(t,e,n){return t!==null&&t.projectId===e&&t.sessionEpoch===n}function QFe(t,e){const n=t.querySelector(`[data-timeline-focus-id=${CSS.escape(e)}]`);return n?n.ownerDocument.activeElement===n?!0:(n.setAttribute("data-reveal-highlight","true"),n.focus({preventScroll:!0}),n.ownerDocument.activeElement!==n?(n.removeAttribute("data-reveal-highlight"),!1):(n.addEventListener("blur",()=>n.removeAttribute("data-reveal-highlight"),{once:!0}),!0)):!1}function ZFe(t,e,n,r,i,s,a){const o=r.getRowIndex(e.row.physicalTrackKey);if(o<0)return!1;const l=e.target.kind==="row"?e.row.elementId:e.target.elementId,c=l?n.find(g=>(g.key??g.id)===l):void 0,u=e.target.kind==="row"?null:e.target.time,f=c&&e.target.kind==="clip"?c.start:u,h=c&&e.target.kind==="clip"?c.start+c.duration:u,d=r.getRowTop(o),y=HFe({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,viewportWidth:t.clientWidth,viewportHeight:t.clientHeight,clipLeft:s+(f??0)*i,clipRight:s+(h??0)*i,clipTop:d+ca,clipBottom:d+r.getRowHeight(o)-ca,stickyLeft:s,stickyTop:Ia,allowHorizontal:a&&f!==null});return y.left!==null&&(t.scrollLeft=y.left),y.top!==null&&(t.scrollTop=y.top),y.left!==null||y.top!==null}function zFe({scrollRef:t,logicalRows:e,elements:n,rowGeometry:r,pixelsPerSecond:i,contentOrigin:s,allowHorizontal:a,viewportVersion:o,projectId:l,sessionEpoch:c,syncScrollViewport:u}){const f=ue(b=>b.timelineFocus),h=x.useRef(e),d=x.useRef(null),y=x.useRef(null),g=x.useMemo(()=>{var b;if(TX(f,l,c)){((b=d.current)==null?void 0:b.nonce)!==f.nonce&&(d.current={nonce:f.nonce,id:f.id});const w=d.current.id;let O=vl(e,w);if(!O){const C=Wje(h.current,e,w);C&&(d.current={nonce:f.nonce,id:C.id},O=vl(e,C.id))}return O?{target:O.target,row:O.row}:null}return d.current=null,null},[e,l,f,c]);x.useLayoutEffect(()=>{h.current=e},[e]),x.useEffect(()=>{var w;if(!TX(f,l,c))return;if(!g){ue.getState().clearTimelineFocus(f.nonce);return}if(g.target.id!==f.id){ue.getState().requestTimelineFocus(g.target.id);return}if(((w=y.current)==null?void 0:w.nonce)===f.nonce&&y.current.id===g.target.id)return;const b=t.current;b&&(ZFe(b,g,n,r,i,s,a)&&u(b),QFe(b,g.target.id)&&(y.current={nonce:f.nonce,id:g.target.id}))},[a,s,n,i,l,f,g,r,t,c,u,o]);const v=g?g.target.kind==="row"?g.row.elementId??void 0:g.target.elementId:void 0;return{focusedTargetId:(g==null?void 0:g.target.id)??null,focusedRowKey:g==null?void 0:g.row.physicalTrackKey,pinnedElementId:v}}function GFe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,expandedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){return x.useMemo(()=>Gje({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,expandedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}),[e,s,a,o,l,c,u,n,r,i,t])}function PX(t,e){if(!e)return null;const n=o0(t).byKey.get(e);return n?{elementId:e,rowKey:n.track}:null}function UFe(t,e,n){const r=new Array(t);return new Proxy(r,{get(i,s,a){if(typeof s=="string"){const o=s.charCodeAt(0);if(o>=48&&o<=57){const l=+s;if(Number.isInteger(l)&&l>=0&&l<t){let c=i[l];if(!c){const u=e[l*2];c=i[l]={index:l,key:n(l),start:u,size:e[l*2+1],end:u+e[l*2+1],lane:0}}return c}}if(s==="length")return t}return Reflect.get(i,s,a)}})}function jm(t,e,n){let r=n.initialDeps??[],i,s=!0;function a(){const o=t();return(o.length!==r.length||o.some((c,u)=>r[u]!==c))&&(r=o,i=e(...o),n!=null&&n.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1),i}return a.updateDeps=o=>{r=o},a}function MX(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const XFe=(t,e)=>Math.abs(t-e)<1.01,WFe=(t,e,n)=>{let r;return function(...i){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,i),n)}};let $x;const rM=()=>{if($x!==void 0)return $x;if(typeof navigator>"u")return $x=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return $x=!0;const t=navigator.maxTouchPoints;return $x=navigator.platform==="MacIntel"&&t!==void 0&&t>0},NX=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},YFe=t=>t,uhe=t=>{const e=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1)-e+1,i=new Array(r);for(let s=0;s<r;s++)i[s]=e+s;return i},qFe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const i=a=>{const{width:o,height:l}=a;e({width:Math.round(o),height:Math.round(l)})};if(i(NX(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(NX(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},q6={passive:!0},KFe=typeof window>"u"?!0:"onscrollend"in window,JFe=(t,e,n)=>{const r=t.scrollElement;if(!r)return;const i=t.targetWindow;if(!i)return;const s=t.options.useScrollendEvent&&KFe;let a=0;const o=s?null:WFe(i,()=>e(a,!1),t.options.isScrollingResetDelay),l=f=>()=>{a=n(r),o==null||o(),e(a,f)},c=l(!0),u=l(!1);return r.addEventListener("scroll",c,q6),s&&r.addEventListener("scrollend",u,q6),()=>{r.removeEventListener("scroll",c),s&&r.removeEventListener("scrollend",u)}},e$e=(t,e)=>JFe(t,e,n=>{const{horizontal:r,isRtl:i}=t.options;return r?n.scrollLeft*(i&&-1||1):n.scrollTop}),t$e=(t,e,n)=>{if(n.options.useCachedMeasurements){const r=n.indexFromElement(t),i=n.options.getItemKey(r);return n.itemSizeCache.get(i)??n.options.estimateSize(r)}if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}if(!e){const r=n.indexFromElement(t),i=n.options.getItemKey(r),s=n.itemSizeCache.get(i);if(s!==void 0)return s}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},n$e=(t,{adjustments:e=0,behavior:n},r)=>{var i,s;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:t+e,behavior:n})},r$e=n$e;class i$e{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,r,i;return((i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const a=()=>{const o=s.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[c,u]of this.elementsCache)if(u===o){this.elementsCache.delete(c);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,s,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{var r,i;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:YFe,rangeExtractor:uhe,onChange:()=>{},measureElement:t$e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in n){const d=n[h];d!==void 0&&(s[h]=d)}const a=this.options;let o=null,l=null,c=!1;if(a!==void 0&&a.enabled&&s.enabled&&s.anchorTo==="end"&&this.scrollElement!==null){const h=a.count,d=s.count,y=this.getMeasurements(),g=h>0?((r=y[0])==null?void 0:r.key)??a.getItemKey(0):null,v=h>0?((i=y[h-1])==null?void 0:i.key)??a.getItemKey(h-1):null;if(d!==h||h>0&&d>0&&(s.getItemKey(0)!==g||s.getItemKey(d-1)!==v)){c=!0;const O=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??y[0]:null;O&&(o=[O.key,this.getScrollOffset()-O.start]);const C=s.followOnAppend===!0?"auto":s.followOnAppend||null;C&&d>h&&this.isAtEnd(a.scrollEndThreshold)&&(h===0||s.getItemKey(d-1)!==v)&&(l=C)}}this.options=s,c&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,f=0;if(o&&this.scrollOffset!==null){const[h,d]=o,y=this.getMeasurements(),{count:g,getItemKey:v}=this.options;let b=0;for(;b<g&&v(b)!==h;)b++;if(b<g){const w=y[b];if(w){const O=w.start+d;O!==this.scrollOffset&&(f=O-this.scrollOffset,this.scrollOffset=O,u=!0)}}}(u||l)&&(this.pendingScrollAnchor=[u?o[0]:null,u?o[1]:0,l,f])},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=jm(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{if(a&&this._intendedScrollOffset===null&&s===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(s-this._intendedScrollOffset)<1.5&&(s=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===s?this.scrollDirection:o<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const s=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!rM()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};s.addEventListener("touchstart",a,q6),s.addEventListener("touchend",o,q6),this.unsubs.push(()=>{s.removeEventListener("touchstart",a),s.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[s,a,o,l]=i;s!==null&&!o&&(rM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)return;const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=jm(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,r,i,s,a,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c}),{key:!1}),this.getMeasurements=jm(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c},u)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),o===1){const b=n*2;let w=this._flatMeasurements;if(!w||w.length<b){const E=new Float64Array(b);w&&h>0&&E.set(w.subarray(0,h*2)),w=E,this._flatMeasurements=w}let O;if(h===0)O=r+i;else{const E=h-1;O=w[E*2]+w[E*2+1]+c}for(let E=h;E<n;E++){const M=s(E),N=f.get(M),I=typeof N=="number"?N:this.options.estimateSize(E);w[E*2]=O,w[E*2+1]=I,O+=I+c}const C=UFe(n,w,s);return this.measurementsCache=C,C}const d=this.measurementsCache.slice(0,h),y=new Array(o).fill(void 0),g=new Float64Array(o);let v=0;for(let b=0;b<h;b++){const w=d[b];w&&(y[w.lane]===void 0&&v++,y[w.lane]=b,g[w.lane]=w.end)}for(let b=h;b<n;b++){const w=s(b),O=this.laneAssignments.get(b);let C,E;const M=l==="estimate"||f.has(w);if(O!==void 0&&this.options.lanes>1){C=O;const j=y[C],L=j!==void 0?d[j]:void 0;E=L?L.end+c:r+i}else if(v===o){let j=0,L=g[0],V=y[0];for(let $=1;$<o;$++){const Z=g[$];(Z<L||Z===L&&y[$]<V)&&(j=$,L=Z,V=y[$])}C=j,E=L+c,M&&this.laneAssignments.set(b,C)}else C=b%this.options.lanes,E=r+i,M&&this.laneAssignments.set(b,C);const N=f.get(w),I=typeof N=="number"?N:this.options.estimateSize(b),_=E+I;d[b]={index:b,start:E,size:I,end:_,key:w,lane:C},y[C]===void 0&&v++,y[C]=b,g[C]=_}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=jm(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>n.length===0||r===0?(this.range=null,null):(this.range=a$e(n,r,i,s,s===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=jm(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,s,a)=>s===null||a===null?[]:n({startIndex:s,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(i!==void 0&&this.range){const s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-s),o=Math.min(this.options.count-1,i+s);return n>=a&&n<=o}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(n),i=this.options.getItemKey(r),s=this.elementsCache.get(i);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(i,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var i,s;if(n<0||n>=this.options.count)return;let a,o,l;const c=this._flatMeasurements;if(this.options.lanes===1&&c!==null)l=this.options.getItemKey(n),o=c[n*2],a=c[n*2+1];else{const h=this.measurementsCache[n];if(!h)return;l=h.key,o=h.start,a=h.size}const u=this.itemSizeCache.get(l)??a,f=r-u;if(f!==0){const h=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=h?this.getTotalSize():0,y=((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:l,start:o,size:a,end:o+a,lane:0},f,this):o<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(l)||this.scrollDirection!=="backward"));(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(l,r),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-d):y&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=jm(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,a=n.length;s<a;s++){const o=n[s],l=r[o];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const i=this._flatMeasurements,s=this.options.lanes===1&&i!=null,a=fhe(0,r.length-1,s?o=>i[o*2]:o=>MX(r[o]).start,n);return MX(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+s?"end":"start"),r==="center"?n+=(i-s)/2:r==="end"&&(n-=s);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getSize(),s=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(r==="auto")if(a.end>=s+i-this.options.scrollPaddingEnd)r="end";else if(a.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:i="auto"}={})=>{const s=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:i,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:i="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getOffsetForIndex(n,r);if(!s)return;const[a,o]=s,l=this.now();this.scrollState={index:n,align:o,behavior:i,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const i=this.getScrollOffset()+n,s=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:s,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const s=r.length-1,a=this._flatMeasurements;a!=null?i=a[s*2]+a[s*2+1]:i=((n=r[s])==null?void 0:n.end)??0}else{const s=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&s.some(o=>o===null);){const o=r[a];s[o.lane]===null&&(s[o.lane]=o.end),a--}i=Math.max(...s.filter(o=>o!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const r=this.getMeasurements();for(const i of r)i&&this.itemSizeCache.has(i.key)&&n.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return n},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,n){e!==0&&(rM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=r?r[0]:this.scrollState.lastTargetOffset,s=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&XFe(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=s){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(i-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=i,c||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const fhe=(t,e,n,r)=>{for(;t<=e;){const i=(t+e)/2|0,s=n(i);if(s<r)t=i+1;else if(s>r)e=i-1;else return i}return t>0?t-1:0};function s$e(t,e,n){let r=0;for(;r<=e;){const i=(r+e)/2|0,s=t[i*2];if(s<n)r=i+1;else if(s>n)e=i-1;else return i}return r>0?r-1:0}function a$e(t,e,n,r,i){const s=t.length-1;if(t.length<=r)return{startIndex:0,endIndex:s};if(r===1&&i!==null){const c=s$e(i,s,n);let u=c;const f=n+e;for(;u<s&&i[u*2]+i[u*2+1]<f;)u++;return{startIndex:c,endIndex:u}}let o=fhe(0,s,c=>t[c].start,n),l=o;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<s&&c.some(f=>f<n+e);){const f=t[l];c[f.lane]=f.end,l++}const u=Array(r).fill(n+e);for(;o>=0&&u.some(f=>f>=n);){const f=t[o];u[f.lane]=f.start,o--}o=Math.max(0,o-o%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const iM=typeof document<"u"?x.useLayoutEffect:x.useEffect;function o$e({useFlushSync:t=!0,directDomUpdates:e=!1,directDomUpdatesMode:n="transform",...r}){const i=x.useReducer(c=>c+1,0)[1],s=x.useRef({enabled:e,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=e,s.current.mode=n;const a=c=>{const u=s.current;if(!u.enabled||!u.container)return;const f=c.getTotalSize();if(f!==u.lastSize){u.lastSize=f;const b=c.options.horizontal?"width":"height";u.container.style[b]=`${f}px`}const h=!!c.options.horizontal,d=u.mode==="transform",y=h?"left":"top",g=c.options.scrollMargin,v=c.getVirtualItems();for(const b of v){const w=b.start-g,O=c.elementsCache.get(b.key);O&&u.lastPositions.get(O)!==w&&(u.lastPositions.set(O,w),d?O.style.transform=h?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:O.style[y]=`${w}px`)}},o={...r,onChange:(c,u)=>{var f;const h=s.current;let d=!0;if(h.enabled){a(c);const y=c.range,g=h.prevRange;d=!g||g.isScrolling!==c.isScrolling||g.startIndex!==(y==null?void 0:y.startIndex)||g.endIndex!==(y==null?void 0:y.endIndex),d&&(h.prevRange=y?{startIndex:y.startIndex,endIndex:y.endIndex,isScrolling:c.isScrolling}:null)}d&&(t&&u?_l.flushSync(i):i()),(f=r.onChange)==null||f.call(r,c,u)}},[l]=x.useState(()=>{const c=new i$e(o);return Object.assign(c,{containerRef:u=>{const f=s.current;if(f.container=u,f.lastSize=null,u&&f.enabled){const h=c.getTotalSize();f.lastSize=h;const d=c.options.horizontal?"width":"height";u.style[d]=`${h}px`}}})});return l.setOptions(o),iM(()=>l._didMount(),[]),iM(()=>l._willUpdate()),iM(()=>{a(l)}),l}function l$e(t){return o$e({observeElementRect:qFe,observeElementOffset:e$e,scrollToFn:r$e,...t})}function c$e(t,e){const n=new Set(uhe(t));for(const r of e)r>=0&&r<t.count&&n.add(r);return[...n].sort((r,i)=>r-i)}function u$e(t,e){const n=Math.min(t,Xo.rowOverscanPerSide*2+1),r=new Set(Array.from({length:n},(i,s)=>s));for(const i of e)i>=0&&i<t&&r.add(i);return[...r].sort((i,s)=>i-s)}function f$e({enabled:t,scrollRef:e,viewport:n,rowGeometry:r,sessionEpoch:i,pinnedRowKeys:s,focusedRowKey:a}){const o=n.clientWidth>0&&n.clientHeight>0,l=x.useMemo(()=>[...new Set([...s,...a===void 0?[]:[a]].map(b=>r.getRowIndex(b)))],[a,s,r]),c=x.useCallback(b=>r.getRowHeight(b),[r]),u=x.useCallback(b=>r.rowKeys[b]??b,[r]),f=x.useCallback(b=>c$e(b,l),[l]),h=x.useCallback(()=>n.scrollTop,[n.scrollTop]),d=l$e({enabled:o,useFlushSync:!1,count:r.rowKeys.length,getScrollElement:()=>e.current,estimateSize:c,getItemKey:u,overscan:Xo.rowOverscanPerSide,rangeExtractor:f,scrollMargin:Ia+zp,initialRect:{width:n.clientWidth,height:n.clientHeight},initialOffset:h});x.useEffect(()=>{var b;o&&(d.measure(),(b=e.current)==null||b.dispatchEvent(new Event("scroll")))},[t,e,i,o,d]);const y=a===void 0?-1:r.getRowIndex(a),g=y<0?0:r.getRowHeight(y);x.useEffect(()=>{o&&y>=0&&d.resizeItem(y,g)},[t,g,y,i,o,d]);const v=x.useMemo(()=>null,[t,r]);return v||(o?d.getVirtualItems().map(({index:b})=>({index:b,rowKey:r.rowKeys[b]??b})):u$e(r.rowKeys.length,l).map(b=>({index:b,rowKey:r.rowKeys[b]??b})))}function DX(t){var r;if(!(t instanceof Element))return;const e=(r=t.closest("[data-timeline-row-key]"))==null?void 0:r.dataset.timelineRowKey;if(e===void 0)return;const n=Number(e);return Number.isFinite(n)?n:void 0}function h$e({scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,elements:i,selectedElementId:s,focusedRowKey:a,draggedRowKey:o,resizingElementIds:l,clipContextMenuRowKey:c,keyframeContextMenuRowKey:u,lastScrollLeftRef:f,syncScrollViewport:h}){const d=cFe,[y,g]=x.useState(),v=x.useCallback(I=>{g(DX(I.target))},[]),b=x.useCallback(I=>{g(DX(I.relatedTarget))},[]),w=x.useMemo(()=>PX(i,s),[i,s]),O=x.useMemo(()=>(l==null?void 0:l.map(I=>{var _;return(_=PX(i,I))==null?void 0:_.rowKey}).filter(I=>I!==void 0))??[],[i,l]),C=x.useMemo(()=>[o,...O,w==null?void 0:w.rowKey,a,c,u].filter(I=>I!==void 0),[c,o,a,u,O,w]),E=f$e({enabled:d,scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,pinnedRowKeys:C,focusedRowKey:y??a}),M=x.useRef(n),N=x.useRef(r);return x.useLayoutEffect(()=>{const I=t.current,_=M.current;if(N.current!==r)N.current=r,f.current=0,I&&(I.scrollLeft=0,I.scrollTop=0,h(I));else if(I&&_!==n){const j=$Fe(_,n,I.scrollTop);j!==I.scrollTop&&(I.scrollTop=j,h(I))}M.current=n},[f,n,t,r,h]),{enabled:d,virtualRows:E,timelineFocusProps:{onFocus:v,onBlur:b}}}function d$e(t){const e=ue(l=>l.expandedClipIds),n=ue(l=>l.expandedGroupIds),r=ue(l=>l.expandedLaneOwnerIds),i=ue(l=>l.timelineProjectId),s=GFe({tracks:t.tracks,displayTrackOrder:t.layout.displayTrackOrder,laneCounts:t.laneCounts,selectedElementId:t.selectedElementId,selectedElementIds:t.selectedElementIds,expandedClipIds:e,expandedGroupIds:n,expandedLaneOwnerIds:r,groups:t.groups,trackGroupOf:t.trackGroupOf,gsapAnimations:t.gsapAnimations}),a=zFe({scrollRef:t.scrollRef,logicalRows:s,elements:t.elements,rowGeometry:t.layout.rowGeometry,pixelsPerSecond:t.pixelsPerSecond,contentOrigin:t.contentOrigin,allowHorizontal:t.allowHorizontal,viewportVersion:t.viewport,projectId:i,sessionEpoch:t.sessionEpoch,syncScrollViewport:t.syncScrollViewport}),o=h$e({scrollRef:t.scrollRef,viewport:t.viewport,rowGeometry:t.layout.rowGeometry,sessionEpoch:t.sessionEpoch,elements:t.elements,selectedElementId:t.selectedElementId,focusedRowKey:a.focusedRowKey,draggedRowKey:t.draggedRowKey,resizingElementIds:t.resizingElementIds,clipContextMenuRowKey:t.clipContextMenuRowKey,keyframeContextMenuRowKey:t.keyframeContextMenuRowKey,lastScrollLeftRef:t.lastScrollLeftRef,syncScrollViewport:t.syncScrollViewport});return{logicalRows:s,...a,rowVirtualizationActive:o.enabled,virtualRows:o.virtualRows,timelineFocusProps:o.timelineFocusProps}}const p$e=x.memo(function({onSeek:e,onDrillDown:n,renderClipContent:r,renderClipOverlay:i,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l,onDeleteElement:c,onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:d,onBlockedEditAttempt:y,onSplitElement:g,onSelectElement:v,theme:b,sessionEpoch:w=0}={}){var ot;const{onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onBlockedEditAttempt:N,onSplitElement:I,onRazorSplitAll:_,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:V,onMoveKeyframe:$}=dFe({onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:d,onBlockedEditAttempt:y,onSplitElement:g}),Z=x.useMemo(()=>({...JR,...b}),[b]),W=VFe();Ike();const Y=ue(Mt=>Mt.elements),J=GA(),ne=Dke(),ie=ue(Mt=>Mt.duration),le=ue(Mt=>Mt.timeDisplayMode),q=ue(Mt=>Mt.timelineReady),F=ue(Mt=>Mt.selectedElementId),U=ue(Mt=>Mt.selectedElementIds),z=ue(Mt=>Mt.focusedEaseSegment),K=ue(Mt=>Mt.gsapAnimations),te=x.useMemo(()=>MFe(K),[K]),ee=te?nf+I2:I2+mEe,H=te?I2:0,Q=ue(Mt=>Mt.setSelectedElementId),oe=ue(Mt=>Mt.currentTime),{zoomMode:fe,manualZoomPercent:pe,setZoomMode:be,setManualZoomPercent:me}=Yse(),Ae=x.useRef(null),De=x.useRef(null),Se=x.useRef(null),ye=ue(Mt=>Mt.activeTool),[we,ke]=x.useState(null),Pe=x.useRef(!1),Ve=_Fe(),[Ke,ze]=x.useState(!1),[Ye,pt]=x.useState(null),[st,St]=x.useState(null),$e=x.useCallback(Mt=>{De.current=Mt},[]),qe=x.useRef(0),tt=x.useMemo(()=>NFe(ie,Y),[ie,Y]),Gt=ue(Mt=>Mt.keyframeCache);lFe(K);const{tracks:Dt,trackStyles:We,trackOrder:wt,trackOrderRef:ut,laneCounts:dt,rowGeometry:cn,rowGeometryRef:nn,groups:rn,trackGroupOf:zt}=k9e(J,K,F,U),Ne=x.useRef(J);Ne.current=J;const Me=x.useRef(100),Ze=x.useRef(tt);Ze.current=tt;const nt=x.useRef(100),{pinZoomBeforeEdit:Wt,setRangeSelectionRef:mn,pinnedOnMoveElement:Pn,pinnedOnMoveElements:qt,pinnedOnResizeElement:hr,pinnedOnResizeElements:gt,pinnedOnFileDrop:hn,pinnedOnAssetDrop:gn,pinnedOnBlockDrop:Zn,pinnedOnCompositionDrop:un}=ZLe({ppsRef:Me,fitPpsRef:nt,onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l}),{readClipZIndex:yt,applyStackingPatches:$t,zSyncEnabled:_t}=sFe({expandedElementsRef:Ne}),{gapMenuModel:ln,gapHighlight:yn,setHoveredGapAction:kn,openGapMenu:dn,dismissGapMenu:Sr,closeTrackGap:mr,closeAllTrackGaps:wr}=bFe({tracks:Dt,expandedElementsRef:Ne,trackOrderRef:ut,onMoveElement:Pn,onMoveElements:qt}),{draggedClip:xt,setDraggedClip:Wn,resizingClip:Mn,setResizingClip:Rn,blockedClipRef:On,suppressClickRef:rt}=ILe({scrollRef:Se,ppsRef:Me,durationRef:Ze,trackOrderRef:ut,rowGeometryRef:nn,onMoveElement:Pn,onMoveElements:qt,onResizeElement:hr,onResizeElements:gt,onBlockedEditAttempt:N,setShowPopover:ze,setRangeSelectionRef:mn,readZIndex:_t?yt:void 0,onStackingPatches:_t?$t:void 0,refreshAfterLaneMove:W,sessionEpoch:w}),Ot=C3e({scrollRef:Se,ppsRef:Me,durationRef:Ze,trackOrderRef:ut,rowGeometryRef:nn,contentOrigin:ee,onFileDrop:hn,onAssetDrop:gn,onBlockDrop:Zn,onCompositionDrop:un,sessionEpoch:w}),Vt=T9e(xt,wt,cn),kt=((ot=Mn==null?void 0:Mn.groupPreview)==null?void 0:ot.map(Mt=>Mt.key))??(Mn?[Hn(Mn.element)]:void 0),{recordTimelineScroll:Lt}=PFe({totalClipCount:J.length,totalRowCount:Vt.displayTrackOrder.length,zoomMode:fe}),{viewport:bt,showShortcutHint:Pt,setScrollRef:or,syncScrollViewport:er}=hFe(Se,[q,J.length,Vt.totalH]),{pps:ai,fitPps:Nn,displayContentWidth:yi,displayDuration:Yn,zoomModeRef:xi,manualZoomPercentRef:Ms}=aFe({viewportWidth:bt.clientWidth,effectiveDuration:tt,zoomMode:fe,manualZoomPercent:pe,ppsRef:Me,fitPpsRef:nt,draggedClip:xt,resizingClip:Mn,expandedElements:J,isDragging:Pe,scrollRef:Se,lastScrollLeftRef:qe,contentOrigin:ee}),os=d$e({scrollRef:Se,tracks:Dt,layout:Vt,laneCounts:dt,selectedElementId:F,selectedElementIds:U,groups:rn,trackGroupOf:zt,gsapAnimations:K,elements:J,pixelsPerSecond:ai,contentOrigin:ee,allowHorizontal:fe==="manual",viewport:bt,sessionEpoch:w,draggedRowKey:xt!=null&&xt.started?xt.previewTrack:void 0,resizingElementIds:kt,clipContextMenuRowKey:st==null?void 0:st.element.track,keyframeContextMenuRowKey:Ye==null?void 0:Ye.element.track,lastScrollLeftRef:qe,syncScrollViewport:er}),Ys=ue(Mt=>Mt.selectedKeyframes),qs=ue(Mt=>Mt.toggleSelectedKeyframe),{onClickKeyframe:Ks,onSelectSegment:ei,onShiftClickKeyframe:Lr,onContextMenuKeyframe:va}=X5e({expandedElements:J,keyframeCache:Gt,onSelectElement:v,onSeek:e,setSelectedElementId:Q,setKfContextMenu:pt,toggleSelectedKeyframe:qs}),{clipIndex:ft,renderTimeRange:xe,visibleTimeRange:_e,pinnedClipIdentities:at}=BFe({tracks:Dt,viewport:bt,pixelsPerSecond:ai,contentOrigin:ee,duration:Yn,selectedElementId:F??void 0,draggedElementId:xt?Hn(xt.element):void 0,resizingElementIds:kt,focusedElementId:os.pinnedElementId,focusedEaseElementId:z==null?void 0:z.elementId,clipContextMenuElementId:st?Hn(st.element):void 0,keyframeContextMenuElementId:Ye?Hn(Ye.element):void 0});Lje({scrollRef:Se,currentTime:oe,clipStateVersion:xe,elementStateVersion:J});const At=wFe({gapHighlight:yn,tracks:Dt,selectedElementId:F,selectedElementIds:U,expandedElements:J,dragActive:(xt==null?void 0:xt.started)===!0||Mn!=null,displayDuration:Yn}),{seekFromX:Jt,autoScrollDuringDrag:En,dragScrollRaf:Fr}=h3e({playheadRef:Ae,scrollRef:Se,ppsRef:Me,durationRef:Ze,isDragging:Pe,currentTime:oe,zoomMode:fe,zoomModeRef:xi,manualZoomPercentRef:Ms,fitPps:Nn,fitPpsRef:nt,effectiveDuration:tt,pps:ai,timelineReady:q,elementsLength:J.length,setZoomMode:be,setManualZoomPercent:me,onSeek:e,contentOrigin:ee}),{razorGuideX:ir,updateRazorGuide:bi,clearRazorGuide:ls,splitAllAtPointer:Ql}=OFe({active:ye==="razor",scrollRef:Se,contentOrigin:ee,pixelsPerSecond:ai,onSplitAll:_}),{rangeSelection:$r,setRangeSelection:ys,shiftClickClipRef:Nc,marqueeRect:Eu,isScrubbing:Aa,handlePointerDown:Sa,handlePointerMove:Dc,handlePointerUp:Tu,handlePointerCancel:Zl}=f3e({scrollRef:Se,ppsRef:Me,effectiveDuration:tt,pps:ai,onSeek:e,seekFromX:Jt,autoScrollDuringDrag:En,dragScrollRaf:Fr,isDragging:Pe,setShowPopover:ze,elementsRef:Ne,clipIndex:ft,rowGeometryRef:nn,onSelectElement:v,contentOrigin:ee,sessionEpoch:w});mn.current=ys,IFe(J,F,ze,()=>ys(null));const{major:zl,minor:Ns,majorTickInterval:Pu}=RFe(Yn,ai,le,os.rowVirtualizationActive?xe:void 0),Br=x.useCallback(Mt=>DFe(Mt,Mn),[Mn]);return!q||J.length===0?m.jsx(E3e,{isDragOver:Ot.isDragOver,onFileDrop:!!s,onDragOver:Ot.handleAssetDragOver,onDragLeave:Ot.handleAssetDragLeave,onDrop:Ot.handleAssetDrop}):m.jsxs("div",{ref:$e,"aria-label":"Timeline","data-timeline-element-count":J.length,className:`relative border-t select-none h-full overflow-hidden ${Ot.isDragOver?"ring-1 ring-inset ring-studio-accent/60":""} ${ye==="razor"||Ve?"cursor-crosshair":"cursor-default"}`,onMouseMove:bi,onMouseLeave:ls,style:{touchAction:"pan-x pan-y",background:Z.shellBackground,borderColor:Z.shellBorder},children:[m.jsxs("div",{ref:or,"data-timeline-scroll-viewport":!0,"data-timeline-auto-scroll-left-inset":te?nf:0,tabIndex:-1,className:`${fe==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full outline-none`,onScroll:Mt=>{qe.current=Mt.currentTarget.scrollLeft,Lt(Mt.currentTarget),er(Mt.currentTarget,!0)},...os.timelineFocusProps,onDragOver:Ot.handleAssetDragOver,onDragLeave:Ot.handleAssetDragLeave,onDrop:Ot.handleAssetDrop,onPointerDown:Mt=>{Mt.target instanceof Element&&Mt.target.closest("button, input, select, a")||Ql(Mt)||Sa(Mt)},onPointerMove:Dc,onPointerUp:Tu,onPointerCancel:Zl,onLostPointerCapture:Zl,children:[m.jsx(mLe,{major:zl,minor:Ns,pps:ai,contentOrigin:ee,contentGutter:H,trackContentWidth:yi,totalH:Vt.totalH,effectiveDuration:tt,majorTickInterval:Pu,rangeSelection:$r,marqueeRect:Eu,laneGapStrips:At,theme:Z,displayTrackOrder:Vt.displayTrackOrder,rowHeights:Vt.displayRowHeights,rowGeometry:Vt.rowGeometry,virtualRows:os.virtualRows,logicalRows:os.logicalRows,focusedTargetId:os.focusedTargetId,rowsVirtualized:os.rowVirtualizationActive,clipIndex:ft,renderTimeRange:xe,visibleTimeRange:_e,pinnedClipIdentities:at,trackOrder:wt,tracks:Dt,trackStyles:We,groups:rn,laneCounts:dt,selectedElementId:F,selectedElementIds:U,hoveredClip:we,draggedClip:xt,resizingClip:Mn,isScrubbing:Aa,blockedClipRef:On,suppressClickRef:rt,scrollRef:Se,renderClipContent:os.rowVirtualizationActive&&bt.isScrolling?void 0:r,renderClipOverlay:i,playheadRef:Ae,onDrillDown:n,onSelectElement:v,setHoveredClip:ke,setShowPopover:ze,setRangeSelection:ys,setResizingClip:Rn,setDraggedClip:Wn,setSelectedElementId:Q,shiftClickClipRef:Nc,getPreviewElement:Br,getTrackStyle:Vue,keyframeCache:Gt,gsapAnimations:K,selectedKeyframes:Ys,currentTime:oe,onSeek:e,beatAnalysis:ne,onSelectSegment:ei,onClickKeyframe:Ks,onShiftClickKeyframe:Lr,onMoveKeyframe:$,onContextMenuKeyframe:va,onContextMenuClip:(Mt,cs)=>{Mt.preventDefault(),Q(cs.key??cs.id),v==null||v(cs),Sr(),St({x:Mt.clientX,y:Mt.clientY,element:cs,sessionEpoch:ue.getState().timelineSessionEpoch})},onContextMenuLane:(Mt,cs,rh)=>{xt!=null&&xt.started||Mn||(St(null),dn({x:Mt.clientX,y:Mt.clientY,track:cs,time:rh}))}}),ye==="razor"&&ir!==null&&m.jsx(kFe,{x:ir})]}),m.jsx(QLe,{elements:J,elementsRef:Ne,theme:Z,showShortcutHint:Pt,showPopover:Ke,rangeSelection:$r,setShowPopover:ze,setRangeSelection:ys,kfContextMenu:Ye,setKfContextMenu:pt,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:V,clipContextMenu:st,setClipContextMenu:St,currentTime:oe,onSplitElement:I,pinZoomBeforeEdit:Wt,onDeleteElement:c,gapContextMenu:ln,onDismissGapContextMenu:Sr,onCloseTrackGap:mr,onCloseAllTrackGaps:wr,onHoverGapAction:kn})]})}),m$e={overscan:0,visible:1,interaction:2},IX=Object.freeze({status:"idle"});function g$e(t){return t==="video"?"video":t==="composition"?"composition":"general"}function y$e(t){return t instanceof Error?t:new Error(String(t))}function pS(t){return Object.entries(t).filter(e=>e[1]!==void 0).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(n))}`).join("&")}function p_(t){return pS({project:t.projectId,session:t.sessionEpoch,request:t.key,kind:t.kind,rich:t.rich?1:0})}class x$e{constructor(e=Xo,n=Date.now){Ct(this,"entries",new Map);Ct(this,"budgets");Ct(this,"nextLeaseId",1);Ct(this,"nextSequence",1);Ct(this,"scrolling",!1);Ct(this,"cacheBytes",0);Ct(this,"waveformCacheBytes",0);Ct(this,"activeByBucket",{video:0,composition:0,general:0});Ct(this,"activeByKind",{video:0,image:0,composition:0,waveform:0});Ct(this,"now");this.budgets=e,this.now=n}acquire(e,n){const r=p_(e);let i=this.entries.get(r);(i==null?void 0:i.state)==="error"&&i.failedAt!==void 0&&this.now()-i.failedAt>=this.budgets.metadataFailureTtlMs&&(this.deleteEntry(r,i),i=this.entries.get(r)),i||(i={request:e,scopedKey:r,state:"queued",leases:new Map,listeners:new Map,controller:null,weight:0,disposed:!1,cached:!1,lastAccess:this.nextSequence++,snapshot:Object.freeze({status:"queued"})},this.entries.set(r,i));const s=this.nextLeaseId++;i.leases.set(s,e.priority),i.listeners.set(s,n),i.lastAccess=this.nextSequence++,this.pump();let a=!1;return{updatePriority:o=>{const l=this.entries.get(r);!l||!l.leases.has(s)||(l.leases.set(s,o),l.lastAccess=this.nextSequence++,this.pump())},release:()=>{var l;if(a)return;a=!0;const o=this.entries.get(r);o&&(o.leases.delete(s),o.listeners.delete(s),o.leases.size===0&&(o.state==="queued"?this.deleteEntry(r,o):o.state==="loading"?((l=o.controller)==null||l.abort(),this.deleteEntry(r,o)):o.state==="ready"&&!o.cached&&this.deleteEntry(r,o)),this.evict())}}}getSnapshot(e){const n=this.entries.get(p_(e));return n?n.snapshot:IX}setScrolling(e){this.scrolling!==e&&(this.scrolling=e,e||this.pump())}invalidateProject(e){var n;for(const[r,i]of this.entries)i.request.projectId===e&&(i.leases.size>0||((n=i.controller)==null||n.abort(),this.deleteEntry(r,i)))}getDiagnostics(){let e=0,n=0,r=0,i=0,s=0;for(const a of this.entries.values())a.state==="queued"&&e++,a.state==="loading"&&n++,a.cached&&(a.request.kind==="waveform"?s++:i++),r+=a.leases.size;return{queued:e,active:n,leases:r,cacheEntries:i,cacheBytes:this.cacheBytes,waveformCacheEntries:s,waveformCacheBytes:this.waveformCacheBytes,activeByKind:{...this.activeByKind}}}pump(){const e=Array.from(this.entries.values()).filter(n=>n.state==="queued"&&n.leases.size>0).sort((n,r)=>this.entryPriority(r)-this.entryPriority(n)||n.lastAccess-r.lastAccess);for(const n of e){if(this.scrolling&&n.request.rich)continue;const r=g$e(n.request.kind);this.activeByBucket[r]>=this.bucketLimit(r)||this.start(n,r)}}start(e,n){e.state="loading",e.snapshot=Object.freeze({status:"loading"});const r=new AbortController;e.controller=r,this.activeByBucket[n]++,this.activeByKind[e.request.kind]++,this.notify(e),this.loadWithTimeout(e,r).then(s=>this.acceptResult(e,r,s)).catch(s=>{if(this.entries.get(e.scopedKey)===e){if(r.signal.aborted&&e.leases.size===0){this.deleteEntry(e.scopedKey,e);return}e.state="error",e.error=y$e(s),e.failedAt=this.now(),e.snapshot=Object.freeze({status:"error",error:e.error}),this.notify(e),this.evictFailures()}}).finally(()=>{e.controller===r&&(e.controller=null),this.activeByBucket[n]--,this.activeByKind[e.request.kind]--,this.pump()})}acceptResult(e,n,r){if(n.signal.aborted||this.entries.get(e.scopedKey)!==e){this.safeDispose(r.dispose);return}this.validateResult(r),e.state="ready",e.value=r.value,e.weight=r.weight,e.dispose=r.dispose,this.cacheResult(e),e.snapshot=Object.freeze({status:"ready",value:r.value}),this.notify(e),this.evict(),!e.cached&&e.leases.size===0&&this.deleteEntry(e.scopedKey,e)}validateResult(e){if(!(Number.isFinite(e.weight)&&e.weight>=0))throw this.safeDispose(e.dispose),new RangeError("Thumbnail result weight must be finite and non-negative")}cacheResult(e){const n=e.request.kind==="waveform",r=n?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes;e.cached=e.weight<=r,e.cached&&(n?this.waveformCacheBytes+=e.weight:this.cacheBytes+=e.weight)}entryPriority(e){let n=-1;for(const r of e.leases.values())n=Math.max(n,m$e[r]);return n}bucketLimit(e){return e==="video"?this.budgets.concurrentVideoDecodes:e==="composition"?this.budgets.concurrentCompositionFetches:this.budgets.concurrentMetadataJobs}evict(){this.evictPartition(!1),this.evictPartition(!0)}evictPartition(e){const n=Array.from(this.entries.values()).filter(s=>s.cached&&s.request.kind==="waveform"===e),r=new Map;for(const s of n)r.set(s.request.projectId,(r.get(s.request.projectId)??0)+1);n.sort((s,a)=>s.lastAccess-a.lastAccess);let i=n.length;for(const s of n){const a=r.get(s.request.projectId)??0;this.isCacheOverBudget(e,i,a)&&(this.uncache(s),i--,r.set(s.request.projectId,a-1),s.leases.size===0&&this.deleteEntry(s.scopedKey,s))}}isCacheOverBudget(e,n,r){const i=e?this.budgets.waveformCacheEntries:this.budgets.thumbnailCacheEntries,s=e?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes,a=e?this.waveformCacheBytes:this.cacheBytes,o=!e&&r>this.budgets.thumbnailCacheEntriesPerProject;return n>i||a>s||o}uncache(e){e.cached=!1,e.request.kind==="waveform"?this.waveformCacheBytes-=e.weight:this.cacheBytes-=e.weight}notify(e){for(const n of new Set(e.listeners.values()))n()}loadWithTimeout(e,n){let r;try{r=e.request.load(n.signal)}catch(i){r=Promise.reject(i)}return new Promise((i,s)=>{let a=!1;const o=setTimeout(()=>{a||(a=!0,n.abort(),s(new Error(`Thumbnail load timed out after ${this.budgets.thumbnailLoadTimeoutMs}ms`)))},this.budgets.thumbnailLoadTimeoutMs);r.then(l=>{if(a){this.safeDispose(l.dispose);return}a=!0,clearTimeout(o),i(l)},l=>{a||(a=!0,clearTimeout(o),s(l))})})}deleteEntry(e,n){this.entries.get(e)===n&&(this.entries.delete(e),n.snapshot=IX,this.notify(n),n.cached&&(n.cached=!1,n.request.kind==="waveform"?this.waveformCacheBytes-=n.weight:this.cacheBytes-=n.weight),n.disposed||(n.disposed=!0,this.safeDispose(n.dispose)),n.listeners.clear(),n.leases.clear())}evictFailures(){const e=Array.from(this.entries.values()).filter(r=>r.state==="error"&&r.leases.size===0).sort((r,i)=>r.lastAccess-i.lastAccess),n=e.length-this.budgets.thumbnailCacheEntries;for(const r of e.slice(0,Math.max(0,n)))this.deleteEntry(r.scopedKey,r)}safeDispose(e){try{e==null||e()}catch{}}}const b$e=new x$e,_X=Object.freeze({status:"idle"});function VE(t,e=b$e){const n=x.useRef(t);n.current=t;const r=x.useRef(null),i=t?p_(t):null,s=t==null?void 0:t.priority,a=x.useCallback(l=>{const c=n.current;if(!c||i===null)return()=>{};const u=e.acquire(c,l);return r.current=u,()=>{r.current===u&&(r.current=null),u.release()}},[i,e]),o=x.useCallback(()=>{const l=n.current;return l&&i!==null?e.getSnapshot(l):_X},[i,e]);return x.useLayoutEffect(()=>{var l;s&&((l=r.current)==null||l.updatePriority(s))},[s]),x.useSyncExternalStore(a,o,()=>_X)}function v$e(t,e,n){const r=Math.max(0,Number.isFinite(t)?t:0),i=Math.max(0,Number.isFinite(e)?e:0),s=Math.max(1,Number.isFinite(n)?Math.floor(n):1);return s===1?[r+i/2]:Array.from({length:s},(a,o)=>r+i*o/(s-1))}async function A$e(t){return t instanceof HTMLCanvasElement?new Promise((e,n)=>{t.toBlob(r=>r?e(r):n(new Error("Video thumbnail encode failed")),"image/jpeg",.72)}):t.convertToBlob({type:"image/jpeg",quality:.72})}function y1(t){if(t.aborted)throw new DOMException("Aborted","AbortError")}function hhe(t){for(const e of t.urls.splice(0))URL.revokeObjectURL(e);for(const e of t.canvases)e.width=0,e.height=0;t.canvases.clear()}function S$e(t,e){const n=Math.max(1,Math.min(e.posterMaxPhysicalWidth,Math.round(e.posterMaxPhysicalHeight*t)));return{width:n,height:Math.max(1,Math.min(e.posterMaxPhysicalHeight,Math.round(n/t)))}}async function w$e(t,e,n,r){for await(const i of t.canvasesAtTimestamps(e)){if(y1(n),!i)continue;r.canvases.add(i.canvas);const s=await A$e(i.canvas);y1(n),r.urls.push(URL.createObjectURL(s))}}function O$e(t,e,n,r){const i=t.urls[0];if(!i)throw new Error("Video source returned no thumbnail frames");return{value:t.urls.length===1?{kind:"image",url:i,aspect:e}:{kind:"filmstrip",urls:[...t.urls],aspect:e},weight:n*r*4*t.urls.length,dispose:()=>hhe(t)}}async function k$e(t,e,n=Xo){const r=await BA(()=>import("./index-BIdEpMGS.js"),[]);y1(e);const i=new r.Input({source:new r.UrlSource(t.source),formats:r.ALL_FORMATS}),s={urls:[],canvases:new Set};try{const a=await i.getPrimaryVideoTrack();if(y1(e),!a)throw new Error("Video source has no decodable video track");const[o,l]=await Promise.all([a.getDisplayWidth(),a.getDisplayHeight()]);if(y1(e),!(o>0&&l>0))throw new Error("Video source has invalid dimensions");const c=await a.getDurationFromMetadata({skipLiveWait:!0});y1(e);const u=Math.max(0,c??t.sourceRangeDuration??0),f=Math.min(Math.max(0,t.sourceStart??0),u),h=t.sourceRangeDuration??Math.max(0,u-f),d=Math.min(Math.max(0,h),Math.max(0,u-f)),y=v$e(f,d,Math.min(t.frameCount,n.richPreviewFrameCount)),g=o/l,v=S$e(g,n),b=new r.CanvasSink(a,{width:v.width,height:v.height,fit:t.fit??"cover",poolSize:1});return await w$e(b,y,e,s),O$e(s,g,v.width,v.height)}catch(a){throw hhe(s),a}finally{i.dispose()}}const dhe=66;function phe(t,e,n=!1){return new Promise((r,i)=>{const s=new Image,a=()=>{s.onload=null,s.onerror=null,e.removeEventListener("abort",o)},o=()=>{a(),s.src="",i(new DOMException("Aborted","AbortError"))};if(e.aborted){o();return}s.onload=()=>{a(),r(s.naturalWidth>0&&s.naturalHeight>0?s.naturalWidth/s.naturalHeight:16/9)},s.onerror=()=>{a(),n&&/\.svg($|\?)/i.test(t)?r(16/9):i(new Error("Image thumbnail failed to load"))},e.addEventListener("abort",o,{once:!0}),s.src=t})}function zL(t,e,n=dhe,r=1){const i=Number.isFinite(e)&&e>0?e:1.7777777777777777,s=Math.max(r,Math.round(n*i)),a=t>0?Math.max(1,Math.ceil(t/s)):1;return{frameW:s,frameCount:a}}function tA(t){return t.split("/").map(encodeURIComponent).join("/")}function ly(t,e,n){if(!t||/^(?:data:|blob:)/i.test(t))return t;let r=t,i="";if(/^https?:/i.test(t)){let s;try{s=new URL(t)}catch{return t}if(!n||s.origin!==n)return t;const a=new URL(`/api/projects/${e}/preview/`,n).pathname;if(s.pathname.startsWith(a)||s.pathname.startsWith("/api/"))return t;try{r=s.pathname.replace(/^\/+/,"").split("/").map(decodeURIComponent).join("/")}catch{return t}i=`${s.search}${s.hash}`}return`/api/projects/${e}/preview/${tA(r.replace(/^\/+/,""))}${i}`}const C$e=x.memo(function({videoSrc:e,label:n,labelColor:r,duration:i=5,sourceStart:s,sourceRangeDuration:a,projectId:o=e,sessionEpoch:l=0,priority:c="visible",rich:u=!1}){const[f,h]=x.useState(0),d=x.useRef(null),y=x.useMemo(()=>({key:pS({kind:"video",source:e,start:s,duration:a??i,frames:u?6:1}),projectId:o,sessionEpoch:l,kind:"video",priority:c,rich:u,load:M=>k$e({source:e,sourceStart:s,sourceRangeDuration:a??i,frameCount:u?6:1,fit:"cover"},M)}),[i,c,o,u,l,a,s,e]),g=VE(y),v=g.status==="ready"?g.value:null,b=(v==null?void 0:v.kind)==="filmstrip"?v.urls:(v==null?void 0:v.kind)==="image"?[v.url]:[],w=(v==null?void 0:v.kind)==="image"||(v==null?void 0:v.kind)==="filmstrip"?v.aspect:16/9,{frameW:O,frameCount:C}=zL(f,w,dhe),E=x.useCallback(M=>{var I;if((I=d.current)==null||I.disconnect(),!M)return;const N=M.parentElement??M;h(N.clientWidth),d.current=new ResizeObserver(([_])=>h(_.contentRect.width)),d.current.observe(N)},[]);return Ar(()=>()=>{var M;return(M=d.current)==null?void 0:M.disconnect()}),m.jsxs("div",{ref:E,className:"absolute inset-0 overflow-hidden",children:[b.length>0&&m.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:C},(M,N)=>{const I=b[N%b.length];return m.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden bg-neutral-900",style:{width:O},children:m.jsx("img",{src:I,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover"})},N)})}),g.status==="loading"&&b.length===0&&m.jsx("div",{className:"absolute inset-0 animate-pulse motion-reduce:animate-none",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%)"}}),g.status==="error"&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-neutral-900/60",children:m.jsx("span",{className:"rounded bg-black/50 px-1 text-[8px] text-neutral-500",children:"no preview"})}),n&&m.jsx("div",{className:"absolute inset-x-0 bottom-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:m.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:n})})]})}),E$e=66,T$e="v3";function GL({previewUrl:t,seekTime:e=2,duration:n=5,selector:r,selectorIndex:i,origin:s,output:a}){const o=t.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),l=new URL(o,s);return l.searchParams.set("t",(e+n/2).toFixed(2)),l.searchParams.set("v",T$e),a&&l.searchParams.set("output",a),r&&(l.searchParams.set("selector",r),i!=null&&i>0&&l.searchParams.set("selectorIndex",String(i))),l.toString()}async function P$e(t,e){const n=await fetch(t,{signal:e});if(!n.ok)throw new Error(`Composition thumbnail failed (${n.status})`);const r=await n.blob();if(e.aborted)throw new DOMException("Aborted","AbortError");const i=URL.createObjectURL(r);try{const s=await phe(i,e);return{value:{kind:"image",url:i,aspect:s},weight:Xo.posterMaxPhysicalWidth*Xo.posterMaxPhysicalHeight*4,dispose:()=>URL.revokeObjectURL(i)}}catch(s){throw URL.revokeObjectURL(i),s}}const sM=x.memo(function({previewUrl:e,label:n,labelColor:r,selector:i,selectorIndex:s,seekTime:a=2,duration:o=5,projectId:l=e,sessionEpoch:c=0,priority:u="visible"}){const[f,h]=x.useState(0),d=x.useRef(null),y=GL({previewUrl:e,seekTime:a,duration:o,selector:i,selectorIndex:s,origin:window.location.origin}),g=x.useMemo(()=>({key:pS({kind:"composition",url:y}),projectId:l,sessionEpoch:c,kind:"composition",priority:u,rich:!0,load:E=>P$e(y,E)}),[u,l,c,y]),v=VE(g),b=v.status==="ready"&&v.value.kind==="image"?v.value:null,{frameW:w,frameCount:O}=zL(f,(b==null?void 0:b.aspect)??16/9,E$e,48),C=x.useCallback(E=>{var N;if((N=d.current)==null||N.disconnect(),!E)return;const M=E.parentElement??E;h(M.clientWidth),d.current=new ResizeObserver(([I])=>h(I.contentRect.width)),d.current.observe(M)},[]);return Ar(()=>()=>{var E;return(E=d.current)==null?void 0:E.disconnect()}),m.jsxs("div",{ref:C,className:"absolute inset-0 overflow-hidden",children:[b&&m.jsx("div",{className:"absolute inset-0 flex",style:{animation:"hf-thumb-fade 200ms ease-out",mixBlendMode:"lighten"},children:Array.from({length:O},(E,M)=>m.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:w},children:m.jsx("img",{src:b.url,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover",style:{opacity:.7}})},M))}),v.status==="loading"&&m.jsx("div",{className:"absolute inset-0 animate-pulse bg-white/[0.035]"}),n&&m.jsx("div",{className:"absolute inset-y-0 left-3 z-10 flex items-center",children:m.jsx("span",{className:"block max-w-full truncate text-[10px] font-semibold leading-none",style:{color:r,textShadow:b?"0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6)":"none"},children:n})})]})});let RX=0;const M$e=800,jX={isEditMode:!1,dismissed:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null,syncError:null,retrySave:null,past:[],future:[]};let H2=null,aM=0;function $c(t,e){if(!t.model)return{};const n=Date.now();return H2===e&&n-aM<M$e?(aM=n,{future:[]}):(H2=e,aM=n,{past:[...t.past,t.model].slice(-50),future:[]})}const An=ZC((t,e)=>({...jX,setEditMode:n=>t({isEditMode:n}),setDismissed:n=>t({dismissed:n}),setModel:n=>t({model:n}),setSourceFilePath:n=>t({sourceFilePath:n}),setSyncError:n=>t({syncError:n}),setRetrySave:n=>t({retrySave:n}),undo:()=>{const{model:n,past:r,future:i}=e(),s=r[r.length-1];return!s||!n?null:(H2=null,t({model:s,past:r.slice(0,-1),future:[...i,n]}),s)},redo:()=>{const{model:n,past:r,future:i}=e(),s=i[i.length-1];return!s||!n?null:(H2=null,t({model:s,past:[...r,n].slice(-50),future:i.slice(0,-1)}),s)},selectSegment:(n,r=!1)=>t(i=>{if(r){const s=new Set(i.selectedSegmentIds);return s.has(n)?s.delete(n):s.add(n),{selectedSegmentIds:s,selectedGroupId:null}}return{selectedSegmentIds:new Set([n]),selectedGroupId:null}}),selectGroup:n=>{var i;const r=(i=e().model)==null?void 0:i.groups.get(n);r&&t({selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:n})},selectAll:()=>t(n=>n.model?{selectedSegmentIds:new Set(n.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>{const{selectedSegmentIds:n,selectedGroupId:r}=e();n.size===0&&r===null||t({selectedSegmentIds:new Set,selectedGroupId:null})},updateSegmentStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,style:{...s.style,...r}}),{...$c(i,`seg-style:${n}`),model:{...i.model,segments:a}}}),updateSegmentText:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,text:r}),{...$c(i,`seg-text:${n}`),model:{...i.model,segments:a}}}),updateSegmentTiming:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.segments.get(n);if(!a)return{};const o=new Map(s.model.segments);return o.set(n,{...a,start:r,end:i}),{...$c(s,`seg-timing:${n}`),model:{...s.model,segments:o}}}),updateGroupStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,style:{...s.style,...r}}),{...$c(i,`group-style:${n}`),model:{...i.model,groups:a}}}),updateGroupContainer:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,containerStyle:{...s.containerStyle,...r}}),{...$c(i,`group-container:${n}`),model:{...i.model,groups:a}}}),updateGroupAnimation:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.groups.get(n);if(!a)return{};const o=new Map(s.model.groups),l=a.animation[r],c=l!==null?{...l,...i}:i;return o.set(n,{...a,animation:{...a.animation,[r]:c}}),{...$c(s,`group-anim:${n}:${r}`),model:{...s.model,groups:o}}}),splitGroup:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=s.segmentIds.indexOf(r);if(a<=0)return{};const o=s.segmentIds.slice(0,a),l=s.segmentIds.slice(a),c=`group-split-${RX++}`,u=new Map(i.model.groups);u.set(n,{...s,segmentIds:o}),u.set(c,{...s,id:c,segmentIds:l});const f=i.model.groupOrder.indexOf(n),h=[...i.model.groupOrder];h.splice(f+1,0,c);const d=new Map(i.model.segments);return l.forEach((y,g)=>{const v=d.get(y);v&&d.set(y,{...v,groupIndex:g})}),{...$c(i,`split:${n}:${r}:${RX}`),model:{...i.model,groups:u,segments:d,groupOrder:h}}}),mergeGroups:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n),a=i.model.groups.get(r);if(!s||!a)return{};const o=[...s.segmentIds,...a.segmentIds],l=new Map(i.model.groups);l.set(n,{...s,segmentIds:o}),l.delete(r);const c=i.model.groupOrder.filter(h=>h!==r),u=new Map(i.model.segments);a.segmentIds.forEach((h,d)=>{const y=u.get(h);y&&u.set(h,{...y,groupIndex:s.segmentIds.length+d})});const f=i.selectedGroupId===r?null:i.selectedGroupId;return{...$c(i,`merge:${n}:${r}`),model:{...i.model,groups:l,segments:u,groupOrder:c},selectedGroupId:f}}),updateSelectedStyle:n=>t(r=>{if(!r.model||r.selectedSegmentIds.size===0)return{};const i=new Map(r.model.segments);for(const s of r.selectedSegmentIds){const a=i.get(s);a&&i.set(s,{...a,style:{...a.style,...n}})}return{...$c(r,`sel-style:${[...r.selectedSegmentIds].join(",")}`),model:{...r.model,segments:i}}}),applyAnimationToAll:n=>t(r=>{if(!r.model)return{};const i=new Map(r.model.groups);for(const[s,a]of i)i.set(s,{...a,animation:n});return{...$c(r,"apply-anim-all"),model:{...r.model,groups:i}}}),reset:()=>{H2=null,t(n=>({...jX,retrySave:n.retrySave,selectedSegmentIds:new Set,past:[],future:[]}))}})),N$e=new Set(["ArrowLeft","ArrowRight"]),D$e=["button","a[href]","[role='button']","[role='checkbox']","[role='combobox']","[role='menuitem']","[role='radio']","[role='slider']","[role='spinbutton']","[role='switch']","[role='textbox']"].join(",");function I$e(t){if(_f(t))return!0;if(!t||typeof t!="object")return!1;const e=t;return typeof e.closest!="function"?!1:e.closest.call(t,D$e)!==null}function _$e(t,e={isCaptionEditMode:!1,selectedCaptionSegmentCount:0}){return t.metaKey||t.ctrlKey||t.altKey||I$e(t.target)?!0:N$e.has(t.code)&&e.isCaptionEditMode&&e.selectedCaptionSegmentCount>0}const LX=[1,2,4];let m_=0;function R$e(){m_+=1;let t=!1;return()=>{t||(t=!0,m_-=1)}}function j$e(){return m_>0}function L$e({iframeRef:t,shuttleDirectionRef:e,shuttleSpeedIndexRef:n,iframeShortcutCleanupRef:r,getAdapter:i,play:s,playBackward:a,pause:o,seek:l}){const c=x.useRef(new Set),u=x.useRef(()=>{}),f=x.useRef(()=>{}),h=x.useCallback(w=>{const O=i(),C=(O==null?void 0:O.getTime())??ue.getState().currentTime;l(Q4e(C,w,Md))},[i,l]),d=x.useCallback(w=>{e.current===w?n.current=Math.min(n.current+1,LX.length-1):n.current=0;const O=LX[n.current];ue.getState().setPlaybackRate(O),w==="forward"?s():a(O)},[s,a,e,n]),y=x.useCallback(()=>{ue.getState().isPlaying?o():s()},[s,o]),g=x.useCallback(w=>{var M,N,I;if(w.defaultPrevented)return;const O=An.getState();if(_$e(w,{isCaptionEditMode:O.isEditMode,selectedCaptionSegmentCount:O.selectedSegmentIds.size}))return;const C=w.key.toLowerCase();if(c.current.add(C),w.code==="Space"){w.preventDefault(),y();return}if(!((w.code==="ArrowLeft"||w.code==="ArrowRight")&&j$e())){if(w.code==="ArrowLeft"){w.preventDefault(),h(w.shiftKey?-10:-1);return}if(w.code==="ArrowRight"){w.preventDefault(),h(w.shiftKey?10:1);return}if(!w.repeat){if(C==="m"){w.preventDefault();const _=ue.getState();_.setAudioMuted(!_.audioMuted);return}if(C==="l"&&w.shiftKey){w.preventDefault();const _=ue.getState();_.setLoopEnabled(!_.loopEnabled);return}if(C==="k"){w.preventDefault(),o();return}if(C==="j"){if(w.preventDefault(),c.current.has("k")){h(-1);return}d("backward");return}if(C==="l"){if(w.preventDefault(),c.current.has("k")){h(1);return}d("forward");return}if(C==="i"){w.preventDefault();const _=((M=i())==null?void 0:M.getTime())??ue.getState().currentTime;ue.getState().setInPoint(w.shiftKey?null:_);return}if(C==="o"){w.preventDefault();const _=((N=i())==null?void 0:N.getTime())??ue.getState().currentTime;ue.getState().setOutPoint(w.shiftKey?null:_);return}if(C==="a"){w.preventDefault(),l(ue.getState().inPoint??0,{keepPlaying:!0});return}if(C==="e"){w.preventDefault();const{outPoint:_}=ue.getState();l(_??((I=i())==null?void 0:I.getDuration())??ue.getState().duration,{keepPlaying:!0});return}}}},[o,d,h,y,i,l]),v=x.useCallback(w=>{c.current.delete(w.key.toLowerCase())},[]);u.current=g,f.current=v;const b=x.useCallback(()=>{var M,N,I;(M=r.current)==null||M.call(r),r.current=null;let w=null,O=null;try{w=((N=t.current)==null?void 0:N.contentWindow)??null,O=((I=t.current)==null?void 0:I.contentDocument)??null}catch{return}if(!w&&!O)return;const C=_=>u.current(_),E=_=>f.current(_);try{w==null||w.addEventListener("keydown",C,!0),w==null||w.addEventListener("keyup",E,!0)}catch{}O==null||O.addEventListener("keydown",C,!0),O==null||O.addEventListener("keyup",E,!0),r.current=()=>{try{w==null||w.removeEventListener("keydown",C,!0),w==null||w.removeEventListener("keyup",E,!0)}catch{}O==null||O.removeEventListener("keydown",C,!0),O==null||O.removeEventListener("keyup",E,!0)}},[t,r]);return{playbackKeyDownRef:u,playbackKeyUpRef:f,attachIframeShortcutListeners:b,togglePlay:y}}function FX(t){t&&t.style.visibility==="hidden"&&(t.style.visibility="")}function F$e(t){const e=t.pendingSeek??t.requestedSeek??t.storeCurrentTime;return!Number.isFinite(e)||e<=0?0:!Number.isFinite(t.duration)||t.duration<=0?e:Math.min(e,t.duration)}function $X(t){return Number.isFinite(t)&&t>0&&t<7200?t:0}function $$e(t){return Math.max($X(t.manifestDurationSeconds),$X(t.authoredRootDurationSeconds))}function B$e({iframeRef:t,probeIntervalRef:e,pendingSeekRef:n,isRefreshingRef:r,getAdapter:i,syncTimelineElements:s,setDuration:a,setCurrentTime:o,setTimelineReady:l,setIsPlaying:c,attachIframeShortcutListeners:u,applyPreviewAudioState:f}){const h=x.useCallback(w=>{var $,Z;if(!w.clips||w.clips.length===0)return;ue.getState().setClipManifest(w.clips);const O=new Set(w.clips.map(W=>W.compositionId).filter(Boolean)),C=w.clips.filter(W=>!W.parentCompositionId||!O.has(W.parentCompositionId));let E=null;try{E=(($=t.current)==null?void 0:$.contentDocument)??null}catch{E=null}try{const W=(Z=t.current)==null?void 0:Z.contentWindow,Y=W==null?void 0:W.__clipTree,J=new Map;if(Y){const ie=le=>{for(const q of le)q.id&&q.parentId&&J.set(q.id,q.parentId),q.children.length>0&&ie(q.children)};ie(Y.roots)}const ne=[];if(E)for(const ie of w.clips){if(ie.kind!=="composition"||!ie.id)continue;const le=E.getElementById(ie.id);if(!le)continue;const q=ie.id,F=le.querySelector("[data-hf-inner-root]")??le,U=(z,K)=>{for(const te of Array.from(z.children)){if(!te.id){U(te,K);continue}const ee=te.hasAttribute("data-hf-group");ne.push({id:te.id,parentId:K,hostId:q,label:ee&&te.getAttribute("data-hf-group")||te.id,stackingContextId:WR(te)}),J.set(te.id,K),ee&&U(te,te.id)}};U(F,q)}ue.getState().setClipParentMap(J),ue.getState().setDomClipChildren(ne)}catch{}const M=new Set,N=C.map((W,Y)=>{const J=E?Q6e(E,W,Y,M):null;return J&&M.add(J),Ese({clip:W,fallbackIndex:Y,doc:E,hostEl:J})}),I=w.durationInFrames/yCe(w),_=$$e({manifestDurationSeconds:I,authoredRootDurationSeconds:sse(E)}),j=_>0?_:ue.getState().duration,L=j>0?N.filter(W=>W.start<j).map(W=>({...W,duration:Math.min(W.duration,j-W.start)})).filter(W=>W.duration>0):N,V=E&&j>0?[...L,...Tse(E,j,L)]:L;V.length>0&&s(V,_>0?_:void 0)},[t,s]),d=x.useCallback(()=>{try{const w=t.current,O=w==null?void 0:w.contentDocument,C=w==null?void 0:w.contentWindow;if(!O||!C)return;const E=ue.getState().elements,M=ue.getState().duration,{missing:N,updatedEls:I,patched:_}=ICe(O,C,E,M);if(N.length>0||_){const j=new Set(I.map(V=>V.id)),L=N.filter(V=>!j.has(V.id));s([...I,...L])}}catch{}},[t,s]),y=x.useCallback(()=>{const w=i();if(!w||w.getDuration()<=0)return!1;w.pause();const O=ue.getState().requestedSeekTime,C=F$e({pendingSeek:n.current,requestedSeek:O,storeCurrentTime:ue.getState().currentTime,duration:w.getDuration()});n.current=null,O!=null&&ue.getState().clearSeekRequest();const E=C>.001?Math.max(0,C-.001):.001;w.seek(E),w.seek(C),FX(t.current),pa.notify(C);const M=w.getDuration();Number.isFinite(M)&&M>0&&M<7200&&M!==ue.getState().duration&&a(M),o(C),r.current||l(!0),r.current=!1,c(!1);try{const N=t.current,I=N==null?void 0:N.contentDocument,_=N==null?void 0:N.contentWindow;I&&_&&(xCe(I,_),bCe(I),u());const j=_==null?void 0:_.__clipManifest;if(j&&j.clips.length>0&&h(j),d(),f(),ue.getState().elements.length===0&&I){const L=Pse(I,w.getDuration());L.length>0&&s(L)}if(ue.getState().elements.length===0&&I){const L=I.querySelector("[data-composition-id]"),V=w.getDuration();if(L&&V>0){const $=jCe({compositionId:L.getAttribute("data-composition-id")||"composition",tagName:L.tagName||"div",rootDuration:V,iframeSrc:(N==null?void 0:N.src)||"",selector:s0(L)});$&&s([$])}}}catch{}return!0},[i,a,o,l,c,h,d,s,u,f,t,r,n]),g=x.useCallback(()=>{if(f(),e.current&&clearInterval(e.current),y())return;const w=t.current;let O=!1;const C=()=>{O||y()&&(O=!0,window.removeEventListener("message",E),e.current&&clearInterval(e.current))},E=M=>{if(M.source&&w&&M.source!==w.contentWindow)return;const N=M.data;if((N==null?void 0:N.source)==="hf-preview"&&((N==null?void 0:N.type)==="state"||(N==null?void 0:N.type)==="timeline")){if(YR(N).status==="unsupported")return;C()}};window.addEventListener("message",E),e.current=setTimeout(()=>{O||C(),window.removeEventListener("message",E),FX(t.current)},5e3)},[y,t,e,f]);return{processTimelineMessage:h,processTimelineMessageRef:{current:h},enrichMissingCompositions:d,enrichMissingCompositionsRef:{current:d},initializeAdapter:y,onIframeLoad:g}}function V$e({rafRef:t,reverseRafRef:e,getAdapter:n,setCurrentTime:r,setIsPlaying:i}){const s=x.useCallback(()=>{cancelAnimationFrame(e.current)},[e]),a=x.useCallback(()=>{const l=()=>{const c=n();if(c){const u=c.getTime(),f=c.getDuration(),h=f>0?Math.min(u,f):u;pa.notify(h);const{inPoint:d,outPoint:y}=ue.getState(),g=y!==null?Math.min(y,f):f,v=d!==null?d:0,b=v<g?g:f,w=v<g?v:0;if(h>=b){if(ue.getState().loopEnabled&&f>0){c.seek(w,{keepPlaying:!0}),pa.notify(w),c.play(),i(!0),t.current=requestAnimationFrame(l);return}c.isPlaying()&&c.pause(),r(h),i(!1),cancelAnimationFrame(t.current);return}}t.current=requestAnimationFrame(l)};t.current=requestAnimationFrame(l)},[t,n,r,i]),o=x.useCallback(()=>{cancelAnimationFrame(t.current)},[t]);return{startRAFLoop:a,stopRAFLoop:o,stopReverseLoop:s}}function mS(t){let e=null;return(n,r={})=>{if(e===null)try{e=localStorage.getItem(`hf-${t}-debug`)==="1"}catch{e=!1}if(!e)return;const i=typeof r=="function"?r():r;i&&console.log(`[hf-${t}] ${JSON.stringify({stage:n,t:Math.round(performance.now()),...i})}`)}}const qm=mS("reload");function H$e(t,e){const n=ue.getState(),r=o0(n.elements).musicElement;if(!r||n.audioMuted)return;const i=e-r.start,s=i>=0&&i<=r.duration?(r.playbackStart??0)+i:null;CCe(t,s,r.domId??r.id,n.audioVolume)}const i2=1e3;let mhe=!1;const BX=Object.freeze({"dense-short":{duration:120,clipDuration:1.5},"long-overlap":{duration:7200,clipDuration:120},"keyframe-heavy-expanded":{duration:600,clipDuration:8},"composition-heavy":{duration:900,clipDuration:12},"remote-unsupported":{duration:900,clipDuration:12}});function Q$e(t){mhe=t}function ghe(){return mhe}function Z$e(t){if(t.elementCount!==1e3&&t.elementCount!==5e4)throw new RangeError("Timeline performance fixture elementCount must be 1000 or 50000");if(!Object.hasOwn(BX,t.profile))throw new RangeError(`Unknown timeline performance fixture profile: ${t.profile}`);return BX[t.profile]}function z$e(t,e){if(t<i2)return t;if(e.profile!=="dense-short")return t%i2;const n=Math.ceil((e.elementCount-i2)/127);return(t-i2)%Math.max(1,n)}function G$e(t,e,n,r){const i=Math.max(0,n-r);return e==="dense-short"?t%128*.5:e==="long-overlap"?t*37%Math.max(1,i):t*17%Math.max(1,i)}function U$e(){return{format:"percentage",keyframes:[0,33,66,100].map(t=>({percentage:t,propertyGroup:"position",properties:{x:t},ease:"power2.inOut"}))}}function X$e(t,e,n){return{id:`animation-${t}`,targetSelector:`#${t}`,method:"to",position:e,resolvedStart:e,duration:n,propertyGroup:"position",fromProperties:{x:0},properties:{x:100},ease:"power2.inOut"}}function W$e(t){const e=Z$e(t),n=[],r=new Map,i=new Map,s=new Set;for(let a=0;a<t.elementCount;a+=1){const o=`perf-${t.profile}-${t.elementCount}-${a}`,l=G$e(a,t.profile,e.duration,e.clipDuration),c=z$e(a,t),u={id:o,key:o,domId:o,selector:`#${o}`,label:`Fixture ${a+1}`,tag:t.profile==="remote-unsupported"&&a%2===0?"video":"div",start:l,duration:e.clipDuration,track:c,authoredTrack:c};t.profile==="composition-heavy"?u.compositionSrc=`compositions/perf-${a%32}.html`:t.profile==="remote-unsupported"&&(u.src=a%2===0?`https://media.invalid/perf-${a%32}.mp4`:`assets/perf-${a%32}.unsupported`),t.profile==="keyframe-heavy-expanded"&&(r.set(o,U$e()),i.set(o,[X$e(o,l,e.clipDuration)]),s.add(o)),n.push(u)}return{summary:Object.freeze({...t,duration:e.duration,trackCount:i2,keyframedElementCount:r.size,expandedElementCount:s.size}),elements:n,keyframeCache:r,gsapAnimations:i,expandedClipIds:s}}const Q2=new Map,g_=new Map,V1=new Map;let K6=0,oM=0,y_=0;const yhe=[];let Lm=null;async function Y$e(){if(Lm===!1)return null;if(Lm)return Lm;try{return Lm=await BA(()=>import("./index-BIdEpMGS.js"),[]),Lm}catch{return Lm=!1,null}}function UL(t){try{return new URL(t,window.location.href).href}catch{return t}}async function q$e(t){const e=await Y$e();if(!e)return null;const n=new e.Input({source:new e.UrlSource(t),formats:e.ALL_FORMATS});try{const r=await n.getDurationFromMetadata();if(r==null||!Number.isFinite(r)||r<=0)return null;const i=await n.getPrimaryVideoTrack(),s=await n.getAudioTracks();return{duration:r,width:i==null?void 0:i.displayWidth,height:i==null?void 0:i.displayHeight,hasVideo:i!=null,hasAudio:s.length>0}}catch{return null}finally{n.dispose()}}function XL(t){const e=Q2.get(UL(t));return e&&(e.lastAccess=++K6),e==null?void 0:e.result}function xhe(t,e){return e?ly(t,e,window.location.origin):t}function K$e(){const t=Q2.size+V1.size-Xo.metadataRegistryEntries;if(t<=0)return;const e=[...Array.from(Q2,([n,r])=>({key:n,at:r.lastAccess,failed:!1})),...Array.from(V1,([n,r])=>({key:n,at:r.lastAccess,failed:!0}))].sort((n,r)=>n.at-r.at);for(const n of e.slice(0,t))n.failed?V1.delete(n.key):Q2.delete(n.key)}function J$e(t,e){return t.map(n=>{const r=n.tag.toLowerCase();if(!n.src||n.sourceDuration!=null||r!=="audio"&&r!=="video")return n;const i=XL(xhe(n.src,e));return i!=null&&i.duration&&i.duration>0?{...n,sourceDuration:i.duration}:n})}async function eBe(t,e,n){const r=t.flatMap(i=>{if(!i.src||i.sourceDuration!=null||!["video","audio"].includes(i.tag.toLowerCase()))return[];const s=xhe(i.src,e);return!XL(s)&&!bhe(UL(s))?[{el:i,source:s}]:[]});r.length!==0&&await Promise.allSettled(r.map(async({el:i,source:s})=>{const a=await tBe(s);a&&n(i.key??i.id,a.duration)}))}function bhe(t){const e=V1.get(t);return e===void 0?!1:Date.now()-e.failedAt<Xo.metadataFailureTtlMs?(e.lastAccess=++K6,!0):(V1.delete(t),!1)}async function tBe(t){const e=UL(t),n=XL(e);if(n)return n;if(bhe(e))return null;let r=g_.get(e);return r||(r=new Promise(i=>{yhe.push({key:e,epoch:y_,resolve:i}),vhe()}),g_.set(e,r),r)}function vhe(){for(;oM<Xo.concurrentMetadataJobs;){const t=yhe.shift();if(!t)return;if(t.epoch!==y_){t.resolve(null);continue}oM++,q$e(t.key).then(e=>t.epoch!==y_?null:(g_.delete(t.key),e?Q2.set(t.key,{result:e,lastAccess:++K6}):V1.set(t.key,{failedAt:Date.now(),lastAccess:++K6}),K$e(),e)).then(t.resolve).finally(()=>{oM--,vhe()})}}function nBe(t){return t.keepPlaying&&!t.wasReverseShuttle&&t.storeWasPlaying&&(t.duration<=0||t.nextTime<t.duration)}function rBe(t){return!t.keepPlaying||t.wasReverseShuttle}function iBe(t,e){return!!(t.source&&e&&t.source!==e.contentWindow)}function sBe(t,e){if(ghe()||iBe(t,e))return null;const n=t.data;return(n==null?void 0:n.source)!=="hf-preview"?null:rE(n)?n:null}function aBe(t){const e=s9e(t);e&&n_.notify(e)}function oBe(t,e){var n;try{if(ue.getState().elements.length===0){const r=(n=e==null?void 0:e.contentWindow)==null?void 0:n.__clipManifest;r&&r.clips.length>0&&t.processTimelineMessageRef.current(r)}Date.now()-t.lastTimelineMessageRef.current>500&&t.enrichMissingCompositionsRef.current()}catch{}}function lBe(t,e,n){if(t.lastTimelineMessageRef.current=Date.now(),t.processTimelineMessageRef.current(n),t.enrichMissingCompositionsRef.current(),!(ue.getState().elements.length>0))try{const r=e==null?void 0:e.contentDocument,i=t.getAdapter();if(!r||!i)return;const s=Pse(r,i.getDuration());s.length>0&&t.syncTimelineElements(s)}catch{}}function cBe(t){return e=>{const n=t.iframeRef.current,r=sBe(e,n);if(r){if(r.type==="group-levels")return aBe(r);if(r.type==="state")return oBe(t,n);r.type==="timeline"&&Array.isArray(r.clips)&&lBe(t,n,r)}}}function uBe(t,e){return e.length!==t.length?!0:e.some((n,r)=>{const i=t[r];return!i||n.id!==i.id||n.start!==i.start||n.duration!==i.duration||n.track!==i.track||n.sourceDuration!==i.sourceDuration})}function fBe(){const t=x.useRef(null),e=x.useRef(0),n=x.useRef(void 0),r=x.useRef(null),i=x.useRef(!1),s=x.useRef(0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(!1),{setIsPlaying:h,setCurrentTime:d,setDuration:y,setTimelineReady:g,setElements:v}=ue.getState(),b=x.useCallback((U,z)=>{if(ghe())return;const K=ue.getState(),te=z??K.duration,ee=Zfe(J$e(_Ce(K.elements,U,K.duration,te),K.timelineProjectId));uBe(K.elements,ee)&&v(ee),Number.isFinite(z)&&(z??0)>0&&z!==K.duration&&y(z??0),K.timelineReady||g(!0),eBe(ee,K.timelineProjectId,(H,Q)=>{ue.setState(oe=>{const fe=oe.elements.findIndex(be=>(be.key??be.id)===H);if(fe===-1||oe.elements[fe].sourceDuration!=null)return{};const pe=oe.elements.slice();return pe[fe]={...oe.elements[fe],sourceDuration:Q},{elements:pe}})})},[v,g,y]),w=x.useCallback(()=>{var U,z;try{const K=t.current,te=K==null?void 0:K.contentWindow;if(!K||!te)return null;const ee=te.__player&&typeof te.__player.play=="function"?te.__player:null,H=sse(K.contentDocument),Q=u4(ee);if(Q>0&&H<=Q)return O8(u,f),ee;let oe=null;if(te.__timeline){const be=Lz(te.__timeline),me=u4(be);if(me>0&&H<=me)return O8(u,f),be;me>0&&(oe??(oe=be))}if(te.__timelines){const be=Object.keys(te.__timelines);if(be.length>0){const me=(z=(U=K==null?void 0:K.contentDocument)==null?void 0:U.querySelector("[data-composition-id]"))==null?void 0:z.getAttribute("data-composition-id"),Ae=me&&me in te.__timelines?me:be[be.length-1],De=Lz(te.__timelines[Ae]),Se=u4(De);if(Se>0&&H<=Se)return O8(u,f),De;Se>0&&(oe??(oe=De))}}const fe=ee??oe,pe=Math.max(ue.getState().duration,H,Q);return fe&&pe>0&&("renderSeek"in fe||typeof fe.seek=="function")?_6e({cache:u,warned:f,bestAdapter:fe,effectiveDuration:pe,docDuration:H,clock:D6e(te),getPlaybackRate:()=>ue.getState().playbackRate}):fe}catch{return null}},[]),{startRAFLoop:O,stopRAFLoop:C,stopReverseLoop:E}=V$e({rafRef:e,reverseRafRef:s,getAdapter:w,setCurrentTime:d,setIsPlaying:h}),M=x.useCallback(U=>{const z=t.current;if(z){SCe(z,U);try{const K=z.contentWindow;if(K!=null&&K.__timelines)for(const te of Object.values(K.__timelines))te&&typeof te.timeScale=="function"&&te.timeScale(U)}catch{}}},[]),N=x.useCallback(()=>{const{audioMuted:U,audioVolume:z}=ue.getState();Ose(t.current,U),ACe(t.current,z)},[]),I=x.useCallback(()=>{C(),E(),Rv();const U=w();U&&(U.getTime()>=U.getDuration()&&U.seek(ue.getState().inPoint??0),M(ue.getState().playbackRate),N(),U.play(),a.current="forward",h(!0),O())},[w,h,O,M,N,C,E]),_=x.useCallback(U=>{C(),E();const z=w();if(!z)return;const K=Math.max(0,z.getDuration()),te=z.getTime()<=0&&K>0?K:z.getTime();z.pause(),te!==z.getTime()&&z.seek(te);const ee=Math.max(.1,Math.min(4,U));M(ee),N();let H=te,Q=performance.now();const oe=fe=>{const pe=(fe-Q)/1e3*ee;let be=H-pe;const{inPoint:me,outPoint:Ae}=ue.getState(),De=Ae!==null?Math.min(Ae,K):K,Se=me!==null?me:0,ye=Se<De?De:K,we=Se<De?Se:0;if(be<=we)if(ue.getState().loopEnabled&&K>0)H=ye,Q=fe,be=ye;else{z.seek(we),pa.notify(we),d(we),h(!1),a.current=null,s.current=0;return}z.seek(Math.max(0,be)),pa.notify(Math.max(0,be)),h(!0),s.current=requestAnimationFrame(oe)};h(!0),a.current="backward",s.current=requestAnimationFrame(oe)},[w,d,h,M,N,C,E]),j=x.useCallback(()=>{E();const U=w();U&&(U.pause(),d(U.getTime()),h(!1),a.current=null,o.current=0,C())},[w,d,h,C,E]),L=x.useCallback((U,z)=>{const K=a.current==="backward";E();const te=w();if(!te)return r.current=Math.max(0,U),!1;const ee=Math.max(0,te.getDuration()),H=Math.max(0,ee>0?Math.min(ee,U):U),Q=(z==null?void 0:z.keepPlaying)===!0,oe=nBe({keepPlaying:Q,wasReverseShuttle:K,storeWasPlaying:ue.getState().isPlaying,duration:ee,nextTime:H});return te.seek(H,z),pa.notify(H),d(H),!oe&&!Q&&H$e(t.current,H),oe?(C(),M(ue.getState().playbackRate),N(),te.play(),h(!0),a.current="forward",o.current=0,O()):rBe({keepPlaying:Q,wasReverseShuttle:K})&&(C(),ue.getState().isPlaying&&h(!1),a.current=null,o.current=0),!0},[w,r,d,h,O,C,E,M,N,a,o]);x.useEffect(()=>ue.subscribe((U,z)=>{var te;U.requestedSeekTime!==null&&U.requestedSeekTime!==z.requestedSeekTime&&(L(U.requestedSeekTime),ue.getState().clearSeekRequest());const K=U.playbackRequest;K&&K.nonce!==((te=z.playbackRequest)==null?void 0:te.nonce)&&(K.playing?I():(j(),K.returnTo!==null&&L(K.returnTo)),ue.getState().clearPlaybackRequest())}),[L,I,j]);const{playbackKeyDownRef:V,playbackKeyUpRef:$,attachIframeShortcutListeners:Z,togglePlay:W}=L$e({iframeRef:t,shuttleDirectionRef:a,shuttleSpeedIndexRef:o,iframeShortcutCleanupRef:l,getAdapter:w,play:I,playBackward:_,pause:j,seek:L}),{processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,onIframeLoad:ne}=B$e({iframeRef:t,probeIntervalRef:n,pendingSeekRef:r,isRefreshingRef:i,getAdapter:w,syncTimelineElements:b,setDuration:y,setCurrentTime:d,setTimelineReady:g,setIsPlaying:h,attachIframeShortcutListeners:Z,applyPreviewAudioState:N}),ie=x.useCallback(()=>{if(!(i.current&&r.current!=null)){const z=w();z?r.current=z.getTime():r.current==null&&(r.current=ue.getState().currentTime??0)}i.current=!0,C(),E(),h(!1)},[w,C,h,E]),le=x.useCallback(()=>{const U=t.current;if(!U)return;qm("refreshPlayer",()=>({stack:new Error("refreshPlayer").stack})),ie(),U.style.visibility="hidden";const z=U.src,K=new URL(z,window.location.origin);K.searchParams.set("_t",String(Date.now())),Sre(K),U.src=K.toString()},[ie]),q=x.useRef(w);q.current=w,Ar(()=>{const U=ee=>V.current(ee),z=ee=>$.current(ee),K=cBe({iframeRef:t,processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,lastTimelineMessageRef:c,getAdapter:w,syncTimelineElements:b}),te=()=>{var ee;if(document.hidden&&ue.getState().isPlaying){const H=(ee=q.current)==null?void 0:ee.call(q);H&&(H.pause(),h(!1),C())}};return window.addEventListener("keydown",U,!0),window.addEventListener("keyup",z,!0),window.addEventListener("message",K),document.addEventListener("visibilitychange",te),()=>{var ee;window.removeEventListener("keydown",U,!0),window.removeEventListener("keyup",z,!0),(ee=l.current)==null||ee.call(l),l.current=null,window.removeEventListener("message",K),document.removeEventListener("visibilitychange",te),C(),E(),Rv(),O8(u,f),n.current&&clearInterval(n.current)}});const F=x.useCallback(()=>{C(),E(),n.current&&clearInterval(n.current),ue.getState().reset()},[C,E]);return x.useEffect(()=>ue.subscribe((U,z)=>{const K=U.playbackRate!==z.playbackRate,te=U.audioMuted!==z.audioMuted,ee=U.audioVolume!==z.audioVolume;!K&&!te&&!ee||(K&&M(U.playbackRate),N())}),[M,N]),{iframeRef:t,play:I,pause:j,togglePlay:W,seek:L,onIframeLoad:ne,refreshPlayer:le,saveSeekPosition:ie,resetPlayer:F}}const VX='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])';function gS({open:t,onClose:e,containerRef:n,canClose:r}){const i=x.useRef(null),s=x.useRef(r);s.current=r;const a=x.useRef(e);a.current=e;const o=x.useCallback(()=>{const l=s.current;l&&!l()||a.current()},[]);return x.useEffect(()=>{var h;const l=document.activeElement;i.current=l instanceof HTMLElement?l:null;const c=n.current;(h=(c==null?void 0:c.querySelector(VX))??c)==null||h.focus();const f=d=>{if(d.key==="Escape"){d.stopPropagation(),o();return}if(d.key!=="Tab")return;const y=n.current;if(!y)return;const g=Array.from(y.querySelectorAll(VX));if(g.length===0)return;const v=g[0],b=g[g.length-1],w=document.activeElement;d.shiftKey&&(w===v||!y.contains(w))?(d.preventDefault(),b.focus()):!d.shiftKey&&(w===b||!y.contains(w))&&(d.preventDefault(),v.focus())};return document.addEventListener("keydown",f,!0),()=>{var d;document.removeEventListener("keydown",f,!0),(d=i.current)==null||d.focus(),i.current=null}},[t,n,o]),{requestClose:o}}function HX({findings:t,projectId:e,projectDir:n,title:r="HyperFrame Lint Results",promptIntro:i="Fix these HyperFrames lint issues",onClose:s}){const a=t.filter(v=>v.severity==="error"),o=t.filter(v=>v.severity==="warning"),l=t.length>0,[c,u]=x.useState(!1),[f,h]=x.useState(!1),d=x.useRef(null),{requestClose:y}=gS({open:!0,onClose:s,containerRef:d}),g=async()=>{const v=t.map(C=>{let E=`[${C.severity}] ${C.message}`;return C.file&&(E+=`
|
|
204
|
+
`)})}function $fe(t,e,n,r,i={priority:"visible",rich:!1}){return m.jsxs(m.Fragment,{children:[r==null?void 0:r(t),!n&&m.jsx(Ije,{element:t}),n&&m.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{borderRadius:"inherit"},children:n(t,e,i)})]})}function Bfe(t,e){return Number.isFinite(e)&&!t.hidden&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e>=t.start&&e<=t.end}function Vfe(t,e){return Bfe({start:t.start,end:t.start+Math.max(0,t.duration),hidden:t.hidden===!0},e)}function dX(t){if(t===void 0||t.trim()==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}function _je(t){if(!(t instanceof HTMLElement))return null;const e=t.dataset.elId,n=dX(t.dataset.clipStart),r=dX(t.dataset.clipEnd);return!e||n===null||r===null?null:{id:e,start:n,end:r,hidden:t.dataset.clipHidden==="true",element:t}}function Rje(t){return[...t.querySelectorAll('[data-clip="true"]')].map(_je).filter(e=>e!==null)}function jje(t,e){return new Set(t.filter(n=>Bfe(n,e)).map(n=>n.id))}function pX(t,e,n,r=!1){const i=jje(t,n);for(const s of t){const a=i.has(s.id);(r||e.has(s.id)!==a)&&s.element.toggleAttribute("data-active",a)}e.clear();for(const s of i)e.add(s)}function Lje({scrollRef:t,currentTime:e,clipStateVersion:n,elementStateVersion:r}){const i=x.useRef([]),s=x.useRef(new Set),a=x.useCallback(o=>{const l=t.current;if(!l){i.current=[],s.current.clear();return}i.current=Rje(l),pX(i.current,s.current,o,!0)},[t]);x.useLayoutEffect(()=>{a(e)},[n,e,r,a]),Ar(()=>pa.subscribe(o=>{pX(i.current,s.current,o)}))}const Fje=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function $je(t){return Fje.has(t)}function B1(t){return t.key??t.id}function Bje(t,e){return[...e].sort((n,r)=>n.start-r.start||n.start+n.duration-(r.start+r.duration)||B1(n).localeCompare(B1(r))).map(n=>{const r=B1(n);return{id:KA(r),kind:"clip",rowId:t,elementId:r,time:n.start+n.duration/2}})}function Vje(t,e,n,r,i){const s=vL(t,e,n,r),a=s?B1(s):null,o=s?Jj(i.get(B1(s))??[],s.start,s.duration):[];return{activeClip:s,activeId:a,lanes:o}}function Hje(t){return{percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId,collidingAnimationTargets:t.collidingAnimationTargets}}function Qje(t,e,n){var o;const r=B1(e),i=new Map;for(const l of n){const c=Hje(l),u=gf(r,c);i.has(u)||i.set(u,{target:c,time:e.start+l.percentage/100*e.duration})}const s=[...i.entries()].sort(([l,c],[u,f])=>c.time-f.time||l.localeCompare(u)),a=[];for(let l=0;l<s.length;l+=1){const[,c]=s[l],u=(o=s[l-1])==null?void 0:o[1];u&&c.time>u.time&&c.target.animationId!==void 0&&a.push({id:hae(r,c.target),kind:"ease",rowId:t,elementId:r,time:u.time+(c.time-u.time)/2,keyframeTarget:c.target}),a.push({id:fae(r,c.target),kind:"keyframe",rowId:t,elementId:r,time:c.time,keyframeTarget:c.target})}return a}function Zje(t,e,n){return t===null?!1:e.has(t)||n.has(t)}function zje(t,e,n,r,i,s,a){const o=j2(n,i.group);return{id:o,kind:"row",physicalTrackKey:t,logicalIndex:e,level:s,parentId:a,elementId:n,expandable:!1,expanded:!1,propertyGroup:i.group,items:Qje(o,r,i.keyframes)}}function Gje({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,expandedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){const f=new Map(t),h=new Map(l.map(v=>[v.anchorKey,v])),d=[];function y(v,b,w){const O=f.get(v)??[],C=U3e(v),{activeClip:E,activeId:M,lanes:N}=Vje(O,n,r,i,u),I=Zje(M,s,o)&&N.length>0;if(d.push({id:C,kind:"row",physicalTrackKey:v,logicalIndex:d.length,level:b,parentId:w,elementId:M,expandable:N.length>0,expanded:I,items:Bje(C,O)}),!(!I||!E||!M))for(const _ of N)d.push(zje(v,d.length,M,E,_,b===1?2:3,C))}function g(v){const b=X3e(v.id),w=a.has(v.id);if(d.push({id:b,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:d.length,level:1,parentId:null,elementId:null,groupId:v.id,expandable:v.memberTracks.length>0,expanded:w,items:[]}),o.has(v.id)){const O=v.memberTracks.flatMap(C=>f.get(C)??[]);for(const C of aS(O))d.push({id:`${b}::${C.key}`,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:d.length,level:2,parentId:b,elementId:null,expandable:!1,expanded:!1,items:[]})}if(w)for(const O of v.memberTracks)y(O,2,b)}for(const v of e){const b=h.get(v);if(b){g(b);continue}c.has(v)||y(v,1,null)}return d}function vl(t,e){for(let n=0;n<t.length;n+=1){const r=t[n];if(r.id===e)return{row:r,rowIndex:n,itemIndex:-1,target:r};const i=r.items.findIndex(s=>s.id===e);if(i>=0)return{row:r,rowIndex:n,itemIndex:i,target:r.items[i]}}return null}function Uje(t,e){return[...t.items].sort((n,r)=>Math.abs(n.time-e)-Math.abs(r.time-e)||n.time-r.time||n.id.localeCompare(r.id))[0]??t}function Xje(t,e,n,r={}){var g;const i=vl(t,e);if(!i)return null;const{row:s,rowIndex:a,itemIndex:o,target:l}=i;if(n==="Home"||n==="End"){const v=r.timelineBoundary?n==="Home"?t[0]:t.at(-1):s;return v?r.timelineBoundary||n==="Home"?v:v.items.at(-1)??v:l}if(n==="ArrowLeft")return o<0?s.parentId?((g=vl(t,s.parentId))==null?void 0:g.target)??s:s:o===0?s:s.items[o-1];if(n==="ArrowRight")return o<0?s.items[0]??s:s.items[o+1]??l;const c=n==="ArrowUp"||n==="PageUp"?-1:1,u=n==="PageUp"||n==="PageDown",f=r.pageSize;if(u&&(f===void 0||!Number.isFinite(f)||f<1))return l;const h=u?Math.floor(f):1,d=Math.max(0,Math.min(t.length-1,a+c*h)),y=t[d];return!y||d===a?l:l.kind==="row"?y:Uje(y,l.time)}function Wje(t,e,n){const r=vl(e,n);if(r)return r.target;const i=vl(t,n);if(!i)return null;if(i.itemIndex>=0){for(let a=i.itemIndex-1;a>=0;a-=1){const o=vl(e,i.row.items[a].id);if(o)return o.target}for(let a=i.itemIndex+1;a<i.row.items.length;a+=1){const o=vl(e,i.row.items[a].id);if(o)return o.target}}const s=vl(e,i.row.id);if(s)return s.target;if(i.row.parentId){const a=vl(e,i.row.parentId);if(a)return a.target}return e[i.rowIndex]??e[i.rowIndex-1]??null}function mX(t){if(!(t.target instanceof Element))return null;const e=t.target.closest("button, input, select, textarea, a[href], [contenteditable], [data-timeline-focus-id]");return e!=null&&e.dataset.timelineFocusId&&t.currentTarget.contains(e)?e:null}function Yje(t,e,n,r){if(!r||t.size===0)return 1;const i=n.getRowIndex(e),s=Math.max(0,i>=0?i:Math.floor(n.getRowFromY(r.scrollTop))),a=i>=0?n.getRowTop(i):r.scrollTop,o=Math.min(n.rowKeys.length-1,Math.floor(n.getRowFromY(a+Math.max(0,r.clientHeight-.001))));let l=0;for(let c=s;c<=o;c+=1)l+=t.get(n.rowKeys[c])??0;return Math.max(1,l)}function qje(t){const e=t.getBoundingClientRect();t.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.left+e.width/2,clientY:e.top+e.height/2}))}function Kje({logicalRows:t,focusedTargetId:e,rowGeometry:n,scrollRef:r,onToggleRow:i}){var c,u;const s=(e&&((c=vl(t,e))==null?void 0:c.target.id))??((u=t[0])==null?void 0:u.id)??null,a=x.useMemo(()=>{const f=new Map;for(const h of t)f.set(h.physicalTrackKey,(f.get(h.physicalTrackKey)??0)+1);return f},[t]),o=x.useCallback(f=>{var d;const h=(d=mX(f))==null?void 0:d.dataset.timelineFocusId;h&&h!==e&&ue.getState().requestTimelineFocus(h)},[e]),l=x.useCallback(f=>{const h=mX(f),d=h==null?void 0:h.dataset.timelineFocusId;if(!h||!d)return;const y=vl(t,d);if(y){if($je(f.key)){if(y.target.kind==="row"&&(f.key==="ArrowRight"&&y.target.expandable&&!y.target.expanded||f.key==="ArrowLeft"&&y.target.expandable&&y.target.expanded)){f.preventDefault(),i(y.target);return}const g=Xje(t,d,f.key,{pageSize:Yje(a,y.row.physicalTrackKey,n,r.current),timelineBoundary:f.ctrlKey||f.metaKey});f.preventDefault(),g&&g.id!==d&&ue.getState().requestTimelineFocus(g.id);return}if(f.key==="ContextMenu"||f.key==="F10"&&f.shiftKey){f.preventDefault(),qje(h);return}f.key!=="Enter"&&f.key!==" "||y.target.kind!=="row"||!y.target.expandable||(f.preventDefault(),i(y.target))}},[a,t,i,n,r]);return{rovingTargetId:s,onFocus:o,onKeyDown:l}}function Jje({pps:t,contentOrigin:e,contentGutter:n,trackContentWidth:r,theme:i,displayTrackOrder:s,rowGeometry:a,virtualRows:o,logicalRows:l,focusedTargetId:c,rowsVirtualized:u,clipIndex:f,renderTimeRange:h,visibleTimeRange:d,pinnedClipIdentities:y,trackOrder:g,tracks:v,trackStyles:b,groups:w,laneCounts:O,selectedElementId:C,selectedElementIds:E,hoveredClip:M,draggedClip:N,draggedElement:I,multiDragPreview:_,blockedClipRef:j,suppressClickRef:L,scrollRef:V,renderClipContent:$,renderClipOverlay:Z,onDrillDown:W,onSelectElement:Y,setHoveredClip:J,setShowPopover:ne,setRangeSelection:ie,setResizingClip:le,setDraggedClip:q,setSelectedElementId:F,shiftClickClipRef:U,getPreviewElement:z,getTrackStyle:K,keyframeCache:te,gsapAnimations:ee,selectedKeyframes:H,currentTime:Q,onSeek:oe,onSelectSegment:fe,onClickKeyframe:pe,onShiftClickKeyframe:be,onContextMenuKeyframe:me,onMoveKeyframe:Ae,onContextMenuClip:De,onContextMenuLane:Se,beatAnalysis:ye,onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onResizeElement:Pe,onMoveElement:Ve,onRazorSplit:Ke,onRazorSplitAll:ze}){const Ye=`timeline-lanes${x.useId().replaceAll(":","")}`,pt=ue(zt=>zt.expandedClipIds),{expandedGroupIds:st,expandedLaneOwnerIds:St,toggleGroupExpanded:$e,toggleLaneOwnerExpanded:qe}=f9e(),tt=ODe();LDe({lanes:tt});const Gt=ue(zt=>zt.expandClips),Dt=ue(zt=>zt.setClipExpanded),We=ue(zt=>zt.toggleClipExpanded),{logicalRowsByTrack:wt,groupByAnchor:ut}=h9e(l,w),dt=zt=>{const Ne=!zt.some(Me=>pt.has(Me));if($Z({expanded:Ne}),Ne)Gt(zt);else for(const Me of zt)Dt(Me,!1)},cn=zt=>{const Ne=!pt.has(zt);$Z({expanded:Ne}),We(zt)},nn=N9e(_,u,h),rn=Kje({logicalRows:l,focusedTargetId:c,rowGeometry:a,scrollRef:V,onToggleRow:zt=>{zt.elementId&&cn(zt.elementId)}});return m.jsx("div",{role:"treegrid","aria-label":"Timeline tracks","aria-rowcount":l.length,"aria-colcount":2,onFocus:rn.onFocus,onKeyDown:rn.onKeyDown,className:u?"absolute inset-0":void 0,children:o.map(({index:zt,rowKey:Ne})=>{var xt,Wn,Mn,Rn,On;const Me=s[zt];if(Me===void 0)return null;const Ze=ut.get(Me);if(Ze){const rt=(xt=wt.get(Me))==null?void 0:xt[0];return rt?m.jsx(u9e,{index:zt,rowKey:Ne,group:Ze,logicalRow:rt,tracks:v,top:a.getRowTop(zt),height:a.getRowHeight(zt),virtualized:u,contentOrigin:e,theme:i,rovingTargetId:rn.rovingTargetId,expandedGroupIds:st,expandedLaneOwnerIds:St,toggleGroupExpanded:$e,toggleLaneOwnerExpanded:qe},Ne):null}const nt=Iue(s,Me),Wt=wt.get(Me)??[],mn=Wt[0];if(!mn)return null;const Pn=a.getRowHeight(zt),qt=((Wn=v.find(([rt])=>rt===Me))==null?void 0:Wn[1])??[],hr=u?Xse(f,Me,h,y,nn):qt,gt=b.get(Me)??K(""),hn=(N==null?void 0:N.started)===!0&&!g.includes(Me)&&qt.length===0,gn=i.rowBackground,Zn=x9e(qt,ye==null?void 0:ye.beatTimes,{selectedElementId:C,isMusicTrack:Jg}),un=qt.length>0&&qt.every(rt=>rt.hidden===!0),yt=qt.length>0&&qt.some(Rl),$t=vL(qt,O,C,E),_t=($t==null?void 0:$t.key)??($t==null?void 0:$t.id),ln=A9e(qt,pt),yn=ln?hs-2*ca:void 0,kn=qt.map(z),dn=`${Ye}-track-${zt}`,Sr=`${dn}-automation`,mr=$t&&_t?tt.bind($t,C===_t||E.has(_t)):null,wr=mr&&!mr.readOnly?rt=>mr.onCommit({version:1,lanes:mr.lanes.filter(Ot=>Ot.target!==rt)}):void 0;return m.jsxs(Bue,{index:zt,rowKey:Ne,logicalRow:mn,propertyRows:Wt.slice(1),lanesId:dn,headerLanesId:`${dn} ${Sr}`,top:a.getRowTop(zt),height:Pn,virtualized:u,background:gn,borderColor:i.rowBorder,rovingTargetId:rn.rovingTargetId,children:[m.jsx(r9e,{trackNumber:Me,trackDisplayNumber:nt,trackLabel:((Mn=qt[0])==null?void 0:Mn.label)??((Rn=qt[0])==null?void 0:Rn.domId)??((On=qt[0])==null?void 0:On.id)??`Track${NE(nt)}`,lanesId:`${dn} ${Sr}`,contentOrigin:e,keyframeClip:$t,trackElements:qt,clipCount:qt.length,isExpanded:ln,animations:_t?ee.get(_t)??[]:[],currentTime:Q,isTrackHidden:un,isAudioTrack:yt,theme:i,onToggleClipExpanded:()=>{const rt=qt.map(Hn);rt.length>0&&dt(rt)},onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onRemoveAutomationLane:wr,onSeek:oe,rovingTargetId:rn.rovingTargetId}),m.jsxs("div",{role:"gridcell","aria-colindex":2,style:{width:r,marginLeft:n,opacity:un?.35:1,transition:"opacity 120ms ease"},className:"relative",onContextMenu:rt=>{if(rt.defaultPrevented||!Se)return;const Ot=rt.currentTarget.getBoundingClientRect(),Vt=(rt.clientX-Ot.left)/t;Vt<0||(rt.preventDefault(),Se(rt,Me,Vt))},children:[m.jsx(Z3e,{beatTimes:ye==null?void 0:ye.beatTimes,beatStrengths:ye==null?void 0:ye.beatStrengths,pps:t,highlightTime:N!=null&&N.started&&N.snapType==="beat"?N.snapTime:null,renderTimeRange:u?h:void 0}),Zn&&m.jsx(z3e,{beatTimes:ye==null?void 0:ye.beatTimes,beatStrengths:ye==null?void 0:ye.beatStrengths,pps:t,renderTimeRange:u?h:void 0}),hn&&m.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:gt.label,fontSize:11,letterSpacing:"0.06em",textTransform:"uppercase",opacity:.5},children:"New track"}),hr.map(rt=>{const Ot=K(rt.tag),Vt=Hn(rt),kt=Vt===_t,Lt=kt&&ln,bt=WA(rt),Pt=C===Vt||E.has(Vt),or=!!rt.compositionSrc,er=Vt;if((N==null?void 0:N.started)===!0&&I!=null&&Hn(I)===Vt)return null;const Nn=z(rt),yi=Dje(Nn,d,Pt||M===er||y.has(er)),Yn=_!=null&&Que(er,_),xi=Yn?P9e(er,t,_):0,Ms=Nje(rt,Vt,Nn,bt,{pps:t,onResizeElement:Pe,onMoveElement:Ve,onRazorSplit:Ke,onRazorSplitAll:ze,blockedClipRef:j,shiftClickClipRef:U,suppressClickRef:L,scrollRef:V,setShowPopover:ne,setRangeSelection:ie,setResizingClip:le,setDraggedClip:q,setSelectedElementId:F,onSelectElement:Y}),os=m.jsx(dae,{onContextMenu:ei=>{ei.preventDefault(),De==null||De(ei,rt)},el:Nn,pps:t,clipY:ca,clipHeight:yn,isSelected:Pt,isHovered:M===er,isDragging:!1,isActive:Vfe(Nn,Q),hasCustomContent:!!$,capabilities:bt,theme:i,isComposition:or,tabIndex:rn.rovingTargetId===KA(Vt)?0:-1,onHoverStart:()=>J(er),onHoverEnd:()=>J(null),onResizeStart:Ms.onResizeStart,onPointerDown:Ms.onPointerDown,onClick:Ms.onClick,onDoubleClick:ei=>{ei.stopPropagation(),!L.current&&or&&W&&W(rt)},children:$fe(Nn,Ot,$,Z,yi)},er),Ys=te==null?void 0:te.get(Vt),qs=!Lt&&Ys&&m.jsx(J5e,{element:Nn,elementId:Vt,keyframesData:Ys,pixelsPerSecond:t,rowHeight:Pn,beatsActive:Zn,accentColor:Ot.accent,isSelected:Pt,currentTime:Q,selectedKeyframes:H,rovingTargetId:rn.rovingTargetId,onClickKeyframe:pe,onShiftClickKeyframe:be,onContextMenuKeyframe:me,onMoveKeyframe:Ae,onSelectSegment:fe,suppressClickRef:L},`${er}-diamonds`),Ks=kt&&m.jsx(kNe,{id:dn,animations:Lt?ee.get(Vt)??[]:[],clipStart:Lle(Nn),clipDuration:Nn.duration,clipLeftPx:Nn.start*t,clipWidthPx:Math.max(Nn.duration*t,4),accentColor:Ot.accent,isSelected:Pt,currentPercentage:Nn.duration>0?(Q-Nn.start)/Nn.duration*100:0,elementId:Vt,selectedKeyframes:H,rovingTargetId:rn.rovingTargetId,onSelectSegment:ei=>fe==null?void 0:fe(Vt,ei),onClickKeyframe:ei=>pe==null?void 0:pe(Nn,ei),onShiftClickKeyframe:ei=>be==null?void 0:be(Vt,ei),onContextMenuKeyframe:(ei,Lr)=>me==null?void 0:me(ei,Vt,Lr),onMoveKeyframe:(ei,Lr)=>(Ae==null?void 0:Ae(Vt,ei,Lr))??Promise.resolve(!1),suppressClickRef:L},`${er}-property-lanes`);return Yn?m.jsxs("div",{className:"absolute inset-0",style:{transform:`translateX(${xi}px)`,opacity:.85,zIndex:20,pointerEvents:"none"},children:[os,qs,Ks]},er):m.jsxs(x.Fragment,{children:[os,qs,Ks]},er)}),m.jsx("div",{id:Sr,children:ln?m.jsx(oDe,{elements:kn,isSelected:rt=>{const Ot=Hn(rt);return C===Ot||E.has(Ot)},lanes:tt,pps:t,laneCount:_t?O.get(_t)??0:0,accentColor:K(($t==null?void 0:$t.tag)??"").accent,currentTime:Q,beatTimes:ye==null?void 0:ye.beatTimes}):null})]})]},Ne)})})}const Hfe=8,z6={playhead:0,"clip-edge":1,beat:2};function eLe(t){const e=new Map,n=(r,i)=>{if(!Number.isFinite(r)||r<0)return;const s=Math.round(r*1e3)/1e3,a=e.get(s);(!a||z6[i]<z6[a.type])&&e.set(s,{time:s,type:i})};for(const r of t.beatTimes)n(r,"beat");for(const r of t.elements)t.excludeElementKey!=null&&(r.key??r.id)===t.excludeElementKey||(n(r.start,"clip-edge"),n(r.start+r.duration,"clip-edge"));return t.playheadTime!=null&&n(t.playheadTime,"playhead"),Array.from(e.values()).sort((r,i)=>r.time-i.time)}function G6(t,e,n){let r=null,i=n;for(const s of e){const a=Math.abs(s.time-t);(a<i||a===i&&r&&z6[s.type]<z6[r.type])&&(i=a,r=s)}return r?{time:r.time,target:r}:{time:t,target:null}}function tLe(t,e,n,r,i){if(n.length===0)return{start:t,snapTime:null,snapType:null};const s=Hfe/Math.max(r,1),a=G6(t,n,s),o=G6(t+e,n,s),l=a.target!==null,c=o.target!==null;let u=t,f=null;l&&(!c||Math.abs(a.time-t)<=Math.abs(o.time-(t+e)))?(u=a.time,f=a.target):c&&(u=o.time-e,f=o.target);const h=Math.max(0,i-e),d=Math.round(u*1e3)/1e3,y=Math.max(0,Math.min(h,d));return f&&Math.abs(y-d)>1e-6&&(f=null),{start:y,snapTime:(f==null?void 0:f.time)??null,snapType:(f==null?void 0:f.type)??null}}function nLe(t,e,n,r){if(n<0)return t;const i=e.indexOf(t);return i<0?t:r?i>=n?t:e[n]??t:i<n?t:e[n-1]??t}function gX(t,e,n){return e<0?!0:n?t>=e:t<=e}function rLe(t,e,n,r){if(e.length===0)return n<0?0:n;const i=t.indexOf(e[0]),s=t.indexOf(e[e.length-1])+1;return r<Math.min(...e)?i:s}function iLe(t){var b;const{order:e,audioTracks:n,elements:r,desiredTrack:i,deliberateInsertRow:s}=t,{start:a,duration:o,dragKey:l,isAudio:c,preferInsertAbove:u}=t,f=e.findIndex(w=>n.has(w));if(s!==null&&gX(s,f,c))return{track:i,insertRow:s};const h=nLe(i,e,f,c),d=e.filter(w=>n.has(w)===c),y=aLe({elements:r,desiredTrack:h,start:a,duration:o,trackOrder:d,excludeKey:l}),g=(b=r.find(w=>(w.key??w.id)===l))==null?void 0:b.track,v=g!=null&&h!==g&&y.track===g;if(y.needsInsert||v){const w=e.indexOf(h);if(w<0)return{track:h,insertRow:rLe(e,d,f,h)};const O=g==null?-1:e.indexOf(g),E=(v?O>w:u&&gX(w,f,c))?w:w+1;return{track:h,insertRow:E}}return{track:y.track,insertRow:null}}function sLe(t,e,n=pEe){if(e===0||t<=0)return 0;if(t>=e)return e;const r=Math.floor(t),i=t-r;return i<n?r:i>1-n?r+1:null}function Qfe(t,e,n,r){return t<r&&n<e}function v4(t,e,n,r,i){return!t.some(s=>(s.key??s.id)!==i&&s.track===e&&Qfe(n,r,s.start,s.start+s.duration))}function aLe({elements:t,desiredTrack:e,start:n,duration:r,trackOrder:i,excludeKey:s}){const a=n+r,o=i.indexOf(e);if(o===-1)return{track:e,needsInsert:!0};if(v4(t,e,n,a,s))return{track:e,needsInsert:!1};for(let l=o-1;l>=0;l--)if(v4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};for(let l=o+1;l<i.length;l++)if(v4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};return{track:e,needsInsert:!0}}function oLe(t,e){if(!t.started||!e)return null;const n=e.getBoundingClientRect();return{left:t.pointerClientX-n.left+e.scrollLeft-t.pointerOffsetX,top:t.pointerClientY-n.top+e.scrollTop-t.pointerOffsetY}}function lLe(t,e,n){return Math.max(n,t&&e>0?t.scrollWidth/e:n)}function cLe(t,e,n,r,i){if(i.size<=1||!i.has(n))return t;const s=r.filter(o=>i.has(o.key??o.id)).map(o=>o.start),a=M9e(t-e.start,s);return e.start+a}function uLe(t,e,n,r,i){const{scroll:s,trackOrder:a,rowHeights:o,elements:l}=i,c=s?xEe(e-s.getBoundingClientRect().top+s.scrollTop,o):{rowFloat:0,fraction:0,rowHeight:$se(0,o)},u=sLe(c.rowFloat,a.length,bEe(c.rowHeight)),f=c.fraction<.5,h=i.audioTracks??new Set(l.filter(Rl).map(d=>d.track));return iLe({order:a,audioTracks:h,elements:l,desiredTrack:r,deliberateInsertRow:u,start:n,duration:t.element.duration,dragKey:t.element.key??t.element.id,isAudio:Rl(t.element),preferInsertAbove:f})}function fLe(t,e,n,r){const{scroll:i,pps:s,duration:a,trackOrder:o,elements:l,selectedKeys:c,buildSnapTargets:u}=r,f=lLe(i,s,a),h=(i==null?void 0:i.scrollTop)??t.originScrollTop,d=(i==null?void 0:i.getBoundingClientRect().top)??0,y=DI(t.originClientY-d+t.originScrollTop,r.rowHeights),g=DI(n-d+h,r.rowHeights),v=VEe({start:t.element.start,track:t.element.track,duration:t.element.duration,originClientX:t.originClientX,originRow:y,originScrollLeft:t.originScrollLeft,currentScrollLeft:(i==null?void 0:i.scrollLeft)??t.originScrollLeft,pixelsPerSecond:s,maxStart:f,trackOrder:o},e,g),b=u(t.element.key??t.element.id,!Jg(t.element)),w=tLe(v.start,t.element.duration,b,s,f+t.element.duration),O=t.element.key??t.element.id,C=cLe(w.start,t.element,O,l,c),{track:E,insertRow:M}=uLe(t,n,C,v.track,r);return{...t,started:!0,pointerClientX:e,pointerClientY:n,previewStart:C,previewTrack:E,desiredTrack:v.track,insertRow:M,snapTime:w.snapTime,snapType:w.snapType}}function hLe(t,e,n){const{scroll:r,pps:i,buildSnapTargets:s}=n,a=t.originScrollLeft??(r==null?void 0:r.scrollLeft)??0,o=e+(((r==null?void 0:r.scrollLeft)??a)-a),l=t.element.sourceDuration!=null?Math.max(0,(t.element.sourceDuration-(t.element.playbackStart??0))/Math.max(t.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,c=t.element.tag.toLowerCase(),u=t.element.kind==="composition"||c==="audio"||c==="video",f=Math.max(t.element.playbackRate??1,.1),h=t.element.start+l;let d=HEe({start:t.element.start,duration:t.element.duration,originClientX:t.originClientX,pixelsPerSecond:i,minStart:0,maxEnd:h,playbackStart:t.edge==="start"&&u?t.element.playbackStart??0:t.element.playbackStart,playbackRate:t.element.playbackRate},t.edge,o);const y=s(t.element.key??t.element.id,!Jg(t.element));if(y.length>0){const g=Hfe/Math.max(i,1);if(t.edge==="end"){const v=d.start+d.duration,b=G6(v,y,g).time,w=Math.round((b-d.start)*1e3)/1e3;b!==v&&b<=h+1e-6&&w>=.05&&(d={...d,duration:w})}else{const v=G6(d.start,y,g).time,b=d.start-v,w=d.playbackStart!=null?d.playbackStart/f:Number.POSITIVE_INFINITY,O=Math.round((d.duration+b)*1e3)/1e3;v!==d.start&&v>=0&&b<=w+1e-6&&O>=.05&&(d={...d,start:v,duration:O,playbackStart:d.playbackStart!=null?Math.round(Math.max(0,d.playbackStart-b*f)*1e3)/1e3:void 0})}}return{originScrollLeft:a,previewStart:d.start,previewDuration:d.duration,previewPlaybackStart:d.playbackStart}}function dLe(t,e,n){const r=BEe(t,e);n({originScrollLeft:e.originScrollLeft,previewStart:(r==null?void 0:r.start)??e.previewStart,previewDuration:(r==null?void 0:r.duration)??e.previewDuration,previewPlaybackStart:(r==null?void 0:r.playbackStart)??e.previewPlaybackStart,groupPreview:t.changes})}const pLe=x.memo(function({drag:e,scrollRef:n,pixelsPerSecond:r,rowHeight:i,selectedElementId:s,currentTime:a,theme:o,getTrackStyle:l,renderClipContent:c,renderClipOverlay:u}){const f=(e==null?void 0:e.started)===!0?qCe({element:e.element,draggedElementId:e.element.key??e.element.id,previewStart:e.previewStart,previewTrack:e.previewTrack}):null,h=e?oLe(e,n.current):null;return m.jsx("div",{"data-timeline-gesture-overlay":!0,className:"absolute inset-0 pointer-events-none",children:f&&h&&m.jsx("div",{"data-timeline-gesture-actor":f.key??f.id,className:"absolute",style:{top:h.top,left:h.left,width:Math.max(f.duration*r,4),height:i,zIndex:40},children:m.jsx(dae,{el:{...f,start:0},pps:r,clipY:0,isSelected:s===(f.key??f.id),isHovered:!1,isDragging:!0,isGestureActor:!0,isActive:Vfe(f,a),hasCustomContent:!!c,capabilities:WA(f),theme:o,isComposition:!!f.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:$fe(f,l(f.tag),c,u,{priority:"interaction",rich:!0})})})})}),mLe=x.memo(function(e){const{draggedClip:n,scrollRef:r,selectedElementIds:i,displayTrackOrder:s}=e,a=(n==null?void 0:n.started)===!0?s.indexOf(n.previewTrack):-1,o=$se(a,e.rowHeights),l=Math.min(o,hs)-ca*2,{onResizeElement:c,onMoveElement:u,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onRazorSplit:d,onRazorSplitAll:y}=lE(),g=ue(O=>O.beatDragging),v=(n==null?void 0:n.element)??null,b=v?Hn(v):null,w=(n==null?void 0:n.started)===!0&&v&&b?{dragStarted:!0,draggedKey:b,draggedOriginStart:v.start,draggedPreviewStart:n.previewStart,selectedKeys:i}:null;return m.jsxs("div",{className:"relative",style:{height:e.totalH,width:e.contentOrigin+e.trackContentWidth},children:[m.jsx(_3e,{major:e.major,minor:e.minor,pps:e.pps,trackContentWidth:e.trackContentWidth,totalH:e.totalH,effectiveDuration:e.effectiveDuration,majorTickInterval:e.majorTickInterval,theme:e.theme,beatAnalysis:e.beatAnalysis,contentOrigin:e.contentOrigin,renderTimeRange:e.rowsVirtualized?e.renderTimeRange:void 0}),m.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:zp}}),m.jsx(Jje,{...e,draggedElement:v,multiDragPreview:w,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onResizeElement:c,onMoveElement:u,onRazorSplit:d,onRazorSplitAll:y}),m.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:Fse}}),e.laneGapStrips.map(O=>{const C=s.indexOf(O.track);if(C<0)return null;const E=O.kind==="hover";return(e.rowsVirtualized?O.intervals.filter(N=>N.start<e.renderTimeRange.end&&N.end>e.renderTimeRange.start):O.intervals).map(N=>m.jsx("div",{className:"pointer-events-none absolute",style:{top:SP(C,e.rowHeights)+ca,left:e.contentOrigin+N.start*e.pps,width:Math.max((N.end-N.start)*e.pps,2),height:hs-ca*2,background:E?"rgba(60,230,172,0.18)":"rgba(60,230,172,0.055)",borderRadius:4,zIndex:25}},`gap-${O.kind}-${O.track}-${N.start}`))}),(n==null?void 0:n.started)&&n.insertRow==null&&a>=0&&m.jsx("div",{className:"absolute pointer-events-none",style:{top:SP(a,e.rowHeights)+ca,left:e.contentOrigin+n.previewStart*e.pps,width:Math.max(n.element.duration*e.pps,4),height:l,border:"1px solid rgba(60,230,172,0.55)",background:"rgba(60,230,172,0.12)",borderRadius:4,zIndex:30}}),(n==null?void 0:n.started)&&n.insertRow!=null&&m.jsx("div",{className:"absolute pointer-events-none",style:{top:SP(n.insertRow,e.rowHeights)-.5,left:e.contentOrigin,width:e.trackContentWidth,height:1,background:"#3CE6AC",boxShadow:"0 0 3px rgba(60,230,172,0.5)",zIndex:55}}),(n==null?void 0:n.started)&&n.snapTime!=null&&n.snapType!=="beat"&&m.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+n.snapTime*e.pps,top:Ia,bottom:0,width:1,background:n.snapType==="playhead"?"#3CE6AC":"rgba(255,255,255,0.6)",boxShadow:n.snapType==="playhead"?"0 0 6px rgba(60,230,172,0.5)":"0 0 6px rgba(255,255,255,0.4)",zIndex:60}}),m.jsx(pLe,{drag:n,scrollRef:r,pixelsPerSecond:e.pps,rowHeight:l,selectedElementId:e.selectedElementId,currentTime:e.currentTime,theme:e.theme,getTrackStyle:e.getTrackStyle,renderClipContent:e.renderClipContent,renderClipOverlay:e.renderClipOverlay}),e.marqueeRect&&m.jsx("div",{"aria-hidden":"true",className:"absolute pointer-events-none",style:{left:e.marqueeRect.left,top:e.marqueeRect.top,width:e.marqueeRect.width,height:e.marqueeRect.height,background:"rgba(60,230,172,0.10)",border:"1px dashed rgba(60,230,172,0.7)",borderRadius:2,zIndex:70}}),e.rangeSelection&&m.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+Math.min(e.rangeSelection.start,e.rangeSelection.end)*e.pps,width:Math.abs(e.rangeSelection.end-e.rangeSelection.start)*e.pps,top:Ia,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}}),m.jsx("div",{ref:e.playheadRef,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${II(0,0,e.contentOrigin)}px`,width:d6,zIndex:100,display:g?"none":void 0},children:m.jsx(R3e,{scrubbing:e.isScrubbing})})]})});function pc(t){return Rl(t)?"audio":"visual"}const U6=t=>t.key??t.id,yX=1e-6;function gLe(t,e){return t.start<e.start+e.duration-yX&&e.start<t.start+t.duration-yX}function yLe(t,e){const n=U6(t),r=U6(e);return n<r?-1:n>r?1:0}function xLe(t,e,n){const r=[...t].sort(yLe),i=[];for(const s of r){let a=i.findIndex(o=>o.every(l=>!gLe(l,s)));a===-1&&(a=i.length,i.push([])),i[a].push(s),n.set(U6(s),e+a)}return Math.max(1,i.length)}function xX(t,e,n){const r=new Map;for(const s of t){const a=r.get(s.track);a?a.push(s):r.set(s.track,[s])}let i=0;for(const s of[...r.keys()].sort((a,o)=>a-o))i+=xLe(r.get(s),e+i,n);return i}function Zfe(t){if(t.length===0)return t;const e=new Map,n=[],r=[];for(const o of t)(pc(o)==="audio"?r:n).push(o);let i=0;i+=xX(n,i,e),xX(r,i,e);let s=!1;const a=t.map(o=>{const l=e.get(U6(o));return l==null||l===o.track?o:(s=!0,{...o,track:l,authoredTrack:o.authoredTrack??o.track})});return s?a:t}const bX=1e-6,X6=t=>JSON.stringify([t.sourceFile??null,t.stackingContextId??null]);function LL(t,e){return X6(t)===X6(e)}function bLe(t,e){return t.start<e.start+e.duration-bX&&e.start<t.start+t.duration-bX}function o_(t,e){return t.track<e.track}function vg(t,e){return t.zIndex!==e.zIndex?t.zIndex>e.zIndex:t.domIndex!=null&&e.domIndex!=null?t.domIndex>e.domIndex:!1}function l_(t,e){return t.length>0?e(t.map(n=>n.zIndex)):null}function vLe(t,e,n,r){const i=e.filter(h=>!h.isAudio);if(i.length===0)return!1;const s=i.filter(h=>o_(t,h)),a=i.filter(h=>o_(h,t));if(s.every(h=>vg(t,h))&&a.every(h=>vg(h,t)))return!1;const l=l_(s,h=>Math.max(...h)),c=wLe(t,s,a);if(c!=null)return c!==t.zIndex&&r(t,c),c!==t.zIndex;const u=l!=null?l+1:0,f=Math.max(0,u);return f!==t.zIndex&&r(t,f),OLe(t,n,r),!0}function ALe(t,e,n){if(e-t>=2){const r=Math.floor((t+e)/2);return r>t&&r<e?r:null}return n(e)?e:null}function SLe(t,e){const n=t-1;return n>=0?n:e(t)?t:null}function wLe(t,e,n){const r=l_(e,a=>Math.max(...a)),i=l_(n,a=>Math.min(...a)),s=a=>{const o={...t,zIndex:a};return e.every(l=>vg(o,l))&&n.every(l=>vg(l,o))};return r!=null&&i!=null?ALe(r,i,s):r!=null?r+1:i!=null?SLe(i,s):null}function OLe(t,e,n){const r=[t],i=(s,a)=>{vg(s,a)||(n(s,a.zIndex+1),r.push(s))};for(;r.length>0;){const s=r.shift();for(const a of e(s))o_(a,s)&&!vg(a,s)&&i(a,s)}}function kLe(t,e){const n=new Set(e);if(n.size===0)return[];const r=t.filter(y=>Number.isFinite(y.zIndex)),i=new Set(r.filter(y=>n.has(y.key)).map(X6)),s=r.filter(y=>i.has(X6(y))),a=new Map(s.map(y=>[y.key,{...y}])),o=s.filter(y=>n.has(y.key)&&!y.isAudio).map(y=>a.get(y.key)).sort((y,g)=>g.track-y.track),l=new Map,c=(y,g)=>{y.zIndex=g,l.set(y.key,g)},u=[...a.values()],f=y=>u.filter(g=>g.key!==y.key&&!g.isAudio&&LL(y,g)&&bLe(y,g));for(const y of o)vLe(y,f(y),f,c);const h=new Set,d=[];for(const y of o)l.has(y.key)&&!h.has(y.key)&&(d.push({key:y.key,zIndex:l.get(y.key)}),h.add(y.key));for(const[y,g]of l)h.has(y)||(d.push({key:y,zIndex:g}),h.add(y));return d}function V2(t){return WA({tag:t.tag,kind:t.kind,duration:t.duration,domId:t.domId,selector:t.selector,compositionSrc:t.compositionSrc,playbackStart:t.playbackStart,playbackStartAttr:t.playbackStartAttr,sourceDuration:t.sourceDuration,timingSource:t.timingSource,timelineLocked:t.timelineLocked}).canMove}function CLe(t,e){const n=e.selectedKeys;if(!n)return null;const r=new Set(n),i=e.elements.includes(t.element)?e.elements:[...e.elements,t.element];for(const u of i){const f=u.expandedHostKey,h=Hn(u);f&&r.has(f)&&r.has(h)&&r.delete(h)}const s=t.element.expandedHostKey,a=Hn(t.element);if(!s||r.has(a))return r.size===n.size?null:{drag:t,selectedKeys:r};const o=e.elements.find(u=>Hn(u)===s);if(!o||!V2(o))return null;const l=t.previewStart-t.element.start,c=u=>u===t.element.track?o.track:u;return{drag:{...t,element:o,previewStart:Math.max(0,Math.round((o.start+l)*1e3)/1e3),previewTrack:c(t.previewTrack)??o.track,desiredTrack:c(t.desiredTrack)},selectedKeys:r}}const c_=new WeakMap;function LE(t,e){let n=c_.get(t);n||(n=new Map,c_.set(t,n));const r=new Map;for(const i of e){const s=(n.get(i)??0)+1;n.set(i,s),r.set(i,s)}return r}function W6(t,e,n){var r;return((r=c_.get(t))==null?void 0:r.get(n))===e.get(n)}function u_(t,e,n){for(const r of n)W6(t,e,r.key)&&t(r.key,r.updates)}let V8=null;function FL(t){const e=V8;let n;if(e)n=e.then(t,t);else try{n=Promise.resolve(t())}catch(i){n=Promise.reject(i)}const r=n.then(()=>{},()=>{});return V8=r,r.then(()=>{V8===r&&(V8=null)}),n}function zfe(t){return FL(async()=>{const n=await t.commitZ();return n&&!n.durable?!1:t.mirror()})}function Gfe(t){return FL(async()=>await t.commitLane()?(await t.commitZ(),!0):!1)}function Ag(t,e){return t.then(n=>{var r;return n&&((r=e.refreshAfterLaneMove)==null||r.call(e)),n})}const vX=t=>t.key??t.id,$L=(t,e)=>(t.sourceFile??null)===(e.sourceFile??null);function BL(t,e,n){const r=vX(n),i=e.filter(o=>vX(o)!==r&&$L(o,n)),s=i.find(o=>o.track===t);if(s)return s.authoredTrack??s.track;let a=null;for(const o of i)(!a||Math.abs(o.track-t)<Math.abs(a.track-t))&&(a=o);return a?Math.round((a.authoredTrack??a.track)+(t-a.track)):t}const Zr=t=>t.key??t.id,ELe=t=>Math.round(t*1e3)/1e3;let Ufe=0;function ad(t,e,n,r="timing",i){if(t.length===0)return Promise.resolve(!0);const{updateElement:s,onMoveElement:a,onMoveElements:o}=e;o||console.warn(a?`[Timeline] persistMoveEdits: only single-clip onMoveElement wired — this ${t.length}-clip move degrades to a per-clip persist race (no atomic single-undo)`:`[Timeline] persistMoveEdits: no move persist handler wired — ${t.length} edit(s) applied to the store only, not saved`);const l=t.map(d=>({key:Zr(d.element),start:d.element.start,track:d.element.track,authoredTrack:d.element.authoredTrack})),c=LE(s,t.map(d=>Zr(d.element))),u=d=>{const y=d.persistTrack??(d.updates.track!==d.element.track?d.updates.track:void 0);s(Zr(d.element),y==null?d.updates:{...d.updates,authoredTrack:y})};for(const d of t)u(d);const f=t.map(d=>d.persistTrack==null||d.persistTrack===d.updates.track?d:{element:d.element,updates:{...d.updates,track:d.persistTrack}}),h=o?o(f,n,r,i):Promise.all(f.map(d=>Promise.resolve(a==null?void 0:a(d.element,d.updates))));return Promise.resolve(h).then(()=>{for(const d of t){const y=Zr(d.element);W6(s,c,y)&&u(d)}return!0},d=>{for(const y of l)W6(s,c,y.key)&&s(y.key,{start:y.start,track:y.track,authoredTrack:y.authoredTrack});return console.error("[Timeline] Failed to persist clip edits",d),!1})}function AX(t,e){return t.length===0?0:e<=0?t[0]-.5:e>=t.length?t[t.length-1]+.5:(t[e-1]+t[e])/2}function TLe(t,e){const{elements:n,selectedKeys:r}=e,i=Zr(t.element);if(!r||r.size<=1||!r.has(i))return null;const s=new Set([...r].filter(l=>{const c=n.find(u=>Zr(u)===l);return c?V2(c):!1})),a=t.previewStart-t.element.start;return{keys:s,movedStart:l=>Zr(l)===i?t.previewStart:Math.max(0,ELe(l.start+a))}}function Xfe(t,e){const n=CLe(t,e);if(n){Xfe(n.drag,{...e,selectedKeys:n.selectedKeys});return}const{elements:r,updateElement:i,onMoveElement:s}=e,a=Zr(t.element),o=t.insertRow!=null,l=t.previewTrack!==t.element.track,c=t.desiredTrack??t.previewTrack,u=o||c!==t.element.track,f=TLe(t,e);if(!o&&!l){if(t.previewStart-t.element.start===0)return;if(f){const E=r.filter(M=>f.keys.has(Zr(M))).map(M=>({element:M,updates:{start:f.movedStart(M),track:M.track}})).filter(M=>M.updates.start!==M.element.start);ad(E,e);return}const w={start:t.previewStart,track:t.element.track},O={start:t.element.start,track:t.element.track},C=LE(i,[a]);i(a,w),Promise.resolve(s==null?void 0:s(t.element,w)).catch(E=>{W6(i,C,a)&&i(a,O),console.error("[Timeline] Failed to persist clip edit",E)});return}if(o){PLe(t,e,f);return}const h={element:t.element,updates:{start:t.previewStart,track:t.previewTrack},persistTrack:BL(t.previewTrack,r,t.element)},d=u?`clip-lane-move:${Ufe++}`:void 0,y=[h];if(f)for(const b of r){if(Zr(b)===a||!f.keys.has(Zr(b)))continue;const w=f.movedStart(b);w!==b.start&&y.push({element:b,updates:{start:w,track:b.track}})}const g=r.map(b=>Zr(b)===a?{...b,start:t.previewStart,track:t.previewTrack}:f!=null&&f.keys.has(Zr(b))?{...b,start:f.movedStart(b)}:b),v=f?f.keys:null;if(!u||!e.readZIndex||!e.onStackingPatches){Ag(ad(y,e,d,"lane-reorder"),e);return}Ag(Gfe({commitLane:()=>ad(y,e,d,"lane-reorder"),commitZ:()=>Yfe(g,a,t.element.track,t.previewTrack,v,e,d)}),e).catch(()=>{})}function Wfe(t,e,n,r,i){const{elements:s,trackOrder:a}=i,o=Zr(t);if(t.expandedParentStart!=null)return null;const l=AX(a,n),c=s.map(w=>Zr(w)===o?{...w,start:e,track:l}:r!=null&&r.keys.has(Zr(w))?{...w,start:r.movedStart(w)}:w),u=pc(t),f=w=>$L(w,t)&&pc(w)===u&&w.expandedParentStart==null,h=[...new Set(s.filter(f).map(w=>w.track))].sort((w,O)=>w-O),d=h.filter(w=>w<l).length,y=AX(h,d),g=Zfe(s.filter(f).map(w=>Zr(w)===o?{...w,start:e,track:y}:r!=null&&r.keys.has(Zr(w))?{...w,start:r.movedStart(w)}:w)),v=new Map(s.map(w=>[Zr(w),w]));for(const w of g){const O=v.get(Zr(w));if(O&&f(O)&&!V2(O)&&w.track!==(O.authoredTrack??O.track))return console.warn(`[Timeline] Track insert refused: locked clip ${Zr(O)} would need renumbering`),null}const b=[];if(r)for(const w of s){const O=Zr(w);O!==o&&r.keys.has(O)&&!f(w)&&V2(w)&&b.push({element:w,updates:{start:r.movedStart(w),track:w.track},persistTrack:w.authoredTrack})}for(const w of g){const O=v.get(Zr(w));if(!O||!V2(O))continue;const C=Zr(w)===o||r!=null&&r.keys.has(Zr(w))?(r==null?void 0:r.movedStart(O))??e:O.start;b.push({element:O,updates:{start:C,track:w.track}})}return{candidate:c,edits:b}}function PLe(t,e,n){const r=Zr(t.element),i=Wfe(t.element,t.previewStart,t.insertRow,n,e);if(!i)return;const{candidate:s,edits:a}=i;if(a.length===0)return;const o=`clip-lane-move:${Ufe++}`;if(!e.readZIndex||!e.onStackingPatches){Ag(ad(a,e,o,"track-insert"),e);return}Ag(Gfe({commitLane:()=>ad(a,e,o,"track-insert"),commitZ:()=>Yfe(s,r,t.element.track,t.insertRow,n?n.keys:null,e,o)}),e).catch(()=>{})}function MLe(t,e,n,r,i){if(e.kind==="move"){const a={element:t,updates:{start:t.start,track:e.displayTrack},persistTrack:e.persistTrack};return Ag(ad([a],n,r,"lane-reorder",i),n)}const s=Wfe(t,t.start,e.insertRow,null,n);return!s||s.edits.length===0?Promise.resolve(!1):Ag(ad(s.edits,n,r,"track-insert",i),n)}function Yfe(t,e,n,r,i,s,a){const{readZIndex:o,onStackingPatches:l}=s;if(!o||!l||r===n)return Promise.resolve();const c=t.map((h,d)=>({key:Zr(h),start:h.start,duration:h.duration,track:h.track,zIndex:o(h),isAudio:pc(h)==="audio",sourceFile:h.sourceFile,domIndex:d,stackingContextId:h.stackingContextId??null})),u=[e];if(i)for(const h of i)h!==e&&u.push(h);const f=kLe(c,u);return f.length===0?Promise.resolve():Promise.resolve(l(f,a)).then(()=>{})}function NLe(t,e,n){if(!t.hasChanged)return;const r=t.changes,i=LE(e,r.map(a=>a.key));for(const a of r)e(a.key,{start:a.start,duration:a.duration,playbackStart:a.playbackStart});if(!n){u_(e,i,t.members.map(a=>({key:a.key,updates:a})));return}const s=`clip-group-resize:${r.map(a=>a.key).join(":")}`;Promise.resolve(n(r.map(a=>({element:a.element,start:a.start,duration:a.duration,playbackStart:a.playbackStart})),{coalesceKey:s})).catch(a=>{u_(e,i,t.members.map(o=>({key:o.key,updates:o}))),console.error("[Timeline] Failed to persist group clip resize",a)})}function DLe({lifecycleRef:t,sessionEpochRef:e,cancelGestureRef:n,scrollRef:r,draggedClipRef:i,resizingClipRef:s,blockedClipRef:a,groupResizeRef:o,suppressClickRef:l,gestureSelectedKeysRef:c,elementsRef:u,trackOrderRef:f,setDraggedClipState:h,setResizingClipState:d,setShowPopover:y,setRangeSelectionRef:g,applyResizePointerRef:v,syncClipDragAutoScrollRef:b,stopClipDragAutoScrollRef:w,updateDraggedClipPreviewRef:O,publishDraggedClip:C,updateElement:E,onMoveElementRef:M,onMoveElementsRef:N,onResizeElementRef:I,onResizeElementsRef:_,onBlockedEditAttemptRef:j,readZIndexRef:L,onStackingPatchesRef:V,refreshAfterLaneMoveRef:$}){const Z=()=>{requestAnimationFrame(()=>{l.current=!1})},W=me=>{const Ae=t.current.pointerId;return Ae===null||me.pointerId===Ae},Y=me=>{if(me===null)return;const Ae=r.current;try{Ae!=null&&Ae.hasPointerCapture(me)&&Ae.releasePointerCapture(me)}catch{}},J=me=>{var Ae;if(me!==null)try{(Ae=r.current)==null||Ae.setPointerCapture(me)}catch{}},ne=me=>{i.current=null,s.current=null,o.current=null,me&&(h(null),d(null))},ie=({updateReact:me=!0,suppressClick:Ae=!1}={})=>{const De=t.current;return De.phase!=="active"?!1:(De.phase="cancelled",w.current(),ne(me),Y(De.pointerId),Ae&&(l.current=!0),De.kind=null,De.pointerId=null,De.phase="complete",!0)};n.current=ie;const le=(me,Ae)=>{var Se;const De=Math.abs(me.clientX-Ae.originClientX);!Ae.started&&De<2||(Ae.started||J(Ae.pointerId),y(!1),(Se=g.current)==null||Se.call(g,null),v.current(Ae,me.clientX),b.current(me.clientX,me.clientY))},q=(me,Ae)=>{var ye,we;const De=Math.hypot(me.clientX-Ae.originClientX,me.clientY-Ae.originClientY),Se=Ae.intent==="move"?4:2;!Ae.started&&De<Se||Ae.started||(Ae.started=!0,a.current=Ae,J(Ae.pointerId),l.current=!0,y(!1),(ye=g.current)==null||ye.call(g,null),(we=j.current)==null||we.call(j,Ae.element,Ae.intent))},F=(me,Ae)=>{var Se;const De=Math.hypot(me.clientX-Ae.originClientX,me.clientY-Ae.originClientY);!Ae.started&&De<4||(Ae.started||J(Ae.pointerId),y(!1),(Se=g.current)==null||Se.call(g,null),C(O.current(Ae,me.clientX,me.clientY)),b.current(me.clientX,me.clientY))},U=me=>{const Ae=s.current;if(Ae)return W(me)?le(me,Ae):void 0;const De=a.current;if(De)return De.pointerId!==me.pointerId?void 0:q(me,De);const Se=i.current;Se&&W(me)&&F(me,Se)},z=(me,Ae)=>{var we;if(!me.started)return;if(l.current=!0,Z(),Ae){NLe(Ae,E,_.current);return}if(!(me.previewStart!==me.element.start||me.previewDuration!==me.element.duration||me.previewPlaybackStart!==me.element.playbackStart))return;const Se=me.element.key??me.element.id,ye=LE(E,[Se]);E(Se,{start:me.previewStart,duration:me.previewDuration,playbackStart:me.previewPlaybackStart}),Promise.resolve((we=I.current)==null?void 0:we.call(I,me.element,{start:me.previewStart,duration:me.previewDuration,playbackStart:me.previewPlaybackStart})).catch(ke=>{u_(E,ye,[{key:Se,updates:{start:me.element.start,duration:me.element.duration,playbackStart:me.element.playbackStart}}]),console.error("[Timeline] Failed to persist clip resize",ke)})},K=me=>{a.current=null,me.started&&Z()},te=me=>{me.started&&(l.current=!0,Z(),Xfe(me,{elements:u.current,trackOrder:f.current,updateElement:E,onMoveElement:M.current,onMoveElements:N.current,selectedKeys:c.current,readZIndex:L.current,onStackingPatches:V.current,refreshAfterLaneMove:$.current}))},ee=()=>{var De,Se,ye;const me=((De=o.current)==null?void 0:De.members.map(we=>we.element))??[((Se=s.current)==null?void 0:Se.element)??((ye=i.current)==null?void 0:ye.element)],Ae=new Set(u.current.map(we=>we.key??we.id));return me.every(we=>we===void 0||Ae.has(we.key??we.id))},H=me=>{const Ae=t.current;if(Ae.phase!=="active")return null;if(!W(me))return"ignored";if(Ae.sessionEpoch!==e.current||!ee())return ie(),"ignored";Ae.phase="committing";const De=Ae.kind?{kind:Ae.kind,drag:i.current,resize:s.current,groupResize:o.current}:"ignored";return w.current(),ne(!0),Y(Ae.pointerId),De==="ignored"&&(Ae.phase="complete"),De},Q=me=>{try{me.kind==="resize"&&me.resize?z(me.resize,me.groupResize):me.kind==="drag"&&me.drag&&te(me.drag)}finally{const Ae=t.current;Ae.kind=null,Ae.pointerId=null,Ae.phase="complete"}},oe=me=>{const Ae=H(me);if(Ae==="ignored")return;if(Ae){Q(Ae);return}const De=a.current;if(De)return De.pointerId!==me.pointerId?void 0:K(De);l.current&&Z()},fe=me=>{t.current.phase==="active"&&W(me)&&ie({suppressClick:!0})&&Z();const Ae=a.current;Ae&&Ae.pointerId!==me.pointerId||(a.current=null,l.current&&Z())},pe=me=>{t.current.phase==="active"&&W(me)&&ie({suppressClick:!0})&&Z()},be=me=>{const Ae=GEe({key:me.key,drag:i.current,resize:s.current,blocked:a.current});Ae.cancel&&(me.preventDefault(),a.current=null,ie({suppressClick:Ae.suppressClick}))};return window.addEventListener("pointermove",U),window.addEventListener("pointerup",oe),window.addEventListener("pointercancel",fe),window.addEventListener("lostpointercapture",pe),window.addEventListener("keydown",be),()=>{ie({updateReact:!1}),n.current=()=>!1,window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",oe),window.removeEventListener("pointercancel",fe),window.removeEventListener("lostpointercapture",pe),window.removeEventListener("keydown",be)}}const H8=[];function ILe({scrollRef:t,ppsRef:e,durationRef:n,trackOrderRef:r,rowGeometryRef:i,onMoveElement:s,onMoveElements:a,onResizeElement:o,onResizeElements:l,onBlockedEditAttempt:c,setShowPopover:u,setRangeSelectionRef:f,readZIndex:h,onStackingPatches:d,refreshAfterLaneMove:y,sessionEpoch:g=0}){const v=ue(We=>We.updateElement),b=ue(We=>{var wt;return((wt=We.beatAnalysis)==null?void 0:wt.beatTimes)??H8}),w=ue(We=>{var wt;return((wt=We.beatAnalysis)==null?void 0:wt.beatStrengths)??H8}),O=ue(We=>We.beatEdits),C=ue(We=>o0(We.elements).musicElement),E=(C==null?void 0:C.start)??0,M=(C==null?void 0:C.playbackStart)??0,N=(C==null?void 0:C.duration)??0,I=(C==null?void 0:C.src)??null,_=x.useMemo(()=>{if(b===H8||N===0)return H8;const We=UR(b,w,O,I),wt=M+N,ut=E-M;return We.times.filter(dt=>dt>=M&&dt<=wt).map(dt=>Math.round((dt+ut)*1e3)/1e3)},[b,w,O,I,E,M,N]),j=ue(We=>We.elements),L=ue(We=>We.timelineSnapEnabled),V=x.useRef({beatTimes:[],enabled:!0});V.current={beatTimes:_,enabled:L};const $=x.useRef(j);$.current=j;const Z=x.useRef(new Map),W=x.useRef(null),Y=x.useCallback((We,wt)=>{if(!V.current.enabled)return[];const ut=`${We??""}|${wt?1:0}`,dt=Z.current.get(ut);if(dt)return dt;const cn=eLe({elements:$.current,playheadTime:ue.getState().currentTime,beatTimes:wt?V.current.beatTimes:[],excludeElementKey:We});return Z.current.set(ut,cn),cn},[]),[J,ne]=x.useState(null),ie=x.useRef(null),le=x.useCallback(We=>{ie.current=We,ne(We)},[]),[q,F]=x.useState(null),U=x.useRef(null),z=x.useCallback(We=>{U.current=We,F(We)},[]),K=x.useRef({kind:null,phase:"complete",pointerId:null,sessionEpoch:g}),te=x.useRef(g);te.current=g;const ee=x.useRef(new Set),H=x.useRef(()=>!1),Q=x.useCallback((We,wt)=>{K.current.phase==="active"&&H.current(),K.current={kind:We,phase:"active",pointerId:wt,sessionEpoch:te.current},ee.current=new Set(ue.getState().selectedElementIds)},[]),oe=x.useCallback(We=>{if(!We){H.current();return}Q("drag",We.pointerId),le(We)},[Q,le]),fe=x.useCallback(We=>{if(!We){H.current();return}Q("resize",We.pointerId),z(We)},[Q,z]),pe=x.useRef(null),be=x.useRef(!1),me=x.useRef(null),Ae=x.useRef(s);Ae.current=s;const De=x.useRef(a);De.current=a;const Se=x.useRef(c);Se.current=c;const ye=x.useRef(o);ye.current=o;const we=x.useRef(l);we.current=l;const ke=x.useRef(h);ke.current=h;const Pe=x.useRef(d);Pe.current=d;const Ve=x.useRef(y);Ve.current=y;const Ke=x.useRef(0),ze=x.useRef(null),Ye=x.useCallback((We,wt,ut)=>(W.current||(W.current=o0($.current).audioTracks),fLe(We,wt,ut,{scroll:t.current,pps:e.current,duration:n.current,trackOrder:r.current,rowHeights:i==null?void 0:i.current.rowHeights,elements:$.current,selectedKeys:ee.current,buildSnapTargets:Y,audioTracks:W.current})),[t,e,n,r,i,Y]),pt=x.useCallback((We,wt)=>{const ut=hLe(We,wt,{scroll:t.current,pps:e.current,buildSnapTargets:Y}),dt=rn=>z(U.current?{...U.current,started:!0,...rn}:null),cn=We.element.key??We.element.id;let nn=me.current;if(!nn||nn.grabbedKey!==cn||nn.edge!==We.edge){const rn=FEe($.current,ee.current,cn,We.edge);nn=rn?{grabbedKey:cn,edge:We.edge,members:rn,changes:[],hasChanged:!1}:null,me.current=nn}if(!nn){dt(ut);return}dLe(nn,ut,dt)},[t,e,Y,z]),st=x.useRef(pt);st.current=pt;const St=x.useCallback(()=>{ze.current=null,Ke.current&&(cancelAnimationFrame(Ke.current),Ke.current=0),Z.current.clear(),W.current=null},[]),$e=x.useCallback(()=>{Ke.current=0;const We=ie.current,wt=U.current,ut=ze.current,dt=t.current;!We&&!wt||!ut||!dt||oE(dt,ut.clientX,ut.clientY)&&(We?le(Ye(We,ut.clientX,ut.clientY)):wt&&st.current(wt,ut.clientX),Ke.current=requestAnimationFrame($e))},[le,t,Ye]),qe=x.useCallback((We,wt)=>{ze.current={clientX:We,clientY:wt};const ut=YA(t.current,We,wt,Ke.current!==0);ut==="stop"?(cancelAnimationFrame(Ke.current),Ke.current=0):ut==="start"&&(Ke.current=requestAnimationFrame($e))},[t,$e]),tt=x.useRef(Ye);tt.current=Ye;const Gt=x.useRef(qe);Gt.current=qe;const Dt=x.useRef(St);return Dt.current=St,Ar(()=>DLe({onStackingPatchesRef:Pe,refreshAfterLaneMoveRef:Ve,readZIndexRef:ke,onBlockedEditAttemptRef:Se,onResizeElementsRef:we,onResizeElementRef:ye,onMoveElementsRef:De,onMoveElementRef:Ae,updateElement:v,publishDraggedClip:le,updateDraggedClipPreviewRef:tt,stopClipDragAutoScrollRef:Dt,syncClipDragAutoScrollRef:Gt,applyResizePointerRef:st,setRangeSelectionRef:f,setShowPopover:u,setResizingClipState:F,setDraggedClipState:ne,trackOrderRef:r,elementsRef:$,gestureSelectedKeysRef:ee,suppressClickRef:be,groupResizeRef:me,blockedClipRef:pe,resizingClipRef:U,draggedClipRef:ie,scrollRef:t,cancelGestureRef:H,sessionEpochRef:te,lifecycleRef:K})),x.useEffect(()=>{H.current()},[g]),{draggedClip:J,setDraggedClip:oe,resizingClip:q,setResizingClip:fe,blockedClipRef:pe,suppressClickRef:be,stopClipDragAutoScroll:St}}function SX(t){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=t,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,t.length);try{return document.execCommand("copy")}catch{return!1}finally{e.remove()}}function _Le(){if(typeof navigator>"u")return!1;const t=navigator.userAgent;return/Safari/i.test(t)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(t)}async function jf(t){const e=_Le();if(e&&SX(t))return!0;const n=typeof navigator<"u"?navigator.clipboard:void 0;if(n!=null&&n.writeText)try{return await n.writeText(t),!0}catch{}return!e&&SX(t)}function RLe(t,e){return`hf-edit-draft:${t.toFixed(2)}:${e.toFixed(2)}`}function jLe(t){try{return sessionStorage.getItem(t)??""}catch{return""}}function wX(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function LLe({rangeStart:t,rangeEnd:e,anchorX:n,anchorY:r,onClose:i}){const s=ue(_=>_.elements),a=Math.min(t,e),o=Math.max(t,e),l=RLe(a,o),[c,u]=x.useState(()=>jLe(l)),f=_=>{u(_),wX(l,_)},[h,d]=x.useState(!1),[y,g]=x.useState(!1),[v,b]=x.useState(!1),w=x.useRef(null),O=x.useRef(null),C=x.useMemo(()=>s.filter(_=>{const j=_.start+_.duration;return _.start<o&&j>a}),[s,a,o]);Ar(()=>{setTimeout(()=>{var _;return(_=O.current)==null?void 0:_.focus()},50)}),Ar(()=>{const _=j=>{j.key==="Escape"&&i()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)}),Ar(()=>{const _=j=>{w.current&&!w.current.contains(j.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",_),100),()=>window.removeEventListener("mousedown",_)});const E=x.useCallback(()=>zEe({rangeStart:a,rangeEnd:o,elements:C,prompt:c}),[a,o,C,c]),M=x.useCallback(async()=>{if(!await jf(E())){b(!0);return}b(!1),wX(l,""),d(!0),setTimeout(()=>{d(!1),i()},800)},[E,i,l]),N=x.useCallback(async()=>{const _=nG(c);if(!_)return;if(!await jf(_)){b(!0);return}b(!1),g(!0),setTimeout(()=>{g(!1)},800)},[c]),I={position:"fixed",left:Math.max(8,Math.min(n-160,window.innerWidth-336)),top:Math.max(8,r-280),zIndex:200};return m.jsx("div",{ref:w,style:I,children:m.jsxs("div",{className:"w-80 bg-neutral-900 border border-neutral-700/60 rounded-xl shadow-2xl shadow-black/40 overflow-hidden",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-neutral-800/60",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-studio-accent"}),m.jsxs("span",{className:"text-[11px] font-medium text-neutral-300",children:[ns(a)," — ",ns(o)]})]}),m.jsxs("span",{className:"text-[10px] text-neutral-600",children:[C.length," element",C.length!==1?"s":""]})]}),C.length>0&&m.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:C.map(_=>m.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[m.jsxs("span",{className:"text-[10px] font-mono text-studio-accent/80",children:["#",_.id]}),m.jsx("span",{className:"text-[10px] text-neutral-600",children:_.tag})]},_.id))}),m.jsx("div",{className:"p-3",children:m.jsx("textarea",{ref:O,value:c,onChange:_=>f(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),M())},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"})}),v&&m.jsx("p",{className:"px-3 pb-2 text-[10px] text-red-400",role:"alert",children:"Copy failed — check clipboard permissions and try again."}),m.jsxs("div",{className:"grid grid-cols-2 gap-2 px-3 pb-3",children:[m.jsx("button",{onClick:N,disabled:!nG(c),className:`py-1.5 text-[11px] font-medium rounded-lg transition-all border ${y?"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:y?"Prompt Copied!":"Copy Prompt"}),m.jsxs("button",{onClick:M,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${h?"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:[h?"Copied!":"Copy to Agent",!h&&m.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}function qfe(t){x.useEffect(()=>{var s;const e=t.current;if(!e)return;const n=document.activeElement,r=()=>Array.from(e.querySelectorAll('[role="menuitem"]')).filter(a=>!a.disabled);(s=r()[0])==null||s.focus();const i=a=>{var u;if(a.key!=="ArrowDown"&&a.key!=="ArrowUp"&&a.key!=="Home"&&a.key!=="End")return;const o=r();if(o.length===0)return;a.preventDefault();const l=o.findIndex(f=>f===document.activeElement);let c;a.key==="ArrowDown"?c=l<0?0:(l+1)%o.length:a.key==="ArrowUp"?c=l<0?o.length-1:(l-1+o.length)%o.length:a.key==="Home"?c=0:c=o.length-1,(u=o[c])==null||u.focus()};return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i),n instanceof HTMLElement&&document.contains(n)&&n.focus()}},[t])}const tM="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-200 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",FLe="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left";function Kfe({state:t,onClose:e,onDelete:n,onDeleteAll:r,onEditEase:i,onCopyProperties:s,onMoveToPlayhead:a}){const o=P0(e),l={percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId};qfe(o);const[c,u]=x.useState("idle"),f=async()=>{if(!s)return;if(await s(t.elementId,l)===!1){u("failed"),setTimeout(()=>u("idle"),1500);return}u("copied"),setTimeout(e,700)},h=200,y=10+(1+(a?1:0)+(i?1:0)+(s?1:0)+(n?1:0))*30+9,g=t.y+y-window.innerHeight,v=t.x+h>window.innerWidth?t.x-h:t.x,b=Math.max(8,g>0?t.y-g-8:t.y);return _l.createPortal(m.jsxs("div",{ref:o,role:"menu","aria-label":"Keyframe actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px] overflow-y-auto",style:{left:v,top:b,maxHeight:`calc(100vh - ${b+8}px)`},children:[a&&m.jsx("button",{type:"button",role:"menuitem",className:tM,onClick:()=>{a(t.element,l),e()},children:"Move to Playhead"}),i&&m.jsxs("button",{type:"button",role:"menuitem",className:`${tM} justify-between`,onClick:()=>{i(t.elementId,l),e()},children:[m.jsx("span",{children:"Edit Ease…"}),m.jsx("span",{className:"text-[10px] text-neutral-500",children:t.currentEase??"default"})]}),s&&m.jsx("button",{type:"button",role:"menuitem",className:tM,onClick:()=>{f()},children:c==="copied"?"Copied!":c==="failed"?"Copy failed — check permissions":"Copy Properties"}),n&&m.jsx("button",{type:"button",role:"menuitem",className:FLe,onClick:()=>{n(t.elementId,l),e()},children:"Delete Keyframe"}),m.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),m.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),m.jsx("button",{type:"button",role:"menuitem",className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-red-950/40 focus-visible:bg-red-950/40 outline-none cursor-pointer text-left",onClick:()=>{r(t.element,t.animationId),e()},children:"Delete All Keyframes"})]}),document.body)}const $Le=x.memo(function({x:e,y:n,element:r,currentTime:i,onClose:s,onSplit:a,onDelete:o}){const l=P0(s);qfe(l);const c=200,f=n+80-window.innerHeight,h=e+c>window.innerWidth?e-c:e,d=f>0?n-f-8:n,y=jE(r)&&["video","audio","img"].includes(r.tag),g=y&&i>r.start&&i<r.start+r.duration,v=y?g?`Split at ${i.toFixed(2)}s`:"Split (move playhead inside clip)":null;return _l.createPortal(m.jsxs("div",{ref:l,role:"menu","aria-label":"Clip actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:h,top:d},children:[v&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",role:"menuitem",className:`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left outline-none focus-visible:bg-neutral-800 ${g?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,disabled:!g,onClick:()=>{g&&(a(r,i),s())},children:[m.jsx("span",{children:v}),m.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"S"})]}),m.jsx("div",{className:"my-1 border-t border-neutral-700/60"})]}),m.jsxs("button",{type:"button",role:"menuitem",className:"w-full flex items-center justify-between px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",onClick:()=>{o(r),s()},children:[m.jsx("span",{children:"Delete"}),m.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"⌫"})]})]}),document.body)}),BLe=x.memo(function({x:e,y:n,gapWidth:r,canCloseGap:i,canCloseAllGaps:s,hasAnyGaps:a,onClose:o,onCloseGap:l,onCloseAllGaps:c,onHoverAction:u}){const f=P0(o),h=200,y=n+68-window.innerHeight,g=e+h>window.innerWidth?e-h:e,v=y>0?n-y-8:n,b=C=>`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left ${C?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,w=i?void 0:r==null?"No gap here":"A clip on this track can't be moved",O=s?void 0:a?"A clip on this track can't be moved":"No gaps on this track";return _l.createPortal(m.jsxs("div",{ref:f,className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:g,top:v},onPointerLeave:()=>u(null),children:[m.jsxs("button",{type:"button",className:b(i),disabled:!i,title:w,onPointerEnter:()=>u(i?"close-gap":null),onClick:()=>{i&&(l(),o())},children:[m.jsx("span",{children:"Close gap"}),r!=null&&m.jsxs("span",{className:"text-neutral-500 text-[10px] ml-3",children:[r.toFixed(2),"s"]})]}),m.jsx("button",{type:"button",className:b(s),disabled:!s,title:O,onPointerEnter:()=>u(s?"close-all":null),onClick:()=>{s&&(c(),o())},children:m.jsx("span",{children:"Close all gaps"})})]}),document.body)});function VLe({theme:t}){return m.jsx("div",{className:"absolute bottom-2 right-3 pointer-events-none z-20",children:m.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:t.gutterBorder},children:[m.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:t.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),m.jsx("span",{className:"text-[9px]",style:{color:t.textSecondary},children:"+ drag/click to edit range"})]})})}function f_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:n,selectedElementId:r,elements:i}){const s=t.key??t.id;return e!==n||r!==s?null:i.find(a=>(a.key??a.id)===s)??null}function HLe(t,e,n){const r=ue.getState();return f_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:r.timelineSessionEpoch,selectedElementId:r.selectedElementId,elements:n})}function QLe({elements:t,elementsRef:e,theme:n,showShortcutHint:r,showPopover:i,rangeSelection:s,setShowPopover:a,setRangeSelection:o,kfContextMenu:l,setKfContextMenu:c,onDeleteKeyframe:u,onDeleteAllKeyframes:f,onMoveKeyframeToPlayhead:h,clipContextMenu:d,setClipContextMenu:y,currentTime:g,onSplitElement:v,pinZoomBeforeEdit:b,onDeleteElement:w,gapContextMenu:O,onDismissGapContextMenu:C,onCloseTrackGap:E,onCloseAllTrackGaps:M,onHoverGapAction:N}){const I=ue(W=>W.selectedElementId),_=ue(W=>W.timelineSessionEpoch),j=l==null?void 0:l.sessionEpoch,L=d==null?void 0:d.sessionEpoch,V=l?f_({capturedElement:l.element,targetSessionEpoch:j,sessionEpoch:_,selectedElementId:I,elements:t}):null,$=d?f_({capturedElement:d.element,targetSessionEpoch:L,sessionEpoch:_,selectedElementId:I,elements:t}):null,Z=(W,Y)=>HLe(W,Y,e.current);return x.useEffect(()=>{l&&!V&&c(null)},[V,l,c]),x.useEffect(()=>{d&&!$&&y(null)},[d,$,y]),m.jsxs(m.Fragment,{children:[r&&!i&&!s&&m.jsx(VLe,{theme:n}),i&&s&&m.jsx(LLe,{rangeStart:s.start,rangeEnd:s.end,anchorX:s.anchorX,anchorY:s.anchorY,onClose:()=>{a(!1),o(null)}}),l&&V&&m.jsx(Kfe,{state:{...l,element:V},onClose:()=>c(null),onDelete:(...W)=>{Z(V,j)&&(u==null||u(...W))},onDeleteAll:(W,Y)=>{const J=Z(V,j);J&&(f==null||f(J,Y))},onMoveToPlayhead:h?(W,...Y)=>{const J=Z(V,j);J&&h(J,...Y)}:void 0,onEditEase:l.animationId!==void 0&&l.tweenPercentage!==void 0?(W,Y)=>{Y.animationId===void 0||Y.tweenPercentage===void 0||(ue.getState().setFocusedEaseSegment({animationId:Y.animationId,collidingAnimationTargets:Y.collidingAnimationTargets,tweenPercentage:Y.tweenPercentage,elementId:W}),yR({action:"open"}))}:void 0,onCopyProperties:(W,Y)=>{const J=ue.getState().keyframeCache.get(W),ne=J==null?void 0:J.keyframes.find(ie=>Math.abs(ie.percentage-Y.percentage)<.5);return ne?jf(JSON.stringify(ne.properties,null,2)):!1}}),d&&$&&m.jsx($Le,{x:d.x,y:d.y,element:$,currentTime:g,onClose:()=>y(null),onSplit:(W,Y)=>{const J=Z($,L);J&&(v==null||v(J,Y))},onDelete:()=>{const W=Z($,L);W&&(b(),w==null||w(W))}}),O&&m.jsx(BLe,{x:O.x,y:O.y,gapWidth:O.gapWidth,canCloseGap:O.canCloseGap,canCloseAllGaps:O.canCloseAllGaps,hasAnyGaps:O.hasAnyGaps,onClose:C,onCloseGap:E,onCloseAllGaps:M,onHoverAction:N})]})}function ZLe({ppsRef:t,fitPpsRef:e,onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onFileDrop:a,onAssetDrop:o,onBlockDrop:l,onCompositionDrop:c}){const u=ue(E=>E.pinTimelineZoom),f=x.useCallback(()=>{u(t.current,e.current)},[u,t,e]),h=x.useRef(null),d=x.useMemo(()=>n&&((...E)=>(f(),n(...E))),[n,f]),y=x.useMemo(()=>r&&((...E)=>(f(),r(...E))),[r,f]),g=x.useMemo(()=>i&&((...E)=>(f(),i(...E))),[i,f]),v=x.useMemo(()=>s&&((...E)=>(f(),s(...E))),[s,f]),b=x.useMemo(()=>a&&((...E)=>(f(),a(...E))),[a,f]),w=x.useMemo(()=>o&&((...E)=>(f(),o(...E))),[o,f]),O=x.useMemo(()=>l&&((...E)=>(f(),l(...E))),[l,f]),C=x.useMemo(()=>c&&((...E)=>(f(),c(...E))),[c,f]);return{pinZoomBeforeEdit:f,setRangeSelectionRef:h,pinnedOnMoveElement:d,pinnedOnMoveElements:y,pinnedOnResizeElement:g,pinnedOnResizeElements:v,pinnedOnFileDrop:b,pinnedOnAssetDrop:w,pinnedOnBlockDrop:O,pinnedOnCompositionDrop:C}}const VL=x.createContext(null),HL=x.createContext(null);function Cc(){const t=x.useContext(VL);if(!t)throw new Error("useStudioShellContext must be used within StudioShellProvider");return t}function QL(){return x.useContext(VL)}function oy(){const t=x.useContext(HL);if(!t)throw new Error("useStudioPlaybackContext must be used within StudioPlaybackProvider");return t}function zLe(){return x.useContext(HL)}function GLe({value:t,children:e}){const{projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,handleUndo:l,handleRedo:c,renderQueue:u,compositionDimensions:f,waitForPendingDomEditSaves:h,handlePreviewIframeRef:d}=t,y=x.useMemo(()=>({projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,handleUndo:l,handleRedo:c,renderQueue:u,compositionDimensions:f,waitForPendingDomEditSaves:h,handlePreviewIframeRef:d}),[n,r,f,o,u,i,s,a,l,c,h,d]);return m.jsx(VL,{value:y,children:e})}function ULe({value:t,children:e}){const{captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}=t,c=x.useMemo(()=>({captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}),[n,r,i,a,o,s,l]);return m.jsx(HL,{value:c,children:e})}function XLe(t){var e;try{const n=(e=t.ownerDocument)==null?void 0:e.defaultView;if(!n)return!0;const r=n.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1;const i=Number.parseFloat(r.opacity);return!(Number.isFinite(i)&&i<=.01&&!t.hasAttribute(IE))}catch{return!0}}function OX(t){if(!t||t==="auto")return 0;const e=parseInt(t,10);return Number.isFinite(e)?e:0}function FE(t){var r;const e=QR(t);if(e!=null)return e;const n=t.style.zIndex;if(n&&n!=="auto")return OX(n);try{const i=(r=t.ownerDocument)==null?void 0:r.defaultView;if(i)return OX(i.getComputedStyle(t).zIndex)}catch{}return 0}function Jfe(t){var n;const e=(n=t.ownerDocument)==null?void 0:n.defaultView;return e&&t instanceof e.HTMLElement?!0:t.nodeType===1}const WLe=new Set(["AUDIO","SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function YLe(t){return Jfe(t)&&!WLe.has(t.tagName)}function ehe(t){const e=t.parentElement;if(!e)return{entries:[],targetIndex:-1};const n=[];let r=-1,i=0;for(const s of Array.from(e.children))s!==t&&!YLe(s)||Jfe(s)&&(s===t&&(r=n.length),n.push({element:s,zIndex:FE(s),domIndex:i}),i+=1);return{entries:n,targetIndex:r}}function qLe(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}function KLe(t,e,n){const r=e.filter(a=>a.element===t||n(a.element));let i;try{i=t.getBoundingClientRect()}catch{return r}if(i.width===0&&i.height===0)return r;const s={left:i.left,top:i.top,right:i.right,bottom:i.bottom};return r.filter(a=>{if(a.element===t)return!0;try{const o=a.element.getBoundingClientRect();return qLe(s,{left:o.left,top:o.top,right:o.right,bottom:o.bottom})}catch{return!1}})}function ZL(t){return[...t].sort((e,n)=>e.zIndex-n.zIndex||e.domIndex-n.domIndex)}function JLe(t,e){if(t&&e)return e.zIndex-t.zIndex>=2?t.zIndex+1:null;if(t)return t.zIndex+1;if(e){const n=Math.max(0,e.zIndex-1);return n>=e.zIndex?null:n}return null}function the(t,e,n,r){const i=e.findIndex(l=>l.element===n);if(i===-1)return null;const s=FE(n),a=t.map(l=>l.zIndex);if(!a.some((l,c)=>a.indexOf(l)!==c)){const l=JLe(e[i-1],e[i+1]);if(l!==null)return l===s?null:[{element:n,zIndex:l}]}return eFe(t,e,n,r)}function eFe(t,e,n,r){const i=new Set(e.map(d=>d.element)),s=r.filter(d=>!i.has(d.element)),a=e.length,o=t.map(d=>d.zIndex),l=Math.min(...o),c=Math.max(...o);if(!s.some(d=>d.zIndex>=l&&d.zIndex<=c)){const d=s.filter(w=>w.zIndex<l).map(w=>w.zIndex),y=s.filter(w=>w.zIndex>c).map(w=>w.zIndex),g=d.length>0?Math.max(...d)+1:0,v=y.length>0,b=v?Math.min(...y)-a:Number.POSITIVE_INFINITY;if(g<=b){let w=Math.max(l,g);v&&(w=Math.min(w,b));const O=[];return e.forEach((C,E)=>{C.zIndex!==w+E&&O.push({element:C.element,zIndex:w+E})}),O.length===0?null:O}}const f=tFe(r,e,n),h=[];return f.forEach((d,y)=>{d.zIndex!==y&&h.push({element:d.element,zIndex:y})}),h.length===0?null:h}function tFe(t,e,n){const r=ZL(t),i=r.find(f=>f.element===n),s=r.filter(f=>f.element!==n);if(!i)return s;const a=e.findIndex(f=>f.element===n),o=e[a-1],l=e[a+1],c=o?s.findIndex(f=>f.element===o.element):-1,u=l?s.findIndex(f=>f.element===l.element):-1;return c>=0?s.splice(c+1,0,i):u>=0?s.splice(u,0,i):s.unshift(i),s}function nhe(t,e,n){const{entries:r}=ehe(t);if(r.length<2)return null;const s=e==="bring-to-front"||e==="send-to-back"?r:KLe(t,r,XLe);if(s.length<2)return null;const a=ZL(s),o=a.findIndex(l=>l.element===t);return o===-1?null:{entries:r,order:a,pos:o}}function rhe(t,e,n){const r=nhe(t,e);if(!r)return null;const{entries:i,order:s,pos:a}=r,o=[...s],[l]=o.splice(a,1);switch(e){case"bring-forward":if(a>=s.length-1)return null;o.splice(a+1,0,l);break;case"send-backward":if(a<=0)return null;o.splice(a-1,0,l);break;case"bring-to-front":if(a>=s.length-1)return null;o.push(l);break;case"send-to-back":if(a<=0)return null;o.unshift(l);break}return the(s,o,t,i)}function nFe(t,e){const{entries:n}=ehe(t);if(n.length<2)return null;const r=new Map(n.map(a=>[a.element,a])),i=[];for(const a of e){const o=r.get(a);if(!o)return null;i.push(o)}if(i.length<2||!i.some(a=>a.element===t))return null;const s=ZL(i);return s.every((a,o)=>a.element===i[o].element)?null:the(s,i,t,n)}function rFe(t,e,n){if(e!=="bring-forward"&&e!=="send-backward")return null;const r=nhe(t,e);if(!r)return null;const{order:i,pos:s}=r,a=e==="bring-forward"?i[s+1]:i[s-1];return(a==null?void 0:a.element)??null}function iFe(t,e,n){return rhe(t,e)!==null}function sFe({expandedElementsRef:t}){const e=oS(),n=QL(),r=(e==null?void 0:e.previewIframeRef)??null,i=e==null?void 0:e.handleDomZIndexReorderCommit,s=(n==null?void 0:n.activeCompPath)??null,a=x.useCallback(u=>{var h;const f=((h=r==null?void 0:r.current)==null?void 0:h.contentDocument)??null;return f?Ts(f,{hfId:u.hfId,id:u.domId??u.id,selector:u.selector,selectorIndex:u.selectorIndex,sourceFile:u.sourceFile??s??"index.html"},s):null},[r,s]),o=x.useCallback(u=>{const f=a(u);return f?FE(f):Number.NaN},[a]),l=x.useCallback((u,f)=>{if(!i)return Promise.resolve();const h=u.flatMap(d=>{const y=t.current.find(v=>(v.key??v.id)===d.key),g=y&&a(y);return!y||!g?[]:[{element:g,zIndex:d.zIndex,id:y.domId??y.id,selector:y.selector,selectorIndex:y.selectorIndex,sourceFile:y.sourceFile??s??"index.html",key:d.key}]});return h.length?i(h,f).then(()=>{}):Promise.resolve()},[i,a,s,t]);return{readClipZIndex:o,applyStackingPatches:l,zSyncEnabled:!!(i&&r)}}function aFe({viewportWidth:t,effectiveDuration:e,zoomMode:n,manualZoomPercent:r,ppsRef:i,fitPpsRef:s,draggedClip:a,resizingClip:o,expandedElements:l,isDragging:c,scrollRef:u,lastScrollLeftRef:f,contentOrigin:h}){const d=AEe(t,e,h),y=W4e(d,n,r);i.current=y;const g=Math.max(0,e*y),v=a!=null&&a.started?(a.previewStart+a.element.duration)*y+Yz:0,b=o!=null&&o.started?(o.previewStart+o.previewDuration)*y+Yz:0,w=SEe({trackContentWidth:g,viewportWidth:t,contentOrigin:h,pps:y,dragGhostEndPx:v,resizeGhostEndPx:b}),O=y>0?w/y:e,C=x.useRef(n);C.current=n;const E=x.useRef(r);return E.current=r,s.current=d,x.useEffect(()=>{if(n!=="manual"||c.current)return;const M=u.current,N=f.current;if(!M||N<=0)return;const I=requestAnimationFrame(()=>{const _=Math.max(0,M.scrollWidth-M.clientWidth),j=Math.min(N,_);Math.abs(M.scrollLeft-j)>.5&&(M.scrollLeft=j)});return()=>cancelAnimationFrame(I)},[l,n]),x.useEffect(()=>{ue.getState().setTimelineScale(y,d)},[y,d]),{pps:y,fitPps:d,displayContentWidth:w,displayDuration:O,clipStateVersion:l,zoomModeRef:C,manualZoomPercentRef:E}}function oFe(t,e){for(const r of e)t.has(r)||e.delete(r);const n=[];for(const[r,i]of t)e.has(r)||i.some(Hle)&&n.push(r);return n}function lFe(t){var i;const e=ue(s=>s.expandClips),n=((i=QL())==null?void 0:i.projectId)??null,r=x.useRef({projectId:n,source:t,clips:new Set});x.useEffect(()=>{if(r.current.projectId!==n){const a=r.current.source!==t;if(r.current={projectId:n,source:t,clips:new Set},!a)return}else r.current.source=t;const s=oFe(t,r.current.clips);if(s.length!==0){for(const a of s)r.current.clips.add(a);e(s)}},[t,e,n])}const cFe=!0,uFe=Object.freeze({scrollLeft:0,scrollTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,isScrolling:!1});function fFe(t,e){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,isScrolling:e}}function hFe(t,e){const[n,r]=x.useState(uFe),[i,s]=x.useState(!0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(0),c=x.useRef(null),u=x.useRef(!1),f=x.useCallback((g,v=!1)=>{u.current=v;const b=()=>{l.current=0,r(fFe(g,u.current))};if(v)l.current||(l.current=requestAnimationFrame(b));else{l.current&&cancelAnimationFrame(l.current),b();return}c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,u.current=!1,l.current&&cancelAnimationFrame(l.current),b()},100)},[]),h=x.useCallback(()=>{const g=t.current;s(g?CEe(g.scrollHeight,g.clientHeight):!0)},[t]),d=x.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{o.current=0,h()})},[h]),y=x.useCallback(g=>{if(a.current&&(a.current.disconnect(),a.current=null),t.current=g,!g){c.current&&clearTimeout(c.current),c.current=null,u.current=!1;return}const v=()=>{f(g,u.current),d()};v(),a.current=new ResizeObserver(v),a.current.observe(g)},[t,d,f]);return Ar(()=>()=>{var g;(g=a.current)==null||g.disconnect(),o.current&&cancelAnimationFrame(o.current),l.current&&cancelAnimationFrame(l.current),c.current&&clearTimeout(c.current)}),x.useEffect(()=>{h()},[h,...e]),{viewport:n,showShortcutHint:i,setScrollRef:y,syncScrollViewport:f}}function dFe(t){const e=lE(),{onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onBlockedEditAttempt:a,onSplitElement:o}=t;return x.useMemo(()=>({...e,onMoveElement:n??e.onMoveElement,onMoveElements:r??e.onMoveElements,onResizeElement:i??e.onResizeElement,onResizeElements:s??e.onResizeElements,onBlockedEditAttempt:a??e.onBlockedEditAttempt,onSplitElement:o??e.onSplitElement}),[e,n,r,i,s,a,o])}const $E=.001,Sg=t=>t.key??t.id;function eA(t){return Math.max(0,...t.map(e=>e.expandedParentStart??0))}const ihe=t=>Math.round(t*1e3)/1e3,Y6=t=>t.start+t.duration;function BE(t){return[...t].sort((e,n)=>e.start-n.start||Sg(e).localeCompare(Sg(n)))}function h_(t,e,n=$E,r=0){const i=BE(t);if(i.some(c=>e>=c.start-n&&e<Y6(c)-n))return null;const a=i.filter(c=>c.start>e-n);if(a.length===0)return null;const o=a[0].start,l=Math.max(r,...i.filter(c=>c.start<=e-n).map(c=>Y6(c)));return o-l<=n?null:{gapStart:l,gapEnd:o,followingKeys:a.map(Sg)}}function she(t,e=$E,n=0){const r=[];let i=n;for(const s of BE(t))s.start-i>e&&r.push({start:i,end:s.start}),i=Math.max(i,Y6(s));return r}function ahe(t,e=$E,n=0){const r=[];let i=n;for(const s of BE(t)){const a=ihe(i);Math.abs(a-s.start)>e&&r.push({key:Sg(s),newStart:a}),i+=s.duration}return r}function pFe(t,e,n=$E,r=0){const i=she(t,n,r),s=Math.max(r,...t.map(Y6));return e-s>n&&i.push({start:s,end:e}),i}function ohe(t,e){const n=e.gapEnd-e.gapStart,r=new Set(e.followingKeys);return BE(t).filter(i=>r.has(Sg(i))).map(i=>({key:Sg(i),newStart:Math.max(e.gapStart,ihe(i.start-n))}))}const lhe=t=>t.key??t.id;let mFe=0;function d_(t,e){const n=new Map(t.map(r=>[lhe(r),r]));return e.every(r=>{const i=n.get(r.key);return i!=null&&WA(i).canMove})}function gFe(t,e){if(e.length===0||!d_(t,e))return null;const n=new Map(t.map(r=>[lhe(r),r]));return e.map(r=>{const i=n.get(r.key);return{element:i,updates:{start:r.newStart,track:i.track}}})}function che(t,e,n){const r=gFe(t,e);return r?(ad(r,n,`track-gap-close:${mFe++}`),!0):!1}function yFe(t,e,n){const r=h_(t,e,void 0,eA(t));return r?che(t,ohe(t,r),n):!1}function xFe(t,e){return che(t,ahe(t,void 0,eA(t)),e)}function bFe({tracks:t,expandedElementsRef:e,trackOrderRef:n,onMoveElement:r,onMoveElements:i}){const s=ue(w=>w.updateElement),a=ue(w=>w.timelineSessionEpoch),[o,l]=x.useState(null),[c,u]=x.useState(null),f=x.useMemo(()=>{var w;return(o==null?void 0:o.sessionEpoch)===a?((w=t.find(([O])=>O===o.track))==null?void 0:w[1])??[]:null},[o,a,t]),h=x.useMemo(()=>{if(!o||!f)return null;const w=eA(f),O=h_(f,o.time,void 0,w),C=ahe(f,void 0,w);return{x:o.x,y:o.y,gapWidth:O?O.gapEnd-O.gapStart:null,canCloseGap:O!=null&&d_(f,ohe(f,O)),hasAnyGaps:C.length>0,canCloseAllGaps:C.length>0&&d_(f,C)}},[o,f]),d=x.useMemo(()=>{if(!o||!f||!c)return null;const w=eA(f);if(c==="close-gap"){const C=h_(f,o.time,void 0,w);return C?{track:o.track,intervals:[{start:C.gapStart,end:C.gapEnd}]}:null}const O=she(f,void 0,w);return O.length>0?{track:o.track,intervals:O}:null},[o,f,c]),y=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ue.getState().timelineSessionEpoch||yFe(f,o.time,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),g=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ue.getState().timelineSessionEpoch||xFe(f,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),v=x.useCallback(w=>{u(null),l({...w,sessionEpoch:ue.getState().timelineSessionEpoch})},[]),b=x.useCallback(()=>{u(null),l(null)},[]);return x.useEffect(()=>{o&&o.sessionEpoch!==a&&b()},[b,o,a]),{gapMenuModel:h,gapHighlight:d,setHoveredGapAction:u,openGapMenu:v,dismissGapMenu:b,closeTrackGap:y,closeAllTrackGaps:g}}function vFe(t,e){return e.size===0||e.size===1&&e.has(t)}function AFe(t){var c;const{selectedElementId:e,selectedElementIds:n,expandedElements:r,tracks:i,gapHighlight:s}=t;if(!e||!vFe(e,n))return null;const a=r.find(u=>(u.key??u.id)===e);if(!a||a.track===(s==null?void 0:s.track))return null;const o=((c=i.find(([u])=>u===a.track))==null?void 0:c[1])??[],l=pFe(o,t.displayDuration,void 0,eA(o));return l.length>0?{track:a.track,intervals:l,kind:"selected"}:null}function SFe(t){if(t.dragActive)return[];const e=[];t.gapHighlight&&t.gapHighlight.intervals.length>0&&e.push({...t.gapHighlight,kind:"hover"});const n=AFe(t);return n&&e.push(n),e}function wFe(t){const{gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}=t;return x.useMemo(()=>SFe({gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}),[e,n,r,i,s,a,o])}function OFe({active:t,scrollRef:e,contentOrigin:n,pixelsPerSecond:r,onSplitAll:i}){const[s,a]=x.useState(null),o=x.useCallback(u=>{const f=e.current;if(!t||!f)return;const h=f.getBoundingClientRect();a(u.clientX-h.left+f.scrollLeft)},[t,e]),l=x.useCallback(()=>a(null),[]),c=x.useCallback(u=>{const f=e.current;if(!t||!u.shiftKey||u.button!==0||!f)return!1;const h=f.getBoundingClientRect(),d=sE({clientX:u.clientX,rectLeft:h.left,scrollLeft:f.scrollLeft,contentOrigin:n});return i==null||i(Math.max(0,d/r)),!0},[t,n,i,r,e]);return{razorGuideX:s,updateRazorGuide:o,clearRazorGuide:l,splitAllAtPointer:c}}function kFe({x:t}){return m.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none z-10",style:{left:t,width:1,background:"rgba(239,68,68,0.7)"}})}const CFe=400,EFe=6e4;function kX(t,e){if(t.length===0)return;const n=[...t].sort((i,s)=>i-s),r=Math.min(n.length-1,Math.ceil(n.length*e)-1);return Number(n[Math.max(0,r)].toFixed(2))}function TFe(t,e,n,r){const i=kX(n,.95);if(i===void 0)return null;const s=kX(r,.95);return{total_clip_count:e.totalClipCount,mounted_clip_count:t.querySelectorAll('[data-clip="true"]').length,total_row_count:e.totalRowCount,timeline_dom_node_count:t.querySelectorAll("*").length,viewport_width:t.clientWidth,viewport_height:t.clientHeight,zoom_mode:e.zoomMode,scroll_sample_count:n.length,scroll_frame_latency_p95_ms:i,scroll_frame_latency_max_ms:Number(Math.max(...n).toFixed(2)),...s===void 0?{}:{frame_interval_p95_ms:s}}}function CX(t){t.previousFrameAt=null,t.frameLatencies=[],t.frameIntervals=[]}function PFe(t){const e=x.useRef({frameRequest:0,idleTimer:null,pendingScrollStartedAt:0,previousFrameAt:null,frameLatencies:[],frameIntervals:[],lastEmittedAt:Number.NEGATIVE_INFINITY}),n=r=>{const i=e.current,s=performance.now();i.frameRequest===0&&(i.pendingScrollStartedAt=s,i.frameRequest=requestAnimationFrame(a=>{i.frameRequest=0,i.frameLatencies.push(performance.now()-i.pendingScrollStartedAt),i.previousFrameAt!==null&&i.frameIntervals.push(a-i.previousFrameAt),i.previousFrameAt=a})),i.idleTimer!==null&&clearTimeout(i.idleTimer),i.idleTimer=setTimeout(()=>{if(i.idleTimer=null,i.frameRequest!==0){cancelAnimationFrame(i.frameRequest),i.frameRequest=0,CX(i);return}const a=performance.now();if(a-i.lastEmittedAt>=EFe){const o=TFe(r,t,i.frameLatencies,i.frameIntervals);o&&(c8e(o),i.lastEmittedAt=a)}CX(i)},CFe)};return Ar(()=>()=>{const r=e.current;r.frameRequest!==0&&cancelAnimationFrame(r.frameRequest),r.idleTimer!==null&&clearTimeout(r.idleTimer)}),{recordTimelineScroll:n}}function MFe(t){return Array.from(t.values()).some(e=>e.some(Hle))}function NFe(t,e){const n=Number.isFinite(t)?t:0;if(e.length===0)return n;const r=Math.max(n,...e.map(i=>i.start+i.duration));return Number.isFinite(r)?r:n}function DFe(t,e){var i;const n=Hn(t),r=(i=e==null?void 0:e.groupPreview)==null?void 0:i.find(s=>s.key===n);return r?{...t,...r}:e&&Hn(e.element)===n?{...t,start:e.previewStart,duration:e.previewDuration,playbackStart:e.previewPlaybackStart}:t}function IFe(t,e,n,r){const i=x.useMemo(()=>t.find(o=>Hn(o)===e)??null,[t,e]),s=x.useRef(i);s.current=i;const a=x.useRef(s.current);x.useEffect(()=>{const o=a.current,l=s.current;a.current=l,o&&!l&&(n(!1),r())})}function _Fe(){const[t,e]=x.useState(!1);return Ar(()=>{const n=i=>i.key==="Shift"&&e(i.type==="keydown"),r=()=>e(!1);return window.addEventListener("keydown",n),window.addEventListener("keyup",n),window.addEventListener("blur",r),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",n),window.removeEventListener("blur",r)}}),t}function RFe(t,e,n,r){const i=n==="frame"?Md:void 0;return{...x.useMemo(()=>D3e(t,e,i,r),[t,i,e,r]),majorTickInterval:nae(t,e,i)}}const nM=1024*1024,jFe=1440*60*1e3,Xo=Object.freeze({directScrollSafetyPx:8e6,rowOverscanPerSide:2,timeOverscanViewportRatio:.25,maxMountedRows:64,maxMountedClipRoots:512,maxMountedClipRootsPerRow:128,maxMountedTimelineDescendants:5e3,posterMaxPhysicalWidth:240,posterMaxPhysicalHeight:135,posterDprCap:1.5,richPreviewFrameCount:6,concurrentVideoDecodes:2,concurrentMetadataJobs:4,concurrentCompositionFetches:2,concurrentServerPages:1,thumbnailLoadTimeoutMs:3e4,thumbnailCacheBytes:64*nM,thumbnailCacheEntries:256,thumbnailCacheEntriesPerProject:96,metadataRegistryEntries:512,metadataFailureTtlMs:3e4,waveformCacheBytes:16*nM,waveformCacheEntries:256,compositionDiskCacheBytes:512*nM,compositionDiskCacheMaxAgeMs:14*jFe,interactionP95Ms:50,frameIntervalP95Ms:33.3,constrainedInteractionP95Ms:75,constrainedFrameIntervalP95Ms:75,longTaskLimitMs:50,constrainedLongTaskLimitMs:300,memoryReturnToleranceRatio:.15,posterColdP95Ms:750,posterCachedP95Ms:250,constrainedPosterColdP95Ms:1200,constrainedPosterCachedP95Ms:400,posterCoverageRatio:.9,posterCoverageSettleMs:1500,constrainedPosterCoverageSettleMs:2500,richPreviewP95Ms:750,constrainedRichPreviewP95Ms:1200,supportedFixtureFallbackRatio:.02,scrollSamplesPerRun:21,warmupRuns:3,measuredRuns:5,requiredPassingRuns:4});function LFe(t,e,n,r){if(!(e>0)||!(r>0)||!(t.clientWidth>0))return{start:0,end:0};const i=t.clientWidth*Xo.timeOverscanViewportRatio,s=t.scrollLeft-n-i,a=t.scrollLeft+t.clientWidth-n+i;return{start:Math.min(r,Math.max(0,s/e)),end:Math.min(r,Math.max(0,a/e))}}function FFe(t,e,n,r){if(!(e>0)||!(r>0))return{start:0,end:0};const i=Math.max(0,(t.scrollLeft-n)/e),s=Math.min(r,Math.max(i,(t.scrollLeft+t.clientWidth-n)/e));return{start:Math.min(i,r),end:s}}function $Fe(t,e,n){const r=t.getRowPositionFromY(n+Ia);if(r.row<0||r.row>=t.rowKeys.length)return n;const i=t.rowKeys[r.row];if(i===void 0)return n;const s=e.getRowIndex(i);return s<0?n:Math.max(0,n+e.getRowTop(s)-t.getRowTop(r.row))}function BFe({tracks:t,viewport:e,pixelsPerSecond:n,contentOrigin:r,duration:i,selectedElementId:s,draggedElementId:a,resizingElementIds:o,focusedElementId:l,focusedEaseElementId:c,clipContextMenuElementId:u,keyframeContextMenuElementId:f}){const h=x.useMemo(()=>YEe(t),[t]),d=x.useMemo(()=>LFe(e,n,r,i),[r,i,n,e]),y=x.useMemo(()=>FFe(e,n,r,i),[r,i,n,e]),g=x.useMemo(()=>new Set([s,a,...o??[],l,c,u,f].filter(v=>v!==void 0)),[u,a,c,l,f,o,s]);return{clipIndex:h,renderTimeRange:d,visibleTimeRange:y,pinnedClipIdentities:g}}function VFe(){var e;const t=(e=zLe())==null?void 0:e.setRefreshKey;return x.useCallback(()=>t==null?void 0:t(n=>n+1),[t])}const Q8=12;function EX(t,e,n,r,i){const s=t+n+Q8,a=t+e-Q8,o=a-s;return o<=0||r>=s&&i<=a?null:i-r>o||r<s?Math.max(0,r-n-Q8):Math.max(0,i-e+Q8)}function HFe(t){return{left:t.allowHorizontal?EX(t.scrollLeft,t.viewportWidth,t.stickyLeft,t.clipLeft,t.clipRight):null,top:EX(t.scrollTop,t.viewportHeight,t.stickyTop,t.clipTop,t.clipBottom)}}function TX(t,e,n){return t!==null&&t.projectId===e&&t.sessionEpoch===n}function QFe(t,e){const n=t.querySelector(`[data-timeline-focus-id=${CSS.escape(e)}]`);return n?n.ownerDocument.activeElement===n?!0:(n.setAttribute("data-reveal-highlight","true"),n.focus({preventScroll:!0}),n.ownerDocument.activeElement!==n?(n.removeAttribute("data-reveal-highlight"),!1):(n.addEventListener("blur",()=>n.removeAttribute("data-reveal-highlight"),{once:!0}),!0)):!1}function ZFe(t,e,n,r,i,s,a){const o=r.getRowIndex(e.row.physicalTrackKey);if(o<0)return!1;const l=e.target.kind==="row"?e.row.elementId:e.target.elementId,c=l?n.find(g=>(g.key??g.id)===l):void 0,u=e.target.kind==="row"?null:e.target.time,f=c&&e.target.kind==="clip"?c.start:u,h=c&&e.target.kind==="clip"?c.start+c.duration:u,d=r.getRowTop(o),y=HFe({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,viewportWidth:t.clientWidth,viewportHeight:t.clientHeight,clipLeft:s+(f??0)*i,clipRight:s+(h??0)*i,clipTop:d+ca,clipBottom:d+r.getRowHeight(o)-ca,stickyLeft:s,stickyTop:Ia,allowHorizontal:a&&f!==null});return y.left!==null&&(t.scrollLeft=y.left),y.top!==null&&(t.scrollTop=y.top),y.left!==null||y.top!==null}function zFe({scrollRef:t,logicalRows:e,elements:n,rowGeometry:r,pixelsPerSecond:i,contentOrigin:s,allowHorizontal:a,viewportVersion:o,projectId:l,sessionEpoch:c,syncScrollViewport:u}){const f=ue(b=>b.timelineFocus),h=x.useRef(e),d=x.useRef(null),y=x.useRef(null),g=x.useMemo(()=>{var b;if(TX(f,l,c)){((b=d.current)==null?void 0:b.nonce)!==f.nonce&&(d.current={nonce:f.nonce,id:f.id});const w=d.current.id;let O=vl(e,w);if(!O){const C=Wje(h.current,e,w);C&&(d.current={nonce:f.nonce,id:C.id},O=vl(e,C.id))}return O?{target:O.target,row:O.row}:null}return d.current=null,null},[e,l,f,c]);x.useLayoutEffect(()=>{h.current=e},[e]),x.useEffect(()=>{var w;if(!TX(f,l,c))return;if(!g){ue.getState().clearTimelineFocus(f.nonce);return}if(g.target.id!==f.id){ue.getState().requestTimelineFocus(g.target.id);return}if(((w=y.current)==null?void 0:w.nonce)===f.nonce&&y.current.id===g.target.id)return;const b=t.current;b&&(ZFe(b,g,n,r,i,s,a)&&u(b),QFe(b,g.target.id)&&(y.current={nonce:f.nonce,id:g.target.id}))},[a,s,n,i,l,f,g,r,t,c,u,o]);const v=g?g.target.kind==="row"?g.row.elementId??void 0:g.target.elementId:void 0;return{focusedTargetId:(g==null?void 0:g.target.id)??null,focusedRowKey:g==null?void 0:g.row.physicalTrackKey,pinnedElementId:v}}function GFe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,expandedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){return x.useMemo(()=>Gje({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,expandedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}),[e,s,a,o,l,c,u,n,r,i,t])}function PX(t,e){if(!e)return null;const n=o0(t).byKey.get(e);return n?{elementId:e,rowKey:n.track}:null}function UFe(t,e,n){const r=new Array(t);return new Proxy(r,{get(i,s,a){if(typeof s=="string"){const o=s.charCodeAt(0);if(o>=48&&o<=57){const l=+s;if(Number.isInteger(l)&&l>=0&&l<t){let c=i[l];if(!c){const u=e[l*2];c=i[l]={index:l,key:n(l),start:u,size:e[l*2+1],end:u+e[l*2+1],lane:0}}return c}}if(s==="length")return t}return Reflect.get(i,s,a)}})}function jm(t,e,n){let r=n.initialDeps??[],i,s=!0;function a(){const o=t();return(o.length!==r.length||o.some((c,u)=>r[u]!==c))&&(r=o,i=e(...o),n!=null&&n.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1),i}return a.updateDeps=o=>{r=o},a}function MX(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const XFe=(t,e)=>Math.abs(t-e)<1.01,WFe=(t,e,n)=>{let r;return function(...i){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,i),n)}};let $x;const rM=()=>{if($x!==void 0)return $x;if(typeof navigator>"u")return $x=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return $x=!0;const t=navigator.maxTouchPoints;return $x=navigator.platform==="MacIntel"&&t!==void 0&&t>0},NX=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},YFe=t=>t,uhe=t=>{const e=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1)-e+1,i=new Array(r);for(let s=0;s<r;s++)i[s]=e+s;return i},qFe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const i=a=>{const{width:o,height:l}=a;e({width:Math.round(o),height:Math.round(l)})};if(i(NX(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(NX(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},q6={passive:!0},KFe=typeof window>"u"?!0:"onscrollend"in window,JFe=(t,e,n)=>{const r=t.scrollElement;if(!r)return;const i=t.targetWindow;if(!i)return;const s=t.options.useScrollendEvent&&KFe;let a=0;const o=s?null:WFe(i,()=>e(a,!1),t.options.isScrollingResetDelay),l=f=>()=>{a=n(r),o==null||o(),e(a,f)},c=l(!0),u=l(!1);return r.addEventListener("scroll",c,q6),s&&r.addEventListener("scrollend",u,q6),()=>{r.removeEventListener("scroll",c),s&&r.removeEventListener("scrollend",u)}},e$e=(t,e)=>JFe(t,e,n=>{const{horizontal:r,isRtl:i}=t.options;return r?n.scrollLeft*(i&&-1||1):n.scrollTop}),t$e=(t,e,n)=>{if(n.options.useCachedMeasurements){const r=n.indexFromElement(t),i=n.options.getItemKey(r);return n.itemSizeCache.get(i)??n.options.estimateSize(r)}if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}if(!e){const r=n.indexFromElement(t),i=n.options.getItemKey(r),s=n.itemSizeCache.get(i);if(s!==void 0)return s}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},n$e=(t,{adjustments:e=0,behavior:n},r)=>{var i,s;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:t+e,behavior:n})},r$e=n$e;class i$e{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,r,i;return((i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const a=()=>{const o=s.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[c,u]of this.elementsCache)if(u===o){this.elementsCache.delete(c);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,s,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{var r,i;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:YFe,rangeExtractor:uhe,onChange:()=>{},measureElement:t$e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in n){const d=n[h];d!==void 0&&(s[h]=d)}const a=this.options;let o=null,l=null,c=!1;if(a!==void 0&&a.enabled&&s.enabled&&s.anchorTo==="end"&&this.scrollElement!==null){const h=a.count,d=s.count,y=this.getMeasurements(),g=h>0?((r=y[0])==null?void 0:r.key)??a.getItemKey(0):null,v=h>0?((i=y[h-1])==null?void 0:i.key)??a.getItemKey(h-1):null;if(d!==h||h>0&&d>0&&(s.getItemKey(0)!==g||s.getItemKey(d-1)!==v)){c=!0;const O=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??y[0]:null;O&&(o=[O.key,this.getScrollOffset()-O.start]);const C=s.followOnAppend===!0?"auto":s.followOnAppend||null;C&&d>h&&this.isAtEnd(a.scrollEndThreshold)&&(h===0||s.getItemKey(d-1)!==v)&&(l=C)}}this.options=s,c&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,f=0;if(o&&this.scrollOffset!==null){const[h,d]=o,y=this.getMeasurements(),{count:g,getItemKey:v}=this.options;let b=0;for(;b<g&&v(b)!==h;)b++;if(b<g){const w=y[b];if(w){const O=w.start+d;O!==this.scrollOffset&&(f=O-this.scrollOffset,this.scrollOffset=O,u=!0)}}}(u||l)&&(this.pendingScrollAnchor=[u?o[0]:null,u?o[1]:0,l,f])},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=jm(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{if(a&&this._intendedScrollOffset===null&&s===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(s-this._intendedScrollOffset)<1.5&&(s=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===s?this.scrollDirection:o<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const s=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!rM()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};s.addEventListener("touchstart",a,q6),s.addEventListener("touchend",o,q6),this.unsubs.push(()=>{s.removeEventListener("touchstart",a),s.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[s,a,o,l]=i;s!==null&&!o&&(rM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)return;const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=jm(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,r,i,s,a,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c}),{key:!1}),this.getMeasurements=jm(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c},u)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),o===1){const b=n*2;let w=this._flatMeasurements;if(!w||w.length<b){const E=new Float64Array(b);w&&h>0&&E.set(w.subarray(0,h*2)),w=E,this._flatMeasurements=w}let O;if(h===0)O=r+i;else{const E=h-1;O=w[E*2]+w[E*2+1]+c}for(let E=h;E<n;E++){const M=s(E),N=f.get(M),I=typeof N=="number"?N:this.options.estimateSize(E);w[E*2]=O,w[E*2+1]=I,O+=I+c}const C=UFe(n,w,s);return this.measurementsCache=C,C}const d=this.measurementsCache.slice(0,h),y=new Array(o).fill(void 0),g=new Float64Array(o);let v=0;for(let b=0;b<h;b++){const w=d[b];w&&(y[w.lane]===void 0&&v++,y[w.lane]=b,g[w.lane]=w.end)}for(let b=h;b<n;b++){const w=s(b),O=this.laneAssignments.get(b);let C,E;const M=l==="estimate"||f.has(w);if(O!==void 0&&this.options.lanes>1){C=O;const j=y[C],L=j!==void 0?d[j]:void 0;E=L?L.end+c:r+i}else if(v===o){let j=0,L=g[0],V=y[0];for(let $=1;$<o;$++){const Z=g[$];(Z<L||Z===L&&y[$]<V)&&(j=$,L=Z,V=y[$])}C=j,E=L+c,M&&this.laneAssignments.set(b,C)}else C=b%this.options.lanes,E=r+i,M&&this.laneAssignments.set(b,C);const N=f.get(w),I=typeof N=="number"?N:this.options.estimateSize(b),_=E+I;d[b]={index:b,start:E,size:I,end:_,key:w,lane:C},y[C]===void 0&&v++,y[C]=b,g[C]=_}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=jm(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>n.length===0||r===0?(this.range=null,null):(this.range=a$e(n,r,i,s,s===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=jm(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,s,a)=>s===null||a===null?[]:n({startIndex:s,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(i!==void 0&&this.range){const s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-s),o=Math.min(this.options.count-1,i+s);return n>=a&&n<=o}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(n),i=this.options.getItemKey(r),s=this.elementsCache.get(i);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(i,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var i,s;if(n<0||n>=this.options.count)return;let a,o,l;const c=this._flatMeasurements;if(this.options.lanes===1&&c!==null)l=this.options.getItemKey(n),o=c[n*2],a=c[n*2+1];else{const h=this.measurementsCache[n];if(!h)return;l=h.key,o=h.start,a=h.size}const u=this.itemSizeCache.get(l)??a,f=r-u;if(f!==0){const h=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=h?this.getTotalSize():0,y=((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:l,start:o,size:a,end:o+a,lane:0},f,this):o<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(l)||this.scrollDirection!=="backward"));(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(l,r),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-d):y&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=jm(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,a=n.length;s<a;s++){const o=n[s],l=r[o];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const i=this._flatMeasurements,s=this.options.lanes===1&&i!=null,a=fhe(0,r.length-1,s?o=>i[o*2]:o=>MX(r[o]).start,n);return MX(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+s?"end":"start"),r==="center"?n+=(i-s)/2:r==="end"&&(n-=s);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getSize(),s=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(r==="auto")if(a.end>=s+i-this.options.scrollPaddingEnd)r="end";else if(a.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:i="auto"}={})=>{const s=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:i,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:i="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getOffsetForIndex(n,r);if(!s)return;const[a,o]=s,l=this.now();this.scrollState={index:n,align:o,behavior:i,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const i=this.getScrollOffset()+n,s=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:s,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const s=r.length-1,a=this._flatMeasurements;a!=null?i=a[s*2]+a[s*2+1]:i=((n=r[s])==null?void 0:n.end)??0}else{const s=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&s.some(o=>o===null);){const o=r[a];s[o.lane]===null&&(s[o.lane]=o.end),a--}i=Math.max(...s.filter(o=>o!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const r=this.getMeasurements();for(const i of r)i&&this.itemSizeCache.has(i.key)&&n.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return n},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,n){e!==0&&(rM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=r?r[0]:this.scrollState.lastTargetOffset,s=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&XFe(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=s){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(i-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=i,c||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const fhe=(t,e,n,r)=>{for(;t<=e;){const i=(t+e)/2|0,s=n(i);if(s<r)t=i+1;else if(s>r)e=i-1;else return i}return t>0?t-1:0};function s$e(t,e,n){let r=0;for(;r<=e;){const i=(r+e)/2|0,s=t[i*2];if(s<n)r=i+1;else if(s>n)e=i-1;else return i}return r>0?r-1:0}function a$e(t,e,n,r,i){const s=t.length-1;if(t.length<=r)return{startIndex:0,endIndex:s};if(r===1&&i!==null){const c=s$e(i,s,n);let u=c;const f=n+e;for(;u<s&&i[u*2]+i[u*2+1]<f;)u++;return{startIndex:c,endIndex:u}}let o=fhe(0,s,c=>t[c].start,n),l=o;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<s&&c.some(f=>f<n+e);){const f=t[l];c[f.lane]=f.end,l++}const u=Array(r).fill(n+e);for(;o>=0&&u.some(f=>f>=n);){const f=t[o];u[f.lane]=f.start,o--}o=Math.max(0,o-o%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const iM=typeof document<"u"?x.useLayoutEffect:x.useEffect;function o$e({useFlushSync:t=!0,directDomUpdates:e=!1,directDomUpdatesMode:n="transform",...r}){const i=x.useReducer(c=>c+1,0)[1],s=x.useRef({enabled:e,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=e,s.current.mode=n;const a=c=>{const u=s.current;if(!u.enabled||!u.container)return;const f=c.getTotalSize();if(f!==u.lastSize){u.lastSize=f;const b=c.options.horizontal?"width":"height";u.container.style[b]=`${f}px`}const h=!!c.options.horizontal,d=u.mode==="transform",y=h?"left":"top",g=c.options.scrollMargin,v=c.getVirtualItems();for(const b of v){const w=b.start-g,O=c.elementsCache.get(b.key);O&&u.lastPositions.get(O)!==w&&(u.lastPositions.set(O,w),d?O.style.transform=h?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:O.style[y]=`${w}px`)}},o={...r,onChange:(c,u)=>{var f;const h=s.current;let d=!0;if(h.enabled){a(c);const y=c.range,g=h.prevRange;d=!g||g.isScrolling!==c.isScrolling||g.startIndex!==(y==null?void 0:y.startIndex)||g.endIndex!==(y==null?void 0:y.endIndex),d&&(h.prevRange=y?{startIndex:y.startIndex,endIndex:y.endIndex,isScrolling:c.isScrolling}:null)}d&&(t&&u?_l.flushSync(i):i()),(f=r.onChange)==null||f.call(r,c,u)}},[l]=x.useState(()=>{const c=new i$e(o);return Object.assign(c,{containerRef:u=>{const f=s.current;if(f.container=u,f.lastSize=null,u&&f.enabled){const h=c.getTotalSize();f.lastSize=h;const d=c.options.horizontal?"width":"height";u.style[d]=`${h}px`}}})});return l.setOptions(o),iM(()=>l._didMount(),[]),iM(()=>l._willUpdate()),iM(()=>{a(l)}),l}function l$e(t){return o$e({observeElementRect:qFe,observeElementOffset:e$e,scrollToFn:r$e,...t})}function c$e(t,e){const n=new Set(uhe(t));for(const r of e)r>=0&&r<t.count&&n.add(r);return[...n].sort((r,i)=>r-i)}function u$e(t,e){const n=Math.min(t,Xo.rowOverscanPerSide*2+1),r=new Set(Array.from({length:n},(i,s)=>s));for(const i of e)i>=0&&i<t&&r.add(i);return[...r].sort((i,s)=>i-s)}function f$e({enabled:t,scrollRef:e,viewport:n,rowGeometry:r,sessionEpoch:i,pinnedRowKeys:s,focusedRowKey:a}){const o=n.clientWidth>0&&n.clientHeight>0,l=x.useMemo(()=>[...new Set([...s,...a===void 0?[]:[a]].map(b=>r.getRowIndex(b)))],[a,s,r]),c=x.useCallback(b=>r.getRowHeight(b),[r]),u=x.useCallback(b=>r.rowKeys[b]??b,[r]),f=x.useCallback(b=>c$e(b,l),[l]),h=x.useCallback(()=>n.scrollTop,[n.scrollTop]),d=l$e({enabled:o,useFlushSync:!1,count:r.rowKeys.length,getScrollElement:()=>e.current,estimateSize:c,getItemKey:u,overscan:Xo.rowOverscanPerSide,rangeExtractor:f,scrollMargin:Ia+zp,initialRect:{width:n.clientWidth,height:n.clientHeight},initialOffset:h});x.useEffect(()=>{var b;o&&(d.measure(),(b=e.current)==null||b.dispatchEvent(new Event("scroll")))},[t,e,i,o,d]);const y=a===void 0?-1:r.getRowIndex(a),g=y<0?0:r.getRowHeight(y);x.useEffect(()=>{o&&y>=0&&d.resizeItem(y,g)},[t,g,y,i,o,d]);const v=x.useMemo(()=>null,[t,r]);return v||(o?d.getVirtualItems().map(({index:b})=>({index:b,rowKey:r.rowKeys[b]??b})):u$e(r.rowKeys.length,l).map(b=>({index:b,rowKey:r.rowKeys[b]??b})))}function DX(t){var r;if(!(t instanceof Element))return;const e=(r=t.closest("[data-timeline-row-key]"))==null?void 0:r.dataset.timelineRowKey;if(e===void 0)return;const n=Number(e);return Number.isFinite(n)?n:void 0}function h$e({scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,elements:i,selectedElementId:s,focusedRowKey:a,draggedRowKey:o,resizingElementIds:l,clipContextMenuRowKey:c,keyframeContextMenuRowKey:u,lastScrollLeftRef:f,syncScrollViewport:h}){const d=cFe,[y,g]=x.useState(),v=x.useCallback(I=>{g(DX(I.target))},[]),b=x.useCallback(I=>{g(DX(I.relatedTarget))},[]),w=x.useMemo(()=>PX(i,s),[i,s]),O=x.useMemo(()=>(l==null?void 0:l.map(I=>{var _;return(_=PX(i,I))==null?void 0:_.rowKey}).filter(I=>I!==void 0))??[],[i,l]),C=x.useMemo(()=>[o,...O,w==null?void 0:w.rowKey,a,c,u].filter(I=>I!==void 0),[c,o,a,u,O,w]),E=f$e({enabled:d,scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,pinnedRowKeys:C,focusedRowKey:y??a}),M=x.useRef(n),N=x.useRef(r);return x.useLayoutEffect(()=>{const I=t.current,_=M.current;if(N.current!==r)N.current=r,f.current=0,I&&(I.scrollLeft=0,I.scrollTop=0,h(I));else if(I&&_!==n){const j=$Fe(_,n,I.scrollTop);j!==I.scrollTop&&(I.scrollTop=j,h(I))}M.current=n},[f,n,t,r,h]),{enabled:d,virtualRows:E,timelineFocusProps:{onFocus:v,onBlur:b}}}function d$e(t){const e=ue(l=>l.expandedClipIds),n=ue(l=>l.expandedGroupIds),r=ue(l=>l.expandedLaneOwnerIds),i=ue(l=>l.timelineProjectId),s=GFe({tracks:t.tracks,displayTrackOrder:t.layout.displayTrackOrder,laneCounts:t.laneCounts,selectedElementId:t.selectedElementId,selectedElementIds:t.selectedElementIds,expandedClipIds:e,expandedGroupIds:n,expandedLaneOwnerIds:r,groups:t.groups,trackGroupOf:t.trackGroupOf,gsapAnimations:t.gsapAnimations}),a=zFe({scrollRef:t.scrollRef,logicalRows:s,elements:t.elements,rowGeometry:t.layout.rowGeometry,pixelsPerSecond:t.pixelsPerSecond,contentOrigin:t.contentOrigin,allowHorizontal:t.allowHorizontal,viewportVersion:t.viewport,projectId:i,sessionEpoch:t.sessionEpoch,syncScrollViewport:t.syncScrollViewport}),o=h$e({scrollRef:t.scrollRef,viewport:t.viewport,rowGeometry:t.layout.rowGeometry,sessionEpoch:t.sessionEpoch,elements:t.elements,selectedElementId:t.selectedElementId,focusedRowKey:a.focusedRowKey,draggedRowKey:t.draggedRowKey,resizingElementIds:t.resizingElementIds,clipContextMenuRowKey:t.clipContextMenuRowKey,keyframeContextMenuRowKey:t.keyframeContextMenuRowKey,lastScrollLeftRef:t.lastScrollLeftRef,syncScrollViewport:t.syncScrollViewport});return{logicalRows:s,...a,rowVirtualizationActive:o.enabled,virtualRows:o.virtualRows,timelineFocusProps:o.timelineFocusProps}}const p$e=x.memo(function({onSeek:e,onDrillDown:n,renderClipContent:r,renderClipOverlay:i,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l,onDeleteElement:c,onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:d,onBlockedEditAttempt:y,onSplitElement:g,onSelectElement:v,theme:b,sessionEpoch:w=0}={}){var ot;const{onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onBlockedEditAttempt:N,onSplitElement:I,onRazorSplitAll:_,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:V,onMoveKeyframe:$}=dFe({onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:d,onBlockedEditAttempt:y,onSplitElement:g}),Z=x.useMemo(()=>({...JR,...b}),[b]),W=VFe();Ike();const Y=ue(Mt=>Mt.elements),J=GA(),ne=Dke(),ie=ue(Mt=>Mt.duration),le=ue(Mt=>Mt.timeDisplayMode),q=ue(Mt=>Mt.timelineReady),F=ue(Mt=>Mt.selectedElementId),U=ue(Mt=>Mt.selectedElementIds),z=ue(Mt=>Mt.focusedEaseSegment),K=ue(Mt=>Mt.gsapAnimations),te=x.useMemo(()=>MFe(K),[K]),ee=te?nf+I2:I2+mEe,H=te?I2:0,Q=ue(Mt=>Mt.setSelectedElementId),oe=ue(Mt=>Mt.currentTime),{zoomMode:fe,manualZoomPercent:pe,setZoomMode:be,setManualZoomPercent:me}=Yse(),Ae=x.useRef(null),De=x.useRef(null),Se=x.useRef(null),ye=ue(Mt=>Mt.activeTool),[we,ke]=x.useState(null),Pe=x.useRef(!1),Ve=_Fe(),[Ke,ze]=x.useState(!1),[Ye,pt]=x.useState(null),[st,St]=x.useState(null),$e=x.useCallback(Mt=>{De.current=Mt},[]),qe=x.useRef(0),tt=x.useMemo(()=>NFe(ie,Y),[ie,Y]),Gt=ue(Mt=>Mt.keyframeCache);lFe(K);const{tracks:Dt,trackStyles:We,trackOrder:wt,trackOrderRef:ut,laneCounts:dt,rowGeometry:cn,rowGeometryRef:nn,groups:rn,trackGroupOf:zt}=k9e(J,K,F,U),Ne=x.useRef(J);Ne.current=J;const Me=x.useRef(100),Ze=x.useRef(tt);Ze.current=tt;const nt=x.useRef(100),{pinZoomBeforeEdit:Wt,setRangeSelectionRef:mn,pinnedOnMoveElement:Pn,pinnedOnMoveElements:qt,pinnedOnResizeElement:hr,pinnedOnResizeElements:gt,pinnedOnFileDrop:hn,pinnedOnAssetDrop:gn,pinnedOnBlockDrop:Zn,pinnedOnCompositionDrop:un}=ZLe({ppsRef:Me,fitPpsRef:nt,onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l}),{readClipZIndex:yt,applyStackingPatches:$t,zSyncEnabled:_t}=sFe({expandedElementsRef:Ne}),{gapMenuModel:ln,gapHighlight:yn,setHoveredGapAction:kn,openGapMenu:dn,dismissGapMenu:Sr,closeTrackGap:mr,closeAllTrackGaps:wr}=bFe({tracks:Dt,expandedElementsRef:Ne,trackOrderRef:ut,onMoveElement:Pn,onMoveElements:qt}),{draggedClip:xt,setDraggedClip:Wn,resizingClip:Mn,setResizingClip:Rn,blockedClipRef:On,suppressClickRef:rt}=ILe({scrollRef:Se,ppsRef:Me,durationRef:Ze,trackOrderRef:ut,rowGeometryRef:nn,onMoveElement:Pn,onMoveElements:qt,onResizeElement:hr,onResizeElements:gt,onBlockedEditAttempt:N,setShowPopover:ze,setRangeSelectionRef:mn,readZIndex:_t?yt:void 0,onStackingPatches:_t?$t:void 0,refreshAfterLaneMove:W,sessionEpoch:w}),Ot=C3e({scrollRef:Se,ppsRef:Me,durationRef:Ze,trackOrderRef:ut,rowGeometryRef:nn,contentOrigin:ee,onFileDrop:hn,onAssetDrop:gn,onBlockDrop:Zn,onCompositionDrop:un,sessionEpoch:w}),Vt=T9e(xt,wt,cn),kt=((ot=Mn==null?void 0:Mn.groupPreview)==null?void 0:ot.map(Mt=>Mt.key))??(Mn?[Hn(Mn.element)]:void 0),{recordTimelineScroll:Lt}=PFe({totalClipCount:J.length,totalRowCount:Vt.displayTrackOrder.length,zoomMode:fe}),{viewport:bt,showShortcutHint:Pt,setScrollRef:or,syncScrollViewport:er}=hFe(Se,[q,J.length,Vt.totalH]),{pps:ai,fitPps:Nn,displayContentWidth:yi,displayDuration:Yn,zoomModeRef:xi,manualZoomPercentRef:Ms}=aFe({viewportWidth:bt.clientWidth,effectiveDuration:tt,zoomMode:fe,manualZoomPercent:pe,ppsRef:Me,fitPpsRef:nt,draggedClip:xt,resizingClip:Mn,expandedElements:J,isDragging:Pe,scrollRef:Se,lastScrollLeftRef:qe,contentOrigin:ee}),os=d$e({scrollRef:Se,tracks:Dt,layout:Vt,laneCounts:dt,selectedElementId:F,selectedElementIds:U,groups:rn,trackGroupOf:zt,gsapAnimations:K,elements:J,pixelsPerSecond:ai,contentOrigin:ee,allowHorizontal:fe==="manual",viewport:bt,sessionEpoch:w,draggedRowKey:xt!=null&&xt.started?xt.previewTrack:void 0,resizingElementIds:kt,clipContextMenuRowKey:st==null?void 0:st.element.track,keyframeContextMenuRowKey:Ye==null?void 0:Ye.element.track,lastScrollLeftRef:qe,syncScrollViewport:er}),Ys=ue(Mt=>Mt.selectedKeyframes),qs=ue(Mt=>Mt.toggleSelectedKeyframe),{onClickKeyframe:Ks,onSelectSegment:ei,onShiftClickKeyframe:Lr,onContextMenuKeyframe:va}=X5e({expandedElements:J,keyframeCache:Gt,onSelectElement:v,onSeek:e,setSelectedElementId:Q,setKfContextMenu:pt,toggleSelectedKeyframe:qs}),{clipIndex:ft,renderTimeRange:xe,visibleTimeRange:_e,pinnedClipIdentities:at}=BFe({tracks:Dt,viewport:bt,pixelsPerSecond:ai,contentOrigin:ee,duration:Yn,selectedElementId:F??void 0,draggedElementId:xt?Hn(xt.element):void 0,resizingElementIds:kt,focusedElementId:os.pinnedElementId,focusedEaseElementId:z==null?void 0:z.elementId,clipContextMenuElementId:st?Hn(st.element):void 0,keyframeContextMenuElementId:Ye?Hn(Ye.element):void 0});Lje({scrollRef:Se,currentTime:oe,clipStateVersion:xe,elementStateVersion:J});const At=wFe({gapHighlight:yn,tracks:Dt,selectedElementId:F,selectedElementIds:U,expandedElements:J,dragActive:(xt==null?void 0:xt.started)===!0||Mn!=null,displayDuration:Yn}),{seekFromX:Jt,autoScrollDuringDrag:En,dragScrollRaf:Fr}=h3e({playheadRef:Ae,scrollRef:Se,ppsRef:Me,durationRef:Ze,isDragging:Pe,currentTime:oe,zoomMode:fe,zoomModeRef:xi,manualZoomPercentRef:Ms,fitPps:Nn,fitPpsRef:nt,effectiveDuration:tt,pps:ai,timelineReady:q,elementsLength:J.length,setZoomMode:be,setManualZoomPercent:me,onSeek:e,contentOrigin:ee}),{razorGuideX:ir,updateRazorGuide:bi,clearRazorGuide:ls,splitAllAtPointer:Ql}=OFe({active:ye==="razor",scrollRef:Se,contentOrigin:ee,pixelsPerSecond:ai,onSplitAll:_}),{rangeSelection:$r,setRangeSelection:ys,shiftClickClipRef:Nc,marqueeRect:Eu,isScrubbing:Aa,handlePointerDown:Sa,handlePointerMove:Dc,handlePointerUp:Tu,handlePointerCancel:Zl}=f3e({scrollRef:Se,ppsRef:Me,effectiveDuration:tt,pps:ai,onSeek:e,seekFromX:Jt,autoScrollDuringDrag:En,dragScrollRaf:Fr,isDragging:Pe,setShowPopover:ze,elementsRef:Ne,clipIndex:ft,rowGeometryRef:nn,onSelectElement:v,contentOrigin:ee,sessionEpoch:w});mn.current=ys,IFe(J,F,ze,()=>ys(null));const{major:zl,minor:Ns,majorTickInterval:Pu}=RFe(Yn,ai,le,os.rowVirtualizationActive?xe:void 0),Br=x.useCallback(Mt=>DFe(Mt,Mn),[Mn]);return!q||J.length===0?m.jsx(E3e,{isDragOver:Ot.isDragOver,onFileDrop:!!s,onDragOver:Ot.handleAssetDragOver,onDragLeave:Ot.handleAssetDragLeave,onDrop:Ot.handleAssetDrop}):m.jsxs("div",{ref:$e,"aria-label":"Timeline","data-timeline-element-count":J.length,className:`relative border-t select-none h-full overflow-hidden ${Ot.isDragOver?"ring-1 ring-inset ring-studio-accent/60":""} ${ye==="razor"||Ve?"cursor-crosshair":"cursor-default"}`,onMouseMove:bi,onMouseLeave:ls,style:{touchAction:"pan-x pan-y",background:Z.shellBackground,borderColor:Z.shellBorder},children:[m.jsxs("div",{ref:or,"data-timeline-scroll-viewport":!0,"data-timeline-auto-scroll-left-inset":te?nf:0,tabIndex:-1,className:`${fe==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full outline-none`,onScroll:Mt=>{qe.current=Mt.currentTarget.scrollLeft,Lt(Mt.currentTarget),er(Mt.currentTarget,!0)},...os.timelineFocusProps,onDragOver:Ot.handleAssetDragOver,onDragLeave:Ot.handleAssetDragLeave,onDrop:Ot.handleAssetDrop,onPointerDown:Mt=>{Mt.target instanceof Element&&Mt.target.closest("button, input, select, a")||Ql(Mt)||Sa(Mt)},onPointerMove:Dc,onPointerUp:Tu,onPointerCancel:Zl,onLostPointerCapture:Zl,children:[m.jsx(mLe,{major:zl,minor:Ns,pps:ai,contentOrigin:ee,contentGutter:H,trackContentWidth:yi,totalH:Vt.totalH,effectiveDuration:tt,majorTickInterval:Pu,rangeSelection:$r,marqueeRect:Eu,laneGapStrips:At,theme:Z,displayTrackOrder:Vt.displayTrackOrder,rowHeights:Vt.displayRowHeights,rowGeometry:Vt.rowGeometry,virtualRows:os.virtualRows,logicalRows:os.logicalRows,focusedTargetId:os.focusedTargetId,rowsVirtualized:os.rowVirtualizationActive,clipIndex:ft,renderTimeRange:xe,visibleTimeRange:_e,pinnedClipIdentities:at,trackOrder:wt,tracks:Dt,trackStyles:We,groups:rn,laneCounts:dt,selectedElementId:F,selectedElementIds:U,hoveredClip:we,draggedClip:xt,resizingClip:Mn,isScrubbing:Aa,blockedClipRef:On,suppressClickRef:rt,scrollRef:Se,renderClipContent:os.rowVirtualizationActive&&bt.isScrolling?void 0:r,renderClipOverlay:i,playheadRef:Ae,onDrillDown:n,onSelectElement:v,setHoveredClip:ke,setShowPopover:ze,setRangeSelection:ys,setResizingClip:Rn,setDraggedClip:Wn,setSelectedElementId:Q,shiftClickClipRef:Nc,getPreviewElement:Br,getTrackStyle:Vue,keyframeCache:Gt,gsapAnimations:K,selectedKeyframes:Ys,currentTime:oe,onSeek:e,beatAnalysis:ne,onSelectSegment:ei,onClickKeyframe:Ks,onShiftClickKeyframe:Lr,onMoveKeyframe:$,onContextMenuKeyframe:va,onContextMenuClip:(Mt,cs)=>{Mt.preventDefault(),Q(cs.key??cs.id),v==null||v(cs),Sr(),St({x:Mt.clientX,y:Mt.clientY,element:cs,sessionEpoch:ue.getState().timelineSessionEpoch})},onContextMenuLane:(Mt,cs,rh)=>{xt!=null&&xt.started||Mn||(St(null),dn({x:Mt.clientX,y:Mt.clientY,track:cs,time:rh}))}}),ye==="razor"&&ir!==null&&m.jsx(kFe,{x:ir})]}),m.jsx(QLe,{elements:J,elementsRef:Ne,theme:Z,showShortcutHint:Pt,showPopover:Ke,rangeSelection:$r,setShowPopover:ze,setRangeSelection:ys,kfContextMenu:Ye,setKfContextMenu:pt,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:V,clipContextMenu:st,setClipContextMenu:St,currentTime:oe,onSplitElement:I,pinZoomBeforeEdit:Wt,onDeleteElement:c,gapContextMenu:ln,onDismissGapContextMenu:Sr,onCloseTrackGap:mr,onCloseAllTrackGaps:wr,onHoverGapAction:kn})]})}),m$e={overscan:0,visible:1,interaction:2},IX=Object.freeze({status:"idle"});function g$e(t){return t==="video"?"video":t==="composition"?"composition":"general"}function y$e(t){return t instanceof Error?t:new Error(String(t))}function pS(t){return Object.entries(t).filter(e=>e[1]!==void 0).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(n))}`).join("&")}function p_(t){return pS({project:t.projectId,session:t.sessionEpoch,request:t.key,kind:t.kind,rich:t.rich?1:0})}class x$e{constructor(e=Xo,n=Date.now){Ct(this,"entries",new Map);Ct(this,"budgets");Ct(this,"nextLeaseId",1);Ct(this,"nextSequence",1);Ct(this,"scrolling",!1);Ct(this,"cacheBytes",0);Ct(this,"waveformCacheBytes",0);Ct(this,"activeByBucket",{video:0,composition:0,general:0});Ct(this,"activeByKind",{video:0,image:0,composition:0,waveform:0});Ct(this,"now");this.budgets=e,this.now=n}acquire(e,n){const r=p_(e);let i=this.entries.get(r);(i==null?void 0:i.state)==="error"&&i.failedAt!==void 0&&this.now()-i.failedAt>=this.budgets.metadataFailureTtlMs&&(this.deleteEntry(r,i),i=this.entries.get(r)),i||(i={request:e,scopedKey:r,state:"queued",leases:new Map,listeners:new Map,controller:null,weight:0,disposed:!1,cached:!1,lastAccess:this.nextSequence++,snapshot:Object.freeze({status:"queued"})},this.entries.set(r,i));const s=this.nextLeaseId++;i.leases.set(s,e.priority),i.listeners.set(s,n),i.lastAccess=this.nextSequence++,this.pump();let a=!1;return{updatePriority:o=>{const l=this.entries.get(r);!l||!l.leases.has(s)||(l.leases.set(s,o),l.lastAccess=this.nextSequence++,this.pump())},release:()=>{var l;if(a)return;a=!0;const o=this.entries.get(r);o&&(o.leases.delete(s),o.listeners.delete(s),o.leases.size===0&&(o.state==="queued"?this.deleteEntry(r,o):o.state==="loading"?((l=o.controller)==null||l.abort(),this.deleteEntry(r,o)):o.state==="ready"&&!o.cached&&this.deleteEntry(r,o)),this.evict())}}}getSnapshot(e){const n=this.entries.get(p_(e));return n?n.snapshot:IX}setScrolling(e){this.scrolling!==e&&(this.scrolling=e,e||this.pump())}invalidateProject(e){var n;for(const[r,i]of this.entries)i.request.projectId===e&&(i.leases.size>0||((n=i.controller)==null||n.abort(),this.deleteEntry(r,i)))}getDiagnostics(){let e=0,n=0,r=0,i=0,s=0;for(const a of this.entries.values())a.state==="queued"&&e++,a.state==="loading"&&n++,a.cached&&(a.request.kind==="waveform"?s++:i++),r+=a.leases.size;return{queued:e,active:n,leases:r,cacheEntries:i,cacheBytes:this.cacheBytes,waveformCacheEntries:s,waveformCacheBytes:this.waveformCacheBytes,activeByKind:{...this.activeByKind}}}pump(){const e=Array.from(this.entries.values()).filter(n=>n.state==="queued"&&n.leases.size>0).sort((n,r)=>this.entryPriority(r)-this.entryPriority(n)||n.lastAccess-r.lastAccess);for(const n of e){if(this.scrolling&&n.request.rich)continue;const r=g$e(n.request.kind);this.activeByBucket[r]>=this.bucketLimit(r)||this.start(n,r)}}start(e,n){e.state="loading",e.snapshot=Object.freeze({status:"loading"});const r=new AbortController;e.controller=r,this.activeByBucket[n]++,this.activeByKind[e.request.kind]++,this.notify(e),this.loadWithTimeout(e,r).then(s=>this.acceptResult(e,r,s)).catch(s=>{if(this.entries.get(e.scopedKey)===e){if(r.signal.aborted&&e.leases.size===0){this.deleteEntry(e.scopedKey,e);return}e.state="error",e.error=y$e(s),e.failedAt=this.now(),e.snapshot=Object.freeze({status:"error",error:e.error}),this.notify(e),this.evictFailures()}}).finally(()=>{e.controller===r&&(e.controller=null),this.activeByBucket[n]--,this.activeByKind[e.request.kind]--,this.pump()})}acceptResult(e,n,r){if(n.signal.aborted||this.entries.get(e.scopedKey)!==e){this.safeDispose(r.dispose);return}this.validateResult(r),e.state="ready",e.value=r.value,e.weight=r.weight,e.dispose=r.dispose,this.cacheResult(e),e.snapshot=Object.freeze({status:"ready",value:r.value}),this.notify(e),this.evict(),!e.cached&&e.leases.size===0&&this.deleteEntry(e.scopedKey,e)}validateResult(e){if(!(Number.isFinite(e.weight)&&e.weight>=0))throw this.safeDispose(e.dispose),new RangeError("Thumbnail result weight must be finite and non-negative")}cacheResult(e){const n=e.request.kind==="waveform",r=n?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes;e.cached=e.weight<=r,e.cached&&(n?this.waveformCacheBytes+=e.weight:this.cacheBytes+=e.weight)}entryPriority(e){let n=-1;for(const r of e.leases.values())n=Math.max(n,m$e[r]);return n}bucketLimit(e){return e==="video"?this.budgets.concurrentVideoDecodes:e==="composition"?this.budgets.concurrentCompositionFetches:this.budgets.concurrentMetadataJobs}evict(){this.evictPartition(!1),this.evictPartition(!0)}evictPartition(e){const n=Array.from(this.entries.values()).filter(s=>s.cached&&s.request.kind==="waveform"===e),r=new Map;for(const s of n)r.set(s.request.projectId,(r.get(s.request.projectId)??0)+1);n.sort((s,a)=>s.lastAccess-a.lastAccess);let i=n.length;for(const s of n){const a=r.get(s.request.projectId)??0;this.isCacheOverBudget(e,i,a)&&(this.uncache(s),i--,r.set(s.request.projectId,a-1),s.leases.size===0&&this.deleteEntry(s.scopedKey,s))}}isCacheOverBudget(e,n,r){const i=e?this.budgets.waveformCacheEntries:this.budgets.thumbnailCacheEntries,s=e?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes,a=e?this.waveformCacheBytes:this.cacheBytes,o=!e&&r>this.budgets.thumbnailCacheEntriesPerProject;return n>i||a>s||o}uncache(e){e.cached=!1,e.request.kind==="waveform"?this.waveformCacheBytes-=e.weight:this.cacheBytes-=e.weight}notify(e){for(const n of new Set(e.listeners.values()))n()}loadWithTimeout(e,n){let r;try{r=e.request.load(n.signal)}catch(i){r=Promise.reject(i)}return new Promise((i,s)=>{let a=!1;const o=setTimeout(()=>{a||(a=!0,n.abort(),s(new Error(`Thumbnail load timed out after ${this.budgets.thumbnailLoadTimeoutMs}ms`)))},this.budgets.thumbnailLoadTimeoutMs);r.then(l=>{if(a){this.safeDispose(l.dispose);return}a=!0,clearTimeout(o),i(l)},l=>{a||(a=!0,clearTimeout(o),s(l))})})}deleteEntry(e,n){this.entries.get(e)===n&&(this.entries.delete(e),n.snapshot=IX,this.notify(n),n.cached&&(n.cached=!1,n.request.kind==="waveform"?this.waveformCacheBytes-=n.weight:this.cacheBytes-=n.weight),n.disposed||(n.disposed=!0,this.safeDispose(n.dispose)),n.listeners.clear(),n.leases.clear())}evictFailures(){const e=Array.from(this.entries.values()).filter(r=>r.state==="error"&&r.leases.size===0).sort((r,i)=>r.lastAccess-i.lastAccess),n=e.length-this.budgets.thumbnailCacheEntries;for(const r of e.slice(0,Math.max(0,n)))this.deleteEntry(r.scopedKey,r)}safeDispose(e){try{e==null||e()}catch{}}}const b$e=new x$e,_X=Object.freeze({status:"idle"});function VE(t,e=b$e){const n=x.useRef(t);n.current=t;const r=x.useRef(null),i=t?p_(t):null,s=t==null?void 0:t.priority,a=x.useCallback(l=>{const c=n.current;if(!c||i===null)return()=>{};const u=e.acquire(c,l);return r.current=u,()=>{r.current===u&&(r.current=null),u.release()}},[i,e]),o=x.useCallback(()=>{const l=n.current;return l&&i!==null?e.getSnapshot(l):_X},[i,e]);return x.useLayoutEffect(()=>{var l;s&&((l=r.current)==null||l.updatePriority(s))},[s]),x.useSyncExternalStore(a,o,()=>_X)}function v$e(t,e,n){const r=Math.max(0,Number.isFinite(t)?t:0),i=Math.max(0,Number.isFinite(e)?e:0),s=Math.max(1,Number.isFinite(n)?Math.floor(n):1);return s===1?[r+i/2]:Array.from({length:s},(a,o)=>r+i*o/(s-1))}async function A$e(t){return t instanceof HTMLCanvasElement?new Promise((e,n)=>{t.toBlob(r=>r?e(r):n(new Error("Video thumbnail encode failed")),"image/jpeg",.72)}):t.convertToBlob({type:"image/jpeg",quality:.72})}function y1(t){if(t.aborted)throw new DOMException("Aborted","AbortError")}function hhe(t){for(const e of t.urls.splice(0))URL.revokeObjectURL(e);for(const e of t.canvases)e.width=0,e.height=0;t.canvases.clear()}function S$e(t,e){const n=Math.max(1,Math.min(e.posterMaxPhysicalWidth,Math.round(e.posterMaxPhysicalHeight*t)));return{width:n,height:Math.max(1,Math.min(e.posterMaxPhysicalHeight,Math.round(n/t)))}}async function w$e(t,e,n,r){for await(const i of t.canvasesAtTimestamps(e)){if(y1(n),!i)continue;r.canvases.add(i.canvas);const s=await A$e(i.canvas);y1(n),r.urls.push(URL.createObjectURL(s))}}function O$e(t,e,n,r){const i=t.urls[0];if(!i)throw new Error("Video source returned no thumbnail frames");return{value:t.urls.length===1?{kind:"image",url:i,aspect:e}:{kind:"filmstrip",urls:[...t.urls],aspect:e},weight:n*r*4*t.urls.length,dispose:()=>hhe(t)}}async function k$e(t,e,n=Xo){const r=await BA(()=>import("./index-DV45YLqR.js"),[]);y1(e);const i=new r.Input({source:new r.UrlSource(t.source),formats:r.ALL_FORMATS}),s={urls:[],canvases:new Set};try{const a=await i.getPrimaryVideoTrack();if(y1(e),!a)throw new Error("Video source has no decodable video track");const[o,l]=await Promise.all([a.getDisplayWidth(),a.getDisplayHeight()]);if(y1(e),!(o>0&&l>0))throw new Error("Video source has invalid dimensions");const c=await a.getDurationFromMetadata({skipLiveWait:!0});y1(e);const u=Math.max(0,c??t.sourceRangeDuration??0),f=Math.min(Math.max(0,t.sourceStart??0),u),h=t.sourceRangeDuration??Math.max(0,u-f),d=Math.min(Math.max(0,h),Math.max(0,u-f)),y=v$e(f,d,Math.min(t.frameCount,n.richPreviewFrameCount)),g=o/l,v=S$e(g,n),b=new r.CanvasSink(a,{width:v.width,height:v.height,fit:t.fit??"cover",poolSize:1});return await w$e(b,y,e,s),O$e(s,g,v.width,v.height)}catch(a){throw hhe(s),a}finally{i.dispose()}}const dhe=66;function phe(t,e,n=!1){return new Promise((r,i)=>{const s=new Image,a=()=>{s.onload=null,s.onerror=null,e.removeEventListener("abort",o)},o=()=>{a(),s.src="",i(new DOMException("Aborted","AbortError"))};if(e.aborted){o();return}s.onload=()=>{a(),r(s.naturalWidth>0&&s.naturalHeight>0?s.naturalWidth/s.naturalHeight:16/9)},s.onerror=()=>{a(),n&&/\.svg($|\?)/i.test(t)?r(16/9):i(new Error("Image thumbnail failed to load"))},e.addEventListener("abort",o,{once:!0}),s.src=t})}function zL(t,e,n=dhe,r=1){const i=Number.isFinite(e)&&e>0?e:1.7777777777777777,s=Math.max(r,Math.round(n*i)),a=t>0?Math.max(1,Math.ceil(t/s)):1;return{frameW:s,frameCount:a}}function tA(t){return t.split("/").map(encodeURIComponent).join("/")}function ly(t,e,n){if(!t||/^(?:data:|blob:)/i.test(t))return t;let r=t,i="";if(/^https?:/i.test(t)){let s;try{s=new URL(t)}catch{return t}if(!n||s.origin!==n)return t;const a=new URL(`/api/projects/${e}/preview/`,n).pathname;if(s.pathname.startsWith(a)||s.pathname.startsWith("/api/"))return t;try{r=s.pathname.replace(/^\/+/,"").split("/").map(decodeURIComponent).join("/")}catch{return t}i=`${s.search}${s.hash}`}return`/api/projects/${e}/preview/${tA(r.replace(/^\/+/,""))}${i}`}const C$e=x.memo(function({videoSrc:e,label:n,labelColor:r,duration:i=5,sourceStart:s,sourceRangeDuration:a,projectId:o=e,sessionEpoch:l=0,priority:c="visible",rich:u=!1}){const[f,h]=x.useState(0),d=x.useRef(null),y=x.useMemo(()=>({key:pS({kind:"video",source:e,start:s,duration:a??i,frames:u?6:1}),projectId:o,sessionEpoch:l,kind:"video",priority:c,rich:u,load:M=>k$e({source:e,sourceStart:s,sourceRangeDuration:a??i,frameCount:u?6:1,fit:"cover"},M)}),[i,c,o,u,l,a,s,e]),g=VE(y),v=g.status==="ready"?g.value:null,b=(v==null?void 0:v.kind)==="filmstrip"?v.urls:(v==null?void 0:v.kind)==="image"?[v.url]:[],w=(v==null?void 0:v.kind)==="image"||(v==null?void 0:v.kind)==="filmstrip"?v.aspect:16/9,{frameW:O,frameCount:C}=zL(f,w,dhe),E=x.useCallback(M=>{var I;if((I=d.current)==null||I.disconnect(),!M)return;const N=M.parentElement??M;h(N.clientWidth),d.current=new ResizeObserver(([_])=>h(_.contentRect.width)),d.current.observe(N)},[]);return Ar(()=>()=>{var M;return(M=d.current)==null?void 0:M.disconnect()}),m.jsxs("div",{ref:E,className:"absolute inset-0 overflow-hidden",children:[b.length>0&&m.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:C},(M,N)=>{const I=b[N%b.length];return m.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden bg-neutral-900",style:{width:O},children:m.jsx("img",{src:I,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover"})},N)})}),g.status==="loading"&&b.length===0&&m.jsx("div",{className:"absolute inset-0 animate-pulse motion-reduce:animate-none",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%)"}}),g.status==="error"&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-neutral-900/60",children:m.jsx("span",{className:"rounded bg-black/50 px-1 text-[8px] text-neutral-500",children:"no preview"})}),n&&m.jsx("div",{className:"absolute inset-x-0 bottom-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:m.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:n})})]})}),E$e=66,T$e="v3";function GL({previewUrl:t,seekTime:e=2,duration:n=5,selector:r,selectorIndex:i,origin:s,output:a}){const o=t.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),l=new URL(o,s);return l.searchParams.set("t",(e+n/2).toFixed(2)),l.searchParams.set("v",T$e),a&&l.searchParams.set("output",a),r&&(l.searchParams.set("selector",r),i!=null&&i>0&&l.searchParams.set("selectorIndex",String(i))),l.toString()}async function P$e(t,e){const n=await fetch(t,{signal:e});if(!n.ok)throw new Error(`Composition thumbnail failed (${n.status})`);const r=await n.blob();if(e.aborted)throw new DOMException("Aborted","AbortError");const i=URL.createObjectURL(r);try{const s=await phe(i,e);return{value:{kind:"image",url:i,aspect:s},weight:Xo.posterMaxPhysicalWidth*Xo.posterMaxPhysicalHeight*4,dispose:()=>URL.revokeObjectURL(i)}}catch(s){throw URL.revokeObjectURL(i),s}}const sM=x.memo(function({previewUrl:e,label:n,labelColor:r,selector:i,selectorIndex:s,seekTime:a=2,duration:o=5,projectId:l=e,sessionEpoch:c=0,priority:u="visible"}){const[f,h]=x.useState(0),d=x.useRef(null),y=GL({previewUrl:e,seekTime:a,duration:o,selector:i,selectorIndex:s,origin:window.location.origin}),g=x.useMemo(()=>({key:pS({kind:"composition",url:y}),projectId:l,sessionEpoch:c,kind:"composition",priority:u,rich:!0,load:E=>P$e(y,E)}),[u,l,c,y]),v=VE(g),b=v.status==="ready"&&v.value.kind==="image"?v.value:null,{frameW:w,frameCount:O}=zL(f,(b==null?void 0:b.aspect)??16/9,E$e,48),C=x.useCallback(E=>{var N;if((N=d.current)==null||N.disconnect(),!E)return;const M=E.parentElement??E;h(M.clientWidth),d.current=new ResizeObserver(([I])=>h(I.contentRect.width)),d.current.observe(M)},[]);return Ar(()=>()=>{var E;return(E=d.current)==null?void 0:E.disconnect()}),m.jsxs("div",{ref:C,className:"absolute inset-0 overflow-hidden",children:[b&&m.jsx("div",{className:"absolute inset-0 flex",style:{animation:"hf-thumb-fade 200ms ease-out",mixBlendMode:"lighten"},children:Array.from({length:O},(E,M)=>m.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:w},children:m.jsx("img",{src:b.url,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover",style:{opacity:.7}})},M))}),v.status==="loading"&&m.jsx("div",{className:"absolute inset-0 animate-pulse bg-white/[0.035]"}),n&&m.jsx("div",{className:"absolute inset-y-0 left-3 z-10 flex items-center",children:m.jsx("span",{className:"block max-w-full truncate text-[10px] font-semibold leading-none",style:{color:r,textShadow:b?"0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6)":"none"},children:n})})]})});let RX=0;const M$e=800,jX={isEditMode:!1,dismissed:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null,syncError:null,retrySave:null,past:[],future:[]};let H2=null,aM=0;function $c(t,e){if(!t.model)return{};const n=Date.now();return H2===e&&n-aM<M$e?(aM=n,{future:[]}):(H2=e,aM=n,{past:[...t.past,t.model].slice(-50),future:[]})}const An=ZC((t,e)=>({...jX,setEditMode:n=>t({isEditMode:n}),setDismissed:n=>t({dismissed:n}),setModel:n=>t({model:n}),setSourceFilePath:n=>t({sourceFilePath:n}),setSyncError:n=>t({syncError:n}),setRetrySave:n=>t({retrySave:n}),undo:()=>{const{model:n,past:r,future:i}=e(),s=r[r.length-1];return!s||!n?null:(H2=null,t({model:s,past:r.slice(0,-1),future:[...i,n]}),s)},redo:()=>{const{model:n,past:r,future:i}=e(),s=i[i.length-1];return!s||!n?null:(H2=null,t({model:s,past:[...r,n].slice(-50),future:i.slice(0,-1)}),s)},selectSegment:(n,r=!1)=>t(i=>{if(r){const s=new Set(i.selectedSegmentIds);return s.has(n)?s.delete(n):s.add(n),{selectedSegmentIds:s,selectedGroupId:null}}return{selectedSegmentIds:new Set([n]),selectedGroupId:null}}),selectGroup:n=>{var i;const r=(i=e().model)==null?void 0:i.groups.get(n);r&&t({selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:n})},selectAll:()=>t(n=>n.model?{selectedSegmentIds:new Set(n.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>{const{selectedSegmentIds:n,selectedGroupId:r}=e();n.size===0&&r===null||t({selectedSegmentIds:new Set,selectedGroupId:null})},updateSegmentStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,style:{...s.style,...r}}),{...$c(i,`seg-style:${n}`),model:{...i.model,segments:a}}}),updateSegmentText:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,text:r}),{...$c(i,`seg-text:${n}`),model:{...i.model,segments:a}}}),updateSegmentTiming:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.segments.get(n);if(!a)return{};const o=new Map(s.model.segments);return o.set(n,{...a,start:r,end:i}),{...$c(s,`seg-timing:${n}`),model:{...s.model,segments:o}}}),updateGroupStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,style:{...s.style,...r}}),{...$c(i,`group-style:${n}`),model:{...i.model,groups:a}}}),updateGroupContainer:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,containerStyle:{...s.containerStyle,...r}}),{...$c(i,`group-container:${n}`),model:{...i.model,groups:a}}}),updateGroupAnimation:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.groups.get(n);if(!a)return{};const o=new Map(s.model.groups),l=a.animation[r],c=l!==null?{...l,...i}:i;return o.set(n,{...a,animation:{...a.animation,[r]:c}}),{...$c(s,`group-anim:${n}:${r}`),model:{...s.model,groups:o}}}),splitGroup:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=s.segmentIds.indexOf(r);if(a<=0)return{};const o=s.segmentIds.slice(0,a),l=s.segmentIds.slice(a),c=`group-split-${RX++}`,u=new Map(i.model.groups);u.set(n,{...s,segmentIds:o}),u.set(c,{...s,id:c,segmentIds:l});const f=i.model.groupOrder.indexOf(n),h=[...i.model.groupOrder];h.splice(f+1,0,c);const d=new Map(i.model.segments);return l.forEach((y,g)=>{const v=d.get(y);v&&d.set(y,{...v,groupIndex:g})}),{...$c(i,`split:${n}:${r}:${RX}`),model:{...i.model,groups:u,segments:d,groupOrder:h}}}),mergeGroups:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n),a=i.model.groups.get(r);if(!s||!a)return{};const o=[...s.segmentIds,...a.segmentIds],l=new Map(i.model.groups);l.set(n,{...s,segmentIds:o}),l.delete(r);const c=i.model.groupOrder.filter(h=>h!==r),u=new Map(i.model.segments);a.segmentIds.forEach((h,d)=>{const y=u.get(h);y&&u.set(h,{...y,groupIndex:s.segmentIds.length+d})});const f=i.selectedGroupId===r?null:i.selectedGroupId;return{...$c(i,`merge:${n}:${r}`),model:{...i.model,groups:l,segments:u,groupOrder:c},selectedGroupId:f}}),updateSelectedStyle:n=>t(r=>{if(!r.model||r.selectedSegmentIds.size===0)return{};const i=new Map(r.model.segments);for(const s of r.selectedSegmentIds){const a=i.get(s);a&&i.set(s,{...a,style:{...a.style,...n}})}return{...$c(r,`sel-style:${[...r.selectedSegmentIds].join(",")}`),model:{...r.model,segments:i}}}),applyAnimationToAll:n=>t(r=>{if(!r.model)return{};const i=new Map(r.model.groups);for(const[s,a]of i)i.set(s,{...a,animation:n});return{...$c(r,"apply-anim-all"),model:{...r.model,groups:i}}}),reset:()=>{H2=null,t(n=>({...jX,retrySave:n.retrySave,selectedSegmentIds:new Set,past:[],future:[]}))}})),N$e=new Set(["ArrowLeft","ArrowRight"]),D$e=["button","a[href]","[role='button']","[role='checkbox']","[role='combobox']","[role='menuitem']","[role='radio']","[role='slider']","[role='spinbutton']","[role='switch']","[role='textbox']"].join(",");function I$e(t){if(_f(t))return!0;if(!t||typeof t!="object")return!1;const e=t;return typeof e.closest!="function"?!1:e.closest.call(t,D$e)!==null}function _$e(t,e={isCaptionEditMode:!1,selectedCaptionSegmentCount:0}){return t.metaKey||t.ctrlKey||t.altKey||I$e(t.target)?!0:N$e.has(t.code)&&e.isCaptionEditMode&&e.selectedCaptionSegmentCount>0}const LX=[1,2,4];let m_=0;function R$e(){m_+=1;let t=!1;return()=>{t||(t=!0,m_-=1)}}function j$e(){return m_>0}function L$e({iframeRef:t,shuttleDirectionRef:e,shuttleSpeedIndexRef:n,iframeShortcutCleanupRef:r,getAdapter:i,play:s,playBackward:a,pause:o,seek:l}){const c=x.useRef(new Set),u=x.useRef(()=>{}),f=x.useRef(()=>{}),h=x.useCallback(w=>{const O=i(),C=(O==null?void 0:O.getTime())??ue.getState().currentTime;l(Q4e(C,w,Md))},[i,l]),d=x.useCallback(w=>{e.current===w?n.current=Math.min(n.current+1,LX.length-1):n.current=0;const O=LX[n.current];ue.getState().setPlaybackRate(O),w==="forward"?s():a(O)},[s,a,e,n]),y=x.useCallback(()=>{ue.getState().isPlaying?o():s()},[s,o]),g=x.useCallback(w=>{var M,N,I;if(w.defaultPrevented)return;const O=An.getState();if(_$e(w,{isCaptionEditMode:O.isEditMode,selectedCaptionSegmentCount:O.selectedSegmentIds.size}))return;const C=w.key.toLowerCase();if(c.current.add(C),w.code==="Space"){w.preventDefault(),y();return}if(!((w.code==="ArrowLeft"||w.code==="ArrowRight")&&j$e())){if(w.code==="ArrowLeft"){w.preventDefault(),h(w.shiftKey?-10:-1);return}if(w.code==="ArrowRight"){w.preventDefault(),h(w.shiftKey?10:1);return}if(!w.repeat){if(C==="m"){w.preventDefault();const _=ue.getState();_.setAudioMuted(!_.audioMuted);return}if(C==="l"&&w.shiftKey){w.preventDefault();const _=ue.getState();_.setLoopEnabled(!_.loopEnabled);return}if(C==="k"){w.preventDefault(),o();return}if(C==="j"){if(w.preventDefault(),c.current.has("k")){h(-1);return}d("backward");return}if(C==="l"){if(w.preventDefault(),c.current.has("k")){h(1);return}d("forward");return}if(C==="i"){w.preventDefault();const _=((M=i())==null?void 0:M.getTime())??ue.getState().currentTime;ue.getState().setInPoint(w.shiftKey?null:_);return}if(C==="o"){w.preventDefault();const _=((N=i())==null?void 0:N.getTime())??ue.getState().currentTime;ue.getState().setOutPoint(w.shiftKey?null:_);return}if(C==="a"){w.preventDefault(),l(ue.getState().inPoint??0,{keepPlaying:!0});return}if(C==="e"){w.preventDefault();const{outPoint:_}=ue.getState();l(_??((I=i())==null?void 0:I.getDuration())??ue.getState().duration,{keepPlaying:!0});return}}}},[o,d,h,y,i,l]),v=x.useCallback(w=>{c.current.delete(w.key.toLowerCase())},[]);u.current=g,f.current=v;const b=x.useCallback(()=>{var M,N,I;(M=r.current)==null||M.call(r),r.current=null;let w=null,O=null;try{w=((N=t.current)==null?void 0:N.contentWindow)??null,O=((I=t.current)==null?void 0:I.contentDocument)??null}catch{return}if(!w&&!O)return;const C=_=>u.current(_),E=_=>f.current(_);try{w==null||w.addEventListener("keydown",C,!0),w==null||w.addEventListener("keyup",E,!0)}catch{}O==null||O.addEventListener("keydown",C,!0),O==null||O.addEventListener("keyup",E,!0),r.current=()=>{try{w==null||w.removeEventListener("keydown",C,!0),w==null||w.removeEventListener("keyup",E,!0)}catch{}O==null||O.removeEventListener("keydown",C,!0),O==null||O.removeEventListener("keyup",E,!0)}},[t,r]);return{playbackKeyDownRef:u,playbackKeyUpRef:f,attachIframeShortcutListeners:b,togglePlay:y}}function FX(t){t&&t.style.visibility==="hidden"&&(t.style.visibility="")}function F$e(t){const e=t.pendingSeek??t.requestedSeek??t.storeCurrentTime;return!Number.isFinite(e)||e<=0?0:!Number.isFinite(t.duration)||t.duration<=0?e:Math.min(e,t.duration)}function $X(t){return Number.isFinite(t)&&t>0&&t<7200?t:0}function $$e(t){return Math.max($X(t.manifestDurationSeconds),$X(t.authoredRootDurationSeconds))}function B$e({iframeRef:t,probeIntervalRef:e,pendingSeekRef:n,isRefreshingRef:r,getAdapter:i,syncTimelineElements:s,setDuration:a,setCurrentTime:o,setTimelineReady:l,setIsPlaying:c,attachIframeShortcutListeners:u,applyPreviewAudioState:f}){const h=x.useCallback(w=>{var $,Z;if(!w.clips||w.clips.length===0)return;ue.getState().setClipManifest(w.clips);const O=new Set(w.clips.map(W=>W.compositionId).filter(Boolean)),C=w.clips.filter(W=>!W.parentCompositionId||!O.has(W.parentCompositionId));let E=null;try{E=(($=t.current)==null?void 0:$.contentDocument)??null}catch{E=null}try{const W=(Z=t.current)==null?void 0:Z.contentWindow,Y=W==null?void 0:W.__clipTree,J=new Map;if(Y){const ie=le=>{for(const q of le)q.id&&q.parentId&&J.set(q.id,q.parentId),q.children.length>0&&ie(q.children)};ie(Y.roots)}const ne=[];if(E)for(const ie of w.clips){if(ie.kind!=="composition"||!ie.id)continue;const le=E.getElementById(ie.id);if(!le)continue;const q=ie.id,F=le.querySelector("[data-hf-inner-root]")??le,U=(z,K)=>{for(const te of Array.from(z.children)){if(!te.id){U(te,K);continue}const ee=te.hasAttribute("data-hf-group");ne.push({id:te.id,parentId:K,hostId:q,label:ee&&te.getAttribute("data-hf-group")||te.id,stackingContextId:WR(te)}),J.set(te.id,K),ee&&U(te,te.id)}};U(F,q)}ue.getState().setClipParentMap(J),ue.getState().setDomClipChildren(ne)}catch{}const M=new Set,N=C.map((W,Y)=>{const J=E?Q6e(E,W,Y,M):null;return J&&M.add(J),Ese({clip:W,fallbackIndex:Y,doc:E,hostEl:J})}),I=w.durationInFrames/yCe(w),_=$$e({manifestDurationSeconds:I,authoredRootDurationSeconds:sse(E)}),j=_>0?_:ue.getState().duration,L=j>0?N.filter(W=>W.start<j).map(W=>({...W,duration:Math.min(W.duration,j-W.start)})).filter(W=>W.duration>0):N,V=E&&j>0?[...L,...Tse(E,j,L)]:L;V.length>0&&s(V,_>0?_:void 0)},[t,s]),d=x.useCallback(()=>{try{const w=t.current,O=w==null?void 0:w.contentDocument,C=w==null?void 0:w.contentWindow;if(!O||!C)return;const E=ue.getState().elements,M=ue.getState().duration,{missing:N,updatedEls:I,patched:_}=ICe(O,C,E,M);if(N.length>0||_){const j=new Set(I.map(V=>V.id)),L=N.filter(V=>!j.has(V.id));s([...I,...L])}}catch{}},[t,s]),y=x.useCallback(()=>{const w=i();if(!w||w.getDuration()<=0)return!1;w.pause();const O=ue.getState().requestedSeekTime,C=F$e({pendingSeek:n.current,requestedSeek:O,storeCurrentTime:ue.getState().currentTime,duration:w.getDuration()});n.current=null,O!=null&&ue.getState().clearSeekRequest();const E=C>.001?Math.max(0,C-.001):.001;w.seek(E),w.seek(C),FX(t.current),pa.notify(C);const M=w.getDuration();Number.isFinite(M)&&M>0&&M<7200&&M!==ue.getState().duration&&a(M),o(C),r.current||l(!0),r.current=!1,c(!1);try{const N=t.current,I=N==null?void 0:N.contentDocument,_=N==null?void 0:N.contentWindow;I&&_&&(xCe(I,_),bCe(I),u());const j=_==null?void 0:_.__clipManifest;if(j&&j.clips.length>0&&h(j),d(),f(),ue.getState().elements.length===0&&I){const L=Pse(I,w.getDuration());L.length>0&&s(L)}if(ue.getState().elements.length===0&&I){const L=I.querySelector("[data-composition-id]"),V=w.getDuration();if(L&&V>0){const $=jCe({compositionId:L.getAttribute("data-composition-id")||"composition",tagName:L.tagName||"div",rootDuration:V,iframeSrc:(N==null?void 0:N.src)||"",selector:s0(L)});$&&s([$])}}}catch{}return!0},[i,a,o,l,c,h,d,s,u,f,t,r,n]),g=x.useCallback(()=>{if(f(),e.current&&clearInterval(e.current),y())return;const w=t.current;let O=!1;const C=()=>{O||y()&&(O=!0,window.removeEventListener("message",E),e.current&&clearInterval(e.current))},E=M=>{if(M.source&&w&&M.source!==w.contentWindow)return;const N=M.data;if((N==null?void 0:N.source)==="hf-preview"&&((N==null?void 0:N.type)==="state"||(N==null?void 0:N.type)==="timeline")){if(YR(N).status==="unsupported")return;C()}};window.addEventListener("message",E),e.current=setTimeout(()=>{O||C(),window.removeEventListener("message",E),FX(t.current)},5e3)},[y,t,e,f]);return{processTimelineMessage:h,processTimelineMessageRef:{current:h},enrichMissingCompositions:d,enrichMissingCompositionsRef:{current:d},initializeAdapter:y,onIframeLoad:g}}function V$e({rafRef:t,reverseRafRef:e,getAdapter:n,setCurrentTime:r,setIsPlaying:i}){const s=x.useCallback(()=>{cancelAnimationFrame(e.current)},[e]),a=x.useCallback(()=>{const l=()=>{const c=n();if(c){const u=c.getTime(),f=c.getDuration(),h=f>0?Math.min(u,f):u;pa.notify(h);const{inPoint:d,outPoint:y}=ue.getState(),g=y!==null?Math.min(y,f):f,v=d!==null?d:0,b=v<g?g:f,w=v<g?v:0;if(h>=b){if(ue.getState().loopEnabled&&f>0){c.seek(w,{keepPlaying:!0}),pa.notify(w),c.play(),i(!0),t.current=requestAnimationFrame(l);return}c.isPlaying()&&c.pause(),r(h),i(!1),cancelAnimationFrame(t.current);return}}t.current=requestAnimationFrame(l)};t.current=requestAnimationFrame(l)},[t,n,r,i]),o=x.useCallback(()=>{cancelAnimationFrame(t.current)},[t]);return{startRAFLoop:a,stopRAFLoop:o,stopReverseLoop:s}}function mS(t){let e=null;return(n,r={})=>{if(e===null)try{e=localStorage.getItem(`hf-${t}-debug`)==="1"}catch{e=!1}if(!e)return;const i=typeof r=="function"?r():r;i&&console.log(`[hf-${t}] ${JSON.stringify({stage:n,t:Math.round(performance.now()),...i})}`)}}const qm=mS("reload");function H$e(t,e){const n=ue.getState(),r=o0(n.elements).musicElement;if(!r||n.audioMuted)return;const i=e-r.start,s=i>=0&&i<=r.duration?(r.playbackStart??0)+i:null;CCe(t,s,r.domId??r.id,n.audioVolume)}const i2=1e3;let mhe=!1;const BX=Object.freeze({"dense-short":{duration:120,clipDuration:1.5},"long-overlap":{duration:7200,clipDuration:120},"keyframe-heavy-expanded":{duration:600,clipDuration:8},"composition-heavy":{duration:900,clipDuration:12},"remote-unsupported":{duration:900,clipDuration:12}});function Q$e(t){mhe=t}function ghe(){return mhe}function Z$e(t){if(t.elementCount!==1e3&&t.elementCount!==5e4)throw new RangeError("Timeline performance fixture elementCount must be 1000 or 50000");if(!Object.hasOwn(BX,t.profile))throw new RangeError(`Unknown timeline performance fixture profile: ${t.profile}`);return BX[t.profile]}function z$e(t,e){if(t<i2)return t;if(e.profile!=="dense-short")return t%i2;const n=Math.ceil((e.elementCount-i2)/127);return(t-i2)%Math.max(1,n)}function G$e(t,e,n,r){const i=Math.max(0,n-r);return e==="dense-short"?t%128*.5:e==="long-overlap"?t*37%Math.max(1,i):t*17%Math.max(1,i)}function U$e(){return{format:"percentage",keyframes:[0,33,66,100].map(t=>({percentage:t,propertyGroup:"position",properties:{x:t},ease:"power2.inOut"}))}}function X$e(t,e,n){return{id:`animation-${t}`,targetSelector:`#${t}`,method:"to",position:e,resolvedStart:e,duration:n,propertyGroup:"position",fromProperties:{x:0},properties:{x:100},ease:"power2.inOut"}}function W$e(t){const e=Z$e(t),n=[],r=new Map,i=new Map,s=new Set;for(let a=0;a<t.elementCount;a+=1){const o=`perf-${t.profile}-${t.elementCount}-${a}`,l=G$e(a,t.profile,e.duration,e.clipDuration),c=z$e(a,t),u={id:o,key:o,domId:o,selector:`#${o}`,label:`Fixture ${a+1}`,tag:t.profile==="remote-unsupported"&&a%2===0?"video":"div",start:l,duration:e.clipDuration,track:c,authoredTrack:c};t.profile==="composition-heavy"?u.compositionSrc=`compositions/perf-${a%32}.html`:t.profile==="remote-unsupported"&&(u.src=a%2===0?`https://media.invalid/perf-${a%32}.mp4`:`assets/perf-${a%32}.unsupported`),t.profile==="keyframe-heavy-expanded"&&(r.set(o,U$e()),i.set(o,[X$e(o,l,e.clipDuration)]),s.add(o)),n.push(u)}return{summary:Object.freeze({...t,duration:e.duration,trackCount:i2,keyframedElementCount:r.size,expandedElementCount:s.size}),elements:n,keyframeCache:r,gsapAnimations:i,expandedClipIds:s}}const Q2=new Map,g_=new Map,V1=new Map;let K6=0,oM=0,y_=0;const yhe=[];let Lm=null;async function Y$e(){if(Lm===!1)return null;if(Lm)return Lm;try{return Lm=await BA(()=>import("./index-DV45YLqR.js"),[]),Lm}catch{return Lm=!1,null}}function UL(t){try{return new URL(t,window.location.href).href}catch{return t}}async function q$e(t){const e=await Y$e();if(!e)return null;const n=new e.Input({source:new e.UrlSource(t),formats:e.ALL_FORMATS});try{const r=await n.getDurationFromMetadata();if(r==null||!Number.isFinite(r)||r<=0)return null;const i=await n.getPrimaryVideoTrack(),s=await n.getAudioTracks();return{duration:r,width:i==null?void 0:i.displayWidth,height:i==null?void 0:i.displayHeight,hasVideo:i!=null,hasAudio:s.length>0}}catch{return null}finally{n.dispose()}}function XL(t){const e=Q2.get(UL(t));return e&&(e.lastAccess=++K6),e==null?void 0:e.result}function xhe(t,e){return e?ly(t,e,window.location.origin):t}function K$e(){const t=Q2.size+V1.size-Xo.metadataRegistryEntries;if(t<=0)return;const e=[...Array.from(Q2,([n,r])=>({key:n,at:r.lastAccess,failed:!1})),...Array.from(V1,([n,r])=>({key:n,at:r.lastAccess,failed:!0}))].sort((n,r)=>n.at-r.at);for(const n of e.slice(0,t))n.failed?V1.delete(n.key):Q2.delete(n.key)}function J$e(t,e){return t.map(n=>{const r=n.tag.toLowerCase();if(!n.src||n.sourceDuration!=null||r!=="audio"&&r!=="video")return n;const i=XL(xhe(n.src,e));return i!=null&&i.duration&&i.duration>0?{...n,sourceDuration:i.duration}:n})}async function eBe(t,e,n){const r=t.flatMap(i=>{if(!i.src||i.sourceDuration!=null||!["video","audio"].includes(i.tag.toLowerCase()))return[];const s=xhe(i.src,e);return!XL(s)&&!bhe(UL(s))?[{el:i,source:s}]:[]});r.length!==0&&await Promise.allSettled(r.map(async({el:i,source:s})=>{const a=await tBe(s);a&&n(i.key??i.id,a.duration)}))}function bhe(t){const e=V1.get(t);return e===void 0?!1:Date.now()-e.failedAt<Xo.metadataFailureTtlMs?(e.lastAccess=++K6,!0):(V1.delete(t),!1)}async function tBe(t){const e=UL(t),n=XL(e);if(n)return n;if(bhe(e))return null;let r=g_.get(e);return r||(r=new Promise(i=>{yhe.push({key:e,epoch:y_,resolve:i}),vhe()}),g_.set(e,r),r)}function vhe(){for(;oM<Xo.concurrentMetadataJobs;){const t=yhe.shift();if(!t)return;if(t.epoch!==y_){t.resolve(null);continue}oM++,q$e(t.key).then(e=>t.epoch!==y_?null:(g_.delete(t.key),e?Q2.set(t.key,{result:e,lastAccess:++K6}):V1.set(t.key,{failedAt:Date.now(),lastAccess:++K6}),K$e(),e)).then(t.resolve).finally(()=>{oM--,vhe()})}}function nBe(t){return t.keepPlaying&&!t.wasReverseShuttle&&t.storeWasPlaying&&(t.duration<=0||t.nextTime<t.duration)}function rBe(t){return!t.keepPlaying||t.wasReverseShuttle}function iBe(t,e){return!!(t.source&&e&&t.source!==e.contentWindow)}function sBe(t,e){if(ghe()||iBe(t,e))return null;const n=t.data;return(n==null?void 0:n.source)!=="hf-preview"?null:rE(n)?n:null}function aBe(t){const e=s9e(t);e&&n_.notify(e)}function oBe(t,e){var n;try{if(ue.getState().elements.length===0){const r=(n=e==null?void 0:e.contentWindow)==null?void 0:n.__clipManifest;r&&r.clips.length>0&&t.processTimelineMessageRef.current(r)}Date.now()-t.lastTimelineMessageRef.current>500&&t.enrichMissingCompositionsRef.current()}catch{}}function lBe(t,e,n){if(t.lastTimelineMessageRef.current=Date.now(),t.processTimelineMessageRef.current(n),t.enrichMissingCompositionsRef.current(),!(ue.getState().elements.length>0))try{const r=e==null?void 0:e.contentDocument,i=t.getAdapter();if(!r||!i)return;const s=Pse(r,i.getDuration());s.length>0&&t.syncTimelineElements(s)}catch{}}function cBe(t){return e=>{const n=t.iframeRef.current,r=sBe(e,n);if(r){if(r.type==="group-levels")return aBe(r);if(r.type==="state")return oBe(t,n);r.type==="timeline"&&Array.isArray(r.clips)&&lBe(t,n,r)}}}function uBe(t,e){return e.length!==t.length?!0:e.some((n,r)=>{const i=t[r];return!i||n.id!==i.id||n.start!==i.start||n.duration!==i.duration||n.track!==i.track||n.sourceDuration!==i.sourceDuration})}function fBe(){const t=x.useRef(null),e=x.useRef(0),n=x.useRef(void 0),r=x.useRef(null),i=x.useRef(!1),s=x.useRef(0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(!1),{setIsPlaying:h,setCurrentTime:d,setDuration:y,setTimelineReady:g,setElements:v}=ue.getState(),b=x.useCallback((U,z)=>{if(ghe())return;const K=ue.getState(),te=z??K.duration,ee=Zfe(J$e(_Ce(K.elements,U,K.duration,te),K.timelineProjectId));uBe(K.elements,ee)&&v(ee),Number.isFinite(z)&&(z??0)>0&&z!==K.duration&&y(z??0),K.timelineReady||g(!0),eBe(ee,K.timelineProjectId,(H,Q)=>{ue.setState(oe=>{const fe=oe.elements.findIndex(be=>(be.key??be.id)===H);if(fe===-1||oe.elements[fe].sourceDuration!=null)return{};const pe=oe.elements.slice();return pe[fe]={...oe.elements[fe],sourceDuration:Q},{elements:pe}})})},[v,g,y]),w=x.useCallback(()=>{var U,z;try{const K=t.current,te=K==null?void 0:K.contentWindow;if(!K||!te)return null;const ee=te.__player&&typeof te.__player.play=="function"?te.__player:null,H=sse(K.contentDocument),Q=u4(ee);if(Q>0&&H<=Q)return O8(u,f),ee;let oe=null;if(te.__timeline){const be=Lz(te.__timeline),me=u4(be);if(me>0&&H<=me)return O8(u,f),be;me>0&&(oe??(oe=be))}if(te.__timelines){const be=Object.keys(te.__timelines);if(be.length>0){const me=(z=(U=K==null?void 0:K.contentDocument)==null?void 0:U.querySelector("[data-composition-id]"))==null?void 0:z.getAttribute("data-composition-id"),Ae=me&&me in te.__timelines?me:be[be.length-1],De=Lz(te.__timelines[Ae]),Se=u4(De);if(Se>0&&H<=Se)return O8(u,f),De;Se>0&&(oe??(oe=De))}}const fe=ee??oe,pe=Math.max(ue.getState().duration,H,Q);return fe&&pe>0&&("renderSeek"in fe||typeof fe.seek=="function")?_6e({cache:u,warned:f,bestAdapter:fe,effectiveDuration:pe,docDuration:H,clock:D6e(te),getPlaybackRate:()=>ue.getState().playbackRate}):fe}catch{return null}},[]),{startRAFLoop:O,stopRAFLoop:C,stopReverseLoop:E}=V$e({rafRef:e,reverseRafRef:s,getAdapter:w,setCurrentTime:d,setIsPlaying:h}),M=x.useCallback(U=>{const z=t.current;if(z){SCe(z,U);try{const K=z.contentWindow;if(K!=null&&K.__timelines)for(const te of Object.values(K.__timelines))te&&typeof te.timeScale=="function"&&te.timeScale(U)}catch{}}},[]),N=x.useCallback(()=>{const{audioMuted:U,audioVolume:z}=ue.getState();Ose(t.current,U),ACe(t.current,z)},[]),I=x.useCallback(()=>{C(),E(),Rv();const U=w();U&&(U.getTime()>=U.getDuration()&&U.seek(ue.getState().inPoint??0),M(ue.getState().playbackRate),N(),U.play(),a.current="forward",h(!0),O())},[w,h,O,M,N,C,E]),_=x.useCallback(U=>{C(),E();const z=w();if(!z)return;const K=Math.max(0,z.getDuration()),te=z.getTime()<=0&&K>0?K:z.getTime();z.pause(),te!==z.getTime()&&z.seek(te);const ee=Math.max(.1,Math.min(4,U));M(ee),N();let H=te,Q=performance.now();const oe=fe=>{const pe=(fe-Q)/1e3*ee;let be=H-pe;const{inPoint:me,outPoint:Ae}=ue.getState(),De=Ae!==null?Math.min(Ae,K):K,Se=me!==null?me:0,ye=Se<De?De:K,we=Se<De?Se:0;if(be<=we)if(ue.getState().loopEnabled&&K>0)H=ye,Q=fe,be=ye;else{z.seek(we),pa.notify(we),d(we),h(!1),a.current=null,s.current=0;return}z.seek(Math.max(0,be)),pa.notify(Math.max(0,be)),h(!0),s.current=requestAnimationFrame(oe)};h(!0),a.current="backward",s.current=requestAnimationFrame(oe)},[w,d,h,M,N,C,E]),j=x.useCallback(()=>{E();const U=w();U&&(U.pause(),d(U.getTime()),h(!1),a.current=null,o.current=0,C())},[w,d,h,C,E]),L=x.useCallback((U,z)=>{const K=a.current==="backward";E();const te=w();if(!te)return r.current=Math.max(0,U),!1;const ee=Math.max(0,te.getDuration()),H=Math.max(0,ee>0?Math.min(ee,U):U),Q=(z==null?void 0:z.keepPlaying)===!0,oe=nBe({keepPlaying:Q,wasReverseShuttle:K,storeWasPlaying:ue.getState().isPlaying,duration:ee,nextTime:H});return te.seek(H,z),pa.notify(H),d(H),!oe&&!Q&&H$e(t.current,H),oe?(C(),M(ue.getState().playbackRate),N(),te.play(),h(!0),a.current="forward",o.current=0,O()):rBe({keepPlaying:Q,wasReverseShuttle:K})&&(C(),ue.getState().isPlaying&&h(!1),a.current=null,o.current=0),!0},[w,r,d,h,O,C,E,M,N,a,o]);x.useEffect(()=>ue.subscribe((U,z)=>{var te;U.requestedSeekTime!==null&&U.requestedSeekTime!==z.requestedSeekTime&&(L(U.requestedSeekTime),ue.getState().clearSeekRequest());const K=U.playbackRequest;K&&K.nonce!==((te=z.playbackRequest)==null?void 0:te.nonce)&&(K.playing?I():(j(),K.returnTo!==null&&L(K.returnTo)),ue.getState().clearPlaybackRequest())}),[L,I,j]);const{playbackKeyDownRef:V,playbackKeyUpRef:$,attachIframeShortcutListeners:Z,togglePlay:W}=L$e({iframeRef:t,shuttleDirectionRef:a,shuttleSpeedIndexRef:o,iframeShortcutCleanupRef:l,getAdapter:w,play:I,playBackward:_,pause:j,seek:L}),{processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,onIframeLoad:ne}=B$e({iframeRef:t,probeIntervalRef:n,pendingSeekRef:r,isRefreshingRef:i,getAdapter:w,syncTimelineElements:b,setDuration:y,setCurrentTime:d,setTimelineReady:g,setIsPlaying:h,attachIframeShortcutListeners:Z,applyPreviewAudioState:N}),ie=x.useCallback(()=>{if(!(i.current&&r.current!=null)){const z=w();z?r.current=z.getTime():r.current==null&&(r.current=ue.getState().currentTime??0)}i.current=!0,C(),E(),h(!1)},[w,C,h,E]),le=x.useCallback(()=>{const U=t.current;if(!U)return;qm("refreshPlayer",()=>({stack:new Error("refreshPlayer").stack})),ie(),U.style.visibility="hidden";const z=U.src,K=new URL(z,window.location.origin);K.searchParams.set("_t",String(Date.now())),Sre(K),U.src=K.toString()},[ie]),q=x.useRef(w);q.current=w,Ar(()=>{const U=ee=>V.current(ee),z=ee=>$.current(ee),K=cBe({iframeRef:t,processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,lastTimelineMessageRef:c,getAdapter:w,syncTimelineElements:b}),te=()=>{var ee;if(document.hidden&&ue.getState().isPlaying){const H=(ee=q.current)==null?void 0:ee.call(q);H&&(H.pause(),h(!1),C())}};return window.addEventListener("keydown",U,!0),window.addEventListener("keyup",z,!0),window.addEventListener("message",K),document.addEventListener("visibilitychange",te),()=>{var ee;window.removeEventListener("keydown",U,!0),window.removeEventListener("keyup",z,!0),(ee=l.current)==null||ee.call(l),l.current=null,window.removeEventListener("message",K),document.removeEventListener("visibilitychange",te),C(),E(),Rv(),O8(u,f),n.current&&clearInterval(n.current)}});const F=x.useCallback(()=>{C(),E(),n.current&&clearInterval(n.current),ue.getState().reset()},[C,E]);return x.useEffect(()=>ue.subscribe((U,z)=>{const K=U.playbackRate!==z.playbackRate,te=U.audioMuted!==z.audioMuted,ee=U.audioVolume!==z.audioVolume;!K&&!te&&!ee||(K&&M(U.playbackRate),N())}),[M,N]),{iframeRef:t,play:I,pause:j,togglePlay:W,seek:L,onIframeLoad:ne,refreshPlayer:le,saveSeekPosition:ie,resetPlayer:F}}const VX='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])';function gS({open:t,onClose:e,containerRef:n,canClose:r}){const i=x.useRef(null),s=x.useRef(r);s.current=r;const a=x.useRef(e);a.current=e;const o=x.useCallback(()=>{const l=s.current;l&&!l()||a.current()},[]);return x.useEffect(()=>{var h;const l=document.activeElement;i.current=l instanceof HTMLElement?l:null;const c=n.current;(h=(c==null?void 0:c.querySelector(VX))??c)==null||h.focus();const f=d=>{if(d.key==="Escape"){d.stopPropagation(),o();return}if(d.key!=="Tab")return;const y=n.current;if(!y)return;const g=Array.from(y.querySelectorAll(VX));if(g.length===0)return;const v=g[0],b=g[g.length-1],w=document.activeElement;d.shiftKey&&(w===v||!y.contains(w))?(d.preventDefault(),b.focus()):!d.shiftKey&&(w===b||!y.contains(w))&&(d.preventDefault(),v.focus())};return document.addEventListener("keydown",f,!0),()=>{var d;document.removeEventListener("keydown",f,!0),(d=i.current)==null||d.focus(),i.current=null}},[t,n,o]),{requestClose:o}}function HX({findings:t,projectId:e,projectDir:n,title:r="HyperFrame Lint Results",promptIntro:i="Fix these HyperFrames lint issues",onClose:s}){const a=t.filter(v=>v.severity==="error"),o=t.filter(v=>v.severity==="warning"),l=t.length>0,[c,u]=x.useState(!1),[f,h]=x.useState(!1),d=x.useRef(null),{requestClose:y}=gS({open:!0,onClose:s,containerRef:d}),g=async()=>{const v=t.map(C=>{let E=`[${C.severity}] ${C.message}`;return C.file&&(E+=`
|
|
205
205
|
File: ${C.file}`),C.fixHint&&(E+=`
|
|
206
206
|
Fix: ${C.fixHint}`),E}),b=n?`Project path: ${n}
|
|
207
207
|
|