@pickaxeproject/react 4.2.2 → 4.3.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/dist/cjs/common/isoMap.js +1 -0
- package/dist/cjs/components/Icons/speaker.svg.js +1 -0
- package/dist/cjs/components/Pickaxe/Addons/Document/List.js +1 -1
- package/dist/cjs/components/Pickaxe/Chat/History/CustomMessage.js +1 -1
- package/dist/cjs/components/Pickaxe/Chat/History/Message.js +1 -1
- package/dist/cjs/components/Pickaxe/Form/History/Item.js +1 -1
- package/dist/cjs/components/Pickaxe/Form/History/Response.js +1 -1
- package/dist/cjs/components/Pickaxe/common/PickaxeMessageActions.js +1 -1
- package/dist/cjs/node_modules/.pnpm/cose-base@1.0.3/node_modules/cose-base/cose-base.js +1 -1
- package/dist/cjs/node_modules/.pnpm/cose-base@2.2.0/node_modules/cose-base/cose-base.js +1 -1
- package/dist/cjs/node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js +1 -1
- package/dist/cjs/node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js +1 -1
- package/dist/cjs/src/common/isoMap.d.ts +6 -0
- package/dist/cjs/src/components/Pickaxe/common/PickaxeMessageActions.d.ts +4 -1
- package/dist/cjs/src/types/pickaxe.d.ts +2 -0
- package/dist/esm/common/isoMap.js +1 -0
- package/dist/esm/components/Icons/speaker.svg.js +1 -0
- package/dist/esm/components/Pickaxe/Addons/Document/List.js +1 -1
- package/dist/esm/components/Pickaxe/Chat/History/CustomMessage.js +1 -1
- package/dist/esm/components/Pickaxe/Chat/History/Message.js +1 -1
- package/dist/esm/components/Pickaxe/Form/History/Item.js +1 -1
- package/dist/esm/components/Pickaxe/Form/History/Response.js +1 -1
- package/dist/esm/components/Pickaxe/common/PickaxeMessageActions.js +1 -1
- package/dist/esm/node_modules/.pnpm/cose-base@1.0.3/node_modules/cose-base/cose-base.js +1 -1
- package/dist/esm/node_modules/.pnpm/cose-base@2.2.0/node_modules/cose-base/cose-base.js +1 -1
- package/dist/esm/node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js +1 -1
- package/dist/esm/node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js +1 -1
- package/dist/esm/src/common/isoMap.d.ts +6 -0
- package/dist/esm/src/components/Pickaxe/common/PickaxeMessageActions.d.ts +4 -1
- package/dist/esm/src/types/pickaxe.d.ts +2 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const a={aar:"aa",abk:"ab",ave:"ae",af:"af",afr:"af",aka:"ak",amh:"am",arg:"an",ara:"ar",asm:"as",ava:"av",aym:"ay",aze:"az",bak:"ba",bel:"be",bul:"bg",bih:"bh",bis:"bi",bam:"bm",ben:"bn",bod:"bo",tib:"bo",bre:"br",bos:"bs",cat:"ca",che:"ce",cha:"ch",cos:"co",cre:"cr",ces:"cs",cze:"cs",chu:"cu",chv:"cv",cym:"cy",wel:"cy",dan:"da",deu:"de",ger:"de",div:"dv",dzo:"dz",ewe:"ee",ell:"el",gre:"el",eng:"en",epo:"eo",spa:"es",est:"et",eus:"eu",baq:"eu",fas:"fa",per:"fa",ful:"ff",fin:"fi",fij:"fj",fao:"fo",fra:"fr",fre:"fr",fry:"fy",gle:"ga",gla:"gd",glg:"gl",grn:"gn",guj:"gu",glv:"gv",hau:"ha",heb:"he",hin:"hi",hmo:"ho",hrv:"hr",hat:"ht",hun:"hu",hye:"hy",arm:"hy",her:"hz",ina:"ia",ind:"id",ile:"ie",ibo:"ig",iii:"ii",ipk:"ik",ido:"io",isl:"is",ice:"is",ita:"it",iku:"iu",jpn:"ja",jav:"jv",kat:"ka",geo:"ka",kon:"kg",kik:"ki",kua:"kj",kaz:"kk",kal:"kl",khm:"km",kan:"kn",kor:"ko",kau:"kr",kas:"ks",kur:"ku",kom:"kv",cor:"kw",kir:"ky",lat:"la",ltz:"lb",lug:"lg",lim:"li",lin:"ln",lao:"lo",lit:"lt",lub:"lu",lav:"lv",mlg:"mg",mah:"mh",mri:"mi",mao:"mi",mkd:"mk",mac:"mk",mal:"ml",mon:"mn",mar:"mr",msa:"ms",may:"ms",mlt:"mt",mya:"my",bur:"my",nau:"na",nob:"nb",nde:"nd",nep:"ne",ndo:"ng",nld:"nl",dut:"nl",nno:"nn",nor:"no",nbl:"nr",nav:"nv",nya:"ny",oci:"oc",oji:"oj",orm:"om",ori:"or",oss:"os",pan:"pa",pli:"pi",pol:"pl",pus:"ps",por:"pt",que:"qu",roh:"rm",run:"rn",ron:"ro",rum:"ro",rus:"ru",kin:"rw",san:"sa",srd:"sc",snd:"sd",sme:"se",sag:"sg",sin:"si",slk:"sk",slo:"sk",slv:"sl",smo:"sm",sna:"sn",som:"so",sqi:"sq",alb:"sq",srp:"sr",ssw:"ss",sot:"st",sun:"su",swe:"sv",swa:"sw",tam:"ta",tel:"te",tgk:"tg",tha:"th",tir:"ti",tuk:"tk",tgl:"tl",tsn:"tn",ton:"to",tur:"tr",tso:"ts",tat:"tt",twi:"tw",tah:"ty",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",chi:"zh",zul:"zu"};exports.ISO_3_TO_1=a,exports.convertToIso1=s=>{if(!s)return"en";const e=s.toLowerCase().trim();return 2===e.length?e:"und"===e?"en":a[e]||"en"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}Object.defineProperty(exports,"__esModule",{value:!0});var r,t,c=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var c in t)({}).hasOwnProperty.call(t,c)&&(e[c]=t[c])}return e},n.apply(null,arguments)}var a=e=>c.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",className:"speaker_svg__svg-icon",style:{verticalAlign:"middle",fill:"currentColor",overflow:"hidden"},viewBox:"0 0 1024 1024"},e),r||(r=c.createElement("path",{d:"M476 144.083v734.333c-16.153-10.798-44.438-31.782-90.53-71.775-51.958-45.083-99.188-90.495-116.902-108.209A80 80 0 0 0 212 675h-90c-22.056 0-40-17.944-40-40V399c0-22.056 17.944-40 40-40h90a80 80 0 0 0 56.568-23.432c1.888-1.887 4.048-4.052 6.457-6.466 22.595-22.644 69.611-69.763 116.865-113.335 41.864-38.602 68.244-59.978 84.11-71.684m2-90.393c-43.078 0-223.667 182.977-266 225.31h-90C55.726 279 2 332.726 2 399v236c0 66.274 53.726 120 120 120h90c48.667 48.666 222.922 211.801 266 211.801s78-34.922 78-78V131.69c0-43.078-34.922-78-78-78m173.563 703.38c-17.592 0-33.713-11.692-38.566-29.481-5.814-21.313 6.749-43.303 28.062-49.118C723.5 655.979 781.078 580.5 781.078 494.92c0-87.132-58.884-162.955-143.195-184.387-21.411-5.443-34.355-27.211-28.912-48.622s27.22-34.352 48.621-28.912c57.186 14.537 108.893 48.191 145.597 94.763 18.377 23.318 32.688 49.285 42.535 77.176 10.188 28.859 15.354 59.134 15.354 89.982 0 60.477-19.535 117.661-56.493 165.371-35.78 46.189-86.378 80.056-142.471 95.359a40 40 0 0 1-10.551 1.42"})),t||(t=c.createElement("path",{d:"M722.555 870.173c-17.89 0-34.179-12.087-38.755-30.224-5.405-21.42 7.577-43.166 28.998-48.57C848.609 757.108 943.463 635.2 943.463 494.92S848.61 232.732 712.799 198.462c-21.42-5.405-34.402-27.151-28.997-48.571s27.145-34.402 48.571-28.998c41.287 10.418 80.35 27.545 116.101 50.906 35.128 22.953 66.137 51.307 92.165 84.275 26.294 33.306 46.77 70.399 60.857 110.249 14.576 41.232 21.967 84.498 21.967 128.596s-7.391 87.364-21.968 128.597c-14.088 39.851-34.563 76.943-60.857 110.249-26.028 32.969-57.037 61.323-92.166 84.276-35.751 23.36-74.813 40.487-116.102 50.905a40 40 0 0 1-9.815 1.227"})));exports.default=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),r=require("./hooks/useDocument.js"),l=require("../../../../common/utils.js"),i=require("../../../Icons/spinner-lines.svg.js"),c=require("../../../Icons/file.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),r=require("./hooks/useDocument.js"),l=require("../../../../common/utils.js"),i=require("../../../Icons/spinner-lines.svg.js"),c=require("../../../Icons/file.svg.js"),n=require("../../../Icons/x.svg.js"),o=require("../../../Icons/circle-info.svg.js"),u=require("../../../../common/cn.js");exports.default=({className:d,isDisabled:f})=>{const{styles:h,colors:m,translations:x,isRtl:j}=t.usePickaxeContext(),{documents:b,isUploading:g,removeDocument:p}=r.useDocument(),v=a.useStyleFontSize();return e.jsx("div",Object.assign({className:u.default("flex flex-row gap-3 flex-wrap",d)},{children:b.map(((t,a)=>{var r,d,b,y,k,N;return e.jsx(s.Fragment,{children:"document"===t.type?e.jsxs("div",Object.assign({className:u.default("relative flex items-center gap-x-2.5 pl-2 pr-4 h-[56px] border",j&&"flex-row-reverse"),style:{borderRadius:h.cornerRadius,borderColor:m.secondaryText+"50"}},{children:[e.jsx("div",Object.assign({className:"w-10 h-10 flex items-center justify-center shrink-0",style:Object.assign({borderRadius:h.cornerRadius,backgroundColor:m.accent,color:m.accentText},"failed"===t.status&&{backgroundColor:m.error,color:"white"})},{children:"uploading"===t.status?e.jsx(i.default,{className:"w-5 h-5 animate-spin shrink-0"}):"failed"===t.status?e.jsx(o.default,{className:"w-5 h-5 shrink-0"}):e.jsx(c.default,{className:"w-5 h-5 shrink-0"})})),e.jsxs("div",Object.assign({className:u.default("flex flex-col justify-center truncate",j?"text-right items-end":"text-left items-start")},{children:[e.jsx("p",Object.assign({className:u.default(v.b3,"font-medium truncate")},{children:t.name})),e.jsx("p",Object.assign({className:u.default(v.b4,"opacity-80 truncate")},{children:"failed"===t.status?(null===(r=t.error)||void 0===r?void 0:r.includes("You have reached the file limit"))?null!==(d=null==x?void 0:x["file-limit-reached"])&&void 0!==d?d:"You have reached the file limit.":t.error:l.formatBytes(t.size)}))]})),!g&&e.jsx("button",Object.assign({type:"button",className:u.default("absolute w-5 h-5 rounded-full -top-2 flex items-center justify-center outline-none disabled:cursor-default",j?"-left-1 right-auto":"-right-1 left-auto"),style:{backgroundColor:m.accent,color:m.accentText},disabled:g||f,onClick:()=>p(t.id)},{children:e.jsx(n.default,{className:"w-4 h-4 shrink-0"})}))]})):"image"===t.type?e.jsxs("div",Object.assign({className:"relative h-[56px] flex flex-col items-center justify-center w-[56px]",style:Object.assign({borderRadius:h.cornerRadius,backgroundColor:m.accent,color:m.accentText},"failed"===t.status&&{backgroundColor:m.error,color:"white"})},{children:["finished"===t.status?e.jsx("img",{className:"object-cover w-full h-full",style:{borderRadius:h.cornerRadius},src:`https://cdn.mail.studio/documentinterrogation/${null!==(b=t.folder)&&void 0!==b?b:"jpg"}/${t.documentId}.${null!==(y=t.folder)&&void 0!==y?y:"jpg"}`,alt:""}):"failed"===t.status?e.jsx(o.default,{className:"w-5 h-5 shrink-0"}):e.jsx(i.default,{className:"w-5 h-5 animate-spin shrink-0"}),!g&&e.jsx("button",Object.assign({type:"button",className:u.default("absolute w-5 h-5 rounded-full -top-2 flex items-center justify-center outline-none disabled:cursor-default",j?"-left-1 right-auto":"-right-1 left-auto"),style:{backgroundColor:m.accent,color:m.accentText},disabled:g||f,onClick:()=>p(t.id)},{children:e.jsx(n.default,{className:"w-4 h-4 shrink-0"})}))]})):"website"===t.type?e.jsxs("div",Object.assign({className:u.default("relative flex items-center gap-x-2.5 pl-2 pr-4 h-[56px] border",j&&"flex-row-reverse"),style:{borderRadius:h.cornerRadius,borderColor:m.secondaryText+"50"}},{children:[e.jsx("div",Object.assign({className:"w-10 h-10 flex items-center justify-center shrink-0",style:Object.assign({borderRadius:h.cornerRadius,backgroundColor:m.accent,color:m.accentText},"failed"===t.status&&{backgroundColor:m.error,color:"white"})},{children:"uploading"===t.status?e.jsx(i.default,{className:"w-5 h-5 animate-spin shrink-0"}):"failed"===t.status?e.jsx(o.default,{className:"w-5 h-5 shrink-0"}):e.jsx(c.default,{className:"w-5 h-5 shrink-0"})})),e.jsxs("div",Object.assign({className:u.default("flex flex-col justify-center truncate",j?"text-right items-end":"text-left items-start")},{children:[e.jsx("p",Object.assign({className:u.default(v.b3,"font-medium truncate")},{children:t.name})),e.jsx("p",Object.assign({className:u.default(v.b4,"opacity-80 truncate")},{children:"failed"===t.status?(null===(k=t.error)||void 0===k?void 0:k.includes("You have reached the file limit"))?null!==(N=null==x?void 0:x["file-limit-reached"])&&void 0!==N?N:"You have reached the file limit.":t.error:"Website "}))]})),!g&&e.jsx("button",Object.assign({type:"button",className:u.default("absolute w-5 h-5 rounded-full -top-2 flex items-center justify-center outline-none disabled:cursor-default",j?"-left-1 right-auto":"-right-1 left-auto"),style:{backgroundColor:m.accent,color:m.accentText},disabled:g||f,onClick:()=>p(t.id)},{children:e.jsx(n.default,{className:"w-4 h-4 shrink-0"})}))]})):null},a)}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/studio/useStyleFontSize.js"),l=require("../../common/PickaxeIcon.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/studio/useStyleFontSize.js"),l=require("../../common/PickaxeIcon.js"),i=require("../../../../common/cn.js");exports.default=({chatRole:r,children:a})=>{var c;const{pickaxeId:o,pickaxe:n,styles:d,colors:u,isRtl:x}=s.usePickaxeContext(),f=t.useStyleFontSize(),j=null!==(c=null==n?void 0:n.chaticon)&&void 0!==c?c:`https://cdn.mail.studio/chaticons/${o}.png`;return"assistant"===r?e.jsx("div",Object.assign({className:i.default(f.b2,"flex w-full",x?"justify-end":"justify-start"),dir:x?"rtl":"ltr"},{children:e.jsx("div",Object.assign({className:"flex flex-col"},{children:e.jsxs("div",Object.assign({className:i.default("flex gap-x-3",x&&"flex-row-reverse")},{children:["NONE"!==j&&e.jsx(l.default,{src:j,alt:`${null==n?void 0:n.formtitle}'s Chat Icon`,width:24,height:24,className:"my-3 h-6 w-6",textColor:u.text}),a]}))}))})):e.jsx("div",Object.assign({className:i.default(f.b2,"flex w-full",x?"justify-start":"justify-end"),dir:x?"rtl":"ltr"},{children:e.jsx("div",Object.assign({className:i.default("px-4 py-3",x?"text-right":"text-left"),style:{backgroundColor:u.secondary+"80",color:u.secondaryText,borderRadius:d.cornerRadius}},{children:a}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),i=require("../../../../hooks/pickaxe/useResponseContext.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),i=require("../../../../hooks/pickaxe/useResponseContext.js"),n=require("../../Addons/Artifact/hooks/useArtifact.js"),l=require("../../common/PickaxeMarkdown/index.js"),o=require("../../common/PickaxeIcon.js"),r=require("./Document.js"),c=require("../../common/PickaxeMessageActions.js"),d=require("../../common/PickaxeMessageParts/index.js"),u=require("../../../../common/cn.js"),x=require("../../../../common/isoMap.js"),m=require("franc-min");exports.default=({index:f,message:p,isLastMessage:h=!1})=>{var j,g;const{pickaxeId:b,pickaxe:w,styles:v,colors:y,misc:k,responsiveBy:O,disableHtml:N,disableJs:S,disableCss:q,isNewChat:C,isRtl:A}=t.usePickaxeContext(),{isGenerating:R}=i.useResponseContext(),{onLoadArtifact:P}=n.useArtifact(),[I,M]=s.useState(!1),[E,F]=s.useState([]),H=a.useStyleFontSize(),$=null!==(j=null==w?void 0:w.chaticon)&&void 0!==j?j:`https://cdn.mail.studio/chaticons/${b}.png`,G=h&&R,J=null==w?void 0:w.enablereadout;s.useEffect((()=>{if(!J||"assistant"!==p.role)return;const e=()=>{const e=window.speechSynthesis.getVoices();e.length>0&&F(e)};return e(),window.speechSynthesis.onvoiceschanged=e,()=>{window.speechSynthesis.onvoiceschanged=null}}),[J,p.role]),s.useEffect((()=>()=>{I&&window.speechSynthesis.cancel()}),[I]);const T=()=>{if(I)return window.speechSynthesis.cancel(),void M(!1);const e=p.parts.filter((e=>"text"===e.type)).map((e=>e.content)).join(" ");if(!e)return;const s=m.franc(e),t=x.convertToIso1(s);window.speechSynthesis.cancel();const a=new SpeechSynthesisUtterance(e),i=E.find((e=>e.lang.startsWith(t)&&e.name.includes("Google")))||E.find((e=>e.lang.startsWith(t)));i?(a.voice=i,a.lang=i.lang):a.lang=t||"en",a.onstart=()=>M(!0),a.onend=()=>M(!1),a.onerror=()=>M(!1),window.speechSynthesis.speak(a)},W=!p.parts.some((e=>["text","reasoning","data-action-tool-caption"].includes(e.type)));return"assistant"===p.role?e.jsx("div",Object.assign({className:u.default("flex w-full",A?"justify-end":"justify-start")},{children:e.jsx("div",Object.assign({className:u.default("flex flex-col w-full",0===f&&C&&"viewport"===O&&"min-[767px]:max-w-[80%]",0===f&&C&&"container"===O&&"@[767px]/pickaxe-root:max-w-[80%]")},{children:e.jsxs("div",Object.assign({className:u.default("flex gap-x-3",A&&"flex-row-reverse")},{children:[k.isChatImage&&"NONE"!==$&&e.jsx(o.default,{src:$,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:y.text}),e.jsxs("div",Object.assign({className:u.default("flex flex-col flex-grow",A?"items-end":"items-start")},{children:[e.jsx("div",Object.assign({className:u.default(H.b2,"chat-message pt-3 w-full",A?"text-right":"text-left")},{children:e.jsx(l.PickaxeMarkdown,Object.assign({theme:v.theme,colors:y},A&&{rtl:!0},N&&{disableHtml:!0},S&&{disableJs:!0},q&&{disableCss:!0},{disableReasoning:null!==(g=null==w?void 0:w.enablereasoningdisplay)&&void 0!==g&&g,onArtifactClick:P},{children:e.jsx(d.default,{parts:p.parts})}))})),e.jsx("div",Object.assign({className:u.default("flex flex-col gap-6 my-4",W&&"mt-2")},{children:G?e.jsx("div",Object.assign({className:"flex items-center gap-x-2 rounded"},{children:Array.from({length:3}).map(((s,t)=>e.jsx("div",{className:u.default("h-1.5 w-1.5 animate-dot rounded-full",1===t&&"animate-dot-down"),style:{backgroundColor:y.secondaryText}},t)))})):e.jsx(c.default,Object.assign({content:p.parts.filter((e=>e.isVisible&&"text"===e.type)).map((e=>e.content)).join("\n"),index:f},"intromessage"===p.area&&{isHideFeedback:!0},{onReadOut:T,isReadOut:J||!1,isReading:I}))}))]}))]}))}))})):"user"===p.role?e.jsx("div",Object.assign({className:u.default("flex w-full",A?"justify-start":"justify-end")},{children:e.jsx("div",Object.assign({className:u.default("flex gap-x-3 max-w-[80%]",A?"pr-9":"pl-9","viewport"===O?A?"min-[767px]:pr-0":"min-[767px]:pl-0":A?"@[767px]/pickaxe-root:pr-0":"@[767px]/pickaxe-root:pl-0")},{children:e.jsxs("div",Object.assign({className:u.default(H.b2,"overflow-x-auto overflow-y-hidden px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B] flex flex-col gap-y-3",A?"text-right":"text-left"),style:{backgroundColor:y.secondary+"80",color:y.secondaryText,borderRadius:v.cornerRadius}},{children:[p.documentIds&&p.documentIds.length>0&&e.jsx("div",Object.assign({className:u.default("flex flex-col gap-y-2",A?"items-start":"items-end")},{children:p.documentIds.map((t=>e.jsx(s.Fragment,{children:t.startsWith("IMAGE-")?e.jsx("div",Object.assign({className:"max-w-[300px]"},{children:e.jsx("img",{style:{borderRadius:v.cornerRadius},className:"object-cover w-full h-full",src:`https://cdn.mail.studio/documentinterrogation/${t.split("-")[2]}/${t.split("-")[1]}.${null==t?void 0:t.split("-")[2]}`,alt:""})})):e.jsx(r.default,{documentId:t})},t)))})),e.jsx(l.PickaxeMarkdown,Object.assign({theme:v.theme,colors:y},A&&{rtl:!0},N&&{disableHtml:!0},S&&{disableJs:!0},q&&{disableCss:!0},{children:e.jsx(d.default,{parts:p.parts})}))]}))}))})):e.jsx("div",{})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),i=require("../../../../hooks/pickaxe/useResponseContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),n=require("../../Addons/Document/hooks/useDocument.js"),o=require("../../Addons/Artifact/hooks/useArtifact.js"),r=require("date-fns"),l=require("../../common/PickaxeMarkdown/index.js"),c=require("../../../Icons/visitor.svg.js"),d=require("../../common/PickaxeIcon.js"),u=require("../../common/PickaxeMessageParts/index.js"),x=require("../../common/PickaxeMessageActions.js"),m=require("../../../../common/cn.js");exports.default=({item:p})=>{var h;const{pickaxe:f,styles:j,colors:b,misc:g,translations:k,disableHtml:v,disableJs:y,disableCss:w,isRtl:q,setSessionId:N,setIsNewChat:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),i=require("../../../../hooks/pickaxe/useResponseContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),n=require("../../Addons/Document/hooks/useDocument.js"),o=require("../../Addons/Artifact/hooks/useArtifact.js"),r=require("date-fns"),l=require("../../common/PickaxeMarkdown/index.js"),c=require("../../../Icons/visitor.svg.js"),d=require("../../common/PickaxeIcon.js"),u=require("../../common/PickaxeMessageParts/index.js"),x=require("../../common/PickaxeMessageActions.js"),m=require("../../../../common/cn.js");exports.default=({item:p})=>{var h;const{pickaxe:f,styles:j,colors:b,misc:g,translations:k,disableHtml:v,disableJs:y,disableCss:w,isRtl:q,setSessionId:N,setIsNewChat:O}=t.usePickaxeContext(),{setMessages:C}=i.useResponseContext(),{setDocuments:M}=n.useDocument(),{onLoadArtifact:I}=o.useArtifact(),A=a.useStyleFontSize(),P=s.useMemo((()=>p&&p.messages?p.messages.length:0),[p]),R=s.useMemo((()=>r.format(new Date(p.updatedAt),"hh:mm a MMM dd, yyy")),[p]),S=s.useMemo((()=>{var e;if("FORM"===p.pickaxeType){return(null!==(e=p.question.inputs)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}const s=p.messages.find((e=>"user"===e.role));return s?s.parts[0].content:""}),[p]),F=s.useMemo((()=>{if("FORM"===p.pickaxeType)return p.question.responseParts;const e=p.messages.find((e=>"assistant"===e.role));return e?e.parts:[]}),[p]);return e.jsxs("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e.jsxs("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:b.primary,color:b.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(c.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-1.5 scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[e.jsx("input",{id:`${p.sessionId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:S.length<280}),e.jsx("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:S}}),e.jsx("label",Object.assign({htmlFor:`${p.sessionId}-input`,className:m.default(A.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold peer-checked:hidden hover:cursor-pointer"),style:{color:b.accent}},{children:(null==k?void 0:k["see-input"])||"See input"})),e.jsx("label",Object.assign({htmlFor:`${p.sessionId}-input`,className:m.default(A.b3,"hidden shrink-0 whitespace-nowrap font-semibold peer-checked:flex hover:cursor-pointer"),style:{color:b.accent}},{children:(null==k?void 0:k["hide-input"])||"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:b.secondary,color:b.secondaryText}},{children:[g.isChatImage&&e.jsx(d.default,{src:null==f?void 0:f.chaticon,alt:`${null==f?void 0:f.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:b.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(l.PickaxeMarkdown,Object.assign({theme:j.theme,colors:b},q&&{rtl:!0},v&&{disableHtml:!0},y&&{disableJs:!0},w&&{disableCss:!0},{disableReasoning:null!==(h=null==f?void 0:f.enablereasoningdisplay)&&void 0!==h&&h,onArtifactClick:I},{children:e.jsx(u.default,{className:"overflow-x-auto pb-2 font-semilight scrollbar scrollbar-thin",parts:F})})),e.jsxs("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e.jsx(x.default,{content:F.filter((e=>e.isVisible&&"text"===e.type)).map((e=>e.content)).join("\n"),sessionId:p.sessionId,messagesCount:P+1,onOpenChat:()=>{return e=p.sessionId,M([]),C([]),O(!1),void N(e);var e},isReadOut:!1}),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:m.default(A.b3,"font-semibold uppercase opacity-30")},{children:R}))}))]}))]}))]}))]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),i=require("../../../../hooks/pickaxe/useResponseContext.js"),o=require("../../../../hooks/studio/useStyleFontSize.js"),n=require("../../Addons/Scroll/hooks/useScrollContext.js"),a=require("../../Addons/Document/hooks/useDocument.js"),l=require("../../Addons/Artifact/hooks/useArtifact.js"),r=require("../../common/PickaxeMarkdown/index.js"),c=require("date-fns"),d=require("../../../Icons/visitor.svg.js"),u=require("../../common/PickaxeIcon.js"),x=require("../../Addons/Scroll/ScrollLockView.js"),m=require("../../common/PickaxeMessageParts/index.js"),h=require("../../common/PickaxeMessageActions.js"),p=require("../../../../common/cn.js");exports.default=()=>{var f;const{pickaxe:j,styles:b,colors:g,misc:v,translations:y,disableHtml:k,disableJs:w,disableCss:N,isRtl:q,setSessionId:C,setIsNewChat:O}=t.usePickaxeContext(),{response:M,isGenerating:I}=i.useResponseContext(),{scrollTargetRef:A}=n.useScrollContext(),{setDocuments:S}=a.useDocument(),{onLoadArtifact:P}=l.useArtifact(),D=o.useStyleFontSize()
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),i=require("../../../../hooks/pickaxe/useResponseContext.js"),o=require("../../../../hooks/studio/useStyleFontSize.js"),n=require("../../Addons/Scroll/hooks/useScrollContext.js"),a=require("../../Addons/Document/hooks/useDocument.js"),l=require("../../Addons/Artifact/hooks/useArtifact.js"),r=require("../../common/PickaxeMarkdown/index.js"),c=require("date-fns"),d=require("../../../Icons/visitor.svg.js"),u=require("../../common/PickaxeIcon.js"),x=require("../../Addons/Scroll/ScrollLockView.js"),m=require("../../common/PickaxeMessageParts/index.js"),h=require("../../common/PickaxeMessageActions.js"),p=require("../../../../common/cn.js");exports.default=()=>{var f;const{pickaxe:j,styles:b,colors:g,misc:v,translations:y,disableHtml:k,disableJs:w,disableCss:N,isRtl:q,setSessionId:C,setIsNewChat:O}=t.usePickaxeContext(),{response:M,isGenerating:I}=i.useResponseContext(),{scrollTargetRef:A}=n.useScrollContext(),{setDocuments:S}=a.useDocument(),{onLoadArtifact:P}=l.useArtifact(),D=o.useStyleFontSize(),R=s.useMemo((()=>M?c.format(M.sentAt,"hh:mm a MMM dd, yy"):c.format(new Date,"hh:mm a MMM dd, yy")),[M]),$=s.useMemo((()=>{var e;if(!M)return"";return(null!==(e=M.question.inputs)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}),[M]);return M?e.jsxs("div",Object.assign({ref:A,className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e.jsxs("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:g.primary,color:g.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(d.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar scrollbar-thin"},{children:[e.jsx("input",{id:`${M.sessionId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:$.length<280}),e.jsx("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:$}}),e.jsx("label",Object.assign({htmlFor:`${M.sessionId}-input`,className:p.default(D.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer"),style:{color:g.accent}},{children:(null==y?void 0:y["see-input"])||"See input"})),e.jsx("label",Object.assign({htmlFor:`${M.sessionId}-input`,className:p.default(D.b3,"hidden shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer"),style:{color:g.accent}},{children:(null==y?void 0:y["hide-input"])||"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:g.secondary,color:g.secondaryText}},{children:[v.isChatImage&&e.jsx(u.default,{src:null==j?void 0:j.chaticon,alt:`${null==j?void 0:j.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:g.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2"},{children:[e.jsx(r.PickaxeMarkdown,Object.assign({theme:b.theme,colors:g},q&&{rtl:!0},k&&{disableHtml:!0},w&&{disableJs:!0},N&&{disableCss:!0},{disableReasoning:null!==(f=null==j?void 0:j.enablereasoningdisplay)&&void 0!==f&&f,onArtifactClick:P},{children:e.jsx(m.default,{className:"overflow-x-auto pb-2 font-semilight scrollbar scrollbar-thin",parts:M.question.responseParts})})),e.jsx("div",Object.assign({className:"flex flex-col"},{children:I?e.jsx("div",Object.assign({className:"flex items-center gap-x-2 rounded"},{children:Array.from({length:3}).map(((s,t)=>e.jsx("div",{className:p.default("h-1.5 w-1.5 animate-dot rounded-full",1===t&&"animate-dot-down"),style:{backgroundColor:g.secondaryText}},t)))})):e.jsxs("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e.jsx("div",Object.assign({className:"flex items-center gap-3"},{children:e.jsx(h.default,{content:M.question.responseParts.filter((e=>e.isVisible&&"text"===e.type)).map((e=>e.content)).join("\n"),sessionId:M.sessionId,messagesCount:M.messageCount+1,onOpenChat:()=>{return e=M.sessionId,S([]),O(!1),void C(e);var e},isReadOut:!1})})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:p.default(D.b3,"font-semibold uppercase opacity-30")},{children:R}))}))]}))}))]}))]})),e.jsx(x.default,{})]})):null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../hooks/studio/useStyleFontSize.js"),i=require("../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../hooks/pickaxe/useFeedback.js"),a=require("framer-motion"),l=require("../../Icons/message-square-notes.svg.js"),n=require("../../Icons/thumbs-down.svg.js"),o=require("../../Icons/thumbs-up.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../hooks/studio/useStyleFontSize.js"),i=require("../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../hooks/pickaxe/useFeedback.js"),a=require("framer-motion"),l=require("../../Icons/message-square-notes.svg.js"),n=require("../../Icons/thumbs-down.svg.js"),c=require("../../Icons/speaker.svg.js"),o=require("../../Icons/stop.svg.js"),r=require("../../Icons/thumbs-up.svg.js"),u=require("./PickaxeSimpleButton.js"),d=require("./PickaxeCopyButton.js"),p=require("./PickaxeFeedbackThumbsDownReasons.js"),b=require("../../../common/cn.js");exports.default=({content:x,sessionId:m,index:h=0,messagesCount:j,isHideFeedback:f,isReadOut:g,isReading:v,onOpenChat:k,onReadOut:y})=>{var O,w,N,q;const{colors:T,translations:C,pickaxe:S,setIsShowFeedbackMessage:D}=i.usePickaxeContext(),F=s.useStyleFontSize(),{toggleThumb:I,submitThumbsDown:P,submitThumbsUp:R,isThumbsUpSelected:z,isThumbsDownSelected:U,showThumbsDownOptions:B,showThumbsUpOptions:A,showSuccess:H}=t.useFeedback({content:x,index:h,sessionId:m,successDuration:2e3,promptRate:1,onThumbsDownReasonOpen:()=>D(!0),onThumbsDownReasonClose:()=>D(!1)}),M="function"==typeof k&&((null==S?void 0:S.chatflag)||!!(null==S?void 0:S.enablechatresponses))&&void 0!==m&&void 0!==j,W=Boolean(((null==S?void 0:S.chatflag)||(null==S?void 0:S.enablechatresponses))&&!k||!(null==S?void 0:S.chatflag)&&!(null==S?void 0:S.enablechatresponses))&&!f;return e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-4"},{children:[e.jsxs("div",Object.assign({className:"flex h-4 items-center gap-3"},{children:[M&&e.jsxs(u.default,Object.assign({color:T.accent,onClick:k},{children:[e.jsx(l.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:b.default(F.b3,"font-semibold")},{children:j}))]})),e.jsx(d.default,{color:T.accent,text:x}),W&&e.jsxs(e.Fragment,{children:[e.jsx(u.default,Object.assign({color:T.accent,onClick:()=>I("like"),className:"transition-all active:rotate-12 active:scale-90"},{children:e.jsx(r.default,{className:"size-4",style:{fill:T.text,fillOpacity:z?.3:0}})})),e.jsx(u.default,Object.assign({color:T.accent,onClick:()=>I("dislike"),className:"transition-all active:-rotate-12 active:scale-90"},{children:e.jsx(n.default,{className:"size-4",style:{fill:T.text,fillOpacity:U?.3:0}})})),g&&y&&e.jsx(u.default,Object.assign({color:T.accent,onClick:()=>y(),className:"transition-all active:-rotate-12 active:scale-90"},{children:v?e.jsx(o.default,{className:"size-4 rounded-full border p-[1.5px]",style:{borderColor:T.accent}}):e.jsx(c.default,{className:"size-4"})})),e.jsx(a.AnimatePresence,{children:H&&e.jsx(a.motion.div,Object.assign({initial:{opacity:0,x:-8,filter:"blur(4px)"},animate:{opacity:1,x:0,filter:"blur(0px)"},exit:{opacity:0,x:8,filter:"blur(4px)"},transition:{type:"spring",bounce:0,duration:.6}},{children:e.jsx("p",Object.assign({className:b.default(F.b4,T.secondary,"opacity-75")},{children:null!==(O=null==C?void 0:C["feedback-thanks"])&&void 0!==O?O:"Thanks for the feedback!"}))}))})]})]})),e.jsx(a.AnimatePresence,{children:(B||A)&&e.jsxs(a.motion.div,Object.assign({initial:{opacity:0,y:-4,filter:"blur(4px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},exit:{opacity:0,y:-2,filter:"blur(4px)"},transition:{type:"spring",bounce:0,duration:.25},className:"flex flex-col gap-4"},{children:[e.jsxs("div",Object.assign({className:"space-y-0.5"},{children:[e.jsx("p",Object.assign({className:b.default(F.b3,T.text)},{children:A?null!==(w=null==C?void 0:C["feedback-like-title"])&&void 0!==w?w:"What went right?":null!==(N=null==C?void 0:C["feedback-dislike-title"])&&void 0!==N?N:"What went wrong?"})),e.jsx("p",Object.assign({className:b.default(F.b3,T.secondary,"opacity-75")},{children:null!==(q=null==C?void 0:C["feedback-dislike-message"])&&void 0!==q?q:"Help us improve our answers"}))]})),e.jsx(a.motion.div,Object.assign({initial:{opacity:0,y:-8,filter:"blur(4px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{type:"spring",bounce:0,duration:.5,delay:.175},className:"flex flex-wrap items-center gap-2"},{children:e.jsx(p.default,{isUp:A,submitThumbsDown:P,submitThumbsUp:R})}))]}))})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("../../../../../_virtual/_commonjsHelpers.js"),r=require("../../../../../_virtual/cose-base.js"),i=require("../../../layout-base@1.0.2/node_modules/layout-base/layout-base.js");r.__module.exports,exports.__require=function(){return t||(t=1,o=r.__module,r.__module.exports,e.commonjsGlobal,n=function(t){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(e,r){e.exports=t},function(t,e,r){var i=r(0).FDLayoutConstants;function o(){}for(var n in i)o[n]=i[n];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=o},function(t,e,r){var i=r(0).FDLayoutEdge;function o(t,e,r){i.call(this,t,e,r)}for(var n in o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var i=r(0).LGraph;function o(t,e,r){i.call(this,t,e,r)}for(var n in o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var i=r(0).LGraphManager;function o(t){i.call(this,t)}for(var n in o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var i=r(0).FDLayoutNode,o=r(0).IMath;function n(t,e,r,o){i.call(this,t,e,r,o)}for(var a in n.prototype=Object.create(i.prototype),i)n[a]=i[a];n.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},n.prototype.propogateDisplacementToChildren=function(t,e){for(var r,i=this.getChild().getNodes(),o=0;o<i.length;o++)null==(r=i[o]).getChild()?(r.moveBy(t,e),r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},n.prototype.setPred1=function(t){this.pred1=t},n.prototype.getPred1=function(){return pred1},n.prototype.getPred2=function(){return pred2},n.prototype.setNext=function(t){this.next=t},n.prototype.getNext=function(){return next},n.prototype.setProcessed=function(t){this.processed=t},n.prototype.isProcessed=function(){return processed},t.exports=n},function(t,e,r){var i=r(0).FDLayout,o=r(4),n=r(3),a=r(5),s=r(2),h=r(1),d=r(0).FDLayoutConstants,g=r(0).LayoutConstants,l=r(0).Point,p=r(0).PointD,c=r(0).Layout,u=r(0).Integer,f=r(0).IGeometry,v=r(0).LGraph,T=r(0).Transform;function E(){i.call(this),this.toBeTiled={}}for(var m in E.prototype=Object.create(i.prototype),i)E[m]=i[m];E.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},E.prototype.newGraph=function(t){return new n(null,this.graphManager,t)},E.prototype.newNode=function(t){return new a(this.graphManager,t)},E.prototype.newEdge=function(t){return new s(null,null,t)},E.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,i),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var i=t[r].rect,o=t[r].id;e[o]={id:o,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return e},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===d.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,r=[],i=this.graphManager.getGraphs(),o=i.length;for(e=0;e<o;e++)(t=i[e]).updateConnected(),t.isConnected||(r=r.concat(t.getNodes()));return r},E.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,r=new Set;for(e=0;e<t.length;e++){var i=t[e];if(!r.has(i)){var o=i.getSource(),n=i.getTarget();if(o==n)i.getBendpoints().push(new p),i.getBendpoints().push(new p),this.createDummyNodesForBendpoints(i),r.add(i);else{var a=[];if(a=(a=a.concat(o.getEdgeListToNode(n))).concat(n.getEdgeListToNode(o)),!r.has(a[0])){var s;if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new p),this.createDummyNodesForBendpoints(h)}a.forEach((function(t){r.add(t)}))}}}if(r.size==t.length)break}},E.prototype.positionNodesRadially=function(t){for(var e=new l(0,0),r=Math.ceil(Math.sqrt(t.length)),i=0,o=0,n=0,a=new p(0,0),s=0;s<t.length;s++){s%r==0&&(n=0,o=i,0!=s&&(o+=h.DEFAULT_COMPONENT_SEPERATION),i=0);var d=t[s],u=c.findCenterOfTree(d);e.x=n,e.y=o,(a=E.radialLayout(d,u,e)).y>i&&(i=Math.floor(a.y)),n=Math.floor(a.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(g.WORLD_CENTER_X-a.x/2,g.WORLD_CENTER_Y-a.y/2))},E.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(e,null,0,359,0,i);var o=v.calculateBounds(t),n=new T;n.setDeviceOrgX(o.getMinX()),n.setDeviceOrgY(o.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(n);var s=new p(o.getMaxX(),o.getMaxY());return n.inverseTransformPoint(s)},E.branchRadialLayout=function(t,e,r,i,o,n){var a=(i-r+1)/2;a<0&&(a+=180);var s=(a+r)%360*f.TWO_PI/360,h=o*Math.cos(s),d=o*Math.sin(s);t.setCenter(h,d);var g=[],l=(g=g.concat(t.getEdges())).length;null!=e&&l--;for(var p,c=0,u=g.length,v=t.getEdgesBetween(e);v.length>1;){var T=v[0];v.splice(0,1);var m=g.indexOf(T);m>=0&&g.splice(m,1),u--,l--}p=null!=e?(g.indexOf(v[0])+1)%u:0;for(var y=Math.abs(i-r)/l,N=p;c!=l;N=++N%u){var w=g[N].getOtherEnd(t);if(w!=e){var A=(r+c*y)%360,C=(A+y)%360;E.branchRadialLayout(w,t,A,C,o+n,n),c++}}},E.maxDiagonalInTree=function(t){for(var e=u.MIN_VALUE,r=0;r<t.length;r++){var i=t[r].getDiagonal();i>e&&(e=i)}return e},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var r=[],i=this.graphManager.getAllNodes(),o=0;o<i.length;o++){var n=(s=i[o]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=n.id&&this.getToBeTiled(n)||r.push(s)}for(o=0;o<r.length;o++){var s,h=(s=r[o]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(s)}Object.keys(e).forEach((function(r){if(e[r].length>1){var i="DummyCompound_"+r;t.memberGroups[i]=e[r];var o=e[r][0].getParent(),n=new a(t.graphManager);n.id=i,n.paddingLeft=o.paddingLeft||0,n.paddingRight=o.paddingRight||0,n.paddingBottom=o.paddingBottom||0,n.paddingTop=o.paddingTop||0,t.idToDummyNode[i]=n;var s=t.getGraphManager().add(t.newGraph(),n),h=o.getChild();h.add(n);for(var d=0;d<e[r].length;d++){var g=e[r][d];h.remove(g),s.add(g)}}}))},E.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},E.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(r){var i=t.idToDummyNode[r];e[r]=t.tileNodes(t.memberGroups[r],i.paddingLeft+i.paddingRight),i.rect.width=e[r].width,i.rect.height=e[r].height}))},E.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],r=e.id,i=e.paddingLeft,o=e.paddingTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,i,o)}},E.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(r){var i=t.idToDummyNode[r],o=i.paddingLeft,n=i.paddingTop;t.adjustLocations(e[r],i.rect.x,i.rect.y,o,n)}))},E.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var r=t.getChild();if(null==r)return this.toBeTiled[e]=!1,!1;for(var i=r.getNodes(),o=0;o<i.length;o++){var n=i[o];if(this.getNodeDegree(n)>0)return this.toBeTiled[e]=!1,!1;if(null!=n.getChild()){if(!this.getToBeTiled(n))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[n.id]=!1}return this.toBeTiled[e]=!0,!0},E.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,i=0;i<e.length;i++){var o=e[i];o.getSource().id!==o.getTarget().id&&(r+=1)}return r},E.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var r=t.getChild().getNodes(),i=0;i<r.length;i++){var o=r[i];e+=this.getNodeDegreeWithChildren(o)}return e},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},E.prototype.adjustLocations=function(t,e,r,i,o){r+=o;for(var n=e+=i,a=0;a<t.rows.length;a++){var s=t.rows[a];e=n;for(var h=0,d=0;d<s.length;d++){var g=s[d];g.rect.x=e,g.rect.y=r,e+=g.rect.width+t.horizontalPadding,g.rect.height>h&&(h=g.rect.height)}r+=h+t.verticalPadding}},E.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(i){var o=e[i];r.tiledMemberPack[i]=r.tileNodes(t[i],o.paddingLeft+o.paddingRight),o.rect.width=r.tiledMemberPack[i].width,o.rect.height=r.tiledMemberPack[i].height}))},E.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0}));for(var i=0;i<t.length;i++){var o=t[i];0==r.rows.length?this.insertNodeToRow(r,o,0,e):this.canAddHorizontal(r,o.rect.width,o.rect.height)?this.insertNodeToRow(r,o,this.getShortestRowIndex(r),e):this.insertNodeToRow(r,o,r.rows.length,e),this.shiftToLastRow(r)}return r},E.prototype.insertNodeToRow=function(t,e,r,i){var o=i;r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(o),t.rowHeight.push(0));var n=t.rowWidth[r]+e.rect.width;t.rows[r].length>0&&(n+=t.horizontalPadding),t.rowWidth[r]=n,t.width<n&&(t.width=n);var a=e.rect.height;r>0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[r]&&(s=t.rowHeight[r],t.rowHeight[r]=a,s=t.rowHeight[r]-s),t.height+=s,t.rows[r].push(e)},E.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]<r&&(e=i,r=t.rowWidth[i]);return e},E.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]>r&&(e=i,r=t.rowWidth[i]);return e},E.prototype.canAddHorizontal=function(t,e,r){var i=this.getShortestRowIndex(t);if(i<0)return!0;var o=t.rowWidth[i];if(o+t.horizontalPadding+e<=t.width)return!0;var n,a,s=0;return t.rowHeight[i]<r&&i>0&&(s=r+t.verticalPadding-t.rowHeight[i]),n=t.width-o>=e+t.horizontalPadding?(t.height+s)/(o+e+t.horizontalPadding):(t.height+s)/t.width,s=r+t.verticalPadding,(a=t.width<e?(t.height+s)/e:(t.height+s)/t.width)<1&&(a=1/a),n<1&&(n=1/n),n<a},E.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,i=t.rows[e],o=i[i.length-1],n=o.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>n&&e!=r){i.splice(-1,1),t.rows[r].push(o),t.rowWidth[e]=t.rowWidth[e]-n,t.rowWidth[r]=t.rowWidth[r]+n,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<i.length;s++)i[s].height>a&&(a=i[s].height);e>0&&(a+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=a,t.rowHeight[r]<o.height+t.verticalPadding&&(t.rowHeight[r]=o.height+t.verticalPadding);var d=t.rowHeight[e]+t.rowHeight[r];t.height+=d-h,this.shiftToLastRow(t)}},E.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var t,e=[],r=!0;r;){var i=this.graphManager.getAllNodes(),o=[];r=!1;for(var n=0;n<i.length;n++)1!=(t=i[n]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(o.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var a=[],s=0;s<o.length;s++)1==o[s][0].getEdges().length&&(a.push(o[s]),o[s][0].getOwner().remove(o[s][0]));e.push(a),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},E.prototype.growTree=function(t){for(var e,r=t[t.length-1],i=0;i<r.length;i++)e=r[i],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(t){var e,r,i=t[0],o=(r=i==t[1].source?t[1].target:t[1].source).startX,n=r.finishX,a=r.startY,s=r.finishY,h=[0,0,0,0];if(a>0)for(var g=o;g<=n;g++)h[0]+=this.grid[g][a-1].length+this.grid[g][a].length-1;if(n<this.grid.length-1)for(g=a;g<=s;g++)h[1]+=this.grid[n+1][g].length+this.grid[n][g].length-1;if(s<this.grid[0].length-1)for(g=o;g<=n;g++)h[2]+=this.grid[g][s+1].length+this.grid[g][s].length-1;if(o>0)for(g=a;g<=s;g++)h[3]+=this.grid[o-1][g].length+this.grid[o][g].length-1;for(var l,p,c=u.MAX_VALUE,f=0;f<h.length;f++)h[f]<c?(c=h[f],l=1,p=f):h[f]==c&&l++;if(3==l&&0==c)0==h[0]&&0==h[1]&&0==h[2]?e=1:0==h[0]&&0==h[1]&&0==h[3]?e=0:0==h[0]&&0==h[2]&&0==h[3]?e=3:0==h[1]&&0==h[2]&&0==h[3]&&(e=2);else if(2==l&&0==c){var v=Math.floor(2*Math.random());e=0==h[0]&&0==h[1]?0==v?0:1:0==h[0]&&0==h[2]?0==v?0:2:0==h[0]&&0==h[3]?0==v?0:3:0==h[1]&&0==h[2]?0==v?1:2:0==h[1]&&0==h[3]?0==v?1:3:0==v?2:3}else e=4==l&&0==c?v=Math.floor(4*Math.random()):p;0==e?i.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-d.DEFAULT_EDGE_LENGTH-i.getHeight()/2):1==e?i.setCenter(r.getCenterX()+r.getWidth()/2+d.DEFAULT_EDGE_LENGTH+i.getWidth()/2,r.getCenterY()):2==e?i.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+d.DEFAULT_EDGE_LENGTH+i.getHeight()/2):i.setCenter(r.getCenterX()-r.getWidth()/2-d.DEFAULT_EDGE_LENGTH-i.getWidth()/2,r.getCenterY())},t.exports=E},function(t,e,r){var i={};i.layoutBase=r(0),i.CoSEConstants=r(1),i.CoSEEdge=r(2),i.CoSEGraph=r(3),i.CoSEGraphManager=r(4),i.CoSELayout=r(6),i.CoSENode=r(5),t.exports=i}])},o.exports=n(i.__require())),r.__module.exports;var o,n};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("../../../../../_virtual/_commonjsHelpers.js"),r=require("../../../../../_virtual/cose-base2.js"),i=require("../../../layout-base@1.0.2/node_modules/layout-base/layout-base.js");r.__module.exports,exports.__require=function(){return t||(t=1,o=r.__module,r.__module.exports,e.commonjsGlobal,n=function(t){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(e,r){e.exports=t},function(t,e,r){var i=r(0).FDLayoutConstants;function o(){}for(var n in i)o[n]=i[n];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=o},function(t,e,r){var i=r(0).FDLayoutEdge;function o(t,e,r){i.call(this,t,e,r)}for(var n in o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var i=r(0).LGraph;function o(t,e,r){i.call(this,t,e,r)}for(var n in o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var i=r(0).LGraphManager;function o(t){i.call(this,t)}for(var n in o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var i=r(0).FDLayoutNode,o=r(0).IMath;function n(t,e,r,o){i.call(this,t,e,r,o)}for(var a in n.prototype=Object.create(i.prototype),i)n[a]=i[a];n.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},n.prototype.propogateDisplacementToChildren=function(t,e){for(var r,i=this.getChild().getNodes(),o=0;o<i.length;o++)null==(r=i[o]).getChild()?(r.moveBy(t,e),r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},n.prototype.setPred1=function(t){this.pred1=t},n.prototype.getPred1=function(){return pred1},n.prototype.getPred2=function(){return pred2},n.prototype.setNext=function(t){this.next=t},n.prototype.getNext=function(){return next},n.prototype.setProcessed=function(t){this.processed=t},n.prototype.isProcessed=function(){return processed},t.exports=n},function(t,e,r){var i=r(0).FDLayout,o=r(4),n=r(3),a=r(5),s=r(2),h=r(1),d=r(0).FDLayoutConstants,g=r(0).LayoutConstants,l=r(0).Point,p=r(0).PointD,c=r(0).Layout,u=r(0).Integer,f=r(0).IGeometry,v=r(0).LGraph,T=r(0).Transform;function E(){i.call(this),this.toBeTiled={}}for(var m in E.prototype=Object.create(i.prototype),i)E[m]=i[m];E.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},E.prototype.newGraph=function(t){return new n(null,this.graphManager,t)},E.prototype.newNode=function(t){return new a(this.graphManager,t)},E.prototype.newEdge=function(t){return new s(null,null,t)},E.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,i),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var i=t[r].rect,o=t[r].id;e[o]={id:o,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return e},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===d.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,r=[],i=this.graphManager.getGraphs(),o=i.length;for(e=0;e<o;e++)(t=i[e]).updateConnected(),t.isConnected||(r=r.concat(t.getNodes()));return r},E.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,r=new Set;for(e=0;e<t.length;e++){var i=t[e];if(!r.has(i)){var o=i.getSource(),n=i.getTarget();if(o==n)i.getBendpoints().push(new p),i.getBendpoints().push(new p),this.createDummyNodesForBendpoints(i),r.add(i);else{var a=[];if(a=(a=a.concat(o.getEdgeListToNode(n))).concat(n.getEdgeListToNode(o)),!r.has(a[0])){var s;if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new p),this.createDummyNodesForBendpoints(h)}a.forEach((function(t){r.add(t)}))}}}if(r.size==t.length)break}},E.prototype.positionNodesRadially=function(t){for(var e=new l(0,0),r=Math.ceil(Math.sqrt(t.length)),i=0,o=0,n=0,a=new p(0,0),s=0;s<t.length;s++){s%r==0&&(n=0,o=i,0!=s&&(o+=h.DEFAULT_COMPONENT_SEPERATION),i=0);var d=t[s],u=c.findCenterOfTree(d);e.x=n,e.y=o,(a=E.radialLayout(d,u,e)).y>i&&(i=Math.floor(a.y)),n=Math.floor(a.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(g.WORLD_CENTER_X-a.x/2,g.WORLD_CENTER_Y-a.y/2))},E.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(e,null,0,359,0,i);var o=v.calculateBounds(t),n=new T;n.setDeviceOrgX(o.getMinX()),n.setDeviceOrgY(o.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(n);var s=new p(o.getMaxX(),o.getMaxY());return n.inverseTransformPoint(s)},E.branchRadialLayout=function(t,e,r,i,o,n){var a=(i-r+1)/2;a<0&&(a+=180);var s=(a+r)%360*f.TWO_PI/360,h=o*Math.cos(s),d=o*Math.sin(s);t.setCenter(h,d);var g=[],l=(g=g.concat(t.getEdges())).length;null!=e&&l--;for(var p,c=0,u=g.length,v=t.getEdgesBetween(e);v.length>1;){var T=v[0];v.splice(0,1);var m=g.indexOf(T);m>=0&&g.splice(m,1),u--,l--}p=null!=e?(g.indexOf(v[0])+1)%u:0;for(var y=Math.abs(i-r)/l,N=p;c!=l;N=++N%u){var w=g[N].getOtherEnd(t);if(w!=e){var A=(r+c*y)%360,C=(A+y)%360;E.branchRadialLayout(w,t,A,C,o+n,n),c++}}},E.maxDiagonalInTree=function(t){for(var e=u.MIN_VALUE,r=0;r<t.length;r++){var i=t[r].getDiagonal();i>e&&(e=i)}return e},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var r=[],i=this.graphManager.getAllNodes(),o=0;o<i.length;o++){var n=(s=i[o]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=n.id&&this.getToBeTiled(n)||r.push(s)}for(o=0;o<r.length;o++){var s,h=(s=r[o]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(s)}Object.keys(e).forEach((function(r){if(e[r].length>1){var i="DummyCompound_"+r;t.memberGroups[i]=e[r];var o=e[r][0].getParent(),n=new a(t.graphManager);n.id=i,n.paddingLeft=o.paddingLeft||0,n.paddingRight=o.paddingRight||0,n.paddingBottom=o.paddingBottom||0,n.paddingTop=o.paddingTop||0,t.idToDummyNode[i]=n;var s=t.getGraphManager().add(t.newGraph(),n),h=o.getChild();h.add(n);for(var d=0;d<e[r].length;d++){var g=e[r][d];h.remove(g),s.add(g)}}}))},E.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},E.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(r){var i=t.idToDummyNode[r];e[r]=t.tileNodes(t.memberGroups[r],i.paddingLeft+i.paddingRight),i.rect.width=e[r].width,i.rect.height=e[r].height}))},E.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],r=e.id,i=e.paddingLeft,o=e.paddingTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,i,o)}},E.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(r){var i=t.idToDummyNode[r],o=i.paddingLeft,n=i.paddingTop;t.adjustLocations(e[r],i.rect.x,i.rect.y,o,n)}))},E.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var r=t.getChild();if(null==r)return this.toBeTiled[e]=!1,!1;for(var i=r.getNodes(),o=0;o<i.length;o++){var n=i[o];if(this.getNodeDegree(n)>0)return this.toBeTiled[e]=!1,!1;if(null!=n.getChild()){if(!this.getToBeTiled(n))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[n.id]=!1}return this.toBeTiled[e]=!0,!0},E.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,i=0;i<e.length;i++){var o=e[i];o.getSource().id!==o.getTarget().id&&(r+=1)}return r},E.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var r=t.getChild().getNodes(),i=0;i<r.length;i++){var o=r[i];e+=this.getNodeDegreeWithChildren(o)}return e},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},E.prototype.adjustLocations=function(t,e,r,i,o){r+=o;for(var n=e+=i,a=0;a<t.rows.length;a++){var s=t.rows[a];e=n;for(var h=0,d=0;d<s.length;d++){var g=s[d];g.rect.x=e,g.rect.y=r,e+=g.rect.width+t.horizontalPadding,g.rect.height>h&&(h=g.rect.height)}r+=h+t.verticalPadding}},E.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(i){var o=e[i];r.tiledMemberPack[i]=r.tileNodes(t[i],o.paddingLeft+o.paddingRight),o.rect.width=r.tiledMemberPack[i].width,o.rect.height=r.tiledMemberPack[i].height}))},E.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0}));for(var i=0;i<t.length;i++){var o=t[i];0==r.rows.length?this.insertNodeToRow(r,o,0,e):this.canAddHorizontal(r,o.rect.width,o.rect.height)?this.insertNodeToRow(r,o,this.getShortestRowIndex(r),e):this.insertNodeToRow(r,o,r.rows.length,e),this.shiftToLastRow(r)}return r},E.prototype.insertNodeToRow=function(t,e,r,i){var o=i;r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(o),t.rowHeight.push(0));var n=t.rowWidth[r]+e.rect.width;t.rows[r].length>0&&(n+=t.horizontalPadding),t.rowWidth[r]=n,t.width<n&&(t.width=n);var a=e.rect.height;r>0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[r]&&(s=t.rowHeight[r],t.rowHeight[r]=a,s=t.rowHeight[r]-s),t.height+=s,t.rows[r].push(e)},E.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]<r&&(e=i,r=t.rowWidth[i]);return e},E.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]>r&&(e=i,r=t.rowWidth[i]);return e},E.prototype.canAddHorizontal=function(t,e,r){var i=this.getShortestRowIndex(t);if(i<0)return!0;var o=t.rowWidth[i];if(o+t.horizontalPadding+e<=t.width)return!0;var n,a,s=0;return t.rowHeight[i]<r&&i>0&&(s=r+t.verticalPadding-t.rowHeight[i]),n=t.width-o>=e+t.horizontalPadding?(t.height+s)/(o+e+t.horizontalPadding):(t.height+s)/t.width,s=r+t.verticalPadding,(a=t.width<e?(t.height+s)/e:(t.height+s)/t.width)<1&&(a=1/a),n<1&&(n=1/n),n<a},E.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,i=t.rows[e],o=i[i.length-1],n=o.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>n&&e!=r){i.splice(-1,1),t.rows[r].push(o),t.rowWidth[e]=t.rowWidth[e]-n,t.rowWidth[r]=t.rowWidth[r]+n,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<i.length;s++)i[s].height>a&&(a=i[s].height);e>0&&(a+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=a,t.rowHeight[r]<o.height+t.verticalPadding&&(t.rowHeight[r]=o.height+t.verticalPadding);var d=t.rowHeight[e]+t.rowHeight[r];t.height+=d-h,this.shiftToLastRow(t)}},E.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var t,e=[],r=!0;r;){var i=this.graphManager.getAllNodes(),o=[];r=!1;for(var n=0;n<i.length;n++)1!=(t=i[n]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(o.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var a=[],s=0;s<o.length;s++)1==o[s][0].getEdges().length&&(a.push(o[s]),o[s][0].getOwner().remove(o[s][0]));e.push(a),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},E.prototype.growTree=function(t){for(var e,r=t[t.length-1],i=0;i<r.length;i++)e=r[i],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(t){var e,r,i=t[0],o=(r=i==t[1].source?t[1].target:t[1].source).startX,n=r.finishX,a=r.startY,s=r.finishY,h=[0,0,0,0];if(a>0)for(var g=o;g<=n;g++)h[0]+=this.grid[g][a-1].length+this.grid[g][a].length-1;if(n<this.grid.length-1)for(g=a;g<=s;g++)h[1]+=this.grid[n+1][g].length+this.grid[n][g].length-1;if(s<this.grid[0].length-1)for(g=o;g<=n;g++)h[2]+=this.grid[g][s+1].length+this.grid[g][s].length-1;if(o>0)for(g=a;g<=s;g++)h[3]+=this.grid[o-1][g].length+this.grid[o][g].length-1;for(var l,p,c=u.MAX_VALUE,f=0;f<h.length;f++)h[f]<c?(c=h[f],l=1,p=f):h[f]==c&&l++;if(3==l&&0==c)0==h[0]&&0==h[1]&&0==h[2]?e=1:0==h[0]&&0==h[1]&&0==h[3]?e=0:0==h[0]&&0==h[2]&&0==h[3]?e=3:0==h[1]&&0==h[2]&&0==h[3]&&(e=2);else if(2==l&&0==c){var v=Math.floor(2*Math.random());e=0==h[0]&&0==h[1]?0==v?0:1:0==h[0]&&0==h[2]?0==v?0:2:0==h[0]&&0==h[3]?0==v?0:3:0==h[1]&&0==h[2]?0==v?1:2:0==h[1]&&0==h[3]?0==v?1:3:0==v?2:3}else e=4==l&&0==c?v=Math.floor(4*Math.random()):p;0==e?i.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-d.DEFAULT_EDGE_LENGTH-i.getHeight()/2):1==e?i.setCenter(r.getCenterX()+r.getWidth()/2+d.DEFAULT_EDGE_LENGTH+i.getWidth()/2,r.getCenterY()):2==e?i.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+d.DEFAULT_EDGE_LENGTH+i.getHeight()/2):i.setCenter(r.getCenterX()-r.getWidth()/2-d.DEFAULT_EDGE_LENGTH-i.getWidth()/2,r.getCenterY())},t.exports=E},function(t,e,r){var i={};i.layoutBase=r(0),i.CoSEConstants=r(1),i.CoSEEdge=r(2),i.CoSEGraph=r(3),i.CoSEGraphManager=r(4),i.CoSELayout=r(6),i.CoSENode=r(5),t.exports=i}])},o.exports=n(i.__require())),r.__module.exports;var o,n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("../../../../../_virtual/_commonjsHelpers.js"),i=require("../../../../../_virtual/cose-base2.js"),o=require("../../../layout-base@2.0.1/node_modules/layout-base/layout-base.js");i.__module.exports,exports.__require=function(){return t||(t=1,n=i.__module,i.__module.exports,e.commonjsGlobal,r=function(t){return e={45:(t,e,i)=>{var o={};o.layoutBase=i(551),o.CoSEConstants=i(806),o.CoSEEdge=i(767),o.CoSEGraph=i(880),o.CoSEGraphManager=i(578),o.CoSELayout=i(765),o.CoSENode=i(991),o.ConstraintHandler=i(902),t.exports=o},806:(t,e,i)=>{var o=i(551).FDLayoutConstants;function n(){}for(var r in o)n[r]=o[r];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,t.exports=n},767:(t,e,i)=>{var o=i(551).FDLayoutEdge;function n(t,e,i){o.call(this,t,e,i)}for(var r in n.prototype=Object.create(o.prototype),o)n[r]=o[r];t.exports=n},880:(t,e,i)=>{var o=i(551).LGraph;function n(t,e,i){o.call(this,t,e,i)}for(var r in n.prototype=Object.create(o.prototype),o)n[r]=o[r];t.exports=n},578:(t,e,i)=>{var o=i(551).LGraphManager;function n(t){o.call(this,t)}for(var r in n.prototype=Object.create(o.prototype),o)n[r]=o[r];t.exports=n},765:(t,e,i)=>{var o=i(551).FDLayout,n=i(578),r=i(880),a=i(991),s=i(767),h=i(806),l=i(902),d=i(551).FDLayoutConstants,g=i(551).LayoutConstants,c=i(551).Point,p=i(551).PointD,f=i(551).DimensionD,u=i(551).Layout,m=i(551).Integer,v=i(551).IGeometry,T=i(551).LGraph,N=i(551).Transform,E=i(551).LinkedList;function y(){o.call(this),this.toBeTiled={},this.constraints={}}for(var C in y.prototype=Object.create(o.prototype),o)y[C]=o[C];y.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},y.prototype.newGraph=function(t){return new r(null,this.graphManager,t)},y.prototype.newNode=function(t){return new a(this.graphManager,t)},y.prototype.newEdge=function(t){return new s(null,null,t)},y.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},y.prototype.initSpringEmbedder=function(){o.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},y.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,o=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,o),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var o=t[i].rect,n=t[i].id;e[n]={id:n,x:o.getCenterX(),y:o.getCenterY(),w:o.width,h:o.height}}return e},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===d.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},y.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},y.prototype.initConstraintVariables=function(){var t=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),i=0;i<e.length;i++){var o=e[i];this.idToNodeMap.set(o.id,o)}var n=function e(i){for(var o,n=i.getChild().getNodes(),r=0,a=0;a<n.length;a++)null==(o=n[a]).getChild()?t.fixedNodeSet.has(o.id)&&(r+=100):r+=e(o);return r};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach((function(e){t.fixedNodeSet.add(e.nodeId)})),e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)if(null!=(o=e[i]).getChild()){var r=n(o);r>0&&(o.fixedNodeWeight=r)}if(this.constraints.relativePlacementConstraint){var a=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i<l.length;i++)this.dummyToNodeForVerticalAlignment.set("dummy"+i,[]),l[i].forEach((function(e){a.set(e,"dummy"+i),t.dummyToNodeForVerticalAlignment.get("dummy"+i).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnHorizontal.add("dummy"+i)}))}if(this.constraints.alignmentConstraint.horizontal){var d=this.constraints.alignmentConstraint.horizontal;for(i=0;i<d.length;i++)this.dummyToNodeForHorizontalAlignment.set("dummy"+i,[]),d[i].forEach((function(e){s.set(e,"dummy"+i),t.dummyToNodeForHorizontalAlignment.get("dummy"+i).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnVertical.add("dummy"+i)}))}}if(h.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(t){var e,i,o;for(o=t.length-1;o>=2*t.length/3;o--)e=Math.floor(Math.random()*(o+1)),i=t[o],t[o]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var i=a.has(e.left)?a.get(e.left):e.left,o=a.has(e.right)?a.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(o)||(t.nodesInRelativeHorizontal.push(o),t.nodeToRelativeConstraintMapHorizontal.set(o,[]),t.dummyToNodeForVerticalAlignment.has(o)?t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(o)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(o).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:o,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(o).push({left:i,gap:e.gap})}else{var n=s.has(e.top)?s.get(e.top):e.top,r=s.has(e.bottom)?s.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(n)||(t.nodesInRelativeVertical.push(n),t.nodeToRelativeConstraintMapVertical.set(n,[]),t.dummyToNodeForHorizontalAlignment.has(n)?t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(n)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(n).getCenterY())),t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(n).push({bottom:r,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(r).push({top:n,gap:e.gap})}}));else{var g=new Map,c=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=a.has(t.left)?a.get(t.left):t.left,i=a.has(t.right)?a.get(t.right):t.right;g.has(e)?g.get(e).push(i):g.set(e,[i]),g.has(i)?g.get(i).push(e):g.set(i,[e])}else{var o=s.has(t.top)?s.get(t.top):t.top,n=s.has(t.bottom)?s.get(t.bottom):t.bottom;c.has(o)?c.get(o).push(n):c.set(o,[n]),c.has(n)?c.get(n).push(o):c.set(n,[o])}}));var p=function(t,e){var i=[],o=[],n=new E,r=new Set,a=0;return t.forEach((function(s,h){if(!r.has(h)){i[a]=[],o[a]=!1;var l=h;for(n.push(l),r.add(l),i[a].push(l);0!=n.length;)l=n.shift(),e.has(l)&&(o[a]=!0),t.get(l).forEach((function(t){r.has(t)||(n.push(t),r.add(t),i[a].push(t))}));a++}})),{components:i,isFixed:o}},f=p(g,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var u=p(c,t.fixedNodesOnVertical);this.componentsOnVertical=u.components,this.fixedComponentsOnVertical=u.isFixed}}},y.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i<e.length;i++){for(var o=0,n=0;n<e[i].length;n++){if(this.fixedNodeSet.has(e[i][n])){o=0;break}o+=this.idToNodeMap.get(e[i][n]).displacementX}var r=o/e[i].length;for(n=0;n<e[i].length;n++)this.idToNodeMap.get(e[i][n]).displacementX=r}if(this.constraints.alignmentConstraint.horizontal){var a=this.constraints.alignmentConstraint.horizontal;for(i=0;i<a.length;i++){var s=0;for(n=0;n<a[i].length;n++){if(this.fixedNodeSet.has(a[i][n])){s=0;break}s+=this.idToNodeMap.get(a[i][n]).displacementY}var l=s/a[i].length;for(n=0;n<a[i].length;n++)this.idToNodeMap.get(a[i][n]).displacementY=l}}}if(this.constraints.relativePlacementConstraint)if(h.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach((function(e){if(!t.fixedNodesOnHorizontal.has(e)){var i=0;i=t.dummyToNodeForVerticalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(e)[0]).displacementX:t.idToNodeMap.get(e).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(e).forEach((function(o){var n;o.right?(n=t.nodeToTempPositionMapHorizontal.get(o.right)-t.nodeToTempPositionMapHorizontal.get(e)-i)<o.gap&&(i-=o.gap-n):(n=t.nodeToTempPositionMapHorizontal.get(e)-t.nodeToTempPositionMapHorizontal.get(o.left)+i)<o.gap&&(i+=o.gap-n)})),t.nodeToTempPositionMapHorizontal.set(e,t.nodeToTempPositionMapHorizontal.get(e)+i),t.dummyToNodeForVerticalAlignment.has(e)?t.dummyToNodeForVerticalAlignment.get(e).forEach((function(e){t.idToNodeMap.get(e).displacementX=i})):t.idToNodeMap.get(e).displacementX=i}})),this.nodesInRelativeVertical.forEach((function(e){if(!t.fixedNodesOnHorizontal.has(e)){var i=0;i=t.dummyToNodeForHorizontalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(e)[0]).displacementY:t.idToNodeMap.get(e).displacementY,t.nodeToRelativeConstraintMapVertical.get(e).forEach((function(o){var n;o.bottom?(n=t.nodeToTempPositionMapVertical.get(o.bottom)-t.nodeToTempPositionMapVertical.get(e)-i)<o.gap&&(i-=o.gap-n):(n=t.nodeToTempPositionMapVertical.get(e)-t.nodeToTempPositionMapVertical.get(o.top)+i)<o.gap&&(i+=o.gap-n)})),t.nodeToTempPositionMapVertical.set(e,t.nodeToTempPositionMapVertical.get(e)+i),t.dummyToNodeForHorizontalAlignment.has(e)?t.dummyToNodeForHorizontalAlignment.get(e).forEach((function(e){t.idToNodeMap.get(e).displacementY=i})):t.idToNodeMap.get(e).displacementY=i}}));else{for(i=0;i<this.componentsOnHorizontal.length;i++){var d=this.componentsOnHorizontal[i];if(this.fixedComponentsOnHorizontal[i])for(n=0;n<d.length;n++)this.dummyToNodeForVerticalAlignment.has(d[n])?this.dummyToNodeForVerticalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementX=0})):this.idToNodeMap.get(d[n]).displacementX=0;else{var g=0,c=0;for(n=0;n<d.length;n++)this.dummyToNodeForVerticalAlignment.has(d[n])?(g+=(f=this.dummyToNodeForVerticalAlignment.get(d[n])).length*this.idToNodeMap.get(f[0]).displacementX,c+=f.length):(g+=this.idToNodeMap.get(d[n]).displacementX,c++);var p=g/c;for(n=0;n<d.length;n++)this.dummyToNodeForVerticalAlignment.has(d[n])?this.dummyToNodeForVerticalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementX=p})):this.idToNodeMap.get(d[n]).displacementX=p}}for(i=0;i<this.componentsOnVertical.length;i++)if(d=this.componentsOnVertical[i],this.fixedComponentsOnVertical[i])for(n=0;n<d.length;n++)this.dummyToNodeForHorizontalAlignment.has(d[n])?this.dummyToNodeForHorizontalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementY=0})):this.idToNodeMap.get(d[n]).displacementY=0;else{for(g=0,c=0,n=0;n<d.length;n++){var f;this.dummyToNodeForHorizontalAlignment.has(d[n])?(g+=(f=this.dummyToNodeForHorizontalAlignment.get(d[n])).length*this.idToNodeMap.get(f[0]).displacementY,c+=f.length):(g+=this.idToNodeMap.get(d[n]).displacementY,c++)}for(p=g/c,n=0;n<d.length;n++)this.dummyToNodeForHorizontalAlignment.has(d[n])?this.dummyToNodeForHorizontalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementY=p})):this.idToNodeMap.get(d[n]).displacementY=p}}},y.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,i=[],o=this.graphManager.getGraphs(),n=o.length;for(e=0;e<n;e++)(t=o[e]).updateConnected(),t.isConnected||(i=i.concat(t.getNodes()));return i},y.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,i=new Set;for(e=0;e<t.length;e++){var o=t[e];if(!i.has(o)){var n=o.getSource(),r=o.getTarget();if(n==r)o.getBendpoints().push(new p),o.getBendpoints().push(new p),this.createDummyNodesForBendpoints(o),i.add(o);else{var a=[];if(a=(a=a.concat(n.getEdgeListToNode(r))).concat(r.getEdgeListToNode(n)),!i.has(a[0])){var s;if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new p),this.createDummyNodesForBendpoints(h)}a.forEach((function(t){i.add(t)}))}}}if(i.size==t.length)break}},y.prototype.positionNodesRadially=function(t){for(var e=new c(0,0),i=Math.ceil(Math.sqrt(t.length)),o=0,n=0,r=0,a=new p(0,0),s=0;s<t.length;s++){s%i==0&&(r=0,n=o,0!=s&&(n+=h.DEFAULT_COMPONENT_SEPERATION),o=0);var l=t[s],d=u.findCenterOfTree(l);e.x=r,e.y=n,(a=y.radialLayout(l,d,e)).y>o&&(o=Math.floor(a.y)),r=Math.floor(a.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(g.WORLD_CENTER_X-a.x/2,g.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(t,e,i){var o=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(e,null,0,359,0,o);var n=T.calculateBounds(t),r=new N;r.setDeviceOrgX(n.getMinX()),r.setDeviceOrgY(n.getMinY()),r.setWorldOrgX(i.x),r.setWorldOrgY(i.y);for(var a=0;a<t.length;a++)t[a].transform(r);var s=new p(n.getMaxX(),n.getMaxY());return r.inverseTransformPoint(s)},y.branchRadialLayout=function(t,e,i,o,n,r){var a=(o-i+1)/2;a<0&&(a+=180);var s=(a+i)%360*v.TWO_PI/360,h=n*Math.cos(s),l=n*Math.sin(s);t.setCenter(h,l);var d=[],g=(d=d.concat(t.getEdges())).length;null!=e&&g--;for(var c,p=0,f=d.length,u=t.getEdgesBetween(e);u.length>1;){var m=u[0];u.splice(0,1);var T=d.indexOf(m);T>=0&&d.splice(T,1),f--,g--}c=null!=e?(d.indexOf(u[0])+1)%f:0;for(var N=Math.abs(o-i)/g,E=c;p!=g;E=++E%f){var C=d[E].getOtherEnd(t);if(C!=e){var M=(i+p*N)%360,w=(M+N)%360;y.branchRadialLayout(C,t,M,w,n+r,r),p++}}},y.maxDiagonalInTree=function(t){for(var e=m.MIN_VALUE,i=0;i<t.length;i++){var o=t[i].getDiagonal();o>e&&(e=o)}return e},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],o=this.graphManager.getAllNodes(),n=0;n<o.length;n++){var r=(s=o[n]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=r.id&&this.getToBeTiled(r)||i.push(s)}for(n=0;n<i.length;n++){var s,h=(s=i[n]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(s)}Object.keys(e).forEach((function(i){if(e[i].length>1){var o="DummyCompound_"+i;t.memberGroups[o]=e[i];var n=e[i][0].getParent(),r=new a(t.graphManager);r.id=o,r.paddingLeft=n.paddingLeft||0,r.paddingRight=n.paddingRight||0,r.paddingBottom=n.paddingBottom||0,r.paddingTop=n.paddingTop||0,t.idToDummyNode[o]=r;var s=t.getGraphManager().add(t.newGraph(),r),h=n.getChild();h.add(r);for(var l=0;l<e[i].length;l++){var d=e[i][l];h.remove(d),s.add(d)}}}))},y.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},y.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(i){var o=t.idToDummyNode[i];if(e[i]=t.tileNodes(t.memberGroups[i],o.paddingLeft+o.paddingRight),o.rect.width=e[i].width,o.rect.height=e[i].height,o.setCenter(e[i].centerX,e[i].centerY),o.labelMarginLeft=0,o.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var n=o.rect.width,r=o.rect.height;o.labelWidth&&("left"==o.labelPosHorizontal?(o.rect.x-=o.labelWidth,o.setWidth(n+o.labelWidth),o.labelMarginLeft=o.labelWidth):"center"==o.labelPosHorizontal&&o.labelWidth>n?(o.rect.x-=(o.labelWidth-n)/2,o.setWidth(o.labelWidth),o.labelMarginLeft=(o.labelWidth-n)/2):"right"==o.labelPosHorizontal&&o.setWidth(n+o.labelWidth)),o.labelHeight&&("top"==o.labelPosVertical?(o.rect.y-=o.labelHeight,o.setHeight(r+o.labelHeight),o.labelMarginTop=o.labelHeight):"center"==o.labelPosVertical&&o.labelHeight>r?(o.rect.y-=(o.labelHeight-r)/2,o.setHeight(o.labelHeight),o.labelMarginTop=(o.labelHeight-r)/2):"bottom"==o.labelPosVertical&&o.setHeight(r+o.labelHeight))}}))},y.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,o=e.paddingLeft,n=e.paddingTop,r=e.labelMarginLeft,a=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,o,n,r,a)}},y.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var o=t.idToDummyNode[i],n=o.paddingLeft,r=o.paddingTop,a=o.labelMarginLeft,s=o.labelMarginTop;t.adjustLocations(e[i],o.rect.x,o.rect.y,n,r,a,s)}))},y.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var o=i.getNodes(),n=0;n<o.length;n++){var r=o[n];if(this.getNodeDegree(r)>0)return this.toBeTiled[e]=!1,!1;if(null!=r.getChild()){if(!this.getToBeTiled(r))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[r.id]=!1}return this.toBeTiled[e]=!0,!0},y.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,o=0;o<e.length;o++){var n=e[o];n.getSource().id!==n.getTarget().id&&(i+=1)}return i},y.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var i=t.getChild().getNodes(),o=0;o<i.length;o++){var n=i[o];e+=this.getNodeDegreeWithChildren(n)}return e},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},y.prototype.adjustLocations=function(t,e,i,o,n,r,a){i+=n+a;for(var s=e+=o+r,h=0;h<t.rows.length;h++){var l=t.rows[h];e=s;for(var d=0,g=0;g<l.length;g++){var c=l[g];c.rect.x=e,c.rect.y=i,e+=c.rect.width+t.horizontalPadding,c.rect.height>d&&(d=c.rect.height)}i+=d+t.verticalPadding}},y.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(o){var n=e[o];if(i.tiledMemberPack[o]=i.tileNodes(t[o],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[o].width,n.rect.height=i.tiledMemberPack[o].height,n.setCenter(i.tiledMemberPack[o].centerX,i.tiledMemberPack[o].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var r=n.rect.width,a=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(r+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>r?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(a+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>a?(n.rect.y-=(n.labelHeight-a)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-a)/2):"bottom"==n.labelPosVertical&&n.setHeight(a+n.labelHeight))}}))},y.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),o=this.tileNodesByFavoringDim(t,e,!1),n=this.getOrgRatio(i);return this.getOrgRatio(o)<n?o:i},y.prototype.getOrgRatio=function(t){var e=t.width/t.height;return e<1&&(e=1/e),e},y.prototype.calcIdealRowWidth=function(t,e){var i=h.TILING_PADDING_VERTICAL,o=h.TILING_PADDING_HORIZONTAL,n=t.length,r=0,a=0,s=0;t.forEach((function(t){r+=t.getWidth(),a+=t.getHeight(),t.getWidth()>s&&(s=t.getWidth())}));var l,d=r/n,g=a/n,c=Math.pow(i-o,2)+4*(d+o)*(g+i)*n,p=(o-i+Math.sqrt(c))/(2*(d+o));e?(l=Math.ceil(p))==p&&l++:l=Math.floor(p);var f=l*(d+o)-o;return s>f&&(f=s),f+=2*o},y.prototype.tileNodesByFavoringDim=function(t,e,i){var o=h.TILING_PADDING_VERTICAL,n=h.TILING_PADDING_HORIZONTAL,r=h.TILING_COMPARE_BY,a={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:o,horizontalPadding:n,centerX:0,centerY:0};r&&(a.idealRowWidth=this.calcIdealRowWidth(t,i));var s=function(t){return t.rect.width*t.rect.height},l=function(t,e){return s(e)-s(t)};t.sort((function(t,e){var i=l;return a.idealRowWidth?(i=r)(t.id,e.id):i(t,e)}));for(var d=0,g=0,c=0;c<t.length;c++)d+=(p=t[c]).getCenterX(),g+=p.getCenterY();for(a.centerX=d/t.length,a.centerY=g/t.length,c=0;c<t.length;c++){var p=t[c];if(0==a.rows.length)this.insertNodeToRow(a,p,0,e);else if(this.canAddHorizontal(a,p.rect.width,p.rect.height)){var f=a.rows.length-1;a.idealRowWidth||(f=this.getShortestRowIndex(a)),this.insertNodeToRow(a,p,f,e)}else this.insertNodeToRow(a,p,a.rows.length,e);this.shiftToLastRow(a)}return a},y.prototype.insertNodeToRow=function(t,e,i,o){var n=o;i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var r=t.rowWidth[i]+e.rect.width;t.rows[i].length>0&&(r+=t.horizontalPadding),t.rowWidth[i]=r,t.width<r&&(t.width=r);var a=e.rect.height;i>0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[i]&&(s=t.rowHeight[i],t.rowHeight[i]=a,s=t.rowHeight[i]-s),t.height+=s,t.rows[i].push(e)},y.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]<i&&(e=o,i=t.rowWidth[o]);return e},y.prototype.getLongestRowIndex=function(t){for(var e=-1,i=Number.MIN_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]>i&&(e=o,i=t.rowWidth[o]);return e},y.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var o=t.rows.length-1;return t.rowWidth[o]+e+t.horizontalPadding<=t.idealRowWidth}var n=this.getShortestRowIndex(t);if(n<0)return!0;var r=t.rowWidth[n];if(r+t.horizontalPadding+e<=t.width)return!0;var a,s,h=0;return t.rowHeight[n]<i&&n>0&&(h=i+t.verticalPadding-t.rowHeight[n]),a=t.width-r>=e+t.horizontalPadding?(t.height+h)/(r+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(s=t.width<e?(t.height+h)/e:(t.height+h)/t.width)<1&&(s=1/s),a<1&&(a=1/a),a<s},y.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,o=t.rows[e],n=o[o.length-1],r=n.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>r&&e!=i){o.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-r,t.rowWidth[i]=t.rowWidth[i]+r,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<o.length;s++)o[s].height>a&&(a=o[s].height);e>0&&(a+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=a,t.rowHeight[i]<n.height+t.verticalPadding&&(t.rowHeight[i]=n.height+t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[i];t.height+=l-h,this.shiftToLastRow(t)}},y.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var t,e=[],i=!0;i;){var o=this.graphManager.getAllNodes(),n=[];i=!1;for(var r=0;r<o.length;r++)if(1==(t=o[r]).getEdges().length&&!t.getEdges()[0].isInterGraph&&null==t.getChild()){if(h.PURE_INCREMENTAL){var a=t.getEdges()[0].getOtherEnd(t),s=new f(t.getCenterX()-a.getCenterX(),t.getCenterY()-a.getCenterY());n.push([t,t.getEdges()[0],t.getOwner(),s])}else n.push([t,t.getEdges()[0],t.getOwner()]);i=!0}if(1==i){for(var l=[],d=0;d<n.length;d++)1==n[d][0].getEdges().length&&(l.push(n[d]),n[d][0].getOwner().remove(n[d][0]));e.push(l),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},y.prototype.growTree=function(t){for(var e,i=t[t.length-1],o=0;o<i.length;o++)e=i[o],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(t){var e,i,o=t[0];if(i=o==t[1].source?t[1].target:t[1].source,h.PURE_INCREMENTAL)o.setCenter(i.getCenterX()+t[3].getWidth(),i.getCenterY()+t[3].getHeight());else{var n=i.startX,r=i.finishX,a=i.startY,s=i.finishY,l=[0,0,0,0];if(a>0)for(var g=n;g<=r;g++)l[0]+=this.grid[g][a-1].length+this.grid[g][a].length-1;if(r<this.grid.length-1)for(g=a;g<=s;g++)l[1]+=this.grid[r+1][g].length+this.grid[r][g].length-1;if(s<this.grid[0].length-1)for(g=n;g<=r;g++)l[2]+=this.grid[g][s+1].length+this.grid[g][s].length-1;if(n>0)for(g=a;g<=s;g++)l[3]+=this.grid[n-1][g].length+this.grid[n][g].length-1;for(var c,p,f=m.MAX_VALUE,u=0;u<l.length;u++)l[u]<f?(f=l[u],c=1,p=u):l[u]==f&&c++;if(3==c&&0==f)0==l[0]&&0==l[1]&&0==l[2]?e=1:0==l[0]&&0==l[1]&&0==l[3]?e=0:0==l[0]&&0==l[2]&&0==l[3]?e=3:0==l[1]&&0==l[2]&&0==l[3]&&(e=2);else if(2==c&&0==f){var v=Math.floor(2*Math.random());e=0==l[0]&&0==l[1]?0==v?0:1:0==l[0]&&0==l[2]?0==v?0:2:0==l[0]&&0==l[3]?0==v?0:3:0==l[1]&&0==l[2]?0==v?1:2:0==l[1]&&0==l[3]?0==v?1:3:0==v?2:3}else e=4==c&&0==f?v=Math.floor(4*Math.random()):p;0==e?o.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-d.DEFAULT_EDGE_LENGTH-o.getHeight()/2):1==e?o.setCenter(i.getCenterX()+i.getWidth()/2+d.DEFAULT_EDGE_LENGTH+o.getWidth()/2,i.getCenterY()):2==e?o.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+d.DEFAULT_EDGE_LENGTH+o.getHeight()/2):o.setCenter(i.getCenterX()-i.getWidth()/2-d.DEFAULT_EDGE_LENGTH-o.getWidth()/2,i.getCenterY())}},t.exports=y},991:(t,e,i)=>{var o=i(551).FDLayoutNode,n=i(551).IMath;function r(t,e,i,n){o.call(this,t,e,i,n)}for(var a in r.prototype=Object.create(o.prototype),o)r[a]=o[a];r.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},r.prototype.propogateDisplacementToChildren=function(t,e){for(var i,o=this.getChild().getNodes(),n=0;n<o.length;n++)null==(i=o[n]).getChild()?(i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},r.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.setPred1=function(t){this.pred1=t},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(t){this.next=t},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(t){this.processed=t},r.prototype.isProcessed=function(){return processed},t.exports=r},902:(t,e,i)=>{function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var n=i(806),r=i(551).LinkedList,a=i(551).Matrix,s=i(551).SVD;function h(){}h.handleConstraints=function(t){var e={};e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var i=new Map,h=new Map,l=[],d=[],g=t.getAllNodes(),c=0,p=0;p<g.length;p++){var f=g[p];null==f.getChild()&&(h.set(f.id,c++),l.push(f.getCenterX()),d.push(f.getCenterY()),i.set(f.id,f))}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach((function(t){t.gap||0==t.gap||(t.left?t.gap=n.DEFAULT_EDGE_LENGTH+i.get(t.left).getWidth()/2+i.get(t.right).getWidth()/2:t.gap=n.DEFAULT_EDGE_LENGTH+i.get(t.top).getHeight()/2+i.get(t.bottom).getHeight()/2)}));var u=function(t){var e=0,i=0;return t.forEach((function(t){e+=l[h.get(t)],i+=d[h.get(t)]})),{x:e/t.size,y:i/t.size}},m=function(t,e,i,n,a){var s=new Map;t.forEach((function(t,e){s.set(e,0)})),t.forEach((function(t,e){t.forEach((function(t){s.set(t.id,s.get(t.id)+1)}))}));var g=new Map,c=new Map,p=new r;s.forEach((function(t,o){0==t?(p.push(o),i||("horizontal"==e?g.set(o,h.has(o)?l[h.get(o)]:n.get(o)):g.set(o,h.has(o)?d[h.get(o)]:n.get(o)))):g.set(o,Number.NEGATIVE_INFINITY),i&&c.set(o,new Set([o]))})),i&&a.forEach((function(t){var o=[];if(t.forEach((function(t){i.has(t)&&o.push(t)})),o.length>0){var r=0;o.forEach((function(t){"horizontal"==e?(g.set(t,h.has(t)?l[h.get(t)]:n.get(t)),r+=g.get(t)):(g.set(t,h.has(t)?d[h.get(t)]:n.get(t)),r+=g.get(t))})),r/=o.length,t.forEach((function(t){i.has(t)||g.set(t,r)}))}else{var a=0;t.forEach((function(t){a+="horizontal"==e?h.has(t)?l[h.get(t)]:n.get(t):h.has(t)?d[h.get(t)]:n.get(t)})),a/=t.length,t.forEach((function(t){g.set(t,a)}))}}));for(var f=function(){var o=p.shift();t.get(o).forEach((function(t){if(g.get(t.id)<g.get(o)+t.gap)if(i&&i.has(t.id)){var r=void 0;if(r="horizontal"==e?h.has(t.id)?l[h.get(t.id)]:n.get(t.id):h.has(t.id)?d[h.get(t.id)]:n.get(t.id),g.set(t.id,r),r<g.get(o)+t.gap){var a=g.get(o)+t.gap-r;c.get(o).forEach((function(t){g.set(t,g.get(t)-a)}))}}else g.set(t.id,g.get(o)+t.gap);s.set(t.id,s.get(t.id)-1),0==s.get(t.id)&&p.push(t.id),i&&c.set(t.id,function(t,e){var i=new Set(t),o=!0,n=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var h=a.value;i.add(h)}}catch(t){n=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(n)throw r}}return i}(c.get(o),c.get(t.id)))}))};0!=p.length;)f();if(i){var u=new Set;t.forEach((function(t,e){0==t.length&&u.add(e)}));var m=[];c.forEach((function(t,e){if(u.has(e)){var n=!1,r=!0,a=!1,s=void 0;try{for(var h,l=t[Symbol.iterator]();!(r=(h=l.next()).done);r=!0){var d=h.value;i.has(d)&&(n=!0)}}catch(t){a=!0,s=t}finally{try{!r&&l.return&&l.return()}finally{if(a)throw s}}if(!n){var g=!1,c=void 0;m.forEach((function(e,i){e.has([].concat(o(t))[0])&&(g=!0,c=i)})),g?t.forEach((function(t){m[c].add(t)})):m.push(new Set(t))}}})),m.forEach((function(t,i){var o=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=!0,p=!1,f=void 0;try{for(var u,m=t[Symbol.iterator]();!(c=(u=m.next()).done);c=!0){var v=u.value,T=void 0;T="horizontal"==e?h.has(v)?l[h.get(v)]:n.get(v):h.has(v)?d[h.get(v)]:n.get(v);var N=g.get(v);T<o&&(o=T),T>a&&(a=T),N<r&&(r=N),N>s&&(s=N)}}catch(t){p=!0,f=t}finally{try{!c&&m.return&&m.return()}finally{if(p)throw f}}var E=(o+a)/2-(r+s)/2,y=!0,C=!1,M=void 0;try{for(var w,A=t[Symbol.iterator]();!(y=(w=A.next()).done);y=!0){var I=w.value;g.set(I,g.get(I)+E)}}catch(t){C=!0,M=t}finally{try{!y&&A.return&&A.return()}finally{if(C)throw M}}}))}return g},v=function(t){var e=0,i=0,o=0,n=0;if(t.forEach((function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:d[h.get(t.top)]-d[h.get(t.bottom)]>=0?o++:n++})),e>i&&o>n)for(var r=0;r<h.size;r++)l[r]=-1*l[r],d[r]=-1*d[r];else if(e>i)for(var a=0;a<h.size;a++)l[a]=-1*l[a];else if(o>n)for(var s=0;s<h.size;s++)d[s]=-1*d[s]},T=function(t){var e=[],i=new r,o=new Set,n=0;return t.forEach((function(r,a){if(!o.has(a)){e[n]=[];var s=a;for(i.push(s),o.add(s),e[n].push(s);0!=i.length;)s=i.shift(),t.get(s).forEach((function(t){o.has(t.id)||(i.push(t.id),o.add(t.id),e[n].push(t.id))}));n++}})),e},N=function(t){var e=new Map;return t.forEach((function(t,i){e.set(i,[])})),t.forEach((function(t,i){t.forEach((function(t){e.get(i).push(t),e.get(t.id).push({id:i,gap:t.gap,direction:t.direction})}))})),e},E=function(t){var e=new Map;return t.forEach((function(t,i){e.set(i,[])})),t.forEach((function(t,i){t.forEach((function(t){e.get(t.id).push({id:i,gap:t.gap,direction:t.direction})}))})),e},y=[],C=[],M=!1,w=!1,A=new Set,I=new Map,L=new Map,_=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach((function(t){A.add(t.nodeId)})),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach((function(t){t.left?(I.has(t.left)?I.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):I.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),I.has(t.right)||I.set(t.right,[])):(I.has(t.top)?I.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):I.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),I.has(t.bottom)||I.set(t.bottom,[]))})),L=N(I),_=T(L)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>1)e.fixedNodeConstraint.forEach((function(t,e){y[e]=[t.position.x,t.position.y],C[e]=[l[h.get(t.nodeId)],d[h.get(t.nodeId)]]})),M=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,n=function(e){var n=new Set;i[e].forEach((function(t){n.add(t)}));var r=new Set([].concat(o(n)).filter((function(t){return A.has(t)}))),a=void 0;a=r.size>0?l[h.get(r.values().next().value)]:u(n).x,i[e].forEach((function(e){y[t]=[a,d[h.get(e)]],C[t]=[l[h.get(e)],d[h.get(e)]],t++}))},r=0;r<i.length;r++)n(r);M=!0}if(e.alignmentConstraint.horizontal){for(var a=e.alignmentConstraint.horizontal,s=function(e){var i=new Set;a[e].forEach((function(t){i.add(t)}));var n=new Set([].concat(o(i)).filter((function(t){return A.has(t)}))),r=void 0;r=n.size>0?l[h.get(n.values().next().value)]:u(i).y,a[e].forEach((function(e){y[t]=[l[h.get(e)],r],C[t]=[l[h.get(e)],d[h.get(e)]],t++}))},g=0;g<a.length;g++)s(g);M=!0}e.relativePlacementConstraint&&(w=!0)}();else if(e.relativePlacementConstraint){for(var b=0,F=0,O=0;O<_.length;O++)_[O].length>b&&(b=_[O].length,F=O);if(b<L.size/2)v(e.relativePlacementConstraint),M=!1,w=!1;else{var R=new Map,P=new Map,x=[];_[F].forEach((function(t){I.get(t).forEach((function(e){"horizontal"==e.direction?(R.has(t)?R.get(t).push(e):R.set(t,[e]),R.has(e.id)||R.set(e.id,[]),x.push({left:t,right:e.id})):(P.has(t)?P.get(t).push(e):P.set(t,[e]),P.has(e.id)||P.set(e.id,[]),x.push({top:t,bottom:e.id}))}))})),v(x),w=!1;var D=m(R,"horizontal"),H=m(P,"vertical");_[F].forEach((function(t,e){C[e]=[l[h.get(t)],d[h.get(t)]],y[e]=[],D.has(t)?y[e][0]=D.get(t):y[e][0]=l[h.get(t)],H.has(t)?y[e][1]=H.get(t):y[e][1]=d[h.get(t)]})),M=!0}}if(M){for(var G,z=a.transpose(y),S=a.transpose(C),V=0;V<z.length;V++)z[V]=a.multGamma(z[V]),S[V]=a.multGamma(S[V]);var W=a.multMat(z,a.transpose(S)),Y=s.svd(W);G=a.multMat(Y.V,a.transpose(Y.U));for(var X=0;X<h.size;X++){var U=[l[X],d[X]],B=[G[0][0],G[1][0]],k=[G[0][1],G[1][1]];l[X]=a.dotProduct(U,B),d[X]=a.dotProduct(U,k)}w&&v(e.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>0){var j={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var i,o,n={x:l[h.get(t.nodeId)],y:d[h.get(t.nodeId)]},r=t.position,a=(o=n,{x:(i=r).x-o.x,y:i.y-o.y});j.x+=a.x,j.y+=a.y})),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach((function(t,e){l[e]+=j.x})),d.forEach((function(t,e){d[e]+=j.y})),e.fixedNodeConstraint.forEach((function(t){l[h.get(t.nodeId)]=t.position.x,d[h.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var Z=e.alignmentConstraint.vertical,q=function(t){var e=new Set;Z[t].forEach((function(t){e.add(t)}));var i=new Set([].concat(o(e)).filter((function(t){return A.has(t)}))),n=void 0;n=i.size>0?l[h.get(i.values().next().value)]:u(e).x,e.forEach((function(t){A.has(t)||(l[h.get(t)]=n)}))},K=0;K<Z.length;K++)q(K);if(e.alignmentConstraint.horizontal)for(var Q=e.alignmentConstraint.horizontal,J=function(t){var e=new Set;Q[t].forEach((function(t){e.add(t)}));var i=new Set([].concat(o(e)).filter((function(t){return A.has(t)}))),n=void 0;n=i.size>0?d[h.get(i.values().next().value)]:u(e).y,e.forEach((function(t){A.has(t)||(d[h.get(t)]=n)}))},$=0;$<Q.length;$++)J($)}e.relativePlacementConstraint&&function(){var t=new Map,i=new Map,o=new Map,n=new Map,r=new Map,a=new Map,s=new Set,g=new Set;if(A.forEach((function(t){s.add(t),g.add(t)})),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var c=e.alignmentConstraint.vertical,p=function(e){o.set("dummy"+e,[]),c[e].forEach((function(i){t.set(i,"dummy"+e),o.get("dummy"+e).push(i),A.has(i)&&s.add("dummy"+e)})),r.set("dummy"+e,l[h.get(c[e][0])])},f=0;f<c.length;f++)p(f);if(e.alignmentConstraint.horizontal)for(var u=e.alignmentConstraint.horizontal,v=function(t){n.set("dummy"+t,[]),u[t].forEach((function(e){i.set(e,"dummy"+t),n.get("dummy"+t).push(e),A.has(e)&&g.add("dummy"+t)})),a.set("dummy"+t,d[h.get(u[t][0])])},y=0;y<u.length;y++)v(y)}var C=new Map,M=new Map,w=function(e){I.get(e).forEach((function(o){var n=void 0,r=void 0;"horizontal"==o.direction?(n=t.get(e)?t.get(e):e,r=t.get(o.id)?{id:t.get(o.id),gap:o.gap,direction:o.direction}:o,C.has(n)?C.get(n).push(r):C.set(n,[r]),C.has(r.id)||C.set(r.id,[])):(n=i.get(e)?i.get(e):e,r=i.get(o.id)?{id:i.get(o.id),gap:o.gap,direction:o.direction}:o,M.has(n)?M.get(n).push(r):M.set(n,[r]),M.has(r.id)||M.set(r.id,[]))}))},L=!0,_=!1,b=void 0;try{for(var F,O=I.keys()[Symbol.iterator]();!(L=(F=O.next()).done);L=!0)w(F.value)}catch(t){_=!0,b=t}finally{try{!L&&O.return&&O.return()}finally{if(_)throw b}}var R=N(C),P=N(M),x=T(R),D=T(P),H=E(C),G=E(M),z=[],S=[];x.forEach((function(t,e){z[e]=[],t.forEach((function(t){0==H.get(t).length&&z[e].push(t)}))})),D.forEach((function(t,e){S[e]=[],t.forEach((function(t){0==G.get(t).length&&S[e].push(t)}))}));var V=m(C,"horizontal",s,r,z),W=m(M,"vertical",g,a,S),Y=function(t){o.get(t)?o.get(t).forEach((function(e){l[h.get(e)]=V.get(t)})):l[h.get(t)]=V.get(t)},X=!0,U=!1,B=void 0;try{for(var k,j=V.keys()[Symbol.iterator]();!(X=(k=j.next()).done);X=!0)Y(k.value)}catch(t){U=!0,B=t}finally{try{!X&&j.return&&j.return()}finally{if(U)throw B}}var Z=function(t){n.get(t)?n.get(t).forEach((function(e){d[h.get(e)]=W.get(t)})):d[h.get(t)]=W.get(t)},q=!0,K=!1,Q=void 0;try{for(var J,$=W.keys()[Symbol.iterator]();!(q=(J=$.next()).done);q=!0)Z(J.value)}catch(t){K=!0,Q=t}finally{try{!q&&$.return&&$.return()}finally{if(K)throw Q}}}()}for(var tt=0;tt<g.length;tt++){var et=g[tt];null==et.getChild()&&et.setCenter(l[h.get(et.id)],d[h.get(et.id)])}},t.exports=h},551:e=>{e.exports=t}},i={},o=function t(o){var n=i[o];if(void 0!==n)return n.exports;var r=i[o]={exports:{}};return e[o](r,r.exports,t),r.exports}(45),o;var e,i,o},n.exports=r(o.__require())),i.__module.exports;var n,r};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("../../../../../_virtual/_commonjsHelpers.js"),i=require("../../../../../_virtual/cose-base.js"),o=require("../../../layout-base@2.0.1/node_modules/layout-base/layout-base.js");i.__module.exports,exports.__require=function(){return t||(t=1,n=i.__module,i.__module.exports,e.commonjsGlobal,r=function(t){return e={45:(t,e,i)=>{var o={};o.layoutBase=i(551),o.CoSEConstants=i(806),o.CoSEEdge=i(767),o.CoSEGraph=i(880),o.CoSEGraphManager=i(578),o.CoSELayout=i(765),o.CoSENode=i(991),o.ConstraintHandler=i(902),t.exports=o},806:(t,e,i)=>{var o=i(551).FDLayoutConstants;function n(){}for(var r in o)n[r]=o[r];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=o.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,t.exports=n},767:(t,e,i)=>{var o=i(551).FDLayoutEdge;function n(t,e,i){o.call(this,t,e,i)}for(var r in n.prototype=Object.create(o.prototype),o)n[r]=o[r];t.exports=n},880:(t,e,i)=>{var o=i(551).LGraph;function n(t,e,i){o.call(this,t,e,i)}for(var r in n.prototype=Object.create(o.prototype),o)n[r]=o[r];t.exports=n},578:(t,e,i)=>{var o=i(551).LGraphManager;function n(t){o.call(this,t)}for(var r in n.prototype=Object.create(o.prototype),o)n[r]=o[r];t.exports=n},765:(t,e,i)=>{var o=i(551).FDLayout,n=i(578),r=i(880),a=i(991),s=i(767),h=i(806),l=i(902),d=i(551).FDLayoutConstants,g=i(551).LayoutConstants,c=i(551).Point,p=i(551).PointD,f=i(551).DimensionD,u=i(551).Layout,m=i(551).Integer,v=i(551).IGeometry,T=i(551).LGraph,N=i(551).Transform,E=i(551).LinkedList;function y(){o.call(this),this.toBeTiled={},this.constraints={}}for(var C in y.prototype=Object.create(o.prototype),o)y[C]=o[C];y.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},y.prototype.newGraph=function(t){return new r(null,this.graphManager,t)},y.prototype.newNode=function(t){return new a(this.graphManager,t)},y.prototype.newEdge=function(t){return new s(null,null,t)},y.prototype.initParameters=function(){o.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},y.prototype.initSpringEmbedder=function(){o.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},y.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,o=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,o),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var o=t[i].rect,n=t[i].id;e[n]={id:n,x:o.getCenterX(),y:o.getCenterY(),w:o.width,h:o.height}}return e},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===d.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},y.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},y.prototype.initConstraintVariables=function(){var t=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),i=0;i<e.length;i++){var o=e[i];this.idToNodeMap.set(o.id,o)}var n=function e(i){for(var o,n=i.getChild().getNodes(),r=0,a=0;a<n.length;a++)null==(o=n[a]).getChild()?t.fixedNodeSet.has(o.id)&&(r+=100):r+=e(o);return r};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach((function(e){t.fixedNodeSet.add(e.nodeId)})),e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)if(null!=(o=e[i]).getChild()){var r=n(o);r>0&&(o.fixedNodeWeight=r)}if(this.constraints.relativePlacementConstraint){var a=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i<l.length;i++)this.dummyToNodeForVerticalAlignment.set("dummy"+i,[]),l[i].forEach((function(e){a.set(e,"dummy"+i),t.dummyToNodeForVerticalAlignment.get("dummy"+i).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnHorizontal.add("dummy"+i)}))}if(this.constraints.alignmentConstraint.horizontal){var d=this.constraints.alignmentConstraint.horizontal;for(i=0;i<d.length;i++)this.dummyToNodeForHorizontalAlignment.set("dummy"+i,[]),d[i].forEach((function(e){s.set(e,"dummy"+i),t.dummyToNodeForHorizontalAlignment.get("dummy"+i).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnVertical.add("dummy"+i)}))}}if(h.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(t){var e,i,o;for(o=t.length-1;o>=2*t.length/3;o--)e=Math.floor(Math.random()*(o+1)),i=t[o],t[o]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var i=a.has(e.left)?a.get(e.left):e.left,o=a.has(e.right)?a.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(o)||(t.nodesInRelativeHorizontal.push(o),t.nodeToRelativeConstraintMapHorizontal.set(o,[]),t.dummyToNodeForVerticalAlignment.has(o)?t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(o)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(o,t.idToNodeMap.get(o).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:o,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(o).push({left:i,gap:e.gap})}else{var n=s.has(e.top)?s.get(e.top):e.top,r=s.has(e.bottom)?s.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(n)||(t.nodesInRelativeVertical.push(n),t.nodeToRelativeConstraintMapVertical.set(n,[]),t.dummyToNodeForHorizontalAlignment.has(n)?t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(n)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(n).getCenterY())),t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(n).push({bottom:r,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(r).push({top:n,gap:e.gap})}}));else{var g=new Map,c=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=a.has(t.left)?a.get(t.left):t.left,i=a.has(t.right)?a.get(t.right):t.right;g.has(e)?g.get(e).push(i):g.set(e,[i]),g.has(i)?g.get(i).push(e):g.set(i,[e])}else{var o=s.has(t.top)?s.get(t.top):t.top,n=s.has(t.bottom)?s.get(t.bottom):t.bottom;c.has(o)?c.get(o).push(n):c.set(o,[n]),c.has(n)?c.get(n).push(o):c.set(n,[o])}}));var p=function(t,e){var i=[],o=[],n=new E,r=new Set,a=0;return t.forEach((function(s,h){if(!r.has(h)){i[a]=[],o[a]=!1;var l=h;for(n.push(l),r.add(l),i[a].push(l);0!=n.length;)l=n.shift(),e.has(l)&&(o[a]=!0),t.get(l).forEach((function(t){r.has(t)||(n.push(t),r.add(t),i[a].push(t))}));a++}})),{components:i,isFixed:o}},f=p(g,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var u=p(c,t.fixedNodesOnVertical);this.componentsOnVertical=u.components,this.fixedComponentsOnVertical=u.isFixed}}},y.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i<e.length;i++){for(var o=0,n=0;n<e[i].length;n++){if(this.fixedNodeSet.has(e[i][n])){o=0;break}o+=this.idToNodeMap.get(e[i][n]).displacementX}var r=o/e[i].length;for(n=0;n<e[i].length;n++)this.idToNodeMap.get(e[i][n]).displacementX=r}if(this.constraints.alignmentConstraint.horizontal){var a=this.constraints.alignmentConstraint.horizontal;for(i=0;i<a.length;i++){var s=0;for(n=0;n<a[i].length;n++){if(this.fixedNodeSet.has(a[i][n])){s=0;break}s+=this.idToNodeMap.get(a[i][n]).displacementY}var l=s/a[i].length;for(n=0;n<a[i].length;n++)this.idToNodeMap.get(a[i][n]).displacementY=l}}}if(this.constraints.relativePlacementConstraint)if(h.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach((function(e){if(!t.fixedNodesOnHorizontal.has(e)){var i=0;i=t.dummyToNodeForVerticalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(e)[0]).displacementX:t.idToNodeMap.get(e).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(e).forEach((function(o){var n;o.right?(n=t.nodeToTempPositionMapHorizontal.get(o.right)-t.nodeToTempPositionMapHorizontal.get(e)-i)<o.gap&&(i-=o.gap-n):(n=t.nodeToTempPositionMapHorizontal.get(e)-t.nodeToTempPositionMapHorizontal.get(o.left)+i)<o.gap&&(i+=o.gap-n)})),t.nodeToTempPositionMapHorizontal.set(e,t.nodeToTempPositionMapHorizontal.get(e)+i),t.dummyToNodeForVerticalAlignment.has(e)?t.dummyToNodeForVerticalAlignment.get(e).forEach((function(e){t.idToNodeMap.get(e).displacementX=i})):t.idToNodeMap.get(e).displacementX=i}})),this.nodesInRelativeVertical.forEach((function(e){if(!t.fixedNodesOnHorizontal.has(e)){var i=0;i=t.dummyToNodeForHorizontalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(e)[0]).displacementY:t.idToNodeMap.get(e).displacementY,t.nodeToRelativeConstraintMapVertical.get(e).forEach((function(o){var n;o.bottom?(n=t.nodeToTempPositionMapVertical.get(o.bottom)-t.nodeToTempPositionMapVertical.get(e)-i)<o.gap&&(i-=o.gap-n):(n=t.nodeToTempPositionMapVertical.get(e)-t.nodeToTempPositionMapVertical.get(o.top)+i)<o.gap&&(i+=o.gap-n)})),t.nodeToTempPositionMapVertical.set(e,t.nodeToTempPositionMapVertical.get(e)+i),t.dummyToNodeForHorizontalAlignment.has(e)?t.dummyToNodeForHorizontalAlignment.get(e).forEach((function(e){t.idToNodeMap.get(e).displacementY=i})):t.idToNodeMap.get(e).displacementY=i}}));else{for(i=0;i<this.componentsOnHorizontal.length;i++){var d=this.componentsOnHorizontal[i];if(this.fixedComponentsOnHorizontal[i])for(n=0;n<d.length;n++)this.dummyToNodeForVerticalAlignment.has(d[n])?this.dummyToNodeForVerticalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementX=0})):this.idToNodeMap.get(d[n]).displacementX=0;else{var g=0,c=0;for(n=0;n<d.length;n++)this.dummyToNodeForVerticalAlignment.has(d[n])?(g+=(f=this.dummyToNodeForVerticalAlignment.get(d[n])).length*this.idToNodeMap.get(f[0]).displacementX,c+=f.length):(g+=this.idToNodeMap.get(d[n]).displacementX,c++);var p=g/c;for(n=0;n<d.length;n++)this.dummyToNodeForVerticalAlignment.has(d[n])?this.dummyToNodeForVerticalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementX=p})):this.idToNodeMap.get(d[n]).displacementX=p}}for(i=0;i<this.componentsOnVertical.length;i++)if(d=this.componentsOnVertical[i],this.fixedComponentsOnVertical[i])for(n=0;n<d.length;n++)this.dummyToNodeForHorizontalAlignment.has(d[n])?this.dummyToNodeForHorizontalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementY=0})):this.idToNodeMap.get(d[n]).displacementY=0;else{for(g=0,c=0,n=0;n<d.length;n++){var f;this.dummyToNodeForHorizontalAlignment.has(d[n])?(g+=(f=this.dummyToNodeForHorizontalAlignment.get(d[n])).length*this.idToNodeMap.get(f[0]).displacementY,c+=f.length):(g+=this.idToNodeMap.get(d[n]).displacementY,c++)}for(p=g/c,n=0;n<d.length;n++)this.dummyToNodeForHorizontalAlignment.has(d[n])?this.dummyToNodeForHorizontalAlignment.get(d[n]).forEach((function(e){t.idToNodeMap.get(e).displacementY=p})):this.idToNodeMap.get(d[n]).displacementY=p}}},y.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,i=[],o=this.graphManager.getGraphs(),n=o.length;for(e=0;e<n;e++)(t=o[e]).updateConnected(),t.isConnected||(i=i.concat(t.getNodes()));return i},y.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,i=new Set;for(e=0;e<t.length;e++){var o=t[e];if(!i.has(o)){var n=o.getSource(),r=o.getTarget();if(n==r)o.getBendpoints().push(new p),o.getBendpoints().push(new p),this.createDummyNodesForBendpoints(o),i.add(o);else{var a=[];if(a=(a=a.concat(n.getEdgeListToNode(r))).concat(r.getEdgeListToNode(n)),!i.has(a[0])){var s;if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new p),this.createDummyNodesForBendpoints(h)}a.forEach((function(t){i.add(t)}))}}}if(i.size==t.length)break}},y.prototype.positionNodesRadially=function(t){for(var e=new c(0,0),i=Math.ceil(Math.sqrt(t.length)),o=0,n=0,r=0,a=new p(0,0),s=0;s<t.length;s++){s%i==0&&(r=0,n=o,0!=s&&(n+=h.DEFAULT_COMPONENT_SEPERATION),o=0);var l=t[s],d=u.findCenterOfTree(l);e.x=r,e.y=n,(a=y.radialLayout(l,d,e)).y>o&&(o=Math.floor(a.y)),r=Math.floor(a.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(g.WORLD_CENTER_X-a.x/2,g.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(t,e,i){var o=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(e,null,0,359,0,o);var n=T.calculateBounds(t),r=new N;r.setDeviceOrgX(n.getMinX()),r.setDeviceOrgY(n.getMinY()),r.setWorldOrgX(i.x),r.setWorldOrgY(i.y);for(var a=0;a<t.length;a++)t[a].transform(r);var s=new p(n.getMaxX(),n.getMaxY());return r.inverseTransformPoint(s)},y.branchRadialLayout=function(t,e,i,o,n,r){var a=(o-i+1)/2;a<0&&(a+=180);var s=(a+i)%360*v.TWO_PI/360,h=n*Math.cos(s),l=n*Math.sin(s);t.setCenter(h,l);var d=[],g=(d=d.concat(t.getEdges())).length;null!=e&&g--;for(var c,p=0,f=d.length,u=t.getEdgesBetween(e);u.length>1;){var m=u[0];u.splice(0,1);var T=d.indexOf(m);T>=0&&d.splice(T,1),f--,g--}c=null!=e?(d.indexOf(u[0])+1)%f:0;for(var N=Math.abs(o-i)/g,E=c;p!=g;E=++E%f){var C=d[E].getOtherEnd(t);if(C!=e){var M=(i+p*N)%360,w=(M+N)%360;y.branchRadialLayout(C,t,M,w,n+r,r),p++}}},y.maxDiagonalInTree=function(t){for(var e=m.MIN_VALUE,i=0;i<t.length;i++){var o=t[i].getDiagonal();o>e&&(e=o)}return e},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],o=this.graphManager.getAllNodes(),n=0;n<o.length;n++){var r=(s=o[n]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=r.id&&this.getToBeTiled(r)||i.push(s)}for(n=0;n<i.length;n++){var s,h=(s=i[n]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(s)}Object.keys(e).forEach((function(i){if(e[i].length>1){var o="DummyCompound_"+i;t.memberGroups[o]=e[i];var n=e[i][0].getParent(),r=new a(t.graphManager);r.id=o,r.paddingLeft=n.paddingLeft||0,r.paddingRight=n.paddingRight||0,r.paddingBottom=n.paddingBottom||0,r.paddingTop=n.paddingTop||0,t.idToDummyNode[o]=r;var s=t.getGraphManager().add(t.newGraph(),r),h=n.getChild();h.add(r);for(var l=0;l<e[i].length;l++){var d=e[i][l];h.remove(d),s.add(d)}}}))},y.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},y.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(i){var o=t.idToDummyNode[i];if(e[i]=t.tileNodes(t.memberGroups[i],o.paddingLeft+o.paddingRight),o.rect.width=e[i].width,o.rect.height=e[i].height,o.setCenter(e[i].centerX,e[i].centerY),o.labelMarginLeft=0,o.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var n=o.rect.width,r=o.rect.height;o.labelWidth&&("left"==o.labelPosHorizontal?(o.rect.x-=o.labelWidth,o.setWidth(n+o.labelWidth),o.labelMarginLeft=o.labelWidth):"center"==o.labelPosHorizontal&&o.labelWidth>n?(o.rect.x-=(o.labelWidth-n)/2,o.setWidth(o.labelWidth),o.labelMarginLeft=(o.labelWidth-n)/2):"right"==o.labelPosHorizontal&&o.setWidth(n+o.labelWidth)),o.labelHeight&&("top"==o.labelPosVertical?(o.rect.y-=o.labelHeight,o.setHeight(r+o.labelHeight),o.labelMarginTop=o.labelHeight):"center"==o.labelPosVertical&&o.labelHeight>r?(o.rect.y-=(o.labelHeight-r)/2,o.setHeight(o.labelHeight),o.labelMarginTop=(o.labelHeight-r)/2):"bottom"==o.labelPosVertical&&o.setHeight(r+o.labelHeight))}}))},y.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,o=e.paddingLeft,n=e.paddingTop,r=e.labelMarginLeft,a=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,o,n,r,a)}},y.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var o=t.idToDummyNode[i],n=o.paddingLeft,r=o.paddingTop,a=o.labelMarginLeft,s=o.labelMarginTop;t.adjustLocations(e[i],o.rect.x,o.rect.y,n,r,a,s)}))},y.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var o=i.getNodes(),n=0;n<o.length;n++){var r=o[n];if(this.getNodeDegree(r)>0)return this.toBeTiled[e]=!1,!1;if(null!=r.getChild()){if(!this.getToBeTiled(r))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[r.id]=!1}return this.toBeTiled[e]=!0,!0},y.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,o=0;o<e.length;o++){var n=e[o];n.getSource().id!==n.getTarget().id&&(i+=1)}return i},y.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var i=t.getChild().getNodes(),o=0;o<i.length;o++){var n=i[o];e+=this.getNodeDegreeWithChildren(n)}return e},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},y.prototype.adjustLocations=function(t,e,i,o,n,r,a){i+=n+a;for(var s=e+=o+r,h=0;h<t.rows.length;h++){var l=t.rows[h];e=s;for(var d=0,g=0;g<l.length;g++){var c=l[g];c.rect.x=e,c.rect.y=i,e+=c.rect.width+t.horizontalPadding,c.rect.height>d&&(d=c.rect.height)}i+=d+t.verticalPadding}},y.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(o){var n=e[o];if(i.tiledMemberPack[o]=i.tileNodes(t[o],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[o].width,n.rect.height=i.tiledMemberPack[o].height,n.setCenter(i.tiledMemberPack[o].centerX,i.tiledMemberPack[o].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var r=n.rect.width,a=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(r+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>r?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(a+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>a?(n.rect.y-=(n.labelHeight-a)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-a)/2):"bottom"==n.labelPosVertical&&n.setHeight(a+n.labelHeight))}}))},y.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),o=this.tileNodesByFavoringDim(t,e,!1),n=this.getOrgRatio(i);return this.getOrgRatio(o)<n?o:i},y.prototype.getOrgRatio=function(t){var e=t.width/t.height;return e<1&&(e=1/e),e},y.prototype.calcIdealRowWidth=function(t,e){var i=h.TILING_PADDING_VERTICAL,o=h.TILING_PADDING_HORIZONTAL,n=t.length,r=0,a=0,s=0;t.forEach((function(t){r+=t.getWidth(),a+=t.getHeight(),t.getWidth()>s&&(s=t.getWidth())}));var l,d=r/n,g=a/n,c=Math.pow(i-o,2)+4*(d+o)*(g+i)*n,p=(o-i+Math.sqrt(c))/(2*(d+o));e?(l=Math.ceil(p))==p&&l++:l=Math.floor(p);var f=l*(d+o)-o;return s>f&&(f=s),f+=2*o},y.prototype.tileNodesByFavoringDim=function(t,e,i){var o=h.TILING_PADDING_VERTICAL,n=h.TILING_PADDING_HORIZONTAL,r=h.TILING_COMPARE_BY,a={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:o,horizontalPadding:n,centerX:0,centerY:0};r&&(a.idealRowWidth=this.calcIdealRowWidth(t,i));var s=function(t){return t.rect.width*t.rect.height},l=function(t,e){return s(e)-s(t)};t.sort((function(t,e){var i=l;return a.idealRowWidth?(i=r)(t.id,e.id):i(t,e)}));for(var d=0,g=0,c=0;c<t.length;c++)d+=(p=t[c]).getCenterX(),g+=p.getCenterY();for(a.centerX=d/t.length,a.centerY=g/t.length,c=0;c<t.length;c++){var p=t[c];if(0==a.rows.length)this.insertNodeToRow(a,p,0,e);else if(this.canAddHorizontal(a,p.rect.width,p.rect.height)){var f=a.rows.length-1;a.idealRowWidth||(f=this.getShortestRowIndex(a)),this.insertNodeToRow(a,p,f,e)}else this.insertNodeToRow(a,p,a.rows.length,e);this.shiftToLastRow(a)}return a},y.prototype.insertNodeToRow=function(t,e,i,o){var n=o;i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var r=t.rowWidth[i]+e.rect.width;t.rows[i].length>0&&(r+=t.horizontalPadding),t.rowWidth[i]=r,t.width<r&&(t.width=r);var a=e.rect.height;i>0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[i]&&(s=t.rowHeight[i],t.rowHeight[i]=a,s=t.rowHeight[i]-s),t.height+=s,t.rows[i].push(e)},y.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]<i&&(e=o,i=t.rowWidth[o]);return e},y.prototype.getLongestRowIndex=function(t){for(var e=-1,i=Number.MIN_VALUE,o=0;o<t.rows.length;o++)t.rowWidth[o]>i&&(e=o,i=t.rowWidth[o]);return e},y.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var o=t.rows.length-1;return t.rowWidth[o]+e+t.horizontalPadding<=t.idealRowWidth}var n=this.getShortestRowIndex(t);if(n<0)return!0;var r=t.rowWidth[n];if(r+t.horizontalPadding+e<=t.width)return!0;var a,s,h=0;return t.rowHeight[n]<i&&n>0&&(h=i+t.verticalPadding-t.rowHeight[n]),a=t.width-r>=e+t.horizontalPadding?(t.height+h)/(r+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(s=t.width<e?(t.height+h)/e:(t.height+h)/t.width)<1&&(s=1/s),a<1&&(a=1/a),a<s},y.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,o=t.rows[e],n=o[o.length-1],r=n.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>r&&e!=i){o.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-r,t.rowWidth[i]=t.rowWidth[i]+r,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<o.length;s++)o[s].height>a&&(a=o[s].height);e>0&&(a+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=a,t.rowHeight[i]<n.height+t.verticalPadding&&(t.rowHeight[i]=n.height+t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[i];t.height+=l-h,this.shiftToLastRow(t)}},y.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var t,e=[],i=!0;i;){var o=this.graphManager.getAllNodes(),n=[];i=!1;for(var r=0;r<o.length;r++)if(1==(t=o[r]).getEdges().length&&!t.getEdges()[0].isInterGraph&&null==t.getChild()){if(h.PURE_INCREMENTAL){var a=t.getEdges()[0].getOtherEnd(t),s=new f(t.getCenterX()-a.getCenterX(),t.getCenterY()-a.getCenterY());n.push([t,t.getEdges()[0],t.getOwner(),s])}else n.push([t,t.getEdges()[0],t.getOwner()]);i=!0}if(1==i){for(var l=[],d=0;d<n.length;d++)1==n[d][0].getEdges().length&&(l.push(n[d]),n[d][0].getOwner().remove(n[d][0]));e.push(l),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},y.prototype.growTree=function(t){for(var e,i=t[t.length-1],o=0;o<i.length;o++)e=i[o],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(t){var e,i,o=t[0];if(i=o==t[1].source?t[1].target:t[1].source,h.PURE_INCREMENTAL)o.setCenter(i.getCenterX()+t[3].getWidth(),i.getCenterY()+t[3].getHeight());else{var n=i.startX,r=i.finishX,a=i.startY,s=i.finishY,l=[0,0,0,0];if(a>0)for(var g=n;g<=r;g++)l[0]+=this.grid[g][a-1].length+this.grid[g][a].length-1;if(r<this.grid.length-1)for(g=a;g<=s;g++)l[1]+=this.grid[r+1][g].length+this.grid[r][g].length-1;if(s<this.grid[0].length-1)for(g=n;g<=r;g++)l[2]+=this.grid[g][s+1].length+this.grid[g][s].length-1;if(n>0)for(g=a;g<=s;g++)l[3]+=this.grid[n-1][g].length+this.grid[n][g].length-1;for(var c,p,f=m.MAX_VALUE,u=0;u<l.length;u++)l[u]<f?(f=l[u],c=1,p=u):l[u]==f&&c++;if(3==c&&0==f)0==l[0]&&0==l[1]&&0==l[2]?e=1:0==l[0]&&0==l[1]&&0==l[3]?e=0:0==l[0]&&0==l[2]&&0==l[3]?e=3:0==l[1]&&0==l[2]&&0==l[3]&&(e=2);else if(2==c&&0==f){var v=Math.floor(2*Math.random());e=0==l[0]&&0==l[1]?0==v?0:1:0==l[0]&&0==l[2]?0==v?0:2:0==l[0]&&0==l[3]?0==v?0:3:0==l[1]&&0==l[2]?0==v?1:2:0==l[1]&&0==l[3]?0==v?1:3:0==v?2:3}else e=4==c&&0==f?v=Math.floor(4*Math.random()):p;0==e?o.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-d.DEFAULT_EDGE_LENGTH-o.getHeight()/2):1==e?o.setCenter(i.getCenterX()+i.getWidth()/2+d.DEFAULT_EDGE_LENGTH+o.getWidth()/2,i.getCenterY()):2==e?o.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+d.DEFAULT_EDGE_LENGTH+o.getHeight()/2):o.setCenter(i.getCenterX()-i.getWidth()/2-d.DEFAULT_EDGE_LENGTH-o.getWidth()/2,i.getCenterY())}},t.exports=y},991:(t,e,i)=>{var o=i(551).FDLayoutNode,n=i(551).IMath;function r(t,e,i,n){o.call(this,t,e,i,n)}for(var a in r.prototype=Object.create(o.prototype),o)r[a]=o[a];r.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},r.prototype.propogateDisplacementToChildren=function(t,e){for(var i,o=this.getChild().getNodes(),n=0;n<o.length;n++)null==(i=o[n]).getChild()?(i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},r.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.setPred1=function(t){this.pred1=t},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(t){this.next=t},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(t){this.processed=t},r.prototype.isProcessed=function(){return processed},t.exports=r},902:(t,e,i)=>{function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var n=i(806),r=i(551).LinkedList,a=i(551).Matrix,s=i(551).SVD;function h(){}h.handleConstraints=function(t){var e={};e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var i=new Map,h=new Map,l=[],d=[],g=t.getAllNodes(),c=0,p=0;p<g.length;p++){var f=g[p];null==f.getChild()&&(h.set(f.id,c++),l.push(f.getCenterX()),d.push(f.getCenterY()),i.set(f.id,f))}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach((function(t){t.gap||0==t.gap||(t.left?t.gap=n.DEFAULT_EDGE_LENGTH+i.get(t.left).getWidth()/2+i.get(t.right).getWidth()/2:t.gap=n.DEFAULT_EDGE_LENGTH+i.get(t.top).getHeight()/2+i.get(t.bottom).getHeight()/2)}));var u=function(t){var e=0,i=0;return t.forEach((function(t){e+=l[h.get(t)],i+=d[h.get(t)]})),{x:e/t.size,y:i/t.size}},m=function(t,e,i,n,a){var s=new Map;t.forEach((function(t,e){s.set(e,0)})),t.forEach((function(t,e){t.forEach((function(t){s.set(t.id,s.get(t.id)+1)}))}));var g=new Map,c=new Map,p=new r;s.forEach((function(t,o){0==t?(p.push(o),i||("horizontal"==e?g.set(o,h.has(o)?l[h.get(o)]:n.get(o)):g.set(o,h.has(o)?d[h.get(o)]:n.get(o)))):g.set(o,Number.NEGATIVE_INFINITY),i&&c.set(o,new Set([o]))})),i&&a.forEach((function(t){var o=[];if(t.forEach((function(t){i.has(t)&&o.push(t)})),o.length>0){var r=0;o.forEach((function(t){"horizontal"==e?(g.set(t,h.has(t)?l[h.get(t)]:n.get(t)),r+=g.get(t)):(g.set(t,h.has(t)?d[h.get(t)]:n.get(t)),r+=g.get(t))})),r/=o.length,t.forEach((function(t){i.has(t)||g.set(t,r)}))}else{var a=0;t.forEach((function(t){a+="horizontal"==e?h.has(t)?l[h.get(t)]:n.get(t):h.has(t)?d[h.get(t)]:n.get(t)})),a/=t.length,t.forEach((function(t){g.set(t,a)}))}}));for(var f=function(){var o=p.shift();t.get(o).forEach((function(t){if(g.get(t.id)<g.get(o)+t.gap)if(i&&i.has(t.id)){var r=void 0;if(r="horizontal"==e?h.has(t.id)?l[h.get(t.id)]:n.get(t.id):h.has(t.id)?d[h.get(t.id)]:n.get(t.id),g.set(t.id,r),r<g.get(o)+t.gap){var a=g.get(o)+t.gap-r;c.get(o).forEach((function(t){g.set(t,g.get(t)-a)}))}}else g.set(t.id,g.get(o)+t.gap);s.set(t.id,s.get(t.id)-1),0==s.get(t.id)&&p.push(t.id),i&&c.set(t.id,function(t,e){var i=new Set(t),o=!0,n=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var h=a.value;i.add(h)}}catch(t){n=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(n)throw r}}return i}(c.get(o),c.get(t.id)))}))};0!=p.length;)f();if(i){var u=new Set;t.forEach((function(t,e){0==t.length&&u.add(e)}));var m=[];c.forEach((function(t,e){if(u.has(e)){var n=!1,r=!0,a=!1,s=void 0;try{for(var h,l=t[Symbol.iterator]();!(r=(h=l.next()).done);r=!0){var d=h.value;i.has(d)&&(n=!0)}}catch(t){a=!0,s=t}finally{try{!r&&l.return&&l.return()}finally{if(a)throw s}}if(!n){var g=!1,c=void 0;m.forEach((function(e,i){e.has([].concat(o(t))[0])&&(g=!0,c=i)})),g?t.forEach((function(t){m[c].add(t)})):m.push(new Set(t))}}})),m.forEach((function(t,i){var o=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=!0,p=!1,f=void 0;try{for(var u,m=t[Symbol.iterator]();!(c=(u=m.next()).done);c=!0){var v=u.value,T=void 0;T="horizontal"==e?h.has(v)?l[h.get(v)]:n.get(v):h.has(v)?d[h.get(v)]:n.get(v);var N=g.get(v);T<o&&(o=T),T>a&&(a=T),N<r&&(r=N),N>s&&(s=N)}}catch(t){p=!0,f=t}finally{try{!c&&m.return&&m.return()}finally{if(p)throw f}}var E=(o+a)/2-(r+s)/2,y=!0,C=!1,M=void 0;try{for(var w,A=t[Symbol.iterator]();!(y=(w=A.next()).done);y=!0){var I=w.value;g.set(I,g.get(I)+E)}}catch(t){C=!0,M=t}finally{try{!y&&A.return&&A.return()}finally{if(C)throw M}}}))}return g},v=function(t){var e=0,i=0,o=0,n=0;if(t.forEach((function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:d[h.get(t.top)]-d[h.get(t.bottom)]>=0?o++:n++})),e>i&&o>n)for(var r=0;r<h.size;r++)l[r]=-1*l[r],d[r]=-1*d[r];else if(e>i)for(var a=0;a<h.size;a++)l[a]=-1*l[a];else if(o>n)for(var s=0;s<h.size;s++)d[s]=-1*d[s]},T=function(t){var e=[],i=new r,o=new Set,n=0;return t.forEach((function(r,a){if(!o.has(a)){e[n]=[];var s=a;for(i.push(s),o.add(s),e[n].push(s);0!=i.length;)s=i.shift(),t.get(s).forEach((function(t){o.has(t.id)||(i.push(t.id),o.add(t.id),e[n].push(t.id))}));n++}})),e},N=function(t){var e=new Map;return t.forEach((function(t,i){e.set(i,[])})),t.forEach((function(t,i){t.forEach((function(t){e.get(i).push(t),e.get(t.id).push({id:i,gap:t.gap,direction:t.direction})}))})),e},E=function(t){var e=new Map;return t.forEach((function(t,i){e.set(i,[])})),t.forEach((function(t,i){t.forEach((function(t){e.get(t.id).push({id:i,gap:t.gap,direction:t.direction})}))})),e},y=[],C=[],M=!1,w=!1,A=new Set,I=new Map,L=new Map,_=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach((function(t){A.add(t.nodeId)})),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach((function(t){t.left?(I.has(t.left)?I.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):I.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),I.has(t.right)||I.set(t.right,[])):(I.has(t.top)?I.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):I.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),I.has(t.bottom)||I.set(t.bottom,[]))})),L=N(I),_=T(L)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>1)e.fixedNodeConstraint.forEach((function(t,e){y[e]=[t.position.x,t.position.y],C[e]=[l[h.get(t.nodeId)],d[h.get(t.nodeId)]]})),M=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,n=function(e){var n=new Set;i[e].forEach((function(t){n.add(t)}));var r=new Set([].concat(o(n)).filter((function(t){return A.has(t)}))),a=void 0;a=r.size>0?l[h.get(r.values().next().value)]:u(n).x,i[e].forEach((function(e){y[t]=[a,d[h.get(e)]],C[t]=[l[h.get(e)],d[h.get(e)]],t++}))},r=0;r<i.length;r++)n(r);M=!0}if(e.alignmentConstraint.horizontal){for(var a=e.alignmentConstraint.horizontal,s=function(e){var i=new Set;a[e].forEach((function(t){i.add(t)}));var n=new Set([].concat(o(i)).filter((function(t){return A.has(t)}))),r=void 0;r=n.size>0?l[h.get(n.values().next().value)]:u(i).y,a[e].forEach((function(e){y[t]=[l[h.get(e)],r],C[t]=[l[h.get(e)],d[h.get(e)]],t++}))},g=0;g<a.length;g++)s(g);M=!0}e.relativePlacementConstraint&&(w=!0)}();else if(e.relativePlacementConstraint){for(var b=0,F=0,O=0;O<_.length;O++)_[O].length>b&&(b=_[O].length,F=O);if(b<L.size/2)v(e.relativePlacementConstraint),M=!1,w=!1;else{var R=new Map,P=new Map,x=[];_[F].forEach((function(t){I.get(t).forEach((function(e){"horizontal"==e.direction?(R.has(t)?R.get(t).push(e):R.set(t,[e]),R.has(e.id)||R.set(e.id,[]),x.push({left:t,right:e.id})):(P.has(t)?P.get(t).push(e):P.set(t,[e]),P.has(e.id)||P.set(e.id,[]),x.push({top:t,bottom:e.id}))}))})),v(x),w=!1;var D=m(R,"horizontal"),H=m(P,"vertical");_[F].forEach((function(t,e){C[e]=[l[h.get(t)],d[h.get(t)]],y[e]=[],D.has(t)?y[e][0]=D.get(t):y[e][0]=l[h.get(t)],H.has(t)?y[e][1]=H.get(t):y[e][1]=d[h.get(t)]})),M=!0}}if(M){for(var G,z=a.transpose(y),S=a.transpose(C),V=0;V<z.length;V++)z[V]=a.multGamma(z[V]),S[V]=a.multGamma(S[V]);var W=a.multMat(z,a.transpose(S)),Y=s.svd(W);G=a.multMat(Y.V,a.transpose(Y.U));for(var X=0;X<h.size;X++){var U=[l[X],d[X]],B=[G[0][0],G[1][0]],k=[G[0][1],G[1][1]];l[X]=a.dotProduct(U,B),d[X]=a.dotProduct(U,k)}w&&v(e.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>0){var j={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var i,o,n={x:l[h.get(t.nodeId)],y:d[h.get(t.nodeId)]},r=t.position,a=(o=n,{x:(i=r).x-o.x,y:i.y-o.y});j.x+=a.x,j.y+=a.y})),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach((function(t,e){l[e]+=j.x})),d.forEach((function(t,e){d[e]+=j.y})),e.fixedNodeConstraint.forEach((function(t){l[h.get(t.nodeId)]=t.position.x,d[h.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var Z=e.alignmentConstraint.vertical,q=function(t){var e=new Set;Z[t].forEach((function(t){e.add(t)}));var i=new Set([].concat(o(e)).filter((function(t){return A.has(t)}))),n=void 0;n=i.size>0?l[h.get(i.values().next().value)]:u(e).x,e.forEach((function(t){A.has(t)||(l[h.get(t)]=n)}))},K=0;K<Z.length;K++)q(K);if(e.alignmentConstraint.horizontal)for(var Q=e.alignmentConstraint.horizontal,J=function(t){var e=new Set;Q[t].forEach((function(t){e.add(t)}));var i=new Set([].concat(o(e)).filter((function(t){return A.has(t)}))),n=void 0;n=i.size>0?d[h.get(i.values().next().value)]:u(e).y,e.forEach((function(t){A.has(t)||(d[h.get(t)]=n)}))},$=0;$<Q.length;$++)J($)}e.relativePlacementConstraint&&function(){var t=new Map,i=new Map,o=new Map,n=new Map,r=new Map,a=new Map,s=new Set,g=new Set;if(A.forEach((function(t){s.add(t),g.add(t)})),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var c=e.alignmentConstraint.vertical,p=function(e){o.set("dummy"+e,[]),c[e].forEach((function(i){t.set(i,"dummy"+e),o.get("dummy"+e).push(i),A.has(i)&&s.add("dummy"+e)})),r.set("dummy"+e,l[h.get(c[e][0])])},f=0;f<c.length;f++)p(f);if(e.alignmentConstraint.horizontal)for(var u=e.alignmentConstraint.horizontal,v=function(t){n.set("dummy"+t,[]),u[t].forEach((function(e){i.set(e,"dummy"+t),n.get("dummy"+t).push(e),A.has(e)&&g.add("dummy"+t)})),a.set("dummy"+t,d[h.get(u[t][0])])},y=0;y<u.length;y++)v(y)}var C=new Map,M=new Map,w=function(e){I.get(e).forEach((function(o){var n=void 0,r=void 0;"horizontal"==o.direction?(n=t.get(e)?t.get(e):e,r=t.get(o.id)?{id:t.get(o.id),gap:o.gap,direction:o.direction}:o,C.has(n)?C.get(n).push(r):C.set(n,[r]),C.has(r.id)||C.set(r.id,[])):(n=i.get(e)?i.get(e):e,r=i.get(o.id)?{id:i.get(o.id),gap:o.gap,direction:o.direction}:o,M.has(n)?M.get(n).push(r):M.set(n,[r]),M.has(r.id)||M.set(r.id,[]))}))},L=!0,_=!1,b=void 0;try{for(var F,O=I.keys()[Symbol.iterator]();!(L=(F=O.next()).done);L=!0)w(F.value)}catch(t){_=!0,b=t}finally{try{!L&&O.return&&O.return()}finally{if(_)throw b}}var R=N(C),P=N(M),x=T(R),D=T(P),H=E(C),G=E(M),z=[],S=[];x.forEach((function(t,e){z[e]=[],t.forEach((function(t){0==H.get(t).length&&z[e].push(t)}))})),D.forEach((function(t,e){S[e]=[],t.forEach((function(t){0==G.get(t).length&&S[e].push(t)}))}));var V=m(C,"horizontal",s,r,z),W=m(M,"vertical",g,a,S),Y=function(t){o.get(t)?o.get(t).forEach((function(e){l[h.get(e)]=V.get(t)})):l[h.get(t)]=V.get(t)},X=!0,U=!1,B=void 0;try{for(var k,j=V.keys()[Symbol.iterator]();!(X=(k=j.next()).done);X=!0)Y(k.value)}catch(t){U=!0,B=t}finally{try{!X&&j.return&&j.return()}finally{if(U)throw B}}var Z=function(t){n.get(t)?n.get(t).forEach((function(e){d[h.get(e)]=W.get(t)})):d[h.get(t)]=W.get(t)},q=!0,K=!1,Q=void 0;try{for(var J,$=W.keys()[Symbol.iterator]();!(q=(J=$.next()).done);q=!0)Z(J.value)}catch(t){K=!0,Q=t}finally{try{!q&&$.return&&$.return()}finally{if(K)throw Q}}}()}for(var tt=0;tt<g.length;tt++){var et=g[tt];null==et.getChild()&&et.setCenter(l[h.get(et.id)],d[h.get(et.id)])}},t.exports=h},551:e=>{e.exports=t}},i={},o=function t(o){var n=i[o];if(void 0!==n)return n.exports;var r=i[o]={exports:{}};return e[o](r,r.exports,t),r.exports}(45),o;var e,i,o},n.exports=r(o.__require())),i.__module.exports;var n,r};
|