@layers-app/editor 0.7.44 → 0.7.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -3
- package/dist/{layers.Bt5BEQ6h.js → layers.B88sQYuh.js} +1 -1
- package/dist/layers.BgMykHnn.js +154 -0
- package/dist/{layers.CsTbIH2o.js → layers.BtvuN20E.js} +8988 -9641
- package/dist/{layers.8AV9TJ5y.js → layers.Cfvta__C.js} +1 -1
- package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
- package/dist/layers.Ct1ojjl3.js +1 -0
- package/dist/{layers.BPwGnx6H.js → layers.Hq0pIRX3.js} +24 -24
- package/dist/layers.JT_kEFH5.js +129 -0
- package/dist/{layers.D5EnJuSD.js → layers.NW1lST7i.js} +1 -1
- package/dist/layers.pwc3O6Es.js +261 -0
- package/package.json +1 -1
- package/dist/layers.03rOzGz6.js +0 -1
- package/dist/layers.2ki87-LU.js +0 -5
- package/dist/layers.2o06iRgp.js +0 -504
- package/dist/layers.52famHy6.js +0 -1
- package/dist/layers.5oOWOsbG.js +0 -39
- package/dist/layers.7JqFgE4-.js +0 -15
- package/dist/layers.8KaGKAU3.js +0 -271
- package/dist/layers.9URcRock.js +0 -1
- package/dist/layers.9pNaFvaX.js +0 -1
- package/dist/layers.B-dneuft.js +0 -373
- package/dist/layers.B19hGmey.js +0 -1
- package/dist/layers.B1fchoGW.js +0 -1
- package/dist/layers.B2cspFhx.js +0 -1034
- package/dist/layers.B3D4g2HH.js +0 -1
- package/dist/layers.B6soS223.js +0 -8
- package/dist/layers.B780IvgC.js +0 -84
- package/dist/layers.B7K7JjK6.js +0 -1510
- package/dist/layers.B9UunCzG.js +0 -39
- package/dist/layers.B9rQcczY.js +0 -14
- package/dist/layers.BAtv1CM7.js +0 -1
- package/dist/layers.BBcDfITy.js +0 -40
- package/dist/layers.BBhmfZot.js +0 -39
- package/dist/layers.BDqHBDOj.js +0 -9
- package/dist/layers.BFRbDTjY.js +0 -160
- package/dist/layers.BIUiVID4.js +0 -10
- package/dist/layers.BIeVwYKL.js +0 -1
- package/dist/layers.BJDrjORS.js +0 -244
- package/dist/layers.BKamPs3H.js +0 -1
- package/dist/layers.BLd2spTm.js +0 -1
- package/dist/layers.BMWMvKH-.js +0 -806
- package/dist/layers.BMxAun-L.js +0 -6
- package/dist/layers.BOMgDmQW.js +0 -1
- package/dist/layers.BQX_W7-N.js +0 -41
- package/dist/layers.BRBbDnyO.js +0 -32
- package/dist/layers.BRU1WOyl.js +0 -65
- package/dist/layers.BSTBZrFn.js +0 -1
- package/dist/layers.BUP7J0N1.js +0 -198
- package/dist/layers.BWYHKKSc.js +0 -9
- package/dist/layers.B_5Gf5vh.js +0 -7
- package/dist/layers.BbCfEXyj.js +0 -55
- package/dist/layers.Be7sKoi1.js +0 -36
- package/dist/layers.BewWHVmc.js +0 -10
- package/dist/layers.Bhbf4Voy.js +0 -1286
- package/dist/layers.BhgyYcry.js +0 -2966
- package/dist/layers.BjqXvHbh.js +0 -38
- package/dist/layers.Bl153Elb.js +0 -772
- package/dist/layers.BlVr0EB6.js +0 -35
- package/dist/layers.BmBx-JQP.js +0 -9
- package/dist/layers.BnDdlKo4.js +0 -39
- package/dist/layers.BnWlIV7l.js +0 -9
- package/dist/layers.BpilXLfW.js +0 -6
- package/dist/layers.BpxcN2Id.js +0 -118
- package/dist/layers.Bva7u9LH.js +0 -41
- package/dist/layers.Bw9PyPP3.js +0 -40
- package/dist/layers.BxxWjVSm.js +0 -7
- package/dist/layers.ByfnxHEU.js +0 -11
- package/dist/layers.BzrUktHE.js +0 -40
- package/dist/layers.Bzx6XYuC.js +0 -1
- package/dist/layers.C-oUoVP8.js +0 -11
- package/dist/layers.C-v8184a.js +0 -10
- package/dist/layers.C2DLU3k6.js +0 -205
- package/dist/layers.C4n-fEss.js +0 -9
- package/dist/layers.C8LHt7Vy.js +0 -35
- package/dist/layers.C8_lu5UH.js +0 -23
- package/dist/layers.C8i9MTMT.js +0 -1089
- package/dist/layers.C8sUTigy.js +0 -1
- package/dist/layers.C9xAxi33.js +0 -2
- package/dist/layers.CBBwxyeE.js +0 -36
- package/dist/layers.CD1cqEz5.js +0 -40
- package/dist/layers.CDMZWhfy.js +0 -61
- package/dist/layers.CEGoZtyz.js +0 -42
- package/dist/layers.CF5fav1y.js +0 -42
- package/dist/layers.CHZsXQcr.js +0 -1
- package/dist/layers.CL2zU9v_.js +0 -8
- package/dist/layers.CMF1lFeu.js +0 -2482
- package/dist/layers.CN4h4dWv.js +0 -40
- package/dist/layers.COskFe6S.js +0 -39
- package/dist/layers.CPYfnqn5.js +0 -37
- package/dist/layers.CQGa02SB.js +0 -8
- package/dist/layers.CS1a09mB.js +0 -2
- package/dist/layers.CSABgVEk.js +0 -13
- package/dist/layers.CSPqTpuh.js +0 -1
- package/dist/layers.CUJquY9u.js +0 -40
- package/dist/layers.CVpmcvSk.js +0 -425
- package/dist/layers.CXNwKrxy.js +0 -2
- package/dist/layers.CXbg7PbM.js +0 -32
- package/dist/layers.CXtLmfFd.js +0 -4
- package/dist/layers.CYQ-eDkR.js +0 -36
- package/dist/layers.CYlMzZJI.js +0 -223
- package/dist/layers.C_6t44t9.js +0 -7
- package/dist/layers.C_AqJZgj.js +0 -1
- package/dist/layers.C_IvrzZ3.js +0 -7
- package/dist/layers.C_JAqhrY.js +0 -76
- package/dist/layers.C_l6mWJZ.js +0 -3
- package/dist/layers.Cbn9kFtP.js +0 -22
- package/dist/layers.CdC2YLb3.js +0 -189
- package/dist/layers.Ce68IynP.js +0 -8
- package/dist/layers.Ced46X3q.js +0 -6
- package/dist/layers.CgAndu8u.js +0 -437
- package/dist/layers.CgKZ3PQQ.js +0 -1
- package/dist/layers.CjF61D9D.js +0 -32
- package/dist/layers.Ck_mYNSX.js +0 -38
- package/dist/layers.Ckb_FqEw.js +0 -9
- package/dist/layers.ClK-YSEj.js +0 -10
- package/dist/layers.ClPMD0vL.js +0 -1619
- package/dist/layers.Cq3WhnzE.js +0 -41
- package/dist/layers.CqVTtuYm.js +0 -6
- package/dist/layers.CrM-3BQr.js +0 -4
- package/dist/layers.CsJQzt0K.js +0 -805
- package/dist/layers.Cux05MKl.js +0 -8
- package/dist/layers.CwZFs1PA.js +0 -10
- package/dist/layers.Cxlebi7D.js +0 -122
- package/dist/layers.Cy9EF2DN.js +0 -8
- package/dist/layers.Cyzu9PKQ.js +0 -1
- package/dist/layers.D0zn4_Mx.js +0 -1
- package/dist/layers.D1hB76Bq.js +0 -11
- package/dist/layers.D3RHWYgt.js +0 -8
- package/dist/layers.D3qdetie.js +0 -9
- package/dist/layers.D3xtqcGm.js +0 -42
- package/dist/layers.D4T8fTcj.js +0 -1223
- package/dist/layers.D54e-Khu.js +0 -9
- package/dist/layers.D661e9Xc.js +0 -1225
- package/dist/layers.D7cIx_9y.js +0 -7
- package/dist/layers.D7jGxypv.js +0 -8
- package/dist/layers.D7v-bI_M.js +0 -796
- package/dist/layers.DA37YYAX.js +0 -1
- package/dist/layers.DBFtWsLd.js +0 -32
- package/dist/layers.DBspJRLt.js +0 -9
- package/dist/layers.DCYPhLVi.js +0 -139
- package/dist/layers.DCeGyOw0.js +0 -32
- package/dist/layers.DDBS2bZp.js +0 -10
- package/dist/layers.DEV2RzXF.js +0 -35
- package/dist/layers.DFOzrTFb.js +0 -6
- package/dist/layers.DGbx9JE5.js +0 -70
- package/dist/layers.DH1xK3c2.js +0 -48149
- package/dist/layers.DH2Fx227.js +0 -38
- package/dist/layers.DH7NXYKd.js +0 -21941
- package/dist/layers.DHOsMTqa.js +0 -41
- package/dist/layers.DJIT4Yuh.js +0 -1
- package/dist/layers.DJteL1WD.js +0 -33
- package/dist/layers.DLwuMfdd.js +0 -84
- package/dist/layers.DMkBISW1.js +0 -1
- package/dist/layers.DN58BT2N.js +0 -129
- package/dist/layers.DN9HoVxI.js +0 -18
- package/dist/layers.DNRniJ59.js +0 -33
- package/dist/layers.DOZhGFQj.js +0 -40
- package/dist/layers.DOrgOHBr.js +0 -1
- package/dist/layers.DP6Pb86W.js +0 -4
- package/dist/layers.DQpfAS9_.js +0 -84
- package/dist/layers.DSBfJxui.js +0 -2238
- package/dist/layers.DUulRicy.js +0 -213
- package/dist/layers.DXLQ2q0o.js +0 -794
- package/dist/layers.DXqg60IE.js +0 -1
- package/dist/layers.DZkyqPUI.js +0 -41
- package/dist/layers.D_MAZnF5.js +0 -11
- package/dist/layers.DbMx76Zo.js +0 -1
- package/dist/layers.DbaKVP5e.js +0 -1
- package/dist/layers.DcYYTMWk.js +0 -5
- package/dist/layers.DenHSAM-.js +0 -423
- package/dist/layers.Dfg_GwXo.js +0 -41
- package/dist/layers.Dfv6IVuG.js +0 -39
- package/dist/layers.Di5XQ7RG.js +0 -5
- package/dist/layers.DiLG4f1T.js +0 -41
- package/dist/layers.DjUOC4st.js +0 -16
- package/dist/layers.Dksb8xWL.js +0 -21620
- package/dist/layers.DnTHkHku.js +0 -1
- package/dist/layers.DnbGJb7n.js +0 -10
- package/dist/layers.Dp8hIITu.js +0 -39
- package/dist/layers.DrGILrJe.js +0 -1
- package/dist/layers.DrPZhd4b.js +0 -8
- package/dist/layers.DsCDPcQF.js +0 -52
- package/dist/layers.DsLXYKq7.js +0 -139
- package/dist/layers.DssLE6Ze.js +0 -42
- package/dist/layers.DtK0Svqg.js +0 -36
- package/dist/layers.DtNKNbtb.js +0 -1268
- package/dist/layers.DuuzgAVb.js +0 -7
- package/dist/layers.DuyNXGEO.js +0 -5
- package/dist/layers.DvSwjIBG.js +0 -37
- package/dist/layers.DwPc2_v9.js +0 -1088
- package/dist/layers.DxA6ocdw.js +0 -70
- package/dist/layers.Dy1naDTQ.js +0 -14
- package/dist/layers.DyK8xvHc.js +0 -1
- package/dist/layers.G5fXkV2g.js +0 -40
- package/dist/layers.GRwgnZ0K.js +0 -1126
- package/dist/layers.H9GbooLl.js +0 -11
- package/dist/layers.Ii0kosET.js +0 -10
- package/dist/layers.IsBK41F6.js +0 -960
- package/dist/layers.JFRyjmr3.js +0 -295
- package/dist/layers.JWCLFILJ.js +0 -1
- package/dist/layers.L1EEfd1U.js +0 -323
- package/dist/layers.LgOKQKa4.js +0 -39
- package/dist/layers.NsxwBYck.js +0 -907
- package/dist/layers.OqunHjml.js +0 -51
- package/dist/layers.OziSx6JY.js +0 -8583
- package/dist/layers.PW9J5Jxo.js +0 -37
- package/dist/layers.R8mPlCA0.js +0 -261
- package/dist/layers.S2akqscS.js +0 -1
- package/dist/layers.SGT8YAPE.js +0 -7
- package/dist/layers.TD8A7YjM.js +0 -44
- package/dist/layers.UtIqQK19.js +0 -276
- package/dist/layers.VIZ2Xa30.js +0 -1
- package/dist/layers.WAvmJfLV.js +0 -7
- package/dist/layers.XQpyNRW5.js +0 -116
- package/dist/layers.Xco5GVBh.js +0 -40
- package/dist/layers.Y0BjACCI.js +0 -39
- package/dist/layers.YTMr1YyH.js +0 -42
- package/dist/layers._bAvXI7Q.js +0 -934
- package/dist/layers._mqWoKOG.js +0 -1
- package/dist/layers.al8Vg6zt.js +0 -6
- package/dist/layers.b0h5ZBmD.js +0 -61
- package/dist/layers.dyRJvH-s.js +0 -6
- package/dist/layers.eB1U5Jl6.js +0 -8
- package/dist/layers.euNtZlgm.js +0 -37
- package/dist/layers.fChmSQjC.js +0 -1
- package/dist/layers.feSI_7Kx.js +0 -1
- package/dist/layers.frthGoDK.js +0 -9
- package/dist/layers.gqLoI9xW.js +0 -5
- package/dist/layers.hpuqkyYN.js +0 -257
- package/dist/layers.iN3mYsr5.js +0 -34
- package/dist/layers.jjNsAaLS.js +0 -10
- package/dist/layers.l6EuAdoo.js +0 -7
- package/dist/layers.lCpg7dOn.js +0 -21
- package/dist/layers.lXs3RYd3.js +0 -10
- package/dist/layers.liB8aZ3C.js +0 -207
- package/dist/layers.qffllMmW.js +0 -41
- package/dist/layers.r1jKcKBb.js +0 -4
- package/dist/layers.rFy6_B28.js +0 -32
- package/dist/layers.rq1vUYAs.js +0 -6
- package/dist/layers.sIeIPQd4.js +0 -40
- package/dist/layers.sdxt2Nuu.js +0 -8
- package/dist/layers.t8MaTGN8.js +0 -1
- package/dist/layers.wKJ5yZVV.js +0 -96
- package/dist/layers.x9brO2TV.js +0 -1
- package/dist/layers.xQ1jNHSB.js +0 -1583
package/dist/layers.B3D4g2HH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(t){function i(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var n=e.done;return Promise.resolve(e.value).then(function(s){return{value:s,done:n}})}return u=function(e){this.s=e,this.n=e.next},u.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):i(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):i(n.apply(this.s,arguments))}},new u(t)}const m=async(t,i,e=t.name,n)=>{const s=[],y=[];var d,c=!1,v=!1;try{for(var h,f=(function(r){var o,a,l,p=2;for(typeof Symbol<"u"&&(a=Symbol.asyncIterator,l=Symbol.iterator);p--;){if(a&&(o=r[a])!=null)return o.call(r);if(l&&(o=r[l])!=null)return new u(o.call(r));a="@@asyncIterator",l="@@iterator"}throw new TypeError("Object is not async iterable")})(t.values());c=!(h=await f.next()).done;c=!1){const r=h.value,o=`${e}/${r.name}`;r.kind==="file"?y.push(r.getFile().then(a=>(a.directoryHandle=t,a.handle=r,Object.defineProperty(a,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>o})))):r.kind!=="directory"||!i||n&&n(r)||s.push(m(r,i,o,n))}}catch(r){v=!0,d=r}finally{try{c&&f.return!=null&&await f.return()}finally{if(v)throw d}}return[...(await Promise.all(s)).flat(),...await Promise.all(y)]};var w=async(t={})=>{t.recursive=t.recursive||!1;const i=await window.showDirectoryPicker({id:t.id,startIn:t.startIn});return m(i,t.recursive,void 0,t.skipDirectory)};exports.default=w;
|
package/dist/layers.B6soS223.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.wKJ5yZVV.js");require("./layers.BUP7J0N1.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let R=0,z=0;for(const{source:W,value:K}of v.targetLinks){let F=K*(v.layer-W.layer);R+=M(W,v)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let R=0,z=0;for(const{target:W,value:K}of v.sourceLinks){let F=K*(W.layer-v.layer);R+=V(v,W)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function V(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,V,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
|
|
2
|
-
`+S.showPosition()+`
|
|
3
|
-
Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),V=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof V<"u")return V;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
-
`+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,b[m]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],q={};const zt=()=>{X=[],Q=[],q={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const qt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Vt{constructor(n){this.ID=n}}const Rt=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),q[t]||(q[t]=new Vt(t),Q.push(q[t])),q[t]),Ut=()=>Q,Wt=()=>X,Ft=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:q,getConfig:()=>L.getConfig().sankey,getNodes:Ut,getLinks:Wt,getGraph:Ft,addLink:qt,findOrCreateNode:Rt,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
|
|
7
|
-
${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
-
`).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;
|