@cpfr/tootframes 1.0.16 → 1.0.18
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/tootframes.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.tootframes=e():t.tootframes=e()}(self,(()=>(()=>{"use strict";var t={192:(t,e,n)=>{n.d(e,{Z:()=>s});var o=n(537),i=n.n(o),r=n(645),l=n.n(r)()(i());l.push([t.id,'*{box-sizing:border-box;cursor:default;user-select:none}a{cursor:pointer;color:#c3df85;text-decoration:none}a:hover{color:#d7e6b9;text-decoration:underline}.beingDragged{opacity:.6;z-index:1000 !important}img{pointer-events:none}body{background-color:#262829;color:#dadcdd;overflow:hidden}input{border:1px solid #343738;background:#1a1d1f;color:#cad2d4;border-radius:.1em;padding:.3em .8em;outline:none;font-size:1.2em;margin-right:.2em;margin-bottom:.2em}.MenuBar{background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);border-bottom:1px solid #575c5e;width:100%;height:2.5em;position:absolute;z-index:50;top:0;left:0}.MenuBar .Icon{height:100%;padding:.4em 1em}.MenuBar .Menu{display:inline-block;padding:.6em .7em;height:100%;vertical-align:top}.MenuBar .Menu:hover{background-color:#262829}.MenuContent{display:none;position:absolute;background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);left:0;top:2.5em;min-width:6em;min-height:.5em;z-index:1000}.MenuContent>.entry{padding:.5em 2em}.MenuContent>.entry.submenu:after{content:"›";display:inline-block;position:absolute;right:0;margin-right:.5em}.MenuContent>.entry:hover{background-color:#262829}.MenuContent>.entry.disabled{color:#7d8488}.MenuContent>.entry.disabled:hover{background-color:#323536}.MenuContent>.separator{background-color:#575c5e;border:.4em solid #3f4243;height:.9em}.Modal{display:block;position:absolute;background-color:rgba(0,0,0,.4666666667);left:0;top:0;right:0;bottom:0}button::-moz-focus-inner{border:0}button,.button{background-color:#0d0e0f;outline:none;border-radius:0;border:none;color:#dadcdd;padding:.5em 2em;font-size:1em;margin-right:.2em;margin-bottom:.2em}button:focus,.button:focus{outline:none}button:hover,.button:hover{background-color:#1a1b1c}button:active,.button:active{background-color:#121314}.Modal{background-color:rgba(0,0,0,.4666666667);position:absolute;z-index:52;left:0;right:0;top:0;bottom:0}.Modal .Dialog{z-index:53}.text{white-space:pre-line}.Dialog{min-width:15em;max-width:80vw;min-height:5em;max-height:80vh}.Dialog,.DockPanel{position:absolute;z-index:51;top:50%;left:50%;transform:translate(-50%, -50%);background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667)}.Dialog .title,.DockPanel .title{width:100%;text-align:center;padding:.5em;background-color:#575c5e;border-bottom:1px solid #707578}.Dialog .title .closeButton,.DockPanel .title .closeButton{padding:.2em;width:2em;height:2em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#323536}.Dialog .title .closeButton:hover,.DockPanel .title .closeButton:hover{background-color:#3f4243}.Dialog .content,.DockPanel .content{padding:.8em 1.5em;position:absolute}.Dialog .content.w3term,.DockPanel .content.w3term{height:100%}.Dialog .buttons,.DockPanel .buttons{padding:.8em 1.5em;text-align:center}.Dialog .content,.Dialog .Panel.content{position:static;padding:.8em 1.5em}.InputDialog input{width:100%}.Label{user-select:text}.DockContainer>*{overflow:hidden;position:absolute}.DockContainer.horizontal>*{display:inline-block}.DockContainer.horizontal>*.DockSeparator{width:3px;height:100%;background-color:#0d0e0f;cursor:ew-resize}.DockContainer.vertical>*{display:block;clear:both}.DockContainer.vertical>*.DockSeparator{width:100%;height:3px;background-color:#0d0e0f;cursor:ns-resize}.DockContainer>.DockSeparator:hover{background-color:#1a1b1c}.DockPanel{transform:none;max-width:none;max-height:none;background-color:#262829}.DockPanel .title{text-align:left;padding:.1em .5em;font-size:.9em;background-color:#1a1b1c;border-bottom:1px solid #121314}.DockPanel .title .closeButton{padding:0;width:1.6em;height:1.6em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#1a1b1c}.DockPanel .title .closeButton:hover{background-color:#262829}.DockPanel .content{width:100%;height:calc(100% - 1.5em);overflow:auto}.DockPanel.resizingHorizontally{cursor:ew-resize}.DockPanel.resizingVertically{cursor:ns-resize}.DockPanel.resizingHorizontally.resizingVertically{cursor:nwse-resize}.DockPanel .resizeEW,.DockPanel .resizeNS,.DockPanel .resizeDiag{display:none}.DockPanel.floating .resizeEW{display:block;width:.3em;top:0;bottom:0;background-color:rgba(0,0,0,0);cursor:ew-resize;position:absolute;right:0}.DockPanel.floating .resizeNS{display:block;width:100%;height:.3em;background-color:rgba(0,0,0,0);cursor:ns-resize;position:absolute;left:0;bottom:0}.DockPanel.floating .resizeDiag{display:block;width:.5em;height:.5em;background-color:rgba(0,0,0,0);cursor:nwse-resize;position:absolute;right:0;bottom:0}body>.DockContainer{position:absolute;z-index:49;top:0;left:0;right:0;bottom:0}.dockOverlay{position:fixed;background-color:rgba(51,119,153,.6);z-index:999}.NodeEditor{width:100%;height:100%;overflow:hidden !important;padding:0 !important}.NodeEditor.moving{cursor:grabbing}.NodeEditor.beingDragged{cursor:grabbing}.NodeEditor svg{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;pointer-events:none}.NodeEditor .Node{position:absolute}.Node{display:inline-block;border-radius:.5em;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);background-color:#1a1b1c;white-space:nowrap}.Node .title{border-radius:.5em .5em 0 0;background-color:#323536}.Node .body{display:flex;justify-content:space-between}.Node .bullet{display:inline-block;background-color:#3f4243;width:1.2em;height:1.2em;border-radius:1em;border:.2em solid rgba(0,0,0,0);background-clip:padding-box}.Node .bullet:hover{background-color:#63696b;border:none}.Node .inputs{display:inline-block;vertical-align:text-top}.Node .inputs .bullet{margin-left:-0.5em;margin-right:.5em}.Node .inputs .input{display:block;position:relative;font-size:.7em;margin:0}.Node .outputs{display:inline-block;vertical-align:text-top;text-align:right}.Node .outputs .bullet{margin-left:.5em;margin-right:-0.5em}.Node .outputs .output{display:block;position:relative;font-size:.7em;margin:0}.Node .contents{vertical-align:text-top;display:inline-block;min-width:2em;min-height:2em;display:flex;flex-direction:column;justify-content:space-between}.Node.selected{box-shadow:0 0 .5em #4b4f51}.Node.selected .title{background-color:#4b4f51}.TreeViewItem .label{background-color:rgba(0,0,0,0);display:inline-block;border:1px solid rgba(0,0,0,0);-webkit-user-drag:element}.TreeViewItem.focused>.label{border:1px solid #4b4f51}.TreeViewItem .label.selected{background-color:rgba(195,223,133,.2666666667)}.TreeViewItem *{cursor:pointer}.TreeViewItem>.expander{display:inline-block;opacity:0;width:.3em;margin-right:.5em;font-weight:bold;transform:rotate(0deg);transition:transform .15s ease-in-out}.TreeViewItem.expandable>.expander{opacity:1;display:inline-block}.TreeViewItem.expanded>.expander{transform:rotate(90deg)}.TreeViewItem>.children{margin-left:1em;overflow:hidden;display:none}.TreeViewItem.expanded>.children{display:block}.Panel.content{margin:0;padding:0;width:100%}.ListView,.ListView.content{display:table;margin:0;padding:0;width:100%}.ListView .cell{font-size:80%;display:table-cell;padding:.15em .6em;border-left:.2em solid #262829;border-bottom:.2em solid #262829;background-color:#1f2021}.ListView .row{display:table-row}.ListView .row .cell{user-select:text}.ListView .row .cell input{background-color:rgba(0,0,0,0);border:none;outline:none;color:#dadcdd;margin:0;padding:0;user-select:text;width:auto;display:inline}.ListView .row.selected .cell{background-color:rgba(195,223,133,.2666666667)}.ListView .row .cell.editing{background-color:rgba(62,80,21,.2666666667);box-shadow:inset 0 0 .1em rgba(195,223,133,.2666666667)}.ListView .header{display:table-row}.ListView .header .cell{background-color:#323536}.NodeEditor path{stroke:#999}.NodeEditor path.notConnectable{stroke:#944}.NodeEditor .selectRect{background-color:rgba(112,117,120,.3);border:1px solid #707578;width:300px;height:300px;position:absolute;z-index:500}.Dropdown{background-color:rgba(112,117,120,.3);border:1px solid #575c5e;color:#dadcdd;outline:none}.ListBox{border:1px solid #343738;background-color:#1a1d1f;color:#cad2d4;border-radius:.1em;outline:none;font-size:.9em;overflow:auto}.ListBox>div{padding:.3em 1em}.ListBox>div:hover{background-color:#262a2d}.ListBox>div.selected{background-color:rgba(195,223,133,.2666666667)}.ColorPicker .handle{border-radius:100%;position:relative;border:.05em solid #222;width:1.2em;height:1.2em;box-shadow:.03em .03em .3em rgba(0,0,0,.2666666667),inset 0 0 .5em #fff;transform:translate(-50%, -50%);pointer-events:none}.PaintStyleColorPicker>.hue{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to right, hsl(0, 100%, 50%), hsl(22.5, 100%, 50%), hsl(45, 100%, 50%), hsl(67.5, 100%, 50%), hsl(90, 100%, 50%), hsl(112.5, 100%, 50%), hsl(135, 100%, 50%), hsl(157.5, 100%, 50%), hsl(180, 100%, 50%), hsl(202.5, 100%, 50%), hsl(225, 100%, 50%), hsl(247.5, 100%, 50%), hsl(270, 100%, 50%), hsl(292.5, 100%, 50%), hsl(315, 100%, 50%), hsl(337.5, 100%, 50%), hsl(359, 100%, 50%))}.PaintStyleColorPicker>.hue *,.PaintStyleColorPicker>.lightness *{pointer-events:none}.PaintStyleColorPicker .saturation{width:100%;height:100%;background:linear-gradient(to bottom, transparent, hsl(0, 0%, 50%))}.PaintStyleColorPicker .lightness{width:2em;height:400px;display:inline-block;margin-left:.5em;background-color:red;background-image:linear-gradient(to bottom, white, transparent, black)}.PaintStyleColorPicker .lightness>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.GimpStyleColorPicker>.saturation{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to bottom, transparent, black)}.GimpStyleColorPicker>.saturation *,.GimpStyleColorPicker>.value *{pointer-events:none}.GimpStyleColorPicker .value{width:100%;height:100%}.GimpStyleColorPicker .value::before{content:" ";display:block;float:left;width:100%;height:100%;mask:linear-gradient(to right, white, transparent);background:linear-gradient(to bottom, white, black)}.GimpStyleColorPicker .hue{width:2em;height:400px;display:inline-block;margin-left:.5em;background:linear-gradient(to bottom, hsl(0, 100%, 50%), hsl(22.5, 100%, 50%), hsl(45, 100%, 50%), hsl(67.5, 100%, 50%), hsl(90, 100%, 50%), hsl(112.5, 100%, 50%), hsl(135, 100%, 50%), hsl(157.5, 100%, 50%), hsl(180, 100%, 50%), hsl(202.5, 100%, 50%), hsl(225, 100%, 50%), hsl(247.5, 100%, 50%), hsl(270, 100%, 50%), hsl(292.5, 100%, 50%), hsl(315, 100%, 50%), hsl(337.5, 100%, 50%), hsl(359, 100%, 50%))}.GimpStyleColorPicker .hue>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.WheelColorPicker>.wheel{position:relative;border:.5em solid #090909;width:25em;height:25em;border-radius:100%;padding:3em;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:conic-gradient(hsl(90, 100%, 50%), hsl(67.5, 100%, 50%), hsl(45, 100%, 50%), hsl(22.5, 100%, 50%), hsl(0, 100%, 50%), hsl(337.5, 100%, 50%), hsl(315, 100%, 50%), hsl(292.5, 100%, 50%), hsl(270, 100%, 50%), hsl(247.5, 100%, 50%), hsl(225, 100%, 50%), hsl(202.5, 100%, 50%), hsl(180, 100%, 50%), hsl(157.5, 100%, 50%), hsl(135, 100%, 50%), hsl(112.5, 100%, 50%), hsl(89, 100%, 50%))}.WheelColorPicker>.wheel>.handle{width:3em;height:3em;position:absolute}.WheelColorPicker>.wheel>.innerCircle{width:100%;height:100%;background-color:#222;border-radius:100%;padding:18%;transform:rotate(45deg);box-shadow:inset .5em .5em 1em rgba(0,0,0,.5333333333)}.WheelColorPicker>.wheel>.innerCircle .saturation,.WheelColorPicker>.wheel>.innerCircle .lightness{width:100%;height:100%}.WheelColorPicker>.saturation *{pointer-events:none}.WheelColorPicker>.wheel>.innerCircle .saturation{background-color:red;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background-image:linear-gradient(45deg, hsl(0, 0%, 50%), transparent)}.WheelColorPicker>.wheel>.innerCircle .lightness{background:linear-gradient(135deg, white, transparent, black)}.ColorPickerDialog .WheelColorPicker{margin-top:1em;margin-bottom:1em}.ColorPickerDialog .ColorOutput{display:inline-block;width:3em;padding:.3em .8em;border:1px solid #343738;height:2.4em;vertical-align:top;margin-top:.05em;margin-right:.4em}',"",{version:3,sources:["webpack://./src/style.scss"],names:[],mappings:"AAAA,EAIA,qBACI,CAAA,cACA,CAAA,gBACA,CAAA,EAGJ,cACI,CAAA,aACA,CAAA,oBACA,CAAA,QAEA,aACI,CAAA,yBACA,CAAA,cAIR,UACI,CAAA,uBACA,CAAA,IAGJ,mBACI,CAAA,KAGJ,wBA7BkB,CAAA,aADN,CAAA,eAiCR,CAAA,MAGJ,wBACI,CAAA,kBACA,CAAA,aACA,CAAA,kBACA,CAAA,iBACA,CAAA,YACA,CAAA,eACA,CAAA,iBACA,CAAA,kBACA,CAAA,SAGJ,wBACI,CAAA,2CACA,CAAA,+BACA,CAAA,UACA,CAAA,YACA,CAAA,iBACA,CAAA,UACA,CAAA,KACA,CAAA,MACA,CAAA,eAEA,WACI,CAAA,gBACA,CAAA,eAGJ,oBACI,CAAA,iBACA,CAAA,WACA,CAAA,kBACA,CAAA,qBAEA,wBArEU,CAAA,aA2ElB,YACI,CAAA,iBACA,CAAA,wBACA,CAAA,2CACA,CAAA,MACA,CAAA,SACA,CAAA,aACA,CAAA,eACA,CAAA,YACA,CAAA,oBAEA,gBACI,CAAA,kCAEA,WACI,CAAA,oBACA,CAAA,iBACA,CAAA,OACA,CAAA,iBACA,CAAA,0BAGJ,wBAjGU,CAAA,6BAsGd,aACI,CAAA,mCAEA,wBACI,CAAA,wBAIR,wBACI,CAAA,yBACA,CAAA,WACA,CAAA,OAKR,aACI,CAAA,iBACA,CAAA,wCACA,CAAA,MACA,CAAA,KACA,CAAA,OACA,CAAA,QACA,CAAA,yBAIJ,QACI,CAAA,eAGJ,wBACI,CAAA,YACA,CAAA,eACA,CAAA,WACA,CAAA,aA1IQ,CAAA,gBA4IR,CAAA,aACA,CAAA,iBACA,CAAA,kBACA,CAAA,2BAEA,YACI,CAAA,2BAEJ,wBACI,CAAA,6BAEJ,wBACI,CAAA,OAIR,wCACI,CAAA,iBACA,CAAA,UACA,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,eAEA,UACI,CAAA,MAIR,oBACI,CAAA,QAGJ,cACI,CAAA,cACA,CAAA,cACA,CAAA,eACA,CAAA,mBAGJ,iBACI,CAAA,UACA,CAAA,OACA,CAAA,QACA,CAAA,+BACA,CAAA,wBAEA,CAAA,2CACA,CAAA,iCAEA,UACI,CAAA,iBACA,CAAA,YACA,CAAA,wBACA,CAAA,+BACA,CAAA,2DAEA,YACI,CAAA,SACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,uEAEA,wBACI,CAAA,qCAKZ,kBACI,CAAA,iBACA,CAAA,mDAGJ,WACI,CAAA,qCAGJ,kBACI,CAAA,iBACA,CAAA,wCAIR,eAEI,CAAA,kBACA,CAAA,mBAGJ,UACI,CAAA,OAGJ,gBACI,CAAA,iBAIA,eACI,CAAA,iBACA,CAAA,4BAIJ,oBAGI,CAAA,0CAEA,SACI,CAAA,WACA,CAAA,wBACA,CAAA,gBACA,CAAA,0BAIR,aAGI,CAAA,UACA,CAAA,wCAEA,UACI,CAAA,UACA,CAAA,wBACA,CAAA,gBACA,CAAA,oCAIR,wBACI,CAAA,WAIR,cACI,CAAA,cACA,CAAA,eACA,CAAA,wBA3Rc,CAAA,kBA6Rd,eACI,CAAA,iBACA,CAAA,cACA,CAAA,wBACA,CAAA,+BACA,CAAA,+BAEA,SACI,CAAA,WACA,CAAA,YACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,qCAEA,wBA7SM,CAAA,oBAmTd,UACI,CAAA,yBACA,CAAA,aACA,CAAA,gCAGJ,gBACI,CAAA,8BAEJ,gBACI,CAAA,mDAEJ,kBACI,CAAA,iEAGJ,YAGI,CAAA,8BAGA,aACI,CAAA,UACA,CAAA,KACA,CAAA,QACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,OACA,CAAA,8BAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,MACA,CAAA,QACA,CAAA,gCAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,kBACA,CAAA,iBACA,CAAA,OACA,CAAA,QACA,CAAA,oBAKZ,iBACI,CAAA,UACA,CAAA,KAEA,CAAA,MACA,CAAA,OACA,CAAA,QACA,CAAA,aAGJ,cACI,CAAA,oCACA,CAAA,WACA,CAAA,YAGJ,UACI,CAAA,WACA,CAAA,0BACA,CAAA,oBACA,CAAA,mBAEA,eACI,CAAA,yBAGJ,eACI,CAAA,gBAGJ,iBACI,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,UACA,CAAA,WACA,CAAA,mBAEA,CAAA,kBAGJ,iBACI,CAAA,MAIR,oBACI,CAAA,kBACA,CAAA,2CACA,CAAA,wBAEA,CAAA,kBACA,CAAA,aAEA,2BACI,CAAA,wBACA,CAAA,YAGJ,YACI,CAAA,6BACA,CAAA,cAGJ,oBACI,CAAA,wBACA,CAAA,WAEA,CAAA,YACA,CAAA,iBACA,CAAA,+BACA,CAAA,2BACA,CAAA,oBAEA,wBACI,CAAA,WACA,CAAA,cAIR,oBACI,CAAA,uBACA,CAAA,sBAEA,kBACI,CAAA,iBACA,CAAA,qBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,QACA,CAAA,eAIR,oBACI,CAAA,uBACA,CAAA,gBACA,CAAA,uBAEA,gBACI,CAAA,mBACA,CAAA,uBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,QACA,CAAA,gBAIR,uBACI,CAAA,oBACA,CAAA,aACA,CAAA,cACA,CAAA,YAEA,CAAA,qBACA,CAAA,6BACA,CAAA,eAGJ,2BACI,CAAA,sBAEA,wBACI,CAAA,qBAKZ,8BACI,CAAA,oBACA,CAAA,8BACA,CAAA,yBACA,CAAA,6BAGJ,wBACI,CAAA,8BAGJ,8CA5fiB,CAAA,gBAggBjB,cACI,CAAA,wBAGJ,oBACI,CAAA,SACA,CAAA,UACA,CAAA,iBACA,CAAA,gBACA,CAAA,sBACA,CAAA,qCACA,CAAA,mCAGJ,SACI,CAAA,oBACA,CAAA,iCAGJ,uBACI,CAAA,wBAGJ,eACI,CAAA,eACA,CAAA,YACA,CAAA,iCAMJ,aACI,CAAA,eAIJ,QACI,CAAA,SACA,CAAA,UACA,CAAA,4BAGJ,aACI,CAAA,QACA,CAAA,SACA,CAAA,UACA,CAAA,gBAGJ,aACI,CAAA,kBACA,CAAA,kBACA,CAAA,8BACA,CAAA,gCACA,CAAA,wBACA,CAAA,eAGJ,iBACI,CAAA,qBAEA,gBACI,CAAA,2BAEA,8BACI,CAAA,WACA,CAAA,YACA,CAAA,aAtkBA,CAAA,QAwkBA,CAAA,SACA,CAAA,gBACA,CAAA,UACA,CAAA,cACA,CAAA,8BAIR,8CA9kBa,CAAA,6BAklBb,2CACI,CAAA,uDACA,CAAA,kBAIR,iBACI,CAAA,wBAEA,wBACI,CAAA,iBAIR,WACI,CAAA,gCAGJ,WACI,CAAA,wBAIJ,qCACI,CAAA,wBACA,CAAA,WACA,CAAA,YACA,CAAA,iBACA,CAAA,WACA,CAAA,UAGJ,qCACI,CAAA,wBACA,CAAA,aAtnBQ,CAAA,YAwnBR,CAAA,SAGJ,wBACI,CAAA,wBACA,CAAA,aACA,CAAA,kBACA,CAAA,YACA,CAAA,cACA,CAAA,aACA,CAAA,aAEA,gBACI,CAAA,mBAEA,wBACI,CAAA,sBAGJ,8CAzoBS,CAAA,qBAspBjB,kBACI,CAAA,iBACA,CAAA,uBACA,CAAA,WACA,CAAA,YACA,CAAA,uEACA,CAAA,+BAEA,CAAA,mBACA,CAAA,4BAGJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,mZACA,CAAA,kEAqBJ,mBAEI,CAAA,mCAGJ,UACI,CAAA,WACA,CAAA,mEACA,CAAA,kCAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,oBACA,CAAA,sEACA,CAAA,0CAGJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,kCAOJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,yDACA,CAAA,mEAGJ,mBAEI,CAAA,6BAGJ,UACI,CAAA,WACA,CAAA,qCAGJ,WACI,CAAA,aACA,CAAA,UACA,CAAA,UACA,CAAA,WACA,CAAA,kDACA,CAAA,mDACA,CAAA,2BAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,oZACA,CAAA,mCAqBJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,yBAQJ,iBACI,CAAA,yBACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,WACA,CAAA,gDACA,CAAA,uYACA,CAAA,iCAqBJ,SACI,CAAA,UACA,CAAA,iBACA,CAAA,sCAIJ,UACI,CAAA,WACA,CAAA,qBACA,CAAA,kBACA,CAAA,WACA,CAAA,uBACA,CAAA,sDACA,CAAA,mGAGJ,UAEI,CAAA,WACA,CAAA,gCAGJ,mBACI,CAAA,kDAGJ,oBACI,CAAA,gDACA,CAAA,qEACA,CAAA,iDAGJ,6DACI,CAAA,qCAGJ,cACI,CAAA,iBACA,CAAA,gCAGJ,oBACI,CAAA,SACA,CAAA,iBACA,CAAA,wBACA,CAAA,YAEA,CAAA,kBACA,CAAA,gBACA,CAAA,iBACA",sourcesContent:["$textColor: #dadcdd;\n$backgroundColor: #262829;\n$highlightColor: #c3df8544;\n\n* {\n box-sizing: border-box;\n cursor: default;\n user-select: none;\n}\n\na {\n cursor: pointer;\n color: #c3df85;\n text-decoration: none;\n \n &:hover {\n color: #d7e6b9;\n text-decoration: underline;\n }\n}\n\n.beingDragged {\n opacity: 0.6;\n z-index: 1000 !important;\n}\n\nimg {\n pointer-events: none;\n}\n\nbody {\n background-color: $backgroundColor;\n color: $textColor;\n overflow: hidden;\n}\n\ninput {\n border: 1px solid #343738;\n background: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n padding: 0.3em 0.8em;\n outline: none;\n font-size: 1.2em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n}\n\n.MenuBar {\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n border-bottom: 1px solid lighten($backgroundColor, 20%);\n width: 100%;\n height: 2.5em;\n position: absolute;\n z-index: 50;\n top: 0;\n left: 0;\n\n .Icon {\n height: 100%;\n padding: 0.4em 1em;\n }\n \n .Menu {\n display: inline-block;\n padding: 0.6em 0.7em;\n height: 100%;\n vertical-align: top;\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n}\n\n.MenuContent {\n display: none;\n position: absolute;\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n left: 0;\n top: 2.5em;\n min-width: 6em;\n min-height: 0.5em;\n z-index: 1000;\n \n & > .entry {\n padding: 0.5em 2em;\n\n &.submenu:after {\n content: '›';\n display: inline-block;\n position: absolute;\n right: 0;\n margin-right: 0.5em;\n }\n \n &:hover {\n background-color: $backgroundColor;\n }\n } \n\n & > .entry.disabled {\n color: darken($textColor, 35%);\n \n &:hover {\n background-color: lighten($backgroundColor, 5%);\n }\n }\n \n & > .separator {\n background-color: lighten($backgroundColor, 20%);\n border: 0.4em solid lighten($backgroundColor, 10%);\n height: 0.9em;\n }\n}\n\n\n.Modal {\n display: block;\n position: absolute;\n background-color: #00000077;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n}\n\n\nbutton::-moz-focus-inner {\n border: 0;\n}\n \nbutton, .button {\n background-color: darken($backgroundColor, 10%);\n outline: none;\n border-radius: 0;\n border: none;\n color: $textColor;\n padding: 0.5em 2em;\n font-size: 1em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n \n &:focus {\n outline: none;\n }\n &:hover {\n background-color: darken($backgroundColor, 5%);\n }\n &:active {\n background-color: darken($backgroundColor, 8%);\n }\n}\n\n.Modal {\n background-color: #00000077;\n position: absolute;\n z-index: 52;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n \n .Dialog {\n z-index: 53;\n }\n}\n\n.text {\n white-space: pre-line;\n}\n\n.Dialog {\n min-width: 15em;\n max-width: 80vw;\n min-height: 5em;\n max-height: 80vh;\n}\n\n.Dialog, .DockPanel {\n position: absolute;\n z-index: 51;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n\n .title {\n width: 100%;\n text-align: center;\n padding: 0.5em;\n background-color: lighten($backgroundColor, 20%);\n border-bottom: 1px solid lighten($backgroundColor, 30%);\n\n .closeButton {\n padding: 0.2em;\n width: 2em;\n height: 2em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: lighten($backgroundColor, 5%);\n \n &:hover {\n background-color: lighten($backgroundColor, 10%);\n }\n }\n }\n\n .content {\n padding: 0.8em 1.5em;\n position: absolute;\n }\n\n .content.w3term {\n height: 100%;\n }\n\n .buttons {\n padding: 0.8em 1.5em;\n text-align: center;\n }\n}\n\n.Dialog .content,\n.Dialog .Panel.content {\n position: static;\n padding: 0.8em 1.5em;\n}\n\n.InputDialog input {\n width: 100%;\n}\n\n.Label {\n user-select: text;\n}\n\n.DockContainer {\n & > * {\n overflow: hidden;\n position: absolute;\n }\n\n \n &.horizontal > * {\n // border: 1px solid #00ffff;\n // background-color: #00ffff66;\n display: inline-block;\n\n &.DockSeparator {\n width: 3px;\n height: 100%;\n background-color: darken($backgroundColor, 10%); \n cursor: ew-resize;\n }\n }\n \n &.vertical > * {\n // border: 1px solid #ffff00;\n // background-color: #ffff0066;\n display: block;\n clear: both;\n \n &.DockSeparator {\n width: 100%;\n height: 3px;\n background-color: darken($backgroundColor, 10%); \n cursor: ns-resize;\n }\n }\n \n & > .DockSeparator:hover {\n background-color: darken($backgroundColor, 5%);\n }\n}\n\n.DockPanel {\n transform: none;\n max-width: none;\n max-height: none;\n background-color: $backgroundColor;\n .title {\n text-align: left;\n padding: 0.1em 0.5em;\n font-size: 0.9em;\n background-color: darken($backgroundColor, 5%);\n border-bottom: 1px solid darken($backgroundColor, 8%);\n\n .closeButton {\n padding: 0;\n width: 1.6em;\n height: 1.6em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: darken($backgroundColor, 5%);\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n }\n\n .content {\n width: 100%;\n height: calc(100% - 1.5em);\n overflow: auto;\n }\n\n &.resizingHorizontally {\n cursor: ew-resize;\n }\n &.resizingVertically {\n cursor: ns-resize;\n }\n &.resizingHorizontally.resizingVertically {\n cursor: nwse-resize;\n }\n\n .resizeEW,\n .resizeNS,\n .resizeDiag {\n display: none;\n }\n &.floating {\n .resizeEW {\n display: block;\n width: 0.3em;\n top: 0;\n bottom: 0;\n background-color: transparent;\n cursor: ew-resize;\n position: absolute;\n right: 0;\n }\n .resizeNS {\n display: block;\n width: 100%;\n height: 0.3em;\n background-color: transparent;\n cursor: ns-resize;\n position: absolute;\n left: 0;\n bottom: 0;\n }\n .resizeDiag {\n display: block;\n width: 0.5em;\n height: 0.5em;\n background-color: transparent;\n cursor: nwse-resize;\n position: absolute;\n right: 0;\n bottom: 0;\n }\n }\n}\n\nbody > .DockContainer {\n position: absolute;\n z-index: 49;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.dockOverlay {\n position: fixed;\n background-color: #33779999;\n z-index: 999;\n}\n\n.NodeEditor {\n width: 100%;\n height: 100%;\n overflow: hidden !important;\n padding: 0 !important;\n\n &.moving {\n cursor: grabbing;\n }\n\n &.beingDragged {\n cursor: grabbing;\n }\n\n svg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n }\n \n .Node {\n position: absolute;\n }\n}\n\n.Node {\n display: inline-block;\n border-radius: 0.5em;\n box-shadow: 0 0 0.5em #00000077;\n \n background-color: darken($backgroundColor, 5%);\n white-space: nowrap;\n \n .title {\n border-radius: 0.5em 0.5em 0 0;\n background-color: lighten($backgroundColor, 5%);\n }\n\n .body {\n display: flex;\n justify-content: space-between;\n }\n\n .bullet {\n display: inline-block;\n background-color: lighten($backgroundColor, 10%);\n\n width: 1.2em;\n height: 1.2em;\n border-radius: 1em;\n border: 0.2em solid transparent;\n background-clip: padding-box;\n\n &:hover {\n background-color: lighten($backgroundColor, 25%);\n border: none;\n }\n }\n\n .inputs {\n display: inline-block;\n vertical-align: text-top;\n \n .bullet {\n margin-left: -0.5em;\n margin-right: 0.5em;\n }\n \n .input {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0;\n }\n }\n \n .outputs {\n display: inline-block;\n vertical-align: text-top;\n text-align: right;\n \n .bullet {\n margin-left: 0.5em;\n margin-right: -0.5em;\n }\n \n .output {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0;\n }\n }\n \n .contents {\n vertical-align: text-top;\n display: inline-block;\n min-width: 2em;\n min-height: 2em;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n\n &.selected {\n box-shadow: 0 0 0.5em lighten($backgroundColor, 15%);\n\n .title {\n background-color: lighten($backgroundColor, 15%);\n }\n }\n}\n\n.TreeViewItem .label {\n background-color: transparent;\n display: inline-block;\n border: 1px solid transparent;\n -webkit-user-drag: element;\n}\n\n.TreeViewItem.focused > .label {\n border: 1px solid lighten($backgroundColor, 15%);\n}\n\n.TreeViewItem .label.selected {\n background-color: $highlightColor;\n}\n\n.TreeViewItem * {\n cursor: pointer;\n}\n\n.TreeViewItem > .expander {\n display: inline-block;\n opacity: 0;\n width: 0.3em;\n margin-right: 0.5em;\n font-weight: bold;\n transform: rotate(0deg);\n transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expandable > .expander {\n opacity: 1;\n display: inline-block;\n}\n\n.TreeViewItem.expanded > .expander {\n transform: rotate(90deg);\n}\n\n.TreeViewItem > .children {\n margin-left: 1em;\n overflow: hidden;\n display: none;\n // transform: scaleY(0); \n // transform-origin: top;\n // transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expanded > .children {\n display: block;\n // transform: scaleY(1);\n}\n\n.Panel.content {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView, .ListView.content {\n display: table;\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView .cell {\n font-size: 80%;\n display: table-cell;\n padding: 0.15em 0.6em;\n border-left: 0.2em solid $backgroundColor;\n border-bottom: 0.2em solid $backgroundColor;\n background-color: darken($backgroundColor, 3%);\n}\n\n.ListView .row {\n display: table-row;\n \n .cell {\n user-select: text;\n\n input {\n background-color: transparent;\n border: none;\n outline: none;\n color: $textColor;\n margin: 0;\n padding: 0;\n user-select: text;\n width: auto;\n display: inline;\n }\n }\n\n &.selected .cell {\n background-color: $highlightColor;\n }\n\n .cell.editing {\n background-color: darken($highlightColor, 50%);\n box-shadow: inset 0 0 0.1em $highlightColor;\n }\n}\n\n.ListView .header {\n display: table-row;\n\n .cell {\n background-color: lighten($backgroundColor, 5%);\n }\n}\n\n.NodeEditor path {\n stroke: #999999ff;\n}\n\n.NodeEditor path.notConnectable {\n stroke: #994444ff;\n}\n\n\n.NodeEditor .selectRect {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 30%);\n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 500;\n}\n\n.Dropdown {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 20%);\n color: $textColor;\n outline: none;\n}\n\n.ListBox {\n border: 1px solid #343738;\n background-color: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n outline: none;\n font-size: 0.9em;\n overflow: auto;\n\n & > div {\n padding: 0.3em 1em;\n\n &:hover {\n background-color: lighten(#1a1d1f, 5%);\n }\n\n &.selected {\n background-color: $highlightColor;\n }\n }\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n\n\n.ColorPicker .handle {\n border-radius: 100%;\n position:relative;\n border: 0.05em solid #222;\n width: 1.2em;\n height: 1.2em;\n box-shadow: 0.03em 0.03em 0.3em #00000044,\n inset 0 0 0.5em white;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.PaintStyleColorPicker > .hue {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to right,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.PaintStyleColorPicker > .hue *,\n.PaintStyleColorPicker > .lightness * {\n pointer-events: none;\n}\n\n.PaintStyleColorPicker .saturation {\n width: 100%;\n height: 100%;\n background: linear-gradient(to bottom, transparent, hsl(0, 0%, 50%));\n}\n\n.PaintStyleColorPicker .lightness {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background-color: red;\n background-image: linear-gradient(to bottom, white, transparent, black);\n}\n\n.PaintStyleColorPicker .lightness > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.GimpStyleColorPicker > .saturation {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to bottom, transparent, black);\n}\n\n.GimpStyleColorPicker > .saturation *,\n.GimpStyleColorPicker > .value * {\n pointer-events: none;\n}\n\n.GimpStyleColorPicker .value {\n width: 100%;\n height: 100%;\n}\n\n.GimpStyleColorPicker .value::before {\n content: ' ';\n display: block;\n float: left;\n width: 100%;\n height: 100%;\n mask: linear-gradient(to right, white, transparent);\n background: linear-gradient(to bottom, white, black);\n}\n\n.GimpStyleColorPicker .hue {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background: linear-gradient(to bottom,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.GimpStyleColorPicker .hue > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.WheelColorPicker > .wheel {\n position: relative;\n border: 0.5em solid #090909;\n width: 25em;\n height: 25em;\n border-radius: 100%;\n padding: 3em;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: conic-gradient(\n hsl(90, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(0, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(89, 100%, 50%)\n );\n}\n\n.WheelColorPicker > .wheel >.handle {\n width: 3em;\n height: 3em;\n position: absolute;\n}\n\n\n.WheelColorPicker > .wheel > .innerCircle {\n width: 100%;\n height: 100%;\n background-color: #222;\n border-radius: 100%;\n padding: 18%;\n transform: rotate(45deg);\n box-shadow: inset 0.5em 0.5em 1em #00000088;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation,\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n width: 100%;\n height: 100%;\n}\n\n.WheelColorPicker > .saturation * {\n pointer-events: none;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation {\n background-color: red;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background-image: linear-gradient(45deg, hsl(0, 0%, 50%), transparent);\n}\n\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n background: linear-gradient(135deg, white, transparent, black);\n}\n\n.ColorPickerDialog .WheelColorPicker {\n margin-top: 1em;\n margin-bottom: 1em;\n}\n\n.ColorPickerDialog .ColorOutput {\n display: inline-block;\n width: 3em;\n padding: .3em .8em;\n border: 1px solid #343738;\n\n height: 2.4em;\n vertical-align: top;\n margin-top: 0.05em;\n margin-right: 0.4em;\n}"],sourceRoot:""}]);const s=l},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var l={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<t.length;c++){var d=[].concat(t[c]);o&&l[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},537:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},379:t=>{var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var r={},l=[],s=0;s<t.length;s++){var a=t[s],c=o.base?a[0]+o.base:a[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=n(u),A={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==h)e[h].references++,e[h].updater(A);else{var p=i(A,o);o.byIndex=s,e.splice(s,0,{identifier:u,updater:p,references:1})}l.push(u)}return l}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var r=o(t=t||[],i=i||{});return function(t){t=t||[];for(var l=0;l<r.length;l++){var s=n(r[l]);e[s].references--}for(var a=o(t,i),c=0;c<r.length;c++){var d=n(r[c]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=a}}},569:t=>{var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var o={};return(()=>{n.r(o),n.d(o,{AbstractColorPicker:()=>H,Button:()=>G,ClipboardData:()=>Lt,Color:()=>w,ColorModificationMode:()=>g,ColorPickerDialog:()=>j,DEGREES_TO_RAD:()=>C,Dialog:()=>L,DockContainer:()=>kt,DockDirection:()=>M,DockPanel:()=>xt,Dropdown:()=>Y,FakeClipboard:()=>Nt,FloatListViewColumn:()=>tt,GimpStyleColorPicker:()=>T,Image:()=>gt,InputDialog:()=>Ot,IntListViewColumn:()=>Z,Label:()=>pt,ListBox:()=>$,ListView:()=>et,ListViewColumn:()=>q,Menu:()=>dt,MenuBar:()=>ht,MessageDialog:()=>Pt,MessageDialogButton:()=>Bt,Node:()=>Ut,NodeClipboardData:()=>jt,NodeConnection:()=>Jt,NodeEditor:()=>Gt,NodePort:()=>Yt,OkMessageDialog:()=>Dt,Orientation:()=>R,PaintStyleColorPicker:()=>W,Panel:()=>O,RAD_TO_DEGREES:()=>f,ROOT:()=>S,StringListBox:()=>K,StringListViewColumn:()=>Q,TreeView:()=>ot,TreeViewItem:()=>it,UdoableActionCategory:()=>Et,UndoHistory:()=>Mt,UndoableCommand:()=>Rt,Vector2:()=>_,WheelColorPicker:()=>V,Widget:()=>k,currentMousePos:()=>E,fakeClipboard:()=>zt,rectContains:()=>y});var t=n(379),e=n.n(t),i=n(795),r=n.n(i),l=n(569),s=n.n(l),a=n(565),c=n.n(a),d=n(216),u=n.n(d),h=n(589),A=n.n(h),p=n(192),m={};m.styleTagTransform=A(),m.setAttributes=c(),m.insert=s().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=u(),e()(p.Z,m),p.Z&&p.Z.locals&&p.Z.locals;var g,f=180/Math.PI,C=Math.PI/180,_=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getAngleToOtherInRadians=function(t){return Math.acos(Math.max(Math.min(this.getScalarProduct(t)/(this.getLength()*t.getLength()),1),-1))},t.prototype.getAngleToOtherInDegrees=function(t){return this.getAngleToOtherInRadians(t)*f},t.prototype.getRotatedInRadians=function(e){var n=Math.cos(e),o=Math.sin(e);return new t(this.x*n-this.y*o,this.x*o+this.y*n)},t.prototype.getRotatedInDegrees=function(t){return this.getRotatedInRadians(t*C)},t.prototype.rotateInRadians=function(t){var e=Math.cos(t),n=Math.sin(t),o=this.x*e-this.y*n,i=this.x*n+this.y*e;this.x=o,this.y=i},t.prototype.rotateInDegrees=function(t){this.rotateInRadians(t*C)},t.prototype.getScalarProduct=function(t){return this.x*t.x+this.y*t.y},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.getScaled=function(e){return new t(this.x*e,this.y*e)},t.prototype.getLength=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.normalize=function(){var t=this.getLength();this.x=this.x/t,this.y=this.y/t},t.prototype.getNormalized=function(){var e=this.getLength();return new t(this.x/e,this.y/e)},t.prototype.setLength=function(t){this.normalize(),this.scale(t)},t.prototype.getWithLength=function(t){var e=this.getNormalized();return e.scale(t),e},t}();function y(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}function v(t,e){return(t%e+e)%e}!function(t){t[t.Percentage=0]="Percentage",t[t.FixedAmount=1]="FixedAmount"}(g||(g={}));var b=new RegExp(/^#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/),w=function(){function t(t,e,n){this.setRgb(t||0,e||0,n||0)}return t.fromRgb=function(e,n,o){return new t(e,n,o)},t.fromHsl=function(e,n,o){var i=t._hslToRgb(e,n,o),r=t.fromRgbObject(i);return r._hueInfo=e,r},t.fromHsv=function(e,n,o){var i=t._hsvToRgb(e,n,o),r=t.fromRgbObject(i);return r._hueInfo=e,r},t.fromHex=function(e){var n=t._hexToRgb(e);return n?t.fromRgbObject(n):null},t._hexToRgb=function(t){var e=t.match(b);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},t._hslToRgb=function(t,e,n){t=v(t,360);var o,i,r,l=(1-Math.abs(2*n-1))*e,s=l*(1-Math.abs(v(t/60,2)-1)),a=n-l/2;return t>=0&&t<60?(o=l,i=s,r=0):t>=60&&t<120?(o=s,i=l,r=0):t>=120&&t<180?(o=0,i=l,r=s):t>=180&&t<240?(o=0,i=s,r=l):t>=240&&t<300?(o=s,i=0,r=l):t>=300&&t<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},t._hsvToRgb=function(t,e,n){t=v(t,360);var o,i,r,l=n*e,s=l*(1-Math.abs(v(t/60,2)-1)),a=n-l;return t>=0&&t<60?(o=l,i=s,r=0):t>=60&&t<120?(o=s,i=l,r=0):t>=120&&t<180?(o=0,i=l,r=s):t>=180&&t<240?(o=0,i=s,r=l):t>=240&&t<300?(o=s,i=0,r=l):t>=300&&t<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},t.fromRgbObject=function(e){return t.fromRgb(e.r,e.g,e.b)},t.fromHslObject=function(e){return t.fromHsl(e.h,e.s,e.l)},t.fromHsvObject=function(e){return t.fromHsv(e.h,e.s,e.v)},t.prototype.setRgb=function(t,e,n){this._r=Math.max(Math.min(Math.round(t),255),0),this._g=Math.max(Math.min(Math.round(e),255),0),this._b=Math.max(Math.min(Math.round(n),255),0)},t.prototype.setHsl=function(e,n,o){var i=t._hslToRgb(e,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=e},t.prototype.setHsv=function(e,n,o){var i=t._hsvToRgb(e,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=e},t.prototype.setHex=function(e){var n=t._hexToRgb(e);this._r=n.r,this._g=n.g,this._b=n.b},t.prototype.setRgbObject=function(t){this.setRgb(t.r,t.g,t.b)},t.prototype.setHslObject=function(t){this.setHsl(t.h,t.s,t.l)},t.prototype.setHsvObject=function(t){this.setHsv(t.h,t.s,t.v)},t.prototype.getHsl=function(){var t,e=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(e,n,o),r=Math.min(e,n,o),l=i-r;0==l?t=0:i==e?t=60*v((n-o)/l,6):i==n?t=60*((o-e)/l+2):i==o&&(t=60*((e-n)/l+4));var s=(i+r)/2,a=0==l?0:l/(1-Math.abs(2*s-1));return{h:0==t&&this._hueInfo?this._hueInfo:t,s:a,l:s}},t.prototype.getHsv=function(){var t,e=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(e,n,o),r=i-Math.min(e,n,o);0==r?t=0:i==e?t=60*v((n-o)/r,6):i==n?t=60*((o-e)/r+2):i==o&&(t=60*((e-n)/r+4));var l=0==r?0:r/i,s=i;return{h:0==t&&this._hueInfo?this._hueInfo:t,s:l,v:s}},t.prototype.getRgb=function(){return{r:this._r,g:this._g,b:this._b}},t.prototype.getHex=function(){var t=this._r.toString(16).padStart(2,"0"),e=this._g.toString(16).padStart(2,"0"),n=this._b.toString(16).padStart(2,"0");return"#".concat(t).concat(e).concat(n)},t.prototype.lighten=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.l=Math.max(0,Math.min(n.l+t,1)):n.l=Math.max(0,Math.min(n.l*(t+1),1)),this.setHslObject(n)},t.prototype.darken=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.l=Math.max(0,Math.min(n.l-t,1)):n.l=Math.max(0,Math.min(n.l*(1-t),1)),this.setHslObject(n)},t.prototype.saturate=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.s=Math.max(0,Math.min(n.s+t,1)):n.s=Math.max(0,Math.min(n.s*(t+1),1)),this.setHslObject(n)},t.prototype.desaturate=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.s=Math.max(0,Math.min(n.s+t,1)):n.s=Math.max(0,Math.min(n.s*(1-t),1)),this.setHslObject(n)},t.prototype.setSaturation=function(t){t=Math.min(Math.max(t,0),1);var e=this.getHsl();e.s=t,this.setHslObject(e)},t.prototype.rotateHue=function(t){var e=this.getHsl();e.h=v(e.h+t,360),this.setHslObject(e)},t.prototype.invert=function(){this._r=255-this._r,this._g=255-this._g,this._b=255-this._b,this._hueInfo&&(this._hueInfo=v(this._hueInfo+180,360))},t.prototype.getInverted=function(){return t.fromRgb(255-this._r,255-this._g,255-this._b)},t.prototype.getComplement=function(){var e=t.fromRgb(this._r,this._g,this._b);return e.rotateHue(180),e},t.prototype.getBlended=function(e,n){var o=1-(n=Math.max(Math.min(n,1),0));return t.fromRgb(Math.round(this._r*o+e._r*n),Math.round(this._g*o+e._g*n),Math.round(this._b*o+e._b*n))},t}(),k=function(){function t(t){this.element=t||document.createElement("div"),this.element.classList.add("Widget"),this.parentWidget=null}return t.prototype.onDragStart=function(t){return this.element.classList.add("beingDragged"),!0},t.prototype.onDragEnd=function(t){this.element.classList.remove("beingDragged")},t.prototype.onDragging=function(t){this.element.style.left=t.posWithOffsetToParentConsidered.x+"px",this.element.style.top=t.posWithOffsetToParentConsidered.y+"px"},t.prototype.onAttached=function(){},t.prototype.isAttached=function(){return document.body.contains(this.element)},t.prototype.onResize=function(){},t}(),x=new function(t,e,n,o,i){this.element=null,this.offsetX=0,this.offsetY=0,this.dragStartY=0,this.dragStartX=0}(null,0,0,0,0),E={x:-1,y:-1};function I(t,e){return function(n){if((!e||e(t,n))&&(e||!t.onDragStart||t.onDragStart(n))){var o=t.element.getBoundingClientRect();x.offsetX=n.clientX-o.left,x.offsetY=n.clientY-o.top,x.dragStartX=n.clientY,x.dragStartY=n.clientY,x.draggable=t,x.element=t.element,n.stopPropagation()}}}var B=function(t,e,n,o){this.element=t,this.onDragStart=e,this.onDragging=n,this.onDragEnd=o};window.addEventListener("mouseup",(function(t){x&&x.draggable&&(x.draggable.onDragEnd(t),x.draggable=null)}),!0),window.addEventListener("mousemove",(function(t){if(null!=x.draggable){var e=x.element.getBoundingClientRect(),n={mouseEvent:t,rect:e,posWithOffsetToParentConsidered:new _(t.clientX-x.offsetX,t.clientY-x.offsetY),posRelativeToElement:new _(t.clientX-e.x,t.clientY-e.y),posRelativeToDragStart:new _(t.clientX-x.dragStartX,t.clientY-x.dragStartY)};x.draggable.onDragging(n)}E.x=t.clientX,E.y=t.clientY}),!0);var P,D=(P=function(t,e){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},P(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O=function(t){function e(){var e=t.call(this)||this;return e.element.classList.add("Panel"),e.children=[],e}return D(e,t),e.prototype.prependChild=function(t){t.parentWidget=this,this.element.prepend(t.element),this.children.unshift(t),this.isAttached()&&t.onAttached()},e.prototype.appendChild=function(t){t.parentWidget=this,this.element.appendChild(t.element),this.children.push(t),this.isAttached()&&t.onAttached()},e.prototype.removeChild=function(t){t.parentWidget=null,this.element.removeChild(t.element);var e=this.children.indexOf(t);e>=0&&this.children.splice(e,1)},e.prototype.onAttached=function(){if(this.isAttached())for(var t=0,e=this.children;t<e.length;t++)e[t].onAttached()},e.prototype.onResize=function(){for(var t=0,e=this.children;t<e.length;t++)e[t].onResize()},e}(k),S=new O;S.element=document.body;var M,R,N=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),L=function(t){function e(e,n,o){var i=t.call(this)||this;if(i.element.classList.add("Dialog"),i.title=e,i.attachedElement=null,o=null==o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=e,i.titleElement.className="title",i.contentWidget=n,i.contentElement=n.element,i.contentElement.classList.add("content"),o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(t){i.hide()}}return i.modalElement=document.createElement("div"),i.modalElement.className="Modal",i.element.appendChild(i.titleElement),i.element.appendChild(i.contentElement),i.titleElement.addEventListener("mousedown",I(i)),i}return N(e,t),e.prototype.onAttached=function(){this.isAttached()&&this.contentWidget.onAttached()},e.prototype.show=function(){this.attachedElement=this.element,S.element.appendChild(this.element),this.onAttached()},e.prototype.hide=function(){null!=this.attachedElement&&(S.element.removeChild(this.attachedElement),this.attachedElement=null)},e.prototype.showModal=function(){this.attachedElement=this.modalElement,this.modalElement.appendChild(this.element),S.element.appendChild(this.modalElement),this.onAttached()},e.prototype.isShown=function(){return null!=this.attachedElement},e.prototype.onDragging=function(e){t.prototype.onDragging.call(this,e),this.element.style.transform="none"},e}(k),z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),H=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("ColorPicker"),n._onColorChanged=e,n}return z(e,t),e.prototype.setColorProperty=function(t){var e=this._color;this._color=t,this._onColorChanged&&this._onColorChanged(e,t)},e.prototype.getColor=function(){return this._color},e}(k),W=function(t){function e(e,n){var o=t.call(this,n)||this;o.element.classList.add("PaintStyleColorPicker"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._colorHandle=document.createElement("div"),o._colorHandle.classList.add("handle"),o._lightnessHandle=document.createElement("div"),o._lightnessHandle.classList.add("handle"),o._hueDiv.appendChild(o._saturationDiv),o._saturationDiv.appendChild(o._colorHandle),o._lightnessDiv.appendChild(o._lightnessHandle),o.element.appendChild(o._hueDiv),o.element.appendChild(o._lightnessDiv);var i=new B(o._hueDiv,(function(t){return!0}),(function(t){o._onHueMove(t)}),(function(t){}));o._hueDiv.addEventListener("mousedown",I(i));var r=new B(o._lightnessDiv,(function(t){return!0}),(function(t){o._onLightnessMove(t)}),(function(t){}));return o._lightnessDiv.addEventListener("mousedown",I(r)),void 0===e&&(e=new w(255,0,0)),o.setColor(e),o}return z(e,t),e.prototype._onLightnessMove=function(t){this._lightnessHandle.style.top=Math.max(Math.min(t.posRelativeToElement.y,this._lightnessDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._onHueMove=function(t){var e=t.posRelativeToElement;this._colorHandle.style.left=Math.max(Math.min(e.x,this._hueDiv.clientWidth),0)+"px",this._colorHandle.style.top=Math.max(Math.min(e.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._getColorFromCurrentPositions=function(){var t=this._hueDiv.getBoundingClientRect(),e=this._lightnessDiv.getBoundingClientRect(),n=this._colorHandle.offsetLeft/t.width,o=1-this._colorHandle.offsetTop/t.height,i=1-this._lightnessHandle.offsetTop/e.height;return w.fromHsl(360*n,o,i)},e.prototype._setColorInternal=function(t,e){var n=t.getHsl(),o=n.h/360,i=n.s,r=n.l;if(e){var l=this._hueDiv.getBoundingClientRect(),s=this._lightnessDiv.getBoundingClientRect();this._colorHandle.style.left=(l.width*o).toFixed(2)+"px",this._colorHandle.style.top=(l.height-l.height*i).toFixed(2)+"px",this._lightnessHandle.style.top=(s.height-s.height*r).toFixed(2)+"px"}var a=w.fromHsl(n.h,n.s,.5);this._lightnessDiv.style.backgroundColor=a.getHex(),this.setColorProperty(t)},e.prototype.setColor=function(t){this._setColorInternal(t,!0)},e.prototype.onAttached=function(){this.setColor(this.getColor())},e}(H),T=function(t){function e(e,n){var o=t.call(this,n)||this;o.element.classList.add("GimpStyleColorPicker"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._valueDiv=document.createElement("div"),o._valueDiv.classList.add("value"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._svHandle=document.createElement("div"),o._svHandle.classList.add("handle"),o._hueHandle=document.createElement("div"),o._hueHandle.classList.add("handle"),o._saturationDiv.appendChild(o._valueDiv),o._valueDiv.appendChild(o._svHandle),o._hueDiv.appendChild(o._hueHandle),o.element.appendChild(o._saturationDiv),o.element.appendChild(o._hueDiv);var i=new B(o._saturationDiv,(function(t){return!0}),(function(t){o._onSatValMove(t)}),(function(t){}));o._saturationDiv.addEventListener("mousedown",I(i));var r=new B(o._hueDiv,(function(t){return!0}),(function(t){o._onHueMove(t)}),(function(t){}));return o._hueDiv.addEventListener("mousedown",I(r)),void 0===e&&(e=new w(255,0,0)),o.setColor(e),o}return z(e,t),e.prototype._onHueMove=function(t){this._hueHandle.style.top=Math.max(Math.min(t.posRelativeToElement.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._onSatValMove=function(t){var e=t.posRelativeToElement;this._svHandle.style.left=Math.max(Math.min(e.x,this._saturationDiv.clientWidth),0)+"px",this._svHandle.style.top=Math.max(Math.min(e.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._getColorFromCurrentPositions=function(){var t=this._saturationDiv.getBoundingClientRect(),e=this._hueDiv.getBoundingClientRect(),n=this._svHandle.offsetLeft/t.width,o=1-this._svHandle.offsetTop/t.height,i=this._hueHandle.offsetTop/e.height;return w.fromHsv(360*i,n,o)},e.prototype._setColorInternal=function(t,e){var n=t.getHsv(),o=n.h/360,i=n.s,r=n.v;if(e){var l=this._hueDiv.getBoundingClientRect(),s=this._valueDiv.getBoundingClientRect();this._svHandle.style.left=(l.width*i).toFixed(2)+"px",this._svHandle.style.top=(l.height-l.height*r).toFixed(2)+"px",this._hueHandle.style.top=(s.height*o).toFixed(2)+"px"}var a=w.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=a.getHex(),this.setColorProperty(t)},e.prototype.setColor=function(t){this._setColorInternal(t,!0)},e.prototype.onAttached=function(){this.setColor(this.getColor())},e}(H),V=function(t){function e(e,n){var o=t.call(this,n)||this;o._zeroHueVector=new _(1,0),o.element.classList.add("WheelColorPicker"),o._hueWheelDiv=document.createElement("div"),o._hueWheelDiv.classList.add("wheel"),o._wheelHandle=document.createElement("div"),o._wheelHandle.classList.add("handle"),o._slHandle=document.createElement("div"),o._slHandle.classList.add("handle"),o._innerCircleDiv=document.createElement("div"),o._innerCircleDiv.classList.add("innerCircle"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._lightnessDiv.appendChild(o._slHandle),o._saturationDiv.appendChild(o._lightnessDiv),o._innerCircleDiv.appendChild(o._saturationDiv),o._hueWheelDiv.appendChild(o._wheelHandle),o._hueWheelDiv.appendChild(o._innerCircleDiv),o.element.appendChild(o._hueWheelDiv);var i=new B(o._saturationDiv,(function(t){return!0}),(function(t){o._onSatLitMove(t)}),(function(t){}));o._saturationDiv.addEventListener("mousedown",I(i));var r=new B(o._hueWheelDiv,(function(t){return!0}),(function(t){o._onHueMove(t)}),(function(t){}));return o._hueWheelDiv.addEventListener("mousedown",I(r)),void 0===e&&(e=new w(255,0,0)),o.setColor(e),o}return z(e,t),e.prototype._onHueMove=function(t){var e=this._hueWheelDiv.clientWidth/2,n=this._hueWheelDiv.clientHeight/2,o=this._wheelHandle.getBoundingClientRect(),i=new _(t.posRelativeToElement.x-e,t.posRelativeToElement.y-n);i.setLength(this._hueWheelDiv.clientWidth/2-o.width/2),this._wheelHandle.style.left=e+i.x+"px",this._wheelHandle.style.top=n+i.y+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._onSatLitMove=function(t){var e=this._innerCircleDiv.getBoundingClientRect(),n=t.posRelativeToElement,o=t.rect.x-e.x;n.x-=(e.width-o-o)/2,n.rotateInDegrees(-45),this._slHandle.style.left=Math.max(Math.min(n.x,this._saturationDiv.clientWidth),0)+"px",this._slHandle.style.top=Math.max(Math.min(n.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._getColorFromCurrentPositions=function(){var t=this._saturationDiv.getBoundingClientRect(),e=this._slHandle.getBoundingClientRect(),n=this._wheelHandle.getBoundingClientRect(),o=e.x+e.width/2-t.x,i=1-(e.y+e.height/2-t.y)/t.height,r=t.width*(i<.5?2*i:2*(1-i)),l=(o-(t.width/2-r/2))/r,s=this._hueWheelDiv.clientWidth,a=s/2,c=this._hueWheelDiv.clientHeight/2,d=new _(this._wheelHandle.offsetLeft+n.width/2-a,this._wheelHandle.offsetTop+n.height/2-c);d.setLength(s/2-n.width/2);var u=this._zeroHueVector.getAngleToOtherInDegrees(d);return d.y>0&&(u=360-u),w.fromHsl(u,l,i)},e.prototype._setColorInternal=function(t,e){var n=t.getHsl(),o=n.s,i=n.l;if(e){var r=this._saturationDiv.getBoundingClientRect(),l=this._innerCircleDiv.getBoundingClientRect(),s=r.width*(i<.5?2*i:2*(1-i)),a=new _(r.width/2+s*o-s/2,r.height-r.height*i),c=r.x-l.x;a.x-=(l.width-c-c)/2,a.rotateInDegrees(-45),this._slHandle.style.left=a.x.toFixed(2)+"px",this._slHandle.style.top=a.y.toFixed(2)+"px";var d=this._wheelHandle.getBoundingClientRect(),u=this._hueWheelDiv.clientWidth,h=u/2,A=this._hueWheelDiv.clientHeight/2,p=this._zeroHueVector.getRotatedInDegrees(-n.h);p.setLength(u/2-d.width/2),this._wheelHandle.style.left=h+p.x+"px",this._wheelHandle.style.top=A+p.y+"px"}var m=w.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=m.getHex(),this.setColorProperty(t)},e.prototype.setColor=function(t){this._setColorInternal(t,!0)},e.prototype.onAttached=function(){this.setColor(this.getColor())},e}(H),j=function(t){function e(e,n,o,i,r){var l=this,s=new k,a=s.element;l=t.call(this,e,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l._divOutput=document.createElement("div"),l._divOutput.classList.add("ColorOutput"),l._textInput=document.createElement("input"),l.colorPicker=new V(o,(function(t,e){var n=e.getHex();l._textInput.value=n,l._divOutput.style.backgroundColor=n})),l._textInput.value=o.getHex(),l._textInput.onkeyup=function(){var t=w.fromHex(l._textInput.value);t&&l.colorPicker.setColor(t)};var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(t){var e=document.createElement("button");e.textContent=t.label,t.isCancel&&(l._cancelOption=e),t.isContinue&&(l._continueOption=e),e.onclick=function(e){l.hide(),t.callback&&t.callback(l)},d.appendChild(e)})),a.appendChild(c),a.appendChild(l.colorPicker.element),a.appendChild(l._divOutput),a.appendChild(l._textInput),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("ColorPickerDialog"),l._boundKeyEvent=null,l}return z(e,t),e.prototype.onAttached=function(){this.isAttached()&&this.colorPicker.onAttached()},e.prototype.getColor=function(){return this.colorPicker.getColor()},e.prototype.showModal=function(){var e=this;t.prototype.showModal.call(this),this._boundKeyEvent=function(t){"Escape"==t.key&&e._cancelOption?e._clickButton(e._cancelOption):"Enter"==t.key&&e._continueOption&&e._clickButton(e._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},e.prototype._clickButton=function(t){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});t.dispatchEvent(e)},e.prototype.hide=function(){t.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},e}(L),F=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),G=function(t){function e(e,n){var o=t.call(this,document.createElement("button"))||this;return o.element.classList.add("Button"),o.element.textContent=e,n&&(o.element.onclick=n),o}return F(e,t),e}(k),J=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Y=function(t){function e(){var e=t.call(this,document.createElement("select"))||this;return e.element.classList.add("Dropdown"),e}return J(e,t),e.prototype.addOption=function(t,e){var n=document.createElement("option");n.textContent=t,n.value=e,this.element.appendChild(n)},e.prototype.removeOption=function(t){for(var e=0,n=Array.from(this.element.options);e<n.length;e++){var o=n[e];if(o.value==t)return void this.element.removeChild(o)}},e.prototype.getSelectedValue=function(){return this.element.value},e.prototype.setSelectedValue=function(t){this.element.value=t},e}(k),U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$=function(t){function e(e,n,o){var i=t.call(this)||this;return i.element.classList.add("ListBox"),i._toElementFunction=n||function(t){return t},i._selectedIndex=-1,e=e||[],i.setItems(e),i._onItemClick=o||function(t){},i}return U(e,t),e.prototype.clear=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this._items=[],this._selectedIndex=-1},e.prototype.setItems=function(t){this.clear();for(var e=0,n=t;e<n.length;e++){var o=n[e];this.addItem(o)}},e.prototype.getItemCount=function(){return this._items.length},e.prototype.addItem=function(t){var e=this;this._items.push(t);var n=this._toElementFunction(t);n.onclick=function(){e.selectItem(t),e._onItemClick(t,n)},this.element.appendChild(n)},e.prototype.removeItem=function(t){var e=this._items.indexOf(t);this.removeItemAtIndex(e)},e.prototype.removeItemAtIndex=function(t){t<0||(this._items.splice(t,1),this.element.childNodes[t].remove())},e.prototype.selectItem=function(t){var e=this._items.indexOf(t);this.selectItemAtIndex(e)},e.prototype.selectItemAtIndex=function(t){this._selectedIndex>=0&&this.element.children[this._selectedIndex].classList.remove("selected"),t>=0&&this.element.children[t].classList.add("selected"),this._selectedIndex=t},e.prototype.getSelectedItem=function(){return this._selectedIndex>=0?this._items[this._selectedIndex]:null},e.prototype.getItemAtIndex=function(t){return t>=0&&t<this._items.length?this._items[t]:null},e.prototype.getSelectedIndex=function(){return this._selectedIndex},e}(k),K=function(t){function e(e,n,o){return n=n||function(t){return""+t},t.call(this,e,(function(t){var e=document.createElement("div");return e.textContent=n(t),e}),o)||this}return U(e,t),e}($),X=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),q=function(){function t(t,e,n,o){this.name=t,this.isReadOnly=e,this.fromString=n,this.toString=o}return t.prototype.compare=function(t,e){return 0},t}(),Q=function(t){function e(e,n){return t.call(this,e,n,(function(t){return t}),(function(t){return t}))||this}return X(e,t),e.prototype.compare=function(t,e){return(null==t?void 0:t.toLowerCase())>(null==e?void 0:e.toLowerCase())?1:(null==e?void 0:e.toLowerCase())>(null==t?void 0:t.toLowerCase())?-1:0},e}(q),Z=function(t){function e(e,n){return t.call(this,e,n,(function(t){return parseInt(t)}),(function(t){return""+t}))||this}return X(e,t),e.prototype.compare=function(t,e){return t>e?1:e>t?-1:0},e}(q),tt=function(t){function e(e,n){return t.call(this,e,n,(function(t){return parseFloat(t)}),(function(t){return""+t}))||this}return X(e,t),e.prototype.compare=function(t,e){return t>e?1:e>t?-1:0},e}(q),et=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.element.classList.add("ListView"),r._columns=[],r._rows=[],r._htmlRows=[],r._cellValueChangedCallback=o,r._editValidationCallback=n,r._cellDoubleClickCallback=i,r._headerRow=document.createElement("div"),r._headerRow.className="header",r.element.appendChild(r._headerRow),e.forEach((function(t){r.addColumn(t)})),r}return X(e,t),e.fromStringColumns=function(t,n,o,i,r){return new e(t.map((function(t){return new Q(t,n)})),o,i,r)},e.prototype.addStringColumn=function(t,e,n,o){return this.addColumn(new Q(t,!!e),n,o)},e.prototype.addColumn=function(t,e,n){if(!(t instanceof q)){var o={name:"Argument Error",level:"Error",message:"The argument 'column' must contain an instance of ListViewColumn, got "+typeof t,toString:function(){return this.name+": "+this.message}};throw console.error(o),o}null==n&&(n=this._columns.length);var i=document.createElement("span");if(i.textContent=t.name,i.className="cell",n<0||n>=this._headerRow.children.length)this._headerRow.appendChild(i),this._columns.push(t);else{var r=this._headerRow.children.item(n);this._headerRow.insertBefore(i,r),this._columns.splice(n,0,t)}if(this.setColumnReadonly(t),e||(e=[]),e.length>this._rows.length)throw o={name:"Argument Error",level:"Error",message:"The argument 'columnValues' must not be longer than the total amount of rows ("+e.length+" elements were given for "+this._rows.length+")",toString:function(){return this.name+": "+this.message}},console.error(o),o;for(var l=0;l<this._rows.length;l++){var s=this._rows[l],a=this._htmlRows[l],c="";l<e.length&&(c=e[l]),s.splice(n,0,c),this._addCellToRow(s,a,n,c)}},e.prototype.removeColumn=function(t){this._columns.splice(t,1),this._headerRow.removeChild(this._headerRow.children[t]);for(var e=0;e<this._rows.length;e++)this._rows[e].splice(t,1),this._htmlRows[e].removeChild(this._htmlRows[e].children[t])},e.prototype.setColumnAtIndexReadonly=function(t,e){var n=this._columns[t];this.setColumnReadonly(n,e)},e.prototype.setColumnReadonly=function(t,e){var n=this,o=this._columns.indexOf(t);e=void 0!==e&&e,t.isReadOnly=e;var i=0;this._htmlRows.forEach((function(e){var r=Array.from(e.querySelectorAll(".cell"));o<r.length&&n._makeEditable(!t.isReadOnly,r[o],o,n._rows[i],t),i++}))},e.prototype.removeRow=function(t){this._rows.splice(t,1);var e=this.element.getElementsByClassName("row")[t];this.element.removeChild(e),this._htmlRows.splice(t,1)},e.prototype.clear=function(){this._rows=[],this._htmlRows=[];for(var t=0,e=Array.from(this.element.getElementsByClassName("row"));t<e.length;t++){var n=e[t];this.element.removeChild(n)}},e.prototype.sortByColumn=function(t){var e=this,n=this._columns[t],o=this._rows;o.sort((function(e,o){return n.compare(e[t],o[t])})),this.clear(),o.forEach((function(t){e.addRow(t)}))},e.prototype._makeEditable=function(t,e,n,o,i){var r=this;t?e.ondblclick=function(t){var l=e.textContent,s=e.textContent;e.textContent="",e.classList.add("editing");var a=document.createElement("input");a.type="text",a.value=s;var c=!1,d=function(t){var c=a.value;!t||r._editValidationCallback&&!r._editValidationCallback(l,c,o,i,r._rows.indexOf(o),n)?e.textContent=s:(e.removeChild(a),e.textContent=c,e.classList.remove("editing"),o[n]=i.fromString(c),r._cellValueChangedCallback&&r._cellValueChangedCallback(l,c,o,i,r._rows.indexOf(o),n)),e.classList.remove("editing"),e.contains(a)&&e.removeChild(a)};a.onblur=function(t){c||(c=!0,d(!0))},a.onkeyup=function(t){if("Escape"==t.key){if(c)return;c=!0,d(!1)}else if("Enter"==t.key){if(c)return;c=!0,d(!0)}},e.appendChild(a),a.selectionStart=a.selectionEnd=a.value.length,a.focus()}:this._cellDoubleClickCallback?e.ondblclick=function(t){return r._cellDoubleClickCallback(o,i,r._rows.indexOf(o),n)}:e.ondblclick=null},e.prototype._addCellToRow=function(t,e,n,o){var i=document.createElement("span"),r=this._columns[n];return i.textContent=r.toString(o),i.className="cell",this._makeEditable(!this._columns[n].isReadOnly,i,n,t,r),n>=e.children.length?e.appendChild(i):e.insertBefore(i,e.children.item(n)),i},e.prototype.addRow=function(t){var e=this,n=document.createElement("div");if(n.className="row",this.element.appendChild(n),t.length!=this._columns.length){var o={name:"Argument Error",level:"Error",message:"The argument 'row' must contain "+this._columns.length+" entries, but "+t.length+" were provided",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}var i=0;t.forEach((function(o){e._addCellToRow(t,n,i,o),i++})),this._rows.push(t),this._htmlRows.push(n),n.onclick=function(t){e.deselectRows(),n.classList.add("selected")},n.oncontextmenu=n.onclick,this.element.appendChild(n)},e.prototype.deselectRows=function(){for(var t=0;t<this._htmlRows.length;t++)this._htmlRows[t].classList.remove("selected")},e.prototype.selectRow=function(t){for(var e=0;e<this._htmlRows.length;e++)e==t?this._htmlRows[e].classList.add("selected"):this._htmlRows[e].classList.remove("selected")},e.prototype.getSelectedRowIndex=function(){for(var t=0;t<this._htmlRows.length;t++)if(this._htmlRows[t].classList.contains("selected"))return t;return-1},e.prototype.getSelectedRow=function(){var t=this.getSelectedRowIndex();return t>=0?this.getRow(t):null},e.prototype.getColumnCount=function(){return this._columns.length},e.prototype.getRowCount=function(){return this._rows.length},e.prototype.getColumns=function(){return this._columns},e.prototype.changeCellValue=function(t,e,n){Array.from(this._htmlRows[t].querySelectorAll(".cell"))[e].textContent=n,this._rows[t][e]=this._columns[e].fromString(n)},e.prototype.getRow=function(t){return this._rows[t]},e.prototype.getRows=function(){return this._rows},e.prototype.getColumn=function(t){return this._columns[t]},e.prototype.renameColumn=function(t,e){this.getColumn(t).name=e,this._headerRow.children[t].textContent=e},e.prototype.getColumnValues=function(t){return this._rows.map((function(e){return e[t]}))},e.prototype.setCellContent=function(t,e,n){var o=this._rows[t][e],i=this._rows[t],r=this._columns[e];i[e]=r.fromString(n),this._htmlRows[t].children[e].textContent=n,this._cellValueChangedCallback&&this._cellValueChangedCallback(o,n,i,r,t,e)},e.prototype.getCellContent=function(t,e){return this._rows[t][e]},e}(k),nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ot=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("TreeView"),n.items=[],n.clickHandler=e,n._focusedItem=null,n}return nt(e,t),e.prototype.addItem=function(t,e,n,o,i){var r=new it(t,e,n,o,i);return r.parentWidget=this,this.items.push(r),this.element.appendChild(r.element),r},e.prototype.removeItem=function(t){var e=this.items.indexOf(t);e>=0&&(this.items.splice(e,1),this.element.removeChild(t.element),t.parentWidget=null,this._focusedItem==t&&(this._focusedItem=null))},e.prototype.clear=function(){for(this.items=[],this.items.forEach((function(t){return t.parentWidget=null}));this.element.firstChild;)this.element.removeChild(this.element.firstChild)},e.prototype.getItems=function(){return this.items},e.prototype.deselectAll=function(){this.items.forEach((function(t){return t.deselect()}))},e.prototype.getSelectedItem=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t]._getIfSelected();if(null!=e)return e}return null},e.prototype.getFocusedItem=function(){return this._focusedItem},e.prototype._sortFunction=function(t,e){return t.label.toLowerCase()>e.label.toLowerCase()?1:e.label.toLowerCase()>t.label.toLowerCase()?-1:0},e.prototype.sortItems=function(){var t=this,e=this.items.splice(0);for(e.sort(this._sortFunction),this.items=[];this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.forEach((function(e){e.children.length>0&&e.sortChildren(),t.items.push(e),t.element.appendChild(e.element)}))},e}(k),it=function(t){function e(e,n,o,i,r){var l=t.call(this)||this;return l.element.classList.add("TreeViewItem"),l.children=[],l.label=e,l.expander=document.createElement("span"),l.expander.textContent="›",l.expander.classList.add("expander"),l.element.appendChild(l.expander),l.labelElement=document.createElement("span"),l.labelElement.textContent=e,l.labelElement.className="label",l.element.appendChild(l.labelElement),l.childrenElement=document.createElement("div"),l.childrenElement.classList.add("children"),l.element.appendChild(l.childrenElement),l.contextMenu=r,l.parentItem=null,l.data=n,l.labelElement.draggable=!0,l.labelElement.ondblclick=function(t){i?i(t,l):l.children.length>0&&l.element.classList.toggle("expanded"),t.stopPropagation()},l.expander.onclick=function(t){l.children.length>0&&l.element.classList.toggle("expanded"),t.stopPropagation()},l.labelElement.oncontextmenu=r?function(t){l.setFocus(!0),r.show(t.clientX,t.clientY),t.stopPropagation(),t.preventDefault()}:function(t){l.setFocus(!0),t.stopPropagation()},l.labelElement.onclick=function(t){var e=l.parentWidget.getSelectedItem();l.select(),o&&o(t,l,e),l.parentWidget.clickHandler&&l.parentWidget.clickHandler(t,l,e)},l}return nt(e,t),e.prototype.addChildItem=function(t){return t.parentItem=this,this.children.push(t),this.childrenElement.firstChild?this.childrenElement.insertBefore(t.element,this.childrenElement.firstChild):this.childrenElement.appendChild(t.element),this.element.classList.add("expanded"),this.element.classList.add("expandable"),t.parentWidget=this.parentWidget,t},e.prototype.addChild=function(t,n,o,i,r){var l=new e(t,n,o,i,r);return this.addChildItem(l)},e.prototype.removeChild=function(t){var e=this.children.indexOf(t);e>=0&&(t.setFocus(!1),this.childrenElement.removeChild(t.element),this.children.splice(e,1),t.parentWidget=null,t.parentItem=null,0==this.children.length&&(this.element.classList.remove("expanded"),this.element.classList.remove("expandable")))},e.prototype.sortChildren=function(){var t=this,e=this.children.splice(0);for(e.sort(this.parentWidget._sortFunction),this.children=[];this.childrenElement.firstChild;)this.childrenElement.removeChild(this.childrenElement.firstChild);e.forEach((function(e){e.children.length>0&&e.sortChildren(),t.children.push(e),t.childrenElement.appendChild(e.element)}))},e.prototype.deselect=function(){this.labelElement.classList.remove("selected"),this.children.forEach((function(t){t.deselect()}))},e.prototype.select=function(){this.parentWidget.deselectAll(),this.labelElement.classList.add("selected")},e.prototype.setFocus=function(t){t?(this.parentWidget._focusedItem&&this.parentWidget._focusedItem.setFocus(!1),this.parentWidget._focusedItem=this,this.element.classList.add("focused")):(this.element.classList.remove("focused"),this.contextMenu&&this.contextMenu.hide(),this.parentWidget&&this.parentWidget._focusedItem==this&&(this.parentWidget._focusedItem=null))},e.prototype._getIfSelected=function(){if(this.labelElement.classList.contains("selected"))return this;for(var t=0;t<this.children.length;t++){var e=this.children[t]._getIfSelected();if(null!=e)return e}return null},e}(k),rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lt=function(t,e){this.name=t,this.element=e},st=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.menu=o,i}return rt(e,t),e}(lt),at=function(t){function e(e){return t.call(this,"-",e)||this}return rt(e,t),e}(lt),ct=function(t){function e(e,n,o,i){var r=t.call(this,e,n)||this;return r.clickCallback=o,r.canExecuteCallback=i,r}return rt(e,t),e}(lt),dt=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("Menu"),n.name=e,n.element.textContent=e,n._submenus=[],n._menuEntries=[],n.menuEntryPanel=document.createElement("div"),n.menuEntryPanel.className="MenuContent",n._x=-1,n._y=-1,n.element.onmouseenter=function(){var t=n.getParentMenuBar();t&&null!=t.activeMenu&&(t.activeMenu.hide(),n.show())},n.element.onclick=function(){if(n.isShown())n.hide();else{var t=n.getParentMenuBar();t&&t.hideMenus(),n.show()}},document.addEventListener("click",(function(t){var e=null;t.target instanceof HTMLElement&&(e=t.target);var o=n.getParentMenu();n.menuEntryPanel.contains(e)||n.element.contains(e)||null!=o&&o.menuEntryPanel.contains(e)||!n.isShown()||n.hide()})),n}return rt(e,t),e.prototype.getParentMenuBar=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("MenuBar")?this.parentWidget:null},e.prototype.getParentMenu=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("Menu")?this.parentWidget:null},e.prototype.isShown=function(){return this.menuEntryPanel.isConnected&&null!=this.menuEntryPanel.style.display&&""!=this.menuEntryPanel.style.display&&"none"!=this.menuEntryPanel.style.display},e.prototype.getPos=function(){var t=this.getParentMenu();if(t)return t.getPos();if(this.isShown()){var e=this.menuEntryPanel.getBoundingClientRect();return new _(e.left,e.top)}return new _(this._x,this._y)},e.prototype.show=function(t,e){for(var n=0;n<this.menuEntryPanel.children.length;n++)this._menuEntries[n]instanceof ct&&(this._menuEntries[n].canExecuteCallback()?this.menuEntryPanel.children[n].classList.remove("disabled"):this.menuEntryPanel.children[n].classList.add("disabled"));if(null!=t&&null!=e)this.element.parentNode||document.body.appendChild(this.menuEntryPanel),this.menuEntryPanel.style.left=t+"px",this.menuEntryPanel.style.top=e+"px",this.menuEntryPanel.style.display="inline-block",this.menuEntryPanel.style.position="fixed";else{this.menuEntryPanel.style.left=this.element.getBoundingClientRect().left+"px",this.menuEntryPanel.style.display="inline-block";var o=this.getParentMenuBar();o&&(o.activeMenu=this)}var i=this.menuEntryPanel.getBoundingClientRect();this._x=i.left,this._y=i.top},e.prototype.hide=function(){this._submenus.forEach((function(t){return t.hide()}));var t=this.getParentMenuBar();t&&t.activeMenu==this&&(t.activeMenu=null),this.menuEntryPanel.parentElement==document.body?document.body.removeChild(this.menuEntryPanel):this.menuEntryPanel.style.display="none"},e.prototype.addEntry=function(t,e,n){var o=this,i=document.createElement("div");n=n||function(){return!0},i.className="entry",i.textContent=t,i.onclick=function(){o.hide(),e()},this.menuEntryPanel.appendChild(i),this._menuEntries.push(new ct(t,i,e,n))},e.prototype.addSubMenu=function(t){var e=this;this._submenus.push(t);var n=document.createElement("div");n.className="entry submenu",n.textContent=t.name,n.onclick=function(){var o=n.getBoundingClientRect();e._submenus.forEach((function(t){return t.hide()})),t.show(Math.floor(o.left+o.width),o.y)},t.parentWidget=this,this.menuEntryPanel.appendChild(n),this._menuEntries.push(new st(t.name,n,t))},e.prototype.addSeparator=function(){var t=document.createElement("div");t.className="separator",this.menuEntryPanel.appendChild(t),this._menuEntries.push(new at(t))},e.prototype.clearEntries=function(){for(this._submenus.forEach((function(t){t.parentWidget=null})),this._submenus=[];this.menuEntryPanel.firstChild;)this.menuEntryPanel.removeChild(this.menuEntryPanel.firstChild)},e}(k),ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ht=function(t){function e(){var e=t.call(this)||this;return e.element.classList.add("MenuBar"),e.menus=[],e.activeMenu=null,e}return ut(e,t),e.prototype.addMenu=function(t){if(!(t instanceof dt)){var e={name:"Argument Error",level:"Error",message:"The argument 'menu' must be of type Menu",toString:function(){return this.name+": "+this.message}};throw console.error(e),e}this.menus.push(t),this.element.appendChild(t.element),this.element.appendChild(t.menuEntryPanel),t.parentWidget=this},e.prototype.hideMenus=function(){this.activeMenu=null,this.menus.forEach((function(t){t.hide()}))},e}(k),At=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pt=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("Label"),n.element.textContent=e,n}return At(e,t),e.prototype.setText=function(t){this.element.textContent=t},e.prototype.getText=function(){return this.element.textContent},e}(k),mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gt=function(t){function e(e,n,o){var i=t.call(this,document.createElement("img"))||this;return i.element.classList.add("Image"),i.element.src=e,null!=n&&(i.element.style.width=n+"px"),null!=o&&(i.element.style.height=o+"px"),i}return mt(e,t),e.prototype.setSource=function(t){this.element.src=t},e.prototype.getSource=function(){return this.element.src},e}(k),ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t[t.Left=1]="Left",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom",t[t.Inside=5]="Inside",t[t.Float=6]="Float"}(M||(M={})),function(t){t[t.Horizontal=1]="Horizontal",t[t.Vertical=2]="Vertical"}(R||(R={}));var Ct=function(t){return t==M.Top||t==M.Bottom?R.Vertical:R.Horizontal},_t=function(){function t(){}return t.fromDockPanel=function(e){var n=new t;return n.dockPercentage=e._dockPercentage,n.identifier=e.identifier,n},t.fromDockContainer=function(e){var n=new t;return n.orientation=e.orientation,n.dockPercentage=e._dockPercentage,n.children=e.children.map((function(e){return e instanceof kt?t.fromDockContainer(e):t.fromDockPanel(e)})),n},t}(),yt=[],vt=[],bt=function(t){function e(e,n,o){var i=t.call(this)||this;return i.element.classList.add("DockSeparator"),i.element.addEventListener("mousedown",I(i)),i.prev=e,i.next=n,i.parentWidget=o,i}return ft(e,t),e.prototype.onDragStart=function(t){return!0},e.prototype.onDragging=function(t){var e=this.parentWidget.orientation,n=e==R.Horizontal?t.mouseEvent.movementX:t.mouseEvent.movementY,o=e==R.Horizontal?this.prev.element.getBoundingClientRect().width:this.prev.element.getBoundingClientRect().height,i=e==R.Horizontal?this.next.element.getBoundingClientRect().width:this.next.element.getBoundingClientRect().height,r=o+n,l=i-n;r<80||l<80||(this.prev._dockPercentage*=r/o,this.next._dockPercentage*=l/i,this.parentWidget._layoutChildren())},e.prototype.onDragEnd=function(t){},e}(k),wt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._dockPercentage=-1,e.separatorBefore=null,e.separatorAfter=null,e}return ft(e,t),e}(k),kt=function(t){function e(){var e=t.call(this)||this;return e.element.className="DockContainer",e._setOrientation(R.Horizontal),e.children=[],e}return ft(e,t),e.prototype.onAttached=function(){this.isAttached()&&yt.push(this),this.children.forEach((function(t){t.onAttached()}))},e.prototype.getFloatingPanels=function(){return vt.map((function(t){return{identifier:t.identifier,width:parseInt(t.element.style.width),height:parseInt(t.element.style.height),x:parseInt(t.element.style.left),y:parseInt(t.element.style.top)}}))},e.prototype.getDockPanelAtPoint=function(t,n){if(!y(this.element.getBoundingClientRect(),t,n))return null;for(var o=0,i=this.children;o<i.length;o++){var r=i[o];if(r instanceof xt&&y(r.element.getBoundingClientRect(),t,n))return r;if(r instanceof e){var l=r.getDockPanelAtPoint(t,n);if(null!=l)return l}}return null},e.prototype.getDockingStructure=function(){return _t.fromDockContainer(this)},e.prototype.setChildPercentages=function(t){if(t.length!=this.children.length)throw"This container has "+this.children.length+" child elements, but "+t.length+" percentages were given!";for(var e=0;e<t.length;e++)this.children[e]._dockPercentage=t[e];this._layoutChildren()},e.prototype._dockRelative=function(t,e,n,o){if(o=o||.5,!(t instanceof wt)){var i={name:"Argument Error",level:"Error",message:"The argument 'child' must be a Dockable object",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}if(!(e instanceof wt))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a Dockable object",toString:function(){return this.name+": "+this.message}},console.error(i),i;var r=this.children.indexOf(e),l=n?t:e,s=n?e:t,a=new bt(l,s,this);if(s.separatorBefore=a,l.separatorAfter=a,t._dockPercentage=e._dockPercentage*o,e._dockPercentage=e._dockPercentage*(1-o),!(r>=0))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a child of a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(i),i;if(n)this.children.splice(r,0,t),this.element.insertBefore(t.element,e.element),this.element.insertBefore(a.element,e.element);else{this.children.splice(r+1,0,t);var c=e.element.nextSibling;c?(this.element.insertBefore(a.element,c),this.element.insertBefore(t.element,c)):(this.element.appendChild(a.element),this.element.appendChild(t.element))}t.parentWidget=this,t.element.classList.remove("floating"),t.onAttached(),this.onResize()},e.prototype._dock=function(t,e,n){if(n=n||(this.children.length>0?.5:1),e){if(this.children.length>0){var o=this.children[0],i=new bt(t,o,this);o.separatorBefore=i,t.separatorAfter=i,this.element.prepend(i.element)}t._dockPercentage=n,this.children.forEach((function(t){t._dockPercentage*=1-n})),this.children.unshift(t),this.element.prepend(t.element)}else this.children.length>0&&(o=this.children[this.children.length-1],i=new bt(o,t,this),o.separatorAfter=i,t.separatorBefore=i,this.element.appendChild(i.element)),t._dockPercentage=n,this.children.forEach((function(t){t._dockPercentage*=1-n})),this.children.push(t),this.element.appendChild(t.element);t.parentWidget=this,t.element.classList.remove("floating"),t.onAttached(),this.onResize()},e.prototype._setOrientation=function(t){this.orientation==R.Horizontal?this.element.classList.remove("horizontal"):this.element.classList.remove("vertical"),t==R.Horizontal?this.element.classList.add("horizontal"):this.element.classList.add("vertical"),this.orientation=t},e.prototype._wrapChildren=function(){var t=this,n=new e;n._setOrientation(this.orientation);var o=this.children.map((function(t){return t._dockPercentage}));o[0]=1;var i=this.children.slice(),r=0;i.forEach((function(e){t.undock(e),n.dock(e,n.orientation==R.Horizontal?M.Right:M.Bottom,o[r]),r++})),this._setOrientation(this.orientation==R.Horizontal?R.Vertical:R.Horizontal),this.children=[],this.dock(n,this.orientation==R.Horizontal?M.Left:M.Top)},e.prototype._subdivide=function(t,n){var o=new e;o._setOrientation(Ct(n));var i=this.children.indexOf(t);if(i<0){var r={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be inside this DockContainer",toString:function(){return this.name+": "+this.message}};throw console.error(r),r}return o._dockPercentage=t._dockPercentage,t._dockPercentage=1,t.separatorBefore&&(t.separatorBefore.next=o,t.separatorBefore=null),t.separatorAfter&&(t.separatorAfter.prev=o,t.separatorAfter=null),this.children.splice(i,1,o),this.element.insertBefore(o.element,t.element),this.element.removeChild(t.element),o.parentWidget=this,o.dock(t,n),o},e.prototype.dockRelativeTo=function(t,e,n,o){null!=o&&null!=o||(o=.5);var i=Ct(n),r=this;if(this.orientation!=i&&(r=this._subdivide(e,n)),n==M.Inside)console.warn("Tabbed docks are not implemented yet!");else if(n==M.Float){var l={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(l),l}return r._dockRelative(t,e,n==M.Left||n==M.Top,o),this._layoutChildren(),t},e.prototype.dock=function(t,e,n){var o=Ct(e);if(this.children.length<=1&&this._setOrientation(o),this.orientation!=o&&this._wrapChildren(),e==M.Inside)console.warn("Tabbed docks are not implemented yet!");else if(e==M.Float){var i={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}return this._dock(t,e==M.Left||e==M.Top,n),this._layoutChildren(),t},e.prototype.undock=function(t){var n=this.children.indexOf(t);if(n<0){var o={name:"Argument Error",level:"Error",message:"The argument 'child' must be inside a DockContainer in order to be undocked.",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}n>0?this.children[n-1]._dockPercentage+=t._dockPercentage:n+1<this.children.length&&(this.children[n+1]._dockPercentage+=t._dockPercentage),this.children.splice(n,1);var i=t.element.previousElementSibling,r=t.element.nextElementSibling;if(null!=i&&i.classList.contains("DockSeparator")?(this.element.removeChild(i),t.separatorBefore&&(t.separatorBefore.prev.separatorAfter=null)):null!=r&&r.classList.contains("DockSeparator")&&(this.element.removeChild(r),t.separatorAfter&&(t.separatorAfter.next.separatorBefore=null)),this.element.removeChild(t.element),null!=this.parentWidget&&this.parentWidget instanceof e&&0==this.children.length){this.parentWidget.undock(this);var l=yt.indexOf(this);l>=0&&yt.splice(l,1)}else this._layoutChildren();return t.parentWidget=null,t instanceof xt&&(t.element.classList.add("floating"),vt.indexOf(t)<0&&vt.push(t)),t},e.prototype._layoutChildren=function(t,n){var o=this.element.getBoundingClientRect(),i=0,r=0;null==t&&(t=o.width),null==n&&(n=o.height);var l=Array.from(this.element.children).filter((function(t){return t.classList.contains("DockSeparator")&&t instanceof HTMLElement})),s=0;0!=t&&0!=t&&(this.orientation==R.Horizontal?this.children.forEach((function(o){var a=Math.round((t-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=a+"px",o.element.style.height=n+"px",o instanceof e&&o._layoutChildren(a,n),s<l.length&&(l[s].style.left=i+a+"px",l[s].style.top=r+"px"),i+=a+3,s++,o.onResize()})):this.children.forEach((function(o){var a=Math.round((n-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=t+"px",o.element.style.height=a+"px",o instanceof e&&o._layoutChildren(t,a),s<l.length&&(l[s].style.left=i+"px",l[s].style.top=r+a+"px"),r+=a+3,s++,o.onResize()})))},e}(wt),xt=function(t){function e(e,n,o){var i=t.call(this)||this;if(i.element.className="DockPanel",o=void 0===o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=e,i.titleElement.className="title",i.contentWidget=n,i.contentWidget.element.classList.add("content"),i.element.appendChild(i.titleElement),i.element.appendChild(i.contentWidget.element),i.titleElement.addEventListener("mousedown",I(i)),i._dragged=!1,i._dockOverlay=null,i._dockTarget=null,i._dockTargetDirection=M.Float,o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(t){i.close()}}return i.resizeEW=document.createElement("div"),i.resizeNS=document.createElement("div"),i.resizeDiag=document.createElement("div"),i.resizeEW.className="resizeEW",i.resizeNS.className="resizeNS",i.resizeDiag.className="resizeDiag",i.element.appendChild(i.resizeEW),i.element.appendChild(i.resizeNS),i.element.appendChild(i.resizeDiag),i._resizingHorizontally=!1,i._resizingVertically=!1,i.resizeEW.addEventListener("mousedown",I(i,(function(t,e){return i.onResizeStart(e,!0,!1)}))),i.resizeNS.addEventListener("mousedown",I(i,(function(t,e){return i.onResizeStart(e,!1,!0)}))),i.resizeDiag.addEventListener("mousedown",I(i,(function(t,e){return i.onResizeStart(e,!0,!0)}))),i}return ft(e,t),e.prototype.onResize=function(){t.prototype.onResize.call(this),this.contentWidget.onResize()},e.prototype.onAttached=function(){if(this.isAttached()){var t=vt.indexOf(this);this.isFloating()?t<0&&vt.push(this):t>=0&&vt.splice(t,1),this.contentWidget.onAttached()}},e.prototype.getTitle=function(){return this.titleElement.textContent},e.prototype.setTitle=function(t){this.titleElement.textContent=t},e.prototype.setContent=function(t){this.contentWidget.element.classList.remove("content"),this.element.removeChild(this.contentWidget.element),this.contentWidget=t,this.contentWidget.element.classList.add("content"),this.element.appendChild(this.contentWidget.element),t.onAttached()},e.prototype.isFloating=function(){return this.element.classList.contains("floating")},e.prototype.close=function(){if(this.parentWidget instanceof kt)this.parentWidget.undock(this);else{this.element.parentElement.removeChild(this.element);var t=vt.indexOf(this);t>=0&&vt.splice(t,1)}},e.prototype.createDragOverlay=function(){this._dockOverlay=document.createElement("div"),this._dockOverlay.className="dockOverlay",document.body.appendChild(this._dockOverlay)},e.prototype.onResizeStart=function(t,e,n){return!!this.isFloating()&&(e&&this.element.classList.add("resizingHorizontally"),n&&this.element.classList.add("resizingVertically"),this._resizingHorizontally=e,this._resizingVertically=n,!0)},e.prototype.onResizing=function(t){this.isFloating()&&(this._resizingHorizontally&&(this.element.style.width=t.posRelativeToElement.x+"px"),this._resizingVertically&&(this.element.style.height=t.posRelativeToElement.y+"px"),this.onResize())},e.prototype.onDragStart=function(e){return!e.target.classList.contains("closeButton")&&t.prototype.onDragStart.call(this,e)},e.prototype.onDragging=function(e){if(this._resizingHorizontally||this._resizingVertically)return this.onResizing(e);if(!this._dragged&&(Math.abs(e.posRelativeToDragStart.x)>10||Math.abs(e.posRelativeToDragStart.y)>10)&&(this._dragged=!0,this.parentWidget instanceof kt&&(this.parentWidget.undock(this),document.body.appendChild(this.element)),this.createDragOverlay()),this._dragged)if(t.prototype.onDragging.call(this,e),this._dockTarget=function(t,e){for(var n=0,o=yt;n<o.length;n++){var i=o[n];if(i.isAttached()){var r=i.getDockPanelAtPoint(t,e);if(null!=r)return r}}return null}(e.mouseEvent.clientX,e.mouseEvent.clientY),this._dockTarget){var n=this._dockTarget.element.getBoundingClientRect();e.mouseEvent.clientX<n.x+.05*n.width?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=M.Left):e.mouseEvent.clientX>n.x+.95*n.width?(this._dockOverlay.style.left=n.x+.5*n.width+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=M.Right):e.mouseEvent.clientY<n.y+.05*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=M.Top):e.mouseEvent.clientY>n.y+.95*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+.5*n.height+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=M.Bottom):(this._dockTargetDirection=M.Float,this._dockOverlay.style.width="0px")}else this._dockTargetDirection=M.Float,this._dockOverlay.style.width="0px"},e.prototype.onDragEnd=function(e){this._dragged&&(this._dragged=!1,null!=this._dockOverlay&&(document.body.removeChild(this._dockOverlay),this._dockOverlay=null),null!=this._dockTarget&&this._dockTargetDirection!=M.Float&&this.dockRelativeTo(this._dockTarget,this._dockTargetDirection)),this._resizingHorizontally=!1,this._resizingVertically=!1,this.element.classList.remove("resizingHorizontally"),this.element.classList.remove("resizingVertically"),t.prototype.onDragEnd.call(this,e)},e.prototype.float=function(t,e,n,o){null!=this.parentWidget&&this.parentWidget instanceof kt&&this.parentWidget.undock(this),t=t||10,e=e||10,n=n||400,o=o||300,this.element.classList.add("floating"),this.element.style.left=t+"px",this.element.style.top=e+"px",this.element.style.width=n+"px",this.element.style.height=o+"px",document.body.appendChild(this.element),this.onAttached(),this.onResize(),vt.indexOf(this)<0&&vt.push(this)},e.prototype.dockRelativeTo=function(t,e,n){if(null!=n&&null!=n||(n=.5),!(t instanceof k)){var o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be a Widget object",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}if(!(t.parentWidget instanceof kt))throw o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be inside a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(o),o;t.parentWidget.dockRelativeTo(this,t,e,n)},e}(wt);window.addEventListener("resize",(function(){yt.forEach((function(t){t.parentWidget instanceof kt||t._layoutChildren()}))}));var Et,It=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Bt=function(t,e,n,o){this.label=t,this.callback=e,this.isContinue=n,this.isCancel=o},Pt=function(t){function e(e,n,o,i){var r=this,l=new k,s=l.element;r=t.call(this,e,l,i)||this;var a=document.createElement("div");a.textContent=n,a.className="text";var c=document.createElement("div");return c.className="buttons",r._cancelOption=null,r._continueOption=null,o.forEach((function(t){var e=document.createElement("button");e.textContent=t.label,t.isCancel&&(r._cancelOption=e),t.isContinue&&(r._continueOption=e),e.onclick=function(e){r.hide(),t.callback&&t.callback(r)},c.appendChild(e)})),s.appendChild(a),s.appendChild(c),r._boundKeyEvent=null,r}return It(e,t),e.prototype.showModal=function(){var e=this;t.prototype.showModal.call(this),this._boundKeyEvent=function(t){"Escape"==t.key&&e._cancelOption?e._clickButton(e._cancelOption):"Enter"==t.key&&e._continueOption&&e._clickButton(e._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},e.prototype._clickButton=function(t){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});t.dispatchEvent(e)},e.prototype.hide=function(){t.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},e}(L),Dt=function(t){function e(e,n,o,i){return t.call(this,e,n,[new Bt("OK",i,!0,!0)],o)||this}return It(e,t),e}(Pt),Ot=function(t){function e(e,n,o,i,r){var l=this,s=new k,a=s.element;l=t.call(this,e,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l.inputElement=document.createElement("input"),l.inputElement.value=o,l.inputElement.type="text";var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(t){var e=document.createElement("button");e.textContent=t.label,t.isCancel&&(l._cancelOption=e),t.isContinue&&(l._continueOption=e),e.onclick=function(e){l.hide(),t.callback&&t.callback(l)},d.appendChild(e)})),a.appendChild(c),a.appendChild(l.inputElement),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("InputDialog"),l._boundKeyEvent=null,l}return It(e,t),e.prototype.getValue=function(){return this.inputElement.value},e.prototype.showModal=function(){var e=this;t.prototype.showModal.call(this),this.inputElement.focus(),this.inputElement.select(),this._boundKeyEvent=function(t){"Escape"==t.key&&e._cancelOption?e._clickButton(e._cancelOption):"Enter"==t.key&&e._continueOption&&e._clickButton(e._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},e.prototype._clickButton=function(t){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});t.dispatchEvent(e)},e.prototype.hide=function(){t.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},e}(L);!function(t){t[t.ModifyData=1]="ModifyData",t[t.ModifyView=2]="ModifyView"}(Et||(Et={}));var St,Mt=function(){function t(t){this._history=[],this._currentIndex=-1,this._idCounter=-1,this._onChangedCallback=t||function(t,e){}}return t.prototype.add=function(t){this._currentIndex++;var e=this._history.length-this._currentIndex;this._history.splice(this._currentIndex,e,t),t.id=++this._idCounter,this._onChangedCallback(this._history.slice(),this._currentIndex)},t.prototype.undo=function(){if(this.canUndo()){var t=this._history[this._currentIndex];this._currentIndex--,t.undo(),this._onChangedCallback(this._history.slice(),this._currentIndex)}},t.prototype.redo=function(){this.canRedo()&&(this._currentIndex++,this._history[this._currentIndex].do(),this._onChangedCallback(this._history.slice(),this._currentIndex))},t.prototype.canUndo=function(){return this._currentIndex>=0},t.prototype.canRedo=function(){return this._currentIndex<this._history.length-1},t.prototype.wasDataModifiedSinceVersion=function(t){if(this._currentIndex<0||this._history[this._currentIndex].id==t)return!1;for(var e=this._history.findIndex((function(e){return e.id==t})),n=e<this._currentIndex?-1:1,o=this._currentIndex;o!=e;o+=n)if(this._history[o].wasDataModified())return!0;return!1},t.prototype.getCurrentCommand=function(){return this._history[this._currentIndex]},t}(),Rt=function(){function t(t,e,n,o){this.id=-1,this.title=t,this.do=e,this.undo=n,this.category=o||Et.ModifyData}return t.prototype.wasDataModified=function(){return this.category==Et.ModifyData},t}(),Nt=function(){function t(){this._data=null}return t.prototype.set=function(t){this._data=t},t.prototype.clear=function(){this._data=null},t.prototype.get=function(){return this._data},t.prototype.containsData=function(){return null!=this._data},t}(),Lt=function(t,e,n){this.type=t,this.timestamp=e,this.data=n},zt=new Nt,Ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t[t.None=0]="None",t[t.MoveNodes=1]="MoveNodes",t[t.MoveSelectedNodes=2]="MoveSelectedNodes",t[t.Select=3]="Select",t[t.MoveViewport=4]="MoveViewport"}(St||(St={}));var Wt=function(t,e){this.fromOutput=t,this.toInput=e},Tt=function(t,e){this.nodes=t,this.connections=e},Vt=function(t,e,n,o){this.fromNodeIndex=t,this.fromOutputIndex=e,this.toNodeIndex=n,this.toInputIndex=o},jt=function(t,e,n,o){this.title=t,this.inputs=e,this.outputs=n,this.pos=o},Ft=function(){function t(t,e,n){this.x=t,this.y=e,this.zoom=n}return t.prototype.getPixelPos=function(){return this.getPixelPosFromPos(0,0)},t.prototype.getPixelPosFromPos=function(t,e){return new _((t-this.x)*this.zoom,(e-this.y)*this.zoom)},t.prototype.getPosFromPixelPos=function(t,e){return new _(t/this.zoom+this.x,e/this.zoom+this.y)},t}(),Gt=function(t){function e(e,n,o,i,r,l,s,a,c){var d=t.call(this)||this;d.element.classList.add("NodeEditor"),d._undoHistory=c||new Mt,d._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),d._svg.setAttributeNS(null,"width","800"),d._svg.setAttributeNS(null,"height","300");var u=document.createElementNS("http://www.w3.org/2000/svg","defs"),h=document.createElementNS("http://www.w3.org/2000/svg","marker");h.setAttributeNS(null,"style","overflow:visible;"),h.setAttributeNS(null,"refX","0.0"),h.setAttributeNS(null,"refY","0.0"),h.setAttributeNS(null,"orient","auto"),h.setAttributeNS(null,"id","ArrowHead");var A=document.createElementNS("http://www.w3.org/2000/svg","path");A.setAttributeNS(null,"transform","scale(0.7) translate(-8,-5)"),A.setAttributeNS(null,"d","M 0 0 L 5 5 L 0 10 z"),h.appendChild(A),u.appendChild(h),d._svg.appendChild(u),d.element.appendChild(d._svg),d._nodes=[],d._viewport=new Ft(0,0,1),d._scrollSpeedX=r||.4,d._scrollSpeedY=l||.4,d._addArrowHeads=s||void 0===s,d._targetInput=null,d._targetOutput=null,d._targetNode=null,d._defineCtrlShortcuts=a||void 0===a,d._dragStart=new _(-1,1),d._viewportDragStart=new _(-1,-1),d._dragMode=St.None,d._selectRect=document.createElement("div"),d._selectRect.className="selectRect",d.element.appendChild(d._selectRect),d._selectRect.style.display="none",d.contextMenu=new dt("Node Editor"),d.contextMenu.addEntry("Cut",(function(){return d.onCut()}),(function(){return d.getSelectedNodes().length>0})),d.contextMenu.addEntry("Copy",(function(){return d.onCopy()}),(function(){return d.getSelectedNodes().length>0})),d.contextMenu.addEntry("Paste",(function(){return d.onPaste(!0)}),(function(){return d.canPaste()})),d.contextMenu.addEntry("Delete",(function(){return d._removeSelectedNodes()}),(function(){return d.getSelectedNodes().length>0})),d.element.addEventListener("contextmenu",(function(t){return t.preventDefault(),d.contextMenu.show(t.clientX,t.clientY),!1}));var p=I(d);return d.element.addEventListener("mousedown",(function(t){p(t),d._nodes.forEach((function(t){var e=t.getPixelPos();t._dragEditorPixelStartX=e.x,t._dragEditorPixelStartY=e.y}))})),d._draggedConnection=null,d._connectionSettingsBeforeDragging=null,d._selectedNodes=[],d._nodeSelectedCallback=e,d._nodeDeselectedCallback=n,d._nodeAddedCallback=o,d._nodeRemovedCallback=i,d._previouslySelectedNodes=[],d._hasFocus=!1,window.addEventListener("mouseup",(function(t){d._hasFocus=d.element.contains(t.target)})),window.addEventListener("keydown",(function(t){d._hasFocus&&("Delete"==t.key?d._removeSelectedNodes():"0"==t.key&&t.ctrlKey&&d._applyZoom(1),d._defineCtrlShortcuts&&("z"==t.key.toLowerCase()&&t.ctrlKey?t.shiftKey?d._undoHistory.redo():d._undoHistory.undo():"y"==t.key.toLowerCase()&&t.ctrlKey?d._undoHistory.redo():"c"==t.key.toLowerCase()&&t.ctrlKey?d.onCopy():"x"==t.key.toLowerCase()&&t.ctrlKey?d.onCut():"v"==t.key.toLowerCase()&&t.ctrlKey?d.onPaste(!1):"a"==t.key.toLowerCase()&&t.ctrlKey&&(t.shiftKey?d.deselectAllWithUndo():d.selectAllWithUndo(),t.preventDefault())))})),d.element.addEventListener("wheel",(function(t){if(t.preventDefault(),t.ctrlKey){d._hasFocus=!0;var e=d._viewport.zoom-.001*t.deltaY;e=Math.min(Math.max(.125,e),4);var n=d.element.getBoundingClientRect();d._applyZoom(e,t.clientX-n.left,t.clientY-n.top)}else d._viewport.x+=.9*t.deltaX,d._viewport.y+=.2*t.deltaY,d._nodes.forEach((function(t){t.update()}))})),d}return Ht(e,t),e.prototype.onCopy=function(){this.copy()},e.prototype.onCut=function(){this.cut()},e.prototype.onPaste=function(t){this.paste(t)},e.prototype.canPaste=function(){return zt.containsData()},e.prototype.overridableCopy=function(t){zt.set(new Lt("NodeEditor",new Date,t))},e.prototype.overridablePaste=function(){if(!zt.containsData())return null;var t=zt.get();return"NodeEditor"!=t.type?null:t.data},e.prototype.copy=function(){this.getSelectedNodes().length>0&&this.overridableCopy(this._getNodesCopyData())},e.prototype.cut=function(){this.copy(),this._removeSelectedNodes()},e.prototype.paste=function(t){var e=this.overridablePaste();if(e){var n,o,i=this.element.getBoundingClientRect();if(t){var r=this.contextMenu.getPos();n=r.x-i.left,o=r.y-i.top}else{var l=E;n=l.x-i.left,o=l.y-i.top}this._paste(e,new _(n,o))}},e.prototype.setFocus=function(t){this._hasFocus=t},e.prototype.hasFocus=function(){return this._hasFocus},e.prototype._applyZoom=function(t,e,n){e=e||0,n=n||0;var o=this._viewport.getPosFromPixelPos(e,n);this._viewport.zoom=t;var i=this._viewport.getPosFromPixelPos(e,n);this._viewport.x=this._viewport.x+o.x-i.x,this._viewport.y=this._viewport.y+o.y-i.y,this.element.style.fontSize=t+"em",this._nodes.forEach((function(t){t.update()}))},e.prototype.useArrowHeads=function(t){this._addArrowHeads=t;for(var e=0,n=this._nodes;e<n.length;e++)for(var o=0,i=n[e]._connections;o<i.length;o++)i[o].setUseArrowHead(t)},e.prototype.scrollSpeedX=function(t){this._scrollSpeedX=t},e.prototype.scrollSpeedY=function(t){this._scrollSpeedY=t},e.prototype._addConnection=function(t){this._svg.contains(t._path)||this._svg.appendChild(t._path)},e.prototype._removeConnection=function(t){this._svg.contains(t._path)&&this._svg.removeChild(t._path)},e.prototype._removeSelectedNodes=function(){var t=this,e=this._selectedNodes.splice(0),n=new Rt("Delete Nodes",(function(){e.forEach((function(e){t.removeNode(e)}))}),(function(){t.deselectAll(),e.forEach((function(e){t.addNode(e),e.select()}))}),Et.ModifyData);n.do(),this._undoHistory.add(n)},e.prototype.onAttached=function(){this.isAttached()&&this._nodes.forEach((function(t){t.onAttached()}))},e.prototype.getSelectedNodes=function(){return this._selectedNodes},e.prototype.clear=function(){var t=this;this._nodes.slice().forEach((function(e){return t.removeNode(e)}))},e.prototype._createNodeForPaste=function(t){for(var e=new Ut(t.title),n=0,o=t.inputs;n<o.length;n++){var i=o[n];e.addInput(i.name,i.canConnectCheck)}for(var r=0,l=t.outputs;r<l.length;r++){var s=l[r];e.addOutput(s.name,s.canConnectCheck,s.allowMultipleConnections)}return e},e.prototype._getNodesCopyData=function(){for(var t=this.getSelectedNodes(),e=t.map((function(t){return t._copy()})),n=[],o=0,i=0,r=t;i<r.length;i++){for(var l=r[i],s=0,a=l._connections;s<a.length;s++){var c=a[s];if(c._fromOutput._node==l){var d=t.indexOf(c._toInput._node);if(d>=0){var u=new Vt(o,l._outputs.indexOf(c._fromOutput),d,t[d]._inputs.indexOf(c._toInput));n.push(u)}}}o++}return new Tt(e,n)},e.prototype._paste=function(t,e){for(var n=this,o=t.nodes,i=null,r=null,l=0,s=o;l<s.length;l++){var a=s[l];(null==i||a.pos.x<i)&&(i=a.pos.x),(null==r||a.pos.y<r)&&(r=a.pos.y)}var c=o.map((function(t){var o=n._createNodeForPaste(t);return o.setPixelPos(t.pos.x-i+e.x,t.pos.y-r+e.y),o})),d=this._selectedNodes.slice(0),u=new Rt(o.length>1?"Paste Nodes":"Paste Node",(function(){n.deselectAll();for(var e=0,o=c;e<o.length;e++){var i=o[e];n.addNode(i),i.select()}for(var r=0,l=t.connections;r<l.length;r++){var s=l[r];n.connect(c[s.fromNodeIndex]._outputs[s.fromOutputIndex],c[s.toNodeIndex]._inputs[s.toInputIndex])}n._onNodesPasted(c);for(var a=0,d=c;a<d.length;a++)(i=d[a]).update()}),(function(){c.forEach((function(t){return n.removeNode(t)})),n.deselectAll(),d.forEach((function(t){return t.select()}))}),Et.ModifyData);this._undoHistory.add(u),u.do()},e.prototype._onNodesPasted=function(t){},e.prototype.removeNode=function(t){var e=this;t._editor=null,this.element.removeChild(t.element),t._connections.forEach((function(n){n._fromOutput._node!=t&&n._fromOutput._node.removeConnection(n,n._fromOutput,n._toInput),n._toInput._node!=t&&n._toInput._node.removeConnection(n,n._fromOutput,n._toInput),e._removeConnection(n)}));var n=this._nodes.indexOf(t);n>-1&&this._nodes.splice(n,1);var o=this._selectedNodes.indexOf(t);o>-1&&this._selectedNodes.splice(o,1),this._nodeRemovedCallback&&this._nodeRemovedCallback(t)},e.prototype.addNode=function(t){var e=this;this._nodes.push(t),this.element.appendChild(t.element),t._editor=this,t._connections.forEach((function(n){n._fromOutput._node!=t&&n._fromOutput._node.addConnection(n),n._toInput._node!=t&&n._toInput._node.addConnection(n),e._addConnection(n)})),t.onAttached(),this._nodeAddedCallback&&this._nodeAddedCallback(t)},e.prototype.addNodeWithUndo=function(t,e){var n=this,o=new Rt(e||"Add Node",(function(){n.addNode(t)}),(function(){n.removeNode(t)}),Et.ModifyData);this._undoHistory.add(o),o.do()},e.prototype.getNodes=function(){return this._nodes},e.prototype.connect=function(t,e){var n=new Jt(t,e);t._node.addConnection(n),e._node.addConnection(n),this._addConnection(n)},e.prototype.disconnect=function(t,e){var n=this._connections.find((function(n){return n._fromOutput==t&&n._toInput==e}));n&&(t._node.removeConnection(n,n._fromOutput,n._toInput),e._node.removeConnection(n,n._fromOutput,n._toInput),this._removeConnection(n))},e.prototype.onDragStart=function(t){if(1==t.button||0==t.button&&t.ctrlKey){this.element.classList.add("moving"),this._dragMode=St.MoveViewport;var e=this.element.getBoundingClientRect();return this._dragStart.x=t.clientX-e.left,this._dragStart.y=t.clientY-e.top,this._viewportDragStart.x=this._viewport.x,this._viewportDragStart.y=this._viewport.y,!0}return 0==t.button&&t.target==this.element&&(this._previouslySelectedNodes=this._selectedNodes.slice(0),this.deselectAll(),e=this.element.getBoundingClientRect(),this._dragStart.x=t.clientX-e.left,this._dragStart.y=t.clientY-e.top,this._dragMode=St.Select,this._selectRect.style.display="block",this._selectRect.style.left=this._dragStart.x+"px",this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width="0",this._selectRect.style.height="0",!0)},e.prototype.onDragNodesStarted=function(){this.element.classList.add("moving"),this._selectedNodes.forEach((function(t){t.onDragStarted()}))},e.prototype._scrollOutOfBounds=function(t,e){0==t&&0==e||(this._viewport.x+=.2*t,this._viewport.y+=.2*e,this._nodes.forEach((function(t){t.update()})))},e.prototype._checkOutOfBoundsScroll=function(t){var e=0,n=0,o=this.element.getBoundingClientRect(),i=t.clientX-o.x,r=t.clientY-o.y;i<0?e=i:i>o.width&&(e=i-o.width),r<0?n=r:r>o.height&&(n=r-o.height),this._scrollOutOfBounds(e,n)},e.prototype.onDragging=function(t){var e=this,n=this.element.getBoundingClientRect(),o=t.posWithOffsetToParentConsidered.x-n.left,i=t.posWithOffsetToParentConsidered.y-n.top;switch(this._dragMode){case St.MoveViewport:this._viewport.x=this._viewportDragStart.x-o/this._viewport.zoom,this._viewport.y=this._viewportDragStart.y-i/this._viewport.zoom,this._nodes.forEach((function(t){t.update()}));break;case St.MoveSelectedNodes:this._selectedNodes.forEach((function(t){t.setPixelPos(t._dragEditorPixelStartX+o,t._dragEditorPixelStartY+i),t._connections.forEach((function(t){t.update()}))})),this._checkOutOfBoundsScroll(t.mouseEvent);break;case St.Select:o<0?(this._selectRect.style.left=this._dragStart.x+o+"px",o*=-1):this._selectRect.style.left=this._dragStart.x+"px",i<0?(this._selectRect.style.top=this._dragStart.y+i+"px",i*=-1):this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width=o+"px",this._selectRect.style.height=i+"px";var r=this._selectRect.getBoundingClientRect();this._nodes.map((function(t){return{node:t,selected:e.intersection(r,t.element.getBoundingClientRect())}})).forEach((function(t){t.selected?t.node.select():t.node.deselect()})),this._checkOutOfBoundsScroll(t.mouseEvent)}},e.prototype.onDragEnd=function(t){var e=this;switch(this.element.classList.remove("moving"),this._dragMode){case St.MoveViewport:break;case St.MoveSelectedNodes:this._selectedNodes.forEach((function(e){return e.onDragEnd(t)}));var n=this._selectedNodes.map((function(t){return{node:t,startPos:{x:t._dragEditorStartX,y:t._dragEditorStartY},endPos:{x:t._pos.x,y:t._pos.y}}}));if(!n.every((function(t){return t.endPos.x==t.startPos.x&&t.endPos.x==t.startPos.x}))){var o=new Rt(this._selectedNodes.length>1?"Move Nodes":"Move Node",(function(){n.forEach((function(t){t.node.setPos(t.endPos.x,t.endPos.y)}))}),(function(){n.forEach((function(t){t.node.setPos(t.startPos.x,t.startPos.y)}))}),Et.ModifyData);this._undoHistory.add(o),o.do()}break;case St.Select:this._selectRect.style.display="none";var i=this._previouslySelectedNodes,r=this._selectedNodes.slice(0);if(0!=i.length||0!=r.length){var l=new Rt(0==r.length?"Deselect All Nodes":"Select Nodes",(function(){e.deselectAll(),r.forEach((function(t){return t.select()}))}),(function(){e.deselectAll(),i.forEach((function(t){return t.select()}))}),Et.ModifyView);this._undoHistory.add(l)}}this._dragMode=St.None},e.prototype.intersection=function(t,e){return!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)},e.prototype.deselectAllWithUndo=function(){var t=this,e=this._selectedNodes.slice(0),n=new Rt("Deselect All Nodes",(function(){t.deselectAll()}),(function(){t.deselectAll(),e.forEach((function(t){return t.select()}))}),Et.ModifyView);n.do(),this._undoHistory.add(n)},e.prototype.selectAllWithUndo=function(){var t=this,e=this._selectedNodes.slice(0),n=new Rt("Select All Nodes",(function(){t.selectAll()}),(function(){t.deselectAll(),e.forEach((function(t){return t.select()}))}),Et.ModifyView);n.do(),this._undoHistory.add(n)},e.prototype.deselectAll=function(){this._selectedNodes.slice(0).forEach((function(t){t.deselect()}))},e.prototype.selectAll=function(){this._nodes.forEach((function(t){t.select()}))},e}(k),Jt=function(){function t(t,e){this._fromOutput=t,this._toInput=e,this._path=document.createElementNS("http://www.w3.org/2000/svg","path"),this._path.setAttributeNS(null,"fill","transparent"),this._path.setAttributeNS(null,"stroke-width","2"),(t||e)._node._editor._addArrowHeads&&this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"),this._fromOutput&&this._toInput&&this.update()}return t.prototype.setUseArrowHead=function(t){t?this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"):this._path.setAttributeNS(null,"style","marker-end:none")},t.prototype.update=function(t,e){var n,o,i;n=null!=this._fromOutput?this._fromOutput._bullet.getBoundingClientRect():{left:t,top:e,width:0,height:0},o=null!=this._toInput?this._toInput._bullet.getBoundingClientRect():{left:t,top:e,width:0,height:0},i=null!=this._path.parentNode?this._path.parentElement.getBoundingClientRect():{left:0,top:0};var r=n.left-i.left+.5*n.width,l=n.top-i.top+.5*n.height,s=o.left-i.left+.5*o.width,a=o.top-i.top+.5*o.height,c=this._fromOutput?this._fromOutput._node._editor:this._toInput?this._toInput._node._editor:null,d=c?c._viewport.zoom:1;d||(d=1),this._path.setAttributeNS(null,"d","M"+r+" "+l+" C "+(r+50*d)+" "+l+", "+(s-50*d)+" "+a+", "+s+" "+a)},t}(),Yt=function(){function t(t,e,n,o,i){this._node=t,this._name=e,this._isInput=n,this._allowMultipleConnectionsForOutput=!!i,this._canConnectCheck=o||function(t){return!0},this._bullet=n?this.createInput():this.createOutput()}return t.prototype.createInput=function(){var t=this,e=document.createElement("div");e.className="input";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,e.appendChild(n),e.appendChild(o),this._node._inputsElement.appendChild(e),n.onmouseenter=function(e){t._node._editor&&(null==t._node._editor._draggedConnection||t._canConnectCheck(t._node._editor._draggedConnection._fromOutput)&&t._node._editor._draggedConnection._fromOutput._canConnectCheck(t)||t._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),t._node._editor._targetInput=t,t._node._editor._targetNode=t._node)},n.onmouseleave=function(e){t._node._editor&&(t._node._editor._targetInput==t&&(t._node._editor._targetInput=null),t._node._editor._draggedConnection&&t._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=I(this._node._connectionDragging);return n.onmousedown=function(e){if(e.stopPropagation(),t._node._editor){i(e);var n=void 0,o=null,r=t._node._connections.find((function(e){return e._toInput==t}));r?(o=new Wt(r._fromOutput,r._toInput),(n=r)._toInput=null,t._node.removeConnection(n,o.fromOutput,o.toInput)):(n=new Jt(null,t),t._node.addConnection(n),t._node._editor._addConnection(n)),t._node._editor._draggedConnection=n,t._node._editor._connectionSettingsBeforeDragging=o}},n},t.prototype.createOutput=function(){var t=this,e=document.createElement("div");e.className="output";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,e.appendChild(o),e.appendChild(n),this._node._outputsElement.appendChild(e),n.onmouseenter=function(e){t._node._editor&&(null==t._node._editor._draggedConnection||t._canConnectCheck(t._node._editor._draggedConnection._toInput)&&(!t._node._editor._draggedConnection._toInput||t._node._editor._draggedConnection._toInput._canConnectCheck(t))||t._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),t._node._editor._targetOutput=t,t._node._editor._targetNode=t._node)},n.onmouseleave=function(e){t._node._editor&&(t._node._editor._targetOutput==t&&(t._node._editor._targetOutput=null),t._node._editor._draggedConnection&&t._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=I(this._node._connectionDragging);return n.onmousedown=function(e){if(e.stopPropagation(),t._node._editor){i(e);var n=void 0,o=null,r=null;t._allowMultipleConnectionsForOutput||(o=t._node._connections.find((function(e){return e._fromOutput==t})))&&(r={fromOutput:o._fromOutput,toInput:o._toInput},(n=o)._fromOutput=null,t._node.removeConnection(n,r.fromOutput,r.toInput)),n||(n=new Jt(t,null),t._node.addConnection(n),t._node._editor._addConnection(n)),t._node._editor._draggedConnection=n,t._node._editor._connectionSettingsBeforeDragging=r}},n},t.prototype.isInput=function(){return this._isInput},t.prototype.isOutput=function(){return!this._isInput},t}(),Ut=function(t){function e(e){var n=t.call(this)||this;n.element.classList.add("Node"),n._title=document.createElement("div"),n.setTitle(e),n._title.className="title",n.element.appendChild(n._title);var o=document.createElement("div");return n._pos=new _(-1,-1),n._connections=[],n._inputs=[],n._inputsElement=document.createElement("div"),n._inputsElement.className="inputs",o.appendChild(n._inputsElement),o.className="body",n._contentsElement=document.createElement("div"),n._contentsElement.className="contents",o.appendChild(n._contentsElement),n._outputs=[],n._outputsElement=document.createElement("div"),n._outputsElement.className="outputs",o.appendChild(n._outputsElement),n.element.appendChild(o),n._dragEditorPixelStartX=0,n._dragEditorPixelStartY=0,n._dragEditorStartX=0,n._dragEditorStartY=0,n._editor=null,n._wasActuallyDragged=!1,n._connectionDragging=new B(n.element,(function(t){return!0}),(function(t){n._editor&&n._editor._draggedConnection&&(n._editor._checkOutOfBoundsScroll(t.mouseEvent),n._editor._draggedConnection.update(t.mouseEvent.clientX,t.mouseEvent.clientY))}),(function(t){if(n._editor&&n._editor._draggedConnection){var e=function(t,e){return new Rt("Remove Connection",(function(){n._removeDraggedConnection(t)}),(function(){null!=e&&(t._fromOutput=e.fromOutput,t._toInput=e.toInput),t._path.setAttributeNS(null,"class",""),n._editor._addConnection(t),t.update(),t._fromOutput&&t._fromOutput._node.addConnection(t),t._toInput&&t._toInput._node.addConnection(t)}),Et.ModifyData)},o=function(t,o){var i=n._editor._connectionSettingsBeforeDragging;if(!t._canConnectCheck(o)||!o._canConnectCheck(t)){var r=n._editor._draggedConnection,l=e(r,i);return n._editor._undoHistory.add(l),void l.do()}var s=n._connections.find((function(e){return e._fromOutput==t&&e._toInput==o})),a=n._editor._draggedConnection,c=function(t,e,o,i,r,l){return new Rt(r?"Change Connection":"Add Connection",(function(){l&&(n._editor._removeConnection(l),n.removeConnection(l,l._fromOutput,l._toInput),o.removeConnection(l,l._fromOutput,l._toInput)),i._fromOutput=t,i._toInput=e,n._editor._addConnection(i),n.addConnection(i),o.addConnection(i),i.update(),i._fromOutput._node._onConnectionAdded(i),i._toInput._node._onConnectionAdded(i)}),(function(){r?(o.removeConnection(i,i._fromOutput,i._toInput),r.fromOutput._node==o?i._fromOutput=r.fromOutput:i._toInput=r.toInput,i.update(),n._onConnectionAdded(i)):(n._editor._removeConnection(i),n.removeConnection(i,i._fromOutput,i._toInput),i._fromOutput._node.removeConnection(i,i._fromOutput,i._toInput),i._toInput._node.removeConnection(i,i._fromOutput,i._toInput)),l&&(o.addConnection(l),l.update(),i._fromOutput._node.update(),i._toInput._node.update(),i._fromOutput._node.addConnection(l),i._toInput._node.addConnection(l),i._fromOutput._node._onConnectionAdded(l),i._toInput._node._onConnectionAdded(l))}),Et.ModifyData)}(t,o,n._editor._targetNode,a,i,s);n._editor._draggedConnection=null,n._editor._connectionSettingsBeforeDragging=null,n._editor._undoHistory.add(c),c.do()};if(n._editor._targetInput&&!n._editor._draggedConnection._toInput)o(n._editor._draggedConnection._fromOutput,n._editor._targetInput);else if(n._editor._targetOutput&&!n._editor._draggedConnection._fromOutput)o(n._editor._targetOutput,n._editor._draggedConnection._toInput);else{var i=n._editor._draggedConnection,r=n._editor._connectionSettingsBeforeDragging,l=e(i,r);r&&n._editor._undoHistory.add(l),l.do()}}})),n}return Ht(e,t),e.prototype._mapNodePort=function(t){return{name:t._name,allowMultipleConnectionsForOutput:t._allowMultipleConnectionsForOutput,canConnectCheck:t._canConnectCheck}},e.prototype._copy=function(){var t=this;return new jt(this.getTitle(),this._inputs.map((function(e){return t._mapNodePort(e)})),this._outputs.map((function(e){return t._mapNodePort(e)})),this.getPos())},e.prototype._onConnectionAdded=function(t){},e.prototype._onConnectionRemoved=function(t,e,n){},e.prototype._removeDraggedConnection=function(t){t._fromOutput&&t._fromOutput._node.removeConnection(t,t._fromOutput,t._toInput),t._toInput&&t._toInput._node.removeConnection(t,t._fromOutput,t._toInput),this._editor._removeConnection(t),t=null,this._editor._draggedConnection=null,this._editor._connectionSettingsBeforeDragging=null},e.prototype.onAttached=function(){var t=this;if(this.isAttached()){if(this._connections.forEach((function(t){t.update()})),null==this._pos.x){var e=this._getViewport();this._pos.x=e.getPosFromPixelPos(parseInt(this.element.style.left),0).x}null==this._pos.y&&(e=this._getViewport(),this._pos.y=e.getPosFromPixelPos(0,parseInt(this.element.style.top)).y),this.update(),this._title.addEventListener("mousedown",I(this._editor,(function(e,n){return!!t.onDragStart(n)&&(t._editor.onDragNodesStarted(),!0)})))}},e.prototype._getViewport=function(){return this._editor?this._editor._viewport:null},e.prototype.setPixelPos=function(t,e){var n=this._getViewport();if(this.element.style.left=t+"px",this.element.style.top=e+"px",n){var o=n.getPosFromPixelPos(t,e);this._pos.x=o.x,this._pos.y=o.y}else this._pos.x=void 0,this._pos.y=void 0},e.prototype.getPixelPos=function(){var t=this._getViewport();return t?t.getPixelPosFromPos(this._pos.x,this._pos.y):null},e.prototype.setPos=function(t,e){this._pos.x=t,this._pos.y=e,this.update()},e.prototype.getPos=function(){return new _(this._pos.x,this._pos.y)},e.prototype.getTitle=function(){return this._title.textContent},e.prototype.setTitle=function(t){this._title.textContent=t},e.prototype.addInput=function(t,e){var n=new Yt(this,t,!0,e);return this._inputs.push(n),n},e.prototype.addOutput=function(t,e,n){var o=new Yt(this,t,!1,e,n);return this._outputs.push(o),o},e.prototype.addConnection=function(t){this._connections.includes(t)||this._connections.push(t)},e.prototype.removeConnection=function(t,e,n){var o=this._connections.indexOf(t);o>-1&&this._connections.splice(o,1),this._onConnectionRemoved(t,e,n)},e.prototype.onDragStart=function(t){return 0!=t.button&&2!=t.button||this.isSelected()||this.selectSingle(),0==t.button},e.prototype.onDragStarted=function(){var t=this.getPixelPos();this._dragEditorPixelStartX=t.x,this._dragEditorPixelStartY=t.y,this._dragEditorStartX=this._pos.x,this._dragEditorStartY=this._pos.y,this._editor._dragMode=St.MoveSelectedNodes},e.prototype.onDragEnd=function(e){t.prototype.onDragEnd.call(this,e),this._wasActuallyDragged=!1},e.prototype.isSelected=function(){return this.element.classList.contains("selected")},e.prototype.select=function(){this._editor._selectedNodes.indexOf(this)>-1||(this._editor._selectedNodes.push(this),this.element.classList.add("selected"),this._editor._nodeSelectedCallback&&this._editor._nodeSelectedCallback(this))},e.prototype.deselect=function(){this._editor._selectedNodes.indexOf(this)<0||(this._editor._selectedNodes.splice(this._editor._selectedNodes.indexOf(this),1),this.element.classList.remove("selected"),this._editor._nodeDeselectedCallback&&this._editor._nodeDeselectedCallback(this))},e.prototype.selectSingle=function(){var t=this,e=this._editor._selectedNodes.slice(0),n=new Rt("Select Node",(function(){t._editor.deselectAll(),t.select()}),(function(){t._editor.deselectAll(),e.forEach((function(t){return t.select()}))}),Et.ModifyView);n.do(),this._editor._undoHistory.add(n)},e.prototype.update=function(){var t=this.getPixelPos();t&&(this.element.style.left=t.x+"px",this.element.style.top=t.y+"px",this._connections.forEach((function(t){t.update()})))},e}(k)})(),o})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.tootframes=e():t.tootframes=e()}(self,(()=>(()=>{"use strict";var t={192:(t,e,n)=>{n.d(e,{Z:()=>s});var o=n(537),i=n.n(o),r=n(645),l=n.n(r)()(i());l.push([t.id,'*{box-sizing:border-box;cursor:default;user-select:none}a{cursor:pointer;color:#c3df85;text-decoration:none}a:hover{color:#d7e6b9;text-decoration:underline}.beingDragged{opacity:.6;z-index:1000 !important}img{pointer-events:none}body{background-color:#262829;color:#dadcdd;overflow:hidden}input{border:1px solid #343738;background:#1a1d1f;color:#cad2d4;border-radius:.1em;padding:.3em .8em;outline:none;font-size:1.2em;margin-right:.2em;margin-bottom:.2em}.MenuBar{background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);border-bottom:1px solid #575c5e;width:100%;height:2.5em;position:absolute;z-index:50;top:0;left:0}.MenuBar .Icon{height:100%;padding:.4em 1em}.MenuBar .Menu{display:inline-block;padding:.6em .7em;height:100%;vertical-align:top}.MenuBar .Menu:hover{background-color:#262829}.MenuContent{display:none;position:absolute;background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);left:0;top:2.5em;min-width:6em;min-height:.5em;z-index:1000}.MenuContent>.entry{padding:.5em 2em}.MenuContent>.entry.submenu:after{content:"›";display:inline-block;position:absolute;right:0;margin-right:.5em}.MenuContent>.entry:hover{background-color:#262829}.MenuContent>.entry.disabled{color:#7d8488}.MenuContent>.entry.disabled:hover{background-color:#323536}.MenuContent>.separator{background-color:#575c5e;border:.4em solid #3f4243;height:.9em}.Modal{display:block;position:absolute;background-color:rgba(0,0,0,.4666666667);left:0;top:0;right:0;bottom:0}button::-moz-focus-inner{border:0}button,.button{background-color:#0d0e0f;outline:none;border-radius:0;border:none;color:#dadcdd;padding:.5em 2em;font-size:1em;margin-right:.2em;margin-bottom:.2em}button:focus,.button:focus{outline:none}button:hover,.button:hover{background-color:#1a1b1c}button:active,.button:active{background-color:#121314}.Modal{background-color:rgba(0,0,0,.4666666667);position:absolute;z-index:52;left:0;right:0;top:0;bottom:0}.Modal .Dialog{z-index:53}.text{white-space:pre-line}.Dialog{min-width:15em;max-width:80vw;min-height:5em;max-height:80vh}.Dialog,.DockPanel{position:absolute;z-index:51;top:50%;left:50%;transform:translate(-50%, -50%);background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667)}.Dialog .title,.DockPanel .title{width:100%;text-align:center;padding:.5em;background-color:#575c5e;border-bottom:1px solid #707578}.Dialog .title .closeButton,.DockPanel .title .closeButton{padding:.2em;width:2em;height:2em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#323536}.Dialog .title .closeButton:hover,.DockPanel .title .closeButton:hover{background-color:#3f4243}.Dialog .content,.DockPanel .content{padding:.8em 1.5em;position:absolute}.Dialog .content.w3term,.DockPanel .content.w3term{height:100%}.Dialog .buttons,.DockPanel .buttons{padding:.8em 1.5em;text-align:center}.Dialog .content,.Dialog .Panel.content{position:static;padding:.8em 1.5em}.InputDialog input{width:100%}.Label{user-select:text}.DockContainer>*{overflow:hidden;position:absolute}.DockContainer.horizontal>*{display:inline-block}.DockContainer.horizontal>*.DockSeparator{width:3px;height:100%;background-color:#0d0e0f;cursor:ew-resize}.DockContainer.vertical>*{display:block;clear:both}.DockContainer.vertical>*.DockSeparator{width:100%;height:3px;background-color:#0d0e0f;cursor:ns-resize}.DockContainer>.DockSeparator:hover{background-color:#1a1b1c}.DockPanel{transform:none;max-width:none;max-height:none;background-color:#262829}.DockPanel .title{text-align:left;padding:.1em .5em;font-size:.9em;background-color:#1a1b1c;border-bottom:1px solid #121314}.DockPanel .title .closeButton{padding:0;width:1.6em;height:1.6em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#1a1b1c}.DockPanel .title .closeButton:hover{background-color:#262829}.DockPanel .content{width:100%;height:calc(100% - 1.5em);overflow:auto}.DockPanel.resizingHorizontally{cursor:ew-resize}.DockPanel.resizingVertically{cursor:ns-resize}.DockPanel.resizingHorizontally.resizingVertically{cursor:nwse-resize}.DockPanel .resizeEW,.DockPanel .resizeNS,.DockPanel .resizeDiag{display:none}.DockPanel.floating .resizeEW{display:block;width:.3em;top:0;bottom:0;background-color:rgba(0,0,0,0);cursor:ew-resize;position:absolute;right:0}.DockPanel.floating .resizeNS{display:block;width:100%;height:.3em;background-color:rgba(0,0,0,0);cursor:ns-resize;position:absolute;left:0;bottom:0}.DockPanel.floating .resizeDiag{display:block;width:.5em;height:.5em;background-color:rgba(0,0,0,0);cursor:nwse-resize;position:absolute;right:0;bottom:0}body>.DockContainer{position:absolute;z-index:49;top:0;left:0;right:0;bottom:0}.dockOverlay{position:fixed;background-color:rgba(51,119,153,.6);z-index:999}.NodeEditor{width:100%;height:100%;overflow:hidden !important;padding:0 !important}.NodeEditor.moving{cursor:grabbing}.NodeEditor.beingDragged{cursor:grabbing}.NodeEditor svg{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;pointer-events:none}.NodeEditor .Node{position:absolute}.Node{display:inline-block;border-radius:.5em;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);background-color:#1a1b1c;white-space:nowrap}.Node .title{border-radius:.5em .5em 0 0;background-color:#323536}.Node .body{display:flex;justify-content:space-between}.Node .bullet{display:inline-block;background-color:#3f4243;width:1.2em;height:1.2em;border-radius:1em;border:.2em solid rgba(0,0,0,0);background-clip:padding-box}.Node .bullet:hover{background-color:#63696b;border:none}.Node .inputs{display:inline-block;vertical-align:text-top}.Node .inputs .bullet{margin-left:-0.5em;margin-right:.5em}.Node .inputs .input{display:block;position:relative;font-size:.7em;margin:0}.Node .outputs{display:inline-block;vertical-align:text-top;text-align:right}.Node .outputs .bullet{margin-left:.5em;margin-right:-0.5em}.Node .outputs .output{display:block;position:relative;font-size:.7em;margin:0}.Node .contents{vertical-align:text-top;display:inline-block;min-width:2em;min-height:2em;display:flex;flex-direction:column;justify-content:space-between}.Node.selected{box-shadow:0 0 .5em #4b4f51}.Node.selected .title{background-color:#4b4f51}.TreeViewItem .label{background-color:rgba(0,0,0,0);display:inline-block;border:1px solid rgba(0,0,0,0);-webkit-user-drag:element}.TreeViewItem.focused>.label{border:1px solid #4b4f51}.TreeViewItem .label.selected{background-color:rgba(195,223,133,.2666666667)}.TreeViewItem *{cursor:pointer}.TreeViewItem>.expander{display:inline-block;opacity:0;width:.3em;margin-right:.5em;font-weight:bold;transform:rotate(0deg);transition:transform .15s ease-in-out}.TreeViewItem.expandable>.expander{opacity:1;display:inline-block}.TreeViewItem.expanded>.expander{transform:rotate(90deg)}.TreeViewItem>.children{margin-left:1em;overflow:hidden;display:none}.TreeViewItem.expanded>.children{display:block}.Panel.content{margin:0;padding:0;width:100%}.ListView,.ListView.content{display:table;margin:0;padding:0;width:100%}.ListView .cell{font-size:80%;display:table-cell;padding:.15em .6em;border-left:.2em solid #262829;border-bottom:.2em solid #262829;background-color:#1f2021}.ListView .row{display:table-row}.ListView .row .cell{user-select:text}.ListView .row .cell input{background-color:rgba(0,0,0,0);border:none;outline:none;color:#dadcdd;margin:0;padding:0;user-select:text;width:auto;display:inline}.ListView .row.selected .cell{background-color:rgba(195,223,133,.2666666667)}.ListView .row .cell.editing{background-color:rgba(62,80,21,.2666666667);box-shadow:inset 0 0 .1em rgba(195,223,133,.2666666667)}.ListView .header{display:table-row}.ListView .header .cell{background-color:#323536}.NodeEditor path{stroke:#999}.NodeEditor path.notConnectable{stroke:#944}.NodeEditor .selectRect{background-color:rgba(112,117,120,.3);border:1px solid #707578;width:300px;height:300px;position:absolute;z-index:500}.Dropdown{background-color:rgba(112,117,120,.3);border:1px solid #575c5e;color:#dadcdd;outline:none}.ListBox{border:1px solid #343738;background-color:#1a1d1f;color:#cad2d4;border-radius:.1em;outline:none;font-size:.9em;overflow:auto}.ListBox>div{padding:.3em 1em}.ListBox>div:hover{background-color:#262a2d}.ListBox>div.selected{background-color:rgba(195,223,133,.2666666667)}.ColorPicker .handle{border-radius:100%;position:relative;border:.05em solid #222;width:1.2em;height:1.2em;box-shadow:.03em .03em .3em rgba(0,0,0,.2666666667),inset 0 0 .5em #fff;transform:translate(-50%, -50%);pointer-events:none}.PaintStyleColorPicker>.hue{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to right, hsl(0, 100%, 50%), hsl(22.5, 100%, 50%), hsl(45, 100%, 50%), hsl(67.5, 100%, 50%), hsl(90, 100%, 50%), hsl(112.5, 100%, 50%), hsl(135, 100%, 50%), hsl(157.5, 100%, 50%), hsl(180, 100%, 50%), hsl(202.5, 100%, 50%), hsl(225, 100%, 50%), hsl(247.5, 100%, 50%), hsl(270, 100%, 50%), hsl(292.5, 100%, 50%), hsl(315, 100%, 50%), hsl(337.5, 100%, 50%), hsl(359, 100%, 50%))}.PaintStyleColorPicker>.hue *,.PaintStyleColorPicker>.lightness *{pointer-events:none}.PaintStyleColorPicker .saturation{width:100%;height:100%;background:linear-gradient(to bottom, transparent, hsl(0, 0%, 50%))}.PaintStyleColorPicker .lightness{width:2em;height:400px;display:inline-block;margin-left:.5em;background-color:red;background-image:linear-gradient(to bottom, white, transparent, black)}.PaintStyleColorPicker .lightness>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.GimpStyleColorPicker>.saturation{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to bottom, transparent, black)}.GimpStyleColorPicker>.saturation *,.GimpStyleColorPicker>.value *{pointer-events:none}.GimpStyleColorPicker .value{width:100%;height:100%}.GimpStyleColorPicker .value::before{content:" ";display:block;float:left;width:100%;height:100%;mask:linear-gradient(to right, white, transparent);background:linear-gradient(to bottom, white, black)}.GimpStyleColorPicker .hue{width:2em;height:400px;display:inline-block;margin-left:.5em;background:linear-gradient(to bottom, hsl(0, 100%, 50%), hsl(22.5, 100%, 50%), hsl(45, 100%, 50%), hsl(67.5, 100%, 50%), hsl(90, 100%, 50%), hsl(112.5, 100%, 50%), hsl(135, 100%, 50%), hsl(157.5, 100%, 50%), hsl(180, 100%, 50%), hsl(202.5, 100%, 50%), hsl(225, 100%, 50%), hsl(247.5, 100%, 50%), hsl(270, 100%, 50%), hsl(292.5, 100%, 50%), hsl(315, 100%, 50%), hsl(337.5, 100%, 50%), hsl(359, 100%, 50%))}.GimpStyleColorPicker .hue>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.WheelColorPicker>.wheel{position:relative;border:.5em solid #090909;width:25em;height:25em;border-radius:100%;padding:3em;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:conic-gradient(hsl(90, 100%, 50%), hsl(67.5, 100%, 50%), hsl(45, 100%, 50%), hsl(22.5, 100%, 50%), hsl(0, 100%, 50%), hsl(337.5, 100%, 50%), hsl(315, 100%, 50%), hsl(292.5, 100%, 50%), hsl(270, 100%, 50%), hsl(247.5, 100%, 50%), hsl(225, 100%, 50%), hsl(202.5, 100%, 50%), hsl(180, 100%, 50%), hsl(157.5, 100%, 50%), hsl(135, 100%, 50%), hsl(112.5, 100%, 50%), hsl(89, 100%, 50%))}.WheelColorPicker>.wheel>.handle{width:3em;height:3em;position:absolute}.WheelColorPicker>.wheel>.innerCircle{width:100%;height:100%;background-color:#222;border-radius:100%;padding:18%;transform:rotate(45deg);box-shadow:inset .5em .5em 1em rgba(0,0,0,.5333333333)}.WheelColorPicker>.wheel>.innerCircle .saturation,.WheelColorPicker>.wheel>.innerCircle .lightness{width:100%;height:100%}.WheelColorPicker>.saturation *{pointer-events:none}.WheelColorPicker>.wheel>.innerCircle .saturation{background-color:red;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background-image:linear-gradient(45deg, hsl(0, 0%, 50%), transparent)}.WheelColorPicker>.wheel>.innerCircle .lightness{background:linear-gradient(135deg, white, transparent, black)}.ColorPickerDialog .WheelColorPicker{margin-top:1em;margin-bottom:1em}.ColorPickerDialog .ColorOutput{display:inline-block;width:3em;padding:.3em .8em;border:1px solid #343738;height:2.4em;vertical-align:top;margin-top:.05em;margin-right:.4em}',"",{version:3,sources:["webpack://./src/style.scss"],names:[],mappings:"AAAA,EAIA,qBACI,CAAA,cACA,CAAA,gBACA,CAAA,EAGJ,cACI,CAAA,aACA,CAAA,oBACA,CAAA,QAEA,aACI,CAAA,yBACA,CAAA,cAIR,UACI,CAAA,uBACA,CAAA,IAGJ,mBACI,CAAA,KAGJ,wBA7BkB,CAAA,aADN,CAAA,eAiCR,CAAA,MAGJ,wBACI,CAAA,kBACA,CAAA,aACA,CAAA,kBACA,CAAA,iBACA,CAAA,YACA,CAAA,eACA,CAAA,iBACA,CAAA,kBACA,CAAA,SAGJ,wBACI,CAAA,2CACA,CAAA,+BACA,CAAA,UACA,CAAA,YACA,CAAA,iBACA,CAAA,UACA,CAAA,KACA,CAAA,MACA,CAAA,eAEA,WACI,CAAA,gBACA,CAAA,eAGJ,oBACI,CAAA,iBACA,CAAA,WACA,CAAA,kBACA,CAAA,qBAEA,wBArEU,CAAA,aA2ElB,YACI,CAAA,iBACA,CAAA,wBACA,CAAA,2CACA,CAAA,MACA,CAAA,SACA,CAAA,aACA,CAAA,eACA,CAAA,YACA,CAAA,oBAEA,gBACI,CAAA,kCAEA,WACI,CAAA,oBACA,CAAA,iBACA,CAAA,OACA,CAAA,iBACA,CAAA,0BAGJ,wBAjGU,CAAA,6BAsGd,aACI,CAAA,mCAEA,wBACI,CAAA,wBAIR,wBACI,CAAA,yBACA,CAAA,WACA,CAAA,OAKR,aACI,CAAA,iBACA,CAAA,wCACA,CAAA,MACA,CAAA,KACA,CAAA,OACA,CAAA,QACA,CAAA,yBAIJ,QACI,CAAA,eAGJ,wBACI,CAAA,YACA,CAAA,eACA,CAAA,WACA,CAAA,aA1IQ,CAAA,gBA4IR,CAAA,aACA,CAAA,iBACA,CAAA,kBACA,CAAA,2BAEA,YACI,CAAA,2BAEJ,wBACI,CAAA,6BAEJ,wBACI,CAAA,OAIR,wCACI,CAAA,iBACA,CAAA,UACA,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,eAEA,UACI,CAAA,MAIR,oBACI,CAAA,QAGJ,cACI,CAAA,cACA,CAAA,cACA,CAAA,eACA,CAAA,mBAGJ,iBACI,CAAA,UACA,CAAA,OACA,CAAA,QACA,CAAA,+BACA,CAAA,wBAEA,CAAA,2CACA,CAAA,iCAEA,UACI,CAAA,iBACA,CAAA,YACA,CAAA,wBACA,CAAA,+BACA,CAAA,2DAEA,YACI,CAAA,SACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,uEAEA,wBACI,CAAA,qCAKZ,kBACI,CAAA,iBACA,CAAA,mDAGJ,WACI,CAAA,qCAGJ,kBACI,CAAA,iBACA,CAAA,wCAIR,eAEI,CAAA,kBACA,CAAA,mBAGJ,UACI,CAAA,OAGJ,gBACI,CAAA,iBAIA,eACI,CAAA,iBACA,CAAA,4BAIJ,oBAGI,CAAA,0CAEA,SACI,CAAA,WACA,CAAA,wBACA,CAAA,gBACA,CAAA,0BAIR,aAGI,CAAA,UACA,CAAA,wCAEA,UACI,CAAA,UACA,CAAA,wBACA,CAAA,gBACA,CAAA,oCAIR,wBACI,CAAA,WAIR,cACI,CAAA,cACA,CAAA,eACA,CAAA,wBA3Rc,CAAA,kBA6Rd,eACI,CAAA,iBACA,CAAA,cACA,CAAA,wBACA,CAAA,+BACA,CAAA,+BAEA,SACI,CAAA,WACA,CAAA,YACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,qCAEA,wBA7SM,CAAA,oBAmTd,UACI,CAAA,yBACA,CAAA,aACA,CAAA,gCAGJ,gBACI,CAAA,8BAEJ,gBACI,CAAA,mDAEJ,kBACI,CAAA,iEAGJ,YAGI,CAAA,8BAGA,aACI,CAAA,UACA,CAAA,KACA,CAAA,QACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,OACA,CAAA,8BAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,MACA,CAAA,QACA,CAAA,gCAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,kBACA,CAAA,iBACA,CAAA,OACA,CAAA,QACA,CAAA,oBAKZ,iBACI,CAAA,UACA,CAAA,KAEA,CAAA,MACA,CAAA,OACA,CAAA,QACA,CAAA,aAGJ,cACI,CAAA,oCACA,CAAA,WACA,CAAA,YAGJ,UACI,CAAA,WACA,CAAA,0BACA,CAAA,oBACA,CAAA,mBAEA,eACI,CAAA,yBAGJ,eACI,CAAA,gBAGJ,iBACI,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,UACA,CAAA,WACA,CAAA,mBAEA,CAAA,kBAGJ,iBACI,CAAA,MAIR,oBACI,CAAA,kBACA,CAAA,2CACA,CAAA,wBAEA,CAAA,kBACA,CAAA,aAEA,2BACI,CAAA,wBACA,CAAA,YAGJ,YACI,CAAA,6BACA,CAAA,cAGJ,oBACI,CAAA,wBACA,CAAA,WAEA,CAAA,YACA,CAAA,iBACA,CAAA,+BACA,CAAA,2BACA,CAAA,oBAEA,wBACI,CAAA,WACA,CAAA,cAIR,oBACI,CAAA,uBACA,CAAA,sBAEA,kBACI,CAAA,iBACA,CAAA,qBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,QACA,CAAA,eAIR,oBACI,CAAA,uBACA,CAAA,gBACA,CAAA,uBAEA,gBACI,CAAA,mBACA,CAAA,uBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,QACA,CAAA,gBAIR,uBACI,CAAA,oBACA,CAAA,aACA,CAAA,cACA,CAAA,YAEA,CAAA,qBACA,CAAA,6BACA,CAAA,eAGJ,2BACI,CAAA,sBAEA,wBACI,CAAA,qBAKZ,8BACI,CAAA,oBACA,CAAA,8BACA,CAAA,yBACA,CAAA,6BAGJ,wBACI,CAAA,8BAGJ,8CA5fiB,CAAA,gBAggBjB,cACI,CAAA,wBAGJ,oBACI,CAAA,SACA,CAAA,UACA,CAAA,iBACA,CAAA,gBACA,CAAA,sBACA,CAAA,qCACA,CAAA,mCAGJ,SACI,CAAA,oBACA,CAAA,iCAGJ,uBACI,CAAA,wBAGJ,eACI,CAAA,eACA,CAAA,YACA,CAAA,iCAMJ,aACI,CAAA,eAIJ,QACI,CAAA,SACA,CAAA,UACA,CAAA,4BAGJ,aACI,CAAA,QACA,CAAA,SACA,CAAA,UACA,CAAA,gBAGJ,aACI,CAAA,kBACA,CAAA,kBACA,CAAA,8BACA,CAAA,gCACA,CAAA,wBACA,CAAA,eAGJ,iBACI,CAAA,qBAEA,gBACI,CAAA,2BAEA,8BACI,CAAA,WACA,CAAA,YACA,CAAA,aAtkBA,CAAA,QAwkBA,CAAA,SACA,CAAA,gBACA,CAAA,UACA,CAAA,cACA,CAAA,8BAIR,8CA9kBa,CAAA,6BAklBb,2CACI,CAAA,uDACA,CAAA,kBAIR,iBACI,CAAA,wBAEA,wBACI,CAAA,iBAIR,WACI,CAAA,gCAGJ,WACI,CAAA,wBAIJ,qCACI,CAAA,wBACA,CAAA,WACA,CAAA,YACA,CAAA,iBACA,CAAA,WACA,CAAA,UAGJ,qCACI,CAAA,wBACA,CAAA,aAtnBQ,CAAA,YAwnBR,CAAA,SAGJ,wBACI,CAAA,wBACA,CAAA,aACA,CAAA,kBACA,CAAA,YACA,CAAA,cACA,CAAA,aACA,CAAA,aAEA,gBACI,CAAA,mBAEA,wBACI,CAAA,sBAGJ,8CAzoBS,CAAA,qBAspBjB,kBACI,CAAA,iBACA,CAAA,uBACA,CAAA,WACA,CAAA,YACA,CAAA,uEACA,CAAA,+BAEA,CAAA,mBACA,CAAA,4BAGJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,mZACA,CAAA,kEAqBJ,mBAEI,CAAA,mCAGJ,UACI,CAAA,WACA,CAAA,mEACA,CAAA,kCAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,oBACA,CAAA,sEACA,CAAA,0CAGJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,kCAOJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,yDACA,CAAA,mEAGJ,mBAEI,CAAA,6BAGJ,UACI,CAAA,WACA,CAAA,qCAGJ,WACI,CAAA,aACA,CAAA,UACA,CAAA,UACA,CAAA,WACA,CAAA,kDACA,CAAA,mDACA,CAAA,2BAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,oZACA,CAAA,mCAqBJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,yBAQJ,iBACI,CAAA,yBACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,WACA,CAAA,gDACA,CAAA,uYACA,CAAA,iCAqBJ,SACI,CAAA,UACA,CAAA,iBACA,CAAA,sCAIJ,UACI,CAAA,WACA,CAAA,qBACA,CAAA,kBACA,CAAA,WACA,CAAA,uBACA,CAAA,sDACA,CAAA,mGAGJ,UAEI,CAAA,WACA,CAAA,gCAGJ,mBACI,CAAA,kDAGJ,oBACI,CAAA,gDACA,CAAA,qEACA,CAAA,iDAGJ,6DACI,CAAA,qCAGJ,cACI,CAAA,iBACA,CAAA,gCAGJ,oBACI,CAAA,SACA,CAAA,iBACA,CAAA,wBACA,CAAA,YAEA,CAAA,kBACA,CAAA,gBACA,CAAA,iBACA",sourcesContent:["$textColor: #dadcdd;\n$backgroundColor: #262829;\n$highlightColor: #c3df8544;\n\n* {\n box-sizing: border-box;\n cursor: default;\n user-select: none;\n}\n\na {\n cursor: pointer;\n color: #c3df85;\n text-decoration: none;\n \n &:hover {\n color: #d7e6b9;\n text-decoration: underline;\n }\n}\n\n.beingDragged {\n opacity: 0.6;\n z-index: 1000 !important;\n}\n\nimg {\n pointer-events: none;\n}\n\nbody {\n background-color: $backgroundColor;\n color: $textColor;\n overflow: hidden;\n}\n\ninput {\n border: 1px solid #343738;\n background: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n padding: 0.3em 0.8em;\n outline: none;\n font-size: 1.2em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n}\n\n.MenuBar {\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n border-bottom: 1px solid lighten($backgroundColor, 20%);\n width: 100%;\n height: 2.5em;\n position: absolute;\n z-index: 50;\n top: 0;\n left: 0;\n\n .Icon {\n height: 100%;\n padding: 0.4em 1em;\n }\n \n .Menu {\n display: inline-block;\n padding: 0.6em 0.7em;\n height: 100%;\n vertical-align: top;\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n}\n\n.MenuContent {\n display: none;\n position: absolute;\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n left: 0;\n top: 2.5em;\n min-width: 6em;\n min-height: 0.5em;\n z-index: 1000;\n \n & > .entry {\n padding: 0.5em 2em;\n\n &.submenu:after {\n content: '›';\n display: inline-block;\n position: absolute;\n right: 0;\n margin-right: 0.5em;\n }\n \n &:hover {\n background-color: $backgroundColor;\n }\n } \n\n & > .entry.disabled {\n color: darken($textColor, 35%);\n \n &:hover {\n background-color: lighten($backgroundColor, 5%);\n }\n }\n \n & > .separator {\n background-color: lighten($backgroundColor, 20%);\n border: 0.4em solid lighten($backgroundColor, 10%);\n height: 0.9em;\n }\n}\n\n\n.Modal {\n display: block;\n position: absolute;\n background-color: #00000077;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n}\n\n\nbutton::-moz-focus-inner {\n border: 0;\n}\n \nbutton, .button {\n background-color: darken($backgroundColor, 10%);\n outline: none;\n border-radius: 0;\n border: none;\n color: $textColor;\n padding: 0.5em 2em;\n font-size: 1em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n \n &:focus {\n outline: none;\n }\n &:hover {\n background-color: darken($backgroundColor, 5%);\n }\n &:active {\n background-color: darken($backgroundColor, 8%);\n }\n}\n\n.Modal {\n background-color: #00000077;\n position: absolute;\n z-index: 52;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n \n .Dialog {\n z-index: 53;\n }\n}\n\n.text {\n white-space: pre-line;\n}\n\n.Dialog {\n min-width: 15em;\n max-width: 80vw;\n min-height: 5em;\n max-height: 80vh;\n}\n\n.Dialog, .DockPanel {\n position: absolute;\n z-index: 51;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n\n .title {\n width: 100%;\n text-align: center;\n padding: 0.5em;\n background-color: lighten($backgroundColor, 20%);\n border-bottom: 1px solid lighten($backgroundColor, 30%);\n\n .closeButton {\n padding: 0.2em;\n width: 2em;\n height: 2em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: lighten($backgroundColor, 5%);\n \n &:hover {\n background-color: lighten($backgroundColor, 10%);\n }\n }\n }\n\n .content {\n padding: 0.8em 1.5em;\n position: absolute;\n }\n\n .content.w3term {\n height: 100%;\n }\n\n .buttons {\n padding: 0.8em 1.5em;\n text-align: center;\n }\n}\n\n.Dialog .content,\n.Dialog .Panel.content {\n position: static;\n padding: 0.8em 1.5em;\n}\n\n.InputDialog input {\n width: 100%;\n}\n\n.Label {\n user-select: text;\n}\n\n.DockContainer {\n & > * {\n overflow: hidden;\n position: absolute;\n }\n\n \n &.horizontal > * {\n // border: 1px solid #00ffff;\n // background-color: #00ffff66;\n display: inline-block;\n\n &.DockSeparator {\n width: 3px;\n height: 100%;\n background-color: darken($backgroundColor, 10%); \n cursor: ew-resize;\n }\n }\n \n &.vertical > * {\n // border: 1px solid #ffff00;\n // background-color: #ffff0066;\n display: block;\n clear: both;\n \n &.DockSeparator {\n width: 100%;\n height: 3px;\n background-color: darken($backgroundColor, 10%); \n cursor: ns-resize;\n }\n }\n \n & > .DockSeparator:hover {\n background-color: darken($backgroundColor, 5%);\n }\n}\n\n.DockPanel {\n transform: none;\n max-width: none;\n max-height: none;\n background-color: $backgroundColor;\n .title {\n text-align: left;\n padding: 0.1em 0.5em;\n font-size: 0.9em;\n background-color: darken($backgroundColor, 5%);\n border-bottom: 1px solid darken($backgroundColor, 8%);\n\n .closeButton {\n padding: 0;\n width: 1.6em;\n height: 1.6em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: darken($backgroundColor, 5%);\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n }\n\n .content {\n width: 100%;\n height: calc(100% - 1.5em);\n overflow: auto;\n }\n\n &.resizingHorizontally {\n cursor: ew-resize;\n }\n &.resizingVertically {\n cursor: ns-resize;\n }\n &.resizingHorizontally.resizingVertically {\n cursor: nwse-resize;\n }\n\n .resizeEW,\n .resizeNS,\n .resizeDiag {\n display: none;\n }\n &.floating {\n .resizeEW {\n display: block;\n width: 0.3em;\n top: 0;\n bottom: 0;\n background-color: transparent;\n cursor: ew-resize;\n position: absolute;\n right: 0;\n }\n .resizeNS {\n display: block;\n width: 100%;\n height: 0.3em;\n background-color: transparent;\n cursor: ns-resize;\n position: absolute;\n left: 0;\n bottom: 0;\n }\n .resizeDiag {\n display: block;\n width: 0.5em;\n height: 0.5em;\n background-color: transparent;\n cursor: nwse-resize;\n position: absolute;\n right: 0;\n bottom: 0;\n }\n }\n}\n\nbody > .DockContainer {\n position: absolute;\n z-index: 49;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.dockOverlay {\n position: fixed;\n background-color: #33779999;\n z-index: 999;\n}\n\n.NodeEditor {\n width: 100%;\n height: 100%;\n overflow: hidden !important;\n padding: 0 !important;\n\n &.moving {\n cursor: grabbing;\n }\n\n &.beingDragged {\n cursor: grabbing;\n }\n\n svg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n }\n \n .Node {\n position: absolute;\n }\n}\n\n.Node {\n display: inline-block;\n border-radius: 0.5em;\n box-shadow: 0 0 0.5em #00000077;\n \n background-color: darken($backgroundColor, 5%);\n white-space: nowrap;\n \n .title {\n border-radius: 0.5em 0.5em 0 0;\n background-color: lighten($backgroundColor, 5%);\n }\n\n .body {\n display: flex;\n justify-content: space-between;\n }\n\n .bullet {\n display: inline-block;\n background-color: lighten($backgroundColor, 10%);\n\n width: 1.2em;\n height: 1.2em;\n border-radius: 1em;\n border: 0.2em solid transparent;\n background-clip: padding-box;\n\n &:hover {\n background-color: lighten($backgroundColor, 25%);\n border: none;\n }\n }\n\n .inputs {\n display: inline-block;\n vertical-align: text-top;\n \n .bullet {\n margin-left: -0.5em;\n margin-right: 0.5em;\n }\n \n .input {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0;\n }\n }\n \n .outputs {\n display: inline-block;\n vertical-align: text-top;\n text-align: right;\n \n .bullet {\n margin-left: 0.5em;\n margin-right: -0.5em;\n }\n \n .output {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0;\n }\n }\n \n .contents {\n vertical-align: text-top;\n display: inline-block;\n min-width: 2em;\n min-height: 2em;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n\n &.selected {\n box-shadow: 0 0 0.5em lighten($backgroundColor, 15%);\n\n .title {\n background-color: lighten($backgroundColor, 15%);\n }\n }\n}\n\n.TreeViewItem .label {\n background-color: transparent;\n display: inline-block;\n border: 1px solid transparent;\n -webkit-user-drag: element;\n}\n\n.TreeViewItem.focused > .label {\n border: 1px solid lighten($backgroundColor, 15%);\n}\n\n.TreeViewItem .label.selected {\n background-color: $highlightColor;\n}\n\n.TreeViewItem * {\n cursor: pointer;\n}\n\n.TreeViewItem > .expander {\n display: inline-block;\n opacity: 0;\n width: 0.3em;\n margin-right: 0.5em;\n font-weight: bold;\n transform: rotate(0deg);\n transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expandable > .expander {\n opacity: 1;\n display: inline-block;\n}\n\n.TreeViewItem.expanded > .expander {\n transform: rotate(90deg);\n}\n\n.TreeViewItem > .children {\n margin-left: 1em;\n overflow: hidden;\n display: none;\n // transform: scaleY(0); \n // transform-origin: top;\n // transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expanded > .children {\n display: block;\n // transform: scaleY(1);\n}\n\n.Panel.content {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView, .ListView.content {\n display: table;\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView .cell {\n font-size: 80%;\n display: table-cell;\n padding: 0.15em 0.6em;\n border-left: 0.2em solid $backgroundColor;\n border-bottom: 0.2em solid $backgroundColor;\n background-color: darken($backgroundColor, 3%);\n}\n\n.ListView .row {\n display: table-row;\n \n .cell {\n user-select: text;\n\n input {\n background-color: transparent;\n border: none;\n outline: none;\n color: $textColor;\n margin: 0;\n padding: 0;\n user-select: text;\n width: auto;\n display: inline;\n }\n }\n\n &.selected .cell {\n background-color: $highlightColor;\n }\n\n .cell.editing {\n background-color: darken($highlightColor, 50%);\n box-shadow: inset 0 0 0.1em $highlightColor;\n }\n}\n\n.ListView .header {\n display: table-row;\n\n .cell {\n background-color: lighten($backgroundColor, 5%);\n }\n}\n\n.NodeEditor path {\n stroke: #999999ff;\n}\n\n.NodeEditor path.notConnectable {\n stroke: #994444ff;\n}\n\n\n.NodeEditor .selectRect {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 30%);\n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 500;\n}\n\n.Dropdown {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 20%);\n color: $textColor;\n outline: none;\n}\n\n.ListBox {\n border: 1px solid #343738;\n background-color: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n outline: none;\n font-size: 0.9em;\n overflow: auto;\n\n & > div {\n padding: 0.3em 1em;\n\n &:hover {\n background-color: lighten(#1a1d1f, 5%);\n }\n\n &.selected {\n background-color: $highlightColor;\n }\n }\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n\n\n.ColorPicker .handle {\n border-radius: 100%;\n position:relative;\n border: 0.05em solid #222;\n width: 1.2em;\n height: 1.2em;\n box-shadow: 0.03em 0.03em 0.3em #00000044,\n inset 0 0 0.5em white;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.PaintStyleColorPicker > .hue {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to right,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.PaintStyleColorPicker > .hue *,\n.PaintStyleColorPicker > .lightness * {\n pointer-events: none;\n}\n\n.PaintStyleColorPicker .saturation {\n width: 100%;\n height: 100%;\n background: linear-gradient(to bottom, transparent, hsl(0, 0%, 50%));\n}\n\n.PaintStyleColorPicker .lightness {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background-color: red;\n background-image: linear-gradient(to bottom, white, transparent, black);\n}\n\n.PaintStyleColorPicker .lightness > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.GimpStyleColorPicker > .saturation {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to bottom, transparent, black);\n}\n\n.GimpStyleColorPicker > .saturation *,\n.GimpStyleColorPicker > .value * {\n pointer-events: none;\n}\n\n.GimpStyleColorPicker .value {\n width: 100%;\n height: 100%;\n}\n\n.GimpStyleColorPicker .value::before {\n content: ' ';\n display: block;\n float: left;\n width: 100%;\n height: 100%;\n mask: linear-gradient(to right, white, transparent);\n background: linear-gradient(to bottom, white, black);\n}\n\n.GimpStyleColorPicker .hue {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background: linear-gradient(to bottom,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.GimpStyleColorPicker .hue > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.WheelColorPicker > .wheel {\n position: relative;\n border: 0.5em solid #090909;\n width: 25em;\n height: 25em;\n border-radius: 100%;\n padding: 3em;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: conic-gradient(\n hsl(90, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(0, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(89, 100%, 50%)\n );\n}\n\n.WheelColorPicker > .wheel >.handle {\n width: 3em;\n height: 3em;\n position: absolute;\n}\n\n\n.WheelColorPicker > .wheel > .innerCircle {\n width: 100%;\n height: 100%;\n background-color: #222;\n border-radius: 100%;\n padding: 18%;\n transform: rotate(45deg);\n box-shadow: inset 0.5em 0.5em 1em #00000088;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation,\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n width: 100%;\n height: 100%;\n}\n\n.WheelColorPicker > .saturation * {\n pointer-events: none;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation {\n background-color: red;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background-image: linear-gradient(45deg, hsl(0, 0%, 50%), transparent);\n}\n\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n background: linear-gradient(135deg, white, transparent, black);\n}\n\n.ColorPickerDialog .WheelColorPicker {\n margin-top: 1em;\n margin-bottom: 1em;\n}\n\n.ColorPickerDialog .ColorOutput {\n display: inline-block;\n width: 3em;\n padding: .3em .8em;\n border: 1px solid #343738;\n\n height: 2.4em;\n vertical-align: top;\n margin-top: 0.05em;\n margin-right: 0.4em;\n}"],sourceRoot:""}]);const s=l},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var l={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<t.length;c++){var d=[].concat(t[c]);o&&l[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},537:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},379:t=>{var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var r={},l=[],s=0;s<t.length;s++){var a=t[s],c=o.base?a[0]+o.base:a[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=n(u),A={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==h)e[h].references++,e[h].updater(A);else{var p=i(A,o);o.byIndex=s,e.splice(s,0,{identifier:u,updater:p,references:1})}l.push(u)}return l}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var r=o(t=t||[],i=i||{});return function(t){t=t||[];for(var l=0;l<r.length;l++){var s=n(r[l]);e[s].references--}for(var a=o(t,i),c=0;c<r.length;c++){var d=n(r[c]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=a}}},569:t=>{var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var o={};return(()=>{n.r(o),n.d(o,{AbstractColorPicker:()=>H,Button:()=>G,ClipboardData:()=>Lt,Color:()=>w,ColorModificationMode:()=>g,ColorPickerDialog:()=>j,DEGREES_TO_RAD:()=>C,Dialog:()=>L,DockContainer:()=>kt,DockDirection:()=>M,DockPanel:()=>xt,Dropdown:()=>Y,FakeClipboard:()=>Nt,FloatListViewColumn:()=>tt,GimpStyleColorPicker:()=>T,Image:()=>gt,InputDialog:()=>Ot,IntListViewColumn:()=>Z,Label:()=>pt,ListBox:()=>$,ListView:()=>et,ListViewColumn:()=>q,Menu:()=>dt,MenuBar:()=>ht,MessageDialog:()=>Pt,MessageDialogButton:()=>Bt,Node:()=>Ut,NodeClipboardData:()=>jt,NodeConnection:()=>Jt,NodeEditor:()=>Gt,NodePort:()=>Yt,OkMessageDialog:()=>Dt,Orientation:()=>R,PaintStyleColorPicker:()=>W,Panel:()=>O,RAD_TO_DEGREES:()=>f,ROOT:()=>S,StringListBox:()=>K,StringListViewColumn:()=>Q,TreeView:()=>ot,TreeViewItem:()=>it,UdoableActionCategory:()=>Et,UndoHistory:()=>Mt,UndoableCommand:()=>Rt,Vector2:()=>_,WheelColorPicker:()=>V,Widget:()=>k,currentMousePos:()=>E,fakeClipboard:()=>zt,rectContains:()=>y});var t=n(379),e=n.n(t),i=n(795),r=n.n(i),l=n(569),s=n.n(l),a=n(565),c=n.n(a),d=n(216),u=n.n(d),h=n(589),A=n.n(h),p=n(192),m={};m.styleTagTransform=A(),m.setAttributes=c(),m.insert=s().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=u(),e()(p.Z,m),p.Z&&p.Z.locals&&p.Z.locals;var g,f=180/Math.PI,C=Math.PI/180,_=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getAngleToOtherInRadians=function(t){return Math.acos(Math.max(Math.min(this.getScalarProduct(t)/(this.getLength()*t.getLength()),1),-1))},t.prototype.getAngleToOtherInDegrees=function(t){return this.getAngleToOtherInRadians(t)*f},t.prototype.getRotatedInRadians=function(e){var n=Math.cos(e),o=Math.sin(e);return new t(this.x*n-this.y*o,this.x*o+this.y*n)},t.prototype.getRotatedInDegrees=function(t){return this.getRotatedInRadians(t*C)},t.prototype.rotateInRadians=function(t){var e=Math.cos(t),n=Math.sin(t),o=this.x*e-this.y*n,i=this.x*n+this.y*e;this.x=o,this.y=i},t.prototype.rotateInDegrees=function(t){this.rotateInRadians(t*C)},t.prototype.getScalarProduct=function(t){return this.x*t.x+this.y*t.y},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.getScaled=function(e){return new t(this.x*e,this.y*e)},t.prototype.getLength=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.normalize=function(){var t=this.getLength();this.x=this.x/t,this.y=this.y/t},t.prototype.getNormalized=function(){var e=this.getLength();return new t(this.x/e,this.y/e)},t.prototype.setLength=function(t){this.normalize(),this.scale(t)},t.prototype.getWithLength=function(t){var e=this.getNormalized();return e.scale(t),e},t}();function y(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}function v(t,e){return(t%e+e)%e}!function(t){t[t.Percentage=0]="Percentage",t[t.FixedAmount=1]="FixedAmount"}(g||(g={}));var b=new RegExp(/^#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/),w=function(){function t(t,e,n){this.setRgb(t||0,e||0,n||0)}return t.fromRgb=function(e,n,o){return new t(e,n,o)},t.fromHsl=function(e,n,o){var i=t._hslToRgb(e,n,o),r=t.fromRgbObject(i);return r._hueInfo=e,r},t.fromHsv=function(e,n,o){var i=t._hsvToRgb(e,n,o),r=t.fromRgbObject(i);return r._hueInfo=e,r},t.fromHex=function(e){var n=t._hexToRgb(e);return n?t.fromRgbObject(n):null},t._hexToRgb=function(t){var e=t.match(b);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},t._hslToRgb=function(t,e,n){t=v(t,360);var o,i,r,l=(1-Math.abs(2*n-1))*e,s=l*(1-Math.abs(v(t/60,2)-1)),a=n-l/2;return t>=0&&t<60?(o=l,i=s,r=0):t>=60&&t<120?(o=s,i=l,r=0):t>=120&&t<180?(o=0,i=l,r=s):t>=180&&t<240?(o=0,i=s,r=l):t>=240&&t<300?(o=s,i=0,r=l):t>=300&&t<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},t._hsvToRgb=function(t,e,n){t=v(t,360);var o,i,r,l=n*e,s=l*(1-Math.abs(v(t/60,2)-1)),a=n-l;return t>=0&&t<60?(o=l,i=s,r=0):t>=60&&t<120?(o=s,i=l,r=0):t>=120&&t<180?(o=0,i=l,r=s):t>=180&&t<240?(o=0,i=s,r=l):t>=240&&t<300?(o=s,i=0,r=l):t>=300&&t<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},t.fromRgbObject=function(e){return t.fromRgb(e.r,e.g,e.b)},t.fromHslObject=function(e){return t.fromHsl(e.h,e.s,e.l)},t.fromHsvObject=function(e){return t.fromHsv(e.h,e.s,e.v)},t.prototype.setRgb=function(t,e,n){this._r=Math.max(Math.min(Math.round(t),255),0),this._g=Math.max(Math.min(Math.round(e),255),0),this._b=Math.max(Math.min(Math.round(n),255),0)},t.prototype.setHsl=function(e,n,o){var i=t._hslToRgb(e,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=e},t.prototype.setHsv=function(e,n,o){var i=t._hsvToRgb(e,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=e},t.prototype.setHex=function(e){var n=t._hexToRgb(e);this._r=n.r,this._g=n.g,this._b=n.b},t.prototype.setRgbObject=function(t){this.setRgb(t.r,t.g,t.b)},t.prototype.setHslObject=function(t){this.setHsl(t.h,t.s,t.l)},t.prototype.setHsvObject=function(t){this.setHsv(t.h,t.s,t.v)},t.prototype.getHsl=function(){var t,e=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(e,n,o),r=Math.min(e,n,o),l=i-r;0==l?t=0:i==e?t=60*v((n-o)/l,6):i==n?t=60*((o-e)/l+2):i==o&&(t=60*((e-n)/l+4));var s=(i+r)/2,a=0==l?0:l/(1-Math.abs(2*s-1));return{h:0==t&&this._hueInfo?this._hueInfo:t,s:a,l:s}},t.prototype.getHsv=function(){var t,e=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(e,n,o),r=i-Math.min(e,n,o);0==r?t=0:i==e?t=60*v((n-o)/r,6):i==n?t=60*((o-e)/r+2):i==o&&(t=60*((e-n)/r+4));var l=0==r?0:r/i,s=i;return{h:0==t&&this._hueInfo?this._hueInfo:t,s:l,v:s}},t.prototype.getRgb=function(){return{r:this._r,g:this._g,b:this._b}},t.prototype.getHex=function(){var t=this._r.toString(16).padStart(2,"0"),e=this._g.toString(16).padStart(2,"0"),n=this._b.toString(16).padStart(2,"0");return"#".concat(t).concat(e).concat(n)},t.prototype.lighten=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.l=Math.max(0,Math.min(n.l+t,1)):n.l=Math.max(0,Math.min(n.l*(t+1),1)),this.setHslObject(n)},t.prototype.darken=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.l=Math.max(0,Math.min(n.l-t,1)):n.l=Math.max(0,Math.min(n.l*(1-t),1)),this.setHslObject(n)},t.prototype.saturate=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.s=Math.max(0,Math.min(n.s+t,1)):n.s=Math.max(0,Math.min(n.s*(t+1),1)),this.setHslObject(n)},t.prototype.desaturate=function(t,e){var n=this.getHsl();e==g.FixedAmount?n.s=Math.max(0,Math.min(n.s+t,1)):n.s=Math.max(0,Math.min(n.s*(1-t),1)),this.setHslObject(n)},t.prototype.setSaturation=function(t){t=Math.min(Math.max(t,0),1);var e=this.getHsl();e.s=t,this.setHslObject(e)},t.prototype.rotateHue=function(t){var e=this.getHsl();e.h=v(e.h+t,360),this.setHslObject(e)},t.prototype.invert=function(){this._r=255-this._r,this._g=255-this._g,this._b=255-this._b,this._hueInfo&&(this._hueInfo=v(this._hueInfo+180,360))},t.prototype.getInverted=function(){return t.fromRgb(255-this._r,255-this._g,255-this._b)},t.prototype.getComplement=function(){var e=t.fromRgb(this._r,this._g,this._b);return e.rotateHue(180),e},t.prototype.getBlended=function(e,n){var o=1-(n=Math.max(Math.min(n,1),0));return t.fromRgb(Math.round(this._r*o+e._r*n),Math.round(this._g*o+e._g*n),Math.round(this._b*o+e._b*n))},t}(),k=function(){function t(t){this.element=t||document.createElement("div"),this.element.classList.add("Widget"),this.parentWidget=null}return t.prototype.onDragStart=function(t){return this.element.classList.add("beingDragged"),!0},t.prototype.onDragEnd=function(t){this.element.classList.remove("beingDragged")},t.prototype.onDragging=function(t){this.element.style.left=t.posWithOffsetToParentConsidered.x+"px",this.element.style.top=t.posWithOffsetToParentConsidered.y+"px"},t.prototype.onAttached=function(){},t.prototype.isAttached=function(){return document.body.contains(this.element)},t.prototype.onResize=function(){},t}(),x=new function(t,e,n,o,i){this.element=null,this.offsetX=0,this.offsetY=0,this.dragStartY=0,this.dragStartX=0}(null,0,0,0,0),E={x:-1,y:-1};function I(t,e){return function(n){if((!e||e(t,n))&&(e||!t.onDragStart||t.onDragStart(n))){var o=t.element.getBoundingClientRect();x.offsetX=n.clientX-o.left,x.offsetY=n.clientY-o.top,x.dragStartX=n.clientY,x.dragStartY=n.clientY,x.draggable=t,x.element=t.element,n.stopPropagation()}}}var B=function(t,e,n,o){this.element=t,this.onDragStart=e,this.onDragging=n,this.onDragEnd=o};window.addEventListener("mouseup",(function(t){x&&x.draggable&&(x.draggable.onDragEnd(t),x.draggable=null)}),!0),window.addEventListener("mousemove",(function(t){if(null!=x.draggable){var e=x.element.getBoundingClientRect(),n={mouseEvent:t,rect:e,posWithOffsetToParentConsidered:new _(t.clientX-x.offsetX,t.clientY-x.offsetY),posRelativeToElement:new _(t.clientX-e.x,t.clientY-e.y),posRelativeToDragStart:new _(t.clientX-x.dragStartX,t.clientY-x.dragStartY)};x.draggable.onDragging(n)}E.x=t.clientX,E.y=t.clientY}),!0);var P,D=(P=function(t,e){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},P(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O=function(t){function e(){var e=t.call(this)||this;return e.element.classList.add("Panel"),e.children=[],e}return D(e,t),e.prototype.prependChild=function(t){t.parentWidget=this,this.element.prepend(t.element),this.children.unshift(t),this.isAttached()&&t.onAttached()},e.prototype.appendChild=function(t){t.parentWidget=this,this.element.appendChild(t.element),this.children.push(t),this.isAttached()&&t.onAttached()},e.prototype.removeChild=function(t){t.parentWidget=null,this.element.removeChild(t.element);var e=this.children.indexOf(t);e>=0&&this.children.splice(e,1)},e.prototype.onAttached=function(){if(this.isAttached())for(var t=0,e=this.children;t<e.length;t++)e[t].onAttached()},e.prototype.onResize=function(){for(var t=0,e=this.children;t<e.length;t++)e[t].onResize()},e}(k),S=new O;S.element=document.body;var M,R,N=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),L=function(t){function e(e,n,o){var i=t.call(this)||this;if(i.element.classList.add("Dialog"),i.title=e,i.attachedElement=null,o=null==o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=e,i.titleElement.className="title",i.contentWidget=n,i.contentElement=n.element,i.contentElement.classList.add("content"),o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(t){i.hide()}}return i.modalElement=document.createElement("div"),i.modalElement.className="Modal",i.element.appendChild(i.titleElement),i.element.appendChild(i.contentElement),i.titleElement.addEventListener("mousedown",I(i)),i}return N(e,t),e.prototype.onAttached=function(){this.isAttached()&&this.contentWidget.onAttached()},e.prototype.show=function(){this.attachedElement=this.element,S.element.appendChild(this.element),this.onAttached()},e.prototype.hide=function(){null!=this.attachedElement&&(S.element.removeChild(this.attachedElement),this.attachedElement=null)},e.prototype.showModal=function(){this.attachedElement=this.modalElement,this.modalElement.appendChild(this.element),S.element.appendChild(this.modalElement),this.onAttached()},e.prototype.isShown=function(){return null!=this.attachedElement},e.prototype.onDragging=function(e){t.prototype.onDragging.call(this,e),this.element.style.transform="none"},e}(k),z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),H=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("ColorPicker"),n._onColorChanged=e,n}return z(e,t),e.prototype.setColorProperty=function(t){var e=this._color;this._color=t,this._onColorChanged&&this._onColorChanged(e,t)},e.prototype.getColor=function(){return this._color},e}(k),W=function(t){function e(e,n){var o=t.call(this,n)||this;o.element.classList.add("PaintStyleColorPicker"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._colorHandle=document.createElement("div"),o._colorHandle.classList.add("handle"),o._lightnessHandle=document.createElement("div"),o._lightnessHandle.classList.add("handle"),o._hueDiv.appendChild(o._saturationDiv),o._saturationDiv.appendChild(o._colorHandle),o._lightnessDiv.appendChild(o._lightnessHandle),o.element.appendChild(o._hueDiv),o.element.appendChild(o._lightnessDiv);var i=new B(o._hueDiv,(function(t){return!0}),(function(t){o._onHueMove(t)}),(function(t){}));o._hueDiv.addEventListener("mousedown",I(i));var r=new B(o._lightnessDiv,(function(t){return!0}),(function(t){o._onLightnessMove(t)}),(function(t){}));return o._lightnessDiv.addEventListener("mousedown",I(r)),void 0===e&&(e=new w(255,0,0)),o.setColor(e),o}return z(e,t),e.prototype._onLightnessMove=function(t){this._lightnessHandle.style.top=Math.max(Math.min(t.posRelativeToElement.y,this._lightnessDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._onHueMove=function(t){var e=t.posRelativeToElement;this._colorHandle.style.left=Math.max(Math.min(e.x,this._hueDiv.clientWidth),0)+"px",this._colorHandle.style.top=Math.max(Math.min(e.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._getColorFromCurrentPositions=function(){var t=this._hueDiv.getBoundingClientRect(),e=this._lightnessDiv.getBoundingClientRect(),n=this._colorHandle.offsetLeft/t.width,o=1-this._colorHandle.offsetTop/t.height,i=1-this._lightnessHandle.offsetTop/e.height;return w.fromHsl(360*n,o,i)},e.prototype._setColorInternal=function(t,e){var n=t.getHsl(),o=n.h/360,i=n.s,r=n.l;if(e){var l=this._hueDiv.getBoundingClientRect(),s=this._lightnessDiv.getBoundingClientRect();this._colorHandle.style.left=(l.width*o).toFixed(2)+"px",this._colorHandle.style.top=(l.height-l.height*i).toFixed(2)+"px",this._lightnessHandle.style.top=(s.height-s.height*r).toFixed(2)+"px"}var a=w.fromHsl(n.h,n.s,.5);this._lightnessDiv.style.backgroundColor=a.getHex(),this.setColorProperty(t)},e.prototype.setColor=function(t){this._setColorInternal(t,!0)},e.prototype.onAttached=function(){this.setColor(this.getColor())},e}(H),T=function(t){function e(e,n){var o=t.call(this,n)||this;o.element.classList.add("GimpStyleColorPicker"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._valueDiv=document.createElement("div"),o._valueDiv.classList.add("value"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._svHandle=document.createElement("div"),o._svHandle.classList.add("handle"),o._hueHandle=document.createElement("div"),o._hueHandle.classList.add("handle"),o._saturationDiv.appendChild(o._valueDiv),o._valueDiv.appendChild(o._svHandle),o._hueDiv.appendChild(o._hueHandle),o.element.appendChild(o._saturationDiv),o.element.appendChild(o._hueDiv);var i=new B(o._saturationDiv,(function(t){return!0}),(function(t){o._onSatValMove(t)}),(function(t){}));o._saturationDiv.addEventListener("mousedown",I(i));var r=new B(o._hueDiv,(function(t){return!0}),(function(t){o._onHueMove(t)}),(function(t){}));return o._hueDiv.addEventListener("mousedown",I(r)),void 0===e&&(e=new w(255,0,0)),o.setColor(e),o}return z(e,t),e.prototype._onHueMove=function(t){this._hueHandle.style.top=Math.max(Math.min(t.posRelativeToElement.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._onSatValMove=function(t){var e=t.posRelativeToElement;this._svHandle.style.left=Math.max(Math.min(e.x,this._saturationDiv.clientWidth),0)+"px",this._svHandle.style.top=Math.max(Math.min(e.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._getColorFromCurrentPositions=function(){var t=this._saturationDiv.getBoundingClientRect(),e=this._hueDiv.getBoundingClientRect(),n=this._svHandle.offsetLeft/t.width,o=1-this._svHandle.offsetTop/t.height,i=this._hueHandle.offsetTop/e.height;return w.fromHsv(360*i,n,o)},e.prototype._setColorInternal=function(t,e){var n=t.getHsv(),o=n.h/360,i=n.s,r=n.v;if(e){var l=this._hueDiv.getBoundingClientRect(),s=this._valueDiv.getBoundingClientRect();this._svHandle.style.left=(l.width*i).toFixed(2)+"px",this._svHandle.style.top=(l.height-l.height*r).toFixed(2)+"px",this._hueHandle.style.top=(s.height*o).toFixed(2)+"px"}var a=w.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=a.getHex(),this.setColorProperty(t)},e.prototype.setColor=function(t){this._setColorInternal(t,!0)},e.prototype.onAttached=function(){this.setColor(this.getColor())},e}(H),V=function(t){function e(e,n){var o=t.call(this,n)||this;o._zeroHueVector=new _(1,0),o.element.classList.add("WheelColorPicker"),o._hueWheelDiv=document.createElement("div"),o._hueWheelDiv.classList.add("wheel"),o._wheelHandle=document.createElement("div"),o._wheelHandle.classList.add("handle"),o._slHandle=document.createElement("div"),o._slHandle.classList.add("handle"),o._innerCircleDiv=document.createElement("div"),o._innerCircleDiv.classList.add("innerCircle"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._lightnessDiv.appendChild(o._slHandle),o._saturationDiv.appendChild(o._lightnessDiv),o._innerCircleDiv.appendChild(o._saturationDiv),o._hueWheelDiv.appendChild(o._wheelHandle),o._hueWheelDiv.appendChild(o._innerCircleDiv),o.element.appendChild(o._hueWheelDiv);var i=new B(o._saturationDiv,(function(t){return!0}),(function(t){o._onSatLitMove(t)}),(function(t){}));o._saturationDiv.addEventListener("mousedown",I(i));var r=new B(o._hueWheelDiv,(function(t){return!0}),(function(t){o._onHueMove(t)}),(function(t){}));return o._hueWheelDiv.addEventListener("mousedown",I(r)),void 0===e&&(e=new w(255,0,0)),o.setColor(e),o}return z(e,t),e.prototype._onHueMove=function(t){var e=this._hueWheelDiv.clientWidth/2,n=this._hueWheelDiv.clientHeight/2,o=this._wheelHandle.getBoundingClientRect(),i=new _(t.posRelativeToElement.x-e,t.posRelativeToElement.y-n);i.setLength(this._hueWheelDiv.clientWidth/2-o.width/2),this._wheelHandle.style.left=e+i.x+"px",this._wheelHandle.style.top=n+i.y+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._onSatLitMove=function(t){var e=this._innerCircleDiv.getBoundingClientRect(),n=t.posRelativeToElement,o=t.rect.x-e.x;n.x-=(e.width-o-o)/2,n.rotateInDegrees(-45),this._slHandle.style.left=Math.max(Math.min(n.x,this._saturationDiv.clientWidth),0)+"px",this._slHandle.style.top=Math.max(Math.min(n.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},e.prototype._getColorFromCurrentPositions=function(){var t=this._saturationDiv.getBoundingClientRect(),e=this._slHandle.getBoundingClientRect(),n=this._wheelHandle.getBoundingClientRect(),o=e.x+e.width/2-t.x,i=1-(e.y+e.height/2-t.y)/t.height,r=t.width*(i<.5?2*i:2*(1-i)),l=(o-(t.width/2-r/2))/r,s=this._hueWheelDiv.clientWidth,a=s/2,c=this._hueWheelDiv.clientHeight/2,d=new _(this._wheelHandle.offsetLeft+n.width/2-a,this._wheelHandle.offsetTop+n.height/2-c);d.setLength(s/2-n.width/2);var u=this._zeroHueVector.getAngleToOtherInDegrees(d);return d.y>0&&(u=360-u),w.fromHsl(u,l,i)},e.prototype._setColorInternal=function(t,e){var n=t.getHsl(),o=n.s,i=n.l;if(e){var r=this._saturationDiv.getBoundingClientRect(),l=this._innerCircleDiv.getBoundingClientRect(),s=r.width*(i<.5?2*i:2*(1-i)),a=new _(r.width/2+s*o-s/2,r.height-r.height*i),c=r.x-l.x;a.x-=(l.width-c-c)/2,a.rotateInDegrees(-45),this._slHandle.style.left=a.x.toFixed(2)+"px",this._slHandle.style.top=a.y.toFixed(2)+"px";var d=this._wheelHandle.getBoundingClientRect(),u=this._hueWheelDiv.clientWidth,h=u/2,A=this._hueWheelDiv.clientHeight/2,p=this._zeroHueVector.getRotatedInDegrees(-n.h);p.setLength(u/2-d.width/2),this._wheelHandle.style.left=h+p.x+"px",this._wheelHandle.style.top=A+p.y+"px"}var m=w.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=m.getHex(),this.setColorProperty(t)},e.prototype.setColor=function(t){this._setColorInternal(t,!0)},e.prototype.onAttached=function(){this.setColor(this.getColor())},e}(H),j=function(t){function e(e,n,o,i,r){var l=this,s=new k,a=s.element;l=t.call(this,e,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l._divOutput=document.createElement("div"),l._divOutput.classList.add("ColorOutput"),l._textInput=document.createElement("input"),l.colorPicker=new V(o,(function(t,e){var n=e.getHex();l._textInput.value=n,l._divOutput.style.backgroundColor=n})),l._textInput.value=o.getHex(),l._textInput.onkeyup=function(){var t=w.fromHex(l._textInput.value);t&&l.colorPicker.setColor(t)};var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(t){var e=document.createElement("button");e.textContent=t.label,t.isCancel&&(l._cancelOption=e),t.isContinue&&(l._continueOption=e),e.onclick=function(e){l.hide(),t.callback&&t.callback(l)},d.appendChild(e)})),a.appendChild(c),a.appendChild(l.colorPicker.element),a.appendChild(l._divOutput),a.appendChild(l._textInput),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("ColorPickerDialog"),l._boundKeyEvent=null,l}return z(e,t),e.prototype.onAttached=function(){this.isAttached()&&this.colorPicker.onAttached()},e.prototype.getColor=function(){return this.colorPicker.getColor()},e.prototype.showModal=function(){var e=this;t.prototype.showModal.call(this),this._boundKeyEvent=function(t){"Escape"==t.key&&e._cancelOption?e._clickButton(e._cancelOption):"Enter"==t.key&&e._continueOption&&e._clickButton(e._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},e.prototype._clickButton=function(t){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});t.dispatchEvent(e)},e.prototype.hide=function(){t.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},e}(L),F=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),G=function(t){function e(e,n){var o=t.call(this,document.createElement("button"))||this;return o.element.classList.add("Button"),o.element.textContent=e,n&&(o.element.onclick=n),o}return F(e,t),e}(k),J=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Y=function(t){function e(){var e=t.call(this,document.createElement("select"))||this;return e.element.classList.add("Dropdown"),e}return J(e,t),e.prototype.addOption=function(t,e){var n=document.createElement("option");n.textContent=t,n.value=e,this.element.appendChild(n)},e.prototype.removeOption=function(t){for(var e=0,n=Array.from(this.element.options);e<n.length;e++){var o=n[e];if(o.value==t)return void this.element.removeChild(o)}},e.prototype.getSelectedValue=function(){return this.element.value},e.prototype.setSelectedValue=function(t){this.element.value=t},e}(k),U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$=function(t){function e(e,n,o){var i=t.call(this)||this;return i.element.classList.add("ListBox"),i._toElementFunction=n||function(t){return t},i._selectedIndex=-1,e=e||[],i.setItems(e),i._onItemClick=o||function(t){},i}return U(e,t),e.prototype.clear=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this._items=[],this._selectedIndex=-1},e.prototype.setItems=function(t){this.clear();for(var e=0,n=t;e<n.length;e++){var o=n[e];this.addItem(o)}},e.prototype.getItemCount=function(){return this._items.length},e.prototype.addItem=function(t){var e=this;this._items.push(t);var n=this._toElementFunction(t);n.onclick=function(){e.selectItem(t),e._onItemClick(t,n)},this.element.appendChild(n)},e.prototype.removeItem=function(t){var e=this._items.indexOf(t);this.removeItemAtIndex(e)},e.prototype.removeItemAtIndex=function(t){t<0||(this._items.splice(t,1),this.element.childNodes[t].remove())},e.prototype.selectItem=function(t){var e=this._items.indexOf(t);this.selectItemAtIndex(e)},e.prototype.selectItemAtIndex=function(t){this._selectedIndex>=0&&this.element.children[this._selectedIndex].classList.remove("selected"),t>=0&&this.element.children[t].classList.add("selected"),this._selectedIndex=t},e.prototype.getSelectedItem=function(){return this._selectedIndex>=0?this._items[this._selectedIndex]:null},e.prototype.getItemAtIndex=function(t){return t>=0&&t<this._items.length?this._items[t]:null},e.prototype.getSelectedIndex=function(){return this._selectedIndex},e}(k),K=function(t){function e(e,n,o){return n=n||function(t){return""+t},t.call(this,e,(function(t){var e=document.createElement("div");return e.textContent=n(t),e}),o)||this}return U(e,t),e}($),X=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),q=function(){function t(t,e,n,o){this.name=t,this.isReadOnly=e,this.fromString=n,this.toString=o}return t.prototype.compare=function(t,e){return 0},t}(),Q=function(t){function e(e,n){return t.call(this,e,n,(function(t){return t}),(function(t){return t}))||this}return X(e,t),e.prototype.compare=function(t,e){return(null==t?void 0:t.toLowerCase())>(null==e?void 0:e.toLowerCase())?1:(null==e?void 0:e.toLowerCase())>(null==t?void 0:t.toLowerCase())?-1:0},e}(q),Z=function(t){function e(e,n){return t.call(this,e,n,(function(t){return parseInt(t)}),(function(t){return""+t}))||this}return X(e,t),e.prototype.compare=function(t,e){return t>e?1:e>t?-1:0},e}(q),tt=function(t){function e(e,n){return t.call(this,e,n,(function(t){return parseFloat(t)}),(function(t){return""+t}))||this}return X(e,t),e.prototype.compare=function(t,e){return t>e?1:e>t?-1:0},e}(q),et=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.element.classList.add("ListView"),r._columns=[],r._rows=[],r._htmlRows=[],r._cellValueChangedCallback=o,r._editValidationCallback=n,r._cellDoubleClickCallback=i,r._headerRow=document.createElement("div"),r._headerRow.className="header",r.element.appendChild(r._headerRow),e.forEach((function(t){r.addColumn(t)})),r}return X(e,t),e.fromStringColumns=function(t,n,o,i,r){return new e(t.map((function(t){return new Q(t,n)})),o,i,r)},e.prototype.addStringColumn=function(t,e,n,o){return this.addColumn(new Q(t,!!e),n,o)},e.prototype.addColumn=function(t,e,n){if(!(t instanceof q)){var o={name:"Argument Error",level:"Error",message:"The argument 'column' must contain an instance of ListViewColumn, got "+typeof t,toString:function(){return this.name+": "+this.message}};throw console.error(o),o}null==n&&(n=this._columns.length);var i=document.createElement("span");if(i.textContent=t.name,i.className="cell",n<0||n>=this._headerRow.children.length)this._headerRow.appendChild(i),this._columns.push(t);else{var r=this._headerRow.children.item(n);this._headerRow.insertBefore(i,r),this._columns.splice(n,0,t)}if(this.setColumnReadonly(t),e||(e=[]),e.length>this._rows.length)throw o={name:"Argument Error",level:"Error",message:"The argument 'columnValues' must not be longer than the total amount of rows ("+e.length+" elements were given for "+this._rows.length+")",toString:function(){return this.name+": "+this.message}},console.error(o),o;for(var l=0;l<this._rows.length;l++){var s=this._rows[l],a=this._htmlRows[l],c="";l<e.length&&(c=e[l]),s.splice(n,0,c),this._addCellToRow(s,a,n,c)}},e.prototype.removeColumn=function(t){this._columns.splice(t,1),this._headerRow.removeChild(this._headerRow.children[t]);for(var e=0;e<this._rows.length;e++)this._rows[e].splice(t,1),this._htmlRows[e].removeChild(this._htmlRows[e].children[t])},e.prototype.setColumnAtIndexReadonly=function(t,e){var n=this._columns[t];this.setColumnReadonly(n,e)},e.prototype.setColumnReadonly=function(t,e){var n=this,o=this._columns.indexOf(t);e=void 0!==e&&e,t.isReadOnly=e;var i=0;this._htmlRows.forEach((function(e){var r=Array.from(e.querySelectorAll(".cell"));o<r.length&&n._makeEditable(!t.isReadOnly,r[o],o,n._rows[i],t),i++}))},e.prototype.removeRow=function(t){this._rows.splice(t,1);var e=this.element.getElementsByClassName("row")[t];this.element.removeChild(e),this._htmlRows.splice(t,1)},e.prototype.clear=function(){this._rows=[],this._htmlRows=[];for(var t=0,e=Array.from(this.element.getElementsByClassName("row"));t<e.length;t++){var n=e[t];this.element.removeChild(n)}},e.prototype.sortByColumn=function(t){var e=this,n=this._columns[t],o=this._rows;o.sort((function(e,o){return n.compare(e[t],o[t])})),this.clear(),o.forEach((function(t){e.addRow(t)}))},e.prototype._makeEditable=function(t,e,n,o,i){var r=this;t?e.ondblclick=function(t){var l=e.textContent,s=e.textContent;e.textContent="",e.classList.add("editing");var a=document.createElement("input");a.type="text",a.value=s;var c=!1,d=function(t){var c=a.value;!t||r._editValidationCallback&&!r._editValidationCallback(l,c,o,i,r._rows.indexOf(o),n)?e.textContent=s:(e.removeChild(a),e.textContent=c,e.classList.remove("editing"),o[n]=i.fromString(c),r._cellValueChangedCallback&&r._cellValueChangedCallback(l,c,o,i,r._rows.indexOf(o),n)),e.classList.remove("editing"),e.contains(a)&&e.removeChild(a)};a.onblur=function(t){c||(c=!0,d(!0))},a.onkeyup=function(t){if("Escape"==t.key){if(c)return;c=!0,d(!1)}else if("Enter"==t.key){if(c)return;c=!0,d(!0)}},e.appendChild(a),a.selectionStart=a.selectionEnd=a.value.length,a.focus()}:this._cellDoubleClickCallback?e.ondblclick=function(t){return r._cellDoubleClickCallback(o,i,r._rows.indexOf(o),n)}:e.ondblclick=null},e.prototype._addCellToRow=function(t,e,n,o){var i=document.createElement("span"),r=this._columns[n];return i.textContent=r.toString(o),i.className="cell",this._makeEditable(!this._columns[n].isReadOnly,i,n,t,r),n>=e.children.length?e.appendChild(i):e.insertBefore(i,e.children.item(n)),i},e.prototype.addRow=function(t){var e=this,n=document.createElement("div");if(n.className="row",this.element.appendChild(n),t.length!=this._columns.length){var o={name:"Argument Error",level:"Error",message:"The argument 'row' must contain "+this._columns.length+" entries, but "+t.length+" were provided",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}var i=0;t.forEach((function(o){e._addCellToRow(t,n,i,o),i++})),this._rows.push(t),this._htmlRows.push(n),n.onclick=function(t){e.deselectRows(),n.classList.add("selected")},n.oncontextmenu=n.onclick,this.element.appendChild(n)},e.prototype.deselectRows=function(){for(var t=0;t<this._htmlRows.length;t++)this._htmlRows[t].classList.remove("selected")},e.prototype.selectRow=function(t){for(var e=0;e<this._htmlRows.length;e++)e==t?this._htmlRows[e].classList.add("selected"):this._htmlRows[e].classList.remove("selected")},e.prototype.getSelectedRowIndex=function(){for(var t=0;t<this._htmlRows.length;t++)if(this._htmlRows[t].classList.contains("selected"))return t;return-1},e.prototype.getSelectedRow=function(){var t=this.getSelectedRowIndex();return t>=0?this.getRow(t):null},e.prototype.getColumnCount=function(){return this._columns.length},e.prototype.getRowCount=function(){return this._rows.length},e.prototype.getColumns=function(){return this._columns},e.prototype.changeCellValue=function(t,e,n){Array.from(this._htmlRows[t].querySelectorAll(".cell"))[e].textContent=n,this._rows[t][e]=this._columns[e].fromString(n)},e.prototype.getRow=function(t){return this._rows[t]},e.prototype.getRows=function(){return this._rows},e.prototype.getColumn=function(t){return this._columns[t]},e.prototype.renameColumn=function(t,e){this.getColumn(t).name=e,this._headerRow.children[t].textContent=e},e.prototype.getColumnValues=function(t){return this._rows.map((function(e){return e[t]}))},e.prototype.setCellContent=function(t,e,n){var o=this._rows[t][e],i=this._rows[t],r=this._columns[e];i[e]=r.fromString(n),this._htmlRows[t].children[e].textContent=n,this._cellValueChangedCallback&&this._cellValueChangedCallback(o,n,i,r,t,e)},e.prototype.getCellContent=function(t,e){return this._rows[t][e]},e}(k),nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ot=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("TreeView"),n.items=[],n.clickHandler=e,n._focusedItem=null,n}return nt(e,t),e.prototype.addItem=function(t,e,n,o,i){var r=new it(t,e,n,o,i);return r.parentWidget=this,this.items.push(r),this.element.appendChild(r.element),r},e.prototype.removeItem=function(t){var e=this.items.indexOf(t);e>=0&&(this.items.splice(e,1),this.element.removeChild(t.element),t.parentWidget=null,this._focusedItem==t&&(this._focusedItem=null))},e.prototype.clear=function(){for(this.items=[],this.items.forEach((function(t){return t.parentWidget=null}));this.element.firstChild;)this.element.removeChild(this.element.firstChild)},e.prototype.getItems=function(){return this.items},e.prototype.deselectAll=function(){this.items.forEach((function(t){return t.deselect()}))},e.prototype.getSelectedItem=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t]._getIfSelected();if(null!=e)return e}return null},e.prototype.getFocusedItem=function(){return this._focusedItem},e.prototype._sortFunction=function(t,e){return t.label.toLowerCase()>e.label.toLowerCase()?1:e.label.toLowerCase()>t.label.toLowerCase()?-1:0},e.prototype.sortItems=function(){var t=this,e=this.items.splice(0);for(e.sort(this._sortFunction),this.items=[];this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.forEach((function(e){e.children.length>0&&e.sortChildren(),t.items.push(e),t.element.appendChild(e.element)}))},e}(k),it=function(t){function e(e,n,o,i,r){var l=t.call(this)||this;return l.element.classList.add("TreeViewItem"),l.children=[],l.label=e,l.expander=document.createElement("span"),l.expander.textContent="›",l.expander.classList.add("expander"),l.element.appendChild(l.expander),l.labelElement=document.createElement("span"),l.labelElement.textContent=e,l.labelElement.className="label",l.element.appendChild(l.labelElement),l.childrenElement=document.createElement("div"),l.childrenElement.classList.add("children"),l.element.appendChild(l.childrenElement),l.contextMenu=r,l.parentItem=null,l.data=n,l.labelElement.draggable=!0,l.labelElement.ondblclick=function(t){i?i(t,l):l.children.length>0&&l.element.classList.toggle("expanded"),t.stopPropagation()},l.expander.onclick=function(t){l.children.length>0&&l.element.classList.toggle("expanded"),t.stopPropagation()},l.labelElement.oncontextmenu=r?function(t){l.setFocus(!0),r.show(t.clientX,t.clientY),t.stopPropagation(),t.preventDefault()}:function(t){l.setFocus(!0),t.stopPropagation()},l.labelElement.onclick=function(t){var e=l.parentWidget.getSelectedItem();l.select(),o&&o(t,l,e),l.parentWidget.clickHandler&&l.parentWidget.clickHandler(t,l,e)},l}return nt(e,t),e.prototype.addChildItem=function(t){return t.parentItem=this,this.children.push(t),this.childrenElement.firstChild?this.childrenElement.insertBefore(t.element,this.childrenElement.firstChild):this.childrenElement.appendChild(t.element),this.element.classList.add("expanded"),this.element.classList.add("expandable"),t.parentWidget=this.parentWidget,t},e.prototype.addChild=function(t,n,o,i,r){var l=new e(t,n,o,i,r);return this.addChildItem(l)},e.prototype.removeChild=function(t){var e=this.children.indexOf(t);e>=0&&(t.setFocus(!1),this.childrenElement.removeChild(t.element),this.children.splice(e,1),t.parentWidget=null,t.parentItem=null,0==this.children.length&&(this.element.classList.remove("expanded"),this.element.classList.remove("expandable")))},e.prototype.sortChildren=function(){var t=this,e=this.children.splice(0);for(e.sort(this.parentWidget._sortFunction),this.children=[];this.childrenElement.firstChild;)this.childrenElement.removeChild(this.childrenElement.firstChild);e.forEach((function(e){e.children.length>0&&e.sortChildren(),t.children.push(e),t.childrenElement.appendChild(e.element)}))},e.prototype.deselect=function(){this.labelElement.classList.remove("selected"),this.children.forEach((function(t){t.deselect()}))},e.prototype.select=function(){this.parentWidget.deselectAll(),this.labelElement.classList.add("selected")},e.prototype.setFocus=function(t){t?(this.parentWidget._focusedItem&&this.parentWidget._focusedItem.setFocus(!1),this.parentWidget._focusedItem=this,this.element.classList.add("focused")):(this.element.classList.remove("focused"),this.contextMenu&&this.contextMenu.hide(),this.parentWidget&&this.parentWidget._focusedItem==this&&(this.parentWidget._focusedItem=null))},e.prototype._getIfSelected=function(){if(this.labelElement.classList.contains("selected"))return this;for(var t=0;t<this.children.length;t++){var e=this.children[t]._getIfSelected();if(null!=e)return e}return null},e}(k),rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lt=function(t,e){this.name=t,this.element=e},st=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.menu=o,i}return rt(e,t),e}(lt),at=function(t){function e(e){return t.call(this,"-",e)||this}return rt(e,t),e}(lt),ct=function(t){function e(e,n,o,i){var r=t.call(this,e,n)||this;return r.clickCallback=o,r.canExecuteCallback=i,r}return rt(e,t),e}(lt),dt=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("Menu"),n.name=e,n.element.textContent=e,n._submenus=[],n._menuEntries=[],n.menuEntryPanel=document.createElement("div"),n.menuEntryPanel.className="MenuContent",n._x=-1,n._y=-1,n.element.onmouseenter=function(){var t=n.getParentMenuBar();t&&null!=t.activeMenu&&(t.activeMenu.hide(),n.show())},n.element.onclick=function(){if(n.isShown())n.hide();else{var t=n.getParentMenuBar();t&&t.hideMenus(),n.show()}},document.addEventListener("click",(function(t){var e=null;t.target instanceof HTMLElement&&(e=t.target);var o=n.getParentMenu();n.menuEntryPanel.contains(e)||n.element.contains(e)||null!=o&&o.menuEntryPanel.contains(e)||!n.isShown()||n.hide()})),n}return rt(e,t),e.prototype.getParentMenuBar=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("MenuBar")?this.parentWidget:null},e.prototype.getParentMenu=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("Menu")?this.parentWidget:null},e.prototype.isShown=function(){return this.menuEntryPanel.isConnected&&null!=this.menuEntryPanel.style.display&&""!=this.menuEntryPanel.style.display&&"none"!=this.menuEntryPanel.style.display},e.prototype.getPos=function(){var t=this.getParentMenu();if(t)return t.getPos();if(this.isShown()){var e=this.menuEntryPanel.getBoundingClientRect();return new _(e.left,e.top)}return new _(this._x,this._y)},e.prototype.show=function(t,e){for(var n=0;n<this.menuEntryPanel.children.length;n++)this._menuEntries[n]instanceof ct&&(this._menuEntries[n].canExecuteCallback()?this.menuEntryPanel.children[n].classList.remove("disabled"):this.menuEntryPanel.children[n].classList.add("disabled"));if(null!=t&&null!=e)this.element.parentNode||document.body.appendChild(this.menuEntryPanel),this.menuEntryPanel.style.left=t+"px",this.menuEntryPanel.style.top=e+"px",this.menuEntryPanel.style.display="inline-block",this.menuEntryPanel.style.position="fixed";else{this.menuEntryPanel.style.left=this.element.getBoundingClientRect().left+"px",this.menuEntryPanel.style.display="inline-block";var o=this.getParentMenuBar();o&&(o.activeMenu=this)}var i=this.menuEntryPanel.getBoundingClientRect();this._x=i.left,this._y=i.top},e.prototype.hide=function(){this._submenus.forEach((function(t){return t.hide()}));var t=this.getParentMenuBar();t&&t.activeMenu==this&&(t.activeMenu=null),this.menuEntryPanel.parentElement==document.body?document.body.removeChild(this.menuEntryPanel):this.menuEntryPanel.style.display="none"},e.prototype.addEntry=function(t,e,n){var o=this,i=document.createElement("div");n=n||function(){return!0},i.className="entry",i.textContent=t,i.onclick=function(){o.hide(),e()},this.menuEntryPanel.appendChild(i),this._menuEntries.push(new ct(t,i,e,n))},e.prototype.addSubMenu=function(t){var e=this;this._submenus.push(t);var n=document.createElement("div");n.className="entry submenu",n.textContent=t.name,n.onclick=function(){var o=n.getBoundingClientRect();e._submenus.forEach((function(t){return t.hide()})),t.show(Math.floor(o.left+o.width),o.y)},t.parentWidget=this,this.menuEntryPanel.appendChild(n),this._menuEntries.push(new st(t.name,n,t))},e.prototype.addSeparator=function(){var t=document.createElement("div");t.className="separator",this.menuEntryPanel.appendChild(t),this._menuEntries.push(new at(t))},e.prototype.clearEntries=function(){for(this._submenus.forEach((function(t){t.parentWidget=null})),this._submenus=[];this.menuEntryPanel.firstChild;)this.menuEntryPanel.removeChild(this.menuEntryPanel.firstChild)},e}(k),ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ht=function(t){function e(){var e=t.call(this)||this;return e.element.classList.add("MenuBar"),e.menus=[],e.activeMenu=null,e}return ut(e,t),e.prototype.addMenu=function(t){if(!(t instanceof dt)){var e={name:"Argument Error",level:"Error",message:"The argument 'menu' must be of type Menu",toString:function(){return this.name+": "+this.message}};throw console.error(e),e}this.menus.push(t),this.element.appendChild(t.element),this.element.appendChild(t.menuEntryPanel),t.parentWidget=this},e.prototype.hideMenus=function(){this.activeMenu=null,this.menus.forEach((function(t){t.hide()}))},e}(k),At=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pt=function(t){function e(e){var n=t.call(this)||this;return n.element.classList.add("Label"),n.element.textContent=e,n}return At(e,t),e.prototype.setText=function(t){this.element.textContent=t},e.prototype.getText=function(){return this.element.textContent},e}(k),mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gt=function(t){function e(e,n,o){var i=t.call(this,document.createElement("img"))||this;return i.element.classList.add("Image"),i.element.src=e,null!=n&&(i.element.style.width=n+"px"),null!=o&&(i.element.style.height=o+"px"),i}return mt(e,t),e.prototype.setSource=function(t){this.element.src=t},e.prototype.getSource=function(){return this.element.src},e}(k),ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t[t.Left=1]="Left",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom",t[t.Inside=5]="Inside",t[t.Float=6]="Float"}(M||(M={})),function(t){t[t.Horizontal=1]="Horizontal",t[t.Vertical=2]="Vertical"}(R||(R={}));var Ct=function(t){return t==M.Top||t==M.Bottom?R.Vertical:R.Horizontal},_t=function(){function t(){}return t.fromDockPanel=function(e){var n=new t;return n.dockPercentage=e._dockPercentage,n.identifier=e.identifier,n},t.fromDockContainer=function(e){var n=new t;return n.orientation=e.orientation,n.dockPercentage=e._dockPercentage,n.children=e.children.map((function(e){return e instanceof kt?t.fromDockContainer(e):t.fromDockPanel(e)})),n},t}(),yt=[],vt=[],bt=function(t){function e(e,n,o){var i=t.call(this)||this;return i.element.classList.add("DockSeparator"),i.element.addEventListener("mousedown",I(i)),i.prev=e,i.next=n,i.parentWidget=o,i}return ft(e,t),e.prototype.onDragStart=function(t){return!0},e.prototype.onDragging=function(t){var e=this.parentWidget.orientation,n=e==R.Horizontal?t.mouseEvent.movementX:t.mouseEvent.movementY,o=e==R.Horizontal?this.prev.element.getBoundingClientRect().width:this.prev.element.getBoundingClientRect().height,i=e==R.Horizontal?this.next.element.getBoundingClientRect().width:this.next.element.getBoundingClientRect().height,r=o+n,l=i-n;r<80||l<80||(this.prev._dockPercentage*=r/o,this.next._dockPercentage*=l/i,this.parentWidget._layoutChildren())},e.prototype.onDragEnd=function(t){},e}(k),wt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._dockPercentage=-1,e.separatorBefore=null,e.separatorAfter=null,e}return ft(e,t),e}(k),kt=function(t){function e(){var e=t.call(this)||this;return e.element.className="DockContainer",e._setOrientation(R.Horizontal),e.children=[],e}return ft(e,t),e.prototype.onAttached=function(){this.isAttached()&&yt.push(this),this.children.forEach((function(t){t.onAttached()}))},e.prototype.getFloatingPanels=function(){return vt.map((function(t){return{identifier:t.identifier,width:parseInt(t.element.style.width),height:parseInt(t.element.style.height),x:parseInt(t.element.style.left),y:parseInt(t.element.style.top)}}))},e.prototype.getDockPanelAtPoint=function(t,n){if(!y(this.element.getBoundingClientRect(),t,n))return null;for(var o=0,i=this.children;o<i.length;o++){var r=i[o];if(r instanceof xt&&y(r.element.getBoundingClientRect(),t,n))return r;if(r instanceof e){var l=r.getDockPanelAtPoint(t,n);if(null!=l)return l}}return null},e.prototype.getDockingStructure=function(){return _t.fromDockContainer(this)},e.prototype.setChildPercentages=function(t){if(t.length!=this.children.length)throw"This container has "+this.children.length+" child elements, but "+t.length+" percentages were given!";for(var e=0;e<t.length;e++)this.children[e]._dockPercentage=t[e];this._layoutChildren()},e.prototype._dockRelative=function(t,e,n,o){if(o=o||.5,!(t instanceof wt)){var i={name:"Argument Error",level:"Error",message:"The argument 'child' must be a Dockable object",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}if(!(e instanceof wt))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a Dockable object",toString:function(){return this.name+": "+this.message}},console.error(i),i;var r=this.children.indexOf(e),l=n?t:e,s=n?e:t,a=new bt(l,s,this);if(s.separatorBefore=a,l.separatorAfter=a,t._dockPercentage=e._dockPercentage*o,e._dockPercentage=e._dockPercentage*(1-o),!(r>=0))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a child of a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(i),i;if(n)this.children.splice(r,0,t),this.element.insertBefore(t.element,e.element),this.element.insertBefore(a.element,e.element);else{this.children.splice(r+1,0,t);var c=e.element.nextSibling;c?(this.element.insertBefore(a.element,c),this.element.insertBefore(t.element,c)):(this.element.appendChild(a.element),this.element.appendChild(t.element))}t.parentWidget=this,t.element.classList.remove("floating"),t.onAttached(),this.onResize()},e.prototype._dock=function(t,e,n){if(n=n||(this.children.length>0?.5:1),e){if(this.children.length>0){var o=this.children[0],i=new bt(t,o,this);o.separatorBefore=i,t.separatorAfter=i,this.element.prepend(i.element)}t._dockPercentage=n,this.children.forEach((function(t){t._dockPercentage*=1-n})),this.children.unshift(t),this.element.prepend(t.element)}else this.children.length>0&&(o=this.children[this.children.length-1],i=new bt(o,t,this),o.separatorAfter=i,t.separatorBefore=i,this.element.appendChild(i.element)),t._dockPercentage=n,this.children.forEach((function(t){t._dockPercentage*=1-n})),this.children.push(t),this.element.appendChild(t.element);t.parentWidget=this,t.element.classList.remove("floating"),t.onAttached(),this.onResize()},e.prototype._setOrientation=function(t){this.orientation==R.Horizontal?this.element.classList.remove("horizontal"):this.element.classList.remove("vertical"),t==R.Horizontal?this.element.classList.add("horizontal"):this.element.classList.add("vertical"),this.orientation=t},e.prototype._wrapChildren=function(){var t=this,n=new e;n._setOrientation(this.orientation);var o=this.children.map((function(t){return t._dockPercentage}));o[0]=1;var i=this.children.slice(),r=0;i.forEach((function(e){t.undock(e),n.dock(e,n.orientation==R.Horizontal?M.Right:M.Bottom,o[r]),r++})),this._setOrientation(this.orientation==R.Horizontal?R.Vertical:R.Horizontal),this.children=[],this.dock(n,this.orientation==R.Horizontal?M.Left:M.Top)},e.prototype._subdivide=function(t,n){var o=new e;o._setOrientation(Ct(n));var i=this.children.indexOf(t);if(i<0){var r={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be inside this DockContainer",toString:function(){return this.name+": "+this.message}};throw console.error(r),r}return o._dockPercentage=t._dockPercentage,t._dockPercentage=1,t.separatorBefore&&(t.separatorBefore.next=o,t.separatorBefore=null),t.separatorAfter&&(t.separatorAfter.prev=o,t.separatorAfter=null),this.children.splice(i,1,o),this.element.insertBefore(o.element,t.element),this.element.removeChild(t.element),o.parentWidget=this,o.dock(t,n),o},e.prototype.dockRelativeTo=function(t,e,n,o){null!=o&&null!=o||(o=.5);var i=Ct(n),r=this;if(this.orientation!=i&&(r=this._subdivide(e,n)),n==M.Inside)console.warn("Tabbed docks are not implemented yet!");else if(n==M.Float){var l={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(l),l}return r._dockRelative(t,e,n==M.Left||n==M.Top,o),this._layoutChildren(),t},e.prototype.dock=function(t,e,n){var o=Ct(e);if(this.children.length<=1&&this._setOrientation(o),this.orientation!=o&&this._wrapChildren(),e==M.Inside)console.warn("Tabbed docks are not implemented yet!");else if(e==M.Float){var i={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}return this._dock(t,e==M.Left||e==M.Top,n),this._layoutChildren(),t},e.prototype.undock=function(t){var n=this.children.indexOf(t);if(n<0){var o={name:"Argument Error",level:"Error",message:"The argument 'child' must be inside a DockContainer in order to be undocked.",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}n>0?this.children[n-1]._dockPercentage+=t._dockPercentage:n+1<this.children.length&&(this.children[n+1]._dockPercentage+=t._dockPercentage),this.children.splice(n,1);var i=t.element.previousElementSibling,r=t.element.nextElementSibling;if(null!=i&&i.classList.contains("DockSeparator")?(this.element.removeChild(i),t.separatorBefore&&(t.separatorBefore.prev.separatorAfter=null)):null!=r&&r.classList.contains("DockSeparator")&&(this.element.removeChild(r),t.separatorAfter&&(t.separatorAfter.next.separatorBefore=null)),this.element.removeChild(t.element),null!=this.parentWidget&&this.parentWidget instanceof e&&0==this.children.length){this.parentWidget.undock(this);var l=yt.indexOf(this);l>=0&&yt.splice(l,1)}else this._layoutChildren();return t.parentWidget=null,t instanceof xt&&(t.element.classList.add("floating"),vt.indexOf(t)<0&&vt.push(t)),t},e.prototype._layoutChildren=function(t,n){var o=this.element.getBoundingClientRect(),i=0,r=0;null==t&&(t=o.width),null==n&&(n=o.height);var l=Array.from(this.element.children).filter((function(t){return t.classList.contains("DockSeparator")&&t instanceof HTMLElement})),s=0;0!=t&&0!=t&&(this.orientation==R.Horizontal?this.children.forEach((function(o){var a=Math.round((t-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=a+"px",o.element.style.height=n+"px",o instanceof e&&o._layoutChildren(a,n),s<l.length&&(l[s].style.left=i+a+"px",l[s].style.top=r+"px"),i+=a+3,s++,o.onResize()})):this.children.forEach((function(o){var a=Math.round((n-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=t+"px",o.element.style.height=a+"px",o instanceof e&&o._layoutChildren(t,a),s<l.length&&(l[s].style.left=i+"px",l[s].style.top=r+a+"px"),r+=a+3,s++,o.onResize()})))},e}(wt),xt=function(t){function e(e,n,o){var i=t.call(this)||this;if(i.element.className="DockPanel",o=void 0===o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=e,i.titleElement.className="title",i.contentWidget=n,i.contentWidget.element.classList.add("content"),i.element.appendChild(i.titleElement),i.element.appendChild(i.contentWidget.element),i.titleElement.addEventListener("mousedown",I(i)),i._dragged=!1,i._dockOverlay=null,i._dockTarget=null,i._dockTargetDirection=M.Float,o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(t){i.close()}}return i.resizeEW=document.createElement("div"),i.resizeNS=document.createElement("div"),i.resizeDiag=document.createElement("div"),i.resizeEW.className="resizeEW",i.resizeNS.className="resizeNS",i.resizeDiag.className="resizeDiag",i.element.appendChild(i.resizeEW),i.element.appendChild(i.resizeNS),i.element.appendChild(i.resizeDiag),i._resizingHorizontally=!1,i._resizingVertically=!1,i.resizeEW.addEventListener("mousedown",I(i,(function(t,e){return i.onResizeStart(e,!0,!1)}))),i.resizeNS.addEventListener("mousedown",I(i,(function(t,e){return i.onResizeStart(e,!1,!0)}))),i.resizeDiag.addEventListener("mousedown",I(i,(function(t,e){return i.onResizeStart(e,!0,!0)}))),i}return ft(e,t),e.prototype.onResize=function(){t.prototype.onResize.call(this),this.contentWidget.onResize()},e.prototype.onAttached=function(){if(this.isAttached()){var t=vt.indexOf(this);this.isFloating()?t<0&&vt.push(this):t>=0&&vt.splice(t,1),this.contentWidget.onAttached()}},e.prototype.getTitle=function(){return this.titleElement.textContent},e.prototype.setTitle=function(t){this.titleElement.textContent=t},e.prototype.setContent=function(t){this.contentWidget.element.classList.remove("content"),this.element.removeChild(this.contentWidget.element),this.contentWidget=t,this.contentWidget.element.classList.add("content"),this.element.appendChild(this.contentWidget.element),t.onAttached()},e.prototype.isFloating=function(){return this.element.classList.contains("floating")},e.prototype.close=function(){if(this.parentWidget instanceof kt)this.parentWidget.undock(this);else{this.element.parentElement.removeChild(this.element);var t=vt.indexOf(this);t>=0&&vt.splice(t,1)}},e.prototype.createDragOverlay=function(){this._dockOverlay=document.createElement("div"),this._dockOverlay.className="dockOverlay",document.body.appendChild(this._dockOverlay)},e.prototype.onResizeStart=function(t,e,n){return!!this.isFloating()&&(e&&this.element.classList.add("resizingHorizontally"),n&&this.element.classList.add("resizingVertically"),this._resizingHorizontally=e,this._resizingVertically=n,!0)},e.prototype.onResizing=function(t){this.isFloating()&&(this._resizingHorizontally&&(this.element.style.width=t.posRelativeToElement.x+"px"),this._resizingVertically&&(this.element.style.height=t.posRelativeToElement.y+"px"),this.onResize())},e.prototype.onDragStart=function(e){return!e.target.classList.contains("closeButton")&&t.prototype.onDragStart.call(this,e)},e.prototype.onDragging=function(e){if(this._resizingHorizontally||this._resizingVertically)return this.onResizing(e);if(!this._dragged&&(Math.abs(e.posRelativeToDragStart.x)>10||Math.abs(e.posRelativeToDragStart.y)>10)&&(this._dragged=!0,this.parentWidget instanceof kt&&(this.parentWidget.undock(this),document.body.appendChild(this.element)),this.createDragOverlay()),this._dragged)if(t.prototype.onDragging.call(this,e),this._dockTarget=function(t,e){for(var n=0,o=yt;n<o.length;n++){var i=o[n];if(i.isAttached()){var r=i.getDockPanelAtPoint(t,e);if(null!=r)return r}}return null}(e.mouseEvent.clientX,e.mouseEvent.clientY),this._dockTarget){var n=this._dockTarget.element.getBoundingClientRect();e.mouseEvent.clientX<n.x+.05*n.width?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=M.Left):e.mouseEvent.clientX>n.x+.95*n.width?(this._dockOverlay.style.left=n.x+.5*n.width+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=M.Right):e.mouseEvent.clientY<n.y+.05*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=M.Top):e.mouseEvent.clientY>n.y+.95*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+.5*n.height+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=M.Bottom):(this._dockTargetDirection=M.Float,this._dockOverlay.style.width="0px")}else this._dockTargetDirection=M.Float,this._dockOverlay.style.width="0px"},e.prototype.onDragEnd=function(e){this._dragged&&(this._dragged=!1,null!=this._dockOverlay&&(document.body.removeChild(this._dockOverlay),this._dockOverlay=null),null!=this._dockTarget&&this._dockTargetDirection!=M.Float&&this.dockRelativeTo(this._dockTarget,this._dockTargetDirection)),this._resizingHorizontally=!1,this._resizingVertically=!1,this.element.classList.remove("resizingHorizontally"),this.element.classList.remove("resizingVertically"),t.prototype.onDragEnd.call(this,e)},e.prototype.float=function(t,e,n,o){null!=this.parentWidget&&this.parentWidget instanceof kt&&this.parentWidget.undock(this),t=t||10,e=e||10,n=n||400,o=o||300,this.element.classList.add("floating"),this.element.style.left=t+"px",this.element.style.top=e+"px",this.element.style.width=n+"px",this.element.style.height=o+"px",document.body.appendChild(this.element),this.onAttached(),this.onResize(),vt.indexOf(this)<0&&vt.push(this)},e.prototype.dockRelativeTo=function(t,e,n){if(null!=n&&null!=n||(n=.5),!(t instanceof k)){var o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be a Widget object",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}if(!(t.parentWidget instanceof kt))throw o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be inside a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(o),o;t.parentWidget.dockRelativeTo(this,t,e,n)},e}(wt);window.addEventListener("resize",(function(){yt.forEach((function(t){t.parentWidget instanceof kt||t._layoutChildren()}))}));var Et,It=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Bt=function(t,e,n,o){this.label=t,this.callback=e,this.isContinue=n,this.isCancel=o},Pt=function(t){function e(e,n,o,i){var r=this,l=new k,s=l.element;r=t.call(this,e,l,i)||this;var a=document.createElement("div");a.textContent=n,a.className="text";var c=document.createElement("div");return c.className="buttons",r._cancelOption=null,r._continueOption=null,o.forEach((function(t){var e=document.createElement("button");e.textContent=t.label,t.isCancel&&(r._cancelOption=e),t.isContinue&&(r._continueOption=e),e.onclick=function(e){r.hide(),t.callback&&t.callback(r)},c.appendChild(e)})),s.appendChild(a),s.appendChild(c),r._boundKeyEvent=null,r}return It(e,t),e.prototype.showModal=function(){var e=this;t.prototype.showModal.call(this),this._boundKeyEvent=function(t){"Escape"==t.key&&e._cancelOption?e._clickButton(e._cancelOption):"Enter"==t.key&&e._continueOption&&e._clickButton(e._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},e.prototype._clickButton=function(t){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});t.dispatchEvent(e)},e.prototype.hide=function(){t.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},e}(L),Dt=function(t){function e(e,n,o,i){return t.call(this,e,n,[new Bt("OK",i,!0,!0)],o)||this}return It(e,t),e}(Pt),Ot=function(t){function e(e,n,o,i,r){var l=this,s=new k,a=s.element;l=t.call(this,e,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l.inputElement=document.createElement("input"),l.inputElement.value=o,l.inputElement.type="text";var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(t){var e=document.createElement("button");e.textContent=t.label,t.isCancel&&(l._cancelOption=e),t.isContinue&&(l._continueOption=e),e.onclick=function(e){l.hide(),t.callback&&t.callback(l)},d.appendChild(e)})),a.appendChild(c),a.appendChild(l.inputElement),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("InputDialog"),l._boundKeyEvent=null,l}return It(e,t),e.prototype.getValue=function(){return this.inputElement.value},e.prototype.showModal=function(){var e=this;t.prototype.showModal.call(this),this.inputElement.focus(),this.inputElement.select(),this._boundKeyEvent=function(t){"Escape"==t.key&&e._cancelOption?e._clickButton(e._cancelOption):"Enter"==t.key&&e._continueOption&&e._clickButton(e._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},e.prototype._clickButton=function(t){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});t.dispatchEvent(e)},e.prototype.hide=function(){t.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},e}(L);!function(t){t[t.ModifyData=1]="ModifyData",t[t.ModifyView=2]="ModifyView"}(Et||(Et={}));var St,Mt=function(){function t(t){this._history=[],this._currentIndex=-1,this._idCounter=-1,this._onChangedCallback=t||function(t,e){}}return t.prototype.add=function(t){this._currentIndex++;var e=this._history.length-this._currentIndex;this._history.splice(this._currentIndex,e,t),t.id=++this._idCounter,this._onChangedCallback(this._history.slice(),this._currentIndex)},t.prototype.undo=function(){if(this.canUndo()){var t=this._history[this._currentIndex];this._currentIndex--,t.undo(),this._onChangedCallback(this._history.slice(),this._currentIndex)}},t.prototype.redo=function(){this.canRedo()&&(this._currentIndex++,this._history[this._currentIndex].do(),this._onChangedCallback(this._history.slice(),this._currentIndex))},t.prototype.canUndo=function(){return this._currentIndex>=0},t.prototype.canRedo=function(){return this._currentIndex<this._history.length-1},t.prototype.wasDataModifiedSinceVersion=function(t){if(this._currentIndex<0||this._history[this._currentIndex].id==t)return!1;for(var e=this._history.findIndex((function(e){return e.id==t})),n=e<this._currentIndex?-1:1,o=this._currentIndex;o!=e;o+=n)if(this._history[o].wasDataModified())return!0;return!1},t.prototype.getCurrentCommand=function(){return this._history[this._currentIndex]},t}(),Rt=function(){function t(t,e,n,o){this.id=-1,this.title=t,this.do=e,this.undo=n,this.category=o||Et.ModifyData}return t.prototype.wasDataModified=function(){return this.category==Et.ModifyData},t}(),Nt=function(){function t(){this._data=null}return t.prototype.set=function(t){this._data=t},t.prototype.clear=function(){this._data=null},t.prototype.get=function(){return this._data},t.prototype.containsData=function(){return null!=this._data},t}(),Lt=function(t,e,n){this.type=t,this.timestamp=e,this.data=n},zt=new Nt,Ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t[t.None=0]="None",t[t.MoveNodes=1]="MoveNodes",t[t.MoveSelectedNodes=2]="MoveSelectedNodes",t[t.Select=3]="Select",t[t.MoveViewport=4]="MoveViewport"}(St||(St={}));var Wt=function(t,e){this.fromOutput=t,this.toInput=e},Tt=function(t,e){this.nodes=t,this.connections=e},Vt=function(t,e,n,o){this.fromNodeIndex=t,this.fromOutputIndex=e,this.toNodeIndex=n,this.toInputIndex=o},jt=function(t,e,n,o){this.title=t,this.inputs=e,this.outputs=n,this.pos=o},Ft=function(){function t(t,e,n){this.x=t,this.y=e,this.zoom=n}return t.prototype.getPixelPos=function(){return this.getPixelPosFromPos(0,0)},t.prototype.getPixelPosFromPos=function(t,e){return new _((t-this.x)*this.zoom,(e-this.y)*this.zoom)},t.prototype.getPosFromPixelPos=function(t,e){return new _(t/this.zoom+this.x,e/this.zoom+this.y)},t}(),Gt=function(t){function e(e,n,o,i,r,l,s,a,c){var d=t.call(this)||this;d.element.classList.add("NodeEditor"),d._undoHistory=c||new Mt,d._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),d._svg.setAttributeNS(null,"width","800"),d._svg.setAttributeNS(null,"height","300");var u=document.createElementNS("http://www.w3.org/2000/svg","defs"),h=document.createElementNS("http://www.w3.org/2000/svg","marker");h.setAttributeNS(null,"style","overflow:visible;"),h.setAttributeNS(null,"refX","0.0"),h.setAttributeNS(null,"refY","0.0"),h.setAttributeNS(null,"orient","auto"),h.setAttributeNS(null,"id","ArrowHead");var A=document.createElementNS("http://www.w3.org/2000/svg","path");A.setAttributeNS(null,"transform","scale(0.7) translate(-8,-5)"),A.setAttributeNS(null,"d","M 0 0 L 5 5 L 0 10 z"),h.appendChild(A),u.appendChild(h),d._svg.appendChild(u),d.element.appendChild(d._svg),d._nodes=[],d._viewport=new Ft(0,0,1),d._scrollSpeedX=r||.4,d._scrollSpeedY=l||.4,d._addArrowHeads=s||void 0===s,d._targetInput=null,d._targetOutput=null,d._targetNode=null,d._defineCtrlShortcuts=a||void 0===a,d._dragStart=new _(-1,1),d._viewportDragStart=new _(-1,-1),d._dragMode=St.None,d._selectRect=document.createElement("div"),d._selectRect.className="selectRect",d.element.appendChild(d._selectRect),d._selectRect.style.display="none",d.contextMenu=new dt("Node Editor"),d.contextMenu.addEntry("Cut",(function(){return d.onCut()}),(function(){return d.getSelectedNodes().length>0})),d.contextMenu.addEntry("Copy",(function(){return d.onCopy()}),(function(){return d.getSelectedNodes().length>0})),d.contextMenu.addEntry("Paste",(function(){return d.onPaste(!0)}),(function(){return d.canPaste()})),d.contextMenu.addEntry("Delete",(function(){return d._removeSelectedNodes()}),(function(){return d.getSelectedNodes().length>0})),d.element.addEventListener("contextmenu",(function(t){return t.preventDefault(),d.contextMenu.show(t.clientX,t.clientY),!1}));var p=I(d);return d.element.addEventListener("mousedown",(function(t){p(t),d._nodes.forEach((function(t){var e=t.getPixelPos();t._dragEditorPixelStartX=e.x,t._dragEditorPixelStartY=e.y}))})),d._draggedConnection=null,d._connectionSettingsBeforeDragging=null,d._selectedNodes=[],d._nodeSelectedCallback=e,d._nodeDeselectedCallback=n,d._nodeAddedCallback=o,d._nodeRemovedCallback=i,d._previouslySelectedNodes=[],d._hasFocus=!1,window.addEventListener("mouseup",(function(t){d._hasFocus=d.element.contains(t.target)})),window.addEventListener("keydown",(function(t){d._hasFocus&&("Delete"==t.key?d._removeSelectedNodes():"0"==t.key&&t.ctrlKey&&d._applyZoom(1),d._defineCtrlShortcuts&&("z"==t.key.toLowerCase()&&t.ctrlKey?t.shiftKey?d._undoHistory.redo():d._undoHistory.undo():"y"==t.key.toLowerCase()&&t.ctrlKey?d._undoHistory.redo():"c"==t.key.toLowerCase()&&t.ctrlKey?d.onCopy():"x"==t.key.toLowerCase()&&t.ctrlKey?d.onCut():"v"==t.key.toLowerCase()&&t.ctrlKey?d.onPaste(!1):"a"==t.key.toLowerCase()&&t.ctrlKey&&(t.shiftKey?d.deselectAllWithUndo():d.selectAllWithUndo(),t.preventDefault())))})),d.element.addEventListener("wheel",(function(t){if(t.preventDefault(),t.ctrlKey){d._hasFocus=!0;var e=d._viewport.zoom-.001*t.deltaY;e=Math.min(Math.max(.125,e),4);var n=d.element.getBoundingClientRect();d._applyZoom(e,t.clientX-n.left,t.clientY-n.top)}else d._viewport.x+=d._scrollSpeedX*t.deltaX,d._viewport.y+=d._scrollSpeedY*t.deltaY,d._nodes.forEach((function(t){t.update()}))})),d}return Ht(e,t),e.prototype.onCopy=function(){this.copy()},e.prototype.onCut=function(){this.cut()},e.prototype.onPaste=function(t){this.paste(t)},e.prototype.canPaste=function(){return zt.containsData()},e.prototype.overridableCopy=function(t){zt.set(new Lt("NodeEditor",new Date,t))},e.prototype.overridablePaste=function(){if(!zt.containsData())return null;var t=zt.get();return"NodeEditor"!=t.type?null:t.data},e.prototype.copy=function(){this.getSelectedNodes().length>0&&this.overridableCopy(this._getNodesCopyData())},e.prototype.cut=function(){this.copy(),this._removeSelectedNodes()},e.prototype.paste=function(t){var e=this.overridablePaste();if(e){var n,o,i=this.element.getBoundingClientRect();if(t){var r=this.contextMenu.getPos();n=r.x-i.left,o=r.y-i.top}else{var l=E;n=l.x-i.left,o=l.y-i.top}this._paste(e,new _(n,o))}},e.prototype.setFocus=function(t){this._hasFocus=t},e.prototype.hasFocus=function(){return this._hasFocus},e.prototype._applyZoom=function(t,e,n){e=e||0,n=n||0;var o=this._viewport.getPosFromPixelPos(e,n);this._viewport.zoom=t;var i=this._viewport.getPosFromPixelPos(e,n);this._viewport.x=this._viewport.x+o.x-i.x,this._viewport.y=this._viewport.y+o.y-i.y,this.element.style.fontSize=t+"em",this._nodes.forEach((function(t){t.update()}))},e.prototype.useArrowHeads=function(t){this._addArrowHeads=t;for(var e=0,n=this._nodes;e<n.length;e++)for(var o=0,i=n[e]._connections;o<i.length;o++)i[o].setUseArrowHead(t)},e.prototype.scrollSpeedX=function(t){this._scrollSpeedX=t},e.prototype.scrollSpeedY=function(t){this._scrollSpeedY=t},e.prototype._addConnection=function(t){this._svg.contains(t._path)||this._svg.appendChild(t._path)},e.prototype._removeConnection=function(t){this._svg.contains(t._path)&&this._svg.removeChild(t._path)},e.prototype._removeSelectedNodes=function(){var t=this,e=this._selectedNodes.splice(0),n=new Rt("Delete Nodes",(function(){e.forEach((function(e){t.removeNode(e)}))}),(function(){t.deselectAll(),e.forEach((function(e){t.addNode(e),e.select()}))}),Et.ModifyData);n.do(),this._undoHistory.add(n)},e.prototype.onAttached=function(){this.isAttached()&&this._nodes.forEach((function(t){t.onAttached()}))},e.prototype.getSelectedNodes=function(){return this._selectedNodes},e.prototype.clear=function(){var t=this;this._nodes.slice().forEach((function(e){return t.removeNode(e)}))},e.prototype._createNodeForPaste=function(t){for(var e=new Ut(t.title),n=0,o=t.inputs;n<o.length;n++){var i=o[n];e.addInput(i.name,i.canConnectCheck)}for(var r=0,l=t.outputs;r<l.length;r++){var s=l[r];e.addOutput(s.name,s.canConnectCheck,s.allowMultipleConnections)}return e},e.prototype._getNodesCopyData=function(){for(var t=this.getSelectedNodes(),e=t.map((function(t){return t._copy()})),n=[],o=0,i=0,r=t;i<r.length;i++){for(var l=r[i],s=0,a=l._connections;s<a.length;s++){var c=a[s];if(c._fromOutput._node==l){var d=t.indexOf(c._toInput._node);if(d>=0){var u=new Vt(o,l._outputs.indexOf(c._fromOutput),d,t[d]._inputs.indexOf(c._toInput));n.push(u)}}}o++}return new Tt(e,n)},e.prototype._paste=function(t,e){for(var n=this,o=t.nodes,i=null,r=null,l=0,s=o;l<s.length;l++){var a=s[l];(null==i||a.pos.x<i)&&(i=a.pos.x),(null==r||a.pos.y<r)&&(r=a.pos.y)}var c=o.map((function(t){var o=n._createNodeForPaste(t);return o.setPixelPos(t.pos.x-i+e.x,t.pos.y-r+e.y),o})),d=this._selectedNodes.slice(0),u=new Rt(o.length>1?"Paste Nodes":"Paste Node",(function(){n.deselectAll();for(var e=0,o=c;e<o.length;e++){var i=o[e];n.addNode(i),i.select()}for(var r=0,l=t.connections;r<l.length;r++){var s=l[r];n.connect(c[s.fromNodeIndex]._outputs[s.fromOutputIndex],c[s.toNodeIndex]._inputs[s.toInputIndex])}n._onNodesPasted(c);for(var a=0,d=c;a<d.length;a++)(i=d[a]).update()}),(function(){c.forEach((function(t){return n.removeNode(t)})),n.deselectAll(),d.forEach((function(t){return t.select()}))}),Et.ModifyData);u.do(),this._undoHistory.add(u)},e.prototype._onNodesPasted=function(t){},e.prototype.removeNode=function(t){var e=this;t._editor=null,this.element.removeChild(t.element),t._connections.forEach((function(n){n._fromOutput._node!=t&&n._fromOutput._node.removeConnection(n,n._fromOutput,n._toInput),n._toInput._node!=t&&n._toInput._node.removeConnection(n,n._fromOutput,n._toInput),e._removeConnection(n)}));var n=this._nodes.indexOf(t);n>-1&&this._nodes.splice(n,1);var o=this._selectedNodes.indexOf(t);o>-1&&this._selectedNodes.splice(o,1),this._nodeRemovedCallback&&this._nodeRemovedCallback(t)},e.prototype.addNode=function(t){var e=this;this._nodes.push(t),this.element.appendChild(t.element),t._editor=this,t._connections.forEach((function(n){n._fromOutput._node!=t&&n._fromOutput._node.addConnection(n),n._toInput._node!=t&&n._toInput._node.addConnection(n),e._addConnection(n)})),t.onAttached(),this._nodeAddedCallback&&this._nodeAddedCallback(t)},e.prototype.addNodeWithUndo=function(t,e){var n=this,o=new Rt(e||"Add Node",(function(){n.addNode(t)}),(function(){n.removeNode(t)}),Et.ModifyData);o.do(),this._undoHistory.add(o)},e.prototype.getNodes=function(){return this._nodes},e.prototype.connect=function(t,e){var n=new Jt(t,e);t._node.addConnection(n),e._node.addConnection(n),this._addConnection(n)},e.prototype.disconnect=function(t,e){var n=this._connections.find((function(n){return n._fromOutput==t&&n._toInput==e}));n&&(t._node.removeConnection(n,n._fromOutput,n._toInput),e._node.removeConnection(n,n._fromOutput,n._toInput),this._removeConnection(n))},e.prototype.onDragStart=function(t){if(1==t.button||0==t.button&&t.ctrlKey){this.element.classList.add("moving"),this._dragMode=St.MoveViewport;var e=this.element.getBoundingClientRect();return this._dragStart.x=t.clientX-e.left,this._dragStart.y=t.clientY-e.top,this._viewportDragStart.x=this._viewport.x,this._viewportDragStart.y=this._viewport.y,!0}return 0==t.button&&t.target==this.element&&(this._previouslySelectedNodes=this._selectedNodes.slice(0),this.deselectAll(),e=this.element.getBoundingClientRect(),this._dragStart.x=t.clientX-e.left,this._dragStart.y=t.clientY-e.top,this._dragMode=St.Select,this._selectRect.style.display="block",this._selectRect.style.left=this._dragStart.x+"px",this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width="0",this._selectRect.style.height="0",!0)},e.prototype.onDragNodesStarted=function(){this.element.classList.add("moving"),this._selectedNodes.forEach((function(t){t.onDragStarted()}))},e.prototype._scrollOutOfBounds=function(t,e){0==t&&0==e||(this._viewport.x+=.2*t,this._viewport.y+=.2*e,this._nodes.forEach((function(t){t.update()})))},e.prototype._checkOutOfBoundsScroll=function(t){var e=0,n=0,o=this.element.getBoundingClientRect(),i=t.clientX-o.x,r=t.clientY-o.y;i<0?e=i:i>o.width&&(e=i-o.width),r<0?n=r:r>o.height&&(n=r-o.height),this._scrollOutOfBounds(e,n)},e.prototype.onDragging=function(t){var e=this,n=this.element.getBoundingClientRect(),o=t.posWithOffsetToParentConsidered.x-n.left,i=t.posWithOffsetToParentConsidered.y-n.top;switch(this._dragMode){case St.MoveViewport:this._viewport.x=this._viewportDragStart.x-o/this._viewport.zoom,this._viewport.y=this._viewportDragStart.y-i/this._viewport.zoom,this._nodes.forEach((function(t){t.update()}));break;case St.MoveSelectedNodes:this._selectedNodes.forEach((function(t){t.setPixelPos(t._dragEditorPixelStartX+o,t._dragEditorPixelStartY+i),t._connections.forEach((function(t){t.update()}))})),this._checkOutOfBoundsScroll(t.mouseEvent);break;case St.Select:o<0?(this._selectRect.style.left=this._dragStart.x+o+"px",o*=-1):this._selectRect.style.left=this._dragStart.x+"px",i<0?(this._selectRect.style.top=this._dragStart.y+i+"px",i*=-1):this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width=o+"px",this._selectRect.style.height=i+"px";var r=this._selectRect.getBoundingClientRect();this._nodes.map((function(t){return{node:t,selected:e.intersection(r,t.element.getBoundingClientRect())}})).forEach((function(t){t.selected?t.node.select():t.node.deselect()})),this._checkOutOfBoundsScroll(t.mouseEvent)}},e.prototype.onDragEnd=function(t){var e=this;switch(this.element.classList.remove("moving"),this._dragMode){case St.MoveViewport:break;case St.MoveSelectedNodes:this._selectedNodes.forEach((function(e){return e.onDragEnd(t)}));var n=this._selectedNodes.map((function(t){return{node:t,startPos:{x:t._dragEditorStartX,y:t._dragEditorStartY},endPos:{x:t._pos.x,y:t._pos.y}}}));if(!n.every((function(t){return t.endPos.x==t.startPos.x&&t.endPos.x==t.startPos.x}))){var o=new Rt(this._selectedNodes.length>1?"Move Nodes":"Move Node",(function(){n.forEach((function(t){t.node.setPos(t.endPos.x,t.endPos.y)}))}),(function(){n.forEach((function(t){t.node.setPos(t.startPos.x,t.startPos.y)}))}),Et.ModifyData);o.do(),this._undoHistory.add(o)}break;case St.Select:this._selectRect.style.display="none";var i=this._previouslySelectedNodes,r=this._selectedNodes.slice(0);if(0!=i.length||0!=r.length){var l=new Rt(0==r.length?"Deselect All Nodes":"Select Nodes",(function(){e.deselectAll(),r.forEach((function(t){return t.select()}))}),(function(){e.deselectAll(),i.forEach((function(t){return t.select()}))}),Et.ModifyView);this._undoHistory.add(l)}}this._dragMode=St.None},e.prototype.intersection=function(t,e){return!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)},e.prototype.deselectAllWithUndo=function(){var t=this,e=this._selectedNodes.slice(0),n=new Rt("Deselect All Nodes",(function(){t.deselectAll()}),(function(){t.deselectAll(),e.forEach((function(t){return t.select()}))}),Et.ModifyView);n.do(),this._undoHistory.add(n)},e.prototype.selectAllWithUndo=function(){var t=this,e=this._selectedNodes.slice(0),n=new Rt("Select All Nodes",(function(){t.selectAll()}),(function(){t.deselectAll(),e.forEach((function(t){return t.select()}))}),Et.ModifyView);n.do(),this._undoHistory.add(n)},e.prototype.deselectAll=function(){this._selectedNodes.slice(0).forEach((function(t){t.deselect()}))},e.prototype.selectAll=function(){this._nodes.forEach((function(t){t.select()}))},e}(k),Jt=function(){function t(t,e){this._fromOutput=t,this._toInput=e,this._path=document.createElementNS("http://www.w3.org/2000/svg","path"),this._path.setAttributeNS(null,"fill","transparent"),this._path.setAttributeNS(null,"stroke-width","2"),(t||e)._node._editor._addArrowHeads&&this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"),this._fromOutput&&this._toInput&&this.update()}return t.prototype.setUseArrowHead=function(t){t?this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"):this._path.setAttributeNS(null,"style","marker-end:none")},t.prototype.update=function(t,e){var n,o,i;n=null!=this._fromOutput?this._fromOutput._bullet.getBoundingClientRect():{left:t,top:e,width:0,height:0},o=null!=this._toInput?this._toInput._bullet.getBoundingClientRect():{left:t,top:e,width:0,height:0},i=null!=this._path.parentNode?this._path.parentElement.getBoundingClientRect():{left:0,top:0};var r=n.left-i.left+.5*n.width,l=n.top-i.top+.5*n.height,s=o.left-i.left+.5*o.width,a=o.top-i.top+.5*o.height,c=this._fromOutput?this._fromOutput._node._editor:this._toInput?this._toInput._node._editor:null,d=c?c._viewport.zoom:1;d||(d=1),this._path.setAttributeNS(null,"d","M"+r+" "+l+" C "+(r+50*d)+" "+l+", "+(s-50*d)+" "+a+", "+s+" "+a)},t}(),Yt=function(){function t(t,e,n,o,i){this._node=t,this._name=e,this._isInput=n,this._allowMultipleConnectionsForOutput=!!i,this._canConnectCheck=o||function(t){return!0},this._bullet=n?this.createInput():this.createOutput()}return t.prototype.createInput=function(){var t=this,e=document.createElement("div");e.className="input";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,e.appendChild(n),e.appendChild(o),this._node._inputsElement.appendChild(e),n.onmouseenter=function(e){t._node._editor&&(null==t._node._editor._draggedConnection||t._canConnectCheck(t._node._editor._draggedConnection._fromOutput)&&t._node._editor._draggedConnection._fromOutput._canConnectCheck(t)||t._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),t._node._editor._targetInput=t,t._node._editor._targetNode=t._node)},n.onmouseleave=function(e){t._node._editor&&(t._node._editor._targetInput==t&&(t._node._editor._targetInput=null),t._node._editor._draggedConnection&&t._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=I(this._node._connectionDragging);return n.onmousedown=function(e){if(e.stopPropagation(),t._node._editor){i(e);var n=void 0,o=null,r=t._node._connections.find((function(e){return e._toInput==t}));r?(o=new Wt(r._fromOutput,r._toInput),(n=r)._toInput=null,t._node.removeConnection(n,o.fromOutput,o.toInput)):(n=new Jt(null,t),t._node.addConnection(n),t._node._editor._addConnection(n)),t._node._editor._draggedConnection=n,t._node._editor._connectionSettingsBeforeDragging=o}},n},t.prototype.createOutput=function(){var t=this,e=document.createElement("div");e.className="output";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,e.appendChild(o),e.appendChild(n),this._node._outputsElement.appendChild(e),n.onmouseenter=function(e){t._node._editor&&(null==t._node._editor._draggedConnection||t._canConnectCheck(t._node._editor._draggedConnection._toInput)&&(!t._node._editor._draggedConnection._toInput||t._node._editor._draggedConnection._toInput._canConnectCheck(t))||t._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),t._node._editor._targetOutput=t,t._node._editor._targetNode=t._node)},n.onmouseleave=function(e){t._node._editor&&(t._node._editor._targetOutput==t&&(t._node._editor._targetOutput=null),t._node._editor._draggedConnection&&t._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=I(this._node._connectionDragging);return n.onmousedown=function(e){if(e.stopPropagation(),t._node._editor){i(e);var n=void 0,o=null,r=null;t._allowMultipleConnectionsForOutput||(o=t._node._connections.find((function(e){return e._fromOutput==t})))&&(r={fromOutput:o._fromOutput,toInput:o._toInput},(n=o)._fromOutput=null,t._node.removeConnection(n,r.fromOutput,r.toInput)),n||(n=new Jt(t,null),t._node.addConnection(n),t._node._editor._addConnection(n)),t._node._editor._draggedConnection=n,t._node._editor._connectionSettingsBeforeDragging=r}},n},t.prototype.isInput=function(){return this._isInput},t.prototype.isOutput=function(){return!this._isInput},t}(),Ut=function(t){function e(e){var n=t.call(this)||this;n.element.classList.add("Node"),n._title=document.createElement("div"),n.setTitle(e),n._title.className="title",n.element.appendChild(n._title);var o=document.createElement("div");return n._pos=new _(-1,-1),n._connections=[],n._inputs=[],n._inputsElement=document.createElement("div"),n._inputsElement.className="inputs",o.appendChild(n._inputsElement),o.className="body",n._contentsElement=document.createElement("div"),n._contentsElement.className="contents",o.appendChild(n._contentsElement),n._outputs=[],n._outputsElement=document.createElement("div"),n._outputsElement.className="outputs",o.appendChild(n._outputsElement),n.element.appendChild(o),n._dragEditorPixelStartX=0,n._dragEditorPixelStartY=0,n._dragEditorStartX=0,n._dragEditorStartY=0,n._editor=null,n._wasActuallyDragged=!1,n._connectionDragging=new B(n.element,(function(t){return!0}),(function(t){n._editor&&n._editor._draggedConnection&&(n._editor._checkOutOfBoundsScroll(t.mouseEvent),n._editor._draggedConnection.update(t.mouseEvent.clientX,t.mouseEvent.clientY))}),(function(t){if(n._editor&&n._editor._draggedConnection){var e=function(t,e){return new Rt("Remove Connection",(function(){n._removeDraggedConnection(t)}),(function(){null!=e&&(t._fromOutput=e.fromOutput,t._toInput=e.toInput),t._path.setAttributeNS(null,"class",""),n._editor._addConnection(t),t.update(),t._fromOutput&&t._fromOutput._node.addConnection(t),t._toInput&&t._toInput._node.addConnection(t)}),Et.ModifyData)},o=function(t,o){var i=n._editor._connectionSettingsBeforeDragging;if(!t._canConnectCheck(o)||!o._canConnectCheck(t)){var r=n._editor._draggedConnection,l=e(r,i);return l.do(),void n._editor._undoHistory.add(l)}var s=n._connections.find((function(e){return e._fromOutput==t&&e._toInput==o})),a=n._editor._draggedConnection,c=function(t,e,o,i,r,l){return new Rt(r?"Change Connection":"Add Connection",(function(){l&&(n._editor._removeConnection(l),n.removeConnection(l,l._fromOutput,l._toInput),o.removeConnection(l,l._fromOutput,l._toInput)),i._fromOutput=t,i._toInput=e,n._editor._addConnection(i),n.addConnection(i),o.addConnection(i),i.update(),i._fromOutput._node._onConnectionAdded(i),i._toInput._node._onConnectionAdded(i)}),(function(){r?(o.removeConnection(i,i._fromOutput,i._toInput),r.fromOutput._node==o?i._fromOutput=r.fromOutput:i._toInput=r.toInput,i.update(),n._onConnectionAdded(i)):(n._editor._removeConnection(i),n.removeConnection(i,i._fromOutput,i._toInput),i._fromOutput._node.removeConnection(i,i._fromOutput,i._toInput),i._toInput._node.removeConnection(i,i._fromOutput,i._toInput)),l&&(o.addConnection(l),l.update(),i._fromOutput._node.update(),i._toInput._node.update(),i._fromOutput._node.addConnection(l),i._toInput._node.addConnection(l),i._fromOutput._node._onConnectionAdded(l),i._toInput._node._onConnectionAdded(l))}),Et.ModifyData)}(t,o,n._editor._targetNode,a,i,s);n._editor._draggedConnection=null,n._editor._connectionSettingsBeforeDragging=null,c.do(),n._editor._undoHistory.add(c)};if(n._editor._targetInput&&!n._editor._draggedConnection._toInput)o(n._editor._draggedConnection._fromOutput,n._editor._targetInput);else if(n._editor._targetOutput&&!n._editor._draggedConnection._fromOutput)o(n._editor._targetOutput,n._editor._draggedConnection._toInput);else{var i=n._editor._draggedConnection,r=n._editor._connectionSettingsBeforeDragging,l=e(i,r);l.do(),r&&n._editor._undoHistory.add(l)}}})),n}return Ht(e,t),e.prototype._mapNodePort=function(t){return{name:t._name,allowMultipleConnectionsForOutput:t._allowMultipleConnectionsForOutput,canConnectCheck:t._canConnectCheck}},e.prototype._copy=function(){var t=this;return new jt(this.getTitle(),this._inputs.map((function(e){return t._mapNodePort(e)})),this._outputs.map((function(e){return t._mapNodePort(e)})),this.getPos())},e.prototype._onConnectionAdded=function(t){},e.prototype._onConnectionRemoved=function(t,e,n){},e.prototype._removeDraggedConnection=function(t){t._fromOutput&&t._fromOutput._node.removeConnection(t,t._fromOutput,t._toInput),t._toInput&&t._toInput._node.removeConnection(t,t._fromOutput,t._toInput),this._editor._removeConnection(t),t=null,this._editor._draggedConnection=null,this._editor._connectionSettingsBeforeDragging=null},e.prototype.onAttached=function(){var t=this;if(this.isAttached()){if(this._connections.forEach((function(t){t.update()})),null==this._pos.x){var e=this._getViewport();this._pos.x=e.getPosFromPixelPos(parseInt(this.element.style.left),0).x}null==this._pos.y&&(e=this._getViewport(),this._pos.y=e.getPosFromPixelPos(0,parseInt(this.element.style.top)).y),this.update(),this._title.addEventListener("mousedown",I(this._editor,(function(e,n){return!!t.onDragStart(n)&&(t._editor.onDragNodesStarted(),!0)})))}},e.prototype._getViewport=function(){return this._editor?this._editor._viewport:null},e.prototype.setPixelPos=function(t,e){var n=this._getViewport();if(this.element.style.left=t+"px",this.element.style.top=e+"px",n){var o=n.getPosFromPixelPos(t,e);this._pos.x=o.x,this._pos.y=o.y}else this._pos.x=void 0,this._pos.y=void 0},e.prototype.getPixelPos=function(){var t=this._getViewport();return t?t.getPixelPosFromPos(this._pos.x,this._pos.y):null},e.prototype.setPos=function(t,e){this._pos.x=t,this._pos.y=e,this.update()},e.prototype.getPos=function(){return new _(this._pos.x,this._pos.y)},e.prototype.getTitle=function(){return this._title.textContent},e.prototype.setTitle=function(t){this._title.textContent=t},e.prototype.addInput=function(t,e){var n=new Yt(this,t,!0,e);return this._inputs.push(n),n},e.prototype.addOutput=function(t,e,n){var o=new Yt(this,t,!1,e,n);return this._outputs.push(o),o},e.prototype.addConnection=function(t){this._connections.includes(t)||this._connections.push(t)},e.prototype.removeConnection=function(t,e,n){var o=this._connections.indexOf(t);o>-1&&this._connections.splice(o,1),this._onConnectionRemoved(t,e,n)},e.prototype.onDragStart=function(t){return 0!=t.button&&2!=t.button||this.isSelected()||this.selectSingle(),0==t.button},e.prototype.onDragStarted=function(){var t=this.getPixelPos();this._dragEditorPixelStartX=t.x,this._dragEditorPixelStartY=t.y,this._dragEditorStartX=this._pos.x,this._dragEditorStartY=this._pos.y,this._editor._dragMode=St.MoveSelectedNodes},e.prototype.onDragEnd=function(e){t.prototype.onDragEnd.call(this,e),this._wasActuallyDragged=!1},e.prototype.isSelected=function(){return this.element.classList.contains("selected")},e.prototype.select=function(){this._editor._selectedNodes.indexOf(this)>-1||(this._editor._selectedNodes.push(this),this.element.classList.add("selected"),this._editor._nodeSelectedCallback&&this._editor._nodeSelectedCallback(this))},e.prototype.deselect=function(){this._editor._selectedNodes.indexOf(this)<0||(this._editor._selectedNodes.splice(this._editor._selectedNodes.indexOf(this),1),this.element.classList.remove("selected"),this._editor._nodeDeselectedCallback&&this._editor._nodeDeselectedCallback(this))},e.prototype.selectSingle=function(){var t=this,e=this._editor._selectedNodes.slice(0),n=new Rt("Select Node",(function(){t._editor.deselectAll(),t.select()}),(function(){t._editor.deselectAll(),e.forEach((function(t){return t.select()}))}),Et.ModifyView);n.do(),this._editor._undoHistory.add(n)},e.prototype.update=function(){var t=this.getPixelPos();t&&(this.element.style.left=t.x+"px",this.element.style.top=t.y+"px",this._connections.forEach((function(t){t.update()})))},e}(k)})(),o})()));
|
|
2
2
|
//# sourceMappingURL=tootframes.esm.js.map
|