@phin-tech/dottie 0.6.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PARITY.md +3 -0
- package/README.md +8 -3
- package/dist/compile.js +30 -7
- package/dist/dottie-compile.mjs +31 -8
- package/dist/dottie-player.js +145 -27
- package/dist/dottie-player.min.js +46 -46
- package/dist/dottie.js +145 -27
- package/dist/types/clicks.d.ts +8 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model.d.ts +10 -1
- package/dist/types/player.d.ts +19 -2
- package/dist/types/state.d.ts +20 -0
- package/dist/types/timeline.d.ts +5 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! dottie.js 0.
|
|
2
|
-
"use strict";(()=>{var wn=Object.defineProperty;var Yi=(t,e,n)=>e in t?wn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Oi=(t,e)=>{for(var n in e)wn(t,n,{get:e[n],enumerable:!0})};var v=(t,e,n)=>Yi(t,typeof e!="symbol"?e+"":e,n);var kn={};Oi(kn,{BOIL_DRAWINGS:()=>De,BUNDLED_FONTS:()=>Gt,DottieFormatError:()=>rt,DottiePlayer:()=>Yt,KINDS:()=>Mn,KNOWN_FIELDS:()=>Rn,MAX_DURATION:()=>Tt,MAX_MARCH:()=>Le,Playback:()=>te,SUPPORTED_VERSION:()=>rr,VERSION:()=>ir,addFonts:()=>fe,allowedURL:()=>kt,black:()=>bt,bounds:()=>ht,cameraView:()=>Dt,clampFPS:()=>At,clampMarch:()=>vn,clampTime:()=>z,clear:()=>Tn,cloneElement:()=>G,definePlayer:()=>Ie,elementIndex:()=>$i,fontFaces:()=>We,fontFile:()=>Ve,frameTimes:()=>Pe,inkOnDark:()=>Sn,inspect:()=>Di,inspectFrame:()=>xn,inspectPage:()=>bn,isAutomaticInk:()=>zt,luminance:()=>Et,orderedElements:()=>st,pageIndex:()=>ee,parseDottie:()=>$t,plan:()=>Ct,posterTime:()=>yt,render:()=>er,repeatIsValid:()=>le,resolved:()=>nt,sameColor:()=>St,sampleTimes:()=>gn,sceneAt:()=>pi,setFontBase:()=>Cn,stableSortBy:()=>se,still:()=>di,svg:()=>Ee,svgParts:()=>gt,themeNamed:()=>vt,themes:()=>dn,transientElements:()=>yi,usedFonts:()=>he,webLink:()=>Wt,withRoughness:()=>ne});var rr=2,Mn=["rectangle","ellipse","diamond","text","connector","freehand","path","note","image","symbol"],Vi=["linear","easeIn","easeOut","easeInOut","hold","spring","bounce","elastic"],Rn={file:["version","pages","images"],page:["id","name","layers","elements","theme","guidesX","guidesY","guidesLocked","timeline","symbols"],symbol:["id","name","width","height","layers","elements","timeline","button","params"],layer:["id","name","visible","locked"],rgba:["r","g","b","a"],style:["stroke","fill","fillStyle","strokeWidth","dash","roughness","bowing","fontSize","font","gridSize","opacity","dashOffset","textColor"],element:["id","kind","x","y","width","height","style","seed","layerID","text","connector","groupID","points","path","subpaths","evenOdd","rotation","link","url","anchor","click","hover","symbol","playback","offset","args","image","reveal","ports","labelRect","extension"],strokePoint:["x","y"],subpath:["closed","coords"],inlineImage:["data","format"],endpoint:["elementID","port","portIndex","x","y"],extensionRef:["id","shape","version","params"],normalizedPoint:["x","y"],normalizedRect:["x","y","width","height"],connector:["start","end","routing","startHead","endHead","waypoints","hops"],waypoint:["x","y"],timeline:["fps","duration","boil","settle","poster","tracks","camera","markers"],track:["element","keys","boil","follow","repeats","march"],keyframe:["t","x","y","width","height","rotation","strokeWidth","stroke","fill","visible","reveal","opacity","ease"],follow:["path","start","end","ease","reverse","orient","laps"],repeat:["start","end","count"],cameraKey:["t","x","y","width","height","ease"],marker:["t","name"],click:["scene","url"],hover:["stroke","fill","opacity"]},Tt=3600,Le=1e4,vn=t=>t===void 0||!Number.isFinite(t)||t===0?null:Math.min(Math.max(t,-Le),Le),De=3,bt={r:.12,g:.12,b:.13,a:1},Tn={r:0,g:0,b:0,a:0},Sn={r:.93,g:.93,b:.94,a:1},rt=class extends Error{},E=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),S=t=>typeof t=="number"&&Number.isFinite(t)?t:void 0,L=t=>typeof t=="string"?t:void 0,Pn=t=>E(t)&&Object.values(t).every(e=>typeof e=="string")?{...t}:null,X=t=>typeof t=="boolean"?t:void 0,j=t=>typeof t=="string"?t.toUpperCase():void 0;function z(t){return Number.isFinite(t)?Math.min(Math.max(t,0),Tt):t===1/0?Tt:0}function At(t){return Number.isFinite(t)?Math.min(Math.max(t,1),60):12}function kt(t){let e=t.trim();return!/^(https?:\/\/|mailto:)/i.test(e)||[...e].length<=7||/[\u0000-\u001f\u007f-\u009f]/.test(e)?null:e}function Wt(t){return t?kt(t):null}function xt(t){if(!E(t))return;let e=S(t.r),n=S(t.g),i=S(t.b);if(!(e===void 0||n===void 0||i===void 0))return{r:e,g:n,b:i,a:S(t.a)??1}}var Fe=class{constructor(){v(this,"warnings",[]);v(this,"seen",new Set)}warn(e){this.seen.has(e)||(this.seen.add(e),this.warnings.push(e))}fields(e,n){let i=Rn[n];for(let o of Object.keys(e))i.includes(o)||this.warn(`Unknown field "${o}" on ${n}, ignored`)}style(e){let n=E(e)?e:{};this.fields(n,"style");let i=L(n.fillStyle)??"solid",o=L(n.dash)??"solid";return["solid","hachure","crossHatch","grid"].includes(i)||this.warn(`Unknown fill style "${i}", drawn solid`),["solid","dashed","dotted"].includes(o)||this.warn(`Unknown dash "${o}", drawn solid`),{stroke:xt(n.stroke)??{...bt},fill:xt(n.fill)??{...Tn},fillStyle:["solid","hachure","crossHatch","grid"].includes(i)?i:"solid",strokeWidth:S(n.strokeWidth)??2,dash:["solid","dashed","dotted"].includes(o)?o:"solid",roughness:S(n.roughness)??1,bowing:S(n.bowing)??1,fontSize:S(n.fontSize)??18,font:L(n.font)||null,gridSize:S(n.gridSize)??null,opacity:S(n.opacity)??null,dashOffset:S(n.dashOffset)??null,textColor:xt(n.textColor)??null}}endpoint(e){let n=E(e)?e:{},i=L(n.port),o=S(n.portIndex);return{elementID:j(n.elementID)??null,port:i&&["top","right","bottom","left"].includes(i)?i:null,portIndex:o!==void 0&&Number.isInteger(o)&&o>=0?o:null,x:S(n.x)??0,y:S(n.y)??0}}connector(e){if(!E(e))return null;this.fields(e,"connector");let n=(o,r)=>{let s=L(o);return s&&["none","arrow","triangle","dot","bar"].includes(s)?s:r},i=L(e.routing);return{start:this.endpoint(e.start),end:this.endpoint(e.end),routing:i&&["straight","curved","elbow"].includes(i)?i:"straight",startHead:n(e.startHead,"none"),endHead:n(e.endHead,"arrow"),waypoints:Array.isArray(e.waypoints)?e.waypoints.filter(E).map(o=>(this.fields(o,"waypoint"),{x:S(o.x)??0,y:S(o.y)??0})):null,hops:typeof e.hops=="boolean"?e.hops:null}}image(e,n){if(!E(e))return null;let i=L(e.ref);if(i!==void 0)return n[i]??{data:"",format:"png"};let o=L(e.data);return o===void 0?null:this.picture(o,L(e.format))}picture(e,n){return Wi.test(e)?{data:e.replace(/\s+/g,""),format:n==="jpeg"?"jpeg":"png"}:(this.warn("Skipped a picture whose data isn't base64"),{data:"",format:"png"})}element(e,n){if(!E(e))return null;this.fields(e,"element");let i=j(e.id),o=L(e.kind),r=j(e.layerID);if(!i||!o||!r)return this.warn("Skipped an element without an id, kind or layer"),null;Mn.includes(o)||this.warn(`Unknown element kind "${o}", drawn as a placeholder`);let s=Array.isArray(e.subpaths)?e.subpaths.filter(E).map(l=>({closed:X(l.closed)??!1,coords:Array.isArray(l.coords)?l.coords.filter(a=>typeof a=="number"):[]})):null;return{id:i,kind:o,layerID:r,x:S(e.x)??0,y:S(e.y)??0,width:S(e.width)??0,height:S(e.height)??0,style:this.style(e.style),seed:(S(e.seed)??1)>>>0,text:L(e.text)??null,connector:this.connector(e.connector),groupID:j(e.groupID)??null,points:Array.isArray(e.points)?e.points.filter(E).map(l=>({x:S(l.x)??0,y:S(l.y)??0})):null,path:Array.isArray(e.path)?e.path.filter(l=>typeof l=="number"):null,subpaths:s,evenOdd:X(e.evenOdd)??null,rotation:S(e.rotation)??null,link:j(e.link)??null,url:L(e.url)??null,anchor:L(e.anchor)??null,click:this.click(e.click),hover:this.hover(e.hover),symbol:j(e.symbol)??null,playback:this.playback(e.playback),offset:S(e.offset)??null,args:Pn(e.args),image:this.image(e.image,n),reveal:S(e.reveal)??null,ports:Array.isArray(e.ports)?e.ports.map(l=>{let a=E(l)?l:{};return{x:S(a.x)??0,y:S(a.y)??0}}):null,labelRect:this.labelRect(e.labelRect),extension:this.extension(e.extension)}}labelRect(e){return E(e)?(this.fields(e,"normalizedRect"),{x:S(e.x)??0,y:S(e.y)??0,width:S(e.width)??0,height:S(e.height)??0}):null}extension(e){if(!E(e))return null;this.fields(e,"extensionRef");let n=L(e.id),i=L(e.shape),o=L(e.version);if(n===void 0||i===void 0||o===void 0)return this.warn("Skipped an extension without an id, shape or version"),null;let r={};if(E(e.params))for(let[s,l]of Object.entries(e.params))(typeof l=="number"||typeof l=="boolean"||typeof l=="string")&&(r[s]=l);return{id:n,shape:i,version:o,params:r}}click(e){if(!E(e))return null;this.fields(e,"click");let n=L(e.url),i=n===void 0?null:kt(n);return n!==void 0&&i===null&&this.warn("Skipped a click link that isn't http, https or mailto"),{scene:L(e.scene)??null,url:i}}playback(e){let n=L(e);return n===void 0?null:["loop","once","still","click"].includes(n)?n:"loop"}symbol(e,n){if(!E(e))return null;this.fields(e,"symbol");let i=j(e.id);if(!i)return this.warn("Skipped a symbol without an id"),null;let o=s=>{let l=S(s);return Math.max(1,l??100)},r=(Array.isArray(e.layers)?e.layers:[]).filter(E).flatMap(s=>{let l=j(s.id);return l?[{id:l,name:L(s.name)??"",visible:X(s.visible)??!0,locked:X(s.locked)??!1}]:[]});return r.length===0&&r.push({id:`${i}-LAYER`,name:"Layer 1",visible:!0,locked:!1}),{id:i,name:L(e.name)??"Symbol",width:o(e.width),height:o(e.height),layers:r,elements:(Array.isArray(e.elements)?e.elements:[]).map(s=>this.element(s,n)).filter(s=>s!==null),timeline:this.timeline(e.timeline),button:X(e.button)??null,params:Pn(e.params)}}hover(e){return E(e)?(this.fields(e,"hover"),{stroke:xt(e.stroke)??null,fill:xt(e.fill)??null,opacity:S(e.opacity)??null}):null}ease(e){let n=L(e);return n===void 0?null:Vi.includes(n)?n:(this.warn(`Unknown ease "${n}", played linear`),null)}keyframe(e){if(!E(e))return null;this.fields(e,"keyframe");let n=S(e.t);if(n===void 0)return null;let i={t:n};for(let a of["x","y","width","height","rotation","strokeWidth","reveal","opacity"]){let u=S(e[a]);u!==void 0&&(i[a]=u)}let o=xt(e.stroke),r=xt(e.fill),s=X(e.visible),l=this.ease(e.ease);return o&&(i.stroke=o),r&&(i.fill=r),s!==void 0&&(i.visible=s),l&&(i.ease=l),i}track(e){if(!E(e))return null;this.fields(e,"track");let n=j(e.element);if(!n)return null;let i=(Array.isArray(e.keys)?e.keys:[]).map(s=>this.keyframe(s)).filter(s=>s!==null&&s.t>=0&&s.t<=Tt);se(i,s=>s.t);let o=Array.isArray(e.follow)?e.follow.filter(E).flatMap(s=>{let l=j(s.path),a=S(s.start),u=S(s.end);return!l||a===void 0||u===void 0||a<0||u>Tt?[]:[{path:l,start:a,end:u,ease:this.ease(s.ease),reverse:X(s.reverse)??null,orient:X(s.orient)??null,laps:S(s.laps)??null}]}):null,r=Array.isArray(e.repeats)?e.repeats.filter(E).flatMap(s=>{let l=S(s.start),a=S(s.end);if(l===void 0||a===void 0)return[];let u=S(s.count),c={start:l,end:a,count:u===void 0?null:Math.trunc(u)};return le(c)?[c]:[]}):null;return{element:n,keys:i,boil:X(e.boil)??null,follow:o,repeats:r,march:vn(S(e.march))}}timeline(e){if(!E(e))return null;this.fields(e,"timeline");let n=S(e.boil),i=Array.isArray(e.camera)?e.camera.filter(E).flatMap(s=>{let l=S(s.t),a=S(s.x),u=S(s.y),c=S(s.width),h=S(s.height);return l===void 0||a===void 0||u===void 0||c===void 0||h===void 0?[]:c>1&&h>1&&l>=0?[{t:l,x:a,y:u,width:c,height:h,ease:this.ease(s.ease)}]:[]}):null;i&&se(i,s=>s.t);let o=Array.isArray(e.markers)?e.markers.filter(E).flatMap(s=>{let l=S(s.t);return l!==void 0&&l>=0?[{t:l,name:L(s.name)??""}]:[]}):null;o&&se(o,s=>s.t);let r=S(e.poster);return{fps:At(S(e.fps)??12),duration:z(S(e.duration)??0),boil:n!==void 0&&Number.isInteger(n)&&n>0?Math.min(n,1e4):null,settle:X(e.settle)??null,poster:r===void 0?null:z(r),tracks:(Array.isArray(e.tracks)?e.tracks:[]).map(s=>this.track(s)).filter(s=>s!==null),camera:i,markers:o}}page(e,n,i){if(!E(e))throw new rt(`Page ${i} is not an object`);this.fields(e,"page");let o=(Array.isArray(e.layers)?e.layers:[]).filter(E).flatMap(r=>{let s=j(r.id);return s?[{id:s,name:L(r.name)??"",visible:X(r.visible)??!0,locked:X(r.locked)??!1}]:[]});return o.length===0&&(this.warn(`Page ${i} has no layers`),o.push({id:"LAYER",name:"Layer 1",visible:!0,locked:!1})),{id:j(e.id)??`PAGE-${i}`,name:L(e.name)??`Page ${i}`,layers:o,elements:(Array.isArray(e.elements)?e.elements:[]).map(r=>this.element(r,n)).filter(r=>r!==null),theme:L(e.theme)??null,timeline:this.timeline(e.timeline),symbols:Array.isArray(e.symbols)?e.symbols.map(r=>this.symbol(r,n)).filter(r=>r!==null):null}}},Wi=/^[A-Za-z0-9+/=\s]*$/;function le(t){return Number.isFinite(t.start)&&Number.isFinite(t.end)&&t.start>=0&&t.end-t.start>.001&&t.end<=Tt&&(t.count===null||t.count>=1&&t.count<=1e4)}function se(t,e){let n=t.map((i,o)=>[i,o]);n.sort((i,o)=>e(i[0])-e(o[0])||i[1]-o[1]);for(let i=0;i<t.length;i++)t[i]=n[i][0]}function $t(t){let e=t;if(typeof t=="string")try{e=JSON.parse(t)}catch(s){throw new rt(`Not JSON: ${s.message}`)}if(!E(e))throw new rt("Not a Dottie drawing");let n=S(e.version);if(n===void 0)throw new rt("Not a Dottie drawing (no version)");if(!Array.isArray(e.pages)||e.pages.length===0)throw new rt("A drawing needs at least one page");let i=new Fe;i.fields(e,"file"),n>2&&i.warn(`File version ${n} is newer than this player knows (2); some things may not show`);let o={};if(E(e.images))for(let[s,l]of Object.entries(e.images))E(l)&&typeof l.data=="string"&&(o[s]=i.picture(l.data,L(l.format)));let r=e.pages.map((s,l)=>i.page(s,o,l+1));if(new Set(r.map(s=>s.id)).size!==r.length)throw new rt("Two pages share an id");return{version:n,pages:r,warnings:i.warnings}}function Et(t){return .2126*t.r+.7152*t.g+.0722*t.b}function St(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function zt(t){return St(t,bt)||St(t,Sn)}function G(t){return{...t,style:{...t.style,stroke:{...t.style.stroke},fill:{...t.style.fill},textColor:t.style.textColor?{...t.style.textColor}:null},connector:t.connector?{...t.connector,start:{...t.connector.start},end:{...t.connector.end},waypoints:t.connector.waypoints?.map(e=>({...e}))??null}:null}}function st(t){if(t.layers.length<=1)return t.elements;let e=new Map;t.layers.forEach((i,o)=>{e.has(i.id)||e.set(i.id,o)});let n=t.layers.map(()=>[]);for(let i of t.elements)n[e.get(i.layerID)??0].push(i);return n.flat()}function $i(t){let e=new Map;for(let n of t.elements)e.has(n.id)||e.set(n.id,n);return e}var An=.60205078125,En=.92822265625,In=.23583984375,wt={"Architects Daughter":{faces:{regular:{ascent:.986328125,descent:.4033203125,k:{},leading:0,w:{" ":400.39,_:686.52,"-":310.55,"\u2013":310.55,"\u2014":411.13,",":177.73,";":124.02,":":166.99,"!":134.77,"?":505.86,".":140.63,"\u2026":422.85,"\xB7":140.63,"'":162.11,"\u2018":162.11,"\u2019":162.11,'"':236.33,"\u201C":236.33,"\u201D":236.33,"(":297.85,")":351.56,"[":424.8,"]":541.02,"{":352.54,"}":478.52,"@":1042.97,"*":507.81,"/":455.08,"\\":501.95,"&":669.92,"#":637.7,"%":518.55,"\u2022":192.38,"`":171.88,"^":306.64,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":524.41,"\xD7":470.7,"<":475.59,"=":492.19,">":471.68,"|":145.51,"~":444.34,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556.64,0:630.86,1:127.93,2:572.27,3:508.79,4:680.66,5:708.01,6:626.95,7:615.23,8:648.44,9:569.34,a:508.79,A:640.63,b:561.52,B:710.94,c:632.81,C:708.01,d:512.7,D:648.44,e:541.02,E:591.8,\u00E9:541.02,f:593.75,F:692.38,g:515.63,G:692.38,h:495.12,H:605.47,i:151.37,I:151.37,j:177.73,J:529.3,k:614.26,K:605.47,l:157.23,L:692.38,m:778.32,M:827.15,n:500,N:626.95,o:562.5,O:669.92,p:556.64,P:637.7,q:513.67,Q:712.89,r:551.76,R:712.89,s:501.95,S:642.58,t:404.3,T:623.05,u:507.81,U:561.52,v:518.55,V:626.95,w:808.59,W:940.43,x:470.7,X:599.61,y:548.83,Y:534.18,z:495.12,Z:784.18}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}},Caveat:{faces:{bold:{ascent:.9600067138671875,descent:.3000030517578125,k:{AC:-20,AE:-10,AG:-10,AH:-10,AI:10,Aj:10,AJ:10,AL:-10,AM:10,An:-10,AO:-20,AP:-10,Aq:-10,AQ:-20,Ar:-10,As:-10,AS:-35,AT:-50,Au:-10,AU:-20,av:-20,Av:-5,AV:-40,aw:-10,AW:-20,Ax:10,AX:-10,ay:-20,Ay:-10,AY:-65,Az:20,AZ:-10,ba:-10,bc:-10,BC:-20,bd:-10,Bf:10,BF:-20,Bg:10,bh:-5,Bi:10,BI:-10,bj:-5,Bj:10,BJ:-10,Bk:10,Bl:10,Bm:10,BP:-10,BR:-10,BS:-20,BT:-40,bu:-10,BU:-20,BV:-50,BW:-50,bx:-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zw:-40,ZW:-10,zx:10,Zx:-10,ZX:-10,Zy:-30,ZY:-20,zz:20,Zz:10,ZZ:-10},leading:0,w:{" ":242,_:446,"-":326,"\u2013":446,"\u2014":566,",":198,";":198,":":198,"!":210,"?":374,".":198,"\u2026":594,"\xB7":187,"'":117,"\u2018":117,"\u2019":117,'"':237,"\u201C":267,"\u201D":267,"(":330,")":330,"[":330,"]":330,"{":330,"}":330,"@":643,"*":363,"/":330,"\\":330,"&":564,"#":559,"%":600,"\u2022":187,"`":353,"^":446,"\u2190":1e3,"\u2192":1e3,"\u2191":722.66,"\u2193":722.66,"+":446,"\xD7":446,"<":446,"=":446,">":446,"|":330,"~":446,"\u25E6":608.4,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:450,0:450,1:450,2:450,3:450,4:450,5:434,6:471,7:446,8:450,9:438,a:446,A:511,b:444,B:523,c:364,C:477,d:402,D:587,e:334,E:534,\u00E9:325,f:300,F:466,g:364,G:494,h:473,H:574,i:196,I:409,j:213,J:315,k:374,K:508,l:178,L:426,m:569,M:729,n:459,N:619,o:362,O:505,p:378,P:468,q:377,Q:492,r:360,R:544,s:350,S:495,t:331,T:458,u:370,U:482,v:331,V:490,w:517,W:720,x:343,X:524,y:341,Y:504,z:315,Z:522}},regular:{ascent:.9600067138671875,descent:.3000030517578125,k:{AC:-20,AE:-10,AG:-10,AH:-10,AI:10,Aj:10,AJ:10,AL:-10,AM:10,An:-10,AO:-20,AP:-10,Aq:-10,AQ:-20,Ar:-10,As:-10,AS:-35,AT:-50,Au:-10,AU:-20,av:-20,Av:-5,AV:-40,aw:-10,AW:-20,Ax:10,AX:-10,ay:-20,Ay:-10,AY:-65,Az:20,AZ:-10,ba:-10,bc:-10,BC:-20,bd:-10,Bf:10,BF:-20,Bg:10,bh:-5,Bi:10,BI:-10,bj:-5,Bj:10,BJ:-10,Bk:10,Bl:10,Bm:10,BP:-10,BR:-10,BS:-20,BT:-40,bu:-10,BU:-20,BV:-50,BW:-50,bx:-10,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:-40,ZW:-10,zx:10,Zx:-10,ZX:-10,Zy:-30,ZY:-20,zz:20,Zz:10,ZZ:-10},leading:0,w:{" ":242,_:446,"-":326,"\u2013":446,"\u2014":566,",":198,";":198,":":198,"!":210,"?":374,".":198,"\u2026":594,"\xB7":187,"'":117,"\u2018":117,"\u2019":117,'"':237,"\u201C":267,"\u201D":267,"(":330,")":330,"[":330,"]":330,"{":330,"}":330,"@":643,"*":363,"/":330,"\\":330,"&":564,"#":559,"%":600,"\u2022":187,"`":353,"^":446,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":446,"\xD7":446,"<":446,"=":446,">":446,"|":330,"~":446,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:450,0:450,1:450,2:450,3:450,4:450,5:450,6:450,7:450,8:450,9:450,a:437,A:502,b:435,B:520,c:355,C:472,d:393,D:578,e:325,E:529,\u00E9:325,f:291,F:454,g:355,G:487,h:464,H:563,i:187,I:400,j:204,J:306,k:365,K:498,l:169,L:426,m:560,M:720,n:450,N:599,o:353,O:496,p:378,P:464,q:377,Q:502,r:360,R:537,s:341,S:486,t:331,T:458,u:370,U:482,v:331,V:490,w:517,W:720,x:343,X:524,y:341,Y:504,z:315,Z:522}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}},"Helvetica Neue":{faces:{bold:{ascent:.975006103515625,descent:.2169952392578125,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-30,fi:20,fl:20,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0290069580078125,w:{" ":278,_:500,"-":407,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":278,"?":556,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':463,"\u201C":463,"\u201D":463,"(":296,")":296,"[":333,"]":333,"{":333,"}":333,"@":800,"*":407,"/":371,"\\":371,"&":685,"#":556,"%":1e3,"\u2022":350,"`":259,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":722.66,"\u2193":722.66,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":223,"~":600,"\u25E6":608.4,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:574,A:685,b:611,B:704,c:574,C:741,d:611,D:741,e:574,E:648,\u00E9:574,f:333,F:593,g:611,G:759,h:593,H:741,i:258,I:295,j:278,J:556,k:574,K:722,l:258,L:593,m:906,M:907,n:593,N:741,o:611,O:778,p:611,P:667,q:611,Q:778,r:389,R:722,s:537,S:649,t:352,T:611,u:593,U:741,v:520,V:630,w:814,W:944,x:537,X:667,y:519,Y:667,z:519,Z:648}},boldItalic:{ascent:.975006103515625,descent:.2169952392578125,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-68,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0290069580078125,w:{" ":278,_:500,"-":407,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":296,"?":574,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':481,"\u201C":481,"\u201D":481,"(":296,")":296,"[":333,"]":333,"{":333,"}":333,"@":800,"*":407,"/":389,"\\":389,"&":685,"#":556,"%":963,"\u2022":350,"`":259,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":722.66,"\u2193":722.66,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":222,"~":600,"\u25E6":608.4,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:574,A:685,b:611,B:722,c:556,C:741,d:611,D:741,e:574,E:667,\u00E9:574,f:352,F:593,g:611,G:759,h:611,H:741,i:259,I:296,j:259,J:556,k:556,K:722,l:259,L:574,m:907,M:907,n:611,N:741,o:593,O:778,p:611,P:667,q:611,Q:778,r:389,R:722,s:519,S:648,t:370,T:611,u:611,U:741,v:519,V:630,w:815,W:944,x:519,X:667,y:519,Y:648,z:500,Z:648}},italic:{ascent:.957000732421875,descent:.2129974365234375,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-15,fi:1,fl:1,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0279998779296875,w:{" ":278,_:500,"-":389,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":259,"?":556,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':426,"\u201C":426,"\u201D":426,"(":259,")":259,"[":259,"]":259,"{":333,"}":333,"@":800,"*":352,"/":333,"\\":333,"&":630,"#":556,"%":926,"\u2022":500,"`":222,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":222,"~":600,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:519,A:667,b:593,B:685,c:537,C:722,d:593,D:704,e:537,E:611,\u00E9:537,f:296,F:574,g:574,G:759,h:556,H:722,i:222,I:259,j:222,J:519,k:481,K:667,l:222,L:556,m:852,M:870,n:556,N:722,o:574,O:759,p:593,P:648,q:593,Q:759,r:333,R:685,s:481,S:648,t:315,T:574,u:556,U:722,v:481,V:611,w:759,W:926,x:481,X:611,y:481,Y:611,z:444,Z:611}},regular:{ascent:.951995849609375,descent:.2129974365234375,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-15,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0279998779296875,w:{" ":278,_:500,"-":389,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":259,"?":556,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':426,"\u201C":426,"\u201D":426,"(":259,")":259,"[":259,"]":259,"{":333,"}":333,"@":800,"*":352,"/":333,"\\":333,"&":630,"#":556,"%":1e3,"\u2022":350,"`":222,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":222,"~":600,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:537,A:648,b:593,B:685,c:537,C:722,d:593,D:704,e:537,E:611,\u00E9:537,f:296,F:574,g:574,G:759,h:556,H:722,i:222,I:259,j:222,J:519,k:519,K:667,l:222,L:556,m:853,M:871,n:556,N:722,o:574,O:760,p:593,P:648,q:593,Q:760,r:333,R:685,s:500,S:648,t:315,T:574,u:556,U:722,v:500,V:611,w:758,W:926,x:518,X:611,y:500,Y:648,z:480,Z:611}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}},"Patrick Hand":{faces:{regular:{ascent:1.0420074462890625,descent:.3119964599609375,k:{},leading:0,w:{" ":230,_:571,"-":404,"\u2013":420,"\u2014":648,",":202,";":232,":":232,"!":247,"?":368,".":214,"\u2026":571,"\xB7":200,"'":164,"\u2018":190,"\u2019":220,'"':303,"\u201C":315,"\u201D":303,"(":334,")":364,"[":303,"]":296,"{":339,"}":328,"@":550,"*":404,"/":423,"\\":420,"&":530,"#":457,"%":643,"\u2022":352,"`":220,"^":370,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":480,"\xD7":490,"<":396,"=":572,">":400,"|":176,"~":529,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:507,0:448,1:363,2:468,3:448,4:375,5:423,6:399,7:495,8:433,9:367,a:392,A:488,b:412,B:507,c:388,C:548,d:390,D:475,e:398,E:442,\u00E9:398,f:359,F:375,g:445,G:480,h:420,H:468,i:224,I:235,j:235,J:370,k:415,K:523,l:266,L:372,m:680,M:595,n:452,N:532,o:403,O:556,p:428,P:481,q:463,Q:655,r:385,R:454,s:385,S:459,t:344,T:468,u:400,U:550,v:400,V:562,w:463,W:616,x:448,X:601,y:423,Y:442,z:428,Z:507}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}}};var ae="Helvetica Neue",Ce="Helvetica Neue, Helvetica, Arial, sans-serif",Gt=Object.keys(wt).filter(t=>t!==ae).sort();function Bt(t){if(!t)return null;let e=t.toLowerCase();return Gt.find(n=>n.toLowerCase()===e)??null}function ce(t){return wt[Bt(t)??ae]}function Nt(t,e,n){let i=e?n?"boldItalic":"bold":n?"italic":"regular";return t.faces[i]?i:"regular"}function ue(t){if(!t)return Ce;let e=[...Bt(t)??t].filter(n=>!`"'<>&;{}\\`.includes(n)).join("");return e===""?Ce:`${/^[\p{L}\p{N} -]+$/u.test(e)?e:`'${e}'`}, ${Ce}`}function Ln(t,e,n="regular",i){let o=ce(i),r=o.faces[n]??o.faces.regular,s=r.w.n,l=0,a="";for(let u of t)l+=r.w[u]??s,a&&(l+=r.k[a+u]??0),a=u;return l*e/1e3}function zi(t,e){let n=ce(e).faces.regular,i=Math.round(n.ascent*t),o=Math.round(n.descent*t),r=Math.round(n.leading*t);return[i+Math.ceil(n.descent*t-1e-9),i+o+r]}function Ye(t,e){return t===" "?!0:(t==="/"||t==="-")&&e!==""&&!/[\d\s/-]/.test(e)}function Gi(t){let e=[...t],n=[],i="";return e.forEach((o,r)=>{i+=o;let s=e[r+1]??"";Ye(o,s)&&s!==" "&&(n.push(i),i="")}),(i||n.length===0)&&n.push(i),n}function Bi(t,e,n,i="regular",o){let r=l=>Ln(l,e,i,o),s=[];for(let l of t.split(/\r\n|\n|\r|\u2028|\u2029/)){let a="";for(let u of Gi(l)){let c=a+u;for(a===""||r(c.trimEnd())<=n?a=c:(s.push(a),a=u);r(a.trimEnd())>n&&[...a.trimEnd()].length>1;){let h=[...a],m=h.length-1;for(;m>1&&r(h.slice(0,m).join(""))>n;)m--;s.push(h.slice(0,m).join("")),a=h.slice(m).join("")}}s.push(a)}return s}function Fn(t,e,n,i){if(t==="")return{width:0,height:0};let o=Bi(t,e,n,"regular",i),r=Math.max(...o.map(a=>Ln(a.trimEnd(),e,"regular",i))),[s,l]=zi(e,i);return{width:Math.ceil(r-1e-9),height:Math.ceil(s+l*(o.length-1)-1e-9)}}var Ni=["bold","boldItalic","italic","regular"];function Ve(t,e){return`${t.toLowerCase().replaceAll(" ","-")}-${e}.woff2`}function We(t){return Ni.filter(e=>wt[t]?.faces[e]!==void 0)}function he(t){let e=new Set,n=i=>{for(let o of i){let r=Bt(o.style.font);r&&e.add(r)}};n(t.elements);for(let i of t.symbols??[])n(i.elements);return Gt.filter(i=>e.has(i))}function Zi(){try{let t=typeof document>"u"?null:document.currentScript;if(t?.src)return new URL("fonts/",t.src).href;let e=void 0;return e?new URL("fonts/",e).href:null}catch{return null}}var Oe=Zi(),Dn=new Set;function Cn(t){Oe=t.endsWith("/")?t:`${t}/`}function fe(t,e={}){if(!(typeof document>"u"||typeof FontFace>"u"||!document.fonts))for(let n of t){let i=Bt(n);if(!i||Dn.has(i))continue;let o=e[i];if(!(!o&&!Oe)){Dn.add(i);for(let r of We(i)){let s=o?.[r],l;if(s)l=Uint8Array.from(atob(s),u=>u.charCodeAt(0));else if(!o)l=`url(${JSON.stringify(Oe+Ve(i,r))}) format("woff2")`;else continue;let a={weight:r.startsWith("bold")?"bold":"normal",style:r==="italic"||r==="boldItalic"?"italic":"normal"};document.fonts.add(new FontFace(i,l,a))}}}}var Yn=.5522847498307936,I=class t{constructor(){v(this,"segments",[])}get isEmpty(){return this.segments.length===0}moveTo(e){return this.segments.push({op:"M",p:e}),this}lineTo(e){return this.segments.push({op:"L",p:e}),this}quadTo(e,n){return this.segments.push({op:"Q",c:n,p:e}),this}curveTo(e,n,i){return this.segments.push({op:"C",c1:n,c2:i,p:e}),this}close(){return this.segments.push({op:"Z"}),this}addPath(e){return this.segments.push(...e.segments),this}addLines(e){return e.forEach((n,i)=>i===0?this.moveTo(n):this.lineTo(n)),this}static rect(e){return new t().addLines([{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]).close()}addEllipse(e){let n=e.x+e.width/2,i=e.y+e.height/2,o=e.width/2,r=e.height/2,s=o*Yn,l=r*Yn;return this.moveTo({x:n+o,y:i}),this.curveTo({x:n,y:i+r},{x:n+o,y:i+l},{x:n+s,y:i+r}),this.curveTo({x:n-o,y:i},{x:n-s,y:i+r},{x:n-o,y:i+l}),this.curveTo({x:n,y:i-r},{x:n-o,y:i-l},{x:n-s,y:i-r}),this.curveTo({x:n+o,y:i},{x:n+s,y:i-r},{x:n+o,y:i-l}),this.close()}static ellipse(e){return new t().addEllipse(e)}translated(e,n){let i=r=>({x:r.x+e,y:r.y+n}),o=new t;return o.segments=this.segments.map(r=>{switch(r.op){case"M":case"L":return{op:r.op,p:i(r.p)};case"Q":return{op:"Q",c:i(r.c),p:i(r.p)};case"C":return{op:"C",c1:i(r.c1),c2:i(r.c2),p:i(r.p)};case"Z":return r}}),o}contours(){let e=[],n=[],i={x:0,y:0};for(let o of this.segments){let r=n.length?n[n.length-1]:i;switch(o.op){case"M":n.length>1&&e.push(n),i=o.p,n=[o.p];break;case"L":n.push(o.p);break;case"Q":for(let s=1;s<=12;s++){let l=s/12,a=1-l;n.push({x:a*a*r.x+2*a*l*o.c.x+l*l*o.p.x,y:a*a*r.y+2*a*l*o.c.y+l*l*o.p.y})}break;case"C":for(let s=1;s<=16;s++){let l=s/16,a=1-l;n.push({x:a*a*a*r.x+3*a*a*l*o.c1.x+3*a*l*l*o.c2.x+l*l*l*o.p.x,y:a*a*a*r.y+3*a*a*l*o.c1.y+3*a*l*l*o.c2.y+l*l*l*o.p.y})}break;case"Z":n.push(i),n.length>1&&e.push(n),n=[i];break}}return n.length>1&&e.push(n),e}trimmed(e){let n=this.contours().map(r=>new It(r)),i=Math.min(Math.max(e,0),1)*n.reduce((r,s)=>r+s.length,0),o=new t;for(let r of n){if(!(i>0))break;o.moveTo(r.points[0]);for(let s=1;s<r.points.length;s++){let l=r.lengths[s]-r.lengths[s-1];if(l<=i){o.lineTo(r.points[s]),i-=l;continue}let a=r.points[s-1],u=r.points[s],c=i/l;o.lineTo({x:a.x+(u.x-a.x)*c,y:a.y+(u.y-a.y)*c}),i=0;break}}return o}data(){let e=[];for(let n of this.segments)switch(n.op){case"M":e.push(`M${R(n.p.x)} ${R(n.p.y)}`);break;case"L":e.push(`L${R(n.p.x)} ${R(n.p.y)}`);break;case"Q":e.push(`Q${R(n.c.x)} ${R(n.c.y)} ${R(n.p.x)} ${R(n.p.y)}`);break;case"C":e.push(`C${R(n.c1.x)} ${R(n.c1.y)} ${R(n.c2.x)} ${R(n.c2.y)} ${R(n.p.x)} ${R(n.p.y)}`);break;case"Z":e.push("Z");break}return e.join(" ")}};function Zt(t){return t<0?-Math.round(-t):Math.round(t)}function R(t){let e=Zt(t*100)/100;return Number.isInteger(e)?String(e===0?0:e):String(e)}var It=class{constructor(e){v(this,"points");v(this,"lengths");this.points=e;let n=0;this.lengths=e.map((i,o)=>(o>0&&(n+=Math.hypot(i.x-e[o-1].x,i.y-e[o-1].y)),n))}get length(){return this.lengths.length?this.lengths[this.lengths.length-1]:0}point(e){if(this.points.length<=1||!(this.length>0))return this.points[0]??{x:0,y:0};let n=Math.min(Math.max(e,0),1)*this.length,i=1;for(;i<this.lengths.length-1&&this.lengths[i]<n;)i++;let o=this.lengths[i]-this.lengths[i-1],r=o>0?(n-this.lengths[i-1])/o:0,s=this.points[i-1],l=this.points[i];return{x:s.x+(l.x-s.x)*r,y:s.y+(l.y-s.y)*r}}},q=t=>t.x+t.width/2,Q=t=>t.y+t.height/2,H=t=>t.x+t.width,K=t=>t.y+t.height;function $e(t,e){if(!t)return{...e};let n=Math.min(t.x,e.x),i=Math.min(t.y,e.y);return{x:n,y:i,width:Math.max(H(t),H(e))-n,height:Math.max(K(t),K(e))-i}}function Lt(t,e,n){return{x:t.x+e,y:t.y+n,width:t.width-2*e,height:t.height-2*n}}function mt(t,e,n){if(n===0)return t;let i=t.x-e.x,o=t.y-e.y;return{x:e.x+i*Math.cos(n)-o*Math.sin(n),y:e.y+i*Math.sin(n)+o*Math.cos(n)}}function ze(t,e){let n=1-e;return{x:t[0].x*(n*n*n)+t[1].x*(3*e*n*n)+t[2].x*(3*e*e*n)+t[3].x*(e*e*e),y:t[0].y*(n*n*n)+t[1].y*(3*e*n*n)+t[2].y*(3*e*e*n)+t[3].y*(e*e*e)}}function On(t,e){let n=[t[0]];for(let i=0;i<Math.floor((t.length-1)/3);i++){let o=t.slice(3*i,3*i+4),r=0;for(let l=1;l<o.length;l++)r+=Math.hypot(o[l].x-o[l-1].x,o[l].y-o[l-1].y);let s=Math.min(400,Math.max(4,Math.ceil(r/Math.max(e,.5))));for(let l=1;l<=s;l++)n.push(ze(o,l/s))}return n}var Y=t=>({x:t.x,y:t.y,width:t.width,height:t.height}),N=t=>t.rotation??0,Ut=t=>({x:t.x+t.width/2,y:t.y+t.height/2}),tt=(t,e)=>mt(e,Ut(t),N(t)),Vn=(t,e)=>mt(e,Ut(t),-N(t));function Wn(t){let e=Y(t);if(N(t)===0)return e;let n=[{x:e.x,y:e.y},{x:H(e),y:e.y},{x:H(e),y:K(e)},{x:e.x,y:K(e)}].map(l=>tt(t,l)),i=n.map(l=>l.x),o=n.map(l=>l.y),r=Math.min(...i),s=Math.min(...o);return{x:r,y:s,width:Math.max(...i)-r,height:Math.max(...o)-s}}function $n(t,e){let n=t.style.textColor!==null&&zt(t.style.textColor);if(!zt(t.style.stroke)&&!n)return t;let i=G(t),r=(t.style.fillStyle==="solid"||t.style.fillStyle==="grid")&&t.style.fill.a>=.5&&Et(t.style.fill)>.5,s=Et(e)>.5&&r?bt:e;return zt(t.style.stroke)&&(i.style.stroke={...s}),n&&(i.style.textColor={...s}),i}function zn(t){return t.kind==="text"||t.kind==="note"?t.style.stroke:t.style.textColor??t.style.stroke}function Ft(t){if(t.kind!=="path"||!t.subpaths)return[];let e=[];for(let n of t.subpaths){if(n.coords.length<8||(n.coords.length-2)%6!==0)continue;let i=[];for(let o=0;o<n.coords.length;o+=2)i.push({x:t.x+n.coords[o]*t.width,y:t.y+n.coords[o+1]*t.height});e.push({closed:n.closed,points:i})}return e}function Ge(t){let e=new I;for(let n of Ft(t)){e.moveTo(n.points[0]);for(let i=0;i<(n.points.length-1)/3;i++)e.curveTo(n.points[3*i+3],n.points[3*i+1],n.points[3*i+2]);n.closed&&e.close()}return e}function Ui(t,e){let n=Y(t),i=e==="top"?{x:q(n),y:n.y}:e==="right"?{x:H(n),y:Q(n)}:e==="bottom"?{x:q(n),y:K(n)}:{x:n.x,y:Q(n)};return tt(t,i)}function Xi(t){let e=[];for(let n=0;n+3<t.length;n+=3){let i=t.slice(n,n+4);for(let o=0;o<16;o++)e.push(ze(i,o/16))}return e.push(t[t.length-1]),e}function ji(t,e,n){let i=null,o=null;for(let s of Ft(t)){let l=Xi(s.points),a=l.length,u=s.closed?a:a-1;for(let c=0;c<u;c++){let h=l[c],m=l[(c+1)%a],f={x:m.x-h.x,y:m.y-h.y},d={x:h.x-e.x,y:h.y-e.y},p=f.x*n.y-n.x*f.y;if(p===0)continue;let x=(f.x*d.y-f.y*d.x)/p,b=(n.x*d.y-n.y*d.x)/p;x>0&&b>=0&&b<=1&&((i===null||x<i)&&(i=x),x<=1&&(o===null||x>o)&&(o=x))}}let r=o??i;return r===null?null:{x:e.x+n.x*r,y:e.y+n.y*r}}function Ji(t,e){let n=Y(t),i=Ut(t),o=Vn(t,e),r=o.x-i.x,s=o.y-i.y;if(!((r!==0||s!==0)&&n.width>0&&n.height>0))return i;if(t.kind==="path"){let c=ji(t,i,{x:r,y:s});if(c)return tt(t,c)}let l=n.width/2,a=n.height/2,u;return t.kind==="ellipse"?u=1/Math.sqrt(r*r/(l*l)+s*s/(a*a)):t.kind==="diamond"?u=1/(Math.abs(r)/l+Math.abs(s)/a):u=Math.min(r!==0?l/Math.abs(r):1/0,s!==0?a/Math.abs(s):1/0),tt(t,{x:i.x+r*u,y:i.y+s*u})}function Gn(t,e){let n=t.elementID?e.get(t.elementID):void 0;return n?Ut(n):{x:t.x,y:t.y}}function Hi(t,e){let n=Y(t);return tt(t,{x:n.x+e.x*n.width,y:n.y+e.y*n.height})}function Bn(t,e,n){let i=t.elementID?n.get(t.elementID):void 0;if(!i)return{x:t.x,y:t.y};let o=t.portIndex,r=i.ports??[];return typeof o=="number"&&Number.isInteger(o)&&o>=0&&o<r.length?Hi(i,r[o]):t.port?Ui(i,t.port):Ji(i,e)}function lt(t,e){let n=t.connector;if(!n)return[{x:0,y:0},{x:0,y:0}];let i=n.waypoints??[];return[Bn(n.start,i.length>0?i[0]:Gn(n.end,e),e),Bn(n.end,i.length>0?i[i.length-1]:Gn(n.start,e),e)]}function at(t){if(t.kind==="polyline")return t.points;let e=[],n=t.points;for(let i=0;i<Math.floor((n.length-1)/3);i++){let o=n[3*i],r=n[3*i+1],s=n[3*i+2],l=n[3*i+3];for(let a=i===0?0:1;a<=24;a++){let u=a/24,c=1-u;e.push({x:c*c*c*o.x+3*c*c*u*r.x+3*c*u*u*s.x+u*u*u*l.x,y:c*c*c*o.y+3*c*c*u*r.y+3*c*u*u*s.y+u*u*u*l.y})}}return e}var me=t=>t===null?null:t==="top"||t==="bottom";function Ki(t){let e=[];for(let n of t){let i=e[e.length-1];if(!(i&&Math.abs(i.x-n.x)<.5&&Math.abs(i.y-n.y)<.5)){if(e.length>=2){let o=e[e.length-2],r=e[e.length-1];if(Math.abs(o.x-r.x)<.5&&Math.abs(r.x-n.x)<.5||Math.abs(o.y-r.y)<.5&&Math.abs(r.y-n.y)<.5){e[e.length-1]=n;continue}}e.push(n)}}return e.length>=2?e:t}function qi(t,e){switch(e.routing){case"straight":return{kind:"polyline",points:t};case"curved":{let n=[t[0]];for(let i=0;i<t.length-1;i++){let o=t[Math.max(i-1,0)],r=t[i],s=t[i+1],l=t[Math.min(i+2,t.length-1)];n.push({x:r.x+(s.x-o.x)/6,y:r.y+(s.y-o.y)/6}),n.push({x:s.x-(l.x-r.x)/6,y:s.y-(l.y-r.y)/6}),n.push(s)}return{kind:"curve",points:n}}case"elbow":{let n=t[0],i=t[1],o=me(e.start.port)??Math.abs(i.y-n.y)>Math.abs(i.x-n.x),r=me(e.end.port),s=[n];for(let l=1;l<t.length;l++){let a=t[l],u=s[s.length-1],c=Math.abs(u.x-a.x)<.5,h=Math.abs(u.y-a.y)<.5;if(c||h){s.push(a),c!==h&&(o=!c);continue}let m=l===t.length-1&&r!==null?!r:o;s.push(m?{x:u.x,y:a.y}:{x:a.x,y:u.y},a),o=m}return{kind:"polyline",points:Ki(s)}}}}function ct(t,e){let n=t.connector;if(!n)return{kind:"polyline",points:[]};let[i,o]=lt(t,e);if(n.waypoints&&n.waypoints.length>0)return qi([i,...n.waypoints.map(a=>({x:a.x,y:a.y})),o],n);let r=o.x-i.x,s=o.y-i.y,l=Math.abs(r)>=Math.abs(s);switch(n.routing){case"straight":return{kind:"polyline",points:[i,o]};case"curved":return l?{kind:"curve",points:[i,{x:i.x+r/2,y:i.y},{x:o.x-r/2,y:o.y},o]}:{kind:"curve",points:[i,{x:i.x,y:i.y+s/2},{x:o.x,y:o.y-s/2},o]};case"elbow":{let a=me(n.start.port)??!l,u=me(n.end.port)??!l;if(a&&u){let c=i.y+s/2;return{kind:"polyline",points:[i,{x:i.x,y:c},{x:o.x,y:c},o]}}if(!a&&!u){let c=i.x+r/2;return{kind:"polyline",points:[i,{x:c,y:i.y},{x:c,y:o.y},o]}}return a?{kind:"polyline",points:[i,{x:i.x,y:o.y},o]}:{kind:"polyline",points:[i,{x:o.x,y:i.y},o]}}}}function Nn(t,e,n){let i=Math.atan2(t.y-e.y,t.x-e.x),o=Math.PI/7,r=s=>({x:t.x-n*Math.cos(i+s),y:t.y-n*Math.sin(i+s)});return[r(o),r(-o)]}function Zn(t,e){let n=at(ct(t,e));if(n.length===0)return{x:0,y:0,width:0,height:0};let i=n[0].x,o=n[0].y,r=i,s=o;for(let l of n)i=Math.min(i,l.x),o=Math.min(o,l.y),r=Math.max(r,l.x),s=Math.max(s,l.y);return{x:i,y:o,width:r-i,height:s-o}}function Un(t,e){let n=at(ct(t,e));if(n.length<=1)return n[0]??{x:0,y:0};let i=[],o=0;for(let s=0;s<n.length-1;s++){let l=Math.hypot(n[s+1].x-n[s].x,n[s+1].y-n[s].y);i.push(l),o+=l}let r=o/2;for(let s=0;s<i.length;s++){let l=i[s];if(r<=l||s===i.length-1){let a=l===0?0:r/l;return{x:n[s].x+(n[s+1].x-n[s].x)*a,y:n[s].y+(n[s+1].y-n[s].y)*a}}r-=l}return n[0]}function et(t){let e=new Map;for(let n of t.elements)e.has(n.id)||e.set(n.id,n);return e}function Ne(t,e,n){let i=t[1]+n>>>0,o=i<t[1]?1:0;return[t[0]+e+o>>>0,i]}function Qi(t,e){let n=t&65535,i=t>>>16,o=e&65535,r=e>>>16,s=n*o,l=n*r,a=i*o,u=i*r,c=l+a,h=s+c%65536*65536;return[u+Math.floor(c/65536)+Math.floor(h/4294967296)>>>0,h>>>0]}function Ze(t,e,n){let i=Qi(t[1],n);return[i[0]+Math.imul(t[0],n)+Math.imul(t[1],e)>>>0,i[1]]}function Be(t,e){let n=(t[1]>>>e|t[0]<<32-e)>>>0;return[(t[0]^t[0]>>>e)>>>0,(t[1]^n)>>>0]}function Xn(t){return t=Ze(Be(t,30),3210233709,484763065),t=Ze(Be(t,27),2496678331,321982955),Be(t,31)}var dt=class{constructor(e){v(this,"state");this.state=Ne([0,e>>>0],2654435769,2135587861)}next(){return this.state=Ne(this.state,2654435769,2135587861),Xn(this.state)}top53(){let[e,n]=this.next();return e*2097152+(n>>>11)}signed(){return Math.floor(this.top53())/2**52-1}unit(){return this.top53()/2**53}};function de(t,e){let n=Ne([0,t>>>0],..._i(e));return n=Xn(n),Math.max(1,n[1]>>>0)}function _i(t){let e=Ze([0,t>>>0],2654435769,2135587861);return[e[0],e[1]]}var jn=(t,e,n)=>t.signed()*e*n;function ut(t,e,n,i,o,r,s){let l=Math.hypot(e.x-t.x,e.y-t.y);if(!(l>.5))return;let a=l<200?1:l>500?.4:-.0016668*l+1.233334,u=l<20?l/10:2;for(let c=0;c<2;c++){let h=(c===0?1:.5)*a,m=()=>jn(n,u,i)*h,f=n.unit()*.4+.3,d=jn(n,l/60,i)*o*a,p=e.x-t.x,x=e.y-t.y,b=-x/l,k=p/l,g=r?t:{x:t.x+m(),y:t.y+m()},P=r?e:{x:e.x+m(),y:e.y+m()},w=t.x+p*f*.66+b*d+m()*.5,y=t.y+x*f*.66+k*d+m()*.5,M=t.x+p*(.5+f*.5)+b*d+m()*.5,T=t.y+x*(.5+f*.5)+k*d+m()*.5;s.moveTo(g),s.curveTo(P,{x:w,y},{x:M,y:T})}}function Ue(t,e,n,i){let o=new I;for(let r=0;r<t.length;r++)ut(t[r],t[(r+1)%t.length],e,n,i,!1,o);return o}function Jn(t,e,n){let i=new I,o=t.x+t.width/2,r=t.y+t.height/2,s=t.width/2,l=t.height/2;if(!(s>.5&&l>.5))return i;let a=Math.max(8,Math.min(24,Math.trunc((s+l)/6))),u=Math.min(2.5,(s+l)/25)*n;for(let c=0;c<2;c++){let h=e.unit()*2*Math.PI,m=2*Math.PI*(c===0?1:1.04),f=Math.trunc(a*m/(2*Math.PI))+1,d=[];for(let p=0;p<f;p++){let x=h+m*p/a,b=e.signed()*u,k=e.signed()*u;d.push({x:o+s*Math.cos(x)+b,y:r+l*Math.sin(x)+k})}to(d,i)}return i}function to(t,e){if(!(t.length<=2)){e.moveTo(t[0]);for(let n=0;n<t.length-1;n++){let i=t[Math.max(n-1,0)],o=t[n],r=t[n+1],s=t[Math.min(n+2,t.length-1)];e.curveTo(r,{x:o.x+(r.x-i.x)/6,y:o.y+(r.y-i.y)/6},{x:r.x-(s.x-o.x)/6,y:r.y-(s.y-o.y)/6})}}}var Xe=-41*Math.PI/180;function Hn(t,e,n){if(!(n>0))return[];let i=Math.cos(e),o=Math.sin(e),r=t.filter(m=>m.length>=3).map(m=>m.map(f=>({x:f.x*i+f.y*o,y:-f.x*o+f.y*i}))),s=r.flat();if(s.length===0)return[];let l=1/0,a=-1/0;for(let m of s)l=Math.min(l,m.y),a=Math.max(a,m.y);let u=(m,f)=>({x:m*i-f*o,y:m*o+f*i}),c=[],h=l+n/2;for(;h<a;){let m=[];for(let f of r)for(let d=0;d<f.length;d++){let p=f[d],x=f[(d+1)%f.length];(p.y<=h&&h<x.y||x.y<=h&&h<p.y)&&m.push(p.x+(h-p.y)/(x.y-p.y)*(x.x-p.x))}m.sort((f,d)=>f-d);for(let f=0;f+1<m.length;f+=2)m[f+1]-m[f]>.5&&c.push([u(m[f],h),u(m[f+1],h)]);h+=n}return c}var _n=2,je=.75,eo=.8,qn=.6;function ti(t,e){return[...Qn(t,e,!1),...Qn(t,e,!0)]}function Qn(t,e,n){if(!(e>0))return[];let i=u=>n?{x:u.y,y:u.x}:u,o=t.filter(u=>u.length>=3).map(u=>u.map(i)),r=o.flat().map(u=>u.y);if(r.length===0)return[];let s=Math.min(...r),l=Math.max(...r),a=[];for(let u=Math.floor(s/e)*e;u<l-.5;u+=e){if(!(u>s+.5))continue;let c=[];for(let h of o)for(let m=0;m<h.length;m++){let f=h[m],d=h[(m+1)%h.length];(f.y<=u&&u<d.y||d.y<=u&&u<f.y)&&c.push(f.x+(u-f.y)/(d.y-f.y)*(d.x-f.x))}c.sort((h,m)=>h-m);for(let h=0;h+1<c.length;h+=2)c[h+1]-c[h]>.5&&a.push([i({x:c[h],y:u}),i({x:c[h+1],y:u})])}return a}function ei(t){return .2126*t.r+.7152*t.g+.0722*t.b>.5?{r:t.r*.84,g:t.g*.84,b:t.b*.8,a:t.a}:{r:t.r+(1-t.r)*.25,g:t.g+(1-t.g)*.25,b:t.b+(1-t.b)*.25,a:t.a}}function Je(t){return t.style.fillStyle==="grid"&&t.style.fill.a>0&&["rectangle","ellipse","diamond","path"].includes(t.kind)}function ye(t,e,n){let i=(Math.imul(t,668265261)^Math.imul(e,374761393)^Math.imul(n,2654435761))>>>0;return i=Math.imul(i^i>>>15,2246822507)>>>0,i=Math.imul(i^i>>>13,3266489909)>>>0,i=(i^i>>>16)>>>0,i/4294967296}function ni(t,e,n){let i=n/_n;return{x:(t+.5+(ye(t,e,1)-.5)*qn)*i,y:(e+.5+(ye(t,e,2)-.5)*qn)*i}}function no(t,e,n,i){let o=1/0;for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){if(r===0&&s===0)continue;let l=ni(t+r,e+s,i);o=Math.min(o,Math.hypot(l.x-n.x,l.y-n.y))}return o*eo}function io(t,e,n){let i=Math.cos(e),o=Math.sin(e),r=n*.8,s=n*.5;return[-1,0,1].map(l=>{let a=t.x-o*s*l,u=t.y+i*s*l;return[{x:a-i*r,y:u-o*r},{x:a+i*r,y:u+o*r}]})}function oo(t,e){let n=!1;for(let i of t){if(i.length<3)continue;let o=i.length-1;for(let r=0;r<i.length;r++){let s=i[r],l=i[o];s.y>e.y!=l.y>e.y&&e.x<(l.x-s.x)*(e.y-s.y)/(l.y-s.y)+s.x&&(n=!n),o=r}}return n}function ro(t,e){let n=1/0;for(let i of e)if(!(i.length<2))for(let o=0;o<i.length;o++){let r=i[o],s=i[(o+1)%i.length],l=s.x-r.x,a=s.y-r.y,u=l*l+a*a,c=u>0?Math.max(0,Math.min(1,((t.x-r.x)*l+(t.y-r.y)*a)/u)):0;n=Math.min(n,Math.hypot(t.x-(r.x+c*l),t.y-(r.y+c*a)))}return n}var so=(t,e)=>e.x>=t.x&&e.x<t.x+t.width&&e.y>=t.y&&e.y<t.y+t.height,pe=new Map;function ii(t){if(t.length===0)return[];let e=t.map(o=>[o.kind,o.x,o.y,o.width,o.height,o.rotation??0,Pt(o),JSON.stringify(o.subpaths??null),o.style.stroke.r,o.style.stroke.g,o.style.stroke.b,o.style.stroke.a,o.style.roughness,o.style.strokeWidth].join(",")).join(";"),n=pe.get(e);if(n)return n;let i=lo(t);return pe.size>=16&&pe.clear(),pe.set(e,i),i}function lo(t){let e=t.map(r=>{let s=He(r).map(f=>f.map(d=>tt(r,d))),l=s.flat(),a=l.map(f=>f.x),u=l.map(f=>f.y),c=a.length?Math.min(...a):0,h=u.length?Math.min(...u):0,m={x:c,y:h,width:(a.length?Math.max(...a):0)-c,height:(u.length?Math.max(...u):0)-h};return{contours:s,box:m,cell:Pt(r),element:r}}),n=e.map(()=>[]),i=new Set;for(let r of e){let s=r.cell/_n,l=Lt(r.box,-r.cell,-r.cell),a=Math.floor(l.x/s),u=Math.ceil((l.x+l.width)/s),c=Math.floor(l.y/s),h=Math.ceil((l.y+l.height)/s),m=je*r.cell;for(let f=a;f<u;f++)for(let d=c;d<h;d++){let p=`${r.cell}|${f}|${d}`;if(i.has(p))continue;i.add(p);let x=ni(f,d,r.cell),b=1/0,k=-1;for(let y=0;y<e.length;y++){let M=e[y];if(!so(Lt(M.box,-m,-m),x))continue;if(oo(M.contours,x)){b=0;break}let T=ro(x,M.contours);T<b&&(b=T,k=y)}if(!(b>0&&b<=m&&k>=0))continue;let g=ye(f,d,3)*Math.PI,P=no(f,d,x,r.cell),w=Math.trunc(ye(f,d,4)*4294967296)>>>0;for(let[y,M]of io(x,g,P))n[k].push([y,M,w])}}let o=[];return e.forEach((r,s)=>{if(n[s].length===0)return;let l=r.element,a=new I;for(let[u,c,h]of n[s])l.style.roughness<=0?a.moveTo(u).lineTo(c):ut(u,c,new dt(h),l.style.roughness*.35,.2,!1,a);o.push({ink:{...l.style.stroke,a:l.style.stroke.a*.6},width:Math.max(.8,l.style.strokeWidth*.45),path:a})}),o}var ge=class{constructor(e=6e3){v(this,"map",new Map);v(this,"limit");this.limit=e}get(e,n){let i=this.map.get(e);if(i!==void 0)return i;let o=n();return this.map.size>=this.limit&&this.map.clear(),this.map.set(e,o),o}},si=new ge,ao=new ge;function li(t,e){let n=t.style;return[e,t.kind,t.x,t.y,t.width,t.height,t.seed,n.roughness,n.bowing,n.strokeWidth,n.fillStyle,n.fillStyle==="grid"?Pt(t):0,t.path?t.path.join(","):t.subpaths?JSON.stringify(t.subpaths):""].join("|")}var Pt=t=>Math.max(8,t.style.gridSize??50);function Mt(t){return t.kind==="freehand"&&t.path===null?oi(t):si.get(li(t,0),()=>oi(t))}function ai(t){return[{x:t.x,y:t.y},{x:H(t),y:t.y},{x:H(t),y:K(t)},{x:t.x,y:K(t)}]}function xe(t){return[{x:q(t),y:t.y},{x:H(t),y:Q(t)},{x:q(t),y:K(t)},{x:t.x,y:Q(t)}]}function oi(t){let e=Y(t),n=new dt(t.seed),i=t.style.roughness;switch(t.kind){case"ellipse":return i<=0?I.ellipse(e):Jn(e,n,i);case"diamond":return i<=0?new I().addLines(xe(e)).close():Ue(xe(e),n,i,t.style.bowing);case"text":case"connector":return I.rect(e);case"freehand":return uo(t);case"path":return i<=0?Ge(t):co(t,n);default:return i<=0?I.rect(e):Ue(ai(e),n,i,t.style.bowing)}}function co(t,e){let n=t.style.roughness,i=new I;for(let o of Ft(t)){let r=o.points;for(let s=0;s<(r.length-1)/3;s++){let l=r[3*s],a=r[3*s+1],u=r[3*s+2],c=r[3*s+3];if(a.x===l.x&&a.y===l.y&&u.x===c.x&&u.y===c.y){ut(l,c,e,n,t.style.bowing,!0,i);continue}let h=Math.hypot(a.x-l.x,a.y-l.y)+Math.hypot(u.x-a.x,u.y-a.y)+Math.hypot(c.x-u.x,c.y-u.y),m=Math.min(2.5,h/30)*n;for(let f=0;f<2;f++){let d=f===0?1:.5,p=()=>e.signed()*m*d;i.moveTo(l);let x=a.x+p(),b=a.y+p(),k=u.x+p(),g=u.y+p();i.curveTo(c,{x,y:b},{x:k,y:g})}}}return i}function uo(t){let e=Y(t),n=t.path;if(n&&n.length>=8&&(n.length-2)%6===0){let r=l=>({x:e.x+n[2*l]*e.width,y:e.y+n[2*l+1]*e.height}),s=new I().moveTo(r(0));for(let l=0;l<Math.floor((n.length/2-1)/3);l++)s.curveTo(r(3*l+3),r(3*l+1),r(3*l+2));return s}let i=(t.points??[]).map(r=>({x:e.x+r.x*e.width,y:e.y+r.y*e.height})),o=new I;if(i.length===0)return o;if(o.moveTo(i[0]),i.length===1)return o.lineTo(i[0]);if(i.length===2)return o.lineTo(i[1]);for(let r=1;r<i.length-1;r++)o.quadTo({x:(i[r].x+i[r+1].x)/2,y:(i[r].y+i[r+1].y)/2},i[r]);return o.lineTo(i[i.length-1])}function He(t){return t.kind!=="path"?[ho(t)]:Ft(t).map(e=>On(e.points,3))}function ho(t){let e=Y(t);if(t.kind==="ellipse"){let n=[];for(let i=0;i<48;i++){let o=2*Math.PI*i/48;n.push({x:q(e)+e.width/2*Math.cos(o),y:Q(e)+e.height/2*Math.sin(o)})}return n}return t.kind==="diamond"?xe(e):ai(e)}function be(t){let e=Y(t);return t.kind==="ellipse"?I.ellipse(e):t.kind==="path"?Ge(t):t.kind==="diamond"?new I().addLines(xe(e)).close():I.rect(e)}function qe(t){return t.style.fillStyle==="solid"||["freehand","connector","text","image"].includes(t.kind)?new I:si.get(li(t,1),()=>fo(t))}function fo(t){let e=He(t),n=new dt((t.seed^1540483477)>>>0),i=new I;if(t.style.fillStyle==="grid"){for(let[s,l]of ti(e,Pt(t)))t.style.roughness<=0?i.moveTo(s).lineTo(l):ut(s,l,n,t.style.roughness*.3,.3,!1,i);return i}let o=Math.max(4,t.style.strokeWidth*4),r=[Xe];t.style.fillStyle==="crossHatch"&&r.push(Xe+Math.PI/2);for(let s of r)for(let[l,a]of Hn(e,s,o))t.style.roughness<=0?i.moveTo(l).lineTo(a):ut(l,a,n,t.style.roughness*.6,.5,!1,i);return i}function ke(t,e){switch(t){case"solid":return null;case"dashed":return[Math.max(8,e*4),Math.max(6,e*3)];case"dotted":return[.01,Math.max(5,e*2.6)]}}function Qe(t,e,n){let i=t.connector;if(!i)return[new I,new I];let[o,r]=lt(t,e),s=ct(t,e),l=i.hops===!0&&n?mo(t,s,n,e):[],a=[t.seed,t.style.roughness,t.style.bowing,t.style.strokeWidth,i.routing,i.startHead,i.endHead,i.start.port,i.end.port,o.x,o.y,r.x,r.y,JSON.stringify(i.waypoints),JSON.stringify(l)].join("|");return ao.get(a,()=>po(t,s,l))}function ci(t){return Math.max(8,t*4)}function ui(t){let e=t.points,n=[];if(t.kind==="polyline"){for(let i=0;i<e.length-1;i++)n.push([e[i],e[i+1]]);return n}for(let i=0;i<Math.floor((e.length-1)/3);i++){let o=e.slice(3*i,3*i+4),r=[];for(let s=0;s<=24;s++)r.push(Ke(o,s/24));n.push(r)}return n}function hi(t){let e=[0];for(let n=1;n<t.length;n++)e.push(e[n-1]+Math.hypot(t[n].x-t[n-1].x,t[n].y-t[n-1].y));return e}function Ke(t,e){let n=1-e;return{x:n*n*n*t[0].x+3*n*n*e*t[1].x+3*n*e*e*t[2].x+e*e*e*t[3].x,y:n*n*n*t[0].y+3*n*n*e*t[1].y+3*n*e*e*t[2].y+e*e*e*t[3].y}}function ri(t,e,n){let i=(r,s)=>{let l=(d,p)=>({x:d.x+(p.x-d.x)*s,y:d.y+(p.y-d.y)*s}),a=l(r[0],r[1]),u=l(r[1],r[2]),c=l(r[2],r[3]),h=l(a,u),m=l(u,c),f=l(h,m);return[[r[0],a,h,f],[f,m,c,r[3]]]},o=i(t,n)[0];return n>0?i(o,e/n)[1]:[t[0],t[0],t[0],t[0]]}function mo(t,e,n,i){let o=ui(e);if(o.length===0)return[];let r=new Set(n.layers.filter(u=>u.visible).map(u=>u.id)),s=[];for(let u of st(n)){if(u.id===t.id)break;u.kind!=="connector"||!r.has(u.layerID)||s.push(at(ct(u,i)))}let l=ci(t.style.strokeWidth),a=[];for(let u of o){let c=hi(u),h=c[c.length-1],m=[];for(let d=0;d<u.length-1;d++){let p=u[d],x=u[d+1],b=x.x-p.x,k=x.y-p.y;for(let g of s)for(let P=0;P<g.length-1;P++){let w=g[P],y=g[P+1],M=y.x-w.x,T=y.y-w.y,A=b*T-k*M;if(Math.abs(A)<1e-9)continue;let O=w.x-p.x,D=w.y-p.y,V=(O*T-D*M)/A,$=(O*k-D*b)/A;V>0&&V<1&&$>=0&&$<=1&&m.push(c[d]+V*(c[d+1]-c[d]))}}let f=[];for(let d of m.sort((p,x)=>p-x))d<l+2||d>h-l-2||f.length>0&&d-f[f.length-1]<2*l+2||f.push(d);a.push(f)}return a}function po(t,e,n){let i=t.connector,o=new dt(t.seed),r=t.style.roughness,s=t.style.bowing,l=new I,a=new I,u=r*3,c=()=>o.signed()*u,h=(b,k,g,P)=>{let w={x:g.y,y:-g.x};(w.y>1e-9||Math.abs(w.y)<=1e-9&&w.x>0)&&(w={x:-w.x,y:-w.y});let y=P*.5523,M={x:(b.x+k.x)/2,y:(b.y+k.y)/2},T={x:M.x+w.x*P,y:M.y+w.y*P};l.moveTo(b);let A=b.x+w.x*y+c(),O=b.y+w.y*y+c(),D=T.x-g.x*y+c(),V=T.y-g.y*y+c();l.curveTo(T,{x:A,y:O},{x:D,y:V});let $=T.x+g.x*y+c(),B=T.y+g.y*y+c(),Z=k.x+w.x*y+c(),U=k.y+w.y*y+c();l.curveTo(k,{x:$,y:B},{x:Z,y:U})},m=ci(t.style.strokeWidth);if(e.kind==="polyline"){let b=e.points,k=(g,P)=>{r<=0?l.moveTo(g).lineTo(P):ut(g,P,o,r,s,!0,l)};for(let g=0;g<Math.max(b.length-1,0);g++){let P=b[g],w=b[g+1],y=Math.hypot(w.x-P.x,w.y-P.y),M=y>0?{x:(w.x-P.x)/y,y:(w.y-P.y)/y}:{x:0,y:0},T=O=>({x:P.x+M.x*O,y:P.y+M.y*O}),A=P;for(let O of g<n.length?n[g]:[]){let D=T(O-m),V=T(O+m);k(A,D),h(D,V,M,m),A=V}k(A,w)}}else{let b=e.points,k=ui(e);l.moveTo(b[0]);for(let g=0;g<Math.floor((b.length-1)/3);g++){let P=b[3*g+1],w=b[3*g+2],y=b[3*g+3],M=P.x+c(),T=P.y+c(),A=w.x+c(),O=w.y+c(),D=g<n.length?n[g]:[];if(D.length===0){l.curveTo(y,{x:M,y:T},{x:A,y:O});continue}let V=[b[3*g],{x:M,y:T},{x:A,y:O},y],$=hi(k[g]),B=ot=>{let C=0;for(;C<$.length-2&&$[C+1]<ot;)C++;let ft=$[C+1]-$[C];return(C+(ft>0?(ot-$[C])/ft:0))/24},Z=0;for(let ot of D){let C=B(ot-m),ft=B(ot+m),oe=ri(V,Z,C);(g>0||Z>0)&&l.moveTo(oe[0]),l.curveTo(oe[3],oe[1],oe[2]);let Ot=Ke(V,C),Vt=Ke(V,ft),re=Math.hypot(Vt.x-Ot.x,Vt.y-Ot.y),Ci=re>0?{x:(Vt.x-Ot.x)/re,y:(Vt.y-Ot.y)/re}:{x:0,y:0};h(Ot,Vt,Ci,re/2),Z=ft}let U=ri(V,Z,1);l.moveTo(U[0]).curveTo(U[3],U[1],U[2])}}let f=at(e),d=Math.max(10,t.style.strokeWidth*5),p=(b,k)=>{r<=0?l.moveTo(b).lineTo(k):ut(b,k,o,r*.5,0,!0,l)},x=(b,k,g)=>{let[P,w]=Nn(k,g,d);switch(b){case"arrow":p(P,k),p(w,k);break;case"triangle":p(P,k),p(w,k),p(P,w),a.moveTo(k).lineTo(P).lineTo(w).close();break;case"dot":{let y=d*.32,M=Math.atan2(k.y-g.y,k.x-g.x),T=k.x-y*Math.cos(M),A=k.y-y*Math.sin(M);a.addEllipse({x:T-y,y:A-y,width:2*y,height:2*y});break}case"bar":{let y=Math.atan2(k.y-g.y,k.x-g.x)+Math.PI/2,M=d*.5;p({x:k.x-M*Math.cos(y),y:k.y-M*Math.sin(y)},{x:k.x+M*Math.cos(y),y:k.y+M*Math.sin(y)});break}}};return f.length>1&&(x(i.endHead,f[f.length-1],f[f.length-2]),x(i.startHead,f[0],f[1])),[l,a]}function en(t,e){switch(t){case"linear":return e;case"easeIn":return e*e*e;case"easeOut":return 1-Math.pow(1-e,3);case"easeInOut":return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2;case"hold":return 0;case"spring":return yo(e);case"bounce":return go(e);case"elastic":return xo(e)}}function yo(t){if(t<=0)return 0;if(t>=1)return 1;let e=n=>1-Math.exp(-6*n)*(Math.cos(3*Math.PI*n)+6/(3*Math.PI)*Math.sin(3*Math.PI*n));return e(t)+t*(1-e(1))}function go(t){if(t<=0)return 0;if(t>=1)return 1;let e=7.5625,n=2.75;if(t<1/n)return e*t*t;if(t<2/n){let o=t-1.5/n;return e*o*o+.75}if(t<2.5/n){let o=t-2.25/n;return e*o*o+.9375}let i=t-2.625/n;return e*i*i+.984375}function xo(t){return t<=0?0:t>=1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*(2*Math.PI/3))+1}var Xt=(t,e)=>t%e;function jt(t,e){let n=(t.repeats??[]).filter(le).slice().sort((i,o)=>i.start-o.start);if(n.length===0)return e;for(let i of n){if(!(e>=i.end))continue;let o=i.end-i.start;if(i.count===null)return i.start+Xt(e-i.start,o);let r=o*i.count;if(e<i.start+r)return i.start+Xt(e-i.start,o);e-=r-o}return e}function _e(t,e,n,i,o){e=jt(t,e);let r,s;for(let c of t.keys)if(n(c)!==void 0)if(c.t<=e)r=c;else{s=c;break}if(!r&&!s)return i;if(r&&!s)return n(r);if(!r&&s)return n(s);let l=r,a=s,u=a.t-l.t>0?(e-l.t)/(a.t-l.t):1;return o(n(l),n(a),en(l.ease??"linear",u))}var bo=(t,e,n)=>t+(e-t)*n,we=(t,e,n)=>Math.min(Math.max(t+(e-t)*n,0),1),fi=(t,e,n)=>({r:we(t.r,e.r,n),g:we(t.g,e.g,n),b:we(t.b,e.b,n),a:we(t.a,e.a,n)});function pt(t,e,n,i){return _e(t,e,o=>o[n],i,bo)}function ko(t,e){e=jt(t,e);let n=(o,r)=>{let s;for(let a of t.keys)a.t<=e&&o(a)!==void 0&&(s=a);let l=t.keys.find(a=>a.t>e&&o(a)!==void 0);return!s||!l?!1:s.ease!=="hold"&&!r(o(s),o(l))},i=o=>n(r=>r[o],(r,s)=>r===s);return i("x")||i("y")||i("width")||i("height")||i("rotation")||i("strokeWidth")||n(o=>o.stroke,St)||n(o=>o.fill,St)||i("reveal")||i("opacity")}function tn(t,e){e=jt(t,e);let n=t.keys.filter(o=>o.visible!==void 0);if(n.length===0)return!0;let i;for(let o of n)o.t<=e&&(i=o);return i?i.visible:!n[0].visible}function wo(t,e,n){if(e=G(e),t.keys.some(i=>i.reveal!==void 0)){let i=pt(t,n,"reveal",e.reveal??1);e.reveal=i>=1?null:Math.max(0,i)}if(t.keys.some(i=>i.opacity!==void 0)){let i=Math.min(Math.max(pt(t,n,"opacity",e.style.opacity??1),0),1);e.style.opacity=i>=1?null:i}return e.kind==="connector"||(e.x=pt(t,n,"x",e.x),e.y=pt(t,n,"y",e.y),e.width=Math.max(0,pt(t,n,"width",e.width)),e.height=Math.max(0,pt(t,n,"height",e.height)),t.keys.some(i=>i.rotation!==void 0)&&(e.rotation=pt(t,n,"rotation",N(e))),e.style.strokeWidth=Math.max(0,pt(t,n,"strokeWidth",e.style.strokeWidth)),e.style.stroke=_e(t,n,i=>i.stroke,e.style.stroke,fi),e.style.fill=_e(t,n,i=>i.fill,e.style.fill,fi)),e}function Po(t,e){e=jt(t,e);let n=null;for(let o of t.follow??[])o.start<=e&&(n===null||o.start>n.start)&&(n=o);if(!n)return null;let i=n;return t.keys.some(o=>o.t>=i.end&&o.t<=e&&(o.x!==void 0||o.y!==void 0))?null:n}function Mo(t,e){if(t.kind==="connector")return new It(at(ct(t,et(e))));let n=G(t);n.style.roughness=0;let i=Mt(n).contours()[0]??[];return new It(N(t)===0?i:i.map(o=>tt(t,o)))}function Ro(t,e,n,i){let o=Po(t,n);if(!o)return e;n=jt(t,n);let r=i.elements.find(h=>h.id===o.path);if(!r||r.id===e.id)return e;let s=Mo(r,i),l=o.end-o.start,a=Math.min(Math.max(en(o.ease??"easeInOut",l>0?Math.min(1,(n-o.start)/l):1),0),1)*(o.laps??1);a>1&&(a=Xt(a,1)===0?1:Xt(a,1)),o.reverse===!0&&(a=1-a);let u=s.point(a),c=G(e);if(c.x=u.x-e.width/2,c.y=u.y-e.height/2,o.orient===!0){let h=o.reverse===!0?-.01:.01,m=s.point(a-h/2),f=s.point(a+h/2);(m.x!==f.x||m.y!==f.y)&&(c.rotation=Math.atan2(f.y-m.y,f.x-m.x))}return c}function vo(t,e,n,i){if(!(n>0))return 0;let o=z(t.duration);if(o>0){let s=Zt(e*o/n);s!==0&&(e=s*n/o)}let r=Xt(e*i,n);return r<0?-r:r===0?0:n-r}function To(t){let e=new Map;for(let n of t.tracks)e.has(n.element)||e.set(n.element,n);return e}function nt(t,e){return _(Jt(t,e),z(e))}function Jt(t,e){let n=t.timeline;if(!n)return t;e=z(e);let i=To(n),o=n.boil===null?null:Math.trunc(Math.floor(e*At(n.fps)+1e-9)/Math.max(1,n.boil))%De>>>0,r=new Set;for(let f of i.values())tn(f,e)||r.add(f.element);let s=null;if(n.settle===!0){s=new Set;for(let f of i.values())ko(f,e)&&s.add(f.element)}let l=f=>{let d=i.get(f.id)?.boil;return d??(s?f.connector?[f.connector.start.elementID,f.connector.end.elementID].some(p=>p!==null&&s.has(p)):s.has(f.id):!0)},a=t.elements.map(f=>{let d=i.get(f.id),p=d?wo(d,f,e):f;o!==null&&o>0&&l(f)&&(p===f&&(p=G(f)),p.seed=de(f.seed,o));let x=d?.march!=null?ke(p.style.dash,p.style.strokeWidth):null;return d?.march!=null&&x&&(p===f&&(p=G(f)),p.style.dashOffset=vo(n,d.march,x.reduce((b,k)=>b+k,0),e)),p});a=a.map((f,d)=>r.has(f.id)?t.elements[d]:f);let u={...t,elements:a,timeline:null};a=a.map(f=>{let d=i.get(f.id);return d?Ro(d,f,e,u):f});let c={...t,elements:a,timeline:null},h=et(c),m=new Set(r);return a=a.map(f=>{let d=f.connector;if(!d||![d.start.elementID,d.end.elementID].some(k=>k!==null&&r.has(k)))return f;if(!(i.get(f.id)?.keys.some(k=>k.visible!==void 0)??!1))return m.add(f.id),f;let[p,x]=lt(f,h),b=G(f);return b.connector.start={elementID:null,port:d.start.port,x:p.x,y:p.y},b.connector.end={elementID:null,port:d.end.port,x:x.x,y:x.y},b}),{...t,elements:a.filter(f=>!m.has(f.id)),timeline:null}}function yt(t){return t.timeline?t.timeline.poster??t.timeline.duration:0}function di(t){return t.timeline?nt(t,yt(t)):_(t,0)}function So(t,e){let n=t.camera??[];if(n.length===0)return null;let i;for(let l of n)l.t<=e&&(i=l);let o=n.find(l=>l.t>e);if(!i)return mi(n[0]);if(!o)return mi(i);let r=en(i.ease??"easeInOut",(e-i.t)/Math.max(o.t-i.t,1e-9)),s=(l,a)=>l+(a-l)*r;return{x:s(i.x,o.x),y:s(i.y,o.y),width:Math.max(1,s(i.width,o.width)),height:Math.max(1,s(i.height,o.height))}}var mi=t=>({x:t.x,y:t.y,width:t.width,height:t.height});function Dt(t,e){let n=t.camera?.[0],i=So(t,e);return!n||!i||!(i.width>0&&i.height>0)?null:Ao(i,n.width/n.height)}function Ao(t,e){if(!(t.width>0&&t.height>0&&e>0))return t;let n=t.width,i=t.height;return t.width/t.height<e?n=t.height*e:i=t.width/e,{x:t.x+t.width/2-n/2,y:t.y+t.height/2-i/2,width:n,height:i}}function Eo(t){return Math.max(1,Math.ceil(z(t.duration)*At(t.fps)))}function Pe(t){let e=At(t.fps),n=[];for(let o=0;o<Eo(t);o++)n.push(o/e);let i=n[n.length-1];return t.duration-i>1e-6&&n.push(t.duration),n}function pi(t,e){let n=-1;return(t.markers??[]).forEach((i,o)=>{i.t<=e&&(n=o)}),n}function yi(t){let e=t.timeline;if(!e)return new Set;let n=e.poster??e.duration;return new Set(e.tracks.filter(i=>!tn(i,0)&&!tn(i,n)).map(i=>i.element))}var Io=8,Lo=2e4,nn=1e-9;function Me(t,e){let n=(t.timeline?.markers??[]).find(i=>i.name.toLowerCase()===e);return n?Math.min(Math.max(n.t,0),z(t.timeline?.duration??0)):null}function Kt(t,e){switch(e){case"up":return Me(t,"up")??0;case"over":return Me(t,"over")??Kt(t,"up");case"down":return Me(t,"down")??Kt(t,"over");default:return Me(t,"hit")}}function Fo(t,e,n,i){let o=z(t.timeline?.duration??0);if(t.button===!0)return Kt(t,"up")??0;let r=i!==null&&Number.isFinite(i)?i:0;switch(n??"loop"){case"still":return Math.min(t.timeline?.poster??o,o);case"click":return Math.min(Math.max(r,0),o);case"once":return Math.min(Math.max(e+r,0),o);default:{if(o<=0)return 0;let s=e+r,l=s%o;return l<0&&(l+=o),s>nn&&(l<nn||o-l<nn)?o:l}}}function Do(t,e){let n=t.params;if(!n||Object.keys(n).length===0)return t;let i=new Map(Object.entries(n));for(let[r,s]of Object.entries(e??{}))i.has(r)&&i.set(r,s);let o=r=>r.includes("{{")?r.replace(/\{\{\s*([^{}]*?)\s*\}\}/g,(s,l)=>i.get(l)??s):r;return{...t,elements:t.elements.map(r=>{if(r.text===null&&r.args===null)return r;let s=G(r);return s.text!==null&&(s.text=o(s.text)),s.args!==null&&(s.args=Object.fromEntries(Object.entries(s.args).map(([l,a])=>[l,o(a)]))),s})}}function Co(t){return{id:t.id,name:t.name,layers:t.layers,elements:t.elements,theme:null,timeline:t.timeline,symbols:null}}function Re(t){return t.elements.some(e=>e.kind==="symbol")}function _(t,e,n=!0,i=new Map){if(!Re(t))return t;let o={left:Lo};return{...t,elements:xi(t.elements,t,e,sn(t),[],n,o,i)}}function sn(t){let e=new Map;for(let n of t.symbols??[])e.has(n.id)||e.set(n.id,n);return e}function xi(t,e,n,i,o,r,s,l=new Map){let a=new Set(t.filter(h=>h.kind==="symbol").map(h=>h.id));if(a.size===0)return s.left-=t.length,t;let u=et(e),c=[];for(let h of t){if(s.left<=0)break;let m=h.connector;if(h.kind==="connector"&&m&&[m.start.elementID,m.end.elementID].some(w=>w!==null&&a.has(w))){let[w,y]=lt(h,u),M=G(h);m.start.elementID!==null&&a.has(m.start.elementID)&&(M.connector.start={elementID:null,port:m.start.port,x:w.x,y:w.y}),m.end.elementID!==null&&a.has(m.end.elementID)&&(M.connector.end={elementID:null,port:m.end.port,x:y.x,y:y.y}),c.push(M),s.left-=1;continue}if(h.kind!=="symbol"){c.push(h),s.left-=1;continue}s.left-=1;let f=h.symbol,d=f===null?void 0:i.get(f);if(f===null||!d||o.includes(f)||o.length>=Io)continue;let p=o.length===0?l.get(h.id):void 0,x=p!==void 0?Math.min(Math.max(p,0),z(d.timeline?.duration??0)):Fo(d,n,h.playback,h.offset),b=Co(Do(d,h.args)),k=r?Jt(b,x):b,g=new Set(k.layers.filter(w=>w.visible).map(w=>w.id)),P={...k,elements:st(k).filter(w=>g.has(w.layerID)),layers:[{id:h.layerID,name:"",visible:!0,locked:!1}]};for(let w of xi(P.elements,P,x,i,[...o,f],r,s))c.push(Yo(w,h,d))}return c}function Yo(t,e,n){let i={x:e.x,y:e.y,width:e.width,height:e.height},o=i.width/n.width,r=i.height/n.height,s=Math.sqrt(Math.abs(o*r)),l={x:i.x+i.width/2,y:i.y+i.height/2},a=N(e),u=f=>mt({x:i.x+f.x*o,y:i.y+f.y*r},l,a),c=G(t);c.id=rn(e.id,t.id),c.layerID=e.layerID,c.groupID=null,c.link=t.link===null?null:rn(e.id,t.link),c.seed=de(t.seed,e.seed),c.click=null,c.hover=null;let h={x:i.x+t.x*o,y:i.y+t.y*r,width:t.width*o,height:t.height*r},m=mt({x:h.x+h.width/2,y:h.y+h.height/2},l,a);if(c.x=m.x-h.width/2,c.y=m.y-h.height/2,c.width=h.width,c.height=h.height,(a!==0||t.rotation!==null)&&(c.rotation=N(t)+a),c.style.strokeWidth=t.style.strokeWidth*s,c.style.fontSize=t.style.fontSize*s,t.style.gridSize!==null&&(c.style.gridSize=t.style.gridSize*s),e.style.opacity!==null&&(c.style.opacity=(t.style.opacity??1)*e.style.opacity),t.connector){let f=d=>{if(d.elementID!==null)return{elementID:rn(e.id,d.elementID),port:d.port,x:d.x,y:d.y};let p=u(d);return{elementID:null,port:d.port,x:p.x,y:p.y}};c.connector={...t.connector,start:f(t.connector.start),end:f(t.connector.end),waypoints:t.connector.waypoints?.map(u)??null}}return c}var on=(1n<<64n)-1n;function Ht(t){let e=t+0x9e3779b97f4a7c15n&on;return e=(e^e>>30n)*0xbf58476d1ce4e5b9n&on,e=(e^e>>27n)*0x94d049bb133111ebn&on,e^e>>31n}function gi(t){let e=t.replace(/-/g,"").padStart(32,"0").slice(-32);return[BigInt(`0x${e.slice(0,16)}`),BigInt(`0x${e.slice(16)}`)]}function rn(t,e){let[n,i]=gi(t),[o,r]=gi(e),s=Ht(Ht(Ht(Ht(n)^i)^o)^r),l=Ht(s^0x6a09e667f3bcc909n),a=s.toString(16).padStart(16,"0")+l.toString(16).padStart(16,"0");return`${a.slice(0,8)}-${a.slice(8,12)}-${a.slice(12,16)}-${a.slice(16,20)}-${a.slice(20)}`.toUpperCase()}function Oo(t,e){let n=e.findIndex(i=>i.name===t);return n>=0?n:e.findIndex(i=>i.name.toLowerCase()===t.toLowerCase())}function bi(t,e){let n=t.timeline?.markers??[],i=new Map,o=null;for(let r of t.elements){let s=r.click;if(s?.scene){let a=Oo(s.scene,n);if(a>=0){i.set(r.id,{scene:a});continue}}let l=(s?.url?kt(s.url):null)??Wt(r.url);if(l){i.set(r.id,{url:l});continue}if(r.link&&e&&e.pages.length>1){o||(o=new Map,e.pages.forEach((u,c)=>{for(let h of u.elements)o.has(h.id)||o.set(h.id,c)}));let a=o.get(r.link);a!==void 0&&e.pages[a]!==t&&i.set(r.id,{page:a})}}return i}function Vo(t){let e=t.hover;if(!e)return t;let n={...t.style};if(e.stroke&&(n.stroke=e.stroke),e.fill&&(n.fill=e.fill),e.opacity!==null&&Number.isFinite(e.opacity)){let i=Math.min(Math.max(e.opacity,0),1);n.opacity=i>=1?null:i}return{...t,style:n}}function ki(t,e){return{...t,elements:t.elements.map(n=>e.has(n.id)?Vo(n):n)}}function wi(t){return!!t.hover&&(t.hover.stroke!==null||t.hover.fill!==null||t.hover.opacity!==null)}function Pi(t,e){let n=(t.text??"").split(`
|
|
3
|
-
`).find(i=>i.length>0);return n||(t.anchor?t.anchor:e||t.kind)}function
|
|
1
|
+
/*! dottie.js 0.7.0 | Apache-2.0 | https://github.com/phin-tech/dottie */
|
|
2
|
+
"use strict";(()=>{var Rn=Object.defineProperty;var Gi=(t,e,n)=>e in t?Rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Bi=(t,e)=>{for(var n in e)Rn(t,n,{get:e[n],enumerable:!0})};var v=(t,e,n)=>Gi(t,typeof e!="symbol"?e+"":e,n);var Mn={};Bi(Mn,{BOIL_DRAWINGS:()=>Oe,BUNDLED_FONTS:()=>Bt,DottieFormatError:()=>rt,DottiePlayer:()=>Ot,KINDS:()=>En,KNOWN_FIELDS:()=>In,MAX_DURATION:()=>Tt,MAX_MARCH:()=>De,Playback:()=>te,SUPPORTED_VERSION:()=>Ce,VERSION:()=>mr,addFonts:()=>de,allowedURL:()=>kt,black:()=>xt,bounds:()=>ht,cameraView:()=>Dt,clampFPS:()=>St,clampMarch:()=>Ln,clampTime:()=>z,clear:()=>Fn,cloneElement:()=>G,definePlayer:()=>Fe,elementIndex:()=>Ji,fontFaces:()=>Ge,fontFile:()=>ze,frameTimes:()=>Re,inkOnDark:()=>Cn,inspect:()=>$i,inspectFrame:()=>wn,inspectPage:()=>Pn,isAutomaticInk:()=>Gt,luminance:()=>Et,orderedElements:()=>st,pageIndex:()=>ee,parseDottie:()=>zt,plan:()=>Yt,posterTime:()=>yt,render:()=>hr,repeatIsValid:()=>ce,resolved:()=>nt,sameColor:()=>At,sampleTimes:()=>kn,sceneAt:()=>wi,setFontBase:()=>zn,stableSortBy:()=>ae,still:()=>ki,svg:()=>Le,svgParts:()=>gt,themeNamed:()=>vt,themes:()=>gn,transientElements:()=>Pi,usedFonts:()=>me,webLink:()=>$t,withRoughness:()=>ne});function le(t){return t.length<=64&&/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)}function Ni(t){let e=[];for(let n of t.split("||"))for(let i of n.split("&&")){let o=se(i);if(o.startsWith("!")&&(o=se(o.slice(1))),!le(o))return null;e.push(o)}return e}function Zi(t,e){return Ni(t)===null?!1:t.split("||").some(n=>n.split("&&").every(i=>{let o=se(i),r=!1;return o.startsWith("!")&&(r=!0,o=se(o.slice(1))),(e[o]??!1)!==r}))}function Xi(t,e){return e==="all"?null:e==="initial"?{...t.variables??{}}:{...t.variables??{},...e}}function vn(t,e){let n=Xi(t,e),i=new Set;if(!n)return i;for(let o of t.elements)o.when!==null&&!Zi(o.when,n)&&i.add(o.id);return i}function Tn(t){return!!t&&(Object.keys(t.set??{}).length>0||(t.toggle??[]).length>0)}function An(t,e){let n={...e};for(let[i,o]of Object.entries(t.set??{}))n[i]=o;for(let i of t.toggle??[])n[i]=!(n[i]??!1);return n}function se(t){return t.replace(/^[ \t ]+|[ \t ]+$/g,"")}var Ce=2,En=["rectangle","ellipse","diamond","text","connector","freehand","path","note","image","symbol"],Ui=["linear","easeIn","easeOut","easeInOut","hold","spring","bounce","elastic"],In={file:["version","pages","images"],page:["id","name","layers","elements","theme","guidesX","guidesY","guidesLocked","timeline","symbols","variables"],symbol:["id","name","width","height","layers","elements","timeline","button","params"],layer:["id","name","visible","locked"],rgba:["r","g","b","a"],style:["stroke","fill","fillStyle","strokeWidth","dash","roughness","bowing","fontSize","font","gridSize","opacity","dashOffset","textColor"],element:["id","kind","x","y","width","height","style","seed","layerID","text","connector","groupID","points","path","subpaths","evenOdd","rotation","link","url","anchor","click","hover","when","symbol","playback","offset","args","image","reveal","ports","labelRect","extension"],strokePoint:["x","y"],subpath:["closed","coords"],inlineImage:["data","format"],endpoint:["elementID","port","portIndex","x","y"],extensionRef:["id","shape","version","params"],normalizedPoint:["x","y"],normalizedRect:["x","y","width","height"],connector:["start","end","routing","startHead","endHead","waypoints","hops"],waypoint:["x","y"],timeline:["fps","duration","boil","settle","poster","tracks","camera","markers"],track:["element","keys","boil","follow","repeats","march"],keyframe:["t","x","y","width","height","rotation","strokeWidth","stroke","fill","visible","reveal","opacity","ease"],follow:["path","start","end","ease","reverse","orient","laps"],repeat:["start","end","count"],cameraKey:["t","x","y","width","height","ease"],marker:["t","name","loop"],click:["scene","url","set","toggle"],hover:["stroke","fill","opacity"]},Tt=3600,De=1e4,Ln=t=>t===void 0||!Number.isFinite(t)||t===0?null:Math.min(Math.max(t,-De),De),Oe=3,xt={r:.12,g:.12,b:.13,a:1},Fn={r:0,g:0,b:0,a:0},Cn={r:.93,g:.93,b:.94,a:1},rt=class extends Error{},E=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),A=t=>typeof t=="number"&&Number.isFinite(t)?t:void 0,L=t=>typeof t=="string"?t:void 0,Sn=t=>E(t)&&Object.values(t).every(e=>typeof e=="string")?{...t}:null,N=t=>typeof t=="boolean"?t:void 0,j=t=>typeof t=="string"?t.toUpperCase():void 0;function z(t){return Number.isFinite(t)?Math.min(Math.max(t,0),Tt):t===1/0?Tt:0}function St(t){return Number.isFinite(t)?Math.min(Math.max(t,1),60):12}function kt(t){let e=t.trim();return!/^(https?:\/\/|mailto:)/i.test(e)||[...e].length<=7||/[\u0000-\u001f\u007f-\u009f]/.test(e)?null:e}function $t(t){return t?kt(t):null}function bt(t){if(!E(t))return;let e=A(t.r),n=A(t.g),i=A(t.b);if(!(e===void 0||n===void 0||i===void 0))return{r:e,g:n,b:i,a:A(t.a)??1}}var Ye=class{constructor(){v(this,"warnings",[]);v(this,"seen",new Set)}warn(e){this.seen.has(e)||(this.seen.add(e),this.warnings.push(e))}fields(e,n){let i=In[n];for(let o of Object.keys(e))i.includes(o)||this.warn(`Unknown field "${o}" on ${n}, ignored`)}style(e){let n=E(e)?e:{};this.fields(n,"style");let i=L(n.fillStyle)??"solid",o=L(n.dash)??"solid";return["solid","hachure","crossHatch","grid"].includes(i)||this.warn(`Unknown fill style "${i}", drawn solid`),["solid","dashed","dotted"].includes(o)||this.warn(`Unknown dash "${o}", drawn solid`),{stroke:bt(n.stroke)??{...xt},fill:bt(n.fill)??{...Fn},fillStyle:["solid","hachure","crossHatch","grid"].includes(i)?i:"solid",strokeWidth:A(n.strokeWidth)??2,dash:["solid","dashed","dotted"].includes(o)?o:"solid",roughness:A(n.roughness)??1,bowing:A(n.bowing)??1,fontSize:A(n.fontSize)??18,font:L(n.font)||null,gridSize:A(n.gridSize)??null,opacity:A(n.opacity)??null,dashOffset:A(n.dashOffset)??null,textColor:bt(n.textColor)??null}}endpoint(e){let n=E(e)?e:{},i=L(n.port),o=A(n.portIndex);return{elementID:j(n.elementID)??null,port:i&&["top","right","bottom","left"].includes(i)?i:null,portIndex:o!==void 0&&Number.isInteger(o)&&o>=0?o:null,x:A(n.x)??0,y:A(n.y)??0}}connector(e){if(!E(e))return null;this.fields(e,"connector");let n=(o,r)=>{let l=L(o);return l&&["none","arrow","triangle","dot","bar"].includes(l)?l:r},i=L(e.routing);return{start:this.endpoint(e.start),end:this.endpoint(e.end),routing:i&&["straight","curved","elbow"].includes(i)?i:"straight",startHead:n(e.startHead,"none"),endHead:n(e.endHead,"arrow"),waypoints:Array.isArray(e.waypoints)?e.waypoints.filter(E).map(o=>(this.fields(o,"waypoint"),{x:A(o.x)??0,y:A(o.y)??0})):null,hops:typeof e.hops=="boolean"?e.hops:null}}image(e,n){if(!E(e))return null;let i=L(e.ref);if(i!==void 0)return n[i]??{data:"",format:"png"};let o=L(e.data);return o===void 0?null:this.picture(o,L(e.format))}picture(e,n){return ji.test(e)?{data:e.replace(/\s+/g,""),format:n==="jpeg"?"jpeg":"png"}:(this.warn("Skipped a picture whose data isn't base64"),{data:"",format:"png"})}element(e,n){if(!E(e))return null;this.fields(e,"element");let i=j(e.id),o=L(e.kind),r=j(e.layerID);if(!i||!o||!r)return this.warn("Skipped an element without an id, kind or layer"),null;En.includes(o)||this.warn(`Unknown element kind "${o}", drawn as a placeholder`);let l=Array.isArray(e.subpaths)?e.subpaths.filter(E).map(s=>({closed:N(s.closed)??!1,coords:Array.isArray(s.coords)?s.coords.filter(a=>typeof a=="number"):[]})):null;return{id:i,kind:o,layerID:r,x:A(e.x)??0,y:A(e.y)??0,width:A(e.width)??0,height:A(e.height)??0,style:this.style(e.style),seed:(A(e.seed)??1)>>>0,text:L(e.text)??null,connector:this.connector(e.connector),groupID:j(e.groupID)??null,points:Array.isArray(e.points)?e.points.filter(E).map(s=>({x:A(s.x)??0,y:A(s.y)??0})):null,path:Array.isArray(e.path)?e.path.filter(s=>typeof s=="number"):null,subpaths:l,evenOdd:N(e.evenOdd)??null,rotation:A(e.rotation)??null,link:j(e.link)??null,url:L(e.url)??null,anchor:L(e.anchor)??null,click:this.click(e.click),hover:this.hover(e.hover),when:L(e.when)??null,symbol:j(e.symbol)??null,playback:this.playback(e.playback),offset:A(e.offset)??null,args:Sn(e.args),image:this.image(e.image,n),reveal:A(e.reveal)??null,ports:Array.isArray(e.ports)?e.ports.map(s=>{let a=E(s)?s:{};return{x:A(a.x)??0,y:A(a.y)??0}}):null,labelRect:this.labelRect(e.labelRect),extension:this.extension(e.extension)}}labelRect(e){return E(e)?(this.fields(e,"normalizedRect"),{x:A(e.x)??0,y:A(e.y)??0,width:A(e.width)??0,height:A(e.height)??0}):null}extension(e){if(!E(e))return null;this.fields(e,"extensionRef");let n=L(e.id),i=L(e.shape),o=L(e.version);if(n===void 0||i===void 0||o===void 0)return this.warn("Skipped an extension without an id, shape or version"),null;let r={};if(E(e.params))for(let[l,s]of Object.entries(e.params))(typeof s=="number"||typeof s=="boolean"||typeof s=="string")&&(r[l]=s);return{id:n,shape:i,version:o,params:r}}variables(e){if(!E(e))return null;let n={};for(let[i,o]of Object.entries(e))typeof o=="boolean"&&(n[i]=o);return Object.keys(n).length>0?n:null}click(e){if(!E(e))return null;this.fields(e,"click");let n=L(e.url),i=n===void 0?null:kt(n);n!==void 0&&i===null&&this.warn("Skipped a click link that isn't http, https or mailto");let o=null;if(E(e.set)){o={};for(let[s,a]of Object.entries(e.set))typeof a=="boolean"&&le(s)&&(o[s]=a);Object.keys(o).length===0&&(o=null)}let r=typeof e.toggle=="string"?[e.toggle]:Array.isArray(e.toggle)&&e.toggle.every(s=>typeof s=="string")?e.toggle:null,l=r?r.filter(le):null;return{scene:L(e.scene)??null,url:i,set:o,toggle:l&&l.length>0?l:null}}playback(e){let n=L(e);return n===void 0?null:["loop","once","still","click"].includes(n)?n:"loop"}symbol(e,n){if(!E(e))return null;this.fields(e,"symbol");let i=j(e.id);if(!i)return this.warn("Skipped a symbol without an id"),null;let o=l=>{let s=A(l);return Math.max(1,s??100)},r=(Array.isArray(e.layers)?e.layers:[]).filter(E).flatMap(l=>{let s=j(l.id);return s?[{id:s,name:L(l.name)??"",visible:N(l.visible)??!0,locked:N(l.locked)??!1}]:[]});return r.length===0&&r.push({id:`${i}-LAYER`,name:"Layer 1",visible:!0,locked:!1}),{id:i,name:L(e.name)??"Symbol",width:o(e.width),height:o(e.height),layers:r,elements:(Array.isArray(e.elements)?e.elements:[]).map(l=>this.element(l,n)).filter(l=>l!==null),timeline:this.timeline(e.timeline),button:N(e.button)??null,params:Sn(e.params)}}hover(e){return E(e)?(this.fields(e,"hover"),{stroke:bt(e.stroke)??null,fill:bt(e.fill)??null,opacity:A(e.opacity)??null}):null}ease(e){let n=L(e);return n===void 0?null:Ui.includes(n)?n:(this.warn(`Unknown ease "${n}", played linear`),null)}keyframe(e){if(!E(e))return null;this.fields(e,"keyframe");let n=A(e.t);if(n===void 0)return null;let i={t:n};for(let a of["x","y","width","height","rotation","strokeWidth","reveal","opacity"]){let u=A(e[a]);u!==void 0&&(i[a]=u)}let o=bt(e.stroke),r=bt(e.fill),l=N(e.visible),s=this.ease(e.ease);return o&&(i.stroke=o),r&&(i.fill=r),l!==void 0&&(i.visible=l),s&&(i.ease=s),i}track(e){if(!E(e))return null;this.fields(e,"track");let n=j(e.element);if(!n)return null;let i=(Array.isArray(e.keys)?e.keys:[]).map(l=>this.keyframe(l)).filter(l=>l!==null&&l.t>=0&&l.t<=Tt);ae(i,l=>l.t);let o=Array.isArray(e.follow)?e.follow.filter(E).flatMap(l=>{let s=j(l.path),a=A(l.start),u=A(l.end);return!s||a===void 0||u===void 0||a<0||u>Tt?[]:[{path:s,start:a,end:u,ease:this.ease(l.ease),reverse:N(l.reverse)??null,orient:N(l.orient)??null,laps:A(l.laps)??null}]}):null,r=Array.isArray(e.repeats)?e.repeats.filter(E).flatMap(l=>{let s=A(l.start),a=A(l.end);if(s===void 0||a===void 0)return[];let u=A(l.count),c={start:s,end:a,count:u===void 0?null:Math.trunc(u)};return ce(c)?[c]:[]}):null;return{element:n,keys:i,boil:N(e.boil)??null,follow:o,repeats:r,march:Ln(A(e.march))}}timeline(e){if(!E(e))return null;this.fields(e,"timeline");let n=A(e.boil),i=Array.isArray(e.camera)?e.camera.filter(E).flatMap(l=>{let s=A(l.t),a=A(l.x),u=A(l.y),c=A(l.width),h=A(l.height);return s===void 0||a===void 0||u===void 0||c===void 0||h===void 0?[]:c>1&&h>1&&s>=0?[{t:s,x:a,y:u,width:c,height:h,ease:this.ease(l.ease)}]:[]}):null;i&&ae(i,l=>l.t);let o=Array.isArray(e.markers)?e.markers.filter(E).flatMap(l=>{let s=A(l.t);return s!==void 0&&s>=0?[{t:s,name:L(l.name)??"",loop:N(l.loop)??null}]:[]}):null;o&&ae(o,l=>l.t);let r=A(e.poster);return{fps:St(A(e.fps)??12),duration:z(A(e.duration)??0),boil:n!==void 0&&Number.isInteger(n)&&n>0?Math.min(n,1e4):null,settle:N(e.settle)??null,poster:r===void 0?null:z(r),tracks:(Array.isArray(e.tracks)?e.tracks:[]).map(l=>this.track(l)).filter(l=>l!==null),camera:i,markers:o}}page(e,n,i){if(!E(e))throw new rt(`Page ${i} is not an object`);this.fields(e,"page");let o=(Array.isArray(e.layers)?e.layers:[]).filter(E).flatMap(r=>{let l=j(r.id);return l?[{id:l,name:L(r.name)??"",visible:N(r.visible)??!0,locked:N(r.locked)??!1}]:[]});return o.length===0&&(this.warn(`Page ${i} has no layers`),o.push({id:"LAYER",name:"Layer 1",visible:!0,locked:!1})),{id:j(e.id)??`PAGE-${i}`,name:L(e.name)??`Page ${i}`,layers:o,elements:(Array.isArray(e.elements)?e.elements:[]).map(r=>this.element(r,n)).filter(r=>r!==null),theme:L(e.theme)??null,timeline:this.timeline(e.timeline),symbols:Array.isArray(e.symbols)?e.symbols.map(r=>this.symbol(r,n)).filter(r=>r!==null):null,variables:this.variables(e.variables)}}},ji=/^[A-Za-z0-9+/=\s]*$/;function ce(t){return Number.isFinite(t.start)&&Number.isFinite(t.end)&&t.start>=0&&t.end-t.start>.001&&t.end<=Tt&&(t.count===null||t.count>=1&&t.count<=1e4)}function ae(t,e){let n=t.map((i,o)=>[i,o]);n.sort((i,o)=>e(i[0])-e(o[0])||i[1]-o[1]);for(let i=0;i<t.length;i++)t[i]=n[i][0]}function zt(t){let e=t;if(typeof t=="string")try{e=JSON.parse(t)}catch(l){throw new rt(`Not JSON: ${l.message}`)}if(!E(e))throw new rt("Not a Dottie drawing");let n=A(e.version);if(n===void 0)throw new rt("Not a Dottie drawing (no version)");if(!Array.isArray(e.pages)||e.pages.length===0)throw new rt("A drawing needs at least one page");let i=new Ye;i.fields(e,"file"),n>Ce&&i.warn(`File version ${n} is newer than this player knows (${Ce}); some things may not show`);let o={};if(E(e.images))for(let[l,s]of Object.entries(e.images))E(s)&&typeof s.data=="string"&&(o[l]=i.picture(s.data,L(s.format)));let r=e.pages.map((l,s)=>i.page(l,o,s+1));if(new Set(r.map(l=>l.id)).size!==r.length)throw new rt("Two pages share an id");return{version:n,pages:r,warnings:i.warnings}}function Et(t){return .2126*t.r+.7152*t.g+.0722*t.b}function At(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function Gt(t){return At(t,xt)||At(t,Cn)}function G(t){return{...t,style:{...t.style,stroke:{...t.style.stroke},fill:{...t.style.fill},textColor:t.style.textColor?{...t.style.textColor}:null},connector:t.connector?{...t.connector,start:{...t.connector.start},end:{...t.connector.end},waypoints:t.connector.waypoints?.map(e=>({...e}))??null}:null}}function st(t){if(t.layers.length<=1)return t.elements;let e=new Map;t.layers.forEach((i,o)=>{e.has(i.id)||e.set(i.id,o)});let n=t.layers.map(()=>[]);for(let i of t.elements)n[e.get(i.layerID)??0].push(i);return n.flat()}function Ji(t){let e=new Map;for(let n of t.elements)e.has(n.id)||e.set(n.id,n);return e}var Dn=.60205078125,Yn=.92822265625,On=.23583984375,wt={"Architects Daughter":{faces:{regular:{ascent:.986328125,descent:.4033203125,k:{},leading:0,w:{" ":400.39,_:686.52,"-":310.55,"\u2013":310.55,"\u2014":411.13,",":177.73,";":124.02,":":166.99,"!":134.77,"?":505.86,".":140.63,"\u2026":422.85,"\xB7":140.63,"'":162.11,"\u2018":162.11,"\u2019":162.11,'"':236.33,"\u201C":236.33,"\u201D":236.33,"(":297.85,")":351.56,"[":424.8,"]":541.02,"{":352.54,"}":478.52,"@":1042.97,"*":507.81,"/":455.08,"\\":501.95,"&":669.92,"#":637.7,"%":518.55,"\u2022":192.38,"`":171.88,"^":306.64,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":524.41,"\xD7":470.7,"<":475.59,"=":492.19,">":471.68,"|":145.51,"~":444.34,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556.64,0:630.86,1:127.93,2:572.27,3:508.79,4:680.66,5:708.01,6:626.95,7:615.23,8:648.44,9:569.34,a:508.79,A:640.63,b:561.52,B:710.94,c:632.81,C:708.01,d:512.7,D:648.44,e:541.02,E:591.8,\u00E9:541.02,f:593.75,F:692.38,g:515.63,G:692.38,h:495.12,H:605.47,i:151.37,I:151.37,j:177.73,J:529.3,k:614.26,K:605.47,l:157.23,L:692.38,m:778.32,M:827.15,n:500,N:626.95,o:562.5,O:669.92,p:556.64,P:637.7,q:513.67,Q:712.89,r:551.76,R:712.89,s:501.95,S:642.58,t:404.3,T:623.05,u:507.81,U:561.52,v:518.55,V:626.95,w:808.59,W:940.43,x:470.7,X:599.61,y:548.83,Y:534.18,z:495.12,Z:784.18}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}},Caveat:{faces:{bold:{ascent:.9600067138671875,descent:.3000030517578125,k:{AC:-20,AE:-10,AG:-10,AH:-10,AI:10,Aj:10,AJ:10,AL:-10,AM:10,An:-10,AO:-20,AP:-10,Aq:-10,AQ:-20,Ar:-10,As:-10,AS:-35,AT:-50,Au:-10,AU:-20,av:-20,Av:-5,AV:-40,aw:-10,AW:-20,Ax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,ZD:-10,Ze:-40,ZE:-20,zf:10,Zg:-40,ZG:-20,zi:10,Zj:10,Zk:10,ZL:-10,Zm:-10,Zn:-50,Zo:-30,ZO:-30,Zp:-10,ZP:-10,Zq:-50,ZQ:-10,Zr:-40,ZR:-10,Zs:-30,ZS:-20,zt:10,Zt:-10,Zu:-30,ZU:-10,zv:10,Zv:-20,Zw:-40,ZW:-10,zx:10,Zx:-10,ZX:-10,Zy:-30,ZY:-20,zz:20,Zz:10,ZZ:-10},leading:0,w:{" ":242,_:446,"-":326,"\u2013":446,"\u2014":566,",":198,";":198,":":198,"!":210,"?":374,".":198,"\u2026":594,"\xB7":187,"'":117,"\u2018":117,"\u2019":117,'"':237,"\u201C":267,"\u201D":267,"(":330,")":330,"[":330,"]":330,"{":330,"}":330,"@":643,"*":363,"/":330,"\\":330,"&":564,"#":559,"%":600,"\u2022":187,"`":353,"^":446,"\u2190":1e3,"\u2192":1e3,"\u2191":722.66,"\u2193":722.66,"+":446,"\xD7":446,"<":446,"=":446,">":446,"|":330,"~":446,"\u25E6":608.4,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:450,0:450,1:450,2:450,3:450,4:450,5:434,6:471,7:446,8:450,9:438,a:446,A:511,b:444,B:523,c:364,C:477,d:402,D:587,e:334,E:534,\u00E9:325,f:300,F:466,g:364,G:494,h:473,H:574,i:196,I:409,j:213,J:315,k:374,K:508,l:178,L:426,m:569,M:729,n:459,N:619,o:362,O:505,p:378,P:468,q:377,Q:492,r:360,R:544,s:350,S:495,t:331,T:458,u:370,U:482,v:331,V:490,w:517,W:720,x:343,X:524,y:341,Y:504,z:315,Z:522}},regular:{ascent:.9600067138671875,descent:.3000030517578125,k:{AC:-20,AE:-10,AG:-10,AH:-10,AI:10,Aj:10,AJ:10,AL:-10,AM:10,An:-10,AO:-20,AP:-10,Aq:-10,AQ:-20,Ar:-10,As:-10,AS:-35,AT:-50,Au:-10,AU:-20,av:-20,Av:-5,AV:-40,aw:-10,AW:-20,Ax:10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ZD:-10,Ze:-40,ZE:-20,zf:10,Zg:-40,ZG:-20,zi:10,Zj:10,Zk:10,ZL:-10,Zm:-10,Zn:-50,Zo:-30,ZO:-30,Zp:-10,ZP:-10,Zq:-50,ZQ:-10,Zr:-40,ZR:-10,Zs:-30,ZS:-20,zt:10,Zt:-10,Zu:-30,ZU:-10,zv:10,Zv:-20,Zw:-40,ZW:-10,zx:10,Zx:-10,ZX:-10,Zy:-30,ZY:-20,zz:20,Zz:10,ZZ:-10},leading:0,w:{" ":242,_:446,"-":326,"\u2013":446,"\u2014":566,",":198,";":198,":":198,"!":210,"?":374,".":198,"\u2026":594,"\xB7":187,"'":117,"\u2018":117,"\u2019":117,'"':237,"\u201C":267,"\u201D":267,"(":330,")":330,"[":330,"]":330,"{":330,"}":330,"@":643,"*":363,"/":330,"\\":330,"&":564,"#":559,"%":600,"\u2022":187,"`":353,"^":446,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":446,"\xD7":446,"<":446,"=":446,">":446,"|":330,"~":446,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:450,0:450,1:450,2:450,3:450,4:450,5:450,6:450,7:450,8:450,9:450,a:437,A:502,b:435,B:520,c:355,C:472,d:393,D:578,e:325,E:529,\u00E9:325,f:291,F:454,g:355,G:487,h:464,H:563,i:187,I:400,j:204,J:306,k:365,K:498,l:169,L:426,m:560,M:720,n:450,N:599,o:353,O:496,p:378,P:464,q:377,Q:502,r:360,R:537,s:341,S:486,t:331,T:458,u:370,U:482,v:331,V:490,w:517,W:720,x:343,X:524,y:341,Y:504,z:315,Z:522}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}},"Helvetica Neue":{faces:{bold:{ascent:.975006103515625,descent:.2169952392578125,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-30,fi:20,fl:20,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0290069580078125,w:{" ":278,_:500,"-":407,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":278,"?":556,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':463,"\u201C":463,"\u201D":463,"(":296,")":296,"[":333,"]":333,"{":333,"}":333,"@":800,"*":407,"/":371,"\\":371,"&":685,"#":556,"%":1e3,"\u2022":350,"`":259,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":722.66,"\u2193":722.66,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":223,"~":600,"\u25E6":608.4,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:574,A:685,b:611,B:704,c:574,C:741,d:611,D:741,e:574,E:648,\u00E9:574,f:333,F:593,g:611,G:759,h:593,H:741,i:258,I:295,j:278,J:556,k:574,K:722,l:258,L:593,m:906,M:907,n:593,N:741,o:611,O:778,p:611,P:667,q:611,Q:778,r:389,R:722,s:537,S:649,t:352,T:611,u:593,U:741,v:520,V:630,w:814,W:944,x:537,X:667,y:519,Y:667,z:519,Z:648}},boldItalic:{ascent:.975006103515625,descent:.2169952392578125,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-68,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0290069580078125,w:{" ":278,_:500,"-":407,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":296,"?":574,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':481,"\u201C":481,"\u201D":481,"(":296,")":296,"[":333,"]":333,"{":333,"}":333,"@":800,"*":407,"/":389,"\\":389,"&":685,"#":556,"%":963,"\u2022":350,"`":259,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":722.66,"\u2193":722.66,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":222,"~":600,"\u25E6":608.4,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:574,A:685,b:611,B:722,c:556,C:741,d:611,D:741,e:574,E:667,\u00E9:574,f:352,F:593,g:611,G:759,h:611,H:741,i:259,I:296,j:259,J:556,k:556,K:722,l:259,L:574,m:907,M:907,n:611,N:741,o:593,O:778,p:611,P:667,q:611,Q:778,r:389,R:722,s:519,S:648,t:370,T:611,u:611,U:741,v:519,V:630,w:815,W:944,x:519,X:667,y:519,Y:648,z:500,Z:648}},italic:{ascent:.957000732421875,descent:.2129974365234375,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-15,fi:1,fl:1,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0279998779296875,w:{" ":278,_:500,"-":389,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":259,"?":556,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':426,"\u201C":426,"\u201D":426,"(":259,")":259,"[":259,"]":259,"{":333,"}":333,"@":800,"*":352,"/":333,"\\":333,"&":630,"#":556,"%":926,"\u2022":500,"`":222,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":222,"~":600,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:519,A:667,b:593,B:685,c:537,C:722,d:593,D:704,e:537,E:611,\u00E9:537,f:296,F:574,g:574,G:759,h:556,H:722,i:222,I:259,j:222,J:519,k:481,K:667,l:222,L:556,m:852,M:870,n:556,N:722,o:574,O:759,p:593,P:648,q:593,Q:759,r:333,R:685,s:481,S:648,t:315,T:574,u:556,U:722,v:481,V:611,w:759,W:926,x:481,X:611,y:481,Y:611,z:444,Z:611}},regular:{ascent:.951995849609375,descent:.2129974365234375,k:{"\u2018\u2018":-95,"\u2019\u2019":-95,"\u2019s":-74,"\u2019t":-18,"A\u2019":-74,AT:-92,Av:-18,AV:-46,Aw:-18,AW:-24,Ay:-18,AY:-74,"F,":-157,"F.":-157,"f\u2019":18,FA:-55,ff:-15,"L\u2019":-74,LT:-92,LV:-92,LW:-55,Ly:-37,LY:-111,"P,":-179,"P.":-179,PA:-74,"r-":-55,"r,":-92,"r.":-92,rc:-18,rd:-18,re:-18,rg:-28,rn:18,ro:-18,rq:-18,RT:-18,RV:-18,RW:-18,RY:-37,"T-":-129,"T,":-111,"T;":-111,"T:":-111,"T.":-111,Ta:-111,TA:-92,Tc:-111,Te:-111,To:-111,Tr:-92,Ts:-111,Tu:-92,Tw:-111,Ty:-111,"V-":-55,"v,":-74,"V,":-129,"V;":-46,"V:":-46,"v.":-74,"V.":-129,Va:-55,VA:-46,Ve:-55,Vi:-18,Vo:-55,Vr:-37,Vu:-37,Vy:-18,"w,":-55,"W,":-74,"W;":-18,"W:":-18,"w.":-55,"W.":-74,Wa:-37,WA:-24,We:-57,Wo:-57,Wr:-18,Wu:-18,"Y-":-111,"y,":-74,"Y,":-139,"Y;":-92,"Y:":-92,"y.":-74,"Y.":-139,Ya:-92,YA:-74,Ye:-111,Yi:-37,Yo:-111,Yp:-74,Yq:-92,Yu:-74,Yv:-55},leading:.0279998779296875,w:{" ":278,_:500,"-":389,"\u2013":500,"\u2014":1e3,",":278,";":278,":":278,"!":259,"?":556,".":278,"\u2026":1e3,"\xB7":278,"'":278,"\u2018":278,"\u2019":278,'"':426,"\u201C":426,"\u201D":426,"(":259,")":259,"[":259,"]":259,"{":333,"}":333,"@":800,"*":352,"/":333,"\\":333,"&":630,"#":556,"%":1e3,"\u2022":350,"`":222,"^":600,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":600,"\xD7":600,"<":600,"=":600,">":600,"|":222,"~":600,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:556,0:556,1:556,2:556,3:556,4:556,5:556,6:556,7:556,8:556,9:556,a:537,A:648,b:593,B:685,c:537,C:722,d:593,D:704,e:537,E:611,\u00E9:537,f:296,F:574,g:574,G:759,h:556,H:722,i:222,I:259,j:222,J:519,k:519,K:667,l:222,L:556,m:853,M:871,n:556,N:722,o:574,O:760,p:593,P:648,q:593,Q:760,r:333,R:685,s:500,S:648,t:315,T:574,u:556,U:722,v:500,V:611,w:758,W:926,x:518,X:611,y:500,Y:648,z:480,Z:611}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}},"Patrick Hand":{faces:{regular:{ascent:1.0420074462890625,descent:.3119964599609375,k:{},leading:0,w:{" ":230,_:571,"-":404,"\u2013":420,"\u2014":648,",":202,";":232,":":232,"!":247,"?":368,".":214,"\u2026":571,"\xB7":200,"'":164,"\u2018":190,"\u2019":220,'"':303,"\u201C":315,"\u201D":303,"(":334,")":364,"[":303,"]":296,"{":339,"}":328,"@":550,"*":404,"/":423,"\\":420,"&":530,"#":457,"%":643,"\u2022":352,"`":220,"^":370,"\u2190":1e3,"\u2192":1e3,"\u2191":645.02,"\u2193":645.02,"+":480,"\xD7":490,"<":396,"=":572,">":400,"|":176,"~":529,"\u25E6":578.13,"\u2610":830.08,"\u2611":830.08,"\u2713":764.16,$:507,0:448,1:363,2:468,3:448,4:375,5:423,6:399,7:495,8:433,9:367,a:392,A:488,b:412,B:507,c:388,C:548,d:390,D:475,e:398,E:442,\u00E9:398,f:359,F:375,g:445,G:480,h:420,H:468,i:224,I:235,j:235,J:370,k:415,K:523,l:266,L:372,m:680,M:595,n:452,N:532,o:403,O:556,p:428,P:481,q:463,Q:655,r:385,R:454,s:385,S:459,t:344,T:468,u:400,U:550,v:400,V:562,w:463,W:616,x:448,X:601,y:423,Y:442,z:428,Z:507}}},fallback:{"\u2190":[.966796875,.2109375,0],"\u2192":[.966796875,.2109375,0],"\u2191":[.966796875,.2109375,0],"\u2193":[.966796875,.2109375,0],"\u25E6":[.966796875,.2109375,0],"\u2610":[.66650390625,.25,.08349609375],"\u2611":[.66650390625,.25,.08349609375],"\u2713":[.966796875,.2109375,0]}}};var ue="Helvetica Neue",Ve="Helvetica Neue, Helvetica, Arial, sans-serif",Bt=Object.keys(wt).filter(t=>t!==ue).sort();function Nt(t){if(!t)return null;let e=t.toLowerCase();return Bt.find(n=>n.toLowerCase()===e)??null}function he(t){return wt[Nt(t)??ue]}function Zt(t,e,n){let i=e?n?"boldItalic":"bold":n?"italic":"regular";return t.faces[i]?i:"regular"}function fe(t){if(!t)return Ve;let e=[...Nt(t)??t].filter(n=>!`"'<>&;{}\\`.includes(n)).join("");return e===""?Ve:`${/^[\p{L}\p{N} -]+$/u.test(e)?e:`'${e}'`}, ${Ve}`}function Vn(t,e,n="regular",i){let o=he(i),r=o.faces[n]??o.faces.regular,l=r.w.n,s=0,a="";for(let u of t)s+=r.w[u]??l,a&&(s+=r.k[a+u]??0),a=u;return s*e/1e3}function Hi(t,e){let n=he(e).faces.regular,i=Math.round(n.ascent*t),o=Math.round(n.descent*t),r=Math.round(n.leading*t);return[i+Math.ceil(n.descent*t-1e-9),i+o+r]}function We(t,e){return t===" "?!0:(t==="/"||t==="-")&&e!==""&&!/[\d\s/-]/.test(e)}function Ki(t){let e=[...t],n=[],i="";return e.forEach((o,r)=>{i+=o;let l=e[r+1]??"";We(o,l)&&l!==" "&&(n.push(i),i="")}),(i||n.length===0)&&n.push(i),n}function qi(t,e,n,i="regular",o){let r=s=>Vn(s,e,i,o),l=[];for(let s of t.split(/\r\n|\n|\r|\u2028|\u2029/)){let a="";for(let u of Ki(s)){let c=a+u;for(a===""||r(c.trimEnd())<=n?a=c:(l.push(a),a=u);r(a.trimEnd())>n&&[...a.trimEnd()].length>1;){let h=[...a],m=h.length-1;for(;m>1&&r(h.slice(0,m).join(""))>n;)m--;l.push(h.slice(0,m).join("")),a=h.slice(m).join("")}}l.push(a)}return l}function Wn(t,e,n,i){if(t==="")return{width:0,height:0};let o=qi(t,e,n,"regular",i),r=Math.max(...o.map(a=>Vn(a.trimEnd(),e,"regular",i))),[l,s]=Hi(e,i);return{width:Math.ceil(r-1e-9),height:Math.ceil(l+s*(o.length-1)-1e-9)}}var Qi=["bold","boldItalic","italic","regular"];function ze(t,e){return`${t.toLowerCase().replaceAll(" ","-")}-${e}.woff2`}function Ge(t){return Qi.filter(e=>wt[t]?.faces[e]!==void 0)}function me(t){let e=new Set,n=i=>{for(let o of i){let r=Nt(o.style.font);r&&e.add(r)}};n(t.elements);for(let i of t.symbols??[])n(i.elements);return Bt.filter(i=>e.has(i))}function _i(){try{let t=typeof document>"u"?null:document.currentScript;if(t?.src)return new URL("fonts/",t.src).href;let e=void 0;return e?new URL("fonts/",e).href:null}catch{return null}}var $e=_i(),$n=new Set;function zn(t){$e=t.endsWith("/")?t:`${t}/`}function de(t,e={}){if(!(typeof document>"u"||typeof FontFace>"u"||!document.fonts))for(let n of t){let i=Nt(n);if(!i||$n.has(i))continue;let o=e[i];if(!(!o&&!$e)){$n.add(i);for(let r of Ge(i)){let l=o?.[r],s;if(l)s=Uint8Array.from(atob(l),u=>u.charCodeAt(0));else if(!o)s=`url(${JSON.stringify($e+ze(i,r))}) format("woff2")`;else continue;let a={weight:r.startsWith("bold")?"bold":"normal",style:r==="italic"||r==="boldItalic"?"italic":"normal"};document.fonts.add(new FontFace(i,s,a))}}}}var Gn=.5522847498307936,I=class t{constructor(){v(this,"segments",[])}get isEmpty(){return this.segments.length===0}moveTo(e){return this.segments.push({op:"M",p:e}),this}lineTo(e){return this.segments.push({op:"L",p:e}),this}quadTo(e,n){return this.segments.push({op:"Q",c:n,p:e}),this}curveTo(e,n,i){return this.segments.push({op:"C",c1:n,c2:i,p:e}),this}close(){return this.segments.push({op:"Z"}),this}addPath(e){return this.segments.push(...e.segments),this}addLines(e){return e.forEach((n,i)=>i===0?this.moveTo(n):this.lineTo(n)),this}static rect(e){return new t().addLines([{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]).close()}addEllipse(e){let n=e.x+e.width/2,i=e.y+e.height/2,o=e.width/2,r=e.height/2,l=o*Gn,s=r*Gn;return this.moveTo({x:n+o,y:i}),this.curveTo({x:n,y:i+r},{x:n+o,y:i+s},{x:n+l,y:i+r}),this.curveTo({x:n-o,y:i},{x:n-l,y:i+r},{x:n-o,y:i+s}),this.curveTo({x:n,y:i-r},{x:n-o,y:i-s},{x:n-l,y:i-r}),this.curveTo({x:n+o,y:i},{x:n+l,y:i-r},{x:n+o,y:i-s}),this.close()}static ellipse(e){return new t().addEllipse(e)}translated(e,n){let i=r=>({x:r.x+e,y:r.y+n}),o=new t;return o.segments=this.segments.map(r=>{switch(r.op){case"M":case"L":return{op:r.op,p:i(r.p)};case"Q":return{op:"Q",c:i(r.c),p:i(r.p)};case"C":return{op:"C",c1:i(r.c1),c2:i(r.c2),p:i(r.p)};case"Z":return r}}),o}contours(){let e=[],n=[],i={x:0,y:0};for(let o of this.segments){let r=n.length?n[n.length-1]:i;switch(o.op){case"M":n.length>1&&e.push(n),i=o.p,n=[o.p];break;case"L":n.push(o.p);break;case"Q":for(let l=1;l<=12;l++){let s=l/12,a=1-s;n.push({x:a*a*r.x+2*a*s*o.c.x+s*s*o.p.x,y:a*a*r.y+2*a*s*o.c.y+s*s*o.p.y})}break;case"C":for(let l=1;l<=16;l++){let s=l/16,a=1-s;n.push({x:a*a*a*r.x+3*a*a*s*o.c1.x+3*a*s*s*o.c2.x+s*s*s*o.p.x,y:a*a*a*r.y+3*a*a*s*o.c1.y+3*a*s*s*o.c2.y+s*s*s*o.p.y})}break;case"Z":n.push(i),n.length>1&&e.push(n),n=[i];break}}return n.length>1&&e.push(n),e}trimmed(e){let n=this.contours().map(r=>new It(r)),i=Math.min(Math.max(e,0),1)*n.reduce((r,l)=>r+l.length,0),o=new t;for(let r of n){if(!(i>0))break;o.moveTo(r.points[0]);for(let l=1;l<r.points.length;l++){let s=r.lengths[l]-r.lengths[l-1];if(s<=i){o.lineTo(r.points[l]),i-=s;continue}let a=r.points[l-1],u=r.points[l],c=i/s;o.lineTo({x:a.x+(u.x-a.x)*c,y:a.y+(u.y-a.y)*c}),i=0;break}}return o}data(){let e=[];for(let n of this.segments)switch(n.op){case"M":e.push(`M${R(n.p.x)} ${R(n.p.y)}`);break;case"L":e.push(`L${R(n.p.x)} ${R(n.p.y)}`);break;case"Q":e.push(`Q${R(n.c.x)} ${R(n.c.y)} ${R(n.p.x)} ${R(n.p.y)}`);break;case"C":e.push(`C${R(n.c1.x)} ${R(n.c1.y)} ${R(n.c2.x)} ${R(n.c2.y)} ${R(n.p.x)} ${R(n.p.y)}`);break;case"Z":e.push("Z");break}return e.join(" ")}};function Xt(t){return t<0?-Math.round(-t):Math.round(t)}function R(t){let e=Xt(t*100)/100;return Number.isInteger(e)?String(e===0?0:e):String(e)}var It=class{constructor(e){v(this,"points");v(this,"lengths");this.points=e;let n=0;this.lengths=e.map((i,o)=>(o>0&&(n+=Math.hypot(i.x-e[o-1].x,i.y-e[o-1].y)),n))}get length(){return this.lengths.length?this.lengths[this.lengths.length-1]:0}point(e){if(this.points.length<=1||!(this.length>0))return this.points[0]??{x:0,y:0};let n=Math.min(Math.max(e,0),1)*this.length,i=1;for(;i<this.lengths.length-1&&this.lengths[i]<n;)i++;let o=this.lengths[i]-this.lengths[i-1],r=o>0?(n-this.lengths[i-1])/o:0,l=this.points[i-1],s=this.points[i];return{x:l.x+(s.x-l.x)*r,y:l.y+(s.y-l.y)*r}}},q=t=>t.x+t.width/2,Q=t=>t.y+t.height/2,H=t=>t.x+t.width,K=t=>t.y+t.height;function Be(t,e){if(!t)return{...e};let n=Math.min(t.x,e.x),i=Math.min(t.y,e.y);return{x:n,y:i,width:Math.max(H(t),H(e))-n,height:Math.max(K(t),K(e))-i}}function Lt(t,e,n){return{x:t.x+e,y:t.y+n,width:t.width-2*e,height:t.height-2*n}}function mt(t,e,n){if(n===0)return t;let i=t.x-e.x,o=t.y-e.y;return{x:e.x+i*Math.cos(n)-o*Math.sin(n),y:e.y+i*Math.sin(n)+o*Math.cos(n)}}function Ne(t,e){let n=1-e;return{x:t[0].x*(n*n*n)+t[1].x*(3*e*n*n)+t[2].x*(3*e*e*n)+t[3].x*(e*e*e),y:t[0].y*(n*n*n)+t[1].y*(3*e*n*n)+t[2].y*(3*e*e*n)+t[3].y*(e*e*e)}}function Bn(t,e){let n=[t[0]];for(let i=0;i<Math.floor((t.length-1)/3);i++){let o=t.slice(3*i,3*i+4),r=0;for(let s=1;s<o.length;s++)r+=Math.hypot(o[s].x-o[s-1].x,o[s].y-o[s-1].y);let l=Math.min(400,Math.max(4,Math.ceil(r/Math.max(e,.5))));for(let s=1;s<=l;s++)n.push(Ne(o,s/l))}return n}var Y=t=>({x:t.x,y:t.y,width:t.width,height:t.height}),Z=t=>t.rotation??0,Ut=t=>({x:t.x+t.width/2,y:t.y+t.height/2}),tt=(t,e)=>mt(e,Ut(t),Z(t)),Nn=(t,e)=>mt(e,Ut(t),-Z(t));function Zn(t){let e=Y(t);if(Z(t)===0)return e;let n=[{x:e.x,y:e.y},{x:H(e),y:e.y},{x:H(e),y:K(e)},{x:e.x,y:K(e)}].map(s=>tt(t,s)),i=n.map(s=>s.x),o=n.map(s=>s.y),r=Math.min(...i),l=Math.min(...o);return{x:r,y:l,width:Math.max(...i)-r,height:Math.max(...o)-l}}function Xn(t,e){let n=t.style.textColor!==null&&Gt(t.style.textColor);if(!Gt(t.style.stroke)&&!n)return t;let i=G(t),r=(t.style.fillStyle==="solid"||t.style.fillStyle==="grid")&&t.style.fill.a>=.5&&Et(t.style.fill)>.5,l=Et(e)>.5&&r?xt:e;return Gt(t.style.stroke)&&(i.style.stroke={...l}),n&&(i.style.textColor={...l}),i}function Un(t){return t.kind==="text"||t.kind==="note"?t.style.stroke:t.style.textColor??t.style.stroke}function Ft(t){if(t.kind!=="path"||!t.subpaths)return[];let e=[];for(let n of t.subpaths){if(n.coords.length<8||(n.coords.length-2)%6!==0)continue;let i=[];for(let o=0;o<n.coords.length;o+=2)i.push({x:t.x+n.coords[o]*t.width,y:t.y+n.coords[o+1]*t.height});e.push({closed:n.closed,points:i})}return e}function Ze(t){let e=new I;for(let n of Ft(t)){e.moveTo(n.points[0]);for(let i=0;i<(n.points.length-1)/3;i++)e.curveTo(n.points[3*i+3],n.points[3*i+1],n.points[3*i+2]);n.closed&&e.close()}return e}function to(t,e){let n=Y(t),i=e==="top"?{x:q(n),y:n.y}:e==="right"?{x:H(n),y:Q(n)}:e==="bottom"?{x:q(n),y:K(n)}:{x:n.x,y:Q(n)};return tt(t,i)}function eo(t){let e=[];for(let n=0;n+3<t.length;n+=3){let i=t.slice(n,n+4);for(let o=0;o<16;o++)e.push(Ne(i,o/16))}return e.push(t[t.length-1]),e}function no(t,e,n){let i=null,o=null;for(let l of Ft(t)){let s=eo(l.points),a=s.length,u=l.closed?a:a-1;for(let c=0;c<u;c++){let h=s[c],m=s[(c+1)%a],d={x:m.x-h.x,y:m.y-h.y},p={x:h.x-e.x,y:h.y-e.y},f=d.x*n.y-n.x*d.y;if(f===0)continue;let y=(d.x*p.y-d.y*p.x)/f,x=(n.x*p.y-n.y*p.x)/f;y>0&&x>=0&&x<=1&&((i===null||y<i)&&(i=y),y<=1&&(o===null||y>o)&&(o=y))}}let r=o??i;return r===null?null:{x:e.x+n.x*r,y:e.y+n.y*r}}function io(t,e){let n=Y(t),i=Ut(t),o=Nn(t,e),r=o.x-i.x,l=o.y-i.y;if(!((r!==0||l!==0)&&n.width>0&&n.height>0))return i;if(t.kind==="path"){let c=no(t,i,{x:r,y:l});if(c)return tt(t,c)}let s=n.width/2,a=n.height/2,u;return t.kind==="ellipse"?u=1/Math.sqrt(r*r/(s*s)+l*l/(a*a)):t.kind==="diamond"?u=1/(Math.abs(r)/s+Math.abs(l)/a):u=Math.min(r!==0?s/Math.abs(r):1/0,l!==0?a/Math.abs(l):1/0),tt(t,{x:i.x+r*u,y:i.y+l*u})}function jn(t,e){let n=t.elementID?e.get(t.elementID):void 0;return n?Ut(n):{x:t.x,y:t.y}}function oo(t,e){let n=Y(t);return tt(t,{x:n.x+e.x*n.width,y:n.y+e.y*n.height})}function Jn(t,e,n){let i=t.elementID?n.get(t.elementID):void 0;if(!i)return{x:t.x,y:t.y};let o=t.portIndex,r=i.ports??[];return typeof o=="number"&&Number.isInteger(o)&&o>=0&&o<r.length?oo(i,r[o]):t.port?to(i,t.port):io(i,e)}function lt(t,e){let n=t.connector;if(!n)return[{x:0,y:0},{x:0,y:0}];let i=n.waypoints??[];return[Jn(n.start,i.length>0?i[0]:jn(n.end,e),e),Jn(n.end,i.length>0?i[i.length-1]:jn(n.start,e),e)]}function at(t){if(t.kind==="polyline")return t.points;let e=[],n=t.points;for(let i=0;i<Math.floor((n.length-1)/3);i++){let o=n[3*i],r=n[3*i+1],l=n[3*i+2],s=n[3*i+3];for(let a=i===0?0:1;a<=24;a++){let u=a/24,c=1-u;e.push({x:c*c*c*o.x+3*c*c*u*r.x+3*c*u*u*l.x+u*u*u*s.x,y:c*c*c*o.y+3*c*c*u*r.y+3*c*u*u*l.y+u*u*u*s.y})}}return e}var pe=t=>t===null?null:t==="top"||t==="bottom";function ro(t){let e=[];for(let n of t){let i=e[e.length-1];if(!(i&&Math.abs(i.x-n.x)<.5&&Math.abs(i.y-n.y)<.5)){if(e.length>=2){let o=e[e.length-2],r=e[e.length-1];if(Math.abs(o.x-r.x)<.5&&Math.abs(r.x-n.x)<.5||Math.abs(o.y-r.y)<.5&&Math.abs(r.y-n.y)<.5){e[e.length-1]=n;continue}}e.push(n)}}return e.length>=2?e:t}function so(t,e){switch(e.routing){case"straight":return{kind:"polyline",points:t};case"curved":{let n=[t[0]];for(let i=0;i<t.length-1;i++){let o=t[Math.max(i-1,0)],r=t[i],l=t[i+1],s=t[Math.min(i+2,t.length-1)];n.push({x:r.x+(l.x-o.x)/6,y:r.y+(l.y-o.y)/6}),n.push({x:l.x-(s.x-r.x)/6,y:l.y-(s.y-r.y)/6}),n.push(l)}return{kind:"curve",points:n}}case"elbow":{let n=t[0],i=t[1],o=pe(e.start.port)??Math.abs(i.y-n.y)>Math.abs(i.x-n.x),r=pe(e.end.port),l=[n];for(let s=1;s<t.length;s++){let a=t[s],u=l[l.length-1],c=Math.abs(u.x-a.x)<.5,h=Math.abs(u.y-a.y)<.5;if(c||h){l.push(a),c!==h&&(o=!c);continue}let m=s===t.length-1&&r!==null?!r:o;l.push(m?{x:u.x,y:a.y}:{x:a.x,y:u.y},a),o=m}return{kind:"polyline",points:ro(l)}}}}function ct(t,e){let n=t.connector;if(!n)return{kind:"polyline",points:[]};let[i,o]=lt(t,e);if(n.waypoints&&n.waypoints.length>0)return so([i,...n.waypoints.map(a=>({x:a.x,y:a.y})),o],n);let r=o.x-i.x,l=o.y-i.y,s=Math.abs(r)>=Math.abs(l);switch(n.routing){case"straight":return{kind:"polyline",points:[i,o]};case"curved":return s?{kind:"curve",points:[i,{x:i.x+r/2,y:i.y},{x:o.x-r/2,y:o.y},o]}:{kind:"curve",points:[i,{x:i.x,y:i.y+l/2},{x:o.x,y:o.y-l/2},o]};case"elbow":{let a=pe(n.start.port)??!s,u=pe(n.end.port)??!s;if(a&&u){let c=i.y+l/2;return{kind:"polyline",points:[i,{x:i.x,y:c},{x:o.x,y:c},o]}}if(!a&&!u){let c=i.x+r/2;return{kind:"polyline",points:[i,{x:c,y:i.y},{x:c,y:o.y},o]}}return a?{kind:"polyline",points:[i,{x:i.x,y:o.y},o]}:{kind:"polyline",points:[i,{x:o.x,y:i.y},o]}}}}function Hn(t,e,n){let i=Math.atan2(t.y-e.y,t.x-e.x),o=Math.PI/7,r=l=>({x:t.x-n*Math.cos(i+l),y:t.y-n*Math.sin(i+l)});return[r(o),r(-o)]}function Kn(t,e){let n=at(ct(t,e));if(n.length===0)return{x:0,y:0,width:0,height:0};let i=n[0].x,o=n[0].y,r=i,l=o;for(let s of n)i=Math.min(i,s.x),o=Math.min(o,s.y),r=Math.max(r,s.x),l=Math.max(l,s.y);return{x:i,y:o,width:r-i,height:l-o}}function qn(t,e){let n=at(ct(t,e));if(n.length<=1)return n[0]??{x:0,y:0};let i=[],o=0;for(let l=0;l<n.length-1;l++){let s=Math.hypot(n[l+1].x-n[l].x,n[l+1].y-n[l].y);i.push(s),o+=s}let r=o/2;for(let l=0;l<i.length;l++){let s=i[l];if(r<=s||l===i.length-1){let a=s===0?0:r/s;return{x:n[l].x+(n[l+1].x-n[l].x)*a,y:n[l].y+(n[l+1].y-n[l].y)*a}}r-=s}return n[0]}function et(t){let e=new Map;for(let n of t.elements)e.has(n.id)||e.set(n.id,n);return e}function Ue(t,e,n){let i=t[1]+n>>>0,o=i<t[1]?1:0;return[t[0]+e+o>>>0,i]}function lo(t,e){let n=t&65535,i=t>>>16,o=e&65535,r=e>>>16,l=n*o,s=n*r,a=i*o,u=i*r,c=s+a,h=l+c%65536*65536;return[u+Math.floor(c/65536)+Math.floor(h/4294967296)>>>0,h>>>0]}function je(t,e,n){let i=lo(t[1],n);return[i[0]+Math.imul(t[0],n)+Math.imul(t[1],e)>>>0,i[1]]}function Xe(t,e){let n=(t[1]>>>e|t[0]<<32-e)>>>0;return[(t[0]^t[0]>>>e)>>>0,(t[1]^n)>>>0]}function Qn(t){return t=je(Xe(t,30),3210233709,484763065),t=je(Xe(t,27),2496678331,321982955),Xe(t,31)}var dt=class{constructor(e){v(this,"state");this.state=Ue([0,e>>>0],2654435769,2135587861)}next(){return this.state=Ue(this.state,2654435769,2135587861),Qn(this.state)}top53(){let[e,n]=this.next();return e*2097152+(n>>>11)}signed(){return Math.floor(this.top53())/2**52-1}unit(){return this.top53()/2**53}};function ye(t,e){let n=Ue([0,t>>>0],...ao(e));return n=Qn(n),Math.max(1,n[1]>>>0)}function ao(t){let e=je([0,t>>>0],2654435769,2135587861);return[e[0],e[1]]}var _n=(t,e,n)=>t.signed()*e*n;function ut(t,e,n,i,o,r,l){let s=Math.hypot(e.x-t.x,e.y-t.y);if(!(s>.5))return;let a=s<200?1:s>500?.4:-.0016668*s+1.233334,u=s<20?s/10:2;for(let c=0;c<2;c++){let h=(c===0?1:.5)*a,m=()=>_n(n,u,i)*h,d=n.unit()*.4+.3,p=_n(n,s/60,i)*o*a,f=e.x-t.x,y=e.y-t.y,x=-y/s,w=f/s,g=r?t:{x:t.x+m(),y:t.y+m()},k=r?e:{x:e.x+m(),y:e.y+m()},P=t.x+f*d*.66+x*p+m()*.5,b=t.y+y*d*.66+w*p+m()*.5,M=t.x+f*(.5+d*.5)+x*p+m()*.5,T=t.y+y*(.5+d*.5)+w*p+m()*.5;l.moveTo(g),l.curveTo(k,{x:P,y:b},{x:M,y:T})}}function Je(t,e,n,i){let o=new I;for(let r=0;r<t.length;r++)ut(t[r],t[(r+1)%t.length],e,n,i,!1,o);return o}function ti(t,e,n){let i=new I,o=t.x+t.width/2,r=t.y+t.height/2,l=t.width/2,s=t.height/2;if(!(l>.5&&s>.5))return i;let a=Math.max(8,Math.min(24,Math.trunc((l+s)/6))),u=Math.min(2.5,(l+s)/25)*n;for(let c=0;c<2;c++){let h=e.unit()*2*Math.PI,m=2*Math.PI*(c===0?1:1.04),d=Math.trunc(a*m/(2*Math.PI))+1,p=[];for(let f=0;f<d;f++){let y=h+m*f/a,x=e.signed()*u,w=e.signed()*u;p.push({x:o+l*Math.cos(y)+x,y:r+s*Math.sin(y)+w})}co(p,i)}return i}function co(t,e){if(!(t.length<=2)){e.moveTo(t[0]);for(let n=0;n<t.length-1;n++){let i=t[Math.max(n-1,0)],o=t[n],r=t[n+1],l=t[Math.min(n+2,t.length-1)];e.curveTo(r,{x:o.x+(r.x-i.x)/6,y:o.y+(r.y-i.y)/6},{x:r.x-(l.x-o.x)/6,y:r.y-(l.y-o.y)/6})}}}var He=-41*Math.PI/180;function ei(t,e,n){if(!(n>0))return[];let i=Math.cos(e),o=Math.sin(e),r=t.filter(m=>m.length>=3).map(m=>m.map(d=>({x:d.x*i+d.y*o,y:-d.x*o+d.y*i}))),l=r.flat();if(l.length===0)return[];let s=1/0,a=-1/0;for(let m of l)s=Math.min(s,m.y),a=Math.max(a,m.y);let u=(m,d)=>({x:m*i-d*o,y:m*o+d*i}),c=[],h=s+n/2;for(;h<a;){let m=[];for(let d of r)for(let p=0;p<d.length;p++){let f=d[p],y=d[(p+1)%d.length];(f.y<=h&&h<y.y||y.y<=h&&h<f.y)&&m.push(f.x+(h-f.y)/(y.y-f.y)*(y.x-f.x))}m.sort((d,p)=>d-p);for(let d=0;d+1<m.length;d+=2)m[d+1]-m[d]>.5&&c.push([u(m[d],h),u(m[d+1],h)]);h+=n}return c}var ri=2,Ke=.75,uo=.8,ii=.6;function si(t,e){return[...oi(t,e,!1),...oi(t,e,!0)]}function oi(t,e,n){if(!(e>0))return[];let i=u=>n?{x:u.y,y:u.x}:u,o=t.filter(u=>u.length>=3).map(u=>u.map(i)),r=o.flat().map(u=>u.y);if(r.length===0)return[];let l=Math.min(...r),s=Math.max(...r),a=[];for(let u=Math.floor(l/e)*e;u<s-.5;u+=e){if(!(u>l+.5))continue;let c=[];for(let h of o)for(let m=0;m<h.length;m++){let d=h[m],p=h[(m+1)%h.length];(d.y<=u&&u<p.y||p.y<=u&&u<d.y)&&c.push(d.x+(u-d.y)/(p.y-d.y)*(p.x-d.x))}c.sort((h,m)=>h-m);for(let h=0;h+1<c.length;h+=2)c[h+1]-c[h]>.5&&a.push([i({x:c[h],y:u}),i({x:c[h+1],y:u})])}return a}function li(t){return .2126*t.r+.7152*t.g+.0722*t.b>.5?{r:t.r*.84,g:t.g*.84,b:t.b*.8,a:t.a}:{r:t.r+(1-t.r)*.25,g:t.g+(1-t.g)*.25,b:t.b+(1-t.b)*.25,a:t.a}}function qe(t){return t.style.fillStyle==="grid"&&t.style.fill.a>0&&["rectangle","ellipse","diamond","path"].includes(t.kind)}function be(t,e,n){let i=(Math.imul(t,668265261)^Math.imul(e,374761393)^Math.imul(n,2654435761))>>>0;return i=Math.imul(i^i>>>15,2246822507)>>>0,i=Math.imul(i^i>>>13,3266489909)>>>0,i=(i^i>>>16)>>>0,i/4294967296}function ai(t,e,n){let i=n/ri;return{x:(t+.5+(be(t,e,1)-.5)*ii)*i,y:(e+.5+(be(t,e,2)-.5)*ii)*i}}function ho(t,e,n,i){let o=1/0;for(let r=-1;r<=1;r++)for(let l=-1;l<=1;l++){if(r===0&&l===0)continue;let s=ai(t+r,e+l,i);o=Math.min(o,Math.hypot(s.x-n.x,s.y-n.y))}return o*uo}function fo(t,e,n){let i=Math.cos(e),o=Math.sin(e),r=n*.8,l=n*.5;return[-1,0,1].map(s=>{let a=t.x-o*l*s,u=t.y+i*l*s;return[{x:a-i*r,y:u-o*r},{x:a+i*r,y:u+o*r}]})}function mo(t,e){let n=!1;for(let i of t){if(i.length<3)continue;let o=i.length-1;for(let r=0;r<i.length;r++){let l=i[r],s=i[o];l.y>e.y!=s.y>e.y&&e.x<(s.x-l.x)*(e.y-l.y)/(s.y-l.y)+l.x&&(n=!n),o=r}}return n}function po(t,e){let n=1/0;for(let i of e)if(!(i.length<2))for(let o=0;o<i.length;o++){let r=i[o],l=i[(o+1)%i.length],s=l.x-r.x,a=l.y-r.y,u=s*s+a*a,c=u>0?Math.max(0,Math.min(1,((t.x-r.x)*s+(t.y-r.y)*a)/u)):0;n=Math.min(n,Math.hypot(t.x-(r.x+c*s),t.y-(r.y+c*a)))}return n}var yo=(t,e)=>e.x>=t.x&&e.x<t.x+t.width&&e.y>=t.y&&e.y<t.y+t.height,ge=new Map;function ci(t){if(t.length===0)return[];let e=t.map(o=>[o.kind,o.x,o.y,o.width,o.height,o.rotation??0,Pt(o),JSON.stringify(o.subpaths??null),o.style.stroke.r,o.style.stroke.g,o.style.stroke.b,o.style.stroke.a,o.style.roughness,o.style.strokeWidth].join(",")).join(";"),n=ge.get(e);if(n)return n;let i=go(t);return ge.size>=16&&ge.clear(),ge.set(e,i),i}function go(t){let e=t.map(r=>{let l=Qe(r).map(d=>d.map(p=>tt(r,p))),s=l.flat(),a=s.map(d=>d.x),u=s.map(d=>d.y),c=a.length?Math.min(...a):0,h=u.length?Math.min(...u):0,m={x:c,y:h,width:(a.length?Math.max(...a):0)-c,height:(u.length?Math.max(...u):0)-h};return{contours:l,box:m,cell:Pt(r),element:r}}),n=e.map(()=>[]),i=new Set;for(let r of e){let l=r.cell/ri,s=Lt(r.box,-r.cell,-r.cell),a=Math.floor(s.x/l),u=Math.ceil((s.x+s.width)/l),c=Math.floor(s.y/l),h=Math.ceil((s.y+s.height)/l),m=Ke*r.cell;for(let d=a;d<u;d++)for(let p=c;p<h;p++){let f=`${r.cell}|${d}|${p}`;if(i.has(f))continue;i.add(f);let y=ai(d,p,r.cell),x=1/0,w=-1;for(let b=0;b<e.length;b++){let M=e[b];if(!yo(Lt(M.box,-m,-m),y))continue;if(mo(M.contours,y)){x=0;break}let T=po(y,M.contours);T<x&&(x=T,w=b)}if(!(x>0&&x<=m&&w>=0))continue;let g=be(d,p,3)*Math.PI,k=ho(d,p,y,r.cell),P=Math.trunc(be(d,p,4)*4294967296)>>>0;for(let[b,M]of fo(y,g,k))n[w].push([b,M,P])}}let o=[];return e.forEach((r,l)=>{if(n[l].length===0)return;let s=r.element,a=new I;for(let[u,c,h]of n[l])s.style.roughness<=0?a.moveTo(u).lineTo(c):ut(u,c,new dt(h),s.style.roughness*.35,.2,!1,a);o.push({ink:{...s.style.stroke,a:s.style.stroke.a*.6},width:Math.max(.8,s.style.strokeWidth*.45),path:a})}),o}var xe=class{constructor(e=6e3){v(this,"map",new Map);v(this,"limit");this.limit=e}get(e,n){let i=this.map.get(e);if(i!==void 0)return i;let o=n();return this.map.size>=this.limit&&this.map.clear(),this.map.set(e,o),o}},fi=new xe,bo=new xe;function mi(t,e){let n=t.style;return[e,t.kind,t.x,t.y,t.width,t.height,t.seed,n.roughness,n.bowing,n.strokeWidth,n.fillStyle,n.fillStyle==="grid"?Pt(t):0,t.path?t.path.join(","):t.subpaths?JSON.stringify(t.subpaths):""].join("|")}var Pt=t=>Math.max(8,t.style.gridSize??50);function Mt(t){return t.kind==="freehand"&&t.path===null?ui(t):fi.get(mi(t,0),()=>ui(t))}function di(t){return[{x:t.x,y:t.y},{x:H(t),y:t.y},{x:H(t),y:K(t)},{x:t.x,y:K(t)}]}function ke(t){return[{x:q(t),y:t.y},{x:H(t),y:Q(t)},{x:q(t),y:K(t)},{x:t.x,y:Q(t)}]}function ui(t){let e=Y(t),n=new dt(t.seed),i=t.style.roughness;switch(t.kind){case"ellipse":return i<=0?I.ellipse(e):ti(e,n,i);case"diamond":return i<=0?new I().addLines(ke(e)).close():Je(ke(e),n,i,t.style.bowing);case"text":case"connector":return I.rect(e);case"freehand":return ko(t);case"path":return i<=0?Ze(t):xo(t,n);default:return i<=0?I.rect(e):Je(di(e),n,i,t.style.bowing)}}function xo(t,e){let n=t.style.roughness,i=new I;for(let o of Ft(t)){let r=o.points;for(let l=0;l<(r.length-1)/3;l++){let s=r[3*l],a=r[3*l+1],u=r[3*l+2],c=r[3*l+3];if(a.x===s.x&&a.y===s.y&&u.x===c.x&&u.y===c.y){ut(s,c,e,n,t.style.bowing,!0,i);continue}let h=Math.hypot(a.x-s.x,a.y-s.y)+Math.hypot(u.x-a.x,u.y-a.y)+Math.hypot(c.x-u.x,c.y-u.y),m=Math.min(2.5,h/30)*n;for(let d=0;d<2;d++){let p=d===0?1:.5,f=()=>e.signed()*m*p;i.moveTo(s);let y=a.x+f(),x=a.y+f(),w=u.x+f(),g=u.y+f();i.curveTo(c,{x:y,y:x},{x:w,y:g})}}}return i}function ko(t){let e=Y(t),n=t.path;if(n&&n.length>=8&&(n.length-2)%6===0){let r=s=>({x:e.x+n[2*s]*e.width,y:e.y+n[2*s+1]*e.height}),l=new I().moveTo(r(0));for(let s=0;s<Math.floor((n.length/2-1)/3);s++)l.curveTo(r(3*s+3),r(3*s+1),r(3*s+2));return l}let i=(t.points??[]).map(r=>({x:e.x+r.x*e.width,y:e.y+r.y*e.height})),o=new I;if(i.length===0)return o;if(o.moveTo(i[0]),i.length===1)return o.lineTo(i[0]);if(i.length===2)return o.lineTo(i[1]);for(let r=1;r<i.length-1;r++)o.quadTo({x:(i[r].x+i[r+1].x)/2,y:(i[r].y+i[r+1].y)/2},i[r]);return o.lineTo(i[i.length-1])}function Qe(t){return t.kind!=="path"?[wo(t)]:Ft(t).map(e=>Bn(e.points,3))}function wo(t){let e=Y(t);if(t.kind==="ellipse"){let n=[];for(let i=0;i<48;i++){let o=2*Math.PI*i/48;n.push({x:q(e)+e.width/2*Math.cos(o),y:Q(e)+e.height/2*Math.sin(o)})}return n}return t.kind==="diamond"?ke(e):di(e)}function we(t){let e=Y(t);return t.kind==="ellipse"?I.ellipse(e):t.kind==="path"?Ze(t):t.kind==="diamond"?new I().addLines(ke(e)).close():I.rect(e)}function tn(t){return t.style.fillStyle==="solid"||["freehand","connector","text","image"].includes(t.kind)?new I:fi.get(mi(t,1),()=>Po(t))}function Po(t){let e=Qe(t),n=new dt((t.seed^1540483477)>>>0),i=new I;if(t.style.fillStyle==="grid"){for(let[l,s]of si(e,Pt(t)))t.style.roughness<=0?i.moveTo(l).lineTo(s):ut(l,s,n,t.style.roughness*.3,.3,!1,i);return i}let o=Math.max(4,t.style.strokeWidth*4),r=[He];t.style.fillStyle==="crossHatch"&&r.push(He+Math.PI/2);for(let l of r)for(let[s,a]of ei(e,l,o))t.style.roughness<=0?i.moveTo(s).lineTo(a):ut(s,a,n,t.style.roughness*.6,.5,!1,i);return i}function Pe(t,e){switch(t){case"solid":return null;case"dashed":return[Math.max(8,e*4),Math.max(6,e*3)];case"dotted":return[.01,Math.max(5,e*2.6)]}}function en(t,e,n){let i=t.connector;if(!i)return[new I,new I];let[o,r]=lt(t,e),l=ct(t,e),s=i.hops===!0&&n?Mo(t,l,n,e):[],a=[t.seed,t.style.roughness,t.style.bowing,t.style.strokeWidth,i.routing,i.startHead,i.endHead,i.start.port,i.end.port,o.x,o.y,r.x,r.y,JSON.stringify(i.waypoints),JSON.stringify(s)].join("|");return bo.get(a,()=>Ro(t,l,s))}function pi(t){return Math.max(8,t*4)}function yi(t){let e=t.points,n=[];if(t.kind==="polyline"){for(let i=0;i<e.length-1;i++)n.push([e[i],e[i+1]]);return n}for(let i=0;i<Math.floor((e.length-1)/3);i++){let o=e.slice(3*i,3*i+4),r=[];for(let l=0;l<=24;l++)r.push(_e(o,l/24));n.push(r)}return n}function gi(t){let e=[0];for(let n=1;n<t.length;n++)e.push(e[n-1]+Math.hypot(t[n].x-t[n-1].x,t[n].y-t[n-1].y));return e}function _e(t,e){let n=1-e;return{x:n*n*n*t[0].x+3*n*n*e*t[1].x+3*n*e*e*t[2].x+e*e*e*t[3].x,y:n*n*n*t[0].y+3*n*n*e*t[1].y+3*n*e*e*t[2].y+e*e*e*t[3].y}}function hi(t,e,n){let i=(r,l)=>{let s=(p,f)=>({x:p.x+(f.x-p.x)*l,y:p.y+(f.y-p.y)*l}),a=s(r[0],r[1]),u=s(r[1],r[2]),c=s(r[2],r[3]),h=s(a,u),m=s(u,c),d=s(h,m);return[[r[0],a,h,d],[d,m,c,r[3]]]},o=i(t,n)[0];return n>0?i(o,e/n)[1]:[t[0],t[0],t[0],t[0]]}function Mo(t,e,n,i){let o=yi(e);if(o.length===0)return[];let r=new Set(n.layers.filter(u=>u.visible).map(u=>u.id)),l=[];for(let u of st(n)){if(u.id===t.id)break;u.kind!=="connector"||!r.has(u.layerID)||l.push(at(ct(u,i)))}let s=pi(t.style.strokeWidth),a=[];for(let u of o){let c=gi(u),h=c[c.length-1],m=[];for(let p=0;p<u.length-1;p++){let f=u[p],y=u[p+1],x=y.x-f.x,w=y.y-f.y;for(let g of l)for(let k=0;k<g.length-1;k++){let P=g[k],b=g[k+1],M=b.x-P.x,T=b.y-P.y,S=x*T-w*M;if(Math.abs(S)<1e-9)continue;let O=P.x-f.x,C=P.y-f.y,V=(O*T-C*M)/S,$=(O*w-C*x)/S;V>0&&V<1&&$>=0&&$<=1&&m.push(c[p]+V*(c[p+1]-c[p]))}}let d=[];for(let p of m.sort((f,y)=>f-y))p<s+2||p>h-s-2||d.length>0&&p-d[d.length-1]<2*s+2||d.push(p);a.push(d)}return a}function Ro(t,e,n){let i=t.connector,o=new dt(t.seed),r=t.style.roughness,l=t.style.bowing,s=new I,a=new I,u=r*3,c=()=>o.signed()*u,h=(x,w,g,k)=>{let P={x:g.y,y:-g.x};(P.y>1e-9||Math.abs(P.y)<=1e-9&&P.x>0)&&(P={x:-P.x,y:-P.y});let b=k*.5523,M={x:(x.x+w.x)/2,y:(x.y+w.y)/2},T={x:M.x+P.x*k,y:M.y+P.y*k};s.moveTo(x);let S=x.x+P.x*b+c(),O=x.y+P.y*b+c(),C=T.x-g.x*b+c(),V=T.y-g.y*b+c();s.curveTo(T,{x:S,y:O},{x:C,y:V});let $=T.x+g.x*b+c(),B=T.y+g.y*b+c(),X=w.x+P.x*b+c(),U=w.y+P.y*b+c();s.curveTo(w,{x:$,y:B},{x:X,y:U})},m=pi(t.style.strokeWidth);if(e.kind==="polyline"){let x=e.points,w=(g,k)=>{r<=0?s.moveTo(g).lineTo(k):ut(g,k,o,r,l,!0,s)};for(let g=0;g<Math.max(x.length-1,0);g++){let k=x[g],P=x[g+1],b=Math.hypot(P.x-k.x,P.y-k.y),M=b>0?{x:(P.x-k.x)/b,y:(P.y-k.y)/b}:{x:0,y:0},T=O=>({x:k.x+M.x*O,y:k.y+M.y*O}),S=k;for(let O of g<n.length?n[g]:[]){let C=T(O-m),V=T(O+m);w(S,C),h(C,V,M,m),S=V}w(S,P)}}else{let x=e.points,w=yi(e);s.moveTo(x[0]);for(let g=0;g<Math.floor((x.length-1)/3);g++){let k=x[3*g+1],P=x[3*g+2],b=x[3*g+3],M=k.x+c(),T=k.y+c(),S=P.x+c(),O=P.y+c(),C=g<n.length?n[g]:[];if(C.length===0){s.curveTo(b,{x:M,y:T},{x:S,y:O});continue}let V=[x[3*g],{x:M,y:T},{x:S,y:O},b],$=gi(w[g]),B=ot=>{let D=0;for(;D<$.length-2&&$[D+1]<ot;)D++;let ft=$[D+1]-$[D];return(D+(ft>0?(ot-$[D])/ft:0))/24},X=0;for(let ot of C){let D=B(ot-m),ft=B(ot+m),oe=hi(V,X,D);(g>0||X>0)&&s.moveTo(oe[0]),s.curveTo(oe[3],oe[1],oe[2]);let Vt=_e(V,D),Wt=_e(V,ft),re=Math.hypot(Wt.x-Vt.x,Wt.y-Vt.y),zi=re>0?{x:(Wt.x-Vt.x)/re,y:(Wt.y-Vt.y)/re}:{x:0,y:0};h(Vt,Wt,zi,re/2),X=ft}let U=hi(V,X,1);s.moveTo(U[0]).curveTo(U[3],U[1],U[2])}}let d=at(e),p=Math.max(10,t.style.strokeWidth*5),f=(x,w)=>{r<=0?s.moveTo(x).lineTo(w):ut(x,w,o,r*.5,0,!0,s)},y=(x,w,g)=>{let[k,P]=Hn(w,g,p);switch(x){case"arrow":f(k,w),f(P,w);break;case"triangle":f(k,w),f(P,w),f(k,P),a.moveTo(w).lineTo(k).lineTo(P).close();break;case"dot":{let b=p*.32,M=Math.atan2(w.y-g.y,w.x-g.x),T=w.x-b*Math.cos(M),S=w.y-b*Math.sin(M);a.addEllipse({x:T-b,y:S-b,width:2*b,height:2*b});break}case"bar":{let b=Math.atan2(w.y-g.y,w.x-g.x)+Math.PI/2,M=p*.5;f({x:w.x-M*Math.cos(b),y:w.y-M*Math.sin(b)},{x:w.x+M*Math.cos(b),y:w.y+M*Math.sin(b)});break}}};return d.length>1&&(y(i.endHead,d[d.length-1],d[d.length-2]),y(i.startHead,d[0],d[1])),[s,a]}function rn(t,e){switch(t){case"linear":return e;case"easeIn":return e*e*e;case"easeOut":return 1-Math.pow(1-e,3);case"easeInOut":return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2;case"hold":return 0;case"spring":return vo(e);case"bounce":return To(e);case"elastic":return Ao(e)}}function vo(t){if(t<=0)return 0;if(t>=1)return 1;let e=n=>1-Math.exp(-6*n)*(Math.cos(3*Math.PI*n)+6/(3*Math.PI)*Math.sin(3*Math.PI*n));return e(t)+t*(1-e(1))}function To(t){if(t<=0)return 0;if(t>=1)return 1;let e=7.5625,n=2.75;if(t<1/n)return e*t*t;if(t<2/n){let o=t-1.5/n;return e*o*o+.75}if(t<2.5/n){let o=t-2.25/n;return e*o*o+.9375}let i=t-2.625/n;return e*i*i+.984375}function Ao(t){return t<=0?0:t>=1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*(2*Math.PI/3))+1}var jt=(t,e)=>t%e;function Jt(t,e){let n=(t.repeats??[]).filter(ce).slice().sort((i,o)=>i.start-o.start);if(n.length===0)return e;for(let i of n){if(!(e>=i.end))continue;let o=i.end-i.start;if(i.count===null)return i.start+jt(e-i.start,o);let r=o*i.count;if(e<i.start+r)return i.start+jt(e-i.start,o);e-=r-o}return e}function nn(t,e,n,i,o){e=Jt(t,e);let r,l;for(let c of t.keys)if(n(c)!==void 0)if(c.t<=e)r=c;else{l=c;break}if(!r&&!l)return i;if(r&&!l)return n(r);if(!r&&l)return n(l);let s=r,a=l,u=a.t-s.t>0?(e-s.t)/(a.t-s.t):1;return o(n(s),n(a),rn(s.ease??"linear",u))}var So=(t,e,n)=>t+(e-t)*n,Me=(t,e,n)=>Math.min(Math.max(t+(e-t)*n,0),1),bi=(t,e,n)=>({r:Me(t.r,e.r,n),g:Me(t.g,e.g,n),b:Me(t.b,e.b,n),a:Me(t.a,e.a,n)});function pt(t,e,n,i){return nn(t,e,o=>o[n],i,So)}function Eo(t,e){e=Jt(t,e);let n=(o,r)=>{let l;for(let a of t.keys)a.t<=e&&o(a)!==void 0&&(l=a);let s=t.keys.find(a=>a.t>e&&o(a)!==void 0);return!l||!s?!1:l.ease!=="hold"&&!r(o(l),o(s))},i=o=>n(r=>r[o],(r,l)=>r===l);return i("x")||i("y")||i("width")||i("height")||i("rotation")||i("strokeWidth")||n(o=>o.stroke,At)||n(o=>o.fill,At)||i("reveal")||i("opacity")}function on(t,e){e=Jt(t,e);let n=t.keys.filter(o=>o.visible!==void 0);if(n.length===0)return!0;let i;for(let o of n)o.t<=e&&(i=o);return i?i.visible:!n[0].visible}function Io(t,e,n){if(e=G(e),t.keys.some(i=>i.reveal!==void 0)){let i=pt(t,n,"reveal",e.reveal??1);e.reveal=i>=1?null:Math.max(0,i)}if(t.keys.some(i=>i.opacity!==void 0)){let i=Math.min(Math.max(pt(t,n,"opacity",e.style.opacity??1),0),1);e.style.opacity=i>=1?null:i}return e.kind==="connector"||(e.x=pt(t,n,"x",e.x),e.y=pt(t,n,"y",e.y),e.width=Math.max(0,pt(t,n,"width",e.width)),e.height=Math.max(0,pt(t,n,"height",e.height)),t.keys.some(i=>i.rotation!==void 0)&&(e.rotation=pt(t,n,"rotation",Z(e))),e.style.strokeWidth=Math.max(0,pt(t,n,"strokeWidth",e.style.strokeWidth)),e.style.stroke=nn(t,n,i=>i.stroke,e.style.stroke,bi),e.style.fill=nn(t,n,i=>i.fill,e.style.fill,bi)),e}function Lo(t,e){e=Jt(t,e);let n=null;for(let o of t.follow??[])o.start<=e&&(n===null||o.start>n.start)&&(n=o);if(!n)return null;let i=n;return t.keys.some(o=>o.t>=i.end&&o.t<=e&&(o.x!==void 0||o.y!==void 0))?null:n}function Fo(t,e){if(t.kind==="connector")return new It(at(ct(t,et(e))));let n=G(t);n.style.roughness=0;let i=Mt(n).contours()[0]??[];return new It(Z(t)===0?i:i.map(o=>tt(t,o)))}function Co(t,e,n,i){let o=Lo(t,n);if(!o)return e;n=Jt(t,n);let r=i.elements.find(h=>h.id===o.path);if(!r||r.id===e.id)return e;let l=Fo(r,i),s=o.end-o.start,a=Math.min(Math.max(rn(o.ease??"easeInOut",s>0?Math.min(1,(n-o.start)/s):1),0),1)*(o.laps??1);a>1&&(a=jt(a,1)===0?1:jt(a,1)),o.reverse===!0&&(a=1-a);let u=l.point(a),c=G(e);if(c.x=u.x-e.width/2,c.y=u.y-e.height/2,o.orient===!0){let h=o.reverse===!0?-.01:.01,m=l.point(a-h/2),d=l.point(a+h/2);(m.x!==d.x||m.y!==d.y)&&(c.rotation=Math.atan2(d.y-m.y,d.x-m.x))}return c}function Do(t,e,n,i){if(!(n>0))return 0;let o=z(t.duration);if(o>0){let l=Xt(e*o/n);l!==0&&(e=l*n/o)}let r=jt(e*i,n);return r<0?-r:r===0?0:n-r}function Yo(t){let e=new Map;for(let n of t.tracks)e.has(n.element)||e.set(n.element,n);return e}function nt(t,e,n="initial"){return _(Ct(t,e,n),z(e))}var Oo={fps:12,duration:0,boil:null,settle:null,poster:null,tracks:[],camera:null,markers:null};function Ct(t,e,n="initial"){let i=vn(t,n),o=t.timeline??(i.size===0?null:Oo);if(!o)return t;e=z(e);let r=Yo(o),l=o.boil===null?null:Math.trunc(Math.floor(e*St(o.fps)+1e-9)/Math.max(1,o.boil))%Oe>>>0,s=new Set;for(let f of r.values())on(f,e)||s.add(f.element);for(let f of i)s.add(f);let a=null;if(o.settle===!0){a=new Set;for(let f of r.values())Eo(f,e)&&a.add(f.element)}let u=f=>{let y=r.get(f.id)?.boil;return y??(a?f.connector?[f.connector.start.elementID,f.connector.end.elementID].some(x=>x!==null&&a.has(x)):a.has(f.id):!0)},c=t.elements.map(f=>{let y=r.get(f.id),x=y?Io(y,f,e):f;l!==null&&l>0&&u(f)&&(x===f&&(x=G(f)),x.seed=ye(f.seed,l));let w=y?.march!=null?Pe(x.style.dash,x.style.strokeWidth):null;return y?.march!=null&&w&&(x===f&&(x=G(f)),x.style.dashOffset=Do(o,y.march,w.reduce((g,k)=>g+k,0),e)),x});c=c.map((f,y)=>s.has(f.id)?t.elements[y]:f);let h={...t,elements:c,timeline:null};c=c.map(f=>{let y=r.get(f.id);return y?Co(y,f,e,h):f});let m={...t,elements:c,timeline:null},d=et(m),p=new Set(s);return c=c.map(f=>{let y=f.connector;if(!y||![y.start.elementID,y.end.elementID].some(k=>k!==null&&s.has(k)))return f;if(!(r.get(f.id)?.keys.some(k=>k.visible!==void 0)??!1)||[y.start.elementID,y.end.elementID].some(k=>k!==null&&i.has(k)))return p.add(f.id),f;let[x,w]=lt(f,d),g=G(f);return g.connector.start={elementID:null,port:y.start.port,x:x.x,y:x.y},g.connector.end={elementID:null,port:y.end.port,x:w.x,y:w.y},g}),{...t,elements:c.filter(f=>!p.has(f.id)),timeline:null}}function yt(t){return t.timeline?t.timeline.poster??t.timeline.duration:0}function ki(t){return t.timeline?nt(t,yt(t)):_(Ct(t,0),0)}function Vo(t,e){let n=t.camera??[];if(n.length===0)return null;let i;for(let s of n)s.t<=e&&(i=s);let o=n.find(s=>s.t>e);if(!i)return xi(n[0]);if(!o)return xi(i);let r=rn(i.ease??"easeInOut",(e-i.t)/Math.max(o.t-i.t,1e-9)),l=(s,a)=>s+(a-s)*r;return{x:l(i.x,o.x),y:l(i.y,o.y),width:Math.max(1,l(i.width,o.width)),height:Math.max(1,l(i.height,o.height))}}var xi=t=>({x:t.x,y:t.y,width:t.width,height:t.height});function Dt(t,e){let n=t.camera?.[0],i=Vo(t,e);return!n||!i||!(i.width>0&&i.height>0)?null:Wo(i,n.width/n.height)}function Wo(t,e){if(!(t.width>0&&t.height>0&&e>0))return t;let n=t.width,i=t.height;return t.width/t.height<e?n=t.height*e:i=t.width/e,{x:t.x+t.width/2-n/2,y:t.y+t.height/2-i/2,width:n,height:i}}function $o(t){return Math.max(1,Math.ceil(z(t.duration)*St(t.fps)))}function Re(t){let e=St(t.fps),n=[];for(let o=0;o<$o(t);o++)n.push(o/e);let i=n[n.length-1];return t.duration-i>1e-6&&n.push(t.duration),n}function wi(t,e){let n=-1;return(t.markers??[]).forEach((i,o)=>{i.t<=e&&(n=o)}),n}function Pi(t){let e=t.timeline;if(!e)return new Set;let n=e.poster??e.duration;return new Set(e.tracks.filter(i=>!on(i,0)&&!on(i,n)).map(i=>i.element))}var zo=8,Go=2e4,sn=1e-9;function ve(t,e){let n=(t.timeline?.markers??[]).find(i=>i.name.toLowerCase()===e);return n?Math.min(Math.max(n.t,0),z(t.timeline?.duration??0)):null}function Kt(t,e){switch(e){case"up":return ve(t,"up")??0;case"over":return ve(t,"over")??Kt(t,"up");case"down":return ve(t,"down")??Kt(t,"over");default:return ve(t,"hit")}}function Bo(t,e,n,i){let o=z(t.timeline?.duration??0);if(t.button===!0)return Kt(t,"up")??0;let r=i!==null&&Number.isFinite(i)?i:0;switch(n??"loop"){case"still":return Math.min(t.timeline?.poster??o,o);case"click":return Math.min(Math.max(r,0),o);case"once":return Math.min(Math.max(e+r,0),o);default:{if(o<=0)return 0;let l=e+r,s=l%o;return s<0&&(s+=o),l>sn&&(s<sn||o-s<sn)?o:s}}}function No(t,e){let n=t.params;if(!n||Object.keys(n).length===0)return t;let i=new Map(Object.entries(n));for(let[r,l]of Object.entries(e??{}))i.has(r)&&i.set(r,l);let o=r=>r.includes("{{")?r.replace(/\{\{\s*([^{}]*?)\s*\}\}/g,(l,s)=>i.get(s)??l):r;return{...t,elements:t.elements.map(r=>{if(r.text===null&&r.args===null)return r;let l=G(r);return l.text!==null&&(l.text=o(l.text)),l.args!==null&&(l.args=Object.fromEntries(Object.entries(l.args).map(([s,a])=>[s,o(a)]))),l})}}function Zo(t){return{id:t.id,name:t.name,layers:t.layers,elements:t.elements,theme:null,timeline:t.timeline,symbols:null,variables:null}}function Te(t){return t.elements.some(e=>e.kind==="symbol")}function _(t,e,n=!0,i=new Map){if(!Te(t))return t;let o={left:Go};return{...t,elements:Ri(t.elements,t,e,cn(t),[],n,o,i)}}function cn(t){let e=new Map;for(let n of t.symbols??[])e.has(n.id)||e.set(n.id,n);return e}function Ri(t,e,n,i,o,r,l,s=new Map){let a=new Set(t.filter(h=>h.kind==="symbol").map(h=>h.id));if(a.size===0)return l.left-=t.length,t;let u=et(e),c=[];for(let h of t){if(l.left<=0)break;let m=h.connector;if(h.kind==="connector"&&m&&[m.start.elementID,m.end.elementID].some(P=>P!==null&&a.has(P))){let[P,b]=lt(h,u),M=G(h);m.start.elementID!==null&&a.has(m.start.elementID)&&(M.connector.start={elementID:null,port:m.start.port,x:P.x,y:P.y}),m.end.elementID!==null&&a.has(m.end.elementID)&&(M.connector.end={elementID:null,port:m.end.port,x:b.x,y:b.y}),c.push(M),l.left-=1;continue}if(h.kind!=="symbol"){c.push(h),l.left-=1;continue}l.left-=1;let d=h.symbol,p=d===null?void 0:i.get(d);if(d===null||!p||o.includes(d)||o.length>=zo)continue;let f=o.length===0?s.get(h.id):void 0,y=f!==void 0?Math.min(Math.max(f,0),z(p.timeline?.duration??0)):Bo(p,n,h.playback,h.offset),x=Zo(No(p,h.args)),w=r?Ct(x,y):x,g=new Set(w.layers.filter(P=>P.visible).map(P=>P.id)),k={...w,elements:st(w).filter(P=>g.has(P.layerID)),layers:[{id:h.layerID,name:"",visible:!0,locked:!1}]};for(let P of Ri(k.elements,k,y,i,[...o,d],r,l))c.push(Xo(P,h,p))}return c}function Xo(t,e,n){let i={x:e.x,y:e.y,width:e.width,height:e.height},o=i.width/n.width,r=i.height/n.height,l=Math.sqrt(Math.abs(o*r)),s={x:i.x+i.width/2,y:i.y+i.height/2},a=Z(e),u=d=>mt({x:i.x+d.x*o,y:i.y+d.y*r},s,a),c=G(t);c.id=an(e.id,t.id),c.layerID=e.layerID,c.groupID=null,c.link=t.link===null?null:an(e.id,t.link),c.seed=ye(t.seed,e.seed),c.click=null,c.hover=null;let h={x:i.x+t.x*o,y:i.y+t.y*r,width:t.width*o,height:t.height*r},m=mt({x:h.x+h.width/2,y:h.y+h.height/2},s,a);if(c.x=m.x-h.width/2,c.y=m.y-h.height/2,c.width=h.width,c.height=h.height,(a!==0||t.rotation!==null)&&(c.rotation=Z(t)+a),c.style.strokeWidth=t.style.strokeWidth*l,c.style.fontSize=t.style.fontSize*l,t.style.gridSize!==null&&(c.style.gridSize=t.style.gridSize*l),e.style.opacity!==null&&(c.style.opacity=(t.style.opacity??1)*e.style.opacity),t.connector){let d=p=>{if(p.elementID!==null)return{elementID:an(e.id,p.elementID),port:p.port,x:p.x,y:p.y};let f=u(p);return{elementID:null,port:p.port,x:f.x,y:f.y}};c.connector={...t.connector,start:d(t.connector.start),end:d(t.connector.end),waypoints:t.connector.waypoints?.map(u)??null}}return c}var ln=(1n<<64n)-1n;function Ht(t){let e=t+0x9e3779b97f4a7c15n&ln;return e=(e^e>>30n)*0xbf58476d1ce4e5b9n&ln,e=(e^e>>27n)*0x94d049bb133111ebn&ln,e^e>>31n}function Mi(t){let e=t.replace(/-/g,"").padStart(32,"0").slice(-32);return[BigInt(`0x${e.slice(0,16)}`),BigInt(`0x${e.slice(16)}`)]}function an(t,e){let[n,i]=Mi(t),[o,r]=Mi(e),l=Ht(Ht(Ht(Ht(n)^i)^o)^r),s=Ht(l^0x6a09e667f3bcc909n),a=l.toString(16).padStart(16,"0")+s.toString(16).padStart(16,"0");return`${a.slice(0,8)}-${a.slice(8,12)}-${a.slice(12,16)}-${a.slice(16,20)}-${a.slice(20)}`.toUpperCase()}function Uo(t,e){let n=e.findIndex(i=>i.name===t);return n>=0?n:e.findIndex(i=>i.name.toLowerCase()===t.toLowerCase())}function vi(t,e){let n=t.timeline?.markers??[],i=new Map,o=null;for(let r of t.elements){let l=r.click,s=l&&Tn(l)?{...l.set?{set:l.set}:{},...l.toggle?{toggle:l.toggle}:{}}:null;if(l?.scene){let u=Uo(l.scene,n);if(u>=0){i.set(r.id,{scene:u,...s});continue}}let a=(l?.url?kt(l.url):null)??$t(r.url);if(a){i.set(r.id,{url:a,...s});continue}if(s){i.set(r.id,{state:!0,...s});continue}if(r.link&&e&&e.pages.length>1){o||(o=new Map,e.pages.forEach((c,h)=>{for(let m of c.elements)o.has(m.id)||o.set(m.id,h)}));let u=o.get(r.link);u!==void 0&&e.pages[u]!==t&&i.set(r.id,{page:u})}}return i}function jo(t){let e=t.hover;if(!e)return t;let n={...t.style};if(e.stroke&&(n.stroke=e.stroke),e.fill&&(n.fill=e.fill),e.opacity!==null&&Number.isFinite(e.opacity)){let i=Math.min(Math.max(e.opacity,0),1);n.opacity=i>=1?null:i}return{...t,style:n}}function Ti(t,e){return{...t,elements:t.elements.map(n=>e.has(n.id)?jo(n):n)}}function Ai(t){return!!t.hover&&(t.hover.stroke!==null||t.hover.fill!==null||t.hover.opacity!==null)}function Si(t,e){let n=(t.text??"").split(`
|
|
3
|
+
`).find(i=>i.length>0);return n||(t.anchor?t.anchor:e||t.kind)}function Ei(t,e){let n=new Map;for(let i of t.elements){if(!e.has(i.id)||i.kind!=="symbol")continue;let o={...t,layers:[{id:i.layerID,name:"",visible:!0,locked:!1}],elements:[i]};for(let r of _(o,0,!1).elements)n.set(r.id,i.id)}return n}var Ii=`
|
|
4
4
|
.dottie-a { cursor: pointer; outline: none; }
|
|
5
5
|
.dottie-a .dottie-h { display: none; }
|
|
6
6
|
.dottie-a:hover .dottie-h, .dottie-a.dottie-hover .dottie-h, .dottie-a:focus-visible .dottie-h { display: inline; }
|
|
@@ -10,47 +10,47 @@
|
|
|
10
10
|
.dottie-a .dottie-d { display: none; }
|
|
11
11
|
.dottie-b:active .dottie-n, .dottie-b:active .dottie-h, .dottie-b.dottie-press .dottie-n, .dottie-b.dottie-press .dottie-h { display: none; }
|
|
12
12
|
.dottie-b:active .dottie-d, .dottie-b.dottie-press .dottie-d { display: inline; }
|
|
13
|
-
`;function W(t){let e=n=>Math.round(Math.min(Math.max(n,0),1)*255).toString(16).padStart(2,"0");return`#${e(t.r)}${e(t.g)}${e(t.b)}`}function qt(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var
|
|
13
|
+
`;function W(t){let e=n=>Math.round(Math.min(Math.max(n,0),1)*255).toString(16).padStart(2,"0");return`#${e(t.r)}${e(t.g)}${e(t.b)}`}function qt(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var Li=12,Rt="\u2028";function Jo(t){let e=Math.min(Li,t.width/2),n=Math.min(Li,t.height/2);return{x:t.x+e,y:t.y+n,width:t.width-2*e,height:t.height-2*n}}var hn=/^ {0,3}(#{1,6})(?:[ \t]+(.*?))?(?:[ \t]+#+)?[ \t]*$/,Yi=/^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/,fn=/^ {0,3}(`{3,}|~{3,})/,Qt=/^( *)([-*+]|\d{1,9}[.)])([ \t]+|$)(.*)$/,Ae=/^ {0,3}> ?(.*)$/,Ho=/^ *\|? *:?-+:? *(\| *:?-+:? *)*\|? *$/;function un(t){let e=t.trim();return e.startsWith("|")&&(e=e.slice(1)),e.endsWith("|")&&!e.endsWith("\\|")&&(e=e.slice(0,-1)),e.split(/(?<!\\)\|/).map(n=>n.trim())}function Ko(t){return yn(t.replace(/\r\n?/g,`
|
|
14
14
|
`).split(`
|
|
15
|
-
`))}function
|
|
16
|
-
`))}),i=null)};for(;n<t.length;){let r=t[n];if(r.trim()===""){o(),n++;continue}let
|
|
17
|
-
`)});continue}let
|
|
18
|
-
`))}),i=null,n++;continue}if(
|
|
19
|
-
`)){for(r+=Rt,o+=2;t[o]===" ";)o++;continue}if(
|
|
20
|
-
`){for(r=r.replace(/ +$/,""),r+=Rt,o++;t[o]===" ";)o++;continue}if(a=/^(`+)([\s\S]*?[^`])\1(?!`)/.exec(
|
|
21
|
-
`,size:i,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1}]:a.runs,h=[];c.forEach((
|
|
22
|
-
`){
|
|
23
|
-
`&&h[
|
|
24
|
-
`,"").replaceAll(Rt,"");if(g.trim()!==""){let
|
|
25
|
-
`)}let u=R(Math.max(1,e.style.fontSize/14));for(let[c,h,m,
|
|
26
|
-
`;return
|
|
15
|
+
`))}function yn(t){let e=[],n=0,i=null,o=()=>{i&&(e.push({kind:"paragraph",inline:it(i.join(`
|
|
16
|
+
`))}),i=null)};for(;n<t.length;){let r=t[n];if(r.trim()===""){o(),n++;continue}let l=fn.exec(r);if(l){o();let u=new RegExp(`^ {0,3}${l[1][0]==="`"?"`":"~"}{${l[1].length},}[ \\t]*$`),c=[];for(n++;n<t.length&&!u.test(t[n]);)c.push(t[n++]);n++,e.push({kind:"code",text:c.join(`
|
|
17
|
+
`)});continue}let s=hn.exec(r);if(s){o(),e.push({kind:"heading",level:s[1].length,inline:it(s[2]??"")}),n++;continue}if(i&&/^ {0,3}(=+|-+)[ \t]*$/.test(r)){let u=r.trim()[0]==="="?1:2;e.push({kind:"heading",level:u,inline:it(i.join(`
|
|
18
|
+
`))}),i=null,n++;continue}if(Yi.test(r)){o(),e.push({kind:"rule"}),n++;continue}if(Ae.test(r)){o();let u=[];for(;n<t.length&&t[n].trim()!=="";){let c=Ae.exec(t[n]);u.push(c?c[1]:t[n]),n++}e.push({kind:"quote",children:yn(u)});continue}let a=Qt.exec(r);if(a&&(!i||a[4].trim()!=="")){o();let u=qo(t,n);e.push(u.block),n=u.next;continue}if(!i&&r.includes("|")&&n+1<t.length&&Ho.test(t[n+1])&&t[n+1].includes("-")){let u=un(r),c=un(t[n+1]).map(m=>m.startsWith(":")&&m.endsWith(":")?"center":m.endsWith(":")?"right":m.startsWith(":")?"left":null),h=[];for(n+=2;n<t.length&&t[n].trim()!==""&&!hn.test(t[n])&&!Ae.test(t[n])&&!fn.test(t[n]);)h.push(un(t[n]).slice(0,u.length).map(m=>it(m))),n++;e.push({kind:"table",align:c,head:u.map(m=>it(m)),rows:h});continue}i||(i=[]),i.push(r.replace(/^ +/,"")),n++}return o(),e}function qo(t,e){let n=Qt.exec(t[e]),i=n[1].length,o=/^\d/.test(n[2])?null:n[2],r=o===null?parseInt(n[2],10):null,l=[],s=e;for(;s<t.length;){let a=Qt.exec(t[s]);if(!a||a[1].length!==i||o===null!==/^\d/.test(a[2])||o!==null&&a[2]!==o)break;let u=a[1].length+a[2].length+Math.max(1,Math.min(a[3].length,4)),c=[a[4]];s++;let h=!1;for(;s<t.length;){let p=t[s];if(p.trim()===""){h=!0,c.push(""),s++;continue}if(p.length-p.trimStart().length>=u){c.push(p.slice(u)),h=!1,s++;continue}if(!h&&!Qt.test(p)&&!hn.test(p)&&!Ae.test(p)&&!fn.test(p)&&!Yi.test(p)){c.push(p.trimStart()),s++;continue}break}for(;c.length&&c[c.length-1].trim()==="";)c.pop();let m=null,d=/^\[([ xX])\](?:[ \t]+|$)/.exec(c[0]??"");if(d&&(m=d[1]!==" ",c[0]=c[0].slice(d[0].length)),l.push({checkbox:m,children:yn(c)}),h&&s<t.length&&t[s-1]?.trim()===""){let p=Qt.exec(t[s]);if(!p||p[1].length!==i)break}}return{block:{kind:"list",ordered:r,items:l},next:s}}function it(t,e={}){let n=[],i=(s,a)=>{s&&n.push({...a,text:s})},o=0,r="",l=()=>{i(r,e),r=""};for(;o<t.length;){let s=t.slice(o),a;if(s[0]==="\\"&&/^\\[\\`*_{}[\]()#+\-.!|~>]/.test(s)){r+=s[1],o+=2;continue}if(s.startsWith(`\\
|
|
19
|
+
`)){for(r+=Rt,o+=2;t[o]===" ";)o++;continue}if(s[0]===`
|
|
20
|
+
`){for(r=r.replace(/ +$/,""),r+=Rt,o++;t[o]===" ";)o++;continue}if(a=/^(`+)([\s\S]*?[^`])\1(?!`)/.exec(s)){l();let u=a[2].replace(/\n/g," ");/^ .* $/.test(u)&&(u=u.slice(1,-1)),i(u,{...e,mono:!0}),o+=a[0].length;continue}if(a=/^!\[([^\]]*)\]\([^)]*\)/.exec(s)){l(),n.push(...it(a[1],e)),o+=a[0].length;continue}if(a=/^\[([^\]]+)\]\([^)]*\)/.exec(s)){l(),n.push(...it(a[1],{...e,link:!0})),o+=a[0].length;continue}if(a=/^<((?:https?|ftp|mailto):[^>\s]+)>/.exec(s)){l(),i(a[1],{...e,link:!0}),o+=a[0].length;continue}if(a=/^~~(?=\S)([\s\S]*?\S)~~/.exec(s)){l(),n.push(...it(a[1],{...e,strike:!0})),o+=a[0].length;continue}if(a=/^(\*\*|__)(?=\S)([\s\S]*?\S)\1/.exec(s)){l(),n.push(...it(a[2],{...e,bold:!0})),o+=a[0].length;continue}if((a=/^(\*|_)(?=\S)([\s\S]*?\S)\1(?!\1)/.exec(s))&&(a[1]==="*"||!/\w/.test(t[o-1]??""))){l(),n.push(...it(a[2],{...e,italic:!0})),o+=a[0].length;continue}r+=s[0],o++}return l(),Qo(n)}function Qo(t){let e=/\b(?:(?:https?|ftp):\/\/|www\.)[^\s<]*[^\s<.,:;"')\]!?]/g;return t.flatMap(n=>{if(n.link||n.mono||!(n.text.includes("://")||n.text.includes("www.")))return[n];let i=[],o=0;for(let r of n.text.matchAll(e))r.index>o&&i.push({...n,text:n.text.slice(o,r.index)}),i.push({...n,text:r[0],link:!0}),o=r.index+r[0].length;return o<n.text.length&&i.push({...n,text:n.text.slice(o)}),i})}function Ee(t,e){return t.mono?wt[ue]:e}function Se(t,e,n){let i=Ee(e,n);if(e.mono&&i.fallback[t]===void 0)return Dn*e.size;let o=i.faces[Zt(i,e.bold,e.italic)];return(o.w[t]??i.faces.regular.w[t]??o.w.n)*e.size/1e3}function mn(t,e,n,i){return n.mono?0:(i.faces[Zt(i,n.bold,n.italic)].k[t+e]??0)*n.size/1e3}function dn(t,e,n){let i=Ee(e,n).fallback[t];if(i)return[i[0]*e.size,i[1]*e.size,i[2]*e.size];if(e.mono)return[Yn*e.size,On*e.size,0];let o=n.faces[Zt(n,e.bold,e.italic)];return[o.ascent*e.size,o.descent*e.size,o.leading*e.size]}var pn=class{constructor(e,n,i){v(this,"paras",[]);v(this,"nextSpacing",null);v(this,"fontSize");v(this,"width");v(this,"fam");this.fontSize=e,this.width=n,this.fam=i}get gap(){return this.fontSize*.5}spacing(e){return this.paras.length===0?0:this.nextSpacing??e}run(e,n,i,o={}){let r=!!e.mono;return{text:e.text,size:r?n*.9:n,bold:!!(e.bold||o.bold),italic:!!(e.italic||o.italic),mono:r,strike:!!e.strike,underline:!!e.link,alpha:i}}paragraph(e,n){this.paras.push({tabs:[],rule:null,tableRule:null,...e,quote:n}),this.nextSpacing=null}text(e,n,i,o={}){if(n.marker){let r={text:n.marker.text+" ",size:this.fontSize,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1};this.paragraph({runs:[r,...e],spacing:i,firstIndent:n.marker.start,indent:n.marker.hang,tabs:[{align:"left",x:n.marker.hang}],...o},n.quote)}else this.paragraph({runs:e,spacing:i,firstIndent:n.indent,indent:n.indent,...o},n.quote)}block(e,n){let i=n.quote!==null,o=i?.7:1;switch(e.kind){case"heading":{let r=[1.5,1.3,1.15,1.05,1,1][Math.min(Math.max(e.level,1),6)-1];this.text(e.inline.map(l=>this.run(l,this.fontSize*r,o,{bold:!0,italic:i})),n,this.spacing(this.gap*1.4));break}case"paragraph":this.text(e.inline.map(r=>this.run(r,this.fontSize,o,{italic:i})),n,this.spacing(this.gap));break;case"list":{let r=e.items.map((u,c)=>u.checkbox===!0?"\u2611":u.checkbox===!1?"\u2610":e.ordered!==null?`${e.ordered+c}.`:n.listDepth%2===0?"\u2022":"\u25E6"),l=u=>Fi({text:u,size:this.fontSize,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1},this.fam),s=Math.max(0,...r.map(l)),a=n.indent+Math.max(s+this.fontSize*.45,this.fontSize*1.2);e.items.forEach((u,c)=>{(c>0||n.listDepth>0||n.marker)&&(this.nextSpacing=this.fontSize*.15);let h={...n,marker:{text:r[c],start:n.indent,hang:a},indent:a,listDepth:n.listDepth+1};u.children.length===0&&this.text([],h,this.spacing(this.gap));for(let m of u.children)this.block(m,h),h.marker=null,this.nextSpacing=this.fontSize*.3;this.nextSpacing=null});break}case"quote":{let r={...n,quote:n.indent+3,indent:n.indent+this.fontSize};for(let l of e.children)this.block(l,r);break}case"code":{let l={text:e.text===""?" ":e.text.replace(/\n/g,Rt),size:this.fontSize*.85,bold:!1,italic:!1,mono:!0,strike:!1,underline:!1,alpha:o};this.text([l],{...n,indent:n.indent+this.fontSize*.5},this.spacing(this.gap));break}case"rule":{let r={text:" ",size:this.fontSize*.6,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1};this.text([r],n,this.spacing(this.gap),{rule:n.indent});break}case"table":this.table(e,n);break}}table(e,n){let i=[{cells:e.head,header:!0},...e.rows.map(g=>({cells:g,header:!1}))],o=Math.max(1,...i.map(g=>g.cells.length)),r=n.quote!==null,l=(g,k,P)=>g.map(b=>({...this.run({...b,text:b.text.replaceAll(Rt," ")},P,r?.7:1,{bold:k,italic:r})})),s=g=>{let k=new Array(o).fill(0);for(let P of i)P.cells.forEach((b,M)=>{M<o&&(k[M]=Math.max(k[M],l(b,P.header,g).reduce((T,S)=>T+Fi(S,this.fam),0)))});return k},a=Math.max(this.width-n.indent,1),u=this.fontSize,c=s(u),h=u*1.2,m=c.reduce((g,k)=>g+k,0)+h*(o-1);m>a&&(u=Math.max(this.fontSize*a/m,Math.min(this.fontSize,9)),c=s(u),h=u*1.2);let d=[],p=n.indent;for(let g of c)d.push(p),p+=g+h;let f=p-h-n.indent,y=[],x=!1;for(let g=0;g<o;g++){let k=e.align[g]??null;k==="center"?y.push({align:"center",x:d[g]+c[g]/2}):k==="right"?y.push({align:"right",x:d[g]+c[g]}):g>0&&y.push({align:"left",x:d[g]}),g===0&&(k==="center"||k==="right")&&(x=!0)}let w=g=>({text:g,size:u,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1});i.forEach((g,k)=>{let P=[];x&&P.push(w(" "));for(let M=0;M<o;M++)M>0&&P.push(w(" ")),M<g.cells.length&&P.push(...l(g.cells[M],g.header,u));P.length===0&&P.push(w(" "));let b=k===0?this.spacing(this.gap):k===1?u*.45:u*.2;this.paragraph({runs:P,spacing:b,firstIndent:n.indent,indent:n.indent,tabs:y,tableRule:g.header?[n.indent,f]:null},n.quote)})}};function Fi(t,e){let n=0,i="";for(let o of t.text)n+=Se(o,t,e),i&&(n+=mn(i,o,t,e)),i=o;return n}var Ci=28;function _o(t,e,n,i,o){let r=[],l=0,s=null;return t.forEach((a,u)=>{let c=u<t.length-1?[...a.runs,{text:`
|
|
21
|
+
`,size:i,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1}]:a.runs,h=[];c.forEach((p,f)=>{for(let y of p.text)h.push({ch:y,run:f})});let m=0,d=!0;for(;m<h.length||d&&h.length===0;){let p=d?a.firstIndent:a.indent,f=e,y=[],x=p,w=-1,g=m;for(;g<h.length;g++){let{ch:T,run:S}=h[g],O=c[S];if(T===Rt||T===`
|
|
22
|
+
`){y.push({ch:T,run:S,x,w:0}),g++;break}if(T===" "){let B=a.tabs.find(U=>U.x>x+.01),X;if(B)if(B.align==="left")X=B.x;else{let U=0,ot="";for(let D=g+1;D<h.length&&h[D].ch!==" "&&h[D].ch!==`
|
|
23
|
+
`&&h[D].ch!==Rt;D++){let ft=c[h[D].run];U+=Se(h[D].ch,ft,o)+(ot?mn(ot,h[D].ch,ft,o):0),ot=h[D].ch}X=Math.max(x,B.align==="right"?B.x-U:B.x-U/2)}else X=(Math.floor(x/Ci)+1)*Ci;y.push({ch:T,run:S,x,w:X-x}),x=X;continue}let C=y[y.length-1],V=C&&C.run===S&&C.ch!==" "?mn(C.ch,T,O,o):0;C&&(C.w+=V,x+=V);let $=Se(T,O,o);if(T!==" "&&x+$>f+.01&&y.some(B=>B.ch!==" ")){w>=0&&(y.length=w+1,g=m+w+1),C&&(C.w-=V);break}y.push({ch:T,run:S,x,w:$}),x+=$,We(T,h[g+1]?.ch??"")&&(w=y.length-1)}if(y.length===0&&g===m&&m<h.length){let{ch:T,run:S}=h[m];y.push({ch:T,run:S,x:p,w:Se(T,c[S],o)}),g=m+1}let k=0,P=0,b=0;for(let T of y){let[S,O,C]=dn(T.ch,c[T.run],o);k=Math.max(k,S),P=Math.max(P,O),b=Math.max(b,C)}if(y.length===0&&([k,P,b]=dn(" ",c[0]??{text:" ",size:i,bold:!1,italic:!1,mono:!1,strike:!1,underline:!1,alpha:1},o)),l=s?l+Math.round(s.desc)+Math.round(s.lead)+(d?a.spacing:0)+Math.round(k):Math.round(k),l+P>n+.5)return;let M={glyphs:y,asc:k,desc:P,lead:b,baseline:l,para:a,first:d};if(M.glyphs.forEach(T=>{T.r=c[T.run]}),r.push(M),s=M,d=!1,m=g,h.length===0)break}}),r}function Oi(t,e){let n=Jo({x:e.x,y:e.y,width:e.width,height:e.height});if(!(n.width>1&&n.height>1))return"";let i=he(e.style.font),o=new pn(e.style.fontSize,n.width,i);for(let c of Ko(t))o.block(c,{indent:0,marker:null,quote:null,listDepth:0});let r=_o(o.paras,n.width,n.height,e.style.fontSize,i),l=W(e.style.stroke),s="",a=[];for(let c of r){let h=c.para;if(h.quote!==null&&a.push([n.x+h.quote,n.y+c.baseline-c.asc,n.x+h.quote,n.y+c.baseline+c.desc]),h.rule!==null&&a.push([n.x+h.rule,n.y+c.baseline-3,n.x+n.width,n.y+c.baseline-3]),h.tableRule){let f=n.y+c.baseline+c.desc+2;a.push([n.x+h.tableRule[0],f,Math.min(n.x+n.width,n.x+h.tableRule[0]+h.tableRule[1]),f])}let m="",d=0,p=c.glyphs;for(;d<p.length;){let f=p[d].r,y=d,x="",w=Di(p[d].ch,Ee(f,i));for(;y<p.length&&tr(p[y].r,f)&&p[y].ch!==" "&&Di(p[y].ch,Ee(f,i))===w;)x+=p[y].ch,y++;let g=x.replaceAll(`
|
|
24
|
+
`,"").replaceAll(Rt,"");if(g.trim()!==""){let k=`font-size="${R(f.size)}"`;f.mono&&(k+=' font-family="Menlo, Consolas, monospace"');let P=f.mono?"regular":Zt(i,f.bold,f.italic);(f.mono?f.bold:P==="bold"||P==="boldItalic")&&(k+=' font-weight="bold"'),(f.mono?f.italic:P==="italic"||P==="boldItalic")&&(k+=' font-style="italic"'),f.underline&&(k+=' text-decoration="underline"'),f.alpha<1&&(k+=` fill-opacity="${R(f.alpha*e.style.stroke.a)}"`),m+=`<tspan x="${R(n.x+p[d].x)}" ${k}>${qt(g)}</tspan>`}if(f.strike&&y>d){let k=c.baseline-dn(p[d].ch,f,i)[0]*.32;a.push([n.x+p[d].x,n.y+k,n.x+p[y-1].x+p[y-1].w,n.y+k])}y===d&&y++,d=y}m&&(s+=`<text y="${R(n.y+c.baseline)}" font-family="${fe(e.style.font)}" fill="${l}" xml:space="preserve">${m}</text>
|
|
25
|
+
`)}let u=R(Math.max(1,e.style.fontSize/14));for(let[c,h,m,d]of a)s+=`<line x1="${R(c)}" y1="${R(h)}" x2="${R(m)}" y2="${R(d)}" stroke="${l}" stroke-width="${u}"/>
|
|
26
|
+
`;return s}function Di(t,e){return e.fallback[t]?`fb:${t}`:""}function tr(t,e){return t===e||t.size===e.size&&t.bold===e.bold&&t.italic===e.italic&&t.mono===e.mono&&t.strike===e.strike&&t.underline===e.underline&&t.alpha===e.alpha}var J=(t,e,n)=>({r:t,g:e,b:n,a:1}),gn=[{id:"paper",name:"Paper",background:J(.984,.98,.965),ink:J(.12,.12,.13)},{id:"white",name:"White",background:J(1,1,1),ink:J(.12,.12,.13)},{id:"sepia",name:"Sepia",background:J(.953,.914,.824),ink:J(.23,.18,.13)},{id:"blueprint",name:"Blueprint",background:J(.106,.227,.361),ink:J(.91,.945,.984)},{id:"chalkboard",name:"Chalkboard",background:J(.169,.227,.2),ink:J(.945,.945,.918)},{id:"midnight",name:"Midnight",background:J(.082,.086,.102),ink:J(.925,.925,.94)}];function vt(t){return gn.find(e=>e.id===t)??null}function ht(t,e=24){if(Te(t))return ht(_(t,0),e);let n=et(t),i=l=>{if(l.kind==="connector")return Kn(l,n);let s=qe(l)?(Ke+.25)*Pt(l):0;return Lt(Zn(l),-s,-s)};if(t.elements.length===0)return{x:0,y:0,width:200,height:200};let o=t.elements.filter(l=>(l.style.opacity??1)>0),r=null;for(let l of o.length?o:t.elements)r=Be(r,i(l));return Lt(r,-e,-e)}function Yt(t){let e=t.timeline??{fps:12,duration:0,boil:null,settle:null,poster:null,tracks:[],camera:null,markers:null},n=Re(e),i=e.camera?.find(r=>r.width>1&&r.height>1);if(i){let r=i.width/i.height,l=n.map(a=>Dt(e,a)??{x:i.x,y:i.y,width:i.width,height:i.height}),s=Math.min(Math.max(...l.map(a=>a.width)),4096);return{times:n,rects:l,size:{width:s,height:s/r}}}let o=null;for(let r of n){let l=nt(t,r);l.elements.length>0&&(o=Be(o,ht(l)))}return o||(o=ht(nt(t,n[0]))),{times:n,rects:n.map(()=>o),size:{width:o.width,height:o.height}}}var _t=(t,e)=>t.a<1?` ${e}="${R(t.a)}"`:"";function er(t,e,n){let i=`<svg xmlns="http://www.w3.org/2000/svg" width="${R(t.width)}" height="${R(t.height)}" viewBox="${R(t.x)} ${R(t.y)} ${R(t.width)} ${R(t.height)}">
|
|
27
27
|
`;return n&&e&&(i+=`<rect x="${R(t.x)}" y="${R(t.y)}" width="${R(t.width)}" height="${R(t.height)}" fill="${W(e)}"/>
|
|
28
|
-
`),i}function gt(t,e,n,i=!1){if(
|
|
29
|
-
`).join("");
|
|
30
|
-
${
|
|
31
|
-
`),
|
|
32
|
-
${
|
|
33
|
-
`);let
|
|
34
|
-
${
|
|
35
|
-
`),c.push({key:
|
|
36
|
-
`}function
|
|
28
|
+
`),i}function gt(t,e,n,i=!1){if(Te(t))return gt(_(t,0),e,n,i);let o=vt(t.theme),r=e?o?.background??e:null,l=o?.ink??xt,s={...t,elements:t.elements.map(f=>Xn(f,l))},a=n??ht(s),u=new Set(s.layers.filter(f=>f.visible).map(f=>f.id)),c=[],h=et(s),m=st(s),d=m.filter(f=>u.has(f.layerID)&&qe(f)),p=ci(d).map(f=>`<path d="${f.path.data()}" fill="none" stroke="${W(f.ink)}"${_t(f.ink,"stroke-opacity")} stroke-width="${R(f.width)}" stroke-linecap="round"/>
|
|
29
|
+
`).join("");p&&c.push({key:"rock",markup:p});for(let f of m){if(!u.has(f.layerID))continue;let y=Math.min(Math.max(f.style.opacity??1,0),1);if(y<=0)continue;let x=rr(f,h,r,s);Z(f)!==0&&f.kind!=="connector"&&(x=`<g transform="rotate(${R(Z(f)*180/Math.PI)} ${R(q(Y(f)))} ${R(Q(Y(f)))})">
|
|
30
|
+
${x}</g>
|
|
31
|
+
`),y<1&&(x=`<g opacity="${R(y)}">
|
|
32
|
+
${x}</g>
|
|
33
|
+
`);let w=i?(f.click?.url?kt(f.click.url):null)??$t(f.url):null;w&&(x=`<a href="${qt(w).replace(/"/g,""")}" target="_blank">
|
|
34
|
+
${x}</a>
|
|
35
|
+
`),c.push({key:f.id,markup:x})}return{bounds:a,parts:c}}function Le(t,e={r:1,g:1,b:1,a:1},n){let{bounds:i,parts:o}=gt(t,e,n,!0);return er(i,vt(t.theme)?.background??e,e!==null)+o.map(r=>r.markup).join("")+`</svg>
|
|
36
|
+
`}function nr(t,e){let n=qn(t,e),i=t.text??"",o=Wn(i===""?"Label":i,t.style.fontSize,200,t.style.font),r=Math.max(o.width+12,44),l=o.height+6;return{x:n.x-r/2,y:n.y-l/2,width:r,height:l}}function ir(t,e){let n=[...t];return n.slice(0,Math.floor(n.length*e)).join("")}function or(t){return t.reveal!==null&&t.reveal<1?Math.max(0,t.reveal):null}function rr(t,e,n,i){let o=W(t.style.stroke),r=`stroke="${o}" stroke-width="${R(t.style.strokeWidth)}" stroke-linecap="round" stroke-linejoin="round"`,l=Pe(t.style.dash,t.style.strokeWidth);l&&(r+=` stroke-dasharray="${l.map(R).join(" ")}"`),l&&t.style.dashOffset!==null&&R(t.style.dashOffset)!=="0"&&(r+=` stroke-dashoffset="${R(t.style.dashOffset)}"`);let s=t.text,a=or(t);if(a!==null)if(t.kind==="text")s=ir(s??"",a);else return t.kind==="connector"?`<path d="${en(t,e,i)[0].trimmed(a).data()}" fill="none" ${r}/>
|
|
37
37
|
`:`<path d="${Mt(t).trimmed(a).data()}" fill="none" ${r}/>
|
|
38
|
-
`;switch(t.kind){case"connector":{let[u,c]=
|
|
38
|
+
`;switch(t.kind){case"connector":{let[u,c]=en(t,e,i),h=`<path d="${u.data()}" fill="none" ${r}/>
|
|
39
39
|
`;if(c.isEmpty||(h+=`<path d="${c.data()}" fill="${o}" stroke="none"/>
|
|
40
|
-
`),
|
|
41
|
-
`),h+=
|
|
40
|
+
`),s){let m=nr(t,e);n&&(h+=`<rect x="${R(m.x)}" y="${R(m.y)}" width="${R(m.width)}" height="${R(m.height)}" fill="${W(n)}"/>
|
|
41
|
+
`),h+=Ie(s,m,t,!0)}return h}case"text":return Ie(s??"",Y(t),t,!1);case"image":{let u=Y(t),c="";if(t.image){let h=t.image.format==="jpeg"?"image/jpeg":"image/png";c+=`<image x="${R(u.x)}" y="${R(u.y)}" width="${R(u.width)}" height="${R(u.height)}" preserveAspectRatio="none" href="data:${h};base64,${t.image.data}"/>
|
|
42
42
|
`}return t.style.stroke.a>0&&t.style.strokeWidth>0&&(c+=`<path d="${Mt(t).data()}" fill="none" ${r}/>
|
|
43
43
|
`),c}case"freehand":return`<path d="${Mt(t).data()}" fill="none" ${r}/>
|
|
44
|
-
`;case"rectangle":case"ellipse":case"diamond":case"path":case"note":{let u="";if(t.kind==="note"&&t.style.fill.a>0&&(u+=`<path d="${
|
|
45
|
-
`),t.style.fill.a>0){let c=t.evenOdd===!0?' fill-rule="evenodd"':"";if(t.style.fillStyle==="solid")u+=`<path d="${
|
|
46
|
-
`;else if(t.style.fillStyle==="grid"){let h=
|
|
47
|
-
`,u+=`<path d="${
|
|
48
|
-
`}else u+=`<path d="${
|
|
44
|
+
`;case"rectangle":case"ellipse":case"diamond":case"path":case"note":{let u="";if(t.kind==="note"&&t.style.fill.a>0&&(u+=`<path d="${we(t).translated(2,3).data()}" fill="#000000" fill-opacity="${R(.14*t.style.fill.a)}" stroke="none"/>
|
|
45
|
+
`),t.style.fill.a>0){let c=t.evenOdd===!0?' fill-rule="evenodd"':"";if(t.style.fillStyle==="solid")u+=`<path d="${we(t).data()}" fill="${W(t.style.fill)}"${_t(t.style.fill,"fill-opacity")}${c} stroke="none"/>
|
|
46
|
+
`;else if(t.style.fillStyle==="grid"){let h=li(t.style.fill);u+=`<path d="${we(t).data()}" fill="${W(t.style.fill)}"${_t(t.style.fill,"fill-opacity")}${c} stroke="none"/>
|
|
47
|
+
`,u+=`<path d="${tn(t).data()}" fill="none" stroke="${W(h)}"${_t(h,"stroke-opacity")} stroke-width="1" stroke-linecap="round"/>
|
|
48
|
+
`}else u+=`<path d="${tn(t).data()}" fill="none" stroke="${W(t.style.fill)}"${_t(t.style.fill,"stroke-opacity")} stroke-width="${R(Math.max(1,t.style.strokeWidth/2))}" stroke-linecap="round"/>
|
|
49
49
|
`}return u+=`<path d="${Mt(t).data()}" fill="none" ${r}/>
|
|
50
|
-
`,
|
|
51
|
-
`+
|
|
52
|
-
`),
|
|
53
|
-
`}var
|
|
50
|
+
`,s&&(u+=t.kind==="note"?Oi(s,t):Ie(s,t.kind==="path"?lr(t):Y(t),t,!0)),u}default:return sr(t,r)}}function sr(t,e){let n=Y(t);return`<path d="${I.rect(n).moveTo({x:n.x,y:n.y}).lineTo({x:n.x+n.width,y:n.y+n.height}).data()}" fill="none" ${e} stroke-opacity="0.5" stroke-dasharray="6 4"/>
|
|
51
|
+
`+Ie(`${t.kind}${t.text?`: ${t.text}`:""}`,n,{...t,style:{...t.style,fontSize:Math.min(t.style.fontSize,12)}},!0)}function lr(t){let e=Y(t),n=t.labelRect;return n?{x:e.x+n.x*e.width,y:e.y+n.y*e.height,width:n.width*e.width,height:n.height*e.height}:e}function Ie(t,e,n,i){let o=n.style.fontSize,r=t.split(`
|
|
52
|
+
`),l=o*1.2,s=l*r.length,a=i?q(e):e.x,u=i?Q(e)-s/2:e.y,c=`<text x="${R(a)}" font-family="${fe(n.style.font)}" font-size="${R(o)}" fill="${W(Un(n))}"${i?' text-anchor="middle"':""}>`;return r.forEach((h,m)=>{c+=`<tspan x="${R(a)}" y="${R(u+l*(m+.8))}">${qt(h)}</tspan>`}),c+`</text>
|
|
53
|
+
`}var ar={r:1,g:1,b:1,a:1};function ee(t,e){let n=(e??"").trim();if(!n)return 0;let i=t.pages.findIndex(r=>r.name.toLowerCase()===n.toLowerCase());if(i>=0)return i;let o=Number(n);return Number.isInteger(o)&&o>=1&&o<=t.pages.length?o-1:0}function ne(t,e){return{...t,elements:t.elements.map(n=>({...n,style:{...n.style,roughness:e}}))}}var cr=`
|
|
54
54
|
:host { display: block; position: relative; color: var(--dottie-ink); background: var(--dottie-page);
|
|
55
55
|
font: 14px -apple-system, system-ui, sans-serif; border-radius: var(--dottie-radius, 0); }
|
|
56
56
|
:host([hidden]) { display: none; }
|
|
@@ -65,16 +65,16 @@ input[type=range] { flex: 1; min-width: 60px; accent-color: currentColor; }
|
|
|
65
65
|
output { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
|
|
66
66
|
.scene { min-width: 0; flex: 0 1 auto; text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
67
67
|
.error { padding: 16px; font-family: ui-monospace, Menlo, monospace; white-space: pre-wrap; }
|
|
68
|
-
${
|
|
68
|
+
${Ii}`,te=class{constructor(e,n,i={}){v(this,"page");v(this,"plan");v(this,"scenes");v(this,"sceneNames");v(this,"sceneLoops");v(this,"state");v(this,"background");v(this,"ink");v(this,"clicks");v(this,"replays",new Map);v(this,"replayStarts",new Map);v(this,"hoverIDs");v(this,"labels",new Map);v(this,"owner",new Map);v(this,"partsOfOwner",new Map);v(this,"overTimes",new Map);v(this,"downTimes",new Map);v(this,"hitTimes",new Map);v(this,"last",{t:0,i:0});v(this,"svg");v(this,"groups",new Map);v(this,"order",[]);v(this,"frame",-1);v(this,"onFrame",null);this.page=i.clean?ne(e,0):e,de(me(this.page)),this.plan=Yt(this.page),this.clicks=vi(e,i.file);let o=cn(this.page);for(let c of this.page.elements){let h=c.kind==="symbol"&&c.symbol!==null?o.get(c.symbol):void 0;if(h)if(h.button===!0)for(let[m,d]of[["over",this.overTimes],["down",this.downTimes],["hit",this.hitTimes]]){let p=Kt(h,m);p!==null&&d.set(c.id,p)}else c.playback==="click"&&(h.timeline?.duration??0)>0&&this.replays.set(c.id,h.timeline.duration)}let r=new Set([...this.clicks.keys(),...this.replays.keys()]);this.hoverIDs=new Set(this.page.elements.filter(c=>r.has(c.id)&&c.kind!=="symbol"&&Ai(c)).map(c=>c.id));let l=new Set(this.page.elements.filter(c=>r.has(c.id)&&c.kind==="symbol").map(c=>c.id));for(let c of this.page.elements)r.has(c.id)&&(this.labels.set(c.id,Si(c,c.symbol!==null?o.get(c.symbol)?.name:void 0)),c.kind!=="symbol"&&this.owner.set(c.id,c.id));for(let[c,h]of Ei(this.page,l))this.owner.set(c,h);for(let[c,h]of this.owner)this.partsOfOwner.set(h,[...this.partsOfOwner.get(h)??[],c]);let s=c=>{let h=0;return this.plan.times.forEach((m,d)=>{Math.abs(m-c)<Math.abs(this.plan.times[h]-c)&&(h=d)}),h};this.scenes=(e.timeline?.markers??[]).map(c=>s(c.t)),this.sceneNames=(e.timeline?.markers??[]).map(c=>c.name),this.sceneLoops=(e.timeline?.markers??[]).map(c=>c.loop===!0),this.state={...e.variables??{}};let a=vt(e.theme);this.background=a?.background??ar,this.ink=a?.ink??{r:.12,g:.12,b:.13,a:1};let u="http://www.w3.org/2000/svg";this.svg=document.createElementNS(u,"svg"),this.svg.setAttribute("width",R(this.plan.size.width)),this.svg.setAttribute("height",R(this.plan.size.height)),this.svg.style.maxWidth=`${Math.ceil(this.plan.size.width)}px`,n.replaceChildren(this.svg)}get frameCount(){return this.plan.times.length}get posterFrame(){let e=yt(this.page),n=0;return this.plan.times.forEach((i,o)=>{Math.abs(i-e)<Math.abs(this.plan.times[n]-e)&&(n=o)}),n}show(e){let n=this.frameCount;e=(e%n+n)%n,this.drawAt(this.plan.times[e],e),this.frame=e,this.onFrame?.(e)}replay(e,n){this.replays.has(e)&&this.replayStarts.set(e,n)}replaying(e=performance.now()){for(let[n,i]of this.replayStarts)if(e-i<(this.replays.get(n)??0)*1e3)return!0;return!1}redraw(){this.drawAt(this.last.t,this.last.i)}drawAt(e,n=0){this.last={t:e,i:n};let i=this.plan.rects[Math.min(n,this.plan.rects.length-1)],o=typeof performance>"u"?0:performance.now(),r=new Map;for(let[b,M]of this.replayStarts)r.set(b,Math.min((o-M)/1e3,this.replays.get(b)??0));let l=z(e),s=Ct(this.page,l,this.state),a=_(s,l,!0,r),{parts:u}=gt(a,this.background,i),c=(b,M)=>{for(let T of M)this.owner.has(T.key)&&b.set(T.key,T.markup);return b},h=b=>b.size===0?new Map:c(new Map,gt(_(s,l,!0,new Map([...r,...b])),this.background,i).parts.filter(M=>b.has(this.owner.get(M.key)??""))),m=this.hoverIDs.size===0?new Map:c(new Map,gt(Ti(a,this.hoverIDs),this.background,i).parts.filter(b=>this.hoverIDs.has(b.key))),d=h(this.overTimes),p=h(this.downTimes),f=h(this.hitTimes),y=c(new Map,u),x=[],w=new Set;for(let b of u){let M=this.owner.get(b.key);if(M===void 0){x.push(b);continue}w.has(M)||(w.add(M),x.push(this.buttonPart(M,y,m,d,p,f,s)))}this.svg.setAttribute("viewBox",`${R(i.x)} ${R(i.y)} ${R(i.width)} ${R(i.height)}`);let g="http://www.w3.org/2000/svg",k=x.map(b=>b.key);for(let b of x){let M=b.markup,T=this.groups.get(b.key);if(T)T.markup!==M&&(T.g.innerHTML=M,T.markup=M),b.button!==void 0&&T.g.classList.toggle("dottie-b",b.button);else{let S=document.createElementNS(g,"g");S.innerHTML=M,b.button!==void 0&&(S.setAttribute("class",b.button?"dottie-a dottie-b":"dottie-a"),S.setAttribute("data-a",b.key),S.setAttribute("tabindex","0"),S.setAttribute("role","button"),S.setAttribute("aria-label",this.labels.get(b.key)??"")),this.groups.set(b.key,{g:S,markup:M})}}let P=new Set(k);for(let[b,M]of this.groups)P.has(b)||(M.g.remove(),this.groups.delete(b));if(k.length!==this.order.length||k.some((b,M)=>b!==this.order[M])){let b=this.svg.firstChild;for(let M of k){let T=this.groups.get(M).g;T===b?b=b.nextSibling:this.svg.insertBefore(T,b)}for(;b;){let M=b.nextSibling;b.remove(),b=M}this.order=k}}buttonPart(e,n,i,o,r,l,s){let a=this.partsOfOwner.get(e)??[e],u=w=>{let g=a.map(k=>w.get(k)??"").join("");return g===""?null:g},c=u(n)??"",h=s.elements.find(w=>w.id===e&&w.kind==="symbol"),m=u(h?o:i),d=h?u(r):null,p=m!==null&&m!==c?m:null,f=d!==null&&d!==(m??c)?d:null;if(!h&&p===null)return{key:e,markup:c,button:!1};let y=h?' pointer-events="none"':"",x=`<g class="dottie-n"${y}>
|
|
69
69
|
${c}</g>
|
|
70
|
-
`;if(
|
|
71
|
-
${d}</g>
|
|
72
|
-
`),p!==null&&(b+=`<g class="dottie-d"${x}>
|
|
70
|
+
`;if(p!==null&&(x+=`<g class="dottie-h"${y}>
|
|
73
71
|
${p}</g>
|
|
74
|
-
`),
|
|
75
|
-
${
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
`),f!==null&&(x+=`<g class="dottie-d"${y}>
|
|
73
|
+
${f}</g>
|
|
74
|
+
`),h){let w=u(l);if(w!==null)x+=`<g class="dottie-hit" opacity="0" pointer-events="all">
|
|
75
|
+
${w}</g>
|
|
76
|
+
`;else{let g={x:h.x+h.width/2,y:h.y+h.height/2},k=h.rotation??0,P=[[h.x,h.y],[h.x+h.width,h.y],[h.x+h.width,h.y+h.height],[h.x,h.y+h.height]].map(([M,T])=>mt({x:M,y:T},g,k)),b=new I().moveTo(P[0]).lineTo(P[1]).lineTo(P[2]).lineTo(P[3]).close();x+=`<path class="dottie-hit" d="${b.data()}" fill="none" stroke="none" pointer-events="all"/>
|
|
77
|
+
`}}return{key:e,markup:x,button:f!==null}}sceneAt(e){let n=-1;return this.scenes.forEach((i,o)=>{i<=e&&(n=o)}),n}sceneEnd(e){return this.scenes.find((n,i)=>i>e&&n>this.scenes[e])??this.frameCount}step(e,n){let i=e+1,o=this.sceneAt(e);if(o>=0&&this.sceneLoops[o]&&i>=this.sceneEnd(o))return{frame:this.scenes[o],stop:!1};if(i>=this.frameCount)return{frame:0,stop:!n||this.scenes.length>0};let r=this.scenes.indexOf(i);return{frame:i,stop:r>=0&&!this.sceneLoops[r]}}},ur=typeof HTMLElement>"u"?class{}:HTMLElement,Ot=class extends ur{constructor(){super();v(this,"file",null);v(this,"playback",null);v(this,"root");v(this,"stage");v(this,"bar");v(this,"playButton");v(this,"scrub");v(this,"time");v(this,"sceneLabel");v(this,"prev");v(this,"next");v(this,"playing",!1);v(this,"last",0);v(this,"acc",0);v(this,"raf",0);v(this,"replayRaf",0);v(this,"loadToken",0);v(this,"visible",!0);v(this,"observer",null);this.root=this.attachShadow({mode:"open"}),this.root.innerHTML=`<style>${cr}</style><div class="stage" part="stage" role="img"></div>
|
|
78
78
|
<div class="bar" part="controls" hidden>
|
|
79
79
|
<button class="play" aria-label="Play">\u25B6</button>
|
|
80
80
|
<button class="prev" aria-label="Previous scene" hidden>\u23EE</button>
|
|
@@ -82,4 +82,4 @@ ${k}</g>
|
|
|
82
82
|
<button class="next" aria-label="Next scene" hidden>\u23ED</button>
|
|
83
83
|
<input class="scrub" type="range" min="0" max="0" value="0" aria-label="Frame">
|
|
84
84
|
<output class="time">0.0s</output>
|
|
85
|
-
</div>`;let n=i=>this.root.querySelector(i);this.stage=n(".stage"),this.bar=n(".bar"),this.playButton=n(".play"),this.scrub=n(".scrub"),this.time=n(".time"),this.sceneLabel=n(".scene"),this.prev=n(".prev"),this.next=n(".next"),this.playButton.onclick=()=>{let i=this.playback;i&&!this.playing&&i.scenes.length&&i.frame>=i.frameCount-1&&i.show(0),this.setPlaying(!this.playing)},this.scrub.oninput=()=>{this.setPlaying(!1),this.playback?.show(Number(this.scrub.value))},this.next.onclick=()=>this.nextScene(),this.prev.onclick=()=>this.prevScene(),this.stage.addEventListener("click",i=>{let o=
|
|
85
|
+
</div>`;let n=i=>this.root.querySelector(i);this.stage=n(".stage"),this.bar=n(".bar"),this.playButton=n(".play"),this.scrub=n(".scrub"),this.time=n(".time"),this.sceneLabel=n(".scene"),this.prev=n(".prev"),this.next=n(".next"),this.playButton.onclick=()=>{let i=this.playback;i&&!this.playing&&i.scenes.length&&i.frame>=i.frameCount-1&&i.show(0),this.setPlaying(!this.playing)},this.scrub.oninput=()=>{this.setPlaying(!1),this.playback?.show(Number(this.scrub.value))},this.next.onclick=()=>this.nextScene(),this.prev.onclick=()=>this.prevScene(),this.stage.addEventListener("click",i=>{let o=Vi(i.target);o&&this.activate(o.getAttribute("data-a")??"")}),this.addEventListener("keydown",i=>this.key(i))}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),"IntersectionObserver"in window&&(this.observer=new IntersectionObserver(n=>{this.visible=n.some(i=>i.isIntersecting),this.schedule()}),this.observer.observe(this)),this.load()}disconnectedCallback(){cancelAnimationFrame(this.raf),this.raf=0,this.observer?.disconnect()}attributeChangedCallback(n,i,o){i===o||!this.isConnected||(n==="src"?this.load():n==="label"?this.stage.setAttribute("aria-label",o??""):this.file&&this.mount())}async load(){let n=++this.loadToken;try{let i,o=this.getAttribute("src");if(o){let r=await fetch(o);if(!r.ok)throw new Error(`${o}: ${r.status} ${r.statusText}`);i=await r.text()}else{let r=this.querySelector('script[type="application/json"], script[type="application/vnd.dottie+json"]');if(!r)return;i=r.textContent??""}if(n!==this.loadToken)return;this.setFile(zt(i))}catch(i){if(n!==this.loadToken)return;this.stage.innerHTML="";let o=document.createElement("div");o.className="error",o.textContent=`Couldn't show this drawing: ${i.message}`,this.stage.append(o),this.dispatchEvent(new CustomEvent("error",{detail:i}))}}setFile(n){this.file=n;for(let i of n.warnings)console.warn(`dottie-player: ${i}`);this.mount(),this.dispatchEvent(new CustomEvent("load",{detail:{file:n}}))}mount(){let n=this.file,i=n.pages[ee(n,this.getAttribute("page"))],o=new te(i,this.stage,{clean:this.hasAttribute("clean"),file:n});this.playback=o,this.style.setProperty("--dottie-page",W(o.background)),this.style.setProperty("--dottie-ink",W(o.ink)),this.style.colorScheme=Et(o.background)<.5?"dark":"light",this.stage.setAttribute("aria-label",this.getAttribute("label")??i.name);let r=this.getAttribute("at"),l=i.timeline!==null&&o.frameCount>1&&r===null;this.bar.hidden=!l||this.hasAttribute("no-controls");let s=o.scenes.length>0;if(this.prev.hidden=this.next.hidden=this.sceneLabel.hidden=!s,this.scrub.max=String(o.frameCount-1),o.onFrame=u=>{if(this.scrub.value=String(u),this.time.textContent=`${o.plan.times[u].toFixed(1)}s`,s){let c=o.sceneAt(u);this.sceneLabel.textContent=c<0?"":o.sceneNames[c]}this.dispatchEvent(new CustomEvent("frame",{detail:{frame:u,time:o.plan.times[u]}}))},!l){o.drawAt(r!==null?Number(r)||0:yt(i),r!==null?Wi(o,Number(r)||0):o.posterFrame),this.setPlaying(!1);return}if(o.show(0),typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches){o.show(o.posterFrame),this.setPlaying(!1);return}this.setPlaying(!this.hasAttribute("no-autoplay")&&(!o.scenes.includes(0)||o.sceneLoops[o.scenes.indexOf(0)]))}get paused(){return!this.playing}get currentTime(){let n=this.playback;return n&&n.frame>=0?n.plan.times[n.frame]:0}set currentTime(n){let i=this.playback;i&&(this.setPlaying(!1),i.show(Wi(i,n)))}get duration(){return this.playback?.page.timeline?.duration??0}play(){this.setPlaying(!0)}pause(){this.setPlaying(!1)}nextScene(){let n=this.playback;if(!n)return;let i=n.sceneAt(n.frame);i>=0&&n.sceneLoops[i]?n.show(i+1<n.scenes.length?n.scenes[i+1]:0):n.frame>=n.frameCount-1&&n.show(0),this.setPlaying(!0)}prevScene(){let n=this.playback;if(!n)return;let i=n.sceneAt(n.frame);i>=0&&n.scenes[i]===n.frame&&(i-=1),this.setPlaying(!1),n.show(i>=0?n.scenes[i]:0)}activate(n){let i=this.playback,o=i?.clicks.get(n),r=i?.replays.has(n)??!1;if(!i||!o&&!r)return;let l={element:n,...o??{},...r?{replay:!0}:{}};if(!this.dispatchEvent(new CustomEvent("action",{detail:l,cancelable:!0})))return;let s=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(r){let a=performance.now();i.replay(n,s?a-i.replays.get(n)*1e3:a),i.redraw(),this.scheduleReplay()}o&&((o.set||o.toggle)&&this.setState(An({scene:null,url:null,set:o.set??null,toggle:o.toggle??null},i.state)),!("state"in o)&&("url"in o?/^(https?:|mailto:)/i.test(o.url)&&window.open(o.url,"_blank","noopener"):"page"in o?this.setAttribute("page",String(o.page+1)):o.scene>=0&&o.scene<i.scenes.length&&(s||this.hasAttribute("at")||i.frameCount<2?(this.setPlaying(!1),i.show(i.sceneLoops[o.scene]?i.scenes[o.scene]:o.scene+1<i.scenes.length?i.scenes[o.scene+1]:i.frameCount-1)):(i.show(i.scenes[o.scene]),this.setPlaying(!0)))))}get variables(){return{...this.playback?.state??{}}}setState(n){let i=this.playback;if(!i)return;let o={...i.state,...n};Object.keys(o).every(r=>o[r]===i.state[r])||(i.state=o,i.redraw(),this.dispatchEvent(new CustomEvent("state",{detail:{variables:{...o}}})))}scheduleReplay(){if(this.replayRaf)return;let n=()=>{this.replayRaf=0;let i=this.playback;!i||!this.isConnected||(this.playing||i.redraw(),i.replaying()?this.replayRaf=requestAnimationFrame(n):this.playing||i.redraw())};this.replayRaf=requestAnimationFrame(n)}setPlaying(n){let i=this.playback;this.playing=n&&!!i&&i.frameCount>1&&i.page.timeline!==null,this.playButton.textContent=this.playing?"\u275A\u275A":"\u25B6",this.playButton.setAttribute("aria-label",this.playing?"Pause":"Play"),this.last=0,this.acc=0,this.schedule()}schedule(){this.playing&&this.visible&&!this.raf&&this.isConnected&&(this.raf=requestAnimationFrame(n=>this.tick(n)))}tick(n){this.raf=0;let i=this.playback;if(!this.playing||!i)return;let o=1e3/(i.page.timeline?.fps??12);this.last&&(this.acc+=Math.min(n-this.last,1e3)),this.last=n;let r=!1;for(;this.playing&&this.acc>=o;){this.acc-=o;let{frame:l,stop:s}=i.step(i.frame,!this.hasAttribute("no-loop"));if(s&&l===0&&i.frame+1>=i.frameCount){this.setPlaying(!1);break}if(i.frame=l,r=!0,s){this.setPlaying(!1);break}}r&&i.show(i.frame),this.playing&&!this.visible&&(this.last=0),this.schedule()}key(n){let i=this.playback,o=n.composedPath()[0],r=Vi(o);if(i&&r&&(n.key==="Enter"||n.key===" ")){n.preventDefault(),this.activate(r.getAttribute("data-a")??"");return}if(!i||i.page.timeline===null||i.frameCount<=1||this.hasAttribute("at")||o===this.scrub&&n.key!==" ")return;let l=i.scenes.length>0,s=!0;n.key===" "?l?this.playing?this.setPlaying(!1):this.nextScene():this.setPlaying(!this.playing):n.key==="ArrowRight"?l?this.nextScene():(this.setPlaying(!1),i.show(i.frame+1)):n.key==="ArrowLeft"?l?this.prevScene():(this.setPlaying(!1),i.show(i.frame-1)):n.key==="."?(this.setPlaying(!1),i.show(i.frame+1)):n.key===","?(this.setPlaying(!1),i.show(i.frame-1)):s=!1,s&&n.preventDefault()}};v(Ot,"observedAttributes",["src","page","at","clean","no-controls","label"]);function Vi(t){let e=t;return e&&typeof e.closest=="function"?e.closest(".dottie-a"):null}function Wi(t,e){let n=0;return t.plan.times.forEach((i,o)=>{Math.abs(i-e)<Math.abs(t.plan.times[n]-e)&&(n=o)}),n}function Fe(t="dottie-player"){typeof customElements<"u"&&!customElements.get(t)&&customElements.define(t,class extends Ot{})}var F=t=>{let e=Xt(t*1e4)/1e4;return e===0?0:e},bn=t=>[F(t.x),F(t.y)],ie=t=>[F(t.x),F(t.y),F(t.width),F(t.height)],xn=t=>[F(t.r),F(t.g),F(t.b),F(t.a)];function kn(t){let e=t.timeline;if(!e)return[0];let n=e.duration,i=[0,n];for(let o=1;o<16;o++)i.push(n*(o+.37)/16);for(let o of e.markers??[])i.push(o.t);return e.poster!==null&&i.push(e.poster),[...new Set(i.map(F))].filter(o=>o>=0&&o<=n).sort((o,r)=>o-r)}function wn(t,e){let n=nt(t,e),i=et(n),o=new Set(n.layers.filter(s=>s.visible).map(s=>s.id)),r={t:F(e)},l=t.timeline;if(l){let s=Dt(l,e);r.view=s?ie(s):null;let a=-1;(l.markers??[]).forEach((u,c)=>{u.t<=e&&(a=c)}),r.scene=a}return l?.camera?.length||(r.bounds=ie(ht(n))),r.elements=st(n).map((s,a)=>{let u={id:s.id,kind:s.kind,z:a,seed:s.seed,frame:ie({x:s.x,y:s.y,width:s.width,height:s.height})};if(o.has(s.layerID)||(u.hiddenLayer=!0),s.rotation!==null&&(u.rotation=F(s.rotation)),s.style.opacity!==null&&(u.opacity=F(s.style.opacity)),s.reveal!==null&&(u.reveal=F(s.reveal)),s.style.dashOffset!==null&&(u.dashOffset=F(s.style.dashOffset)),u.strokeWidth=F(s.style.strokeWidth),u.stroke=xn(s.style.stroke),u.fill=xn(s.style.fill),s.style.textColor!==null&&(u.textColor=xn(s.style.textColor)),s.kind==="connector"){let[c,h]=lt(s,i);u.start=bn(c),u.end=bn(h),u.route=at(ct(s,i)).map(bn)}return u}),r}function Pn(t,e,n){let i={page:e+1,name:t.name,id:t.id},o=t.timeline;if(o){let r=Yt(t);i.duration=F(o.duration),i.fps=F(o.fps),i.frameCount=r.times.length,i.poster=F(o.poster??o.duration),i.size=[F(r.size.width),F(r.size.height)],o.camera?.length||(i.bounds=ie(r.rects[0])),i.markers=(o.markers??[]).map(l=>({t:F(l.t),name:l.name}))}else i.bounds=ie(ht(t));return i.frames=n.map(r=>wn(t,r)),i}function $i(t,e){return{version:t.version,pages:t.pages.map((n,i)=>Pn(n,i,e??kn(n)))}}function hr(t,e={}){let n=fr(t)?t:zt(t),i=n.pages[ee(n,e.page===void 0?null:String(e.page))];return i=nt(i,e.at??yt(i)),e.clean&&(i=ne(i,0)),Le(i,e.background===void 0?{r:1,g:1,b:1,a:1}:e.background)}function fr(t){return typeof t=="object"&&t!==null&&Array.isArray(t.pages)&&Array.isArray(t.warnings)}var mr="0.7.0";Fe();globalThis.Dottie??(globalThis.Dottie=Mn);})();
|