hyperframes 0.7.57 → 0.7.59
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/cli.js +4218 -2643
- package/dist/commands/contrast-audit.browser.js +69 -19
- package/dist/commands/layout-audit.browser.js +168 -35
- package/dist/hyperframe-runtime.js +27 -27
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +27 -27
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/skills/hyperframes/SKILL.md +103 -124
- package/dist/skills/hyperframes/references/capability-menu.md +47 -0
- package/dist/skills/hyperframes/references/pitch-round.md +40 -0
- package/dist/skills/hyperframes/references/route-briefs.md +85 -0
- package/dist/skills/hyperframes/references/skill-lifecycle.md +33 -0
- package/dist/skills/hyperframes/references/workflow-catalog.md +70 -0
- package/dist/skills/hyperframes-cli/SKILL.md +99 -109
- package/dist/skills/hyperframes-cli/references/beats.md +19 -0
- package/dist/skills/hyperframes-cli/references/cloud.md +8 -3
- package/dist/skills/hyperframes-cli/references/cloudrun.md +62 -0
- package/dist/skills/hyperframes-cli/references/compare-and-batch.md +105 -0
- package/dist/skills/hyperframes-cli/references/lambda.md +77 -24
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +3 -3
- package/dist/skills/hyperframes-cli/references/preview-render.md +7 -3
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +2 -0
- package/dist/studio/assets/{hyperframes-player--Z69cEkE.js → hyperframes-player-Bm07FLkl.js} +1 -1
- package/dist/studio/assets/{index-KsfE1bUu.js → index-B995FG46.js} +1 -1
- package/dist/studio/assets/index-CrkAdJkb.js +426 -0
- package/dist/studio/assets/index-Dj5p8U_A.css +1 -0
- package/dist/studio/assets/{index-Bf1x1y8H.js → index-FvzmPhfG.js} +1 -1
- package/dist/studio/{chunk-5QSIMBEJ.js → chunk-OBAG3GWK.js} +33 -21
- package/dist/studio/chunk-OBAG3GWK.js.map +1 -0
- package/dist/studio/{domEditingLayers-6LQGKPOI.js → domEditingLayers-2CKWGEHS.js} +2 -2
- package/dist/studio/index.d.ts +27 -7
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +18029 -11563
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/styles/tailwind-preset.d.ts +5 -0
- package/dist/studio/styles/tailwind-preset.js +8 -1
- package/dist/studio/styles/tailwind-preset.js.map +1 -1
- package/dist/templates/_shared/AGENTS.md +5 -4
- package/dist/templates/_shared/CLAUDE.md +5 -4
- package/package.json +2 -2
- package/dist/studio/assets/index-DfmYkU44.js +0 -423
- package/dist/studio/assets/index-_pqzyxB1.css +0 -1
- package/dist/studio/chunk-5QSIMBEJ.js.map +0 -1
- /package/dist/studio/{domEditingLayers-6LQGKPOI.js.map → domEditingLayers-2CKWGEHS.js.map} +0 -0
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
2
|
-
`+
|
|
3
|
-
`+
|
|
1
|
+
"use strict";(()=>{var zl=Object.create;var oi=Object.defineProperty;var jl=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var $l=Object.getPrototypeOf,Kl=Object.prototype.hasOwnProperty;var Jl=(e,t,n)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xl=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ql(t))!Kl.call(e,r)&&r!==n&&oi(e,r,{get:()=>t[r],enumerable:!(i=jl(t,r))||i.enumerable});return e};var Yl=(e,t,n)=>(n=e!=null?zl($l(e)):{},Xl(t||!e||!e.__esModule?oi(n,"default",{value:e,enumerable:!0}):n,e));var he=(e,t,n)=>Jl(e,typeof t!="symbol"?t+"":t,n);var Oo=ee((Lh,vi)=>{var J=String,Po=function(){return{isColorSupported:!1,reset:J,bold:J,dim:J,italic:J,underline:J,inverse:J,hidden:J,strikethrough:J,black:J,red:J,green:J,yellow:J,blue:J,magenta:J,cyan:J,white:J,gray:J,bgBlack:J,bgRed:J,bgGreen:J,bgYellow:J,bgBlue:J,bgMagenta:J,bgCyan:J,bgWhite:J,blackBright:J,redBright:J,greenBright:J,yellowBright:J,blueBright:J,magentaBright:J,cyanBright:J,whiteBright:J,bgBlackBright:J,bgRedBright:J,bgGreenBright:J,bgYellowBright:J,bgBlueBright:J,bgMagentaBright:J,bgCyanBright:J,bgWhiteBright:J}};vi.exports=Po();vi.exports.createColors=Po});var Mi=ee(()=>{});var Sn=ee((Dh,Go)=>{"use strict";var Bo=Oo(),Ho=Mi(),Bt=class e extends Error{constructor(t,n,i,r,o,a){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),r&&(this.source=r),a&&(this.plugin=a),typeof n<"u"&&typeof i<"u"&&(typeof n=="number"?(this.line=n,this.column=i):(this.line=n.line,this.column=n.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=Bo.isColorSupported);let i=d=>d,r=d=>d,o=d=>d;if(t){let{bold:d,gray:m,red:f}=Bo.createColors(!0);r=x=>d(f(x)),i=x=>m(x),Ho&&(o=x=>Ho(x))}let a=n.split(/\r?\n/),u=Math.max(this.line-3,0),s=Math.min(this.line+2,a.length),l=String(s).length;return a.slice(u,s).map((d,m)=>{let f=u+1+m,x=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(d.length>160){let y=20,b=Math.max(0,this.column-y),A=Math.max(this.column+y,this.endColumn+y),_=d.slice(b,A),N=i(x.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return r(">")+i(x)+o(_)+`
|
|
2
|
+
`+N+r("^")}let S=i(x.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+i(x)+o(d)+`
|
|
3
|
+
`+S+r("^")}return" "+i(x)+o(d)}).join(`
|
|
4
4
|
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
5
5
|
|
|
6
6
|
`+t+`
|
|
7
|
-
`),this.name+": "+this.message+t}};
|
|
7
|
+
`),this.name+": "+this.message+t}};Go.exports=Bt;Bt.default=Bt});var Ni=ee((Ih,Uo)=>{"use strict";var lc=/(<)(\/?style\b)/gi,uc=/(<)(!--)/g;function Ke(e){return typeof e!="string"||!e.includes("<")?e:e.replace(lc,"\\3c $2").replace(uc,"\\3c $2")}var Wo={after:`
|
|
8
8
|
`,beforeClose:`
|
|
9
9
|
`,beforeComment:`
|
|
10
10
|
`,beforeDecl:`
|
|
11
11
|
`,beforeOpen:" ",beforeRule:`
|
|
12
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
13
|
-
`)){let a=this.raw(t,null,"indent");if(a.length)for(let u=0;u<o;u++)i+=a}return i}block(t,n){let i=this.raw(t,"between","beforeOpen");this.builder(Ke(n+i)+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(Ke(r)),this.builder("}",t,"end")}body(t){let n=t.nodes,i=n.length-1;for(;i>0&&n[i].type==="comment";)i-=1;let r=this.raw(t,"semicolon"),o=t.type==="document";for(let a=0;a<n.length;a++){let u=n[a],s=this.raw(u,"before");s&&this.builder(o?s:Ke(s)),this.stringify(u,i!==a||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(Ke("/*"+n+t.text+i+"*/"),t)}decl(t,n){let i=t.raws,r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=i.important||" !important"),n&&(o+=";"),this.builder(Ke(o),t)}document(t){this.body(t)}raw(t,n,i){let r;if(i||(i=n),n&&(r=t.raws[n],typeof r<"u"))return r;let o=t.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===t||o&&o.type==="document"))return"";if(!o)return
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function cc(e){return e[0].toUpperCase()+e.slice(1)}var Ht=class{constructor(t){this.builder=t}atrule(t,n){let i=t.raws,r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof i.afterName<"u"?r+=i.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let a=(i.between||"")+(n?";":"");this.builder(Ke(r+o+a),t)}}beforeAfter(t,n){let i;t.type==="decl"?i=this.raw(t,null,"beforeDecl"):t.type==="comment"?i=this.raw(t,null,"beforeComment"):n==="before"?i=this.raw(t,null,"beforeRule"):i=this.raw(t,null,"beforeClose");let r=t.parent,o=0;for(;r&&r.type!=="root";)o+=1,r=r.parent;if(i.includes(`
|
|
13
|
+
`)){let a=this.raw(t,null,"indent");if(a.length)for(let u=0;u<o;u++)i+=a}return i}block(t,n){let i=this.raw(t,"between","beforeOpen");this.builder(Ke(n+i)+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(Ke(r)),this.builder("}",t,"end")}body(t){let n=t.nodes,i=n.length-1;for(;i>0&&n[i].type==="comment";)i-=1;let r=this.raw(t,"semicolon"),o=t.type==="document";for(let a=0;a<n.length;a++){let u=n[a],s=this.raw(u,"before");s&&this.builder(o?s:Ke(s)),this.stringify(u,i!==a||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(Ke("/*"+n+t.text+i+"*/"),t)}decl(t,n){let i=t.raws,r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=i.important||" !important"),n&&(o+=";"),this.builder(Ke(o),t)}document(t){this.body(t)}raw(t,n,i){let r;if(i||(i=n),n&&(r=t.raws[n],typeof r<"u"))return r;let o=t.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===t||o&&o.type==="document"))return"";if(!o)return Wo[i];let a=t.root(),u=a.rawCache||(a.rawCache={});if(typeof u[i]<"u")return u[i];if(i==="before"||i==="after")return this.beforeAfter(t,i);{let s="raw"+cc(i);this[s]?r=this[s](a,t):a.walk(l=>{if(r=l.raws[n],typeof r<"u")return!1})}return typeof r>"u"&&(r=Wo[i]),u[i]=r,r}rawBeforeClose(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return n=i.raws.after,n.includes(`
|
|
14
14
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let i;return t.walkComments(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
|
|
15
15
|
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,n){let i;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
|
|
16
16
|
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let n;return t.walk(i=>{if(i.type!=="decl"&&(n=i.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
|
|
17
17
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(i=>{if(typeof i.raws.between<"u")return n=i.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length===0&&(n=i.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(i=>{let r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof i.raws.before<"u"){let o=i.raws.before.split(`
|
|
18
|
-
`);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let i=t[n],r=t.raws[n];return r&&r.value===i?r.raw:i}root(t){if(this.body(t),t.raws.after){let n=t.raws.after,i=t.parent&&t.parent.type==="document";this.builder(i?n:Ke(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(Ke(t.raws.ownSemicolon),t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};
|
|
19
|
-
`?(n=1,i+=1):n+=1}return r}var Ut=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Wt]=!1,this[
|
|
20
|
-
`?(n=1,i+=1):n+=1;return{column:n,line:i,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:Ve(n,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Ve(n,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let a=n.slice(Ve(n,this.source.start),Ve(n,this.source.end)).indexOf(t.word);a!==-1&&(i=this.positionInside(a),r=this.positionInside(a+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:Ve(n,t.start)}:t.index&&(i=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:Ve(n,t.end)}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<i.line||r.line===i.line&&r.column<=i.column)&&(r={column:i.column+1,line:i.line,offset:i.offset+1}),{end:r,start:i}}raw(t,n){return new Xu().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,i=!1;for(let r of t)r===this?i=!0:i?(this.parent.insertAfter(n,r),n=r):this.parent.insertBefore(n,r);i||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let i={},r=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))i[a]=u.map(s=>typeof s=="object"&&s.toJSON?s.toJSON(null,n):s);else if(typeof u=="object"&&u.toJSON)i[a]=u.toJSON(null,n);else if(a==="source"){if(u==null)continue;let s=n.get(u.input);s==null&&(s=o,n.set(u.input,o),o++),i[a]={end:u.end,inputId:s,start:u.start}}else i[a]=u}return r&&(i.inputs=[...n.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Qu){t.stringify&&(t=t.stringify);let n="";return t(this,i=>{n+=i}),n}warn(t,n,i={}){let r={node:this};for(let o in i)r[o]=i[o];return t.warn(n,r)}};Go.exports=Ut;Ut.default=Ut});var jt=ee((Eh,Wo)=>{"use strict";var ec=Vt(),zt=class extends ec{constructor(t){super(t),this.type="comment"}};Wo.exports=zt;zt.default=zt});var $t=ee((Ah,Uo)=>{"use strict";var tc=Vt(),qt=class extends tc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};Uo.exports=qt;qt.default=qt});var Je=ee((wh,Xo)=>{"use strict";var Vo=jt(),zo=$t(),nc=Vt(),{isClean:jo,my:qo}=Sn(),Ri,$o,Ko,ki;function Jo(e){return e.map(t=>(t.nodes&&(t.nodes=Jo(t.nodes)),delete t.source,t))}function Yo(e){if(e[jo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Yo(t)}var ke=class e extends nc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let n of t){let i=this.normalize(n,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),i,r;for(;this.indexes[n]<this.proxyOf.nodes.length&&(i=this.indexes[n],r=t(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[n]+=1;return delete this.indexes[n],r}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...i)=>t[n](...i.map(r=>typeof r=="function"?(o,a)=>r(o.toProxy(),a):r)):n==="every"||n==="some"?i=>t[n]((r,...o)=>i(r.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(i=>i.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let i=this.index(t),r=this.normalize(n,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let a of r)this.proxyOf.nodes.splice(i+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],i<o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}insertBefore(t,n){let i=this.index(t),r=i===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[i],r).reverse();i=this.index(t);for(let u of o)this.proxyOf.nodes.splice(i,0,u);let a;for(let u in this.indexes)a=this.indexes[u],i<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=Jo($o(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new zo(t)]}else if(t.selector||t.selectors)t=[new ki(t)];else if(t.name)t=[new Ri(t)];else if(t.text)t=[new Vo(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[qo]||e.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[jo]&&Yo(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let i=this.normalize(n,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let i in this.indexes)n=this.indexes[i],n>=t&&(this.indexes[i]=n-1);return this.markDirty(),this}replaceValues(t,n,i){return i||(i=n,n={}),this.walkDecls(r=>{n.props&&!n.props.includes(r.prop)||n.fast&&!r.value.includes(n.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,i)=>{let r;try{r=t(n,i)}catch(o){throw n.addToError(o)}return r!==!1&&n.walk&&(r=n.walk(t)),r})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&t.test(i.name))return n(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="atrule")return n(i,r)}))}walkComments(t){return this.walk((n,i)=>{if(n.type==="comment")return t(n,i)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&t.test(i.prop))return n(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="decl")return n(i,r)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&t.test(i.selector))return n(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="rule")return n(i,r)}))}};ke.registerParse=e=>{$o=e};ke.registerRule=e=>{ki=e};ke.registerAtRule=e=>{Ri=e};ke.registerRoot=e=>{Ko=e};Xo.exports=ke;ke.default=ke;ke.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Ri.prototype):e.type==="rule"?Object.setPrototypeOf(e,ki.prototype):e.type==="decl"?Object.setPrototypeOf(e,zo.prototype):e.type==="comment"?Object.setPrototypeOf(e,Vo.prototype):e.type==="root"&&Object.setPrototypeOf(e,Ko.prototype),e[qo]=!0,e.nodes&&e.nodes.forEach(t=>{ke.rebuild(t)})}});var En=ee((Ch,Zo)=>{"use strict";var Qo=Je(),ft=class extends Qo{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};Zo.exports=ft;ft.default=ft;Qo.registerAtRule(ft)});var An=ee((Fh,ns)=>{"use strict";var ic=Je(),es,ts,at=class extends ic{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new es(new ts,this,t).stringify()}};at.registerLazyResult=e=>{es=e};at.registerProcessor=e=>{ts=e};ns.exports=at;at.default=at});var rs=ee((_h,is)=>{var rc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",oc=(e,t=21)=>(n=t)=>{let i="",r=n|0;for(;r--;)i+=e[Math.random()*e.length|0];return i},sc=(e=21)=>{let t="",n=e|0;for(;n--;)t+=rc[Math.random()*64|0];return t};is.exports={nanoid:sc,customAlphabet:oc}});var wn=ee(()=>{});var Cn=ee(()=>{});var Di=ee(()=>{});var os=ee(()=>{});var Pi=ee((Ih,ls)=>{"use strict";var{existsSync:ac,readFileSync:lc}=os(),{dirname:Ii,join:uc}=wn(),{SourceMapConsumer:ss,SourceMapGenerator:as}=Cn();function cc(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Kt=class{constructor(t,n){if(n.map===!1)return;n.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=n.map?n.map.prev:void 0,r=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Ii(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ss(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/,a=t.match(r)||t.match(o);if(a)return decodeURIComponent(t.substr(a[0].length));let u=t.match(n)||t.match(i);if(u)return cc(t.substr(u[0].length));let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let i=t.lastIndexOf(n.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}loadFile(t,n,i){if(!(!i&&!this.unsafeMap&&!/\.map$/i.test(t))&&(this.root=Ii(t),ac(t)))return this.mapFile=t,lc(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let i=n(t);if(i){let r=this.loadFile(i,t,!0);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(n instanceof ss)return as.fromSourceMap(n).toString();if(n instanceof as)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;t&&(i=uc(Ii(t),i));let r=this.loadFile(i,t,!1);if(r)try{this.json=JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return r}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};ls.exports=Kt;Kt.default=Kt});var Jt=ee((Ph,ms)=>{"use strict";var{nanoid:dc}=rs(),{isAbsolute:Hi,resolve:Gi}=wn(),{SourceMapConsumer:fc,SourceMapGenerator:mc}=Cn(),{fileURLToPath:us,pathToFileURL:Fn}=Di(),cs=yn(),pc=Pi(),Oi=vi(),Bi=Symbol("lineToIndexCache"),hc=!!(fc&&mc),ds=!!(Gi&&Hi);function fs(e){if(e[Bi])return e[Bi];let t=e.css.split(`
|
|
21
|
-
`),n=new Array(t.length),i=0;for(let r=0,o=t.length;r<o;r++)n[r]=i,i+=t[r].length+1;return e[
|
|
22
|
-
`," "];return
|
|
18
|
+
`);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let i=t[n],r=t.raws[n];return r&&r.value===i?r.raw:i}root(t){if(this.body(t),t.raws.after){let n=t.raws.after,i=t.parent&&t.parent.type==="document";this.builder(i?n:Ke(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(Ke(t.raws.ownSemicolon),t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};Uo.exports=Ht;Ht.default=Ht});var Gt=ee((Ph,Vo)=>{"use strict";var dc=Ni();function Li(e,t){new dc(t).stringify(e)}Vo.exports=Li;Li.default=Li});var En=ee((Oh,Ri)=>{"use strict";Ri.exports.isClean=Symbol("isClean");Ri.exports.my=Symbol("my")});var Vt=ee((Bh,zo)=>{"use strict";var fc=Sn(),mc=Ni(),pc=Gt(),{isClean:Wt,my:hc}=En();function ki(e,t){let n=new e.constructor;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||i==="proxyCache")continue;let r=e[i],o=typeof r;i==="parent"&&o==="object"?t&&(n[i]=t):i==="source"?n[i]=r:Array.isArray(r)?n[i]=r.map(a=>ki(a,n)):(o==="object"&&r!==null&&(r=ki(r)),n[i]=r)}return n}function Ve(e,t){if(t&&typeof t.offset<"u")return t.offset;let n=1,i=1,r=0;for(let o=0;o<e.length;o++){if(i===t.line&&n===t.column){r=o;break}e[o]===`
|
|
19
|
+
`?(n=1,i+=1):n+=1}return r}var Ut=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Wt]=!1,this[hc]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let i of t[n])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=ki(this);for(let i in t)n[i]=t[i];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:i,start:r}=this.rangeBy(n);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},n)}return new fc(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markClean(){this[Wt]=!0}markDirty(){if(this[Wt]){this[Wt]=!1;let t=this;for(;t=t.parent;)t[Wt]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let n=this.source.start;if(t.index)n=this.positionInside(t.index);else if(t.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,o=i.slice(Ve(i,this.source.start),Ve(i,this.source.end)).indexOf(t.word);o!==-1&&(n=this.positionInside(o))}return n}positionInside(t){let n=this.source.start.column,i=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,o=Ve(r,this.source.start),a=o+t;for(let u=o;u<a;u++)r[u]===`
|
|
20
|
+
`?(n=1,i+=1):n+=1;return{column:n,line:i,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:Ve(n,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Ve(n,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let a=n.slice(Ve(n,this.source.start),Ve(n,this.source.end)).indexOf(t.word);a!==-1&&(i=this.positionInside(a),r=this.positionInside(a+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:Ve(n,t.start)}:t.index&&(i=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:Ve(n,t.end)}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<i.line||r.line===i.line&&r.column<=i.column)&&(r={column:i.column+1,line:i.line,offset:i.offset+1}),{end:r,start:i}}raw(t,n){return new mc().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,i=!1;for(let r of t)r===this?i=!0:i?(this.parent.insertAfter(n,r),n=r):this.parent.insertBefore(n,r);i||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let i={},r=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))i[a]=u.map(s=>typeof s=="object"&&s.toJSON?s.toJSON(null,n):s);else if(typeof u=="object"&&u.toJSON)i[a]=u.toJSON(null,n);else if(a==="source"){if(u==null)continue;let s=n.get(u.input);s==null&&(s=o,n.set(u.input,o),o++),i[a]={end:u.end,inputId:s,start:u.start}}else i[a]=u}return r&&(i.inputs=[...n.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=pc){t.stringify&&(t=t.stringify);let n="";return t(this,i=>{n+=i}),n}warn(t,n,i={}){let r={node:this};for(let o in i)r[o]=i[o];return t.warn(n,r)}};zo.exports=Ut;Ut.default=Ut});var jt=ee((Hh,jo)=>{"use strict";var gc=Vt(),zt=class extends gc{constructor(t){super(t),this.type="comment"}};jo.exports=zt;zt.default=zt});var $t=ee((Gh,qo)=>{"use strict";var xc=Vt(),qt=class extends xc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};qo.exports=qt;qt.default=qt});var Je=ee((Wh,ts)=>{"use strict";var $o=jt(),Ko=$t(),bc=Vt(),{isClean:Jo,my:Xo}=En(),Di,Yo,Qo,Ii;function Zo(e){return e.map(t=>(t.nodes&&(t.nodes=Zo(t.nodes)),delete t.source,t))}function es(e){if(e[Jo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)es(t)}var ke=class e extends bc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let n of t){let i=this.normalize(n,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),i,r;for(;this.indexes[n]<this.proxyOf.nodes.length&&(i=this.indexes[n],r=t(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[n]+=1;return delete this.indexes[n],r}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...i)=>t[n](...i.map(r=>typeof r=="function"?(o,a)=>r(o.toProxy(),a):r)):n==="every"||n==="some"?i=>t[n]((r,...o)=>i(r.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(i=>i.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let i=this.index(t),r=this.normalize(n,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let a of r)this.proxyOf.nodes.splice(i+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],i<o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}insertBefore(t,n){let i=this.index(t),r=i===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[i],r).reverse();i=this.index(t);for(let u of o)this.proxyOf.nodes.splice(i,0,u);let a;for(let u in this.indexes)a=this.indexes[u],i<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=Zo(Yo(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Ko(t)]}else if(t.selector||t.selectors)t=[new Ii(t)];else if(t.name)t=[new Di(t)];else if(t.text)t=[new $o(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[Xo]||e.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Jo]&&es(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let i=this.normalize(n,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let i in this.indexes)n=this.indexes[i],n>=t&&(this.indexes[i]=n-1);return this.markDirty(),this}replaceValues(t,n,i){return i||(i=n,n={}),this.walkDecls(r=>{n.props&&!n.props.includes(r.prop)||n.fast&&!r.value.includes(n.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,i)=>{let r;try{r=t(n,i)}catch(o){throw n.addToError(o)}return r!==!1&&n.walk&&(r=n.walk(t)),r})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&t.test(i.name))return n(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="atrule")return n(i,r)}))}walkComments(t){return this.walk((n,i)=>{if(n.type==="comment")return t(n,i)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&t.test(i.prop))return n(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="decl")return n(i,r)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&t.test(i.selector))return n(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="rule")return n(i,r)}))}};ke.registerParse=e=>{Yo=e};ke.registerRule=e=>{Ii=e};ke.registerAtRule=e=>{Di=e};ke.registerRoot=e=>{Qo=e};ts.exports=ke;ke.default=ke;ke.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Di.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ii.prototype):e.type==="decl"?Object.setPrototypeOf(e,Ko.prototype):e.type==="comment"?Object.setPrototypeOf(e,$o.prototype):e.type==="root"&&Object.setPrototypeOf(e,Qo.prototype),e[Xo]=!0,e.nodes&&e.nodes.forEach(t=>{ke.rebuild(t)})}});var An=ee((Uh,is)=>{"use strict";var ns=Je(),ft=class extends ns{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};is.exports=ft;ft.default=ft;ns.registerAtRule(ft)});var wn=ee((Vh,ss)=>{"use strict";var yc=Je(),rs,os,at=class extends yc{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new rs(new os,this,t).stringify()}};at.registerLazyResult=e=>{rs=e};at.registerProcessor=e=>{os=e};ss.exports=at;at.default=at});var ls=ee((zh,as)=>{var Sc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ec=(e,t=21)=>(n=t)=>{let i="",r=n|0;for(;r--;)i+=e[Math.random()*e.length|0];return i},Ac=(e=21)=>{let t="",n=e|0;for(;n--;)t+=Sc[Math.random()*64|0];return t};as.exports={nanoid:Ac,customAlphabet:Ec}});var Cn=ee(()=>{});var Fn=ee(()=>{});var Pi=ee(()=>{});var us=ee(()=>{});var Bi=ee((Zh,fs)=>{"use strict";var{existsSync:wc,readFileSync:Cc}=us(),{dirname:Oi,join:Fc}=Cn(),{SourceMapConsumer:cs,SourceMapGenerator:ds}=Fn();function _c(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Kt=class{constructor(t,n){if(n.map===!1)return;n.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=n.map?n.map.prev:void 0,r=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Oi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new cs(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/,a=t.match(r)||t.match(o);if(a)return decodeURIComponent(t.substr(a[0].length));let u=t.match(n)||t.match(i);if(u)return _c(t.substr(u[0].length));let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let i=t.lastIndexOf(n.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}loadFile(t,n,i){if(!(!i&&!this.unsafeMap&&!/\.map$/i.test(t))&&(this.root=Oi(t),wc(t)))return this.mapFile=t,Cc(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let i=n(t);if(i){let r=this.loadFile(i,t,!0);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(n instanceof cs)return ds.fromSourceMap(n).toString();if(n instanceof ds)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;t&&(i=Fc(Oi(t),i));let r=this.loadFile(i,t,!1);if(r)try{this.json=JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return r}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};fs.exports=Kt;Kt.default=Kt});var Jt=ee((e0,xs)=>{"use strict";var{nanoid:Tc}=ls(),{isAbsolute:Wi,resolve:Ui}=Cn(),{SourceMapConsumer:vc,SourceMapGenerator:Mc}=Fn(),{fileURLToPath:ms,pathToFileURL:_n}=Pi(),ps=Sn(),Nc=Bi(),Hi=Mi(),Gi=Symbol("lineToIndexCache"),Lc=!!(vc&&Mc),hs=!!(Ui&&Wi);function gs(e){if(e[Gi])return e[Gi];let t=e.css.split(`
|
|
21
|
+
`),n=new Array(t.length),i=0;for(let r=0,o=t.length;r<o;r++)n[r]=i,i+=t[r].length+1;return e[Gi]=n,n}var mt=class{get from(){return this.file||this.id}constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!hs||/^\w+:\/\//.test(n.from)||Wi(n.from)?this.file=n.from:this.file=Ui(n.from)),hs&&Lc){let i=new Nc(this.css,n);if(i.text){this.map=i;let r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Tc(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,i,r={}){let o,a,u,s,l;if(n&&typeof n=="object"){let m=n,f=i;if(typeof m.offset=="number"){s=m.offset;let x=this.fromOffset(s);n=x.line,i=x.col}else n=m.line,i=m.column,s=this.fromLineAndColumn(n,i);if(typeof f.offset=="number"){u=f.offset;let x=this.fromOffset(u);a=x.line,o=x.col}else a=f.line,o=f.column,u=this.fromLineAndColumn(f.line,f.column)}else if(i)s=this.fromLineAndColumn(n,i);else{s=n;let m=this.fromOffset(s);n=m.line,i=m.col}let d=this.origin(n,i,a,o);return d?l=new ps(t,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):l=new ps(t,a===void 0?n:{column:i,line:n},a===void 0?i:{column:o,line:a},this.css,this.file,r.plugin),l.input={column:i,endColumn:o,endLine:a,endOffset:u,line:n,offset:s,source:this.css},this.file&&(_n&&(l.input.url=_n(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,n){return gs(this)[t-1]+n-1}fromOffset(t){let n=gs(this),i=n[n.length-1],r=0;if(t>=i)r=n.length-1;else{let o=n.length-2,a;for(;r<o;)if(a=r+(o-r>>1),t<n[a])o=a-1;else if(t>=n[a+1])r=a+1;else{r=a;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ui(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,i,r){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:t});if(!a.source)return!1;let u;typeof i=="number"&&(u=o.originalPositionFor({column:r,line:i}));let s;Wi(a.source)?s=_n(a.source):s=new URL(a.source,this.map.consumer().sourceRoot||_n(this.map.mapFile));let l={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:s.toString()};if(s.protocol==="file:")if(ms)l.file=ms(s);else throw new Error("file: protocol is not available in this PostCSS build");let d=o.sourceContentFor(a.source);return d&&(l.source=d),l}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};xs.exports=mt;mt.default=mt;Hi&&Hi.registerInput&&Hi.registerInput(mt)});var pt=ee((t0,Es)=>{"use strict";var bs=Je(),ys,Ss,Xe=class extends bs{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,i){let r=super.normalize(t);if(n){if(i==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of r)o.raws.before=n.raws.before}return r}removeChild(t,n){let i=this.index(t);return!n&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new ys(new Ss,this,t).stringify()}};Xe.registerLazyResult=e=>{ys=e};Xe.registerProcessor=e=>{Ss=e};Es.exports=Xe;Xe.default=Xe;bs.registerRoot(Xe)});var Vi=ee((n0,As)=>{"use strict";var Xt={comma(e){return Xt.split(e,[","],!0)},space(e){let t=[" ",`
|
|
22
|
+
`," "];return Xt.split(e,t)},split(e,t,n){let i=[],r="",o=!1,a=0,u=!1,s="",l=!1;for(let d of e)l?l=!1:d==="\\"?l=!0:u?d===s&&(u=!1):d==='"'||d==="'"?(u=!0,s=d):d==="("?a+=1:d===")"?a>0&&(a-=1):a===0&&t.includes(d)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=d;return(n||r!=="")&&i.push(r.trim()),i}};As.exports=Xt;Xt.default=Xt});var Tn=ee((i0,Cs)=>{"use strict";var ws=Je(),Rc=Vi(),ht=class extends ws{get selectors(){return Rc.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,i=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};Cs.exports=ht;ht.default=ht;ws.registerRule(ht)});var _s=ee((r0,Fs)=>{"use strict";var kc=An(),Dc=jt(),Ic=$t(),Pc=Jt(),Oc=Bi(),Bc=pt(),Hc=Tn();function Yt(e,t){if(Array.isArray(e))return e.map(r=>Yt(r));let{inputs:n,...i}=e;if(n){t=[];for(let r of n){let o={...r,__proto__:Pc.prototype};o.map&&(o.map={...o.map,__proto__:Oc.prototype}),t.push(o)}}if(i.nodes&&(i.nodes=e.nodes.map(r=>Yt(r,t))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=t[r])}if(i.type==="root")return new Bc(i);if(i.type==="decl")return new Ic(i);if(i.type==="rule")return new Hc(i);if(i.type==="comment")return new Dc(i);if(i.type==="atrule")return new kc(i);throw new Error("Unknown node type: "+e.type)}Fs.exports=Yt;Yt.default=Yt});var ji=ee((o0,Rs)=>{"use strict";var{dirname:vn,relative:vs,resolve:Ms,sep:Ns}=Cn(),{SourceMapConsumer:Ls,SourceMapGenerator:Mn}=Fn(),{pathToFileURL:Ts}=Pi(),Gc=Jt(),Wc=!!(Ls&&Mn),Uc=!!(vn&&Ms&&vs&&Ns),zi=class{constructor(t,n,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
|
|
23
23
|
`;this.css.includes(`\r
|
|
24
24
|
`)&&(n=`\r
|
|
25
|
-
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),i=t.root||vn(t.file),r;this.mapOpts.sourcesContent===!1?(r=new
|
|
26
|
-
`;)t--;this.css=this.css.slice(0,t)+this.css.slice(n+2)}}}}generate(){if(this.clearAnnotation(),
|
|
27
|
-
`),n=u.length-o):n+=u.length,s&&l!=="start"){let c=s.parent||{raws:{}};(!(s.type==="decl"||s.type==="atrule"&&!s.nodes)||s!==c.last||c.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=t,r.generated.column=n-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let i=this.opts.to?vn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=vn(Fs(i,this.mapOpts.annotation)));let r=Cs(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new Cc(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!t[i]){t[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(ws){let i=ws(t).toString();return this.memoizedFileURLs.set(t,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;_s==="\\"&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}};Ts.exports=Ui});var Ls=ee((Uh,Ns)=>{"use strict";var Mn=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vc=/.[\r\n"'(/\\]/,Ms=/[\da-f]/i;Ns.exports=function(t,n={}){let i=t.css.valueOf(),r=n.ignoreErrors,o,a,u,s,l,c,m,f,b,E,y=i.length,x=0,A=[],_=[],M=-1;function $(){return x}function P(F){throw t.error("Unclosed "+F,x)}function v(){return _.length===0&&x>=y}function w(F){if(_.length)return _.pop();if(x>=y)return;let T=F?F.ignoreUnclosed:!1;switch(o=i.charCodeAt(x),o){case 10:case 32:case 9:case 13:case 12:{s=x;do s+=1,o=i.charCodeAt(s);while(o===32||o===10||o===9||o===13||o===12);c=["space",i.slice(x,s)],x=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let R=String.fromCharCode(o);c=[R,R,x];break}case 40:{if(E=A.length?A.pop()[1]:"",b=i.charCodeAt(x+1),E==="url"&&b!==39&&b!==34&&b!==32&&b!==10&&b!==9&&b!==12&&b!==13){s=x;do{if(m=!1,s=i.indexOf(")",s+1),s===-1)if(r||T){s=x;break}else P("bracket");for(f=s;i.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);c=["brackets",i.slice(x,s+1),x,s],x=s}else x<=M?c=["(","(",x]:(s=i.indexOf(")",x+1),a=i.slice(x,s+1),s===-1||vc.test(a)?(M=s===-1?y:s,c=["(","(",x]):(c=["brackets",a,x,s],x=s));break}case 39:case 34:{l=o===39?"'":'"',s=x;do{if(m=!1,s=i.indexOf(l,s+1),s===-1)if(r||T){s=x+1;break}else P("string");for(f=s;i.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);c=["string",i.slice(x,s+1),x,s],x=s;break}case 64:{Mn.lastIndex=x+1,Mn.test(i),Mn.lastIndex===0?s=i.length-1:s=Mn.lastIndex-2,c=["at-word",i.slice(x,s+1),x,s],x=s;break}case 92:{for(s=x,u=!0;i.charCodeAt(s+1)===92;)s+=1,u=!u;if(o=i.charCodeAt(s+1),u&&o!==47&&o!==32&&o!==10&&o!==9&&o!==13&&o!==12&&(s+=1,Ms.test(i.charAt(s)))){for(;Ms.test(i.charAt(s+1));)s+=1;i.charCodeAt(s+1)===32&&(s+=1)}c=["word",i.slice(x,s+1),x,s],x=s;break}default:{o===47&&i.charCodeAt(x+1)===42?(s=i.indexOf("*/",x+2)+1,s===0&&(r||T?s=i.length:P("comment")),c=["comment",i.slice(x,s+1),x,s],x=s):(Nn.lastIndex=x+1,Nn.test(i),Nn.lastIndex===0?s=i.length-1:s=Nn.lastIndex-2,c=["word",i.slice(x,s+1),x,s],A.push(c),x=s);break}}return x++,c}function C(F){_.push(F)}return{back:C,endOfFile:v,nextToken:w,position:$}}});var Is=ee((Vh,Ds)=>{"use strict";var Tc=En(),Mc=jt(),Nc=$t(),Lc=pt(),Rs=_n(),Rc=Ls(),ks={empty:!0,space:!0};function kc(e){for(let t=e.length-1;t>=0;t--){let n=e[t],i=n[3]||n[2];if(i)return i}}var zi=class{constructor(t){this.input=t,this.root=new Lc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new Tc;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let i,r,o,a=!1,u=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),i=t[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){u=!0;break}else if(i==="}"){if(s.length>0){for(o=s.length-1,r=s[o];r&&r[0]==="space";)r=s[--o];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(t);break}else s.push(t);else s.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(n.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(n,"params",s),a&&(t=s[s.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let i=0,r;for(let o=n-1;o>=0&&(r=t[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let n=0,i,r,o;for(let[a,u]of t.entries()){if(r=u,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=r}return!1}comment(t){let n=new Mc;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let i=t[1].slice(2,-2);if(!i.trim())n.text="",n.raws.left=i,n.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=r[2],n.raws.left=r[1],n.raws.right=r[3]}}createTokenizer(){this.tokenizer=Rc(this.input)}decl(t,n){let i=new Nc;this.init(i,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(r[3]||r[2]||kc(t)),i.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=t.shift()[1]}i.raws.between="";let o;for(;t.length;)if(o=t.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],u;for(;t.length&&(u=t[0][0],!(u!=="space"&&u!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(o=t[l],o[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(t,l);c=this.spacesFromEnd(t)+c,c!==" !important"&&(i.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=t.slice(0),m="";for(let f=l;f>0;f--){let b=c[f][0];if(m.trim().startsWith("!")&&b!=="space")break;m=c.pop()[1]+m}m.trim().startsWith("!")&&(i.important=!0,i.raws.important=m,t=c)}if(o[0]!=="space"&&o[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new Rs;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(t[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,i=null,r=!1,o=null,a=[],u=t[1].startsWith("--"),s=[],l=t;for(;l;){if(i=l[0],s.push(l),i==="("||i==="[")o||(o=l),a.push(i==="("?")":"]");else if(u&&r&&i==="{")o||(o=l),a.push("}");else if(a.length===0)if(i===";")if(r){this.decl(s,u);return}else break;else if(i==="{"){this.rule(s);return}else if(i==="}"){this.tokenizer.back(s.pop()),n=!0;break}else i===":"&&(r=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&r){if(!u)for(;s.length&&(l=s[s.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(s.pop());this.decl(s,u)}else this.unknownWord(s)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,i,r){let o,a,u=i.length,s="",l=!0,c,m;for(let f=0;f<u;f+=1)o=i[f],a=o[0],a==="space"&&f===u-1&&!r?l=!1:a==="comment"?(m=i[f-1]?i[f-1][0]:"empty",c=i[f+1]?i[f+1][0]:"empty",!ks[m]&&!ks[c]?s.slice(-1)===","?l=!1:s+=o[1]:l=!1):s+=o[1];if(!l){let f=i.reduce((b,E)=>b+E[1],"");t.raws[n]={raw:f,value:s}}t[n]=s}rule(t){t.pop();let n=new Rs;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let n,i="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)i+=t.shift()[1];return i}spacesFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],n==="space");)i=t.pop()[1]+i;return i}stringFrom(t,n){let i="";for(let r=n;r<t.length;r++)i+=t[r][1];return t.splice(n,t.length-n),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};Ds.exports=zi});var Rn=ee((zh,Ps)=>{"use strict";var Dc=Je(),Ic=Jt(),Pc=Is();function Ln(e,t){let n=new Ic(e,t),i=new Pc(n);try{i.parse()}catch(r){throw r}return i.root}Ps.exports=Ln;Ln.default=Ln;Dc.registerParse(Ln)});var ji=ee((jh,Os)=>{"use strict";var Qt=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Os.exports=Qt;Qt.default=Qt});var kn=ee((qh,Bs)=>{"use strict";var Oc=ji(),Zt=class{get content(){return this.css}constructor(t,n,i){this.processor=t,this.messages=[],this.root=n,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let i=new Oc(t,n);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>t.type==="warning")}};Bs.exports=Zt;Zt.default=Zt});var qi=ee(($h,Gs)=>{"use strict";var Hs={};Gs.exports=function(t){Hs[t]||(Hs[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Ji=ee((Jh,zs)=>{"use strict";var Bc=Je(),Hc=An(),Gc=Vi(),Wc=Rn(),Ws=kn(),Uc=pt(),Vc=Gt(),{isClean:Be,my:zc}=Sn(),Kh=qi(),jc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},qc={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},$c={Once:!0,postcssPlugin:!0,prepare:!0},gt=0;function en(e){return typeof e=="object"&&typeof e.then=="function"}function Vs(e){let t=!1,n=jc[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,gt,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,gt,n+"Exit"]:[n,n+"Exit"]}function Us(e){let t;return e.type==="document"?t=["Document",gt,"DocumentExit"]:e.type==="root"?t=["Root",gt,"RootExit"]:t=Vs(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function $i(e){return e[Be]=!1,e.nodes&&e.nodes.forEach(t=>$i(t)),e}var Ki={},Xe=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,n,i){this.stringified=!1,this.processed=!1;let r;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))r=$i(n);else if(n instanceof e||n instanceof Ws)r=$i(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{let o=Wc;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(n,i)}catch(a){this.processed=!0,this.error=a}r&&!r[zc]&&Bc.rebuild(r)}this.result=new Ws(t,r,i),this.helpers={...Ki,postcss:Ki,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let i=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=i.postcssPlugin,t.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return t}prepareVisitors(){this.listeners={};let t=(n,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([n,r])};for(let n of this.plugins)if(typeof n=="object")for(let i in n){if(!qc[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$c[i])if(typeof n[i]=="object")for(let r in n[i])r==="*"?t(n,i,n[i][r]):t(n,i+"-"+r.toLowerCase(),n[i][r]);else typeof n[i]=="function"&&t(n,i,n[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],i=this.runOnRoot(n);if(en(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Be];){t[Be]=!0;let n=[Us(t)];for(;n.length>0;){let i=this.visitTick(n);if(en(i))try{await i}catch(r){let o=n[n.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[n,i]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let r=t.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(t,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(i=>t.Once(i,this.helpers));return en(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=Vc;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let i=this.result.root.source;if(t.map===void 0&&!(i&&i.input&&i.input.map)){let a="";return n(this.result.root,u=>{a+=u}),this.result.css=a,this.result}let o=new Gc(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(en(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Be];)t[Be]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[i,r]of t){this.result.lastPlugin=i;let o;try{o=r(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(en(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:i,visitors:r}=n;if(i.type!=="root"&&i.type!=="document"&&!i.parent){t.pop();return}if(r.length>0&&n.visitorIndex<r.length){let[a,u]=r[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===r.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(i.toProxy(),this.helpers)}catch(s){throw this.handleError(s,i)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!u[Be]){u[Be]=!0,t.push(Us(u));return}n.iterator=0,delete i.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===gt){i.nodes&&i.nodes.length&&(i[Be]=!0,n.iterator=i.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[Be]=!0;let n=Vs(t);for(let i of n)if(i===gt)t.nodes&&t.each(r=>{r[Be]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}};Xe.registerPostcss=e=>{Ki=e};zs.exports=Xe;Xe.default=Xe;Uc.registerLazyResult(Xe);Hc.registerLazyResult(Xe)});var qs=ee((Xh,js)=>{"use strict";var Kc=Vi(),Jc=Rn(),Yc=kn(),Xc=Gt(),Yh=qi(),tn=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=Jc;try{t=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,i){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=i,this._map=void 0;let r=Xc;this.result=new Yc(this._processor,void 0,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Kc(r,void 0,this._opts,n);if(a.isMap()){let[u,s]=a.generate();u&&(this.result.css=u),s&&(this.result.map=s)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}};js.exports=tn;tn.default=tn});var Ks=ee((Qh,$s)=>{"use strict";var Qc=An(),Zc=Ji(),ed=qs(),td=pt(),lt=class{constructor(t=[]){this.version="8.5.14",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let i of t)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)n.push(i);else if(typeof i=="function")n.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new ed(this,t,n):new Zc(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};$s.exports=lt;lt.default=lt;td.registerProcessor(lt);Qc.registerProcessor(lt)});var na=ee((Zh,ta)=>{"use strict";var Js=En(),Ys=jt(),nd=Je(),id=yn(),Xs=$t(),Qs=An(),rd=As(),od=Jt(),sd=Ji(),ad=Wi(),ld=Vt(),ud=Rn(),Yi=Ks(),cd=kn(),Zs=pt(),ea=_n(),dd=Gt(),fd=ji();function ae(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Yi(e)}ae.plugin=function(t,n){let i=!1;function r(...a){console&&console.warn&&!i&&(i=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
25
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),i=t.root||vn(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Ls(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let n=this.css.indexOf("*/",t+3);if(n===-1)break;for(;t>0&&this.css[t-1]===`
|
|
26
|
+
`;)t--;this.css=this.css.slice(0,t)+this.css.slice(n+2)}}}}generate(){if(this.clearAnnotation(),Uc&&Wc&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Mn.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Mn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Mn({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,s,l)=>{if(this.css+=u,s&&l!=="end"&&(r.generated.line=t,r.generated.column=n-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),a=u.match(/\n/g),a?(t+=a.length,o=u.lastIndexOf(`
|
|
27
|
+
`),n=u.length-o):n+=u.length,s&&l!=="start"){let d=s.parent||{raws:{}};(!(s.type==="decl"||s.type==="atrule"&&!s.nodes)||s!==d.last||d.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=t,r.generated.column=n-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let i=this.opts.to?vn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=vn(Ms(i,this.mapOpts.annotation)));let r=vs(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new Gc(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!t[i]){t[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(Ts){let i=Ts(t).toString();return this.memoizedFileURLs.set(t,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;Ns==="\\"&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}};Rs.exports=zi});var Is=ee((s0,Ds)=>{"use strict";var Nn=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ln=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vc=/.[\r\n"'(/\\]/,ks=/[\da-f]/i;Ds.exports=function(t,n={}){let i=t.css.valueOf(),r=n.ignoreErrors,o,a,u,s,l,d,m,f,x,S,y=i.length,b=0,A=[],_=[],N=-1;function $(){return b}function P(F){throw t.error("Unclosed "+F,b)}function T(){return _.length===0&&b>=y}function w(F){if(_.length)return _.pop();if(b>=y)return;let v=F?F.ignoreUnclosed:!1;switch(o=i.charCodeAt(b),o){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,o=i.charCodeAt(s);while(o===32||o===10||o===9||o===13||o===12);d=["space",i.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let R=String.fromCharCode(o);d=[R,R,b];break}case 40:{if(S=A.length?A.pop()[1]:"",x=i.charCodeAt(b+1),S==="url"&&x!==39&&x!==34&&x!==32&&x!==10&&x!==9&&x!==12&&x!==13){s=b;do{if(m=!1,s=i.indexOf(")",s+1),s===-1)if(r||v){s=b;break}else P("bracket");for(f=s;i.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);d=["brackets",i.slice(b,s+1),b,s],b=s}else b<=N?d=["(","(",b]:(s=i.indexOf(")",b+1),a=i.slice(b,s+1),s===-1||Vc.test(a)?(N=s===-1?y:s,d=["(","(",b]):(d=["brackets",a,b,s],b=s));break}case 39:case 34:{l=o===39?"'":'"',s=b;do{if(m=!1,s=i.indexOf(l,s+1),s===-1)if(r||v){s=b+1;break}else P("string");for(f=s;i.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);d=["string",i.slice(b,s+1),b,s],b=s;break}case 64:{Nn.lastIndex=b+1,Nn.test(i),Nn.lastIndex===0?s=i.length-1:s=Nn.lastIndex-2,d=["at-word",i.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,u=!0;i.charCodeAt(s+1)===92;)s+=1,u=!u;if(o=i.charCodeAt(s+1),u&&o!==47&&o!==32&&o!==10&&o!==9&&o!==13&&o!==12&&(s+=1,ks.test(i.charAt(s)))){for(;ks.test(i.charAt(s+1));)s+=1;i.charCodeAt(s+1)===32&&(s+=1)}d=["word",i.slice(b,s+1),b,s],b=s;break}default:{o===47&&i.charCodeAt(b+1)===42?(s=i.indexOf("*/",b+2)+1,s===0&&(r||v?s=i.length:P("comment")),d=["comment",i.slice(b,s+1),b,s],b=s):(Ln.lastIndex=b+1,Ln.test(i),Ln.lastIndex===0?s=i.length-1:s=Ln.lastIndex-2,d=["word",i.slice(b,s+1),b,s],A.push(d),b=s);break}}return b++,d}function C(F){_.push(F)}return{back:C,endOfFile:T,nextToken:w,position:$}}});var Hs=ee((a0,Bs)=>{"use strict";var zc=An(),jc=jt(),qc=$t(),$c=pt(),Ps=Tn(),Kc=Is(),Os={empty:!0,space:!0};function Jc(e){for(let t=e.length-1;t>=0;t--){let n=e[t],i=n[3]||n[2];if(i)return i}}var qi=class{constructor(t){this.input=t,this.root=new $c,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new zc;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let i,r,o,a=!1,u=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),i=t[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){u=!0;break}else if(i==="}"){if(s.length>0){for(o=s.length-1,r=s[o];r&&r[0]==="space";)r=s[--o];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(t);break}else s.push(t);else s.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(n.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(n,"params",s),a&&(t=s[s.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let i=0,r;for(let o=n-1;o>=0&&(r=t[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let n=0,i,r,o;for(let[a,u]of t.entries()){if(r=u,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=r}return!1}comment(t){let n=new jc;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let i=t[1].slice(2,-2);if(!i.trim())n.text="",n.raws.left=i,n.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=r[2],n.raws.left=r[1],n.raws.right=r[3]}}createTokenizer(){this.tokenizer=Kc(this.input)}decl(t,n){let i=new qc;this.init(i,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(r[3]||r[2]||Jc(t)),i.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=t.shift()[1]}i.raws.between="";let o;for(;t.length;)if(o=t.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],u;for(;t.length&&(u=t[0][0],!(u!=="space"&&u!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(o=t[l],o[1].toLowerCase()==="!important"){i.important=!0;let d=this.stringFrom(t,l);d=this.spacesFromEnd(t)+d,d!==" !important"&&(i.raws.important=d);break}else if(o[1].toLowerCase()==="important"){let d=t.slice(0),m="";for(let f=l;f>0;f--){let x=d[f][0];if(m.trim().startsWith("!")&&x!=="space")break;m=d.pop()[1]+m}m.trim().startsWith("!")&&(i.important=!0,i.raws.important=m,t=d)}if(o[0]!=="space"&&o[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new Ps;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(t[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,i=null,r=!1,o=null,a=[],u=t[1].startsWith("--"),s=[],l=t;for(;l;){if(i=l[0],s.push(l),i==="("||i==="[")o||(o=l),a.push(i==="("?")":"]");else if(u&&r&&i==="{")o||(o=l),a.push("}");else if(a.length===0)if(i===";")if(r){this.decl(s,u);return}else break;else if(i==="{"){this.rule(s);return}else if(i==="}"){this.tokenizer.back(s.pop()),n=!0;break}else i===":"&&(r=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&r){if(!u)for(;s.length&&(l=s[s.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(s.pop());this.decl(s,u)}else this.unknownWord(s)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,i,r){let o,a,u=i.length,s="",l=!0,d,m;for(let f=0;f<u;f+=1)o=i[f],a=o[0],a==="space"&&f===u-1&&!r?l=!1:a==="comment"?(m=i[f-1]?i[f-1][0]:"empty",d=i[f+1]?i[f+1][0]:"empty",!Os[m]&&!Os[d]?s.slice(-1)===","?l=!1:s+=o[1]:l=!1):s+=o[1];if(!l){let f=i.reduce((x,S)=>x+S[1],"");t.raws[n]={raw:f,value:s}}t[n]=s}rule(t){t.pop();let n=new Ps;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let n,i="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)i+=t.shift()[1];return i}spacesFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],n==="space");)i=t.pop()[1]+i;return i}stringFrom(t,n){let i="";for(let r=n;r<t.length;r++)i+=t[r][1];return t.splice(n,t.length-n),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};Bs.exports=qi});var kn=ee((l0,Gs)=>{"use strict";var Xc=Je(),Yc=Jt(),Qc=Hs();function Rn(e,t){let n=new Yc(e,t),i=new Qc(n);try{i.parse()}catch(r){throw r}return i.root}Gs.exports=Rn;Rn.default=Rn;Xc.registerParse(Rn)});var $i=ee((u0,Ws)=>{"use strict";var Qt=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Ws.exports=Qt;Qt.default=Qt});var Dn=ee((c0,Us)=>{"use strict";var Zc=$i(),Zt=class{get content(){return this.css}constructor(t,n,i){this.processor=t,this.messages=[],this.root=n,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let i=new Zc(t,n);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>t.type==="warning")}};Us.exports=Zt;Zt.default=Zt});var Ki=ee((d0,zs)=>{"use strict";var Vs={};zs.exports=function(t){Vs[t]||(Vs[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Yi=ee((m0,Ks)=>{"use strict";var ed=Je(),td=wn(),nd=ji(),id=kn(),js=Dn(),rd=pt(),od=Gt(),{isClean:Be,my:sd}=En(),f0=Ki(),ad={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ld={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ud={Once:!0,postcssPlugin:!0,prepare:!0},gt=0;function en(e){return typeof e=="object"&&typeof e.then=="function"}function $s(e){let t=!1,n=ad[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,gt,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,gt,n+"Exit"]:[n,n+"Exit"]}function qs(e){let t;return e.type==="document"?t=["Document",gt,"DocumentExit"]:e.type==="root"?t=["Root",gt,"RootExit"]:t=$s(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ji(e){return e[Be]=!1,e.nodes&&e.nodes.forEach(t=>Ji(t)),e}var Xi={},Ye=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,n,i){this.stringified=!1,this.processed=!1;let r;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))r=Ji(n);else if(n instanceof e||n instanceof js)r=Ji(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{let o=id;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(n,i)}catch(a){this.processed=!0,this.error=a}r&&!r[sd]&&ed.rebuild(r)}this.result=new js(t,r,i),this.helpers={...Xi,postcss:Xi,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let i=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=i.postcssPlugin,t.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return t}prepareVisitors(){this.listeners={};let t=(n,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([n,r])};for(let n of this.plugins)if(typeof n=="object")for(let i in n){if(!ld[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ud[i])if(typeof n[i]=="object")for(let r in n[i])r==="*"?t(n,i,n[i][r]):t(n,i+"-"+r.toLowerCase(),n[i][r]);else typeof n[i]=="function"&&t(n,i,n[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],i=this.runOnRoot(n);if(en(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Be];){t[Be]=!0;let n=[qs(t)];for(;n.length>0;){let i=this.visitTick(n);if(en(i))try{await i}catch(r){let o=n[n.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[n,i]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let r=t.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(t,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(i=>t.Once(i,this.helpers));return en(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=od;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let i=this.result.root.source;if(t.map===void 0&&!(i&&i.input&&i.input.map)){let a="";return n(this.result.root,u=>{a+=u}),this.result.css=a,this.result}let o=new nd(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(en(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Be];)t[Be]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[i,r]of t){this.result.lastPlugin=i;let o;try{o=r(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(en(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:i,visitors:r}=n;if(i.type!=="root"&&i.type!=="document"&&!i.parent){t.pop();return}if(r.length>0&&n.visitorIndex<r.length){let[a,u]=r[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===r.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(i.toProxy(),this.helpers)}catch(s){throw this.handleError(s,i)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!u[Be]){u[Be]=!0,t.push(qs(u));return}n.iterator=0,delete i.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===gt){i.nodes&&i.nodes.length&&(i[Be]=!0,n.iterator=i.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[Be]=!0;let n=$s(t);for(let i of n)if(i===gt)t.nodes&&t.each(r=>{r[Be]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}};Ye.registerPostcss=e=>{Xi=e};Ks.exports=Ye;Ye.default=Ye;rd.registerLazyResult(Ye);td.registerLazyResult(Ye)});var Xs=ee((h0,Js)=>{"use strict";var cd=ji(),dd=kn(),fd=Dn(),md=Gt(),p0=Ki(),tn=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=dd;try{t=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,i){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=i,this._map=void 0;let r=md;this.result=new fd(this._processor,void 0,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new cd(r,void 0,this._opts,n);if(a.isMap()){let[u,s]=a.generate();u&&(this.result.css=u),s&&(this.result.map=s)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}};Js.exports=tn;tn.default=tn});var Qs=ee((g0,Ys)=>{"use strict";var pd=wn(),hd=Yi(),gd=Xs(),xd=pt(),lt=class{constructor(t=[]){this.version="8.5.14",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let i of t)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)n.push(i);else if(typeof i=="function")n.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new gd(this,t,n):new hd(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};Ys.exports=lt;lt.default=lt;xd.registerProcessor(lt);pd.registerProcessor(lt)});var sa=ee((x0,oa)=>{"use strict";var Zs=An(),ea=jt(),bd=Je(),yd=Sn(),ta=$t(),na=wn(),Sd=_s(),Ed=Jt(),Ad=Yi(),wd=Vi(),Cd=Vt(),Fd=kn(),Qi=Qs(),_d=Dn(),ia=pt(),ra=Tn(),Td=Gt(),vd=$i();function ae(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Qi(e)}ae.plugin=function(t,n){let i=!1;function r(...a){console&&console.warn&&!i&&(i=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
28
28
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
29
|
-
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=t,u.postcssVersion=new
|
|
29
|
+
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=t,u.postcssVersion=new Qi().version,u}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(a,u,s){return ae([r(s)]).process(a,u)},r};ae.stringify=Td;ae.parse=Fd;ae.fromJSON=Sd;ae.list=wd;ae.comment=e=>new ea(e);ae.atRule=e=>new Zs(e);ae.decl=e=>new ta(e);ae.rule=e=>new ra(e);ae.root=e=>new ia(e);ae.document=e=>new na(e);ae.CssSyntaxError=yd;ae.Declaration=ta;ae.Container=bd;ae.Processor=Qi;ae.Document=na;ae.Comment=ea;ae.Warning=vd;ae.AtRule=Zs;ae.Result=_d;ae.Input=Ed;ae.Rule=ra;ae.Root=ia;ae.Node=Cd;Ad.registerPostcss(ae);oa.exports=ae;ae.default=ae});function fn(){return globalThis}function M(e,t){if(typeof window>"u")return;let n=fn(),i=n.__hf?.onSwallowed;if(i)try{i({label:e,error:t})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${e} swallowed:`,t)}var Ql=["seconds-time","rational-fps","seek-keep-playing"];function Zl(e,t){let n=Math.abs(e),i=Math.abs(t);for(;i!==0;){let r=n%i;n=i,i=r}return n||1}function eu(e){let t=Number.isFinite(e)&&e>0?e:30,n=Number.isInteger(t)?1:1e6,i=Math.round(t*n),r=Zl(i,n);return{numerator:i/r,denominator:n/r}}function si(e){if(typeof e!="object"||e===null)return null;let t=e;return!Number.isFinite(t.numerator)||!Number.isFinite(t.denominator)||(t.numerator??0)<=0||(t.denominator??0)<=0?null:Number(t.numerator)/Number(t.denominator)}function Wr(e){return{protocolVersion:1,capabilities:Ql,fps:eu(e)}}function tu(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function Ur(e,t=30){if(typeof e!="object"||e===null)return{status:"legacy",fps:t};let n=e;if(n.protocolVersion===void 0)return{status:"legacy",fps:t};if(n.protocolVersion!==1)return{status:"unsupported",code:"unsupported_protocol_version",receivedVersion:n.protocolVersion};let i=si(n.fps);return i===null||!tu(n.capabilities)?{status:"unsupported",code:"invalid_protocol_metadata",receivedVersion:n.protocolVersion}:{status:"supported",fps:i,metadata:n}}var Vr=30;function zr(e){Vr=Number.isFinite(e)&&e>0?e:30}function xe(e){try{window.parent.postMessage({...e,...Wr(Vr)},"*")}catch(t){M("bridge.postMessage",t)}}var nu={play:(e,t)=>t.onPlay(),pause:(e,t)=>t.onPause(),"stop-media":(e,t)=>t.onStopMedia(),seek:(e,t)=>t.onSeek(iu(e,t),e.seekMode??"commit"),tick:(e,t)=>t.onTick(),"set-muted":(e,t)=>t.onSetMuted(!!e.muted),"set-volume":(e,t)=>t.onSetVolume(Math.max(0,Math.min(1,Number(e.volume??1)))),"set-media-output-muted":(e,t)=>t.onSetMediaOutputMuted(!!e.muted),"set-native-media-sync-disabled":(e,t)=>t.onSetNativeMediaSyncDisabled(!!e.disabled),"set-web-audio-media-disabled":(e,t)=>t.onSetWebAudioMediaDisabled(!!e.disabled),"set-playback-rate":(e,t)=>t.onSetPlaybackRate(Number(e.playbackRate??1)),"set-root-duration":(e,t)=>t.onSetRootDuration(Number(e.durationSeconds??0)),"set-color-grading":(e,t)=>t.onSetColorGrading(e.target??null,e.grading??null),"set-color-grading-compare":(e,t)=>t.onSetColorGradingCompare(e.target??null,e.compare??null),"enable-pick-mode":(e,t)=>t.onEnablePickMode(),"disable-pick-mode":(e,t)=>t.onDisablePickMode(),"flash-elements":e=>ou(e)};function iu(e,t){let n=Number(e.timeSeconds);if(Number.isFinite(n))return Math.max(0,n);let r=si(e.fps)??t.getCanonicalFps();return Math.max(0,Number(e.frame??0))/r}function ru(e){let t=Ur(e);return t.status!=="unsupported"?!1:(xe({source:"hf-preview",type:"diagnostic",code:`runtime.protocol.${t.code}`,details:{receivedVersion:typeof t.receivedVersion=="string"||typeof t.receivedVersion=="number"?t.receivedVersion:null}}),!0)}function ou(e){let t=e.selectors,n=e.duration||800;t&&su(t,n)}function jr(e){let t=n=>{let i=n.data;if(!i||i.source!=="hf-parent"||i.type!=="control"||ru(i))return;let r=i.action;if(typeof r!="string")return;let o=nu[r];o&&o(i,e)};return window.addEventListener("message",t),xe({source:"hf-preview",type:"ready"}),t}function su(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`
|
|
30
30
|
.__hf-flash {
|
|
31
31
|
outline: 2px solid rgba(59, 130, 246, 0.6) !important;
|
|
32
32
|
outline-offset: 2px !important;
|
|
@@ -36,13 +36,13 @@ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=t,u.p
|
|
|
36
36
|
0% { outline-color: rgba(59, 130, 246, 0.8); }
|
|
37
37
|
100% { outline-color: transparent; }
|
|
38
38
|
}
|
|
39
|
-
`,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(r=>{r.classList.add("__hf-flash"),setTimeout(()=>r.classList.remove("__hf-flash"),t)})}catch(i){N("bridge.flashElements.querySelector",i)}}var si=null;function Vr(e){si=e}function ot(e,t){if(si)try{si({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){N("runtime.analytics.site1",n)}}function iu(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,i=t.length;for(;n<i&&t[n]==="-";)n++;for(;i>n&&t[i-1]==="-";)i--;let r=t.slice(n,i);return r.length>0?r:"node"}function vt(e){return`--${iu(e)}`}function zr(e){let t=new Map;for(let n of e){let i=vt(n),r=t.get(i);r?r.includes(n)||r.push(n):t.set(i,[n])}return[...t.values()].filter(n=>n.length>1)}function jr(){if(typeof document>"u")return{};let e=new Set;document.documentElement?.hasAttribute("data-composition-variables")&&e.add(document.documentElement);for(let i of Array.from(document.querySelectorAll("[data-composition-variables]")))e.add(i);let t={};for(let i of e)Object.assign(t,Tt(i));let n=mn();return{...t,...n}}function Tt(e){if(!e)return{};let t=e.getAttribute("data-composition-variables");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}if(!Array.isArray(n))return{};let i={};for(let r of n){if(!r||typeof r!="object")continue;let o=r;typeof o.id!="string"||!("default"in o)||(i[o.id]=o.default)}return i}var ai="data-hf-css-vars";function li(e){return"style"in e&&typeof e.style?.setProperty=="function"}function ui(e,t){if(!li(e))return;let n=[];for(let[i,r]of Object.entries(t))if(typeof r=="string"&&r!==""||typeof r=="number"){let o=vt(i);e.style.setProperty(o,String(r)),n.push(o)}n.length>0&&e.setAttribute(ai,n.join(" "))}function qr(e){if(!li(e))return;let t=e.getAttribute(ai);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(ai)}}function $r(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let r of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(r);let n=mn(),i=[];for(let r of t)i.push(...ru(r,n,e.defaultView));for(let r of zr(i))console.warn(`composition variables ${r.join(", ")} collapse to the same CSS property ${vt(r[0]??"")} \u2014 rename one to avoid cross-talk`)}function ru(e,t,n){if(!li(e))return[];let i=Tt(e),r={};for(let[o,a]of Object.entries(i)){if(o in t)continue;let u=vt(o);(e.style.getPropertyValue(u)||(n?n.getComputedStyle(e).getPropertyValue(u):"")).trim()===""&&(r[o]=a)}for(let[o,a]of Object.entries(t))o in i&&(r[o]=a);return ui(e,r),Object.keys(i)}function Kr(e){let t=e.getAttribute("data-variable-values");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}return!n||typeof n!="object"||Array.isArray(n)?{}:n}function mn(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function Jr(e){let t=[],n=l=>{if(typeof l.getAnimations!="function")return[];try{return l.getAnimations()}catch{return[]}},i=l=>e?.resolveStartSeconds?e.resolveStartSeconds(l):Number.parseFloat(l.getAttribute("data-start")??"0")||0,r=(l,c)=>{let m=null;try{m=l.effect?.getComputedTiming?.()??null}catch(b){N("runtime.adapters.css.site5",b)}if(!m)return{};let f=Number(m.endTime);return Number.isFinite(f)?{endSeconds:c+f/1e3}:{unbounded:!0}},o=(l,c)=>{for(let m of l){try{m.currentTime=c}catch(f){N("runtime.adapters.css.site1",f)}try{m.pause()}catch(f){N("runtime.adapters.css.site2",f)}}},a=l=>{for(let c of l)try{c.play()}catch(m){N("runtime.adapters.css.site3",m)}},u=l=>{for(let c of l)try{c.pause()}catch(m){N("runtime.adapters.css.site4",m)}},s=l=>{l.baseDelay?l.el.style.animationDelay=l.baseDelay:l.el.style.removeProperty("animation-delay"),l.basePlayState?l.el.style.animationPlayState=l.basePlayState:l.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{t=[];let l=document.querySelectorAll("*");for(let c of l){if(!(c instanceof HTMLElement))continue;let m=window.getComputedStyle(c);!m.animationName||m.animationName==="none"||t.push({el:c,baseDelay:c.style.animationDelay||"",basePlayState:c.style.animationPlayState||"",animations:n(c)})}},getInferredDurationSeconds:()=>{let l=0;for(let c of t){if(!c.el.isConnected)continue;let m=i(c.el);for(let f of n(c.el)){let b=r(f,m);b.endSeconds!=null&&(l=Math.max(l,b.endSeconds))}}return l>0?l:null},seek:l=>{let c=Number(l.time)||0;for(let m of t){if(!m.el.isConnected)continue;let f=i(m.el),b=Math.max(0,c-f)*1e3,E=m.animations;if(E.length>0){o(E,b);continue}m.el.style.animationPlayState="paused",m.el.style.animationDelay=`-${(b/1e3).toFixed(3)}s`}},pause:()=>{for(let l of t){if(!l.el.isConnected)continue;let c=l.animations;c.length>0&&u(c),s(l)}},play:()=>{for(let l of t)l.el.isConnected&&(s(l),a(l.animations))},revert:()=>{t=[]}}}function Yr(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let i=Math.max(0,Number(t.time)||0),r=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(i+.001,!0),n.totalTime(i,r)):n.seek(i,r)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Xr(){return{name:"animejs",discover:()=>{try{let e=window.anime;if(!e||typeof e.running>"u")return;let t=e.running;if(!Array.isArray(t)||t.length===0)return;let n=window.__hfAnime??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfAnime=n}catch(e){N("runtime.adapters.animejs.site1",e)}},seek:e=>{let t=Math.max(0,(Number(e.time)||0)*1e3),n=window.__hfAnime;if(!(!n||n.length===0))for(let i of n)try{typeof i.seek=="function"&&i.seek(t)}catch(r){N("runtime.adapters.animejs.site2",r)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){N("runtime.adapters.animejs.site3",n)}},play:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.play=="function"&&t.play()}catch(n){N("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function Zr(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfLottie=n}}}catch(e){N("runtime.adapters.lottie.site1",e)}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let i of n)try{if(ci(i))i.goToAndStop(t*1e3,!1);else if(di(i)){if(typeof i.setCurrentRawFrameValue=="function"){let r=i.totalFrames??0,o=i.frameRate??30,a=t*o;r>0&&i.setCurrentRawFrameValue(Math.min(a,r-1))}else if(typeof i.seek=="function"){let r=i.duration??1,o=Math.min(100,t/r*100);i.seek(o)}}}catch(r){N("runtime.adapters.lottie.site2",r)}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(ci(t)||di(t))&&t.pause()}catch(n){N("runtime.adapters.lottie.site3",n)}},revert:()=>{},getInferredDurationSeconds:()=>{let e=window.__hfLottie;if(!e||e.length===0)return null;let t=0,n=!1;for(let i of e){let r=null;try{r=ou(i)}catch(o){N("runtime.adapters.lottie.site4",o)}r!=null&&(n=!0,t=Math.max(t,r))}return n?t:null}}}function Qr(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function ou(e){return ci(e)?Qr(e.totalFrames,e.frameRate):di(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:Qr(e.totalFrames,e.frameRate):null}function ci(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function di(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var fi=-1;function pn(e){if(e!==fi){fi=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){N("runtime.adapters.seek-dispatch.site1",t)}}}function eo(e){fi=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){N("runtime.adapters.seek-dispatch.force",t)}}function to(){let e=null,t=0,n=null,i=null,r=null,o=null,a=()=>{if(typeof window>"u")return null;let c=window.THREE?.DefaultLoadingManager;return!c||typeof c!="object"||typeof c.itemsLoaded!="number"||typeof c.itemsTotal!="number"?null:c},u=l=>{o||l.itemsTotal<=l.itemsLoaded||(o=new Promise(c=>{l.onLoad=function(){try{r?.call(this)}finally{o=null,l.onLoad=r??null,c()}}}))},s=l=>{n!==l&&(n=l,i=l.onStart??null,r=l.onLoad??null,l.onStart=function(c,m,f){try{i?.call(this,c,m,f)}finally{u(l)}})};return{name:"three",discover:()=>{let l=a();l&&(s(l),u(l))},seek:l=>{e=Math.max(0,Number(l.time)||0),t=e,window.__hfThreeTime=e,pn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let l=a();return!l||l.itemsTotal<=l.itemsLoaded?null:(o||u(l),o)}}}function Oe(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let i=e.getInstances();if(i.length===0)return null;let r=i.filter(o=>!n.has(o));return r.length===0?null:t||(t=Promise.allSettled(r.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function no(){return Oe({name:"mapbox",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMapbox;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function io(){return Oe({name:"leaflet",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfLeaflet;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>e.whenReady(t))})}function ro(){return Oe({name:"google-maps",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfGoogleMaps;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{let n=e.addListener("tilesloaded",()=>{n.remove(),t()})})})}function oo(){return Oe({name:"maplibre",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMaplibre;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function so(){return Oe({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}function ao(){let e=null,t=0;return{name:"typegpu",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfTypegpuTime=e,pn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function lo(e){let t=e.nextElementSibling;if(t instanceof HTMLImageElement&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;if(e.id){let n=document.getElementById(`__render_frame_${e.id}__`);if(n instanceof HTMLImageElement&&n.complete&&n.naturalWidth>0)return n}return null}function uo(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,i,r){if(n?.source instanceof HTMLVideoElement){let o=lo(n.source);if(o)return t.call(this,{...n,source:o},i,r)}return t.call(this,n,i,r)}}function co(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let i=n?.prototype;if(i)for(let r of t){let o=i[r];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...u){let s=u.length-1,l=u[s];if(l instanceof HTMLVideoElement){let c=lo(l);c&&(u[s]=c)}return o.apply(this,u)};a.__hfVideoPatched=!0,i[r]=a}}}function fo(){let e=!1,t=0,n=!1,i,r,o,a=new Set,u=new WeakMap,s=()=>{if(!document.getAnimations)return[];try{return document.getAnimations()}catch{return[]}},l=x=>{let A=Number(x.currentTime);return Number.isFinite(A)&&A>0?A:0},c=(x,A)=>A<=0?x:x>=A?Math.max(0,x-A):x,m=(x,A)=>{let _=u.get(x);if(_)return _;let M={compositionTimeMs:A,animationTimeMs:e?c(l(x),A):l(x)};return u.set(x,M),M},f=(x,A)=>{if(!a.has(x)){a.add(x);let _=()=>{a.delete(x)};try{x.addEventListener("finish",_,{once:!0}),x.addEventListener("cancel",_,{once:!0})}catch(M){N("runtime.adapters.waapi.site4",M)}}m(x,A)},b=(x,A)=>{for(let _ of x)f(_,A)},E=()=>{if(n||typeof Element>"u")return;let x=Element.prototype;if(typeof x.animate!="function"||x.__hfOriginalAnimate)return;let A=x.animate;try{Object.defineProperty(x,"__hfOriginalAnimate",{value:A,configurable:!0});let _=function(...M){let $=A.apply(this,M);return f($,t),$};x.animate=_,i=x,r=A,o=_,n=!0}catch{}},y=x=>{let A=null;try{A=x.effect?.getComputedTiming?.()??null}catch($){N("runtime.adapters.waapi.site4",$)}if(!A)return{};let _=Number(A.endTime);return Number.isFinite(_)?{endSeconds:(u.get(x)?.compositionTimeMs??0)/1e3+_/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,E(),b(s(),t)},seek:x=>{let A=Math.max(0,(Number(x.time)||0)*1e3);t=A,(!e||a.size>0)&&b(s(),e?A:0);for(let _ of a){let M=e?m(_,A):m(_,0),$=M.animationTimeMs+Math.max(0,A-M.compositionTimeMs);try{_.currentTime=$}catch(P){N("runtime.adapters.waapi.site1",P)}try{_.pause()}catch(P){N("runtime.adapters.waapi.site2",P)}}},pause:()=>{e||b(s(),t);for(let x of a)try{x.pause()}catch(A){N("runtime.adapters.waapi.site3",A)}},revert:()=>{if(a.clear(),u=new WeakMap,e=!1,t=0,i&&r&&o&&i.animate===o)try{i.animate=r,i.__hfOriginalAnimate===r&&delete i.__hfOriginalAnimate}catch(x){N("runtime.adapters.waapi.site5",x)}i=void 0,r=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let x=0;for(let A of s()){let _=y(A);_.endSeconds!=null&&(x=Math.max(x,_.endSeconds))}return x>0?x:null}}}function mo(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let i=e[n],r=e[n+1]??i,o=r.time-i.time,a=o<=0?0:Math.min(1,Math.max(0,(t-i.time)/o));return i.volume+(r.volume-i.volume)*a}function su(e,t,n,i){let r=Number.parseFloat(e.dataset.start??"0")||0,o=Number.parseFloat(e.dataset.end??""),a=Number.parseFloat(e.dataset.duration??""),u=Number.isFinite(o)&&o>r?o:Number.isFinite(a)&&a>0?r+a:n,s=Number.parseFloat(e.dataset.volume??""),l=Number.isFinite(s)?Math.max(0,Math.min(1,s)):1;e.volume=l;let c=1/Math.min(60,Math.max(1,i)),m=Math.max(0,r),f=Math.min(n,u),b=[];for(let y=m;y<=f+1e-6;y+=c){let x=Math.min(f,y);t(x);let A=Number(e.volume);if(!Number.isFinite(A))continue;let _=Math.max(0,Math.min(1,A)),M=b.at(-1);if((!M||Math.abs(M.volume-_)>1e-4||x===f)&&b.push({time:Number(x.toFixed(6)),volume:Number(_.toFixed(6))}),x===f)break}return b.some(y=>Math.abs(y.volume-l)>1e-4)?b:null}function po(e,t,n,i){if(!t||!(e instanceof HTMLAudioElement)&&!(e instanceof HTMLVideoElement)||n<=0)return;let r=u=>{try{typeof t.totalTime=="function"?t.totalTime(u,!0):typeof t.seek=="function"&&t.seek(u,!0)}catch{}},o=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,a=su(e,r,n,60);Number.isFinite(o)&&r(o),a&&i.set(e,a)}function Lt(e){let t=e.defaultPlaybackRate;return Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1}function ho(e){let t=Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),i=[],r=[],o=0;for(let a of n){let u=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(u))continue;let s=Number.parseFloat(a.dataset.playbackStart??a.dataset.mediaStart??"0")||0,l=Lt(a),c=a.loop,m=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,f=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(f)||f<=0)&&m!=null&&(f=Math.max(0,(m-s)/l));let b=Number.isFinite(f)&&f>0?u+f:Number.POSITIVE_INFINITY,E=Number.parseFloat(a.dataset.volume??""),y={el:a,start:u,mediaStart:s,duration:Number.isFinite(f)&&f>0?f:Number.POSITIVE_INFINITY,end:b,volume:Number.isFinite(E)?E:null,playbackRate:l,loop:c,sourceDuration:m};i.push(y),a.tagName==="VIDEO"&&r.push(y),Number.isFinite(b)&&(o=Math.max(o,b))}return{timedMediaEls:n,mediaClips:i,videoClips:r,maxMediaEnd:o}}var mi=new WeakMap,Mt=new WeakMap,pi=new WeakSet,ct=new WeakSet;function au(e){if(ct.has(e))return;ct.add(e);let t=()=>ct.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var lu=3;function uu(e){return e.error!=null||e.networkState===lu}var hi=new WeakMap;function Nt(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function go(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:i}=n;if(!i.isConnected)continue;let r=(e.timeSeconds-n.start)*n.playbackRate+n.mediaStart;if(e.timeSeconds>=n.start&&e.timeSeconds<=n.end&&r>=0&&(!i.ended||n.loop)){if(n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let T=n.sourceDuration-n.mediaStart;T>0&&r>=n.sourceDuration&&(r=n.mediaStart+(r-n.mediaStart)%T)}let a=Nt(e.userVolume??1),u=Nt(n.volume??1),s=hi.get(i),l=Nt(i.volume),c;n.volumeKeyframes&&n.volumeKeyframes.length>0?c=Nt(mo(n.volumeKeyframes,r)):s===void 0||Math.abs(l-s)>1e-4?c=l:c=u;let m=Nt(c*a);i.volume=m,hi.set(i,m),e.onElementVolume?.(i,m),(t||e.isWebAudioOwned?.(i))&&(i.muted=!0),i.preload!=="auto"&&(i.preload="auto");try{i.playbackRate=n.playbackRate*e.playbackRate}catch(T){N("runtime.media.site1",T)}let f=.04,b=2,E=i.currentTime||0,y=Math.abs(E-r),x=r-E,A=mi.get(i);mi.set(i,x);let _=A===void 0,M=!_&&Math.abs(x-A)>.5,$=y>3,P=y>.5&&(_||M||$),v=i.tagName==="VIDEO"&&!i.paused,w=A!==void 0&&Math.abs(x-A)<.004,C=!1;if(!v&&!P&&!_&&w&&y>f){let T=(Mt.get(i)??0)+1;Mt.set(i,T),T>=b&&(C=!0,Mt.set(i,0))}else y<=f&&Mt.set(i,0);let F=!v&&e.forceSync&&y>.02;if(P||C||F){if(!(i.tagName==="VIDEO"&&i.id&&!!document.getElementById(`__render_frame_${i.id}__`))){try{i.currentTime=r}catch(R){N("runtime.media.site2",R)}if(Math.abs(i.currentTime-r)>.5&&!pi.has(i)){pi.add(i),i.load();try{i.currentTime=r}catch(R){N("runtime.media.site3",R)}}}ct.delete(i)}e.playing&&i.paused&&!ct.has(i)&&!uu(i)?(au(i),i.play().catch(T=>{ct.delete(i),(T&&typeof T=="object"&&"name"in T?String(T.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!i.paused&&i.pause();continue}mi.delete(i),Mt.delete(i),pi.delete(i),hi.delete(i),i.paused||i.pause()}}var Ue="data-color-grading",Rt="data-hf-color-grading-source-hidden",bn="data-hf-authored-opacity",xo="__hf_color_grading_",cu="rec709",hn={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},gn={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},xn={blur:0,pixelate:0},bo=Object.keys(hn),du=Object.keys(gn),yo=Object.keys(xn);function be(e,t,n={},i={}){return{id:e,label:t,adjust:{...hn,...n},details:{...gn,...i},effects:{...xn}}}var fu=[be("neutral","Neutral"),be("natural-lift","Natural Lift",{exposure:.04,contrast:.06,highlights:-.06,shadows:.08,saturation:.05}),be("fresh-pop","Fresh Pop",{exposure:.08,contrast:.12,whites:.06,shadows:.04,temperature:-.02,vibrance:.08,saturation:.16}),be("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),be("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),be("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),be("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),be("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),be("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),be("vintage-wash","Vintage Wash",{exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},{vignette:.18}),be("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),be("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),be("warm-clean","Warm Clean",{exposure:.05,contrast:.08,highlights:-.08,shadows:.08,temperature:.16,vibrance:.04,saturation:.06}),be("cool-clean","Cool Clean",{contrast:.06,highlights:-.06,shadows:.06,temperature:-.12,tint:.04,saturation:.04}),be("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),be("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),be("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06})],mu=new Map(fu.map(e=>[e.id,e])),pu=/^\$(?:\{([A-Za-z0-9_.:-]+)\}|([A-Za-z0-9_.:-]+))$/,hu={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}},gu={vignette:{min:0,max:1},vignetteMidpoint:{min:0,max:1},vignetteRoundness:{min:-1,max:1},vignetteFeather:{min:0,max:1},grain:{min:0,max:1},grainSize:{min:0,max:1},grainRoughness:{min:0,max:1}},xu={blur:{min:0,max:1},pixelate:{min:0,max:1}};function st(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function bu(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function So(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function gi(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?bu(n,t.min,t.max):0}function yu(e){if(e==null)return null;let t=String(e).trim();return t||null}function Su(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!st(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:So(e.intensity,1)}}function Eu(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return st(n)?n:null}catch{return null}return{preset:t,intensity:1}}return st(e)?e:null}function Au(e,t){let n=e.trim().match(pu);if(!n)return e;let i=n[1]??n[2]??"";return i&&Object.hasOwn(t,i)?t[i]:e}function xi(e,t){if(typeof e=="string"){let i=Au(e,t);if(i!==e)return i;let r=e.trim();if(!r.startsWith("{"))return e;try{return xi(JSON.parse(r),t)}catch{return e}}if(!st(e))return e;let n={};for(let[i,r]of Object.entries(e))n[i]=xi(r,t);return n}function wu(e){return e?mu.get(e)??null:null}function bi(e){let t=Eu(e);if(!t||t.enabled===!1)return null;let n=yu(t.preset),i=wu(n),r=i?.adjust??hn,o=i?.details??gn,a=i?.effects??xn,u=st(t.adjust)?t.adjust:{},s=st(t.details)?t.details:{},l=st(t.effects)?t.effects:{},c=bo.reduce((b,E)=>(b[E]=gi(u[E]??r[E],hu[E]),b),{...hn}),m=du.reduce((b,E)=>(b[E]=gi(s[E]??o[E],gu[E]),b),{...gn}),f=yo.reduce((b,E)=>(b[E]=gi(l[E]??a[E],xu[E]),b),{...xn});return{enabled:!0,preset:n,intensity:So(t.intensity,1),adjust:c,details:m,effects:f,lut:Su(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():cu}}function Eo(e,t){return bi(xi(e,t))}function kt(e){return!e?.enabled||e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:bo.some(t=>Math.abs(e.adjust[t])>1e-4)||Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||yo.some(t=>Math.abs(e.effects[t])>1e-4)}var Cu=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),Fu=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(",");function Ao(e){let t=!1,n=null,i=null,r=null,o=null;function a(w,C){try{window.dispatchEvent(new CustomEvent(w,{detail:C}))}catch(F){N("runtime.picker.site1",F)}}function u(w){r=w,a("hyperframe:picker:hovered",{elementInfo:r,isPickMode:t,timestamp:Date.now()})}function s(w){o=w,a("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function l(w){let C=w.ownerDocument.defaultView;if(!C)return!1;let F=w;for(;F&&F!==document.body&&F!==document.documentElement;){let T=C.getComputedStyle(F);if(T.display==="none"||T.visibility==="hidden"||T.pointerEvents==="none")return!0;let R=Number.parseFloat(T.opacity);if(Number.isFinite(R)&&R<=.01&&!F.hasAttribute(Rt))return!0;F=F.parentElement}return!1}function c(w){if(!w||w===document.body||w===document.documentElement)return!1;let C=w.tagName.toLowerCase();return!(C==="script"||C==="style"||C==="link"||C==="meta"||w.classList.contains("__hf-pick-highlight")||w.closest(Cu)||l(w))}function m(w){return!!w?.closest(Fu)}function f(w){let C=w;if(C.id)return`#${C.id}`;let F=w.getAttribute("data-composition-id");if(F)return`[data-composition-id="${CSS.escape(F)}"]`;let T=w.getAttribute("data-composition-src");if(T)return`[data-composition-src="${CSS.escape(T)}"]`;let R=w.getAttribute("data-track-index");if(R)return`[data-track-index="${CSS.escape(R)}"]`;let z=w.tagName.toLowerCase(),U=w.parentElement;if(!U)return z;let ie=U.querySelectorAll(`:scope > ${z}`);if(ie.length===1)return z;for(let D=0;D<ie.length;D+=1)if(ie[D]===w)return`${z}:nth-of-type(${D+1})`;return z}function b(w){let C=w.tagName.toLowerCase(),F=(w.textContent??"").trim().replace(/\s+/g," "),T=(R,z)=>R.length>z?`${R.slice(0,z-1)}\u2026`:R;return C==="h1"||C==="h2"||C==="h3"?"Heading":C==="p"||C==="span"||C==="div"?F.length>0?T(F,56):"Text":C==="img"?"Image":C==="video"?"Video":C==="audio"?"Audio":C==="svg"?"Shape":w.getAttribute("data-composition-src")?"Composition":C==="section"?"Section":`${C.charAt(0).toUpperCase()}${C.slice(1)}`}function E(w,C,F){let T=typeof F=="number"&&F>0?F:8,R=[];if(document.elementsFromPoint)R=document.elementsFromPoint(w,C);else if(document.elementFromPoint){let ie=document.elementFromPoint(w,C);R=ie?[ie]:[]}if(m(R[0]??null))return[];let z={},U=[];for(let[ie,D]of R.entries()){if(!c(D))continue;let re=`${D.tagName}::${D.id||""}::${ie}`;if(!z[re]&&(z[re]=!0,U.push(D),U.length>=T))break}return U}function y(w){let C=w.getBoundingClientRect(),F={};for(let R of Array.from(w.attributes))R.name.startsWith("data-")&&(F[R.name]=R.value);return{id:w.id||null,tagName:w.tagName.toLowerCase(),selector:f(w),label:b(w),boundingBox:{x:C.left,y:C.top,width:C.width,height:C.height},textContent:w.textContent?w.textContent.trim().slice(0,200):null,src:w.getAttribute("src")||w.getAttribute("data-composition-src")||null,dataAttributes:F}}function x(w,C,F){return E(w,C,F).map(y)}function A(w){if(!t)return;let F=E(w.clientX,w.clientY,1)[0]??(w.target instanceof Element?w.target:null);if(!c(F)||n===F)return;n&&n.classList.remove("__hf-pick-highlight"),n=F,F.classList.add("__hf-pick-highlight");let T=y(F);u(T),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:T})}function _(w){if(!t)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation();let C=x(w.clientX,w.clientY,8);C.length!==0&&(u(C[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:C,selectedIndex:0,point:{x:w.clientX,y:w.clientY}}))}function M(w){w.key==="Escape"&&(P(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function $(){t||(t=!0,i=document.createElement("style"),i.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
|
|
40
|
-
`),document.head.appendChild(i),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",A,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",M,!0),a("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function P(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),i&&(i.remove(),i=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",A,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",M,!0),a("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function v(){window.__HF_PICKER_API={enable:$,disable:P,isActive:()=>t,getHovered:()=>r,getSelected:()=>o,getCandidatesAtPoint:(w,C,F)=>Number.isFinite(w)&&Number.isFinite(C)?x(w,C,F):[],pickAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return null;let T=x(w,C,8);if(!T.length)return null;let R=Math.max(0,Math.min(T.length-1,Number(F??0))),z=T[R]??null;return z?(s(z),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:z}),P(),z):null},pickManyAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return[];let T=x(w,C,8);if(!T.length)return[];let R=[],z=Array.isArray(F)?F:[0];for(let U of z){let ie=Math.max(0,Math.min(T.length-1,Math.floor(Number(U)))),D=T[ie];if(!D)continue;R.some(Fe=>Fe.selector===D.selector&&Fe.tagName===D.tagName)||R.push(D)}return R.length?(s(R[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:R}),P(),R):[]}},a("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:$,disablePickMode:P,installPickerApi:v}}var _u=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function dt(e,t){let n=Number.isFinite(t)&&t>0?t:30,i=Number.isFinite(e)&&e>0?e:0;return Math.floor(i*n+1e-9)/n}function wo(e,t,n=_u){for(let i of n){let r=t.getPropertyValue(i);r&&e.setProperty(i,r)}}function Dt(e,t,n){let i=e?.[t];return typeof i=="function"?Number(i.call(e))||n:typeof i=="number"&&Number.isFinite(i)?i:(i!=null&&N("runtime.player.nonConformantNum",{prop:t,actual:typeof i}),n)}function Re(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&N("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function It(e,t,n){if(e){for(let i of Object.values(e))if(!(!i||i===t))try{n(i)}catch(r){N("runtime.player.site1",r)}}}function Co(e,t,n,i){let r=dt(t,n),o=i?.suppressEvents===!0;return Re(e,"pause"),typeof e.totalTime=="function"?e.totalTime(r,o):typeof e.seek=="function"&&e.seek(r,o),r}function vu(e,t,n,i,r){let o=[];It(e,t,a=>{Re(a,"play"),o.push(a)});try{return Co(t,n,i,r)}finally{for(let a of o)try{Re(a,"pause")}catch(u){N("runtime.player.site2",u)}}}function Tu(e,t){It(e,t,n=>{Re(n,"play")})}function Fo(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,i)=>t.seek(n,i),renderSeek:(n,i)=>t.renderSeek(n,i),getTime:()=>t.getTime(),getDuration:()=>t.getDuration(),isPlaying:()=>t.isPlaying(),setPlaybackRate:n=>t.setPlaybackRate(n),getPlaybackRate:()=>t.getPlaybackRate()}:{_timeline:null,play:()=>{let n=e.getTimeline();if(!n||e.getIsPlaying())return;let i=Math.max(0,Number(e.getSafeDuration?.()??Dt(n,"duration",0))||0);i>0&&Math.max(0,Dt(n,"time",0))>=i&&(Re(n,"pause"),typeof n.seek=="function"&&n.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof n.timeScale=="function"&&n.timeScale(e.getPlaybackRate()),Re(n,"play"),It(e.getTimelineRegistry?.(),n,r=>{typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Re(r,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;Re(n,"pause"),It(e.getTimelineRegistry?.(),n,r=>{Re(r,"pause")});let i=Math.max(0,Dt(n,"time",0));e.onDeterministicSeek(i),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(i,!1),e.onRenderFrameSeek(i),e.onStatePost(!0)},seek:(n,i)=>{let r=e.getTimeline();if(!r)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),u=vu(e.getTimelineRegistry?.(),r,o,e.getCanonicalFps());e.onDeterministicSeek(u),i?.keepPlaying&&a?(typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Re(r,"play"),It(e.getTimelineRegistry?.(),r,s=>{typeof s.timeScale=="function"&&s.timeScale(e.getPlaybackRate()),Re(s,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(u,!0)):(e.setIsPlaying(!1),e.onSyncMedia(u,!1)),e.onRenderFrameSeek(u),e.onStatePost(!0)},renderSeek:(n,i)=>{let r=e.getTimeline(),o=e.getCanonicalFps(),a=r?(Tu(e.getTimelineRegistry?.(),r),Co(r,n,o,i)):dt(Math.max(0,Number(n)||0),o);e.onDeterministicSeek(a,i),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>Dt(e.getTimeline(),"time",0),getDuration:()=>Dt(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function _o(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var Mu=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Si(e){return e.id||e.getAttribute("data-hf-id")||null}function yi(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function Nu(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let i=Number(t[n]?.duration?.());return Number.isFinite(i)&&i>0?i:null}function Lu(e){if(!(e instanceof HTMLMediaElement)||!Number.isFinite(e.duration))return null;let t=yi(e.getAttribute("data-playback-start"))??yi(e.getAttribute("data-media-start"))??0;return e.duration>t?e.duration-t:null}function Ru(e,t,n,i){let r=yi(e.getAttribute("data-duration"));return r!=null&&r>0?r:Nu(e,t)??Lu(e)??Math.max(0,n-i)}function ku(e){for(let[t,n]of e){let i=t.parentElement;for(;i;){let r=e.get(i);if(r){n.parentId=r.id,r.children.push(n);break}i=i.parentElement}}}function vo(e){let{startResolver:t,timelineRegistry:n,rootDuration:i}=e,r=new Map,o=document.querySelector("[data-composition-id]"),a=0;for(let u of document.querySelectorAll("[data-start]")){if(u===o||Mu.has(u.tagName))continue;let s=t.resolveStartForElement(u,0);if(Ru(u,n,i,s)<=0)continue;let l={id:Si(u)??`__clip-${a++}`,element:u,parentId:null,children:[]};r.set(u,l)}return ku(r),{roots:Array.from(r.values()).filter(u=>u.parentId===null)}}function qe(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function To(e){let t=(e??"").trim();if(!t)return null;let n=qe(t);if(n!=null)return{kind:"absolute",value:n};let i=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!i)return null;let r=(i[1]??"").trim();if(!r)return null;let o=i[2]??"+",a=i[3]??"0",u=Number.parseFloat(a),s=Number.isFinite(u)?Math.max(0,u):0,l=o==="-"?-s:s;return{kind:"reference",refId:r,offset:l}}var Du="data-hf-authored-duration",Iu="data-hf-authored-end";function Pu(e){return qe(e.getAttribute("data-duration"))}function Ou(e){return qe(e.getAttribute("data-end"))}function Bu(e){return qe(e.getAttribute(Du))}function Hu(e){return qe(e.getAttribute(Iu))}function $e(e){let t=e.timelineRegistry??{},n=e.includeAuthoredTimingAttrs??!1,i=new WeakMap,r=new WeakMap,o=new Set,a=c=>{let m=document.getElementById(c);return m||(document.querySelector(`[data-composition-id="${CSS.escape(c)}"]`)??null)},u=c=>{let m=r.get(c);if(m!==void 0)return m;let f=null,b=Pu(c)??(n?Bu(c):null);if(b!=null&&b>0&&(f=b),f==null||f<=0){let E=Ou(c)??(n?Hu(c):null);if(E!=null){let y=l(c,0),x=E-y;Number.isFinite(x)&&x>0&&(f=x)}}if((f==null||f<=0)&&c instanceof HTMLMediaElement){let E=qe(c.getAttribute("data-playback-start"))??qe(c.getAttribute("data-media-start"))??0;Number.isFinite(c.duration)&&c.duration>E&&(f=(c.duration-E)/Lt(c))}if(f==null||f<=0){let E=c.getAttribute("data-composition-id");if(E){let y=t[E]??null;if(y&&typeof y.duration=="function")try{let x=Number(y.duration());Number.isFinite(x)&&x>0&&(f=x)}catch(x){N("runtime.startResolver.site1",x)}}}return f!=null&&Number.isFinite(f)&&f>0?(r.set(c,f),f):(r.set(c,null),null)},s=(c,m)=>{if(c.hasAttribute("data-composition-id")){let b=c.parentElement?.closest("[data-composition-id]");return b?l(b,m):0}let f=c.closest("[data-composition-id]");return f?l(f,m):0},l=(c,m)=>{let f=i.get(c);if(f!==void 0)return f??m;if(o.has(c))return m;o.add(c);try{let b=To(c.getAttribute("data-start"));if(!b){if(c.hasAttribute("data-composition-id")){let _=c.parentElement;if(_&&(_.hasAttribute("data-composition-src")||_.hasAttribute("data-composition-id")||_.hasAttribute("data-composition-file"))){let M=l(_,m);return i.set(c,M),M}}return i.set(c,m),m}if(b.kind==="absolute"){let _=Math.max(0,b.value),M=Math.max(0,s(c,m)+_);return i.set(c,M),M}let E=a(b.refId);if(!E)return i.set(c,m),m;let y=l(E,0),x=u(E);if(x==null||x<=0){let _=Math.max(0,y+b.offset);return i.set(c,_),_}let A=Math.max(0,y+x+b.offset);return i.set(c,A),A}finally{o.delete(c)}};return{resolveStartForElement:(c,m=0)=>l(c,Math.max(0,m)),resolveDurationForElement:c=>u(c)}}function Ei(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var Gu="data-hf-authored-duration",Wu="data-hf-authored-end";function Ee(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Ai(e){return Ee(e.getAttribute("data-duration"))??Ee(e.getAttribute(Gu))}function Mo(e){return Ee(e.getAttribute("data-end"))??Ee(e.getAttribute(Wu))}function wi(e){try{let t=e.style?.zIndex;if(t&&t!=="auto"){let n=parseInt(t,10);if(Number.isFinite(n))return n}return 0}catch{return 0}}function Ci(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function Fi(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let i=Number.parseInt(n,10);return Number.isFinite(i)?i:t}function Ot(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function No(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Ot(t);let n=e.getAttribute("data-composition-src");if(n)return Ot(n);let i=e.querySelector("img[src], video[src], audio[src], source[src]");return i?Ot(i.getAttribute("src")):null}function Uu(e){let t=e.className;return typeof t!="string"?null:t.split(/\s+/).map(n=>n.trim()).find(n=>n&&n!=="clip"&&!n.startsWith("__hf-"))??null}function Vu(e){if(!e)return null;try{return new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)??null}catch{return e.split(/[\\/]/).filter(Boolean).at(-1)??null}}function zu(e){let t=e.textContent?.replace(/\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Pt(e){let t=e.replace(/\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):e}function ju(e,t,n){let i=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(i?.trim())return i.trim();let r=e.getAttribute("data-composition-id");if(r)return Pt(r);let o=e.id;if(o)return Pt(o);let a=Uu(e);if(a)return Pt(a);let u=Vu(No(e));if(u)return Pt(u);let s=zu(e);return s||`${Pt(t)} ${n+1}`}function Lo(e){let n=window.__timelines??{},i=$e({timelineRegistry:n,includeAuthoredTimingAttrs:!0}),r=B=>{if(!B)return null;let k=n[B]??null;if(!k||typeof k.duration!="function")return null;try{let H=Number(k.duration());return Number.isFinite(H)&&H>0?H:null}catch{return null}},o=B=>{let k=Ee(B.getAttribute("data-duration"));if(k!=null&&k>0)return k;let H=Ee(B.getAttribute("data-playback-start"))??Ee(B.getAttribute("data-media-start"))??0;return Number.isFinite(B.duration)&&B.duration>H?Math.max(0,(B.duration-H)/Lt(B)):null},a=()=>{let B=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(B.length===0)return null;let k=0;for(let H of B){let le=H.hasAttribute("data-hf-auto-start")?i.resolveStartForElement(H,0):Math.max(0,Number(H.getAttribute("data-start")??0)||0);if(!Number.isFinite(le))continue;let se=o(H);se==null||se<=0||(k=Math.max(k,Math.max(0,le)+se))}return k>0?k:null},u=(B,k)=>{let H=[],le=null,se=null,G=null,j=B.parentElement;for(;j;){let K=j.getAttribute("data-composition-id");K&&(H.push(K),!G&&j!==k&&(G=K),le==null&&(le=i.resolveStartForElement(j,0)),se==null&&(se=Ee(j.getAttribute("data-duration"))??r(K)??null)),j=j.parentElement}return{parentCompositionId:G,compositionAncestors:H.reverse(),inheritedStart:le,inheritedDuration:se}},s=document.querySelector("[data-composition-id]"),l=Array.from(document.querySelectorAll("[data-composition-id]")),c=s?.getAttribute("data-composition-id")??null,m=s?i.resolveStartForElement(s,0):0,f=a(),b=f!=null?Math.max(0,f-Math.max(0,m)):null,E=r(c),y=Ai(s??document.body),x=Ci(...l.filter(B=>B!==s).map(B=>{let k=i.resolveStartForElement(B,0),H=i.resolveDurationForElement(B)??r(B.getAttribute("data-composition-id"))??null;return!Number.isFinite(k)||H==null||H<=0?null:Math.max(0,k)+H})),A=x!=null?Math.max(0,x-Math.max(0,m)):null,_=typeof E=="number"&&Number.isFinite(E)&&E>0?E:null,M=typeof y=="number"&&Number.isFinite(y)&&y>0?y:null,$=typeof b=="number"&&Number.isFinite(b)&&b>0?b:null,P=typeof A=="number"&&Number.isFinite(A)&&A>0?A:null,v=Ci($,P),w=_!=null&&v!=null&&_>v+1,F=M??(w?v:Ci(_,$,P))??null,R=(F!=null?m+F:null)??(typeof f=="number"&&Number.isFinite(f)&&f>0?f:null),z=(B,k)=>!Number.isFinite(k)||k<=0?0:R==null||!Number.isFinite(R)?k:!Number.isFinite(B)||B>=R?0:Math.max(0,Math.min(k,R-B)),U=[],ie=[],D=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),re=0;for(let[B,k]of D.entries()){if(k===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(k.tagName))continue;let H=u(k,s),le=i.resolveStartForElement(k,H.inheritedStart??0),se=k.getAttribute("data-composition-id"),G=Ai(k);if((G==null||G<=0)&&se&&se!==c&&(G=r(se)),(G==null||G<=0)&&k instanceof HTMLMediaElement){let we=Ee(k.getAttribute("data-playback-start"))??Ee(k.getAttribute("data-media-start"))??0;Number.isFinite(k.duration)&&k.duration>0&&(G=Math.max(0,k.duration-we))}if(G==null||G<=0){let we=H.inheritedDuration;if(we!=null&&we>0){let Ge=(H.inheritedStart??0)+we;G=Math.max(0,Ge-le)}}if(G==null||G<=0||(G=z(le,G),G<=0))continue;let j=le+G;re=Math.max(re,j);let K=k.tagName.toLowerCase(),Ae=se&&se!==c?"composition":K==="video"?"video":K==="audio"?"audio":K==="img"?"image":"element";U.push({id:Si(k)??se??null,label:ju(k,Ae,U.length),start:le,duration:G,track:Fi(k,B),zIndex:wi(k),stackingContextId:H.parentCompositionId??c,kind:Ae,tagName:K,compositionId:k.getAttribute("data-composition-id"),compositionAncestors:H.compositionAncestors,parentCompositionId:H.parentCompositionId,nodePath:null,compositionSrc:Ot(k.getAttribute("data-composition-src")),assetUrl:No(k),timelineRole:k.getAttribute("data-timeline-role"),timelineLabel:k.getAttribute("data-timeline-label"),timelineGroup:k.getAttribute("data-timeline-group"),timelinePriority:Ee(k.getAttribute("data-timeline-priority"))})}let Fe=new Set(U.map(B=>B.id)),W=s?.getAttribute("data-composition-id")??null,Y=W?n[W]??null:null;if(Y&&s){let B=Y;if(typeof B.getChildren=="function")try{let k=B.getChildren(!0,!0,!1)??[],H=new Map;for(let G of s.children){let j=G;if(!j.id)continue;let K=j.tagName.toLowerCase();K==="script"||K==="style"||K==="link"||H.set(j,{id:j.id,start:1/0,end:-1/0})}let le=G=>{let j=G;for(;j;){if(H.has(j))return j;if(j===s)return null;j=j.parentElement}return null};for(let G of k){if(typeof G.targets!="function"||typeof G.startTime!="function"||typeof G.duration!="function")continue;let j=G.startTime(),K=G.parent;for(;K&&K!==Y&&typeof K.startTime=="function";)j+=K.startTime(),K=K.parent;let Ae=j+G.duration();if(!(!Number.isFinite(j)||!Number.isFinite(Ae)))for(let we of G.targets()){if(!(we instanceof Element))continue;let St=le(we);if(!St)continue;let Ge=H.get(St);Ge&&(Ge.start=Math.min(Ge.start,j),Ge.end=Math.max(Ge.end,Ae))}}let se=U.length>0?Math.max(...U.map(G=>G.track))+1:0;for(let[G,j]of H){if(j.start===1/0||j.end===-1/0)continue;let K=G;if(Fe.has(K.id))continue;let Ae=Math.max(0,j.end-j.start);if(Ae<=0)continue;let we=z(j.start,Ae);we<=0||(re=Math.max(re,j.start+we),U.push({id:K.id,label:K.getAttribute("data-timeline-label")??K.getAttribute("data-label")??K.getAttribute("aria-label")??K.id,start:j.start,duration:we,track:Fi(K,se),zIndex:wi(K),stackingContextId:W,kind:"element",tagName:K.tagName.toLowerCase(),compositionId:K.getAttribute("data-composition-id"),compositionAncestors:W?[W]:[],parentCompositionId:W,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:K.getAttribute("data-timeline-role"),timelineLabel:K.getAttribute("data-timeline-label"),timelineGroup:K.getAttribute("data-timeline-group"),timelinePriority:Ee(K.getAttribute("data-timeline-priority"))}),Fe.add(K.id))}}catch(k){N("runtime.timeline.site1",k)}}if(s&&F!=null&&F>0){let B=U.length>0?Math.max(...U.map(k=>k.track))+1:0;for(let k of s.children){let H=k;if(!H.id||Fe.has(H.id))continue;let le=H.getAttribute("data-timeline-role");if(le!=="overlay"&&le!=="persistent-overlay")continue;let se=H.tagName.toLowerCase();if(se==="script"||se==="style"||se==="link"||se==="meta"||window.getComputedStyle(H).display==="none")continue;let j=z(0,F);j<=0||(re=Math.max(re,j),U.push({id:H.id,label:H.getAttribute("data-timeline-label")??H.getAttribute("data-label")??H.getAttribute("aria-label")??H.id,start:0,duration:j,track:Fi(H,B),zIndex:wi(H),stackingContextId:W,kind:"element",tagName:se,compositionId:H.getAttribute("data-composition-id"),compositionAncestors:W?[W]:[],parentCompositionId:W,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:le,timelineLabel:H.getAttribute("data-timeline-label"),timelineGroup:H.getAttribute("data-timeline-group"),timelinePriority:Ee(H.getAttribute("data-timeline-priority"))}),Fe.add(H.id))}}for(let B of l){if(B===s)continue;let k=B.getAttribute("data-composition-id");if(!k||!Ei(k))continue;let H=i.resolveStartForElement(B,0),le=Ai(B);if((le==null||le<=0)&&Mo(B)!=null){let K=Mo(B);le=Math.max(0,K-H)}let se=r(k),G=le&&le>0?le:se;if(G==null||G<=0)continue;let j=z(H,G);j<=0||ie.push({id:k,label:B.getAttribute("data-label")??k,start:H,duration:j,thumbnailUrl:Ot(B.getAttribute("data-thumbnail-url")),avatarName:null})}let O=Math.max(1,re||1,F??0);return{source:"hf-preview",type:"timeline",durationInFrames:w&&M==null?Number.POSITIVE_INFINITY:Math.max(1,Math.ceil(O*Math.max(1,e.canonicalFps))),clips:U,scenes:ie,compositionWidth:Ee(s?.getAttribute("data-width"))??1920,compositionHeight:Ee(s?.getAttribute("data-height"))??1080}}var ue=$l(na(),1),ia=ue.default,e0=ue.default.stringify,t0=ue.default.fromJSON,n0=ue.default.plugin,i0=ue.default.parse,r0=ue.default.list,o0=ue.default.document,s0=ue.default.comment,a0=ue.default.atRule,l0=ue.default.rule,u0=ue.default.decl,c0=ue.default.root,d0=ue.default.CssSyntaxError,f0=ue.default.Declaration,m0=ue.default.Container,p0=ue.default.Processor,h0=ue.default.Document,g0=ue.default.Comment,x0=ue.default.Warning,b0=ue.default.AtRule,y0=ue.default.Result,S0=ue.default.Input,E0=ue.default.Rule,A0=ue.default.Root,w0=ue.default.Node;var Xi="data-hf-authored-id",ra="data-hf-inner-root";function Qi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zi(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function md(e){return e&&e.replace(/[^a-zA-Z0-9_-]/g,n=>`\\${n}`).replace(/^-?\d/,n=>`\\${n}`)}function sa(e){let t=e.trim();return t?Array.from(new Set([t,md(t)])).filter(Boolean):[]}function pd(e){return!!e&&/[\w-]/.test(e)}function hd(e,t,n){let i=sa(t).sort((u,s)=>s.length-u.length);if(i.length===0)return e;let r="",o=0,a=null;for(let u=0;u<e.length;u+=1){let s=e[u],l=u>0?e[u-1]:"";if(a){r+=s,s===a&&l!=="\\"&&(a=null);continue}if(s==='"'||s==="'"){a=s,r+=s;continue}if(s==="["){o+=1,r+=s;continue}if(s==="]"){o=Math.max(0,o-1),r+=s;continue}if(s==="#"&&o===0){let c=i.find(m=>e.startsWith(m,u+1));if(c){let m=e[u+1+c.length];if(!pd(m)){r+=n,u+=c.length;continue}}}r+=s}return r}function gd(e,t){let n=t?.trim();return n?hd(e,n,`[${Xi}="${Zi(n)}"]`):e}function oa(e){return`${e}:not(:has([${ra}])), ${e} > [${ra}]`}function xd(e,t,n,i,r,o){let a=gd(e,i),u=bd(a,t,n),s=u.trim();if(!s||s==="*")return e;if(/^(html|body|:root)$/i.test(s))return o?oa(t):e;let l=new RegExp(`\\[\\s*data-composition-id\\s*=\\s*(["'])${Qi(n)}\\1\\s*\\]`,"g");if(l.test(s))return s.replace(l,"").trim()===""?oa(t):u.replace(l,t);let c=u.match(/^\s*/)?.[0]??"",m=u.match(/\s*$/)?.[0]??"";if(r){let f=i?`[${Xi}="${Zi(i)}"]`:null;if(f&&s.startsWith(f)){let b=s.slice(f.length);return`${c}${t}${f}${b}${m}`}}return`${c}${t} ${s}${m}`}function bd(e,t,n){let i=Qi(n),r=String.raw`\[\s*data-composition-id\s*=\s*(?:"${i}"|'${i}')\s*\]`,o=String.raw`\s*\[\s*data-(?:start|duration)\s*=\s*(?:"[^"]*"|'[^']*')\s*\]`;return e.replace(new RegExp(`${r}(?:${o})+`,"g"),t).replace(new RegExp(`(?:${o})+${r}`,"g"),t)}var yd=new Set(["keyframes","-webkit-keyframes","font-face"]);function Sd(e){return e?.type==="atrule"}function Ed(e){let t=e.parent;for(;t;){if(Sd(t)&&yd.has(t.name.toLowerCase()))return!0;t=t.parent}return!1}function aa(e,t,n,i,r){let o=t.trim();if(!e||!o)return e;let a=n||`[data-composition-id="${Zi(o)}"]`,u=ia.parse(e);return u.walkRules(s=>{Ed(s)||(s.selectors=s.selectors.map(l=>xd(l,a,o,i,r?.compoundAuthoredRoot,r?.scopeRootSelectors)))}),u.toResult({map:!1}).css}function la(e,t,n="[HyperFrames] composition script error:",i,r=t,o){let a=JSON.stringify(t),u=JSON.stringify(r),s=JSON.stringify(n),l=Qi(t),c=JSON.stringify(o?.trim()||null),m=JSON.stringify(i??null),f=JSON.stringify(String.raw`\[\s*data-composition-id\s*=\s*(?:"${l}"|'${l}')\s*\]`),b=JSON.stringify(String.raw`\s*\[\s*data-(?:start|duration)\s*=\s*(?:"[^"]*"|'[^']*')\s*\]`),E=JSON.stringify(sa(o?.trim()||""));return`(function(){
|
|
39
|
+
`,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(r=>{r.classList.add("__hf-flash"),setTimeout(()=>r.classList.remove("__hf-flash"),t)})}catch(i){M("bridge.flashElements.querySelector",i)}}var ai=null;function qr(e){ai=e}function ot(e,t){if(ai)try{ai({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){M("runtime.analytics.site1",n)}}function au(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,i=t.length;for(;n<i&&t[n]==="-";)n++;for(;i>n&&t[i-1]==="-";)i--;let r=t.slice(n,i);return r.length>0?r:"node"}function Tt(e){return`--${au(e)}`}function $r(e){let t=new Map;for(let n of e){let i=Tt(n),r=t.get(i);r?r.includes(n)||r.push(n):t.set(i,[n])}return[...t.values()].filter(n=>n.length>1)}function Kr(){if(typeof document>"u")return{};let e=new Set;document.documentElement?.hasAttribute("data-composition-variables")&&e.add(document.documentElement);for(let i of Array.from(document.querySelectorAll("[data-composition-variables]")))e.add(i);let t={};for(let i of e)Object.assign(t,vt(i));let n=mn();return{...t,...n}}function vt(e){if(!e)return{};let t=e.getAttribute("data-composition-variables");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}if(!Array.isArray(n))return{};let i={};for(let r of n){if(!r||typeof r!="object")continue;let o=r;typeof o.id!="string"||!("default"in o)||(i[o.id]=o.default)}return i}var li="data-hf-css-vars";function ui(e){return"style"in e&&typeof e.style?.setProperty=="function"}function ci(e,t){if(!ui(e))return;let n=[];for(let[i,r]of Object.entries(t))if(typeof r=="string"&&r!==""||typeof r=="number"){let o=Tt(i);e.style.setProperty(o,String(r)),n.push(o)}n.length>0&&e.setAttribute(li,n.join(" "))}function Jr(e){if(!ui(e))return;let t=e.getAttribute(li);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(li)}}function Xr(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let r of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(r);let n=mn(),i=[];for(let r of t)i.push(...lu(r,n,e.defaultView));for(let r of $r(i))console.warn(`composition variables ${r.join(", ")} collapse to the same CSS property ${Tt(r[0]??"")} \u2014 rename one to avoid cross-talk`)}function lu(e,t,n){if(!ui(e))return[];let i=vt(e),r={};for(let[o,a]of Object.entries(i)){if(o in t)continue;let u=Tt(o);(e.style.getPropertyValue(u)||(n?n.getComputedStyle(e).getPropertyValue(u):"")).trim()===""&&(r[o]=a)}for(let[o,a]of Object.entries(t))o in i&&(r[o]=a);return ci(e,r),Object.keys(i)}function Yr(e){let t=e.getAttribute("data-variable-values");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}return!n||typeof n!="object"||Array.isArray(n)?{}:n}function mn(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function Qr(e){let t=[],n=l=>{if(typeof l.getAnimations!="function")return[];try{return l.getAnimations()}catch{return[]}},i=l=>e?.resolveStartSeconds?e.resolveStartSeconds(l):Number.parseFloat(l.getAttribute("data-start")??"0")||0,r=(l,d)=>{let m=null;try{m=l.effect?.getComputedTiming?.()??null}catch(x){M("runtime.adapters.css.site5",x)}if(!m)return{};let f=Number(m.endTime);return Number.isFinite(f)?{endSeconds:d+f/1e3}:{unbounded:!0}},o=(l,d)=>{for(let m of l){try{m.currentTime=d}catch(f){M("runtime.adapters.css.site1",f)}try{m.pause()}catch(f){M("runtime.adapters.css.site2",f)}}},a=l=>{for(let d of l)try{d.play()}catch(m){M("runtime.adapters.css.site3",m)}},u=l=>{for(let d of l)try{d.pause()}catch(m){M("runtime.adapters.css.site4",m)}},s=l=>{l.baseDelay?l.el.style.animationDelay=l.baseDelay:l.el.style.removeProperty("animation-delay"),l.basePlayState?l.el.style.animationPlayState=l.basePlayState:l.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{t=[];let l=document.querySelectorAll("*");for(let d of l){if(!(d instanceof HTMLElement))continue;let m=window.getComputedStyle(d);!m.animationName||m.animationName==="none"||t.push({el:d,baseDelay:d.style.animationDelay||"",basePlayState:d.style.animationPlayState||"",animations:n(d)})}},getInferredDurationSeconds:()=>{let l=0;for(let d of t){if(!d.el.isConnected)continue;let m=i(d.el);for(let f of n(d.el)){let x=r(f,m);x.endSeconds!=null&&(l=Math.max(l,x.endSeconds))}}return l>0?l:null},seek:l=>{let d=Number(l.time)||0;for(let m of t){if(!m.el.isConnected)continue;let f=i(m.el),x=Math.max(0,d-f)*1e3,S=m.animations;if(S.length>0){o(S,x);continue}m.el.style.animationPlayState="paused",m.el.style.animationDelay=`-${(x/1e3).toFixed(3)}s`}},pause:()=>{for(let l of t){if(!l.el.isConnected)continue;let d=l.animations;d.length>0&&u(d),s(l)}},play:()=>{for(let l of t)l.el.isConnected&&(s(l),a(l.animations))},revert:()=>{t=[]}}}function Zr(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let i=Math.max(0,Number(t.time)||0),r=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(i+.001,!0),n.totalTime(i,r)):n.seek(i,r)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function eo(){return{name:"animejs",discover:()=>{try{let e=window.anime;if(!e||typeof e.running>"u")return;let t=e.running;if(!Array.isArray(t)||t.length===0)return;let n=window.__hfAnime??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfAnime=n}catch(e){M("runtime.adapters.animejs.site1",e)}},seek:e=>{let t=Math.max(0,(Number(e.time)||0)*1e3),n=window.__hfAnime;if(!(!n||n.length===0))for(let i of n)try{typeof i.seek=="function"&&i.seek(t)}catch(r){M("runtime.adapters.animejs.site2",r)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){M("runtime.adapters.animejs.site3",n)}},play:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.play=="function"&&t.play()}catch(n){M("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function no(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfLottie=n}}}catch(e){M("runtime.adapters.lottie.site1",e)}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let i of n)try{if(di(i))i.goToAndStop(t*1e3,!1);else if(fi(i)){if(typeof i.setCurrentRawFrameValue=="function"){let r=i.totalFrames??0,o=i.frameRate??30,a=t*o;r>0&&i.setCurrentRawFrameValue(Math.min(a,r-1))}else if(typeof i.seek=="function"){let r=i.duration??1,o=Math.min(100,t/r*100);i.seek(o)}}}catch(r){M("runtime.adapters.lottie.site2",r)}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(di(t)||fi(t))&&t.pause()}catch(n){M("runtime.adapters.lottie.site3",n)}},revert:()=>{},getInferredDurationSeconds:()=>{let e=window.__hfLottie;if(!e||e.length===0)return null;let t=0,n=!1;for(let i of e){let r=null;try{r=uu(i)}catch(o){M("runtime.adapters.lottie.site4",o)}r!=null&&(n=!0,t=Math.max(t,r))}return n?t:null}}}function to(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function uu(e){return di(e)?to(e.totalFrames,e.frameRate):fi(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:to(e.totalFrames,e.frameRate):null}function di(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function fi(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var mi=-1;function pn(e){if(e!==mi){mi=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){M("runtime.adapters.seek-dispatch.site1",t)}}}function io(e){mi=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){M("runtime.adapters.seek-dispatch.force",t)}}function ro(){let e=null,t=0,n=null,i=null,r=null,o=null,a=()=>{if(typeof window>"u")return null;let d=window.THREE?.DefaultLoadingManager;return!d||typeof d!="object"||typeof d.itemsLoaded!="number"||typeof d.itemsTotal!="number"?null:d},u=l=>{o||l.itemsTotal<=l.itemsLoaded||(o=new Promise(d=>{l.onLoad=function(){try{r?.call(this)}finally{o=null,l.onLoad=r??null,d()}}}))},s=l=>{n!==l&&(n=l,i=l.onStart??null,r=l.onLoad??null,l.onStart=function(d,m,f){try{i?.call(this,d,m,f)}finally{u(l)}})};return{name:"three",discover:()=>{let l=a();l&&(s(l),u(l))},seek:l=>{e=Math.max(0,Number(l.time)||0),t=e,window.__hfThreeTime=e,pn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let l=a();return!l||l.itemsTotal<=l.itemsLoaded?null:(o||u(l),o)}}}function Oe(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let i=e.getInstances();if(i.length===0)return null;let r=i.filter(o=>!n.has(o));return r.length===0?null:t||(t=Promise.allSettled(r.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function oo(){return Oe({name:"mapbox",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMapbox;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function so(){return Oe({name:"leaflet",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfLeaflet;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>e.whenReady(t))})}function ao(){return Oe({name:"google-maps",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfGoogleMaps;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{let n=e.addListener("tilesloaded",()=>{n.remove(),t()})})})}function lo(){return Oe({name:"maplibre",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMaplibre;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function uo(){return Oe({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}function co(){let e=null,t=0;return{name:"typegpu",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfTypegpuTime=e,pn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function fo(e){let t=e.nextElementSibling;if(t instanceof HTMLImageElement&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;if(e.id){let n=document.getElementById(`__render_frame_${e.id}__`);if(n instanceof HTMLImageElement&&n.complete&&n.naturalWidth>0)return n}return null}function mo(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,i,r){if(n?.source instanceof HTMLVideoElement){let o=fo(n.source);if(o)return t.call(this,{...n,source:o},i,r)}return t.call(this,n,i,r)}}function po(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let i=n?.prototype;if(i)for(let r of t){let o=i[r];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...u){let s=u.length-1,l=u[s];if(l instanceof HTMLVideoElement){let d=fo(l);d&&(u[s]=d)}return o.apply(this,u)};a.__hfVideoPatched=!0,i[r]=a}}}function ho(){let e=!1,t=0,n=!1,i,r,o,a=new Set,u=new WeakMap,s=()=>{if(!document.getAnimations)return[];try{return document.getAnimations()}catch{return[]}},l=b=>{let A=Number(b.currentTime);return Number.isFinite(A)&&A>0?A:0},d=(b,A)=>A<=0?b:b>=A?Math.max(0,b-A):b,m=(b,A)=>{let _=u.get(b);if(_)return _;let N={compositionTimeMs:A,animationTimeMs:e?d(l(b),A):l(b)};return u.set(b,N),N},f=(b,A)=>{if(!a.has(b)){a.add(b);let _=()=>{a.delete(b)};try{b.addEventListener("finish",_,{once:!0}),b.addEventListener("cancel",_,{once:!0})}catch(N){M("runtime.adapters.waapi.site4",N)}}m(b,A)},x=(b,A)=>{for(let _ of b)f(_,A)},S=()=>{if(n||typeof Element>"u")return;let b=Element.prototype;if(typeof b.animate!="function"||b.__hfOriginalAnimate)return;let A=b.animate;try{Object.defineProperty(b,"__hfOriginalAnimate",{value:A,configurable:!0});let _=function(...N){let $=A.apply(this,N);return f($,t),$};b.animate=_,i=b,r=A,o=_,n=!0}catch{}},y=b=>{let A=null;try{A=b.effect?.getComputedTiming?.()??null}catch($){M("runtime.adapters.waapi.site4",$)}if(!A)return{};let _=Number(A.endTime);return Number.isFinite(_)?{endSeconds:(u.get(b)?.compositionTimeMs??0)/1e3+_/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,S(),x(s(),t)},seek:b=>{let A=Math.max(0,(Number(b.time)||0)*1e3);t=A,(!e||a.size>0)&&x(s(),e?A:0);for(let _ of a){let N=e?m(_,A):m(_,0),$=N.animationTimeMs+Math.max(0,A-N.compositionTimeMs);try{_.currentTime=$}catch(P){M("runtime.adapters.waapi.site1",P)}try{_.pause()}catch(P){M("runtime.adapters.waapi.site2",P)}}},pause:()=>{e||x(s(),t);for(let b of a)try{b.pause()}catch(A){M("runtime.adapters.waapi.site3",A)}},revert:()=>{if(a.clear(),u=new WeakMap,e=!1,t=0,i&&r&&o&&i.animate===o)try{i.animate=r,i.__hfOriginalAnimate===r&&delete i.__hfOriginalAnimate}catch(b){M("runtime.adapters.waapi.site5",b)}i=void 0,r=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let b=0;for(let A of s()){let _=y(A);_.endSeconds!=null&&(b=Math.max(b,_.endSeconds))}return b>0?b:null}}}function go(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let i=e[n],r=e[n+1]??i,o=r.time-i.time,a=o<=0?0:Math.min(1,Math.max(0,(t-i.time)/o));return i.volume+(r.volume-i.volume)*a}function cu(e,t,n,i){let r=Number.parseFloat(e.dataset.start??"0")||0,o=Number.parseFloat(e.dataset.end??""),a=Number.parseFloat(e.dataset.duration??""),u=Number.isFinite(o)&&o>r?o:Number.isFinite(a)&&a>0?r+a:n,s=Number.parseFloat(e.dataset.volume??""),l=Number.isFinite(s)?Math.max(0,Math.min(1,s)):1;e.volume=l;let d=1/Math.min(60,Math.max(1,i)),m=Math.max(0,r),f=Math.min(n,u),x=[];for(let y=m;y<=f+1e-6;y+=d){let b=Math.min(f,y);t(b);let A=Number(e.volume);if(!Number.isFinite(A))continue;let _=Math.max(0,Math.min(1,A)),N=x.at(-1);if((!N||Math.abs(N.volume-_)>1e-4||b===f)&&x.push({time:Number(b.toFixed(6)),volume:Number(_.toFixed(6))}),b===f)break}return x.some(y=>Math.abs(y.volume-l)>1e-4)?x:null}function xo(e,t,n,i){if(!t||!(e instanceof HTMLAudioElement)&&!(e instanceof HTMLVideoElement)||n<=0)return;let r=u=>{try{typeof t.totalTime=="function"?t.totalTime(u,!0):typeof t.seek=="function"&&t.seek(u,!0)}catch{}},o=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,a=cu(e,r,n,60);Number.isFinite(o)&&r(o),a&&i.set(e,a)}function Lt(e){let t=e.defaultPlaybackRate;return Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1}function bo(e){let t=Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),i=[],r=[],o=0;for(let a of n){let u=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(u))continue;let s=Number.parseFloat(a.dataset.playbackStart??a.dataset.mediaStart??"0")||0,l=Lt(a),d=a.loop,m=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,f=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(f)||f<=0)&&m!=null&&(f=Math.max(0,(m-s)/l));let x=Number.isFinite(f)&&f>0?u+f:Number.POSITIVE_INFINITY,S=Number.parseFloat(a.dataset.volume??""),y={el:a,start:u,mediaStart:s,duration:Number.isFinite(f)&&f>0?f:Number.POSITIVE_INFINITY,end:x,volume:Number.isFinite(S)?S:null,playbackRate:l,loop:d,sourceDuration:m};i.push(y),a.tagName==="VIDEO"&&r.push(y),Number.isFinite(x)&&(o=Math.max(o,x))}return{timedMediaEls:n,mediaClips:i,videoClips:r,maxMediaEnd:o}}var pi=new WeakMap,Mt=new WeakMap,hi=new WeakSet,ct=new WeakSet;function du(e){if(ct.has(e))return;ct.add(e);let t=()=>ct.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var fu=3;function mu(e){return e.error!=null||e.networkState===fu}var gi=new WeakMap;function Nt(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function yo(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:i}=n;if(!i.isConnected)continue;let r=(e.timeSeconds-n.start)*n.playbackRate+n.mediaStart;if(e.timeSeconds>=n.start&&e.timeSeconds<=n.end&&r>=0&&(!i.ended||n.loop)){if(n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let v=n.sourceDuration-n.mediaStart;v>0&&r>=n.sourceDuration&&(r=n.mediaStart+(r-n.mediaStart)%v)}let a=Nt(e.userVolume??1),u=Nt(n.volume??1),s=gi.get(i),l=Nt(i.volume),d;n.volumeKeyframes&&n.volumeKeyframes.length>0?d=Nt(go(n.volumeKeyframes,r)):s===void 0||Math.abs(l-s)>1e-4?d=l:d=u;let m=Nt(d*a);i.volume=m,gi.set(i,m),e.onElementVolume?.(i,m),(t||e.isWebAudioOwned?.(i))&&(i.muted=!0),i.preload!=="auto"&&(i.preload="auto");try{i.playbackRate=n.playbackRate*e.playbackRate}catch(v){M("runtime.media.site1",v)}let f=.04,x=2,S=i.currentTime||0,y=Math.abs(S-r),b=r-S,A=pi.get(i);pi.set(i,b);let _=A===void 0,N=!_&&Math.abs(b-A)>.5,$=y>3,P=y>.5&&(_||N||$),T=i.tagName==="VIDEO"&&!i.paused,w=A!==void 0&&Math.abs(b-A)<.004,C=!1;if(!T&&!P&&!_&&w&&y>f){let v=(Mt.get(i)??0)+1;Mt.set(i,v),v>=x&&(C=!0,Mt.set(i,0))}else y<=f&&Mt.set(i,0);let F=!T&&e.forceSync&&y>.02;if(P||C||F){if(!(i.tagName==="VIDEO"&&i.id&&!!document.getElementById(`__render_frame_${i.id}__`))){try{i.currentTime=r}catch(R){M("runtime.media.site2",R)}if(Math.abs(i.currentTime-r)>.5&&!hi.has(i)){hi.add(i),i.load();try{i.currentTime=r}catch(R){M("runtime.media.site3",R)}}}ct.delete(i)}e.playing&&i.paused&&!ct.has(i)&&!mu(i)?(du(i),i.play().catch(v=>{ct.delete(i),(v&&typeof v=="object"&&"name"in v?String(v.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!i.paused&&i.pause();continue}pi.delete(i),Mt.delete(i),hi.delete(i),gi.delete(i),i.paused||i.pause()}}var Ue="data-color-grading",Rt="data-hf-color-grading-source-hidden",bn="data-hf-authored-opacity",So="__hf_color_grading_",pu="rec709",hn={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},gn={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},xn={blur:0,pixelate:0},Eo=Object.keys(hn),hu=Object.keys(gn),Ao=Object.keys(xn);function be(e,t,n={},i={}){return{id:e,label:t,adjust:{...hn,...n},details:{...gn,...i},effects:{...xn}}}var gu=[be("neutral","Neutral"),be("natural-lift","Natural Lift",{exposure:.04,contrast:.06,highlights:-.06,shadows:.08,saturation:.05}),be("fresh-pop","Fresh Pop",{exposure:.08,contrast:.12,whites:.06,shadows:.04,temperature:-.02,vibrance:.08,saturation:.16}),be("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),be("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),be("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),be("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),be("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),be("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),be("vintage-wash","Vintage Wash",{exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},{vignette:.18}),be("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),be("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),be("warm-clean","Warm Clean",{exposure:.05,contrast:.08,highlights:-.08,shadows:.08,temperature:.16,vibrance:.04,saturation:.06}),be("cool-clean","Cool Clean",{contrast:.06,highlights:-.06,shadows:.06,temperature:-.12,tint:.04,saturation:.04}),be("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),be("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),be("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06})],xu=new Map(gu.map(e=>[e.id,e])),bu=/^\$(?:\{([A-Za-z0-9_.:-]+)\}|([A-Za-z0-9_.:-]+))$/,yu={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}},Su={vignette:{min:0,max:1},vignetteMidpoint:{min:0,max:1},vignetteRoundness:{min:-1,max:1},vignetteFeather:{min:0,max:1},grain:{min:0,max:1},grainSize:{min:0,max:1},grainRoughness:{min:0,max:1}},Eu={blur:{min:0,max:1},pixelate:{min:0,max:1}};function st(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Au(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function wo(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function xi(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Au(n,t.min,t.max):0}function wu(e){if(e==null)return null;let t=String(e).trim();return t||null}function Cu(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!st(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:wo(e.intensity,1)}}function Fu(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return st(n)?n:null}catch{return null}return{preset:t,intensity:1}}return st(e)?e:null}function _u(e,t){let n=e.trim().match(bu);if(!n)return e;let i=n[1]??n[2]??"";return i&&Object.hasOwn(t,i)?t[i]:e}function bi(e,t){if(typeof e=="string"){let i=_u(e,t);if(i!==e)return i;let r=e.trim();if(!r.startsWith("{"))return e;try{return bi(JSON.parse(r),t)}catch{return e}}if(!st(e))return e;let n={};for(let[i,r]of Object.entries(e))n[i]=bi(r,t);return n}function Tu(e){return e?xu.get(e)??null:null}function yi(e){let t=Fu(e);if(!t||t.enabled===!1)return null;let n=wu(t.preset),i=Tu(n),r=i?.adjust??hn,o=i?.details??gn,a=i?.effects??xn,u=st(t.adjust)?t.adjust:{},s=st(t.details)?t.details:{},l=st(t.effects)?t.effects:{},d=Eo.reduce((x,S)=>(x[S]=xi(u[S]??r[S],yu[S]),x),{...hn}),m=hu.reduce((x,S)=>(x[S]=xi(s[S]??o[S],Su[S]),x),{...gn}),f=Ao.reduce((x,S)=>(x[S]=xi(l[S]??a[S],Eu[S]),x),{...xn});return{enabled:!0,preset:n,intensity:wo(t.intensity,1),adjust:d,details:m,effects:f,lut:Cu(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():pu}}function Co(e,t){return yi(bi(e,t))}function kt(e){return!e?.enabled||e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:Eo.some(t=>Math.abs(e.adjust[t])>1e-4)||Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||Ao.some(t=>Math.abs(e.effects[t])>1e-4)}var vu=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),Mu=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(",");function Fo(e){let t=!1,n=null,i=null,r=null,o=null;function a(w,C){try{window.dispatchEvent(new CustomEvent(w,{detail:C}))}catch(F){M("runtime.picker.site1",F)}}function u(w){r=w,a("hyperframe:picker:hovered",{elementInfo:r,isPickMode:t,timestamp:Date.now()})}function s(w){o=w,a("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function l(w){let C=w.ownerDocument.defaultView;if(!C)return!1;let F=w;for(;F&&F!==document.body&&F!==document.documentElement;){let v=C.getComputedStyle(F);if(v.display==="none"||v.visibility==="hidden"||v.pointerEvents==="none")return!0;let R=Number.parseFloat(v.opacity);if(Number.isFinite(R)&&R<=.01&&!F.hasAttribute(Rt))return!0;F=F.parentElement}return!1}function d(w){if(!w||w===document.body||w===document.documentElement)return!1;let C=w.tagName.toLowerCase();return!(C==="script"||C==="style"||C==="link"||C==="meta"||w.classList.contains("__hf-pick-highlight")||w.closest(vu)||l(w))}function m(w){return!!w?.closest(Mu)}function f(w){let C=w;if(C.id)return`#${C.id}`;let F=w.getAttribute("data-composition-id");if(F)return`[data-composition-id="${CSS.escape(F)}"]`;let v=w.getAttribute("data-composition-src");if(v)return`[data-composition-src="${CSS.escape(v)}"]`;let R=w.getAttribute("data-track-index");if(R)return`[data-track-index="${CSS.escape(R)}"]`;let V=w.tagName.toLowerCase(),W=w.parentElement;if(!W)return V;let ie=W.querySelectorAll(`:scope > ${V}`);if(ie.length===1)return V;for(let D=0;D<ie.length;D+=1)if(ie[D]===w)return`${V}:nth-of-type(${D+1})`;return V}function x(w){let C=w.tagName.toLowerCase(),F=(w.textContent??"").trim().replace(/\s+/g," "),v=(R,V)=>R.length>V?`${R.slice(0,V-1)}\u2026`:R;return C==="h1"||C==="h2"||C==="h3"?"Heading":C==="p"||C==="span"||C==="div"?F.length>0?v(F,56):"Text":C==="img"?"Image":C==="video"?"Video":C==="audio"?"Audio":C==="svg"?"Shape":w.getAttribute("data-composition-src")?"Composition":C==="section"?"Section":`${C.charAt(0).toUpperCase()}${C.slice(1)}`}function S(w,C,F){let v=typeof F=="number"&&F>0?F:8,R=[];if(document.elementsFromPoint)R=document.elementsFromPoint(w,C);else if(document.elementFromPoint){let ie=document.elementFromPoint(w,C);R=ie?[ie]:[]}if(m(R[0]??null))return[];let V={},W=[];for(let[ie,D]of R.entries()){if(!d(D))continue;let re=`${D.tagName}::${D.id||""}::${ie}`;if(!V[re]&&(V[re]=!0,W.push(D),W.length>=v))break}return W}function y(w){let C=w.getBoundingClientRect(),F={};for(let R of Array.from(w.attributes))R.name.startsWith("data-")&&(F[R.name]=R.value);return{id:w.id||null,tagName:w.tagName.toLowerCase(),selector:f(w),label:x(w),boundingBox:{x:C.left,y:C.top,width:C.width,height:C.height},textContent:w.textContent?w.textContent.trim().slice(0,200):null,src:w.getAttribute("src")||w.getAttribute("data-composition-src")||null,dataAttributes:F}}function b(w,C,F){return S(w,C,F).map(y)}function A(w){if(!t)return;let F=S(w.clientX,w.clientY,1)[0]??(w.target instanceof Element?w.target:null);if(!d(F)||n===F)return;n&&n.classList.remove("__hf-pick-highlight"),n=F,F.classList.add("__hf-pick-highlight");let v=y(F);u(v),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:v})}function _(w){if(!t)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation();let C=b(w.clientX,w.clientY,8);C.length!==0&&(u(C[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:C,selectedIndex:0,point:{x:w.clientX,y:w.clientY}}))}function N(w){w.key==="Escape"&&(P(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function $(){t||(t=!0,i=document.createElement("style"),i.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
|
|
40
|
+
`),document.head.appendChild(i),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",A,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",N,!0),a("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function P(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),i&&(i.remove(),i=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",A,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",N,!0),a("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function T(){window.__HF_PICKER_API={enable:$,disable:P,isActive:()=>t,getHovered:()=>r,getSelected:()=>o,getCandidatesAtPoint:(w,C,F)=>Number.isFinite(w)&&Number.isFinite(C)?b(w,C,F):[],pickAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return null;let v=b(w,C,8);if(!v.length)return null;let R=Math.max(0,Math.min(v.length-1,Number(F??0))),V=v[R]??null;return V?(s(V),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:V}),P(),V):null},pickManyAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return[];let v=b(w,C,8);if(!v.length)return[];let R=[],V=Array.isArray(F)?F:[0];for(let W of V){let ie=Math.max(0,Math.min(v.length-1,Math.floor(Number(W)))),D=v[ie];if(!D)continue;R.some(Fe=>Fe.selector===D.selector&&Fe.tagName===D.tagName)||R.push(D)}return R.length?(s(R[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:R}),P(),R):[]}},a("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:$,disablePickMode:P,installPickerApi:T}}var Nu=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function dt(e,t){let n=Number.isFinite(t)&&t>0?t:30,i=Number.isFinite(e)&&e>0?e:0;return Math.floor(i*n+1e-9)/n}function _o(e,t,n=Nu){for(let i of n){let r=t.getPropertyValue(i);r&&e.setProperty(i,r)}}function Dt(e,t,n){let i=e?.[t];return typeof i=="function"?Number(i.call(e))||n:typeof i=="number"&&Number.isFinite(i)?i:(i!=null&&M("runtime.player.nonConformantNum",{prop:t,actual:typeof i}),n)}function Re(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&M("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function It(e,t,n){if(e){for(let i of Object.values(e))if(!(!i||i===t))try{n(i)}catch(r){M("runtime.player.site1",r)}}}function To(e,t,n,i){let r=dt(t,n),o=i?.suppressEvents===!0;return Re(e,"pause"),typeof e.totalTime=="function"?e.totalTime(r,o):typeof e.seek=="function"&&e.seek(r,o),r}function Lu(e,t,n,i,r){let o=[];It(e,t,a=>{Re(a,"play"),o.push(a)});try{return To(t,n,i,r)}finally{for(let a of o)try{Re(a,"pause")}catch(u){M("runtime.player.site2",u)}}}function Ru(e,t){It(e,t,n=>{Re(n,"play")})}function vo(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,i)=>t.seek(n,i),renderSeek:(n,i)=>t.renderSeek(n,i),getTime:()=>t.getTime(),getDuration:()=>t.getDuration(),isPlaying:()=>t.isPlaying(),setPlaybackRate:n=>t.setPlaybackRate(n),getPlaybackRate:()=>t.getPlaybackRate()}:{_timeline:null,play:()=>{let n=e.getTimeline();if(!n||e.getIsPlaying())return;let i=Math.max(0,Number(e.getSafeDuration?.()??Dt(n,"duration",0))||0);i>0&&Math.max(0,Dt(n,"time",0))>=i&&(Re(n,"pause"),typeof n.seek=="function"&&n.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof n.timeScale=="function"&&n.timeScale(e.getPlaybackRate()),Re(n,"play"),It(e.getTimelineRegistry?.(),n,r=>{typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Re(r,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;Re(n,"pause"),It(e.getTimelineRegistry?.(),n,r=>{Re(r,"pause")});let i=Math.max(0,Dt(n,"time",0));e.onDeterministicSeek(i),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(i,!1),e.onRenderFrameSeek(i),e.onStatePost(!0)},seek:(n,i)=>{let r=e.getTimeline();if(!r)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),u=Lu(e.getTimelineRegistry?.(),r,o,e.getCanonicalFps());e.onDeterministicSeek(u),i?.keepPlaying&&a?(typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Re(r,"play"),It(e.getTimelineRegistry?.(),r,s=>{typeof s.timeScale=="function"&&s.timeScale(e.getPlaybackRate()),Re(s,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(u,!0)):(e.setIsPlaying(!1),e.onSyncMedia(u,!1)),e.onRenderFrameSeek(u),e.onStatePost(!0)},renderSeek:(n,i)=>{let r=e.getTimeline(),o=e.getCanonicalFps(),a=r?(Ru(e.getTimelineRegistry?.(),r),To(r,n,o,i)):dt(Math.max(0,Number(n)||0),o);e.onDeterministicSeek(a,i),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>Dt(e.getTimeline(),"time",0),getDuration:()=>Dt(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function Mo(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var ku=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Ei(e){return e.id||e.getAttribute("data-hf-id")||null}function Si(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function Du(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let i=Number(t[n]?.duration?.());return Number.isFinite(i)&&i>0?i:null}function Iu(e){if(!(e instanceof HTMLMediaElement)||!Number.isFinite(e.duration))return null;let t=Si(e.getAttribute("data-playback-start"))??Si(e.getAttribute("data-media-start"))??0;return e.duration>t?e.duration-t:null}function Pu(e,t,n,i){let r=Si(e.getAttribute("data-duration"));return r!=null&&r>0?r:Du(e,t)??Iu(e)??Math.max(0,n-i)}function Ou(e){for(let[t,n]of e){let i=t.parentElement;for(;i;){let r=e.get(i);if(r){n.parentId=r.id,r.children.push(n);break}i=i.parentElement}}}function No(e){let{startResolver:t,timelineRegistry:n,rootDuration:i}=e,r=new Map,o=document.querySelector("[data-composition-id]"),a=0;for(let u of document.querySelectorAll("[data-start]")){if(u===o||ku.has(u.tagName))continue;let s=t.resolveStartForElement(u,0);if(Pu(u,n,i,s)<=0)continue;let l={id:Ei(u)??`__clip-${a++}`,element:u,parentId:null,children:[]};r.set(u,l)}return Ou(r),{roots:Array.from(r.values()).filter(u=>u.parentId===null)}}var Ai="css:root",Lo=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],Bu=new Set([...Lo,"contain","isolation","mask-border","mix-blend-mode","opacity"]),Hu=new Set(["absolute","relative"]),Gu=new Set(["flex","inline-flex","grid","inline-grid"]),Wu=new Set(["layout","paint","strict","content"]),Uu=new Set(["size","inline-size"]);function Vu(e){return e.position==="fixed"||e.position==="sticky"}function zu(e,t){if(t.zIndex==="auto"||t.zIndex==="")return!1;if(Hu.has(t.position))return!0;let n=e.parentElement?e.ownerDocument.defaultView?.getComputedStyle(e.parentElement).display:null;return n!=null&&Gu.has(n)}function ju(e){let t=Number.parseFloat(e.opacity);if(Number.isFinite(t)&&t<1||e.getPropertyValue("isolation")==="isolate")return!0;let n=e.getPropertyValue("mix-blend-mode");return n&&n!=="normal"?!0:Lo.some(i=>{let r=e.getPropertyValue(i);return r!==""&&r!=="none"})}function qu(e){return e.getPropertyValue("contain").split(/\s+/).some(n=>Wu.has(n))?!0:Uu.has(e.getPropertyValue("container-type"))}function $u(e){return e.getPropertyValue("will-change").split(",").map(t=>t.trim()).some(t=>Bu.has(t))}function Ku(e,t){return Vu(t)||zu(e,t)||ju(t)||qu(t)?!0:$u(t)}function Ju(e){let t=[],n=e;for(;n?.parentElement;)t.push(Array.prototype.indexOf.call(n.parentElement.children,n)),n=n.parentElement;return`css:${t.reverse().join(".")}`}function yn(e){let t=e.ownerDocument.defaultView;if(!t)return Ai;let n=e.parentElement;for(;n&&n!==e.ownerDocument.documentElement;){try{if(Ku(n,t.getComputedStyle(n)))return Ju(n)}catch{return Ai}n=n.parentElement}return Ai}function qe(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Ro(e){let t=(e??"").trim();if(!t)return null;let n=qe(t);if(n!=null)return{kind:"absolute",value:n};let i=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!i)return null;let r=(i[1]??"").trim();if(!r)return null;let o=i[2]??"+",a=i[3]??"0",u=Number.parseFloat(a),s=Number.isFinite(u)?Math.max(0,u):0,l=o==="-"?-s:s;return{kind:"reference",refId:r,offset:l}}var Xu="data-hf-authored-duration",Yu="data-hf-authored-end";function Qu(e){return qe(e.getAttribute("data-duration"))}function Zu(e){return qe(e.getAttribute("data-end"))}function ec(e){return qe(e.getAttribute(Xu))}function tc(e){return qe(e.getAttribute(Yu))}function $e(e){let t=e.timelineRegistry??{},n=e.includeAuthoredTimingAttrs??!1,i=new WeakMap,r=new WeakMap,o=new Set,a=d=>{let m=document.getElementById(d);return m||(document.querySelector(`[data-composition-id="${CSS.escape(d)}"]`)??null)},u=d=>{let m=r.get(d);if(m!==void 0)return m;let f=null,x=Qu(d)??(n?ec(d):null);if(x!=null&&x>0&&(f=x),f==null||f<=0){let S=Zu(d)??(n?tc(d):null);if(S!=null){let y=l(d,0),b=S-y;Number.isFinite(b)&&b>0&&(f=b)}}if((f==null||f<=0)&&d instanceof HTMLMediaElement){let S=qe(d.getAttribute("data-playback-start"))??qe(d.getAttribute("data-media-start"))??0;Number.isFinite(d.duration)&&d.duration>S&&(f=(d.duration-S)/Lt(d))}if(f==null||f<=0){let S=d.getAttribute("data-composition-id");if(S){let y=t[S]??null;if(y&&typeof y.duration=="function")try{let b=Number(y.duration());Number.isFinite(b)&&b>0&&(f=b)}catch(b){M("runtime.startResolver.site1",b)}}}return f!=null&&Number.isFinite(f)&&f>0?(r.set(d,f),f):(r.set(d,null),null)},s=(d,m)=>{if(d.hasAttribute("data-composition-id")){let x=d.parentElement?.closest("[data-composition-id]");return x?l(x,m):0}let f=d.closest("[data-composition-id]");return f?l(f,m):0},l=(d,m)=>{let f=i.get(d);if(f!==void 0)return f??m;if(o.has(d))return m;o.add(d);try{let x=Ro(d.getAttribute("data-start"));if(!x){if(d.hasAttribute("data-composition-id")){let _=d.parentElement;if(_&&(_.hasAttribute("data-composition-src")||_.hasAttribute("data-composition-id")||_.hasAttribute("data-composition-file"))){let N=l(_,m);return i.set(d,N),N}}return i.set(d,m),m}if(x.kind==="absolute"){let _=Math.max(0,x.value),N=Math.max(0,s(d,m)+_);return i.set(d,N),N}let S=a(x.refId);if(!S)return i.set(d,m),m;let y=l(S,0),b=u(S);if(b==null||b<=0){let _=Math.max(0,y+x.offset);return i.set(d,_),_}let A=Math.max(0,y+b+x.offset);return i.set(d,A),A}finally{o.delete(d)}};return{resolveStartForElement:(d,m=0)=>l(d,Math.max(0,m)),resolveDurationForElement:d=>u(d)}}function wi(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var nc="data-hf-authored-duration",ic="data-hf-authored-end";function Ee(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Ci(e){return Ee(e.getAttribute("data-duration"))??Ee(e.getAttribute(nc))}function ko(e){return Ee(e.getAttribute("data-end"))??Ee(e.getAttribute(ic))}function Fi(e){try{let t=e.style?.zIndex;if(t&&t!=="auto"){let n=parseInt(t,10);if(Number.isFinite(n))return n}return 0}catch{return 0}}function _i(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function Ti(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let i=Number.parseInt(n,10);return Number.isFinite(i)?i:t}function Ot(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function Do(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Ot(t);let n=e.getAttribute("data-composition-src");if(n)return Ot(n);let i=e.querySelector("img[src], video[src], audio[src], source[src]");return i?Ot(i.getAttribute("src")):null}function rc(e){let t=e.className;return typeof t!="string"?null:t.split(/\s+/).map(n=>n.trim()).find(n=>n&&n!=="clip"&&!n.startsWith("__hf-"))??null}function oc(e){if(!e)return null;try{return new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)??null}catch{return e.split(/[\\/]/).filter(Boolean).at(-1)??null}}function sc(e){let t=e.textContent?.replace(/\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Pt(e){let t=e.replace(/\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):e}function ac(e,t,n){let i=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(i?.trim())return i.trim();let r=e.getAttribute("data-composition-id");if(r)return Pt(r);let o=e.id;if(o)return Pt(o);let a=rc(e);if(a)return Pt(a);let u=oc(Do(e));if(u)return Pt(u);let s=sc(e);return s||`${Pt(t)} ${n+1}`}function Io(e){let n=window.__timelines??{},i=$e({timelineRegistry:n,includeAuthoredTimingAttrs:!0}),r=B=>{if(!B)return null;let k=n[B]??null;if(!k||typeof k.duration!="function")return null;try{let H=Number(k.duration());return Number.isFinite(H)&&H>0?H:null}catch{return null}},o=B=>{let k=Ee(B.getAttribute("data-duration"));if(k!=null&&k>0)return k;let H=Ee(B.getAttribute("data-playback-start"))??Ee(B.getAttribute("data-media-start"))??0;return Number.isFinite(B.duration)&&B.duration>H?Math.max(0,(B.duration-H)/Lt(B)):null},a=()=>{let B=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(B.length===0)return null;let k=0;for(let H of B){let le=H.hasAttribute("data-hf-auto-start")?i.resolveStartForElement(H,0):Math.max(0,Number(H.getAttribute("data-start")??0)||0);if(!Number.isFinite(le))continue;let se=o(H);se==null||se<=0||(k=Math.max(k,Math.max(0,le)+se))}return k>0?k:null},u=(B,k)=>{let H=[],le=null,se=null,G=null,j=B.parentElement;for(;j;){let K=j.getAttribute("data-composition-id");K&&(H.push(K),!G&&j!==k&&(G=K),le==null&&(le=i.resolveStartForElement(j,0)),se==null&&(se=Ee(j.getAttribute("data-duration"))??r(K)??null)),j=j.parentElement}return{parentCompositionId:G,compositionAncestors:H.reverse(),inheritedStart:le,inheritedDuration:se}},s=document.querySelector("[data-composition-id]"),l=Array.from(document.querySelectorAll("[data-composition-id]")),d=s?.getAttribute("data-composition-id")??null,m=s?i.resolveStartForElement(s,0):0,f=a(),x=f!=null?Math.max(0,f-Math.max(0,m)):null,S=r(d),y=Ci(s??document.body),b=_i(...l.filter(B=>B!==s).map(B=>{let k=i.resolveStartForElement(B,0),H=i.resolveDurationForElement(B)??r(B.getAttribute("data-composition-id"))??null;return!Number.isFinite(k)||H==null||H<=0?null:Math.max(0,k)+H})),A=b!=null?Math.max(0,b-Math.max(0,m)):null,_=typeof S=="number"&&Number.isFinite(S)&&S>0?S:null,N=typeof y=="number"&&Number.isFinite(y)&&y>0?y:null,$=typeof x=="number"&&Number.isFinite(x)&&x>0?x:null,P=typeof A=="number"&&Number.isFinite(A)&&A>0?A:null,T=_i($,P),w=_!=null&&T!=null&&_>T+1,F=N??(w?T:_i(_,$,P))??null,R=(F!=null?m+F:null)??(typeof f=="number"&&Number.isFinite(f)&&f>0?f:null),V=(B,k)=>!Number.isFinite(k)||k<=0?0:R==null||!Number.isFinite(R)?k:!Number.isFinite(B)||B>=R?0:Math.max(0,Math.min(k,R-B)),W=[],ie=[],D=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),re=0;for(let[B,k]of D.entries()){if(k===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(k.tagName))continue;let H=u(k,s),le=i.resolveStartForElement(k,H.inheritedStart??0),se=k.getAttribute("data-composition-id"),G=Ci(k);if((G==null||G<=0)&&se&&se!==d&&(G=r(se)),(G==null||G<=0)&&k instanceof HTMLMediaElement){let we=Ee(k.getAttribute("data-playback-start"))??Ee(k.getAttribute("data-media-start"))??0;Number.isFinite(k.duration)&&k.duration>0&&(G=Math.max(0,k.duration-we))}if(G==null||G<=0){let we=H.inheritedDuration;if(we!=null&&we>0){let Ge=(H.inheritedStart??0)+we;G=Math.max(0,Ge-le)}}if(G==null||G<=0||(G=V(le,G),G<=0))continue;let j=le+G;re=Math.max(re,j);let K=k.tagName.toLowerCase(),Ae=se&&se!==d?"composition":K==="video"?"video":K==="audio"?"audio":K==="img"?"image":"element";W.push({id:Ei(k)??se??null,label:ac(k,Ae,W.length),start:le,duration:G,track:Ti(k,B),zIndex:Fi(k),stackingContextId:yn(k),kind:Ae,tagName:K,compositionId:k.getAttribute("data-composition-id"),compositionAncestors:H.compositionAncestors,parentCompositionId:H.parentCompositionId,nodePath:null,compositionSrc:Ot(k.getAttribute("data-composition-src")),assetUrl:Do(k),timelineRole:k.getAttribute("data-timeline-role"),timelineLabel:k.getAttribute("data-timeline-label"),timelineGroup:k.getAttribute("data-timeline-group"),timelinePriority:Ee(k.getAttribute("data-timeline-priority"))})}let Fe=new Set(W.map(B=>B.id)),z=s?.getAttribute("data-composition-id")??null,X=z?n[z]??null:null;if(X&&s){let B=X;if(typeof B.getChildren=="function")try{let k=B.getChildren(!0,!0,!1)??[],H=new Map;for(let G of s.children){let j=G;if(!j.id)continue;let K=j.tagName.toLowerCase();K==="script"||K==="style"||K==="link"||H.set(j,{id:j.id,start:1/0,end:-1/0})}let le=G=>{let j=G;for(;j;){if(H.has(j))return j;if(j===s)return null;j=j.parentElement}return null};for(let G of k){if(typeof G.targets!="function"||typeof G.startTime!="function"||typeof G.duration!="function")continue;let j=G.startTime(),K=G.parent;for(;K&&K!==X&&typeof K.startTime=="function";)j+=K.startTime(),K=K.parent;let Ae=j+G.duration();if(!(!Number.isFinite(j)||!Number.isFinite(Ae)))for(let we of G.targets()){if(!(we instanceof Element))continue;let St=le(we);if(!St)continue;let Ge=H.get(St);Ge&&(Ge.start=Math.min(Ge.start,j),Ge.end=Math.max(Ge.end,Ae))}}let se=W.length>0?Math.max(...W.map(G=>G.track))+1:0;for(let[G,j]of H){if(j.start===1/0||j.end===-1/0)continue;let K=G;if(Fe.has(K.id))continue;let Ae=Math.max(0,j.end-j.start);if(Ae<=0)continue;let we=V(j.start,Ae);we<=0||(re=Math.max(re,j.start+we),W.push({id:K.id,label:K.getAttribute("data-timeline-label")??K.getAttribute("data-label")??K.getAttribute("aria-label")??K.id,start:j.start,duration:we,track:Ti(K,se),zIndex:Fi(K),stackingContextId:yn(K),kind:"element",tagName:K.tagName.toLowerCase(),compositionId:K.getAttribute("data-composition-id"),compositionAncestors:z?[z]:[],parentCompositionId:z,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:K.getAttribute("data-timeline-role"),timelineLabel:K.getAttribute("data-timeline-label"),timelineGroup:K.getAttribute("data-timeline-group"),timelinePriority:Ee(K.getAttribute("data-timeline-priority"))}),Fe.add(K.id))}}catch(k){M("runtime.timeline.site1",k)}}if(s&&F!=null&&F>0){let B=W.length>0?Math.max(...W.map(k=>k.track))+1:0;for(let k of s.children){let H=k;if(!H.id||Fe.has(H.id))continue;let le=H.getAttribute("data-timeline-role");if(le!=="overlay"&&le!=="persistent-overlay")continue;let se=H.tagName.toLowerCase();if(se==="script"||se==="style"||se==="link"||se==="meta"||window.getComputedStyle(H).display==="none")continue;let j=V(0,F);j<=0||(re=Math.max(re,j),W.push({id:H.id,label:H.getAttribute("data-timeline-label")??H.getAttribute("data-label")??H.getAttribute("aria-label")??H.id,start:0,duration:j,track:Ti(H,B),zIndex:Fi(H),stackingContextId:yn(H),kind:"element",tagName:se,compositionId:H.getAttribute("data-composition-id"),compositionAncestors:z?[z]:[],parentCompositionId:z,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:le,timelineLabel:H.getAttribute("data-timeline-label"),timelineGroup:H.getAttribute("data-timeline-group"),timelinePriority:Ee(H.getAttribute("data-timeline-priority"))}),Fe.add(H.id))}}for(let B of l){if(B===s)continue;let k=B.getAttribute("data-composition-id");if(!k||!wi(k))continue;let H=i.resolveStartForElement(B,0),le=Ci(B);if((le==null||le<=0)&&ko(B)!=null){let K=ko(B);le=Math.max(0,K-H)}let se=r(k),G=le&&le>0?le:se;if(G==null||G<=0)continue;let j=V(H,G);j<=0||ie.push({id:k,label:B.getAttribute("data-label")??k,start:H,duration:j,thumbnailUrl:Ot(B.getAttribute("data-thumbnail-url")),avatarName:null})}let O=Math.max(1,re||1,F??0);return{source:"hf-preview",type:"timeline",durationInFrames:w&&N==null?Number.POSITIVE_INFINITY:Math.max(1,Math.ceil(O*Math.max(1,e.canonicalFps))),clips:W,scenes:ie,compositionWidth:Ee(s?.getAttribute("data-width"))??1920,compositionHeight:Ee(s?.getAttribute("data-height"))??1080}}var ue=Yl(sa(),1),aa=ue.default,b0=ue.default.stringify,y0=ue.default.fromJSON,S0=ue.default.plugin,E0=ue.default.parse,A0=ue.default.list,w0=ue.default.document,C0=ue.default.comment,F0=ue.default.atRule,_0=ue.default.rule,T0=ue.default.decl,v0=ue.default.root,M0=ue.default.CssSyntaxError,N0=ue.default.Declaration,L0=ue.default.Container,R0=ue.default.Processor,k0=ue.default.Document,D0=ue.default.Comment,I0=ue.default.Warning,P0=ue.default.AtRule,O0=ue.default.Result,B0=ue.default.Input,H0=ue.default.Rule,G0=ue.default.Root,W0=ue.default.Node;var Zi="data-hf-authored-id",la="data-hf-inner-root";function er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tr(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Md(e){return e&&e.replace(/[^a-zA-Z0-9_-]/g,n=>`\\${n}`).replace(/^-?\d/,n=>`\\${n}`)}function ca(e){let t=e.trim();return t?Array.from(new Set([t,Md(t)])).filter(Boolean):[]}function Nd(e){return!!e&&/[\w-]/.test(e)}function Ld(e,t,n){let i=ca(t).sort((u,s)=>s.length-u.length);if(i.length===0)return e;let r="",o=0,a=null;for(let u=0;u<e.length;u+=1){let s=e[u],l=u>0?e[u-1]:"";if(a){r+=s,s===a&&l!=="\\"&&(a=null);continue}if(s==='"'||s==="'"){a=s,r+=s;continue}if(s==="["){o+=1,r+=s;continue}if(s==="]"){o=Math.max(0,o-1),r+=s;continue}if(s==="#"&&o===0){let d=i.find(m=>e.startsWith(m,u+1));if(d){let m=e[u+1+d.length];if(!Nd(m)){r+=n,u+=d.length;continue}}}r+=s}return r}function Rd(e,t){let n=t?.trim();return n?Ld(e,n,`[${Zi}="${tr(n)}"]`):e}function ua(e){return`${e}:not(:has([${la}])), ${e} > [${la}]`}function kd(e,t,n,i,r,o){let a=Rd(e,i),u=Dd(a,t,n),s=u.trim();if(!s||s==="*")return e;if(/^(html|body|:root)$/i.test(s))return o?ua(t):e;let l=new RegExp(`\\[\\s*data-composition-id\\s*=\\s*(["'])${er(n)}\\1\\s*\\]`,"g");if(l.test(s))return s.replace(l,"").trim()===""?ua(t):u.replace(l,t);let d=u.match(/^\s*/)?.[0]??"",m=u.match(/\s*$/)?.[0]??"";if(r){let f=i?`[${Zi}="${tr(i)}"]`:null;if(f&&s.startsWith(f)){let x=s.slice(f.length);return`${d}${t}${f}${x}${m}`}}return`${d}${t} ${s}${m}`}function Dd(e,t,n){let i=er(n),r=String.raw`\[\s*data-composition-id\s*=\s*(?:"${i}"|'${i}')\s*\]`,o=String.raw`\s*\[\s*data-(?:start|duration)\s*=\s*(?:"[^"]*"|'[^']*')\s*\]`;return e.replace(new RegExp(`${r}(?:${o})+`,"g"),t).replace(new RegExp(`(?:${o})+${r}`,"g"),t)}var Id=new Set(["keyframes","-webkit-keyframes","font-face"]);function Pd(e){return e?.type==="atrule"}function Od(e){let t=e.parent;for(;t;){if(Pd(t)&&Id.has(t.name.toLowerCase()))return!0;t=t.parent}return!1}function da(e,t,n,i,r){let o=t.trim();if(!e||!o)return e;let a=n||`[data-composition-id="${tr(o)}"]`,u=aa.parse(e);return u.walkRules(s=>{Od(s)||(s.selectors=s.selectors.map(l=>kd(l,a,o,i,r?.compoundAuthoredRoot,r?.scopeRootSelectors)))}),u.toResult({map:!1}).css}function fa(e,t,n="[HyperFrames] composition script error:",i,r=t,o){let a=JSON.stringify(t),u=JSON.stringify(r),s=JSON.stringify(n),l=er(t),d=JSON.stringify(o?.trim()||null),m=JSON.stringify(i??null),f=JSON.stringify(String.raw`\[\s*data-composition-id\s*=\s*(?:"${l}"|'${l}')\s*\]`),x=JSON.stringify(String.raw`\s*\[\s*data-(?:start|duration)\s*=\s*(?:"[^"]*"|'[^']*')\s*\]`),S=JSON.stringify(ca(o?.trim()||""));return`(function(){
|
|
41
41
|
var __hfCompId = ${a};
|
|
42
42
|
var __hfTimelineCompId = ${u};
|
|
43
43
|
var __hfErrorLabel = ${s};
|
|
44
|
-
var __hfAuthoredRootId = ${
|
|
45
|
-
var __hfAuthoredRootAttr = ${JSON.stringify(
|
|
44
|
+
var __hfAuthoredRootId = ${d};
|
|
45
|
+
var __hfAuthoredRootAttr = ${JSON.stringify(Zi)};
|
|
46
46
|
var __hfEscapeAttr = function(value) {
|
|
47
47
|
return (value + "").replace(/\\\\/g, "\\\\\\\\").replace(/"/g, "\\\\\\"");
|
|
48
48
|
};
|
|
@@ -51,8 +51,8 @@ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=t,u.p
|
|
|
51
51
|
: "");
|
|
52
52
|
var __hfRoot = null;
|
|
53
53
|
var __hfRootSelectorPattern = ${f};
|
|
54
|
-
var __hfTimingSelectorPattern = ${
|
|
55
|
-
var __hfAuthoredRootIdForms = ${
|
|
54
|
+
var __hfTimingSelectorPattern = ${x};
|
|
55
|
+
var __hfAuthoredRootIdForms = ${S};
|
|
56
56
|
var __hfAuthoredRootSelector = __hfAuthoredRootId
|
|
57
57
|
? "[" + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(__hfAuthoredRootId) + '"]'
|
|
58
58
|
: "";
|
|
@@ -345,12 +345,12 @@ ${e.replace(/<\/(script)/gi,"<\\/$1")}
|
|
|
345
345
|
};
|
|
346
346
|
__hfFindRoot();
|
|
347
347
|
__hfRun();
|
|
348
|
-
})();`}var Ad=["data-composition-id","data-composition-file","data-start","data-duration","data-end","data-track-index","data-track","data-composition-src","data-hf-authored-duration","data-hf-authored-end"];function ua(e){let t=e.getAttribute("id")?.trim();for(let n of Ad)e.removeAttribute(n);t&&(e.removeAttribute("id"),e.setAttribute("data-hf-authored-id",t)),e.setAttribute("data-hf-inner-root","true")}var wd=8e3,Cd=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,Fd=/\burl\(\s*(["']?)([^)"']+)\1\s*\)/g,_d=["src","href"];function vd(e){return!e||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/")}function da(e,t){if(!t)return e;let n=e.trim();if(vd(n)||!n.startsWith("../")&&n!=="..")return e;try{return new URL(n,t).href}catch{return e}}function fa(e,t){return!t||!e?e:e.replace(Fd,(n,i,r)=>{let o=da(r||"",t);return o===r?n:`url(${i||""}${o}${i||""})`})}function Td(e,t){for(let n of Array.from(e.querySelectorAll("[src], [href]")))for(let i of _d){let r=n.getAttribute(i);if(r==null)continue;let o=da(r,t);o!==r&&n.setAttribute(i,o)}}function Md(e,t){for(let n of Array.from(e.querySelectorAll("[style]"))){let i=n.getAttribute("style");if(i==null)continue;let r=fa(i,t);r!==i&&n.setAttribute("style",r)}}function Nd(e,t){for(let n of Array.from(e.querySelectorAll("style"))){let i=n.textContent||"",r=fa(i,t);r!==i&&(n.textContent=r)}}function ma(e,t){if(t){Td(e,t),Md(e,t),Nd(e,t);for(let n of Array.from(e.querySelectorAll("template")))ma(n.content,t)}}function Ld(e,t){return`${e}__hf${t}`}var Rd=e=>new Promise(t=>{let n=!1,i=Date.now(),r=null,o=a=>{n||(n=!0,r!=null&&window.clearTimeout(r),t({status:a,elapsedMs:Math.max(0,Date.now()-i)}))};e.addEventListener("load",()=>o("load"),{once:!0}),e.addEventListener("error",()=>o("error"),{once:!0}),r=window.setTimeout(()=>o("timeout"),wd)});function er(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function kd(e){let t=document.importNode(e,!0);ua(t);let n=t.getAttribute("data-width"),i=t.getAttribute("data-height");return t.style.width=n?`${n}px`:"100%",t.style.height=i?`${i}px`:"100%",t}function ca(e,t){let n=e.trim();if(!n)return e;try{return Cd.test(n)?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}function Dn(e){let t=(e.getAttribute("data-composition-id")||"").trim()||null;return{authoredCompositionId:(e.getAttribute("data-hf-original-composition-id")||t||"").trim()||null,runtimeCompositionId:t}}function Dd(e){let t=new Map;for(let n of e){let i=Dn(n).authoredCompositionId||"";i&&t.set(i,(t.get(i)||0)+1)}return t}function pa(e){let t=Dn(e).authoredCompositionId;return t?!!document.querySelector(`template#${CSS.escape(t)}-template`):!1}function Id(e){return!!e.querySelector('[data-hf-inner-root="true"]')}function Pd(e){return e.hasAttribute("data-composition-src")?!0:pa(e)?e.children.length===0||e.hasAttribute("data-hf-original-composition-id")?!0:Id(e):!1}function nr(){return Array.from(document.querySelectorAll("[data-composition-src], [data-composition-id]")).filter(t=>t.hasAttribute("data-composition-src")?!0:pa(t))}function ha(){let e=window.__hfVariablesByComp;if(!e)return;let t=new Set(nr().map(n=>Dn(n).runtimeCompositionId).filter(n=>!!n));for(let n of Object.keys(e))t.has(n)||delete e[n]}function ga(e,t=Dd(e)){let n=new Map,i=new Map;for(let r of e){let{authoredCompositionId:o,runtimeCompositionId:a}=Dn(r),u=Pd(r);if(!o){i.set(r,{authoredCompositionId:null,runtimeCompositionId:a});continue}let s=(t.get(o)||0)>1,l=a||o;if(u){let c=s?(n.get(o)||0)+1:0;s&&n.set(o,c),l=s?Ld(o,c):o,s?r.setAttribute("data-hf-original-composition-id",o):r.removeAttribute("data-hf-original-composition-id"),r.setAttribute("data-composition-id",l),a&&a!==l&&window.__hfVariablesByComp&&delete window.__hfVariablesByComp[a]}i.set(r,{authoredCompositionId:o,runtimeCompositionId:l})}return i}async function tr(e){let t=null;e.authoredCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(b=>b instanceof HTMLElement&&b.getAttribute("data-composition-id")===e.authoredCompositionId)??null);let n=t??e.sourceNode,i=t?.getAttribute("data-composition-id")?.trim()||e.authoredCompositionId||null,r=e.runtimeCompositionId||i||null,o=t?.getAttribute("id")?.trim()||null,a=r?`[data-composition-id="${CSS.escape(r)}"]`:void 0;if(e.headLinks)for(let f of e.headLinks){let b=f.getAttribute("href")||"";b&&(document.head.querySelector(`link[href="${CSS.escape(b)}"]`)||document.head.appendChild(f.cloneNode(!0)))}let u=f=>{for(let b of f){let E=b.cloneNode(!0);E instanceof HTMLStyleElement&&(i&&(E.textContent=aa(E.textContent||"",i,a,o,{scopeRootSelectors:!0})),document.head.appendChild(E),e.injectedStyles.push(E))}};e.headStyles&&u(e.headStyles),u(Array.from(n.querySelectorAll("style")));let s=[];if(e.headScripts)for(let f of e.headScripts){let b=f.getAttribute("type")?.trim()??"",E=f.getAttribute("src")?.trim()??"";if(E){let y=ca(E,e.compositionUrl);s.push({kind:"external",src:y,type:b})}else{let y=f.textContent?.trim()??"";y&&s.push({kind:"inline",content:y,type:b,scopeCompositionId:i})}}let l=Array.from(n.querySelectorAll("script")),c=[...s];for(let f of l){let b=f.getAttribute("type")?.trim()??"",E=f.getAttribute("src")?.trim()??"";if(E){let y=ca(E,e.compositionUrl);c.push({kind:"external",src:y,type:b})}else{let y=f.textContent?.trim()??"";y&&c.push({kind:"inline",content:y,type:b,scopeCompositionId:i})}f.parentNode?.removeChild(f)}let m=Array.from(n.querySelectorAll("style"));for(let f of m)f.parentNode?.removeChild(f);if(t){let f=t.getAttribute("data-width"),b=t.getAttribute("data-height"),E=e.parseDimensionPx(f),y=e.parseDimensionPx(b);f&&e.host.setAttribute("data-width",f),b&&e.host.setAttribute("data-height",b),E&&e.host instanceof HTMLElement&&(e.host.style.width=E),y&&e.host instanceof HTMLElement&&(e.host.style.height=y),t.hasAttribute("data-timeline-locked")&&e.host.setAttribute("data-timeline-locked",""),e.host.appendChild(kd(t))}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;r&&Od(e,n,r);for(let f of c){let b=document.createElement("script");if(f.type&&(b.type=f.type),b.async=!1,f.kind==="external"?b.src=f.src:f.type.toLowerCase()==="module"?b.textContent=f.content:f.scopeCompositionId?b.textContent=la(f.content,f.scopeCompositionId,"[HyperFrames] composition script error:",a,r||f.scopeCompositionId,o):b.textContent=`(function(){${f.content}})();`,document.body.appendChild(b),e.injectedScripts.push(b),f.kind==="external"){let E=await Rd(b);E.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.authoredCompositionId,runtimeCompositionId:e.runtimeCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:f.src,loadStatus:E.status,elapsedMs:E.elapsedMs}})}}}async function xa(e){let t=nr();if(ha(),t.length===0)return;let n=ga(t),i=t.filter(r=>{if(r.hasAttribute("data-composition-src")||r.children.length>0)return!1;let o=n.get(r)?.authoredCompositionId;return o?!!document.querySelector(`template#${CSS.escape(o)}-template`):!1});if(i.length!==0)for(let r of i){let o=n.get(r),a=o?.authoredCompositionId;if(!a)continue;let u=document.querySelector(`template#${CSS.escape(a)}-template`);er(r),await tr({host:r,authoredCompositionId:a,runtimeCompositionId:o?.runtimeCompositionId||a,hostCompositionSrc:`template#${a}-template`,sourceNode:u.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function ba(e){let t=nr();if(ha(),t.length===0)return;let n=ga(t),i=t.filter(r=>r.hasAttribute("data-composition-src"));i.length!==0&&await Promise.all(i.map(async r=>{let o=r.getAttribute("data-composition-src");if(!o)return;let a=n.get(r),u=a?.authoredCompositionId||null,s=a?.runtimeCompositionId||u||null,l=null;try{l=new URL(o,document.baseURI)}catch{l=null}er(r);try{let c=u!=null?document.querySelector(`template#${CSS.escape(u)}-template`):null;if(c){await tr({host:r,authoredCompositionId:u,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let m=await fetch(o);if(!m.ok)throw new Error(`HTTP ${m.status}`);let f=await m.text(),E=new DOMParser().parseFromString(f,"text/html");ma(E,l);let y=(u?E.querySelector(`template#${CSS.escape(u)}-template`):null)??E.querySelector("template"),x=y?y.content:E.body,A=y?void 0:Array.from(E.head.querySelectorAll("style")),_=y?void 0:Array.from(E.head.querySelectorAll("script")),M=y?void 0:Array.from(E.head.querySelectorAll('link[rel="stylesheet"], link[rel="preconnect"]'));await tr({host:r,authoredCompositionId:u,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:x,hasTemplate:!!y,fallbackBodyInnerHtml:E.body.innerHTML,compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,headStyles:A,headScripts:_,headLinks:M,declaredVariableDefaults:Tt(E.documentElement),onDiagnostic:e.onDiagnostic})}catch(c){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:u,runtimeCompositionId:s,hostCompositionSrc:o,errorMessage:c instanceof Error?c.message:"unknown_error"}}),er(r)}}))}function Od(e,t,n){let r={...e.declaredVariableDefaults??(t instanceof Element?Tt(t):{}),...Kr(e.host)};qr(e.host),Object.keys(r).length>0?(window.__hfVariablesByComp||(window.__hfVariablesByComp={}),window.__hfVariablesByComp[n]=r,ui(e.host,{...r,...mn()})):window.__hfVariablesByComp&&delete window.__hfVariablesByComp[n]}function Bd(e){return e instanceof HTMLElement?e.dataset.captionWrapper!=="true"?e:e.querySelector(":scope > span")??null:null}function Hd(){let e=[],t=document.querySelectorAll(".caption-group");for(let n of t)for(let i of n.children){if(!(i instanceof HTMLElement))continue;let r=i.dataset.captionWrapper==="true"?i.querySelector(":scope > span"):i.tagName==="SPAN"?i:null;r&&e.push(r)}return e}function Gd(e){let t=e.parentElement;if(t?.dataset.captionWrapper==="true")return t;let n=document.createElement("span");return n.style.display="inline-block",n.dataset.captionWrapper="true",e.parentNode?.insertBefore(n,e),n.appendChild(e),n}function ir(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=Hd();for(let i of t){let r=null;if(i.wordId&&(r=Bd(document.getElementById(i.wordId))),!r&&i.wordIndex!==void 0&&(r=n[i.wordIndex]??null),!r)continue;let o={},a={};if(i.x!==void 0&&(o.x=i.x),i.y!==void 0&&(o.y=i.y),i.scale!==void 0&&(o.scale=i.scale),i.rotation!==void 0&&(o.rotation=i.rotation),i.opacity!==void 0&&(a.opacity=i.opacity),i.fontSize!==void 0&&(a.fontSize=`${i.fontSize}px`),i.fontWeight!==void 0&&(a.fontWeight=i.fontWeight),i.fontFamily!==void 0&&(a.fontFamily=i.fontFamily),i.activeColor||i.dimColor){let s=e.getTweensOf(r).filter(c=>c.vars.color!==void 0).sort((c,m)=>c.startTime()-m.startTime()),l=s[0]?String(s[0].vars.color):"";for(let c of s)String(c.vars.color)===l?i.dimColor&&(c.vars.color=i.dimColor):i.activeColor&&(c.vars.color=i.activeColor);i.dimColor&&e.set(r,{color:i.dimColor})}if(Object.keys(a).length>0&&e.set(r,a),Object.keys(o).length>0){let u=Gd(r);e.set(u,o)}}}).catch(()=>{})}var Fa="data-hf-edit-base-x",_a="data-hf-edit-base-y",rr="data-hf-edit-original-translate",In=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},Wd=e=>{let t=[],n=0,i="";for(let r of e.trim())r==="("&&(n+=1),r===")"&&(n=Math.max(0,n-1)),/\s/.test(r)&&n===0?(i&&t.push(i),i=""):i+=r;return i&&t.push(i),t},ya=/^-?(?:\d+(?:\.\d+)?|\.\d+)px$/,or=(e,t)=>ya.test(e)&&ya.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,Ud=(e,t,n)=>{if(!e||e==="none")return`${t} ${n}`;let[i,r,o]=Wd(e);if(i===void 0)return`${t} ${n}`;if(r===void 0)return`${or(i,t)} ${n}`;let a=o===void 0?"":` ${o}`;return`${or(i,t)} ${or(r,n)}${a}`},Vd=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},zd=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let n=e.ownerDocument.defaultView,i=n?n.getComputedStyle(e).getPropertyValue("translate").trim():"";return i==="none"?"":i}catch{return""}},Sa=new WeakMap;function jd(e,t){let n=Sa.get(e);if(!t?.force&&n!==void 0&&e.style.getPropertyValue("translate")!==n){ot("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let i=In(e.getAttribute("data-x"))-In(e.getAttribute(Fa)),r=In(e.getAttribute("data-y"))-In(e.getAttribute(_a));e.hasAttribute(rr)||e.setAttribute(rr,zd(e)),n===void 0&&Vd(e);let o=e.getAttribute(rr)??"",a=Ud(o,`${i}px`,`${r}px`);e.style.setProperty("translate",a),Sa.set(e,e.style.getPropertyValue("translate"))}function Pn(e){let t=e.querySelectorAll(`[${Fa}], [${_a}]`),n=e.defaultView?.HTMLElement,i=0;for(let r=0;r<t.length;r++){let o=t[r];(n?o instanceof n:typeof o.style?.setProperty=="function")&&(jd(o),i+=1)}return i}var Ea="__hfPositionEditsSeekReapplyWrapped",Aa=new WeakSet,wa=new WeakMap,Ca=new WeakMap;function va(e){let t=e,n=()=>{try{Pn(t.document)}catch{}},i=m=>typeof m=="function"&&(Aa.has(m)||!!m[Ea]),r=m=>{Aa.add(m);try{Object.defineProperty(m,Ea,{value:!0})}catch{}},o=m=>{if(typeof m!="function"||i(m))return m;let f=function(...b){let E=m.apply(this,b);return n(),E};return r(f),f},a=(m,f)=>{let b=wa.get(m);if(b?.has(f))return!0;let E=Object.getOwnPropertyDescriptor(m,f);if(E?.configurable===!1){let A=m[f];return typeof A=="function"&&(m[f]=o(A),n()),!1}let y=m[f],x=E?.set;return Object.defineProperty(m,f,{configurable:!0,enumerable:E?.enumerable??!0,get:()=>y,set:A=>{y=o(A),x?.call(m,A)}}),y=o(y),b??(b=new Set),b.add(f),wa.set(m,b),n(),!0},u=(m,f)=>{let b=Ca.get(t),E=Object.getOwnPropertyDescriptor(t,m);if(!b?.has(m)){if(E?.configurable===!1){let A=t[m];return A?a(A,f):!1}let x=t[m];Object.defineProperty(t,m,{configurable:!0,enumerable:E?.enumerable??!0,get:()=>x,set:A=>{x=A,x&&a(x,f)}}),b??(b=new Set),b.add(m),Ca.set(t,b)}let y=t[m];return y?a(y,f):!1},s=()=>{let m=u("__hf","seek"),f=u("__player","renderSeek");return m&&f};if(s())return;let l=120,c=t.setInterval(()=>{if(s()){t.clearInterval(c);return}l-=1,l<=0&&t.clearInterval(c)},50)}function On(e){let t=window,i=e.closest("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()??"",r=i?t.__hfVariablesByComp?.[i]:void 0;if(r)return r;let o=t.__hyperframes?.getVariables?.();return o&&typeof o=="object"?o:t.__hfVariables??{}}function Bn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var Ta=new Set(["img","video","audio","source"]);function qd(e){if(typeof e=="string"&&e.length>0)return e;if(e!==null&&typeof e=="object"){let t=e.url;if(typeof t=="string"&&t.length>0)return t}return null}function $d(e){let t=e.replace(/[\u0000-\u0020]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return!0;let i=n[1]?.toLowerCase();return i?i==="https"||i==="http"||i==="blob"?!0:i==="data"?/^data:image\//i.test(t):!1:!1}function Kd(e){return e.replace(/[;{}<>\r\n]/g,"")}function Jd(e){if(Bn(e))return String(e);if(e!==null&&typeof e=="object"){let t=e.name;if(typeof t=="string"&&t.length>0)return t}return null}function sr(e,t){let n=e.closest("[data-composition-id]"),i=t.get(n);if(i)return i;let r=On(e);return t.set(n,r),r}function Yd(e,t){if(e.childElementCount===0){e.textContent=t;return}let n=!1;for(let i of Array.from(e.childNodes))i.nodeType===Node.TEXT_NODE&&(i.nodeValue=n?"":t,n=!0);n||e.insertBefore(e.ownerDocument.createTextNode(t),e.firstChild)}function Xd(e){return e.querySelector("[data-hf-root]")??e.getElementById("stage")??e.body?.firstElementChild??e.body}function Qd(e,t){let n=new Set,i=Xd(e);i&&n.add(i);for(let r of Array.from(e.querySelectorAll("[data-composition-id]")))n.add(r);for(let r of n){let o=sr(r,t);for(let[a,u]of Object.entries(o)){let s=Jd(u);s!==null&&r instanceof HTMLElement&&r.style.setProperty(`--${a}`,Kd(s))}}}function ar(e){let t=new Map;Qd(e,t);for(let n of Array.from(e.querySelectorAll("[data-var-src]"))){let i=n.getAttribute("data-var-src")?.trim();if(!i)continue;if(!Ta.has(n.tagName.toLowerCase())){console.warn(`[hyperframes] Ignoring data-var-src on <${n.tagName.toLowerCase()}>: variable-bound src is only allowed on ${Array.from(Ta).join("/")}.`);continue}let r=qd(sr(n,t)[i]);if(r!==null){if(!$d(r)){console.warn(`[hyperframes] Ignoring data-var-src="${i}": unsafe URL protocol.`);continue}n.setAttribute("src",r)}}for(let n of Array.from(e.querySelectorAll("[data-var-text]"))){let i=n.getAttribute("data-var-text")?.trim();if(!i)continue;let r=sr(n,t)[i];Bn(r)&&Yd(n,String(r))}}var ge=class extends Error{constructor(n,i=null){super(i==null?n:`${n} at line ${i}`);he(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=i}},Zd=[0,0,0],ef=[1,1,1],ur=64;function tf(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];if(i==='"'&&(t=!t),i==="#"&&!t)return e.slice(0,n)}return e}function Qe(e,t){let n=Number(e);if(!Number.isFinite(n))throw new ge(`Invalid number "${e}"`,t);return n}function Ma(e,t,n){if(e.length!==3)throw new ge(`${t} expects three numbers`,n);return[Qe(e[0],n),Qe(e[1],n),Qe(e[2],n)]}function Na(e,t,n){if(!e)throw new ge(`${t} expects a size`,n);let i=Number(e);if(!Number.isInteger(i)||i<2)throw new ge(`${t} must be an integer greater than 1`,n);return i}function nf(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new ge("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function rf(e){let t=/^TITLE\s+"([^"]*)"\s*$/i.exec(e);if(t)return t[1]??null;let n=/^TITLE\s+(.+)\s*$/i.exec(e);return n&&(n[1]??"").trim()||null}function of(e){return/^[+-]?(?:\d|\.\d)/.test(e)}function La(e,t={}){let n=t.maxSize??ur,i=null,r=Zd,o=ef,a=null,u=null,s=[],l=e.replace(/^\uFEFF/,"").split(/\r?\n/);for(let m=0;m<l.length;m++){let f=m+1,b=tf(l[m]??"").trim();if(!b)continue;let E=b.split(/\s+/),y=(E[0]??"").toUpperCase(),x=E.slice(1);if(y==="TITLE"){i=rf(b);continue}if(y==="DOMAIN_MIN"){r=Ma(x,y,f);continue}if(y==="DOMAIN_MAX"){o=Ma(x,y,f);continue}if(y==="LUT_3D_INPUT_RANGE"){if(x.length!==2)throw new ge(`${y} expects two numbers`,f);let A=Qe(x[0],f),_=Qe(x[1],f);if(_<=A)throw new ge("LUT_3D_INPUT_RANGE max must exceed min",f);r=[A,A,A],o=[_,_,_];continue}if(y==="LUT_1D_SIZE"){a=Na(x[0],y,f);continue}if(y==="LUT_3D_SIZE"){if(u=Na(x[0],y,f),u>n)throw new ge(`LUT_3D_SIZE ${u} exceeds max ${n}`,f);continue}if(!of(y)){if(y.startsWith("LUT_"))throw new ge(`Unsupported cube keyword ${y}`,f);continue}if(!u)throw a?new ge("1D cube LUTs are not supported yet",f):new ge("LUT data appears before LUT_3D_SIZE",f);if(E.length!==3)throw new ge("LUT data rows must contain three numbers",f);s.push(Qe(E[0],f),Qe(E[1],f),Qe(E[2],f))}if(a&&u)throw new ge("Mixed 1D and 3D cube LUTs are not supported yet");if(!u)throw a?new ge("1D cube LUTs are not supported yet"):new ge("Missing LUT_3D_SIZE");nf(r,o);let c=u*u*u;if(s.length!==c*3)throw new ge(`Expected ${c} LUT rows for size ${u}, found ${s.length/3}`);return{title:i,size:u,domainMin:r,domainMax:o,data:new Float32Array(s)}}function sf(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function lr(e){return Math.round(sf(e)*255)}function Ra(e){let t=e.size,n=t*t,i=t,r=new Uint8Array(n*i*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let u=0;u<t;u++){let s=((o*t+a)*t+u)*3,l=(a*n+o*t+u)*4;r[l]=lr(e.data[s]??0),r[l+1]=lr(e.data[s+1]??0),r[l+2]=lr(e.data[s+2]??0),r[l+3]=255}return{width:n,height:i,data:r}}var ze=new Map,af="data-hf-color-grading-canvas",lf="__hf_color_grading_canvas__";function Ha(){if(typeof MutationObserver>"u"||typeof document>"u")return;let e=document.documentElement;if(!e)return;let t=i=>{i instanceof HTMLElement&&(i.hasAttribute(bn)||i.setAttribute(bn,i.style.opacity))},n=i=>{if(i instanceof Element){i.hasAttribute(Ue)&&t(i);for(let r of i.querySelectorAll(`[${Ue}]`))t(r)}};n(e),new MutationObserver(i=>{for(let r of i){for(let o of r.addedNodes)n(o);r.type==="attributes"&&r.target instanceof Element&&r.target.hasAttribute(Ue)&&t(r.target)}}).observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ue]})}var uf=16,nn={enabled:!1,position:.5,softness:0,lineWidth:2};function cr(e){let t=e.getAttribute(Ue);return t==null?null:Eo(t,On(e))}var cf=["attribute vec2 a_pos;","varying vec2 v_uv;","void main(){"," v_uv = a_pos * 0.5 + 0.5;"," gl_Position = vec4(a_pos, 0.0, 1.0);","}"].join(`
|
|
349
|
-
`),
|
|
350
|
-
`),
|
|
351
|
-
`);function ut(e){return e instanceof HTMLVideoElement||e instanceof HTMLImageElement}function ka(e,t,n){let i=e.createShader(n);return i?(e.shaderSource(i,t),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(N("runtime.colorGrading.compileShader",e.getShaderInfoLog(i)),e.deleteShader(i),null)):null}function Ga(e,t=df){let n=ka(e,cf,e.VERTEX_SHADER),i=ka(e,t,e.FRAGMENT_SHADER);if(!n||!i)return n&&e.deleteShader(n),i&&e.deleteShader(i),null;let r=e.createProgram();return r?(e.attachShader(r,n),e.attachShader(r,i),e.linkProgram(r),e.deleteShader(n),e.deleteShader(i),e.getProgramParameter(r,e.LINK_STATUS)?r:(N("runtime.colorGrading.linkProgram",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function fr(e,t=e.LINEAR){let n=e.createTexture();return n?(e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null),n):null}function mf(e,t){let n=Ga(e,ff);return n?{program:n,quad:t,position:e.getAttribLocation(n,"a_pos"),source:e.getUniformLocation(n,"u_source"),resolution:e.getUniformLocation(n,"u_resolution"),direction:e.getUniformLocation(n,"u_direction"),radius:e.getUniformLocation(n,"u_radius")}:null}function Da(e){let t=fr(e),n=e.createFramebuffer();if(!t||!n)return t&&e.deleteTexture(t),n&&e.deleteFramebuffer(n),null;e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),i!==e.FRAMEBUFFER_COMPLETE?(e.deleteTexture(t),e.deleteFramebuffer(n),null):{texture:t,framebuffer:n,width:1,height:1}}function Ia(e,t,n,i){t.width===n&&t.height===i||(t.width=n,t.height=i,e.bindTexture(e.TEXTURE_2D,t.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n,i,0,e.RGBA,e.UNSIGNED_BYTE,null))}function Wa(e){let t=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0});if(!t)return null;let n=Ga(t),i=fr(t),r=fr(t,t.NEAREST);if(!n||!i||!r)return n&&t.deleteProgram(n),i&&t.deleteTexture(i),r&&t.deleteTexture(r),null;let o=t.createBuffer();return o?(t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),t.STATIC_DRAW),{gl:t,program:{program:n,texture:i,lutTexture:r,quad:o,position:t.getAttribLocation(n,"a_pos"),source:t.getUniformLocation(n,"u_source"),blurSource:t.getUniformLocation(n,"u_blurSource"),lut:t.getUniformLocation(n,"u_lut"),resolution:t.getUniformLocation(n,"u_resolution"),uvScale:t.getUniformLocation(n,"u_uvScale"),uvOffset:t.getUniformLocation(n,"u_uvOffset"),blurReady:t.getUniformLocation(n,"u_blurReady"),lutEnabled:t.getUniformLocation(n,"u_lutEnabled"),lutSize:t.getUniformLocation(n,"u_lutSize"),lutTextureSize:t.getUniformLocation(n,"u_lutTextureSize"),lutDomainMin:t.getUniformLocation(n,"u_lutDomainMin"),lutDomainMax:t.getUniformLocation(n,"u_lutDomainMax"),lutIntensity:t.getUniformLocation(n,"u_lutIntensity"),exposure:t.getUniformLocation(n,"u_exposure"),contrast:t.getUniformLocation(n,"u_contrast"),highlights:t.getUniformLocation(n,"u_highlights"),shadows:t.getUniformLocation(n,"u_shadows"),whites:t.getUniformLocation(n,"u_whites"),blacks:t.getUniformLocation(n,"u_blacks"),temperature:t.getUniformLocation(n,"u_temperature"),tint:t.getUniformLocation(n,"u_tint"),vibrance:t.getUniformLocation(n,"u_vibrance"),saturation:t.getUniformLocation(n,"u_saturation"),vignette:t.getUniformLocation(n,"u_vignette"),vignetteMidpoint:t.getUniformLocation(n,"u_vignetteMidpoint"),vignetteRoundness:t.getUniformLocation(n,"u_vignetteRoundness"),vignetteFeather:t.getUniformLocation(n,"u_vignetteFeather"),grain:t.getUniformLocation(n,"u_grain"),grainSize:t.getUniformLocation(n,"u_grainSize"),grainRoughness:t.getUniformLocation(n,"u_grainRoughness"),grainSeed:t.getUniformLocation(n,"u_grainSeed"),blur:t.getUniformLocation(n,"u_blur"),pixelate:t.getUniformLocation(n,"u_pixelate"),intensity:t.getUniformLocation(n,"u_intensity"),compareEnabled:t.getUniformLocation(n,"u_compareEnabled"),comparePosition:t.getUniformLocation(n,"u_comparePosition"),compareSoftness:t.getUniformLocation(n,"u_compareSoftness"),compareLineWidth:t.getUniformLocation(n,"u_compareLineWidth")}}):(t.deleteProgram(n),t.deleteTexture(i),t.deleteTexture(r),null)}function pf(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function hf(e){if(!pf(e))return{...nn};let t=(n,i,r,o)=>{let a=typeof n=="number"?n:Number(n);return Math.min(o,Math.max(r,Number.isFinite(a)?a:i))};return{enabled:e.enabled===!0,position:t(e.position,nn.position,0,1),softness:t(e.softness,nn.softness,0,.25),lineWidth:t(e.lineWidth,nn.lineWidth,0,12)}}function Ua(e){try{let t=new URL(e,document.baseURI);return t.protocol==="data:"?{href:t.href}:t.protocol!=="http:"&&t.protocol!=="https:"?{error:"LUT must be project-local or a data URL"}:t.origin!==window.location.origin?{error:"Remote LUT URLs are not supported"}:{href:t.href}}catch{return{error:"Invalid LUT URL"}}}function pr(e){return e instanceof Error?e.message:"LUT failed to load"}function gf(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0)%1e4}function xf(e){let t=e.id||e.currentSrc||e.getAttribute("src")||`${e.tagName}:${Array.prototype.indexOf.call(e.parentNode?.children??[],e)}`;return gf(t)}function bf(e){let t=Ua(e);if("error"in t)return{state:"error",message:t.error};let n=ze.get(t.href);if(n)return n;let i=fetch(t.href,{credentials:"same-origin"}).then(o=>{if(!o.ok)throw new Error(`Failed to load LUT (${o.status})`);return o.text()}).then(o=>La(o,{maxSize:ur})),r={state:"pending",promise:i};for(;ze.size>=uf;){let o=ze.keys().next().value;if(!o)break;ze.delete(o)}return ze.set(t.href,r),i.then(o=>{ze.get(t.href)===r&&ze.set(t.href,{state:"ready",lut:o})},o=>{ze.get(t.href)===r&&ze.set(t.href,{state:"error",message:pr(o)})}),r}function Pa(e,t,n){if(e.lut?.src===t)return e.lut;let i=Ra(n),{gl:r,program:o}=e;try{return r.activeTexture(r.TEXTURE2),r.bindTexture(r.TEXTURE_2D,o.lutTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,i.width,i.height,0,r.RGBA,r.UNSIGNED_BYTE,i.data),e.lut={src:t,size:n.size,domainMin:n.domainMin,domainMax:n.domainMax,textureWidth:i.width,textureHeight:i.height},e.lutError=null,e.lutLoadingSrc=null,e.lut}catch(a){return e.lut=null,e.lutError=pr(a),e.lutLoadingSrc=null,N("runtime.colorGrading.uploadLut",a),null}}function Hn(e,t){e.deleteTexture(t.texture),e.deleteFramebuffer(t.framebuffer)}function Va(e){let t=e.effectTargets;t&&(e.gl.deleteProgram(t.blurProgram.program),Hn(e.gl,t.scratch),Hn(e.gl,t.blur),e.effectTargets=null)}function za(e){Va(e),e.gl.deleteTexture(e.program.texture),e.gl.deleteTexture(e.program.lutTexture),e.gl.deleteBuffer(e.program.quad),e.gl.deleteProgram(e.program.program)}function yf(e){let t=Wa(e.canvas);return t?(za(e),e.gl=t.gl,e.program=t.program,e.lut=null,e.lutLoadingSrc=null,e.lutError=null,e.effectError=null,!0):!1}function mr(e){if(!e.sourceHidden)return;e.element.removeAttribute(Rt);let t=e.element.style.getPropertyValue("opacity"),n=e.element.style.getPropertyPriority("opacity");t==="0"&&n==="important"&&(e.sourceInlineOpacity===null?e.element.style.removeProperty("opacity"):e.element.style.setProperty("opacity",e.sourceInlineOpacity,e.sourceInlineOpacityPriority)),e.sourceHidden=!1}function Sf(e){if(e.effectTargets)return e.effectTargets;let{gl:t}=e,n=mf(t,e.program.quad),i=Da(t),r=Da(t);return!n||!i||!r?(n&&t.deleteProgram(n.program),i&&Hn(t,i),r&&Hn(t,r),e.effectError="Framebuffer effects unavailable",null):(e.effectError=null,e.effectTargets={blurProgram:n,scratch:i,blur:r},e.effectTargets)}function Ef(e,t,n,i,r){let o=Math.max(1,Math.ceil(i)),a=Math.max(1,Math.ceil(r));return Ia(e,t,o,a),Ia(e,n,o,a),{width:o,height:a}}function Oa(e,t,n,i,r,o,a){e.bindFramebuffer(e.FRAMEBUFFER,i.framebuffer),e.viewport(0,0,r.width,r.height),e.useProgram(t.program),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,n),e.uniform1i(t.source,0),e.uniform2f(t.resolution,r.width,r.height),e.uniform2f(t.direction,o.x,o.y),e.uniform1f(t.radius,a),e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.enableVertexAttribArray(t.position),e.vertexAttribPointer(t.position,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_STRIP,0,4)}function Af(e,t,n,i,r,o,a){let u=n;for(let s=0;s<Math.max(1,Math.floor(a));s++)Oa(e,t.blurProgram,u,t.scratch,r,{x:1,y:0},o),Oa(e,t.blurProgram,t.scratch.texture,i,r,{x:0,y:1},o),u=i.texture}function wf(e){let t=e.grading.lut?.src.trim()??"",n=e.grading.lut?.intensity??1;if(!t||n<=0)return e.lut=null,e.lutLoadingSrc=null,e.lutError=null,null;let i=Ua(t);if("error"in i)return e.lut=null,e.lutLoadingSrc=null,e.lutError=i.error,null;if(e.lut?.src===i.href)return e.lut;e.lut=null;let r=bf(t);return r.state==="ready"?Pa(e,i.href,r.lut):r.state==="error"?(e.lutError=r.message,e.lutLoadingSrc=null,null):(e.lutLoadingSrc!==i.href&&(e.lutLoadingSrc=i.href,e.lutError=null,r.promise.then(o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(Pa(e,i.href,o),De(e))},o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(e.lut=null,e.lutError=pr(o),e.lutLoadingSrc=null,De(e))})),null)}function dr(e){if(!e)return null;if(typeof e=="string"){let t=e.trim();if(!t)return null;let n=document.getElementById(t.replace(/^#/,""));if(n&&ut(n))return n;try{let i=document.querySelector(t);return i&&ut(i)?i:null}catch{return null}}if(e.hfId){let t=document.querySelector(`[data-hf-id="${CSS.escape(e.hfId)}"]`);if(t&&ut(t))return t}if(e.id){let t=document.getElementById(e.id);if(t&&ut(t))return t}if(!e.selector)return null;try{let t=Array.from(document.querySelectorAll(e.selector)),n=Math.max(0,Math.floor(Number(e.selectorIndex??0)||0)),i=t[n]??null;return i&&ut(i)?i:null}catch{return null}}function Cf(e){return e instanceof HTMLVideoElement?e.videoWidth>0&&e.videoHeight>0?{width:e.videoWidth,height:e.videoHeight}:null:e instanceof HTMLImageElement&&e.naturalWidth>0&&e.naturalHeight>0?{width:e.naturalWidth,height:e.naturalHeight}:null}function ja(e){return e instanceof HTMLVideoElement?e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&e.videoWidth>0&&e.videoHeight>0:e instanceof HTMLImageElement?e.complete&&e.naturalWidth>0&&e.naturalHeight>0:!1}function Ff(e){if(!e.id)return null;let t=document.getElementById(`__render_frame_${e.id}__`);return t instanceof HTMLImageElement&&ja(t)?t:null}function _f(e){return e instanceof HTMLImageElement&&e.classList.contains("__render_frame__")}function vf(e,t){t.parentNode&&t.nextSibling!==e.canvas&&t.parentNode.insertBefore(e.canvas,t.nextSibling)}function Tf(e){if(e instanceof HTMLVideoElement){let t=Ff(e);if(t)return t}return ja(e)?e:null}function Ba(e,t){let n=e.toLowerCase();if(n==="center")return .5;if(t==="x"){if(n==="left")return 0;if(n==="right")return 1}else{if(n==="top")return 0;if(n==="bottom")return 1}if(n.endsWith("%")){let i=Number.parseFloat(n);return Number.isFinite(i)?i/100:null}return null}function Mf(e){let t=e.trim().split(/\s+/).filter(Boolean),n=.5,i=.5;for(let r=0;r<t.length;r++){let o=t[r]??"",a=Ba(o,"x"),u=Ba(o,"y");if(a!==null&&(o==="left"||o==="right"||o.endsWith("%")&&r===0)){n=a;continue}if(u!==null&&(o==="top"||o==="bottom"||o.endsWith("%")&&r>0)){i=u;continue}}return{x:n,y:i}}function Nf(e,t,n,i,r,o){if(e<=0||t<=0||n<=0||i<=0)return{scaleX:1,scaleY:1,offsetX:0,offsetY:0};let a=r||"fill",u=e,s=t;if(a==="contain"||a==="cover"||a==="scale-down"){let f=a==="cover"?Math.max(e/n,t/i):Math.min(e/n,t/i);u=n*f,s=i*f,a==="scale-down"&&u>n&&s>i&&(u=n,s=i)}else a==="none"&&(u=n,s=i);let l=Mf(o||"center"),c=(e-u)*l.x/e,m=(t-s)*l.y/t;return{scaleX:u/e,scaleY:s/t,offsetX:c,offsetY:m}}function Lf(e,t){window.getComputedStyle(t).position==="static"&&(e.touchedParent||(e.touchedParent=t,e.parentInlinePosition=t.style.position||null),t.style.position="relative")}function Rf(e,t){let{element:n,canvas:i}=e,r=n.parentElement;r&&Lf(e,r);let o=window.getComputedStyle(t);wo(i.style,o),i.style.pointerEvents="none",i.style.position="absolute",i.style.inset="auto",i.style.left=`${n.offsetLeft}px`,i.style.top=`${n.offsetTop}px`,i.style.right="auto",i.style.bottom="auto",i.style.width=`${n.offsetWidth}px`,i.style.height=`${n.offsetHeight}px`,i.style.display="block",i.style.opacity=e.sourceOpacityForCanvas,i.style.visibility=e.sourceVisibleForCanvas?"visible":"hidden";let a=n.getBoundingClientRect(),u=Math.max(0,Math.round(n.offsetWidth||a.width)),s=Math.max(0,Math.round(n.offsetHeight||a.height));return u<=0||s<=0?(i.style.display="none",null):(i.width!==u&&(i.width=u),i.height!==s&&(i.height=s),{width:u,height:s})}function kf(e,t,n,i,r,o,a,u,s){e.uniform1i(t.source,0),e.uniform1i(t.blurSource,1),e.uniform1i(t.lut,2),e.uniform2f(t.resolution,a.width,a.height),e.uniform2f(t.uvScale,u.scaleX,u.scaleY),e.uniform2f(t.uvOffset,u.offsetX,u.offsetY),e.uniform1f(t.blurReady,r?1:0),e.uniform1f(t.lutEnabled,i?1:0),e.uniform1f(t.lutSize,i?.size??2),e.uniform2f(t.lutTextureSize,i?.textureWidth??1,i?.textureHeight??1),e.uniform3f(t.lutDomainMin,i?.domainMin[0]??0,i?.domainMin[1]??0,i?.domainMin[2]??0),e.uniform3f(t.lutDomainMax,i?.domainMax[0]??1,i?.domainMax[1]??1,i?.domainMax[2]??1),e.uniform1f(t.lutIntensity,n.lut?.intensity??0),e.uniform1f(t.exposure,n.adjust.exposure),e.uniform1f(t.contrast,n.adjust.contrast),e.uniform1f(t.highlights,n.adjust.highlights),e.uniform1f(t.shadows,n.adjust.shadows),e.uniform1f(t.whites,n.adjust.whites),e.uniform1f(t.blacks,n.adjust.blacks),e.uniform1f(t.temperature,n.adjust.temperature),e.uniform1f(t.tint,n.adjust.tint),e.uniform1f(t.vibrance,n.adjust.vibrance),e.uniform1f(t.saturation,n.adjust.saturation),e.uniform1f(t.vignette,n.details.vignette),e.uniform1f(t.vignetteMidpoint,n.details.vignetteMidpoint),e.uniform1f(t.vignetteRoundness,n.details.vignetteRoundness),e.uniform1f(t.vignetteFeather,n.details.vignetteFeather),e.uniform1f(t.grain,n.details.grain),e.uniform1f(t.grainSize,n.details.grainSize),e.uniform1f(t.grainRoughness,n.details.grainRoughness),e.uniform1f(t.grainSeed,s),e.uniform1f(t.blur,n.effects.blur),e.uniform1f(t.pixelate,n.effects.pixelate),e.uniform1f(t.intensity,n.intensity),e.uniform1f(t.compareEnabled,o.enabled?1:0),e.uniform1f(t.comparePosition,o.position),e.uniform1f(t.compareSoftness,o.softness),e.uniform1f(t.compareLineWidth,o.lineWidth)}function Df(e){if(!e.sourceHidden){let t=e.element.getAttribute(bn);t!==null?(e.sourceInlineOpacity=t===""?null:t,e.sourceInlineOpacityPriority=""):(e.sourceInlineOpacity=e.element.style.getPropertyValue("opacity")||null,e.sourceInlineOpacityPriority=e.element.style.getPropertyPriority("opacity"))}e.element.setAttribute(Rt,"true"),e.element.style.setProperty("opacity","0","important"),e.sourceHidden=!0}function De(e){if(e.destroyed||e.contextLost)return!1;let t=Tf(e.element);if(!t)return e.hasDrawn||(e.canvas.style.display="none"),!1;let n=Cf(t);if(!n)return!1;let i=t instanceof HTMLElement?t:e.element,r=e.element.style.getPropertyValue("opacity"),o=e.element.style.getPropertyPriority("opacity"),a=e.sourceHidden&&r==="0"&&o==="important",u=e.element.style.getPropertyValue("visibility"),s=_f(t);if(s&&vf(e,t),s||!a){let E=window.getComputedStyle(s?t:e.element);e.sourceOpacityForCanvas=E.opacity||"1",e.sourceVisibleForCanvas=(s||u!=="hidden")&&E.visibility!=="hidden"}let l=Rf(e,i);if(!l)return!1;let c=window.getComputedStyle(i),m=Nf(l.width,l.height,n.width,n.height,c.objectFit,c.objectPosition),{gl:f,program:b}=e;try{let E=wf(e);f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,b.texture),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!0),f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,t);let y=!1,x=Math.min(1,Math.max(0,e.grading.effects.blur));if(x>0){let _=Sf(e);if(_){let M=Ef(f,_.scratch,_.blur,l.width,l.height);Af(f,_,b.texture,_.blur,M,.75+Math.pow(x,1.35)*32,x>.55?3:2),y=!0}}else e.effectError=null,e.effectTargets&&Va(e);f.bindFramebuffer(f.FRAMEBUFFER,null),f.viewport(0,0,l.width,l.height),f.useProgram(b.program),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,b.texture),f.activeTexture(f.TEXTURE1),f.bindTexture(f.TEXTURE_2D,e.effectTargets?.blur.texture??b.texture),f.activeTexture(f.TEXTURE2),f.bindTexture(f.TEXTURE_2D,b.lutTexture);let A=e.grainSeed+(e.element instanceof HTMLVideoElement?Math.floor(e.element.currentTime*60):0);return kf(f,b,e.grading,E,y,e.compare,l,m,A),f.bindBuffer(f.ARRAY_BUFFER,b.quad),f.enableVertexAttribArray(b.position),f.vertexAttribPointer(b.position,2,f.FLOAT,!1,0,0),f.drawArrays(f.TRIANGLE_STRIP,0,4),Df(e),e.hasDrawn=!0,e.drawError=null,!0}catch(E){return e.drawError=E instanceof Error?E.message:"Shader draw failed",N("runtime.colorGrading.drawEntry",E),!1}}function He(e,t,n,i){t.addEventListener(n,i),e.cleanup.push(()=>t.removeEventListener(n,i))}function If(e){e.animationFrame!==null&&(window.cancelAnimationFrame(e.animationFrame),e.animationFrame=null),e.videoFrameHandle!==null&&e.element instanceof HTMLVideoElement&&(e.element.cancelVideoFrameCallback?.(e.videoFrameHandle),e.videoFrameHandle=null)}function rn(e){if(e.destroyed||!(e.element instanceof HTMLVideoElement)||e.videoFrameHandle!==null||e.animationFrame!==null)return;let t=e.element,n=t;if(typeof n.requestVideoFrameCallback=="function"){e.videoFrameHandle=n.requestVideoFrameCallback(()=>{e.videoFrameHandle=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&rn(e)});return}e.animationFrame=window.requestAnimationFrame(()=>{e.animationFrame=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&rn(e)})}function Pf(e){let t=()=>{De(e)};if(He(e,e.element,"load",t),He(e,e.element,"loadedmetadata",t),He(e,e.element,"loadeddata",t),He(e,e.element,"seeked",t),He(e,e.element,"timeupdate",t),He(e,window,"resize",t),e.element instanceof HTMLVideoElement&&(He(e,e.element,"play",()=>rn(e)),He(e,e.element,"pause",t)),He(e,e.canvas,"webglcontextlost",n=>{n.preventDefault(),e.contextLost=!0,e.drawError="WebGL context lost",e.canvas.style.display="none",mr(e)}),He(e,e.canvas,"webglcontextrestored",()=>{if(e.contextLost=!1,!yf(e)){e.contextLost=!0,e.drawError="WebGL context restore failed",mr(e);return}e.drawError=null,De(e)}),typeof ResizeObserver<"u"&&(e.resizeObserver=new ResizeObserver(t),e.resizeObserver.observe(e.element)),typeof MutationObserver<"u"){let n=()=>{let a=e.element.style;return`${a.transform}|${a.translate}|${a.rotate}|${a.scale}|${a.left}|${a.top}|${a.width}|${a.height}`},i=n(),r=!1,o=new MutationObserver(()=>{r||n()!==i&&(r=!0,requestAnimationFrame(()=>{r=!1,i=n(),De(e)}))});o.observe(e.element,{attributes:!0,attributeFilter:["style"]}),e.cleanup.push(()=>o.disconnect())}}function Of(e){if(!e.destroyed){e.destroyed=!0,If(e),e.resizeObserver?.disconnect();for(let t of e.cleanup)t();e.cleanup.length=0,e.canvas.remove(),za(e),mr(e),e.touchedParent&&(e.parentInlinePosition===null?e.touchedParent.style.removeProperty("position"):e.touchedParent.style.position=e.parentInlinePosition)}}function Bf(e){let t=document.createElement("canvas");return e.id&&(t.id=`${xo}${e.id}`),t.className=lf,t.setAttribute(af,"true"),t.setAttribute("data-hyperframes-ignore",""),t.setAttribute("data-hyperframes-picker-ignore",""),t.setAttribute("data-hf-ignore",""),t.setAttribute("aria-hidden","true"),t.style.pointerEvents="none",t.style.display="none",e.parentNode?.insertBefore(t,e.nextSibling),t}function qa(){let e=new WeakMap,t=new Set,n=null,i=!1,r=(y,x,A)=>{let _=e.get(y);if(_)return _.grading=x,_.source=A,De(_),y instanceof HTMLVideoElement&&!y.paused&&rn(_),!0;let M=Bf(y),$=Wa(M);if(!$)return M.remove(),!1;let P={element:y,canvas:M,gl:$.gl,program:$.program,grading:x,compare:{...nn},lut:null,lutLoadingSrc:null,lutError:null,drawError:null,effectTargets:null,effectError:null,source:A,animationFrame:null,videoFrameHandle:null,resizeObserver:null,cleanup:[],touchedParent:null,parentInlinePosition:null,sourceHidden:!1,sourceInlineOpacity:null,sourceInlineOpacityPriority:"",sourceOpacityForCanvas:window.getComputedStyle(y).opacity||"1",sourceVisibleForCanvas:window.getComputedStyle(y).visibility!=="hidden",hasDrawn:!1,contextLost:!1,grainSeed:xf(y),destroyed:!1};return e.set(y,P),t.add(y),Pf(P),De(P),y instanceof HTMLVideoElement&&!y.paused&&rn(P),!0},o=(y,x)=>{if(i)return!1;let A=dr(y);if(!A)return!1;let _=e.get(A);if(!_){let M=cr(A);if(!kt(M)||!r(A,M,"attribute"))return!1;_=e.get(A)}return _?(_.compare=hf(x),De(_),!0):!1},a=y=>{let x=e.get(y);x&&(Of(x),e.delete(y),t.delete(y))},u=()=>{if(i)return 0;let y=new Set;document.querySelectorAll(`video[${Ue}], img[${Ue}]`).forEach(A=>{if(!ut(A))return;y.add(A);let _=cr(A);kt(_)?r(A,_,"attribute"):a(A)});for(let A of Array.from(t)){let _=e.get(A);_&&(!A.isConnected||_.source==="attribute"&&!y.has(A))&&a(A)}return t.size},s=()=>{if(i)return 0;let y=0;for(let x of Array.from(t,A=>e.get(A)))x&&De(x)&&(y+=1);return y},l=(y,x)=>{if(i)return!1;let A=dr(y);if(!A)return!1;let _=bi(x);return kt(_)?r(A,_,"live"):(a(A),!0)},c=(y,x)=>{if(!ut(y))return!1;let A=e.get(y);return A?(A.sourceVisibleForCanvas=x,!0):!1},m=y=>{let x=dr(y);if(!x)return{state:"missing",message:"Media not found"};let A=e.get(x);if(A)return A.effectError?{state:"unavailable",message:A.effectError}:A.drawError?{state:"unavailable",message:A.drawError}:A.lutError?{state:"unavailable",message:`LUT error: ${A.lutError}`}:A.grading.lut&&A.lutLoadingSrc?{state:"pending",message:"Loading LUT"}:A.canvas.style.display==="none"?{state:"pending",message:"Waiting for media frame"}:{state:"active",message:A.lut?"Shader + LUT active":"Shader active"};let _=cr(x);return kt(_)?{state:"unavailable",message:"WebGL unavailable"}:{state:"inactive",message:"No grading applied"}},f=()=>{if(!i){i=!0,n?.disconnect(),n=null;for(let y of Array.from(t))a(y)}};document.body&&(n=new MutationObserver(()=>u()),n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ue]}));let b={refresh:u,redraw:s,setGrading:l,setCompare:o,setSourceVisibility:c,getStatus:m,destroy:f},E=window;return E.__hf=E.__hf||{},E.__hf.colorGrading=b,u(),b}var Gn=class{constructor(t){he(this,"_baseTime",0);he(this,"_playStartMs",null);he(this,"_rate",1);he(this,"_duration",1/0);he(this,"_nowMs");he(this,"_audioSource",null);this._baseTime=t?.initialTime??0,this._rate=t?.rate??1,this._duration=t?.duration??1/0,this._nowMs=t?.nowMs??(()=>performance.now())}now(){if(this._playStartMs===null)return this._baseTime;if(this._audioSource){let i=null;if("currentTimeSeconds"in this._audioSource)i=this._audioSource.currentTimeSeconds;else{let{el:r,compositionStart:o,mediaStart:a}=this._audioSource;!r.paused&&Number.isFinite(r.currentTime)&&(i=(r.currentTime-a)/(r.playbackRate>0?r.playbackRate:1)*this._rate+o)}if(i!==null)return Number.isFinite(this._duration)&&i>=this._duration?this._duration:Math.max(0,i)}let t=(this._nowMs()-this._playStartMs)/1e3,n=this._baseTime+t*this._rate;return Number.isFinite(this._duration)&&n>=this._duration?this._duration:Math.max(0,n)}play(){return this._playStartMs!==null||Number.isFinite(this._duration)&&this._baseTime>=this._duration?!1:(this._playStartMs=this._nowMs(),!0)}pause(){return this._playStartMs===null?!1:(this._baseTime=this.now(),this._playStartMs=null,!0)}seek(t){let n=Number.isFinite(this._duration)?Math.max(0,Math.min(t,this._duration)):Math.max(0,t);this._baseTime=n,this._playStartMs!==null&&(this._playStartMs=this._nowMs())}isPlaying(){return this._playStartMs!==null}setRate(t){let n=Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1;this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._rate=n}getRate(){return this._rate}setDuration(t){this._duration=Number.isFinite(t)&&t>0?t:1/0,this._baseTime>this._duration&&(this._baseTime=this._duration)}getDuration(){return this._duration}attachAudioSource(t){this._audioSource=t}detachAudioSource(){this._audioSource&&this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._audioSource=null}hasAudioSource(){return this._audioSource!==null}getSource(){if(this._audioSource&&this._playStartMs!==null){if("currentTimeSeconds"in this._audioSource)return"audio";let{el:t}=this._audioSource;if(!t.paused&&Number.isFinite(t.currentTime))return"audio"}return"monotonic"}snapshot(){return{time:this.now(),playing:this.isPlaying(),rate:this._rate,duration:this._duration,source:this.getSource()}}reachedEnd(){return Number.isFinite(this._duration)&&this.now()>=this._duration}};function $a(e){return!Number.isFinite(e)||e<=0?1:e}function Hf(e,t){t||e.paused||!fn().__hfDebug||console.debug("[hyperframes] webAudioTransport claimed fallback-playing element:",e.currentSrc||e.getAttribute("src")||"")}function Gf(e,t){let{elapsed:n,mediaStart:i,scheduledAt:r,safeRate:o,clipDuration:a}=t,u=Number.isFinite(a)&&a>0,s=a*o;if(n>=0){let c=s-n;return u&&c<=0?!1:(u?e.start(0,n+i,c):e.start(0,n+i),!0)}let l=-n/o;return u?e.start(r+l,i,s):e.start(r+l,i),!0}var Wn=class{constructor(){he(this,"_ctx",null);he(this,"_bufferCache",new Map);he(this,"_failedSrcs",new Set);he(this,"_activeSources",[]);he(this,"_masterGain",null);he(this,"_rateAnchorCtx",0);he(this,"_rateAnchorComp",0);he(this,"_rate",1);he(this,"_paused",!0);he(this,"_playGeneration",0)}async init(){try{return this._ctx=new AudioContext,this._masterGain=this._ctx.createGain(),this._masterGain.connect(this._ctx.destination),!0}catch{return!1}}get context(){return this._ctx}getTime(){return!this._ctx||this._paused?-1:this._rateAnchorComp+(this._ctx.currentTime-this._rateAnchorCtx)*this._rate}async decodeAudioElement(t){let n=t.currentSrc||t.getAttribute("src");if(!n)return null;if(this._bufferCache.has(n))return this._bufferCache.get(n);if(this._failedSrcs.has(n)||!this._ctx)return null;let i;try{let r=await fetch(n,{cache:"no-store"});if(!r.ok)return N("webAudioTransport.fetch",new Error(`${r.status} ${n}`)),null;i=await r.arrayBuffer()}catch(r){return N("webAudioTransport.fetch",r),null}try{let r=await this._ctx.decodeAudioData(i);return this._bufferCache.set(n,r),r}catch(r){return this._failedSrcs.add(n),N("webAudioTransport.decode",r),null}}startGeneration(){return this._playGeneration+=1,this._playGeneration}currentGeneration(){return this._playGeneration}async schedulePlayback(t,n,i,r,o,a,u,s=1,l=Number.POSITIVE_INFINITY){if(!this._ctx||!this._masterGain||u!==this._playGeneration)return null;try{if(this._ctx.state==="suspended"&&await this._ctx.resume(),u!==this._playGeneration)return null;let c=$a(s),m=this._ctx.createBufferSource();m.buffer=n,m.playbackRate.value=c;let f=this._ctx.createGain();f.gain.value=a,m.connect(f),f.connect(this._masterGain);let b=o-i,E=this._ctx.currentTime;if(this._rate=c,this._rateAnchorCtx=E,this._rateAnchorComp=o,!Gf(m,{elapsed:b,mediaStart:r,scheduledAt:E,safeRate:c,clipDuration:l}))return m.disconnect(),f.disconnect(),null;let y=t.muted;t.muted=!0,Hf(t,y);let x={el:t,sourceNode:m,gainNode:f,compositionStart:i,mediaStart:r,scheduledAt:E,priorMuted:y,bounded:Number.isFinite(l)&&l>0};return this._activeSources.push(x),this._paused=!1,m.addEventListener("ended",()=>{let A=this._activeSources.indexOf(x);A!==-1&&(this._activeSources.splice(A,1),t.muted=y,this._activeSources.length===0&&(this._paused=!0))}),x}catch(c){return N("webAudioTransport.schedule",c),null}}setRate(t){let n=$a(t);if(n===this._rate)return!1;this._ctx&&!this._paused&&(this._rateAnchorComp=this.getTime(),this._rateAnchorCtx=this._ctx.currentTime),this._rate=n;for(let i of this._activeSources)try{i.sourceNode.playbackRate.value=n}catch(r){N("webAudioTransport.setRate",r)}return!0}hasBoundedActiveSources(){return this._activeSources.some(t=>t.bounded)}stopAll(){for(let t of this._activeSources){try{t.sourceNode.stop(),t.sourceNode.disconnect(),t.gainNode.disconnect()}catch{}t.el.muted=t.priorMuted}this._activeSources=[],this._paused=!0}setVolume(t){this._masterGain&&(this._masterGain.gain.value=Math.max(0,Math.min(1,t)))}setElementVolume(t,n){let i=Math.max(0,Math.min(1,n));for(let r of this._activeSources)if(r.el===t)try{r.gainNode.gain.value=i}catch(o){N("webAudioTransport.setElementVolume",o)}}setMuted(t){this._masterGain&&(this._masterGain.gain.value=t?0:1)}isActive(){return this._activeSources.length>0&&!this._paused}ownsElement(t){return!this._paused&&this._activeSources.some(n=>n.el===t)}destroy(){if(this.stopAll(),this._bufferCache.clear(),this._failedSrcs.clear(),this._ctx)try{this._ctx.close()}catch{}this._ctx=null,this._masterGain=null}};var Ka="data-hf-studio-manual-edit-gesture";function Ja(e){return!Number.isInteger(e.tick)||e.tick<=0||e.tick%60!==0?!1:!(e.isPlaying&&e.hasCapturedTimeline&&e.currentTimeSeconds<2)}var hr="data-hf-authored-duration",gr="data-hf-authored-end";function Wf(){let e=window.__HF_EXPORT_RENDER_SEEK_CONFIG,t=e?.fps,n=e?.fpsSource,i=Number(t);return!e||t==null?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"missing"}:!Number.isFinite(i)||i<=0?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"invalid"}:{fps:i,source:n==="render-options"||n==="default"?n:"unknown",rawFpsSource:n,rawFps:t,fallbackReason:e.fpsFallbackReason}}function Ya(){let e=_o();Pn(document),ar(document);let t=Wf();e.canonicalFps=t.fps??e.canonicalFps,Wr(e.canonicalFps),window.__HF_EXPORT_RENDER_SEEK_CONFIG&&console.info("[hyperframes] render runtime fps",{canonicalFps:e.canonicalFps,source:t.source,rawFpsSource:t.rawFpsSource,rawFps:t.rawFps,fallbackReason:t.fallbackReason});let n=null,i=null,r=null,o=[],a=new Set,u=null;if(typeof window.__hfRuntimeTeardown=="function")try{window.__hfRuntimeTeardown()}catch(d){N("runtime.init.site1",d)}let s=new Gn;e.transportClock=s;let l=new Wn,c=!1;l.init().then(d=>{c=d}),(()=>{let d=window.gsap,p=window;if(!(!d?.registerPlugin||p.__hfAutoNoopRegistered))try{d.registerPlugin({name:"_auto",init:()=>!1}),p.__hfAutoNoopRegistered=!0}catch{}})(),document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden");try{$r(document)}catch(d){N("runtime.init.cssVariables",d)}window.__timelines=window.__timelines||{};let f=()=>{let d=document.querySelector('[data-composition-id][data-root="true"]');if(d instanceof HTMLElement)return d;let p=Array.from(document.querySelectorAll("[data-composition-id]"));return p.find(g=>!g.parentElement?.closest("[data-composition-id]"))??p[0]??null};if(Array.isArray(window.__timelines)){let d=window.__timelines,p=f()?.getAttribute("data-composition-id")??"root",g={};if(d.length===1)g[p]=d[0];else for(let h=0;h<d.length;h++)g[`tl-${h}`]=d[h];window.__timelines=g}let b=f();b&&!b.hasAttribute("data-start")&&b.setAttribute("data-start","0");let E=d=>{o.push(d)},y=(d,p,g)=>{let h=g??`${d}:${JSON.stringify(p)}`;a.has(h)||(a.add(h),xe({source:"hf-preview",type:"diagnostic",code:d,details:p}))},x=d=>{let p={scale:1,focusX:960,focusY:540},g=[],h=[],S={time:d.getTime(),duration:d.getDuration(),isPlaying:d.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:d.play,pause:d.pause,seek:d.seek,getTime:d.getTime,getDuration:d.getDuration,isPlaying:d.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>p,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>g,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:d.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>h,getRenderState:()=>({...S,time:d.getTime(),duration:d.getDuration(),isPlaying:d.isPlaying()})}},A=1/60,_=.75,M=.05,$=100,P=240,v=d=>{if(d instanceof Error)return d.message||String(d);if(typeof d=="string")return d;try{return JSON.stringify(d)}catch{return String(d??"")}},w=d=>{let p=d.toLowerCase();return p.includes("cannot read properties of null")||p.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:p.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:p.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},C=d=>{if(d==null||d.trim()==="")return null;let p=Number.parseFloat(d);return!Number.isFinite(p)||p<=0?null:`${p}px`},F=()=>f(),T=()=>{let d=F();if(!d)return;let p=C(d.getAttribute("data-width")),g=C(d.getAttribute("data-height"));p&&(d.style.width=p),g&&(d.style.height=g),p&&d.style.setProperty("--comp-width",p),g&&d.style.setProperty("--comp-height",g)},R=()=>{let d=F(),p=Array.from(document.querySelectorAll("[data-composition-id]")).filter(g=>g.hasAttribute("data-duration")||g.hasAttribute("data-end"));for(let g of p){if(d&&g===d)continue;let h=g.getAttribute("data-duration"),S=g.getAttribute("data-end");h!=null&&!g.hasAttribute(hr)&&g.setAttribute(hr,h),S!=null&&!g.hasAttribute(gr)&&g.setAttribute(gr,S),g.removeAttribute("data-duration"),g.removeAttribute("data-end")}},z=()=>{let d=F();if(!d)return;d.style.position||(d.style.position="relative"),d.style.overflow="hidden";let p=C(d.getAttribute("data-width")),g=C(d.getAttribute("data-height"));p&&(d.style.width=p),g&&(d.style.height=g);let h=Array.from(d.children);for(let S of h){let L=S.tagName.toLowerCase();if(L==="script"||L==="style"||L==="link"||L==="meta"||!S.hasAttribute("data-start")||S.hasAttribute("data-hf-autostamped"))continue;let I=(S.style.top==="0px"||S.style.top==="0")&&(S.style.left==="0px"||S.style.left==="0")&&S.style.width==="100%"&&S.style.height==="100%",Q=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(S.style.transform);if(I&&Q&&!S.hasAttribute("data-width")&&!S.hasAttribute("data-height")){let ye=S.style.top,Ft=S.style.left,Se=S.style.width,_t=S.style.height;S.style.top="",S.style.left="",S.style.width="",S.style.height="";let ne=window.getComputedStyle(S);ne.top!=="auto"||ne.bottom!=="auto"||ne.left!=="auto"||ne.right!=="auto"||ne.width!=="0px"||ne.height!=="0px"||(S.style.top=ye,S.style.left=Ft,S.style.width=Se,S.style.height=_t)}let q=window.getComputedStyle(S),de=q.position;if(de!=="absolute"&&de!=="fixed"&&(S.style.position="absolute"),!!S.style.top||!!S.style.bottom||q.top!=="auto"||q.bottom!=="auto"||(S.style.top="0"),!!S.style.left||!!S.style.right||q.left!=="auto"||q.right!=="auto"||(S.style.left="0"),L!=="audio"){let ye=C(S.getAttribute("data-width")),Ft=C(S.getAttribute("data-height")),Se=q.width!=="0px"&&q.width!=="auto",_t=q.height!=="0px"&&q.height!=="auto";ye?!S.style.width&&!Se&&(S.style.width=ye):!S.style.width&&q.width==="0px"&&(S.style.width="100%"),Ft?!S.style.height&&!_t&&(S.style.height=Ft):!S.style.height&&q.height==="0px"&&(S.style.height="100%")}}},U=(d,p=0,g)=>$e({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:g?.includeAuthoredTimingAttrs??!0}).resolveStartForElement(d,p),ie=(d,p)=>$e({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:p?.includeAuthoredTimingAttrs??!0}).resolveDurationForElement(d),D=(d,p=0)=>!d.hasAttribute("data-hf-auto-start")&&d.hasAttribute("data-start")?Math.max(0,Number(d.getAttribute("data-start")??0)||0)+p:U(d,p),re=(d,p)=>{let g=d.tagName.toLowerCase();if(g==="script"||g==="style"||g==="link"||g==="meta")return!1;let h=g==="video"||g==="audio"?D(d,0):U(d,0),S=ie(d),L=d.getAttribute("data-composition-id");if(L){let Q=(window.__timelines??{})[L],q=null;if(Q&&typeof Q.duration=="function"){let me=Number(Q.duration());Number.isFinite(me)&&me>0&&(q=me)}!(d.hasAttribute("data-duration")||d.hasAttribute("data-end")||d.hasAttribute(hr)||d.hasAttribute(gr))&&(S==null||S<=0)&&q!=null&&(S=q)}let I=S!=null&&S>0?h+S:Number.POSITIVE_INFINITY;return p>=h&&(Number.isFinite(I)?p<=I:!0)},Fe=!!document.querySelector("[data-composition-src]"),W=!1;{let d=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let p of d){let g=p.getAttribute("data-composition-id");if(g&&p.children.length===0&&document.querySelector(`template#${CSS.escape(g)}-template`)){W=!0;break}}}let Y=!Fe&&!W,O=d=>{if(!d||typeof d.duration!="function")return null;try{let p=Number(d.duration());return Number.isFinite(p)?Math.max(0,p):null}catch{return null}},V=d=>typeof d=="number"&&Number.isFinite(d)&&d>A,_e=d=>{let p=Number(d.getAttribute("data-duration"));if(Number.isFinite(p)&&p>0)return p;let g=Number(d.getAttribute("data-playback-start")??d.getAttribute("data-media-start")??"0"),h=Number.isFinite(g)?Math.max(0,g):0;return Number.isFinite(d.duration)&&d.duration>h?Math.max(0,d.duration-h):null},B=()=>{let d=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(d.length===0)return null;let p=0;for(let g of d){let h=D(g,0);if(!Number.isFinite(h))continue;let S=_e(g);S==null||S<=A||(p=Math.max(p,Math.max(0,h)+S))}return p>A?p:null},k=()=>{let d=F();if(!d)return null;let p=window.__timelines??{},g=$e({timelineRegistry:p,includeAuthoredTimingAttrs:!0}),h=0,S=Number.parseFloat(d.getAttribute("data-duration")??"");Number.isFinite(S)&&S>0&&(h=S);let L=Array.from(d.querySelectorAll("[data-composition-id][data-start]"));for(let I of L){if(!(I instanceof Element)||I.parentElement?.closest("[data-composition-id]")!==d)continue;let q=g.resolveStartForElement(I,0),de=g.resolveDurationForElement(I);!Number.isFinite(q)||de==null||de<=0||(h=Math.max(h,Math.max(0,q)+de))}return h>A?h:null},H=()=>{let d=B();return typeof d!="number"||!Number.isFinite(d)||d<=A?null:d},le=d=>V(d)?Math.max(A,d*_):A,se=()=>{let d=0;for(let p of e.deterministicAdapters){let g=p.getInferredDurationSeconds;if(typeof g!="function")continue;let h=null;try{h=g()}catch(S){N("runtime.init.adapterDuration",S)}typeof h=="number"&&Number.isFinite(h)&&h>0&&(d=Math.max(d,h))}return d>A?d:null},G=(d,p=0)=>{let g=O(d),h=H(),S=k(),L=se(),I=Math.max(h??0,S??0,L??0),Q=Number.isFinite(p)&&p>A?p:0,q=0;return V(g)?q=Math.max(g,I,Q):V(I)?q=Math.max(I,Q):q=Q,q>0?Math.max(0,q):0},j=()=>{let d=window.__timelines??{},p=ne=>{let Z=Object.entries(d).filter(oe=>!!oe[1]&&typeof oe[1].play=="function"&&typeof oe[1].pause=="function");if(Z.length!==1)return{timeline:null};let ce=Z[0];if(!ce)return{timeline:null};let[fe,pe]=ce;return{timeline:pe,selectedTimelineIds:[fe],selectedDurationSeconds:O(pe),diagnostics:{code:"root_timeline_sole_registered_fallback",details:{reason:ne,soleTimelineId:fe}}}},g=$e({timelineRegistry:d,includeAuthoredTimingAttrs:!0}),h=H(),S=k(),L=Math.max(h??0,S??0)||null,I=le(L),Q=ne=>{let Z=document.querySelector(`[data-composition-id="${CSS.escape(ne)}"]`);return Z?g.resolveStartForElement(Z,0):0},q=ne=>{let Z=window.gsap;if(!Z||typeof Z.timeline!="function")return null;let ce=Z.timeline({paused:!0});for(let fe of ne)ce.add(fe.timeline,Q(fe.compositionId));return ce},de=(ne,Z)=>{if(!V(ne))return null;let ce=window.gsap;if(!ce||typeof ce.timeline!="function")return null;let fe=ce.timeline({paused:!0});if(Z)try{fe.add(Z,0)}catch(oe){N("runtime.init.site2",oe)}let pe=fe;if(typeof pe.to=="function")try{pe.to({},{duration:ne})}catch(oe){N("runtime.init.site3",oe)}return fe},me=(ne,Z)=>{let ce=ne;if(typeof ce.getChildren!="function")return[];try{let fe=ce.getChildren(!0,!0,!0)??[];if(!Array.isArray(fe))return[];let pe=[];for(let oe of Z)if(!fe.some(Le=>Le===oe.timeline))try{let Le=Q(oe.compositionId);ne.add(oe.timeline,Le),pe.push(oe.compositionId)}catch(Le){N("runtime.init.site4",Le)}return pe}catch{return[]}},te=F(),X=te?.getAttribute("data-composition-id")??null;if(!X)return p("root_missing_composition_id");let ye=d[X]??null,Se=(()=>{if(!te)return[];let ne=new Set,Z=Array.from(te.querySelectorAll("[data-composition-id]")),ce=[];for(let fe of Z){let pe=fe.getAttribute("data-composition-id");if(!pe||pe===X||ne.has(pe))continue;ne.add(pe);let oe=d[pe]??null;if(!oe||typeof oe.play!="function"||typeof oe.pause!="function")continue;let Ce=O(oe);ce.push({compositionId:pe,timeline:oe,durationSeconds:Ce??0})}return ce})(),_t=ne=>{for(let Z of ne){let ce=Z.timeline;if(typeof ce.paused=="function")try{ce.paused(!1)}catch(fe){N("runtime.init.site5",fe)}}};if(Se.length>0&&_t(Se),ye){let ne=Se.length>0?me(ye,Se):[];if((Se.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+X+"'])"))&&(K=!0),ne.length>0)try{let oe=ye.time();ye.seek(oe,!1)}catch{}let Z=O(ye);if(!V(Z)&&Se.length>0){let oe=Se.map(Hl=>Hl.compositionId),Ce=q(Se),Le=O(Ce);if(Ce&&V(Le))return{timeline:Ce,selectedTimelineIds:oe,selectedDurationSeconds:Le,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:X,rootDurationSeconds:Z,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:I,selectedDurationSeconds:Le,mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:S,selectedTimelineIds:oe,autoNestedChildren:ne}}};let ni=de(L??0,ye),ii=O(ni);if(ni&&V(ii))return{timeline:ni,selectedTimelineIds:[X],selectedDurationSeconds:ii,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:Z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:S,selectedDurationSeconds:ii,selectedTimelineIds:[X],autoNestedChildren:ne}}}}if(!V(Z)&&Se.length===0){let oe=de(L??0,ye),Ce=O(oe);if(oe&&V(Ce))return{timeline:oe,selectedTimelineIds:[X],selectedDurationSeconds:Ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:Z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:S,selectedDurationSeconds:Ce,selectedTimelineIds:[X]}}}}let ce=te?.getAttribute("data-duration"),fe=ce?parseFloat(ce):null,pe=Math.max(V(fe)?fe:0,S??0);if(pe>0&&V(pe)&&V(Z)&&pe>=Z+.5){let oe=ye;if(typeof oe.to=="function")try{oe.to({},{duration:0},pe)}catch(Le){N("runtime.init.site6",Le)}let Ce=O(ye);if(V(Ce))return{timeline:ye,selectedTimelineIds:[X],selectedDurationSeconds:Ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:X,rootDurationSeconds:Z,rootDeclaredDur:fe,authoredCompositionDurationFloorSeconds:S,newDur:Ce}}}}return{timeline:ye,selectedTimelineIds:[X],selectedDurationSeconds:Z,mediaDurationFloorSeconds:h,diagnostics:ne.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:X,selectedDurationSeconds:Z,autoNestedChildren:ne}}:void 0}}if(Se.length>0){let ne=Se.map(fe=>fe.compositionId),Z=q(Se),ce=O(Z);if(Z)return{timeline:Z,selectedTimelineIds:ne,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:X,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:I,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,selectedTimelineIds:ne}}}}return p("root_composition_id_unmatched_in_registry")},K=!1,Ae=()=>{if(!Y)return!1;let d=e.capturedTimeline,p=O(d),g=V(p);if(d&&g&&K)return!1;let h=j();if(!h.timeline)return!1;if(d&&d===h.timeline)return typeof d.timeScale=="function"&&d.timeScale(e.playbackRate),!1;e.capturedTimeline=h.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let S=G(e.capturedTimeline,0);if(S<=0&&typeof e.capturedTimeline.progress=="function"&&(e.capturedTimeline.progress(1,!0),e.capturedTimeline.progress(0,!1),e.capturedTimeline.pause()),S>0){try{s.setDuration(S)}catch{}if(typeof e.capturedTimeline.totalTime=="function"){typeof e.capturedTimeline.progress=="function"&&e.capturedTimeline.progress(1e-4,!0);let I=Math.max(0,e.currentTime||0);e.capturedTimeline.totalTime(I,!1),e.capturedTimeline.pause()}let L=window.__hfStudioManualEditsApply;typeof L=="function"&&L(),Pn(document)}if(h.diagnostics&&xe({source:"hf-preview",type:"diagnostic",code:h.diagnostics.code,details:h.diagnostics.details}),xe({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:h.selectedTimelineIds??[],selectedDurationSeconds:h.selectedDurationSeconds??null,mediaDurationFloorSeconds:h.mediaDurationFloorSeconds??null}}),window.parent!==window){let L=F(),I=S>0?S:0,Q=String(I>0?I:1),q=new Set,de=new Set(document.querySelectorAll("[data-start]")),me=te=>{let X=te.parentElement;for(;X&&X!==L;){if(de.has(X))return!0;X=X.parentElement}return!1};if(e.capturedTimeline.getChildren)try{for(let te of e.capturedTimeline.getChildren(!0))if(typeof te.targets=="function")for(let X of te.targets())X instanceof HTMLElement&&X!==L&&(X.hasAttribute("data-start")||me(X)||q.has(X)||(q.add(X),X.setAttribute("data-start","0"),X.setAttribute("data-duration",Q),X.setAttribute("data-hf-autostamped","1")))}catch{}if(L instanceof HTMLElement)for(let te of L.querySelectorAll("[id]"))te instanceof HTMLElement&&te!==L&&(te.hasAttribute("data-start")||me(te)||q.has(te)||te.tagName==="SCRIPT"||te.tagName==="STYLE"||te.tagName==="LINK"||(q.add(te),te.setAttribute("data-start","0"),te.setAttribute("data-duration",Q),te.setAttribute("data-hf-autostamped","1")))}for(let L of Et)an.delete(L),_r(L);return!0};window.__hfForceTimelineRebind=()=>{K=!1,Ae(),Tr(e.currentTime)};let we=()=>{let d=F();if(!(d instanceof HTMLElement))return;let p=d.getBoundingClientRect(),g=Number(d.getAttribute("data-width")),h=Number(d.getAttribute("data-height")),S=window.getComputedStyle(d),L=Number.isFinite(g)&&g>0&&Number.isFinite(h)&&h>0,I=p.width<=0||p.height<=0||d.clientWidth<=0||d.clientHeight<=0;!L||!I||y("root_stage_layout_zero",{compositionId:d.getAttribute("data-composition-id")??null,declaredWidth:g,declaredHeight:h,rectWidth:Math.round(p.width),rectHeight:Math.round(p.height),clientWidth:d.clientWidth,clientHeight:d.clientHeight,display:S.display,visibility:S.visibility,overflow:S.overflow},`root-stage-layout-zero:${d.getAttribute("data-composition-id")??"unknown"}`)},St=()=>{e.tornDown||(u!=null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{u=null,we()}))},Ge=()=>{i=d=>{let p=v(d.error??d.message).slice(0,P);if(!p)return;let g=w(p);xe({source:"hf-preview",type:"diagnostic",code:g.code,details:{category:g.category,message:p,filename:d.filename||null,line:Number.isFinite(d.lineno)?d.lineno:null,column:Number.isFinite(d.colno)?d.colno:null}})},r=d=>{let p=v(d.reason).slice(0,P);if(!p)return;let g=w(p);xe({source:"hf-preview",type:"diagnostic",code:`${g.code}_unhandled_rejection`,details:{category:`${g.category}-unhandled-rejection`,message:p}})},window.addEventListener("error",i),window.addEventListener("unhandledrejection",r)},wl=()=>{let d=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let g of d){let h=()=>{if(!(g instanceof Element))return;let S=g.tagName.toLowerCase(),L=g.getAttribute("src")??g.getAttribute("href")??g.getAttribute("poster")??null,I=S==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";y(I,{tagName:S,assetUrl:L,currentSrc:(g instanceof HTMLImageElement||g instanceof HTMLMediaElement)&&g.currentSrc||null,readyState:g instanceof HTMLMediaElement?g.readyState:null,networkState:g instanceof HTMLMediaElement?g.networkState:null},`${I}:${S}:${L??"unknown"}`)};g.addEventListener("error",h),E(()=>{g.removeEventListener("error",h)})}let p=document.fonts;p&&p.ready.then(()=>{if(e.tornDown)return;let g=Array.from(p).filter(h=>h.status==="error").map(h=>h.family).filter(h=>!!h).slice(0,10);g.length!==0&&y("runtime_font_load_issue",{failedFamilies:g,totalFaces:Array.from(p).length},`runtime-font-load-issue:${g.join("|")}`)}).catch(()=>{})},Cl=(d,p)=>{if(!d.timeline)return!1;let g=e.capturedTimeline;if(g&&g===d.timeline)return!1;let h=Math.max(0,e.currentTime||0),S=e.isPlaying;e.capturedTimeline=d.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(h,!1),S&&e.capturedTimeline.play()}catch(L){N("runtime.init.site7",L)}return xe({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:p,previousTime:h,selectedTimelineIds:d.selectedTimelineIds??[],selectedDurationSeconds:d.selectedDurationSeconds??null,mediaDurationFloorSeconds:d.mediaDurationFloorSeconds??null}}),!0},tt=null,Fr=!1,Et=new Set,an=new WeakMap,ln=()=>{e.tornDown||(tt!=null&&window.clearTimeout(tt),tt=window.setTimeout(()=>{if(e.tornDown)return;tt=null;let d=j();if(!d.timeline||!V(d.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){Ae()&&(nt(),ve(!0));return}if(Fr)return;let g=O(e.capturedTimeline),h=d.selectedDurationSeconds??O(d.timeline);V(h)&&(!V(g)||h>=g+M)&&Cl(d,"manual")&&(Fr=!0,xe({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:g??null,selectedDurationSeconds:h??null,selectedTimelineIds:d.selectedTimelineIds??[],mediaDurationFloorSeconds:d.mediaDurationFloorSeconds??null}}),nt(),ve(!0))},$))},Fl=()=>{for(let d of Et)d.removeEventListener("loadedmetadata",ln),d.removeEventListener("durationchange",ln);Et.clear()},$n=()=>{if(e.tornDown)return;let d=Array.from(document.querySelectorAll("video, audio"));for(let p of d){if(Et.has(p))continue;Et.add(p);let g=Number.parseFloat(p.dataset.volume??"");Number.isFinite(g)&&(p.volume=Math.max(0,Math.min(1,g))),p.addEventListener("loadedmetadata",ln),p.addEventListener("durationchange",ln),p.preload!=="auto"&&(p.preload="auto"),p.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&p.load(),_r(p)}},_r=d=>{an.has(d)||po(d,e.capturedTimeline,G(e.capturedTimeline,0),an)},Kn=new WeakMap,vr=d=>{let p=Kn.get(d);if(p!==void 0)return p;let g=window.getComputedStyle(d).position,h=g==="static"||g==="relative"||g==="sticky";return Kn.set(d,h),h},Jn=new WeakMap,_l=d=>{let p=Jn.get(d);if(p!==void 0)return p;let g=d.querySelector("[data-start]")===null;return Jn.set(d,g),g},vl=()=>{Kn=new WeakMap,Jn=new WeakMap},Yn=new WeakMap,un=new WeakSet,Tr=d=>{let p=Array.from(document.querySelectorAll("[data-start]")),g=F();for(let h of p){if(!(h instanceof HTMLElement))continue;if(h.hasAttribute("data-hidden")){un.has(h)||(Yn.set(h,h.style.getPropertyValue("display")),un.add(h)),h.style.display="none",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,!1);continue}if(un.has(h)){let L=Yn.get(h);L?h.style.display=L:h.style.removeProperty("display"),Yn.delete(h),un.delete(h)}let S=re(h,d);if(S){let L=h.parentElement;for(;L&&L!==g;){if(L instanceof HTMLElement&&L.hasAttribute("data-start")&&!re(L,d)){S=!1;break}L=L.parentElement}}h.style.visibility=S?"visible":"hidden",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,S),S?vr(h)&&h.style.removeProperty("display"):vr(h)&&_l(h)&&(h.style.display="none")}},Me=()=>{let d=h=>{let S=h.closest("[data-composition-id]"),L=S?U(S,0):null,I=S?ie(S,{includeAuthoredTimingAttrs:!0}):null;return{compositionRoot:S,inheritedStart:L,inheritedDuration:I}},p=ho({shouldIncludeElement:h=>h.hasAttribute("data-start")||!!d(h).compositionRoot,resolveStartSeconds:h=>{let S=d(h);return D(h,S.inheritedStart??0)},resolveDurationSeconds:h=>{let S=d(h),L=D(h,S.inheritedStart??0),I=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0,Q=S.inheritedStart!=null&&S.inheritedDuration!=null&&S.inheritedDuration>0?Math.max(0,S.inheritedStart+S.inheritedDuration-L):null,q=Number.isFinite(h.duration)&&h.duration>I?Math.max(0,h.duration-I):null,de=Number.parseFloat(h.dataset.duration??""),me=Number.isFinite(de)&&de>0?de:null,te=[q,Q,me].filter(X=>X!=null);return te.length>0?Math.min(...te):null}});for(let h of p.mediaClips){let S=an.get(h.el);S&&(h.volumeKeyframes=S)}let g=e.mediaForceSyncNextTick;g&&(e.mediaForceSyncNextTick=!1),e.nativeMediaSyncDisabled||go({clips:p.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate,outputMuted:e.mediaOutputMuted||!e.webAudioMediaDisabled&&!e.nativeMediaSyncDisabled&&l.isActive(),userMuted:e.bridgeMuted,userVolume:e.bridgeVolume,forceSync:g,onElementVolume:(h,S)=>l.setElementVolume(h,S),isWebAudioOwned:h=>l.ownsElement(h),onAutoplayBlocked:()=>{e.mediaAutoplayBlockedPosted||(e.mediaAutoplayBlockedPosted=!0,xe({source:"hf-preview",type:"media-autoplay-blocked"}))}}),Tr(e.currentTime)},ve=d=>{let p=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),g=Date.now();(d||p!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||g-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=p,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=g,xe({source:"hf-preview",type:"state",frame:p,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},Xn="",Mr=0,Tl=()=>{let d="";for(let p of document.querySelectorAll("[data-start]"))d+=`${p.id}:${p.tagName}|`;return d},nt=()=>{R(),T(),z();let d=F();if(d){let h=C(d.getAttribute("data-width")),S=C(d.getAttribute("data-height")),L=h?parseInt(h,10):0,I=S?parseInt(S,10):0;L>0&&I>0&&xe({source:"hf-preview",type:"stage-size",width:L,height:I})}Ae();let p=Lo({canonicalFps:e.canonicalFps});window.__clipManifest=p;let g=Tl();if(Xn!==g&&vl(),!window.__clipTree||Xn!==g){let h=window;window.__clipTree=vo({startResolver:$e({timelineRegistry:h.__timelines??{},includeAuthoredTimingAttrs:!0}),timelineRegistry:h.__timelines??{},rootDuration:p.durationInFrames/e.canonicalFps}),Xn=g}xe(p),St()},Qn=d=>Number.isFinite(d)&&d>0?d:0,Ml=d=>{let p=Qn(Number(d));if(p<=0)return;let g=F(),h=Qn(Number.parseFloat(g?.getAttribute("data-duration")??"")),S=Math.max(Mr,Qn(s.getDuration()),h);p<=S||(Mr=p,g?.setAttribute("data-duration",String(p)),s.setDuration(p),nt(),ve(!0))},Pe=(d,p=0)=>{for(let g of e.deterministicAdapters){try{d==="discover"&&g.discover(),d==="pause"&&g.pause(),d==="play"&&g.play&&g.play()}catch(h){N("runtime.init.site8",h)}if(d==="discover")try{g.seek({time:p,suppressEvents:!0})}catch(h){N("runtime.init.site9",h)}}},it=()=>{window.__renderReady=!1},At=null,wt=!0,Nl=()=>{let d=[];for(let p of e.deterministicAdapters){let g=p.getReadyPromise;if(typeof g=="function")try{let h=g();h&&d.push(h)}catch(h){N("runtime.init.adapterReady",h)}}return d},Ll=()=>{let d=Nl();if(d.length===0)return At=null,wt=!0,!0;let p=d[0];if(!p)return!0;let g=d.length===1?p:Promise.all(d);return g!==At&&(At=g,wt=!1,Promise.resolve(g).then(()=>{At===g&&(wt=!0,it())},h=>{At===g&&(wt=!0,N("runtime.init.adapterReady",h),it())})),wt};if(Y)ir();else{let d={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:C,onDiagnostic:({code:p,details:g})=>{xe({source:"hf-preview",type:"diagnostic",code:p,details:g})}};ba(d).then(()=>xa(d)).finally(()=>{Y=!0,$n(),wl(),ir(),ar(document),it()})}let cn=Ao({postMessage:d=>xe(d)});cn.installPickerApi();let We=qa();n=We,E(()=>{We.destroy(),n=null});let Zn=d=>{let p=Number(d);!Number.isFinite(p)||p<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,p)),e.mediaForceSyncNextTick=!0,e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let g=document.querySelectorAll("video, audio");for(let h of g)if(h instanceof HTMLMediaElement)try{h.playbackRate=e.playbackRate}catch(S){N("runtime.init.site10",S)}},Nr={play:()=>{let d=e.capturedTimeline;if(s.isPlaying())return;let p=G(d,0);if(p>0)s.setDuration(p),s.reachedEnd()&&(s.seek(0),e.currentTime=0,rt(0));else{let g=F(),h=Number(g?.getAttribute("data-duration")??0);h>0&&s.setDuration(h)}d&&d.pause(),s.play()&&(e.isPlaying=!0,e.mediaForceSyncNextTick=!0,Ir(s.now()),c&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&Pr(),Pe("play"),Me(),We.redraw(),ve(!0))},pause:()=>{if(!s.isPlaying())return;l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1,e.currentTime=s.now(),e.mediaForceSyncNextTick=!0,Ir(e.currentTime);let d=e.capturedTimeline;d&&d.pause(),Pe("pause"),Me(),We.redraw(),ve(!0)},seek:(d,p)=>{let g=dt(Math.max(0,Number(d)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource();let h=s.isPlaying();h&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0;let S=e.capturedTimeline;if(S&&S.pause(),rt(e.currentTime),Pe("pause"),p?.keepPlaying&&h){Nr.play();return}Me(),We.redraw(),ve(!0)},renderSeek:(d,p)=>{let g=dt(Math.max(0,Number(d)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource(),s.isPlaying()&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0,rt(e.currentTime,{activateChildren:!0,suppressEvents:p?.suppressEvents}),Me(),We.redraw(),ve(!0)},getTime:()=>s.now(),getDuration:()=>{let d=s.getDuration();return Number.isFinite(d)?d:0},isPlaying:()=>s.isPlaying(),setPlaybackRate:d=>{Zn(d),s.setRate(e.playbackRate),Or()},getPlaybackRate:()=>e.playbackRate},Lr=G(e.capturedTimeline,0);Lr>0&&s.setDuration(Lr);let Ne=Fo({getTimeline:()=>e.capturedTimeline,setTimeline:d=>{e.capturedTimeline=d},getTimelineRegistry:()=>window.__timelines??{},getIsPlaying:()=>e.isPlaying,setIsPlaying:d=>{e.isPlaying!==d&&(e.mediaForceSyncNextTick=!0),e.isPlaying=d},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:Zn,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(d,p)=>{e.currentTime=Math.max(0,Number(d)||0),e.isPlaying!==p&&(e.mediaForceSyncNextTick=!0),e.isPlaying=p,Me()},onStatePost:ve,onDeterministicSeek:(d,p)=>{for(let g of e.deterministicAdapters)if(!(g.name==="gsap"&&e.capturedTimeline))try{g.seek({time:Number(d)||0,suppressEvents:p?.suppressEvents})}catch(h){N("runtime.init.site11",h)}},onDeterministicPause:()=>Pe("pause"),onDeterministicPlay:()=>Pe("play"),onRenderFrameSeek:()=>{We.redraw()},onShowNativeVideos:()=>{},getSafeDuration:()=>G(e.capturedTimeline,0),transport:Nr});window.__player=x(Ne),window.__playerReady=!0,Vr(xe),ot("composition_loaded",{duration:Ne.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=Ur({onPlay:()=>{Ne.play(),ot("composition_played",{time:Ne.getTime()})},onPause:()=>{Ne.pause(),ot("composition_paused",{time:Ne.getTime()})},onStopMedia:()=>{l.stopAll();let d=document.querySelectorAll("video, audio");for(let p of d)p instanceof HTMLMediaElement&&!p.paused&&p.pause()},onSeek:(d,p)=>{Ne.seek(d),ot("composition_seeked",{time:d})},onSetMuted:d=>{e.bridgeMuted=d;let p=d||e.mediaOutputMuted;l.setMuted(p);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=p||h.defaultMuted)},onSetVolume:d=>{e.bridgeVolume=d,l.setVolume(d);let p=document.querySelectorAll("video, audio");for(let g of p){if(!(g instanceof HTMLMediaElement))continue;let h=parseFloat(g.dataset.volume??""),S=Number.isFinite(h)?h:1;g.volume=S*d}},onSetMediaOutputMuted:d=>{e.mediaOutputMuted=d;let p=d||e.bridgeMuted;l.setMuted(p);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=p||h.defaultMuted)},onSetNativeMediaSyncDisabled:d=>{e.nativeMediaSyncDisabled!==d&&(e.nativeMediaSyncDisabled=d,e.mediaForceSyncNextTick=!0,d?(l.stopAll(),s.detachAudioSource()):Me())},onSetWebAudioMediaDisabled:d=>{e.webAudioMediaDisabled!==d&&(e.webAudioMediaDisabled=d,e.mediaForceSyncNextTick=!0,d&&(l.stopAll(),s.detachAudioSource()),Me())},onSetPlaybackRate:d=>{Zn(d),e.transportClock&&e.transportClock.setRate(e.playbackRate),Or()},onSetRootDuration:Ml,onSetColorGrading:(d,p)=>{We.setGrading(d,p)},onSetColorGradingCompare:(d,p)=>{We.setCompare(d,p)},onTick:()=>{if(e.tornDown||!s.isPlaying())return;let d=s.now();if(e.currentTime=d,rt(d),s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let p=s.getDuration();Number.isFinite(p)&&(s.seek(p),e.currentTime=p,rt(p)),Pe("pause"),Me(),ve(!0)}},onEnablePickMode:()=>cn.enablePickMode(),onDisablePickMode:()=>cn.disablePickMode(),getCanonicalFps:()=>e.canonicalFps}),e.deterministicAdapters=[fo(),Jr({resolveStartSeconds:d=>U(d,0)}),Xr(),Zr(),to(),no(),io(),ro(),oo(),so(),ao(),Yr({getTimeline:()=>e.capturedTimeline})],uo(),co(),window.__hfReseekGpu=d=>{let p=Math.max(0,Number(d)||0);window.__hfThreeTime=p,window.__hfTypegpuTime=p,eo(p)},Ge(),$n(),Pe("discover");let Rl=()=>{let d=e.capturedTimeline,p=Ae();e.capturedTimeline&&(p||e.capturedTimeline!==d||!Ne._timeline)&&(Ne._timeline=e.capturedTimeline);let g=G(e.capturedTimeline,0);if(g>0&&s.setDuration(g),Pe("discover",e.currentTime),!e.capturedTimeline){let h=window.__timelines??{},S=Object.keys(h).filter(L=>h[L]);if(S.length>0){let I=F()?.getAttribute("data-composition-id")??null;y("root_timeline_unbound_registry_present",{reason:I?"root data-composition-id has no matching key in window.__timelines":"root composition element has no data-composition-id attribute",rootCompositionId:I,registeredTimelineKeys:S},"root_timeline_unbound_registry_present"),console.warn("[hyperframes] Root timeline not bound \u2014 render will freeze at t=0. "+(I?`Root data-composition-id is "${I}" but window.__timelines has no such key. `:"Root composition element has no data-composition-id. ")+`Registered timeline keys: [${S.join(", ")}]. Register the root timeline under its data-composition-id (window.__timelines["${I??"<root-id>"}"] = tl).`)}}window.__renderReady=!0,nt(),ve(!0)};if(it=()=>{if(!Y||window.__hfTimelinesBuilding){window.__renderReady=!1;return}if(Pe("discover",e.currentTime),!Ll()){window.__renderReady=!1;return}Rl()},window.__hfTimelinesBuilding){window.__renderReady=!1;let d=()=>{window.removeEventListener("hf-timelines-built",d),it()};window.addEventListener("hf-timelines-built",d)}it(),Y&&setTimeout(()=>{it()},0);let dn=0,ei=!1,kl=(d,p,g,h)=>{try{let S=h?.suppressEvents===!0;d.pause(),typeof d.totalTime=="function"?d.totalTime(p,S):d.seek(p,S)}catch(S){N(g,S)}},Dl=(d,p)=>{let g=window.__timelines??{},h=F()?.getAttribute("data-composition-id")??null;for(let[S,L]of Object.entries(g)){if(!L||S===h)continue;let I=document.querySelector(`[data-composition-id="${CSS.escape(S)}"]`);if(!I)continue;let Q=U(I,0);if(!Number.isFinite(Q))continue;let q=ie(I,{includeAuthoredTimingAttrs:!0}),de=O(L),me=q!=null&&q>0?q:de,te=Math.max(0,me!=null&&me>0?Math.min(me,d-Q):d-Q);kl(L,te,"runtime.init.transport.childTimeline",p)}},Il=d=>{let p=window.__timelines??{};for(let g of Object.values(p))if(!(!g||g===d))try{g.play()}catch(h){N("runtime.init.activateSiblings",h)}},Rr=d=>typeof d=="object"&&d!==null,Ct=new WeakMap,Pl=["onStart","onUpdate","onComplete","onReverseComplete","onRepeat"],kr=(d,p)=>{let g=d[p];if(typeof g!="function")return null;try{let h=Number(g.call(d));return Number.isFinite(h)?h:null}catch(h){return N("runtime.init.gsapCallbackDuration",h),null}},Ol=d=>{let p=Ct.get(d);if(p!=null)return p;if(!("getChildren"in d)||typeof d.getChildren!="function")return!1;let g;try{g=d.getChildren(!0,!0,!0)}catch(h){return N("runtime.init.gsapCallbackChildren",h),Ct.set(d,!1),!1}if(!Array.isArray(g))return Ct.set(d,!1),!1;for(let h of g){if(!Rr(h))continue;let S=h.vars;if(!Rr(S)||!Pl.some(q=>typeof S[q]=="function"))continue;let Q=kr(h,"totalDuration")??kr(h,"duration");if(Q!=null&&Q<=1e-6)return Ct.set(d,!0),!0}return Ct.set(d,!1),!1},rt=(d,p)=>{let g=e.capturedTimeline,h=p?.suppressEvents===!0;if(g){p?.activateChildren&&Il(g);let S=g,L=d;if(typeof S.totalDuration=="function")try{let I=Number(S.totalDuration());Number.isFinite(I)&&I>0&&d>I&&(L=I)}catch(I){N("runtime.init.transport.clampDuration",I)}try{typeof g.totalTime=="function"?(g.totalTime(L,h),!h&&!Ol(g)&&(g.totalTime(L+.001,!0),g.totalTime(L,!0))):g.seek(L,h)}catch(I){N("runtime.init.transport.seek",I)}}else Dl(d,p);for(let S of e.deterministicAdapters)if(!(S.name==="gsap"&&g))try{S.seek({time:d,suppressEvents:h})}catch(L){N("runtime.init.transport.adapter",L)}},Bl=()=>{try{return document.querySelector(`[${Ka}]`)!=null}catch{return!1}},Dr=()=>{if(!(e.tornDown||ei)){ei=!0;try{if(e.transportRafId=window.requestAnimationFrame(Dr),dn+=1,Ja({tick:dn,isPlaying:s.isPlaying(),hasCapturedTimeline:e.capturedTimeline!=null,currentTimeSeconds:s.now()})){let p=e.capturedTimeline;if(Ae()){e.capturedTimeline&&!Ne._timeline&&(Ne._timeline=e.capturedTimeline),e.capturedTimeline&&e.capturedTimeline!==p&&e.capturedTimeline.pause();let g=G(e.capturedTimeline,0);g>0&&s.setDuration(g),nt()}}if(dn%20===0&&nt(),dn%30===0&&$n(),e.capturedTimeline){let p=G(e.capturedTimeline,0);p>0&&(!s.isPlaying()||p>=s.getDuration())&&s.setDuration(p)}if(s.isPlaying()&&!e.mediaOutputMuted)if(!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&l.isActive()&&l.context){let p=l.getTime();p>=0&&s.attachAudioSource({currentTimeSeconds:p})}else{let p=document.querySelectorAll("audio[data-start]"),g=!1;for(let h of p){if(!(h instanceof HTMLMediaElement)||!h.isConnected)continue;let S=Number.parseFloat(h.dataset.start??""),L=Number.parseFloat(h.dataset.duration??""),I=Number.isFinite(L)&&L>0?S+L:1/0,Q=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0;if(Number.isFinite(S)&&e.currentTime>=S&&e.currentTime<=I){h.paused?!h.error&&h.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&(s.attachAudioSource({currentTimeSeconds:e.currentTime}),g=!0):(s.attachAudioSource({el:h,compositionStart:S,mediaStart:Q}),g=!0);break}}!g&&s.hasAudioSource()&&s.detachAudioSource()}else s.hasAudioSource()&&s.detachAudioSource();let d=s.now();if(e.currentTime=d,(s.isPlaying()||!Bl())&&rt(d),s.isPlaying()&&s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let p=s.getDuration();Number.isFinite(p)&&(s.seek(p),e.currentTime=p,rt(p)),Pe("pause"),Me(),ve(!0);return}s.isPlaying()&&Me(),ve(!1)}finally{ei=!1}}},Ir=d=>{let p=document.querySelectorAll("video, audio");for(let g of p){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let S=Number.parseFloat(g.dataset.duration??""),L=Number.isFinite(S)&&S>0?h+S:1/0;if(d<h||d>=L)continue;let I=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,Q=d-h+I;if(Q>=0)try{g.currentTime=Q}catch{}}},Pr=()=>{if(e.nativeMediaSyncDisabled||e.webAudioMediaDisabled)return;let d=l.startGeneration(),p=document.querySelectorAll("audio[data-start]");for(let g of p){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let S=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,L=Number.parseFloat(g.dataset.volume??""),I=Number.isFinite(L)?L:1,Q=Number.parseFloat(g.dataset.duration??""),q=Number.isFinite(Q)&&Q>0?Q:Number.POSITIVE_INFINITY,de=g.closest("[data-composition-id]");if(de){let me=U(de,0),te=ie(de,{includeAuthoredTimingAttrs:!0});te!=null&&te>0&&(q=Math.min(q,Math.max(0,me+te-h)))}l.decodeAudioElement(g).then(me=>{!me||!s.isPlaying()||l.schedulePlayback(g,me,h,S,s.now(),I*e.bridgeVolume,d,e.playbackRate,q)})}},Or=()=>{l.setRate(e.playbackRate)&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&c&&s.isPlaying()&&l.hasBoundedActiveSources()&&(l.stopAll(),Pr())};if(e.capturedTimeline){let d=G(e.capturedTimeline,0);d>0&&s.setDuration(d),e.capturedTimeline.pause()}va(window),e.transportRafId=window.requestAnimationFrame(Dr),nt(),ve(!0);let ti=()=>{if(!e.tornDown){e.tornDown=!0,e.transportRafId!=null&&(window.cancelAnimationFrame(e.transportRafId),e.transportRafId=null),e.transportClock=null,l.destroy(),tt!=null&&(window.clearTimeout(tt),tt=null),u!=null&&(window.cancelAnimationFrame(u),u=null),Fl(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),i&&(window.removeEventListener("error",i),i=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),cn.disablePickMode();for(let d of e.deterministicAdapters)if(!(!d||typeof d.revert!="function"))try{d.revert()}catch(p){N("runtime.init.site12",p)}e.deterministicAdapters=[];for(let d of o.splice(0))try{d()}catch(p){N("runtime.init.site13",p)}for(let d of e.injectedCompStyles)try{d.remove()}catch(p){N("runtime.init.site14",p)}e.injectedCompStyles=[];for(let d of e.injectedCompScripts)try{d.remove()}catch(p){N("runtime.init.site15",p)}e.injectedCompScripts=[],e.capturedTimeline=null,window.__hfRuntimeTeardown===ti&&(window.__hfRuntimeTeardown=null)}};window.__hfRuntimeTeardown=ti,e.beforeUnloadHandler=ti,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var Xa=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],xr=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Uf(e){if(e<=255)return Xa[e];let t=0,n=xr.length-1;for(;t<=n;){let i=t+n>>1,r=xr[i];if(e<r[0]){n=i-1;continue}if(e>r[1]){t=i+1;continue}return r[2]}return"L"}function Vf(e){let t=e.length;if(t===0)return null;let n=new Array(t),i=!1;for(let l=0;l<t;){let c=e.charCodeAt(l),m=c,f=1;if(c>=55296&&c<=56319&&l+1<t){let E=e.charCodeAt(l+1);E>=56320&&E<=57343&&(m=(c-55296<<10)+(E-56320)+65536,f=2)}let b=Uf(m);(b==="R"||b==="AL"||b==="AN")&&(i=!0);for(let E=0;E<f;E++)n[l+E]=b;l+=f}if(!i)return null;let r=0;for(let l=0;l<t;l++){let c=n[l];if(c==="L"){r=0;break}if(c==="R"||c==="AL"){r=1;break}}let o=new Int8Array(t);for(let l=0;l<t;l++)o[l]=r;let a=r&1?"R":"L",u=a,s=u;for(let l=0;l<t;l++)n[l]==="NSM"?n[l]=s:s=n[l];s=u;for(let l=0;l<t;l++){let c=n[l];c==="EN"?n[l]=s==="AL"?"AN":"EN":(c==="R"||c==="L"||c==="AL")&&(s=c)}for(let l=0;l<t;l++)n[l]==="AL"&&(n[l]="R");for(let l=1;l<t-1;l++)n[l]==="ES"&&n[l-1]==="EN"&&n[l+1]==="EN"&&(n[l]="EN"),n[l]==="CS"&&(n[l-1]==="EN"||n[l-1]==="AN")&&n[l+1]===n[l-1]&&(n[l]=n[l-1]);for(let l=0;l<t;l++){if(n[l]!=="EN")continue;let c;for(c=l-1;c>=0&&n[c]==="ET";c--)n[c]="EN";for(c=l+1;c<t&&n[c]==="ET";c++)n[c]="EN"}for(let l=0;l<t;l++){let c=n[l];(c==="WS"||c==="ES"||c==="ET"||c==="CS")&&(n[l]="ON")}s=u;for(let l=0;l<t;l++){let c=n[l];c==="EN"?n[l]=s==="L"?"L":"EN":(c==="R"||c==="L")&&(s=c)}for(let l=0;l<t;l++){if(n[l]!=="ON")continue;let c=l+1;for(;c<t&&n[c]==="ON";)c++;let m=l>0?n[l-1]:u,f=c<t?n[c]:u,b=m!=="L"?"R":"L";if(b===(f!=="L"?"R":"L"))for(let y=l;y<c;y++)n[y]=b;l=c-1}for(let l=0;l<t;l++)n[l]==="ON"&&(n[l]=a);for(let l=0;l<t;l++){let c=n[l];(o[l]&1)===0?c==="R"?o[l]++:(c==="AN"||c==="EN")&&(o[l]+=2):(c==="L"||c==="AN"||c==="EN")&&o[l]++}return o}function Qa(e,t){let n=Vf(e);if(n===null)return null;let i=new Int8Array(t.length);for(let r=0;r<t.length;r++)i[r]=n[t[r]];return i}var zf=/[ \t\n\r\f]+/g,jf=/[\t\n\r\f]| {2,}|^ | $/;function qf(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function $f(e){if(!jf.test(e))return e;let t=e.replace(zf," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Kf(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
|
|
348
|
+
})();`}var Bd=["data-composition-id","data-composition-file","data-start","data-duration","data-end","data-track-index","data-track","data-composition-src","data-hf-authored-duration","data-hf-authored-end"];function ma(e){let t=e.getAttribute("id")?.trim();for(let n of Bd)e.removeAttribute(n);t&&(e.removeAttribute("id"),e.setAttribute("data-hf-authored-id",t)),e.setAttribute("data-hf-inner-root","true")}var Hd=8e3,Gd=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,Wd=/\burl\(\s*(["']?)([^)"']+)\1\s*\)/g,Ud=["src","href"];function Vd(e){return!e||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/")}function ha(e,t){if(!t)return e;let n=e.trim();if(Vd(n)||!n.startsWith("../")&&n!=="..")return e;try{return new URL(n,t).href}catch{return e}}function ga(e,t){return!t||!e?e:e.replace(Wd,(n,i,r)=>{let o=ha(r||"",t);return o===r?n:`url(${i||""}${o}${i||""})`})}function zd(e,t){for(let n of Array.from(e.querySelectorAll("[src], [href]")))for(let i of Ud){let r=n.getAttribute(i);if(r==null)continue;let o=ha(r,t);o!==r&&n.setAttribute(i,o)}}function jd(e,t){for(let n of Array.from(e.querySelectorAll("[style]"))){let i=n.getAttribute("style");if(i==null)continue;let r=ga(i,t);r!==i&&n.setAttribute("style",r)}}function qd(e,t){for(let n of Array.from(e.querySelectorAll("style"))){let i=n.textContent||"",r=ga(i,t);r!==i&&(n.textContent=r)}}function xa(e,t){if(t){zd(e,t),jd(e,t),qd(e,t);for(let n of Array.from(e.querySelectorAll("template")))xa(n.content,t)}}function $d(e,t){return`${e}__hf${t}`}var Kd=e=>new Promise(t=>{let n=!1,i=Date.now(),r=null,o=a=>{n||(n=!0,r!=null&&window.clearTimeout(r),t({status:a,elapsedMs:Math.max(0,Date.now()-i)}))};e.addEventListener("load",()=>o("load"),{once:!0}),e.addEventListener("error",()=>o("error"),{once:!0}),r=window.setTimeout(()=>o("timeout"),Hd)});function ir(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function Jd(e){let t=document.importNode(e,!0);ma(t);let n=t.getAttribute("data-width"),i=t.getAttribute("data-height");return t.style.width=n?`${n}px`:"100%",t.style.height=i?`${i}px`:"100%",t}function pa(e,t){let n=e.trim();if(!n)return e;try{return Gd.test(n)&&!n.startsWith("#")&&!n.startsWith("?")?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}function nr(e,t){try{let n=new URL(e),i=new URL(t);return n.search="",n.hash="",i.search="",i.hash="",n.href===i.href}catch{return!1}}function In(e){let t=(e.getAttribute("data-composition-id")||"").trim()||null;return{authoredCompositionId:(e.getAttribute("data-hf-original-composition-id")||t||"").trim()||null,runtimeCompositionId:t}}function Xd(e){let t=new Map;for(let n of e){let i=In(n).authoredCompositionId||"";i&&t.set(i,(t.get(i)||0)+1)}return t}function ba(e){let t=In(e).authoredCompositionId;return t?!!document.querySelector(`template#${CSS.escape(t)}-template`):!1}function Yd(e){return!!e.querySelector('[data-hf-inner-root="true"]')}function Qd(e){return e.hasAttribute("data-composition-src")?!0:ba(e)?e.children.length===0||e.hasAttribute("data-hf-original-composition-id")?!0:Yd(e):!1}function or(){return Array.from(document.querySelectorAll("[data-composition-src], [data-composition-id]")).filter(t=>t.hasAttribute("data-composition-src")?!0:ba(t))}function ya(){let e=window.__hfVariablesByComp;if(!e)return;let t=new Set(or().map(n=>In(n).runtimeCompositionId).filter(n=>!!n));for(let n of Object.keys(e))t.has(n)||delete e[n]}function Sa(e,t=Xd(e)){let n=new Map,i=new Map;for(let r of e){let{authoredCompositionId:o,runtimeCompositionId:a}=In(r),u=Qd(r);if(!o){i.set(r,{authoredCompositionId:null,runtimeCompositionId:a});continue}let s=(t.get(o)||0)>1,l=a||o;if(u){let d=s?(n.get(o)||0)+1:0;s&&n.set(o,d),l=s?$d(o,d):o,s?r.setAttribute("data-hf-original-composition-id",o):r.removeAttribute("data-hf-original-composition-id"),r.setAttribute("data-composition-id",l),a&&a!==l&&window.__hfVariablesByComp&&delete window.__hfVariablesByComp[a]}i.set(r,{authoredCompositionId:o,runtimeCompositionId:l})}return i}async function rr(e){let t=null;e.authoredCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(x=>x instanceof HTMLElement&&x.getAttribute("data-composition-id")===e.authoredCompositionId)??null);let n=t??e.sourceNode,i=t?.getAttribute("data-composition-id")?.trim()||e.authoredCompositionId||null,r=e.runtimeCompositionId||i||null,o=t?.getAttribute("id")?.trim()||null,a=r?`[data-composition-id="${CSS.escape(r)}"]`:void 0;if(e.headLinks)for(let f of e.headLinks){let x=(f.getAttribute("href")||"").trim();if(!x)continue;let S=e.compositionUrl?new URL(x,e.compositionUrl).href:x;if(e.compositionUrl&&nr(S,e.compositionUrl)||document.head.querySelector(`link[href="${CSS.escape(S)}"]`))continue;let y=f.cloneNode(!0);y.href=S,document.head.appendChild(y),e.injectedLinks.push(y)}let u=f=>{for(let x of f){let S=x.cloneNode(!0);S instanceof HTMLStyleElement&&(i&&(S.textContent=da(S.textContent||"",i,a,o,{scopeRootSelectors:!0})),document.head.appendChild(S),e.injectedStyles.push(S))}};e.headStyles&&u(e.headStyles),u(Array.from(n.querySelectorAll("style")));let s=[];if(e.headScripts)for(let f of e.headScripts){let x=f.getAttribute("type")?.trim()??"",S=f.getAttribute("src")?.trim()??"";if(S){let y=pa(S,e.compositionUrl);if(e.compositionUrl&&nr(y,e.compositionUrl))continue;s.push({kind:"external",src:y,type:x})}else{let y=f.textContent?.trim()??"";y&&s.push({kind:"inline",content:y,type:x,scopeCompositionId:i})}}let l=Array.from(n.querySelectorAll("script")),d=[...s];for(let f of l){let x=f.getAttribute("type")?.trim()??"",S=f.getAttribute("src")?.trim()??"";if(S){let y=pa(S,e.compositionUrl);if(e.compositionUrl&&nr(y,e.compositionUrl)){f.parentNode?.removeChild(f);continue}d.push({kind:"external",src:y,type:x})}else{let y=f.textContent?.trim()??"";y&&d.push({kind:"inline",content:y,type:x,scopeCompositionId:i})}f.parentNode?.removeChild(f)}let m=Array.from(n.querySelectorAll("style"));for(let f of m)f.parentNode?.removeChild(f);if(t){let f=t.getAttribute("data-width"),x=t.getAttribute("data-height"),S=e.parseDimensionPx(f),y=e.parseDimensionPx(x);f&&e.host.setAttribute("data-width",f),x&&e.host.setAttribute("data-height",x),S&&e.host instanceof HTMLElement&&(e.host.style.width=S),y&&e.host instanceof HTMLElement&&(e.host.style.height=y),t.hasAttribute("data-timeline-locked")&&e.host.setAttribute("data-timeline-locked",""),e.host.appendChild(Jd(t))}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;r&&Zd(e,n,r);for(let f of d){let x=document.createElement("script");if(f.type&&(x.type=f.type),x.async=!1,f.kind==="external"?x.src=f.src:f.type.toLowerCase()==="module"?x.textContent=f.content:f.scopeCompositionId?x.textContent=fa(f.content,f.scopeCompositionId,"[HyperFrames] composition script error:",a,r||f.scopeCompositionId,o):x.textContent=`(function(){${f.content}})();`,document.body.appendChild(x),e.injectedScripts.push(x),f.kind==="external"){let S=await Kd(x);S.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.authoredCompositionId,runtimeCompositionId:e.runtimeCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:f.src,loadStatus:S.status,elapsedMs:S.elapsedMs}})}}}async function Ea(e){let t=or();if(ya(),t.length===0)return;let n=Sa(t),i=t.filter(r=>{if(r.hasAttribute("data-composition-src")||r.children.length>0)return!1;let o=n.get(r)?.authoredCompositionId;return o?!!document.querySelector(`template#${CSS.escape(o)}-template`):!1});if(i.length!==0)for(let r of i){let o=n.get(r),a=o?.authoredCompositionId;if(!a)continue;let u=document.querySelector(`template#${CSS.escape(a)}-template`);ir(r),await rr({host:r,authoredCompositionId:a,runtimeCompositionId:o?.runtimeCompositionId||a,hostCompositionSrc:`template#${a}-template`,sourceNode:u.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function Aa(e){let t=or();if(ya(),t.length===0)return;let n=Sa(t),i=t.filter(r=>r.hasAttribute("data-composition-src"));i.length!==0&&await Promise.all(i.map(async r=>{let o=r.getAttribute("data-composition-src");if(!o)return;let a=n.get(r),u=a?.authoredCompositionId||null,s=a?.runtimeCompositionId||u||null,l=null;try{l=new URL(o,document.baseURI)}catch{l=null}ir(r);try{let d=u!=null?document.querySelector(`template#${CSS.escape(u)}-template`):null;if(d){await rr({host:r,authoredCompositionId:u,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:d.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let m=await fetch(o);if(!m.ok)throw new Error(`HTTP ${m.status}`);let f=await m.text(),S=new DOMParser().parseFromString(f,"text/html");xa(S,l);let y=(u?S.querySelector(`template#${CSS.escape(u)}-template`):null)??S.querySelector("template"),b=y?y.content:S.body,A=y?void 0:Array.from(S.head.querySelectorAll("style")),_=y?void 0:Array.from(S.head.querySelectorAll("script")),N=Array.from(S.head.querySelectorAll('link[rel="stylesheet"], link[rel="preconnect"]'));await rr({host:r,authoredCompositionId:u,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:b,hasTemplate:!!y,fallbackBodyInnerHtml:S.body.innerHTML,compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,headStyles:A,headScripts:_,headLinks:N,declaredVariableDefaults:vt(S.documentElement),onDiagnostic:e.onDiagnostic})}catch(d){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:u,runtimeCompositionId:s,hostCompositionSrc:o,errorMessage:d instanceof Error?d.message:"unknown_error"}}),ir(r)}}))}function Zd(e,t,n){let r={...e.declaredVariableDefaults??(t instanceof Element?vt(t):{}),...Yr(e.host)};Jr(e.host),Object.keys(r).length>0?(window.__hfVariablesByComp||(window.__hfVariablesByComp={}),window.__hfVariablesByComp[n]=r,ci(e.host,{...r,...mn()})):window.__hfVariablesByComp&&delete window.__hfVariablesByComp[n]}function ef(e){return e instanceof HTMLElement?e.dataset.captionWrapper!=="true"?e:e.querySelector(":scope > span")??null:null}function tf(){let e=[],t=document.querySelectorAll(".caption-group");for(let n of t)for(let i of n.children){if(!(i instanceof HTMLElement))continue;let r=i.dataset.captionWrapper==="true"?i.querySelector(":scope > span"):i.tagName==="SPAN"?i:null;r&&e.push(r)}return e}function nf(e){let t=e.parentElement;if(t?.dataset.captionWrapper==="true")return t;let n=document.createElement("span");return n.style.display="inline-block",n.dataset.captionWrapper="true",e.parentNode?.insertBefore(n,e),n.appendChild(e),n}function sr(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=tf();for(let i of t){let r=null;if(i.wordId&&(r=ef(document.getElementById(i.wordId))),!r&&i.wordIndex!==void 0&&(r=n[i.wordIndex]??null),!r)continue;let o={},a={};if(i.x!==void 0&&(o.x=i.x),i.y!==void 0&&(o.y=i.y),i.scale!==void 0&&(o.scale=i.scale),i.rotation!==void 0&&(o.rotation=i.rotation),i.opacity!==void 0&&(a.opacity=i.opacity),i.fontSize!==void 0&&(a.fontSize=`${i.fontSize}px`),i.fontWeight!==void 0&&(a.fontWeight=i.fontWeight),i.fontFamily!==void 0&&(a.fontFamily=i.fontFamily),i.activeColor||i.dimColor){let s=e.getTweensOf(r).filter(d=>d.vars.color!==void 0).sort((d,m)=>d.startTime()-m.startTime()),l=s[0]?String(s[0].vars.color):"";for(let d of s)String(d.vars.color)===l?i.dimColor&&(d.vars.color=i.dimColor):i.activeColor&&(d.vars.color=i.activeColor);i.dimColor&&e.set(r,{color:i.dimColor})}if(Object.keys(a).length>0&&e.set(r,a),Object.keys(o).length>0){let u=nf(r);e.set(u,o)}}}).catch(()=>{})}var Ma="data-hf-edit-base-x",Na="data-hf-edit-base-y",ar="data-hf-edit-original-translate",Pn=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},rf=e=>{let t=[],n=0,i="";for(let r of e.trim())r==="("&&(n+=1),r===")"&&(n=Math.max(0,n-1)),/\s/.test(r)&&n===0?(i&&t.push(i),i=""):i+=r;return i&&t.push(i),t},wa=/^-?(?:\d+(?:\.\d+)?|\.\d+)px$/,lr=(e,t)=>wa.test(e)&&wa.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,of=(e,t,n)=>{if(!e||e==="none")return`${t} ${n}`;let[i,r,o]=rf(e);if(i===void 0)return`${t} ${n}`;if(r===void 0)return`${lr(i,t)} ${n}`;let a=o===void 0?"":` ${o}`;return`${lr(i,t)} ${lr(r,n)}${a}`},sf=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},af=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let n=e.ownerDocument.defaultView,i=n?n.getComputedStyle(e).getPropertyValue("translate").trim():"";return i==="none"?"":i}catch{return""}},Ca=new WeakMap;function lf(e,t){let n=Ca.get(e);if(!t?.force&&n!==void 0&&e.style.getPropertyValue("translate")!==n){ot("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let i=Pn(e.getAttribute("data-x"))-Pn(e.getAttribute(Ma)),r=Pn(e.getAttribute("data-y"))-Pn(e.getAttribute(Na));e.hasAttribute(ar)||e.setAttribute(ar,af(e)),n===void 0&&sf(e);let o=e.getAttribute(ar)??"",a=of(o,`${i}px`,`${r}px`);e.style.setProperty("translate",a),Ca.set(e,e.style.getPropertyValue("translate"))}function On(e){let t=e.querySelectorAll(`[${Ma}], [${Na}]`),n=e.defaultView?.HTMLElement,i=0;for(let r=0;r<t.length;r++){let o=t[r];(n?o instanceof n:typeof o.style?.setProperty=="function")&&(lf(o),i+=1)}return i}var Fa="__hfPositionEditsSeekReapplyWrapped",_a=new WeakSet,Ta=new WeakMap,va=new WeakMap;function La(e){let t=e,n=()=>{try{On(t.document)}catch{}},i=m=>typeof m=="function"&&(_a.has(m)||!!m[Fa]),r=m=>{_a.add(m);try{Object.defineProperty(m,Fa,{value:!0})}catch{}},o=m=>{if(typeof m!="function"||i(m))return m;let f=function(...x){let S=m.apply(this,x);return n(),S};return r(f),f},a=(m,f)=>{let x=Ta.get(m);if(x?.has(f))return!0;let S=Object.getOwnPropertyDescriptor(m,f);if(S?.configurable===!1){let A=m[f];return typeof A=="function"&&(m[f]=o(A),n()),!1}let y=m[f],b=S?.set;return Object.defineProperty(m,f,{configurable:!0,enumerable:S?.enumerable??!0,get:()=>y,set:A=>{y=o(A),b?.call(m,A)}}),y=o(y),x??(x=new Set),x.add(f),Ta.set(m,x),n(),!0},u=(m,f)=>{let x=va.get(t),S=Object.getOwnPropertyDescriptor(t,m);if(!x?.has(m)){if(S?.configurable===!1){let A=t[m];return A?a(A,f):!1}let b=t[m];Object.defineProperty(t,m,{configurable:!0,enumerable:S?.enumerable??!0,get:()=>b,set:A=>{b=A,b&&a(b,f)}}),x??(x=new Set),x.add(m),va.set(t,x)}let y=t[m];return y?a(y,f):!1},s=()=>{let m=u("__hf","seek"),f=u("__player","renderSeek");return m&&f};if(s())return;let l=120,d=t.setInterval(()=>{if(s()){t.clearInterval(d);return}l-=1,l<=0&&t.clearInterval(d)},50)}function Bn(e){let t=window,i=e.closest("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()??"",r=i?t.__hfVariablesByComp?.[i]:void 0;if(r)return r;let o=t.__hyperframes?.getVariables?.();return o&&typeof o=="object"?o:t.__hfVariables??{}}function Hn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var Ra=new Set(["img","video","audio","source"]);function uf(e){if(typeof e=="string"&&e.length>0)return e;if(e!==null&&typeof e=="object"){let t=e.url;if(typeof t=="string"&&t.length>0)return t}return null}function cf(e){let t=e.replace(/[\u0000-\u0020]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return!0;let i=n[1]?.toLowerCase();return i?i==="https"||i==="http"||i==="blob"?!0:i==="data"?/^data:image\//i.test(t):!1:!1}function df(e){return e.replace(/[;{}<>\r\n]/g,"")}function ff(e){if(Hn(e))return String(e);if(e!==null&&typeof e=="object"){let t=e.name;if(typeof t=="string"&&t.length>0)return t}return null}function ur(e,t){let n=e.closest("[data-composition-id]"),i=t.get(n);if(i)return i;let r=Bn(e);return t.set(n,r),r}function mf(e,t){if(e.childElementCount===0){e.textContent=t;return}let n=!1;for(let i of Array.from(e.childNodes))i.nodeType===Node.TEXT_NODE&&(i.nodeValue=n?"":t,n=!0);n||e.insertBefore(e.ownerDocument.createTextNode(t),e.firstChild)}function pf(e){return e.querySelector("[data-hf-root]")??e.getElementById("stage")??e.body?.firstElementChild??e.body}function hf(e,t){let n=new Set,i=pf(e);i&&n.add(i);for(let r of Array.from(e.querySelectorAll("[data-composition-id]")))n.add(r);for(let r of n){let o=ur(r,t);for(let[a,u]of Object.entries(o)){let s=ff(u);s!==null&&r instanceof HTMLElement&&r.style.setProperty(`--${a}`,df(s))}}}function cr(e){let t=new Map;hf(e,t);for(let n of Array.from(e.querySelectorAll("[data-var-src]"))){let i=n.getAttribute("data-var-src")?.trim();if(!i)continue;if(!Ra.has(n.tagName.toLowerCase())){console.warn(`[hyperframes] Ignoring data-var-src on <${n.tagName.toLowerCase()}>: variable-bound src is only allowed on ${Array.from(Ra).join("/")}.`);continue}let r=uf(ur(n,t)[i]);if(r!==null){if(!cf(r)){console.warn(`[hyperframes] Ignoring data-var-src="${i}": unsafe URL protocol.`);continue}n.setAttribute("src",r)}}for(let n of Array.from(e.querySelectorAll("[data-var-text]"))){let i=n.getAttribute("data-var-text")?.trim();if(!i)continue;let r=ur(n,t)[i];Hn(r)&&mf(n,String(r))}}var ge=class extends Error{constructor(n,i=null){super(i==null?n:`${n} at line ${i}`);he(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=i}},gf=[0,0,0],xf=[1,1,1],fr=64;function bf(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];if(i==='"'&&(t=!t),i==="#"&&!t)return e.slice(0,n)}return e}function Qe(e,t){let n=Number(e);if(!Number.isFinite(n))throw new ge(`Invalid number "${e}"`,t);return n}function ka(e,t,n){if(e.length!==3)throw new ge(`${t} expects three numbers`,n);return[Qe(e[0],n),Qe(e[1],n),Qe(e[2],n)]}function Da(e,t,n){if(!e)throw new ge(`${t} expects a size`,n);let i=Number(e);if(!Number.isInteger(i)||i<2)throw new ge(`${t} must be an integer greater than 1`,n);return i}function yf(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new ge("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function Sf(e){let t=/^TITLE\s+"([^"]*)"\s*$/i.exec(e);if(t)return t[1]??null;let n=/^TITLE\s+(.+)\s*$/i.exec(e);return n&&(n[1]??"").trim()||null}function Ef(e){return/^[+-]?(?:\d|\.\d)/.test(e)}function Ia(e,t={}){let n=t.maxSize??fr,i=null,r=gf,o=xf,a=null,u=null,s=[],l=e.replace(/^\uFEFF/,"").split(/\r?\n/);for(let m=0;m<l.length;m++){let f=m+1,x=bf(l[m]??"").trim();if(!x)continue;let S=x.split(/\s+/),y=(S[0]??"").toUpperCase(),b=S.slice(1);if(y==="TITLE"){i=Sf(x);continue}if(y==="DOMAIN_MIN"){r=ka(b,y,f);continue}if(y==="DOMAIN_MAX"){o=ka(b,y,f);continue}if(y==="LUT_3D_INPUT_RANGE"){if(b.length!==2)throw new ge(`${y} expects two numbers`,f);let A=Qe(b[0],f),_=Qe(b[1],f);if(_<=A)throw new ge("LUT_3D_INPUT_RANGE max must exceed min",f);r=[A,A,A],o=[_,_,_];continue}if(y==="LUT_1D_SIZE"){a=Da(b[0],y,f);continue}if(y==="LUT_3D_SIZE"){if(u=Da(b[0],y,f),u>n)throw new ge(`LUT_3D_SIZE ${u} exceeds max ${n}`,f);continue}if(!Ef(y)){if(y.startsWith("LUT_"))throw new ge(`Unsupported cube keyword ${y}`,f);continue}if(!u)throw a?new ge("1D cube LUTs are not supported yet",f):new ge("LUT data appears before LUT_3D_SIZE",f);if(S.length!==3)throw new ge("LUT data rows must contain three numbers",f);s.push(Qe(S[0],f),Qe(S[1],f),Qe(S[2],f))}if(a&&u)throw new ge("Mixed 1D and 3D cube LUTs are not supported yet");if(!u)throw a?new ge("1D cube LUTs are not supported yet"):new ge("Missing LUT_3D_SIZE");yf(r,o);let d=u*u*u;if(s.length!==d*3)throw new ge(`Expected ${d} LUT rows for size ${u}, found ${s.length/3}`);return{title:i,size:u,domainMin:r,domainMax:o,data:new Float32Array(s)}}function Af(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function dr(e){return Math.round(Af(e)*255)}function Pa(e){let t=e.size,n=t*t,i=t,r=new Uint8Array(n*i*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let u=0;u<t;u++){let s=((o*t+a)*t+u)*3,l=(a*n+o*t+u)*4;r[l]=dr(e.data[s]??0),r[l+1]=dr(e.data[s+1]??0),r[l+2]=dr(e.data[s+2]??0),r[l+3]=255}return{width:n,height:i,data:r}}var ze=new Map,wf="data-hf-color-grading-canvas",Cf="__hf_color_grading_canvas__";function Va(){if(typeof MutationObserver>"u"||typeof document>"u")return;let e=document.documentElement;if(!e)return;let t=i=>{i instanceof HTMLElement&&(i.hasAttribute(bn)||i.setAttribute(bn,i.style.opacity))},n=i=>{if(i instanceof Element){i.hasAttribute(Ue)&&t(i);for(let r of i.querySelectorAll(`[${Ue}]`))t(r)}};n(e),new MutationObserver(i=>{for(let r of i){for(let o of r.addedNodes)n(o);r.type==="attributes"&&r.target instanceof Element&&r.target.hasAttribute(Ue)&&t(r.target)}}).observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ue]})}var Ff=16,nn={enabled:!1,position:.5,softness:0,lineWidth:2};function mr(e){let t=e.getAttribute(Ue);return t==null?null:Co(t,Bn(e))}var _f=["attribute vec2 a_pos;","varying vec2 v_uv;","void main(){"," v_uv = a_pos * 0.5 + 0.5;"," gl_Position = vec4(a_pos, 0.0, 1.0);","}"].join(`
|
|
349
|
+
`),Tf=["#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","varying vec2 v_uv;","uniform sampler2D u_source;","uniform sampler2D u_blurSource;","uniform sampler2D u_lut;","uniform vec2 u_resolution;","uniform vec2 u_uvScale;","uniform vec2 u_uvOffset;","uniform float u_blurReady;","uniform float u_lutEnabled;","uniform float u_lutSize;","uniform vec2 u_lutTextureSize;","uniform vec3 u_lutDomainMin;","uniform vec3 u_lutDomainMax;","uniform float u_lutIntensity;","uniform float u_exposure;","uniform float u_contrast;","uniform float u_highlights;","uniform float u_shadows;","uniform float u_whites;","uniform float u_blacks;","uniform float u_temperature;","uniform float u_tint;","uniform float u_vibrance;","uniform float u_saturation;","uniform float u_vignette;","uniform float u_vignetteMidpoint;","uniform float u_vignetteRoundness;","uniform float u_vignetteFeather;","uniform float u_grain;","uniform float u_grainSize;","uniform float u_grainRoughness;","uniform float u_grainSeed;","uniform float u_blur;","uniform float u_pixelate;","uniform float u_intensity;","uniform float u_compareEnabled;","uniform float u_comparePosition;","uniform float u_compareSoftness;","uniform float u_compareLineWidth;","float lumaOf(vec3 c){ return dot(c, vec3(0.2126, 0.7152, 0.0722)); }","float grainHash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }","float colorSaturation(vec3 c){ return max(max(c.r, c.g), c.b) - min(min(c.r, c.g), c.b); }","vec2 clampUv(vec2 uv){ return clamp(uv, vec2(0.0), vec2(1.0)); }","vec4 sampleSource(vec2 uv){ return texture2D(u_source, clampUv(uv)); }","vec4 sampleBlur(vec2 uv){ return texture2D(u_blurSource, clampUv(uv)); }","vec4 sampleMedia(vec2 uv){"," float pixel = clamp(u_pixelate, 0.0, 1.0);"," vec2 sampleUv = uv;"," if (pixel > 0.0) {"," float blockSize = mix(1.0, 48.0, pixel);"," vec2 cells = max(u_resolution / blockSize, vec2(1.0));"," sampleUv = (floor(clamp(uv, vec2(0.0), vec2(0.999999)) * cells) + 0.5) / cells;"," }"," vec4 base = sampleSource(sampleUv);"," float blur = clamp(u_blur, 0.0, 1.0);"," if (blur > 0.0 && u_blurReady > 0.5) {"," base = mix(base, sampleBlur(sampleUv), blur);"," }"," return base;","}","vec3 sampleLut(float r, float g, float b){"," float size = max(u_lutSize, 2.0);"," float x = (r + b * size + 0.5) / max(u_lutTextureSize.x, 1.0);"," float y = (g + 0.5) / max(u_lutTextureSize.y, 1.0);"," return texture2D(u_lut, vec2(x, y)).rgb;","}","vec3 applyLut(vec3 color){"," if (u_lutEnabled < 0.5) return color;"," float size = max(u_lutSize, 2.0);"," vec3 span = max(u_lutDomainMax - u_lutDomainMin, vec3(0.00001));"," vec3 scaled = clamp((color - u_lutDomainMin) / span, 0.0, 1.0) * (size - 1.0);"," vec3 lo = floor(scaled);"," vec3 hi = min(lo + 1.0, vec3(size - 1.0));"," vec3 f = scaled - lo;"," vec3 c000 = sampleLut(lo.r, lo.g, lo.b);"," vec3 c100 = sampleLut(hi.r, lo.g, lo.b);"," vec3 c010 = sampleLut(lo.r, hi.g, lo.b);"," vec3 c110 = sampleLut(hi.r, hi.g, lo.b);"," vec3 c001 = sampleLut(lo.r, lo.g, hi.b);"," vec3 c101 = sampleLut(hi.r, lo.g, hi.b);"," vec3 c011 = sampleLut(lo.r, hi.g, hi.b);"," vec3 c111 = sampleLut(hi.r, hi.g, hi.b);"," vec3 c00 = mix(c000, c100, f.r);"," vec3 c10 = mix(c010, c110, f.r);"," vec3 c01 = mix(c001, c101, f.r);"," vec3 c11 = mix(c011, c111, f.r);"," vec3 c0 = mix(c00, c10, f.g);"," vec3 c1 = mix(c01, c11, f.g);"," vec3 lutColor = mix(c0, c1, f.b);"," return mix(color, lutColor, clamp(u_lutIntensity, 0.0, 1.0));","}","void main(){"," vec2 uv = (v_uv - u_uvOffset) / u_uvScale;"," if (uv.x < 0.0 || uv.y < 0.0 || uv.x > 1.0 || uv.y > 1.0) {"," gl_FragColor = vec4(0.0);"," return;"," }"," vec4 originalSample = sampleSource(uv);"," vec4 sampleColor = sampleMedia(uv);"," vec3 original = originalSample.rgb;"," vec3 color = sampleColor.rgb * pow(2.0, u_exposure);"," float y = lumaOf(color);"," float shadowMask = 1.0 - smoothstep(0.0, 0.65, y);"," float highlightMask = smoothstep(0.35, 1.0, y);"," color += u_shadows * 0.35 * shadowMask;"," color += u_highlights * 0.35 * highlightMask;"," float blackPoint = clamp(u_blacks * 0.18, -0.18, 0.18);"," float whitePoint = clamp(1.0 - u_whites * 0.18, 0.82, 1.18);"," color = (color - blackPoint) / max(whitePoint - blackPoint, 0.2);"," color.r += u_temperature * 0.08 + u_tint * 0.04;"," color.b -= u_temperature * 0.08 - u_tint * 0.04;"," color.g -= u_tint * 0.08;"," color = (color - 0.5) * max(0.0, 1.0 + u_contrast) + 0.5;"," float satLuma = lumaOf(color);"," float currentSat = clamp(colorSaturation(color), 0.0, 1.0);"," float skinLike = smoothstep(0.02, 0.18, color.r - color.g) * smoothstep(0.0, 0.16, color.g - color.b) * smoothstep(0.18, 0.82, satLuma);"," float vibranceWeight = (1.0 - currentSat * 0.72) * mix(1.0, 0.55, skinLike);"," color = mix(vec3(satLuma), color, max(0.0, 1.0 + u_vibrance * vibranceWeight));"," color = mix(vec3(satLuma), color, max(0.0, 1.0 + u_saturation));"," color = clamp(color, 0.0, 1.0);"," color = clamp(applyLut(color), 0.0, 1.0);"," vec2 vignetteAspect = u_resolution.x > u_resolution.y"," ? vec2(u_resolution.x / max(u_resolution.y, 1.0), 1.0)"," : vec2(1.0, u_resolution.y / max(u_resolution.x, 1.0));"," vec2 vignetteUv = abs((v_uv - vec2(0.5)) * 2.0) * vignetteAspect;"," float vignettePower = mix(8.0, 1.8, clamp(u_vignetteRoundness * 0.5 + 0.5, 0.0, 1.0));"," float vignetteDistance = pow(pow(vignetteUv.x, vignettePower) + pow(vignetteUv.y, vignettePower), 1.0 / vignettePower);"," float vignetteMidpoint = mix(0.22, 1.08, clamp(u_vignetteMidpoint, 0.0, 1.0));"," float vignetteFeather = mix(0.08, 0.72, clamp(u_vignetteFeather, 0.0, 1.0));"," float vignetteMask = smoothstep(vignetteMidpoint, vignetteMidpoint + vignetteFeather, vignetteDistance);"," color *= 1.0 - vignetteMask * clamp(u_vignette, 0.0, 1.0) * 0.75;"," float grainAmount = clamp(u_grain, 0.0, 1.0);"," if (grainAmount > 0.0) {"," float grainPixelSize = mix(1.0, 6.0, clamp(u_grainSize, 0.0, 1.0));"," vec2 grainCoord = floor(gl_FragCoord.xy / grainPixelSize) + vec2(u_grainSeed, u_grainSeed * 1.37);"," float grainBase = grainHash(grainCoord) - grainHash(grainCoord + vec2(19.19, 73.31));"," float grainFine = grainHash(gl_FragCoord.xy + vec2(u_grainSeed * 2.11, u_grainSeed * 0.71)) - 0.5;"," float grain = mix(grainBase * 0.7, grainBase + grainFine * 0.35, clamp(u_grainRoughness, 0.0, 1.0));"," float grainLuma = lumaOf(color);"," float grainMask = smoothstep(0.02, 0.55, grainLuma) * (1.0 - smoothstep(0.88, 1.0, grainLuma));"," color += grain * grainAmount * mix(0.025, 0.08, grainMask);"," }"," color = clamp(color, 0.0, 1.0);"," vec3 graded = mix(original, color, u_intensity);"," if (u_compareEnabled > 0.5) {"," float pos = clamp(u_comparePosition, 0.0, 1.0);"," float softness = max(u_compareSoftness, 0.00001);"," float afterMask = smoothstep(pos - softness, pos + softness, v_uv.x);"," vec3 splitColor = mix(original, graded, afterMask);"," float lineMask = 0.0;"," if (u_compareLineWidth > 0.0) {"," float lineWidth = max(u_compareLineWidth / max(u_resolution.x, 1.0), 0.00001);"," lineMask = 1.0 - smoothstep(lineWidth, lineWidth * 1.8, abs(v_uv.x - pos));"," }"," gl_FragColor = vec4(mix(splitColor, vec3(1.0), lineMask * 0.82), sampleColor.a);"," return;"," }"," gl_FragColor = vec4(graded, sampleColor.a);","}"].join(`
|
|
350
|
+
`),vf=["#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","varying vec2 v_uv;","uniform sampler2D u_source;","uniform vec2 u_resolution;","uniform vec2 u_direction;","uniform float u_radius;","vec4 readSource(vec2 uv){"," vec4 color = texture2D(u_source, clamp(uv, vec2(0.0), vec2(1.0)));"," color.rgb *= color.a;"," return color;","}","void main(){"," vec2 stepUv = u_direction * max(u_radius, 0.0) / max(u_resolution, vec2(1.0)) / 12.0;"," vec4 color = readSource(v_uv) * 0.08077993;"," color += readSource(v_uv + stepUv * 1.0) * 0.07918038;"," color += readSource(v_uv - stepUv * 1.0) * 0.07918038;"," color += readSource(v_uv + stepUv * 2.0) * 0.07456928;"," color += readSource(v_uv - stepUv * 2.0) * 0.07456928;"," color += readSource(v_uv + stepUv * 3.0) * 0.06747307;"," color += readSource(v_uv - stepUv * 3.0) * 0.06747307;"," color += readSource(v_uv + stepUv * 4.0) * 0.05865827;"," color += readSource(v_uv - stepUv * 4.0) * 0.05865827;"," color += readSource(v_uv + stepUv * 5.0) * 0.04899551;"," color += readSource(v_uv - stepUv * 5.0) * 0.04899551;"," color += readSource(v_uv + stepUv * 6.0) * 0.03931982;"," color += readSource(v_uv - stepUv * 6.0) * 0.03931982;"," color += readSource(v_uv + stepUv * 7.0) * 0.03031761;"," color += readSource(v_uv - stepUv * 7.0) * 0.03031761;"," color += readSource(v_uv + stepUv * 8.0) * 0.02245983;"," color += readSource(v_uv - stepUv * 8.0) * 0.02245983;"," color += readSource(v_uv + stepUv * 9.0) * 0.01598624;"," color += readSource(v_uv - stepUv * 9.0) * 0.01598624;"," color += readSource(v_uv + stepUv * 10.0) * 0.01093238;"," color += readSource(v_uv - stepUv * 10.0) * 0.01093238;"," color += readSource(v_uv + stepUv * 11.0) * 0.00718308;"," color += readSource(v_uv - stepUv * 11.0) * 0.00718308;"," color += readSource(v_uv + stepUv * 12.0) * 0.00453456;"," color += readSource(v_uv - stepUv * 12.0) * 0.00453456;"," if (color.a > 0.0001) color.rgb /= color.a;"," gl_FragColor = color;","}"].join(`
|
|
351
|
+
`);function ut(e){return e instanceof HTMLVideoElement||e instanceof HTMLImageElement}function Oa(e,t,n){let i=e.createShader(n);return i?(e.shaderSource(i,t),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(M("runtime.colorGrading.compileShader",e.getShaderInfoLog(i)),e.deleteShader(i),null)):null}function za(e,t=Tf){let n=Oa(e,_f,e.VERTEX_SHADER),i=Oa(e,t,e.FRAGMENT_SHADER);if(!n||!i)return n&&e.deleteShader(n),i&&e.deleteShader(i),null;let r=e.createProgram();return r?(e.attachShader(r,n),e.attachShader(r,i),e.linkProgram(r),e.deleteShader(n),e.deleteShader(i),e.getProgramParameter(r,e.LINK_STATUS)?r:(M("runtime.colorGrading.linkProgram",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function hr(e,t=e.LINEAR){let n=e.createTexture();return n?(e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null),n):null}function Mf(e,t){let n=za(e,vf);return n?{program:n,quad:t,position:e.getAttribLocation(n,"a_pos"),source:e.getUniformLocation(n,"u_source"),resolution:e.getUniformLocation(n,"u_resolution"),direction:e.getUniformLocation(n,"u_direction"),radius:e.getUniformLocation(n,"u_radius")}:null}function Ba(e){let t=hr(e),n=e.createFramebuffer();if(!t||!n)return t&&e.deleteTexture(t),n&&e.deleteFramebuffer(n),null;e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),i!==e.FRAMEBUFFER_COMPLETE?(e.deleteTexture(t),e.deleteFramebuffer(n),null):{texture:t,framebuffer:n,width:1,height:1}}function Ha(e,t,n,i){t.width===n&&t.height===i||(t.width=n,t.height=i,e.bindTexture(e.TEXTURE_2D,t.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n,i,0,e.RGBA,e.UNSIGNED_BYTE,null))}function ja(e){let t=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0});if(!t)return null;let n=za(t),i=hr(t),r=hr(t,t.NEAREST);if(!n||!i||!r)return n&&t.deleteProgram(n),i&&t.deleteTexture(i),r&&t.deleteTexture(r),null;let o=t.createBuffer();return o?(t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),t.STATIC_DRAW),{gl:t,program:{program:n,texture:i,lutTexture:r,quad:o,position:t.getAttribLocation(n,"a_pos"),source:t.getUniformLocation(n,"u_source"),blurSource:t.getUniformLocation(n,"u_blurSource"),lut:t.getUniformLocation(n,"u_lut"),resolution:t.getUniformLocation(n,"u_resolution"),uvScale:t.getUniformLocation(n,"u_uvScale"),uvOffset:t.getUniformLocation(n,"u_uvOffset"),blurReady:t.getUniformLocation(n,"u_blurReady"),lutEnabled:t.getUniformLocation(n,"u_lutEnabled"),lutSize:t.getUniformLocation(n,"u_lutSize"),lutTextureSize:t.getUniformLocation(n,"u_lutTextureSize"),lutDomainMin:t.getUniformLocation(n,"u_lutDomainMin"),lutDomainMax:t.getUniformLocation(n,"u_lutDomainMax"),lutIntensity:t.getUniformLocation(n,"u_lutIntensity"),exposure:t.getUniformLocation(n,"u_exposure"),contrast:t.getUniformLocation(n,"u_contrast"),highlights:t.getUniformLocation(n,"u_highlights"),shadows:t.getUniformLocation(n,"u_shadows"),whites:t.getUniformLocation(n,"u_whites"),blacks:t.getUniformLocation(n,"u_blacks"),temperature:t.getUniformLocation(n,"u_temperature"),tint:t.getUniformLocation(n,"u_tint"),vibrance:t.getUniformLocation(n,"u_vibrance"),saturation:t.getUniformLocation(n,"u_saturation"),vignette:t.getUniformLocation(n,"u_vignette"),vignetteMidpoint:t.getUniformLocation(n,"u_vignetteMidpoint"),vignetteRoundness:t.getUniformLocation(n,"u_vignetteRoundness"),vignetteFeather:t.getUniformLocation(n,"u_vignetteFeather"),grain:t.getUniformLocation(n,"u_grain"),grainSize:t.getUniformLocation(n,"u_grainSize"),grainRoughness:t.getUniformLocation(n,"u_grainRoughness"),grainSeed:t.getUniformLocation(n,"u_grainSeed"),blur:t.getUniformLocation(n,"u_blur"),pixelate:t.getUniformLocation(n,"u_pixelate"),intensity:t.getUniformLocation(n,"u_intensity"),compareEnabled:t.getUniformLocation(n,"u_compareEnabled"),comparePosition:t.getUniformLocation(n,"u_comparePosition"),compareSoftness:t.getUniformLocation(n,"u_compareSoftness"),compareLineWidth:t.getUniformLocation(n,"u_compareLineWidth")}}):(t.deleteProgram(n),t.deleteTexture(i),t.deleteTexture(r),null)}function Nf(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Lf(e){if(!Nf(e))return{...nn};let t=(n,i,r,o)=>{let a=typeof n=="number"?n:Number(n);return Math.min(o,Math.max(r,Number.isFinite(a)?a:i))};return{enabled:e.enabled===!0,position:t(e.position,nn.position,0,1),softness:t(e.softness,nn.softness,0,.25),lineWidth:t(e.lineWidth,nn.lineWidth,0,12)}}function qa(e){try{let t=new URL(e,document.baseURI);return t.protocol==="data:"?{href:t.href}:t.protocol!=="http:"&&t.protocol!=="https:"?{error:"LUT must be project-local or a data URL"}:t.origin!==window.location.origin?{error:"Remote LUT URLs are not supported"}:{href:t.href}}catch{return{error:"Invalid LUT URL"}}}function xr(e){return e instanceof Error?e.message:"LUT failed to load"}function Rf(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0)%1e4}function kf(e){let t=e.id||e.currentSrc||e.getAttribute("src")||`${e.tagName}:${Array.prototype.indexOf.call(e.parentNode?.children??[],e)}`;return Rf(t)}function Df(e){let t=qa(e);if("error"in t)return{state:"error",message:t.error};let n=ze.get(t.href);if(n)return n;let i=fetch(t.href,{credentials:"same-origin"}).then(o=>{if(!o.ok)throw new Error(`Failed to load LUT (${o.status})`);return o.text()}).then(o=>Ia(o,{maxSize:fr})),r={state:"pending",promise:i};for(;ze.size>=Ff;){let o=ze.keys().next().value;if(!o)break;ze.delete(o)}return ze.set(t.href,r),i.then(o=>{ze.get(t.href)===r&&ze.set(t.href,{state:"ready",lut:o})},o=>{ze.get(t.href)===r&&ze.set(t.href,{state:"error",message:xr(o)})}),r}function Ga(e,t,n){if(e.lut?.src===t)return e.lut;let i=Pa(n),{gl:r,program:o}=e;try{return r.activeTexture(r.TEXTURE2),r.bindTexture(r.TEXTURE_2D,o.lutTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,i.width,i.height,0,r.RGBA,r.UNSIGNED_BYTE,i.data),e.lut={src:t,size:n.size,domainMin:n.domainMin,domainMax:n.domainMax,textureWidth:i.width,textureHeight:i.height},e.lutError=null,e.lutLoadingSrc=null,e.lut}catch(a){return e.lut=null,e.lutError=xr(a),e.lutLoadingSrc=null,M("runtime.colorGrading.uploadLut",a),null}}function Gn(e,t){e.deleteTexture(t.texture),e.deleteFramebuffer(t.framebuffer)}function $a(e){let t=e.effectTargets;t&&(e.gl.deleteProgram(t.blurProgram.program),Gn(e.gl,t.scratch),Gn(e.gl,t.blur),e.effectTargets=null)}function Ka(e){$a(e),e.gl.deleteTexture(e.program.texture),e.gl.deleteTexture(e.program.lutTexture),e.gl.deleteBuffer(e.program.quad),e.gl.deleteProgram(e.program.program)}function If(e){let t=ja(e.canvas);return t?(Ka(e),e.gl=t.gl,e.program=t.program,e.lut=null,e.lutLoadingSrc=null,e.lutError=null,e.effectError=null,!0):!1}function gr(e){if(!e.sourceHidden)return;e.element.removeAttribute(Rt);let t=e.element.style.getPropertyValue("opacity"),n=e.element.style.getPropertyPriority("opacity");t==="0"&&n==="important"&&(e.sourceInlineOpacity===null?e.element.style.removeProperty("opacity"):e.element.style.setProperty("opacity",e.sourceInlineOpacity,e.sourceInlineOpacityPriority)),e.sourceHidden=!1}function Pf(e){if(e.effectTargets)return e.effectTargets;let{gl:t}=e,n=Mf(t,e.program.quad),i=Ba(t),r=Ba(t);return!n||!i||!r?(n&&t.deleteProgram(n.program),i&&Gn(t,i),r&&Gn(t,r),e.effectError="Framebuffer effects unavailable",null):(e.effectError=null,e.effectTargets={blurProgram:n,scratch:i,blur:r},e.effectTargets)}function Of(e,t,n,i,r){let o=Math.max(1,Math.ceil(i)),a=Math.max(1,Math.ceil(r));return Ha(e,t,o,a),Ha(e,n,o,a),{width:o,height:a}}function Wa(e,t,n,i,r,o,a){e.bindFramebuffer(e.FRAMEBUFFER,i.framebuffer),e.viewport(0,0,r.width,r.height),e.useProgram(t.program),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,n),e.uniform1i(t.source,0),e.uniform2f(t.resolution,r.width,r.height),e.uniform2f(t.direction,o.x,o.y),e.uniform1f(t.radius,a),e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.enableVertexAttribArray(t.position),e.vertexAttribPointer(t.position,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_STRIP,0,4)}function Bf(e,t,n,i,r,o,a){let u=n;for(let s=0;s<Math.max(1,Math.floor(a));s++)Wa(e,t.blurProgram,u,t.scratch,r,{x:1,y:0},o),Wa(e,t.blurProgram,t.scratch.texture,i,r,{x:0,y:1},o),u=i.texture}function Hf(e){let t=e.grading.lut?.src.trim()??"",n=e.grading.lut?.intensity??1;if(!t||n<=0)return e.lut=null,e.lutLoadingSrc=null,e.lutError=null,null;let i=qa(t);if("error"in i)return e.lut=null,e.lutLoadingSrc=null,e.lutError=i.error,null;if(e.lut?.src===i.href)return e.lut;e.lut=null;let r=Df(t);return r.state==="ready"?Ga(e,i.href,r.lut):r.state==="error"?(e.lutError=r.message,e.lutLoadingSrc=null,null):(e.lutLoadingSrc!==i.href&&(e.lutLoadingSrc=i.href,e.lutError=null,r.promise.then(o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(Ga(e,i.href,o),De(e))},o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(e.lut=null,e.lutError=xr(o),e.lutLoadingSrc=null,De(e))})),null)}function pr(e){if(!e)return null;if(typeof e=="string"){let t=e.trim();if(!t)return null;let n=document.getElementById(t.replace(/^#/,""));if(n&&ut(n))return n;try{let i=document.querySelector(t);return i&&ut(i)?i:null}catch{return null}}if(e.hfId){let t=document.querySelector(`[data-hf-id="${CSS.escape(e.hfId)}"]`);if(t&&ut(t))return t}if(e.id){let t=document.getElementById(e.id);if(t&&ut(t))return t}if(!e.selector)return null;try{let t=Array.from(document.querySelectorAll(e.selector)),n=Math.max(0,Math.floor(Number(e.selectorIndex??0)||0)),i=t[n]??null;return i&&ut(i)?i:null}catch{return null}}function Gf(e){return e instanceof HTMLVideoElement?e.videoWidth>0&&e.videoHeight>0?{width:e.videoWidth,height:e.videoHeight}:null:e instanceof HTMLImageElement&&e.naturalWidth>0&&e.naturalHeight>0?{width:e.naturalWidth,height:e.naturalHeight}:null}function Ja(e){return e instanceof HTMLVideoElement?e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&e.videoWidth>0&&e.videoHeight>0:e instanceof HTMLImageElement?e.complete&&e.naturalWidth>0&&e.naturalHeight>0:!1}function Wf(e){if(!e.id)return null;let t=document.getElementById(`__render_frame_${e.id}__`);return t instanceof HTMLImageElement&&Ja(t)?t:null}function Uf(e){return e instanceof HTMLImageElement&&e.classList.contains("__render_frame__")}function Vf(e,t){t.parentNode&&t.nextSibling!==e.canvas&&t.parentNode.insertBefore(e.canvas,t.nextSibling)}function zf(e){if(e instanceof HTMLVideoElement){let t=Wf(e);if(t)return t}return Ja(e)?e:null}function Ua(e,t){let n=e.toLowerCase();if(n==="center")return .5;if(t==="x"){if(n==="left")return 0;if(n==="right")return 1}else{if(n==="top")return 0;if(n==="bottom")return 1}if(n.endsWith("%")){let i=Number.parseFloat(n);return Number.isFinite(i)?i/100:null}return null}function jf(e){let t=e.trim().split(/\s+/).filter(Boolean),n=.5,i=.5;for(let r=0;r<t.length;r++){let o=t[r]??"",a=Ua(o,"x"),u=Ua(o,"y");if(a!==null&&(o==="left"||o==="right"||o.endsWith("%")&&r===0)){n=a;continue}if(u!==null&&(o==="top"||o==="bottom"||o.endsWith("%")&&r>0)){i=u;continue}}return{x:n,y:i}}function qf(e,t,n,i,r,o){if(e<=0||t<=0||n<=0||i<=0)return{scaleX:1,scaleY:1,offsetX:0,offsetY:0};let a=r||"fill",u=e,s=t;if(a==="contain"||a==="cover"||a==="scale-down"){let f=a==="cover"?Math.max(e/n,t/i):Math.min(e/n,t/i);u=n*f,s=i*f,a==="scale-down"&&u>n&&s>i&&(u=n,s=i)}else a==="none"&&(u=n,s=i);let l=jf(o||"center"),d=(e-u)*l.x/e,m=(t-s)*l.y/t;return{scaleX:u/e,scaleY:s/t,offsetX:d,offsetY:m}}function $f(e,t){window.getComputedStyle(t).position==="static"&&(e.touchedParent||(e.touchedParent=t,e.parentInlinePosition=t.style.position||null),t.style.position="relative")}function Kf(e,t){let{element:n,canvas:i}=e,r=n.parentElement;r&&$f(e,r);let o=window.getComputedStyle(t);_o(i.style,o),i.style.pointerEvents="none",i.style.position="absolute",i.style.inset="auto",i.style.left=`${n.offsetLeft}px`,i.style.top=`${n.offsetTop}px`,i.style.right="auto",i.style.bottom="auto",i.style.width=`${n.offsetWidth}px`,i.style.height=`${n.offsetHeight}px`,i.style.display="block",i.style.opacity=e.sourceOpacityForCanvas,i.style.visibility=e.sourceVisibleForCanvas?"visible":"hidden";let a=n.getBoundingClientRect(),u=Math.max(0,Math.round(n.offsetWidth||a.width)),s=Math.max(0,Math.round(n.offsetHeight||a.height));return u<=0||s<=0?(i.style.display="none",null):(i.width!==u&&(i.width=u),i.height!==s&&(i.height=s),{width:u,height:s})}function Jf(e,t,n,i,r,o,a,u,s){e.uniform1i(t.source,0),e.uniform1i(t.blurSource,1),e.uniform1i(t.lut,2),e.uniform2f(t.resolution,a.width,a.height),e.uniform2f(t.uvScale,u.scaleX,u.scaleY),e.uniform2f(t.uvOffset,u.offsetX,u.offsetY),e.uniform1f(t.blurReady,r?1:0),e.uniform1f(t.lutEnabled,i?1:0),e.uniform1f(t.lutSize,i?.size??2),e.uniform2f(t.lutTextureSize,i?.textureWidth??1,i?.textureHeight??1),e.uniform3f(t.lutDomainMin,i?.domainMin[0]??0,i?.domainMin[1]??0,i?.domainMin[2]??0),e.uniform3f(t.lutDomainMax,i?.domainMax[0]??1,i?.domainMax[1]??1,i?.domainMax[2]??1),e.uniform1f(t.lutIntensity,n.lut?.intensity??0),e.uniform1f(t.exposure,n.adjust.exposure),e.uniform1f(t.contrast,n.adjust.contrast),e.uniform1f(t.highlights,n.adjust.highlights),e.uniform1f(t.shadows,n.adjust.shadows),e.uniform1f(t.whites,n.adjust.whites),e.uniform1f(t.blacks,n.adjust.blacks),e.uniform1f(t.temperature,n.adjust.temperature),e.uniform1f(t.tint,n.adjust.tint),e.uniform1f(t.vibrance,n.adjust.vibrance),e.uniform1f(t.saturation,n.adjust.saturation),e.uniform1f(t.vignette,n.details.vignette),e.uniform1f(t.vignetteMidpoint,n.details.vignetteMidpoint),e.uniform1f(t.vignetteRoundness,n.details.vignetteRoundness),e.uniform1f(t.vignetteFeather,n.details.vignetteFeather),e.uniform1f(t.grain,n.details.grain),e.uniform1f(t.grainSize,n.details.grainSize),e.uniform1f(t.grainRoughness,n.details.grainRoughness),e.uniform1f(t.grainSeed,s),e.uniform1f(t.blur,n.effects.blur),e.uniform1f(t.pixelate,n.effects.pixelate),e.uniform1f(t.intensity,n.intensity),e.uniform1f(t.compareEnabled,o.enabled?1:0),e.uniform1f(t.comparePosition,o.position),e.uniform1f(t.compareSoftness,o.softness),e.uniform1f(t.compareLineWidth,o.lineWidth)}function Xf(e){if(!e.sourceHidden){let t=e.element.getAttribute(bn);t!==null?(e.sourceInlineOpacity=t===""?null:t,e.sourceInlineOpacityPriority=""):(e.sourceInlineOpacity=e.element.style.getPropertyValue("opacity")||null,e.sourceInlineOpacityPriority=e.element.style.getPropertyPriority("opacity"))}e.element.setAttribute(Rt,"true"),e.element.style.setProperty("opacity","0","important"),e.sourceHidden=!0}function De(e){if(e.destroyed||e.contextLost)return!1;let t=zf(e.element);if(!t)return e.hasDrawn||(e.canvas.style.display="none"),!1;let n=Gf(t);if(!n)return!1;let i=t instanceof HTMLElement?t:e.element,r=e.element.style.getPropertyValue("opacity"),o=e.element.style.getPropertyPriority("opacity"),a=e.sourceHidden&&r==="0"&&o==="important",u=e.element.style.getPropertyValue("visibility"),s=Uf(t);if(s&&Vf(e,t),s||!a){let S=window.getComputedStyle(s?t:e.element);e.sourceOpacityForCanvas=S.opacity||"1",e.sourceVisibleForCanvas=(s||u!=="hidden")&&S.visibility!=="hidden"}let l=Kf(e,i);if(!l)return!1;let d=window.getComputedStyle(i),m=qf(l.width,l.height,n.width,n.height,d.objectFit,d.objectPosition),{gl:f,program:x}=e;try{let S=Hf(e);f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,x.texture),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!0),f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,t);let y=!1,b=Math.min(1,Math.max(0,e.grading.effects.blur));if(b>0){let _=Pf(e);if(_){let N=Of(f,_.scratch,_.blur,l.width,l.height);Bf(f,_,x.texture,_.blur,N,.75+Math.pow(b,1.35)*32,b>.55?3:2),y=!0}}else e.effectError=null,e.effectTargets&&$a(e);f.bindFramebuffer(f.FRAMEBUFFER,null),f.viewport(0,0,l.width,l.height),f.useProgram(x.program),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,x.texture),f.activeTexture(f.TEXTURE1),f.bindTexture(f.TEXTURE_2D,e.effectTargets?.blur.texture??x.texture),f.activeTexture(f.TEXTURE2),f.bindTexture(f.TEXTURE_2D,x.lutTexture);let A=e.grainSeed+(e.element instanceof HTMLVideoElement?Math.floor(e.element.currentTime*60):0);return Jf(f,x,e.grading,S,y,e.compare,l,m,A),f.bindBuffer(f.ARRAY_BUFFER,x.quad),f.enableVertexAttribArray(x.position),f.vertexAttribPointer(x.position,2,f.FLOAT,!1,0,0),f.drawArrays(f.TRIANGLE_STRIP,0,4),Xf(e),e.hasDrawn=!0,e.drawError=null,!0}catch(S){return e.drawError=S instanceof Error?S.message:"Shader draw failed",M("runtime.colorGrading.drawEntry",S),!1}}function He(e,t,n,i){t.addEventListener(n,i),e.cleanup.push(()=>t.removeEventListener(n,i))}function Yf(e){e.animationFrame!==null&&(window.cancelAnimationFrame(e.animationFrame),e.animationFrame=null),e.videoFrameHandle!==null&&e.element instanceof HTMLVideoElement&&(e.element.cancelVideoFrameCallback?.(e.videoFrameHandle),e.videoFrameHandle=null)}function rn(e){if(e.destroyed||!(e.element instanceof HTMLVideoElement)||e.videoFrameHandle!==null||e.animationFrame!==null)return;let t=e.element,n=t;if(typeof n.requestVideoFrameCallback=="function"){e.videoFrameHandle=n.requestVideoFrameCallback(()=>{e.videoFrameHandle=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&rn(e)});return}e.animationFrame=window.requestAnimationFrame(()=>{e.animationFrame=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&rn(e)})}function Qf(e){let t=()=>{De(e)};if(He(e,e.element,"load",t),He(e,e.element,"loadedmetadata",t),He(e,e.element,"loadeddata",t),He(e,e.element,"seeked",t),He(e,e.element,"timeupdate",t),He(e,window,"resize",t),e.element instanceof HTMLVideoElement&&(He(e,e.element,"play",()=>rn(e)),He(e,e.element,"pause",t)),He(e,e.canvas,"webglcontextlost",n=>{n.preventDefault(),e.contextLost=!0,e.drawError="WebGL context lost",e.canvas.style.display="none",gr(e)}),He(e,e.canvas,"webglcontextrestored",()=>{if(e.contextLost=!1,!If(e)){e.contextLost=!0,e.drawError="WebGL context restore failed",gr(e);return}e.drawError=null,De(e)}),typeof ResizeObserver<"u"&&(e.resizeObserver=new ResizeObserver(t),e.resizeObserver.observe(e.element)),typeof MutationObserver<"u"){let n=()=>{let a=e.element.style;return`${a.transform}|${a.translate}|${a.rotate}|${a.scale}|${a.left}|${a.top}|${a.width}|${a.height}`},i=n(),r=!1,o=new MutationObserver(()=>{r||n()!==i&&(r=!0,requestAnimationFrame(()=>{r=!1,i=n(),De(e)}))});o.observe(e.element,{attributes:!0,attributeFilter:["style"]}),e.cleanup.push(()=>o.disconnect())}}function Zf(e){if(!e.destroyed){e.destroyed=!0,Yf(e),e.resizeObserver?.disconnect();for(let t of e.cleanup)t();e.cleanup.length=0,e.canvas.remove(),Ka(e),gr(e),e.touchedParent&&(e.parentInlinePosition===null?e.touchedParent.style.removeProperty("position"):e.touchedParent.style.position=e.parentInlinePosition)}}function em(e){let t=document.createElement("canvas");return e.id&&(t.id=`${So}${e.id}`),t.className=Cf,t.setAttribute(wf,"true"),t.setAttribute("data-hyperframes-ignore",""),t.setAttribute("data-hyperframes-picker-ignore",""),t.setAttribute("data-hf-ignore",""),t.setAttribute("aria-hidden","true"),t.style.pointerEvents="none",t.style.display="none",e.parentNode?.insertBefore(t,e.nextSibling),t}function Xa(){let e=new WeakMap,t=new Set,n=null,i=!1,r=(y,b,A)=>{let _=e.get(y);if(_)return _.grading=b,_.source=A,De(_),y instanceof HTMLVideoElement&&!y.paused&&rn(_),!0;let N=em(y),$=ja(N);if(!$)return N.remove(),!1;let P={element:y,canvas:N,gl:$.gl,program:$.program,grading:b,compare:{...nn},lut:null,lutLoadingSrc:null,lutError:null,drawError:null,effectTargets:null,effectError:null,source:A,animationFrame:null,videoFrameHandle:null,resizeObserver:null,cleanup:[],touchedParent:null,parentInlinePosition:null,sourceHidden:!1,sourceInlineOpacity:null,sourceInlineOpacityPriority:"",sourceOpacityForCanvas:window.getComputedStyle(y).opacity||"1",sourceVisibleForCanvas:window.getComputedStyle(y).visibility!=="hidden",hasDrawn:!1,contextLost:!1,grainSeed:kf(y),destroyed:!1};return e.set(y,P),t.add(y),Qf(P),De(P),y instanceof HTMLVideoElement&&!y.paused&&rn(P),!0},o=(y,b)=>{if(i)return!1;let A=pr(y);if(!A)return!1;let _=e.get(A);if(!_){let N=mr(A);if(!kt(N)||!r(A,N,"attribute"))return!1;_=e.get(A)}return _?(_.compare=Lf(b),De(_),!0):!1},a=y=>{let b=e.get(y);b&&(Zf(b),e.delete(y),t.delete(y))},u=()=>{if(i)return 0;let y=new Set;document.querySelectorAll(`video[${Ue}], img[${Ue}]`).forEach(A=>{if(!ut(A))return;y.add(A);let _=mr(A);kt(_)?r(A,_,"attribute"):a(A)});for(let A of Array.from(t)){let _=e.get(A);_&&(!A.isConnected||_.source==="attribute"&&!y.has(A))&&a(A)}return t.size},s=()=>{if(i)return 0;let y=0;for(let b of Array.from(t,A=>e.get(A)))b&&De(b)&&(y+=1);return y},l=(y,b)=>{if(i)return!1;let A=pr(y);if(!A)return!1;let _=yi(b);return kt(_)?r(A,_,"live"):(a(A),!0)},d=(y,b)=>{if(!ut(y))return!1;let A=e.get(y);return A?(A.sourceVisibleForCanvas=b,!0):!1},m=y=>{let b=pr(y);if(!b)return{state:"missing",message:"Media not found"};let A=e.get(b);if(A)return A.effectError?{state:"unavailable",message:A.effectError}:A.drawError?{state:"unavailable",message:A.drawError}:A.lutError?{state:"unavailable",message:`LUT error: ${A.lutError}`}:A.grading.lut&&A.lutLoadingSrc?{state:"pending",message:"Loading LUT"}:A.canvas.style.display==="none"?{state:"pending",message:"Waiting for media frame"}:{state:"active",message:A.lut?"Shader + LUT active":"Shader active"};let _=mr(b);return kt(_)?{state:"unavailable",message:"WebGL unavailable"}:{state:"inactive",message:"No grading applied"}},f=()=>{if(!i){i=!0,n?.disconnect(),n=null;for(let y of Array.from(t))a(y)}};document.body&&(n=new MutationObserver(()=>u()),n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ue]}));let x={refresh:u,redraw:s,setGrading:l,setCompare:o,setSourceVisibility:d,getStatus:m,destroy:f},S=window;return S.__hf=S.__hf||{},S.__hf.colorGrading=x,u(),x}var Wn=class{constructor(t){he(this,"_baseTime",0);he(this,"_playStartMs",null);he(this,"_rate",1);he(this,"_duration",1/0);he(this,"_nowMs");he(this,"_audioSource",null);this._baseTime=t?.initialTime??0,this._rate=t?.rate??1,this._duration=t?.duration??1/0,this._nowMs=t?.nowMs??(()=>performance.now())}now(){if(this._playStartMs===null)return this._baseTime;if(this._audioSource){let i=null;if("currentTimeSeconds"in this._audioSource)i=this._audioSource.currentTimeSeconds;else{let{el:r,compositionStart:o,mediaStart:a}=this._audioSource;!r.paused&&Number.isFinite(r.currentTime)&&(i=(r.currentTime-a)/(r.playbackRate>0?r.playbackRate:1)*this._rate+o)}if(i!==null)return Number.isFinite(this._duration)&&i>=this._duration?this._duration:Math.max(0,i)}let t=(this._nowMs()-this._playStartMs)/1e3,n=this._baseTime+t*this._rate;return Number.isFinite(this._duration)&&n>=this._duration?this._duration:Math.max(0,n)}play(){return this._playStartMs!==null||Number.isFinite(this._duration)&&this._baseTime>=this._duration?!1:(this._playStartMs=this._nowMs(),!0)}pause(){return this._playStartMs===null?!1:(this._baseTime=this.now(),this._playStartMs=null,!0)}seek(t){let n=Number.isFinite(this._duration)?Math.max(0,Math.min(t,this._duration)):Math.max(0,t);this._baseTime=n,this._playStartMs!==null&&(this._playStartMs=this._nowMs())}isPlaying(){return this._playStartMs!==null}setRate(t){let n=Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1;this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._rate=n}getRate(){return this._rate}setDuration(t){this._duration=Number.isFinite(t)&&t>0?t:1/0,this._baseTime>this._duration&&(this._baseTime=this._duration)}getDuration(){return this._duration}attachAudioSource(t){this._audioSource=t}detachAudioSource(){this._audioSource&&this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._audioSource=null}hasAudioSource(){return this._audioSource!==null}getSource(){if(this._audioSource&&this._playStartMs!==null){if("currentTimeSeconds"in this._audioSource)return"audio";let{el:t}=this._audioSource;if(!t.paused&&Number.isFinite(t.currentTime))return"audio"}return"monotonic"}snapshot(){return{time:this.now(),playing:this.isPlaying(),rate:this._rate,duration:this._duration,source:this.getSource()}}reachedEnd(){return Number.isFinite(this._duration)&&this.now()>=this._duration}};function Ya(e){return!Number.isFinite(e)||e<=0?1:e}function tm(e,t){t||e.paused||!fn().__hfDebug||console.debug("[hyperframes] webAudioTransport claimed fallback-playing element:",e.currentSrc||e.getAttribute("src")||"")}function nm(e,t){let{elapsed:n,mediaStart:i,scheduledAt:r,safeRate:o,clipDuration:a}=t,u=Number.isFinite(a)&&a>0,s=a*o;if(n>=0){let d=s-n;return u&&d<=0?!1:(u?e.start(0,n+i,d):e.start(0,n+i),!0)}let l=-n/o;return u?e.start(r+l,i,s):e.start(r+l,i),!0}var Un=class{constructor(){he(this,"_ctx",null);he(this,"_bufferCache",new Map);he(this,"_failedSrcs",new Set);he(this,"_activeSources",[]);he(this,"_masterGain",null);he(this,"_rateAnchorCtx",0);he(this,"_rateAnchorComp",0);he(this,"_rate",1);he(this,"_paused",!0);he(this,"_playGeneration",0)}async init(){try{return this._ctx=new AudioContext,this._masterGain=this._ctx.createGain(),this._masterGain.connect(this._ctx.destination),!0}catch{return!1}}get context(){return this._ctx}getTime(){return!this._ctx||this._paused?-1:this._rateAnchorComp+(this._ctx.currentTime-this._rateAnchorCtx)*this._rate}async decodeAudioElement(t){let n=t.currentSrc||t.getAttribute("src");if(!n)return null;if(this._bufferCache.has(n))return this._bufferCache.get(n);if(this._failedSrcs.has(n)||!this._ctx)return null;let i;try{let r=await fetch(n,{cache:"no-store"});if(!r.ok)return M("webAudioTransport.fetch",new Error(`${r.status} ${n}`)),null;i=await r.arrayBuffer()}catch(r){return M("webAudioTransport.fetch",r),null}try{let r=await this._ctx.decodeAudioData(i);return this._bufferCache.set(n,r),r}catch(r){return this._failedSrcs.add(n),M("webAudioTransport.decode",r),null}}startGeneration(){return this._playGeneration+=1,this._playGeneration}currentGeneration(){return this._playGeneration}async schedulePlayback(t,n,i,r,o,a,u,s=1,l=Number.POSITIVE_INFINITY){if(!this._ctx||!this._masterGain||u!==this._playGeneration)return null;try{if(this._ctx.state==="suspended"&&await this._ctx.resume(),u!==this._playGeneration)return null;let d=Ya(s),m=this._ctx.createBufferSource();m.buffer=n,m.playbackRate.value=d;let f=this._ctx.createGain();f.gain.value=a,m.connect(f),f.connect(this._masterGain);let x=o-i,S=this._ctx.currentTime;if(this._rate=d,this._rateAnchorCtx=S,this._rateAnchorComp=o,!nm(m,{elapsed:x,mediaStart:r,scheduledAt:S,safeRate:d,clipDuration:l}))return m.disconnect(),f.disconnect(),null;let y=t.muted;t.muted=!0,tm(t,y);let b={el:t,sourceNode:m,gainNode:f,compositionStart:i,mediaStart:r,scheduledAt:S,priorMuted:y,bounded:Number.isFinite(l)&&l>0};return this._activeSources.push(b),this._paused=!1,m.addEventListener("ended",()=>{let A=this._activeSources.indexOf(b);A!==-1&&(this._activeSources.splice(A,1),t.muted=y,this._activeSources.length===0&&(this._paused=!0))}),b}catch(d){return M("webAudioTransport.schedule",d),null}}setRate(t){let n=Ya(t);if(n===this._rate)return!1;this._ctx&&!this._paused&&(this._rateAnchorComp=this.getTime(),this._rateAnchorCtx=this._ctx.currentTime),this._rate=n;for(let i of this._activeSources)try{i.sourceNode.playbackRate.value=n}catch(r){M("webAudioTransport.setRate",r)}return!0}hasBoundedActiveSources(){return this._activeSources.some(t=>t.bounded)}stopAll(){for(let t of this._activeSources){try{t.sourceNode.stop(),t.sourceNode.disconnect(),t.gainNode.disconnect()}catch{}t.el.muted=t.priorMuted}this._activeSources=[],this._paused=!0}setVolume(t){this._masterGain&&(this._masterGain.gain.value=Math.max(0,Math.min(1,t)))}setElementVolume(t,n){let i=Math.max(0,Math.min(1,n));for(let r of this._activeSources)if(r.el===t)try{r.gainNode.gain.value=i}catch(o){M("webAudioTransport.setElementVolume",o)}}setMuted(t){this._masterGain&&(this._masterGain.gain.value=t?0:1)}isActive(){return this._activeSources.length>0&&!this._paused}ownsElement(t){return!this._paused&&this._activeSources.some(n=>n.el===t)}destroy(){if(this.stopAll(),this._bufferCache.clear(),this._failedSrcs.clear(),this._ctx)try{this._ctx.close()}catch{}this._ctx=null,this._masterGain=null}};var Qa="data-hf-studio-manual-edit-gesture";function Za(e){return!Number.isInteger(e.tick)||e.tick<=0||e.tick%60!==0?!1:!(e.isPlaying&&e.hasCapturedTimeline&&e.currentTimeSeconds<2)}var br="data-hf-authored-duration",yr="data-hf-authored-end";function im(){let e=window.__HF_EXPORT_RENDER_SEEK_CONFIG,t=e?.fps,n=e?.fpsSource,i=Number(t);return!e||t==null?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"missing"}:!Number.isFinite(i)||i<=0?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"invalid"}:{fps:i,source:n==="render-options"||n==="default"?n:"unknown",rawFpsSource:n,rawFps:t,fallbackReason:e.fpsFallbackReason}}function el(){let e=Mo();On(document),cr(document);let t=im();e.canonicalFps=t.fps??e.canonicalFps,zr(e.canonicalFps),window.__HF_EXPORT_RENDER_SEEK_CONFIG&&console.info("[hyperframes] render runtime fps",{canonicalFps:e.canonicalFps,source:t.source,rawFpsSource:t.rawFpsSource,rawFps:t.rawFps,fallbackReason:t.fallbackReason});let n=null,i=null,r=null,o=[],a=new Set,u=null;if(typeof window.__hfRuntimeTeardown=="function")try{window.__hfRuntimeTeardown()}catch(c){M("runtime.init.site1",c)}let s=new Wn;e.transportClock=s;let l=new Un,d=!1;l.init().then(c=>{d=c}),(()=>{let c=window.gsap,p=window;if(!(!c?.registerPlugin||p.__hfAutoNoopRegistered))try{c.registerPlugin({name:"_auto",init:()=>!1}),p.__hfAutoNoopRegistered=!0}catch{}})(),document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden");try{Xr(document)}catch(c){M("runtime.init.cssVariables",c)}window.__timelines=window.__timelines||{};let f=()=>{let c=document.querySelector('[data-composition-id][data-root="true"]');if(c instanceof HTMLElement)return c;let p=Array.from(document.querySelectorAll("[data-composition-id]"));return p.find(g=>!g.parentElement?.closest("[data-composition-id]"))??p[0]??null};if(Array.isArray(window.__timelines)){let c=window.__timelines,p=f()?.getAttribute("data-composition-id")??"root",g={};if(c.length===1)g[p]=c[0];else for(let h=0;h<c.length;h++)g[`tl-${h}`]=c[h];window.__timelines=g}let x=f();x&&!x.hasAttribute("data-start")&&x.setAttribute("data-start","0");let S=c=>{o.push(c)},y=(c,p,g)=>{let h=g??`${c}:${JSON.stringify(p)}`;a.has(h)||(a.add(h),xe({source:"hf-preview",type:"diagnostic",code:c,details:p}))},b=c=>{let p={scale:1,focusX:960,focusY:540},g=[],h=[],E={time:c.getTime(),duration:c.getDuration(),isPlaying:c.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:c.play,pause:c.pause,seek:c.seek,getTime:c.getTime,getDuration:c.getDuration,isPlaying:c.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>p,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>g,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:c.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>h,getRenderState:()=>({...E,time:c.getTime(),duration:c.getDuration(),isPlaying:c.isPlaying()})}},A=1/60,_=.75,N=.05,$=100,P=240,T=c=>{if(c instanceof Error)return c.message||String(c);if(typeof c=="string")return c;try{return JSON.stringify(c)}catch{return String(c??"")}},w=c=>{let p=c.toLowerCase();return p.includes("cannot read properties of null")||p.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:p.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:p.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},C=c=>{if(c==null||c.trim()==="")return null;let p=Number.parseFloat(c);return!Number.isFinite(p)||p<=0?null:`${p}px`},F=()=>f(),v=()=>{let c=F();if(!c)return;let p=C(c.getAttribute("data-width")),g=C(c.getAttribute("data-height"));p&&(c.style.width=p),g&&(c.style.height=g),p&&c.style.setProperty("--comp-width",p),g&&c.style.setProperty("--comp-height",g)},R=()=>{let c=F(),p=Array.from(document.querySelectorAll("[data-composition-id]")).filter(g=>g.hasAttribute("data-duration")||g.hasAttribute("data-end"));for(let g of p){if(c&&g===c)continue;let h=g.getAttribute("data-duration"),E=g.getAttribute("data-end");h!=null&&!g.hasAttribute(br)&&g.setAttribute(br,h),E!=null&&!g.hasAttribute(yr)&&g.setAttribute(yr,E),g.removeAttribute("data-duration"),g.removeAttribute("data-end")}},V=()=>{let c=F();if(!c)return;c.style.position||(c.style.position="relative"),c.style.overflow="hidden";let p=C(c.getAttribute("data-width")),g=C(c.getAttribute("data-height"));p&&(c.style.width=p),g&&(c.style.height=g);let h=Array.from(c.children);for(let E of h){let L=E.tagName.toLowerCase();if(L==="script"||L==="style"||L==="link"||L==="meta"||!E.hasAttribute("data-start")||E.hasAttribute("data-hf-autostamped"))continue;let I=(E.style.top==="0px"||E.style.top==="0")&&(E.style.left==="0px"||E.style.left==="0")&&E.style.width==="100%"&&E.style.height==="100%",Q=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(E.style.transform);if(I&&Q&&!E.hasAttribute("data-width")&&!E.hasAttribute("data-height")){let ye=E.style.top,Ft=E.style.left,Se=E.style.width,_t=E.style.height;E.style.top="",E.style.left="",E.style.width="",E.style.height="";let ne=window.getComputedStyle(E);ne.top!=="auto"||ne.bottom!=="auto"||ne.left!=="auto"||ne.right!=="auto"||ne.width!=="0px"||ne.height!=="0px"||(E.style.top=ye,E.style.left=Ft,E.style.width=Se,E.style.height=_t)}let q=window.getComputedStyle(E),de=q.position;if(de!=="absolute"&&de!=="fixed"&&(E.style.position="absolute"),!!E.style.top||!!E.style.bottom||q.top!=="auto"||q.bottom!=="auto"||(E.style.top="0"),!!E.style.left||!!E.style.right||q.left!=="auto"||q.right!=="auto"||(E.style.left="0"),L!=="audio"){let ye=C(E.getAttribute("data-width")),Ft=C(E.getAttribute("data-height")),Se=q.width!=="0px"&&q.width!=="auto",_t=q.height!=="0px"&&q.height!=="auto";ye?!E.style.width&&!Se&&(E.style.width=ye):!E.style.width&&q.width==="0px"&&(E.style.width="100%"),Ft?!E.style.height&&!_t&&(E.style.height=Ft):!E.style.height&&q.height==="0px"&&(E.style.height="100%")}}},W=(c,p=0,g)=>$e({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:g?.includeAuthoredTimingAttrs??!0}).resolveStartForElement(c,p),ie=(c,p)=>$e({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:p?.includeAuthoredTimingAttrs??!0}).resolveDurationForElement(c),D=(c,p=0)=>!c.hasAttribute("data-hf-auto-start")&&c.hasAttribute("data-start")?Math.max(0,Number(c.getAttribute("data-start")??0)||0)+p:W(c,p),re=(c,p)=>{let g=c.tagName.toLowerCase();if(g==="script"||g==="style"||g==="link"||g==="meta")return!1;let h=g==="video"||g==="audio"?D(c,0):W(c,0),E=ie(c),L=c.getAttribute("data-composition-id");if(L){let Q=(window.__timelines??{})[L],q=null;if(Q&&typeof Q.duration=="function"){let me=Number(Q.duration());Number.isFinite(me)&&me>0&&(q=me)}!(c.hasAttribute("data-duration")||c.hasAttribute("data-end")||c.hasAttribute(br)||c.hasAttribute(yr))&&(E==null||E<=0)&&q!=null&&(E=q)}let I=E!=null&&E>0?h+E:Number.POSITIVE_INFINITY;return p>=h&&(Number.isFinite(I)?p<=I:!0)},Fe=!!document.querySelector("[data-composition-src]"),z=!1;{let c=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let p of c){let g=p.getAttribute("data-composition-id");if(g&&p.children.length===0&&document.querySelector(`template#${CSS.escape(g)}-template`)){z=!0;break}}}let X=!Fe&&!z,O=c=>{if(!c||typeof c.duration!="function")return null;try{let p=Number(c.duration());return Number.isFinite(p)?Math.max(0,p):null}catch{return null}},U=c=>typeof c=="number"&&Number.isFinite(c)&&c>A,_e=c=>{let p=Number(c.getAttribute("data-duration"));if(Number.isFinite(p)&&p>0)return p;let g=Number(c.getAttribute("data-playback-start")??c.getAttribute("data-media-start")??"0"),h=Number.isFinite(g)?Math.max(0,g):0;return Number.isFinite(c.duration)&&c.duration>h?Math.max(0,c.duration-h):null},B=()=>{let c=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(c.length===0)return null;let p=0;for(let g of c){let h=D(g,0);if(!Number.isFinite(h))continue;let E=_e(g);E==null||E<=A||(p=Math.max(p,Math.max(0,h)+E))}return p>A?p:null},k=()=>{let c=F();if(!c)return null;let p=window.__timelines??{},g=$e({timelineRegistry:p,includeAuthoredTimingAttrs:!0}),h=0,E=Number.parseFloat(c.getAttribute("data-duration")??"");Number.isFinite(E)&&E>0&&(h=E);let L=Array.from(c.querySelectorAll("[data-composition-id][data-start]"));for(let I of L){if(!(I instanceof Element)||I.parentElement?.closest("[data-composition-id]")!==c)continue;let q=g.resolveStartForElement(I,0),de=g.resolveDurationForElement(I);!Number.isFinite(q)||de==null||de<=0||(h=Math.max(h,Math.max(0,q)+de))}return h>A?h:null},H=()=>{let c=B();return typeof c!="number"||!Number.isFinite(c)||c<=A?null:c},le=c=>U(c)?Math.max(A,c*_):A,se=()=>{let c=0;for(let p of e.deterministicAdapters){let g=p.getInferredDurationSeconds;if(typeof g!="function")continue;let h=null;try{h=g()}catch(E){M("runtime.init.adapterDuration",E)}typeof h=="number"&&Number.isFinite(h)&&h>0&&(c=Math.max(c,h))}return c>A?c:null},G=(c,p=0)=>{let g=O(c),h=H(),E=k(),L=se(),I=Math.max(h??0,E??0,L??0),Q=Number.isFinite(p)&&p>A?p:0,q=0;return U(g)?q=Math.max(g,I,Q):U(I)?q=Math.max(I,Q):q=Q,q>0?Math.max(0,q):0},j=()=>{let c=window.__timelines??{},p=ne=>{let Z=Object.entries(c).filter(oe=>!!oe[1]&&typeof oe[1].play=="function"&&typeof oe[1].pause=="function");if(Z.length!==1)return{timeline:null};let ce=Z[0];if(!ce)return{timeline:null};let[fe,pe]=ce;return{timeline:pe,selectedTimelineIds:[fe],selectedDurationSeconds:O(pe),diagnostics:{code:"root_timeline_sole_registered_fallback",details:{reason:ne,soleTimelineId:fe}}}},g=$e({timelineRegistry:c,includeAuthoredTimingAttrs:!0}),h=H(),E=k(),L=Math.max(h??0,E??0)||null,I=le(L),Q=ne=>{let Z=document.querySelector(`[data-composition-id="${CSS.escape(ne)}"]`);return Z?g.resolveStartForElement(Z,0):0},q=ne=>{let Z=window.gsap;if(!Z||typeof Z.timeline!="function")return null;let ce=Z.timeline({paused:!0});for(let fe of ne)ce.add(fe.timeline,Q(fe.compositionId));return ce},de=(ne,Z)=>{if(!U(ne))return null;let ce=window.gsap;if(!ce||typeof ce.timeline!="function")return null;let fe=ce.timeline({paused:!0});if(Z)try{fe.add(Z,0)}catch(oe){M("runtime.init.site2",oe)}let pe=fe;if(typeof pe.to=="function")try{pe.to({},{duration:ne})}catch(oe){M("runtime.init.site3",oe)}return fe},me=(ne,Z)=>{let ce=ne;if(typeof ce.getChildren!="function")return[];try{let fe=ce.getChildren(!0,!0,!0)??[];if(!Array.isArray(fe))return[];let pe=[];for(let oe of Z)if(!fe.some(Le=>Le===oe.timeline))try{let Le=Q(oe.compositionId);ne.add(oe.timeline,Le),pe.push(oe.compositionId)}catch(Le){M("runtime.init.site4",Le)}return pe}catch{return[]}},te=F(),Y=te?.getAttribute("data-composition-id")??null;if(!Y)return p("root_missing_composition_id");let ye=c[Y]??null,Se=(()=>{if(!te)return[];let ne=new Set,Z=Array.from(te.querySelectorAll("[data-composition-id]")),ce=[];for(let fe of Z){let pe=fe.getAttribute("data-composition-id");if(!pe||pe===Y||ne.has(pe))continue;ne.add(pe);let oe=c[pe]??null;if(!oe||typeof oe.play!="function"||typeof oe.pause!="function")continue;let Ce=O(oe);ce.push({compositionId:pe,timeline:oe,durationSeconds:Ce??0})}return ce})(),_t=ne=>{for(let Z of ne){let ce=Z.timeline;if(typeof ce.paused=="function")try{ce.paused(!1)}catch(fe){M("runtime.init.site5",fe)}}};if(Se.length>0&&_t(Se),ye){let ne=Se.length>0?me(ye,Se):[];if((Se.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+Y+"'])"))&&(K=!0),ne.length>0)try{let oe=ye.time();ye.seek(oe,!1)}catch{}let Z=O(ye);if(!U(Z)&&Se.length>0){let oe=Se.map(Vl=>Vl.compositionId),Ce=q(Se),Le=O(Ce);if(Ce&&U(Le))return{timeline:Ce,selectedTimelineIds:oe,selectedDurationSeconds:Le,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:Y,rootDurationSeconds:Z,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:I,selectedDurationSeconds:Le,mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedTimelineIds:oe,autoNestedChildren:ne}}};let ii=de(L??0,ye),ri=O(ii);if(ii&&U(ri))return{timeline:ii,selectedTimelineIds:[Y],selectedDurationSeconds:ri,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:Y,rootDurationSeconds:Z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedDurationSeconds:ri,selectedTimelineIds:[Y],autoNestedChildren:ne}}}}if(!U(Z)&&Se.length===0){let oe=de(L??0,ye),Ce=O(oe);if(oe&&U(Ce))return{timeline:oe,selectedTimelineIds:[Y],selectedDurationSeconds:Ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:Y,rootDurationSeconds:Z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedDurationSeconds:Ce,selectedTimelineIds:[Y]}}}}let ce=te?.getAttribute("data-duration"),fe=ce?parseFloat(ce):null,pe=Math.max(U(fe)?fe:0,E??0);if(pe>0&&U(pe)&&U(Z)&&pe>=Z+.5){let oe=ye;if(typeof oe.to=="function")try{oe.to({},{duration:0},pe)}catch(Le){M("runtime.init.site6",Le)}let Ce=O(ye);if(U(Ce))return{timeline:ye,selectedTimelineIds:[Y],selectedDurationSeconds:Ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:Y,rootDurationSeconds:Z,rootDeclaredDur:fe,authoredCompositionDurationFloorSeconds:E,newDur:Ce}}}}return{timeline:ye,selectedTimelineIds:[Y],selectedDurationSeconds:Z,mediaDurationFloorSeconds:h,diagnostics:ne.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:Y,selectedDurationSeconds:Z,autoNestedChildren:ne}}:void 0}}if(Se.length>0){let ne=Se.map(fe=>fe.compositionId),Z=q(Se),ce=O(Z);if(Z)return{timeline:Z,selectedTimelineIds:ne,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:Y,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:I,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,selectedTimelineIds:ne}}}}return p("root_composition_id_unmatched_in_registry")},K=!1,Ae=()=>{if(!X)return!1;let c=e.capturedTimeline,p=O(c),g=U(p);if(c&&g&&K)return!1;let h=j();if(!h.timeline)return!1;if(c&&c===h.timeline)return typeof c.timeScale=="function"&&c.timeScale(e.playbackRate),!1;e.capturedTimeline=h.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let E=G(e.capturedTimeline,0);if(E<=0&&typeof e.capturedTimeline.progress=="function"&&(e.capturedTimeline.progress(1,!0),e.capturedTimeline.progress(0,!1),e.capturedTimeline.pause()),E>0){try{s.setDuration(E)}catch{}if(typeof e.capturedTimeline.totalTime=="function"){typeof e.capturedTimeline.progress=="function"&&e.capturedTimeline.progress(1e-4,!0);let I=Math.max(0,e.currentTime||0);e.capturedTimeline.totalTime(I,!1),e.capturedTimeline.pause()}let L=window.__hfStudioManualEditsApply;typeof L=="function"&&L(),On(document)}if(h.diagnostics&&xe({source:"hf-preview",type:"diagnostic",code:h.diagnostics.code,details:h.diagnostics.details}),xe({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:h.selectedTimelineIds??[],selectedDurationSeconds:h.selectedDurationSeconds??null,mediaDurationFloorSeconds:h.mediaDurationFloorSeconds??null}}),window.parent!==window){let L=F(),I=E>0?E:0,Q=String(I>0?I:1),q=new Set,de=new Set(document.querySelectorAll("[data-start]")),me=te=>{let Y=te.parentElement;for(;Y&&Y!==L;){if(de.has(Y))return!0;Y=Y.parentElement}return!1};if(e.capturedTimeline.getChildren)try{for(let te of e.capturedTimeline.getChildren(!0))if(typeof te.targets=="function")for(let Y of te.targets())Y instanceof HTMLElement&&Y!==L&&(Y.hasAttribute("data-start")||me(Y)||q.has(Y)||(q.add(Y),Y.setAttribute("data-start","0"),Y.setAttribute("data-duration",Q),Y.setAttribute("data-hf-autostamped","1")))}catch{}if(L instanceof HTMLElement)for(let te of L.querySelectorAll("[id]"))te instanceof HTMLElement&&te!==L&&(te.hasAttribute("data-start")||me(te)||q.has(te)||te.tagName==="SCRIPT"||te.tagName==="STYLE"||te.tagName==="LINK"||(q.add(te),te.setAttribute("data-start","0"),te.setAttribute("data-duration",Q),te.setAttribute("data-hf-autostamped","1")))}for(let L of Et)an.delete(L),Mr(L);return!0};window.__hfForceTimelineRebind=()=>{K=!1,Ae(),Lr(e.currentTime)};let we=()=>{let c=F();if(!(c instanceof HTMLElement))return;let p=c.getBoundingClientRect(),g=Number(c.getAttribute("data-width")),h=Number(c.getAttribute("data-height")),E=window.getComputedStyle(c),L=Number.isFinite(g)&&g>0&&Number.isFinite(h)&&h>0,I=p.width<=0||p.height<=0||c.clientWidth<=0||c.clientHeight<=0;!L||!I||y("root_stage_layout_zero",{compositionId:c.getAttribute("data-composition-id")??null,declaredWidth:g,declaredHeight:h,rectWidth:Math.round(p.width),rectHeight:Math.round(p.height),clientWidth:c.clientWidth,clientHeight:c.clientHeight,display:E.display,visibility:E.visibility,overflow:E.overflow},`root-stage-layout-zero:${c.getAttribute("data-composition-id")??"unknown"}`)},St=()=>{e.tornDown||(u!=null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{u=null,we()}))},Ge=()=>{i=c=>{let p=T(c.error??c.message).slice(0,P);if(!p)return;let g=w(p);xe({source:"hf-preview",type:"diagnostic",code:g.code,details:{category:g.category,message:p,filename:c.filename||null,line:Number.isFinite(c.lineno)?c.lineno:null,column:Number.isFinite(c.colno)?c.colno:null}})},r=c=>{let p=T(c.reason).slice(0,P);if(!p)return;let g=w(p);xe({source:"hf-preview",type:"diagnostic",code:`${g.code}_unhandled_rejection`,details:{category:`${g.category}-unhandled-rejection`,message:p}})},window.addEventListener("error",i),window.addEventListener("unhandledrejection",r)},Tl=()=>{let c=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let g of c){let h=()=>{if(!(g instanceof Element))return;let E=g.tagName.toLowerCase(),L=g.getAttribute("src")??g.getAttribute("href")??g.getAttribute("poster")??null,I=E==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";y(I,{tagName:E,assetUrl:L,currentSrc:(g instanceof HTMLImageElement||g instanceof HTMLMediaElement)&&g.currentSrc||null,readyState:g instanceof HTMLMediaElement?g.readyState:null,networkState:g instanceof HTMLMediaElement?g.networkState:null},`${I}:${E}:${L??"unknown"}`)};g.addEventListener("error",h),S(()=>{g.removeEventListener("error",h)})}let p=document.fonts;p&&p.ready.then(()=>{if(e.tornDown)return;let g=Array.from(p).filter(h=>h.status==="error").map(h=>h.family).filter(h=>!!h).slice(0,10);g.length!==0&&y("runtime_font_load_issue",{failedFamilies:g,totalFaces:Array.from(p).length},`runtime-font-load-issue:${g.join("|")}`)}).catch(()=>{})},vl=(c,p)=>{if(!c.timeline)return!1;let g=e.capturedTimeline;if(g&&g===c.timeline)return!1;let h=Math.max(0,e.currentTime||0),E=e.isPlaying;e.capturedTimeline=c.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(h,!1),E&&e.capturedTimeline.play()}catch(L){M("runtime.init.site7",L)}return xe({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:p,previousTime:h,selectedTimelineIds:c.selectedTimelineIds??[],selectedDurationSeconds:c.selectedDurationSeconds??null,mediaDurationFloorSeconds:c.mediaDurationFloorSeconds??null}}),!0},tt=null,vr=!1,Et=new Set,an=new WeakMap,ln=()=>{e.tornDown||(tt!=null&&window.clearTimeout(tt),tt=window.setTimeout(()=>{if(e.tornDown)return;tt=null;let c=j();if(!c.timeline||!U(c.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){Ae()&&(nt(),Te(!0));return}if(vr)return;let g=O(e.capturedTimeline),h=c.selectedDurationSeconds??O(c.timeline);U(h)&&(!U(g)||h>=g+N)&&vl(c,"manual")&&(vr=!0,xe({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:g??null,selectedDurationSeconds:h??null,selectedTimelineIds:c.selectedTimelineIds??[],mediaDurationFloorSeconds:c.mediaDurationFloorSeconds??null}}),nt(),Te(!0))},$))},Ml=()=>{for(let c of Et)c.removeEventListener("loadedmetadata",ln),c.removeEventListener("durationchange",ln);Et.clear()},Kn=()=>{if(e.tornDown)return;let c=Array.from(document.querySelectorAll("video, audio"));for(let p of c){if(Et.has(p))continue;Et.add(p);let g=Number.parseFloat(p.dataset.volume??"");Number.isFinite(g)&&(p.volume=Math.max(0,Math.min(1,g))),p.addEventListener("loadedmetadata",ln),p.addEventListener("durationchange",ln),p.preload!=="auto"&&(p.preload="auto"),p.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&p.load(),Mr(p)}},Mr=c=>{an.has(c)||xo(c,e.capturedTimeline,G(e.capturedTimeline,0),an)},Jn=new WeakMap,Nr=c=>{let p=Jn.get(c);if(p!==void 0)return p;let g=window.getComputedStyle(c).position,h=g==="static"||g==="relative"||g==="sticky";return Jn.set(c,h),h},Xn=new WeakMap,Nl=c=>{let p=Xn.get(c);if(p!==void 0)return p;let g=c.querySelector("[data-start]")===null;return Xn.set(c,g),g},Ll=()=>{Jn=new WeakMap,Xn=new WeakMap},Yn=new WeakMap,un=new WeakSet,Lr=c=>{let p=Array.from(document.querySelectorAll("[data-start]")),g=F();for(let h of p){if(!(h instanceof HTMLElement))continue;if(h.hasAttribute("data-hidden")){un.has(h)||(Yn.set(h,h.style.getPropertyValue("display")),un.add(h)),h.style.display="none",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,!1);continue}if(un.has(h)){let L=Yn.get(h);L?h.style.display=L:h.style.removeProperty("display"),Yn.delete(h),un.delete(h)}let E=re(h,c);if(E){let L=h.parentElement;for(;L&&L!==g;){if(L instanceof HTMLElement&&L.hasAttribute("data-start")&&!re(L,c)){E=!1;break}L=L.parentElement}}h.style.visibility=E?"visible":"hidden",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,E),E?Nr(h)&&h.style.removeProperty("display"):Nr(h)&&Nl(h)&&(h.style.display="none")}},Me=()=>{let c=h=>{let E=h.closest("[data-composition-id]"),L=E?W(E,0):null,I=E?ie(E,{includeAuthoredTimingAttrs:!0}):null;return{compositionRoot:E,inheritedStart:L,inheritedDuration:I}},p=bo({shouldIncludeElement:h=>h.hasAttribute("data-start")||!!c(h).compositionRoot,resolveStartSeconds:h=>{let E=c(h);return D(h,E.inheritedStart??0)},resolveDurationSeconds:h=>{let E=c(h),L=D(h,E.inheritedStart??0),I=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0,Q=E.inheritedStart!=null&&E.inheritedDuration!=null&&E.inheritedDuration>0?Math.max(0,E.inheritedStart+E.inheritedDuration-L):null,q=Number.isFinite(h.duration)&&h.duration>I?Math.max(0,h.duration-I):null,de=Number.parseFloat(h.dataset.duration??""),me=Number.isFinite(de)&&de>0?de:null,te=[q,Q,me].filter(Y=>Y!=null);return te.length>0?Math.min(...te):null}});for(let h of p.mediaClips){let E=an.get(h.el);E&&(h.volumeKeyframes=E)}let g=e.mediaForceSyncNextTick;g&&(e.mediaForceSyncNextTick=!1),e.nativeMediaSyncDisabled||yo({clips:p.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate,outputMuted:e.mediaOutputMuted||!e.webAudioMediaDisabled&&!e.nativeMediaSyncDisabled&&l.isActive(),userMuted:e.bridgeMuted,userVolume:e.bridgeVolume,forceSync:g,onElementVolume:(h,E)=>l.setElementVolume(h,E),isWebAudioOwned:h=>l.ownsElement(h),onAutoplayBlocked:()=>{e.mediaAutoplayBlockedPosted||(e.mediaAutoplayBlockedPosted=!0,xe({source:"hf-preview",type:"media-autoplay-blocked"}))}}),Lr(e.currentTime)},Te=c=>{let p=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),g=Date.now();(c||p!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||g-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=p,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=g,xe({source:"hf-preview",type:"state",frame:p,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},Qn="",Rr=0,Rl=()=>{let c="";for(let p of document.querySelectorAll("[data-start]"))c+=`${p.id}:${p.tagName}|`;return c},nt=()=>{R(),v(),V();let c=F();if(c){let h=C(c.getAttribute("data-width")),E=C(c.getAttribute("data-height")),L=h?parseInt(h,10):0,I=E?parseInt(E,10):0;L>0&&I>0&&xe({source:"hf-preview",type:"stage-size",width:L,height:I})}Ae();let p=Io({canonicalFps:e.canonicalFps});window.__clipManifest=p;let g=Rl();if(Qn!==g&&Ll(),!window.__clipTree||Qn!==g){let h=window;window.__clipTree=No({startResolver:$e({timelineRegistry:h.__timelines??{},includeAuthoredTimingAttrs:!0}),timelineRegistry:h.__timelines??{},rootDuration:p.durationInFrames/e.canonicalFps}),Qn=g}xe(p),St()},Zn=c=>Number.isFinite(c)&&c>0?c:0,kl=c=>{let p=Zn(Number(c));if(p<=0)return;let g=F(),h=Zn(Number.parseFloat(g?.getAttribute("data-duration")??"")),E=Math.max(Rr,Zn(s.getDuration()),h);p<=E||(Rr=p,g?.setAttribute("data-duration",String(p)),s.setDuration(p),nt(),Te(!0))},Pe=(c,p=0)=>{for(let g of e.deterministicAdapters){try{c==="discover"&&g.discover(),c==="pause"&&g.pause(),c==="play"&&g.play&&g.play()}catch(h){M("runtime.init.site8",h)}if(c==="discover")try{g.seek({time:p,suppressEvents:!0})}catch(h){M("runtime.init.site9",h)}}},it=()=>{window.__renderReady=!1},At=null,wt=!0,Dl=()=>{let c=[];for(let p of e.deterministicAdapters){let g=p.getReadyPromise;if(typeof g=="function")try{let h=g();h&&c.push(h)}catch(h){M("runtime.init.adapterReady",h)}}return c},Il=()=>{let c=Dl();if(c.length===0)return At=null,wt=!0,!0;let p=c[0];if(!p)return!0;let g=c.length===1?p:Promise.all(c);return g!==At&&(At=g,wt=!1,Promise.resolve(g).then(()=>{At===g&&(wt=!0,it())},h=>{At===g&&(wt=!0,M("runtime.init.adapterReady",h),it())})),wt};if(X)sr();else{let c={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,injectedLinks:e.injectedCompLinks,parseDimensionPx:C,onDiagnostic:({code:p,details:g})=>{xe({source:"hf-preview",type:"diagnostic",code:p,details:g})}};Aa(c).then(()=>Ea(c)).finally(()=>{X=!0,Kn(),Tl(),sr(),cr(document),it()})}let cn=Fo({postMessage:c=>xe(c)});cn.installPickerApi();let We=Xa();n=We,S(()=>{We.destroy(),n=null});let ei=c=>{let p=Number(c);!Number.isFinite(p)||p<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,p)),e.mediaForceSyncNextTick=!0,e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let g=document.querySelectorAll("video, audio");for(let h of g)if(h instanceof HTMLMediaElement)try{h.playbackRate=e.playbackRate}catch(E){M("runtime.init.site10",E)}},kr={play:()=>{let c=e.capturedTimeline;if(s.isPlaying())return;let p=G(c,0);if(p>0)s.setDuration(p),s.reachedEnd()&&(s.seek(0),e.currentTime=0,rt(0));else{let g=F(),h=Number(g?.getAttribute("data-duration")??0);h>0&&s.setDuration(h)}c&&c.pause(),s.play()&&(e.isPlaying=!0,e.mediaForceSyncNextTick=!0,Br(s.now()),d&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&Hr(),Pe("play"),Me(),We.redraw(),Te(!0))},pause:()=>{if(!s.isPlaying())return;l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1,e.currentTime=s.now(),e.mediaForceSyncNextTick=!0,Br(e.currentTime);let c=e.capturedTimeline;c&&c.pause(),Pe("pause"),Me(),We.redraw(),Te(!0)},seek:(c,p)=>{let g=dt(Math.max(0,Number(c)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource();let h=s.isPlaying();h&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0;let E=e.capturedTimeline;if(E&&E.pause(),rt(e.currentTime),Pe("pause"),p?.keepPlaying&&h){kr.play();return}Me(),We.redraw(),Te(!0)},renderSeek:(c,p)=>{let g=dt(Math.max(0,Number(c)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource(),s.isPlaying()&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0,rt(e.currentTime,{activateChildren:!0,suppressEvents:p?.suppressEvents}),Me(),We.redraw(),Te(!0)},getTime:()=>s.now(),getDuration:()=>{let c=s.getDuration();return Number.isFinite(c)?c:0},isPlaying:()=>s.isPlaying(),setPlaybackRate:c=>{ei(c),s.setRate(e.playbackRate),Gr()},getPlaybackRate:()=>e.playbackRate},Dr=G(e.capturedTimeline,0);Dr>0&&s.setDuration(Dr);let Ne=vo({getTimeline:()=>e.capturedTimeline,setTimeline:c=>{e.capturedTimeline=c},getTimelineRegistry:()=>window.__timelines??{},getIsPlaying:()=>e.isPlaying,setIsPlaying:c=>{e.isPlaying!==c&&(e.mediaForceSyncNextTick=!0),e.isPlaying=c},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:ei,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(c,p)=>{e.currentTime=Math.max(0,Number(c)||0),e.isPlaying!==p&&(e.mediaForceSyncNextTick=!0),e.isPlaying=p,Me()},onStatePost:Te,onDeterministicSeek:(c,p)=>{for(let g of e.deterministicAdapters)if(!(g.name==="gsap"&&e.capturedTimeline))try{g.seek({time:Number(c)||0,suppressEvents:p?.suppressEvents})}catch(h){M("runtime.init.site11",h)}},onDeterministicPause:()=>Pe("pause"),onDeterministicPlay:()=>Pe("play"),onRenderFrameSeek:()=>{We.redraw()},onShowNativeVideos:()=>{},getSafeDuration:()=>G(e.capturedTimeline,0),transport:kr});window.__player=b(Ne),window.__playerReady=!0,qr(xe),ot("composition_loaded",{duration:Ne.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=jr({onPlay:()=>{Ne.play(),ot("composition_played",{time:Ne.getTime()})},onPause:()=>{Ne.pause(),ot("composition_paused",{time:Ne.getTime()})},onStopMedia:()=>{l.stopAll();let c=document.querySelectorAll("video, audio");for(let p of c)p instanceof HTMLMediaElement&&!p.paused&&p.pause()},onSeek:(c,p)=>{Ne.seek(c),ot("composition_seeked",{time:c})},onSetMuted:c=>{e.bridgeMuted=c;let p=c||e.mediaOutputMuted;l.setMuted(p);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=p||h.defaultMuted)},onSetVolume:c=>{e.bridgeVolume=c,l.setVolume(c);let p=document.querySelectorAll("video, audio");for(let g of p){if(!(g instanceof HTMLMediaElement))continue;let h=parseFloat(g.dataset.volume??""),E=Number.isFinite(h)?h:1;g.volume=E*c}},onSetMediaOutputMuted:c=>{e.mediaOutputMuted=c;let p=c||e.bridgeMuted;l.setMuted(p);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=p||h.defaultMuted)},onSetNativeMediaSyncDisabled:c=>{e.nativeMediaSyncDisabled!==c&&(e.nativeMediaSyncDisabled=c,e.mediaForceSyncNextTick=!0,c?(l.stopAll(),s.detachAudioSource()):Me())},onSetWebAudioMediaDisabled:c=>{e.webAudioMediaDisabled!==c&&(e.webAudioMediaDisabled=c,e.mediaForceSyncNextTick=!0,c&&(l.stopAll(),s.detachAudioSource()),Me())},onSetPlaybackRate:c=>{ei(c),e.transportClock&&e.transportClock.setRate(e.playbackRate),Gr()},onSetRootDuration:kl,onSetColorGrading:(c,p)=>{We.setGrading(c,p)},onSetColorGradingCompare:(c,p)=>{We.setCompare(c,p)},onTick:()=>{if(e.tornDown||!s.isPlaying())return;let c=s.now();if(e.currentTime=c,rt(c),s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let p=s.getDuration();Number.isFinite(p)&&(s.seek(p),e.currentTime=p,rt(p)),Pe("pause"),Me(),Te(!0)}},onEnablePickMode:()=>cn.enablePickMode(),onDisablePickMode:()=>cn.disablePickMode(),getCanonicalFps:()=>e.canonicalFps}),e.deterministicAdapters=[ho(),Qr({resolveStartSeconds:c=>W(c,0)}),eo(),no(),ro(),oo(),so(),ao(),lo(),uo(),co(),Zr({getTimeline:()=>e.capturedTimeline})],mo(),po(),window.__hfReseekGpu=c=>{let p=Math.max(0,Number(c)||0);window.__hfThreeTime=p,window.__hfTypegpuTime=p,io(p)},Ge(),Kn(),Pe("discover");let Pl=()=>{let c=e.capturedTimeline,p=Ae();e.capturedTimeline&&(p||e.capturedTimeline!==c||!Ne._timeline)&&(Ne._timeline=e.capturedTimeline);let g=G(e.capturedTimeline,0);if(g>0&&s.setDuration(g),Pe("discover",e.currentTime),!e.capturedTimeline){let h=window.__timelines??{},E=Object.keys(h).filter(L=>h[L]);if(E.length>0){let I=F()?.getAttribute("data-composition-id")??null;y("root_timeline_unbound_registry_present",{reason:I?"root data-composition-id has no matching key in window.__timelines":"root composition element has no data-composition-id attribute",rootCompositionId:I,registeredTimelineKeys:E},"root_timeline_unbound_registry_present"),console.warn("[hyperframes] Root timeline not bound \u2014 render will freeze at t=0. "+(I?`Root data-composition-id is "${I}" but window.__timelines has no such key. `:"Root composition element has no data-composition-id. ")+`Registered timeline keys: [${E.join(", ")}]. Register the root timeline under its data-composition-id (window.__timelines["${I??"<root-id>"}"] = tl).`)}}window.__renderReady=!0,nt(),Te(!0)};if(it=()=>{if(!X||window.__hfTimelinesBuilding){window.__renderReady=!1;return}if(Pe("discover",e.currentTime),!Il()){window.__renderReady=!1;return}Pl()},window.__hfTimelinesBuilding){window.__renderReady=!1;let c=()=>{window.removeEventListener("hf-timelines-built",c),it()};window.addEventListener("hf-timelines-built",c)}it(),X&&setTimeout(()=>{it()},0);let dn=0,ti=!1,Ol=(c,p,g,h)=>{try{let E=h?.suppressEvents===!0;c.pause(),typeof c.totalTime=="function"?c.totalTime(p,E):c.seek(p,E)}catch(E){M(g,E)}},Bl=(c,p)=>{let g=window.__timelines??{},h=F()?.getAttribute("data-composition-id")??null;for(let[E,L]of Object.entries(g)){if(!L||E===h)continue;let I=document.querySelector(`[data-composition-id="${CSS.escape(E)}"]`);if(!I)continue;let Q=W(I,0);if(!Number.isFinite(Q))continue;let q=ie(I,{includeAuthoredTimingAttrs:!0}),de=O(L),me=q!=null&&q>0?q:de,te=Math.max(0,me!=null&&me>0?Math.min(me,c-Q):c-Q);Ol(L,te,"runtime.init.transport.childTimeline",p)}},Hl=c=>{let p=window.__timelines??{};for(let g of Object.values(p))if(!(!g||g===c))try{g.play()}catch(h){M("runtime.init.activateSiblings",h)}},Ir=c=>typeof c=="object"&&c!==null,Ct=new WeakMap,Gl=["onStart","onUpdate","onComplete","onReverseComplete","onRepeat"],Pr=(c,p)=>{let g=c[p];if(typeof g!="function")return null;try{let h=Number(g.call(c));return Number.isFinite(h)?h:null}catch(h){return M("runtime.init.gsapCallbackDuration",h),null}},Wl=c=>{let p=Ct.get(c);if(p!=null)return p;if(!("getChildren"in c)||typeof c.getChildren!="function")return!1;let g;try{g=c.getChildren(!0,!0,!0)}catch(h){return M("runtime.init.gsapCallbackChildren",h),Ct.set(c,!1),!1}if(!Array.isArray(g))return Ct.set(c,!1),!1;for(let h of g){if(!Ir(h))continue;let E=h.vars;if(!Ir(E)||!Gl.some(q=>typeof E[q]=="function"))continue;let Q=Pr(h,"totalDuration")??Pr(h,"duration");if(Q!=null&&Q<=1e-6)return Ct.set(c,!0),!0}return Ct.set(c,!1),!1},rt=(c,p)=>{let g=e.capturedTimeline,h=p?.suppressEvents===!0;if(g){p?.activateChildren&&Hl(g);let E=g,L=c;if(typeof E.totalDuration=="function")try{let I=Number(E.totalDuration());Number.isFinite(I)&&I>0&&c>I&&(L=I)}catch(I){M("runtime.init.transport.clampDuration",I)}try{typeof g.totalTime=="function"?(g.totalTime(L,h),!h&&!Wl(g)&&(g.totalTime(L+.001,!0),g.totalTime(L,!0))):g.seek(L,h)}catch(I){M("runtime.init.transport.seek",I)}}else Bl(c,p);for(let E of e.deterministicAdapters)if(!(E.name==="gsap"&&g))try{E.seek({time:c,suppressEvents:h})}catch(L){M("runtime.init.transport.adapter",L)}},Ul=()=>{try{return document.querySelector(`[${Qa}]`)!=null}catch{return!1}},Or=()=>{if(!(e.tornDown||ti)){ti=!0;try{if(e.transportRafId=window.requestAnimationFrame(Or),dn+=1,Za({tick:dn,isPlaying:s.isPlaying(),hasCapturedTimeline:e.capturedTimeline!=null,currentTimeSeconds:s.now()})){let p=e.capturedTimeline;if(Ae()){e.capturedTimeline&&!Ne._timeline&&(Ne._timeline=e.capturedTimeline),e.capturedTimeline&&e.capturedTimeline!==p&&e.capturedTimeline.pause();let g=G(e.capturedTimeline,0);g>0&&s.setDuration(g),nt()}}if(dn%20===0&&nt(),dn%30===0&&Kn(),e.capturedTimeline){let p=G(e.capturedTimeline,0);p>0&&(!s.isPlaying()||p>=s.getDuration())&&s.setDuration(p)}if(s.isPlaying()&&!e.mediaOutputMuted)if(!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&l.isActive()&&l.context){let p=l.getTime();p>=0&&s.attachAudioSource({currentTimeSeconds:p})}else{let p=document.querySelectorAll("audio[data-start]"),g=!1;for(let h of p){if(!(h instanceof HTMLMediaElement)||!h.isConnected)continue;let E=Number.parseFloat(h.dataset.start??""),L=Number.parseFloat(h.dataset.duration??""),I=Number.isFinite(L)&&L>0?E+L:1/0,Q=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0;if(Number.isFinite(E)&&e.currentTime>=E&&e.currentTime<=I){h.paused?!h.error&&h.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&(s.attachAudioSource({currentTimeSeconds:e.currentTime}),g=!0):(s.attachAudioSource({el:h,compositionStart:E,mediaStart:Q}),g=!0);break}}!g&&s.hasAudioSource()&&s.detachAudioSource()}else s.hasAudioSource()&&s.detachAudioSource();let c=s.now();if(e.currentTime=c,(s.isPlaying()||!Ul())&&rt(c),s.isPlaying()&&s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let p=s.getDuration();Number.isFinite(p)&&(s.seek(p),e.currentTime=p,rt(p)),Pe("pause"),Me(),Te(!0);return}s.isPlaying()&&Me(),Te(!1)}finally{ti=!1}}},Br=c=>{let p=document.querySelectorAll("video, audio");for(let g of p){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let E=Number.parseFloat(g.dataset.duration??""),L=Number.isFinite(E)&&E>0?h+E:1/0;if(c<h||c>=L)continue;let I=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,Q=c-h+I;if(Q>=0)try{g.currentTime=Q}catch{}}},Hr=()=>{if(e.nativeMediaSyncDisabled||e.webAudioMediaDisabled)return;let c=l.startGeneration(),p=document.querySelectorAll("audio[data-start]");for(let g of p){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let E=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,L=Number.parseFloat(g.dataset.volume??""),I=Number.isFinite(L)?L:1,Q=Number.parseFloat(g.dataset.duration??""),q=Number.isFinite(Q)&&Q>0?Q:Number.POSITIVE_INFINITY,de=g.closest("[data-composition-id]");if(de){let me=W(de,0),te=ie(de,{includeAuthoredTimingAttrs:!0});te!=null&&te>0&&(q=Math.min(q,Math.max(0,me+te-h)))}l.decodeAudioElement(g).then(me=>{!me||!s.isPlaying()||l.schedulePlayback(g,me,h,E,s.now(),I*e.bridgeVolume,c,e.playbackRate,q)})}},Gr=()=>{l.setRate(e.playbackRate)&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&d&&s.isPlaying()&&l.hasBoundedActiveSources()&&(l.stopAll(),Hr())};if(e.capturedTimeline){let c=G(e.capturedTimeline,0);c>0&&s.setDuration(c),e.capturedTimeline.pause()}La(window),e.transportRafId=window.requestAnimationFrame(Or),nt(),Te(!0);let ni=()=>{if(!e.tornDown){e.tornDown=!0,e.transportRafId!=null&&(window.cancelAnimationFrame(e.transportRafId),e.transportRafId=null),e.transportClock=null,l.destroy(),tt!=null&&(window.clearTimeout(tt),tt=null),u!=null&&(window.cancelAnimationFrame(u),u=null),Ml(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),i&&(window.removeEventListener("error",i),i=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),cn.disablePickMode();for(let c of e.deterministicAdapters)if(!(!c||typeof c.revert!="function"))try{c.revert()}catch(p){M("runtime.init.site12",p)}e.deterministicAdapters=[];for(let c of o.splice(0))try{c()}catch(p){M("runtime.init.site13",p)}for(let c of e.injectedCompStyles)try{c.remove()}catch(p){M("runtime.init.site14",p)}e.injectedCompStyles=[];for(let c of e.injectedCompLinks)try{c.remove()}catch(p){M("runtime.init.site15",p)}e.injectedCompLinks=[];for(let c of e.injectedCompScripts)try{c.remove()}catch(p){M("runtime.init.site16",p)}e.injectedCompScripts=[],e.capturedTimeline=null,window.__hfRuntimeTeardown===ni&&(window.__hfRuntimeTeardown=null)}};window.__hfRuntimeTeardown=ni,e.beforeUnloadHandler=ni,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var tl=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Sr=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function rm(e){if(e<=255)return tl[e];let t=0,n=Sr.length-1;for(;t<=n;){let i=t+n>>1,r=Sr[i];if(e<r[0]){n=i-1;continue}if(e>r[1]){t=i+1;continue}return r[2]}return"L"}function om(e){let t=e.length;if(t===0)return null;let n=new Array(t),i=!1;for(let l=0;l<t;){let d=e.charCodeAt(l),m=d,f=1;if(d>=55296&&d<=56319&&l+1<t){let S=e.charCodeAt(l+1);S>=56320&&S<=57343&&(m=(d-55296<<10)+(S-56320)+65536,f=2)}let x=rm(m);(x==="R"||x==="AL"||x==="AN")&&(i=!0);for(let S=0;S<f;S++)n[l+S]=x;l+=f}if(!i)return null;let r=0;for(let l=0;l<t;l++){let d=n[l];if(d==="L"){r=0;break}if(d==="R"||d==="AL"){r=1;break}}let o=new Int8Array(t);for(let l=0;l<t;l++)o[l]=r;let a=r&1?"R":"L",u=a,s=u;for(let l=0;l<t;l++)n[l]==="NSM"?n[l]=s:s=n[l];s=u;for(let l=0;l<t;l++){let d=n[l];d==="EN"?n[l]=s==="AL"?"AN":"EN":(d==="R"||d==="L"||d==="AL")&&(s=d)}for(let l=0;l<t;l++)n[l]==="AL"&&(n[l]="R");for(let l=1;l<t-1;l++)n[l]==="ES"&&n[l-1]==="EN"&&n[l+1]==="EN"&&(n[l]="EN"),n[l]==="CS"&&(n[l-1]==="EN"||n[l-1]==="AN")&&n[l+1]===n[l-1]&&(n[l]=n[l-1]);for(let l=0;l<t;l++){if(n[l]!=="EN")continue;let d;for(d=l-1;d>=0&&n[d]==="ET";d--)n[d]="EN";for(d=l+1;d<t&&n[d]==="ET";d++)n[d]="EN"}for(let l=0;l<t;l++){let d=n[l];(d==="WS"||d==="ES"||d==="ET"||d==="CS")&&(n[l]="ON")}s=u;for(let l=0;l<t;l++){let d=n[l];d==="EN"?n[l]=s==="L"?"L":"EN":(d==="R"||d==="L")&&(s=d)}for(let l=0;l<t;l++){if(n[l]!=="ON")continue;let d=l+1;for(;d<t&&n[d]==="ON";)d++;let m=l>0?n[l-1]:u,f=d<t?n[d]:u,x=m!=="L"?"R":"L";if(x===(f!=="L"?"R":"L"))for(let y=l;y<d;y++)n[y]=x;l=d-1}for(let l=0;l<t;l++)n[l]==="ON"&&(n[l]=a);for(let l=0;l<t;l++){let d=n[l];(o[l]&1)===0?d==="R"?o[l]++:(d==="AN"||d==="EN")&&(o[l]+=2):(d==="L"||d==="AN"||d==="EN")&&o[l]++}return o}function nl(e,t){let n=om(e);if(n===null)return null;let i=new Int8Array(t.length);for(let r=0;r<t.length;r++)i[r]=n[t[r]];return i}var sm=/[ \t\n\r\f]+/g,am=/[\t\n\r\f]| {2,}|^ | $/;function lm(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function um(e){if(!am.test(e))return e;let t=e.replace(sm," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function cm(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
|
|
352
352
|
`).replace(/[\r\f]/g,`
|
|
353
353
|
`):e.replace(/\r\n/g,`
|
|
354
|
-
`)}var
|
|
355
|
-
`)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}var mm=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Te(e){return e.length===1?e[0]:e.join("")}function pm(e,t){let n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),Te(n)}function hm(e,t,n,i){if(!mm.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let r=[],o=null,a=[],u=n,s=!1,l=0;for(let c of e){let m=fm(c,i),f=m==="text"&&t;if(o!==null&&m===o&&f===s){a.push(c),l+=c.length;continue}o!==null&&r.push({text:Te(a),isWordLike:s,kind:o,start:u}),o=m,a=[c],u=n+l,s=f,l+=c.length}return o!==null&&r.push({text:Te(a),isWordLike:s,kind:o,start:u}),r}function yr(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var gm=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function xm(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:gm.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function bm(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function ym(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let a=0;a<e.len;a++){if(i[a]!=="text"||!xm(e,a))continue;let u=[t[a]],s=a+1;for(;s<e.len&&!yr(i[s]);){u.push(t[s]),n[a]=!0;let l=t[s].includes("?");if(i[s]="text",t[s]="",s++,l)break}t[a]=Te(u)}let o=0;for(let a=0;a<t.length;a++){let u=t[a];u.length!==0&&(o!==a&&(t[o]=u,n[o]=n[a],i[o]=i[a],r[o]=r[a]),o++)}return t.length=o,n.length=o,i.length=o,r.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:r}}function Sm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o]),!bm(a))continue;let u=o+1;if(u>=e.len||yr(e.kinds[u]))continue;let s=[],l=e.starts[u],c=u;for(;c<e.len&&!yr(e.kinds[c]);)s.push(e.texts[c]),c++;s.length>0&&(t.push(Te(s)),n.push(!0),i.push("text"),r.push(l),o=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}var Em=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),il=/^[A-Za-z0-9_]+[,:;]*$/,rl=/[,:;]+$/;function ll(e){for(let t of e)if(sl.test(t))return!0;return!1}function on(e){if(e.length===0)return!1;for(let t of e)if(!(sl.test(t)||Em.has(t)))return!1;return!0}function Am(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],u=e.kinds[o];if(u==="text"&&on(a)&&ll(a)){let s=[a],l=o+1;for(;l<e.len&&e.kinds[l]==="text"&&on(e.texts[l]);)s.push(e.texts[l]),l++;t.push(Te(s)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=l-1;continue}t.push(a),n.push(e.isWordLike[o]),i.push(u),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function wm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],u=e.kinds[o],s=e.isWordLike[o];if(u==="text"&&s&&il.test(a)){let l=[a],c=rl.test(a),m=o+1;for(;c&&m<e.len&&e.kinds[m]==="text"&&e.isWordLike[m]&&il.test(e.texts[m]);){let f=e.texts[m];l.push(f),c=rl.test(f),m++}t.push(Te(l)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=m-1;continue}t.push(a),n.push(s),i.push(u),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Cm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(e.kinds[o]==="text"&&a.includes("-")){let u=a.split("-"),s=u.length>1;for(let l=0;l<u.length;l++){let c=u[l];if(!s)break;(c.length===0||!ll(c)||!on(c))&&(s=!1)}if(s){let l=0;for(let c=0;c<u.length;c++){let m=u[c],f=c<u.length-1?`${m}-`:m;t.push(f),n.push(!0),i.push("text"),r.push(e.starts[o]+l),l+=f.length}continue}}t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Fm(e){let t=[],n=[],i=[],r=[],o=0;for(;o<e.len;){let a=[e.texts[o]],u=e.isWordLike[o],s=e.kinds[o],l=e.starts[o];if(s==="glue"){let c=[a[0]],m=l;for(o++;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;let f=Te(c);if(o<e.len&&e.kinds[o]==="text")a[0]=f,a.push(e.texts[o]),u=e.isWordLike[o],s="text",l=m,o++;else{t.push(f),n.push(!1),i.push("glue"),r.push(m);continue}}else o++;if(s==="text")for(;o<e.len&&e.kinds[o]==="glue";){let c=[];for(;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;let m=Te(c);if(o<e.len&&e.kinds[o]==="text"){a.push(m,e.texts[o]),u=u||e.isWordLike[o],o++;continue}a.push(m)}t.push(Te(a)),n.push(u),i.push(s),r.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function _m(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Ie(t[o])||!Ie(t[o+1]))continue;let a=lm(t[o]);a!==null&&(t[o]=a.head,t[o+1]=a.tail+t[o+1],r[o+1]=r[o]+a.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function ol(e,t,n){let i=Yf(),r=0,o=[],a=[],u=[],s=[],l=[],c=[],m=[],f=[],b=[],E=[],y=[],x=[];for(let v of i.segment(e))for(let w of hm(v.segment,v.isWordLike??!1,v.index,n)){let re=function(){c[D]!==null&&(a[D]=[tl(o,c,m,D)],c[D]=null),a[D].push(w.text),u[D]=u[D]||w.isWordLike,f[D]=f[D]||T,b[D]=b[D]||R,E[D]=U,y[D]=ie,x[D]=nl(b[D],z)},C=w.kind==="text",F=um(w.text,w.isWordLike,w.kind),T=Ie(w.text),R=Za(w.text),z=jn(w.text),U=qn(w.text),ie=cm(w.text),D=r-1;t.carryCJKAfterClosingQuote&&C&&r>0&&s[D]==="text"&&T&&f[D]&&E[D]||C&&r>0&&s[D]==="text"&&sm(w.text)&&f[D]||C&&r>0&&s[D]==="text"&&y[D]?re():C&&r>0&&s[D]==="text"&&w.isWordLike&&R&&x[D]?(re(),u[D]=!0):F!==null&&r>0&&s[D]==="text"&&c[D]===F?m[D]=(m[D]??1)+1:C&&!w.isWordLike&&r>0&&s[D]==="text"&&(om(w.text)||w.text==="-"&&u[D])?re():(o[r]=w.text,a[r]=[w.text],u[r]=w.isWordLike,s[r]=w.kind,l[r]=w.start,c[r]=F,m[r]=F===null?0:1,f[r]=T,b[r]=R,E[r]=U,y[r]=ie,x[r]=nl(R,z),r++)}for(let v=0;v<r;v++){if(c[v]!==null){o[v]=tl(o,c,m,v);continue}o[v]=Te(a[v])}for(let v=1;v<r;v++)s[v]==="text"&&!u[v]&&Er(o[v])&&s[v-1]==="text"&&(o[v-1]+=o[v],u[v-1]=u[v-1]||u[v],o[v]="");let A=Array.from({length:r},()=>null),_=-1;for(let v=r-1;v>=0;v--){let w=o[v];if(w.length!==0){if(s[v]==="text"&&!u[v]&&am(w)&&_>=0&&s[_]==="text"){let C=A[_]??[];C.push(w),A[_]=C,l[_]=l[v],o[v]="";continue}_=v}}for(let v=0;v<r;v++){let w=A[v];w!=null&&(o[v]=pm(w,o[v]))}let M=0;for(let v=0;v<r;v++){let w=o[v];w.length!==0&&(M!==v&&(o[M]=w,u[M]=u[v],s[M]=s[v],l[M]=l[v]),M++)}o.length=M,u.length=M,s.length=M,l.length=M;let $=Fm({len:M,texts:o,isWordLike:u,kinds:s,starts:l}),P=_m(wm(Cm(Am(Sm(ym($))))));for(let v=0;v<P.len-1;v++){let w=dm(P.texts[v]);w!==null&&(P.kinds[v]!=="space"&&P.kinds[v]!=="preserved-space"||P.kinds[v+1]!=="text"||!Za(P.texts[v+1])||(P.texts[v]=w.space,P.isWordLike[v]=!1,P.kinds[v]=P.kinds[v]==="preserved-space"?"preserved-space":"space",P.texts[v+1]=w.marks+P.texts[v+1],P.starts[v+1]=P.starts[v]+w.space.length))}return P}function vm(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],i=0;for(let r=0;r<e.len;r++)e.kinds[r]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:r,consumedEndSegmentIndex:r+1}),i=r+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function Tm(e){if(e.len<=1)return e;let t=[],n=[],i=[],r=[],o=null,a=!1,u=0,s=!1,l=!1;function c(){o!==null&&(t.push(Te(o)),n.push(a),i.push("text"),r.push(u),o=null)}for(let m=0;m<e.len;m++){let f=e.texts[m],b=e.kinds[m],E=e.isWordLike[m],y=e.starts[m];if(b==="text"){let x=em(f),A=Vn(f);if(o!==null&&s&&l){o.push(f),a=a||E,s=s||x,l=A;continue}c(),o=[f],a=E,u=y,s=x,l=A;continue}c(),t.push(f),n.push(E),i.push(b),r.push(y)}return c(),{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function ul(e,t,n="normal",i="normal"){let r=qf(n),o=r.mode==="pre-wrap"?Kf(e):$f(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let a=i==="keep-all"?Tm(ol(o,t,r)):ol(o,t,r);return{normalized:o,chunks:vm(a,r),...a}}var xt=null,cl=new Map,bt=null,Mm=96,Nm=/\p{Emoji_Presentation}/u,Lm=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,Ar=null,dl=new Map;function wr(){if(xt!==null)return xt;if(typeof OffscreenCanvas<"u")return xt=new OffscreenCanvas(1,1).getContext("2d"),xt;if(typeof document<"u")return xt=document.createElement("canvas").getContext("2d"),xt;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Rm(e){let t=cl.get(e);return t||(t=new Map,cl.set(e,t)),t}function je(e,t){let n=t.get(e);return n===void 0&&(n={width:wr().measureText(e).width,containsCJK:Ie(e)},t.set(e,n)),n}function yt(){if(bt!==null)return bt;if(typeof navigator>"u")return bt={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},bt;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return bt={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},bt}function km(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function fl(){return Ar===null&&(Ar=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Ar}function Dm(e){return Nm.test(e)||e.includes("\uFE0F")}function ml(e){return Lm.test(e)}function Im(e,t){let n=dl.get(e);if(n!==void 0)return n;let i=wr();i.font=e;let r=i.measureText("\u{1F600}").width;if(n=0,r>t+.5&&typeof document<"u"&&document.body!==null){let o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="\u{1F600}",document.body.appendChild(o);let a=o.getBoundingClientRect().width;document.body.removeChild(o),r-a>.5&&(n=r-a)}return dl.set(e,n),n}function Pm(e){let t=0,n=fl();for(let i of n.segment(e))Dm(i.segment)&&t++;return t}function Om(e,t){return t.emojiCount===void 0&&(t.emojiCount=Pm(e)),t.emojiCount}function et(e,t,n){return n===0?t.width:t.width-Om(e,t)*n}function pl(e,t,n,i,r){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let o=fl(),a=[];for(let c of o.segment(e))a.push(c.segment);if(a.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(r==="sum-graphemes"){let c=[];for(let m of a){let f=je(m,n);c.push(et(m,f,i))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(r==="pair-context"||a.length>Mm){let c=[],m=null,f=0;for(let b of a){let E=je(b,n),y=et(b,E,i);if(m===null)c.push(y);else{let x=m+b,A=je(x,n);c.push(et(x,A,i)-f)}m=b,f=y}return t.breakableFitAdvances=c,t.breakableFitAdvances}let u=[],s="",l=0;for(let c of a){s+=c;let m=je(s,n),f=et(s,m,i);u.push(f-l),l=f}return t.breakableFitAdvances=u,t.breakableFitAdvances}function hl(e,t){let n=wr();n.font=e;let i=Rm(e),r=km(e),o=t?Im(e,r):0;return{cache:i,fontSize:r,emojiCorrection:o}}function Bm(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function Hm(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Gm(e,t,n,i,r){let o=0,a=t;for(;o<e.length;){let u=a+e[o];if((o+1<e.length?u+r:u)>n+i)break;a=u,o++}return{fitCount:o,fittedWidth:a}}function gl(e,t){return e.simpleLineWalkFastPath?xl(e,t):bl(e,t)}function xl(e,t,n){let{widths:i,kinds:r,breakableFitAdvances:o}=e;if(i.length===0)return 0;let u=yt().lineFitEpsilon,s=t+u,l=0,c=0,m=!1,f=0,b=0,E=0,y=0,x=-1,A=0;function _(){x=-1,A=0}function M(F=E,T=y,R=c){l++,n?.({startSegmentIndex:f,startGraphemeIndex:b,endSegmentIndex:F,endGraphemeIndex:T,width:R}),c=0,m=!1,_()}function $(F,T){m=!0,f=F,b=0,E=F+1,y=0,c=T}function P(F,T,R){m=!0,f=F,b=T,E=F,y=T+1,c=R}function v(F,T){if(!m){$(F,T);return}c+=T,E=F+1,y=0}function w(F,T){let R=o[F];for(let z=T;z<R.length;z++){let U=R[z];m?c+U>s?(M(),P(F,z,U)):(c+=U,E=F,y=z+1):P(F,z,U)}m&&E===F&&y===R.length&&(E=F+1,y=0)}let C=0;for(;C<i.length&&!(!m&&(C=Bm(e,C),C>=i.length));){let F=i[C],T=r[C],R=T==="space"||T==="preserved-space"||T==="tab"||T==="zero-width-break"||T==="soft-hyphen";if(!m){F>t&&o[C]!==null?w(C,0):$(C,F),R&&(x=C+1,A=c-F),C++;continue}if(c+F>s){if(R){v(C,F),M(C+1,0,c-F),C++;continue}if(x>=0){if(E>x||E===x&&y>0){M();continue}M(x,0,A);continue}if(F>t&&o[C]!==null){M(),w(C,0),C++;continue}M();continue}v(C,F),R&&(x=C+1,A=c-F),C++}return m&&M(),l}function bl(e,t,n){if(e.simpleLineWalkFastPath)return xl(e,t,n);let{widths:i,lineEndFitAdvances:r,lineEndPaintAdvances:o,kinds:a,breakableFitAdvances:u,discretionaryHyphenWidth:s,tabStopAdvance:l,chunks:c}=e;if(i.length===0||c.length===0)return 0;let m=yt(),f=m.lineFitEpsilon,b=t+f,E=0,y=0,x=!1,A=0,_=0,M=0,$=0,P=-1,v=0,w=0,C=null;function F(){P=-1,v=0,w=0,C=null}function T(W=M,Y=$,O=y){E++,n?.({startSegmentIndex:A,startGraphemeIndex:_,endSegmentIndex:W,endGraphemeIndex:Y,width:O}),y=0,x=!1,F()}function R(W,Y){x=!0,A=W,_=0,M=W+1,$=0,y=Y}function z(W,Y,O){x=!0,A=W,_=Y,M=W,$=Y+1,y=O}function U(W,Y){if(!x){R(W,Y);return}y+=Y,M=W+1,$=0}function ie(W,Y,O,V){if(!Y)return;let _e=W==="tab"?0:r[O],B=W==="tab"?V:o[O];P=O+1,v=y-V+_e,w=y-V+B,C=W}function D(W,Y){let O=u[W];for(let V=Y;V<O.length;V++){let _e=O[V];x?y+_e>b?(T(),z(W,V,_e)):(y+=_e,M=W,$=V+1):z(W,V,_e)}x&&M===W&&$===O.length&&(M=W+1,$=0)}function re(W){if(C!=="soft-hyphen")return!1;let Y=u[W];if(Y==null)return!1;let{fitCount:O,fittedWidth:V}=Gm(Y,y,t,f,s);return O===0?!1:(y=V,M=W,$=O,F(),O===Y.length?(M=W+1,$=0,!0):(T(W,O,V+s),D(W,O),!0))}function Fe(W){E++,n?.({startSegmentIndex:W.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:W.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let W=0;W<c.length;W++){let Y=c[W];if(Y.startSegmentIndex===Y.endSegmentIndex){Fe(Y);continue}x=!1,y=0,A=Y.startSegmentIndex,_=0,M=Y.startSegmentIndex,$=0,F();let O=Y.startSegmentIndex;for(;O<Y.endSegmentIndex;){let V=a[O],_e=V==="space"||V==="preserved-space"||V==="tab"||V==="zero-width-break"||V==="soft-hyphen",B=V==="tab"?Hm(y,l):i[O];if(V==="soft-hyphen"){x&&(M=O+1,$=0,P=O+1,v=y+s,w=y+s,C=V),O++;continue}if(!x){B>t&&u[O]!==null?D(O,0):R(O,B),ie(V,_e,O,B),O++;continue}if(y+B>b){let H=y+(V==="tab"?0:r[O]),le=y+(V==="tab"?B:o[O]);if(C==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&v<=b){T(P,0,w);continue}if(C==="soft-hyphen"&&re(O)){O++;continue}if(_e&&H<=b){U(O,B),T(O+1,0,le),O++;continue}if(P>=0&&v<=b){if(M>P||M===P&&$>0){T();continue}let se=P;T(se,0,w),O=se;continue}if(B>t&&u[O]!==null){T(),D(O,0),O++;continue}T();continue}U(O,B),ie(V,_e,O,B),O++}if(x){let V=P===Y.consumedEndSegmentIndex?w:y;T(Y.consumedEndSegmentIndex,0,V)}}return E}var Cr=null;function Wm(){return Cr===null&&(Cr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Cr}function Um(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Vm(e,t){let n=[],i=[],r=0,o=!1,a=!1,u=!1;function s(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:r}),i=[],o=!1,a=!1,u=!1)}function l(m,f,b){i=[m],r=f,o=b,a=qn(m),u=sn.has(m)}function c(m,f){i.push(m),o=o||f;let b=qn(m);m.length===1&&Ze.has(m)?a=a||b:a=b,u=!1}for(let m of Wm().segment(e)){let f=m.segment,b=Ie(f);if(i.length===0){l(f,m.index,b);continue}if(u||zn.has(f)||Ze.has(f)||t.carryCJKAfterClosingQuote&&b&&a){c(f,b);continue}if(!o&&!b){c(f,b);continue}s(),l(f,m.index,b)}return s(),n}function zm(e){if(e.length<=1)return e;let t=[],n=[e[0].text],i=e[0].start,r=Ie(e[0].text),o=Vn(e[0].text);function a(){t.push({text:n.length===1?n[0]:n.join(""),start:i})}for(let u=1;u<e.length;u++){let s=e[u],l=Ie(s.text),c=Vn(s.text);if(r&&o){n.push(s.text),r=r||l,o=c;continue}a(),n=[s.text],i=s.start,r=l,o=c}return a(),t}function jm(e,t,n,i){let r=yt(),{cache:o,emojiCorrection:a}=hl(t,ml(e.normalized)),u=et("-",je("-",o),a),l=et(" ",je(" ",o),a)*8;if(e.len===0)return Um(n);let c=[],m=[],f=[],b=[],E=e.chunks.length<=1,y=n?[]:null,x=[],A=n?[]:null,_=Array.from({length:e.len});function M(w,C,F,T,R,z,U){R!=="text"&&R!=="space"&&R!=="zero-width-break"&&(E=!1),c.push(C),m.push(F),f.push(T),b.push(R),y?.push(z),x.push(U),A!==null&&A.push(w)}function $(w,C,F,T,R){let z=je(w,o),U=et(w,z,a),ie=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:U,D=C==="space"||C==="zero-width-break"?0:U;if(R&&T&&w.length>1){let re="sum-graphemes";on(w)?re="pair-context":r.preferPrefixWidthsForBreakableRuns&&(re="segment-prefixes");let Fe=pl(w,z,o,a,re);M(w,U,ie,D,C,F,Fe);return}M(w,U,ie,D,C,F,null)}for(let w=0;w<e.len;w++){_[w]=c.length;let C=e.texts[w],F=e.isWordLike[w],T=e.kinds[w],R=e.starts[w];if(T==="soft-hyphen"){M(C,0,u,u,T,R,null);continue}if(T==="hard-break"){M(C,0,0,0,T,R,null);continue}if(T==="tab"){M(C,0,0,0,T,R,null);continue}let z=je(C,o);if(T==="text"&&z.containsCJK){let U=Vm(C,r),ie=i==="keep-all"?zm(U):U;for(let D=0;D<ie.length;D++){let re=ie[D];$(re.text,"text",R+re.start,F,i==="keep-all"||!Ie(re.text))}continue}$(C,T,R,F,!0)}let P=qm(e.chunks,_,c.length),v=y===null?null:Qa(e.normalized,y);return A!==null?{widths:c,lineEndFitAdvances:m,lineEndPaintAdvances:f,kinds:b,simpleLineWalkFastPath:E,segLevels:v,breakableFitAdvances:x,discretionaryHyphenWidth:u,tabStopAdvance:l,chunks:P,segments:A}:{widths:c,lineEndFitAdvances:m,lineEndPaintAdvances:f,kinds:b,simpleLineWalkFastPath:E,segLevels:v,breakableFitAdvances:x,discretionaryHyphenWidth:u,tabStopAdvance:l,chunks:P}}function qm(e,t,n){let i=[];for(let r=0;r<e.length;r++){let o=e[r],a=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,u=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,s=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:a,endSegmentIndex:u,consumedEndSegmentIndex:s})}return i}function $m(e,t,n,i){let r=i?.wordBreak??"normal",o=ul(e,yt(),i?.whiteSpace,r);return jm(o,t,n,r)}function yl(e,t,n){return $m(e,t,!1,n)}function Sl(e,t,n){let i=gl(e,t);return{lineCount:i,height:i*n}}var Km={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function El(e,t){let n={...Km,...t},i=1.2;for(let r=n.baseFontSize;r>=n.minFontSize;r-=n.step){let o=`${n.fontWeight} ${r}px ${n.fontFamily}`,a=yl(e,o),{lineCount:u}=Sl(a,n.maxWidth,r*i);if(u<=1)return{fontSize:r,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};Ha();window.__hyperframes={fitTextFontSize:El,getVariables:jr};function Al(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Ya())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Al,{once:!0}):Al();})();
|
|
354
|
+
`)}var Er=null,dm;function fm(){return Er===null&&(Er=new Intl.Segmenter(dm,{granularity:"word"})),Er}var mm=/\p{Script=Arabic}/u,Vn=/\p{M}/u,cl=/\p{Nd}/u;function il(e){return mm.test(e)}function rl(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function Ie(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){let r=(n-55296<<10)+(i-56320)+65536;if(rl(r))return!0;t++;continue}}if(rl(n))return!0}}return!1}function pm(e){let t=qn(e);return t!==null&&(jn.has(t)||Ze.has(t))}var hm=new Set(["\xA0","\u202F","\u2060","\uFEFF"]);function gm(e){return Ie(e)}function xm(e){let t=qn(e);return t!==null&&hm.has(t)}function zn(e){return!pm(e)&&!xm(e)}var jn=new Set(["\uFF0C","\uFF0E","\uFF01","\uFF1A","\uFF1B","\uFF1F","\u3001","\u3002","\u30FB","\uFF09","\u3015","\u3009","\u300B","\u300D","\u300F","\u3011","\u3017","\u3019","\u301B","\u30FC","\u3005","\u303B","\u309D","\u309E","\u30FD","\u30FE"]),sn=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),wr=new Set(["'","\u2019"]),Ze=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),bm=new Set([":",".","\u060C","\u061B"]),ym=new Set(["\u104F"]),Sm=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function Em(e){if(Cr(e))return!0;let t=!1;for(let n of e){if(Ze.has(n)){t=!0;continue}if(!(t&&Vn.test(n)))return!1}return t}function Am(e){for(let t of e)if(!jn.has(t)&&!Ze.has(t))return!1;return e.length>0}function wm(e){if(Cr(e))return!0;for(let t of e)if(!sn.has(t)&&!wr.has(t)&&!Vn.test(t))return!1;return e.length>0}function Cr(e){let t=!1;for(let n of e)if(!(n==="\\"||Vn.test(n))){if(sn.has(n)||Ze.has(n)||wr.has(n)){t=!0;continue}return!1}return t}function dl(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let i=e.charCodeAt(n);if(i<56320||i>57343)return n;let r=n-1;if(r<0)return n;let o=e.charCodeAt(r);return o>=55296&&o<=56319?r:n}function qn(e){if(e.length===0)return null;let t=dl(e,e.length);return e.slice(t)}function Cm(e){let t=Array.from(e),n=t.length;for(;n>0;){let i=t[n-1];if(Vn.test(i)){n--;continue}if(sn.has(i)||wr.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Fm(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="\u2014"?e:null}function ol(e,t,n,i){let r=t[i],o=e[i];if(r==null)return o;let a=n[i];if(o.length===a)return o;let u=r.repeat(a);return e[i]=u,u}function sl(e,t){return e&&t!==null&&bm.has(t)}function _m(e){let t=qn(e);return t!==null&&ym.has(t)}function Tm(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function $n(e){let t=e.length;for(;t>0;){let n=dl(e,t),i=e.slice(n,t);if(Sm.has(i))return!0;if(!Ze.has(i))return!1;t=n}return!1}function vm(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===`
|
|
355
|
+
`)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}var Mm=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function ve(e){return e.length===1?e[0]:e.join("")}function Nm(e,t){let n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),ve(n)}function Lm(e,t,n,i){if(!Mm.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let r=[],o=null,a=[],u=n,s=!1,l=0;for(let d of e){let m=vm(d,i),f=m==="text"&&t;if(o!==null&&m===o&&f===s){a.push(d),l+=d.length;continue}o!==null&&r.push({text:ve(a),isWordLike:s,kind:o,start:u}),o=m,a=[d],u=n+l,s=f,l+=d.length}return o!==null&&r.push({text:ve(a),isWordLike:s,kind:o,start:u}),r}function Ar(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Rm=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function km(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Rm.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Dm(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Im(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let a=0;a<e.len;a++){if(i[a]!=="text"||!km(e,a))continue;let u=[t[a]],s=a+1;for(;s<e.len&&!Ar(i[s]);){u.push(t[s]),n[a]=!0;let l=t[s].includes("?");if(i[s]="text",t[s]="",s++,l)break}t[a]=ve(u)}let o=0;for(let a=0;a<t.length;a++){let u=t[a];u.length!==0&&(o!==a&&(t[o]=u,n[o]=n[a],i[o]=i[a],r[o]=r[a]),o++)}return t.length=o,n.length=o,i.length=o,r.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:r}}function Pm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o]),!Dm(a))continue;let u=o+1;if(u>=e.len||Ar(e.kinds[u]))continue;let s=[],l=e.starts[u],d=u;for(;d<e.len&&!Ar(e.kinds[d]);)s.push(e.texts[d]),d++;s.length>0&&(t.push(ve(s)),n.push(!0),i.push("text"),r.push(l),o=d-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}var Om=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),al=/^[A-Za-z0-9_]+[,:;]*$/,ll=/[,:;]+$/;function fl(e){for(let t of e)if(cl.test(t))return!0;return!1}function on(e){if(e.length===0)return!1;for(let t of e)if(!(cl.test(t)||Om.has(t)))return!1;return!0}function Bm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],u=e.kinds[o];if(u==="text"&&on(a)&&fl(a)){let s=[a],l=o+1;for(;l<e.len&&e.kinds[l]==="text"&&on(e.texts[l]);)s.push(e.texts[l]),l++;t.push(ve(s)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=l-1;continue}t.push(a),n.push(e.isWordLike[o]),i.push(u),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Hm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],u=e.kinds[o],s=e.isWordLike[o];if(u==="text"&&s&&al.test(a)){let l=[a],d=ll.test(a),m=o+1;for(;d&&m<e.len&&e.kinds[m]==="text"&&e.isWordLike[m]&&al.test(e.texts[m]);){let f=e.texts[m];l.push(f),d=ll.test(f),m++}t.push(ve(l)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=m-1;continue}t.push(a),n.push(s),i.push(u),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Gm(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(e.kinds[o]==="text"&&a.includes("-")){let u=a.split("-"),s=u.length>1;for(let l=0;l<u.length;l++){let d=u[l];if(!s)break;(d.length===0||!fl(d)||!on(d))&&(s=!1)}if(s){let l=0;for(let d=0;d<u.length;d++){let m=u[d],f=d<u.length-1?`${m}-`:m;t.push(f),n.push(!0),i.push("text"),r.push(e.starts[o]+l),l+=f.length}continue}}t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Wm(e){let t=[],n=[],i=[],r=[],o=0;for(;o<e.len;){let a=[e.texts[o]],u=e.isWordLike[o],s=e.kinds[o],l=e.starts[o];if(s==="glue"){let d=[a[0]],m=l;for(o++;o<e.len&&e.kinds[o]==="glue";)d.push(e.texts[o]),o++;let f=ve(d);if(o<e.len&&e.kinds[o]==="text")a[0]=f,a.push(e.texts[o]),u=e.isWordLike[o],s="text",l=m,o++;else{t.push(f),n.push(!1),i.push("glue"),r.push(m);continue}}else o++;if(s==="text")for(;o<e.len&&e.kinds[o]==="glue";){let d=[];for(;o<e.len&&e.kinds[o]==="glue";)d.push(e.texts[o]),o++;let m=ve(d);if(o<e.len&&e.kinds[o]==="text"){a.push(m,e.texts[o]),u=u||e.isWordLike[o],o++;continue}a.push(m)}t.push(ve(a)),n.push(u),i.push(s),r.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Um(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Ie(t[o])||!Ie(t[o+1]))continue;let a=Cm(t[o]);a!==null&&(t[o]=a.head,t[o+1]=a.tail+t[o+1],r[o+1]=r[o]+a.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function ul(e,t,n){let i=fm(),r=0,o=[],a=[],u=[],s=[],l=[],d=[],m=[],f=[],x=[],S=[],y=[],b=[];for(let T of i.segment(e))for(let w of Lm(T.segment,T.isWordLike??!1,T.index,n)){let re=function(){d[D]!==null&&(a[D]=[ol(o,d,m,D)],d[D]=null),a[D].push(w.text),u[D]=u[D]||w.isWordLike,f[D]=f[D]||v,x[D]=x[D]||R,S[D]=W,y[D]=ie,b[D]=sl(x[D],V)},C=w.kind==="text",F=Fm(w.text,w.isWordLike,w.kind),v=Ie(w.text),R=il(w.text),V=qn(w.text),W=$n(w.text),ie=_m(w.text),D=r-1;t.carryCJKAfterClosingQuote&&C&&r>0&&s[D]==="text"&&v&&f[D]&&S[D]||C&&r>0&&s[D]==="text"&&Am(w.text)&&f[D]||C&&r>0&&s[D]==="text"&&y[D]?re():C&&r>0&&s[D]==="text"&&w.isWordLike&&R&&b[D]?(re(),u[D]=!0):F!==null&&r>0&&s[D]==="text"&&d[D]===F?m[D]=(m[D]??1)+1:C&&!w.isWordLike&&r>0&&s[D]==="text"&&(Em(w.text)||w.text==="-"&&u[D])?re():(o[r]=w.text,a[r]=[w.text],u[r]=w.isWordLike,s[r]=w.kind,l[r]=w.start,d[r]=F,m[r]=F===null?0:1,f[r]=v,x[r]=R,S[r]=W,y[r]=ie,b[r]=sl(R,V),r++)}for(let T=0;T<r;T++){if(d[T]!==null){o[T]=ol(o,d,m,T);continue}o[T]=ve(a[T])}for(let T=1;T<r;T++)s[T]==="text"&&!u[T]&&Cr(o[T])&&s[T-1]==="text"&&(o[T-1]+=o[T],u[T-1]=u[T-1]||u[T],o[T]="");let A=Array.from({length:r},()=>null),_=-1;for(let T=r-1;T>=0;T--){let w=o[T];if(w.length!==0){if(s[T]==="text"&&!u[T]&&wm(w)&&_>=0&&s[_]==="text"){let C=A[_]??[];C.push(w),A[_]=C,l[_]=l[T],o[T]="";continue}_=T}}for(let T=0;T<r;T++){let w=A[T];w!=null&&(o[T]=Nm(w,o[T]))}let N=0;for(let T=0;T<r;T++){let w=o[T];w.length!==0&&(N!==T&&(o[N]=w,u[N]=u[T],s[N]=s[T],l[N]=l[T]),N++)}o.length=N,u.length=N,s.length=N,l.length=N;let $=Wm({len:N,texts:o,isWordLike:u,kinds:s,starts:l}),P=Um(Hm(Gm(Bm(Pm(Im($))))));for(let T=0;T<P.len-1;T++){let w=Tm(P.texts[T]);w!==null&&(P.kinds[T]!=="space"&&P.kinds[T]!=="preserved-space"||P.kinds[T+1]!=="text"||!il(P.texts[T+1])||(P.texts[T]=w.space,P.isWordLike[T]=!1,P.kinds[T]=P.kinds[T]==="preserved-space"?"preserved-space":"space",P.texts[T+1]=w.marks+P.texts[T+1],P.starts[T+1]=P.starts[T]+w.space.length))}return P}function Vm(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],i=0;for(let r=0;r<e.len;r++)e.kinds[r]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:r,consumedEndSegmentIndex:r+1}),i=r+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function zm(e){if(e.len<=1)return e;let t=[],n=[],i=[],r=[],o=null,a=!1,u=0,s=!1,l=!1;function d(){o!==null&&(t.push(ve(o)),n.push(a),i.push("text"),r.push(u),o=null)}for(let m=0;m<e.len;m++){let f=e.texts[m],x=e.kinds[m],S=e.isWordLike[m],y=e.starts[m];if(x==="text"){let b=gm(f),A=zn(f);if(o!==null&&s&&l){o.push(f),a=a||S,s=s||b,l=A;continue}d(),o=[f],a=S,u=y,s=b,l=A;continue}d(),t.push(f),n.push(S),i.push(x),r.push(y)}return d(),{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function ml(e,t,n="normal",i="normal"){let r=lm(n),o=r.mode==="pre-wrap"?cm(e):um(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let a=i==="keep-all"?zm(ul(o,t,r)):ul(o,t,r);return{normalized:o,chunks:Vm(a,r),...a}}var xt=null,pl=new Map,bt=null,jm=96,qm=/\p{Emoji_Presentation}/u,$m=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,Fr=null,hl=new Map;function _r(){if(xt!==null)return xt;if(typeof OffscreenCanvas<"u")return xt=new OffscreenCanvas(1,1).getContext("2d"),xt;if(typeof document<"u")return xt=document.createElement("canvas").getContext("2d"),xt;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Km(e){let t=pl.get(e);return t||(t=new Map,pl.set(e,t)),t}function je(e,t){let n=t.get(e);return n===void 0&&(n={width:_r().measureText(e).width,containsCJK:Ie(e)},t.set(e,n)),n}function yt(){if(bt!==null)return bt;if(typeof navigator>"u")return bt={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},bt;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return bt={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},bt}function Jm(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function gl(){return Fr===null&&(Fr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Fr}function Xm(e){return qm.test(e)||e.includes("\uFE0F")}function xl(e){return $m.test(e)}function Ym(e,t){let n=hl.get(e);if(n!==void 0)return n;let i=_r();i.font=e;let r=i.measureText("\u{1F600}").width;if(n=0,r>t+.5&&typeof document<"u"&&document.body!==null){let o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="\u{1F600}",document.body.appendChild(o);let a=o.getBoundingClientRect().width;document.body.removeChild(o),r-a>.5&&(n=r-a)}return hl.set(e,n),n}function Qm(e){let t=0,n=gl();for(let i of n.segment(e))Xm(i.segment)&&t++;return t}function Zm(e,t){return t.emojiCount===void 0&&(t.emojiCount=Qm(e)),t.emojiCount}function et(e,t,n){return n===0?t.width:t.width-Zm(e,t)*n}function bl(e,t,n,i,r){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let o=gl(),a=[];for(let d of o.segment(e))a.push(d.segment);if(a.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(r==="sum-graphemes"){let d=[];for(let m of a){let f=je(m,n);d.push(et(m,f,i))}return t.breakableFitAdvances=d,t.breakableFitAdvances}if(r==="pair-context"||a.length>jm){let d=[],m=null,f=0;for(let x of a){let S=je(x,n),y=et(x,S,i);if(m===null)d.push(y);else{let b=m+x,A=je(b,n);d.push(et(b,A,i)-f)}m=x,f=y}return t.breakableFitAdvances=d,t.breakableFitAdvances}let u=[],s="",l=0;for(let d of a){s+=d;let m=je(s,n),f=et(s,m,i);u.push(f-l),l=f}return t.breakableFitAdvances=u,t.breakableFitAdvances}function yl(e,t){let n=_r();n.font=e;let i=Km(e),r=Jm(e),o=t?Ym(e,r):0;return{cache:i,fontSize:r,emojiCorrection:o}}function ep(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function tp(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function np(e,t,n,i,r){let o=0,a=t;for(;o<e.length;){let u=a+e[o];if((o+1<e.length?u+r:u)>n+i)break;a=u,o++}return{fitCount:o,fittedWidth:a}}function Sl(e,t){return e.simpleLineWalkFastPath?El(e,t):Al(e,t)}function El(e,t,n){let{widths:i,kinds:r,breakableFitAdvances:o}=e;if(i.length===0)return 0;let u=yt().lineFitEpsilon,s=t+u,l=0,d=0,m=!1,f=0,x=0,S=0,y=0,b=-1,A=0;function _(){b=-1,A=0}function N(F=S,v=y,R=d){l++,n?.({startSegmentIndex:f,startGraphemeIndex:x,endSegmentIndex:F,endGraphemeIndex:v,width:R}),d=0,m=!1,_()}function $(F,v){m=!0,f=F,x=0,S=F+1,y=0,d=v}function P(F,v,R){m=!0,f=F,x=v,S=F,y=v+1,d=R}function T(F,v){if(!m){$(F,v);return}d+=v,S=F+1,y=0}function w(F,v){let R=o[F];for(let V=v;V<R.length;V++){let W=R[V];m?d+W>s?(N(),P(F,V,W)):(d+=W,S=F,y=V+1):P(F,V,W)}m&&S===F&&y===R.length&&(S=F+1,y=0)}let C=0;for(;C<i.length&&!(!m&&(C=ep(e,C),C>=i.length));){let F=i[C],v=r[C],R=v==="space"||v==="preserved-space"||v==="tab"||v==="zero-width-break"||v==="soft-hyphen";if(!m){F>t&&o[C]!==null?w(C,0):$(C,F),R&&(b=C+1,A=d-F),C++;continue}if(d+F>s){if(R){T(C,F),N(C+1,0,d-F),C++;continue}if(b>=0){if(S>b||S===b&&y>0){N();continue}N(b,0,A);continue}if(F>t&&o[C]!==null){N(),w(C,0),C++;continue}N();continue}T(C,F),R&&(b=C+1,A=d-F),C++}return m&&N(),l}function Al(e,t,n){if(e.simpleLineWalkFastPath)return El(e,t,n);let{widths:i,lineEndFitAdvances:r,lineEndPaintAdvances:o,kinds:a,breakableFitAdvances:u,discretionaryHyphenWidth:s,tabStopAdvance:l,chunks:d}=e;if(i.length===0||d.length===0)return 0;let m=yt(),f=m.lineFitEpsilon,x=t+f,S=0,y=0,b=!1,A=0,_=0,N=0,$=0,P=-1,T=0,w=0,C=null;function F(){P=-1,T=0,w=0,C=null}function v(z=N,X=$,O=y){S++,n?.({startSegmentIndex:A,startGraphemeIndex:_,endSegmentIndex:z,endGraphemeIndex:X,width:O}),y=0,b=!1,F()}function R(z,X){b=!0,A=z,_=0,N=z+1,$=0,y=X}function V(z,X,O){b=!0,A=z,_=X,N=z,$=X+1,y=O}function W(z,X){if(!b){R(z,X);return}y+=X,N=z+1,$=0}function ie(z,X,O,U){if(!X)return;let _e=z==="tab"?0:r[O],B=z==="tab"?U:o[O];P=O+1,T=y-U+_e,w=y-U+B,C=z}function D(z,X){let O=u[z];for(let U=X;U<O.length;U++){let _e=O[U];b?y+_e>x?(v(),V(z,U,_e)):(y+=_e,N=z,$=U+1):V(z,U,_e)}b&&N===z&&$===O.length&&(N=z+1,$=0)}function re(z){if(C!=="soft-hyphen")return!1;let X=u[z];if(X==null)return!1;let{fitCount:O,fittedWidth:U}=np(X,y,t,f,s);return O===0?!1:(y=U,N=z,$=O,F(),O===X.length?(N=z+1,$=0,!0):(v(z,O,U+s),D(z,O),!0))}function Fe(z){S++,n?.({startSegmentIndex:z.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:z.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let z=0;z<d.length;z++){let X=d[z];if(X.startSegmentIndex===X.endSegmentIndex){Fe(X);continue}b=!1,y=0,A=X.startSegmentIndex,_=0,N=X.startSegmentIndex,$=0,F();let O=X.startSegmentIndex;for(;O<X.endSegmentIndex;){let U=a[O],_e=U==="space"||U==="preserved-space"||U==="tab"||U==="zero-width-break"||U==="soft-hyphen",B=U==="tab"?tp(y,l):i[O];if(U==="soft-hyphen"){b&&(N=O+1,$=0,P=O+1,T=y+s,w=y+s,C=U),O++;continue}if(!b){B>t&&u[O]!==null?D(O,0):R(O,B),ie(U,_e,O,B),O++;continue}if(y+B>x){let H=y+(U==="tab"?0:r[O]),le=y+(U==="tab"?B:o[O]);if(C==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&T<=x){v(P,0,w);continue}if(C==="soft-hyphen"&&re(O)){O++;continue}if(_e&&H<=x){W(O,B),v(O+1,0,le),O++;continue}if(P>=0&&T<=x){if(N>P||N===P&&$>0){v();continue}let se=P;v(se,0,w),O=se;continue}if(B>t&&u[O]!==null){v(),D(O,0),O++;continue}v();continue}W(O,B),ie(U,_e,O,B),O++}if(b){let U=P===X.consumedEndSegmentIndex?w:y;v(X.consumedEndSegmentIndex,0,U)}}return S}var Tr=null;function ip(){return Tr===null&&(Tr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Tr}function rp(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function op(e,t){let n=[],i=[],r=0,o=!1,a=!1,u=!1;function s(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:r}),i=[],o=!1,a=!1,u=!1)}function l(m,f,x){i=[m],r=f,o=x,a=$n(m),u=sn.has(m)}function d(m,f){i.push(m),o=o||f;let x=$n(m);m.length===1&&Ze.has(m)?a=a||x:a=x,u=!1}for(let m of ip().segment(e)){let f=m.segment,x=Ie(f);if(i.length===0){l(f,m.index,x);continue}if(u||jn.has(f)||Ze.has(f)||t.carryCJKAfterClosingQuote&&x&&a){d(f,x);continue}if(!o&&!x){d(f,x);continue}s(),l(f,m.index,x)}return s(),n}function sp(e){if(e.length<=1)return e;let t=[],n=[e[0].text],i=e[0].start,r=Ie(e[0].text),o=zn(e[0].text);function a(){t.push({text:n.length===1?n[0]:n.join(""),start:i})}for(let u=1;u<e.length;u++){let s=e[u],l=Ie(s.text),d=zn(s.text);if(r&&o){n.push(s.text),r=r||l,o=d;continue}a(),n=[s.text],i=s.start,r=l,o=d}return a(),t}function ap(e,t,n,i){let r=yt(),{cache:o,emojiCorrection:a}=yl(t,xl(e.normalized)),u=et("-",je("-",o),a),l=et(" ",je(" ",o),a)*8;if(e.len===0)return rp(n);let d=[],m=[],f=[],x=[],S=e.chunks.length<=1,y=n?[]:null,b=[],A=n?[]:null,_=Array.from({length:e.len});function N(w,C,F,v,R,V,W){R!=="text"&&R!=="space"&&R!=="zero-width-break"&&(S=!1),d.push(C),m.push(F),f.push(v),x.push(R),y?.push(V),b.push(W),A!==null&&A.push(w)}function $(w,C,F,v,R){let V=je(w,o),W=et(w,V,a),ie=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:W,D=C==="space"||C==="zero-width-break"?0:W;if(R&&v&&w.length>1){let re="sum-graphemes";on(w)?re="pair-context":r.preferPrefixWidthsForBreakableRuns&&(re="segment-prefixes");let Fe=bl(w,V,o,a,re);N(w,W,ie,D,C,F,Fe);return}N(w,W,ie,D,C,F,null)}for(let w=0;w<e.len;w++){_[w]=d.length;let C=e.texts[w],F=e.isWordLike[w],v=e.kinds[w],R=e.starts[w];if(v==="soft-hyphen"){N(C,0,u,u,v,R,null);continue}if(v==="hard-break"){N(C,0,0,0,v,R,null);continue}if(v==="tab"){N(C,0,0,0,v,R,null);continue}let V=je(C,o);if(v==="text"&&V.containsCJK){let W=op(C,r),ie=i==="keep-all"?sp(W):W;for(let D=0;D<ie.length;D++){let re=ie[D];$(re.text,"text",R+re.start,F,i==="keep-all"||!Ie(re.text))}continue}$(C,v,R,F,!0)}let P=lp(e.chunks,_,d.length),T=y===null?null:nl(e.normalized,y);return A!==null?{widths:d,lineEndFitAdvances:m,lineEndPaintAdvances:f,kinds:x,simpleLineWalkFastPath:S,segLevels:T,breakableFitAdvances:b,discretionaryHyphenWidth:u,tabStopAdvance:l,chunks:P,segments:A}:{widths:d,lineEndFitAdvances:m,lineEndPaintAdvances:f,kinds:x,simpleLineWalkFastPath:S,segLevels:T,breakableFitAdvances:b,discretionaryHyphenWidth:u,tabStopAdvance:l,chunks:P}}function lp(e,t,n){let i=[];for(let r=0;r<e.length;r++){let o=e[r],a=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,u=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,s=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:a,endSegmentIndex:u,consumedEndSegmentIndex:s})}return i}function up(e,t,n,i){let r=i?.wordBreak??"normal",o=ml(e,yt(),i?.whiteSpace,r);return ap(o,t,n,r)}function wl(e,t,n){return up(e,t,!1,n)}function Cl(e,t,n){let i=Sl(e,t);return{lineCount:i,height:i*n}}var cp={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function Fl(e,t){let n={...cp,...t},i=1.2;for(let r=n.baseFontSize;r>=n.minFontSize;r-=n.step){let o=`${n.fontWeight} ${r}px ${n.fontFamily}`,a=wl(e,o),{lineCount:u}=Cl(a,n.maxWidth,r*i);if(u<=1)return{fontSize:r,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};Va();window.__hyperframes={fitTextFontSize:Fl,getVariables:Kr};function _l(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,el())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_l,{once:!0}):_l();})();
|
|
356
356
|
|