meadow-integration 1.0.40 → 1.0.42

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.
Files changed (75) hide show
  1. package/BUILDING-AND-PUBLISHING.md +2 -2
  2. package/Dockerfile +1 -1
  3. package/README.md +27 -8
  4. package/docs/README.md +1 -1
  5. package/docs/_brand.json +18 -0
  6. package/docs/_cover.md +1 -1
  7. package/docs/_topbar.md +1 -1
  8. package/docs/_version.json +3 -3
  9. package/docs/architecture.md +14 -225
  10. package/docs/data-clone/configuration.md +9 -1
  11. package/docs/data-clone/diagrams/architecture-diagram.excalidraw +1756 -0
  12. package/docs/data-clone/diagrams/architecture-diagram.mmd +8 -0
  13. package/docs/data-clone/diagrams/architecture-diagram.svg +2 -0
  14. package/docs/data-clone/overview.md +2 -32
  15. package/docs/diagrams/configuration-cascade-2.excalidraw +831 -0
  16. package/docs/diagrams/configuration-cascade-2.mmd +8 -0
  17. package/docs/diagrams/configuration-cascade-2.svg +2 -0
  18. package/docs/diagrams/configuration-cascade.excalidraw +831 -0
  19. package/docs/diagrams/configuration-cascade.mmd +8 -0
  20. package/docs/diagrams/configuration-cascade.svg +2 -0
  21. package/docs/diagrams/data-synchronization-pipeline.excalidraw +3278 -0
  22. package/docs/diagrams/data-synchronization-pipeline.mmd +42 -0
  23. package/docs/diagrams/data-synchronization-pipeline.svg +2 -0
  24. package/docs/diagrams/data-transformation-pipeline.excalidraw +2929 -0
  25. package/docs/diagrams/data-transformation-pipeline.mmd +31 -0
  26. package/docs/diagrams/data-transformation-pipeline.svg +2 -0
  27. package/docs/diagrams/docker-deployment.excalidraw +1963 -0
  28. package/docs/diagrams/docker-deployment.mmd +23 -0
  29. package/docs/diagrams/docker-deployment.svg +2 -0
  30. package/docs/diagrams/high-level-system-architecture.excalidraw +5752 -0
  31. package/docs/diagrams/high-level-system-architecture.mmd +66 -0
  32. package/docs/diagrams/high-level-system-architecture.svg +2 -0
  33. package/docs/diagrams/module-structure.excalidraw +15206 -0
  34. package/docs/diagrams/module-structure.mmd +56 -0
  35. package/docs/diagrams/module-structure.svg +2 -0
  36. package/docs/diagrams/sync-mode-comparison.excalidraw +3660 -0
  37. package/docs/diagrams/sync-mode-comparison.mmd +33 -0
  38. package/docs/diagrams/sync-mode-comparison.svg +2 -0
  39. package/docs/implementation-reference.md +2 -58
  40. package/docs/index.html +6 -7
  41. package/docs/retold-catalog.json +388 -279
  42. package/docs/retold-keyword-index.json +24887 -16186
  43. package/example-applications/mapping-demo/README.md +2 -10
  44. package/example-applications/mapping-demo/diagrams/architecture.excalidraw +1866 -0
  45. package/example-applications/mapping-demo/diagrams/architecture.mmd +8 -0
  46. package/example-applications/mapping-demo/diagrams/architecture.svg +2 -0
  47. package/example-applications/mapping-demo/package.json +22 -1
  48. package/example-applications/mapping-demo/server.js +28 -0
  49. package/example-applications/mapping-demo/source/MappingDemoApp.js +42 -3
  50. package/example-applications/mapping-demo/source/MappingDemoBrand.js +17 -0
  51. package/example-applications/mapping-demo/web/favicons/apple-touch-icon.png +0 -0
  52. package/example-applications/mapping-demo/web/favicons/favicon-16.png +0 -0
  53. package/example-applications/mapping-demo/web/favicons/favicon-192.png +0 -0
  54. package/example-applications/mapping-demo/web/favicons/favicon-32.png +0 -0
  55. package/example-applications/mapping-demo/web/favicons/favicon-48.png +0 -0
  56. package/example-applications/mapping-demo/web/favicons/favicon-512.png +0 -0
  57. package/example-applications/mapping-demo/web/favicons/favicon-64.png +0 -0
  58. package/example-applications/mapping-demo/web/favicons/favicon-dark.svg +30 -0
  59. package/example-applications/mapping-demo/web/favicons/favicon-light.svg +30 -0
  60. package/example-applications/mapping-demo/web/favicons/favicon.svg +30 -0
  61. package/example-applications/mapping-demo/web/index.html +40 -26
  62. package/example-applications/mapping-demo/web/mapping-demo-editor.js +3267 -398
  63. package/example-applications/mapping-demo/web/mapping-demo-editor.js.map +1 -1
  64. package/example-applications/mapping-demo/web/mapping-demo-editor.min.js +34 -1
  65. package/example-applications/mapping-demo/web/mapping-demo-editor.min.js.map +1 -1
  66. package/example-applications/mapping-demo/web/pict.min.js +2 -2
  67. package/package.json +10 -7
  68. package/source/services/clone/Meadow-Service-DeleteCursorStore.js +105 -0
  69. package/source/services/clone/Meadow-Service-Sync-Entity-OngoingEventualConsistency.js +327 -92
  70. package/source/services/clone/Meadow-Service-Sync.js +2 -0
  71. package/source/views/PictView-MeadowMappingEditor.js +30 -30
  72. package/test/Meadow-Integration-BisectionSync_test.js +15 -5
  73. package/test/Meadow-Integration-NewStrategies_test.js +15 -5
  74. package/test/Meadow-Integration-OngoingEventualConsistencyDeleteCursor_test.js +228 -0
  75. package/test/Meadow-Integration-OngoingEventualConsistencyDeleteSync_test.js +311 -0
@@ -1,2 +1,35 @@
1
- "use strict";function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function r(o,i,n,r){var l=i&&i.prototype instanceof s?i:s,c=Object.create(l.prototype);return _regeneratorDefine2(c,"_invoke",function(o,i,n){var r,s,l,c=0,d=n||[],p=!1,h={p:0,n:0,v:t,a:u,f:u.bind(t,4),d:function(e,o){return r=e,s=0,l=t,h.n=o,a}};function u(o,i){for(s=o,l=i,e=0;!p&&c&&!n&&e<d.length;e++){var n,r=d[e],u=h.p,f=r[2];o>3?(n=f===i)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=u&&((n=o<2&&u<r[1])?(s=0,h.v=i,h.n=r[1]):u<f&&(n=o<3||r[0]>i||i>f)&&(r[4]=o,r[5]=i,h.n=f,s=0))}if(n||o>1)return a;throw p=!0,i}return function(n,d,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===d&&u(d,f),s=d,l=f;(e=s<2?t:l)||!p;){r||(s?s<3?(s>1&&(h.n=-1),u(s,l)):h.n=l:h.v=l);try{if(c=2,r){if(s||(n="next"),e=r[n]){if(!(e=e.call(r,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);r=t}else if((e=(p=h.n<0)?l:o.call(i,h))!==a)break}catch(e){r=t,s=1,l=e}finally{c=1}}return{value:e,done:p}}}(o,n,r),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var d=[][i]?e(e([][i]())):(_regeneratorDefine2(e={},i,function(){return this}),e),p=c.prototype=s.prototype=Object.create(d);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_regeneratorDefine2(t,n,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=c,_regeneratorDefine2(p,"constructor",c),_regeneratorDefine2(c,"constructor",l),l.displayName="GeneratorFunction",_regeneratorDefine2(c,n,"GeneratorFunction"),_regeneratorDefine2(p),_regeneratorDefine2(p,n,"Generator"),_regeneratorDefine2(p,i,function(){return this}),_regeneratorDefine2(p,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:r,m:h}})()}function _regeneratorDefine2(t,e,o,i){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}_regeneratorDefine2=function(t,e,o,i){function r(e,o){_regeneratorDefine2(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!i,configurable:!i,writable:!i}):t[e]=o:(r("next",0),r("throw",1),r("return",2))},_regeneratorDefine2(t,e,o,i)}function asyncGeneratorStep(t,e,o,i,n,r,a){try{var s=t[r](a),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(i,n)}function _asyncToGenerator(t){return function(){var e=this,o=arguments;return new Promise(function(i,n){var r=t.apply(e,o);function a(t){asyncGeneratorStep(r,i,n,a,s,"next",t)}function s(t){asyncGeneratorStep(r,i,n,a,s,"throw",t)}a(void 0)})}}function _createForOfIteratorHelper(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=Array(e);o<e;o++)i[o]=t[o];return i}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _callSuper(t,e,o){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,o||[],_getPrototypeOf(t).constructor):e.apply(t,o))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _superPropGet(t,e,o,i){var n=_get(_getPrototypeOf(1&i?t.prototype:t),e,o);return 2&i&&"function"==typeof n?function(t){return n.apply(o,t)}:n}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=_superPropBase(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}},_get.apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).MappingDemoApplication=t()}}(function(){return function t(e,o,i){function n(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[a]={exports:{}};e[a][0].call(d.exports,function(t){return n(e[a][1][t]||t)},d,d.exports,t,e,o,i)}return o[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)n(i[a]);return n}({1:[function(t,e,o){var i=t("pict-application"),n=t("./views/MappingDemoEditorView.js"),r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,o,i])).pict.addView("MappingDemoEditor",n.default_configuration,n),r}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){return window.openMappingEditor=function(){var t=document.getElementById("mapping-editor-placeholder");t&&(t.style.display="none"),window._Pict.views.MappingDemoEditor.editMappings(1,"Book")},_superPropGet(e,"onAfterInitializeAsync",this,3)([t])}}])}(i);e.exports=r,e.exports.default_configuration={Name:"MappingDemoApp",Hash:"MappingDemo",AutoSolveAfterInitialize:!0}},{"./views/MappingDemoEditorView.js":2,"pict-application":6}],2:[function(t,e,o){var i=t("../../../../source/views/PictView-MeadowMappingEditor.js"),n={ViewIdentifier:"MappingDemoEditor",DefaultRenderable:"MappingDemoEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:i.default_configuration.CSS,Templates:[{Hash:"MappingDemoEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); color:var(--text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"Book","GUIDTemplate":"{~D:Record.id~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MappingDemoEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MappingDemoEditor-Content",TemplateHash:"MappingDemoEditor-Template",ContentDestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){return _classCallCheck(this,e),_callSuper(this,e,[t,o,i])}return _inherits(e,t),_createClass(e,[{key:"_doLoadMappings",value:function(t){return fetch("/1.0/Demo/VisualMapping").then(function(t){return t.json()})}},{key:"_doLoadSources",value:function(){return fetch("/1.0/Demo/Sources").then(function(t){return t.json()})}},{key:"_doLoadStores",value:function(t){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(t){return fetch("/1.0/Demo/TargetSchema").then(function(t){return t.json()})}},{key:"_doLoadMapping",value:function(t){return fetch("/1.0/Demo/VisualMapping/"+t).then(function(t){return t.json()})}},{key:"_doDeleteMapping",value:function(t){return fetch("/1.0/Demo/VisualMapping/"+t,{method:"DELETE"}).then(function(t){return t.json()})}},{key:"_doDiscoverSourceFields",value:function(t,e,o){return fetch("/1.0/Demo/SourceSchema").then(function(t){return t.json()})}},{key:"_doCreateMapping",value:function(t,e){return fetch("/1.0/Demo/VisualMapping",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(function(t){return t.json()})}},{key:"_doUpdateMapping",value:function(t,e){return fetch("/1.0/Demo/VisualMapping/"+t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(function(t){return t.json()})}},{key:"_onClose",value:function(){var t=document.getElementById("MeadowMap-Editor");t&&t.classList.remove("active");var e=document.getElementById("mapping-editor-placeholder");e&&(e.style.display=""),document.dispatchEvent(new CustomEvent("mapping-editor-closed"))}}])}(i);e.exports=r,e.exports.default_configuration=n},{"../../../../source/views/PictView-MeadowMappingEditor.js":47}],3:[function(t,e,o){e.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],4:[function(t,e,o){var i=t("../package.json"),n=function(){return _createClass(function t(e,o,n){_classCallCheck(this,t),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(e)&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"===_typeof(o)?o:{}):(this.options="object"!==_typeof(e)||e.isFable?"object"===_typeof(o)?o:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof n?n:this.fable||"string"!=typeof o?"".concat(this.UUID):o},[{key:"connectFable",value:function(t){if("object"!==_typeof(t)||!t.isFable){var e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(t),"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(n,"isFableService",!0),e.exports=n,e.exports.CoreServiceProviderBase=n},{"../package.json":3}],5:[function(t,e,o){e.exports={name:"pict-application",version:"1.0.33",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],6:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e);var s="object"===_typeof(t.settings.PictApplicationConfiguration)?t.settings.PictApplicationConfiguration:{};(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),s,o),i])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=n,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var l=Object.keys(a.options.Manifests);if(l.length>0)for(var c=0;c<l.length;c++){var d=l[c];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(e,t),_createClass(e,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var t=Object.keys(this.pict.providers),e=[],o=0;o<t.length;o++){var i=this.pict.providers[t[o]];i.options.AutoSolveWithApp&&e.push(i)}e.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var n=0;n<e.length;n++)e[n].solve(e[n]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],s=0;s<r.length;s++){var l=this.pict.views[r[s]];l.options.AutoInitialize&&a.push(l)}a.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var c=0;c<a.length;c++)a[c].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");o.anticipate(this.onBeforeSolveAsync.bind(this));var i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoSolveWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var l=0;l<r.length;l++)o.anticipate(r[l].solveAsync.bind(r[l]));for(var c=Object.keys(this.pict.views),d=[],p=0;p<c.length;p++){var h=this.pict.views[c[p]];h.options.AutoSolveWithApp&&d.push(h)}d.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var u=0;u<d.length;u++)o.anticipate(d[u].solveAsync.bind(d[u]));o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync() complete.")),e.lastSolvedTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}},{key:"onLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}},{key:"loginAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeLoginAsync.bind(this)),o.anticipate(this.onLoginAsync.bind(this)),o.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&o.anticipate(function(t){if(!e.isLoggedIn())return t();e.pict.LogNoisiness>1&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," auto loading data after login...")),e.loadDataAsync(function(e){t(e)})}),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync() complete.")),e.lastLoginTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}},{key:"loadDataAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoLoadDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];o.anticipate(d.onBeforeLoadDataAsync.bind(d))}o.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onLoadDataAsync.bind(u))}o.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,w=r;f<w.length;f++){var v=w[f];o.anticipate(v.onAfterLoadDataAsync.bind(v))}o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync() complete.")),e.lastLoadDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}},{key:"onBeforeSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}},{key:"saveDataAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoSaveDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];o.anticipate(d.onBeforeSaveDataAsync.bind(d))}o.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onSaveDataAsync.bind(u))}o.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,w=r;f<w.length;f++){var v=w[f];o.anticipate(v.onAfterSaveDataAsync.bind(v))}o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync() complete.")),e.lastSaveDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var t=0;t<this.options.ConfigurationOnlyViews.length;t++){var e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();for(var o=Object.keys(this.pict.providers),i=[],n=0;n<o.length;n++){var r=this.pict.providers[o[n]];r.options.AutoInitialize&&i.push(r)}i.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var a=0;a<i.length;a++)i[a].initialize();for(var s=Object.keys(this.pict.views),l=[],c=0;c<s.length;c++){var d=this.pict.views[s[c]];d.options.AutoInitialize&&l.push(d)}l.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var p=0;p<l.length;p++)l[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(t){var e=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var o="function"==typeof t&&t;if(o||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(o);var i=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var n=0;n<this.options.ConfigurationOnlyViews.length;n++){var r=void 0===this.options.ConfigurationOnlyViews[n].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[n].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[n])}i.anticipate(this.onBeforeInitializeAsync.bind(this)),i.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),s=[],l=0;l<a.length;l++){var c=this.pict.providers[a[l]];c.options.AutoInitialize&&s.push(c)}s.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var d=0;d<s.length;d++)i.anticipate(s[d].initializeAsync.bind(s[d]));for(var p=Object.keys(this.pict.views),h=[],u=0;u<p.length;u++){var f=this.pict.views[p[u]];f.options.AutoInitialize&&h.push(f)}h.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var w=0;w<h.length;w++){var v=h[w];i.anticipate(v.initializeAsync.bind(v))}i.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),i.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),i.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),i.anticipate(this.renderMainViewportAsync.bind(this))),i.wait(function(t){return t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),e.initializeTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initialization complete.")),o()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(t){return this.onCompletionOfInitialize(),t()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(t){return this.onBeforeMarshalFromViews(),t()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(t){return this.onMarshalFromViews(),t()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var t=Object.keys(this.pict.views),e=[],o=0;o<t.length;o++){var i=this.pict.views[t[o]];e.push(i)}for(var n=0;n<e.length;n++)e[n].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var n=Object.keys(this.pict.views),r=[],a=0;a<n.length;a++){var s=this.pict.views[n[a]];r.push(s)}for(var l=0;l<r.length;l++)o.anticipate(r[l].marshalFromViewAsync.bind(r[l]));o.anticipate(this.onMarshalFromViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync() complete.")),e.lastMarshalFromViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(t){return this.onAfterMarshalFromViews(),t()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(t){return this.onBeforeMarshalToViews(),t()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(t){return this.onMarshalToViews(),t()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var t=Object.keys(this.pict.views),e=[],o=0;o<t.length;o++){var i=this.pict.views[t[o]];e.push(i)}for(var n=0;n<e.length;n++)e[n].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var n=Object.keys(this.pict.views),r=[],a=0;a<n.length;a++){var s=this.pict.views[n[a]];r.push(s)}for(var l=0;l<r.length;l++)o.anticipate(r[l].marshalToViewAsync.bind(r[l]));o.anticipate(this.onMarshalToViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync() complete.")),e.lastMarshalToViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(t){return this.onAfterMarshalToViews(),t()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t){return this.onBeforeRender(),t()}},{key:"render",value:function(t,e,o,i){var n="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof o?this.options.MainViewportDestinationAddress:o,s="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();var l="string"==typeof n&&this.servicesMap.PictView[n];return l?(this.onRender(),l.render(r,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(n," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(t){return this.onRender(),t()}},{key:"renderAsync",value:function(t,e,o,i,n){var r=this,a="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,l="string"!=typeof o?this.options.MainViewportDestinationAddress:o,c="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,d="function"==typeof n?n:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof t&&t;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(t){t&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(l,"] TemplateDataAddress[").concat(c,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var h="string"==typeof a&&this.servicesMap.PictView[a];if(!h){var u="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(u),d(new Error(u))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(t){h.renderAsync.call(h,s,l,c,t)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(t){return this.onAfterRender(),t()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}},{key:"renderAutoViews",value:function(){var t=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var e=Object.keys(this.pict.views);e.sort(function(e,o){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[o].options.AutoRenderOrdinal});for(var o=0;o<e.length;o++){var i=this.pict.views[e[o]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var n=Object.keys(this.pict.views);n.sort(function(t,o){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[o].options.AutoRenderOrdinal});for(var r=0;r<n.length;r++){var a=this.pict.views[n[r]];a.options.AutoRender&&o.anticipate(a.renderAsync.bind(a))}o.wait(function(t){return e.lastAutoRenderTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync complete.")),i(t)})}},{key:"isPictApplication",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":5,"fable-serviceproviderbase":4}],7:[function(t,e,o){e.exports={name:"pict-provider",version:"1.0.12",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351",quackage:"^1.0.58",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],8:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),o),i])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=n,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var s=0;s<a.options.Templates.length;s++){var l=a.options.Templates[s];l.hasOwnProperty("Postfix")&&l.hasOwnProperty("Template")?(l.Source||(l.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(l.Prefix,l.Postfix,l.Template,l.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(s," in the options array."),l)}return a}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return e.initializeTimestamp=e.pict.log.getTimeStamp(),o?e.log.error("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization failed: ").concat(o.message||o),{Stack:o.stack}):e.pict.LogNoisiness>0&&e.log.info("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(t){return this.onPreRender(),t()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(t){return this.onPreRender(),t()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}},{key:"onAfterLoadDataAsync",value:function(t){return t()}},{key:"onBeforeSaveDataAsync",value:function(t){return t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}},{key:"onAfterSaveDataAsync",value:function(t){return t()}}])}(i);e.exports=a},{"../package.json":7,"fable-serviceproviderbase":4}],9:[function(t,e,o){e.exports=t("./views/PictView-Flow.js"),e.exports.PictViewFlowNode=t("./views/PictView-Flow-Node.js"),e.exports.PictViewFlowToolbar=t("./views/PictView-Flow-Toolbar.js"),e.exports.PictViewFlowFloatingToolbar=t("./views/PictView-Flow-FloatingToolbar.js"),e.exports.PictServiceFlowInteractionManager=t("./services/PictService-Flow-InteractionManager.js"),e.exports.PictServiceFlowConnectionRenderer=t("./services/PictService-Flow-ConnectionRenderer.js"),e.exports.PictServiceFlowTether=t("./services/PictService-Flow-Tether.js"),e.exports.PictServiceFlowLayout=t("./services/PictService-Flow-Layout.js"),e.exports.PictServiceFlowPathGenerator=t("./services/PictService-Flow-PathGenerator.js"),e.exports.PictServiceFlowViewportManager=t("./services/PictService-Flow-ViewportManager.js"),e.exports.PictServiceFlowSelectionManager=t("./services/PictService-Flow-SelectionManager.js"),e.exports.PictServiceFlowPanelManager=t("./services/PictService-Flow-PanelManager.js"),e.exports.PictServiceFlowDataManager=t("./services/PictService-Flow-DataManager.js"),e.exports.PictServiceFlowConnectionHandleManager=t("./services/PictService-Flow-ConnectionHandleManager.js"),e.exports.PictServiceFlowRenderManager=t("./services/PictService-Flow-RenderManager.js"),e.exports.PictServiceFlowPortRenderer=t("./services/PictService-Flow-PortRenderer.js"),e.exports.PictProviderFlowNodeTypes=t("./providers/PictProvider-Flow-NodeTypes.js"),e.exports.PictProviderFlowEventHandler=t("./providers/PictProvider-Flow-EventHandler.js"),e.exports.PictProviderFlowLayouts=t("./providers/PictProvider-Flow-Layouts.js"),e.exports.PictProviderFlowSVGHelpers=t("./providers/PictProvider-Flow-SVGHelpers.js"),e.exports.PictProviderFlowGeometry=t("./providers/PictProvider-Flow-Geometry.js"),e.exports.PictProviderFlowPanelChrome=t("./providers/PictProvider-Flow-PanelChrome.js"),e.exports.PictProviderFlowCSS=t("./providers/PictProvider-Flow-CSS.js"),e.exports.PictProviderFlowIcons=t("./providers/PictProvider-Flow-Icons.js"),e.exports.PictProviderFlowConnectorShapes=t("./providers/PictProvider-Flow-ConnectorShapes.js"),e.exports.PictFlowCard=t("./PictFlowCard.js"),e.exports.PictFlowCardPropertiesPanel=t("./PictFlowCardPropertiesPanel.js"),e.exports.FlowCardPropertiesPanelTemplate=t("./panels/FlowCardPropertiesPanel-Template.js"),e.exports.FlowCardPropertiesPanelMarkdown=t("./panels/FlowCardPropertiesPanel-Markdown.js"),e.exports.FlowCardPropertiesPanelForm=t("./panels/FlowCardPropertiesPanel-Form.js"),e.exports.FlowCardPropertiesPanelView=t("./panels/FlowCardPropertiesPanel-View.js"),e.exports.PictViewFlowPropertiesPanel=t("./views/PictView-Flow-PropertiesPanel.js")},{"./PictFlowCard.js":10,"./PictFlowCardPropertiesPanel.js":11,"./panels/FlowCardPropertiesPanel-Form.js":12,"./panels/FlowCardPropertiesPanel-Markdown.js":13,"./panels/FlowCardPropertiesPanel-Template.js":14,"./panels/FlowCardPropertiesPanel-View.js":15,"./providers/PictProvider-Flow-CSS.js":16,"./providers/PictProvider-Flow-ConnectorShapes.js":17,"./providers/PictProvider-Flow-EventHandler.js":18,"./providers/PictProvider-Flow-Geometry.js":19,"./providers/PictProvider-Flow-Icons.js":20,"./providers/PictProvider-Flow-Layouts.js":21,"./providers/PictProvider-Flow-NodeTypes.js":22,"./providers/PictProvider-Flow-PanelChrome.js":24,"./providers/PictProvider-Flow-SVGHelpers.js":25,"./services/PictService-Flow-ConnectionHandleManager.js":27,"./services/PictService-Flow-ConnectionRenderer.js":28,"./services/PictService-Flow-DataManager.js":29,"./services/PictService-Flow-InteractionManager.js":30,"./services/PictService-Flow-Layout.js":31,"./services/PictService-Flow-PanelManager.js":32,"./services/PictService-Flow-PathGenerator.js":33,"./services/PictService-Flow-PortRenderer.js":34,"./services/PictService-Flow-RenderManager.js":35,"./services/PictService-Flow-SelectionManager.js":36,"./services/PictService-Flow-Tether.js":37,"./services/PictService-Flow-ViewportManager.js":38,"./views/PictView-Flow-FloatingToolbar.js":39,"./views/PictView-Flow-Node.js":40,"./views/PictView-Flow-PropertiesPanel.js":41,"./views/PictView-Flow-Toolbar.js":42,"./views/PictView-Flow.js":43}],10:[function(t,e,o){var i=function(t){function e(t,o,i){var n;_classCallCheck(this,e);var r=Object.assign({},e.default_configuration,o);return(n=_callSuper(this,e,[t,r,i])).serviceType="PictFlowCard",n.cardTitle=r.Title?r.Title:"Card",n.cardName=!!r.Name&&r.Name,n.cardCode=r.Code?r.Code:"",n.cardDescription=!!r.Description&&r.Description,n.cardIcon=!!r.Icon&&r.Icon,n.cardPreviewImage=!!r.PreviewImage&&r.PreviewImage,n.cardDocumentation=!!r.Documentation&&r.Documentation,n.cardTooltip=!!r.Tooltip&&r.Tooltip,n.cardHelp=!!r.Help&&r.Help,n.cardEnabled="boolean"!=typeof r.Enabled||r.Enabled,n.cardTitleBarColor=r.TitleBarColor?r.TitleBarColor:"#2c3e50",n.cardBodyStyle=r.BodyStyle?r.BodyStyle:{},n.cardWidth="number"==typeof r.Width?r.Width:180,n.cardHeight="number"==typeof r.Height?r.Height:80,n.cardCategory=r.Category?r.Category:"General",n.cardInputs=Array.isArray(r.Inputs)?r.Inputs:[],n.cardOutputs=Array.isArray(r.Outputs)?r.Outputs:[],n.cardPropertiesPanel=r.PropertiesPanel&&"object"===_typeof(r.PropertiesPanel)?r.PropertiesPanel:null,n.cardBodyContent=r.BodyContent&&"object"===_typeof(r.BodyContent)?r.BodyContent:null,n.cardShowTypeLabel="boolean"!=typeof r.ShowTypeLabel||r.ShowTypeLabel,n.cardPortLabelsOnHover="boolean"==typeof r.PortLabelsOnHover&&r.PortLabelsOnHover,n.cardPortLabelsVertical="boolean"==typeof r.PortLabelsVertical&&r.PortLabelsVertical,n.cardPortLabelPadding="boolean"==typeof r.PortLabelPadding&&r.PortLabelPadding,n.cardPortLabelsOutside="boolean"==typeof r.PortLabelsOutside&&r.PortLabelsOutside,n.cardLabelsInFront="boolean"!=typeof r.LabelsInFront||r.LabelsInFront,n}return _inherits(e,t),_createClass(e,[{key:"getNodeTypeConfiguration",value:function(){for(var t=[],e=0;e<this.cardInputs.length;e++){var o=this.cardInputs[e],i={Hash:null,Direction:"input",Side:o.Side||"left",Label:o.Name||"In ".concat(e+1),MinimumInputCount:"number"==typeof o.MinimumInputCount?o.MinimumInputCount:0,MaximumInputCount:"number"==typeof o.MaximumInputCount?o.MaximumInputCount:-1};o.PortType&&(i.PortType=o.PortType),o.DataType&&(i.DataType=o.DataType),t.push(i)}for(var n=0;n<this.cardOutputs.length;n++){var r=this.cardOutputs[n],a={Hash:null,Direction:"output",Side:r.Side||"right",Label:r.Name||"Out ".concat(n+1)};r.PortType&&(a.PortType=r.PortType),r.DataType&&(a.DataType=r.DataType),t.push(a)}0===t.length&&(t.push({Hash:null,Direction:"input",Side:"left",Label:"In"}),t.push({Hash:null,Direction:"output",Side:"right",Label:"Out"}));var s={Hash:this.cardCode,Label:this.cardTitle,DefaultWidth:this.cardWidth,DefaultHeight:this.cardHeight,DefaultPorts:t,TitleBarColor:this.cardTitleBarColor,BodyStyle:JSON.parse(JSON.stringify(this.cardBodyStyle)),CardMetadata:{Name:this.cardName,Code:this.cardCode,Description:this.cardDescription,Icon:this.cardIcon,PreviewImage:this.cardPreviewImage,Documentation:this.cardDocumentation,Tooltip:this.cardTooltip,Enabled:this.cardEnabled,Category:this.cardCategory,Help:this.cardHelp}};return s.ShowTypeLabel=this.cardShowTypeLabel,s.PortLabelsOnHover=this.cardPortLabelsOnHover,s.PortLabelsVertical=this.cardPortLabelsVertical,s.PortLabelPadding=this.cardPortLabelPadding,s.PortLabelsOutside=this.cardPortLabelsOutside,s.LabelsInFront=this.cardLabelsInFront,this.cardPropertiesPanel&&(s.PropertiesPanel=JSON.parse(JSON.stringify(this.cardPropertiesPanel))),this.cardBodyContent&&(s.BodyContent=JSON.parse(JSON.stringify(this.cardBodyContent)),"function"==typeof this.options.BodyContent.RenderCallback&&(s.BodyContent.RenderCallback=this.options.BodyContent.RenderCallback)),s}},{key:"registerWithFlowView",value:function(t){if(!t||!t._NodeTypeProvider)return this.log.warn("PictFlowCard registerWithFlowView: no valid FlowView or NodeTypeProvider"),!1;var e=this.getNodeTypeConfiguration();return t._NodeTypeProvider.registerNodeType(e)}}])}(t("fable-serviceproviderbase"));e.exports=i,e.exports.default_configuration={Title:"Card",Name:!1,Code:"",Description:!1,Icon:!1,PreviewImage:!1,Documentation:!1,Tooltip:!1,Inputs:[],Outputs:[],Enabled:!0,TitleBarColor:"#2c3e50",BodyStyle:{},Width:180,Height:80,Category:"General",PropertiesPanel:null,BodyContent:null,ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsVertical:!1,PortLabelPadding:!1,PortLabelsOutside:!1,LabelsInFront:!0}},{"fable-serviceproviderbase":4}],11:[function(t,e,o){var i=function(t){function e(t,o,i){var n;_classCallCheck(this,e);var r=Object.assign({},e.default_configuration,o);return(n=_callSuper(this,e,[t,r,i])).serviceType="PictFlowCardPropertiesPanel",n.panelType=r.PanelType||"Base",n.panelTitle=r.Title||"Properties",n.panelWidth="number"==typeof r.Width?r.Width:300,n.panelHeight="number"==typeof r.Height?r.Height:200,n._FlowView=null,n._NodeData=null,n._ContentContainer=null,n._Configuration=r.Configuration||{},n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,e){this._ContentContainer=t,this._NodeData=e}},{key:"marshalToPanel",value:function(t){this._NodeData=t}},{key:"marshalFromPanel",value:function(t){}},{key:"destroy",value:function(){this._ContentContainer=null,this._NodeData=null}}])}(t("fable-serviceproviderbase"));e.exports=i,e.exports.default_configuration={PanelType:"Base",Title:"Properties",Width:300,Height:200,Configuration:{}}},{"fable-serviceproviderbase":4}],12:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Form",n._Metacontroller=null,n._InjectedSectionHash=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.Manifest){var i="pict-flow-panel-form-".concat(o.Hash);t.innerHTML='<div id="'.concat(i,'"></div>'),this.fable.AppData.Record=o;try{if(!this._Metacontroller){var n=null;this.fable.servicesMap.hasOwnProperty("PictFormMetacontroller")?n="PictFormMetacontroller":this.fable.servicesMap.hasOwnProperty("PictViewFormMetacontroller")&&(n="PictViewFormMetacontroller"),n&&(this._Metacontroller=this.fable.instantiateServiceProviderWithoutRegistration(n,{ViewIdentifier:"FlowPanelForm-".concat(o.Hash),DefaultDestinationAddress:"#".concat(i),AutoRender:!1,AutoPopulateAfterRender:!0,AutoSolveBeforeRender:!1}))}if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifestAndRender){var r="Pict-".concat(this._Metacontroller.UUID,"-FormContainer"),a=t.querySelector("#".concat(i));a&&(a.innerHTML='<div id="'.concat(r,'" class="pict-form"></div>'));var s=JSON.parse(JSON.stringify(this._Configuration.Manifest));this._InjectedSectionHash=s.Hash||null,this._Metacontroller.injectManifestAndRender(s)}else if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifest){var l=JSON.parse(JSON.stringify(this._Configuration.Manifest)),c=this._Metacontroller.injectManifest(l);this._InjectedSectionHash=l.Hash||null;var d=t.querySelector("#".concat(i));if(d&&c.length>0){for(var p="",h=0;h<c.length;h++){var u=c[h].options.DefaultDestinationAddress;u&&"#"===u.charAt(0)&&(u=u.substring(1)),p+='<div id="'.concat(u,'" class="pict-form-view"></div>')}d.innerHTML=p;for(var f=0;f<c.length;f++)c[f].render()}}else t.innerHTML="<em>pict-section-form is not available. Install it in your application to use Form panels.</em>"}catch(e){this.log.warn("FlowCardPropertiesPanel-Form render error: ".concat(e.message)),t.innerHTML="<em>Form render error: ".concat(e.message,"</em>")}}else t.innerHTML="<em>No form manifest configured</em>"}},{key:"marshalFromPanel",value:function(t){this._Metacontroller&&"function"==typeof this._Metacontroller.marshalFromView&&this._Metacontroller.marshalFromView()}},{key:"destroy",value:function(){this._Metacontroller=null,this._InjectedSectionHash=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Form",Configuration:{Manifest:null}})},{"../PictFlowCardPropertiesPanel.js":11}],13:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Markdown",n._ContentProvider=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){_superPropGet(e,"render",this,3)([t,o]),this._renderMarkdown()}},{key:"marshalToPanel",value:function(t){_superPropGet(e,"marshalToPanel",this,3)([t]),this._renderMarkdown()}},{key:"_renderMarkdown",value:function(){if(this._ContentContainer&&this._Configuration){var t="";if(this._Configuration.MarkdownAddress&&this._NodeData?t=this.fable.manifest.getValueByHash(this._NodeData,this._Configuration.MarkdownAddress)||"":this._Configuration.Markdown&&(t=this._Configuration.Markdown),t)try{if(this._ContentProvider||this.fable.servicesMap.hasOwnProperty("PictContentProvider")&&(this._ContentProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictContentProvider",{})),this._ContentProvider&&"function"==typeof this._ContentProvider.parseMarkdown){var e=this._ContentProvider.parseMarkdown(t);this._ContentContainer.innerHTML=e,"function"==typeof this._ContentProvider.renderKaTeXEquations&&this._ContentProvider.renderKaTeXEquations(this._ContentContainer),"function"==typeof this._ContentProvider.renderMermaidDiagrams&&this._ContentProvider.renderMermaidDiagrams(this._ContentContainer)}else this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(t),"</pre>")}catch(e){this.log.warn("FlowCardPropertiesPanel-Markdown render error: ".concat(e.message)),this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(t),"</pre>")}else this._ContentContainer.innerHTML="<em>No content</em>"}}},{key:"_escapeHTML",value:function(t){var e=document.createElement("div");return e.textContent=t,e.innerHTML}},{key:"destroy",value:function(){this._ContentProvider=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Markdown",Configuration:{Markdown:"",MarkdownAddress:""}})},{"../PictFlowCardPropertiesPanel.js":11}],14:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Template",n._TemplatesRegistered=!1,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.Templates){if(!this._TemplatesRegistered){for(var i=this._Configuration.Templates,n=0;n<i.length;n++)i[n].Hash&&i[n].Template&&this.fable.TemplateProvider.addTemplate(i[n].Hash,i[n].Template);this._TemplatesRegistered=!0}this._renderTemplate()}}},{key:"marshalToPanel",value:function(t){_superPropGet(e,"marshalToPanel",this,3)([t]),this._renderTemplate()}},{key:"_renderTemplate",value:function(){if(this._ContentContainer&&this._NodeData){var t=this._Configuration.TemplateHash;if(t){var e=this._NodeData,o=this.fable.parseTemplateByHash(t,e,null,[e]);this._ContentContainer.innerHTML=o}}}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Template",Configuration:{Templates:[],TemplateHash:""}})},{"../PictFlowCardPropertiesPanel.js":11}],15:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-View",n._OriginalDestination=null,n._ViewInstance=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.ViewHash){var i=this._Configuration.ViewHash,n="pict-flow-panel-view-".concat(o.Hash);t.innerHTML='<div id="'.concat(n,'"></div>');try{var r=this.pict||this.fable;r.views&&r.views[i]?(this._ViewInstance=r.views[i],this._OriginalDestination=this._ViewInstance.options.DefaultDestinationAddress,this._ViewInstance.options.DefaultDestinationAddress="#".concat(n),"function"==typeof this._ViewInstance.render&&this._ViewInstance.render()):t.innerHTML='<em>View "'.concat(i,'" not found</em>')}catch(e){this.log.warn("FlowCardPropertiesPanel-View render error: ".concat(e.message)),t.innerHTML="<em>View render error: ".concat(e.message,"</em>")}}else t.innerHTML="<em>No ViewHash configured</em>"}},{key:"marshalFromPanel",value:function(t){this._ViewInstance&&"function"==typeof this._ViewInstance.marshalFromView&&this._ViewInstance.marshalFromView()}},{key:"destroy",value:function(){this._ViewInstance&&this._OriginalDestination&&(this._ViewInstance.options.DefaultDestinationAddress=this._OriginalDestination),this._ViewInstance=null,this._OriginalDestination=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"View",Configuration:{ViewHash:""}})},{"../PictFlowCardPropertiesPanel.js":11}],16:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowCSS"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowCSS",r._FlowView=o&&o.FlowView?o.FlowView:null,r}return _inherits(e,t),_createClass(e,[{key:"getContainerCSS",value:function(){return"\n\t\t.pict-flow-container {\n\t\t\t/* ── Design Tokens ─────────────────────────────────────\n\t\t\t Override these custom properties to theme the flow diagram.\n\t\t\t Node-type classes (.pict-flow-node-{type}) can scope-override\n\t\t\t any variable for per-type variation. */\n\n\t\t\t/* Text */\n\t\t\t--pf-text-primary: #2c3e50;\n\t\t\t--pf-text-heading: #1a252f;\n\t\t\t--pf-text-secondary: #7f8c8d;\n\t\t\t--pf-text-tertiary: #8e99a4;\n\t\t\t--pf-text-placeholder: #95a5a6;\n\n\t\t\t/* Node */\n\t\t\t--pf-node-body-fill: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-node-body-stroke: #d0d4d8;\n\t\t\t--pf-node-body-stroke-hover: #b0b8c0;\n\t\t\t--pf-node-body-stroke-width: 1;\n\t\t\t--pf-node-body-radius: 8px;\n\t\t\t--pf-node-shadow: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.10));\n\t\t\t--pf-node-shadow-hover: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));\n\t\t\t--pf-node-shadow-selected: drop-shadow(0 2px 8px rgba(52, 152, 219, 0.25));\n\t\t\t--pf-node-shadow-dragging: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.20));\n\t\t\t--pf-node-title-fill: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-node-title-size: 11.5px;\n\t\t\t--pf-node-title-weight: 600;\n\t\t\t--pf-node-title-bar-color: #2c3e50;\n\t\t\t--pf-node-type-label-fill: #a0a8b0;\n\t\t\t--pf-node-selected-stroke: #3498db;\n\n\t\t\t/* Node Variants */\n\t\t\t--pf-node-start-fill: #eafaf1;\n\t\t\t--pf-node-start-stroke: var(--theme-color-status-success, #27ae60);\n\t\t\t--pf-node-end-fill: #e8f8f5;\n\t\t\t--pf-node-end-stroke: #1abc9c;\n\t\t\t--pf-node-halt-fill: #fdedec;\n\t\t\t--pf-node-halt-stroke: var(--theme-color-status-error, #e74c3c);\n\t\t\t--pf-node-decision-fill: #fff9e6;\n\t\t\t--pf-node-decision-stroke: var(--theme-color-status-warning, #f39c12);\n\n\t\t\t/* Ports */\n\t\t\t--pf-port-input-fill: #3498db;\n\t\t\t--pf-port-output-fill: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-port-stroke: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-port-stroke-width: 2;\n\t\t\t--pf-port-label-bg: rgba(255, 253, 240, 0.5);\n\t\t\t--pf-port-label-text: #2c3e50;\n\n\t\t\t/* Port Type Colors */\n\t\t\t--pf-port-event-in-fill: #3498db;\n\t\t\t--pf-port-event-out-fill: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-port-setting-fill: #e67e22;\n\t\t\t--pf-port-value-fill: #f1c40f;\n\t\t\t--pf-port-error-fill: var(--theme-color-status-error, #e74c3c);\n\n\t\t\t/* Connection Type Colors (match source port) */\n\t\t\t--pf-connection-event-in-stroke: #3498db;\n\t\t\t--pf-connection-event-out-stroke: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-connection-setting-stroke: #e67e22;\n\t\t\t--pf-connection-value-stroke: #f1c40f;\n\t\t\t--pf-connection-error-stroke: var(--theme-color-status-error, #e74c3c);\n\n\t\t\t/* Connections */\n\t\t\t--pf-connection-stroke: #95a5a6;\n\t\t\t--pf-connection-stroke-hover: #7f8c8d;\n\t\t\t--pf-connection-selected-stroke: #3498db;\n\n\t\t\t/* Panels */\n\t\t\t--pf-panel-bg: #ffffff;\n\t\t\t--pf-panel-border: #d0d4d8;\n\t\t\t--pf-panel-radius: 8px;\n\t\t\t--pf-panel-shadow: 0 4px 12px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);\n\t\t\t--pf-panel-titlebar-bg: #f7f8fa;\n\t\t\t--pf-panel-titlebar-border: #e8eaed;\n\t\t\t--pf-panel-title-color: #2c3e50;\n\n\t\t\t/* Tabs */\n\t\t\t--pf-tab-text: #8e99a4;\n\t\t\t--pf-tab-text-hover: #5a6a7a;\n\t\t\t--pf-tab-active-border: var(--pf-node-selected-stroke);\n\t\t\t--pf-resize-handle-hover: #e0e3e6;\n\n\t\t\t/* Forms & Inputs */\n\t\t\t--pf-input-border: #d5d8dc;\n\t\t\t--pf-input-border-focus: #3498db;\n\t\t\t--pf-divider-light: #ecf0f1;\n\t\t\t--pf-divider-medium: #e8eaed;\n\n\t\t\t/* Buttons */\n\t\t\t--pf-button-border: #bdc3c7;\n\t\t\t--pf-button-hover-border: #95a5a6;\n\t\t\t--pf-button-hover-bg: #ecf0f1;\n\t\t\t--pf-button-active-bg: #d5dbdb;\n\t\t\t--pf-button-danger-text: #e74c3c;\n\t\t\t--pf-button-danger-hover-bg: #fdedec;\n\t\t\t--pf-button-close-color: #b0b8c0;\n\n\t\t\t/* Badges */\n\t\t\t--pf-badge-category-bg: #f0f2f4;\n\t\t\t--pf-badge-category-text: #6b7b8d;\n\t\t\t--pf-badge-code-bg: #eaf2f8;\n\t\t\t--pf-badge-code-text: #2980b9;\n\n\t\t\t/* Info Panel */\n\t\t\t--pf-port-item-bg: #f8f9fa;\n\n\t\t\t/* Toolbar */\n\t\t\t--pf-toolbar-bg: #ffffff;\n\t\t\t--pf-toolbar-border: var(--theme-color-border-default, #e0e0e0);\n\n\t\t\t/* Palette Cards */\n\t\t\t--pf-card-border: #d5d8dc;\n\t\t\t--pf-card-hover-bg: #eaf2f8;\n\t\t\t--pf-card-hover-shadow: 0 1px 3px rgba(52, 152, 219, 0.15);\n\n\t\t\t/* Canvas */\n\t\t\t--pf-canvas-bg: #fafafa;\n\t\t\t--pf-grid-stroke: var(--theme-color-border-light, #e8e8e8);\n\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tmin-height: 400px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-color: var(--pf-canvas-bg);\n\t\t\tborder: 1px solid var(--pf-toolbar-border);\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.pict-flow-svg-container {\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-svg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-svg.panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-svg.connecting {\n\t\t\tcursor: crosshair;\n\t\t}\n\t\t.pict-flow-grid-pattern line {\n\t\t\tstroke: var(--pf-grid-stroke);\n\t\t\tstroke-width: 0.5;\n\t\t}\n\t\t"}},{key:"getNodeCSS",value:function(){return'\n\t\t.pict-flow-node {\n\t\t\tcursor: pointer;\n\t\t\tfilter: var(--pf-node-shadow);\n\t\t\ttransition: filter 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover {\n\t\t\tfilter: var(--pf-node-shadow-hover);\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node.selected {\n\t\t\tfilter: var(--pf-node-shadow-selected);\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node.dragging {\n\t\t\topacity: 0.9;\n\t\t\tcursor: grabbing;\n\t\t\tfilter: var(--pf-node-shadow-dragging);\n\t\t}\n\t\t.pict-flow-node-body {\n\t\t\tfill: var(--pf-node-body-fill);\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: var(--pf-node-body-stroke-width);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t\ttransition: stroke 0.2s, stroke-width 0.2s;\n\t\t}\n\t\t.pict-flow-node-title-bar {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t}\n\t\t.pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t}\n\t\t.pict-flow-node-title {\n\t\t\tfill: var(--pf-node-title-fill);\n\t\t\tfont-size: var(--pf-node-title-size);\n\t\t\tfont-weight: var(--pf-node-title-weight);\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tletter-spacing: 0.2px;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-type-label {\n\t\t\tfill: var(--pf-node-type-label-fill);\n\t\t\tfont-size: 9.5px;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.3px;\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-type-label {\n\t\t\topacity: 1;\n\t\t}\n\t\t.pict-flow-node-card-code {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-card-code {\n\t\t\topacity: 1;\n\t\t}\n\t\t/* Title-bar icon: invert SVG paths to white for dark title bars */\n\t\t.pict-flow-node-title-icon {\n\t\t\tfilter: brightness(0) invert(1);\n\t\t}\n\t\t'}},{key:"getBodyContentCSS",value:function(){return'\n\t\t.pict-flow-node-body-content {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-body-content-fo {\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.pict-flow-node-body-content-html {\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-node-body-content-canvas {\n\t\t\tdisplay: block;\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t'}},{key:"getNodeVariantCSS",value:function(){return"\n\t\t.pict-flow-node-decision .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-decision-fill);\n\t\t\tstroke: var(--pf-node-decision-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-start .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-start-fill);\n\t\t\tstroke: var(--pf-node-start-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-end .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-end-fill);\n\t\t\tstroke: var(--pf-node-end-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-halt-fill);\n\t\t\tstroke: var(--pf-node-halt-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t"}},{key:"getPortCSS",value:function(){return'\n\t\t.pict-flow-port {\n\t\t\tcursor: crosshair;\n\t\t\ttransition: r 0.15s, filter 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));\n\t\t}\n\t\t.pict-flow-port.input {\n\t\t\tfill: var(--pf-port-input-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port.output {\n\t\t\tfill: var(--pf-port-output-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port:hover {\n\t\t\tr: 7;\n\t\t\tfilter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.20));\n\t\t}\n\t\t/* Port type color overrides */\n\t\t.pict-flow-port.port-type-event-in {\n\t\t\tfill: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-event-out {\n\t\t\tfill: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-setting {\n\t\t\tfill: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-value {\n\t\t\tfill: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-error {\n\t\t\tfill: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-port-label {\n\t\t\tfont-size: 8px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port label badge background */\n\t\t.pict-flow-port-label-bg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port labels on hover: hidden by default, revealed on node hover */\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label-bg {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label-bg {\n\t\t\topacity: 1;\n\t\t}\n\t\t'}},{key:"getConnectionCSS",value:function(){return"\n\t\t.pict-flow-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: pointer;\n\t\t\ttransition: stroke 0.15s;\n\t\t}\n\t\t.pict-flow-connection:hover {\n\t\t\tstroke: var(--pf-connection-stroke-hover);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t.pict-flow-connection.selected {\n\t\t\tstroke: var(--pf-connection-selected-stroke);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t/* Connection type color overrides (based on source port type) */\n\t\t.pict-flow-connection.conn-type-event-in {\n\t\t\tstroke: var(--pf-connection-event-in-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-event-out {\n\t\t\tstroke: var(--pf-connection-event-out-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-setting {\n\t\t\tstroke: var(--pf-connection-setting-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-value {\n\t\t\tstroke: var(--pf-connection-value-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-error {\n\t\t\tstroke: var(--pf-connection-error-stroke);\n\t\t}\n\t\t.pict-flow-connection-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 12;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-drag-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-dasharray: 6 3;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t"}},{key:"getHandleCSS",value:function(){return"\n\t\t.pict-flow-connection-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getTetherCSS",value:function(){return"\n\t\t.pict-flow-tether-line {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t\tstroke-dasharray: 6 4;\n\t\t\tpointer-events: visibleStroke;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-line.selected {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-tether-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 10;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getPanelCSS",value:function(){return'\n\t\t.pict-flow-node-panel-indicator {\n\t\t\tfill: var(--pf-node-selected-stroke);\n\t\t\tstroke: none;\n\t\t\topacity: 0.6;\n\t\t\tcursor: pointer;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.pict-flow-node-panel-indicator:hover {\n\t\t\topacity: 1.0;\n\t\t}\n\t\t.pict-flow-panel-foreign-object {\n\t\t\toverflow: visible;\n\t\t}\n\t\t.pict-flow-panel {\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-panel-border);\n\t\t\tborder-radius: var(--pf-panel-radius);\n\t\t\tbox-shadow: var(--pf-panel-shadow);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-panel-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 8px 12px;\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-panel-titlebar.dragging {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-panel-title-text {\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tletter-spacing: 0.1px;\n\t\t}\n\t\t.pict-flow-panel-close-btn {\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-button-close-color);\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1;\n\t\t\tpadding: 4px;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.pict-flow-panel-close-btn:hover {\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tbackground-color: rgba(231, 76, 60, 0.08);\n\t\t}\n\t\t.pict-flow-panel-content {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tmin-height: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.pict-flow-panel-tab-pane {\n\t\t\tpadding: 10px 12px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t'}},{key:"getInfoPanelCSS",value:function(){return'\n\t\t.pict-flow-info-panel {\n\t\t\tpadding: 2px 0;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-info-panel-header {\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 6px;\n\t\t\tcolor: var(--pf-text-heading);\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon {\n\t\t\tfont-size: 14px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-info-panel-description {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-bottom: 10px;\n\t\t\tline-height: 1.45;\n\t\t}\n\t\t.pict-flow-info-panel-badges {\n\t\t\tmargin-bottom: 10px;\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-flow-info-panel-badge {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 2px 8px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-flow-info-panel-badge.category {\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tcolor: var(--pf-badge-category-text);\n\t\t}\n\t\t.pict-flow-info-panel-badge.code {\n\t\t\tbackground: var(--pf-badge-code-bg);\n\t\t\tcolor: var(--pf-badge-code-text);\n\t\t\tfont-family: "SF Mono", "Fira Code", monospace;\n\t\t}\n\t\t.pict-flow-info-panel-section {\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.pict-flow-info-panel-section-title {\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tmargin-bottom: 4px;\n\t\t\tpadding-bottom: 2px;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-info-panel-port {\n\t\t\tpadding: 3px 8px;\n\t\t\tbackground: var(--pf-port-item-bg);\n\t\t\tmargin-bottom: 3px;\n\t\t\tfont-size: 11px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-info-panel-port.input {\n\t\t\tborder-left: 3px solid var(--pf-port-input-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.output {\n\t\t\tborder-left: 3px solid var(--pf-port-output-fill);\n\t\t}\n\t\t/* Info panel port type color overrides */\n\t\t.pict-flow-info-panel-port.port-type-event-in {\n\t\t\tborder-left-color: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-event-out {\n\t\t\tborder-left-color: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-setting {\n\t\t\tborder-left-color: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-value {\n\t\t\tborder-left-color: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-error {\n\t\t\tborder-left-color: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port-constraint {\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t/* Port summary section appended below form panels */\n\t\t.pict-flow-port-summary {\n\t\t\tmargin-top: 12px;\n\t\t\tpadding-top: 8px;\n\t\t\tborder-top: 1px solid var(--pf-divider-medium);\n\t\t}\n\t\t.pict-flow-info-panel-port.event {\n\t\t\tborder-left: 3px solid var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.value {\n\t\t\tborder-left: 3px solid var(--pf-port-value-fill);\n\t\t}\n\t\t'}},{key:"getNodePropsEditorCSS",value:function(){return"\n\t\t.pict-flow-node-props-fields {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-node-props-field {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-flow-node-props-label {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 72px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-node-props-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 11px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-flow-node-props-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-node-props-color {\n\t\t\twidth: 28px;\n\t\t\theight: 24px;\n\t\t\tpadding: 1px;\n\t\t\tcursor: pointer;\n\t\t\tflex: 0 0 28px;\n\t\t}\n\t\t"}},{key:"getPanelTabsCSS",value:function(){return"\n\t\t.pict-flow-panel-resize-handle {\n\t\t\theight: 6px;\n\t\t\tcursor: ns-resize;\n\t\t\tbackground: transparent;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-panel-resize-handle::after {\n\t\t\tcontent: '';\n\t\t\twidth: 24px;\n\t\t\theight: 2px;\n\t\t\tborder-radius: 1px;\n\t\t\tbackground: var(--pf-resize-handle-hover);\n\t\t\ttransition: background-color 0.15s, width 0.15s;\n\t\t}\n\t\t.pict-flow-panel-resize-handle:hover::after {\n\t\t\tbackground: var(--pf-button-hover-border);\n\t\t\twidth: 32px;\n\t\t}\n\t\t.pict-flow-panel-tabbar {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t}\n\t\t.pict-flow-panel-tab {\n\t\t\tflex: 1;\n\t\t\tpadding: 5px 8px;\n\t\t\tfont-size: 11px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-tab-text);\n\t\t\tborder-top: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-top-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-panel-tab:hover {\n\t\t\tcolor: var(--pf-tab-text-hover);\n\t\t}\n\t\t.pict-flow-panel-tab.active {\n\t\t\tborder-top-color: var(--pf-node-selected-stroke);\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-flow-panel-help-content {\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-panel-help-content p {\n\t\t\tmargin: 0 0 8px 0;\n\t\t}\n\t\t"}},{key:"getFullscreenCSS",value:function(){return"\n\t\t.pict-flow-fullscreen {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100vw;\n\t\t\theight: 100vh;\n\t\t\tz-index: 9999;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\tmin-height: 100vh;\n\t\t}\n\t\t.pict-flow-fullscreen .pict-flow-svg {\n\t\t\tmin-height: calc(100vh - 50px);\n\t\t}\n\t\t"}},{key:"getToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-toolbar-border);\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t.pict-flow-toolbar-group {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tborder-right: 1px solid var(--pf-toolbar-border);\n\t\t}\n\t\t.pict-flow-toolbar-group:last-child {\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.65em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-size: 0.85em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tborder-color: var(--pf-button-hover-border);\n\t\t}\n\t\t.pict-flow-toolbar-btn:active {\n\t\t\tbackground-color: var(--pf-button-active-bg);\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-btn-text {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-toolbar-btn-chevron {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.pict-flow-toolbar-right {\n\t\t\tmargin-left: auto;\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-label {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-right: 0.25em;\n\t\t}\n\t\t.pict-flow-toolbar-select {\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t"}},{key:"getPaletteCSS",value:function(){return"\n\t\t.pict-flow-palette-category {\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.pict-flow-palette-category:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.pict-flow-palette-category-label {\n\t\t\tfont-size: 0.7em;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tmargin-bottom: 0.35em;\n\t\t\tpadding-bottom: 0.2em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-palette-cards {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.35em;\n\t\t}\n\t\t.pict-flow-palette-card {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.6em;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-panel-bg);\n\t\t\tfont-size: 0.8em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-palette-card:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-node-selected-stroke);\n\t\t\tbox-shadow: var(--pf-card-hover-shadow);\n\t\t}\n\t\t.pict-flow-palette-card.disabled {\n\t\t\topacity: 0.45;\n\t\t\tpointer-events: none;\n\t\t\tcursor: default;\n\t\t}\n\t\t.pict-flow-palette-card-icon {\n\t\t\tfont-size: 1.1em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-palette-card-swatch {\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tborder-radius: 2px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-palette-card-title {\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-palette-card-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.pict-flow-toolbar-select.layout-select {\n\t\t\tmin-width: 120px;\n\t\t\tmax-width: 200px;\n\t\t}\n\t\t"}},{key:"getPopupCSS",value:function(){return'\n\t\t.pict-flow-toolbar-popup-anchor {\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-toolbar-popup {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1000;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 6px;\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tmin-width: 240px;\n\t\t\tmax-height: 340px;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 0.35em 0;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-flow-popup-search-wrapper {\n\t\t\tposition: relative;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-popup-search-icon {\n\t\t\tposition: absolute;\n\t\t\tleft: 0.85em;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t\tpointer-events: none;\n\t\t\tline-height: 1;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.pict-flow-popup-search {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em 0.4em 2em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-search:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-list-item {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-list-item:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-list-item-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-list-item-label {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-list-item-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tpadding: 0.1em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-popup-divider {\n\t\t\theight: 1px;\n\t\t\tbackground: var(--pf-divider-light);\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-flow-popup-list-empty {\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tpadding: 1.5em 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-flow-popup-layout-save {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-layout-save:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-save-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-name {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-popup-layout-delete {\n\t\t\tdisplay: none;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover .pict-flow-popup-layout-delete {\n\t\t\tdisplay: inline-flex;\n\t\t}\n\t\t.pict-flow-popup-layout-delete:hover {\n\t\t\tbackground-color: var(--pf-button-danger-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-settings-section {\n\t\t\tpadding: 0.5em 0.75em;\n\t\t}\n\t\t.pict-flow-popup-settings-label {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.8em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tmargin-bottom: 0.35em;\n\t\t}\n\t\t.pict-flow-popup-settings-select {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-settings-select:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-settings-slider-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.pict-flow-popup-settings-slider {\n\t\t\tflex: 1;\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\theight: 4px;\n\t\t\tbackground: var(--pf-input-border);\n\t\t\tborder-radius: 2px;\n\t\t\toutline: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-webkit-slider-thumb {\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-moz-range-thumb {\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t\tborder: none;\n\t\t}\n\t\t.pict-flow-popup-settings-slider-value {\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 2.5em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t'}},{key:"getCollapsedToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar-collapsed {\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: 8px;\n\t\t\tz-index: 100;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-toolbar-collapsed.visible {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn {\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 2px 6px rgba(0,0,0,0.1);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tbox-shadow: 0 2px 8px rgba(0,0,0,0.15);\n\t\t}\n\t\t"}},{key:"getFloatingToolbarCSS",value:function(){return"\n\t\t.pict-flow-floating-toolbar {\n\t\t\tposition: absolute;\n\t\t\tz-index: 100;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 2px;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 8px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-floating-grip {\n\t\t\tcursor: grab;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-grip:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-grip:active {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-floating-btn {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: transparent;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-floating-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-separator {\n\t\t\theight: 1px;\n\t\t\tbackground-color: var(--pf-divider-light);\n\t\t\tmargin: 2px 4px;\n\t\t}\n\t\t/* Collapsed floating toolbar — grip-only draggable square */\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-btn,\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-separator {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed {\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip span {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t"}},{key:"getIconCSS",value:function(){return"\n\t\t.pict-flow-icon-svg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-palette-card-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-right: 4px;\n\t\t}\n\t\t.pict-flow-panel-close-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-panel-close-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-palette-toggle-arrow svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t"}},{key:"getBracketNodeCSS",value:function(){return"\n\t\t/* Bracket outline path */\n\t\t.pict-flow-node-bracket {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\n\t\t/* Bracket fill rects: no stroke, no rounded corners.\n\t\t Uses parent-qualified selectors to beat variant rules\n\t\t (e.g. .pict-flow-node-start .pict-flow-node-body). */\n\t\t.pict-flow-node .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t\trx: 0;\n\t\t\try: 0;\n\t\t}\n\t\t/* Beat hover rule: .pict-flow-node:hover .pict-flow-node-body */\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t/* Beat selected rule: .pict-flow-node.selected .pict-flow-node-body */\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t"}},{key:"generateCSS",value:function(){var t=this.getContainerCSS()+this.getNodeCSS()+this.getBodyContentCSS()+this.getNodeVariantCSS()+this.getPortCSS()+this.getConnectionCSS()+this.getHandleCSS()+this.getTetherCSS()+this.getPanelCSS()+this.getInfoPanelCSS()+this.getNodePropsEditorCSS()+this.getPanelTabsCSS()+this.getBracketNodeCSS()+this.getFullscreenCSS()+this.getToolbarCSS()+this.getPaletteCSS()+this.getPopupCSS()+this.getCollapsedToolbarCSS()+this.getFloatingToolbarCSS()+this.getIconCSS();if(this._FlowView&&this._FlowView._ThemeProvider){var e=this._FlowView._ThemeProvider.getActiveTheme();if(e&&e.CSSVariables&&Object.keys(e.CSSVariables).length>0){var o=".pict-flow-container {\n";for(var i in e.CSSVariables)o+="\t"+i+": "+e.CSSVariables[i]+";\n";t+=o+="}\n"}e&&e.AdditionalCSS&&(t+=e.AdditionalCSS)}return t}},{key:"registerCSS",value:function(){this.fable&&this.fable.CSSMap?(this.fable.CSSMap.removeCSS("PictSectionFlow-CSS"),this.fable.CSSMap.addCSS("PictSectionFlow-CSS",this.generateCSS(),500,"PictProviderFlowCSS"),this.fable.CSSMap.injectCSS()):this.log.warn("PictProviderFlowCSS: CSSMap not available; CSS not registered.")}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],17:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowConnectorShapes",n._FlowView=o&&o.FlowView?o.FlowView:null,n._DefaultShapes={port:{ElementType:"circle",Attributes:{r:"5"},ClassName:"pict-flow-port"},"panel-indicator":{ElementType:"rect",Attributes:{rx:"2",ry:"2"},ClassName:"pict-flow-node-panel-indicator"},"connection-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection"},"connection-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection-hitarea"},"connection-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle"},"connection-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle-midpoint"},"drag-connection":{ElementType:"path",Attributes:{},ClassName:"pict-flow-drag-connection"},"tether-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-line"},"tether-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-hitarea"},"tether-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle"},"tether-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle-midpoint"},"arrowhead-connection":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#95a5a6"},"arrowhead-connection-selected":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#3498db"},"arrowhead-tether":{MarkerWidth:"4",MarkerHeight:"6",RefX:"6",RefY:"3",Points:"0 0, 4 3, 0 6",Fill:"#95a5a6"}},n._OriginalShapes=JSON.parse(JSON.stringify(n._DefaultShapes)),n}return _inherits(e,t),_createClass(e,[{key:"applyThemeOverrides",value:function(t){if(t&&"object"===_typeof(t))for(var e in t)this._DefaultShapes.hasOwnProperty(e)?Object.assign(this._DefaultShapes[e],t[e]):this._DefaultShapes[e]=t[e]}},{key:"resetToDefaults",value:function(){this._DefaultShapes=JSON.parse(JSON.stringify(this._OriginalShapes))}},{key:"getShapeConfig",value:function(t){return this._DefaultShapes.hasOwnProperty(t)?this._DefaultShapes[t]:null}},{key:"setShapeConfig",value:function(t,e){this._DefaultShapes[t]=e}},{key:"getShapeKeys",value:function(){return Object.keys(this._DefaultShapes)}},{key:"createPortElement",value:function(t,e,o){var i=this._DefaultShapes.port,n=this._FlowView._SVGHelperProvider.createSVGElement(i.ElementType),r=i.ClassName+" "+t.Direction;for(var a in t.PortType&&(r+=" port-type-"+t.PortType),n.setAttribute("class",r),n.setAttribute("cx",String(e.x)),n.setAttribute("cy",String(e.y)),i.Attributes)n.setAttribute(a,i.Attributes[a]);return n.setAttribute("data-port-hash",t.Hash),n.setAttribute("data-node-hash",o),n.setAttribute("data-port-direction",t.Direction),t.PortType&&n.setAttribute("data-port-type",t.PortType),n.setAttribute("data-element-type","port"),n}},{key:"createPanelIndicatorElement",value:function(t,e,o,i,n){var r=this._DefaultShapes["panel-indicator"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var s in a.setAttribute("class",r.ClassName),a.setAttribute("x",String(e)),a.setAttribute("y",String(o)),a.setAttribute("width",String(i)),a.setAttribute("height",String(n)),r.Attributes)a.setAttribute(s,r.Attributes[s]);return a.setAttribute("data-node-hash",t),a.setAttribute("data-element-type","panel-indicator"),a}},{key:"createConnectionPathElement",value:function(t,e,o,i){var n=this._DefaultShapes["connection-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType);r.setAttribute("class",n.ClassName+(o?" selected":"")),r.setAttribute("d",t),r.setAttribute("data-connection-hash",e),r.setAttribute("data-element-type","connection");o?this._DefaultShapes["arrowhead-connection-selected"]:this._DefaultShapes["arrowhead-connection"];var a=o?"flow-arrowhead-selected-"+i:"flow-arrowhead-"+i;return r.setAttribute("marker-end","url(#"+a+")"),r}},{key:"createConnectionHitAreaElement",value:function(t,e){var o=this._DefaultShapes["connection-hitarea"],i=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return i.setAttribute("class",o.ClassName),i.setAttribute("d",t),i.setAttribute("data-connection-hash",e),i.setAttribute("data-element-type","connection-hitarea"),i}},{key:"createHandleElement",value:function(t,e,o,i,n){var r=this._DefaultShapes[n]||this._DefaultShapes["connection-handle"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var s in a.setAttribute("class",r.ClassName),a.setAttribute("cx",String(o)),a.setAttribute("cy",String(i)),r.Attributes)a.setAttribute(s,r.Attributes[s]);return a.setAttribute("data-handle-type",e),a}},{key:"createFullHandle",value:function(t,e,o,i,n,r,a,s){var l=this.createHandleElement(e,o,i,n,r);return l.setAttribute("data-element-type",a),l.setAttribute(s,e),t.appendChild(l),l}},{key:"createDragConnectionElement",value:function(t){var e=this._DefaultShapes["drag-connection"],o=this._FlowView._SVGHelperProvider.createSVGElement(e.ElementType);return o.setAttribute("class",e.ClassName),o.setAttribute("d",t),o}},{key:"createTetherPathElement",value:function(t,e,o,i){var n=this._DefaultShapes["tether-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType);return r.setAttribute("class",n.ClassName+(o?" selected":"")),r.setAttribute("d",t),r.setAttribute("marker-end","url(#flow-tether-arrowhead-"+i+")"),r.setAttribute("data-element-type","tether"),r.setAttribute("data-panel-hash",e),r}},{key:"createTetherHitAreaElement",value:function(t,e){var o=this._DefaultShapes["tether-hitarea"],i=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return i.setAttribute("class",o.ClassName),i.setAttribute("d",t),i.setAttribute("data-element-type","tether-hitarea"),i.setAttribute("data-panel-hash",e),i}},{key:"generateMarkerDefs",value:function(t){var e=this._DefaultShapes["arrowhead-connection"],o=this._DefaultShapes["arrowhead-connection-selected"],i=this._DefaultShapes["arrowhead-tether"],n="";n+='<marker id="flow-arrowhead-'+t+'" markerWidth="'+e.MarkerWidth+'" markerHeight="'+e.MarkerHeight+'" refX="'+e.RefX+'" refY="'+e.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+e.Points+'" fill="'+e.Fill+'" /></marker>';var r={"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"};for(var a in r)n+='<marker id="flow-arrowhead-'+a+"-"+t+'" markerWidth="'+e.MarkerWidth+'" markerHeight="'+e.MarkerHeight+'" refX="'+e.RefX+'" refY="'+e.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+e.Points+'" fill="'+r[a]+'" /></marker>';return n+='<marker id="flow-arrowhead-selected-'+t+'" markerWidth="'+o.MarkerWidth+'" markerHeight="'+o.MarkerHeight+'" refX="'+o.RefX+'" refY="'+o.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+o.Points+'" fill="'+o.Fill+'" /></marker>',n+='<marker id="flow-tether-arrowhead-'+t+'" markerWidth="'+i.MarkerWidth+'" markerHeight="'+i.MarkerHeight+'" refX="'+i.RefX+'" refY="'+i.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+i.Points+'" fill="'+i.Fill+'" /></marker>'}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],18:[function(t,e,o){var i=t("pict-provider"),n={ProviderIdentifier:"PictProviderFlowEventHandler"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowEventHandler",r._FlowView=o&&o.FlowView?o.FlowView:null,r._Handlers={},r}return _inherits(e,t),_createClass(e,[{key:"registerHandler",value:function(t,e,o){if("function"!=typeof e)return this.log.warn("PictProviderFlowEventHandler registerHandler: handler for '".concat(t,"' is not a function")),null;this._Handlers[t]||(this._Handlers[t]=[]);var i=o||"handler-".concat(this.fable.getUUID());return this._Handlers[t].push({Hash:i,Handler:e}),this.log.trace("PictProviderFlowEventHandler registered handler '".concat(i,"' for event '").concat(t,"'")),i}},{key:"removeHandler",value:function(t,e){if(!this._Handlers[t])return!1;var o=this._Handlers[t].findIndex(function(t){return t.Hash===e});return o>=0&&(this._Handlers[t].splice(o,1),!0)}},{key:"removeAllHandlers",value:function(t){t?this._Handlers[t]=[]:this._Handlers={}}},{key:"fireEvent",value:function(t,e){if(this.log.trace("PictProviderFlowEventHandler firing event '".concat(t,"'")),this._Handlers[t]&&0!==this._Handlers[t].length)for(var o=0;o<this._Handlers[t].length;o++){var i=this._Handlers[t][o];try{i.Handler(e,this._FlowView)}catch(e){this.log.error("PictProviderFlowEventHandler error in handler '".concat(i.Hash,"' for event '").concat(t,"': ").concat(e.message))}}}},{key:"hasHandlers",value:function(t){return!!(this._Handlers[t]&&this._Handlers[t].length>0)}},{key:"getHandlerCount",value:function(t){return this._Handlers[t]?this._Handlers[t].length:0}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-provider":8}],19:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowGeometry",n}return _inherits(e,t),_createClass(e,[{key:"getEdgeFromSide",value:function(t){switch(t){case"left-top":case"left":case"left-bottom":return"left";case"right-top":case"right":case"right-bottom":default:return"right";case"top-left":case"top":case"top-right":return"top";case"bottom-left":case"bottom":case"bottom-right":return"bottom"}}},{key:"sideDirection",value:function(t){switch(this.getEdgeFromSide(t)){case"left":return{dx:-1,dy:0};case"right":default:return{dx:1,dy:0};case"top":return{dx:0,dy:-1};case"bottom":return{dx:0,dy:1}}}},{key:"getEdgeCenter",value:function(t,e){switch(e){case"left":return{x:t.X,y:t.Y+t.Height/2};case"right":default:return{x:t.X+t.Width,y:t.Y+t.Height/2};case"top":return{x:t.X+t.Width/2,y:t.Y};case"bottom":return{x:t.X+t.Width/2,y:t.Y+t.Height}}}},{key:"getPortLocalPosition",value:function(t,e,o,i,n,r,a){var s=this.getEdgeFromSide(t),l=a?this._computeAdaptiveZone(t,a):this._getZoneFromSide(t),c=this._getZoneFromSide(t),d="start";if(c.start>=.5?d="end":c.start>=.17&&(d="center"),"left"===s||"right"===s){var p="left"===s?0:i,h=n-r-16,u=r+h*l.start,f=h*(l.end-l.start)-16*(o+1);f<0&&(f=0);var w=0;return"end"===d?w=f:"center"===d&&(w=f/2),{x:p,y:u+w+16*(e+1)}}var v="top"===s?0:n,g=i*l.start,y=i*(l.end-l.start)-16*(o+1);y<0&&(y=0);var b=0;return"end"===d?b=y:"center"===d&&(b=y/2),{x:g+b+16*(e+1),y:v}}},{key:"_getZoneFromSide",value:function(t){switch(t){case"left-top":case"right-top":case"top-left":case"bottom-left":return{start:0,end:.333};case"left":case"right":case"top":case"bottom":return{start:.333,end:.667};case"left-bottom":case"right-bottom":case"top-right":case"bottom-right":return{start:.667,end:1};default:return{start:0,end:1}}}},{key:"_getZoneKeysForEdge",value:function(t){switch(t){case"left":return["left-top","left","left-bottom"];case"right":default:return["right-top","right","right-bottom"];case"top":return["top-left","top","top-right"];case"bottom":return["bottom-left","bottom","bottom-right"]}}},{key:"_computeAdaptiveZone",value:function(t,e){for(var o=this.getEdgeFromSide(t),i=this._getZoneKeysForEdge(o),n=0,r={},a=0;a<i.length;a++){var s=i[a],l=e[s]||0,c=l>0?16*(l+1):0;r[s]=c,n+=c}if(0===n)return this._getZoneFromSide(t);for(var d=0,p=0;p<i.length;p++){var h=i[p],u=r[h]/n;if(h===t)return{start:d,end:d+u};d+=u}return this._getZoneFromSide(t)}},{key:"buildPortCountsBySide",value:function(t){var e={};if(!t||!Array.isArray(t))return e;for(var o=0;o<t.length;o++){var i=t[o].Side||("input"===t[o].Direction?"left":"right");e[i]||(e[i]=0),e[i]++}return e}},{key:"computeMinimumNodeHeight",value:function(t,e){if(!t||!Array.isArray(t)||0===t.length)return 0;var o=this.buildPortCountsBySide(t),i={};for(var n in o){var r=this.getEdgeFromSide(n);if("left"===r||"right"===r){var a=16*(o[n]+1);i[r]||(i[r]=0),i[r]+=a}}var s=0;for(var l in i){var c=e+16+i[l];c>s&&(s=c)}return Math.ceil(s)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],20:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowIcons"},r={ITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="6" r="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="6" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="18" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 9v2M9.5 12.5L6 15.5M14.5 12.5L18 15.5" stroke="#2c3e50" stroke-width="2"/></svg>',SW:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M3 12h5M16 12h5M14.8 9.2l3.7-5.2M14.8 14.8l3.7 5.2" stroke="#2c3e50" stroke-width="2"/></svg>',EACH:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',FREAD:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M9 13h6M9 17h4" stroke="#2c3e50" stroke-width="2"/></svg>',FWRITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M12 13v5M9.5 15.5L12 13l2.5 2.5" stroke="#2c3e50" stroke-width="2"/></svg>',LOG:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="7.5" cy="8" r="1" fill="#2c3e50"/><circle cx="7.5" cy="12" r="1" fill="#2c3e50"/><circle cx="7.5" cy="16" r="1" fill="#2c3e50"/><path d="M11 8h5.5M11 12h5.5M11 16h3.5" stroke="#2c3e50" stroke-width="2"/></svg>',GET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="6.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-5.15-5.15" stroke="#2c3e50" stroke-width="2"/></svg>',SET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4.5 1.5L4 16Z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M14 6l3 3" stroke="#2c3e50" stroke-width="2"/></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>',"exit-fullscreen":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="M14 10l7-7"/><path d="M3 21l7-7"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',"chevron-down":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/></svg>',cards:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="16" height="12" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M6 7V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-2" stroke="#2c3e50" stroke-width="2"/></svg>',layout:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="3" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="15" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="11" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',collapse:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',expand:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',grip:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="#2c3e50"><circle cx="9" cy="5" r="1.5"/><circle cx="15" cy="5" r="1.5"/><circle cx="9" cy="12" r="1.5"/><circle cx="15" cy="12" r="1.5"/><circle cx="9" cy="19" r="1.5"/><circle cx="15" cy="19" r="1.5"/></svg>',settings:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3" fill="#d5e8f7"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',trash:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M17 21v-8H7v8" stroke="#2c3e50" stroke-width="2"/><path d="M7 3v5h8" stroke="#2c3e50" stroke-width="2"/></svg>',"auto-layout":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="2" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="2" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v4M6 16v-4h12v4" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-in":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M11 8v6M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-out":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-fit":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V3h4"/><path d="M17 3h4v4"/><path d="M21 17v4h-4"/><path d="M7 21H3v-4"/><rect x="7" y="7" width="10" height="10" rx="1.5" fill="#d5e8f7"/></svg>',dock:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="4" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 20V11M8 14l4-4 4 4" stroke="#2c3e50" stroke-width="2"/></svg>',restore:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/></svg>',"delete-node":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',default:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="12" cy="12" r="2.5" fill="#2c3e50"/></svg>'},a=function(t){function e(t,o,i){var a;if(_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowIcons",a._FlowView=o&&o.FlowView?o.FlowView:null,a._Icons=JSON.parse(JSON.stringify(r)),o&&o.AdditionalIcons&&"object"===_typeof(o.AdditionalIcons))for(var s=Object.keys(o.AdditionalIcons),l=0;l<s.length;l++)a._Icons[s[l]]=o.AdditionalIcons[s[l]];return a}return _inherits(e,t),_createClass(e,[{key:"registerIconTemplates",value:function(){if(this.fable&&this.fable.TemplateProvider)for(var t=Object.keys(this._Icons),e=0;e<t.length;e++){var o="Flow-Icon-"+t[e];this.fable.TemplateProvider.getTemplate(o)||this.fable.TemplateProvider.addTemplate(o,this._Icons[t[e]])}else this.log.warn("PictProviderFlowIcons: TemplateProvider not available; icon templates not registered.")}},{key:"isEmojiIcon",value:function(t){if(!t||"string"!=typeof t)return!1;for(var e=0;e<t.length;e++)if(t.charCodeAt(e)>255)return!0;return!1}},{key:"resolveIconKey",value:function(t){return t?t.Icon&&this._Icons.hasOwnProperty(t.Icon)||t.Icon&&!this.isEmojiIcon(t.Icon)?t.Icon:t.Code&&this._Icons.hasOwnProperty(t.Code)?t.Code:"default":"default"}},{key:"getIconSVGMarkup",value:function(t,e){var o=e||16,i=t||"default";return(this._Icons[i]||this._Icons.default).replace(/\{FlowIconSize\}/g,String(o))}},{key:"renderIconIntoSVGGroup",value:function(t,e,o,i,n){if(!e)return null;var r=(n||16)/24,a=t||"default",s=this._Icons[a]||this._Icons.default;s=s.replace(/\{FlowIconSize\}/g,"24");try{var l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.innerHTML=s;var c=l.querySelector("svg");if(!c)return null;var d=document.createElementNS("http://www.w3.org/2000/svg","g");for(d.setAttribute("transform","translate("+o+","+i+") scale("+r+")"),d.setAttribute("pointer-events","none"),d.setAttribute("class","pict-flow-icon-svg");c.childNodes.length>0;)d.appendChild(c.childNodes[0]);return e.appendChild(d),d}catch(t){return this.log.warn("PictProviderFlowIcons renderIconIntoSVGGroup error: "+t.message),null}}},{key:"getIconKeys",value:function(){return Object.keys(this._Icons)}},{key:"hasIcon",value:function(t){return this._Icons.hasOwnProperty(t)}},{key:"registerIcon",value:function(t,e){return!(!t||!e)&&(this._Icons[t]=e,this.fable&&this.fable.TemplateProvider&&this.fable.TemplateProvider.addTemplate("Flow-Icon-"+t,e),!0)}}])}(i);e.exports=a,e.exports.default_configuration=n,e.exports.DefaultIcons=r},{"fable-serviceproviderbase":4}],21:[function(t,e,o){var i=t("pict-provider"),n={ProviderIdentifier:"PictProviderFlowLayouts"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowLayouts",r._FlowView=o&&o.FlowView?o.FlowView:null,o&&void 0!==o.StorageKey?r._StorageKey=o.StorageKey:r._FlowView&&r._FlowView.options&&r._FlowView.options.ViewIdentifier?r._StorageKey="pict-flow-layouts-".concat(r._FlowView.options.ViewIdentifier):r._StorageKey="pict-flow-layouts",r}return _inherits(e,t),_createClass(e,[{key:"storageWrite",value:function(t,e){if(!1===this._StorageKey)return e(null);try{return"undefined"!=typeof localStorage&&localStorage.setItem(this._StorageKey,JSON.stringify(t)),e(null)}catch(t){return this.log.warn("PictProviderFlowLayouts storageWrite error: ".concat(t.message)),e(t)}}},{key:"storageRead",value:function(t){if(!1===this._StorageKey)return t(null,[]);try{if("undefined"!=typeof localStorage){var e=localStorage.getItem(this._StorageKey);if(e){var o=JSON.parse(e);if(Array.isArray(o))return t(null,o)}}return t(null,[])}catch(e){return this.log.warn("PictProviderFlowLayouts storageRead error: ".concat(e.message)),t(e,[])}}},{key:"storageDelete",value:function(t){if(!1===this._StorageKey)return t(null);try{return"undefined"!=typeof localStorage&&localStorage.removeItem(this._StorageKey),t(null)}catch(e){return this.log.warn("PictProviderFlowLayouts storageDelete error: ".concat(e.message)),t(e)}}},{key:"loadPersistedLayouts",value:function(){var t=this;this.storageRead(function(e,o){if(!e&&Array.isArray(o)&&0!==o.length&&t._FlowView&&t._FlowView._FlowData){for(var i=t._FlowView._FlowData.SavedLayouts,n={},r=0;r<i.length;r++)n[i[r].Hash]=!0;for(var a=0,s=0;s<o.length;s++)n[o[s].Hash]||(i.push(o[s]),a++);a>0&&t.log.trace("PictProviderFlowLayouts loaded ".concat(a," persisted layout(s)"))}})}},{key:"saveLayout",value:function(t){var e=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts saveLayout: no FlowView reference"),null;for(var o=this._FlowView._FlowData,i="layout-".concat(this.fable.getUUID()),n={},r={},a=0;a<o.Nodes.length;a++){var s=o.Nodes[a];n[s.Hash]={X:s.X,Y:s.Y,Width:s.Width,Height:s.Height,Title:s.Title},s.Style&&Object.keys(s.Style).length>0&&(n[s.Hash].Style=JSON.parse(JSON.stringify(s.Style)))}for(var l=0;l<o.OpenPanels.length;l++){var c=o.OpenPanels[l];r[c.NodeHash]={X:c.X,Y:c.Y,Width:c.Width,Height:c.Height}}var d={Hash:i,Name:t||"Untitled Layout",CreatedAt:(new Date).toISOString(),NodePositions:n,PanelPositions:r,ViewState:{PanX:o.ViewState.PanX,PanY:o.ViewState.PanY,Zoom:o.ViewState.Zoom}};return o.SavedLayouts.push(d),this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(t){t&&e.log.warn("PictProviderFlowLayouts: failed to persist after save: ".concat(t.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutSaved",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts saved layout '".concat(d.Name,"' (").concat(d.Hash,")")),d}},{key:"restoreLayout",value:function(t){if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts restoreLayout: no FlowView reference"),!1;var e=this._FlowView._FlowData,o=e.SavedLayouts.find(function(e){return e.Hash===t});if(!o)return this.log.warn("PictProviderFlowLayouts restoreLayout: layout '".concat(t,"' not found")),!1;for(var i=[],n=[],r=0;r<e.Nodes.length;r++){var a=e.Nodes[r],s=o.NodePositions[a.Hash];s?(a.X=s.X,a.Y=s.Y,"number"==typeof s.Width&&(a.Width=s.Width),"number"==typeof s.Height&&(a.Height=s.Height),"string"==typeof s.Title&&(a.Title=s.Title),s.Style&&"object"===_typeof(s.Style)&&(a.Style=JSON.parse(JSON.stringify(s.Style))),i.push(a)):n.push(a)}if(o.PanelPositions)for(var l=0;l<e.OpenPanels.length;l++){var c=e.OpenPanels[l],d=o.PanelPositions[c.NodeHash];d&&(c.X=d.X,c.Y=d.Y,"number"==typeof d.Width&&(c.Width=d.Width),"number"==typeof d.Height&&(c.Height=d.Height))}return n.length>0&&this._FlowView._LayoutService&&this._FlowView._LayoutService.autoLayoutSubset(n,i,e.Connections),o.ViewState&&("number"==typeof o.ViewState.PanX&&(e.ViewState.PanX=o.ViewState.PanX),"number"==typeof o.ViewState.PanY&&(e.ViewState.PanY=o.ViewState.PanY),"number"==typeof o.ViewState.Zoom&&(e.ViewState.Zoom=o.ViewState.Zoom)),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutRestored",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",e)),this.log.trace("PictProviderFlowLayouts restored layout '".concat(o.Name,"' (").concat(o.Hash,")")),!0}},{key:"deleteLayout",value:function(t){var e=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts deleteLayout: no FlowView reference"),!1;var o=this._FlowView._FlowData,i=o.SavedLayouts.findIndex(function(e){return e.Hash===t});if(i<0)return this.log.warn("PictProviderFlowLayouts deleteLayout: layout '".concat(t,"' not found")),!1;var n=o.SavedLayouts.splice(i,1)[0];return this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(t){t&&e.log.warn("PictProviderFlowLayouts: failed to persist after delete: ".concat(t.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutDeleted",n),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts deleted layout '".concat(n.Name,"' (").concat(n.Hash,")")),!0}},{key:"getLayouts",value:function(){return this._FlowView?this._FlowView._FlowData.SavedLayouts:[]}},{key:"getLayout",value:function(t){return this._FlowView&&this._FlowView._FlowData.SavedLayouts.find(function(e){return e.Hash===t})||null}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-provider":8}],22:[function(t,e,o){var i=t("pict-provider"),n={default:{Hash:"default",Label:"Default",DefaultWidth:180,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Out"}],TitleBarColor:"#2c3e50",BodyStyle:{}},start:{Hash:"start",Label:"Start",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"output",Side:"right",Label:"Out"}],TitleBarColor:"#27ae60",BodyStyle:{fill:"#eafaf1",stroke:"#27ae60"}},end:{Hash:"end",Label:"End",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],TitleBarColor:"#1abc9c",BodyStyle:{fill:"#e8f8f5",stroke:"#1abc9c"}},halt:{Hash:"halt",Label:"Halt",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],TitleBarColor:"#e74c3c",BodyStyle:{fill:"#fdedec",stroke:"#e74c3c"}},decision:{Hash:"decision",Label:"Decision",DefaultWidth:200,DefaultHeight:100,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Yes"},{Hash:null,Direction:"output",Side:"bottom",Label:"No"}],TitleBarColor:"#f39c12",BodyStyle:{fill:"#fff9e6",stroke:"#f39c12"}}},r={ProviderIdentifier:"PictProviderFlowNodeTypes"},a=function(t){function e(t,o,i){var a;if(_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},r,o),i])).serviceType="PictProviderFlowNodeTypes",a._FlowView=o&&o.FlowView?o.FlowView:null,o&&!1===o.IncludeDefaultNodeTypes?a._NodeTypes={}:a._NodeTypes=JSON.parse(JSON.stringify(n)),o&&o.AdditionalNodeTypes&&"object"===_typeof(o.AdditionalNodeTypes))for(var s=Object.keys(o.AdditionalNodeTypes),l=0;l<s.length;l++){var c=o.AdditionalNodeTypes[s[l]];a._NodeTypes[s[l]]=Object.assign({},a._NodeTypes[s[l]]||{},JSON.parse(JSON.stringify(c))),c.BodyContent&&"function"==typeof c.BodyContent.RenderCallback&&(a._NodeTypes[s[l]].BodyContent||(a._NodeTypes[s[l]].BodyContent={}),a._NodeTypes[s[l]].BodyContent.RenderCallback=c.BodyContent.RenderCallback)}return a}return _inherits(e,t),_createClass(e,[{key:"getNodeType",value:function(t){return this._NodeTypes[t]||this._NodeTypes.default}},{key:"registerNodeType",value:function(t){return t&&t.Hash?(this._NodeTypes[t.Hash]=Object.assign({},this._NodeTypes[t.Hash]||{},t),!0):(this.log.warn("PictProviderFlowNodeTypes registerNodeType: invalid config (missing Hash)"),!1)}},{key:"removeNodeType",value:function(t){return"default"===t?(this.log.warn("PictProviderFlowNodeTypes: cannot remove the default node type"),!1):!!this._NodeTypes[t]&&(delete this._NodeTypes[t],!0)}},{key:"getNodeTypes",value:function(){return JSON.parse(JSON.stringify(this._NodeTypes))}},{key:"getNodeTypeList",value:function(){return Object.keys(this._NodeTypes)}},{key:"getEnabledCards",value:function(){for(var t=[],e=Object.keys(this._NodeTypes),o=0;o<e.length;o++){var i=this._NodeTypes[e[o]];i.CardMetadata&&!1!==i.CardMetadata.Enabled&&t.push(JSON.parse(JSON.stringify(i)))}return t}},{key:"getCardsByCategory",value:function(){for(var t=this.getEnabledCards(),e={},o=0;o<t.length;o++){var i=t[o].CardMetadata&&t[o].CardMetadata.Category?t[o].CardMetadata.Category:"General";e[i]||(e[i]=[]),e[i].push(t[o])}return e}},{key:"isFlowCard",value:function(t){var e=this._NodeTypes[t];return!(!e||!e.CardMetadata)}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.DefaultNodeTypes=n},{"pict-provider":8}],23:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowNoise"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowNoise",r}return _inherits(e,t),_createClass(e,[{key:"hashString",value:function(t){for(var e=5381,o=0;o<t.length;o++)e=(e<<5)+e+t.charCodeAt(o),e&=e;return e>>>0}},{key:"seededRandom",value:function(t){var e=0|t;return function(){e=e+1831565813|0;var t=Math.imul(e^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/4294967296}}},{key:"jitterPoint",value:function(t,e,o,i){return o<=0?{x:t,y:e}:{x:t+o*(i()-.5)*2,y:e+o*(i()-.5)*2}}},{key:"generateBracketPath",value:function(t,e,o,i,n,r){var a=this,s=this.seededRandom(this.hashString(r||"default")),l=o||18,c=t,d=e,p=function(t,e){return a.jitterPoint(t,e,n,s)},h=p(l,0),u=p(0,0),f=p(0,d),w=p(l,d),v=p(c-l,0),g=p(c,0),y=p(c,d),b=p(c-l,d),m="";return m+="M ".concat(h.x.toFixed(1)," ").concat(h.y.toFixed(1)),m+=" L ".concat(u.x.toFixed(1)," ").concat(u.y.toFixed(1)),m+=" L ".concat(f.x.toFixed(1)," ").concat(f.y.toFixed(1)),m+=" L ".concat(w.x.toFixed(1)," ").concat(w.y.toFixed(1)),m+=" M ".concat(v.x.toFixed(1)," ").concat(v.y.toFixed(1)),m+=" L ".concat(g.x.toFixed(1)," ").concat(g.y.toFixed(1)),m+=" L ".concat(y.x.toFixed(1)," ").concat(y.y.toFixed(1)),m+=" L ".concat(b.x.toFixed(1)," ").concat(b.y.toFixed(1))}},{key:"jitterPath",value:function(t,e,o){if(e<=0||!t)return t;var i=this.seededRandom(this.hashString(o||"path")),n=t.match(/[MLCQZmlcqz]|[-+]?[0-9]*\.?[0-9]+/g);if(!n)return t;for(var r=[],a=0;a<n.length;a++)/^[-+]?[0-9]*\.?[0-9]+$/.test(n[a])&&r.push(a);for(var s=0;s<r.length-1;s+=2){var l=r[s],c=r[s+1],d=e;0===s||s>=r.length-2?d=.15*e:(2===s||s>=r.length-4)&&(d=.5*e);var p=parseFloat(n[l]),h=parseFloat(n[c]),u=this.jitterPoint(p,h,d,i);n[l]=u.x.toFixed(1),n[c]=u.y.toFixed(1)}for(var f="",w=0;w<n.length;w++)w>0&&/^[MLCQZmlcqz]$/.test(n[w])?f+=" "+n[w]:f+=w>0?" "+n[w]:n[w];return f}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],24:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowPanelChrome",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"createPanelForeignObject",value:function(t,e){var o=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");o.setAttribute("class","pict-flow-panel-foreign-object"),o.setAttribute("data-panel-hash",t.Hash),o.setAttribute("data-node-hash",t.NodeHash),o.setAttribute("x",String(t.X)),o.setAttribute("y",String(t.Y)),o.setAttribute("width",String(t.Width)),o.setAttribute("height",String(t.Height));var i=this._FlowView.pict||this._FlowView.fable,n=t.Title||"Properties",r=i.parseTemplateByHash("Flow-PanelChrome-Template",{Hash:t.Hash,Title:n});o.innerHTML=r;var a=o.querySelector(".pict-flow-panel-close-icon");a&&this._FlowView&&this._FlowView._IconProvider?a.innerHTML=this._FlowView._IconProvider.getIconSVGMarkup("close",12):a&&(a.textContent="✕");var s=o.querySelector(".pict-flow-panel-content");s&&(s.addEventListener("pointerdown",function(t){t.stopPropagation()}),s.addEventListener("wheel",function(t){t.stopPropagation()}));var l=o.querySelector(".pict-flow-panel-tabbar");return l&&(l.addEventListener("pointerdown",function(t){t.stopPropagation()}),l.addEventListener("wheel",function(t){t.stopPropagation()})),e.appendChild(o),o.querySelector('.pict-flow-panel-tab-pane[data-tab="properties"]')}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],25:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowSVGHelpers",n}return _inherits(e,t),_createClass(e,[{key:"createSVGElement",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],26:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowTheme"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowTheme",r._FlowView=o&&o.FlowView?o.FlowView:null,r._ActiveThemeKey="default",r._NoiseLevel=0,r._Themes={},r._registerBuiltInThemes(),r}return _inherits(e,t),_createClass(e,[{key:"_registerBuiltInThemes",value:function(){this._Themes.default={Key:"default",Label:"Modern",CSSVariables:{},AdditionalCSS:"",NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{}},this._Themes.sketch={Key:"sketch",Label:"Sketch",CSSVariables:{"--pf-node-body-fill":"#fffef5","--pf-node-body-stroke":"#444444","--pf-node-body-stroke-width":"1.5","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"#f0ece0","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#fffef5","--pf-connection-stroke":"#555555","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#fffef5","--pf-grid-stroke":"#e8e4d8","--pf-panel-bg":"#fffef5","--pf-panel-border":"#ccccaa","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.08)","--pf-panel-titlebar-bg":"#f0ece0","--pf-panel-titlebar-border":"#ccccaa","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-panel-title-text,\n\t\t\t\t.pict-flow-panel-node-props-title,\n\t\t\t\t.pict-flow-info-panel {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:20,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.4,MaxJitterPx:4,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#555555"},"arrowhead-connection-selected":{Fill:"#2255aa"}}},this._Themes.blueprint={Key:"blueprint",Label:"Blueprint",CSSVariables:{"--pf-node-body-fill":"rgba(255,255,255,0.05)","--pf-node-body-stroke":"#ffffff","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"rgba(255,255,255,0.1)","--pf-node-type-label-fill":"rgba(255,255,255,0.5)","--pf-node-selected-stroke":"#ffdd44","--pf-port-input-fill":"#88bbff","--pf-port-output-fill":"#88ffbb","--pf-port-stroke":"#1a3a6a","--pf-connection-stroke":"rgba(255,255,255,0.6)","--pf-connection-selected-stroke":"#ffdd44","--pf-canvas-bg":"#1a3a6a","--pf-grid-stroke":"rgba(255,255,255,0.08)","--pf-panel-bg":"#1a3a6a","--pf-panel-border":"rgba(255,255,255,0.3)","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"rgba(255,255,255,0.05)","--pf-panel-titlebar-border":"rgba(255,255,255,0.15)","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 1px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #0d2244;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #142e54;\n\t\t\t\t\tborder-bottom-color: rgba(255,255,255,0.15);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.05);\n\t\t\t\t\tborder-color: rgba(255,255,255,0.2);\n\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.1);\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:18,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:"8 4",StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"rgba(255,255,255,0.6)"},"arrowhead-connection-selected":{Fill:"#ffdd44"}}},this._Themes.mono={Key:"mono",Label:"Monochrome",CSSVariables:{"--pf-node-body-fill":"#ffffff","--pf-node-body-stroke":"#000000","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"#000000","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#444444","--pf-port-input-fill":"#000000","--pf-port-output-fill":"#666666","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#000000","--pf-connection-selected-stroke":"#444444","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#eeeeee","--pf-panel-bg":"#ffffff","--pf-panel-border":"#000000","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"#f0f0f0","--pf-panel-titlebar-border":"#000000","--pf-panel-title-color":"#000000"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title {\n\t\t\t\t\tfont-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#000000"},"arrowhead-connection-selected":{Fill:"#444444"}}},this._Themes["retro-80s"]={Key:"retro-80s",Label:"80s Retro",CSSVariables:{"--pf-node-body-fill":"#1a0a2e","--pf-node-body-stroke":"#ff00ff","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(0 0 8px rgba(255,0,255,0.4))","--pf-node-shadow-hover":"drop-shadow(0 0 12px rgba(255,0,255,0.6))","--pf-node-shadow-selected":"drop-shadow(0 0 16px rgba(0,255,255,0.5))","--pf-node-shadow-dragging":"drop-shadow(0 0 20px rgba(255,0,255,0.7))","--pf-node-title-fill":"#00ffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#2a0a4e","--pf-node-type-label-fill":"#ff66ff","--pf-node-selected-stroke":"#00ffff","--pf-port-input-fill":"#ff00ff","--pf-port-output-fill":"#00ff66","--pf-port-stroke":"#1a0a2e","--pf-connection-stroke":"#ff00ff","--pf-connection-selected-stroke":"#00ffff","--pf-canvas-bg":"#0a0015","--pf-grid-stroke":"#1a0a2e","--pf-panel-bg":"#1a0a2e","--pf-panel-border":"#ff00ff","--pf-panel-radius":"0px","--pf-panel-shadow":"0 0 20px rgba(255,0,255,0.3)","--pf-panel-titlebar-bg":"#2a0a4e","--pf-panel-titlebar-border":"#ff00ff","--pf-panel-title-color":"#00ffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 0.5px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-connection {\n\t\t\t\t\tfilter: drop-shadow(0 0 3px rgba(255,0,255,0.4));\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) hue-rotate(180deg) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-bottom-color: #ff00ff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t\tcolor: #00ffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: #2a0a4e;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#ff00ff"},"arrowhead-connection-selected":{Fill:"#00ffff"}}},this._Themes["retro-90s"]={Key:"retro-90s",Label:"90s Retro",CSSVariables:{"--pf-node-body-fill":"#c0c0c0","--pf-node-body-stroke":"#808080","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(2px 2px 0px #404040)","--pf-node-shadow-hover":"drop-shadow(3px 3px 0px #404040)","--pf-node-shadow-selected":"drop-shadow(2px 2px 0px #008080)","--pf-node-shadow-dragging":"drop-shadow(4px 4px 0px #404040)","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#000080","--pf-node-type-label-fill":"#606060","--pf-node-selected-stroke":"#008080","--pf-port-input-fill":"#000080","--pf-port-output-fill":"#008000","--pf-port-stroke":"#c0c0c0","--pf-connection-stroke":"#808080","--pf-connection-selected-stroke":"#008080","--pf-canvas-bg":"#008080","--pf-grid-stroke":"rgba(0,0,0,0.06)","--pf-panel-bg":"#c0c0c0","--pf-panel-border":"#808080","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px #404040","--pf-panel-titlebar-bg":"#000080","--pf-panel-titlebar-border":"#c0c0c0","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "MS Sans Serif", "Arial", sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder-bottom: 2px solid #808080;\n\t\t\t\t\tborder-top: 1px solid #ffffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t\tcolor: #000000;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: var(--theme-color-border-default, #d0d0d0);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:active {\n\t\t\t\t\tborder-style: inset;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#808080"},"arrowhead-connection-selected":{Fill:"#008080"}}},this._Themes.whiteboard={Key:"whiteboard",Label:"Whiteboard",CSSVariables:{"--pf-node-body-fill":"transparent","--pf-node-body-stroke":"#555555","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"transparent","--pf-node-type-label-fill":"#999999","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#888888","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#f0f0f0","--pf-panel-bg":"#ffffff","--pf-panel-border":"#cccccc","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.06)","--pf-panel-titlebar-bg":"#f8f8f8","--pf-panel-titlebar-border":"#e0e0e0","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t/* Node-type bracket colors — each type gets its own bracket color */\n\t\t\t\t.pict-flow-node-start .pict-flow-node-bracket { stroke: var(--theme-color-status-success, #27ae60); }\n\t\t\t\t.pict-flow-node-end .pict-flow-node-bracket { stroke: #1abc9c; }\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-bracket { stroke: var(--theme-color-status-error, #e74c3c); }\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-bracket { stroke: var(--theme-color-status-warning, #f39c12); }\n\t\t\t\t.pict-flow-node-default .pict-flow-node-bracket { stroke: #3498db; }\n\t\t\t\t.pict-flow-node-action .pict-flow-node-bracket { stroke: #2c3e50; }\n\t\t\t\t/* Override variant rules: no fills/strokes on body rects in whiteboard */\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-start .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-end .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\t\t\tfill: transparent;\n\t\t\t\t\tstroke: transparent;\n\t\t\t\t\tstroke-width: 0;\n\t\t\t\t}\n\t\t\t\t/* Title bar fills transparent too */\n\t\t\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\t\t\tfill: transparent !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: none !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:22,TitleSeparator:!1},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.3,MaxJitterPx:3,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#888888"},"arrowhead-connection-selected":{Fill:"#2255aa"}}}}},{key:"getActiveTheme",value:function(){return this._Themes[this._ActiveThemeKey]||this._Themes.default}},{key:"getActiveThemeKey",value:function(){return this._ActiveThemeKey}},{key:"setTheme",value:function(t){if(!this._Themes[t])return this.log.warn("PictProviderFlowTheme: theme '".concat(t,"' not found")),!1;this._ActiveThemeKey=t;var e=this._Themes[t];return e.NoiseConfig&&"number"==typeof e.NoiseConfig.DefaultLevel?this._NoiseLevel=e.NoiseConfig.DefaultLevel:this._NoiseLevel=0,this._FlowView&&this._FlowView._ConnectorShapesProvider&&(this._FlowView._ConnectorShapesProvider.resetToDefaults(),e.ShapeOverrides&&Object.keys(e.ShapeOverrides).length>0&&this._FlowView._ConnectorShapesProvider.applyThemeOverrides(e.ShapeOverrides)),this.log.trace("PictProviderFlowTheme: switched to '".concat(t,"'")),!0}},{key:"getNoiseLevel",value:function(){return this._NoiseLevel}},{key:"setNoiseLevel",value:function(t){this._NoiseLevel=Math.max(0,Math.min(1,t||0))}},{key:"registerTheme",value:function(t,e){t&&e?(e.Key=t,this._Themes[t]=e):this.log.warn("PictProviderFlowTheme: registerTheme requires key and definition")}},{key:"getThemeKeys",value:function(){return Object.keys(this._Themes)}},{key:"processPathString",value:function(t,e){var o=this.getActiveTheme();if(!(o&&o.NoiseConfig&&o.NoiseConfig.Enabled&&o.NoiseConfig.AffectsConnections))return t;var i=this._NoiseLevel*(o.NoiseConfig.MaxJitterPx||3);return i<=0?t:this._FlowView&&this._FlowView._NoiseProvider?this._FlowView._NoiseProvider.jitterPath(t,i,e):t}},{key:"getNodeNoiseAmplitude",value:function(){var t=this.getActiveTheme();return t&&t.NoiseConfig&&t.NoiseConfig.Enabled&&t.NoiseConfig.AffectsNodes?this._NoiseLevel*(t.NoiseConfig.MaxJitterPx||3):0}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],27:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowConnectionHandleManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"updateConnectionHandle",value:function(t,e,o,i){if(this._FlowView){var n=this._FlowView.getConnection(t);if(n){if(n.Data||(n.Data={}),n.Data.HandleCustomized=!0,e&&e.startsWith("bezier-handle-")){var r=parseInt(e.replace("bezier-handle-",""),10);return!isNaN(r)&&Array.isArray(n.Data.BezierHandles)&&r<n.Data.BezierHandles.length&&(n.Data.BezierHandles[r].x=o,n.Data.BezierHandles[r].y=i),void this._FlowView._renderSingleConnection(t)}switch(e){case"bezier-midpoint":Array.isArray(n.Data.BezierHandles)&&0!==n.Data.BezierHandles.length?(n.Data.BezierHandles[0].x=o,n.Data.BezierHandles[0].y=i):n.Data.BezierHandles=[{x:o,y:i}],n.Data.BezierHandleX=o,n.Data.BezierHandleY=i;break;case"ortho-corner1":n.Data.OrthoCorner1X=o,n.Data.OrthoCorner1Y=i;break;case"ortho-corner2":n.Data.OrthoCorner2X=o,n.Data.OrthoCorner2Y=i;break;case"ortho-midpoint":var a=this._FlowView.getPortPosition(n.SourceNodeHash,n.SourcePortHash),s=this._FlowView.getPortPosition(n.TargetNodeHash,n.TargetPortHash);if(a&&s){var l=this._FlowView._ConnectionRenderer._computeDirectionalGeometry(a,s),c=l.startDir;if(Math.abs(c.dx)>Math.abs(c.dy)){var d=(l.departX+l.approachX)/2;n.Data.OrthoMidOffset=o-d}else{var p=(l.departY+l.approachY)/2;n.Data.OrthoMidOffset=i-p}}}this._FlowView._renderSingleConnection(t)}}}},{key:"addConnectionHandle",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getConnection(t);if(i){i.Data||(i.Data={}),Array.isArray(i.Data.BezierHandles)||(i.Data.BezierHandles=[],null!=i.Data.BezierHandleX&&null!=i.Data.BezierHandleY&&i.Data.BezierHandles.push({x:i.Data.BezierHandleX,y:i.Data.BezierHandleY})),i.Data.LineMode="bezier";var n=this._FlowView.getPortPosition(i.SourceNodeHash,i.SourcePortHash),r=this._FlowView.getPortPosition(i.TargetNodeHash,i.TargetPortHash),a=0;n&&r&&this._FlowView._ConnectionRenderer&&(a=this._FlowView._ConnectionRenderer.computeInsertionIndex(i.Data.BezierHandles,{x:e,y:o},n,r)),i.Data.BezierHandles.splice(a,0,{x:e,y:o}),i.Data.HandleCustomized=!0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"removeConnectionHandle",value:function(t,e){if(this._FlowView){var o=this._FlowView.getConnection(t);o&&o.Data&&Array.isArray(o.Data.BezierHandles)&&(e<0||e>=o.Data.BezierHandles.length||(o.Data.BezierHandles.splice(e,1),0===o.Data.BezierHandles.length&&(o.Data.HandleCustomized=!1,o.Data.BezierHandleX=null,o.Data.BezierHandleY=null),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)))}}},{key:"resetHandlesForNode",value:function(t){if(this._FlowView){for(var e=0;e<this._FlowView._FlowData.Connections.length;e++){var o=this._FlowView._FlowData.Connections[e];o.SourceNodeHash!==t&&o.TargetNodeHash!==t||o.Data&&o.Data.HandleCustomized&&(o.Data.HandleCustomized=!1,o.Data.BezierHandles=[],o.Data.BezierHandleX=null,o.Data.BezierHandleY=null,o.Data.OrthoCorner1X=null,o.Data.OrthoCorner1Y=null,o.Data.OrthoCorner2X=null,o.Data.OrthoCorner2Y=null,o.Data.OrthoMidOffset=0)}this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlesForNode(this._FlowView._FlowData.OpenPanels,t)}}},{key:"resetHandlesForPanel",value:function(t){if(this._FlowView){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});e&&this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlePositions(e)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],28:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowConnectionRenderer",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderConnection",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getPortPosition(t.SourceNodeHash,t.SourcePortHash),n=this._FlowView.getPortPosition(t.TargetNodeHash,t.TargetPortHash),r=null,a=this._FlowView.getNode(t.SourceNodeHash);if(a&&a.Ports)for(var s=0;s<a.Ports.length;s++)if(a.Ports[s].Hash===t.SourcePortHash){r=a.Ports[s].PortType||null;break}if(i&&n){var l,c=t.Data||{};if("orthogonal"===(c.LineMode||"bezier")){var d=null;c.HandleCustomized&&null!=c.OrthoCorner1X&&(d={corner1:{x:c.OrthoCorner1X,y:c.OrthoCorner1Y},corner2:{x:c.OrthoCorner2X,y:c.OrthoCorner2Y}}),l=this._generateOrthogonalPath(i,n,d,c.OrthoMidOffset||0)}else{var p=this._getBezierHandles(c);l=p.length>0?this._generateMultiHandleBezierPath(i,n,p):this._generateDirectionalPath(i,n)}this._FlowView._ThemeProvider&&(l=this._FlowView._ThemeProvider.processPathString(l,t.Hash));var h=null;if(this._FlowView._ThemeProvider){var u=this._FlowView._ThemeProvider.getActiveTheme();u&&u.ConnectionConfig&&u.ConnectionConfig.StrokeDashArray&&(h=u.ConnectionConfig.StrokeDashArray)}var f,w=this._FlowView.options.ViewIdentifier,v=r?" conn-type-"+r:"";f=o?"flow-arrowhead-selected-"+w:r?"flow-arrowhead-"+r+"-"+w:"flow-arrowhead-"+w;var g=this._FlowView._ConnectorShapesProvider;if(g){var y=g.createConnectionHitAreaElement(l,t.Hash);e.appendChild(y);var b=g.createConnectionPathElement(l,t.Hash,o,w);v&&b.setAttribute("class",(b.getAttribute("class")||"")+v),b.setAttribute("marker-end","url(#"+f+")"),h&&b.setAttribute("stroke-dasharray",h),e.appendChild(b)}else{var m=this._FlowView._SVGHelperProvider.createSVGElement("path");m.setAttribute("class","pict-flow-connection-hitarea"),m.setAttribute("d",l),m.setAttribute("data-connection-hash",t.Hash),m.setAttribute("data-element-type","connection-hitarea"),e.appendChild(m);var _=this._FlowView._SVGHelperProvider.createSVGElement("path");_.setAttribute("class","pict-flow-connection".concat(v," ").concat(o?"selected":"")),_.setAttribute("d",l),_.setAttribute("data-connection-hash",t.Hash),_.setAttribute("data-element-type","connection"),_.setAttribute("marker-end","url(#"+f+")"),h&&_.setAttribute("stroke-dasharray",h),e.appendChild(_)}o&&this._renderHandles(t,e,i,n)}}}},{key:"_computeDirectionalGeometry",value:function(t,e){return this._FlowView._PathGenerator.computeDirectionalGeometry(t,e)}},{key:"_generateDirectionalPath",value:function(t,e){var o=this._computeDirectionalGeometry(t,e);return this._FlowView._PathGenerator.buildBezierPathString({x:t.x,y:t.y},{x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},{x:e.x,y:e.y})}},{key:"_getBezierHandles",value:function(t){return t&&t.HandleCustomized?Array.isArray(t.BezierHandles)&&t.BezierHandles.length>0?t.BezierHandles:null!=t.BezierHandleX&&null!=t.BezierHandleY?[{x:t.BezierHandleX,y:t.BezierHandleY}]:[]:[]}},{key:"_generateMultiHandleBezierPath",value:function(t,e,o){var i=this._computeDirectionalGeometry(t,e);return this._FlowView._PathGenerator.buildMultiBezierPathString({x:t.x,y:t.y},{x:i.departX,y:i.departY},o,{x:i.approachX,y:i.approachY},{x:e.x,y:e.y},i.startDir,i.endDir)}},{key:"computeInsertionIndex",value:function(t,e,o,i){for(var n=this._computeDirectionalGeometry(o,i),r=[{x:n.departX,y:n.departY}],a=0;a<t.length;a++)r.push(t[a]);r.push({x:n.approachX,y:n.approachY});for(var s=1/0,l=0,c=0;c<r.length-1;c++){var d=this._distanceToSegment(e.x,e.y,r[c].x,r[c].y,r[c+1].x,r[c+1].y);d<s&&(s=d,l=c)}return l}},{key:"_distanceToSegment",value:function(t,e,o,i,n,r){return this._FlowView._PathGenerator.distanceToSegment(t,e,o,i,n,r)}},{key:"getAutoMidpoint",value:function(t,e){return this._FlowView._PathGenerator.getAutoMidpoint(t,e)}},{key:"_generateOrthogonalPath",value:function(t,e,o,i){var n,r,a=this._FlowView._PathGenerator.computeDepartApproach(t,e,20);if(o&&o.corner1&&o.corner2)n=o.corner1,r=o.corner2;else{var s=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a.departX,a.departY,a.approachX,a.approachY,a.fromDir,a.toDir,i||0);n=s.corner1,r=s.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:t.x,y:t.y},{x:a.departX,y:a.departY},n,r,{x:a.approachX,y:a.approachY},{x:e.x,y:e.y})}},{key:"getOrthogonalGeometry",value:function(t,e,o){var i=this._FlowView._PathGenerator.computeDepartApproach(t,e,20);if(o&&o.HandleCustomized&&null!=o.OrthoCorner1X){var n={x:o.OrthoCorner1X,y:o.OrthoCorner1Y},r={x:o.OrthoCorner2X,y:o.OrthoCorner2Y};return{corner1:n,corner2:r,midpoint:{x:(n.x+r.x)/2,y:(n.y+r.y)/2}}}return this._FlowView._PathGenerator.computeAutoOrthogonalCorners(i.departX,i.departY,i.approachX,i.approachY,i.fromDir,i.toDir,o&&o.OrthoMidOffset||0)}},{key:"_renderHandles",value:function(t,e,o,i){var n=t.Data||{};if("orthogonal"===(n.LineMode||"bezier")){var r=this.getOrthogonalGeometry(o,i,n);this._createHandle(e,t.Hash,"ortho-corner1",r.corner1.x,r.corner1.y,"pict-flow-connection-handle"),this._createHandle(e,t.Hash,"ortho-midpoint",r.midpoint.x,r.midpoint.y,"pict-flow-connection-handle-midpoint"),this._createHandle(e,t.Hash,"ortho-corner2",r.corner2.x,r.corner2.y,"pict-flow-connection-handle")}else{var a=this._getBezierHandles(n);if(a.length>0)for(var s=0;s<a.length;s++)this._createHandle(e,t.Hash,"bezier-handle-"+s,a[s].x,a[s].y,"pict-flow-connection-handle");else{var l=this.getAutoMidpoint(o,i);this._createHandle(e,t.Hash,"bezier-midpoint",l.x,l.y,"pict-flow-connection-handle")}}}},{key:"_createHandle",value:function(t,e,o,i,n,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-connection-handle-midpoint"===r?"connection-handle-midpoint":"connection-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(t,e,o,i,n,a,"connection-handle","data-connection-hash")}}},{key:"_generateBezierPath",value:function(t,e){var o={x:t.x,y:t.y,side:t.side||"right"},i={x:e.x,y:e.y,side:e.side||"left"};return this._generateDirectionalPath(o,i)}},{key:"renderDragConnection",value:function(t,e,o,i,n,r){var a,s=this._generateDirectionalPath({x:t,y:e,side:r||"right"},{x:o,y:i,side:"left"}),l=this._FlowView._ConnectorShapesProvider;return l?a=l.createDragConnectionElement(s):((a=this._FlowView._SVGHelperProvider.createSVGElement("path")).setAttribute("class","pict-flow-drag-connection"),a.setAttribute("d",s)),n.appendChild(a),a}},{key:"updateDragConnection",value:function(t,e,o,i,n,r){if(t){var a=this._generateDirectionalPath({x:e,y:o,side:r||"right"},{x:i,y:n,side:"left"});t.setAttribute("d",a)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],29:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowDataManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"marshalToView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var t={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options},e=this._FlowView.fable.manifest.getValueByHash(t,this._FlowView.options.FlowDataAddress);"object"===_typeof(e)&&null!==e&&this.setFlowData(e)}}},{key:"marshalFromView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var t={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options};this._FlowView.fable.manifest.setValueByHash(t,this._FlowView.options.FlowDataAddress,JSON.parse(JSON.stringify(this._FlowView._FlowData)))}}},{key:"getFlowData",value:function(){return this._FlowView?JSON.parse(JSON.stringify(this._FlowView._FlowData)):{}}},{key:"setFlowData",value:function(t){this._FlowView&&("object"===_typeof(t)&&null!==t?(this._FlowView._FlowData={Nodes:Array.isArray(t.Nodes)?t.Nodes:[],Connections:Array.isArray(t.Connections)?t.Connections:[],OpenPanels:Array.isArray(t.OpenPanels)?t.OpenPanels:[],SavedLayouts:Array.isArray(t.SavedLayouts)?t.SavedLayouts:[],ViewState:Object.assign({PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null},t.ViewState||{})},this._FlowView._LayoutProvider&&this._FlowView._LayoutProvider.loadPersistedLayouts(),this._FlowView.initialRenderComplete&&this._FlowView.renderFlow()):this._FlowView.log.warn("PictSectionFlow setFlowData received invalid data"))}},{key:"addNode",value:function(t,e,o,i,n){if(!this._FlowView)return null;for(var r=t||this._FlowView.options.DefaultNodeType,a=this._FlowView._NodeTypeProvider.getNodeType(r),s={Hash:"node-".concat(this._FlowView.fable.getUUID()),Type:r,X:e||100,Y:o||100,Width:a&&a.DefaultWidth||this._FlowView.options.DefaultNodeWidth,Height:a&&a.DefaultHeight||this._FlowView.options.DefaultNodeHeight,Title:i||a&&a.Label||"New Node",Ports:a&&a.DefaultPorts?JSON.parse(JSON.stringify(a.DefaultPorts)):[{Hash:"port-in-".concat(this._FlowView.fable.getUUID()),Direction:"input",Side:"left",Label:"In"},{Hash:"port-out-".concat(this._FlowView.fable.getUUID()),Direction:"output",Side:"right",Label:"Out"}],Data:n||{}},l=0;l<s.Ports.length;l++)s.Ports[l].Hash||(s.Ports[l].Hash="port-".concat(s.Ports[l].Direction,"-").concat(this._FlowView.fable.getUUID()));return this._FlowView._FlowData.Nodes.push(s),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeAdded",s),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),s}},{key:"removeNode",value:function(t){if(!this._FlowView)return!1;var e=this._FlowView._FlowData.Nodes.findIndex(function(e){return e.Hash===t});if(e<0)return this._FlowView.log.warn("PictSectionFlow removeNode: node ".concat(t," not found")),!1;var o=this._FlowView._FlowData.Nodes.splice(e,1)[0];return this._FlowView._FlowData.Connections=this._FlowView._FlowData.Connections.filter(function(e){return e.SourceNodeHash!==t&&e.TargetNodeHash!==t}),this._FlowView.closePanelForNode(t),this._FlowView._FlowData.ViewState.SelectedNodeHash===t&&(this._FlowView._FlowData.ViewState.SelectedNodeHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"addConnection",value:function(t,e,o,i,n){if(!this._FlowView)return!1;var r=this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===t}),a=this._FlowView._FlowData.Nodes.find(function(t){return t.Hash===o});if(!r||!a)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target node not found"),!1;var s=r.Ports.find(function(t){return t.Hash===e}),l=a.Ports.find(function(t){return t.Hash===i});if(!s||!l)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target port not found"),!1;if(t===o)return this._FlowView.log.warn("PictSectionFlow addConnection: cannot connect a node to itself"),!1;if(this._FlowView._FlowData.Connections.find(function(n){return n.SourceNodeHash===t&&n.SourcePortHash===e&&n.TargetNodeHash===o&&n.TargetPortHash===i}))return this._FlowView.log.warn("PictSectionFlow addConnection: duplicate connection"),!1;var c={Hash:"conn-".concat(this._FlowView.fable.getUUID()),SourceNodeHash:t,SourcePortHash:e,TargetNodeHash:o,TargetPortHash:i,Data:n||{}};return this._FlowView._FlowData.Connections.push(c),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionCreated",c),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),c}},{key:"removeConnection",value:function(t){if(!this._FlowView)return!1;var e=this._FlowView._FlowData.Connections.findIndex(function(e){return e.Hash===t});if(e<0)return this._FlowView.log.warn("PictSectionFlow removeConnection: connection ".concat(t," not found")),!1;var o=this._FlowView._FlowData.Connections.splice(e,1)[0];return this._FlowView._FlowData.ViewState.SelectedConnectionHash===t&&(this._FlowView._FlowData.ViewState.SelectedConnectionHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],30:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={IDLE:"idle",DRAGGING_NODE:"dragging-node",DRAGGING_PANEL:"dragging-panel",DRAGGING_HANDLE:"dragging-handle",CONNECTING:"connecting",PANNING:"panning",RESIZING_PANEL:"resizing-panel"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowInteractionManager",r._FlowView=o&&o.FlowView?o.FlowView:null,r._SVGElement=null,r._ViewportElement=null,r._State=n.IDLE,r._DragNodeHash=null,r._DragStartX=0,r._DragStartY=0,r._DragNodeStartX=0,r._DragNodeStartY=0,r._DragPanelHash=null,r._DragPanelStartX=0,r._DragPanelStartY=0,r._DragPanelDataStartX=0,r._DragPanelDataStartY=0,r._DragHandleConnectionHash=null,r._DragHandlePanelHash=null,r._DragHandleType=null,r._DragHandleIsTether=!1,r._PanStartX=0,r._PanStartY=0,r._PanStartPanX=0,r._PanStartPanY=0,r._ConnectSourceNodeHash=null,r._ConnectSourcePortHash=null,r._ConnectDragLine=null,r._LastClickTime=0,r._LastClickNodeHash=null,r._DoubleClickThreshold=400,r._ResizePanelHash=null,r._ResizeStartY=0,r._ResizePanelStartHeight=0,r._LastConnectionClickTime=0,r._LastConnectionClickHash=null,r._LastTetherClickTime=0,r._LastTetherClickHash=null,r._LastHandleClickTime=0,r._LastHandleClickHash=null,r._LastHandleClickType=null,r._boundOnPointerDown=r._onPointerDown.bind(r),r._boundOnPointerMove=r._onPointerMove.bind(r),r._boundOnPointerUp=r._onPointerUp.bind(r),r._boundOnWheel=r._onWheel.bind(r),r._boundOnKeyDown=r._onKeyDown.bind(r),r}return _inherits(e,t),_createClass(e,[{key:"initialize",value:function(t,e){var o=this;this._SVGElement=t,this._ViewportElement=e,this._SVGElement&&(this._SVGElement.addEventListener("pointerdown",this._boundOnPointerDown),this._SVGElement.addEventListener("pointermove",this._boundOnPointerMove),this._SVGElement.addEventListener("pointerup",this._boundOnPointerUp),this._SVGElement.addEventListener("pointerleave",this._boundOnPointerUp),this._SVGElement.addEventListener("wheel",this._boundOnWheel,{passive:!1}),document.addEventListener("keydown",this._boundOnKeyDown),this._SVGElement.addEventListener("contextmenu",function(t){t.preventDefault();var e=t.target;switch(o._getElementType(e)){case"connection":case"connection-hitarea":o._addBezierHandle(e,t);break;case"connection-handle":o._removeBezierHandle(e);break;case"tether":case"tether-hitarea":o._addTetherBezierHandle(e,t);break;case"tether-handle":o._removeTetherBezierHandle(e)}}))}},{key:"destroy",value:function(){this._SVGElement&&(this._SVGElement.removeEventListener("pointerdown",this._boundOnPointerDown),this._SVGElement.removeEventListener("pointermove",this._boundOnPointerMove),this._SVGElement.removeEventListener("pointerup",this._boundOnPointerUp),this._SVGElement.removeEventListener("pointerleave",this._boundOnPointerUp),this._SVGElement.removeEventListener("wheel",this._boundOnWheel)),document.removeEventListener("keydown",this._boundOnKeyDown)}},{key:"_onPointerDown",value:function(t){if(this._FlowView){var e=t.target,o=this._getElementType(e);if(!e.closest||!e.closest(".pict-flow-panel-content"))switch(0===t.button&&this._SVGElement.setPointerCapture(t.pointerId),o){case"port":this._startConnection(t,e);break;case"node":case"node-body":case"panel-indicator":var i=this._getNodeHash(e),n=Date.now();i&&i===this._LastClickNodeHash&&n-this._LastClickTime<this._DoubleClickThreshold?(this._LastClickTime=0,this._LastClickNodeHash=null,this._FlowView.togglePanel(i)):(this._LastClickTime=n,this._LastClickNodeHash=i,this._startNodeDrag(t,e));break;case"panel-titlebar":this._startPanelDrag(t,e);break;case"panel-resize":this._startPanelResize(t,e);break;case"panel-close":var r=this._getPanelHash(e);r&&this._FlowView.closePanel(r);break;case"connection-handle":var a=this._getConnectionHash(e),s=e.getAttribute("data-handle-type"),l=Date.now();a===this._LastHandleClickHash&&s===this._LastHandleClickType&&l-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleConnectionLineMode(a),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=l,this._LastHandleClickHash=a,this._LastHandleClickType=s,this._startHandleDrag(t,a,null,s,!1)),t.stopPropagation();break;case"tether":case"tether-hitarea":var c=this._getPanelHash(e),d=Date.now();c&&c===this._LastTetherClickHash&&d-this._LastTetherClickTime<this._DoubleClickThreshold?(this._LastTetherClickTime=0,this._LastTetherClickHash=null,this._addTetherBezierHandle(e,t)):(this._LastTetherClickTime=d,this._LastTetherClickHash=c,this._selectTether(e));break;case"tether-handle":var p=this._getPanelHash(e),h=e.getAttribute("data-handle-type"),u=Date.now();p===this._LastHandleClickHash&&h===this._LastHandleClickType&&u-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleTetherLineMode(p),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=u,this._LastHandleClickHash=p,this._LastHandleClickType=h,this._startHandleDrag(t,null,p,h,!0)),t.stopPropagation();break;case"connection":case"connection-hitarea":var f=this._getConnectionHash(e),w=Date.now();f&&f===this._LastConnectionClickHash&&w-this._LastConnectionClickTime<this._DoubleClickThreshold?(this._LastConnectionClickTime=0,this._LastConnectionClickHash=null,this._addBezierHandle(e,t)):(this._LastConnectionClickTime=w,this._LastConnectionClickHash=f,this._selectConnection(e));break;default:0===t.button&&this._FlowView.options.EnablePanning&&this._startPanning(t)}}}},{key:"_onPointerMove",value:function(t){if(this._FlowView)switch(this._State){case n.DRAGGING_NODE:this._onNodeDrag(t);break;case n.DRAGGING_PANEL:this._onPanelDrag(t);break;case n.DRAGGING_HANDLE:this._onHandleDrag(t);break;case n.CONNECTING:this._onConnectionDrag(t);break;case n.RESIZING_PANEL:this._onPanelResize(t);break;case n.PANNING:this._onPan(t)}}},{key:"_onPointerUp",value:function(t){if(this._FlowView)switch(this._SVGElement.hasPointerCapture&&this._SVGElement.hasPointerCapture(t.pointerId)&&this._SVGElement.releasePointerCapture(t.pointerId),this._State){case n.DRAGGING_NODE:this._endNodeDrag(t);break;case n.DRAGGING_PANEL:this._endPanelDrag(t);break;case n.DRAGGING_HANDLE:this._endHandleDrag(t);break;case n.RESIZING_PANEL:this._endPanelResize(t);break;case n.CONNECTING:this._endConnection(t);break;case n.PANNING:this._endPanning(t)}}},{key:"_onWheel",value:function(t){if(this._FlowView&&this._FlowView.options.EnableZooming){t.preventDefault();var e=t.deltaY>0?-this._FlowView.options.ZoomStep:this._FlowView.options.ZoomStep,o=this._FlowView.viewState.Zoom+e,i=this._SVGElement.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this._FlowView.setZoom(o,n,r)}}},{key:"_onKeyDown",value:function(t){if(this._FlowView)if("Delete"===t.key||"Backspace"===t.key){if(t.target&&("INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName))return;if(t.target&&t.target.closest&&t.target.closest(".pict-flow-panel"))return;this._FlowView.deleteSelected(),t.preventDefault()}else if("Escape"===t.key){if(this._State===n.CONNECTING&&this._cancelConnection(),this._FlowView._IsFullscreen){if(this._FlowView.exitFullscreen(),this._FlowView._ToolbarView){var e=this._FlowView.options.ViewIdentifier,o=this._FlowView.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(e));o.length>0&&(o[0].innerHTML="&#x26F6; Fullscreen")}return void t.preventDefault()}this._FlowView.deselectAll()}}},{key:"_startNodeDrag",value:function(t,e){if(this._FlowView.options.EnableNodeDragging){var o=this._getNodeHash(e);if(o){this._FlowView.selectNode(o);var i=this._FlowView.getNode(o);if(i){this._State=n.DRAGGING_NODE,this._DragNodeHash=o,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._DragNodeStartX=i.X,this._DragNodeStartY=i.Y,this._SVGElement.classList.add("panning");var r=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(o,'"]'));r&&r.classList.add("dragging")}}}}},{key:"_onNodeDrag",value:function(t){if(this._DragNodeHash){var e=this._FlowView.viewState,o=(t.clientX-this._DragStartX)/e.Zoom,i=(t.clientY-this._DragStartY)/e.Zoom,n=this._DragNodeStartX+o,r=this._DragNodeStartY+i;this._FlowView.updateNodePosition(this._DragNodeHash,n,r)}}},{key:"_endNodeDrag",value:function(t){this._SVGElement.classList.remove("panning");var e=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(this._DragNodeHash,'"]'));e&&e.classList.remove("dragging"),this._FlowView.renderFlow(),this._FlowView.marshalFromView();var o=this._FlowView.getNode(this._DragNodeHash);o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=n.IDLE,this._DragNodeHash=null}},{key:"_startPanelDrag",value:function(t,e){var o=this._getPanelHash(e);if(o){var i=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===o});i&&(this._State=n.DRAGGING_PANEL,this._DragPanelHash=o,this._DragPanelStartX=t.clientX,this._DragPanelStartY=t.clientY,this._DragPanelDataStartX=i.X,this._DragPanelDataStartY=i.Y,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelDrag",value:function(t){if(this._DragPanelHash){var e=this._FlowView.viewState,o=(t.clientX-this._DragPanelStartX)/e.Zoom,i=(t.clientY-this._DragPanelStartY)/e.Zoom,n=this._DragPanelDataStartX+o,r=this._DragPanelDataStartY+i;this._FlowView.updatePanelPosition(this._DragPanelHash,n,r)}}},{key:"_endPanelDrag",value:function(t){var e=this;this._SVGElement.classList.remove("panning"),this._FlowView.marshalFromView();var o=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._DragPanelHash});o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=n.IDLE,this._DragPanelHash=null}},{key:"_startPanelResize",value:function(t,e){var o=this._getPanelHash(e);if(o){var i=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===o});i&&(this._State=n.RESIZING_PANEL,this._ResizePanelHash=o,this._ResizeStartY=t.clientY,this._ResizePanelStartHeight=i.Height,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelResize",value:function(t){var e=this;if(this._ResizePanelHash){var o=this._FlowView.viewState,i=(t.clientY-this._ResizeStartY)/o.Zoom,n=Math.max(120,this._ResizePanelStartHeight+i),r=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._ResizePanelHash});if(r&&(r.Height=n),this._FlowView._PanelsLayer){var a=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'+this._ResizePanelHash+'"]');a&&a.setAttribute("height",String(n))}}}},{key:"_endPanelResize",value:function(t){this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._State=n.IDLE,this._ResizePanelHash=null}},{key:"_startHandleDrag",value:function(t,e,o,i,r){this._State=n.DRAGGING_HANDLE,this._DragHandleConnectionHash=e,this._DragHandlePanelHash=o,this._DragHandleType=i,this._DragHandleIsTether=r,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._SVGElement.classList.add("panning")}},{key:"_onHandleDrag",value:function(t){var e=this._FlowView.screenToSVGCoords(t.clientX,t.clientY);this._DragHandleIsTether?this._FlowView.updateTetherHandle(this._DragHandlePanelHash,this._DragHandleType,e.x,e.y):this._FlowView.updateConnectionHandle(this._DragHandleConnectionHash,this._DragHandleType,e.x,e.y)}},{key:"_endHandleDrag",value:function(t){var e=this;if(this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider)if(this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._DragHandleIsTether){var o=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._DragHandlePanelHash});o&&this._FlowView._EventHandlerProvider.fireEvent("onTetherHandleMoved",o)}else{var i=this._FlowView.getConnection(this._DragHandleConnectionHash);i&&this._FlowView._EventHandlerProvider.fireEvent("onConnectionHandleMoved",i)}this._State=n.IDLE,this._DragHandleConnectionHash=null,this._DragHandlePanelHash=null,this._DragHandleType=null,this._DragHandleIsTether=!1}},{key:"_addBezierHandle",value:function(t,e){var o=this._getConnectionHash(t);if(o){this._FlowView.selectConnection(o);var i=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._FlowView.addConnectionHandle(o,i.x,i.y)}}},{key:"_removeBezierHandle",value:function(t){var e=this._getConnectionHash(t);if(e){var o=t.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var i=parseInt(o.replace("bezier-handle-",""),10);isNaN(i)||this._FlowView.removeConnectionHandle(e,i)}}}},{key:"_addTetherBezierHandle",value:function(t,e){var o=this._getPanelHash(t);if(o){this._FlowView.selectTether(o);var i=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._FlowView.addTetherHandle(o,i.x,i.y)}}},{key:"_removeTetherBezierHandle",value:function(t){var e=this._getPanelHash(t);if(e){var o=t.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var i=parseInt(o.replace("bezier-handle-",""),10);isNaN(i)||this._FlowView.removeTetherHandle(e,i)}}}},{key:"_toggleConnectionLineMode",value:function(t){var e=this._FlowView.getConnection(t);if(e){e.Data||(e.Data={});var o=e.Data.LineMode||"bezier";e.Data.LineMode="bezier"===o?"orthogonal":"bezier",e.Data.HandleCustomized=!1,e.Data.BezierHandles=[],e.Data.BezierHandleX=null,e.Data.BezierHandleY=null,e.Data.OrthoCorner1X=null,e.Data.OrthoCorner1Y=null,e.Data.OrthoCorner2X=null,e.Data.OrthoCorner2Y=null,e.Data.OrthoMidOffset=0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionModeChanged",e),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData))}}},{key:"_toggleTetherLineMode",value:function(t){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});e&&(this._FlowView._TetherService&&this._FlowView._TetherService.toggleLineMode(e),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onTetherModeChanged",e),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)))}},{key:"_selectTether",value:function(t){var e=this._getPanelHash(t);e&&this._FlowView.selectTether(e)}},{key:"_startConnection",value:function(t,e){if(this._FlowView.options.EnableConnectionCreation){var o=e.getAttribute("data-node-hash"),i=e.getAttribute("data-port-hash"),r=e.getAttribute("data-port-direction");if(o&&i&&"output"===r){this._State=n.CONNECTING,this._ConnectSourceNodeHash=o,this._ConnectSourcePortHash=i,this._SVGElement.classList.add("connecting");var a=this._FlowView.getPortPosition(o,i);a&&(this._ConnectDragLine=document.createElementNS("http://www.w3.org/2000/svg","path"),this._ConnectDragLine.setAttribute("class","pict-flow-drag-connection"),this._ConnectDragLine.setAttribute("d","M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(a.y)),this._FlowView._ViewportElement.appendChild(this._ConnectDragLine)),t.stopPropagation()}}}},{key:"_onConnectionDrag",value:function(t){if(this._ConnectDragLine){var e=this._FlowView.getPortPosition(this._ConnectSourceNodeHash,this._ConnectSourcePortHash);if(e){var o=this._FlowView.screenToSVGCoords(t.clientX,t.clientY),i=.5*Math.abs(o.x-e.x),n="M ".concat(e.x," ").concat(e.y," C ").concat(e.x+i," ").concat(e.y,", ").concat(o.x-i," ").concat(o.y,", ").concat(o.x," ").concat(o.y);this._ConnectDragLine.setAttribute("d",n)}}}},{key:"_endConnection",value:function(t){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting");var e=document.elementFromPoint(t.clientX,t.clientY);if(e){var o=e.getAttribute("data-port-hash"),i=e.getAttribute("data-node-hash"),r=e.getAttribute("data-port-direction");o&&i&&"input"===r&&this._FlowView.addConnection(this._ConnectSourceNodeHash,this._ConnectSourcePortHash,i,o)}this._State=n.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_cancelConnection",value:function(){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting"),this._State=n.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_startPanning",value:function(t){this._FlowView.deselectAll(),this._State=n.PANNING,this._PanStartX=t.clientX,this._PanStartY=t.clientY,this._PanStartPanX=this._FlowView.viewState.PanX,this._PanStartPanY=this._FlowView.viewState.PanY,this._SVGElement.classList.add("panning")}},{key:"_onPan",value:function(t){var e=t.clientX-this._PanStartX,o=t.clientY-this._PanStartY;this._FlowView.viewState.PanX=this._PanStartPanX+e,this._FlowView.viewState.PanY=this._PanStartPanY+o,this._FlowView.updateViewportTransform()}},{key:"_endPanning",value:function(t){this._SVGElement.classList.remove("panning"),this._State=n.IDLE}},{key:"_selectConnection",value:function(t){var e=this._getConnectionHash(t);e&&this._FlowView.selectConnection(e)}},{key:"_getElementType",value:function(t){if(!t)return"background";var e=t.getAttribute?t.getAttribute("data-element-type"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-element-type"):null)return e;o=o.parentElement,i++}return"background"}},{key:"_getNodeHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-node-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-node-hash"):null)return e;o=o.parentElement,i++}return null}},{key:"_getPanelHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-panel-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-panel-hash"):null)return e;o=o.parentElement,i++}return null}},{key:"_getConnectionHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-connection-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-connection-hash"):null)return e;o=o.parentElement,i++}return null}}])}(i);e.exports=r,e.exports.INTERACTION_STATES=n},{"fable-serviceproviderbase":4}],31:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowLayout",n._FlowView=o&&o.FlowView?o.FlowView:null,n._HorizontalSpacing=250,n._VerticalSpacing=120,n._StartX=100,n._StartY=100,n}return _inherits(e,t),_createClass(e,[{key:"snapToGrid",value:function(t,e){return!e||e<=0?t:Math.round(t/e)*e}},{key:"autoLayout",value:function(t,e){if(t&&0!==t.length){for(var o={},i={},n={},r=0;r<t.length;r++){var a=t[r];o[a.Hash]=a,i[a.Hash]=0,n[a.Hash]=[]}for(var s=0;s<e.length;s++){var l=e[s];i.hasOwnProperty(l.TargetNodeHash)&&i[l.TargetNodeHash]++,n.hasOwnProperty(l.SourceNodeHash)&&n[l.SourceNodeHash].push(l.TargetNodeHash)}var c=[],d=[],p={};for(var h in i)0===i[h]&&d.push(h);for(;d.length>0;){for(var u=[],f=[],w=0;w<d.length;w++){var v=d[w];if(!p[v]){p[v]=!0,u.push(v);for(var g=n[v]||[],y=0;y<g.length;y++){var b=g[y];i[b]--,i[b]<=0&&!p[b]&&f.push(b)}}}u.length>0&&c.push(u),d=f}for(var m=[],_=0;_<t.length;_++)p[t[_].Hash]||m.push(t[_].Hash);m.length>0&&c.push(m);for(var P=this._StartX,F=0;F<c.length;F++){for(var S=c[F],V=0,C=0;C<S.length;C++){var k=o[S[C]];k&&(k.Height||80,C<S.length-1&&this._VerticalSpacing)}for(var T=this._StartY,D=0;D<S.length;D++){var A=o[S[D]];if(A){A.X=P,A.Y=T;var H=A.Width||180,x=A.Height||80;V=Math.max(V,H),T+=x+this._VerticalSpacing}}P+=V+this._HorizontalSpacing}}}},{key:"autoLayoutSubset",value:function(t,e,o){if(t&&0!==t.length){var i=this._StartX,n=this._StartY;if(e&&e.length>0){for(var r=-1/0,a=0;a<e.length;a++){var s=e[a].X+(e[a].Width||180);s>r&&(r=s)}i=r+this._HorizontalSpacing}for(var l={},c=0;c<t.length;c++)l[t[c].Hash]=!0;for(var d={},p={},h={},u=0;u<t.length;u++){var f=t[u];d[f.Hash]=f,p[f.Hash]=0,h[f.Hash]=[]}for(var w=0;w<o.length;w++){var v=o[w],g=l[v.SourceNodeHash],y=l[v.TargetNodeHash];g&&y&&(p[v.TargetNodeHash]++,h[v.SourceNodeHash].push(v.TargetNodeHash))}var b=[],m=[],_={};for(var P in p)0===p[P]&&m.push(P);for(;m.length>0;){for(var F=[],S=[],V=0;V<m.length;V++){var C=m[V];if(!_[C]){_[C]=!0,F.push(C);for(var k=h[C]||[],T=0;T<k.length;T++){var D=k[T];p[D]--,p[D]<=0&&!_[D]&&S.push(D)}}}F.length>0&&b.push(F),m=S}for(var A=[],H=0;H<t.length;H++)_[t[H].Hash]||A.push(t[H].Hash);A.length>0&&b.push(A);for(var x=i,I=0;I<b.length;I++){for(var M=b[I],N=0,L=n,E=0;E<M.length;E++){var z=d[M[E]];if(z){z.X=x,z.Y=L;var R=z.Width||180,B=z.Height||80;N=Math.max(N,R),L+=B+this._VerticalSpacing}}x+=N+this._HorizontalSpacing}}}},{key:"centerNodes",value:function(t,e,o){if(t&&0!==t.length){for(var i=1/0,n=1/0,r=-1/0,a=-1/0,s=0;s<t.length;s++)i=Math.min(i,t[s].X),n=Math.min(n,t[s].Y),r=Math.max(r,t[s].X+(t[s].Width||180)),a=Math.max(a,t[s].Y+(t[s].Height||80));for(var l=e-(i+r)/2,c=o-(n+a)/2,d=0;d<t.length;d++)t[d].X+=l,t[d].Y+=c}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],32:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPanelManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"openPanel",value:function(t){var e=this._FlowView.getNode(t);if(!e)return!1;var o=this._FlowView._NodeTypeProvider.getNodeType(e.Type);if(!o)return!1;var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.NodeHash===t});if(i)return i;var n,r,a,s,l=o.PropertiesPanel,c="panel-".concat(this.fable.getUUID());l?(n=l.DefaultWidth||300,r=l.DefaultHeight||200,a=l.PanelType||"Base",s=l.Title||o.Label||"Properties"):(n=240,r=180,a="Info",s=o.Label||e.Title||"Node Info");var d={Hash:c,NodeHash:t,PanelType:a,Title:s,X:e.X+e.Width+30,Y:e.Y,Width:n,Height:r};return this._FlowView._FlowData.OpenPanels.push(d),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelOpened",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),d}},{key:"closePanel",value:function(t){var e=this._FlowView._FlowData.OpenPanels.findIndex(function(e){return e.Hash===t});if(e<0)return!1;var o=this._FlowView._FlowData.OpenPanels.splice(e,1)[0];return this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(t),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelClosed",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"closePanelForNode",value:function(t){var e=this._FlowView._FlowData.OpenPanels.filter(function(e){return e.NodeHash===t});if(0===e.length)return!1;for(var o=0;o<e.length;o++){var i=this._FlowView._FlowData.OpenPanels.indexOf(e[o]);i>=0&&this._FlowView._FlowData.OpenPanels.splice(i,1),this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(e[o].Hash)}return!0}},{key:"togglePanel",value:function(t){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.NodeHash===t});return e?(this.closePanel(e.Hash),!1):this.openPanel(t)}},{key:"updatePanelPosition",value:function(t,e,o){var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i){if(i.X=e,i.Y=o,this._FlowView._resetHandlesForPanel(t),this._FlowView._PanelsLayer){var n=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'.concat(t,'"]'));n&&(n.setAttribute("x",String(e)),n.setAttribute("y",String(o)))}this._FlowView._renderTethersForNode(i.NodeHash)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],33:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPathGenerator",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"computeDepartApproach",value:function(t,e,o){var i=this._FlowView._GeometryProvider,n=i.sideDirection(t.side||"right"),r=i.sideDirection(e.side||"left");return{departX:t.x+n.dx*o,departY:t.y+n.dy*o,approachX:e.x+r.dx*o,approachY:e.y+r.dy*o,fromDir:n,toDir:r}}},{key:"computeAutoOrthogonalCorners",value:function(t,e,o,i,n,r,a){var s,l,c,d=a||0,p=Math.abs(n.dx)>0,h=Math.abs(r.dx)>0;if(p&&h){var u=(t+o)/2+d;s={x:u,y:e},l={x:u,y:i},c={x:u,y:(e+i)/2}}else if(p||h)p&&!h?(s={x:o+d,y:e},l={x:o+d,y:i},c={x:o+d,y:(e+i)/2}):(s={x:t,y:i+d},l={x:o,y:i+d},c={x:(t+o)/2,y:i+d});else{var f=(e+i)/2+d;s={x:t,y:f},l={x:o,y:f},c={x:(t+o)/2,y:f}}return{corner1:s,corner2:l,midpoint:c}}},{key:"evaluateCubicBezier",value:function(t,e,o,i,n){var r=1-n,a=r*r,s=a*r,l=n*n,c=l*n;return{x:s*t.x+3*a*n*e.x+3*r*l*o.x+c*i.x,y:s*t.y+3*a*n*e.y+3*r*l*o.y+c*i.y}}},{key:"buildBezierPathString",value:function(t,e,o,i,n,r){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," C ").concat(o.x," ").concat(o.y,", ").concat(i.x," ").concat(i.y,", ").concat(n.x," ").concat(n.y," L ").concat(r.x," ").concat(r.y)}},{key:"buildSplitBezierPathString",value:function(t,e,o,i,n,r,a,s,l){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," C ").concat(o.x," ").concat(o.y,", ").concat(i.x," ").concat(i.y,", ").concat(n.x," ").concat(n.y," C ").concat(r.x," ").concat(r.y,", ").concat(a.x," ").concat(a.y,", ").concat(s.x," ").concat(s.y," L ").concat(l.x," ").concat(l.y)}},{key:"buildMultiBezierPathString",value:function(t,e,o,i,n,r,a){for(var s=[e],l=0;l<o.length;l++)s.push(o[l]);s.push(i);for(var c="M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y),d=0;d<s.length-1;d++){var p=s[d],h=s[d+1],u=h.x-p.x,f=h.y-p.y,w=Math.sqrt(u*u+f*f);w<1&&(w=1);var v=.35*w,g=void 0,y=void 0;if(0===d)g=r.dx,y=r.dy;else{var b=s[d-1],m=s[d+1];g=m.x-b.x,y=m.y-b.y;var _=Math.sqrt(g*g+y*y);_<1&&(_=1),g/=_,y/=_}var P=void 0,F=void 0;if(d===s.length-2)P=-a.dx,F=-a.dy;else{var S=s[d],V=s[d+2];P=V.x-S.x,F=V.y-S.y;var C=Math.sqrt(P*P+F*F);C<1&&(C=1),P/=C,F/=C}var k=p.x+g*v,T=p.y+y*v,D=h.x-P*v,A=h.y-F*v;c+=" C ".concat(k," ").concat(T,", ").concat(D," ").concat(A,", ").concat(h.x," ").concat(h.y)}return c+=" L ".concat(n.x," ").concat(n.y)}},{key:"buildOrthogonalPathString",value:function(t,e,o,i,n,r){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," L ").concat(o.x," ").concat(o.y," L ").concat(i.x," ").concat(i.y," L ").concat(n.x," ").concat(n.y," L ").concat(r.x," ").concat(r.y)}},{key:"computeDirectionalGeometry",value:function(t,e){var o,i=this._FlowView._GeometryProvider.sideDirection(t.side||"right"),n=this._FlowView._GeometryProvider.sideDirection(e.side||"left"),r=t.x+20*i.dx,a=t.y+20*i.dy,s=e.x+20*n.dx,l=e.y+20*n.dy,c=Math.abs(s-r),d=Math.abs(l-a),p=Math.sqrt(c*c+d*d),h=Math.max(Math.min(.4*p,180),30),u=0!==i.dx&&0!==n.dx||0!==i.dy&&0!==n.dy,f=!1;if(u&&(1===i.dx&&-1===n.dx&&e.x>=t.x||-1===i.dx&&1===n.dx&&e.x<=t.x||1===i.dy&&-1===n.dy&&e.y>=t.y||-1===i.dy&&1===n.dy&&e.y<=t.y)&&(f=!0),f){var w=0!==i.dx?c:d;o=Math.max(.35*w,30)}else o=u?Math.max(h,60):Math.max(.8*h,40);return{departX:r,departY:a,approachX:s,approachY:l,cp1X:r+i.dx*o,cp1Y:a+i.dy*o,cp2X:s+n.dx*o,cp2Y:l+n.dy*o,startDir:i,endDir:n}}},{key:"distanceToSegment",value:function(t,e,o,i,n,r){var a=n-o,s=r-i,l=a*a+s*s;if(l<.001){var c=t-o,d=e-i;return Math.sqrt(c*c+d*d)}var p=((t-o)*a+(e-i)*s)/l;p<0&&(p=0),p>1&&(p=1);var h=t-(o+p*a),u=e-(i+p*s);return Math.sqrt(h*h+u*u)}},{key:"getAutoMidpoint",value:function(t,e){var o=this.computeDirectionalGeometry(t,e);return this.evaluateCubicBezier({x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},.5)}},{key:"getAutoMidpointSimple",value:function(t,e,o){var i=this.computeDepartApproach(t,e,o),n=Math.abs(i.approachX-i.departX),r=Math.abs(i.approachY-i.departY),a=.4*Math.max(n,r,40),s={x:i.departX,y:i.departY},l={x:i.departX+i.fromDir.dx*a,y:i.departY+i.fromDir.dy*a},c={x:i.approachX+i.toDir.dx*a,y:i.approachY+i.toDir.dy*a},d={x:i.approachX,y:i.approachY};return this.evaluateCubicBezier(s,l,c,d,.5)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],34:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPortRenderer",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderPorts",value:function(t,e,o,i,n,r){if(this._FlowView&&t.Ports&&Array.isArray(t.Ports)){n&&n.PortLabelsVertical,n&&n.PortLabelPadding,n&&n.PortLabelsOutside;for(var a=this._FlowView._GeometryProvider,s={},l=0;l<t.Ports.length;l++){var c=t.Ports[l],d=c.Side||("input"===c.Direction?"left":"right");s[d]||(s[d]=[]),s[d].push(c)}var p={};for(var h in s)p[h]=s[h].length;for(var u in s)for(var f=s[u],w=a?a.getEdgeFromSide(u):u,v=0;v<f.length;v++){var g=f[v],y=this.getPortLocalPosition(u,v,f.length,o,i,r,p),b=null;if(g.Label){var m=g.PortType&&{"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"}[g.PortType]||"#95a5a6",_=12,P=5*g.Label.length,F=void 0,S=void 0,V=void 0,C=void 0,k=void 0,T=void 0,D=void 0,A=void 0,H=void 0,x=void 0;"left"===w?(C=(F=1)+5+5,k="start",T=F+(V=10+P+5+2)-2,D=S=y.y-6,A=2,H=_,x="M "+F+" "+S+" L "+(F+V)+" "+S+" L "+(F+V)+" "+(S+_)+" L "+F+" "+(S+_)):"right"===w?(C=(F=o-(V=7+P+5+5)-1)+2+5,k="start",T=F,D=S=y.y-6,A=2,H=_,x="M "+(F+V)+" "+S+" L "+F+" "+S+" L "+F+" "+(S+_)+" L "+(F+V)+" "+(S+_)):"top"===w?(V=P+10,F=y.x-V/2,S=1,C=y.x,k="middle",T=F,D=S+_-2,A=V,H=2,x="M "+F+" "+S+" L "+F+" "+(S+_)+" L "+(F+V)+" "+(S+_)+" L "+(F+V)+" "+S):(V=P+10,F=y.x-V/2,S=i-_-1,C=y.x,k="middle",T=F,D=S,A=V,H=2,x="M "+F+" "+(S+_)+" L "+F+" "+S+" L "+(F+V)+" "+S+" L "+(F+V)+" "+(S+_));var I=this._FlowView._SVGHelperProvider.createSVGElement("rect");I.setAttribute("class","pict-flow-port-label-bg"),I.setAttribute("x",String(F)),I.setAttribute("y",String(S)),I.setAttribute("width",String(V)),I.setAttribute("height",String(_)),I.setAttribute("fill","var(--pf-port-label-bg, rgba(255, 253, 240, 0.5))"),e.appendChild(I);var M=this._FlowView._SVGHelperProvider.createSVGElement("path");M.setAttribute("class","pict-flow-port-label-bg"),M.setAttribute("d",x),M.setAttribute("fill","none"),M.setAttribute("stroke",m),M.setAttribute("stroke-width","0.75"),e.appendChild(M);var N=this._FlowView._SVGHelperProvider.createSVGElement("rect");N.setAttribute("class","pict-flow-port-label-bg"),N.setAttribute("x",String(T)),N.setAttribute("y",String(D)),N.setAttribute("width",String(A)),N.setAttribute("height",String(H)),N.setAttribute("fill",m),e.appendChild(N),(b=this._FlowView._SVGHelperProvider.createSVGElement("text")).setAttribute("class","pict-flow-port-label"),b.setAttribute("fill","var(--pf-port-label-text, #2c3e50)"),b.textContent=g.Label,b.setAttribute("x",String(C)),b.setAttribute("y",String(S+6)),b.setAttribute("text-anchor",k),b.setAttribute("dominant-baseline","central")}var L=this._FlowView._ConnectorShapesProvider,E=void 0;if(L)E=L.createPortElement(g,y,t.Hash);else{E=this._FlowView._SVGHelperProvider.createSVGElement("circle");var z="pict-flow-port ".concat(g.Direction);g.PortType&&(z+=" port-type-".concat(g.PortType)),E.setAttribute("class",z),E.setAttribute("cx",String(y.x)),E.setAttribute("cy",String(y.y)),E.setAttribute("r","5"),E.setAttribute("data-port-hash",g.Hash),E.setAttribute("data-node-hash",t.Hash),E.setAttribute("data-port-direction",g.Direction),g.PortType&&E.setAttribute("data-port-type",g.PortType),E.setAttribute("data-element-type","port")}e.appendChild(E),b&&e.appendChild(b)}}}},{key:"getPortLocalPosition",value:function(t,e,o,i,n,r,a){return this._FlowView._GeometryProvider.getPortLocalPosition(t,e,o,i,n,r,a)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],35:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowRenderManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderFlow",value:function(){if(this._FlowView&&this._FlowView._NodesLayer&&this._FlowView._ConnectionsLayer){for(;this._FlowView._NodesLayer.firstChild;)this._FlowView._NodesLayer.removeChild(this._FlowView._NodesLayer.firstChild);for(;this._FlowView._ConnectionsLayer.firstChild;)this._FlowView._ConnectionsLayer.removeChild(this._FlowView._ConnectionsLayer.firstChild);for(var t=0;t<this._FlowView._FlowData.Connections.length;t++){var e=this._FlowView._FlowData.Connections[t],o=this._FlowView._FlowData.ViewState.SelectedConnectionHash===e.Hash;this._FlowView._ConnectionRenderer.renderConnection(e,this._FlowView._ConnectionsLayer,o)}for(var i=0;i<this._FlowView._FlowData.Nodes.length;i++){var n=this._FlowView._FlowData.Nodes[i],r=this._FlowView._FlowData.ViewState.SelectedNodeHash===n.Hash,a=this._FlowView._NodeTypeProvider.getNodeType(n.Type);if(a&&a.DefaultPorts&&n.Ports)for(var s=0;s<n.Ports.length;s++)for(var l=n.Ports[s],c=0;c<a.DefaultPorts.length;c++){var d=a.DefaultPorts[c];if(d.Label===l.Label&&d.Direction===l.Direction){d.PortType&&(l.PortType=d.PortType),d.Side&&(l.Side=d.Side);break}}this._FlowView._NodeView.renderNode(n,this._FlowView._NodesLayer,r,a)}this._FlowView._PropertiesPanelView&&this._FlowView._PanelsLayer&&this._FlowView._TethersLayer&&this._FlowView._PropertiesPanelView.renderPanels(this._FlowView._FlowData.OpenPanels,this._FlowView._PanelsLayer,this._FlowView._TethersLayer,this._FlowView._FlowData.ViewState.SelectedTetherHash),this._FlowView.updateViewportTransform()}}},{key:"renderSingleConnection",value:function(t){if(this._FlowView&&this._FlowView._ConnectionsLayer){for(var e=this._FlowView._ConnectionsLayer.querySelectorAll('[data-connection-hash="'.concat(t,'"]')),o=0;o<e.length;o++)e[o].remove();var i=this._FlowView.getConnection(t);if(i){var n=this._FlowView._FlowData.ViewState.SelectedConnectionHash===t;this._FlowView._ConnectionRenderer.renderConnection(i,this._FlowView._ConnectionsLayer,n)}}}},{key:"renderSingleTether",value:function(t){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){for(var e=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(t,'"]')),o=0;o<e.length;o++)e[o].remove();var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i){var n=this._FlowView.getNode(i.NodeHash);if(n){var r=this._FlowView._FlowData.ViewState.SelectedTetherHash===t;this._FlowView._TetherService.renderTether(i,n,this._FlowView._TethersLayer,r,this._FlowView.options.ViewIdentifier)}}}}},{key:"updateNodePosition",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getNode(t);if(i){this._FlowView.options.EnableGridSnap&&(e=this._FlowView._LayoutService.snapToGrid(e,this._FlowView.options.GridSnapSize),o=this._FlowView._LayoutService.snapToGrid(o,this._FlowView.options.GridSnapSize)),i.X=e,i.Y=o,this._FlowView._resetHandlesForNode(t);var n=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(t,'"]'));n&&n.setAttribute("transform","translate(".concat(e,", ").concat(o,")")),this.renderConnectionsForNode(t),this.renderTethersForNode(t)}}}},{key:"renderConnectionsForNode",value:function(t){if(this._FlowView&&this._FlowView._ConnectionsLayer)for(var e=this._FlowView._FlowData.Connections.filter(function(e){return e.SourceNodeHash===t||e.TargetNodeHash===t}),o=0;o<e.length;o++){for(var i=e[o],n=this._FlowView._FlowData.ViewState.SelectedConnectionHash===i.Hash,r=this._FlowView._ConnectionsLayer.querySelectorAll('[data-connection-hash="'.concat(i.Hash,'"]')),a=0;a<r.length;a++)r[a].remove();this._FlowView._ConnectionRenderer.renderConnection(i,this._FlowView._ConnectionsLayer,n)}}},{key:"renderTethersForNode",value:function(t){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){var e=this._FlowView._FlowData.OpenPanels.filter(function(e){return e.NodeHash===t});if(0!==e.length)for(var o=0;o<e.length;o++){for(var i=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(e[o].Hash,'"]')),n=0;n<i.length;n++)i[n].remove();var r=this._FlowView.getNode(e[o].NodeHash);if(r){var a=this._FlowView._FlowData.ViewState.SelectedTetherHash===e[o].Hash;this._FlowView._TetherService.renderTether(e[o],r,this._FlowView._TethersLayer,a,this._FlowView.options.ViewIdentifier)}}}}},{key:"reinjectMarkerDefs",value:function(){if(this._FlowView&&this._FlowView._ConnectorShapesProvider&&this._FlowView._SVGElement){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView._SVGElement.querySelector("defs");if(e){for(var o=e.querySelectorAll("marker"),i=0;i<o.length;i++)o[i].remove();var n=this._FlowView._ConnectorShapesProvider.generateMarkerDefs(t),r=document.createElementNS("http://www.w3.org/2000/svg","svg");for(r.innerHTML=n;r.firstChild;)e.appendChild(r.firstChild)}}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],36:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowSelectionManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"selectNode",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedNodeHash;if(this._FlowView._FlowData.ViewState.SelectedNodeHash=t,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onNodeSelected",o)}}},{key:"selectConnection",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedConnectionHash;if(this._FlowView._FlowData.ViewState.SelectedConnectionHash=t,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.Connections.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onConnectionSelected",o)}}},{key:"selectTether",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedTetherHash;if(this._FlowView._FlowData.ViewState.SelectedTetherHash=t,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onTetherSelected",o)}}},{key:"deselectAll",value:function(){this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow()}},{key:"deleteSelected",value:function(){return this._FlowView._FlowData.ViewState.SelectedNodeHash?this._FlowView.removeNode(this._FlowView._FlowData.ViewState.SelectedNodeHash):!!this._FlowView._FlowData.ViewState.SelectedConnectionHash&&this._FlowView.removeConnection(this._FlowView._FlowData.ViewState.SelectedConnectionHash)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],37:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowTether",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"getSmartAnchors",value:function(t,e){var o,i,n=e.X+e.Width/2,r=e.Y+e.Height/2,a=t.X+t.Width/2-n,s=t.Y+t.Height/2-r;Math.abs(a)>=Math.abs(s)?a>=0?(o="right",i="left"):(o="left",i="right"):s>=0?(o="bottom",i="top"):(o="top",i="bottom");var l=this._FlowView._GeometryProvider.getEdgeCenter(e,o),c=this._FlowView._GeometryProvider.getEdgeCenter(t,i);return{nodeAnchor:Object.assign(l,{side:o}),panelAnchor:Object.assign(c,{side:i})}}},{key:"generateBezierPath",value:function(t,e,o,i){var n=this._FlowView._GeometryProvider.sideDirection(t.side),r=this._FlowView._GeometryProvider.sideDirection(e.side),a=t.x+20*n.dx,s=t.y+20*n.dy,l=e.x+20*r.dx,c=e.y+20*r.dy;if(null==o||null==i){var d=Math.abs(l-a),p=Math.abs(c-s),h=.4*Math.max(d,p,40),u=a+n.dx*h,f=s+n.dy*h,w=l+r.dx*h,v=c+r.dy*h;return this._FlowView._PathGenerator.buildBezierPathString({x:t.x,y:t.y},{x:a,y:s},{x:u,y:f},{x:w,y:v},{x:l,y:c},{x:e.x,y:e.y})}var g=a+30*n.dx,y=s+30*n.dy,b=l+30*r.dx,m=c+30*r.dy,_=l-a,P=c-s,F=Math.sqrt(_*_+P*P)||1,S=o-25*(_/=F),V=i-25*(P/=F),C=o+25*_,k=i+25*P;return this._FlowView._PathGenerator.buildSplitBezierPathString({x:t.x,y:t.y},{x:a,y:s},{x:g,y:y},{x:S,y:V},{x:o,y:i},{x:C,y:k},{x:b,y:m},{x:l,y:c},{x:e.x,y:e.y})}},{key:"generateOrthogonalPath",value:function(t,e,o,i){var n,r,a=this._FlowView._GeometryProvider.sideDirection(t.side),s=this._FlowView._GeometryProvider.sideDirection(e.side),l=t.x+20*a.dx,c=t.y+20*a.dy,d=e.x+20*s.dx,p=e.y+20*s.dy;if(o&&o.corner1&&o.corner2)n=o.corner1,r=o.corner2;else{var h=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(l,c,d,p,a,s,i);n=h.corner1,r=h.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:t.x,y:t.y},{x:l,y:c},{x:n.x,y:n.y},{x:r.x,y:r.y},{x:d,y:p},{x:e.x,y:e.y})}},{key:"getAutoMidpoint",value:function(t,e){return this._FlowView._PathGenerator.getAutoMidpointSimple(t,e,20)}},{key:"getOrthoGeometry",value:function(t,e,o){var i,n=this._FlowView._GeometryProvider.sideDirection(t.side),r=this._FlowView._GeometryProvider.sideDirection(e.side),a=t.x+20*n.dx,s=t.y+20*n.dy,l=e.x+20*r.dx,c=e.y+20*r.dy;o.TetherHandleCustomized&&null!=o.TetherOrthoCorner1X?((i=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,s,l,c,n,r,o.TetherOrthoMidOffset||0)).corner1={x:o.TetherOrthoCorner1X,y:o.TetherOrthoCorner1Y},i.corner2={x:o.TetherOrthoCorner2X,y:o.TetherOrthoCorner2Y}):i=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,s,l,c,n,r,o.TetherOrthoMidOffset||0);var d={x:(i.corner1.x+i.corner2.x)/2,y:(i.corner1.y+i.corner2.y)/2};return{corner1:i.corner1,corner2:i.corner2,midpoint:d}}},{key:"generatePath",value:function(t,e,o){if("orthogonal"===(t.TetherLineMode||"bezier")){var i=null;return t.TetherHandleCustomized&&null!=t.TetherOrthoCorner1X&&(i={corner1:{x:t.TetherOrthoCorner1X,y:t.TetherOrthoCorner1Y},corner2:{x:t.TetherOrthoCorner2X,y:t.TetherOrthoCorner2Y}}),this.generateOrthogonalPath(e,o,i,t.TetherOrthoMidOffset||0)}var n=this._getTetherBezierHandles(t);if(n.length>0)return this.generateMultiBezierPath(e,o,n);var r=t.TetherHandleCustomized&&null!=t.TetherBezierHandleX?t.TetherBezierHandleX:null,a=t.TetherHandleCustomized&&null!=t.TetherBezierHandleY?t.TetherBezierHandleY:null;return this.generateBezierPath(e,o,r,a)}},{key:"_getTetherBezierHandles",value:function(t){return t&&t.TetherHandleCustomized?Array.isArray(t.TetherBezierHandles)&&t.TetherBezierHandles.length>0?t.TetherBezierHandles:null!=t.TetherBezierHandleX&&null!=t.TetherBezierHandleY?[{x:t.TetherBezierHandleX,y:t.TetherBezierHandleY}]:[]:[]}},{key:"generateMultiBezierPath",value:function(t,e,o){var i=this._FlowView._GeometryProvider.sideDirection(t.side),n=this._FlowView._GeometryProvider.sideDirection(e.side),r={x:t.x+20*i.dx,y:t.y+20*i.dy},a={x:e.x+20*n.dx,y:e.y+20*n.dy};return this._FlowView._PathGenerator.buildMultiBezierPathString(t,r,t.side,a,e.side,e,o)}},{key:"updateHandlePosition",value:function(t,e,o,i){if(t.TetherHandleCustomized=!0,e&&e.startsWith("bezier-handle-")){var n=parseInt(e.replace("bezier-handle-",""),10);!isNaN(n)&&Array.isArray(t.TetherBezierHandles)&&n<t.TetherBezierHandles.length&&(t.TetherBezierHandles[n].x=o,t.TetherBezierHandles[n].y=i)}else switch(e){case"bezier-midpoint":Array.isArray(t.TetherBezierHandles)&&0!==t.TetherBezierHandles.length?(t.TetherBezierHandles[0].x=o,t.TetherBezierHandles[0].y=i):t.TetherBezierHandles=[{x:o,y:i}],t.TetherBezierHandleX=o,t.TetherBezierHandleY=i;break;case"ortho-corner1":t.TetherOrthoCorner1X=o,t.TetherOrthoCorner1Y=i;break;case"ortho-corner2":t.TetherOrthoCorner2X=o,t.TetherOrthoCorner2Y=i;break;case"ortho-midpoint":t.TetherOrthoMidOffset=t.TetherOrthoMidOffset||0,t._TetherMidDragX=o,t._TetherMidDragY=i}}},{key:"resetHandlePositions",value:function(t){t.TetherHandleCustomized&&(t.TetherHandleCustomized=!1,t.TetherBezierHandles=[],t.TetherBezierHandleX=null,t.TetherBezierHandleY=null,t.TetherOrthoCorner1X=null,t.TetherOrthoCorner1Y=null,t.TetherOrthoCorner2X=null,t.TetherOrthoCorner2Y=null,t.TetherOrthoMidOffset=0)}},{key:"resetHandlesForNode",value:function(t,e){for(var o=0;o<t.length;o++){var i=t[o];i.NodeHash===e&&this.resetHandlePositions(i)}}},{key:"addHandle",value:function(t,e,o,i,n){t.TetherLineMode="bezier",Array.isArray(t.TetherBezierHandles)||(t.TetherBezierHandles=[],null!=t.TetherBezierHandleX&&null!=t.TetherBezierHandleY&&t.TetherBezierHandles.push({x:t.TetherBezierHandleX,y:t.TetherBezierHandleY}));var r=0;this._FlowView._ConnectionRenderer&&i&&n&&(r=this._FlowView._ConnectionRenderer.computeInsertionIndex(t.TetherBezierHandles,{x:e,y:o},i,n)),t.TetherBezierHandles.splice(r,0,{x:e,y:o}),t.TetherHandleCustomized=!0}},{key:"removeHandle",value:function(t,e){Array.isArray(t.TetherBezierHandles)&&(e<0||e>=t.TetherBezierHandles.length||(t.TetherBezierHandles.splice(e,1),0===t.TetherBezierHandles.length&&(t.TetherHandleCustomized=!1,t.TetherBezierHandleX=null,t.TetherBezierHandleY=null)))}},{key:"toggleLineMode",value:function(t){var e=t.TetherLineMode||"bezier";return t.TetherLineMode="bezier"===e?"orthogonal":"bezier",t.TetherHandleCustomized=!1,t.TetherBezierHandles=[],t.TetherBezierHandleX=null,t.TetherBezierHandleY=null,t.TetherOrthoCorner1X=null,t.TetherOrthoCorner1Y=null,t.TetherOrthoCorner2X=null,t.TetherOrthoCorner2Y=null,t.TetherOrthoMidOffset=0,t.TetherLineMode}},{key:"renderTether",value:function(t,e,o,i,n){if(e){var r=this.getSmartAnchors(t,e),a=r.panelAnchor,s=r.nodeAnchor,l=this.generatePath(t,a,s),c=this._FlowView._ConnectorShapesProvider;if(c){var d=c.createTetherHitAreaElement(l,t.Hash);o.appendChild(d);var p=c.createTetherPathElement(l,t.Hash,i,n);o.appendChild(p)}else{var h=this._FlowView._SVGHelperProvider.createSVGElement("path");h.setAttribute("class","pict-flow-tether-hitarea"),h.setAttribute("d",l),h.setAttribute("data-element-type","tether-hitarea"),h.setAttribute("data-panel-hash",t.Hash),o.appendChild(h);var u=this._FlowView._SVGHelperProvider.createSVGElement("path");u.setAttribute("class","pict-flow-tether-line".concat(i?" selected":"")),u.setAttribute("d",l),u.setAttribute("marker-end","url(#flow-tether-arrowhead-".concat(n,")")),u.setAttribute("data-element-type","tether"),u.setAttribute("data-panel-hash",t.Hash),o.appendChild(u)}i&&this._renderHandles(t,o,a,s)}}},{key:"_renderHandles",value:function(t,e,o,i){if("orthogonal"===(t.TetherLineMode||"bezier")){var n=this.getOrthoGeometry(o,i,t);this._createHandle(e,t.Hash,"ortho-corner1",n.corner1.x,n.corner1.y,"pict-flow-tether-handle"),this._createHandle(e,t.Hash,"ortho-midpoint",n.midpoint.x,n.midpoint.y,"pict-flow-tether-handle-midpoint"),this._createHandle(e,t.Hash,"ortho-corner2",n.corner2.x,n.corner2.y,"pict-flow-tether-handle")}else{var r=this._getTetherBezierHandles(t);if(r.length>0)for(var a=0;a<r.length;a++)this._createHandle(e,t.Hash,"bezier-handle-"+a,r[a].x,r[a].y,"pict-flow-tether-handle");else{var s=this.getAutoMidpoint(o,i);this._createHandle(e,t.Hash,"bezier-midpoint",s.x,s.y,"pict-flow-tether-handle-midpoint")}}}},{key:"_createHandle",value:function(t,e,o,i,n,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-tether-handle-midpoint"===r?"tether-handle-midpoint":"tether-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(t,e,o,i,n,a,"tether-handle","data-panel-hash")}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],38:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowViewportManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n._IsFullscreen=!1,n}return _inherits(e,t),_createClass(e,[{key:"updateViewportTransform",value:function(){if(this._FlowView._ViewportElement){var t=this._FlowView._FlowData.ViewState;this._FlowView._ViewportElement.setAttribute("transform","translate(".concat(t.PanX,", ").concat(t.PanY,") scale(").concat(t.Zoom,")"))}}},{key:"setZoom",value:function(t,e,o){var i=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,t)),n=this._FlowView._FlowData.ViewState.Zoom;if("number"==typeof e&&"number"==typeof o){var r=this._FlowView._FlowData.ViewState;r.PanX=e-(e-r.PanX)*(i/n),r.PanY=o-(o-r.PanY)*(i/n)}this._FlowView._FlowData.ViewState.Zoom=i,this.updateViewportTransform()}},{key:"zoomToFit",value:function(){if(0!==this._FlowView._FlowData.Nodes.length&&this._FlowView._SVGElement){for(var t=1/0,e=1/0,o=-1/0,i=-1/0,n=0;n<this._FlowView._FlowData.Nodes.length;n++){var r=this._FlowView._FlowData.Nodes[n];t=Math.min(t,r.X),e=Math.min(e,r.Y),o=Math.max(o,r.X+r.Width),i=Math.max(i,r.Y+r.Height)}var a=o-t+100,s=i-e+100,l=this._FlowView._SVGElement.getBoundingClientRect(),c=l.width/a,d=l.height/s,p=Math.min(c,d,1);p=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,p));var h=(t+o)/2,u=(e+i)/2;this._FlowView._FlowData.ViewState.Zoom=p,this._FlowView._FlowData.ViewState.PanX=l.width/2-h*p,this._FlowView._FlowData.ViewState.PanY=l.height/2-u*p,this.updateViewportTransform()}}},{key:"screenToSVGCoords",value:function(t,e){if(!this._FlowView._SVGElement)return{x:t,y:e};var o=this._FlowView._SVGElement.createSVGPoint();o.x=t,o.y=e;var i=this._FlowView._SVGElement.getScreenCTM();if(i){var n=i.inverse(),r=o.matrixTransform(n),a=this._FlowView._FlowData.ViewState;return{x:(r.x-a.PanX)/a.Zoom,y:(r.y-a.PanY)/a.Zoom}}return{x:t,y:e}}},{key:"toggleFullscreen",value:function(){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(t));if(e.length<1)return this._IsFullscreen;var o=e[0];return this._IsFullscreen=!this._IsFullscreen,this._IsFullscreen?o.classList.add("pict-flow-fullscreen"):o.classList.remove("pict-flow-fullscreen"),this._IsFullscreen}},{key:"exitFullscreen",value:function(){if(this._IsFullscreen){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(t));e.length>0&&e[0].classList.remove("pict-flow-fullscreen"),this._IsFullscreen=!1}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],39:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-FloatingToolbar",DefaultRenderable:"Flow-FloatingToolbar-Content",DefaultDestinationAddress:"#Flow-FloatingToolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",CSS:!1,Templates:[{Hash:"Flow-FloatingToolbar-Template",Template:'\n<div class="pict-flow-floating-toolbar" id="Flow-FloatingToolbar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-floating-grip" id="Flow-FloatingGrip-{~D:Record.FlowViewIdentifier~}" title="Drag to move · Double-click to collapse">\n\t\t<span id="Flow-FloatingIcon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t</div>\n\t<button class="pict-flow-floating-btn" data-flow-action="add-node" title="Add Node">\n\t\t<span id="Flow-FloatingIcon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="cards-popup" title="Cards">\n\t\t<span id="Flow-FloatingIcon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="delete-selected" title="Delete Selected">\n\t\t<span id="Flow-FloatingIcon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-in" title="Zoom In">\n\t\t<span id="Flow-FloatingIcon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-out" title="Zoom Out">\n\t\t<span id="Flow-FloatingIcon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-fit" title="Fit to View">\n\t\t<span id="Flow-FloatingIcon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="auto-layout" title="Auto Layout">\n\t\t<span id="Flow-FloatingIcon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="layout-popup" title="Layout">\n\t\t<span id="Flow-FloatingIcon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="fullscreen" title="Toggle Fullscreen">\n\t\t<span id="Flow-FloatingIcon-fullscreen-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="dock-toolbar" title="Dock Toolbar">\n\t\t<span id="Flow-FloatingIcon-dock-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-FloatingToolbar-Content",TemplateHash:"Flow-FloatingToolbar-Template",DestinationAddress:"#Flow-FloatingToolbar-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowFloatingToolbar",r._ToolbarView=null,r._FlowView=null,r._IsCollapsed=!1,r._IsDragging=!1,r._DragStartX=0,r._DragStartY=0,r._DragStartLeft=0,r._DragStartTop=0,r._BoundMouseMove=null,r._BoundMouseUp=null,r}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o,i){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"onAfterRender",value:function(t,o,i,n){var r=this,a=this.options.FlowViewIdentifier,s=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(a));s.length>0&&s[0].addEventListener("click",function(t){var e=t.target;if(e){var o=e.closest("[data-flow-action]");if(o){var i=o.getAttribute("data-flow-action");"dock-toolbar"!==i?r._ToolbarView&&r._ToolbarView._handleToolbarAction(i):r._ToolbarView&&r._ToolbarView._setToolbarMode("docked")}}});var l=this.pict.ContentAssignment.getElement("#Flow-FloatingGrip-".concat(a));if(l.length>0&&(l[0].addEventListener("mousedown",function(t){r._startDrag(t)}),l[0].addEventListener("dblclick",function(t){t.preventDefault(),t.stopPropagation(),r._toggleCollapse()})),this._populateIcons(),s.length>0){if(!1===this.options.EnableAddNode){var c=s[0].querySelector('[data-flow-action="add-node"]');c&&c.remove()}if(!1===this.options.EnableCardPalette){var d=s[0].querySelector('[data-flow-action="cards-popup"]');d&&d.remove()}}return _superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"_populateIcons",value:function(){var t=this._FlowView?this._FlowView._IconProvider:null;if(t)for(var e=this.options.FlowViewIdentifier,o={grip:"grip",plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",fullscreen:"fullscreen",dock:"dock"},i=Object.keys(o),n=0;n<i.length;n++){var r="Flow-FloatingIcon-".concat(i[n],"-").concat(e),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=t.getIconSVGMarkup(o[i[n]],16))}}},{key:"_toggleCollapse",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));e.length<1||(this._IsCollapsed=!this._IsCollapsed,this._IsCollapsed?e[0].classList.add("collapsed"):e[0].classList.remove("collapsed"))}},{key:"_startDrag",value:function(t){var e=this;t.preventDefault();var o=this.options.FlowViewIdentifier,i=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(o));if(!(i.length<1)){var n=i[0];this._IsDragging=!0,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._DragStartLeft=n.offsetLeft,this._DragStartTop=n.offsetTop,this._BoundMouseMove=function(t){e._onDragMove(t)},this._BoundMouseUp=function(){e._onDragEnd()},document.addEventListener("mousemove",this._BoundMouseMove),document.addEventListener("mouseup",this._BoundMouseUp)}}},{key:"_onDragMove",value:function(t){if(this._IsDragging){var e=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(e));if(!(o.length<1)){var i=o[0],n=t.clientX-this._DragStartX,r=t.clientY-this._DragStartY,a=this._DragStartLeft+n,s=this._DragStartTop+r,l=i.parentElement;if(l){var c=l.clientWidth-i.offsetWidth,d=l.clientHeight-i.offsetHeight;a=Math.max(0,Math.min(a,c)),s=Math.max(0,Math.min(s,d))}i.style.left=a+"px",i.style.top=s+"px"}}}},{key:"_onDragEnd",value:function(){if(this._IsDragging=!1,this._BoundMouseMove&&(document.removeEventListener("mousemove",this._BoundMouseMove),this._BoundMouseMove=null),this._BoundMouseUp&&(document.removeEventListener("mouseup",this._BoundMouseUp),this._BoundMouseUp=null),this._ToolbarView){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));e.length>0&&(this._ToolbarView._FloatingPosition.X=e[0].offsetLeft,this._ToolbarView._FloatingPosition.Y=e[0].offsetTop)}}},{key:"show",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(t));e.length>0&&(e[0].style.display="block");var o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));o.length>0&&this._ToolbarView&&(o[0].style.left=this._ToolbarView._FloatingPosition.X+"px",o[0].style.top=this._ToolbarView._FloatingPosition.Y+"px"),this._IsCollapsed&&o.length>0&&(this._IsCollapsed=!1,o[0].classList.remove("collapsed"))}},{key:"hide",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(t));e.length>0&&(e[0].style.display="none")}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],40:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-NodeRenderer",AutoRender:!1,NodeTitleBarHeight:22},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowNode",r._FlowView=null,r}return _inherits(e,t),_createClass(e,[{key:"renderNode",value:function(t,e,o,i){var n=this,r=this._FlowView._SVGHelperProvider.createSVGElement("g"),a="pict-flow-node ".concat(o?"selected":""," pict-flow-node-").concat(t.Type||"default");i&&(i.PortLabelsOnHover&&(a+=" pict-flow-node-port-labels-hover"),i.PortLabelsVertical&&(a+=" pict-flow-node-port-labels-vertical")),r.setAttribute("class",a),r.setAttribute("transform","translate(".concat(t.X,", ").concat(t.Y,")")),r.setAttribute("data-node-hash",t.Hash),r.setAttribute("data-element-type","node");var s=t.Width||180,l=t.Height||80,c=this.options.NodeTitleBarHeight,d=this._FlowView._GeometryProvider;if(d&&t.Ports&&t.Ports.length>0){var p=d.computeMinimumNodeHeight(t.Ports,c);p>l&&(l=p)}t.Width=s,t.Height=l;var h="rect";if(this._FlowView._ThemeProvider){var u=this._FlowView._ThemeProvider.getActiveTheme();u&&u.NodeBodyMode&&(h=u.NodeBodyMode)}"bracket"===h?this._renderBracketNodeBody(r,t,s,l,c,i):this._renderRectNodeBody(r,t,s,l,c,i);var f=!1,w=12;if(i&&i.CardMetadata){var v=i.CardMetadata,g=this._FlowView._IconProvider;(v.Icon||g)&&(f=!0)}var y=this._FlowView._SVGHelperProvider.createSVGElement("text");y.setAttribute("class","pict-flow-node-title"),f?(y.setAttribute("x",String(24)),y.setAttribute("text-anchor","start")):(y.setAttribute("x",String(s/2)),y.setAttribute("text-anchor","middle")),y.setAttribute("y",String(c/2+1)),y.setAttribute("dominant-baseline","central"),y.textContent=t.Title||"Untitled",r.appendChild(y);var b=!i||!1!==i.ShowTypeLabel,m=function(){if(b&&i&&i.Label&&i.Label!==t.Title){var e=n._FlowView._SVGHelperProvider.createSVGElement("text");e.setAttribute("class","pict-flow-node-type-label"),e.setAttribute("x",String(s/2)),e.setAttribute("y",String(c+16)),e.setAttribute("text-anchor","middle"),e.setAttribute("dominant-baseline","central"),e.textContent=i.Label,r.appendChild(e)}if(i&&i.CardMetadata){var o=i.CardMetadata,a=n._FlowView._IconProvider,d=!1,p=(c-w)/2;if(o.Icon&&a&&!a.isEmojiIcon(o.Icon)){var h=a.resolveIconKey(o),u=a.renderIconIntoSVGGroup(h,r,8,p,w);u&&u.setAttribute("class",(u.getAttribute("class")||"")+" pict-flow-node-title-icon"),d=!0}else if(o.Icon&&a&&a.isEmojiIcon(o.Icon)){var f=n._FlowView._SVGHelperProvider.createSVGElement("text");f.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),f.setAttribute("font-size",String(w)),f.setAttribute("text-anchor","middle"),f.setAttribute("dominant-baseline","central"),f.setAttribute("pointer-events","none"),f.setAttribute("x",String(14)),f.setAttribute("y",String(c/2)),f.textContent=o.Icon,r.appendChild(f),d=!0}else if(o.Icon){var v=n._FlowView._SVGHelperProvider.createSVGElement("text");v.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),v.setAttribute("font-size",String(w)),v.setAttribute("text-anchor","middle"),v.setAttribute("dominant-baseline","central"),v.setAttribute("pointer-events","none"),v.setAttribute("x",String(14)),v.setAttribute("y",String(c/2)),v.textContent=o.Icon,r.appendChild(v),d=!0}if(!d&&a){var g=a.renderIconIntoSVGGroup("default",r,8,p,w);g&&g.setAttribute("class",(g.getAttribute("class")||"")+" pict-flow-node-title-icon")}var y=c+(l-c)/2;if(b&&o.Code){var m=n._FlowView._SVGHelperProvider.createSVGElement("text");m.setAttribute("class","pict-flow-node-card-code"),m.setAttribute("font-size","10"),m.setAttribute("font-family","monospace"),m.setAttribute("fill","#7f8c8d"),m.setAttribute("text-anchor","middle"),m.setAttribute("dominant-baseline","central"),m.setAttribute("pointer-events","none"),m.setAttribute("x",String(s/2)),m.setAttribute("y",String(y)),m.textContent=o.Code,r.appendChild(m)}if(o.Tooltip||o.Description){var _=n._FlowView._SVGHelperProvider.createSVGElement("title");_.textContent=o.Tooltip||o.Description,r.appendChild(_)}}};if(!i||!1!==i.LabelsInFront?(this._renderBodyContent(t,r,s,l,i),m(),this._renderPorts(t,r,s,l,i)):(m(),this._renderPorts(t,r,s,l,i),this._renderBodyContent(t,r,s,l,i)),i&&i.PropertiesPanel){var _,P=10,F=s-P-4,S=l-P-4,V=this._FlowView._ConnectorShapesProvider;V?_=V.createPanelIndicatorElement(t.Hash,F,S,P,P):((_=this._FlowView._SVGHelperProvider.createSVGElement("rect")).setAttribute("class","pict-flow-node-panel-indicator"),_.setAttribute("x",String(F)),_.setAttribute("y",String(S)),_.setAttribute("width",String(P)),_.setAttribute("height",String(P)),_.setAttribute("rx","2"),_.setAttribute("ry","2"),_.setAttribute("data-node-hash",t.Hash),_.setAttribute("data-element-type","panel-indicator"));var C=this._FlowView._SVGHelperProvider.createSVGElement("title");C.textContent="Double-click to open properties",_.appendChild(C),r.appendChild(_)}e.appendChild(r)}},{key:"_renderPorts",value:function(t,e,o,i,n){this._FlowView._PortRenderer.renderPorts(t,e,o,i,n,this.options.NodeTitleBarHeight)}},{key:"_renderBodyContent",value:function(t,e,o,i,n){if(n&&n.BodyContent){var r=n.BodyContent,a=r.ContentType;if(a){var s=this.options.NodeTitleBarHeight,l="number"==typeof r.Padding?r.Padding:2,c={x:l,y:s+l,width:o-2*l,height:i-s-2*l},d=this._FlowView.pict||this.pict;if(r.Templates&&Array.isArray(r.Templates)){this._registeredBodyTemplates||(this._registeredBodyTemplates=new Set);for(var p=0;p<r.Templates.length;p++){var h=r.Templates[p];h.Hash&&h.Template&&!this._registeredBodyTemplates.has(h.Hash)&&(d.TemplateProvider.addTemplate(h.Hash,h.Template,"PictViewFlowNode-BodyContent"),this._registeredBodyTemplates.add(h.Hash))}}switch(a){case"svg":this._renderBodyContentSVG(t,e,r,c,n,d);break;case"html":this._renderBodyContentHTML(t,e,r,c,n,d);break;case"canvas":this._renderBodyContentCanvas(t,e,r,c,n);break;default:this.log.warn("PictViewFlowNode _renderBodyContent: unknown ContentType ["+a+"]")}}}}},{key:"_renderBodyContentSVG",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("g");a.setAttribute("class","pict-flow-node-body-content"),a.setAttribute("transform","translate(".concat(i.x,", ").concat(i.y,")"));var s=this._resolveBodyTemplate(o,t,r);if(s){var l=document.createElementNS("http://www.w3.org/2000/svg","svg");for(l.innerHTML=s;l.firstChild;)a.appendChild(l.firstChild)}"function"==typeof o.RenderCallback&&o.RenderCallback(a,t,n,i),e.appendChild(a)}},{key:"_renderBodyContentHTML",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");a.setAttribute("class","pict-flow-node-body-content-fo"),a.setAttribute("x",String(i.x)),a.setAttribute("y",String(i.y)),a.setAttribute("width",String(i.width)),a.setAttribute("height",String(i.height));var s=document.createElement("div");s.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),s.setAttribute("class","pict-flow-node-body-content-html"),s.addEventListener("pointerdown",function(t){t.stopPropagation()}),s.addEventListener("wheel",function(t){t.stopPropagation()});var l=this._resolveBodyTemplate(o,t,r);l&&(s.innerHTML=l),"function"==typeof o.RenderCallback&&o.RenderCallback(s,t,n,i),a.appendChild(s),e.appendChild(a)}},{key:"_renderBodyContentCanvas",value:function(t,e,o,i,n){var r=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");r.setAttribute("class","pict-flow-node-body-content-fo"),r.setAttribute("x",String(i.x)),r.setAttribute("y",String(i.y)),r.setAttribute("width",String(i.width)),r.setAttribute("height",String(i.height));var a=document.createElement("canvas");a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),a.setAttribute("class","pict-flow-node-body-content-canvas"),a.width=Math.floor(i.width),a.height=Math.floor(i.height),a.style.width="100%",a.style.height="100%",a.addEventListener("pointerdown",function(t){t.stopPropagation()}),a.addEventListener("wheel",function(t){t.stopPropagation()}),"function"==typeof o.RenderCallback&&o.RenderCallback(a,t,n,i),r.appendChild(a),e.appendChild(r)}},{key:"_resolveBodyTemplate",value:function(t,e,o){return t.TemplateHash?o.parseTemplateByHash(t.TemplateHash,e):t.Template?o.parseTemplate(t.Template,e,null,[e]):null}},{key:"_renderRectNodeBody",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(i)),a.setAttribute("data-node-hash",e.Hash),a.setAttribute("data-element-type","node-body"),r&&r.BodyStyle)for(var s in r.BodyStyle)a.setAttribute(s,r.BodyStyle[s]);if(e.Style){var l=[];e.Style.BodyFill&&l.push("fill:"+e.Style.BodyFill),e.Style.BodyStroke&&l.push("stroke:"+e.Style.BodyStroke),e.Style.BodyStrokeWidth&&l.push("stroke-width:"+e.Style.BodyStrokeWidth),l.length>0&&a.setAttribute("style",l.join(";"))}t.appendChild(a);var c=this._FlowView._SVGHelperProvider.createSVGElement("rect");c.setAttribute("class","pict-flow-node-title-bar"),c.setAttribute("x","0"),c.setAttribute("y","0"),c.setAttribute("width",String(o)),c.setAttribute("height",String(n)),c.setAttribute("data-node-hash",e.Hash),c.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&c.setAttribute("fill",r.TitleBarColor),t.appendChild(c);var d=this._FlowView._SVGHelperProvider.createSVGElement("rect");d.setAttribute("class","pict-flow-node-title-bar-bottom"),d.setAttribute("x","0"),d.setAttribute("y",String(n-8)),d.setAttribute("width",String(o)),d.setAttribute("height","8"),d.setAttribute("data-node-hash",e.Hash),d.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&d.setAttribute("fill",r.TitleBarColor),e.Style&&e.Style.TitleBarColor&&(c.setAttribute("style","fill:"+e.Style.TitleBarColor),d.setAttribute("style","fill:"+e.Style.TitleBarColor)),t.appendChild(d)}},{key:"_renderBracketNodeBody",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body pict-flow-node-bracket-fill"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(i)),a.setAttribute("data-node-hash",e.Hash),a.setAttribute("data-element-type","node-body"),e.Style){var s=[];e.Style.BodyFill&&s.push("fill:"+e.Style.BodyFill),s.length>0&&a.setAttribute("style",s.join(";"))}t.appendChild(a);var l=this._FlowView._SVGHelperProvider.createSVGElement("rect");l.setAttribute("class","pict-flow-node-title-bar pict-flow-node-bracket-title-fill"),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(o)),l.setAttribute("height",String(n)),l.setAttribute("data-node-hash",e.Hash),l.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&l.setAttribute("style","fill:"+r.TitleBarColor),e.Style&&e.Style.TitleBarColor&&l.setAttribute("style","fill:"+e.Style.TitleBarColor),t.appendChild(l);var c={SerifLength:6,TitleSeparator:!0};if(this._FlowView._ThemeProvider){var d=this._FlowView._ThemeProvider.getActiveTheme();d&&d.BracketConfig&&(c=Object.assign(c,d.BracketConfig))}var p=0;this._FlowView._ThemeProvider&&(p=this._FlowView._ThemeProvider.getNodeNoiseAmplitude());var h="";this._FlowView._NoiseProvider&&(h=this._FlowView._NoiseProvider.generateBracketPath(o,i,c.SerifLength,c.TitleSeparator?n:0,p,e.Hash));var u=this._FlowView._SVGHelperProvider.createSVGElement("path");if(u.setAttribute("class","pict-flow-node-bracket"),u.setAttribute("d",h),u.setAttribute("data-node-hash",e.Hash),u.setAttribute("data-element-type","node-body"),e.Style){var f=[];e.Style.BodyStroke&&f.push("stroke:"+e.Style.BodyStroke),e.Style.BodyStrokeWidth&&f.push("stroke-width:"+e.Style.BodyStrokeWidth),f.length>0&&u.setAttribute("style",f.join(";"))}t.appendChild(u)}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],41:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-PropertiesPanel",AutoRender:!1,Templates:[{Hash:"Flow-InfoPanel-Wrapper",Template:'<div class="pict-flow-info-panel">{~D:Record.PanelContent~}</div>'},{Hash:"Flow-InfoPanel-Header-Icon",Template:'<div class="pict-flow-info-panel-header with-icon">{~D:Record.Icon~} {~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Header",Template:'<div class="pict-flow-info-panel-header">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Description",Template:'<div class="pict-flow-info-panel-description">{~D:Record.Description~}</div>'},{Hash:"Flow-InfoPanel-Badges",Template:'<div class="pict-flow-info-panel-badges">{~D:Record.BadgesContent~}</div>'},{Hash:"Flow-InfoPanel-Badge-Category",Template:'<span class="pict-flow-info-panel-badge category">{~D:Record.Category~}</span>'},{Hash:"Flow-InfoPanel-Badge-Code",Template:'<span class="pict-flow-info-panel-badge code">{~D:Record.Code~}</span>'},{Hash:"Flow-InfoPanel-Section-Inputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Inputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Section-Outputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Outputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Input",Template:'<div class="pict-flow-info-panel-port input">{~D:Record.Label~}{~D:Record.Constraint~}</div>'},{Hash:"Flow-InfoPanel-Port-Output",Template:'<div class="pict-flow-info-panel-port output">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Constraint",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.ConstraintText~}</span>'},{Hash:"Flow-InfoPanel-Section-Generic",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">{~D:Record.SectionTitle~}</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Event",Template:'<div class="pict-flow-info-panel-port event">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Value",Template:'<div class="pict-flow-info-panel-port value">{~D:Record.Label~}{~D:Record.DataType~}</div>'},{Hash:"Flow-InfoPanel-Port-DataType",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.DataTypeText~}</span>'},{Hash:"Flow-NodeProps-Editor",Template:'<div class="pict-flow-node-props-fields"><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title</label><input type="text" class="pict-flow-node-props-input" data-prop="Title" value="{~D:Record.Title~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Width" value="{~D:Record.Width~}" min="60" step="10" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Height</label><input type="number" class="pict-flow-node-props-input" data-prop="Height" value="{~D:Record.Height~}" min="40" step="10" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Fill</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyFill" value="{~D:Record.BodyFillValue~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Stroke</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyStroke" value="{~D:Record.BodyStrokeValue~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Stroke Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Style.BodyStrokeWidth" value="{~D:Record.BodyStrokeWidthValue~}" min="0" max="10" step="0.5" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title Bar</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.TitleBarColor" value="{~D:Record.TitleBarColorValue~}" /></div></div>'}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowPropertiesPanel",r._FlowView=null,r._PanelInstances={},r}return _inherits(e,t),_createClass(e,[{key:"renderPanels",value:function(t,e,o,i){if(e&&o&&this._FlowView){for(var n=Array.isArray(t)?t:[],r=new Set,a=e.querySelectorAll(".pict-flow-panel-foreign-object"),s=0;s<a.length;s++)r.add(a[s].getAttribute("data-panel-hash"));for(var l=new Set,c=0;c<n.length;c++)l.add(n[c].Hash);for(var d=0;d<a.length;d++){var p=a[d].getAttribute("data-panel-hash");l.has(p)||(a[d].remove(),this._PanelInstances[p]&&(this._PanelInstances[p].destroy(),delete this._PanelInstances[p]))}for(var h=0;h<n.length;h++){var u=n[h];if(r.has(u.Hash)){var f=e.querySelector('[data-panel-hash="'.concat(u.Hash,'"]'));f&&(f.setAttribute("x",String(u.X)),f.setAttribute("y",String(u.Y)),f.setAttribute("width",String(u.Width)),f.setAttribute("height",String(u.Height)))}else this._createPanelForeignObject(u,e)}for(;o.firstChild;)o.removeChild(o.firstChild);for(var w=0;w<n.length;w++){var v=i===n[w].Hash;this._renderTether(n[w],o,v)}}}},{key:"_createPanelForeignObject",value:function(t,e){var o=this._FlowView._PanelChromeProvider;if(o){var i=o.createPanelForeignObject(t,e);i&&this._renderPanelContent(t,i);var n=e.querySelector('[data-panel-hash="'.concat(t.Hash,'"]'));n&&(this._renderAppearanceTab(t,n),this._renderHelpTab(t,n),this._wireTabSwitching(n))}}},{key:"_renderPanelContent",value:function(t,e){var o=this._FlowView.getNode(t.NodeHash);if(o){var i=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(i)if(i.PropertiesPanel){var n=i.PropertiesPanel,r=n.PanelType||"Base",a="PictFlowCardPropertiesPanel-".concat(r),s=null;this._PanelInstances[t.Hash]?s=this._PanelInstances[t.Hash]:(this.fable.servicesMap.hasOwnProperty(a)?s=this.fable.instantiateServiceProviderWithoutRegistration(a,n):this.fable.servicesMap.hasOwnProperty("PictFlowCardPropertiesPanel")&&(s=this.fable.instantiateServiceProviderWithoutRegistration("PictFlowCardPropertiesPanel",n)),s&&(s._FlowView=this._FlowView,this._PanelInstances[t.Hash]=s)),s&&s.render(e,o),this._renderPortSummary(e,i)}else this._renderInfoPanelContent(e,o,i)}}},{key:"_renderInfoPanelContent",value:function(t,e,o){var i=o.CardMetadata||{},n=o.DefaultPorts||[],r=n.filter(function(t){return"input"===t.Direction}),a=n.filter(function(t){return"output"===t.Direction}),s=o.Label||e.Type,l=[],c=this._FlowView._IconProvider;if(i.Icon&&c&&!c.isEmojiIcon(i.Icon)){var d=c.resolveIconKey(i),p=c.getIconSVGMarkup(d,18);l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:p,Label:s}))}else if(i.Icon)l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:i.Icon,Label:s}));else if(c){var h=c.getIconSVGMarkup("default",18);l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:h,Label:s}))}else l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header",{Label:s}));if(i.Description&&l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Description",{Description:i.Description})),i.Category||i.Code){var u="";i.Category&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Category",{Category:i.Category})),i.Code&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Code",{Code:i.Code})),l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Badges",{BadgesContent:u}))}if(r.length>0){for(var f="",w=0;w<r.length;w++){var v=r[w],g=this._getPortConstraintHTML(v);f+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Input",{Label:v.Label||"In",Constraint:g})}l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Inputs",{PortsContent:f}))}if(a.length>0){for(var y="",b=0;b<a.length;b++){var m=a[b];y+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Output",{Label:m.Label||"Out"})}l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Outputs",{PortsContent:y}))}t.innerHTML=this.pict.parseTemplateByHash("Flow-InfoPanel-Wrapper",{PanelContent:l.join("")})}},{key:"_renderPortSummary",value:function(t,e){var o=e.DefaultPorts||[];if(0!==o.length){for(var i=[],n=[],r=[],a=0;a<o.length;a++){var s=o[a],l=s.PortType||"";"event-in"===l?i.push(s):"event-out"===l||"error"===l?n.push(s):"value"===l&&r.push(s)}if(0!==i.length||0!==n.length||0!==r.length){var c=[];if(i.length>0){for(var d="",p=0;p<i.length;p++)d+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:i[p].Label||i[p].Name||"Event In"});c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Inputs",PortsContent:d}))}if(n.length>0){for(var h="",u=0;u<n.length;u++){var f=n[u],w=f.Label||f.Name||"Event Out";"error"===f.PortType&&(w+=" ⚠"),h+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:w})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Outputs",PortsContent:h}))}if(r.length>0){for(var v="",g=0;g<r.length;g++){var y=r[g],b=y.Label||y.Name||"Output",m="";y.DataType&&(m=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-DataType",{DataTypeText:y.DataType})),v+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Value",{Label:b,DataType:m})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"State Outputs",PortsContent:v}))}if(c.length>0){var _=document.createElement("div");_.className="pict-flow-info-panel pict-flow-port-summary",_.innerHTML=c.join(""),t.appendChild(_)}}}}},{key:"_getPortConstraintHTML",value:function(t){var e="number"==typeof t.MinimumInputCount?t.MinimumInputCount:0,o="number"==typeof t.MaximumInputCount?t.MaximumInputCount:-1;if(e>0||o>0){var i="";return i=o<0?"(min ".concat(e,")"):e===o?"(exactly ".concat(e,")"):"(".concat(e,"–").concat(o,")"),this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Constraint",{ConstraintText:i})}return""}},{key:"_renderAppearanceTab",value:function(t,e){var o=this,i=this._FlowView.getNode(t.NodeHash);if(i){var n=e.querySelector('.pict-flow-panel-tab-pane[data-tab="appearance"]');if(n){var r=i.Style||{},a=this._FlowView._NodeTypeProvider.getNodeType(i.Type),s="#2c3e50",l="#ffffff",c="#d0d4d8";a&&(a.TitleBarColor&&(s=a.TitleBarColor),a.BodyStyle&&(a.BodyStyle.fill&&(l=a.BodyStyle.fill),a.BodyStyle.stroke&&(c=a.BodyStyle.stroke)));var d={Title:i.Title||"",Width:i.Width||180,Height:i.Height||80,BodyFillValue:r.BodyFill||l,BodyStrokeValue:r.BodyStroke||c,BodyStrokeWidthValue:r.BodyStrokeWidth||1,TitleBarColorValue:r.TitleBarColor||s};n.innerHTML=this.pict.parseTemplateByHash("Flow-NodeProps-Editor",d);for(var p=n.querySelectorAll(".pict-flow-node-props-input"),h=function(){var e=p[u],i=e.getAttribute("data-prop");e.addEventListener("input",function(n){n.stopPropagation(),o._applyNodePropChange(t.NodeHash,i,e.value,e.type)}),e.addEventListener("pointerdown",function(t){t.stopPropagation()})},u=0;u<p.length;u++)h()}}}},{key:"_renderHelpTab",value:function(t,e){var o=this._FlowView.getNode(t.NodeHash);if(o){var i=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(i){var n=i.CardMetadata&&i.CardMetadata.Help?i.CardMetadata.Help:null;if(n){var r=e.querySelector('.pict-flow-panel-tab[data-tab-target="help"]');r&&(r.style.display="");var a=e.querySelector('.pict-flow-panel-tab-pane[data-tab="help"]');a&&(a.innerHTML='<div class="pict-flow-panel-help-content">'+n+"</div>")}}}}},{key:"_wireTabSwitching",value:function(t){for(var e=t.querySelectorAll(".pict-flow-panel-tab"),o=t.querySelectorAll(".pict-flow-panel-tab-pane"),i=0;i<e.length;i++)e[i].addEventListener("click",function(i){i.stopPropagation();for(var n=i.currentTarget.getAttribute("data-tab-target"),r=0;r<e.length;r++)e[r].classList.remove("active");for(var a=0;a<o.length;a++)o[a].classList.remove("active"),o[a].style.display="none";i.currentTarget.classList.add("active");var s=t.querySelector('.pict-flow-panel-tab-pane[data-tab="'+n+'"]');s&&(s.classList.add("active"),s.style.display="block")})}},{key:"_applyNodePropChange",value:function(t,e,o,i){var n=this._FlowView.getNode(t);if(n){var r=o;if("number"!==i||(r=parseFloat(o),!isNaN(r))){if("Title"===e)n.Title=r;else if("Width"===e)n.Width=r;else if("Height"===e)n.Height=r;else if(e.startsWith("Style.")){n.Style||(n.Style={});var a=e.substring(6);n.Style[a]=r}this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"_renderTether",value:function(t,e,o){var i=this._FlowView._TetherService;if(i){var n=this._FlowView.getNode(t.NodeHash);if(n){var r=this._FlowView.options.ViewIdentifier;i.renderTether(t,n,e,o,r)}}}},{key:"marshalAllFromPanels",value:function(){for(var t in this._PanelInstances){var e=this._PanelInstances[t];e&&e._NodeData&&e.marshalFromPanel(e._NodeData)}}},{key:"destroyPanel",value:function(t){this._PanelInstances[t]&&(this._PanelInstances[t].destroy(),delete this._PanelInstances[t])}},{key:"destroyAllPanels",value:function(){for(var t in this._PanelInstances)this._PanelInstances[t].destroy();this._PanelInstances={}}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],42:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-Toolbar",DefaultRenderable:"Flow-Toolbar-Content",DefaultDestinationAddress:"#Flow-Toolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",EnablePalette:!0,EnableAddNode:!0,EnableCardPalette:!0,CSS:!1,Templates:[{Hash:"Flow-Toolbar-Template",Template:'\n<div class="pict-flow-toolbar" id="Flow-Toolbar-Bar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="add-node" id="Flow-Toolbar-AddNode-{~D:Record.FlowViewIdentifier~}" title="Add Node">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Node</span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="cards-popup" id="Flow-Toolbar-Cards-{~D:Record.FlowViewIdentifier~}" title="Card Palette">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Cards</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-CardsChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="delete-selected" title="Delete Node">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="layout-popup" id="Flow-Toolbar-Layout-{~D:Record.FlowViewIdentifier~}" title="Manage Layouts">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Layout</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-LayoutChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="auto-layout" title="Auto Layout">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Auto Layout</span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-in" title="Zoom In">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-out" title="Zoom Out">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-fit" title="Fit to View">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group pict-flow-toolbar-right">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="settings-popup" id="Flow-Toolbar-Settings-{~D:Record.FlowViewIdentifier~}" title="Theme Settings">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-settings-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="fullscreen" id="Flow-Toolbar-Fullscreen-{~D:Record.FlowViewIdentifier~}" title="Toggle Fullscreen">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Fullscreen-Icon-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="toggle-floating" title="Float">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="collapse-toolbar" title="Collapse Toolbar">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-collapse-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n</div>\n<div class="pict-flow-toolbar-collapsed" id="Flow-Toolbar-Collapsed-{~D:Record.FlowViewIdentifier~}">\n\t<button class="pict-flow-toolbar-expand-btn" data-flow-action="expand-toolbar" title="Expand Toolbar" id="Flow-Toolbar-ExpandBtn-{~D:Record.FlowViewIdentifier~}">\n\t\t<span id="Flow-Toolbar-Icon-expand-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n<div class="pict-flow-toolbar-popup-anchor" id="Flow-Toolbar-PopupAnchor-{~D:Record.FlowViewIdentifier~}">\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Toolbar-Content",TemplateHash:"Flow-Toolbar-Template",DestinationAddress:"#Flow-Toolbar-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowToolbar",r._FlowView=null,r._ToolbarMode="docked",r._ActivePopup=null,r._FloatingPosition={X:80,Y:80},r._DocumentClickHandler=null,r._FloatingToolbarView=null,r}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o,i){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"onAfterRender",value:function(t,o,i,n){var r=this,a=this.options.FlowViewIdentifier,s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(a));s.length>0&&s[0].addEventListener("click",function(t){var e=t.target;if(e){var o=e.closest("[data-flow-action]");if(o){var i=o.getAttribute("data-flow-action");r._handleToolbarAction(i)}}});var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-ExpandBtn-".concat(a));if(l.length>0&&l[0].addEventListener("click",function(){r._setToolbarMode("docked")}),this._populateToolbarIcons(),!1===this.options.EnableAddNode){var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-AddNode-".concat(a));c.length>0&&c[0].remove()}if(!1===this.options.EnableCardPalette){var d=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Cards-".concat(a));d.length>0&&d[0].remove()}return _superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"_populateToolbarIcons",value:function(){var t=this._FlowView?this._FlowView._IconProvider:null;if(t){for(var e=this.options.FlowViewIdentifier,o={plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",settings:"settings",grip:"grip",collapse:"collapse",expand:"expand"},i=Object.keys(o),n=0;n<i.length;n++){var r="Flow-Toolbar-Icon-".concat(i[n],"-").concat(e),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=t.getIconSVGMarkup(o[i[n]],14))}var s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(e));s.length>0&&(s[0].innerHTML=t.getIconSVGMarkup("fullscreen",14));var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-CardsChevron-".concat(e));l.length>0&&(l[0].innerHTML=t.getIconSVGMarkup("chevron-down",8));var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-LayoutChevron-".concat(e));c.length>0&&(c[0].innerHTML=t.getIconSVGMarkup("chevron-down",8))}}},{key:"_openPopup",value:function(t){var e=this;if(this._ActivePopup!==t){this._closePopup();var o=this.options.FlowViewIdentifier,i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(o));if(!(i.length<1)){var n=document.createElement("div");switch(n.className="pict-flow-toolbar-popup",n.setAttribute("id","Flow-Toolbar-Popup-".concat(o)),t){case"add-node":this._buildAddNodePopup(n);break;case"cards":this._buildCardsPopup(n);break;case"layout":this._buildLayoutPopup(n);break;case"settings":this._buildSettingsPopup(n)}if(i[0].appendChild(n),this._ActivePopup=t,this._positionPopup(n,t),setTimeout(function(){e._DocumentClickHandler=function(o){if(!n.contains(o.target)){var i=o.target.closest("[data-flow-action]");if(i){var r=i.getAttribute("data-flow-action");if(r===t||r===t.replace("-popup","")+"-popup")return}e._closePopup()}},document.addEventListener("click",e._DocumentClickHandler,!0)},0),"add-node"===t){var r=n.querySelector(".pict-flow-popup-search");r&&setTimeout(function(){r.focus()},50)}}}else this._closePopup()}},{key:"_closePopup",value:function(){this._DocumentClickHandler&&(document.removeEventListener("click",this._DocumentClickHandler,!0),this._DocumentClickHandler=null);var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Popup-".concat(t));e.length>0&&e[0].parentNode.removeChild(e[0]),this._ActivePopup=null}},{key:"_positionPopup",value:function(t,e){var o,i=this.options.FlowViewIdentifier;switch(e){case"add-node":o="#Flow-Toolbar-AddNode-".concat(i);break;case"cards":o="#Flow-Toolbar-Cards-".concat(i);break;case"layout":o="#Flow-Toolbar-Layout-".concat(i);break;case"settings":o="#Flow-Toolbar-Settings-".concat(i);break;default:return}var n=this.pict.ContentAssignment.getElement(o);if(!(n.length<1)){var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(i));if(!(r.length<1)){var a=n[0].getBoundingClientRect(),s=r[0].getBoundingClientRect(),l=a.left-s.left;t.style.left=l+"px",t.style.top="0px"}}}},{key:"_buildAddNodePopup",value:function(t){var e=this,o=document.createElement("div");o.className="pict-flow-popup-search-wrapper";var i=document.createElement("span");i.className="pict-flow-popup-search-icon";var n=this._FlowView?this._FlowView._IconProvider:null;n&&(i.innerHTML=n.getIconSVGMarkup("search",12)),o.appendChild(i);var r=document.createElement("input");r.className="pict-flow-popup-search",r.setAttribute("type","text"),r.setAttribute("placeholder","Search node types..."),o.appendChild(r),t.appendChild(o);var a=document.createElement("div");a.className="pict-flow-popup-node-list",t.appendChild(a),this._populateNodeList(a,""),r.addEventListener("input",function(){e._populateNodeList(a,r.value)})}},{key:"_populateNodeList",value:function(t,e){var o=this;if(this._FlowView&&this._FlowView._NodeTypeProvider){for(;t.firstChild;)t.removeChild(t.firstChild);for(var i=this._FlowView._NodeTypeProvider.getNodeTypes(),n=Object.keys(i),r=(e||"").toLowerCase().trim(),a=this._FlowView._IconProvider,s=0,l=function(e){var l=i[n[e]],c=l.CardMetadata||{};if(!1===c.Enabled)return 0;if(r){var d=(l.Label||"").toLowerCase(),p=(c.Code||"").toLowerCase(),h=(c.Category||"").toLowerCase();if(d.indexOf(r)<0&&p.indexOf(r)<0&&h.indexOf(r)<0)return 0}s++;var u=document.createElement("div");u.className="pict-flow-popup-list-item",u.setAttribute("data-node-type",n[e]);var f=document.createElement("span");if(f.className="pict-flow-popup-list-item-icon",a){var w=a.resolveIconKey(c);f.innerHTML=a.getIconSVGMarkup(w,16)}u.appendChild(f);var v=document.createElement("span");if(v.className="pict-flow-popup-list-item-label",v.textContent=l.Label,u.appendChild(v),c.Code){var g=document.createElement("span");g.className="pict-flow-popup-list-item-code",g.textContent=c.Code,u.appendChild(g)}u.addEventListener("click",function(){o._addNodeAtCenter(n[e]),o._closePopup()}),t.appendChild(u)},c=0;c<n.length;c++)l(c);if(0===s){var d=document.createElement("div");d.className="pict-flow-popup-list-empty",d.textContent="No matching node types",t.appendChild(d)}}}},{key:"_buildCardsPopup",value:function(t){var e=this,o=document.createElement("div");o.className="pict-flow-popup-search-wrapper";var i=document.createElement("span");i.className="pict-flow-popup-search-icon";var n=this._FlowView?this._FlowView._IconProvider:null;n&&(i.innerHTML=n.getIconSVGMarkup("search",12)),o.appendChild(i);var r=document.createElement("input");r.className="pict-flow-popup-search",r.setAttribute("type","text"),r.setAttribute("placeholder","Search cards..."),o.appendChild(r),t.appendChild(o);var a=document.createElement("div");a.className="pict-flow-popup-node-list",t.appendChild(a),this._renderPalette(a,""),r.addEventListener("input",function(){e._renderPalette(a,r.value)}),setTimeout(function(){r.focus()},50)}},{key:"_renderPalette",value:function(t,e){var o=this;if(this._FlowView&&this._FlowView._NodeTypeProvider){for(;t.firstChild;)t.removeChild(t.firstChild);for(var i=this._FlowView._NodeTypeProvider.getCardsByCategory(),n=Object.keys(i),r=(e||"").toLowerCase().trim(),a=0,s=0;s<n.length;s++){for(var l=n[s],c=i[l],d=[],p=0;p<c.length;p++){var h=c[p],u=h.CardMetadata||{};if(r){var f=(h.Label||"").toLowerCase(),w=(u.Code||"").toLowerCase(),v=l.toLowerCase();if(f.indexOf(r)<0&&w.indexOf(r)<0&&v.indexOf(r)<0)continue}d.push(h)}if(0!==d.length){a+=d.length;var g=document.createElement("div");g.className="pict-flow-palette-category",g.style.padding="0.35em 0.5em";var y=document.createElement("div");y.className="pict-flow-palette-category-label",y.textContent=l,g.appendChild(y);var b=document.createElement("div");b.className="pict-flow-palette-cards";for(var m=function(){var t=d[_],e=t.CardMetadata||{},i=document.createElement("div");if(i.className="pict-flow-palette-card",!1===e.Enabled&&i.classList.add("disabled"),i.setAttribute("data-card-type",t.Hash),e.Tooltip?i.setAttribute("title",e.Tooltip):e.Description&&i.setAttribute("title",e.Description),e.Icon){var n=document.createElement("span");n.className="pict-flow-palette-card-icon";var r=o._FlowView._IconProvider;if(r&&!r.isEmojiIcon(e.Icon)){var a=r.resolveIconKey(e);n.innerHTML=r.getIconSVGMarkup(a,14)}else n.textContent=e.Icon;i.appendChild(n)}else if(o._FlowView._IconProvider){var s=document.createElement("span");s.className="pict-flow-palette-card-icon",s.innerHTML=o._FlowView._IconProvider.getIconSVGMarkup("default",14),i.appendChild(s)}else if(t.TitleBarColor){var l=document.createElement("span");l.className="pict-flow-palette-card-swatch",l.style.backgroundColor=t.TitleBarColor,i.appendChild(l)}var c=document.createElement("span");if(c.className="pict-flow-palette-card-title",c.textContent=t.Label,i.appendChild(c),e.Code){var p=document.createElement("span");p.className="pict-flow-palette-card-code",p.textContent=e.Code,i.appendChild(p)}i.addEventListener("click",function(){o._addCardFromPalette(t.Hash),o._closePopup()}),b.appendChild(i)},_=0;_<d.length;_++)m();g.appendChild(b),t.appendChild(g)}}if(0===a){var P=document.createElement("div");P.className="pict-flow-popup-list-empty",P.textContent=r?"No matching cards":"No card types available",t.appendChild(P)}}}},{key:"_buildLayoutPopup",value:function(t){var e=this,o=this._FlowView?this._FlowView._IconProvider:null,i=document.createElement("div");i.className="pict-flow-popup-layout-save-section";var n=document.createElement("div");n.className="pict-flow-popup-layout-save-input-row",n.style.display="none";var r=document.createElement("input");r.className="pict-flow-popup-layout-save-input",r.setAttribute("type","text"),r.setAttribute("placeholder","Layout name..."),n.appendChild(r);var a=document.createElement("button");a.className="pict-flow-popup-layout-save-confirm",a.title="Save",o?a.innerHTML=o.getIconSVGMarkup("save",14):a.textContent="✓",n.appendChild(a);var s=document.createElement("div");s.className="pict-flow-popup-layout-save";var l=document.createElement("span");l.className="pict-flow-popup-layout-save-icon",o&&(l.innerHTML=o.getIconSVGMarkup("save",14)),s.appendChild(l);var c=document.createElement("span");c.textContent="Save Current Layout",s.appendChild(c),s.addEventListener("click",function(){s.style.display="none",n.style.display="",r.value="",setTimeout(function(){r.focus()},50)});var d=function(){var o=r.value.trim();if(""!==o){for(e._FlowView._LayoutProvider.saveLayout(o);t.firstChild;)t.removeChild(t.firstChild);e._buildLayoutPopup(t)}};a.addEventListener("click",d),r.addEventListener("keydown",function(t){"Enter"===t.key?(t.preventDefault(),d()):"Escape"===t.key&&(n.style.display="none",s.style.display="")}),r.addEventListener("click",function(t){t.stopPropagation()}),i.appendChild(s),i.appendChild(n),t.appendChild(i);var p=document.createElement("div");if(p.className="pict-flow-popup-divider",t.appendChild(p),!this._FlowView||!this._FlowView._LayoutProvider){var h=document.createElement("div");return h.className="pict-flow-popup-list-empty",h.textContent="No saved layouts",void t.appendChild(h)}var u=this._FlowView._LayoutProvider.getLayouts();if(0===u.length){var f=document.createElement("div");return f.className="pict-flow-popup-list-empty",f.textContent="No saved layouts",void t.appendChild(f)}for(var w=function(){var i=u[v],n=document.createElement("div");n.className="pict-flow-popup-layout-row";var r=document.createElement("span");r.className="pict-flow-popup-layout-name",r.textContent=i.Name,n.appendChild(r);var a=document.createElement("button");a.className="pict-flow-popup-layout-delete",a.title="Delete layout",o?a.innerHTML=o.getIconSVGMarkup("trash",12):a.textContent="×",n.appendChild(a),n.addEventListener("click",function(t){t.target.closest(".pict-flow-popup-layout-delete")||(e._FlowView._LayoutProvider.restoreLayout(i.Hash),e._closePopup())}),a.addEventListener("click",function(o){for(o.stopPropagation(),e._FlowView._LayoutProvider.deleteLayout(i.Hash);t.firstChild;)t.removeChild(t.firstChild);e._buildLayoutPopup(t)}),t.appendChild(n)},v=0;v<u.length;v++)w()}},{key:"_buildSettingsPopup",value:function(t){var e=this;if(this._FlowView&&this._FlowView._ThemeProvider){var o=this._FlowView._ThemeProvider,i=document.createElement("div");i.className="pict-flow-popup-settings-section";var n=document.createElement("label");n.className="pict-flow-popup-settings-label",n.textContent="Theme",i.appendChild(n);var r=document.createElement("select");r.className="pict-flow-popup-settings-select";for(var a=o.getThemeKeys(),s=o.getActiveThemeKey(),l=0;l<a.length;l++){var c=document.createElement("option");c.value=a[l];var d=o._Themes[a[l]];c.textContent=d.Label||a[l],a[l]===s&&(c.selected=!0),r.appendChild(c)}r.addEventListener("change",function(){e._FlowView.setTheme(r.value),e._refreshNoiseSlider(t)}),r.addEventListener("click",function(t){t.stopPropagation()}),i.appendChild(r),t.appendChild(i);var p=document.createElement("div");p.className="pict-flow-popup-divider",t.appendChild(p);var h=document.createElement("div");h.className="pict-flow-popup-settings-section pict-flow-popup-settings-noise",h.setAttribute("data-settings-type","noise");var u=document.createElement("label");u.className="pict-flow-popup-settings-label",u.textContent="Noise",h.appendChild(u);var f=document.createElement("div");f.className="pict-flow-popup-settings-slider-row";var w=document.createElement("input");w.type="range",w.className="pict-flow-popup-settings-slider",w.min="0",w.max="100",w.value=String(Math.round(100*o.getNoiseLevel()));var v=document.createElement("span");v.className="pict-flow-popup-settings-slider-value",v.textContent=w.value+"%",w.addEventListener("input",function(){var t=parseInt(w.value,10)/100;v.textContent=w.value+"%",e._FlowView.setNoiseLevel(t)}),w.addEventListener("click",function(t){t.stopPropagation()}),w.addEventListener("pointerdown",function(t){t.stopPropagation()}),f.appendChild(w),f.appendChild(v),h.appendChild(f),t.appendChild(h),this._refreshNoiseSlider(t)}}},{key:"_refreshNoiseSlider",value:function(t){var e=t.querySelector('[data-settings-type="noise"]');if(e){var o=this._FlowView._ThemeProvider.getActiveTheme();if(o&&o.NoiseConfig&&o.NoiseConfig.Enabled){e.style.display="";var i=e.querySelector(".pict-flow-popup-settings-slider"),n=e.querySelector(".pict-flow-popup-settings-slider-value");if(i){var r=Math.round(100*this._FlowView._ThemeProvider.getNoiseLevel());i.value=String(r),n&&(n.textContent=r+"%")}}else e.style.display="none"}}},{key:"_setToolbarMode",value:function(t){this._closePopup();var e=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(e)),i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Collapsed-".concat(e));switch(t){case"docked":o.length>0&&(o[0].style.display=""),i.length>0&&i[0].classList.remove("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide();break;case"floating":o.length>0&&(o[0].style.display="none"),i.length>0&&i[0].classList.remove("visible"),this._showFloatingToolbar();break;case"collapsed":o.length>0&&(o[0].style.display="none"),i.length>0&&i[0].classList.add("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide()}this._ToolbarMode=t}},{key:"_showFloatingToolbar",value:function(){if(this._FlowView){if(!this._FloatingToolbarView){var t=this.options.FlowViewIdentifier;this._FloatingToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowFloatingToolbar",{FlowViewIdentifier:t,DefaultDestinationAddress:"#Flow-FloatingToolbar-Container-".concat(t),EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette}),this._FloatingToolbarView._ToolbarView=this,this._FloatingToolbarView._FlowView=this._FlowView,this._FloatingToolbarView.render()}this._FloatingToolbarView.show()}}},{key:"_addNodeAtCenter",value:function(t){if(this._FlowView){var e=this._FlowView.viewState,o=this._FlowView._SVGElement,i=o?o.clientWidth:600,n=o?o.clientHeight:400,r=(-e.PanX+i/2)/e.Zoom,a=(-e.PanY+n/2)/e.Zoom,s=this._FlowView.flowData.Nodes.length;r+=s%5*30,a+=s%5*30,this._FlowView.addNode(t,r,a)}}},{key:"_addCardFromPalette",value:function(t){if(this._FlowView){var e=this._FlowView.viewState,o=(200-e.PanX)/e.Zoom,i=(200-e.PanY)/e.Zoom,n=this._FlowView.flowData.Nodes.length;o+=n%5*40,i+=n%5*40,this._FlowView.addNode(t,o,i)}}},{key:"_handleToolbarAction",value:function(t){if(this._FlowView){var e=this.options.FlowViewIdentifier;switch(t){case"add-node":this._openPopup("add-node");break;case"delete-selected":this._FlowView.deleteSelected();break;case"zoom-in":this._FlowView.setZoom(this._FlowView.viewState.Zoom+this._FlowView.options.ZoomStep);break;case"zoom-out":this._FlowView.setZoom(this._FlowView.viewState.Zoom-this._FlowView.options.ZoomStep);break;case"zoom-fit":this._FlowView.zoomToFit();break;case"auto-layout":this._FlowView.autoLayout();break;case"cards-popup":this._openPopup("cards");break;case"layout-popup":this._openPopup("layout");break;case"settings-popup":this._openPopup("settings");break;case"toggle-floating":"floating"===this._ToolbarMode?this._setToolbarMode("docked"):this._setToolbarMode("floating");break;case"collapse-toolbar":this._setToolbarMode("collapsed");break;case"expand-toolbar":this._setToolbarMode("docked");break;case"fullscreen":var o=this._FlowView.toggleFullscreen(),i=this._FlowView._IconProvider,n=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(e));n.length>0&&i&&(n[0].innerHTML=i.getIconSVGMarkup(o?"exit-fullscreen":"fullscreen",14));var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(e));r.length>0&&r[0].setAttribute("title",o?"Exit Fullscreen":"Toggle Fullscreen");break;default:this.log.warn("PictViewFlowToolbar: unknown action '".concat(t,"'"))}}}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],43:[function(t,e,o){var i=t("pict-view"),n=t("../services/PictService-Flow-InteractionManager.js"),r=t("../services/PictService-Flow-ConnectionRenderer.js"),a=t("../services/PictService-Flow-Tether.js"),s=t("../services/PictService-Flow-Layout.js"),l=t("../services/PictService-Flow-PathGenerator.js"),c=t("../services/PictService-Flow-ViewportManager.js"),d=t("../services/PictService-Flow-SelectionManager.js"),p=t("../services/PictService-Flow-PanelManager.js"),h=t("../services/PictService-Flow-DataManager.js"),u=t("../services/PictService-Flow-ConnectionHandleManager.js"),f=t("../services/PictService-Flow-RenderManager.js"),w=t("../services/PictService-Flow-PortRenderer.js"),v=t("../providers/PictProvider-Flow-NodeTypes.js"),g=t("../providers/PictProvider-Flow-EventHandler.js"),y=t("../providers/PictProvider-Flow-Layouts.js"),b=t("../providers/PictProvider-Flow-SVGHelpers.js"),m=t("../providers/PictProvider-Flow-Geometry.js"),_=t("../providers/PictProvider-Flow-PanelChrome.js"),P=t("../providers/PictProvider-Flow-CSS.js"),F=t("../providers/PictProvider-Flow-Icons.js"),S=t("../providers/PictProvider-Flow-ConnectorShapes.js"),V=t("../providers/PictProvider-Flow-Theme.js"),C=t("../providers/PictProvider-Flow-Noise.js"),k=t("./PictView-Flow-Node.js"),T=t("./PictView-Flow-Toolbar.js"),D=t("./PictView-Flow-FloatingToolbar.js"),A=t("./PictView-Flow-PropertiesPanel.js"),H=t("../PictFlowCardPropertiesPanel.js"),x=t("../panels/FlowCardPropertiesPanel-Template.js"),I=t("../panels/FlowCardPropertiesPanel-Markdown.js"),M=t("../panels/FlowCardPropertiesPanel-Form.js"),N=t("../panels/FlowCardPropertiesPanel-View.js"),L={ViewIdentifier:"Pict-Flow",DefaultRenderable:"Flow-Container",DefaultDestinationAddress:"#Flow-Container",AutoRender:!1,FlowDataAddress:!1,TargetElementAddress:"#Flow-SVG-Container",EnableToolbar:!0,EnableAddNode:!0,EnableCardPalette:!0,IncludeDefaultNodeTypes:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0,EnableGridSnap:!1,GridSnapSize:20,MinZoom:.1,MaxZoom:5,ZoomStep:.1,DefaultNodeType:"default",DefaultNodeWidth:180,DefaultNodeHeight:80,CSS:!1,Templates:[{Hash:"Flow-PanelChrome-Template",Template:'<div class="pict-flow-panel" xmlns="http://www.w3.org/1999/xhtml"><div class="pict-flow-panel-titlebar" data-element-type="panel-titlebar" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-title-text">{~D:Record.Title~}</span><span class="pict-flow-panel-close-btn" data-element-type="panel-close" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-close-icon"></span></span></div><div class="pict-flow-panel-content" data-panel-hash="{~D:Record.Hash~}"><div class="pict-flow-panel-tab-pane active" data-tab="properties" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tab-pane" data-tab="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div><div class="pict-flow-panel-tab-pane" data-tab="appearance" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div></div><div class="pict-flow-panel-resize-handle" data-element-type="panel-resize" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tabbar" data-panel-hash="{~D:Record.Hash~}"><div class="pict-flow-panel-tab active" data-tab-target="properties" data-panel-hash="{~D:Record.Hash~}">Properties</div><div class="pict-flow-panel-tab" data-tab-target="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;">Help</div><div class="pict-flow-panel-tab" data-tab-target="appearance" data-panel-hash="{~D:Record.Hash~}">Appearance</div></div></div>'},{Hash:"Flow-Container-Template",Template:'\n<div class="pict-flow-container" id="Flow-Wrapper-{~D:Record.ViewIdentifier~}">\n\t<div id="Flow-Toolbar-{~D:Record.ViewIdentifier~}"></div>\n\t<div id="Flow-FloatingToolbar-Container-{~D:Record.ViewIdentifier~}" style="display:none;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100;"></div>\n\t<div class="pict-flow-svg-container" id="Flow-SVG-Container-{~D:Record.ViewIdentifier~}">\n\t\t<svg class="pict-flow-svg"\n\t\t\tid="Flow-SVG-{~D:Record.ViewIdentifier~}"\n\t\t\txmlns="http://www.w3.org/2000/svg">\n\t\t\t<defs>\n\t\t\t\t<pattern id="flow-grid-{~D:Record.ViewIdentifier~}"\n\t\t\t\t\twidth="20" height="20" patternUnits="userSpaceOnUse">\n\t\t\t\t\t<line x1="20" y1="0" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t\t<line x1="0" y1="20" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t</pattern>\n\t\t\t</defs>\n\t\t\t<rect width="10000" height="10000" x="-5000" y="-5000"\n\t\t\t\tfill="url(#flow-grid-{~D:Record.ViewIdentifier~})"\n\t\t\t\tclass="pict-flow-grid-background" />\n\t\t\t<g class="pict-flow-viewport" id="Flow-Viewport-{~D:Record.ViewIdentifier~}">\n\t\t\t\t<g class="pict-flow-connections-layer" id="Flow-Connections-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-nodes-layer" id="Flow-Nodes-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-tethers-layer" id="Flow-Tethers-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-panels-layer" id="Flow-Panels-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t</g>\n\t\t</svg>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Container",TemplateHash:"Flow-Container-Template",DestinationAddress:"#Flow-Container",RenderMethod:"replace"}]},E=function(t){function e(t,o,i){var E;_classCallCheck(this,e);var z=Object.assign({},JSON.parse(JSON.stringify(L)),o);return(E=_callSuper(this,e,[t,z,i])).serviceType="PictSectionFlow",E._ServiceRegistry=[{ServiceType:"PictProviderFlowSVGHelpers",Library:b,Property:"_SVGHelperProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowGeometry",Library:m,Property:"_GeometryProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowNoise",Library:C,Property:"_NoiseProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowTheme",Library:V,Property:"_ThemeProvider"},{ServiceType:"PictProviderFlowCSS",Library:P,Property:"_CSSProvider",PostInit:"registerCSS"},{ServiceType:"PictProviderFlowIcons",Library:F,Property:"_IconProvider",PostInit:"registerIconTemplates"},{ServiceType:"PictProviderFlowConnectorShapes",Library:S,Property:"_ConnectorShapesProvider"},{ServiceType:"PictProviderFlowPanelChrome",Library:_,Property:"_PanelChromeProvider"},{ServiceType:"PictProviderFlowNodeTypes",Library:v,Property:"_NodeTypeProvider",ExtraOptions:function(){return{AdditionalNodeTypes:E.options.NodeTypes,IncludeDefaultNodeTypes:E.options.IncludeDefaultNodeTypes}}},{ServiceType:"PictProviderFlowEventHandler",Library:g,Property:"_EventHandlerProvider"},{ServiceType:"PictProviderFlowLayouts",Library:y,Property:"_LayoutProvider",PostInit:"loadPersistedLayouts"},{ServiceType:"PictServiceFlowPathGenerator",Library:l,Property:"_PathGenerator"},{ServiceType:"PictServiceFlowDataManager",Library:h,Property:"_DataManager"},{ServiceType:"PictServiceFlowConnectionHandleManager",Library:u,Property:"_ConnectionHandleManager"},{ServiceType:"PictServiceFlowRenderManager",Library:f,Property:"_RenderManager"},{ServiceType:"PictServiceFlowPortRenderer",Library:w,Property:"_PortRenderer"},{ServiceType:"PictServiceFlowInteractionManager",Library:n,Property:"_InteractionManager"},{ServiceType:"PictServiceFlowConnectionRenderer",Library:r,Property:"_ConnectionRenderer"},{ServiceType:"PictServiceFlowTether",Library:a,Property:"_TetherService"},{ServiceType:"PictServiceFlowLayout",Library:s,Property:"_LayoutService"},{ServiceType:"PictServiceFlowViewportManager",Library:c,Property:"_ViewportManager"},{ServiceType:"PictServiceFlowSelectionManager",Library:d,Property:"_SelectionManager"},{ServiceType:"PictServiceFlowPanelManager",Library:p,Property:"_PanelManager"},{ServiceType:"PictViewFlowNode",Library:k,RegisterOnly:!0},{ServiceType:"PictViewFlowToolbar",Library:T,RegisterOnly:!0},{ServiceType:"PictViewFlowFloatingToolbar",Library:D,RegisterOnly:!0},{ServiceType:"PictViewFlowPropertiesPanel",Library:A,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel",Library:H,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Template",Library:x,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Markdown",Library:I,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Form",Library:M,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-View",Library:N,RegisterOnly:!0}],E._registerServiceTypes(),E._FlowData={Nodes:[],Connections:[],OpenPanels:[],SavedLayouts:[],ViewState:{PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null}},E._SVGElement=null,E._ViewportElement=null,E._NodesLayer=null,E._ConnectionsLayer=null,E._TethersLayer=null,E._PanelsLayer=null,E._DataManager=null,E._ConnectionHandleManager=null,E._RenderManager=null,E._PortRenderer=null,E._InteractionManager=null,E._ConnectionRenderer=null,E._TetherService=null,E._LayoutService=null,E._PathGenerator=null,E._ViewportManager=null,E._SelectionManager=null,E._PanelManager=null,E._CSSProvider=null,E._IconProvider=null,E._ConnectorShapesProvider=null,E._ThemeProvider=null,E._NoiseProvider=null,E._SVGHelperProvider=null,E._GeometryProvider=null,E._PanelChromeProvider=null,E._NodeTypeProvider=null,E._LayoutProvider=null,E._EventHandlerProvider=null,E._NodeView=null,E._ToolbarView=null,E._PropertiesPanelView=null,E.initialRenderComplete=!1,E}return _inherits(e,t),_createClass(e,[{key:"_registerServiceTypes",value:function(){for(var t=0;t<this._ServiceRegistry.length;t++){var e=this._ServiceRegistry[t];this.fable.servicesMap.hasOwnProperty(e.ServiceType)||this.fable.addServiceType(e.ServiceType,e.Library)}}},{key:"_instantiateServices",value:function(){for(var t=0;t<this._ServiceRegistry.length;t++){var e=this._ServiceRegistry[t];if(!e.RegisterOnly&&!this[e.Property]){var o=e.NoFlowView?{}:{FlowView:this};"function"==typeof e.ExtraOptions&&Object.assign(o,e.ExtraOptions()),this[e.Property]=this.fable.instantiateServiceProviderWithoutRegistration(e.ServiceType,o),e.PostInit&&"function"==typeof this[e.Property][e.PostInit]&&this[e.Property][e.PostInit]()}}}},{key:"flowData",get:function(){return this._FlowData}},{key:"viewState",get:function(){return this._FlowData.ViewState}},{key:"_IsFullscreen",get:function(){return!!this._ViewportManager&&this._ViewportManager._IsFullscreen}},{key:"render",value:function(t,o){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"renderAsync",value:function(t,o,i,n,r){return"function"==typeof i||void 0===i?_superPropGet(e,"renderAsync",this,3)([t,o,this.options,n,i||r]):_superPropGet(e,"renderAsync",this,3)([t,o,i,n,r])}},{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._ThemeProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowTheme",{FlowView:this}),this._NoiseProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowNoise"),this.options.Theme&&this._ThemeProvider.setTheme(this.options.Theme),"number"==typeof this.options.NoiseLevel&&this._ThemeProvider.setNoiseLevel(this.options.NoiseLevel),this._instantiateServices(),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"onAfterRender",value:function(t,o,i,n){return this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"onAfterInitialRender",value:function(){var t=this.options.ViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-SVG-".concat(t));if(e.length<1)return this.log.error("PictSectionFlow could not find SVG element #Flow-SVG-".concat(t)),!1;this._SVGElement=e[0];var o=this.pict.ContentAssignment.getElement("#Flow-Viewport-".concat(t));o.length>0&&(this._ViewportElement=o[0]);var i=this.pict.ContentAssignment.getElement("#Flow-Nodes-".concat(t));i.length>0&&(this._NodesLayer=i[0]);var n=this.pict.ContentAssignment.getElement("#Flow-Connections-".concat(t));n.length>0&&(this._ConnectionsLayer=n[0]);var r=this.pict.ContentAssignment.getElement("#Flow-Tethers-".concat(t));r.length>0&&(this._TethersLayer=r[0]);var a=this.pict.ContentAssignment.getElement("#Flow-Panels-".concat(t));if(a.length>0&&(this._PanelsLayer=a[0]),this._instantiateServices(),this._ConnectorShapesProvider&&this._SVGElement){var s=this._SVGElement.querySelector("defs");if(s){var l=this._ConnectorShapesProvider.generateMarkerDefs(t),c=document.createElementNS("http://www.w3.org/2000/svg","svg");for(c.innerHTML=l;c.firstChild;)s.appendChild(c.firstChild)}}this.options.EnableToolbar&&(this._ToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowToolbar",Object.assign({},T.default_configuration,{ViewIdentifier:"Flow-Toolbar-".concat(t),DefaultDestinationAddress:"#Flow-Toolbar-".concat(t),FlowViewIdentifier:t,EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette})),this._ToolbarView&&"function"==typeof this._ToolbarView.render&&(this._ToolbarView._FlowView=this,this._ToolbarView.render())),this._NodeView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowNode",Object.assign({},k.default_configuration,{ViewIdentifier:"Flow-NodeRenderer-".concat(t),AutoRender:!1})),this._NodeView._FlowView=this,this._PropertiesPanelView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowPropertiesPanel",Object.assign({},A.default_configuration,{ViewIdentifier:"Flow-PropertiesPanel-".concat(t),AutoRender:!1})),this._PropertiesPanelView._FlowView=this,this._InteractionManager.initialize(this._SVGElement,this._ViewportElement),this.options.FlowDataAddress&&this.marshalToView(),this.renderFlow()}},{key:"marshalToView",value:function(){return this._DataManager.marshalToView()}},{key:"marshalFromView",value:function(){return this._DataManager.marshalFromView()}},{key:"getFlowData",value:function(){return this._DataManager.getFlowData()}},{key:"setFlowData",value:function(t){return this._DataManager.setFlowData(t)}},{key:"addNode",value:function(t,e,o,i,n){return this._DataManager.addNode(t,e,o,i,n)}},{key:"removeNode",value:function(t){return this._DataManager.removeNode(t)}},{key:"addConnection",value:function(t,e,o,i,n){return this._DataManager.addConnection(t,e,o,i,n)}},{key:"removeConnection",value:function(t){return this._DataManager.removeConnection(t)}},{key:"selectNode",value:function(t){return this._SelectionManager.selectNode(t)}},{key:"selectConnection",value:function(t){return this._SelectionManager.selectConnection(t)}},{key:"deselectAll",value:function(){return this._SelectionManager.deselectAll()}},{key:"deleteSelected",value:function(){return this._SelectionManager.deleteSelected()}},{key:"updateViewportTransform",value:function(){return this._ViewportManager.updateViewportTransform()}},{key:"setZoom",value:function(t,e,o){return this._ViewportManager.setZoom(t,e,o)}},{key:"zoomToFit",value:function(){return this._ViewportManager.zoomToFit()}},{key:"autoLayout",value:function(){this._LayoutService&&(this._LayoutService.autoLayout(this._FlowData.Nodes,this._FlowData.Connections),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"toggleFullscreen",value:function(){return this._ViewportManager.toggleFullscreen()}},{key:"exitFullscreen",value:function(){return this._ViewportManager.exitFullscreen()}},{key:"setTheme",value:function(t){this._ThemeProvider?this._ThemeProvider.setTheme(t)&&(this._CSSProvider&&this._CSSProvider.registerCSS(),this._reinjectMarkerDefs(),this.initialRenderComplete&&this.renderFlow(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onThemeChanged",t)):this.log.warn("PictSectionFlow setTheme: ThemeProvider not available")}},{key:"setNoiseLevel",value:function(t){this._ThemeProvider?(this._ThemeProvider.setNoiseLevel(t),this.initialRenderComplete&&this.renderFlow()):this.log.warn("PictSectionFlow setNoiseLevel: ThemeProvider not available")}},{key:"getNoiseLevel",value:function(){return this._ThemeProvider?this._ThemeProvider.getNoiseLevel():0}},{key:"getThemeKey",value:function(){return this._ThemeProvider?this._ThemeProvider.getActiveThemeKey():"default"}},{key:"_reinjectMarkerDefs",value:function(){return this._RenderManager.reinjectMarkerDefs()}},{key:"getNode",value:function(t){return this._FlowData.Nodes.find(function(e){return e.Hash===t})||null}},{key:"getConnection",value:function(t){return this._FlowData.Connections.find(function(e){return e.Hash===t})||null}},{key:"selectTether",value:function(t){return this._SelectionManager.selectTether(t)}},{key:"updateConnectionHandle",value:function(t,e,o,i){return this._ConnectionHandleManager.updateConnectionHandle(t,e,o,i)}},{key:"addConnectionHandle",value:function(t,e,o){return this._ConnectionHandleManager.addConnectionHandle(t,e,o)}},{key:"removeConnectionHandle",value:function(t,e){return this._ConnectionHandleManager.removeConnectionHandle(t,e)}},{key:"_resetHandlesForNode",value:function(t){return this._ConnectionHandleManager.resetHandlesForNode(t)}},{key:"_resetHandlesForPanel",value:function(t){return this._ConnectionHandleManager.resetHandlesForPanel(t)}},{key:"addTetherHandle",value:function(t,e,o){var i=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i&&this._TetherService){var n=this.getNode(i.NodeHash);if(n){var r=this._TetherService.getSmartAnchors(i,n);this._TetherService.addHandle(i,e,o,r.panelAnchor,r.nodeAnchor),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData)}}}},{key:"removeTetherHandle",value:function(t,e){var o=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});o&&this._TetherService&&(this._TetherService.removeHandle(o,e),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"updateTetherHandle",value:function(t,e,o,i){var n=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});n&&(this._TetherService&&this._TetherService.updateHandlePosition(n,e,o,i),this._renderSingleTether(t))}},{key:"getPortPosition",value:function(t,e){var o=this.getNode(t);if(!o)return null;var i=o.Ports.find(function(t){return t.Hash===e});if(!i)return null;var n=o.Ports.filter(function(t){return t.Side===i.Side}),r=n.indexOf(i),a=n.length,s=this._NodeView&&this._NodeView.options.NodeTitleBarHeight||28,l=o.Height||80;if(this._GeometryProvider&&o.Ports&&o.Ports.length>0){var c=this._GeometryProvider.computeMinimumNodeHeight(o.Ports,s);c>l&&(l=c)}var d=this._GeometryProvider.buildPortCountsBySide(o.Ports),p=this._GeometryProvider.getPortLocalPosition(i.Side,r,a,o.Width,l,s,d);return{x:o.X+p.x,y:o.Y+p.y,side:i.Side||"right"}}},{key:"screenToSVGCoords",value:function(t,e){return this._ViewportManager.screenToSVGCoords(t,e)}},{key:"renderFlow",value:function(){return this._RenderManager.renderFlow()}},{key:"_renderSingleConnection",value:function(t){return this._RenderManager.renderSingleConnection(t)}},{key:"_renderSingleTether",value:function(t){return this._RenderManager.renderSingleTether(t)}},{key:"updateNodePosition",value:function(t,e,o){return this._RenderManager.updateNodePosition(t,e,o)}},{key:"_renderConnectionsForNode",value:function(t){return this._RenderManager.renderConnectionsForNode(t)}},{key:"_renderTethersForNode",value:function(t){return this._RenderManager.renderTethersForNode(t)}},{key:"openPanel",value:function(t){return this._PanelManager.openPanel(t)}},{key:"closePanel",value:function(t){return this._PanelManager.closePanel(t)}},{key:"closePanelForNode",value:function(t){return this._PanelManager.closePanelForNode(t)}},{key:"togglePanel",value:function(t){return this._PanelManager.togglePanel(t)}},{key:"updatePanelPosition",value:function(t,e,o){return this._PanelManager.updatePanelPosition(t,e,o)}}])}(i);e.exports=E,e.exports.default_configuration=L},{"../PictFlowCardPropertiesPanel.js":11,"../panels/FlowCardPropertiesPanel-Form.js":12,"../panels/FlowCardPropertiesPanel-Markdown.js":13,"../panels/FlowCardPropertiesPanel-Template.js":14,"../panels/FlowCardPropertiesPanel-View.js":15,"../providers/PictProvider-Flow-CSS.js":16,"../providers/PictProvider-Flow-ConnectorShapes.js":17,"../providers/PictProvider-Flow-EventHandler.js":18,"../providers/PictProvider-Flow-Geometry.js":19,"../providers/PictProvider-Flow-Icons.js":20,"../providers/PictProvider-Flow-Layouts.js":21,"../providers/PictProvider-Flow-NodeTypes.js":22,"../providers/PictProvider-Flow-Noise.js":23,"../providers/PictProvider-Flow-PanelChrome.js":24,"../providers/PictProvider-Flow-SVGHelpers.js":25,"../providers/PictProvider-Flow-Theme.js":26,"../services/PictService-Flow-ConnectionHandleManager.js":27,"../services/PictService-Flow-ConnectionRenderer.js":28,"../services/PictService-Flow-DataManager.js":29,"../services/PictService-Flow-InteractionManager.js":30,"../services/PictService-Flow-Layout.js":31,"../services/PictService-Flow-PanelManager.js":32,"../services/PictService-Flow-PathGenerator.js":33,"../services/PictService-Flow-PortRenderer.js":34,"../services/PictService-Flow-RenderManager.js":35,"../services/PictService-Flow-SelectionManager.js":36,"../services/PictService-Flow-Tether.js":37,"../services/PictService-Flow-ViewportManager.js":38,"./PictView-Flow-FloatingToolbar.js":39,"./PictView-Flow-Node.js":40,"./PictView-Flow-PropertiesPanel.js":41,"./PictView-Flow-Toolbar.js":42,"pict-view":45}],44:[function(t,e,o){e.exports={name:"pict-view",version:"1.0.67",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.63","fable-serviceproviderbase":"^3.0.19"}}},{}],45:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),o),i])).fable,a.options,a.UUID,a.Hash,a.log;var s=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),s&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=n,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var l=0;l<a.options.Templates.length;l++){var c=a.options.Templates[l];"Hash"in c&&"Template"in c?(c.Source||(c.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(c.Hash,c.Template,c.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(l," in the options array."),c)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var h=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),u=a.options.CSSProvider?a.options.CSSProvider:h;a.pict.CSSMap.addCSS(h,a.options.CSS,u,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var w=a.options.Renderables[f];a.addRenderable(w)}return a}return _inherits(e,t),_createClass(e,[{key:"addRenderable",value:function(t,e,o,i,n){var r;"object"==_typeof(t)?r=t:r={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:o,ContentDestinationAddress:i,RenderMethod:"string"!=typeof n?n:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return o&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization failed: ").concat(o.message||o),{stack:o.stack}),e.initializeTimestamp=e.pict.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.info("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onBeforeRender",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t,e){return this.onBeforeRender(e),t()}},{key:"onBeforeProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(t,e){return this.onBeforeProject(e),t()}},{key:"buildRenderOptions",value:function(t,e,o){var i={Valid:!0};return i.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof e?e:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),i.Valid=!1),"object"===_typeof(o)?(i.RecordAddress="Passed in as object",i.Record=o):(i.RecordAddress="string"==typeof o?o:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}},{key:"assignRenderContent",value:function(t,e,o){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,o,t.TestAddress)}},{key:"render",value:function(t,e,o,i){return this.renderWithScope(this,t,e,o,i)}},{key:"renderWithScope",value:function(t,e,o,i,n){var r,a,s,l="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return l?("__Virtual"==l?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&n.TransactionHash,RootRenderableViewHash:n&&n.RootRenderableViewHash}:(r=Object.assign({},this.renderables[l])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(i)?(s=i,a="Passed in as object"):s="string"==typeof(a="string"==typeof i?i:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(l,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,s,null,[this],t,{RootRenderable:"object"===_typeof(n)?n:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(l,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(t,e,o,i,n){return this.renderWithScopeAsync(this,t,e,o,i,n)}},{key:"renderWithScopeAsync",value:function(t,e,o,i,n,r){var a,s,l,c=this,d="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof n?n:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(t){t&&c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&"function"!=typeof n&&n.TransactionHash,RootRenderableViewHash:n&&"function"!=typeof n&&n.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(i)?(l=i,s="Passed in as object"):(s="string"==typeof i?i:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,l="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var h=this.fable.newAnticipate();h.anticipate(function(t){c.onBeforeRenderAsync(t,a)}),h.anticipate(function(o){c.pict.parseTemplateByHash(a.TemplateHash,l,function(t,i){return t?(c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(e,") because it did not parse the template."),t),o(t)):(a.Content=i,o())},[c],t,{RootRenderable:"object"===_typeof(n)?n:a})}),h.anticipate(function(t){c.onBeforeProjectAsync(t,a)}),h.anticipate(function(t){c.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(h.anticipate(function(t){c.onAfterProjectAsync(t,a)}),h.anticipate(function(t){c.onAfterRenderAsync(t,a)})),h.wait(p)}},{key:"renderDefaultAsync",value:function(t){this.renderAsync(t)}},{key:"basicRender",value:function(t,e,o){return this.basicRenderWithScope(this,t,e,o)}},{key:"basicRenderWithScope",value:function(t,e,o,i){var n=this.buildRenderOptions(e,o,i);return n.Valid?(this.assignRenderContent(n.Renderable,n.DestinationAddress,this.pict.parseTemplateByHash(n.Renderable.TemplateHash,n.Record,null,[this],t,{RootRenderable:n.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(n.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(t,e,o,i){return this.basicRenderWithScopeAsync(this,t,e,o,i)}},{key:"basicRenderWithScopeAsync",value:function(t,e,o,i,n){var r=this,a="function"==typeof n?n:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(t){t&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});var s=this.buildRenderOptions(e,o,i);if(!s.Valid){var l="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(s.RenderableHash," because it is not valid.");return this.log.error(l),a(new Error(l))}this.pict.parseTemplateByHash(s.Renderable.TemplateHash,s.Record,function(t,e){return t?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(s.RenderableHash," because it did not parse the template."),t),a(t)):(r.assignRenderContent(s.Renderable,s.DestinationAddress,e),a())},[this],t,{RootRenderable:s.Renderable})}},{key:"onProject",value:function(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(t,e){return this.onProject(e),t()}},{key:"onAfterRender",value:function(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){var e,o=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{for(o.s();!(e=o.n()).done;){var i=e.value,n=this.pict.views[i.Data.ViewHash];n?(n.onAfterProject(),n.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}catch(t){o.e(t)}finally{o.f()}}return!0}},{key:"onAfterRenderAsync",value:function(t,e){var o=this;this.onAfterRender(e);var i=this.fable.newAnticipate();if(e&&e.RootRenderableViewHash===this.Hash){var n,r=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{var a=function(){var t=n.value,r=o.pict.views[t.Data.ViewHash];if(!r)return o.log.error("PictView [".concat(o.UUID,"]::[").concat(o.Hash,"] ").concat(o.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(t.Data.ViewHash,".")),1;i.anticipate(r.onAfterProjectAsync.bind(r)),i.anticipate(function(e){r.onAfterRenderAsync(e,t.Data.Renderable)})};for(r.s();!(n=r.n()).done;)a()}catch(t){r.e(t)}finally{r.f()}}return i.wait(t)}},{key:"onAfterProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(t,e){return t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeSolveAsync.bind(this)),o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," solveAsync() complete.")),e.lastSolvedTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(t){return this.onBeforeMarshalFromView(),t()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(t){return this.onMarshalFromView(),t()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),o.anticipate(this.onMarshalFromViewAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalFromViewAsync() complete.")),e.lastMarshalFromViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(t){return this.onAfterMarshalFromView(),t()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(t){return this.onBeforeMarshalToView(),t()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(t){return this.onMarshalToView(),t()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),o.anticipate(this.onMarshalToViewAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalToViewAsync() complete.")),e.lastMarshalToViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(t){return this.onAfterMarshalToView(),t()}},{key:"isPictView",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":44,"fable-serviceproviderbase":4}],46:[function(t,e,o){var i={"@":{DataType:"AutoIdentity",Label:"Auto ID",HasSize:!1},"%":{DataType:"GUID",Label:"GUID",HasSize:!1},$:{DataType:"String",Label:"String",HasSize:!0},"*":{DataType:"Text",Label:"Text",HasSize:!1},"#":{DataType:"Numeric",Label:"Numeric",HasSize:!1},".":{DataType:"Decimal",Label:"Decimal",HasSize:!0},"&":{DataType:"DateTime",Label:"Date/Time",HasSize:!1},"^":{DataType:"Boolean",Label:"Boolean",HasSize:!1}},n={};for(var r in i)n[i[r].DataType]=r;e.exports={MICRODDL_TYPE_MAP:i,DATATYPE_TO_SYMBOL:n,columnsToMicroDDL:function(t,e){for(var o=["!"+(e||"Untitled").replace(/[^a-zA-Z0-9_]/g,"")],r=0;r<t.length;r++){var a=t[r],s=n[a.DataType]||"$",l=s+(a.Name||"Column"+r);i[s].HasSize&&a.Size&&(l+=" "+a.Size),o.push(l)}return o.join("\n")},microDDLToColumns:function(t){for(var e=t.split("\n"),o=[],n=0;n<e.length;n++){var r=e[n].trim();if(!(!r||r.startsWith("!")||r.startsWith("//")||r.startsWith("--")||r.startsWith("->"))){var a=r.charAt(0);if(i.hasOwnProperty(a)){var s=r.substring(1).trim().split(/\s+/);o.push({Name:s[0]||"",DataType:i[a].DataType,Size:s[1]||""})}}}return o}}},{}],47:[function(t,e,o){var i=t("pict-view"),n=t("./MappingEditor-SchemaUtils.js"),r=function(e){function o(t,e,i){var n;return _classCallCheck(this,o),(n=_callSuper(this,o,[t,e,i]))._EditingContextID=0,n._EditingName="",n._CurrentMappings=[],n._SelectedMappingID=0,n._DiscoveredFields={},n._FlowView=null,n._MapEditorMode="flow",n._MappingSources=[],n._MappingStores=[],n._CurrentTargetSchema=null,n}return _inherits(o,e),_createClass(o,[{key:"_doLoadMappings",value:function(t){return Promise.resolve({Mappings:[]})}},{key:"_doLoadSources",value:function(){return Promise.resolve([])}},{key:"_doLoadStores",value:function(t){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(t){return Promise.resolve({SchemaDefinition:""})}},{key:"_doLoadMapping",value:function(t){return Promise.resolve({Mapping:null})}},{key:"_doDeleteMapping",value:function(t){return Promise.resolve({})}},{key:"_doDiscoverSourceFields",value:function(t,e,o){return Promise.resolve({Headers:[],SampleSize:0})}},{key:"_doCreateMapping",value:function(t,e){return Promise.resolve({Mapping:{}})}},{key:"_doUpdateMapping",value:function(t,e){return Promise.resolve({Mapping:{}})}},{key:"_onClose",value:function(){}},{key:"_doToast",value:function(t,e){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];o&&"function"==typeof o.toast?o.toast(t,e):this.log.info("[MeadowMappingEditor] "+t)}},{key:"_doConfirm",value:function(t,e){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];return o&&"function"==typeof o.confirm?o.confirm(t,e):Promise.resolve("undefined"!=typeof window&&window.confirm(t))}},{key:"editMappings",value:function(t,e){var o=this;this._EditingContextID=t,this._EditingName=e||"",this.render();var i=document.getElementById("MeadowMap-Editor"),n=document.getElementById("MeadowMap-Title");i&&(i.classList.add("active"),i.scrollIntoView({behavior:"smooth",block:"nearest"})),n&&(n.textContent="Mappings: "+(e||"Untitled"));var r=document.getElementById("MeadowMap-List-Wrap"),a=document.getElementById("MeadowMap-Detail");r&&(r.style.display=""),a&&(a.style.display="none"),Promise.all([this._doLoadMappings(t),this._doLoadSources(),this._doLoadStores(t),this._doLoadTargetSchema(t)]).then(function(t){o._CurrentMappings=t[0]&&t[0].Mappings?t[0].Mappings:[],o._MappingSources=Array.isArray(t[1])?t[1]:[],o._MappingStores=t[2]&&t[2].Stores?t[2].Stores:[];for(var e=0;e<o._MappingSources.length;e++){var i=o._MappingSources[e];Array.isArray(i.Columns)&&i.Columns.length>0&&(o._DiscoveredFields[i.IDSource]=i.Columns)}var n=t[3];n&&n.SchemaDefinition&&(o._CurrentTargetSchema=n.SchemaDefinition),o.refreshMappingList()})}},{key:"closeMappingEditor",value:function(){this._FlowView&&(this._FlowView=null),this._SelectedMappingID=0,this._onClose()}},{key:"refreshMappingList",value:function(){var t=document.getElementById("MeadowMap-List");if(t)if(0!==this._CurrentMappings.length){var e=this.options.ViewIdentifier,o='<table class="meadow-mapping-list-table"><thead><tr>';o+="<th>ID</th><th>Name</th><th>Source</th><th>Active</th><th>Actions</th>",o+="</tr></thead><tbody>";for(var i=0;i<this._CurrentMappings.length;i++){for(var n=this._CurrentMappings[i],r="—",a=0;a<this._MappingSources.length;a++)if(this._MappingSources[a].IDSource===n.IDSource){r=this._MappingSources[a].Name||"Source "+n.IDSource;break}o+="<tr>",o+="<td>"+n.IDProjectionMapping+"</td>",o+="<td><strong>"+(n.Name||"—")+"</strong></td>",o+="<td>"+r+"</td>",o+="<td>"+(n.Active?"✓":"✗")+"</td>",o+="<td>",o+='<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="window._Pict.views[\''+e+"'].openMappingDetail("+n.IDProjectionMapping+')">Edit</button> ',o+='<button class="meadow-mapping-btn meadow-mapping-btn-danger meadow-mapping-btn-small" onclick="window._Pict.views[\''+e+"'].deleteMapping("+n.IDProjectionMapping+')">Delete</button>',o+="</td>",o+="</tr>"}o+="</tbody></table>",t.innerHTML=o}else t.innerHTML='<div style="text-align:center; padding:1.5em; color:var(--facto-text-tertiary, #a09070);">No mappings yet. Create one to map source fields to target columns.</div>'}},{key:"newMapping",value:function(){var t=this;this._SelectedMappingID=0;var e=document.getElementById("MeadowMap-List-Wrap"),o=document.getElementById("MeadowMap-Detail");e&&(e.style.display="none"),o&&(o.style.display="");var i=document.getElementById("MeadowMap-Name");i&&(i.value="");var n=this._MappingSources.length>0?this._MappingSources[0].IDSource:void 0;this._populateSourceDropdown(n),this._populateStoreChecklist();var r=document.getElementById("MeadowMap-JSON");if(r){var a=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),s="GUID"+a,l="ID"+a,c={};c[s]="{~D:Record.IDRecord~}",c[l]="{~D:Record.IDRecord~}",r.value=JSON.stringify({Entity:a,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:s,Mappings:c,Solvers:[],ManyfestAddresses:!1},null,"\t")}var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),this._FlowView=null,this.switchMapMode("flow"),this.initFlowView(),this._doLoadTargetSchema(this._EditingContextID).then(function(e){e&&e.SchemaDefinition&&(t._CurrentTargetSchema=e.SchemaDefinition),t._rebuildFlowNodes()})}},{key:"openMappingDetail",value:function(t){var e=this;this._SelectedMappingID=t,this._doLoadMapping(t).then(function(t){if(t&&t.Mapping){var o=t.Mapping,i=document.getElementById("MeadowMap-List-Wrap"),n=document.getElementById("MeadowMap-Detail");i&&(i.style.display="none"),n&&(n.style.display="");var r=document.getElementById("MeadowMap-Name");r&&(r.value=o.Name||""),e._populateSourceDropdown(o.IDSource);var a=null;try{var s=JSON.parse(o.MappingConfiguration||"{}");Array.isArray(s.TargetStores)&&s.TargetStores.length>0&&(a=s.TargetStores)}catch(t){}!a&&o.IDProjectionStore&&(a=[o.IDProjectionStore]),e._populateStoreChecklist(a);var l={};try{l=JSON.parse(o.MappingConfiguration||"{}")}catch(t){}Array.isArray(l.sourceColumns)&&l.sourceColumns.length>0&&(e._DiscoveredFields[o.IDSource]=l.sourceColumns);var c=document.getElementById("MeadowMap-JSON");c&&(c.value=JSON.stringify(l,null,"\t"));var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),e._FlowView=null,e.switchMapMode("flow"),e.initFlowView(),e._doLoadTargetSchema(e._EditingContextID).then(function(t){if(t&&t.SchemaDefinition&&(e._CurrentTargetSchema=t.SchemaDefinition),e._FlowView){var i=null;try{i=JSON.parse(o.FlowDiagramState||"null")}catch(t){}i&&i.Nodes&&i.Nodes.length>0&&"function"==typeof e._FlowView.setFlowData&&e._FlowView.setFlowData(i)}e._rebuildFlowNodes()})}else e._doToast("Mapping not found.","error")})}},{key:"deleteMapping",value:(i=_asyncToGenerator(_regenerator().m(function t(e){var o=this;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._doConfirm("Delete this mapping?",{title:"Delete Mapping",confirmLabel:"Delete",dangerous:!0});case 1:if(t.v){t.n=2;break}return t.a(2);case 2:this._doDeleteMapping(e).then(function(){o._doLoadMappings(o._EditingContextID).then(function(t){o._CurrentMappings=t&&t.Mappings?t.Mappings:[],o.refreshMappingList()})});case 3:return t.a(2)}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"switchMapMode",value:function(t){this._MapEditorMode=t;var e=document.getElementById("MeadowMap-Flow-Wrap"),o=document.getElementById("MeadowMap-JSON-Wrap"),i=document.getElementById("MeadowMap-Mode-Flow"),n=document.getElementById("MeadowMap-Mode-JSON");if("flow"===t)e&&(e.style.display=""),o&&(o.style.display="none"),i&&i.classList.add("active"),n&&n.classList.remove("active");else if(e&&(e.style.display="none"),o&&(o.style.display=""),i&&i.classList.remove("active"),n&&n.classList.add("active"),this._FlowView&&"function"==typeof this._FlowView.getFlowData){var r=this.flowToMappingConfig(),a=document.getElementById("MeadowMap-JSON");a&&(a.value=JSON.stringify(r,null,"\t"))}}},{key:"_populateSourceDropdown",value:function(t){var e=document.getElementById("MeadowMap-Source");if(e){for(var o='<option value="0">Select a source...</option>',i=0;i<this._MappingSources.length;i++){var n=this._MappingSources[i],r=n.IDSource===t?" selected":"";o+='<option value="'+n.IDSource+'"'+r+">"+(n.Name||"Source "+n.IDSource)+"</option>"}e.innerHTML=o}}},{key:"_populateStoreChecklist",value:function(t){var e=document.getElementById("MeadowMap-Stores");if(e){var o={};if(Array.isArray(t))for(var i=0;i<t.length;i++)o[t[i]]=!0;else t&&(o[t]=!0);if(0!==this._MappingStores.length){for(var n="",r=0;r<this._MappingStores.length;r++){var a=this._MappingStores[r],s=o[a.IDProjectionStore]?" checked":"",l=(a.TargetTableName||"Store "+a.IDProjectionStore)+" ("+(a.Status||"Unknown")+")";n+="<label>",n+='<input type="checkbox" value="'+a.IDProjectionStore+'"'+s+">",n+=" "+l,n+="</label>"}e.innerHTML=n}else e.innerHTML='<div style="font-size:0.82em; color:var(--facto-text-tertiary, #a09070);">No stores configured yet.</div>'}}},{key:"_getCheckedStoreIDs",value:function(){var t=document.getElementById("MeadowMap-Stores");if(!t)return[];for(var e=t.querySelectorAll('input[type="checkbox"]:checked'),o=[],i=0;i<e.length;i++)o.push(parseInt(e[i].value,10));return o}},{key:"discoverSourceFields",value:function(){var t=this,e=document.getElementById("MeadowMap-Source"),o=e?parseInt(e.value,10):0;o?this._doDiscoverSourceFields(this._EditingContextID,o,50).then(function(e){if(e&&e.Error)t._doToast("Error: "+e.Error,{type:"error"});else{var i=e&&e.Headers?e.Headers:[];t._DiscoveredFields[o]=i,t._doToast("Discovered "+i.length+" fields from "+(e.SampleSize||0)+" records: "+i.join(", "),{type:"success",duration:6e3}),t._rebuildFlowNodes()}}):this._doToast("Select a source first.",{type:"warning"})}},{key:"_rebuildFlowNodes",value:function(){var t=document.getElementById("MeadowMap-Source"),e=t?parseInt(t.value,10):0,o=this._DiscoveredFields[e]||[],i=this._getSchemaColumns();if(this.initFlowView(),this._FlowView){for(var n="Source: "+(t&&t.selectedIndex>=0?t.options[t.selectedIndex].text:"Source"),r="Target: "+(this._EditingName||"Target"),a=[{Hash:"src-whole-record",Direction:"output",Side:"right",Label:"Whole Record"}],s=0;s<o.length;s++)a.push({Hash:"src-field-"+o[s].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"output",Side:"right",Label:o[s]});for(var l=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),c="GUID"+l,d="ID"+l,p=[{Hash:"tgt-col-"+c,Direction:"input",Side:"left",Label:c},{Hash:"tgt-col-"+d,Direction:"input",Side:"left",Label:d}],h=0;h<i.length;h++)i[h]!==c&&i[h]!==d&&p.push({Hash:"tgt-col-"+i[h].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"input",Side:"left",Label:i[h]});for(var u=this._FlowView.getFlowData(),f=null,w=null,v=0;v<u.Nodes.length;v++)"SRC"===u.Nodes[v].Type&&(f=u.Nodes[v]),"TGT"===u.Nodes[v].Type&&(w=u.Nodes[v]);if(f){for(var g=a.slice(),y={},b=0;b<g.length;b++)y[g[b].Hash]=!0;for(var m=f.Ports||[],_=0;_<m.length;_++)y[m[_].Hash]||g.push(m[_]);for(var P=this._FlowView._FlowData.Nodes,F=0;F<P.length;F++)if(P[F].Hash===f.Hash){P[F].Ports=g,P[F].Title=n;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-src-"+this.fable.getUUID(),Type:"SRC",X:50,Y:50,Width:200,Height:100,Title:n,Ports:a,Data:{}});if(w){for(var S=p.slice(),V={},C=0;C<S.length;C++)V[S[C].Hash]=!0;for(var k=w.Ports||[],T=0;T<k.length;T++)V[k[T].Hash]||S.push(k[T]);for(var D=this._FlowView._FlowData.Nodes,A=0;A<D.length;A++)if(D[A].Hash===w.Hash){D[A].Ports=S,D[A].Title=r;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-tgt-"+this.fable.getUUID(),Type:"TGT",X:550,Y:50,Width:200,Height:100,Title:r,Ports:p,Data:{}});"function"==typeof this._FlowView.renderFlow?this._FlowView.renderFlow():"function"==typeof this._FlowView.render&&this._FlowView.render()}}},{key:"_getSchemaColumns",value:function(){var t=[],e=this._CurrentTargetSchema||"";if(e)for(var o=n.microDDLToColumns(e),i=0;i<o.length;i++)t.push(o[i].Name);return t}},{key:"initFlowView",value:function(){if(!this._FlowView){var e=document.getElementById("MeadowMap-Flow-Container");if(e)try{var o=t("pict-section-flow");this._FlowView=this.pict.addView("MeadowMapping-Flow",{ViewIdentifier:"MeadowMapping-Flow",DefaultDestinationAddress:"#MeadowMap-Flow-Container",EnableToolbar:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0},o);var i=t("./flow-cards/FlowCard-MappingSource.js"),n=t("./flow-cards/FlowCard-MappingTarget.js"),r=t("./flow-cards/FlowCard-TemplateExpression.js"),a=t("./flow-cards/FlowCard-SolverExpression.js");this.pict.addServiceType("FlowCardMappingSource",i),this.pict.addServiceType("FlowCardMappingTarget",n),this.pict.addServiceType("FlowCardTemplateExpression",r),this.pict.addServiceType("FlowCardSolverExpression",a),"function"==typeof this._FlowView.render&&this._FlowView.render();var s=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingSource",{}),l=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingTarget",{}),c=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardTemplateExpression",{}),d=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardSolverExpression",{});s.registerWithFlowView(this._FlowView),l.registerWithFlowView(this._FlowView),c.registerWithFlowView(this._FlowView),d.registerWithFlowView(this._FlowView)}catch(t){this.log.error("Failed to initialize flow view: "+t.message),e.innerHTML='<div style="padding:2em; text-align:center; color:var(--facto-text-tertiary, #a09070);">Flow editor could not be loaded. Use JSON Config mode instead.</div>'}}}},{key:"flowToMappingConfig",value:function(){var t=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),e="GUID"+t,o="ID"+t,i={Entity:t,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:e,Mappings:{},Solvers:[],ManyfestAddresses:!1};if(!this._FlowView||"function"!=typeof this._FlowView.getFlowData)return i;var n=this._FlowView.getFlowData();if(!n||!n.Connections)return i;var r={},a={};if(n.Nodes)for(var s=0;s<n.Nodes.length;s++){var l=n.Nodes[s];if(r[l.Hash]=l,l.Ports)for(var c=0;c<l.Ports.length;c++)a[l.Ports[c].Hash]={Label:l.Ports[c].Label,NodeHash:l.Hash,NodeType:l.Type}}for(var d={},p=0;p<n.Connections.length;p++){var h=n.Connections[p],u=a[h.SourcePortHash],f=a[h.TargetPortHash];if(u&&f&&"TGT"===f.NodeType){var w=f.Label;if(w){var v=r[u.NodeHash];if(v)if("SRC"===v.Type){var g=u.Label;if("Whole Record"===g)continue;var y=h.Data&&h.Data.Template?h.Data.Template:"{~D:Record."+g+"~}";w===e&&(i.GUIDTemplate=y),i.Mappings[w]=y}else if("TPL"===v.Type){var b=v.Data&&v.Data.TemplateExpression?v.Data.TemplateExpression:"";b&&(w===e&&(i.GUIDTemplate=b),i.Mappings[w]=b)}else if("SOL"===v.Type){var m=v.Data&&v.Data.SolverExpression?v.Data.SolverExpression:"";m&&(d[v.Hash]||(d[v.Hash]={expression:m,outputs:{}}),d[v.Hash].outputs[w]=!0)}}}}i.Mappings.hasOwnProperty(e)||(i.Mappings[e]=i.GUIDTemplate),i.Mappings.hasOwnProperty(o)||(i.Mappings[o]="{~D:Record.IDRecord~}");for(var _=Object.keys(d),P=0;P<_.length;P++)i.Solvers.push(d[_[P]]);return i}},{key:"saveMapping",value:function(){var t=this,e=document.getElementById("MeadowMap-Name"),o=document.getElementById("MeadowMap-Source"),i=e?e.value.trim():"",n=o?parseInt(o.value,10):0,r=this._getCheckedStoreIDs(),a=r.length>0?r[0]:0;if(i){var s;if("json"===this._MapEditorMode){var l=document.getElementById("MeadowMap-JSON"),c=l?l.value:"{}";try{s=JSON.parse(c)}catch(t){return void this._doToast("Invalid JSON: "+t.message,{type:"error"})}}else s=this.flowToMappingConfig();s.TargetStores=r;var d=this._DiscoveredFields[n];Array.isArray(d)&&d.length>0&&(s.sourceColumns=d);var p={};this._FlowView&&"function"==typeof this._FlowView.getFlowData&&(p=this._FlowView.getFlowData());var h={Name:i,IDSource:n,IDProjectionStore:a,MappingConfiguration:JSON.stringify(s),FlowDiagramState:JSON.stringify(p),Active:1};(this._SelectedMappingID?this._doUpdateMapping(this._SelectedMappingID,h):this._doCreateMapping(this._EditingContextID,h)).then(function(e){e&&e.Error?t._doToast("Error: "+e.Error,{type:"error"}):(e&&e.Mapping&&e.Mapping.IDProjectionMapping&&(t._SelectedMappingID=e.Mapping.IDProjectionMapping),t._doToast("Mapping saved.",{type:"success"}),t._doLoadMappings(t._EditingContextID).then(function(e){t._CurrentMappings=e&&e.Mappings?e.Mappings:[]}))})}else this._doToast("Enter a mapping name.",{type:"warning"})}}]);var i}(i);e.exports=r,e.exports.default_configuration={ViewIdentifier:"MeadowMappingEditor",DefaultRenderable:"MeadowMappingEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:"\n\t\t/* Meadow Mapping Editor */\n\t\t.meadow-mapping-editor {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.meadow-mapping-editor.active {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.meadow-mapping-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 1em;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-header h3 {\n\t\t\tmargin: 0;\n\t\t\tflex: 1;\n\t\t}\n\t\t.meadow-mapping-list-table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-list-table th {\n\t\t\ttext-align: left;\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--facto-text-tertiary, #a09070);\n\t\t\tpadding: 0.5em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--facto-border, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-list-table td {\n\t\t\tpadding: 0.35em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--facto-border-subtle, #e8ddc8);\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.meadow-flow-container {\n\t\t\twidth: 100%;\n\t\t\theight: 500px;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--facto-bg-surface, #fcf8f0);\n\t\t\tmargin-bottom: 0.75em;\n\t\t}\n\t\t.meadow-mapping-json-editor {\n\t\t\twidth: 100%;\n\t\t\tmin-height: 300px;\n\t\t\tfont-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.75em;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t\tresize: vertical;\n\t\t\ttab-size: 4;\n\t\t}\n\t\t.meadow-mapping-store-checklist {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.5em;\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.meadow-mapping-store-checklist label {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--facto-border-subtle, #e8ddc8);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t}\n\t\t.meadow-mapping-store-checklist label:has(input:checked) {\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t\tbackground: var(--facto-brand-a12, rgba(24,165,160,0.12));\n\t\t}\n\t\t.meadow-mapping-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 0.35em 0.9em;\n\t\t\tfont-size: 0.82em;\n\t\t\tfont-weight: 500;\n\t\t\tborder-radius: 4px;\n\t\t\tborder: 1px solid transparent;\n\t\t\tcursor: pointer;\n\t\t\ttext-decoration: none;\n\t\t\tline-height: 1.4;\n\t\t}\n\t\t.meadow-mapping-btn-primary {\n\t\t\tbackground: var(--facto-brand, #18a5a0);\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t}\n\t\t.meadow-mapping-btn-primary:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-secondary {\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t\tborder-color: var(--facto-border, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-btn-secondary:hover {\n\t\t\tbackground: var(--facto-border-subtle, #e8ddc8);\n\t\t}\n\t\t.meadow-mapping-btn-danger {\n\t\t\tbackground: #e74c3c;\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--theme-color-status-error, #e74c3c);\n\t\t}\n\t\t.meadow-mapping-btn-danger:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-small {\n\t\t\tpadding: 0.2em 0.6em;\n\t\t\tfont-size: 0.78em;\n\t\t}\n\t\t.meadow-schema-mode-tabs {\n\t\t\tdisplay: flex;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.meadow-schema-mode-tab {\n\t\t\tpadding: 0.25em 0.75em;\n\t\t\tfont-size: 0.8em;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t}\n\t\t.meadow-schema-mode-tab.active {\n\t\t\tbackground: var(--facto-brand, #18a5a0);\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t}\n\t\t.meadow-section-title {\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--facto-text-tertiary, #a09070);\n\t\t}\n\t",Templates:[{Hash:"MeadowMappingEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--facto-border); border-radius:4px; background:var(--facto-bg-input); color:var(--facto-text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--facto-border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"MyTable","GUIDTemplate":"{~D:Record.IDRecord~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--facto-text-tertiary); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MeadowMappingEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MeadowMappingEditor-Content",TemplateHash:"MeadowMappingEditor-Template",DestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]}},{"./MappingEditor-SchemaUtils.js":46,"./flow-cards/FlowCard-MappingSource.js":48,"./flow-cards/FlowCard-MappingTarget.js":49,"./flow-cards/FlowCard-SolverExpression.js":50,"./flow-cards/FlowCard-TemplateExpression.js":51,"pict-section-flow":9,"pict-view":45}],48:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Mapping Source",Name:"Mapping Source",Code:"SRC",Category:"Data Source",Description:"Source dataset with discovered record fields",TitleBarColor:"#2980b9",Width:200,Height:100,Inputs:[],Outputs:[{Name:"Whole Record",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),i])).serviceType="FlowCardMappingSource",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Mapping Source",Code:"SRC",Category:"Data Source",TitleBarColor:"#2980b9",Width:200,Height:100}},{"pict-section-flow":9}],49:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Mapping Target",Name:"Mapping Target",Code:"TGT",Category:"Data Target",Description:"Mapping target table with schema columns",TitleBarColor:"#27ae60",Width:200,Height:100,Inputs:[],Outputs:[],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),i])).serviceType="FlowCardMappingTarget",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Mapping Target",Code:"TGT",Category:"Data Target",TitleBarColor:"#27ae60",Width:200,Height:100}},{"pict-section-flow":9}],50:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Solver Expression",Name:"Solver Expression",Code:"SOL",Category:"Transform",Description:"Apply a Fable solver expression for conditional logic and computed values",TitleBarColor:"#d35400",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:var(--theme-color-border-default, #ccc); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.SolverExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Solver Expression",Configuration:{Template:"<div style=\"padding:8px;\"><label style=\"display:block; margin-bottom:4px; font-weight:bold; font-size:12px;\">Solver Expression</label><textarea id=\"FlowCard-SOL-{~D:Record.Hash~}\" style=\"width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:var(--theme-color-border-default, #e0e0e0); border:1px solid var(--theme-color-text-secondary, #444); border-radius:4px; padding:6px;\" onchange=\"(function(el){var n=pict.views['MeadowMapping-Flow'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash==='{~D:Record.Hash~}'){n._FlowData.Nodes[i].Data.SolverExpression=el.value;if(typeof n.renderFlow==='function')n.renderFlow();break;}}}})(this)\">{~D:Record.Data.SolverExpression~}</textarea><div style=\"font-size:10px; color:var(--theme-color-text-muted, #888); margin-top:4px;\">Example: IF(IncomingRecord.Type == 'Premium', 'GOLD', 'SILVER')</div></div>"}}},o),i])).serviceType="FlowCardSolverExpression",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Solver Expression",Code:"SOL",Category:"Transform",TitleBarColor:"#d35400",Width:220,Height:90}},{"pict-section-flow":9}],51:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Template Expression",Name:"Template Expression",Code:"TPL",Category:"Transform",Description:"Apply a Manyfest template expression to map source fields to a target column",TitleBarColor:"#8e44ad",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:var(--theme-color-border-default, #ccc); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.TemplateExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Template Expression",Configuration:{Template:'<div style="padding:8px;"><label style="display:block; margin-bottom:4px; font-weight:bold; font-size:12px;">Template Expression</label><textarea id="FlowCard-TPL-{~D:Record.Hash~}" style="width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:var(--theme-color-border-default, #e0e0e0); border:1px solid var(--theme-color-text-secondary, #444); border-radius:4px; padding:6px;" onchange="(function(el){var n=pict.views[\'MeadowMapping-Flow\'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash===\'{~D:Record.Hash~}\'){n._FlowData.Nodes[i].Data.TemplateExpression=el.value;if(typeof n.renderFlow===\'function\')n.renderFlow();break;}}}})(this)">{~D:Record.Data.TemplateExpression~}</textarea><div style="font-size:10px; color:var(--theme-color-text-muted, #888); margin-top:4px;">Use {~D:Record.FieldName~} syntax. Example: {~D:Record.Name~} in {~D:Record.City~}</div></div>'}}},o),i])).serviceType="FlowCardTemplateExpression",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Template Expression",Code:"TPL",Category:"Transform",TitleBarColor:"#8e44ad",Width:220,Height:90}},{"pict-section-flow":9}]},{},[1])(1)});
1
+ "use strict";function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==o.return||o.return()}finally{if(l)throw r}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function r(o,n,i,r){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return _regeneratorDefine2(c,"_invoke",function(o,n,i){var r,l,s,c=0,d=i||[],p=!1,h={p:0,n:0,v:e,a:u,f:u.bind(e,4),d:function(t,o){return r=t,l=0,s=e,h.n=o,a}};function u(o,n){for(l=o,s=n,t=0;!p&&c&&!i&&t<d.length;t++){var i,r=d[t],u=h.p,f=r[2];o>3?(i=f===n)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=u&&((i=o<2&&u<r[1])?(l=0,h.v=n,h.n=r[1]):u<f&&(i=o<3||r[0]>n||n>f)&&(r[4]=o,r[5]=n,h.n=f,l=0))}if(i||o>1)return a;throw p=!0,n}return function(i,d,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===d&&u(d,f),l=d,s=f;(t=l<2?e:s)||!p;){r||(l?l<3?(l>1&&(h.n=-1),u(l,s)):h.n=s:h.v=s);try{if(c=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(p=h.n<0)?s:o.call(n,h))!==a)break}catch(t){r=e,l=1,s=t}finally{c=1}}return{value:t,done:p}}}(o,i,r),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),p=c.prototype=l.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_regeneratorDefine2(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=c,_regeneratorDefine2(p,"constructor",c),_regeneratorDefine2(c,"constructor",s),s.displayName="GeneratorFunction",_regeneratorDefine2(c,i,"GeneratorFunction"),_regeneratorDefine2(p),_regeneratorDefine2(p,i,"Generator"),_regeneratorDefine2(p,n,function(){return this}),_regeneratorDefine2(p,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:r,m:h}})()}function _regeneratorDefine2(e,t,o,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function(e,t,o,n){function r(t,o){_regeneratorDefine2(e,t,function(e){return this._invoke(t,o,e)})}t?i?i(e,t,{value:o,enumerable:!n,configurable:!n,writable:!n}):e[t]=o:(r("next",0),r("throw",1),r("return",2))},_regeneratorDefine2(e,t,o,n)}function asyncGeneratorStep(e,t,o,n,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void o(e)}l.done?t(s):Promise.resolve(s).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,o=arguments;return new Promise(function(n,i){var r=e.apply(t,o);function a(e){asyncGeneratorStep(r,n,i,a,l,"next",e)}function l(e){asyncGeneratorStep(r,n,i,a,l,"throw",e)}a(void 0)})}}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _callSuper(e,t,o){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,o||[],_getPrototypeOf(e).constructor):t.apply(e,o))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _superPropGet(e,t,o,n){var i=_get(_getPrototypeOf(1&n?e.prototype:e),t,o);return 2&n&&"function"==typeof i?function(e){return i.apply(o,e)}:i}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,o){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:o):i.value}},_get.apply(null,arguments)}function _superPropBase(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).MappingDemoApplication=e()}}(function(){return function e(t,o,n){function i(a,l){if(!o[a]){if(!t[a]){var s="function"==typeof require&&require;if(!l&&s)return s(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[a]={exports:{}};t[a][0].call(d.exports,function(e){return i(t[a][1][e]||e)},d,d.exports,e,t,o,n)}return o[a].exports}for(var r="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,o){t.exports={name:"mapping-demo",version:"1.0.0",description:"Meadow-Integration pipeline demo: parse → map → visual map → comprehension → load",main:"server.js",scripts:{start:"node server.js",brand:'node ../../node_modules/pict-section-theme/bin/pict-section-theme-brand.js --palette forest --display-name "Mapping Demo" --tagline "Meadow-Integration mapping editor showcase" --favicons web/favicons',prebuild:"npm run brand",build:"node generate-build-config.js && ../../node_modules/.bin/quack build",demo:"npm run build && node server.js"},author:"steven velozo <steven@velozo.com>",license:"MIT",retold:{brand:{Hash:"mapping-demo",Name:"Mapping Demo",Tagline:"Meadow-Integration mapping editor showcase",Palette:"forest",Icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="frame-mapping-demo-filled-light">\n\t\t\t\t<path d="M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z" fill="#55af3b"/>\n\t\t<g clip-path="url(#frame-mapping-demo-filled-light)"><circle cx="37.5" cy="48" r="30" fill="#ddc536" opacity="0.85"/>\n\t\t\t\t\t<circle cx="58.5" cy="48" r="30" fill="rgba(255,255,255,0.32)" opacity="0.95"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="38" font-weight="600"\n\t\t\tfill="#ffffff" letter-spacing="-1">MD</text>\n\t</svg>',IconType:"svg",Favicon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="fav-mapping-demo-light">\n\t\t\t\t<path d="M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z" fill="#55af3b"/>\n\t\t<g clip-path="url(#fav-mapping-demo-light)"><circle cx="37.5" cy="48" r="34" fill="#ddc536"/>\n\t\t\t\t\t<circle cx="58.5" cy="48" r="34" fill="rgba(255,255,255,0.22)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="60" font-weight="800"\n\t\t\tfill="#ffffff" letter-spacing="-1">M</text>\n\t</svg>',FaviconDark:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">\n\t\t<defs>\n\t\t\t<clipPath id="fav-mapping-demo-dark">\n\t\t\t\t<path d="M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d="M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z" fill="#8dcb7b"/>\n\t\t<g clip-path="url(#fav-mapping-demo-dark)"><circle cx="37.5" cy="48" r="34" fill="#e6d989"/>\n\t\t\t\t\t<circle cx="58.5" cy="48" r="34" fill="rgba(255,255,255,0.22)"/></g>\n\t\t<text x="48" y="50" text-anchor="middle" dominant-baseline="central"\n\t\t\tfont-family="-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif"\n\t\t\tfont-size="60" font-weight="800"\n\t\t\tfill="#101418" letter-spacing="-1">M</text>\n\t</svg>',Colors:{Primary:"#55af3b",Secondary:"#ddc536",PrimaryLight:"#55af3b",PrimaryDark:"#8dcb7b",SecondaryLight:"#ddc536",SecondaryDark:"#e6d989"}}},devDependencies:{"retold-sharp":"^1.0.0"}}},{}],2:[function(e,t,o){var n=e("pict-application"),i=e("pict-section-modal"),r=e("pict-section-theme"),a=e("./MappingDemoBrand.js"),l=e("./views/MappingDemoEditorView.js"),s=function(e){function t(e,o,n){var s;return _classCallCheck(this,t),(s=_callSuper(this,t,[e,o,n])).pict.addView("Pict-Section-Modal",i.default_configuration,i),s.pict.addView("MappingDemoEditor",l.default_configuration,l),s.pict.addProvider("Theme-Section",{ApplyDefault:"pict-default",DefaultMode:"system",DefaultScale:1,Brand:a,Views:["Picker","ModeToggle","ScaleSelect","BrandMark"]},r),s}return _inherits(t,e),_createClass(t,[{key:"onAfterInitializeAsync",value:function(e){var o=this.pict.providers["Theme-Section"];return o&&"function"==typeof o.mount&&o.mount({Container:"#MappingDemo-Theme-Controls",Views:["Picker","ModeToggle","ScaleSelect"]}),window.openMappingEditor=function(){var e=document.getElementById("mapping-editor-placeholder");e&&(e.style.display="none"),window._Pict.views.MappingDemoEditor.editMappings(1,"Book")},_superPropGet(t,"onAfterInitializeAsync",this,3)([e])}}])}(n);t.exports=s,t.exports.default_configuration={Name:"MappingDemoApp",Hash:"MappingDemo",AutoSolveAfterInitialize:!0}},{"./MappingDemoBrand.js":3,"./views/MappingDemoEditorView.js":4,"pict-application":8,"pict-section-modal":76,"pict-section-theme":77}],3:[function(e,t,o){var n=e("../package.json");if(!n.retold||!n.retold.brand)throw new Error("mapping-demo: package.json is missing retold.brand — run `npm run brand` (chained from prebuild) before building");t.exports=n.retold.brand},{"../package.json":1}],4:[function(e,t,o){var n=e("../../../../source/views/PictView-MeadowMappingEditor.js"),i={ViewIdentifier:"MappingDemoEditor",DefaultRenderable:"MappingDemoEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:n.default_configuration.CSS,Templates:[{Hash:"MappingDemoEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); color:var(--text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"Book","GUIDTemplate":"{~D:Record.id~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MappingDemoEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MappingDemoEditor-Content",TemplateHash:"MappingDemoEditor-Template",ContentDestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]},r=function(e){function t(e,o,n){return _classCallCheck(this,t),_callSuper(this,t,[e,o,n])}return _inherits(t,e),_createClass(t,[{key:"_doLoadMappings",value:function(e){return fetch("/1.0/Demo/VisualMapping").then(function(e){return e.json()})}},{key:"_doLoadSources",value:function(){return fetch("/1.0/Demo/Sources").then(function(e){return e.json()})}},{key:"_doLoadStores",value:function(e){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(e){return fetch("/1.0/Demo/TargetSchema").then(function(e){return e.json()})}},{key:"_doLoadMapping",value:function(e){return fetch("/1.0/Demo/VisualMapping/"+e).then(function(e){return e.json()})}},{key:"_doDeleteMapping",value:function(e){return fetch("/1.0/Demo/VisualMapping/"+e,{method:"DELETE"}).then(function(e){return e.json()})}},{key:"_doDiscoverSourceFields",value:function(e,t,o){return fetch("/1.0/Demo/SourceSchema").then(function(e){return e.json()})}},{key:"_doCreateMapping",value:function(e,t){return fetch("/1.0/Demo/VisualMapping",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(function(e){return e.json()})}},{key:"_doUpdateMapping",value:function(e,t){return fetch("/1.0/Demo/VisualMapping/"+e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(function(e){return e.json()})}},{key:"_onClose",value:function(){var e=document.getElementById("MeadowMap-Editor");e&&e.classList.remove("active");var t=document.getElementById("mapping-editor-placeholder");t&&(t.style.display=""),document.dispatchEvent(new CustomEvent("mapping-editor-closed"))}}])}(n);t.exports=r,t.exports.default_configuration=i},{"../../../../source/views/PictView-MeadowMappingEditor.js":139}],5:[function(e,t,o){t.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/fable-retold/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/fable-retold/fable-serviceproviderbase/issues"},homepage:"https://github.com/fable-retold/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],6:[function(e,t,o){var n=e("../package.json"),i=function(){return _createClass(function e(t,o,i){_classCallCheck(this,e),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(t)&&t.isFable?this.connectFable(t):this.fable=!1,this._PackageFableServiceProvider=n,this.fable?(this.UUID=t.getUUID(),this.options="object"===_typeof(o)?o:{}):(this.options="object"!==_typeof(t)||t.isFable?"object"===_typeof(o)?o:{}:t,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof i?i:this.fable||"string"!=typeof o?"".concat(this.UUID):o},[{key:"connectFable",value:function(e){if("object"!==_typeof(e)||!e.isFable){var t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(e),"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(i,"isFableService",!0),t.exports=i,t.exports.CoreServiceProviderBase=i},{"../package.json":5}],7:[function(e,t,o){t.exports={name:"pict-application",version:"1.0.34",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/fable-retold/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/fable-retold/pict-application/issues"},homepage:"https://github.com/fable-retold/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-docuserve":"^0.1.5","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.1.0",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],8:[function(e,t,o){var n=e("fable-serviceproviderbase"),i=e("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(e){function t(e,o,n){var a;_classCallCheck(this,t);var l="object"===_typeof(e.settings.PictApplicationConfiguration)?e.settings.PictApplicationConfiguration:{};(a=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(r)),l,o),n])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=i,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var s=Object.keys(a.options.Manifests);if(s.length>0)for(var c=0;c<s.length;c++){var d=s[c];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(t,e),_createClass(t,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(e){return this.onPreSolve(),e()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(e){return this.onBeforeSolve(),e()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(e){return this.onSolve(),e()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var e=Object.keys(this.pict.providers),t=[],o=0;o<e.length;o++){var n=this.pict.providers[e[o]];n.options.AutoSolveWithApp&&t.push(n)}t.sort(function(e,t){return e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal});for(var i=0;i<t.length;i++)t[i].solve(t[i]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],l=0;l<r.length;l++){var s=this.pict.views[r[l]];s.options.AutoInitialize&&a.push(s)}a.sort(function(e,t){return e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal});for(var c=0;c<a.length;c++)a[c].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");o.anticipate(this.onBeforeSolveAsync.bind(this));var n="function"==typeof e&&e;n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," solveAsync Auto Callback Error: ").concat(e),e)});for(var i=Object.keys(this.pict.providers),r=[],a=0;a<i.length;a++){var l=this.pict.providers[i[a]];l.options.AutoSolveWithApp&&r.push(l)}r.sort(function(e,t){return e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal});for(var s=0;s<r.length;s++)o.anticipate(r[s].solveAsync.bind(r[s]));for(var c=Object.keys(this.pict.views),d=[],p=0;p<c.length;p++){var h=this.pict.views[c[p]];h.options.AutoSolveWithApp&&d.push(h)}d.sort(function(e,t){return e.options.AutoSolveOrdinal-t.options.AutoSolveOrdinal});for(var u=0;u<d.length;u++)o.anticipate(d[u].solveAsync.bind(d[u]));o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," solveAsync() complete.")),t.lastSolvedTimestamp=t.fable.log.getTimeStamp(),n(e)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(e){return this.onAfterSolve(),e()}},{key:"onBeforeLoginAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),e()}},{key:"onLoginAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),e()}},{key:"loginAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),n=e;"function"!=typeof n&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," loginAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeLoginAsync.bind(this)),o.anticipate(this.onLoginAsync.bind(this)),o.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&o.anticipate(function(e){if(!t.isLoggedIn())return e();t.pict.LogNoisiness>1&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," auto loading data after login...")),t.loadDataAsync(function(t){e(t)})}),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," loginAsync() complete.")),t.lastLoginTimestamp=t.fable.log.getTimeStamp(),n(e)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),e()}},{key:"onBeforeLoadDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),e()}},{key:"onLoadDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),e()}},{key:"loadDataAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),n=e;"function"!=typeof n&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," loadDataAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var i=Object.keys(this.pict.providers),r=[],a=0;a<i.length;a++){var l=this.pict.providers[i[a]];l.options.AutoLoadDataWithApp&&r.push(l)}r.sort(function(e,t){return e.options.AutoLoadDataOrdinal-t.options.AutoLoadDataOrdinal});for(var s=0,c=r;s<c.length;s++){var d=c[s];o.anticipate(d.onBeforeLoadDataAsync.bind(d))}o.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onLoadDataAsync.bind(u))}o.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,g=r;f<g.length;f++){var m=g[f];o.anticipate(m.onAfterLoadDataAsync.bind(m))}o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," loadDataAsync() complete.")),t.lastLoadDataTimestamp=t.fable.log.getTimeStamp(),n(e)})}},{key:"onAfterLoadDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),e()}},{key:"onBeforeSaveDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),e()}},{key:"onSaveDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),e()}},{key:"saveDataAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),n=e;"function"!=typeof n&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," saveDataAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var i=Object.keys(this.pict.providers),r=[],a=0;a<i.length;a++){var l=this.pict.providers[i[a]];l.options.AutoSaveDataWithApp&&r.push(l)}r.sort(function(e,t){return e.options.AutoSaveDataOrdinal-t.options.AutoSaveDataOrdinal});for(var s=0,c=r;s<c.length;s++){var d=c[s];o.anticipate(d.onBeforeSaveDataAsync.bind(d))}o.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onSaveDataAsync.bind(u))}o.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,g=r;f<g.length;f++){var m=g[f];o.anticipate(m.onAfterSaveDataAsync.bind(m))}o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," saveDataAsync() complete.")),t.lastSaveDataTimestamp=t.fable.log.getTimeStamp(),n(e)})}},{key:"onAfterSaveDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),e()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(e){return this.onBeforeInitialize(),e()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(e){return this.onInitialize(),e()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var e=0;e<this.options.ConfigurationOnlyViews.length;e++){var t=void 0===this.options.ConfigurationOnlyViews[e].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[e].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(t)),this.pict.addView(t,this.options.ConfigurationOnlyViews[e])}this.onInitialize();for(var o=Object.keys(this.pict.providers),n=[],i=0;i<o.length;i++){var r=this.pict.providers[o[i]];r.options.AutoInitialize&&n.push(r)}n.sort(function(e,t){return e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal});for(var a=0;a<n.length;a++)n[a].initialize();for(var l=Object.keys(this.pict.views),s=[],c=0;c<l.length;c++){var d=this.pict.views[l[c]];d.options.AutoInitialize&&s.push(d)}s.sort(function(e,t){return e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal});for(var p=0;p<s.length;p++)s[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(e){var t=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var o="function"==typeof e&&e;if(o||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," initializeAsync Auto Callback Error: ").concat(e),e)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(o);var n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var i=0;i<this.options.ConfigurationOnlyViews.length;i++){var r=void 0===this.options.ConfigurationOnlyViews[i].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[i].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[i])}n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),l=[],s=0;s<a.length;s++){var c=this.pict.providers[a[s]];c.options.AutoInitialize&&l.push(c)}l.sort(function(e,t){return e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal});for(var d=0;d<l.length;d++)n.anticipate(l[d].initializeAsync.bind(l[d]));for(var p=Object.keys(this.pict.views),h=[],u=0;u<p.length;u++){var f=this.pict.views[p[u]];f.options.AutoInitialize&&h.push(f)}h.sort(function(e,t){return e.options.AutoInitializeOrdinal-t.options.AutoInitializeOrdinal});for(var g=0;g<h.length;g++){var m=h[g];n.anticipate(m.initializeAsync.bind(m))}n.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),n.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),n.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),n.anticipate(this.renderMainViewportAsync.bind(this))),n.wait(function(e){return e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," initializeAsync Error: ").concat(e.message||e),{stack:e.stack}),t.initializeTimestamp=t.fable.log.getTimeStamp(),t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," initialization complete.")),o()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(e){return this.onAfterInitialize(),e()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(e){return this.onCompletionOfInitialize(),e()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(e){return this.onBeforeMarshalFromViews(),e()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(e){return this.onMarshalFromViews(),e()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var e=Object.keys(this.pict.views),t=[],o=0;o<e.length;o++){var n=this.pict.views[e[o]];t.push(n)}for(var i=0;i<t.length;i++)t[i].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),n="function"==typeof e&&e;n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var i=Object.keys(this.pict.views),r=[],a=0;a<i.length;a++){var l=this.pict.views[i[a]];r.push(l)}for(var s=0;s<r.length;s++)o.anticipate(r[s].marshalFromViewAsync.bind(r[s]));o.anticipate(this.onMarshalFromViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," marshalFromViewsAsync() complete.")),t.lastMarshalFromViewsTimestamp=t.fable.log.getTimeStamp(),n(e)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(e){return this.onAfterMarshalFromViews(),e()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(e){return this.onBeforeMarshalToViews(),e()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(e){return this.onMarshalToViews(),e()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var e=Object.keys(this.pict.views),t=[],o=0;o<e.length;o++){var n=this.pict.views[e[o]];t.push(n)}for(var i=0;i<t.length;i++)t[i].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),n="function"==typeof e&&e;n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var i=Object.keys(this.pict.views),r=[],a=0;a<i.length;a++){var l=this.pict.views[i[a]];r.push(l)}for(var s=0;s<r.length;s++)o.anticipate(r[s].marshalToViewAsync.bind(r[s]));o.anticipate(this.onMarshalToViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," marshalToViewsAsync() complete.")),t.lastMarshalToViewsTimestamp=t.fable.log.getTimeStamp(),n(e)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(e){return this.onAfterMarshalToViews(),e()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(e){return this.onBeforeRender(),e()}},{key:"render",value:function(e,t,o,n){var i="string"!=typeof e?this.options.MainViewportViewIdentifier:e,r="string"!=typeof t?this.options.MainViewportRenderableHash:t,a="string"!=typeof o?this.options.MainViewportDestinationAddress:o,l="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(l,"] render:")),this.onBeforeRender();var s="string"==typeof i&&this.servicesMap.PictView[i];return s?(this.onRender(),s.render(r,a,l),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(i," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(e){return this.onRender(),e()}},{key:"renderAsync",value:function(e,t,o,n,i){var r=this,a="string"!=typeof e?this.options.MainViewportViewIdentifier:e,l="string"!=typeof t?this.options.MainViewportRenderableHash:t,s="string"!=typeof o?this.options.MainViewportDestinationAddress:o,c="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n,d="function"==typeof i?i:"function"==typeof n?n:"function"==typeof o?o:"function"==typeof t?t:"function"==typeof e&&e;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(e){e&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(e),e)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(l,"] Destination[").concat(s,"] TemplateDataAddress[").concat(c,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var h="string"==typeof a&&this.servicesMap.PictView[a];if(!h){var u="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(u),d(new Error(u))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(e){h.renderAsync.call(h,l,s,c,e)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(e){return this.onAfterRender(),e()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(e){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(e)}},{key:"renderAutoViews",value:function(){var e=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var t=Object.keys(this.pict.views);t.sort(function(t,o){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[o].options.AutoRenderOrdinal});for(var o=0;o<t.length;o++){var n=this.pict.views[t[o]];n.options.AutoRender&&n.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(e){var t=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),n="function"==typeof e&&e;n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(e),e)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var i=Object.keys(this.pict.views);i.sort(function(e,o){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[o].options.AutoRenderOrdinal});for(var r=0;r<i.length;r++){var a=this.pict.views[i[r]];a.options.AutoRender&&o.anticipate(a.renderAsync.bind(a))}o.wait(function(e){return t.lastAutoRenderTimestamp=t.fable.log.getTimeStamp(),t.pict.LogNoisiness>0&&t.log.trace("PictApp [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," renderAutoViewsAsync complete.")),n(e)})}},{key:"isPictApplication",get:function(){return!0}}])}(n);t.exports=a},{"../package.json":7,"fable-serviceproviderbase":6}],9:[function(e,t,o){
2
+ /**
3
+ * Pict Provider: Theme
4
+ *
5
+ * Runtime theme manager for Pict applications. Registers theme bundles
6
+ * (token maps + CSS + SVG + image assets) and applies them by injecting
7
+ * CSS custom properties into a single <style id="pict-theme"> element.
8
+ *
9
+ * Themes can be:
10
+ * - Single-mode (Modes.Strategy = "single")
11
+ * - Paired light/dark (Modes.Strategy = "paired")
12
+ * - System-aware (Modes.Strategy = "system" — paired + auto-pick)
13
+ *
14
+ * Mode is reflected as `theme-light` / `theme-dark` class on <html>.
15
+ *
16
+ * Token resolution path examples:
17
+ * provider.token('Tokens.Color.Background.Primary') -> raw current value
18
+ * provider.cssVar('Color.Background.Primary') -> 'var(--theme-color-background-primary)'
19
+ * provider.asset('SVG', 'Logo') -> SVG string
20
+ * provider.image('Hero') -> image URL / data URL
21
+ *
22
+ * Template expressions registered (when pict has addTemplate):
23
+ * {~Theme:Tokens.Color.Background.Primary~} raw value
24
+ * {~ThemeVar:Color.Background.Primary~} var(--theme-...) reference
25
+ * {~ThemeAsset:SVG.Logo~} asset content
26
+ * {~ThemeImage:Hero~} image URL
27
+ *
28
+ * Stateless: this provider does not persist anything. Host applications
29
+ * decide what to apply at boot (from localStorage, server config, etc.).
30
+ *
31
+ * @author Steven Velozo <steven@velozo.com>
32
+ * @license MIT
33
+ */
34
+ var n=e("pict-provider"),i="pict-theme",r="theme-light",a="theme-dark",l="--theme-",s=function(t){function o(t,n,i){var r;if(_classCallCheck(this,o),(r=_callSuper(this,o,[t,n,i])).serviceType="PictProviderTheme",r._themes={},r._themeOrder=[],r._activeHash=null,r._activeMode=null,r._resolvedMode=null,r._systemMediaQuery=null,r._systemListener=null,r._registeredCSSHashes=[],r._applyListeners=[],r.pict&&"function"==typeof r.pict.addTemplate)try{r.pict.addTemplate(e("./templates/Pict-Template-Theme.js")),r.pict.addTemplate(e("./templates/Pict-Template-ThemeVar.js")),r.pict.addTemplate(e("./templates/Pict-Template-ThemeAsset.js")),r.pict.addTemplate(e("./templates/Pict-Template-ThemeImage.js"))}catch(e){r.log&&r.log.warn("PictProviderTheme: template registration skipped: "+e.message)}return r}return _inherits(o,t),_createClass(o,[{key:"registerTheme",value:function(e){return e&&"object"===_typeof(e)?e.Hash&&"string"==typeof e.Hash?(this._themes[e.Hash]||this._themeOrder.push(e.Hash),this._themes[e.Hash]=e,!0):(this.log&&this.log.warn("PictProviderTheme.registerTheme: bundle missing required string Hash"),!1):(this.log&&this.log.warn("PictProviderTheme.registerTheme: bundle is not an object"),!1)}},{key:"listThemes",value:function(){for(var e=[],t=0;t<this._themeOrder.length;t++){var o=this._themeOrder[t],n=this._themes[o],i=n.Modes||{};e.push({Hash:n.Hash,Name:n.Name||n.Hash,Version:n.Version||null,Strategy:i.Strategy||"single",DefaultMode:i.Default||"light",Comprehensive:!1!==n.Comprehensive})}return e}},{key:"getTheme",value:function(e){return this._themes[e]||null}},{key:"applyTheme",value:function(e,t){var o=this._themes[e];if(!o)return this.log&&this.log.warn("PictProviderTheme.applyTheme: unknown theme hash [".concat(e,"]")),!1;var n=this._resolveBundle(o),i=n.Modes&&n.Modes.Strategy||"single",r=n.Modes&&n.Modes.Default||"light",a=t||r;"single"===i&&(a=r),this._activeHash=e,this._activeMode=a;var l=this._buildThemeCSS(n);return this._injectStyleElement(l),this._registerAuxiliaryCSS(n),this._applyMode(a,i),this._fireApplyListeners(n),!0}},{key:"setMode",value:function(e){if(!this._activeHash)return!1;var t=this._resolveBundle(this._themes[this._activeHash]),o=t.Modes&&t.Modes.Strategy||"single";return"single"!==o&&(this._activeMode=e,this._applyMode(e,o),this._fireApplyListeners(t),!0)}},{key:"onApply",value:function(e){if("function"!=typeof e)return function(){};this._applyListeners.push(e);var t=this;return function(){t.offApply(e)}}},{key:"offApply",value:function(e){var t=this._applyListeners.indexOf(e);t>=0&&this._applyListeners.splice(t,1)}},{key:"_fireApplyListeners",value:function(e){if(0!==this._applyListeners.length)for(var t={Hash:this._activeHash,Mode:this._activeMode,ResolvedMode:this._resolvedMode},o=0;o<this._applyListeners.length;o++)try{this._applyListeners[o](e,t)}catch(e){this.log&&this.log.warn("PictProviderTheme: onApply listener threw: "+e.message)}}},{key:"unapplyTheme",value:function(){if(this._detachSystemListener(),"undefined"!=typeof document){var e=document.getElementById(i);e&&e.parentNode&&e.parentNode.removeChild(e),document.documentElement&&document.documentElement.classList&&(document.documentElement.classList.remove(r),document.documentElement.classList.remove(a))}if(this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.removeCSS)for(var t=0;t<this._registeredCSSHashes.length;t++)this.pict.CSSMap.removeCSS(this._registeredCSSHashes[t]);return this._registeredCSSHashes=[],this._activeHash=null,this._activeMode=null,this._resolvedMode=null,!0}},{key:"getActiveTheme",value:function(){return{Hash:this._activeHash,Mode:this._activeMode,ResolvedMode:this._resolvedMode}}},{key:"token",value:function(e){if(!this._activeHash)return null;var t=this._resolveBundle(this._themes[this._activeHash]),o=this._walkPath(t,e);return this._resolveModedValue(o)}},{key:"cssVar",value:function(e){return"var("+this._cssVarName(e)+")"}},{key:"asset",value:function(e,t){if(!this._activeHash)return null;var o=this._resolveBundle(this._themes[this._activeHash])[e];return o?this._walkPath(o,t):null}},{key:"image",value:function(e){return this.asset("Image",e)}},{key:"svg",value:function(e){return this.asset("SVG",e)}},{key:"_resolveBundle",value:function(e){for(var t=[],o=e,n={};o&&!n[o.Hash];){n[o.Hash]=!0,t.unshift(o);var i=o.BasedOn;o=i?this._themes[i]:null}if(1===t.length)return t[0];for(var r={},a=0;a<t.length;a++)r=this._deepMerge(r,t[a]);return r}},{key:"_deepMerge",value:function(e,t){for(var o=Object.assign({},e),n=Object.keys(t),i=0;i<n.length;i++){var r=n[i],a=t[r];null===a||"object"!==_typeof(a)||Array.isArray(a)||null===o[r]||"object"!==_typeof(o[r])||Array.isArray(o[r])?o[r]=a:o[r]=this._deepMerge(o[r],a)}return o}},{key:"_walkPath",value:function(e,t){if(!e||!t)return null;for(var o=t.split("."),n=e,i=0;i<o.length;i++){if(null===n||"object"!==_typeof(n))return null;if(void 0===(n=n[o[i]]))return null}return n}},{key:"_resolveModedValue",value:function(e){return this._isPairedValue(e)?e["dark"===(this._resolvedMode||"light")?"Dark":"Light"]:e}},{key:"_isPairedValue",value:function(e){return null!==e&&"object"===_typeof(e)&&!Array.isArray(e)&&Object.keys(e).length>0&&Object.keys(e).every(function(e){return"Light"===e||"Dark"===e})}},{key:"_buildThemeCSS",value:function(e){var t=this,o=e.Tokens||{},n=this._flattenTokens(o,""),i=e.Modes&&e.Modes.Strategy||"single",r=n.some(function(e){return t._isPairedValue(e.Value)}),l=this._buildAliasLines(e.Aliases);if("single"===i||!r){for(var s=":root {\n",c=0;c<n.length;c++){var d=n[c],p=this._isPairedValue(d.Value)?d.Value.Light:d.Value;s+="\t"+this._cssVarName(d.Path)+": "+this._formatCSSValue(p)+";\n"}return s+=l,s+="}\n"}for(var h=":root {\n",u="."+a+" {\n",f=0;f<n.length;f++){var g=n[f],m=this._cssVarName(g.Path);this._isPairedValue(g.Value)?(void 0!==g.Value.Light&&(h+="\t"+m+": "+this._formatCSSValue(g.Value.Light)+";\n"),void 0!==g.Value.Dark&&(u+="\t"+m+": "+this._formatCSSValue(g.Value.Dark)+";\n")):h+="\t"+m+": "+this._formatCSSValue(g.Value)+";\n"}return h+=l,(h+="}\n")+(u+="}\n")}},{key:"_buildAliasLines",value:function(e){if(!e||"object"!==_typeof(e))return"";for(var t=Object.keys(e),o="",n=0;n<t.length;n++){var i=t[n],r=e[i];"string"==typeof r&&0!==r.length&&(o+="\t"+i+": var("+this._cssVarName(r)+");\n")}return o}},{key:"_flattenTokens",value:function(e,t){var o=[];if(null===e||"object"!==_typeof(e)||Array.isArray(e))return t&&o.push({Path:t,Value:e}),o;if(this._isPairedValue(e))return o.push({Path:t,Value:e}),o;for(var n=Object.keys(e),i=0;i<n.length;i++){var r=n[i],a=t?t+"."+r:r,l=e[r];o=o.concat(this._flattenTokens(l,a))}return o}},{key:"_cssVarName",value:function(e){return l+e.toLowerCase().replace(/\./g,"-")}},{key:"_formatCSSValue",value:function(e){return null==e?"":String(e)}},{key:"_injectStyleElement",value:function(e){if("undefined"!=typeof document){var t=document.getElementById(i);t||((t=document.createElement("style")).id=i,document.head.appendChild(t)),t.textContent=e}}},{key:"_registerAuxiliaryCSS",value:function(e){if(this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.removeCSS)for(var t=0;t<this._registeredCSSHashes.length;t++)this.pict.CSSMap.removeCSS(this._registeredCSSHashes[t]);if(this._registeredCSSHashes=[],Array.isArray(e.CSS)&&this.pict&&this.pict.CSSMap&&"function"==typeof this.pict.CSSMap.addCSS)for(var o=0;o<e.CSS.length;o++){var n=e.CSS[o];if(n&&n.Hash&&"string"==typeof n.Content){var i="number"==typeof n.Priority?n.Priority:500;this.pict.CSSMap.addCSS(n.Hash,n.Content,i),this._registeredCSSHashes.push(n.Hash)}}}},{key:"_applyMode",value:function(e,t){this._detachSystemListener();var o=e;"system"===e&&(o=this._readSystemPreference(),this._attachSystemListener(t)),this._resolvedMode="dark"===o?"dark":"light",this._writeHTMLClass(this._resolvedMode)}},{key:"_writeHTMLClass",value:function(e){if("undefined"!=typeof document&&document.documentElement&&document.documentElement.classList){var t=document.documentElement.classList;"dark"===e?(t.remove(r),t.add(a)):(t.remove(a),t.add(r))}}},{key:"_readSystemPreference",value:function(){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return"light"}}},{key:"_attachSystemListener",value:function(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{var t=this,o=window.matchMedia("(prefers-color-scheme: dark)"),n=function(){var e=o.matches?"dark":"light";t._resolvedMode=e,t._writeHTMLClass(e)};"function"==typeof o.addEventListener?o.addEventListener("change",n):"function"==typeof o.addListener&&o.addListener(n),this._systemMediaQuery=o,this._systemListener=n}catch(e){}}},{key:"_detachSystemListener",value:function(){if(this._systemMediaQuery&&this._systemListener){try{"function"==typeof this._systemMediaQuery.removeEventListener?this._systemMediaQuery.removeEventListener("change",this._systemListener):"function"==typeof this._systemMediaQuery.removeListener&&this._systemMediaQuery.removeListener(this._systemListener)}catch(e){}this._systemMediaQuery=null,this._systemListener=null}}}])}(n);s.default_configuration={ProviderIdentifier:"Theme",AutoInitialize:!0,AutoInitializeOrdinal:0},t.exports=s,t.exports.STYLE_ELEMENT_ID=i,t.exports.HTML_CLASS_LIGHT=r,t.exports.HTML_CLASS_DARK=a,t.exports.CSS_VAR_PREFIX=l},{"./templates/Pict-Template-Theme.js":10,"./templates/Pict-Template-ThemeAsset.js":11,"./templates/Pict-Template-ThemeImage.js":12,"./templates/Pict-Template-ThemeVar.js":13,"pict-provider":15}],10:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).addPattern("{~Theme:","~}"),i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e){var t=(e||"").trim();if(!t)return"";var o=this._findThemeProvider();if(!o)return"";var n=o.token(t);return null==n?"":String(n)}},{key:"_findThemeProvider",value:function(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}])}(e("pict-template"));t.exports=n},{"pict-template":135}],11:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).addPattern("{~ThemeAsset:","~}"),i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e){var t=(e||"").trim();if(!t)return"";var o=t.indexOf(".");if(o<0)return"";var n=t.substring(0,o),i=t.substring(o+1),r=this._findThemeProvider();if(!r)return"";var a=r.asset(n,i);return null==a?"":String(a)}},{key:"_findThemeProvider",value:function(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}])}(e("pict-template"));t.exports=n},{"pict-template":135}],12:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).addPattern("{~ThemeImage:","~}"),i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e){var t=(e||"").trim();if(!t)return"";var o=this._findThemeProvider();if(!o)return"";var n=o.image(t);return null==n?"":String(n)}},{key:"_findThemeProvider",value:function(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}])}(e("pict-template"));t.exports=n},{"pict-template":135}],13:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).addPattern("{~ThemeVar:","~}"),i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e){var t=(e||"").trim();if(!t)return"";var o=this._findThemeProvider();return o?o.cssVar(t):""}},{key:"_findThemeProvider",value:function(){return this.pict&&this.pict.providers&&this.pict.providers.Theme||null}}])}(e("pict-template"));t.exports=n},{"pict-template":135}],14:[function(e,t,o){t.exports={name:"pict-provider",version:"1.0.13",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/fable-retold/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/fable-retold/pict-provider/issues"},homepage:"https://github.com/fable-retold/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351","pict-docuserve":"^0.1.5",quackage:"^1.1.0",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],15:[function(e,t,o){var n=e("fable-serviceproviderbase"),i=e("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(e){function t(e,o,n){var a;_classCallCheck(this,t),(a=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(r)),o),n])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=i,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var l=0;l<a.options.Templates.length;l++){var s=a.options.Templates[l];s.hasOwnProperty("Postfix")&&s.hasOwnProperty("Template")?(s.Source||(s.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(s.Prefix,s.Postfix,s.Template,s.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(l," in the options array."),s)}return a}return _inherits(t,e),_createClass(t,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(e){return this.onBeforeInitialize(),e()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(e){return this.onInitialize(),e()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(e){var t=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),e();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return t.initializeTimestamp=t.pict.log.getTimeStamp(),o?t.log.error("PictProvider [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ProviderIdentifier," initialization failed: ").concat(o.message||o),{Stack:o.stack}):t.pict.LogNoisiness>0&&t.log.info("PictProvider [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ProviderIdentifier," initialization complete.")),e()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(e){return this.onAfterInitialize(),e()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(e){return this.onPreRender(),e()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(e){return this.onPreRender(),e()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(e){return this.onPreSolve(),e()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(e){return this.onPreSolve(),e()}},{key:"onBeforeLoadDataAsync",value:function(e){return e()}},{key:"onLoadDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),e()}},{key:"onAfterLoadDataAsync",value:function(e){return e()}},{key:"onBeforeSaveDataAsync",value:function(e){return e()}},{key:"onSaveDataAsync",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),e()}},{key:"onAfterSaveDataAsync",value:function(e){return e()}}])}(n);t.exports=a},{"../package.json":14,"fable-serviceproviderbase":6}],16:[function(e,t,o){t.exports=e("./views/PictView-Flow.js"),t.exports.PictViewFlowNode=e("./views/PictView-Flow-Node.js"),t.exports.PictViewFlowToolbar=e("./views/PictView-Flow-Toolbar.js"),t.exports.PictViewFlowFloatingToolbar=e("./views/PictView-Flow-FloatingToolbar.js"),t.exports.PictServiceFlowInteractionManager=e("./services/PictService-Flow-InteractionManager.js"),t.exports.PictServiceFlowConnectionRenderer=e("./services/PictService-Flow-ConnectionRenderer.js"),t.exports.PictServiceFlowTether=e("./services/PictService-Flow-Tether.js"),t.exports.PictServiceFlowLayout=e("./services/PictService-Flow-Layout.js"),t.exports.PictServiceFlowPathGenerator=e("./services/PictService-Flow-PathGenerator.js"),t.exports.PictServiceFlowViewportManager=e("./services/PictService-Flow-ViewportManager.js"),t.exports.PictServiceFlowSelectionManager=e("./services/PictService-Flow-SelectionManager.js"),t.exports.PictServiceFlowPanelManager=e("./services/PictService-Flow-PanelManager.js"),t.exports.PictServiceFlowDataManager=e("./services/PictService-Flow-DataManager.js"),t.exports.PictServiceFlowConnectionHandleManager=e("./services/PictService-Flow-ConnectionHandleManager.js"),t.exports.PictServiceFlowRenderManager=e("./services/PictService-Flow-RenderManager.js"),t.exports.PictServiceFlowPortRenderer=e("./services/PictService-Flow-PortRenderer.js"),t.exports.PictProviderFlowNodeTypes=e("./providers/PictProvider-Flow-NodeTypes.js"),t.exports.PictProviderFlowEventHandler=e("./providers/PictProvider-Flow-EventHandler.js"),t.exports.PictProviderFlowLayouts=e("./providers/PictProvider-Flow-Layouts.js"),t.exports.PictProviderFlowSVGHelpers=e("./providers/PictProvider-Flow-SVGHelpers.js"),t.exports.PictProviderFlowGeometry=e("./providers/PictProvider-Flow-Geometry.js"),t.exports.PictProviderFlowPanelChrome=e("./providers/PictProvider-Flow-PanelChrome.js"),t.exports.PictProviderFlowCSS=e("./providers/PictProvider-Flow-CSS.js"),t.exports.PictProviderFlowIcons=e("./providers/PictProvider-Flow-Icons.js"),t.exports.PictProviderFlowConnectorShapes=e("./providers/PictProvider-Flow-ConnectorShapes.js"),t.exports.LayoutAlgorithms={Custom:e("./providers/layouts/Layout-Custom.js"),Layered:e("./providers/layouts/Layout-Layered.js"),ForcedFromCenter:e("./providers/layouts/Layout-ForcedFromCenter.js"),Grid:e("./providers/layouts/Layout-Grid.js"),Circular:e("./providers/layouts/Layout-Circular.js"),Tabular:e("./providers/layouts/Layout-Tabular.js"),Columnar:e("./providers/layouts/Layout-Columnar.js")},t.exports.EdgeThemes={Bezier:e("./providers/edges/Edge-Bezier.js"),Orthogonal:e("./providers/edges/Edge-Orthogonal.js"),Straight:e("./providers/edges/Edge-Straight.js"),OrthogonalSnap:e("./providers/edges/Edge-OrthogonalSnap.js"),Perimeter:e("./providers/edges/Edge-Perimeter.js"),PerimeterLinear:e("./providers/edges/Edge-Perimeter-Linear.js"),PerimeterOrthogonal:e("./providers/edges/Edge-Perimeter-Orthogonal.js")},t.exports.PictFlowCard=e("./PictFlowCard.js"),t.exports.PictFlowCardPropertiesPanel=e("./PictFlowCardPropertiesPanel.js"),t.exports.FlowCardPropertiesPanelTemplate=e("./panels/FlowCardPropertiesPanel-Template.js"),t.exports.FlowCardPropertiesPanelMarkdown=e("./panels/FlowCardPropertiesPanel-Markdown.js"),t.exports.FlowCardPropertiesPanelForm=e("./panels/FlowCardPropertiesPanel-Form.js"),t.exports.FlowCardPropertiesPanelView=e("./panels/FlowCardPropertiesPanel-View.js"),t.exports.PictViewFlowPropertiesPanel=e("./views/PictView-Flow-PropertiesPanel.js")},{"./PictFlowCard.js":17,"./PictFlowCardPropertiesPanel.js":18,"./panels/FlowCardPropertiesPanel-Form.js":19,"./panels/FlowCardPropertiesPanel-Markdown.js":20,"./panels/FlowCardPropertiesPanel-Template.js":21,"./panels/FlowCardPropertiesPanel-View.js":22,"./providers/PictProvider-Flow-CSS.js":23,"./providers/PictProvider-Flow-ConnectorShapes.js":24,"./providers/PictProvider-Flow-EventHandler.js":25,"./providers/PictProvider-Flow-Geometry.js":26,"./providers/PictProvider-Flow-Icons.js":27,"./providers/PictProvider-Flow-Layouts.js":28,"./providers/PictProvider-Flow-NodeTypes.js":29,"./providers/PictProvider-Flow-PanelChrome.js":31,"./providers/PictProvider-Flow-SVGHelpers.js":32,"./providers/edges/Edge-Bezier.js":34,"./providers/edges/Edge-Orthogonal.js":35,"./providers/edges/Edge-OrthogonalSnap.js":36,"./providers/edges/Edge-Perimeter-Linear.js":37,"./providers/edges/Edge-Perimeter-Orthogonal.js":38,"./providers/edges/Edge-Perimeter.js":39,"./providers/edges/Edge-Straight.js":41,"./providers/layouts/Layout-Circular.js":42,"./providers/layouts/Layout-Columnar.js":44,"./providers/layouts/Layout-Custom.js":45,"./providers/layouts/Layout-ForcedFromCenter.js":46,"./providers/layouts/Layout-Grid.js":47,"./providers/layouts/Layout-Layered.js":48,"./providers/layouts/Layout-Tabular.js":49,"./services/PictService-Flow-ConnectionHandleManager.js":50,"./services/PictService-Flow-ConnectionRenderer.js":51,"./services/PictService-Flow-DataManager.js":52,"./services/PictService-Flow-InteractionManager.js":53,"./services/PictService-Flow-Layout.js":54,"./services/PictService-Flow-PanelManager.js":55,"./services/PictService-Flow-PathGenerator.js":56,"./services/PictService-Flow-PortRenderer.js":57,"./services/PictService-Flow-RenderManager.js":58,"./services/PictService-Flow-SelectionManager.js":59,"./services/PictService-Flow-Tether.js":60,"./services/PictService-Flow-ViewportManager.js":61,"./views/PictView-Flow-FloatingToolbar.js":62,"./views/PictView-Flow-Node.js":63,"./views/PictView-Flow-PropertiesPanel.js":64,"./views/PictView-Flow-Toolbar.js":65,"./views/PictView-Flow.js":66}],17:[function(e,t,o){var n=function(e){function t(e,o,n){var i;_classCallCheck(this,t);var r=Object.assign({},t.default_configuration,o);return(i=_callSuper(this,t,[e,r,n])).serviceType="PictFlowCard",i.cardTitle=r.Title?r.Title:"Card",i.cardName=!!r.Name&&r.Name,i.cardCode=r.Code?r.Code:"",i.cardDescription=!!r.Description&&r.Description,i.cardIcon=!!r.Icon&&r.Icon,i.cardPreviewImage=!!r.PreviewImage&&r.PreviewImage,i.cardDocumentation=!!r.Documentation&&r.Documentation,i.cardTooltip=!!r.Tooltip&&r.Tooltip,i.cardHelp=!!r.Help&&r.Help,i.cardEnabled="boolean"!=typeof r.Enabled||r.Enabled,i.cardTitleBarColor=r.TitleBarColor?r.TitleBarColor:"#2c3e50",i.cardBodyStyle=r.BodyStyle?r.BodyStyle:{},i.cardWidth="number"==typeof r.Width?r.Width:180,i.cardHeight="number"==typeof r.Height?r.Height:80,i.cardCategory=r.Category?r.Category:"General",i.cardInputs=Array.isArray(r.Inputs)?r.Inputs:[],i.cardOutputs=Array.isArray(r.Outputs)?r.Outputs:[],i.cardPropertiesPanel=r.PropertiesPanel&&"object"===_typeof(r.PropertiesPanel)?r.PropertiesPanel:null,i.cardBodyContent=r.BodyContent&&"object"===_typeof(r.BodyContent)?r.BodyContent:null,i.cardShowTypeLabel="boolean"!=typeof r.ShowTypeLabel||r.ShowTypeLabel,i.cardPortLabelsOnHover="boolean"==typeof r.PortLabelsOnHover&&r.PortLabelsOnHover,i.cardPortLabelsVertical="boolean"==typeof r.PortLabelsVertical&&r.PortLabelsVertical,i.cardPortLabelPadding="boolean"==typeof r.PortLabelPadding&&r.PortLabelPadding,i.cardPortLabelsOutside="boolean"==typeof r.PortLabelsOutside&&r.PortLabelsOutside,i.cardLabelsInFront="boolean"!=typeof r.LabelsInFront||r.LabelsInFront,i}return _inherits(t,e),_createClass(t,[{key:"getNodeTypeConfiguration",value:function(){for(var e=[],t=0;t<this.cardInputs.length;t++){var o=this.cardInputs[t],n={Hash:null,Direction:"input",Side:o.Side||"left",Label:o.Name||"In ".concat(t+1),MinimumInputCount:"number"==typeof o.MinimumInputCount?o.MinimumInputCount:0,MaximumInputCount:"number"==typeof o.MaximumInputCount?o.MaximumInputCount:-1};o.PortType&&(n.PortType=o.PortType),o.DataType&&(n.DataType=o.DataType),e.push(n)}for(var i=0;i<this.cardOutputs.length;i++){var r=this.cardOutputs[i],a={Hash:null,Direction:"output",Side:r.Side||"right",Label:r.Name||"Out ".concat(i+1)};r.PortType&&(a.PortType=r.PortType),r.DataType&&(a.DataType=r.DataType),e.push(a)}0===e.length&&(e.push({Hash:null,Direction:"input",Side:"left",Label:"In"}),e.push({Hash:null,Direction:"output",Side:"right",Label:"Out"}));var l={Hash:this.cardCode,Label:this.cardTitle,DefaultWidth:this.cardWidth,DefaultHeight:this.cardHeight,DefaultPorts:e,TitleBarColor:this.cardTitleBarColor,BodyStyle:JSON.parse(JSON.stringify(this.cardBodyStyle)),CardMetadata:{Name:this.cardName,Code:this.cardCode,Description:this.cardDescription,Icon:this.cardIcon,PreviewImage:this.cardPreviewImage,Documentation:this.cardDocumentation,Tooltip:this.cardTooltip,Enabled:this.cardEnabled,Category:this.cardCategory,Help:this.cardHelp}};return l.ShowTypeLabel=this.cardShowTypeLabel,l.PortLabelsOnHover=this.cardPortLabelsOnHover,l.PortLabelsVertical=this.cardPortLabelsVertical,l.PortLabelPadding=this.cardPortLabelPadding,l.PortLabelsOutside=this.cardPortLabelsOutside,l.LabelsInFront=this.cardLabelsInFront,this.cardPropertiesPanel&&(l.PropertiesPanel=JSON.parse(JSON.stringify(this.cardPropertiesPanel))),this.cardBodyContent&&(l.BodyContent=JSON.parse(JSON.stringify(this.cardBodyContent)),"function"==typeof this.options.BodyContent.RenderCallback&&(l.BodyContent.RenderCallback=this.options.BodyContent.RenderCallback)),l}},{key:"registerWithFlowView",value:function(e){if(!e||!e._NodeTypeProvider)return this.log.warn("PictFlowCard registerWithFlowView: no valid FlowView or NodeTypeProvider"),!1;var t=this.getNodeTypeConfiguration();return e._NodeTypeProvider.registerNodeType(t)}}])}(e("fable-serviceproviderbase"));t.exports=n,t.exports.default_configuration={Title:"Card",Name:!1,Code:"",Description:!1,Icon:!1,PreviewImage:!1,Documentation:!1,Tooltip:!1,Inputs:[],Outputs:[],Enabled:!0,TitleBarColor:"#2c3e50",BodyStyle:{},Width:180,Height:80,Category:"General",PropertiesPanel:null,BodyContent:null,ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsVertical:!1,PortLabelPadding:!1,PortLabelsOutside:!1,LabelsInFront:!0}},{"fable-serviceproviderbase":6}],18:[function(e,t,o){var n=function(e){function t(e,o,n){var i;_classCallCheck(this,t);var r=Object.assign({},t.default_configuration,o);return(i=_callSuper(this,t,[e,r,n])).serviceType="PictFlowCardPropertiesPanel",i.panelType=r.PanelType||"Base",i.panelTitle=r.Title||"Properties",i.panelWidth="number"==typeof r.Width?r.Width:300,i.panelHeight="number"==typeof r.Height?r.Height:200,i._FlowView=null,i._NodeData=null,i._ContentContainer=null,i._Configuration=r.Configuration||{},i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,t){this._ContentContainer=e,this._NodeData=t}},{key:"marshalToPanel",value:function(e){this._NodeData=e}},{key:"marshalFromPanel",value:function(e){}},{key:"destroy",value:function(){this._ContentContainer=null,this._NodeData=null}}])}(e("fable-serviceproviderbase"));t.exports=n,t.exports.default_configuration={PanelType:"Base",Title:"Properties",Width:300,Height:200,Configuration:{}}},{"fable-serviceproviderbase":6}],19:[function(e,t,o){var n=e("../PictFlowCardPropertiesPanel.js"),i=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictFlowCardPropertiesPanel-Form",i._Metacontroller=null,i._InjectedSectionHash=null,i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,o){if(_superPropGet(t,"render",this,3)([e,o]),this._Configuration&&this._Configuration.Manifest){var n="pict-flow-panel-form-".concat(o.Hash);e.innerHTML='<div id="'.concat(n,'"></div>'),this.fable.AppData.Record=o;try{if(!this._Metacontroller){var i=null;this.fable.servicesMap.hasOwnProperty("PictFormMetacontroller")?i="PictFormMetacontroller":this.fable.servicesMap.hasOwnProperty("PictViewFormMetacontroller")&&(i="PictViewFormMetacontroller"),i&&(this._Metacontroller=this.fable.instantiateServiceProviderWithoutRegistration(i,{ViewIdentifier:"FlowPanelForm-".concat(o.Hash),DefaultDestinationAddress:"#".concat(n),AutoRender:!1,AutoPopulateAfterRender:!0,AutoSolveBeforeRender:!1}))}if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifestAndRender){var r="Pict-".concat(this._Metacontroller.UUID,"-FormContainer"),a=e.querySelector("#".concat(n));a&&(a.innerHTML='<div id="'.concat(r,'" class="pict-form"></div>'));var l=JSON.parse(JSON.stringify(this._Configuration.Manifest));this._InjectedSectionHash=l.Hash||null,this._Metacontroller.injectManifestAndRender(l)}else if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifest){var s=JSON.parse(JSON.stringify(this._Configuration.Manifest)),c=this._Metacontroller.injectManifest(s);this._InjectedSectionHash=s.Hash||null;var d=e.querySelector("#".concat(n));if(d&&c.length>0){for(var p="",h=0;h<c.length;h++){var u=c[h].options.DefaultDestinationAddress;u&&"#"===u.charAt(0)&&(u=u.substring(1)),p+='<div id="'.concat(u,'" class="pict-form-view"></div>')}d.innerHTML=p;for(var f=0;f<c.length;f++)c[f].render()}}else e.innerHTML="<em>pict-section-form is not available. Install it in your application to use Form panels.</em>"}catch(t){this.log.warn("FlowCardPropertiesPanel-Form render error: ".concat(t.message)),e.innerHTML="<em>Form render error: ".concat(t.message,"</em>")}}else e.innerHTML="<em>No form manifest configured</em>"}},{key:"marshalFromPanel",value:function(e){this._Metacontroller&&"function"==typeof this._Metacontroller.marshalFromView&&this._Metacontroller.marshalFromView()}},{key:"destroy",value:function(){this._Metacontroller=null,this._InjectedSectionHash=null,_superPropGet(t,"destroy",this,3)([])}}])}(n);t.exports=i,t.exports.default_configuration=Object.assign({},n.default_configuration,{PanelType:"Form",Configuration:{Manifest:null}})},{"../PictFlowCardPropertiesPanel.js":18}],20:[function(e,t,o){var n=e("../PictFlowCardPropertiesPanel.js"),i=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictFlowCardPropertiesPanel-Markdown",i._ContentProvider=null,i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,o){_superPropGet(t,"render",this,3)([e,o]),this._renderMarkdown()}},{key:"marshalToPanel",value:function(e){_superPropGet(t,"marshalToPanel",this,3)([e]),this._renderMarkdown()}},{key:"_renderMarkdown",value:function(){if(this._ContentContainer&&this._Configuration){var e="";if(this._Configuration.MarkdownAddress&&this._NodeData?e=this.fable.manifest.getValueByHash(this._NodeData,this._Configuration.MarkdownAddress)||"":this._Configuration.Markdown&&(e=this._Configuration.Markdown),e)try{if(this._ContentProvider||this.fable.servicesMap.hasOwnProperty("PictContentProvider")&&(this._ContentProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictContentProvider",{})),this._ContentProvider&&"function"==typeof this._ContentProvider.parseMarkdown){var t=this._ContentProvider.parseMarkdown(e);this._ContentContainer.innerHTML=t,"function"==typeof this._ContentProvider.renderKaTeXEquations&&this._ContentProvider.renderKaTeXEquations(this._ContentContainer),"function"==typeof this._ContentProvider.renderMermaidDiagrams&&this._ContentProvider.renderMermaidDiagrams(this._ContentContainer)}else this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(e),"</pre>")}catch(t){this.log.warn("FlowCardPropertiesPanel-Markdown render error: ".concat(t.message)),this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(e),"</pre>")}else this._ContentContainer.innerHTML="<em>No content</em>"}}},{key:"_escapeHTML",value:function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML}},{key:"destroy",value:function(){this._ContentProvider=null,_superPropGet(t,"destroy",this,3)([])}}])}(n);t.exports=i,t.exports.default_configuration=Object.assign({},n.default_configuration,{PanelType:"Markdown",Configuration:{Markdown:"",MarkdownAddress:""}})},{"../PictFlowCardPropertiesPanel.js":18}],21:[function(e,t,o){var n=e("../PictFlowCardPropertiesPanel.js"),i=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictFlowCardPropertiesPanel-Template",i._TemplatesRegistered=!1,i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,o){if(_superPropGet(t,"render",this,3)([e,o]),this._Configuration&&this._Configuration.Templates){if(!this._TemplatesRegistered){for(var n=this._Configuration.Templates,i=0;i<n.length;i++)n[i].Hash&&n[i].Template&&this.fable.TemplateProvider.addTemplate(n[i].Hash,n[i].Template);this._TemplatesRegistered=!0}this._renderTemplate()}}},{key:"marshalToPanel",value:function(e){_superPropGet(t,"marshalToPanel",this,3)([e]),this._renderTemplate()}},{key:"_renderTemplate",value:function(){if(this._ContentContainer&&this._NodeData){var e=this._Configuration.TemplateHash;if(e){var t=this._NodeData,o=this.fable.parseTemplateByHash(e,t,null,[t]);this._ContentContainer.innerHTML=o}}}}])}(n);t.exports=i,t.exports.default_configuration=Object.assign({},n.default_configuration,{PanelType:"Template",Configuration:{Templates:[],TemplateHash:""}})},{"../PictFlowCardPropertiesPanel.js":18}],22:[function(e,t,o){var n=e("../PictFlowCardPropertiesPanel.js"),i=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictFlowCardPropertiesPanel-View",i._OriginalDestination=null,i._ViewInstance=null,i}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,o){if(_superPropGet(t,"render",this,3)([e,o]),this._Configuration&&this._Configuration.ViewHash){var n=this._Configuration.ViewHash,i="pict-flow-panel-view-".concat(o.Hash);e.innerHTML='<div id="'.concat(i,'"></div>');try{var r=this.pict||this.fable;r.views&&r.views[n]?(this._ViewInstance=r.views[n],this._OriginalDestination=this._ViewInstance.options.DefaultDestinationAddress,this._ViewInstance.options.DefaultDestinationAddress="#".concat(i),"function"==typeof this._ViewInstance.render&&this._ViewInstance.render()):e.innerHTML='<em>View "'.concat(n,'" not found</em>')}catch(t){this.log.warn("FlowCardPropertiesPanel-View render error: ".concat(t.message)),e.innerHTML="<em>View render error: ".concat(t.message,"</em>")}}else e.innerHTML="<em>No ViewHash configured</em>"}},{key:"marshalFromPanel",value:function(e){this._ViewInstance&&"function"==typeof this._ViewInstance.marshalFromView&&this._ViewInstance.marshalFromView()}},{key:"destroy",value:function(){this._ViewInstance&&this._OriginalDestination&&(this._ViewInstance.options.DefaultDestinationAddress=this._OriginalDestination),this._ViewInstance=null,this._OriginalDestination=null,_superPropGet(t,"destroy",this,3)([])}}])}(n);t.exports=i,t.exports.default_configuration=Object.assign({},n.default_configuration,{PanelType:"View",Configuration:{ViewHash:""}})},{"../PictFlowCardPropertiesPanel.js":18}],23:[function(e,t,o){var n=e("fable-serviceproviderbase"),i={ProviderIdentifier:"PictProviderFlowCSS"},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},i,o),n])).serviceType="PictProviderFlowCSS",r._FlowView=o&&o.FlowView?o.FlowView:null,r}return _inherits(t,e),_createClass(t,[{key:"getContainerCSS",value:function(){return'\n\t\t.pict-flow-container {\n\t\t\t/* ── Design Tokens ─────────────────────────────────────\n\t\t\t Override these custom properties to theme the flow diagram.\n\t\t\t Node-type classes (.pict-flow-node-{type}) can scope-override\n\t\t\t any variable for per-type variation.\n\n\t\t\t Defaults reference the host application\'s pict-provider-theme\n\t\t\t tokens (--theme-color-*) when available, with hardcoded\n\t\t\t fallbacks so the editor still looks reasonable in unthemed\n\t\t\t contexts. Internal flow themes (sketch, blueprint, etc.) keep\n\t\t\t layering on top via .pict-flow-container scoped overrides. */\n\n\t\t\t/* Text */\n\t\t\t--pf-text-primary: var(--theme-color-text-primary, #2c3e50);\n\t\t\t--pf-text-heading: var(--theme-color-text-primary, #1a252f);\n\t\t\t--pf-text-secondary: var(--theme-color-text-secondary, #7f8c8d);\n\t\t\t--pf-text-tertiary: var(--theme-color-text-muted, #8e99a4);\n\t\t\t--pf-text-placeholder: var(--theme-color-text-placeholder, #95a5a6);\n\n\t\t\t/* Node */\n\t\t\t--pf-node-body-fill: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-node-body-stroke: var(--theme-color-border-default, #d0d4d8);\n\t\t\t--pf-node-body-stroke-hover: var(--theme-color-border-strong, #b0b8c0);\n\t\t\t--pf-node-body-stroke-width: 1;\n\t\t\t--pf-node-body-radius: 8px;\n\t\t\t--pf-node-shadow: drop-shadow(0 1px 3px var(--theme-color-shadow-color, rgba(0, 0, 0, 0.10)));\n\t\t\t--pf-node-shadow-hover: drop-shadow(0 2px 6px var(--theme-color-shadow-color, rgba(0, 0, 0, 0.15)));\n\t\t\t--pf-node-shadow-selected: drop-shadow(0 2px 8px rgba(52, 152, 219, 0.25));\n\t\t\t--pf-node-shadow-dragging: drop-shadow(0 4px 12px var(--theme-color-shadow-color, rgba(0, 0, 0, 0.20)));\n\t\t\t--pf-node-title-fill: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-node-title-size: 11.5px;\n\t\t\t--pf-node-title-weight: 600;\n\t\t\t--pf-node-title-bar-color: var(--theme-color-text-primary, #2c3e50);\n\t\t\t--pf-node-type-label-fill: var(--theme-color-text-muted, #a0a8b0);\n\t\t\t--pf-node-selected-stroke: var(--theme-color-brand-primary, #3498db);\n\n\t\t\t/* Node Variants */\n\t\t\t--pf-node-start-fill: #eafaf1;\n\t\t\t--pf-node-start-stroke: var(--theme-color-status-success, #27ae60);\n\t\t\t--pf-node-end-fill: #e8f8f5;\n\t\t\t--pf-node-end-stroke: #1abc9c;\n\t\t\t--pf-node-halt-fill: #fdedec;\n\t\t\t--pf-node-halt-stroke: var(--theme-color-status-error, #e74c3c);\n\t\t\t--pf-node-decision-fill: #fff9e6;\n\t\t\t--pf-node-decision-stroke: var(--theme-color-status-warning, #f39c12);\n\n\t\t\t/* ── Color roles ───────────────────────────────────────\n\t\t\t Generic, theme-aware semantic colors that node types and\n\t\t\t individual cards opt into via a ColorRole field. The\n\t\t\t "-soft" variant is the tinted background; the bare role is\n\t\t\t the title-bar / outline / accent stroke.\n\n\t\t\t Hosts can override any of these tokens at .pict-flow-container\n\t\t\t scope (or at their own scope) without touching JS. Built-in\n\t\t\t node types resolve their visuals through these tokens, so\n\t\t\t theming a role automatically retints every card that uses it.\n\n\t\t\t Soft tints use color-mix() — supported in Chrome 111+,\n\t\t\t Safari 16.2+, Firefox 113+. The hardcoded fallbacks keep the\n\t\t\t editor presentable on older engines. */\n\t\t\t--pf-color-success: var(--theme-color-status-success, #27ae60);\n\t\t\t--pf-color-success-soft: color-mix(in srgb, var(--pf-color-success) 12%, transparent);\n\t\t\t--pf-color-warning: var(--theme-color-status-warning, #f39c12);\n\t\t\t--pf-color-warning-soft: color-mix(in srgb, var(--pf-color-warning) 14%, transparent);\n\t\t\t--pf-color-error: var(--theme-color-status-error, #e74c3c);\n\t\t\t--pf-color-error-soft: color-mix(in srgb, var(--pf-color-error) 12%, transparent);\n\t\t\t--pf-color-info: var(--theme-color-status-info, #3498db);\n\t\t\t--pf-color-info-soft: color-mix(in srgb, var(--pf-color-info) 12%, transparent);\n\t\t\t--pf-color-accent: var(--theme-color-brand-accent, #1abc9c);\n\t\t\t--pf-color-accent-soft: color-mix(in srgb, var(--pf-color-accent) 14%, transparent);\n\t\t\t--pf-color-neutral: var(--theme-color-text-primary, #2c3e50);\n\t\t\t--pf-color-neutral-soft: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-color-neutral-onfill: var(--theme-color-background-panel, #ffffff);\n\n\t\t\t/* Ports */\n\t\t\t--pf-port-input-fill: var(--theme-color-status-info, #3498db);\n\t\t\t--pf-port-output-fill: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-port-stroke: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-port-stroke-width: 2;\n\t\t\t--pf-port-label-bg: rgba(255, 253, 240, 0.5);\n\t\t\t--pf-port-label-text: var(--theme-color-text-primary, #2c3e50);\n\n\t\t\t/* Port Type Colors */\n\t\t\t--pf-port-event-in-fill: var(--theme-color-status-info, #3498db);\n\t\t\t--pf-port-event-out-fill: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-port-setting-fill: #e67e22;\n\t\t\t--pf-port-value-fill: #f1c40f;\n\t\t\t--pf-port-error-fill: var(--theme-color-status-error, #e74c3c);\n\n\t\t\t/* Connection Type Colors (match source port) */\n\t\t\t--pf-connection-event-in-stroke: var(--theme-color-status-info, #3498db);\n\t\t\t--pf-connection-event-out-stroke: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-connection-setting-stroke: #e67e22;\n\t\t\t--pf-connection-value-stroke: #f1c40f;\n\t\t\t--pf-connection-error-stroke: var(--theme-color-status-error, #e74c3c);\n\n\t\t\t/* Connections */\n\t\t\t--pf-connection-stroke: var(--theme-color-border-strong, #95a5a6);\n\t\t\t--pf-connection-stroke-hover: var(--theme-color-text-secondary, #7f8c8d);\n\t\t\t--pf-connection-selected-stroke: var(--theme-color-brand-primary, #3498db);\n\n\t\t\t/* Panels */\n\t\t\t--pf-panel-bg: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-panel-border: var(--theme-color-border-default, #d0d4d8);\n\t\t\t--pf-panel-radius: 8px;\n\t\t\t--pf-panel-shadow: 0 4px 12px var(--theme-color-shadow-color, rgba(0, 0, 0, 0.10)), 0 1px 3px var(--theme-color-shadow-color, rgba(0, 0, 0, 0.06));\n\t\t\t--pf-panel-titlebar-bg: var(--theme-color-background-secondary, #f7f8fa);\n\t\t\t--pf-panel-titlebar-border: var(--theme-color-border-light, #e8eaed);\n\t\t\t--pf-panel-title-color: var(--theme-color-text-primary, #2c3e50);\n\n\t\t\t/* Tabs */\n\t\t\t--pf-tab-text: var(--theme-color-text-muted, #8e99a4);\n\t\t\t--pf-tab-text-hover: var(--theme-color-text-secondary, #5a6a7a);\n\t\t\t--pf-tab-active-border: var(--pf-node-selected-stroke);\n\t\t\t--pf-resize-handle-hover: var(--theme-color-border-light, #e0e3e6);\n\n\t\t\t/* Forms & Inputs */\n\t\t\t--pf-input-border: var(--theme-color-border-default, #d5d8dc);\n\t\t\t--pf-input-border-focus: var(--theme-color-focus-outline, #3498db);\n\t\t\t--pf-divider-light: var(--theme-color-border-light, #ecf0f1);\n\t\t\t--pf-divider-medium: var(--theme-color-border-light, #e8eaed);\n\n\t\t\t/* Buttons */\n\t\t\t--pf-button-border: var(--theme-color-border-default, #bdc3c7);\n\t\t\t--pf-button-hover-border: var(--theme-color-border-strong, #95a5a6);\n\t\t\t--pf-button-hover-bg: var(--theme-color-background-hover, #ecf0f1);\n\t\t\t--pf-button-active-bg: var(--theme-color-background-selected, #d5dbdb);\n\t\t\t--pf-button-danger-text: var(--theme-color-status-error, #e74c3c);\n\t\t\t--pf-button-danger-hover-bg: #fdedec;\n\t\t\t--pf-button-close-color: var(--theme-color-text-muted, #b0b8c0);\n\n\t\t\t/* Badges */\n\t\t\t--pf-badge-category-bg: var(--theme-color-background-tertiary, #f0f2f4);\n\t\t\t--pf-badge-category-text: var(--theme-color-text-secondary, #6b7b8d);\n\t\t\t--pf-badge-code-bg: #eaf2f8;\n\t\t\t--pf-badge-code-text: #2980b9;\n\n\t\t\t/* Info Panel */\n\t\t\t--pf-port-item-bg: var(--theme-color-background-secondary, #f8f9fa);\n\n\t\t\t/* Toolbar */\n\t\t\t--pf-toolbar-bg: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-toolbar-border: var(--theme-color-border-default, #e0e0e0);\n\n\t\t\t/* Palette Cards */\n\t\t\t--pf-card-border: var(--theme-color-border-default, #d5d8dc);\n\t\t\t--pf-card-hover-bg: var(--theme-color-background-hover, #eaf2f8);\n\t\t\t--pf-card-hover-shadow: 0 1px 3px rgba(52, 152, 219, 0.15);\n\n\t\t\t/* Canvas */\n\t\t\t--pf-canvas-bg: var(--theme-color-background-secondary, #fafafa);\n\t\t\t--pf-grid-stroke: var(--theme-color-border-light, #e8e8e8);\n\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tmin-height: 400px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-color: var(--pf-canvas-bg);\n\t\t\tborder: 1px solid var(--pf-toolbar-border);\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.pict-flow-svg-container {\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-svg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-svg.panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-svg.connecting {\n\t\t\tcursor: crosshair;\n\t\t}\n\t\t.pict-flow-grid-pattern line {\n\t\t\tstroke: var(--pf-grid-stroke);\n\t\t\tstroke-width: 0.5;\n\t\t}\n\t\t'}},{key:"getNodeCSS",value:function(){return'\n\t\t.pict-flow-node {\n\t\t\tcursor: pointer;\n\t\t\tfilter: var(--pf-node-shadow);\n\t\t\ttransition: filter 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover {\n\t\t\tfilter: var(--pf-node-shadow-hover);\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node.selected {\n\t\t\tfilter: var(--pf-node-shadow-selected);\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node.dragging {\n\t\t\topacity: 0.9;\n\t\t\tcursor: grabbing;\n\t\t\tfilter: var(--pf-node-shadow-dragging);\n\t\t}\n\t\t.pict-flow-node-body {\n\t\t\tfill: var(--pf-node-body-fill);\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: var(--pf-node-body-stroke-width);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t\ttransition: stroke 0.2s, stroke-width 0.2s;\n\t\t}\n\t\t.pict-flow-node-title-bar {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t}\n\t\t.pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t}\n\t\t.pict-flow-node-title {\n\t\t\tfill: var(--pf-node-title-fill);\n\t\t\tfont-size: var(--pf-node-title-size);\n\t\t\tfont-weight: var(--pf-node-title-weight);\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tletter-spacing: 0.2px;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-type-label {\n\t\t\tfill: var(--pf-node-type-label-fill);\n\t\t\tfont-size: 9.5px;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.3px;\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-type-label {\n\t\t\topacity: 1;\n\t\t}\n\t\t.pict-flow-node-card-code {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-card-code {\n\t\t\topacity: 1;\n\t\t}\n\t\t/* Title-bar icon: invert SVG paths to white for dark title bars */\n\t\t.pict-flow-node-title-icon {\n\t\t\tfilter: brightness(0) invert(1);\n\t\t}\n\t\t'}},{key:"getBodyContentCSS",value:function(){return'\n\t\t.pict-flow-node-body-content {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-body-content-fo {\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.pict-flow-node-body-content-html {\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-node-body-content-canvas {\n\t\t\tdisplay: block;\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t'}},{key:"getNodeVariantCSS",value:function(){return"\n\t\t.pict-flow-node-decision .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-decision-fill);\n\t\t\tstroke: var(--pf-node-decision-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-start .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-start-fill);\n\t\t\tstroke: var(--pf-node-start-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-end .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-end-fill);\n\t\t\tstroke: var(--pf-node-end-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-halt-fill);\n\t\t\tstroke: var(--pf-node-halt-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\n\t\t/* ── Color-role variants ────────────────────────────────\n\t\t Cards opt into a role via ColorRole on the node-type config or\n\t\t a per-node override. The renderer adds .pict-flow-node-color-{role}\n\t\t to the node group, which pulls fill/stroke/title-bar colors from\n\t\t the --pf-color-* tokens — those in turn track the host's\n\t\t --theme-color-* tokens so light/dark/palette swaps propagate.\n\n\t\t Roles deliberately don't override .pict-flow-node-body-content-*\n\t\t styling — the body content's visual identity is the consumer's\n\t\t responsibility. */\n\t\t.pict-flow-node-color-success .pict-flow-node-body {\n\t\t\tfill: var(--pf-color-success-soft);\n\t\t\tstroke: var(--pf-color-success);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-color-success .pict-flow-node-title-bar,\n\t\t.pict-flow-node-color-success .pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-color-success);\n\t\t}\n\t\t.pict-flow-node-color-success .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-color-success);\n\t\t}\n\n\t\t.pict-flow-node-color-warning .pict-flow-node-body {\n\t\t\tfill: var(--pf-color-warning-soft);\n\t\t\tstroke: var(--pf-color-warning);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-color-warning .pict-flow-node-title-bar,\n\t\t.pict-flow-node-color-warning .pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-color-warning);\n\t\t}\n\t\t.pict-flow-node-color-warning .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-color-warning);\n\t\t}\n\n\t\t.pict-flow-node-color-error .pict-flow-node-body {\n\t\t\tfill: var(--pf-color-error-soft);\n\t\t\tstroke: var(--pf-color-error);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-color-error .pict-flow-node-title-bar,\n\t\t.pict-flow-node-color-error .pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-color-error);\n\t\t}\n\t\t.pict-flow-node-color-error .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-color-error);\n\t\t}\n\n\t\t.pict-flow-node-color-info .pict-flow-node-body {\n\t\t\tfill: var(--pf-color-info-soft);\n\t\t\tstroke: var(--pf-color-info);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-color-info .pict-flow-node-title-bar,\n\t\t.pict-flow-node-color-info .pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-color-info);\n\t\t}\n\t\t.pict-flow-node-color-info .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-color-info);\n\t\t}\n\n\t\t.pict-flow-node-color-accent .pict-flow-node-body {\n\t\t\tfill: var(--pf-color-accent-soft);\n\t\t\tstroke: var(--pf-color-accent);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-color-accent .pict-flow-node-title-bar,\n\t\t.pict-flow-node-color-accent .pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-color-accent);\n\t\t}\n\t\t.pict-flow-node-color-accent .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-color-accent);\n\t\t}\n\n\t\t.pict-flow-node-color-neutral .pict-flow-node-body {\n\t\t\tfill: var(--pf-color-neutral-soft);\n\t\t\tstroke: var(--pf-color-neutral);\n\t\t\tstroke-width: 1;\n\t\t}\n\t\t.pict-flow-node-color-neutral .pict-flow-node-title-bar,\n\t\t.pict-flow-node-color-neutral .pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-color-neutral);\n\t\t}\n\t\t.pict-flow-node-color-neutral .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-color-neutral);\n\t\t}\n\t\t"}},{key:"getPortCSS",value:function(){return'\n\t\t.pict-flow-port {\n\t\t\tcursor: crosshair;\n\t\t\ttransition: r 0.15s, filter 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));\n\t\t}\n\t\t.pict-flow-port.input {\n\t\t\tfill: var(--pf-port-input-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port.output {\n\t\t\tfill: var(--pf-port-output-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port:hover {\n\t\t\tr: 7;\n\t\t\tfilter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.20));\n\t\t}\n\t\t/* Port type color overrides */\n\t\t.pict-flow-port.port-type-event-in {\n\t\t\tfill: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-event-out {\n\t\t\tfill: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-setting {\n\t\t\tfill: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-value {\n\t\t\tfill: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-error {\n\t\t\tfill: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-port-label {\n\t\t\tfont-size: 8px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port label badge background */\n\t\t.pict-flow-port-label-bg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port labels on hover: hidden by default, revealed on node hover */\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label-bg {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label-bg {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t/* Port-hint beziers — drawn from the badge to the actual dot\n\t\t when an edge theme has rerouted the connection. Hidden by\n\t\t default; PortRenderer / NodeView toggle data-active on hover. */\n\t\t.pict-flow-port-hint {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke-hover, #3498db);\n\t\t\tstroke-width: 1.75;\n\t\t\tstroke-dasharray: 4 3;\n\t\t\tstroke-linecap: round;\n\t\t\topacity: 0;\n\t\t\tpointer-events: none;\n\t\t\ttransition: opacity 0.18s ease;\n\t\t}\n\t\t.pict-flow-port-hint[data-active="true"] {\n\t\t\topacity: 0.7;\n\t\t}\n\n\t\t/* ── Layout-algorithm popup: tightened layout + form styling ── */\n\t\t.pict-flow-popup-layout-algorithm-row {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 4px;\n\t\t\tpadding: 6px 10px 4px;\n\t\t}\n\t\t.pict-flow-popup-layout-algorithm-row > .pict-flow-popup-settings-label {\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\topacity: 0.7;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.pict-flow-popup-layout-algorithm-controls {\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-flow-popup-layout-algorithm-select {\n\t\t\tflex: 1 1 auto;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-flow-popup-collapse-toggle {\n\t\t\tflex: 0 0 auto;\n\t\t\twidth: 28px;\n\t\t\tpadding: 0;\n\t\t\tborder: 1px solid var(--pf-button-border, #ccc);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--pf-toolbar-bg, #fff);\n\t\t\tcolor: var(--pf-text-secondary, #5a6470);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s, color 0.15s, border-color 0.15s;\n\t\t}\n\t\t.pict-flow-popup-collapse-toggle:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg, #eef);\n\t\t\tcolor: var(--pf-text-primary, #2c3e50);\n\t\t}\n\t\t/* "Open" state: pressed-in look so the user sees that the form\n\t\t below is being driven by this gear. */\n\t\t.pict-flow-popup-collapse-toggle[aria-expanded="true"] {\n\t\t\tbackground-color: var(--pf-button-active-bg, #d6e4f0);\n\t\t\tcolor: var(--pf-text-primary, #2c3e50);\n\t\t\tborder-color: var(--pf-button-hover-border, #3498db);\n\t\t}\n\t\t.pict-flow-popup-collapse-toggle svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t/* Subordinate description text — sits under a control (algorithm\n\t\t dropdown, edge-theme dropdown, etc.) and explains it. Indented\n\t\t from the section\'s left edge with a faint left rule so the\n\t\t visual hierarchy is unambiguous: SECTION LABEL > control >\n\t\t description. */\n\t\t.pict-flow-popup-control-description {\n\t\t\tfont-size: 11px;\n\t\t\tline-height: 1.4;\n\t\t\tcolor: var(--pf-text-secondary, #5a6470);\n\t\t\tpadding: 4px 12px 8px 28px;\n\t\t\tmargin-left: 14px;\n\t\t\tborder-left: 2px solid var(--pf-divider-light, #e6e6e6);\n\t\t}\n\n\t\t/* The form host. Acts as the collapsible container around the\n\t\t pict-section-form metacontroller\'s emitted markup. */\n\t\t.pict-flow-popup-layout-form-host {\n\t\t\tmargin: 0 10px 8px;\n\t\t\tpadding: 8px 10px;\n\t\t\tbackground: var(--pf-toolbar-bg, #fafafa);\n\t\t\tborder: 1px solid var(--pf-button-border, #e0e0e0);\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: hidden;\n\t\t\tmax-height: 600px;\n\t\t\ttransition: max-height 0.22s ease, padding 0.22s ease,\n\t\t\t margin 0.22s ease, border-color 0.22s ease, opacity 0.18s ease;\n\t\t\topacity: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-form-host[data-collapsed="true"] {\n\t\t\tmax-height: 0;\n\t\t\tpadding-top: 0;\n\t\t\tpadding-bottom: 0;\n\t\t\tmargin-top: 0;\n\t\t\tmargin-bottom: 0;\n\t\t\tborder-color: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\t.pict-flow-popup-layout-form-host > div { width: 100%; }\n\n\t\t/* Form contents — make the auto-rendered sections look professional.\n\t\t The section headings stay visible; the redundant per-section\n\t\t "Group: Defaults" h3 is suppressed. */\n\t\t.pict-flow-popup-layout-form .pict-form-view {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-popup-layout-form .pict-form-section {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.pict-flow-popup-layout-form .pict-form-section h2 {\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\topacity: 0.6;\n\t\t\tmargin: 8px 0 4px;\n\t\t\tpadding: 0;\n\t\t\tborder-bottom: 1px solid var(--pf-button-border, #e6e6e6);\n\t\t\tpadding-bottom: 3px;\n\t\t}\n\t\t.pict-flow-popup-layout-form .pict-form-section:first-child h2,\n\t\t.pict-flow-popup-layout-form .pict-form-section h2:first-child {\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t/* Group headings ("Group: Defaults") are noise — every algorithm\n\t\t has exactly one group right now. Hide them. */\n\t\t.pict-flow-popup-layout-form .pict-form-section h3 {\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Each row of inputs lives in a flat <div> as alternating\n\t\t <span>label</span><input> pairs. Lay them out in a balanced grid. */\n\t\t.pict-flow-popup-layout-form .pict-form-section > div > div {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 4px 14px;\n\t\t\tmargin: 4px 0;\n\t\t\talign-items: center;\n\t\t}\n\t\t.pict-flow-popup-layout-form .pict-form-section span {\n\t\t\tfont-size: 12px;\n\t\t\tcolor: var(--pf-text-primary, #2c3e50);\n\t\t\tline-height: 1.4;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.pict-flow-popup-layout-form input[type="number"],\n\t\t.pict-flow-popup-layout-form input[type="text"],\n\t\t.pict-flow-popup-layout-form select {\n\t\t\twidth: 88px;\n\t\t\tpadding: 2px 6px;\n\t\t\tborder: 1px solid var(--pf-button-border, #ccc);\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.3;\n\t\t\tbackground: #fff;\n\t\t\tcolor: var(--pf-text-primary, #2c3e50);\n\t\t\tmargin-left: -8px; /* tighten gap between label and its input */\n\t\t}\n\t\t.pict-flow-popup-layout-form select {\n\t\t\twidth: auto;\n\t\t\tmin-width: 110px;\n\t\t}\n\t\t.pict-flow-popup-layout-form input[type="number"]:focus,\n\t\t.pict-flow-popup-layout-form input[type="text"]:focus,\n\t\t.pict-flow-popup-layout-form select:focus {\n\t\t\toutline: none;\n\t\t\tborder-color: var(--pf-button-hover-border, #3498db);\n\t\t\tbox-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);\n\t\t}\n\t\t.pict-flow-popup-layout-form input[type="checkbox"] {\n\t\t\tmargin: 0 4px 0 0;\n\t\t}\n\t\t'}},{key:"getConnectionCSS",value:function(){return"\n\t\t/* Arrowhead markers use CSS-driven fills so they follow --pf-* tokens\n\t\t (which in turn map to host --theme-color-* tokens). The polygon's\n\t\t fill attribute is the fallback when CSS does not reach the marker. */\n\t\t.pict-flow-svg .pict-flow-arrowhead-default {\n\t\t\tfill: var(--pf-connection-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-selected {\n\t\t\tfill: var(--pf-connection-selected-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-tether {\n\t\t\tfill: var(--pf-connection-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-event-in {\n\t\t\tfill: var(--pf-connection-event-in-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-event-out {\n\t\t\tfill: var(--pf-connection-event-out-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-setting {\n\t\t\tfill: var(--pf-connection-setting-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-value {\n\t\t\tfill: var(--pf-connection-value-stroke);\n\t\t}\n\t\t.pict-flow-svg .pict-flow-arrowhead-error {\n\t\t\tfill: var(--pf-connection-error-stroke);\n\t\t}\n\n\t\t.pict-flow-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: pointer;\n\t\t\ttransition: stroke 0.15s;\n\t\t}\n\t\t.pict-flow-connection:hover {\n\t\t\tstroke: var(--pf-connection-stroke-hover);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t.pict-flow-connection.selected {\n\t\t\tstroke: var(--pf-connection-selected-stroke);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t/* Connection type color overrides (based on source port type) */\n\t\t.pict-flow-connection.conn-type-event-in {\n\t\t\tstroke: var(--pf-connection-event-in-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-event-out {\n\t\t\tstroke: var(--pf-connection-event-out-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-setting {\n\t\t\tstroke: var(--pf-connection-setting-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-value {\n\t\t\tstroke: var(--pf-connection-value-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-error {\n\t\t\tstroke: var(--pf-connection-error-stroke);\n\t\t}\n\t\t.pict-flow-connection-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 12;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-drag-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-dasharray: 6 3;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t"}},{key:"getHandleCSS",value:function(){return"\n\t\t.pict-flow-connection-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getTetherCSS",value:function(){return"\n\t\t.pict-flow-tether-line {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t\tstroke-dasharray: 6 4;\n\t\t\tpointer-events: visibleStroke;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-line.selected {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-tether-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 10;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getPanelCSS",value:function(){return'\n\t\t.pict-flow-node-panel-indicator {\n\t\t\tfill: var(--pf-node-selected-stroke);\n\t\t\tstroke: none;\n\t\t\topacity: 0.6;\n\t\t\tcursor: pointer;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.pict-flow-node-panel-indicator:hover {\n\t\t\topacity: 1.0;\n\t\t}\n\t\t.pict-flow-panel-foreign-object {\n\t\t\toverflow: visible;\n\t\t}\n\t\t.pict-flow-panel {\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-panel-border);\n\t\t\tborder-radius: var(--pf-panel-radius);\n\t\t\tbox-shadow: var(--pf-panel-shadow);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-panel-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 8px 12px;\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-panel-titlebar.dragging {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-panel-title-text {\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tletter-spacing: 0.1px;\n\t\t}\n\t\t.pict-flow-panel-close-btn {\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-button-close-color);\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1;\n\t\t\tpadding: 4px;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.pict-flow-panel-close-btn:hover {\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tbackground-color: rgba(231, 76, 60, 0.08);\n\t\t}\n\t\t.pict-flow-panel-content {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tmin-height: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.pict-flow-panel-tab-pane {\n\t\t\tpadding: 10px 12px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t'}},{key:"getInfoPanelCSS",value:function(){return'\n\t\t.pict-flow-info-panel {\n\t\t\tpadding: 2px 0;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-info-panel-header {\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 6px;\n\t\t\tcolor: var(--pf-text-heading);\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon {\n\t\t\tfont-size: 14px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-info-panel-description {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-bottom: 10px;\n\t\t\tline-height: 1.45;\n\t\t}\n\t\t.pict-flow-info-panel-badges {\n\t\t\tmargin-bottom: 10px;\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-flow-info-panel-badge {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 2px 8px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-flow-info-panel-badge.category {\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tcolor: var(--pf-badge-category-text);\n\t\t}\n\t\t.pict-flow-info-panel-badge.code {\n\t\t\tbackground: var(--pf-badge-code-bg);\n\t\t\tcolor: var(--pf-badge-code-text);\n\t\t\tfont-family: "SF Mono", "Fira Code", monospace;\n\t\t}\n\t\t.pict-flow-info-panel-section {\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.pict-flow-info-panel-section-title {\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tmargin-bottom: 4px;\n\t\t\tpadding-bottom: 2px;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-info-panel-port {\n\t\t\tpadding: 3px 8px;\n\t\t\tbackground: var(--pf-port-item-bg);\n\t\t\tmargin-bottom: 3px;\n\t\t\tfont-size: 11px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-info-panel-port.input {\n\t\t\tborder-left: 3px solid var(--pf-port-input-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.output {\n\t\t\tborder-left: 3px solid var(--pf-port-output-fill);\n\t\t}\n\t\t/* Info panel port type color overrides */\n\t\t.pict-flow-info-panel-port.port-type-event-in {\n\t\t\tborder-left-color: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-event-out {\n\t\t\tborder-left-color: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-setting {\n\t\t\tborder-left-color: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-value {\n\t\t\tborder-left-color: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-error {\n\t\t\tborder-left-color: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port-constraint {\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t/* Port summary section appended below form panels */\n\t\t.pict-flow-port-summary {\n\t\t\tmargin-top: 12px;\n\t\t\tpadding-top: 8px;\n\t\t\tborder-top: 1px solid var(--pf-divider-medium);\n\t\t}\n\t\t.pict-flow-info-panel-port.event {\n\t\t\tborder-left: 3px solid var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.value {\n\t\t\tborder-left: 3px solid var(--pf-port-value-fill);\n\t\t}\n\t\t'}},{key:"getNodePropsEditorCSS",value:function(){return'\n\t\t.pict-flow-node-props-fields {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-node-props-field {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-flow-node-props-label {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 72px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-node-props-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 11px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-flow-node-props-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-node-props-color {\n\t\t\twidth: 28px;\n\t\t\theight: 24px;\n\t\t\tpadding: 1px;\n\t\t\tcursor: pointer;\n\t\t\tflex: 0 0 28px;\n\t\t}\n\n\t\t/* Suppress native number-input spinner buttons on every input\n\t\t inside a properties panel. Panels live inside <foreignObject>;\n\t\t browsers (Chromium / WebKit) render the up/down spinner chrome\n\t\t as native overlays that don\'t always respect SVG transforms or\n\t\t the parent tab pane\'s display:none — leaving stale spinner\n\t\t artifacts hanging around when the user switches tabs or pans\n\t\t the diagram. The user can still type numbers; they just don\'t\n\t\t get clickable spinners. (If we ever want spinners back, build\n\t\t them as real DOM elements next to the input, not native chrome.) */\n\t\t.pict-flow-panel input[type="number"] {\n\t\t\t-moz-appearance: textfield;\n\t\t\tappearance: textfield;\n\t\t}\n\t\t.pict-flow-panel input[type="number"]::-webkit-outer-spin-button,\n\t\t.pict-flow-panel input[type="number"]::-webkit-inner-spin-button {\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\tmargin: 0;\n\t\t}\n\t\t'}},{key:"getPanelTabsCSS",value:function(){return"\n\t\t.pict-flow-panel-resize-handle {\n\t\t\theight: 6px;\n\t\t\tcursor: ns-resize;\n\t\t\tbackground: transparent;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-panel-resize-handle::after {\n\t\t\tcontent: '';\n\t\t\twidth: 24px;\n\t\t\theight: 2px;\n\t\t\tborder-radius: 1px;\n\t\t\tbackground: var(--pf-resize-handle-hover);\n\t\t\ttransition: background-color 0.15s, width 0.15s;\n\t\t}\n\t\t.pict-flow-panel-resize-handle:hover::after {\n\t\t\tbackground: var(--pf-button-hover-border);\n\t\t\twidth: 32px;\n\t\t}\n\t\t.pict-flow-panel-tabbar {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t}\n\t\t.pict-flow-panel-tab {\n\t\t\tflex: 1;\n\t\t\tpadding: 5px 8px;\n\t\t\tfont-size: 11px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-tab-text);\n\t\t\tborder-top: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-top-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-panel-tab:hover {\n\t\t\tcolor: var(--pf-tab-text-hover);\n\t\t}\n\t\t.pict-flow-panel-tab.active {\n\t\t\tborder-top-color: var(--pf-node-selected-stroke);\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-flow-panel-help-content {\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-panel-help-content p {\n\t\t\tmargin: 0 0 8px 0;\n\t\t}\n\t\t"}},{key:"getFullscreenCSS",value:function(){return"\n\t\t.pict-flow-fullscreen {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100vw;\n\t\t\theight: 100vh;\n\t\t\tz-index: 9999;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\tmin-height: 100vh;\n\t\t}\n\t\t.pict-flow-fullscreen .pict-flow-svg {\n\t\t\tmin-height: calc(100vh - 50px);\n\t\t}\n\t\t"}},{key:"getToolbarCSS",value:function(){return'\n\t\t.pict-flow-toolbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-toolbar-border);\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t.pict-flow-toolbar-group {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tborder-right: 1px solid var(--pf-toolbar-border);\n\t\t}\n\t\t.pict-flow-toolbar-group:last-child {\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.65em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-size: 0.85em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tborder-color: var(--pf-button-hover-border);\n\t\t}\n\t\t.pict-flow-toolbar-btn:active {\n\t\t\tbackground-color: var(--pf-button-active-bg);\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-btn-text {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-toolbar-btn-chevron {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t/* Split button — visible as one connected unit; the two halves\n\t\t route to different actions. Used for "Auto" so clicking the\n\t\t icon/text applies the current layout while the chevron half\n\t\t opens the algorithm popup with a generous hit area. */\n\t\t.pict-flow-toolbar-btn-split {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: stretch;\n\t\t}\n\t\t.pict-flow-toolbar-btn-split-main {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t\tborder-right: 1px solid var(--pf-button-border);\n\t\t\tmargin-right: -1px; /* collapse the seam between the two buttons */\n\t\t}\n\t\t.pict-flow-toolbar-btn-split-chevron {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tpadding-left: 0.55em;\n\t\t\tpadding-right: 0.55em;\n\t\t}\n\t\t.pict-flow-toolbar-btn-split-chevron .pict-flow-toolbar-btn-chevron {\n\t\t\tmargin: 0;\n\t\t}\n\t\t.pict-flow-toolbar-right {\n\t\t\tmargin-left: auto;\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-label {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-right: 0.25em;\n\t\t}\n\t\t.pict-flow-toolbar-select {\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t'}},{key:"getPaletteCSS",value:function(){return"\n\t\t.pict-flow-palette-category {\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.pict-flow-palette-category:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.pict-flow-palette-category-label {\n\t\t\tfont-size: 0.7em;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tmargin-bottom: 0.35em;\n\t\t\tpadding-bottom: 0.2em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-palette-cards {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.35em;\n\t\t}\n\t\t.pict-flow-palette-card {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.6em;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-panel-bg);\n\t\t\tfont-size: 0.8em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-palette-card:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-node-selected-stroke);\n\t\t\tbox-shadow: var(--pf-card-hover-shadow);\n\t\t}\n\t\t.pict-flow-palette-card.disabled {\n\t\t\topacity: 0.45;\n\t\t\tpointer-events: none;\n\t\t\tcursor: default;\n\t\t}\n\t\t.pict-flow-palette-card-icon {\n\t\t\tfont-size: 1.1em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-palette-card-swatch {\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tborder-radius: 2px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-palette-card-title {\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-palette-card-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.pict-flow-toolbar-select.layout-select {\n\t\t\tmin-width: 120px;\n\t\t\tmax-width: 200px;\n\t\t}\n\t\t"}},{key:"getPopupCSS",value:function(){return'\n\t\t.pict-flow-toolbar-popup-anchor {\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-toolbar-popup {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1000;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 6px;\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tmin-width: 240px;\n\t\t\tmax-height: 80vh;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 0.35em 0;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-flow-popup-search-wrapper {\n\t\t\tposition: relative;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-popup-search-icon {\n\t\t\tposition: absolute;\n\t\t\tleft: 0.85em;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t\tpointer-events: none;\n\t\t\tline-height: 1;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.pict-flow-popup-search {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em 0.4em 2em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-search:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-list-item {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-list-item:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-list-item-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-list-item-label {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-list-item-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tpadding: 0.1em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-popup-divider {\n\t\t\theight: 1px;\n\t\t\tbackground: var(--pf-divider-light);\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-flow-popup-list-empty {\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tpadding: 1.5em 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-flow-popup-layout-save {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-layout-save:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-save-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-name {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-popup-layout-delete {\n\t\t\tdisplay: none;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover .pict-flow-popup-layout-delete {\n\t\t\tdisplay: inline-flex;\n\t\t}\n\t\t.pict-flow-popup-layout-delete:hover {\n\t\t\tbackground-color: var(--pf-button-danger-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-settings-section {\n\t\t\tpadding: 0.5em 0.75em;\n\t\t}\n\t\t.pict-flow-popup-settings-label {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.8em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tmargin-bottom: 0.35em;\n\t\t}\n\t\t.pict-flow-popup-settings-select {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-settings-select:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-settings-slider-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.pict-flow-popup-settings-slider {\n\t\t\tflex: 1;\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\theight: 4px;\n\t\t\tbackground: var(--pf-input-border);\n\t\t\tborder-radius: 2px;\n\t\t\toutline: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-webkit-slider-thumb {\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-moz-range-thumb {\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t\tborder: none;\n\t\t}\n\t\t.pict-flow-popup-settings-slider-value {\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 2.5em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t'}},{key:"getCollapsedToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar-collapsed {\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: 8px;\n\t\t\tz-index: 100;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-toolbar-collapsed.visible {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn {\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 2px 6px rgba(0,0,0,0.1);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tbox-shadow: 0 2px 8px rgba(0,0,0,0.15);\n\t\t}\n\t\t"}},{key:"getFloatingToolbarCSS",value:function(){return"\n\t\t.pict-flow-floating-toolbar {\n\t\t\tposition: absolute;\n\t\t\tz-index: 100;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 2px;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 8px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-floating-grip {\n\t\t\tcursor: grab;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-grip:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-grip:active {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-floating-btn {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: transparent;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-floating-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-separator {\n\t\t\theight: 1px;\n\t\t\tbackground-color: var(--pf-divider-light);\n\t\t\tmargin: 2px 4px;\n\t\t}\n\t\t/* Collapsed floating toolbar — grip-only draggable square */\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-btn,\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-separator {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed {\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip span {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t"}},{key:"getIconCSS",value:function(){return"\n\t\t.pict-flow-icon-svg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-palette-card-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-right: 4px;\n\t\t}\n\t\t.pict-flow-panel-close-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-panel-close-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-palette-toggle-arrow svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t"}},{key:"getBracketNodeCSS",value:function(){return"\n\t\t/* Bracket outline path */\n\t\t.pict-flow-node-bracket {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\n\t\t/* Bracket fill rects: no stroke, no rounded corners.\n\t\t Uses parent-qualified selectors to beat variant rules\n\t\t (e.g. .pict-flow-node-start .pict-flow-node-body). */\n\t\t.pict-flow-node .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t\trx: 0;\n\t\t\try: 0;\n\t\t}\n\t\t/* Beat hover rule: .pict-flow-node:hover .pict-flow-node-body */\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t/* Beat selected rule: .pict-flow-node.selected .pict-flow-node-body */\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t"}},{key:"generateCSS",value:function(){var e=this.getContainerCSS()+this.getNodeCSS()+this.getBodyContentCSS()+this.getNodeVariantCSS()+this.getPortCSS()+this.getConnectionCSS()+this.getHandleCSS()+this.getTetherCSS()+this.getPanelCSS()+this.getInfoPanelCSS()+this.getNodePropsEditorCSS()+this.getPanelTabsCSS()+this.getBracketNodeCSS()+this.getFullscreenCSS()+this.getToolbarCSS()+this.getPaletteCSS()+this.getPopupCSS()+this.getCollapsedToolbarCSS()+this.getFloatingToolbarCSS()+this.getIconCSS();if(this._FlowView&&this._FlowView._ThemeProvider){var t=this._FlowView._ThemeProvider.getActiveTheme();if(t&&t.CSSVariables&&Object.keys(t.CSSVariables).length>0){var o=".pict-flow-container {\n";for(var n in t.CSSVariables)o+="\t"+n+": "+t.CSSVariables[n]+";\n";e+=o+="}\n"}t&&t.AdditionalCSS&&(e+=t.AdditionalCSS)}return e}},{key:"registerCSS",value:function(){this.fable&&this.fable.CSSMap?(this.fable.CSSMap.removeCSS("PictSectionFlow-CSS"),this.fable.CSSMap.addCSS("PictSectionFlow-CSS",this.generateCSS(),500,"PictProviderFlowCSS"),this.fable.CSSMap.injectCSS()):this.log.warn("PictProviderFlowCSS: CSSMap not available; CSS not registered.")}}])}(n);t.exports=r,t.exports.default_configuration=i},{"fable-serviceproviderbase":6}],24:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictProviderFlowConnectorShapes",i._FlowView=o&&o.FlowView?o.FlowView:null,i._DefaultShapes={port:{ElementType:"circle",Attributes:{r:"5"},ClassName:"pict-flow-port"},"panel-indicator":{ElementType:"rect",Attributes:{rx:"2",ry:"2"},ClassName:"pict-flow-node-panel-indicator"},"connection-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection"},"connection-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection-hitarea"},"connection-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle"},"connection-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle-midpoint"},"drag-connection":{ElementType:"path",Attributes:{},ClassName:"pict-flow-drag-connection"},"tether-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-line"},"tether-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-hitarea"},"tether-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle"},"tether-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle-midpoint"},"arrowhead-connection":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#95a5a6"},"arrowhead-connection-selected":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#3498db"},"arrowhead-tether":{MarkerWidth:"4",MarkerHeight:"6",RefX:"6",RefY:"3",Points:"0 0, 4 3, 0 6",Fill:"#95a5a6"}},i._OriginalShapes=JSON.parse(JSON.stringify(i._DefaultShapes)),i}return _inherits(t,e),_createClass(t,[{key:"applyThemeOverrides",value:function(e){if(e&&"object"===_typeof(e))for(var t in e)this._DefaultShapes.hasOwnProperty(t)?Object.assign(this._DefaultShapes[t],e[t]):this._DefaultShapes[t]=e[t]}},{key:"resetToDefaults",value:function(){this._DefaultShapes=JSON.parse(JSON.stringify(this._OriginalShapes))}},{key:"getShapeConfig",value:function(e){return this._DefaultShapes.hasOwnProperty(e)?this._DefaultShapes[e]:null}},{key:"setShapeConfig",value:function(e,t){this._DefaultShapes[e]=t}},{key:"getShapeKeys",value:function(){return Object.keys(this._DefaultShapes)}},{key:"createPortElement",value:function(e,t,o){var n=this._DefaultShapes.port,i=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType),r=n.ClassName+" "+e.Direction;for(var a in e.PortType&&(r+=" port-type-"+e.PortType),i.setAttribute("class",r),i.setAttribute("cx",String(t.x)),i.setAttribute("cy",String(t.y)),n.Attributes)i.setAttribute(a,n.Attributes[a]);return i.setAttribute("data-port-hash",e.Hash),i.setAttribute("data-node-hash",o),i.setAttribute("data-port-direction",e.Direction),e.PortType&&i.setAttribute("data-port-type",e.PortType),i.setAttribute("data-element-type","port"),i}},{key:"createPanelIndicatorElement",value:function(e,t,o,n,i){var r=this._DefaultShapes["panel-indicator"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var l in a.setAttribute("class",r.ClassName),a.setAttribute("x",String(t)),a.setAttribute("y",String(o)),a.setAttribute("width",String(n)),a.setAttribute("height",String(i)),r.Attributes)a.setAttribute(l,r.Attributes[l]);return a.setAttribute("data-node-hash",e),a.setAttribute("data-element-type","panel-indicator"),a}},{key:"createConnectionPathElement",value:function(e,t,o,n){var i=this._DefaultShapes["connection-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(i.ElementType);r.setAttribute("class",i.ClassName+(o?" selected":"")),r.setAttribute("d",e),r.setAttribute("data-connection-hash",t),r.setAttribute("data-element-type","connection");o?this._DefaultShapes["arrowhead-connection-selected"]:this._DefaultShapes["arrowhead-connection"];var a=o?"flow-arrowhead-selected-"+n:"flow-arrowhead-"+n;return r.setAttribute("marker-end","url(#"+a+")"),r}},{key:"createConnectionHitAreaElement",value:function(e,t){var o=this._DefaultShapes["connection-hitarea"],n=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return n.setAttribute("class",o.ClassName),n.setAttribute("d",e),n.setAttribute("data-connection-hash",t),n.setAttribute("data-element-type","connection-hitarea"),n}},{key:"createHandleElement",value:function(e,t,o,n,i){var r=this._DefaultShapes[i]||this._DefaultShapes["connection-handle"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var l in a.setAttribute("class",r.ClassName),a.setAttribute("cx",String(o)),a.setAttribute("cy",String(n)),r.Attributes)a.setAttribute(l,r.Attributes[l]);return a.setAttribute("data-handle-type",t),a}},{key:"createFullHandle",value:function(e,t,o,n,i,r,a,l){var s=this.createHandleElement(t,o,n,i,r);return s.setAttribute("data-element-type",a),s.setAttribute(l,t),e.appendChild(s),s}},{key:"createDragConnectionElement",value:function(e){var t=this._DefaultShapes["drag-connection"],o=this._FlowView._SVGHelperProvider.createSVGElement(t.ElementType);return o.setAttribute("class",t.ClassName),o.setAttribute("d",e),o}},{key:"createTetherPathElement",value:function(e,t,o,n){var i=this._DefaultShapes["tether-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(i.ElementType);return r.setAttribute("class",i.ClassName+(o?" selected":"")),r.setAttribute("d",e),r.setAttribute("marker-end","url(#flow-tether-arrowhead-"+n+")"),r.setAttribute("data-element-type","tether"),r.setAttribute("data-panel-hash",t),r}},{key:"createTetherHitAreaElement",value:function(e,t){var o=this._DefaultShapes["tether-hitarea"],n=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return n.setAttribute("class",o.ClassName),n.setAttribute("d",e),n.setAttribute("data-element-type","tether-hitarea"),n.setAttribute("data-panel-hash",t),n}},{key:"generateMarkerDefs",value:function(e){var t=this._DefaultShapes["arrowhead-connection"],o=this._DefaultShapes["arrowhead-connection-selected"],n=this._DefaultShapes["arrowhead-tether"],i="";i+='<marker id="flow-arrowhead-'+e+'" markerWidth="'+t.MarkerWidth+'" markerHeight="'+t.MarkerHeight+'" refX="'+t.RefX+'" refY="'+t.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon class="pict-flow-arrowhead pict-flow-arrowhead-default" points="'+t.Points+'" fill="'+t.Fill+'" /></marker>';var r={"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"};for(var a in r)i+='<marker id="flow-arrowhead-'+a+"-"+e+'" markerWidth="'+t.MarkerWidth+'" markerHeight="'+t.MarkerHeight+'" refX="'+t.RefX+'" refY="'+t.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon class="pict-flow-arrowhead pict-flow-arrowhead-'+a+'" points="'+t.Points+'" fill="'+r[a]+'" /></marker>';return i+='<marker id="flow-arrowhead-selected-'+e+'" markerWidth="'+o.MarkerWidth+'" markerHeight="'+o.MarkerHeight+'" refX="'+o.RefX+'" refY="'+o.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon class="pict-flow-arrowhead pict-flow-arrowhead-selected" points="'+o.Points+'" fill="'+o.Fill+'" /></marker>',i+='<marker id="flow-tether-arrowhead-'+e+'" markerWidth="'+n.MarkerWidth+'" markerHeight="'+n.MarkerHeight+'" refX="'+n.RefX+'" refY="'+n.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon class="pict-flow-arrowhead pict-flow-arrowhead-tether" points="'+n.Points+'" fill="'+n.Fill+'" /></marker>'}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],25:[function(e,t,o){var n=e("pict-provider"),i={ProviderIdentifier:"PictProviderFlowEventHandler"},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},i,o),n])).serviceType="PictProviderFlowEventHandler",r._FlowView=o&&o.FlowView?o.FlowView:null,r._Handlers={},r}return _inherits(t,e),_createClass(t,[{key:"registerHandler",value:function(e,t,o){if("function"!=typeof t)return this.log.warn("PictProviderFlowEventHandler registerHandler: handler for '".concat(e,"' is not a function")),null;this._Handlers[e]||(this._Handlers[e]=[]);var n=o||"handler-".concat(this.fable.getUUID());return this._Handlers[e].push({Hash:n,Handler:t}),this.log.trace("PictProviderFlowEventHandler registered handler '".concat(n,"' for event '").concat(e,"'")),n}},{key:"removeHandler",value:function(e,t){if(!this._Handlers[e])return!1;var o=this._Handlers[e].findIndex(function(e){return e.Hash===t});return o>=0&&(this._Handlers[e].splice(o,1),!0)}},{key:"removeAllHandlers",value:function(e){e?this._Handlers[e]=[]:this._Handlers={}}},{key:"fireEvent",value:function(e,t){if(this.log.trace("PictProviderFlowEventHandler firing event '".concat(e,"'")),this._Handlers[e]&&0!==this._Handlers[e].length)for(var o=0;o<this._Handlers[e].length;o++){var n=this._Handlers[e][o];try{n.Handler(t,this._FlowView)}catch(t){this.log.error("PictProviderFlowEventHandler error in handler '".concat(n.Hash,"' for event '").concat(e,"': ").concat(t.message))}}}},{key:"hasHandlers",value:function(e){return!!(this._Handlers[e]&&this._Handlers[e].length>0)}},{key:"getHandlerCount",value:function(e){return this._Handlers[e]?this._Handlers[e].length:0}}])}(n);t.exports=r,t.exports.default_configuration=i},{"pict-provider":15}],26:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictProviderFlowGeometry",i}return _inherits(t,e),_createClass(t,[{key:"getEdgeFromSide",value:function(e){switch(e){case"left-top":case"left":case"left-bottom":return"left";case"right-top":case"right":case"right-bottom":default:return"right";case"top-left":case"top":case"top-right":return"top";case"bottom-left":case"bottom":case"bottom-right":return"bottom"}}},{key:"sideDirection",value:function(e){switch(this.getEdgeFromSide(e)){case"left":return{dx:-1,dy:0};case"right":default:return{dx:1,dy:0};case"top":return{dx:0,dy:-1};case"bottom":return{dx:0,dy:1}}}},{key:"getEdgeCenter",value:function(e,t){switch(t){case"left":return{x:e.X,y:e.Y+e.Height/2};case"right":default:return{x:e.X+e.Width,y:e.Y+e.Height/2};case"top":return{x:e.X+e.Width/2,y:e.Y};case"bottom":return{x:e.X+e.Width/2,y:e.Y+e.Height}}}},{key:"getPortLocalPosition",value:function(e,t,o,n,i,r,a){var l=this.getEdgeFromSide(e),s=a?this._computeAdaptiveZone(e,a):this._getZoneFromSide(e),c=this._getZoneFromSide(e),d="start";if(c.start>=.5?d="end":c.start>=.17&&(d="center"),"left"===l||"right"===l){var p="left"===l?0:n,h=i-r-16,u=r+h*s.start,f=h*(s.end-s.start)-16*(o+1);f<0&&(f=0);var g=0;return"end"===d?g=f:"center"===d&&(g=f/2),{x:p,y:u+g+16*(t+1)}}var m="top"===l?0:i,v=n*s.start,w=n*(s.end-s.start)-16*(o+1);w<0&&(w=0);var y=0;return"end"===d?y=w:"center"===d&&(y=w/2),{x:v+y+16*(t+1),y:m}}},{key:"_getZoneFromSide",value:function(e){switch(e){case"left-top":case"right-top":case"top-left":case"bottom-left":return{start:0,end:.333};case"left":case"right":case"top":case"bottom":return{start:.333,end:.667};case"left-bottom":case"right-bottom":case"top-right":case"bottom-right":return{start:.667,end:1};default:return{start:0,end:1}}}},{key:"_getZoneKeysForEdge",value:function(e){switch(e){case"left":return["left-top","left","left-bottom"];case"right":default:return["right-top","right","right-bottom"];case"top":return["top-left","top","top-right"];case"bottom":return["bottom-left","bottom","bottom-right"]}}},{key:"_computeAdaptiveZone",value:function(e,t){for(var o=this.getEdgeFromSide(e),n=this._getZoneKeysForEdge(o),i=0,r={},a=0;a<n.length;a++){var l=n[a],s=t[l]||0,c=s>0?16*(s+1):0;r[l]=c,i+=c}if(0===i)return this._getZoneFromSide(e);for(var d=0,p=0;p<n.length;p++){var h=n[p],u=r[h]/i;if(h===e)return{start:d,end:d+u};d+=u}return this._getZoneFromSide(e)}},{key:"buildPortCountsBySide",value:function(e){var t={};if(!e||!Array.isArray(e))return t;for(var o=0;o<e.length;o++){var n=e[o].Side||("input"===e[o].Direction?"left":"right");t[n]||(t[n]=0),t[n]++}return t}},{key:"computeMinimumNodeHeight",value:function(e,t){if(!e||!Array.isArray(e)||0===e.length)return 0;var o=this.buildPortCountsBySide(e),n={};for(var i in o){var r=this.getEdgeFromSide(i);if("left"===r||"right"===r){var a=16*(o[i]+1);n[r]||(n[r]=0),n[r]+=a}}var l=0;for(var s in n){var c=t+16+n[s];c>l&&(l=c)}return Math.ceil(l)}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],27:[function(e,t,o){var n=e("fable-serviceproviderbase"),i={ProviderIdentifier:"PictProviderFlowIcons"},r={ITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="6" r="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="6" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="18" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 9v2M9.5 12.5L6 15.5M14.5 12.5L18 15.5" stroke="#2c3e50" stroke-width="2"/></svg>',SW:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M3 12h5M16 12h5M14.8 9.2l3.7-5.2M14.8 14.8l3.7 5.2" stroke="#2c3e50" stroke-width="2"/></svg>',EACH:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',FREAD:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M9 13h6M9 17h4" stroke="#2c3e50" stroke-width="2"/></svg>',FWRITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M12 13v5M9.5 15.5L12 13l2.5 2.5" stroke="#2c3e50" stroke-width="2"/></svg>',LOG:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="7.5" cy="8" r="1" fill="#2c3e50"/><circle cx="7.5" cy="12" r="1" fill="#2c3e50"/><circle cx="7.5" cy="16" r="1" fill="#2c3e50"/><path d="M11 8h5.5M11 12h5.5M11 16h3.5" stroke="#2c3e50" stroke-width="2"/></svg>',GET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="6.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-5.15-5.15" stroke="#2c3e50" stroke-width="2"/></svg>',SET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4.5 1.5L4 16Z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M14 6l3 3" stroke="#2c3e50" stroke-width="2"/></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>',"exit-fullscreen":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="M14 10l7-7"/><path d="M3 21l7-7"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',"chevron-down":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/></svg>',cards:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="16" height="12" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M6 7V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-2" stroke="#2c3e50" stroke-width="2"/></svg>',layout:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="3" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="15" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="11" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',collapse:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',expand:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',grip:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="#2c3e50"><circle cx="9" cy="5" r="1.5"/><circle cx="15" cy="5" r="1.5"/><circle cx="9" cy="12" r="1.5"/><circle cx="15" cy="12" r="1.5"/><circle cx="9" cy="19" r="1.5"/><circle cx="15" cy="19" r="1.5"/></svg>',settings:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3" fill="#d5e8f7"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',trash:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M17 21v-8H7v8" stroke="#2c3e50" stroke-width="2"/><path d="M7 3v5h8" stroke="#2c3e50" stroke-width="2"/></svg>',"auto-layout":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="2" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="2" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v4M6 16v-4h12v4" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-in":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M11 8v6M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-out":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-fit":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V3h4"/><path d="M17 3h4v4"/><path d="M21 17v4h-4"/><path d="M7 21H3v-4"/><rect x="7" y="7" width="10" height="10" rx="1.5" fill="#d5e8f7"/></svg>',dock:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="4" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 20V11M8 14l4-4 4 4" stroke="#2c3e50" stroke-width="2"/></svg>',restore:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/></svg>',"delete-node":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',default:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="12" cy="12" r="2.5" fill="#2c3e50"/></svg>'},a=function(e){function t(e,o,n){var a;if(_classCallCheck(this,t),(a=_callSuper(this,t,[e,Object.assign({},i,o),n])).serviceType="PictProviderFlowIcons",a._FlowView=o&&o.FlowView?o.FlowView:null,a._Icons=JSON.parse(JSON.stringify(r)),o&&o.AdditionalIcons&&"object"===_typeof(o.AdditionalIcons))for(var l=Object.keys(o.AdditionalIcons),s=0;s<l.length;s++)a._Icons[l[s]]=o.AdditionalIcons[l[s]];return a}return _inherits(t,e),_createClass(t,[{key:"registerIconTemplates",value:function(){if(this.fable&&this.fable.TemplateProvider)for(var e=Object.keys(this._Icons),t=0;t<e.length;t++){var o="Flow-Icon-"+e[t];this.fable.TemplateProvider.getTemplate(o)||this.fable.TemplateProvider.addTemplate(o,this._Icons[e[t]])}else this.log.warn("PictProviderFlowIcons: TemplateProvider not available; icon templates not registered.")}},{key:"isEmojiIcon",value:function(e){if(!e||"string"!=typeof e)return!1;for(var t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return!0;return!1}},{key:"resolveIconKey",value:function(e){return e?e.Icon&&this._Icons.hasOwnProperty(e.Icon)||e.Icon&&!this.isEmojiIcon(e.Icon)?e.Icon:e.Code&&this._Icons.hasOwnProperty(e.Code)?e.Code:"default":"default"}},{key:"getIconSVGMarkup",value:function(e,t){var o=t||16,n=e||"default";return(this._Icons[n]||this._Icons.default).replace(/\{FlowIconSize\}/g,String(o))}},{key:"renderIconIntoSVGGroup",value:function(e,t,o,n,i){if(!t)return null;var r=(i||16)/24,a=e||"default",l=this._Icons[a]||this._Icons.default;l=l.replace(/\{FlowIconSize\}/g,"24");try{var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.innerHTML=l;var c=s.querySelector("svg");if(!c)return null;var d=document.createElementNS("http://www.w3.org/2000/svg","g");for(d.setAttribute("transform","translate("+o+","+n+") scale("+r+")"),d.setAttribute("pointer-events","none"),d.setAttribute("class","pict-flow-icon-svg");c.childNodes.length>0;)d.appendChild(c.childNodes[0]);return t.appendChild(d),d}catch(e){return this.log.warn("PictProviderFlowIcons renderIconIntoSVGGroup error: "+e.message),null}}},{key:"getIconKeys",value:function(){return Object.keys(this._Icons)}},{key:"hasIcon",value:function(e){return this._Icons.hasOwnProperty(e)}},{key:"registerIcon",value:function(e,t){return!(!e||!t)&&(this._Icons[e]=t,this.fable&&this.fable.TemplateProvider&&this.fable.TemplateProvider.addTemplate("Flow-Icon-"+e,t),!0)}}])}(n);t.exports=a,t.exports.default_configuration=i,t.exports.DefaultIcons=r},{"fable-serviceproviderbase":6}],28:[function(e,t,o){var n=e("pict-provider"),i={ProviderIdentifier:"PictProviderFlowLayouts"},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},i,o),n])).serviceType="PictProviderFlowLayouts",r._FlowView=o&&o.FlowView?o.FlowView:null,o&&void 0!==o.StorageKey?r._StorageKey=o.StorageKey:r._FlowView&&r._FlowView.options&&r._FlowView.options.ViewIdentifier?r._StorageKey="pict-flow-layouts-".concat(r._FlowView.options.ViewIdentifier):r._StorageKey="pict-flow-layouts",r}return _inherits(t,e),_createClass(t,[{key:"storageWrite",value:function(e,t){if(!1===this._StorageKey)return t(null);try{return"undefined"!=typeof localStorage&&localStorage.setItem(this._StorageKey,JSON.stringify(e)),t(null)}catch(e){return this.log.warn("PictProviderFlowLayouts storageWrite error: ".concat(e.message)),t(e)}}},{key:"storageRead",value:function(e){if(!1===this._StorageKey)return e(null,[]);try{if("undefined"!=typeof localStorage){var t=localStorage.getItem(this._StorageKey);if(t){var o=JSON.parse(t);if(Array.isArray(o))return e(null,o)}}return e(null,[])}catch(t){return this.log.warn("PictProviderFlowLayouts storageRead error: ".concat(t.message)),e(t,[])}}},{key:"storageDelete",value:function(e){if(!1===this._StorageKey)return e(null);try{return"undefined"!=typeof localStorage&&localStorage.removeItem(this._StorageKey),e(null)}catch(t){return this.log.warn("PictProviderFlowLayouts storageDelete error: ".concat(t.message)),e(t)}}},{key:"loadPersistedLayouts",value:function(){var e=this;this.storageRead(function(t,o){if(!t&&Array.isArray(o)&&0!==o.length&&e._FlowView&&e._FlowView._FlowData){for(var n=e._FlowView._FlowData.SavedLayouts,i={},r=0;r<n.length;r++)i[n[r].Hash]=!0;for(var a=0,l=0;l<o.length;l++)i[o[l].Hash]||(n.push(o[l]),a++);a>0&&e.log.trace("PictProviderFlowLayouts loaded ".concat(a," persisted layout(s)"))}})}},{key:"saveLayout",value:function(e){var t=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts saveLayout: no FlowView reference"),null;for(var o=this._FlowView._FlowData,n="layout-".concat(this.fable.getUUID()),i={},r={},a=0;a<o.Nodes.length;a++){var l=o.Nodes[a];i[l.Hash]={X:l.X,Y:l.Y,Width:l.Width,Height:l.Height,Title:l.Title},l.Style&&Object.keys(l.Style).length>0&&(i[l.Hash].Style=JSON.parse(JSON.stringify(l.Style)))}for(var s=0;s<o.OpenPanels.length;s++){var c=o.OpenPanels[s];r[c.NodeHash]={X:c.X,Y:c.Y,Width:c.Width,Height:c.Height}}var d={Hash:n,Name:e||"Untitled Layout",CreatedAt:(new Date).toISOString(),NodePositions:i,PanelPositions:r,ViewState:{PanX:o.ViewState.PanX,PanY:o.ViewState.PanY,Zoom:o.ViewState.Zoom}};return o.SavedLayouts.push(d),this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(e){e&&t.log.warn("PictProviderFlowLayouts: failed to persist after save: ".concat(e.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutSaved",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts saved layout '".concat(d.Name,"' (").concat(d.Hash,")")),d}},{key:"restoreLayout",value:function(e){if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts restoreLayout: no FlowView reference"),!1;var t=this._FlowView._FlowData,o=t.SavedLayouts.find(function(t){return t.Hash===e});if(!o)return this.log.warn("PictProviderFlowLayouts restoreLayout: layout '".concat(e,"' not found")),!1;for(var n=[],i=[],r=0;r<t.Nodes.length;r++){var a=t.Nodes[r],l=o.NodePositions[a.Hash];l?(a.X=l.X,a.Y=l.Y,"number"==typeof l.Width&&(a.Width=l.Width),"number"==typeof l.Height&&(a.Height=l.Height),"string"==typeof l.Title&&(a.Title=l.Title),l.Style&&"object"===_typeof(l.Style)&&(a.Style=JSON.parse(JSON.stringify(l.Style))),n.push(a)):i.push(a)}if(o.PanelPositions)for(var s=0;s<t.OpenPanels.length;s++){var c=t.OpenPanels[s],d=o.PanelPositions[c.NodeHash];d&&(c.X=d.X,c.Y=d.Y,"number"==typeof d.Width&&(c.Width=d.Width),"number"==typeof d.Height&&(c.Height=d.Height))}return i.length>0&&this._FlowView._LayoutService&&this._FlowView._LayoutService.autoLayoutSubset(i,n,t.Connections),o.ViewState&&("number"==typeof o.ViewState.PanX&&(t.ViewState.PanX=o.ViewState.PanX),"number"==typeof o.ViewState.PanY&&(t.ViewState.PanY=o.ViewState.PanY),"number"==typeof o.ViewState.Zoom&&(t.ViewState.Zoom=o.ViewState.Zoom)),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutRestored",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",t)),this.log.trace("PictProviderFlowLayouts restored layout '".concat(o.Name,"' (").concat(o.Hash,")")),!0}},{key:"deleteLayout",value:function(e){var t=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts deleteLayout: no FlowView reference"),!1;var o=this._FlowView._FlowData,n=o.SavedLayouts.findIndex(function(t){return t.Hash===e});if(n<0)return this.log.warn("PictProviderFlowLayouts deleteLayout: layout '".concat(e,"' not found")),!1;var i=o.SavedLayouts.splice(n,1)[0];return this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(e){e&&t.log.warn("PictProviderFlowLayouts: failed to persist after delete: ".concat(e.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutDeleted",i),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts deleted layout '".concat(i.Name,"' (").concat(i.Hash,")")),!0}},{key:"getLayouts",value:function(){return this._FlowView?this._FlowView._FlowData.SavedLayouts:[]}},{key:"getLayout",value:function(e){return this._FlowView&&this._FlowView._FlowData.SavedLayouts.find(function(t){return t.Hash===e})||null}}])}(n);t.exports=r,t.exports.default_configuration=i},{"pict-provider":15}],29:[function(e,t,o){var n=e("pict-provider"),i={default:{Hash:"default",Label:"Default",DefaultWidth:180,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Out"}],ColorRole:"neutral",TitleBarColor:"#2c3e50",BodyStyle:{}},start:{Hash:"start",Label:"Start",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"output",Side:"right",Label:"Out"}],ColorRole:"success",TitleBarColor:"#27ae60",BodyStyle:{fill:"#eafaf1",stroke:"#27ae60"}},end:{Hash:"end",Label:"End",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],ColorRole:"accent",TitleBarColor:"#1abc9c",BodyStyle:{fill:"#e8f8f5",stroke:"#1abc9c"}},halt:{Hash:"halt",Label:"Halt",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],ColorRole:"error",TitleBarColor:"#e74c3c",BodyStyle:{fill:"#fdedec",stroke:"#e74c3c"}},decision:{Hash:"decision",Label:"Decision",DefaultWidth:200,DefaultHeight:100,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Yes"},{Hash:null,Direction:"output",Side:"bottom",Label:"No"}],ColorRole:"warning",TitleBarColor:"#f39c12",BodyStyle:{fill:"#fff9e6",stroke:"#f39c12"}}},r={ProviderIdentifier:"PictProviderFlowNodeTypes"},a=function(e){function t(e,o,n){var a;if(_classCallCheck(this,t),(a=_callSuper(this,t,[e,Object.assign({},r,o),n])).serviceType="PictProviderFlowNodeTypes",a._FlowView=o&&o.FlowView?o.FlowView:null,o&&!1===o.IncludeDefaultNodeTypes?a._NodeTypes={}:a._NodeTypes=JSON.parse(JSON.stringify(i)),o&&o.AdditionalNodeTypes&&"object"===_typeof(o.AdditionalNodeTypes))for(var l=Object.keys(o.AdditionalNodeTypes),s=0;s<l.length;s++){var c=o.AdditionalNodeTypes[l[s]];a._NodeTypes[l[s]]=Object.assign({},a._NodeTypes[l[s]]||{},JSON.parse(JSON.stringify(c))),c.BodyContent&&"function"==typeof c.BodyContent.RenderCallback&&(a._NodeTypes[l[s]].BodyContent||(a._NodeTypes[l[s]].BodyContent={}),a._NodeTypes[l[s]].BodyContent.RenderCallback=c.BodyContent.RenderCallback)}return a}return _inherits(t,e),_createClass(t,[{key:"getNodeType",value:function(e){return this._NodeTypes[e]||this._NodeTypes.default}},{key:"registerNodeType",value:function(e){return e&&e.Hash?(this._NodeTypes[e.Hash]=Object.assign({},this._NodeTypes[e.Hash]||{},e),!0):(this.log.warn("PictProviderFlowNodeTypes registerNodeType: invalid config (missing Hash)"),!1)}},{key:"removeNodeType",value:function(e){return"default"===e?(this.log.warn("PictProviderFlowNodeTypes: cannot remove the default node type"),!1):!!this._NodeTypes[e]&&(delete this._NodeTypes[e],!0)}},{key:"getNodeTypes",value:function(){return JSON.parse(JSON.stringify(this._NodeTypes))}},{key:"getNodeTypeList",value:function(){return Object.keys(this._NodeTypes)}},{key:"getEnabledCards",value:function(){for(var e=[],t=Object.keys(this._NodeTypes),o=0;o<t.length;o++){var n=this._NodeTypes[t[o]];n.CardMetadata&&!1!==n.CardMetadata.Enabled&&e.push(JSON.parse(JSON.stringify(n)))}return e}},{key:"getCardsByCategory",value:function(){for(var e=this.getEnabledCards(),t={},o=0;o<e.length;o++){var n=e[o].CardMetadata&&e[o].CardMetadata.Category?e[o].CardMetadata.Category:"General";t[n]||(t[n]=[]),t[n].push(e[o])}return t}},{key:"isFlowCard",value:function(e){var t=this._NodeTypes[e];return!(!t||!t.CardMetadata)}}])}(n);t.exports=a,t.exports.default_configuration=r,t.exports.DefaultNodeTypes=i},{"pict-provider":15}],30:[function(e,t,o){var n=e("fable-serviceproviderbase"),i={ProviderIdentifier:"PictProviderFlowNoise"},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},i,o),n])).serviceType="PictProviderFlowNoise",r}return _inherits(t,e),_createClass(t,[{key:"hashString",value:function(e){for(var t=5381,o=0;o<e.length;o++)t=(t<<5)+t+e.charCodeAt(o),t&=t;return t>>>0}},{key:"seededRandom",value:function(e){var t=0|e;return function(){t=t+1831565813|0;var e=Math.imul(t^t>>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/4294967296}}},{key:"jitterPoint",value:function(e,t,o,n){return o<=0?{x:e,y:t}:{x:e+o*(n()-.5)*2,y:t+o*(n()-.5)*2}}},{key:"generateBracketPath",value:function(e,t,o,n,i,r){var a=this,l=this.seededRandom(this.hashString(r||"default")),s=o||18,c=e,d=t,p=function(e,t){return a.jitterPoint(e,t,i,l)},h=p(s,0),u=p(0,0),f=p(0,d),g=p(s,d),m=p(c-s,0),v=p(c,0),w=p(c,d),y=p(c-s,d),b="";return b+="M ".concat(h.x.toFixed(1)," ").concat(h.y.toFixed(1)),b+=" L ".concat(u.x.toFixed(1)," ").concat(u.y.toFixed(1)),b+=" L ".concat(f.x.toFixed(1)," ").concat(f.y.toFixed(1)),b+=" L ".concat(g.x.toFixed(1)," ").concat(g.y.toFixed(1)),b+=" M ".concat(m.x.toFixed(1)," ").concat(m.y.toFixed(1)),b+=" L ".concat(v.x.toFixed(1)," ").concat(v.y.toFixed(1)),b+=" L ".concat(w.x.toFixed(1)," ").concat(w.y.toFixed(1)),b+=" L ".concat(y.x.toFixed(1)," ").concat(y.y.toFixed(1))}},{key:"jitterPath",value:function(e,t,o){if(t<=0||!e)return e;var n=this.seededRandom(this.hashString(o||"path")),i=e.match(/[MLCQZmlcqz]|[-+]?[0-9]*\.?[0-9]+/g);if(!i)return e;for(var r=[],a=0;a<i.length;a++)/^[-+]?[0-9]*\.?[0-9]+$/.test(i[a])&&r.push(a);for(var l=0;l<r.length-1;l+=2){var s=r[l],c=r[l+1],d=t;0===l||l>=r.length-2?d=.15*t:(2===l||l>=r.length-4)&&(d=.5*t);var p=parseFloat(i[s]),h=parseFloat(i[c]),u=this.jitterPoint(p,h,d,n);i[s]=u.x.toFixed(1),i[c]=u.y.toFixed(1)}for(var f="",g=0;g<i.length;g++)g>0&&/^[MLCQZmlcqz]$/.test(i[g])?f+=" "+i[g]:f+=g>0?" "+i[g]:i[g];return f}}])}(n);t.exports=r,t.exports.default_configuration=i},{"fable-serviceproviderbase":6}],31:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictProviderFlowPanelChrome",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"createPanelForeignObject",value:function(e,t){var o=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");o.setAttribute("class","pict-flow-panel-foreign-object"),o.setAttribute("data-panel-hash",e.Hash),o.setAttribute("data-node-hash",e.NodeHash),o.setAttribute("x",String(e.X)),o.setAttribute("y",String(e.Y)),o.setAttribute("width",String(e.Width)),o.setAttribute("height",String(e.Height));var n=this._FlowView.pict||this._FlowView.fable,i=e.Title||"Properties",r=n.parseTemplateByHash("Flow-PanelChrome-Template",{Hash:e.Hash,Title:i,FlowViewIdentifier:this._FlowView.options.ViewIdentifier});o.innerHTML=r;var a=o.querySelector(".pict-flow-panel-close-icon");return a&&this._FlowView&&this._FlowView._IconProvider?a.innerHTML=this._FlowView._IconProvider.getIconSVGMarkup("close",12):a&&(a.textContent="✕"),t.appendChild(o),o.querySelector('.pict-flow-panel-tab-pane[data-tab="properties"]')}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],32:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictProviderFlowSVGHelpers",i}return _inherits(t,e),_createClass(t,[{key:"createSVGElement",value:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],33:[function(e,t,o){var n=e("fable-serviceproviderbase"),i={ProviderIdentifier:"PictProviderFlowTheme"},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},i,o),n])).serviceType="PictProviderFlowTheme",r._FlowView=o&&o.FlowView?o.FlowView:null,r._ActiveThemeKey="default",r._NoiseLevel=0,r._Themes={},r._registerBuiltInThemes(),r}return _inherits(t,e),_createClass(t,[{key:"_registerBuiltInThemes",value:function(){this._Themes.default={Key:"default",Label:"Modern",CSSVariables:{},AdditionalCSS:"",NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{}},this._Themes.sketch={Key:"sketch",Label:"Sketch",CSSVariables:{"--pf-node-body-fill":"#fffef5","--pf-node-body-stroke":"#444444","--pf-node-body-stroke-width":"1.5","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"#f0ece0","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#fffef5","--pf-connection-stroke":"#555555","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#fffef5","--pf-grid-stroke":"#e8e4d8","--pf-panel-bg":"#fffef5","--pf-panel-border":"#ccccaa","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.08)","--pf-panel-titlebar-bg":"#f0ece0","--pf-panel-titlebar-border":"#ccccaa","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-panel-title-text,\n\t\t\t\t.pict-flow-panel-node-props-title,\n\t\t\t\t.pict-flow-info-panel {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:20,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.4,MaxJitterPx:4,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#555555"},"arrowhead-connection-selected":{Fill:"#2255aa"}}},this._Themes.blueprint={Key:"blueprint",Label:"Blueprint",CSSVariables:{"--pf-node-body-fill":"rgba(255,255,255,0.05)","--pf-node-body-stroke":"#ffffff","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"rgba(255,255,255,0.1)","--pf-node-type-label-fill":"rgba(255,255,255,0.5)","--pf-node-selected-stroke":"#ffdd44","--pf-port-input-fill":"#88bbff","--pf-port-output-fill":"#88ffbb","--pf-port-stroke":"#1a3a6a","--pf-connection-stroke":"rgba(255,255,255,0.6)","--pf-connection-selected-stroke":"#ffdd44","--pf-canvas-bg":"#1a3a6a","--pf-grid-stroke":"rgba(255,255,255,0.08)","--pf-panel-bg":"#1a3a6a","--pf-panel-border":"rgba(255,255,255,0.3)","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"rgba(255,255,255,0.05)","--pf-panel-titlebar-border":"rgba(255,255,255,0.15)","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 1px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #0d2244;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #142e54;\n\t\t\t\t\tborder-bottom-color: rgba(255,255,255,0.15);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.05);\n\t\t\t\t\tborder-color: rgba(255,255,255,0.2);\n\t\t\t\t\tcolor: var(--theme-color-background-panel, #ffffff);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.1);\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:18,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:"8 4",StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"rgba(255,255,255,0.6)"},"arrowhead-connection-selected":{Fill:"#ffdd44"}}},this._Themes.mono={Key:"mono",Label:"Monochrome",CSSVariables:{"--pf-node-body-fill":"#ffffff","--pf-node-body-stroke":"#000000","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"#000000","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#444444","--pf-port-input-fill":"#000000","--pf-port-output-fill":"#666666","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#000000","--pf-connection-selected-stroke":"#444444","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#eeeeee","--pf-panel-bg":"#ffffff","--pf-panel-border":"#000000","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"#f0f0f0","--pf-panel-titlebar-border":"#000000","--pf-panel-title-color":"#000000"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title {\n\t\t\t\t\tfont-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#000000"},"arrowhead-connection-selected":{Fill:"#444444"}}},this._Themes["retro-80s"]={Key:"retro-80s",Label:"80s Retro",CSSVariables:{"--pf-node-body-fill":"#1a0a2e","--pf-node-body-stroke":"#ff00ff","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(0 0 8px rgba(255,0,255,0.4))","--pf-node-shadow-hover":"drop-shadow(0 0 12px rgba(255,0,255,0.6))","--pf-node-shadow-selected":"drop-shadow(0 0 16px rgba(0,255,255,0.5))","--pf-node-shadow-dragging":"drop-shadow(0 0 20px rgba(255,0,255,0.7))","--pf-node-title-fill":"#00ffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#2a0a4e","--pf-node-type-label-fill":"#ff66ff","--pf-node-selected-stroke":"#00ffff","--pf-port-input-fill":"#ff00ff","--pf-port-output-fill":"#00ff66","--pf-port-stroke":"#1a0a2e","--pf-connection-stroke":"#ff00ff","--pf-connection-selected-stroke":"#00ffff","--pf-canvas-bg":"#0a0015","--pf-grid-stroke":"#1a0a2e","--pf-panel-bg":"#1a0a2e","--pf-panel-border":"#ff00ff","--pf-panel-radius":"0px","--pf-panel-shadow":"0 0 20px rgba(255,0,255,0.3)","--pf-panel-titlebar-bg":"#2a0a4e","--pf-panel-titlebar-border":"#ff00ff","--pf-panel-title-color":"#00ffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 0.5px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-connection {\n\t\t\t\t\tfilter: drop-shadow(0 0 3px rgba(255,0,255,0.4));\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) hue-rotate(180deg) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-bottom-color: #ff00ff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t\tcolor: #00ffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: #2a0a4e;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#ff00ff"},"arrowhead-connection-selected":{Fill:"#00ffff"}}},this._Themes["retro-90s"]={Key:"retro-90s",Label:"90s Retro",CSSVariables:{"--pf-node-body-fill":"#c0c0c0","--pf-node-body-stroke":"#808080","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(2px 2px 0px #404040)","--pf-node-shadow-hover":"drop-shadow(3px 3px 0px #404040)","--pf-node-shadow-selected":"drop-shadow(2px 2px 0px #008080)","--pf-node-shadow-dragging":"drop-shadow(4px 4px 0px #404040)","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#000080","--pf-node-type-label-fill":"#606060","--pf-node-selected-stroke":"#008080","--pf-port-input-fill":"#000080","--pf-port-output-fill":"#008000","--pf-port-stroke":"#c0c0c0","--pf-connection-stroke":"#808080","--pf-connection-selected-stroke":"#008080","--pf-canvas-bg":"#008080","--pf-grid-stroke":"rgba(0,0,0,0.06)","--pf-panel-bg":"#c0c0c0","--pf-panel-border":"#808080","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px #404040","--pf-panel-titlebar-bg":"#000080","--pf-panel-titlebar-border":"#c0c0c0","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "MS Sans Serif", "Arial", sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder-bottom: 2px solid #808080;\n\t\t\t\t\tborder-top: 1px solid var(--theme-color-background-panel, #ffffff);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t\tcolor: var(--theme-color-text-primary, #000000);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: var(--theme-color-border-default, #d0d0d0);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:active {\n\t\t\t\t\tborder-style: inset;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#808080"},"arrowhead-connection-selected":{Fill:"#008080"}}},this._Themes.whiteboard={Key:"whiteboard",Label:"Whiteboard",CSSVariables:{"--pf-node-body-fill":"transparent","--pf-node-body-stroke":"#555555","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"transparent","--pf-node-type-label-fill":"#999999","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#888888","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#f0f0f0","--pf-panel-bg":"#ffffff","--pf-panel-border":"#cccccc","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.06)","--pf-panel-titlebar-bg":"#f8f8f8","--pf-panel-titlebar-border":"#e0e0e0","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t/* Node-type bracket colors — each type gets its own bracket color */\n\t\t\t\t.pict-flow-node-start .pict-flow-node-bracket { stroke: var(--theme-color-status-success, #27ae60); }\n\t\t\t\t.pict-flow-node-end .pict-flow-node-bracket { stroke: #1abc9c; }\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-bracket { stroke: var(--theme-color-status-error, #e74c3c); }\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-bracket { stroke: var(--theme-color-status-warning, #f39c12); }\n\t\t\t\t.pict-flow-node-default .pict-flow-node-bracket { stroke: #3498db; }\n\t\t\t\t.pict-flow-node-action .pict-flow-node-bracket { stroke: #2c3e50; }\n\t\t\t\t/* Override variant rules: no fills/strokes on body rects in whiteboard */\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-start .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-end .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\t\t\tfill: transparent;\n\t\t\t\t\tstroke: transparent;\n\t\t\t\t\tstroke-width: 0;\n\t\t\t\t}\n\t\t\t\t/* Title bar fills transparent too */\n\t\t\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\t\t\tfill: transparent !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: none !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:22,TitleSeparator:!1},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.3,MaxJitterPx:3,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#888888"},"arrowhead-connection-selected":{Fill:"#2255aa"}}}}},{key:"getActiveTheme",value:function(){return this._Themes[this._ActiveThemeKey]||this._Themes.default}},{key:"getActiveThemeKey",value:function(){return this._ActiveThemeKey}},{key:"setTheme",value:function(e){if(!this._Themes[e])return this.log.warn("PictProviderFlowTheme: theme '".concat(e,"' not found")),!1;this._ActiveThemeKey=e;var t=this._Themes[e];return t.NoiseConfig&&"number"==typeof t.NoiseConfig.DefaultLevel?this._NoiseLevel=t.NoiseConfig.DefaultLevel:this._NoiseLevel=0,this._FlowView&&this._FlowView._ConnectorShapesProvider&&(this._FlowView._ConnectorShapesProvider.resetToDefaults(),t.ShapeOverrides&&Object.keys(t.ShapeOverrides).length>0&&this._FlowView._ConnectorShapesProvider.applyThemeOverrides(t.ShapeOverrides)),this.log.trace("PictProviderFlowTheme: switched to '".concat(e,"'")),!0}},{key:"getNoiseLevel",value:function(){return this._NoiseLevel}},{key:"setNoiseLevel",value:function(e){this._NoiseLevel=Math.max(0,Math.min(1,e||0))}},{key:"registerTheme",value:function(e,t){e&&t?(t.Key=e,this._Themes[e]=t):this.log.warn("PictProviderFlowTheme: registerTheme requires key and definition")}},{key:"getThemeKeys",value:function(){return Object.keys(this._Themes)}},{key:"processPathString",value:function(e,t){var o=this.getActiveTheme();if(!(o&&o.NoiseConfig&&o.NoiseConfig.Enabled&&o.NoiseConfig.AffectsConnections))return e;var n=this._NoiseLevel*(o.NoiseConfig.MaxJitterPx||3);return n<=0?e:this._FlowView&&this._FlowView._NoiseProvider?this._FlowView._NoiseProvider.jitterPath(e,n,t):e}},{key:"getNodeNoiseAmplitude",value:function(){var e=this.getActiveTheme();return e&&e.NoiseConfig&&e.NoiseConfig.Enabled&&e.NoiseConfig.AffectsNodes?this._NoiseLevel*(e.NoiseConfig.MaxJitterPx||3):0}}])}(n);t.exports=r,t.exports.default_configuration=i},{"fable-serviceproviderbase":6}],34:[function(e,t,o){t.exports={Name:"Bezier",Label:"Bezier (smooth)",Description:"Smooth cubic curves with side-aware departures.",GeneratePath:function(e){var t=e.Helpers,o=e.Source,n=e.Target,i=e.Connection&&e.Connection.Data||{};if(i.HandleCustomized){var r=t.getBezierHandles(i);if(r.length>0)return t.generateMultiBezier(o,n,r)}return t.generateBezier(o,n)},DefaultParameters:{},ParameterSchema:{}}},{}],35:[function(e,t,o){t.exports={Name:"Orthogonal",Label:"Orthogonal (right-angle)",Description:"Right-angle routing — reads well for DAGs and grids.",GeneratePath:function(e){var t=e.Helpers,o=e.Source,n=e.Target,i=e.Connection&&e.Connection.Data||{},r=null;return i.HandleCustomized&&null!=i.OrthoCorner1X&&(r={corner1:{x:i.OrthoCorner1X,y:i.OrthoCorner1Y},corner2:{x:i.OrthoCorner2X,y:i.OrthoCorner2Y}}),t.generateOrthogonal(o,n,r,i.OrthoMidOffset||0)},DefaultParameters:{},ParameterSchema:{}}},{}],36:[function(e,t,o){var n=e("../layouts/Layout-Coerce.js");t.exports={Name:"OrthogonalSnap",Label:"Orthogonal (snap to grid)",Description:"Right-angle routing; snaps node positions to a grid for cleaner corner alignment. Demonstrates an edge theme that adjusts node placement.",GeneratePath:function(e){var t=e.Helpers,o=e.Source,n=e.Target,i=e.Connection&&e.Connection.Data||{},r=null;return i.HandleCustomized&&null!=i.OrthoCorner1X&&(r={corner1:{x:i.OrthoCorner1X,y:i.OrthoCorner1Y},corner2:{x:i.OrthoCorner2X,y:i.OrthoCorner2Y}}),t.generateOrthogonal(o,n,r,i.OrthoMidOffset||0)},AdjustLayout:function(e,t,o){var i=n.toFloat((o||{}).GridSize,20);if(!(i<=0))for(var r=0;r<e.length;r++){var a=e[r];"number"==typeof a.X&&"number"==typeof a.Y&&(a.X=Math.round(a.X/i)*i,a.Y=Math.round(a.Y/i)*i)}},DefaultParameters:{GridSize:20},ParameterSchema:{GridSize:{Type:"PreciseNumber",Label:"Grid size",Default:20,Min:1,Max:200}}}},{"../layouts/Layout-Coerce.js":43}],37:[function(e,t,o){var n=e("./Edge-PerimeterMath.js");t.exports={Name:"Perimeter-Linear",Label:"Perimeter (linear)",Description:"Each connection exits the node at the perimeter, then runs as a straight line to the other end.",GeneratePath:function(e){var t=e.Source,o=e.Target;return"M ".concat(t.x," ").concat(t.y," L ").concat(o.x," ").concat(o.y)},ResolveAttachment:function(e){return n.resolvePerimeterAttachment(e)},DefaultParameters:{},ParameterSchema:{}}},{"./Edge-PerimeterMath.js":40}],38:[function(e,t,o){var n=e("./Edge-PerimeterMath.js");t.exports={Name:"Perimeter-Orthogonal",Label:"Perimeter (orthogonal)",Description:"Each connection exits the node at the perimeter, then routes via right-angle segments to the other end.",GeneratePath:function(e){var t=e.Connection&&e.Connection.Data||{},o=null;return t.HandleCustomized&&null!=t.OrthoCorner1X&&(o={corner1:{x:t.OrthoCorner1X,y:t.OrthoCorner1Y},corner2:{x:t.OrthoCorner2X,y:t.OrthoCorner2Y}}),e.Helpers.generateOrthogonal(e.Source,e.Target,o,t.OrthoMidOffset||0)},ResolveAttachment:function(e){return n.resolvePerimeterAttachment(e)},DefaultParameters:{},ParameterSchema:{}}},{"./Edge-PerimeterMath.js":40}],39:[function(e,t,o){var n=e("./Edge-PerimeterMath.js");t.exports={Name:"Perimeter",Label:"Perimeter (bezier)",Description:"Each connection exits the node at the perimeter point closest to its target, with smooth bezier curves. Fixes star/hub topologies where many lines share one port.",GeneratePath:function(e){var t=e.Helpers,o=e.Connection&&e.Connection.Data||{};if(o.HandleCustomized){var n=t.getBezierHandles(o);if(n.length>0)return t.generateMultiBezier(e.Source,e.Target,n)}return t.generateBezier(e.Source,e.Target)},ResolveAttachment:function(e){return n.resolvePerimeterAttachment(e)},DefaultParameters:{},ParameterSchema:{}}},{"./Edge-PerimeterMath.js":40}],40:[function(e,t,o){t.exports={resolvePerimeterAttachment:function(e){var t=e.Node;if(!t||"number"!=typeof t.X||"number"!=typeof t.Y)return null;var o,n,i=t.Width||180,r=t.Height||80,a=t.X+i/2,l=t.Y+r/2;if(e.OtherNode&&"number"==typeof e.OtherNode.X){var s=e.OtherNode.Width||180,c=e.OtherNode.Height||80;o=e.OtherNode.X+s/2,n=e.OtherNode.Y+c/2}else{if(!e.OtherDefaultPosition)return null;o=e.OtherDefaultPosition.x,n=e.OtherDefaultPosition.y}var d=o-a,p=n-l;if(0===d&&0===p)return e.DefaultPosition||null;var h,u,f=i/2,g=r/2,m=d>0?f/d:d<0?-f/d:1/0,v=p>0?g/p:p<0?-g/p:1/0;return m<v?(h=m,u=d>0?"right":"left"):(h=v,u=p>0?"bottom":"top"),{x:a+h*d,y:l+h*p,side:u}}}},{}],41:[function(e,t,o){t.exports={Name:"Straight",Label:"Straight line",Description:"Plain straight line between ports.",GeneratePath:function(e){var t=e.Source,o=e.Target;return"M ".concat(t.x," ").concat(t.y," L ").concat(o.x," ").concat(o.y)},DefaultParameters:{},ParameterSchema:{}}},{}],42:[function(e,t,o){var n=e("./Layout-Coerce.js");t.exports={Name:"Circular",Label:"Circular",Description:"Concentric rings; uses connections for ring assignment when available.",DefaultEdgeTheme:"Perimeter",Apply:function(e,t,o){if(e&&0!==e.length){for(var i=o||{},r=n.toFloat(i.Spacing,1),a=n.toFloat(i.CenterX,1e3),l=n.toFloat(i.CenterY,750),s=n.toFloat(i.RingSpacing,220)*r,c=n.toFloat(i.InnerRadius,0)*r,d=n.toFloat(i.StartAngle,-90),p="ccw"===i.Direction?"ccw":"cw",h=Array.isArray(t)?t:[],u={},f={},g={},m=0;m<e.length;m++)g[e[m].Hash]=e[m],u[e[m].Hash]=0,f[e[m].Hash]=[];for(var v=0;v<h.length;v++){var w=h[v];u.hasOwnProperty(w.TargetNodeHash)&&u[w.TargetNodeHash]++,f.hasOwnProperty(w.SourceNodeHash)&&f[w.SourceNodeHash].push(w.TargetNodeHash)}for(var y=[],b=0;b<e.length;b++)0===u[e[b].Hash]&&y.push(e[b].Hash);var S=[];if(0===h.length||0===y.length)S.push(e.map(function(e){return e.Hash}));else{for(var _={},k=y.slice();k.length>0;){for(var P=[],F=[],T=0;T<k.length;T++){var C=k[T];if(!_[C]){_[C]=!0,P.push(C);for(var D=f[C]||[],x=0;x<D.length;x++)_[D[x]]||F.push(D[x])}}P.length>0&&S.push(P),k=F}for(var L=[],A=0;A<e.length;A++)_[e[A].Hash]||L.push(e[A].Hash);L.length>0&&S.push(L)}for(var V="cw"===p?1:-1,H=d*Math.PI/180,M=0;M<S.length;M++){var B=S[M],N=c+M*s;if(1!==B.length||0!==M||0!==c)for(var I=2*Math.PI/B.length,E=0;E<B.length;E++){var R=g[B[E]];if(R){var O=H+V*E*I,z=R.Width||180,j=R.Height||80;R.X=a+Math.cos(O)*N-z/2,R.Y=l+Math.sin(O)*N-j/2}}else{var G=g[B[0]];G&&(G.X=a-(G.Width||180)/2,G.Y=l-(G.Height||80)/2)}}}},DefaultParameters:{Spacing:1,CenterX:1e3,CenterY:750,RingSpacing:220,InnerRadius:0,StartAngle:-90,Direction:"cw"},ParameterSchema:{Spacing:{Type:"PreciseNumber",Label:"Spacing (multiplier)",Default:1,Min:.1,Max:5},CenterX:{Type:"PreciseNumber",Label:"Center X",Default:1e3,Min:-1e4,Max:1e4},CenterY:{Type:"PreciseNumber",Label:"Center Y",Default:750,Min:-1e4,Max:1e4},RingSpacing:{Type:"PreciseNumber",Label:"Ring spacing",Default:220,Min:1,Max:5e3},InnerRadius:{Type:"PreciseNumber",Label:"Inner radius",Default:0,Min:0,Max:5e3},StartAngle:{Type:"PreciseNumber",Label:"Start angle (deg)",Default:-90,Min:-360,Max:360},Direction:{Type:"enum",Label:"Direction",Default:"cw",Options:["cw","ccw"]}},ParameterManifest:{Scope:"PictFlowLayout-Circular",Sections:[{Name:"Circular Parameters",Hash:"PFLCircularSection",Groups:[{Name:"Defaults",Hash:"PFLCircularGroup"}]}],Descriptors:{"PictFlowLayoutEditor.Parameters.Spacing":{Name:"Spacing (multiplier)",Hash:"Spacing",DataType:"PreciseNumber",Default:1,PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:0,Width:12,Min:.1,Max:5}},"PictFlowLayoutEditor.Parameters.CenterX":{Name:"Center X",Hash:"CenterX",DataType:"PreciseNumber",Default:1e3,PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:1,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.CenterY":{Name:"Center Y",Hash:"CenterY",DataType:"PreciseNumber",Default:750,PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:1,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.RingSpacing":{Name:"Ring spacing",Hash:"RingSpacing",DataType:"PreciseNumber",Default:220,PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:2,Width:6,Min:1,Max:5e3}},"PictFlowLayoutEditor.Parameters.InnerRadius":{Name:"Inner radius",Hash:"InnerRadius",DataType:"PreciseNumber",Default:0,PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:2,Width:6,Min:0,Max:5e3}},"PictFlowLayoutEditor.Parameters.StartAngle":{Name:"Start angle (deg)",Hash:"StartAngle",DataType:"PreciseNumber",Default:-90,PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:3,Width:6,Min:-360,Max:360}},"PictFlowLayoutEditor.Parameters.Direction":{Name:"Direction",Hash:"Direction",DataType:"String",Default:"cw",PictForm:{Section:"PFLCircularSection",Group:"PFLCircularGroup",Row:3,Width:6,InputType:"Option",SelectOptions:[{Value:"cw",Name:"Clockwise"},{Value:"ccw",Name:"Counter-clockwise"}]}}}}}},{"./Layout-Coerce.js":43}],43:[function(e,t,o){t.exports={toFloat:function(e,t){if("number"==typeof e&&!isNaN(e))return e;if("string"==typeof e&&""!==e){var o=parseFloat(e);if(!isNaN(o))return o}return t},toInt:function(e,t){if("number"==typeof e&&!isNaN(e))return Math.floor(e);if("string"==typeof e&&""!==e){var o=parseInt(e,10);if(!isNaN(o))return o}return t}}},{}],44:[function(e,t,o){var n=e("./Layout-Coerce.js");t.exports={Name:"Columnar",Label:"Columnar (N Columns)",Description:"Explicit N columns; flow row-first or column-first.",DefaultEdgeTheme:"Orthogonal",Apply:function(e,t,o){if(e&&0!==e.length){for(var i=o||{},r=n.toFloat(i.Spacing,1),a=Math.max(1,n.toInt(i.Columns,3)),l=n.toFloat(i.ColumnSpacing,40)*r,s=n.toFloat(i.RowSpacing,40)*r,c=n.toFloat(i.StartX,100),d=n.toFloat(i.StartY,100),p="column"===i.FillOrder?"column":"row",h=i.OrderBy||"index",u=0,f=0,g=0;g<e.length;g++)u=Math.max(u,e[g].Width||180),f=Math.max(f,e[g].Height||80);var m=u+l,v=f+s,w=e.slice();"hash"===h?w.sort(function(e,t){return String(e.Hash).localeCompare(String(t.Hash))}):"title"===h&&w.sort(function(e,t){return String(e.Title||e.Hash).localeCompare(String(t.Title||t.Hash))});for(var y=Math.ceil(w.length/a),b=0;b<w.length;b++){var S=void 0,_=void 0;"column"===p?(_=Math.floor(b/y),S=b%y):(S=Math.floor(b/a),_=b%a),w[b].X=c+_*m,w[b].Y=d+S*v}}},DefaultParameters:{Spacing:1,Columns:3,ColumnSpacing:40,RowSpacing:40,StartX:100,StartY:100,FillOrder:"row",OrderBy:"index"},ParameterSchema:{Spacing:{Type:"PreciseNumber",Label:"Spacing (multiplier)",Default:1,Min:.1,Max:5},Columns:{Type:"Number",Label:"Columns",Default:3,Min:1,Max:50},ColumnSpacing:{Type:"PreciseNumber",Label:"Column spacing",Default:40,Min:0,Max:1e3},RowSpacing:{Type:"PreciseNumber",Label:"Row spacing",Default:40,Min:0,Max:1e3},StartX:{Type:"PreciseNumber",Label:"Start X",Default:100,Min:-1e4,Max:1e4},StartY:{Type:"PreciseNumber",Label:"Start Y",Default:100,Min:-1e4,Max:1e4},FillOrder:{Type:"enum",Label:"Fill order",Default:"row",Options:["row","column"]},OrderBy:{Type:"enum",Label:"Order by",Default:"index",Options:["index","hash","title"]}},ParameterManifest:{Scope:"PictFlowLayout-Columnar",Sections:[{Name:"Columnar Parameters",Hash:"PFLColumnarSection",Groups:[{Name:"Defaults",Hash:"PFLColumnarGroup"}]}],Descriptors:{"PictFlowLayoutEditor.Parameters.Spacing":{Name:"Spacing (multiplier)",Hash:"Spacing",DataType:"PreciseNumber",Default:1,PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:0,Width:12,Min:.1,Max:5}},"PictFlowLayoutEditor.Parameters.Columns":{Name:"Columns",Hash:"Columns",DataType:"Number",Default:3,PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:1,Width:6,Min:1,Max:50}},"PictFlowLayoutEditor.Parameters.FillOrder":{Name:"Fill order",Hash:"FillOrder",DataType:"String",Default:"row",PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:1,Width:6,InputType:"Option",SelectOptions:[{Value:"row",Name:"Row-first"},{Value:"column",Name:"Column-first"}]}},"PictFlowLayoutEditor.Parameters.ColumnSpacing":{Name:"Column spacing",Hash:"ColumnSpacing",DataType:"PreciseNumber",Default:40,PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:2,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.RowSpacing":{Name:"Row spacing",Hash:"RowSpacing",DataType:"PreciseNumber",Default:40,PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:2,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.StartX":{Name:"Start X",Hash:"StartX",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:3,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.StartY":{Name:"Start Y",Hash:"StartY",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:3,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.OrderBy":{Name:"Order by",Hash:"OrderBy",DataType:"String",Default:"index",PictForm:{Section:"PFLColumnarSection",Group:"PFLColumnarGroup",Row:4,Width:12,InputType:"Option",SelectOptions:[{Value:"index",Name:"Index"},{Value:"hash",Name:"Hash"},{Value:"title",Name:"Title"}]}}}}}},{"./Layout-Coerce.js":43}],45:[function(e,t,o){t.exports={Name:"Custom",Label:"Custom (Hand-placed)",Description:"Preserve hand-placed positions. No automatic arrangement.",DefaultEdgeTheme:"Bezier",Apply:function(e,t,o){},DefaultParameters:{},ParameterSchema:{}}},{}],46:[function(e,t,o){var n=e("./Layout-Coerce.js");t.exports={Name:"ForcedFromCenter",Label:"Forced from Center",Description:"Spring + repulsion simulation pulling toward a center point.",DefaultEdgeTheme:"Bezier",Apply:function(e,t,o){if(e&&0!==e.length){for(var i,r=o||{},a=n.toFloat(r.Spacing,1),l=n.toInt(r.Iterations,200),s=n.toFloat(r.CenterX,1e3),c=n.toFloat(r.CenterY,750),d=n.toFloat(r.SpringLength,200)*a,p=n.toFloat(r.SpringStiffness,.05),h=n.toFloat(r.Repulsion,8e3),u=n.toFloat(r.CenterAttraction,.01),f=n.toFloat(r.CoolingFactor,.95),g=n.toFloat(r.InitialTemperature,100),m=n.toInt(r.Seed,42),v=!!r.PreservePositions,w=n.toFloat(r.InitialSpread,400),y=Array.isArray(t)?t:[],b=(i=m>>>0>>>0,function(){var e=i=i+1831565813>>>0;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/4294967296}),S=0;S<e.length;S++){var _=e[S],k="number"==typeof _.X&&"number"==typeof _.Y;v&&k||(_.X=s+(b()-.5)*w,_.Y=c+(b()-.5)*w)}for(var P={},F=0;F<e.length;F++)P[e[F].Hash]=e[F];for(var T=g,C=0;C<l;C++){for(var D=new Array(e.length).fill(0),x=new Array(e.length).fill(0),L=0;L<e.length;L++)for(var A=e[L],V=L+1;V<e.length;V++){var H=e[V],M=A.X-H.X,B=A.Y-H.Y,N=M*M+B*B;N<1&&(N=1);var I=Math.sqrt(N),E=h/N,R=M/I*E,O=B/I*E;D[L]+=R,x[L]+=O,D[V]-=R,x[V]-=O}for(var z=0;z<y.length;z++){var j=y[z],G=P[j.SourceNodeHash],U=P[j.TargetNodeHash];if(G&&U){var W=e.indexOf(G),X=e.indexOf(U);if(!(W<0||X<0)){var Y=U.X-G.X,q=U.Y-G.Y,J=Math.sqrt(Y*Y+q*q);J<1e-4&&(J=1e-4);var K=p*(J-d),Z=Y/J*K,Q=q/J*K;D[W]+=Z,x[W]+=Q,D[X]-=Z,x[X]-=Q}}}for(var $=0;$<e.length;$++){var ee=e[$];D[$]+=(s-ee.X)*u,x[$]+=(c-ee.Y)*u}for(var te=0;te<e.length;te++){var oe=e[te],ne=D[te],ie=x[te],re=Math.sqrt(ne*ne+ie*ie);re>T&&(ne=ne/re*T,ie=ie/re*T),oe.X+=ne,oe.Y+=ie}T*=f}for(var ae=0;ae<e.length;ae++)e[ae].X=Math.round(e[ae].X),e[ae].Y=Math.round(e[ae].Y)}},DefaultParameters:{Spacing:1,Iterations:200,CenterX:1e3,CenterY:750,SpringLength:200,SpringStiffness:.05,Repulsion:8e3,CenterAttraction:.01,CoolingFactor:.95,InitialTemperature:100,Seed:42,PreservePositions:!1,InitialSpread:400},ParameterSchema:{Spacing:{Type:"PreciseNumber",Label:"Spacing (multiplier)",Default:1,Min:.1,Max:5},Iterations:{Type:"Number",Label:"Iterations",Default:200,Min:1,Max:2e3},CenterX:{Type:"PreciseNumber",Label:"Center X",Default:1e3,Min:-1e4,Max:1e4},CenterY:{Type:"PreciseNumber",Label:"Center Y",Default:750,Min:-1e4,Max:1e4},SpringLength:{Type:"PreciseNumber",Label:"Spring length",Default:200,Min:1,Max:2e3},SpringStiffness:{Type:"PreciseNumber",Label:"Spring stiffness",Default:.05,Min:0,Max:1},Repulsion:{Type:"PreciseNumber",Label:"Repulsion",Default:8e3,Min:0,Max:1e5},CenterAttraction:{Type:"PreciseNumber",Label:"Center attraction",Default:.01,Min:0,Max:1},CoolingFactor:{Type:"PreciseNumber",Label:"Cooling factor",Default:.95,Min:.5,Max:1},InitialTemperature:{Type:"PreciseNumber",Label:"Initial temperature",Default:100,Min:1,Max:1e3},Seed:{Type:"Number",Label:"Random seed",Default:42,Min:0,Max:2147483647},PreservePositions:{Type:"boolean",Label:"Preserve positions",Default:!1},InitialSpread:{Type:"PreciseNumber",Label:"Initial spread",Default:400,Min:0,Max:5e3}},ParameterManifest:{Scope:"PictFlowLayout-ForcedFromCenter",Sections:[{Name:"Center",Hash:"PFLCenterSection",Groups:[{Name:"Defaults",Hash:"PFLCenterGroup"}]},{Name:"Forces",Hash:"PFLForcesSection",Groups:[{Name:"Defaults",Hash:"PFLForcesGroup"}]},{Name:"Simulation",Hash:"PFLSimSection",Groups:[{Name:"Defaults",Hash:"PFLSimGroup"}]},{Name:"Initialization",Hash:"PFLInitSection",Groups:[{Name:"Defaults",Hash:"PFLInitGroup"}]}],Descriptors:{"PictFlowLayoutEditor.Parameters.Spacing":{Name:"Spacing (multiplier)",Hash:"Spacing",DataType:"PreciseNumber",Default:1,PictForm:{Section:"PFLCenterSection",Group:"PFLCenterGroup",Row:0,Width:12,Min:.1,Max:5}},"PictFlowLayoutEditor.Parameters.CenterX":{Name:"Center X",Hash:"CenterX",DataType:"PreciseNumber",Default:1e3,PictForm:{Section:"PFLCenterSection",Group:"PFLCenterGroup",Row:1,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.CenterY":{Name:"Center Y",Hash:"CenterY",DataType:"PreciseNumber",Default:750,PictForm:{Section:"PFLCenterSection",Group:"PFLCenterGroup",Row:1,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.CenterAttraction":{Name:"Center attraction",Hash:"CenterAttraction",DataType:"PreciseNumber",Default:.01,PictForm:{Section:"PFLCenterSection",Group:"PFLCenterGroup",Row:2,Width:12,Min:0,Max:1}},"PictFlowLayoutEditor.Parameters.SpringLength":{Name:"Spring length",Hash:"SpringLength",DataType:"PreciseNumber",Default:200,PictForm:{Section:"PFLForcesSection",Group:"PFLForcesGroup",Row:1,Width:6,Min:1,Max:2e3}},"PictFlowLayoutEditor.Parameters.SpringStiffness":{Name:"Spring stiffness",Hash:"SpringStiffness",DataType:"PreciseNumber",Default:.05,PictForm:{Section:"PFLForcesSection",Group:"PFLForcesGroup",Row:1,Width:6,Min:0,Max:1}},"PictFlowLayoutEditor.Parameters.Repulsion":{Name:"Repulsion",Hash:"Repulsion",DataType:"PreciseNumber",Default:8e3,PictForm:{Section:"PFLForcesSection",Group:"PFLForcesGroup",Row:2,Width:12,Min:0,Max:1e5}},"PictFlowLayoutEditor.Parameters.Iterations":{Name:"Iterations",Hash:"Iterations",DataType:"Number",Default:200,PictForm:{Section:"PFLSimSection",Group:"PFLSimGroup",Row:1,Width:6,Min:1,Max:2e3}},"PictFlowLayoutEditor.Parameters.CoolingFactor":{Name:"Cooling factor",Hash:"CoolingFactor",DataType:"PreciseNumber",Default:.95,PictForm:{Section:"PFLSimSection",Group:"PFLSimGroup",Row:1,Width:6,Min:.5,Max:1}},"PictFlowLayoutEditor.Parameters.InitialTemperature":{Name:"Initial temperature",Hash:"InitialTemperature",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLSimSection",Group:"PFLSimGroup",Row:2,Width:12,Min:1,Max:1e3}},"PictFlowLayoutEditor.Parameters.Seed":{Name:"Random seed",Hash:"Seed",DataType:"Number",Default:42,PictForm:{Section:"PFLInitSection",Group:"PFLInitGroup",Row:1,Width:6,Min:0,Max:2147483647}},"PictFlowLayoutEditor.Parameters.InitialSpread":{Name:"Initial spread",Hash:"InitialSpread",DataType:"PreciseNumber",Default:400,PictForm:{Section:"PFLInitSection",Group:"PFLInitGroup",Row:1,Width:6,Min:0,Max:5e3}},"PictFlowLayoutEditor.Parameters.PreservePositions":{Name:"Preserve existing positions",Hash:"PreservePositions",DataType:"Boolean",Default:!1,PictForm:{Section:"PFLInitSection",Group:"PFLInitGroup",Row:2,Width:12,InputType:"Boolean"}}}}}},{"./Layout-Coerce.js":43}],47:[function(e,t,o){var n=e("./Layout-Coerce.js");t.exports={Name:"Grid",Label:"Grid",Description:"Auto-arrange in a roughly-square grid.",DefaultEdgeTheme:"Orthogonal",Apply:function(e,t,o){if(e&&0!==e.length){var i,r=o||{},a=n.toFloat(r.Spacing,1),l=r.Columns,s=r.CellWidth,c=r.CellHeight,d=n.toFloat(r.HorizontalMargin,40)*a,p=n.toFloat(r.VerticalMargin,40)*a,h=n.toFloat(r.StartX,100),u=n.toFloat(r.StartY,100),f=r.OrderBy||"index";i="auto"===l||null==l||""===l?Math.max(1,Math.ceil(Math.sqrt(e.length))):Math.max(1,n.toInt(l,Math.max(1,Math.ceil(Math.sqrt(e.length)))));for(var g=0,m=0,v=0;v<e.length;v++)g=Math.max(g,e[v].Width||180),m=Math.max(m,e[v].Height||80);var w=null==s?g+d:n.toFloat(s,g+d),y=null==c?m+p:n.toFloat(c,m+p),b=e.slice();"hash"===f?b.sort(function(e,t){return String(e.Hash).localeCompare(String(t.Hash))}):"title"===f&&b.sort(function(e,t){return String(e.Title||e.Hash).localeCompare(String(t.Title||t.Hash))});for(var S=0;S<b.length;S++){var _=Math.floor(S/i),k=S%i;b[S].X=h+k*w,b[S].Y=u+_*y}}},DefaultParameters:{Spacing:1,Columns:"auto",HorizontalMargin:40,VerticalMargin:40,StartX:100,StartY:100,OrderBy:"index"},ParameterSchema:{Spacing:{Type:"PreciseNumber",Label:"Spacing (multiplier)",Default:1,Min:.1,Max:5},Columns:{Type:"string",Label:"Columns",Default:"auto",Description:'"auto" or an integer'},CellWidth:{Type:"PreciseNumber",Label:"Cell width",Description:"Defaults to largest node width + horizontal margin",Min:1,Max:5e3},CellHeight:{Type:"PreciseNumber",Label:"Cell height",Description:"Defaults to largest node height + vertical margin",Min:1,Max:5e3},HorizontalMargin:{Type:"PreciseNumber",Label:"Horizontal margin",Default:40,Min:0,Max:1e3},VerticalMargin:{Type:"PreciseNumber",Label:"Vertical margin",Default:40,Min:0,Max:1e3},StartX:{Type:"PreciseNumber",Label:"Start X",Default:100,Min:-1e4,Max:1e4},StartY:{Type:"PreciseNumber",Label:"Start Y",Default:100,Min:-1e4,Max:1e4},OrderBy:{Type:"enum",Label:"Order by",Default:"index",Options:["index","hash","title"]}},ParameterManifest:{Scope:"PictFlowLayout-Grid",Sections:[{Name:"Grid Parameters",Hash:"PFLGridSection",Groups:[{Name:"Defaults",Hash:"PFLGridGroup"}]}],Descriptors:{"PictFlowLayoutEditor.Parameters.Spacing":{Name:"Spacing (multiplier)",Hash:"Spacing",DataType:"PreciseNumber",Default:1,PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:0,Width:12,Min:.1,Max:5}},"PictFlowLayoutEditor.Parameters.Columns":{Name:'Columns ("auto" or integer)',Hash:"Columns",DataType:"String",Default:"auto",PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:1,Width:6}},"PictFlowLayoutEditor.Parameters.OrderBy":{Name:"Order by",Hash:"OrderBy",DataType:"String",Default:"index",PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:1,Width:6,InputType:"Option",SelectOptions:[{Value:"index",Name:"Index"},{Value:"hash",Name:"Hash"},{Value:"title",Name:"Title"}]}},"PictFlowLayoutEditor.Parameters.CellWidth":{Name:"Cell width (auto = blank)",Hash:"CellWidth",DataType:"PreciseNumber",PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:2,Width:6,Min:1,Max:5e3}},"PictFlowLayoutEditor.Parameters.CellHeight":{Name:"Cell height (auto = blank)",Hash:"CellHeight",DataType:"PreciseNumber",PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:2,Width:6,Min:1,Max:5e3}},"PictFlowLayoutEditor.Parameters.HorizontalMargin":{Name:"Horizontal margin",Hash:"HorizontalMargin",DataType:"PreciseNumber",Default:40,PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:3,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.VerticalMargin":{Name:"Vertical margin",Hash:"VerticalMargin",DataType:"PreciseNumber",Default:40,PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:3,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.StartX":{Name:"Start X",Hash:"StartX",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:4,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.StartY":{Name:"Start Y",Hash:"StartY",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLGridSection",Group:"PFLGridGroup",Row:4,Width:6,Min:-1e4,Max:1e4}}}}}},{"./Layout-Coerce.js":43}],48:[function(e,t,o){var n=e("./Layout-Coerce.js");t.exports={Name:"Layered",Label:"Layered (Topological)",Description:"Left-to-right layers based on connection topology.",DefaultEdgeTheme:"Orthogonal",Apply:function(e,t,o){if(e&&0!==e.length){for(var i=o||{},r=n.toFloat(i.Spacing,1),a=n.toFloat(i.HorizontalSpacing,250)*r,l=n.toFloat(i.VerticalSpacing,120)*r,s=n.toFloat(i.StartX,100),c=n.toFloat(i.StartY,100),d=Array.isArray(t)?t:[],p={},h={},u={},f=0;f<e.length;f++){var g=e[f];p[g.Hash]=g,h[g.Hash]=0,u[g.Hash]=[]}for(var m=0;m<d.length;m++){var v=d[m];h.hasOwnProperty(v.TargetNodeHash)&&h[v.TargetNodeHash]++,u.hasOwnProperty(v.SourceNodeHash)&&u[v.SourceNodeHash].push(v.TargetNodeHash)}var w=[],y=[],b={};for(var S in h)0===h[S]&&y.push(S);for(;y.length>0;){for(var _=[],k=[],P=0;P<y.length;P++){var F=y[P];if(!b[F]){b[F]=!0,_.push(F);for(var T=u[F]||[],C=0;C<T.length;C++){var D=T[C];h[D]--,h[D]<=0&&!b[D]&&k.push(D)}}}_.length>0&&w.push(_),y=k}for(var x=[],L=0;L<e.length;L++)b[e[L].Hash]||x.push(e[L].Hash);x.length>0&&w.push(x);for(var A=s,V=0;V<w.length;V++){for(var H=w[V],M=0,B=c,N=0;N<H.length;N++){var I=p[H[N]];if(I){I.X=A,I.Y=B;var E=I.Width||180,R=I.Height||80;M=Math.max(M,E),B+=R+l}}A+=M+a}}},DefaultParameters:{Spacing:1,HorizontalSpacing:250,VerticalSpacing:120,StartX:100,StartY:100},ParameterSchema:{Spacing:{Type:"PreciseNumber",Label:"Spacing (multiplier)",Default:1,Min:.1,Max:5},HorizontalSpacing:{Type:"PreciseNumber",Label:"Horizontal spacing",Default:250,Min:0,Max:1e3},VerticalSpacing:{Type:"PreciseNumber",Label:"Vertical spacing",Default:120,Min:0,Max:1e3},StartX:{Type:"PreciseNumber",Label:"Start X",Default:100,Min:-1e4,Max:1e4},StartY:{Type:"PreciseNumber",Label:"Start Y",Default:100,Min:-1e4,Max:1e4}},ParameterManifest:{Scope:"PictFlowLayout-Layered",Sections:[{Name:"Layered Parameters",Hash:"PictFlowLayoutSection",Groups:[{Name:"Defaults",Hash:"PictFlowLayoutGroup"}]}],Descriptors:{"PictFlowLayoutEditor.Parameters.Spacing":{Name:"Spacing (multiplier)",Hash:"Spacing",DataType:"PreciseNumber",Default:1,PictForm:{Section:"PictFlowLayoutSection",Group:"PictFlowLayoutGroup",Row:0,Width:12,Min:.1,Max:5}},"PictFlowLayoutEditor.Parameters.HorizontalSpacing":{Name:"Horizontal spacing",Hash:"HorizontalSpacing",DataType:"PreciseNumber",Default:250,PictForm:{Section:"PictFlowLayoutSection",Group:"PictFlowLayoutGroup",Row:1,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.VerticalSpacing":{Name:"Vertical spacing",Hash:"VerticalSpacing",DataType:"PreciseNumber",Default:120,PictForm:{Section:"PictFlowLayoutSection",Group:"PictFlowLayoutGroup",Row:1,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.StartX":{Name:"Start X",Hash:"StartX",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PictFlowLayoutSection",Group:"PictFlowLayoutGroup",Row:2,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.StartY":{Name:"Start Y",Hash:"StartY",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PictFlowLayoutSection",Group:"PictFlowLayoutGroup",Row:2,Width:6,Min:-1e4,Max:1e4}}}}}},{"./Layout-Coerce.js":43}],49:[function(e,t,o){var n=e("./Layout-Coerce.js");t.exports={Name:"Tabular",Label:"Tabular (Top-to-Bottom)",Description:"Single column, top-to-bottom.",DefaultEdgeTheme:"Orthogonal",Apply:function(e,t,o){if(e&&0!==e.length){var i=o||{},r=n.toFloat(i.Spacing,1),a=n.toFloat(i.StartX,100),l=n.toFloat(i.StartY,100),s=n.toFloat(i.VerticalSpacing,40)*r,c=i.RowHeight,d=i.OrderBy||"index",p=e.slice();"hash"===d?p.sort(function(e,t){return String(e.Hash).localeCompare(String(t.Hash))}):"title"===d&&p.sort(function(e,t){return String(e.Title||e.Hash).localeCompare(String(t.Title||t.Hash))});for(var h=l,u=0;u<p.length;u++){var f=p[u];f.X=a,f.Y=h,h+=(null==c?f.Height||80:n.toFloat(c,f.Height||80))+s}}},DefaultParameters:{Spacing:1,StartX:100,StartY:100,VerticalSpacing:40,OrderBy:"index"},ParameterSchema:{Spacing:{Type:"PreciseNumber",Label:"Spacing (multiplier)",Default:1,Min:.1,Max:5},StartX:{Type:"PreciseNumber",Label:"Start X",Default:100,Min:-1e4,Max:1e4},StartY:{Type:"PreciseNumber",Label:"Start Y",Default:100,Min:-1e4,Max:1e4},VerticalSpacing:{Type:"PreciseNumber",Label:"Vertical spacing",Default:40,Min:0,Max:1e3},RowHeight:{Type:"PreciseNumber",Label:"Row height",Description:"Defaults to each node's own height",Min:1,Max:5e3},OrderBy:{Type:"enum",Label:"Order by",Default:"index",Options:["index","hash","title"]}},ParameterManifest:{Scope:"PictFlowLayout-Tabular",Sections:[{Name:"Tabular Parameters",Hash:"PFLTabularSection",Groups:[{Name:"Defaults",Hash:"PFLTabularGroup"}]}],Descriptors:{"PictFlowLayoutEditor.Parameters.Spacing":{Name:"Spacing (multiplier)",Hash:"Spacing",DataType:"PreciseNumber",Default:1,PictForm:{Section:"PFLTabularSection",Group:"PFLTabularGroup",Row:0,Width:12,Min:.1,Max:5}},"PictFlowLayoutEditor.Parameters.StartX":{Name:"Start X",Hash:"StartX",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLTabularSection",Group:"PFLTabularGroup",Row:1,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.StartY":{Name:"Start Y",Hash:"StartY",DataType:"PreciseNumber",Default:100,PictForm:{Section:"PFLTabularSection",Group:"PFLTabularGroup",Row:1,Width:6,Min:-1e4,Max:1e4}},"PictFlowLayoutEditor.Parameters.VerticalSpacing":{Name:"Vertical spacing",Hash:"VerticalSpacing",DataType:"PreciseNumber",Default:40,PictForm:{Section:"PFLTabularSection",Group:"PFLTabularGroup",Row:2,Width:6,Min:0,Max:1e3}},"PictFlowLayoutEditor.Parameters.RowHeight":{Name:"Row height (auto = blank)",Hash:"RowHeight",DataType:"PreciseNumber",PictForm:{Section:"PFLTabularSection",Group:"PFLTabularGroup",Row:2,Width:6,Min:1,Max:5e3}},"PictFlowLayoutEditor.Parameters.OrderBy":{Name:"Order by",Hash:"OrderBy",DataType:"String",Default:"index",PictForm:{Section:"PFLTabularSection",Group:"PFLTabularGroup",Row:3,Width:12,InputType:"Option",SelectOptions:[{Value:"index",Name:"Index"},{Value:"hash",Name:"Hash"},{Value:"title",Name:"Title"}]}}}}}},{"./Layout-Coerce.js":43}],50:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowConnectionHandleManager",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"updateConnectionHandle",value:function(e,t,o,n){if(this._FlowView){var i=this._FlowView.getConnection(e);if(i){if(i.Data||(i.Data={}),i.Data.HandleCustomized=!0,t&&t.startsWith("bezier-handle-")){var r=parseInt(t.replace("bezier-handle-",""),10);return!isNaN(r)&&Array.isArray(i.Data.BezierHandles)&&r<i.Data.BezierHandles.length&&(i.Data.BezierHandles[r].x=o,i.Data.BezierHandles[r].y=n),void this._FlowView._renderSingleConnection(e)}switch(t){case"bezier-midpoint":Array.isArray(i.Data.BezierHandles)&&0!==i.Data.BezierHandles.length?(i.Data.BezierHandles[0].x=o,i.Data.BezierHandles[0].y=n):i.Data.BezierHandles=[{x:o,y:n}],i.Data.BezierHandleX=o,i.Data.BezierHandleY=n;break;case"ortho-corner1":i.Data.OrthoCorner1X=o,i.Data.OrthoCorner1Y=n;break;case"ortho-corner2":i.Data.OrthoCorner2X=o,i.Data.OrthoCorner2Y=n;break;case"ortho-midpoint":var a=this._FlowView.getPortPosition(i.SourceNodeHash,i.SourcePortHash),l=this._FlowView.getPortPosition(i.TargetNodeHash,i.TargetPortHash);if(a&&l){var s=this._FlowView._ConnectionRenderer._computeDirectionalGeometry(a,l),c=s.startDir;if(Math.abs(c.dx)>Math.abs(c.dy)){var d=(s.departX+s.approachX)/2;i.Data.OrthoMidOffset=o-d}else{var p=(s.departY+s.approachY)/2;i.Data.OrthoMidOffset=n-p}}}this._FlowView._renderSingleConnection(e)}}}},{key:"addConnectionHandle",value:function(e,t,o){if(this._FlowView){var n=this._FlowView.getConnection(e);if(n){n.Data||(n.Data={}),Array.isArray(n.Data.BezierHandles)||(n.Data.BezierHandles=[],null!=n.Data.BezierHandleX&&null!=n.Data.BezierHandleY&&n.Data.BezierHandles.push({x:n.Data.BezierHandleX,y:n.Data.BezierHandleY})),n.Data.LineMode="bezier";var i=this._FlowView.getPortPosition(n.SourceNodeHash,n.SourcePortHash),r=this._FlowView.getPortPosition(n.TargetNodeHash,n.TargetPortHash),a=0;i&&r&&this._FlowView._ConnectionRenderer&&(a=this._FlowView._ConnectionRenderer.computeInsertionIndex(n.Data.BezierHandles,{x:t,y:o},i,r)),n.Data.BezierHandles.splice(a,0,{x:t,y:o}),n.Data.HandleCustomized=!0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"removeConnectionHandle",value:function(e,t){if(this._FlowView){var o=this._FlowView.getConnection(e);o&&o.Data&&Array.isArray(o.Data.BezierHandles)&&(t<0||t>=o.Data.BezierHandles.length||(o.Data.BezierHandles.splice(t,1),0===o.Data.BezierHandles.length&&(o.Data.HandleCustomized=!1,o.Data.BezierHandleX=null,o.Data.BezierHandleY=null),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)))}}},{key:"resetHandlesForNode",value:function(e){if(this._FlowView){for(var t=0;t<this._FlowView._FlowData.Connections.length;t++){var o=this._FlowView._FlowData.Connections[t];o.SourceNodeHash!==e&&o.TargetNodeHash!==e||o.Data&&o.Data.HandleCustomized&&(o.Data.HandleCustomized=!1,o.Data.BezierHandles=[],o.Data.BezierHandleX=null,o.Data.BezierHandleY=null,o.Data.OrthoCorner1X=null,o.Data.OrthoCorner1Y=null,o.Data.OrthoCorner2X=null,o.Data.OrthoCorner2Y=null,o.Data.OrthoMidOffset=0)}this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlesForNode(this._FlowView._FlowData.OpenPanels,e)}}},{key:"resetHandlesForPanel",value:function(e){if(this._FlowView){var t=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e});t&&this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlePositions(t)}}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],51:[function(e,t,o){var n=e("fable-serviceproviderbase"),i=e("../providers/edges/Edge-PerimeterMath.js"),r={"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"},a=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowConnectionRenderer",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"renderConnection",value:function(e,t,o){if(this._FlowView){var n=this._FlowView.getPortPosition(e.SourceNodeHash,e.SourcePortHash),i=this._FlowView.getPortPosition(e.TargetNodeHash,e.TargetPortHash),r=n,a=i,l=this._resolveAttachmentsViaEdgeTheme(e,n,i);l.source&&(n=l.source),l.target&&(i=l.target);var s=null,c=this._FlowView.getNode(e.SourceNodeHash);if(c&&c.Ports)for(var d=0;d<c.Ports.length;d++)if(c.Ports[d].Hash===e.SourcePortHash){s=c.Ports[d].PortType||null;break}if(n&&i){var p=e.Data||{},h=this._generatePathViaEdgeTheme(e,n,i,p);this._FlowView._ThemeProvider&&(h=this._FlowView._ThemeProvider.processPathString(h,e.Hash));var u=null;if(this._FlowView._ThemeProvider){var f=this._FlowView._ThemeProvider.getActiveTheme();f&&f.ConnectionConfig&&f.ConnectionConfig.StrokeDashArray&&(u=f.ConnectionConfig.StrokeDashArray)}var g,m=this._FlowView.options.ViewIdentifier,v=s?" conn-type-"+s:"";g=o?"flow-arrowhead-selected-"+m:s?"flow-arrowhead-"+s+"-"+m:"flow-arrowhead-"+m;var w=this._FlowView._ConnectorShapesProvider;if(w){var y=w.createConnectionHitAreaElement(h,e.Hash);t.appendChild(y);var b=w.createConnectionPathElement(h,e.Hash,o,m);v&&b.setAttribute("class",(b.getAttribute("class")||"")+v),b.setAttribute("marker-end","url(#"+g+")"),u&&b.setAttribute("stroke-dasharray",u),t.appendChild(b)}else{var S=this._FlowView._SVGHelperProvider.createSVGElement("path");S.setAttribute("class","pict-flow-connection-hitarea"),S.setAttribute("d",h),S.setAttribute("data-connection-hash",e.Hash),S.setAttribute("data-element-type","connection-hitarea"),t.appendChild(S);var _=this._FlowView._SVGHelperProvider.createSVGElement("path");_.setAttribute("class","pict-flow-connection".concat(v," ").concat(o?"selected":"")),_.setAttribute("d",h),_.setAttribute("data-connection-hash",e.Hash),_.setAttribute("data-element-type","connection"),_.setAttribute("marker-end","url(#"+g+")"),u&&_.setAttribute("stroke-dasharray",u),t.appendChild(_)}var k=this._FlowView._EndpointsLayer||t;this._renderEndpointDots(e,k,n,i),this._FlowView._PortHintsLayer&&this._renderPortHints(e,this._FlowView._PortHintsLayer,r,n,a,i),o&&this._renderHandles(e,t,n,i)}}}},{key:"_renderEndpointDots",value:function(e,t,o,n){var i=this._FlowView._ConnectorShapesProvider;if(i){var r=this._FlowView.getNode(e.SourceNodeHash),a=this._FlowView.getNode(e.TargetNodeHash),l=this._findPort(r,e.SourcePortHash),s=this._findPort(a,e.TargetPortHash);if(l&&o){var c=i.createPortElement(l,o,e.SourceNodeHash);c.setAttribute("data-connection-hash",e.Hash),c.setAttribute("data-connection-end","source"),t.appendChild(c)}if(s&&n){var d=i.createPortElement(s,n,e.TargetNodeHash);d.setAttribute("data-connection-hash",e.Hash),d.setAttribute("data-connection-end","target"),t.appendChild(d)}}}},{key:"_renderPortHints",value:function(e,t,o,n,i,r){var a=function(e,t){return!(!e||!t)&&(Math.abs(e.x-t.x)>.5||Math.abs(e.y-t.y)>.5)},l=this._FlowView.getNode(e.SourceNodeHash),s=this._FlowView.getNode(e.TargetNodeHash),c=this._findPort(l,e.SourcePortHash),d=this._findPort(s,e.TargetPortHash);if(o&&a(o,n)){var p=this._chipEdgeAimingAt(c,o,n);t.appendChild(this._buildPortHintPath(p,n,e.SourceNodeHash,e.SourcePortHash,e.Hash,"source",this._hintColor(c,s)))}if(i&&a(i,r)){var h=this._chipEdgeAimingAt(d,i,r);t.appendChild(this._buildPortHintPath(h,r,e.TargetNodeHash,e.TargetPortHash,e.Hash,"target",this._hintColor(d,l)))}}},{key:"_chipBoundsFor",value:function(e,t){if(!e||!t)return null;var o=t.side||e.Side||("input"===e.Direction?"left":"right"),n=e.Label||"";if(""===n)return null;var i,r,a=10+5*n.length+5+2;if(0===o.indexOf("left"))i=t.x+a/2+1,r=t.y;else if(0===o.indexOf("right"))i=t.x-a/2-1,r=t.y;else if(0===o.indexOf("top"))i=t.x,r=t.y+6+1;else{if(0!==o.indexOf("bottom"))return null;i=t.x,r=t.y-6-1}return{X:i-a/2,Y:r-6,Width:a,Height:12}}},{key:"_chipEdgeAimingAt",value:function(e,t,o){var n=this._chipBoundsFor(e,t);if(!n)return t;var r=i.resolvePerimeterAttachment({Node:n,OtherDefaultPosition:o});return r||t}},{key:"_resolveNodeIdentityColor",value:function(e){if(!e)return null;if(e.TitleBarColor)return e.TitleBarColor;if(e.BodyStyle&&e.BodyStyle.stroke)return e.BodyStyle.stroke;var t=this._FlowView?this._FlowView._NodeTypeProvider:null;if(t&&"function"==typeof t.getNodeType&&e.Type){var o=t.getNodeType(e.Type);if(o){if(o.TitleBarColor)return o.TitleBarColor;if(o.BodyStyle&&o.BodyStyle.stroke)return o.BodyStyle.stroke}}return null}},{key:"_hintColor",value:function(e,t){var o=this._resolveNodeIdentityColor(t);return o||(e&&e.PortType&&r[e.PortType]?r[e.PortType]:e&&"input"===e.Direction?r["event-in"]:e&&"output"===e.Direction?r["event-out"]:"#95a5a6")}},{key:"_buildPortHintPath",value:function(e,t,o,n,i,r,a){var l=this._FlowView._SVGHelperProvider.createSVGElement("path"),s=t.x-e.x,c=t.y-e.y,d=Math.sqrt(s*s+c*c),p=Math.min(60,.35*d),h=d>0?-c/d:0,u=d>0?s/d:0,f=e.x+.35*s+h*p*.3,g=e.y+.35*c+u*p*.3,m=e.x+.65*s+h*p*.3,v=e.y+.65*c+u*p*.3,w="M ".concat(e.x," ").concat(e.y," C ").concat(f," ").concat(g," ").concat(m," ").concat(v," ").concat(t.x," ").concat(t.y);return l.setAttribute("class","pict-flow-port-hint"),l.setAttribute("d",w),l.setAttribute("data-node-hash",o),l.setAttribute("data-port-hash",n),l.setAttribute("data-connection-hash",i),l.setAttribute("data-connection-end",r),a&&l.setAttribute("stroke",a),l}},{key:"_computeDirectionalGeometry",value:function(e,t){return this._FlowView._PathGenerator.computeDirectionalGeometry(e,t)}},{key:"_generateDirectionalPath",value:function(e,t){var o=this._computeDirectionalGeometry(e,t);return this._FlowView._PathGenerator.buildBezierPathString({x:e.x,y:e.y},{x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},{x:t.x,y:t.y})}},{key:"_generatePathViaEdgeTheme",value:function(e,t,o,n){var i=this._FlowView?this._FlowView._LayoutService:null,r=i&&"function"==typeof i.resolveActiveEdgeTheme?i.resolveActiveEdgeTheme(e):null;if(!r||"function"!=typeof r.GeneratePath)return this._builtInPathFallback(t,o,n);var a={Source:t,Target:o,Connection:e,AllNodes:this._FlowView._FlowData?this._FlowView._FlowData.Nodes:[],AllConnections:this._FlowView._FlowData?this._FlowView._FlowData.Connections:[],FlowView:this._FlowView,Helpers:this._buildEdgeThemeHelpers(),Parameters:i.getMergedEdgeThemeParameters(r.Name,this._FlowView._FlowData&&this._FlowView._FlowData.EdgeThemeParameters||{})};try{var l=r.GeneratePath(a);return"string"!=typeof l||""===l?this._builtInPathFallback(t,o,n):l}catch(e){return this._FlowView.log.warn("PictServiceFlowConnectionRenderer edge theme '".concat(r.Name,"' threw: ").concat(e.message)),this._builtInPathFallback(t,o,n)}}},{key:"_resolveAttachmentsViaEdgeTheme",value:function(e,t,o){var n={source:null,target:null},i=this._FlowView?this._FlowView._LayoutService:null,r=i&&"function"==typeof i.resolveActiveEdgeTheme?i.resolveActiveEdgeTheme(e):null;if(!r||"function"!=typeof r.ResolveAttachment)return n;var a=this._FlowView.getNode(e.SourceNodeHash),l=this._FlowView.getNode(e.TargetNodeHash),s=this._findPort(a,e.SourcePortHash),c=this._findPort(l,e.TargetPortHash),d=i.getMergedEdgeThemeParameters(r.Name,this._FlowView._FlowData&&this._FlowView._FlowData.EdgeThemeParameters||{}),p=null,h=null;try{p=r.ResolveAttachment({Node:a,Port:s,DefaultPosition:t,Connection:e,IsSource:!0,OtherNode:l,OtherPort:c,OtherDefaultPosition:o,AllNodes:this._FlowView._FlowData?this._FlowView._FlowData.Nodes:[],FlowView:this._FlowView,Parameters:d}),h=r.ResolveAttachment({Node:l,Port:c,DefaultPosition:o,Connection:e,IsSource:!1,OtherNode:a,OtherPort:s,OtherDefaultPosition:t,AllNodes:this._FlowView._FlowData?this._FlowView._FlowData.Nodes:[],FlowView:this._FlowView,Parameters:d})}catch(e){return this._FlowView.log.warn("PictServiceFlowConnectionRenderer edge theme '".concat(r.Name,"' ResolveAttachment threw: ").concat(e.message)),n}return{source:p||null,target:h||null}}},{key:"_findPort",value:function(e,t){if(!e||!Array.isArray(e.Ports))return null;for(var o=0;o<e.Ports.length;o++)if(e.Ports[o].Hash===t)return e.Ports[o];return null}},{key:"_buildEdgeThemeHelpers",value:function(){var e=this;return{generateBezier:function(t,o){return e._generateDirectionalPath(t,o)},generateMultiBezier:function(t,o,n){return e._generateMultiHandleBezierPath(t,o,n)},generateOrthogonal:function(t,o,n,i){return e._generateOrthogonalPath(t,o,n||null,i||0)},getBezierHandles:function(t){return e._getBezierHandles(t)}}}},{key:"_builtInPathFallback",value:function(e,t,o){var n=o||{};if("orthogonal"===(n.LineMode||"bezier")){var i=null;return n.HandleCustomized&&null!=n.OrthoCorner1X&&(i={corner1:{x:n.OrthoCorner1X,y:n.OrthoCorner1Y},corner2:{x:n.OrthoCorner2X,y:n.OrthoCorner2Y}}),this._generateOrthogonalPath(e,t,i,n.OrthoMidOffset||0)}var r=this._getBezierHandles(n);return r.length>0?this._generateMultiHandleBezierPath(e,t,r):this._generateDirectionalPath(e,t)}},{key:"_getBezierHandles",value:function(e){return e&&e.HandleCustomized?Array.isArray(e.BezierHandles)&&e.BezierHandles.length>0?e.BezierHandles:null!=e.BezierHandleX&&null!=e.BezierHandleY?[{x:e.BezierHandleX,y:e.BezierHandleY}]:[]:[]}},{key:"_generateMultiHandleBezierPath",value:function(e,t,o){var n=this._computeDirectionalGeometry(e,t);return this._FlowView._PathGenerator.buildMultiBezierPathString({x:e.x,y:e.y},{x:n.departX,y:n.departY},o,{x:n.approachX,y:n.approachY},{x:t.x,y:t.y},n.startDir,n.endDir)}},{key:"computeInsertionIndex",value:function(e,t,o,n){for(var i=this._computeDirectionalGeometry(o,n),r=[{x:i.departX,y:i.departY}],a=0;a<e.length;a++)r.push(e[a]);r.push({x:i.approachX,y:i.approachY});for(var l=1/0,s=0,c=0;c<r.length-1;c++){var d=this._distanceToSegment(t.x,t.y,r[c].x,r[c].y,r[c+1].x,r[c+1].y);d<l&&(l=d,s=c)}return s}},{key:"_distanceToSegment",value:function(e,t,o,n,i,r){return this._FlowView._PathGenerator.distanceToSegment(e,t,o,n,i,r)}},{key:"getAutoMidpoint",value:function(e,t){return this._FlowView._PathGenerator.getAutoMidpoint(e,t)}},{key:"_generateOrthogonalPath",value:function(e,t,o,n){var i,r,a=this._FlowView._PathGenerator.computeDepartApproach(e,t,20);if(o&&o.corner1&&o.corner2)i=o.corner1,r=o.corner2;else{var l=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a.departX,a.departY,a.approachX,a.approachY,a.fromDir,a.toDir,n||0);i=l.corner1,r=l.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:e.x,y:e.y},{x:a.departX,y:a.departY},i,r,{x:a.approachX,y:a.approachY},{x:t.x,y:t.y})}},{key:"getOrthogonalGeometry",value:function(e,t,o){var n=this._FlowView._PathGenerator.computeDepartApproach(e,t,20);if(o&&o.HandleCustomized&&null!=o.OrthoCorner1X){var i={x:o.OrthoCorner1X,y:o.OrthoCorner1Y},r={x:o.OrthoCorner2X,y:o.OrthoCorner2Y};return{corner1:i,corner2:r,midpoint:{x:(i.x+r.x)/2,y:(i.y+r.y)/2}}}return this._FlowView._PathGenerator.computeAutoOrthogonalCorners(n.departX,n.departY,n.approachX,n.approachY,n.fromDir,n.toDir,o&&o.OrthoMidOffset||0)}},{key:"_renderHandles",value:function(e,t,o,n){var i=e.Data||{};if("orthogonal"===(i.LineMode||"bezier")){var r=this.getOrthogonalGeometry(o,n,i);this._createHandle(t,e.Hash,"ortho-corner1",r.corner1.x,r.corner1.y,"pict-flow-connection-handle"),this._createHandle(t,e.Hash,"ortho-midpoint",r.midpoint.x,r.midpoint.y,"pict-flow-connection-handle-midpoint"),this._createHandle(t,e.Hash,"ortho-corner2",r.corner2.x,r.corner2.y,"pict-flow-connection-handle")}else{var a=this._getBezierHandles(i);if(a.length>0)for(var l=0;l<a.length;l++)this._createHandle(t,e.Hash,"bezier-handle-"+l,a[l].x,a[l].y,"pict-flow-connection-handle");else{var s=this.getAutoMidpoint(o,n);this._createHandle(t,e.Hash,"bezier-midpoint",s.x,s.y,"pict-flow-connection-handle")}}}},{key:"_createHandle",value:function(e,t,o,n,i,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-connection-handle-midpoint"===r?"connection-handle-midpoint":"connection-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(e,t,o,n,i,a,"connection-handle","data-connection-hash")}}},{key:"_generateBezierPath",value:function(e,t){var o={x:e.x,y:e.y,side:e.side||"right"},n={x:t.x,y:t.y,side:t.side||"left"};return this._generateDirectionalPath(o,n)}},{key:"renderDragConnection",value:function(e,t,o,n,i,r){var a,l=this._generateDirectionalPath({x:e,y:t,side:r||"right"},{x:o,y:n,side:"left"}),s=this._FlowView._ConnectorShapesProvider;return s?a=s.createDragConnectionElement(l):((a=this._FlowView._SVGHelperProvider.createSVGElement("path")).setAttribute("class","pict-flow-drag-connection"),a.setAttribute("d",l)),i.appendChild(a),a}},{key:"updateDragConnection",value:function(e,t,o,n,i,r){if(e){var a=this._generateDirectionalPath({x:t,y:o,side:r||"right"},{x:n,y:i,side:"left"});e.setAttribute("d",a)}}}])}(n);t.exports=a},{"../providers/edges/Edge-PerimeterMath.js":40,"fable-serviceproviderbase":6}],52:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowDataManager",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"marshalToView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var e={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options},t=this._FlowView.fable.manifest.getValueByHash(e,this._FlowView.options.FlowDataAddress);"object"===_typeof(t)&&null!==t&&this.setFlowData(t)}}},{key:"marshalFromView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var e={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options};this._FlowView.fable.manifest.setValueByHash(e,this._FlowView.options.FlowDataAddress,JSON.parse(JSON.stringify(this._FlowView._FlowData)))}}},{key:"getFlowData",value:function(){return this._FlowView?JSON.parse(JSON.stringify(this._FlowView._FlowData)):{}}},{key:"setFlowData",value:function(e){if(this._FlowView)if("object"===_typeof(e)&&null!==e){var t=this._FlowView.options&&this._FlowView.options.DefaultLayoutAlgorithm||"Custom",o=this._FlowView.options&&this._FlowView.options.DefaultLayoutParameters||{},n=!(!this._FlowView.options||!this._FlowView.options.DefaultLayoutAutoApply),i=this._FlowView.options&&this._FlowView.options.DefaultEdgeTheme||null,r=this._FlowView.options&&this._FlowView.options.DefaultEdgeThemeParameters||{};this._FlowView._FlowData={Nodes:Array.isArray(e.Nodes)?e.Nodes:[],Connections:Array.isArray(e.Connections)?e.Connections:[],OpenPanels:Array.isArray(e.OpenPanels)?e.OpenPanels:[],SavedLayouts:Array.isArray(e.SavedLayouts)?e.SavedLayouts:[],ViewState:Object.assign({PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null},e.ViewState||{}),LayoutAlgorithm:"string"==typeof e.LayoutAlgorithm&&""!==e.LayoutAlgorithm?e.LayoutAlgorithm:t,LayoutParameters:e.LayoutParameters&&"object"===_typeof(e.LayoutParameters)?JSON.parse(JSON.stringify(e.LayoutParameters)):JSON.parse(JSON.stringify(o)),LayoutAutoApply:"boolean"==typeof e.LayoutAutoApply?e.LayoutAutoApply:n,EdgeTheme:"string"==typeof e.EdgeTheme&&""!==e.EdgeTheme?e.EdgeTheme:i,EdgeThemeParameters:e.EdgeThemeParameters&&"object"===_typeof(e.EdgeThemeParameters)?JSON.parse(JSON.stringify(e.EdgeThemeParameters)):JSON.parse(JSON.stringify(r))},this._FlowView._LayoutProvider&&this._FlowView._LayoutProvider.loadPersistedLayouts(),this._FlowView.initialRenderComplete&&this._FlowView.renderFlow()}else this._FlowView.log.warn("PictSectionFlow setFlowData received invalid data")}},{key:"addNode",value:function(e,t,o,n,i){if(!this._FlowView)return null;for(var r=e||this._FlowView.options.DefaultNodeType,a=this._FlowView._NodeTypeProvider.getNodeType(r),l={Hash:"node-".concat(this._FlowView.fable.getUUID()),Type:r,X:t||100,Y:o||100,Width:a&&a.DefaultWidth||this._FlowView.options.DefaultNodeWidth,Height:a&&a.DefaultHeight||this._FlowView.options.DefaultNodeHeight,Title:n||a&&a.Label||"New Node",Ports:a&&a.DefaultPorts?JSON.parse(JSON.stringify(a.DefaultPorts)):[{Hash:"port-in-".concat(this._FlowView.fable.getUUID()),Direction:"input",Side:"left",Label:"In"},{Hash:"port-out-".concat(this._FlowView.fable.getUUID()),Direction:"output",Side:"right",Label:"Out"}],Data:i||{}},s=0;s<l.Ports.length;s++)l.Ports[s].Hash||(l.Ports[s].Hash="port-".concat(l.Ports[s].Direction,"-").concat(this._FlowView.fable.getUUID()));return this._FlowView._FlowData.Nodes.push(l),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeAdded",l),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),l}},{key:"removeNode",value:function(e){if(!this._FlowView)return!1;var t=this._FlowView._FlowData.Nodes.findIndex(function(t){return t.Hash===e});if(t<0)return this._FlowView.log.warn("PictSectionFlow removeNode: node ".concat(e," not found")),!1;var o=this._FlowView._FlowData.Nodes.splice(t,1)[0];return this._FlowView._FlowData.Connections=this._FlowView._FlowData.Connections.filter(function(t){return t.SourceNodeHash!==e&&t.TargetNodeHash!==e}),this._FlowView.closePanelForNode(e),this._FlowView._FlowData.ViewState.SelectedNodeHash===e&&(this._FlowView._FlowData.ViewState.SelectedNodeHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"addConnection",value:function(e,t,o,n,i){if(!this._FlowView)return!1;var r=this._FlowView._FlowData.Nodes.find(function(t){return t.Hash===e}),a=this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===o});if(!r||!a)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target node not found"),!1;var l=r.Ports.find(function(e){return e.Hash===t}),s=a.Ports.find(function(e){return e.Hash===n});if(!l||!s)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target port not found"),!1;if(e===o)return this._FlowView.log.warn("PictSectionFlow addConnection: cannot connect a node to itself"),!1;if(this._FlowView._FlowData.Connections.find(function(i){return i.SourceNodeHash===e&&i.SourcePortHash===t&&i.TargetNodeHash===o&&i.TargetPortHash===n}))return this._FlowView.log.warn("PictSectionFlow addConnection: duplicate connection"),!1;var c={Hash:"conn-".concat(this._FlowView.fable.getUUID()),SourceNodeHash:e,SourcePortHash:t,TargetNodeHash:o,TargetPortHash:n,Data:i||{}};return this._FlowView._FlowData.Connections.push(c),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionCreated",c),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),c}},{key:"removeConnection",value:function(e){if(!this._FlowView)return!1;var t=this._FlowView._FlowData.Connections.findIndex(function(t){return t.Hash===e});if(t<0)return this._FlowView.log.warn("PictSectionFlow removeConnection: connection ".concat(e," not found")),!1;var o=this._FlowView._FlowData.Connections.splice(t,1)[0];return this._FlowView._FlowData.ViewState.SelectedConnectionHash===e&&(this._FlowView._FlowData.ViewState.SelectedConnectionHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],53:[function(e,t,o){var n=e("fable-serviceproviderbase"),i={IDLE:"idle",DRAGGING_NODE:"dragging-node",DRAGGING_PANEL:"dragging-panel",DRAGGING_HANDLE:"dragging-handle",CONNECTING:"connecting",PANNING:"panning",RESIZING_PANEL:"resizing-panel"},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowInteractionManager",r._FlowView=o&&o.FlowView?o.FlowView:null,r._SVGElement=null,r._ViewportElement=null,r._State=i.IDLE,r._DragNodeHash=null,r._DragStartX=0,r._DragStartY=0,r._DragNodeStartX=0,r._DragNodeStartY=0,r._DragPanelHash=null,r._DragPanelStartX=0,r._DragPanelStartY=0,r._DragPanelDataStartX=0,r._DragPanelDataStartY=0,r._DragHandleConnectionHash=null,r._DragHandlePanelHash=null,r._DragHandleType=null,r._DragHandleIsTether=!1,r._PanStartX=0,r._PanStartY=0,r._PanStartPanX=0,r._PanStartPanY=0,r._ConnectSourceNodeHash=null,r._ConnectSourcePortHash=null,r._ConnectDragLine=null,r._LastClickTime=0,r._LastClickNodeHash=null,r._DoubleClickThreshold=400,r._ResizePanelHash=null,r._ResizeStartY=0,r._ResizePanelStartHeight=0,r._LastConnectionClickTime=0,r._LastConnectionClickHash=null,r._LastTetherClickTime=0,r._LastTetherClickHash=null,r._LastHandleClickTime=0,r._LastHandleClickHash=null,r._LastHandleClickType=null,r._boundOnPointerDown=r._onPointerDown.bind(r),r._boundOnPointerMove=r._onPointerMove.bind(r),r._boundOnPointerUp=r._onPointerUp.bind(r),r._boundOnWheel=r._onWheel.bind(r),r._boundOnKeyDown=r._onKeyDown.bind(r),r}return _inherits(t,e),_createClass(t,[{key:"initialize",value:function(e,t){this._SVGElement=e,this._ViewportElement=t,this._SVGElement&&document.addEventListener("keydown",this._boundOnKeyDown)}},{key:"handleContextMenu",value:function(e){e.preventDefault();var t=e.target;switch(this._getElementType(t)){case"connection":case"connection-hitarea":this._addBezierHandle(t,e);break;case"connection-handle":this._removeBezierHandle(t);break;case"tether":case"tether-hitarea":this._addTetherBezierHandle(t,e);break;case"tether-handle":this._removeTetherBezierHandle(t)}}},{key:"destroy",value:function(){document.removeEventListener("keydown",this._boundOnKeyDown)}},{key:"_onPointerDown",value:function(e){if(this._FlowView){var t=e.target,o=this._getElementType(t);if(!t.closest||!t.closest(".pict-flow-panel-content"))switch(0===e.button&&this._SVGElement.setPointerCapture(e.pointerId),o){case"port":this._startConnection(e,t);break;case"node":case"node-body":case"panel-indicator":var n=this._getNodeHash(t),i=Date.now();n&&n===this._LastClickNodeHash&&i-this._LastClickTime<this._DoubleClickThreshold?(this._LastClickTime=0,this._LastClickNodeHash=null,this._FlowView.togglePanel(n)):(this._LastClickTime=i,this._LastClickNodeHash=n,this._startNodeDrag(e,t));break;case"panel-titlebar":this._startPanelDrag(e,t);break;case"panel-resize":this._startPanelResize(e,t);break;case"panel-close":var r=this._getPanelHash(t);r&&this._FlowView.closePanel(r);break;case"connection-handle":var a=this._getConnectionHash(t),l=t.getAttribute("data-handle-type"),s=Date.now();a===this._LastHandleClickHash&&l===this._LastHandleClickType&&s-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleConnectionLineMode(a),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=s,this._LastHandleClickHash=a,this._LastHandleClickType=l,this._startHandleDrag(e,a,null,l,!1)),e.stopPropagation();break;case"tether":case"tether-hitarea":var c=this._getPanelHash(t),d=Date.now();c&&c===this._LastTetherClickHash&&d-this._LastTetherClickTime<this._DoubleClickThreshold?(this._LastTetherClickTime=0,this._LastTetherClickHash=null,this._addTetherBezierHandle(t,e)):(this._LastTetherClickTime=d,this._LastTetherClickHash=c,this._selectTether(t));break;case"tether-handle":var p=this._getPanelHash(t),h=t.getAttribute("data-handle-type"),u=Date.now();p===this._LastHandleClickHash&&h===this._LastHandleClickType&&u-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleTetherLineMode(p),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=u,this._LastHandleClickHash=p,this._LastHandleClickType=h,this._startHandleDrag(e,null,p,h,!0)),e.stopPropagation();break;case"connection":case"connection-hitarea":var f=this._getConnectionHash(t),g=Date.now();f&&f===this._LastConnectionClickHash&&g-this._LastConnectionClickTime<this._DoubleClickThreshold?(this._LastConnectionClickTime=0,this._LastConnectionClickHash=null,this._addBezierHandle(t,e)):(this._LastConnectionClickTime=g,this._LastConnectionClickHash=f,this._selectConnection(t));break;default:0===e.button&&this._FlowView.options.EnablePanning&&this._startPanning(e)}}}},{key:"_onPointerMove",value:function(e){if(this._FlowView)switch(this._State){case i.DRAGGING_NODE:this._onNodeDrag(e);break;case i.DRAGGING_PANEL:this._onPanelDrag(e);break;case i.DRAGGING_HANDLE:this._onHandleDrag(e);break;case i.CONNECTING:this._onConnectionDrag(e);break;case i.RESIZING_PANEL:this._onPanelResize(e);break;case i.PANNING:this._onPan(e)}}},{key:"_onPointerUp",value:function(e){if(this._FlowView)switch(this._SVGElement.hasPointerCapture&&this._SVGElement.hasPointerCapture(e.pointerId)&&this._SVGElement.releasePointerCapture(e.pointerId),this._State){case i.DRAGGING_NODE:this._endNodeDrag(e);break;case i.DRAGGING_PANEL:this._endPanelDrag(e);break;case i.DRAGGING_HANDLE:this._endHandleDrag(e);break;case i.RESIZING_PANEL:this._endPanelResize(e);break;case i.CONNECTING:this._endConnection(e);break;case i.PANNING:this._endPanning(e)}}},{key:"_onWheel",value:function(e){if(this._FlowView&&this._FlowView.options.EnableZooming){e.preventDefault();var t=e.deltaY>0?-this._FlowView.options.ZoomStep:this._FlowView.options.ZoomStep,o=this._FlowView.viewState.Zoom+t,n=this._SVGElement.getBoundingClientRect(),i=e.clientX-n.left,r=e.clientY-n.top;this._FlowView.setZoom(o,i,r)}}},{key:"_onKeyDown",value:function(e){if(this._FlowView)if("Delete"===e.key||"Backspace"===e.key){if(e.target&&("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName))return;if(e.target&&e.target.closest&&e.target.closest(".pict-flow-panel"))return;this._FlowView.deleteSelected(),e.preventDefault()}else if("Escape"===e.key){if(this._State===i.CONNECTING&&this._cancelConnection(),this._FlowView._IsFullscreen){if(this._FlowView.exitFullscreen(),this._FlowView._ToolbarView){var t=this._FlowView.options.ViewIdentifier,o=this._FlowView.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(t));o.length>0&&(o[0].innerHTML="&#x26F6; Fullscreen")}return void e.preventDefault()}this._FlowView.deselectAll()}}},{key:"_startNodeDrag",value:function(e,t){if(this._FlowView.options.EnableNodeDragging){var o=this._getNodeHash(t);if(o){this._FlowView.selectNode(o);var n=this._FlowView.getNode(o);if(n){this._State=i.DRAGGING_NODE,this._DragNodeHash=o,this._DragStartX=e.clientX,this._DragStartY=e.clientY,this._DragNodeStartX=n.X,this._DragNodeStartY=n.Y,this._SVGElement.classList.add("panning");var r=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(o,'"]'));r&&r.classList.add("dragging")}}}}},{key:"_onNodeDrag",value:function(e){if(this._DragNodeHash){var t=this._FlowView.viewState,o=(e.clientX-this._DragStartX)/t.Zoom,n=(e.clientY-this._DragStartY)/t.Zoom,i=this._DragNodeStartX+o,r=this._DragNodeStartY+n;this._FlowView.updateNodePosition(this._DragNodeHash,i,r)}}},{key:"_endNodeDrag",value:function(e){this._SVGElement.classList.remove("panning");var t=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(this._DragNodeHash,'"]'));t&&t.classList.remove("dragging"),this._FlowView.renderFlow(),this._FlowView.marshalFromView();var o=this._FlowView.getNode(this._DragNodeHash);o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=i.IDLE,this._DragNodeHash=null}},{key:"_startPanelDrag",value:function(e,t){var o=this._getPanelHash(t);if(o){var n=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===o});n&&(this._State=i.DRAGGING_PANEL,this._DragPanelHash=o,this._DragPanelStartX=e.clientX,this._DragPanelStartY=e.clientY,this._DragPanelDataStartX=n.X,this._DragPanelDataStartY=n.Y,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelDrag",value:function(e){if(this._DragPanelHash){var t=this._FlowView.viewState,o=(e.clientX-this._DragPanelStartX)/t.Zoom,n=(e.clientY-this._DragPanelStartY)/t.Zoom,i=this._DragPanelDataStartX+o,r=this._DragPanelDataStartY+n;this._FlowView.updatePanelPosition(this._DragPanelHash,i,r)}}},{key:"_endPanelDrag",value:function(e){var t=this;this._SVGElement.classList.remove("panning"),this._FlowView.marshalFromView();var o=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t._DragPanelHash});o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=i.IDLE,this._DragPanelHash=null}},{key:"_startPanelResize",value:function(e,t){var o=this._getPanelHash(t);if(o){var n=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===o});n&&(this._State=i.RESIZING_PANEL,this._ResizePanelHash=o,this._ResizeStartY=e.clientY,this._ResizePanelStartHeight=n.Height,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelResize",value:function(e){var t=this;if(this._ResizePanelHash){var o=this._FlowView.viewState,n=(e.clientY-this._ResizeStartY)/o.Zoom,i=Math.max(120,this._ResizePanelStartHeight+n),r=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t._ResizePanelHash});if(r&&(r.Height=i),this._FlowView._PanelsLayer){var a=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'+this._ResizePanelHash+'"]');a&&a.setAttribute("height",String(i))}}}},{key:"_endPanelResize",value:function(e){this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._State=i.IDLE,this._ResizePanelHash=null}},{key:"_startHandleDrag",value:function(e,t,o,n,r){this._State=i.DRAGGING_HANDLE,this._DragHandleConnectionHash=t,this._DragHandlePanelHash=o,this._DragHandleType=n,this._DragHandleIsTether=r,this._DragStartX=e.clientX,this._DragStartY=e.clientY,this._SVGElement.classList.add("panning")}},{key:"_onHandleDrag",value:function(e){var t=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._DragHandleIsTether?this._FlowView.updateTetherHandle(this._DragHandlePanelHash,this._DragHandleType,t.x,t.y):this._FlowView.updateConnectionHandle(this._DragHandleConnectionHash,this._DragHandleType,t.x,t.y)}},{key:"_endHandleDrag",value:function(e){var t=this;if(this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider)if(this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._DragHandleIsTether){var o=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t._DragHandlePanelHash});o&&this._FlowView._EventHandlerProvider.fireEvent("onTetherHandleMoved",o)}else{var n=this._FlowView.getConnection(this._DragHandleConnectionHash);n&&this._FlowView._EventHandlerProvider.fireEvent("onConnectionHandleMoved",n)}this._State=i.IDLE,this._DragHandleConnectionHash=null,this._DragHandlePanelHash=null,this._DragHandleType=null,this._DragHandleIsTether=!1}},{key:"_addBezierHandle",value:function(e,t){var o=this._getConnectionHash(e);if(o){this._FlowView.selectConnection(o);var n=this._FlowView.screenToSVGCoords(t.clientX,t.clientY);this._FlowView.addConnectionHandle(o,n.x,n.y)}}},{key:"_removeBezierHandle",value:function(e){var t=this._getConnectionHash(e);if(t){var o=e.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var n=parseInt(o.replace("bezier-handle-",""),10);isNaN(n)||this._FlowView.removeConnectionHandle(t,n)}}}},{key:"_addTetherBezierHandle",value:function(e,t){var o=this._getPanelHash(e);if(o){this._FlowView.selectTether(o);var n=this._FlowView.screenToSVGCoords(t.clientX,t.clientY);this._FlowView.addTetherHandle(o,n.x,n.y)}}},{key:"_removeTetherBezierHandle",value:function(e){var t=this._getPanelHash(e);if(t){var o=e.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var n=parseInt(o.replace("bezier-handle-",""),10);isNaN(n)||this._FlowView.removeTetherHandle(t,n)}}}},{key:"_toggleConnectionLineMode",value:function(e){var t=this._FlowView.getConnection(e);if(t){t.Data||(t.Data={});var o=t.Data.LineMode||"bezier";t.Data.LineMode="bezier"===o?"orthogonal":"bezier",t.Data.HandleCustomized=!1,t.Data.BezierHandles=[],t.Data.BezierHandleX=null,t.Data.BezierHandleY=null,t.Data.OrthoCorner1X=null,t.Data.OrthoCorner1Y=null,t.Data.OrthoCorner2X=null,t.Data.OrthoCorner2Y=null,t.Data.OrthoMidOffset=0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionModeChanged",t),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData))}}},{key:"_toggleTetherLineMode",value:function(e){var t=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e});t&&(this._FlowView._TetherService&&this._FlowView._TetherService.toggleLineMode(t),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onTetherModeChanged",t),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)))}},{key:"_selectTether",value:function(e){var t=this._getPanelHash(e);t&&this._FlowView.selectTether(t)}},{key:"_startConnection",value:function(e,t){if(this._FlowView.options.EnableConnectionCreation){var o=t.getAttribute("data-node-hash"),n=t.getAttribute("data-port-hash"),r=t.getAttribute("data-port-direction");if(o&&n&&"output"===r){this._State=i.CONNECTING,this._ConnectSourceNodeHash=o,this._ConnectSourcePortHash=n,this._SVGElement.classList.add("connecting");var a=this._FlowView.getPortPosition(o,n);a&&(this._ConnectDragLine=document.createElementNS("http://www.w3.org/2000/svg","path"),this._ConnectDragLine.setAttribute("class","pict-flow-drag-connection"),this._ConnectDragLine.setAttribute("d","M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(a.y)),this._FlowView._ViewportElement.appendChild(this._ConnectDragLine)),e.stopPropagation()}}}},{key:"_onConnectionDrag",value:function(e){if(this._ConnectDragLine){var t=this._FlowView.getPortPosition(this._ConnectSourceNodeHash,this._ConnectSourcePortHash);if(t){var o=this._FlowView.screenToSVGCoords(e.clientX,e.clientY),n=.5*Math.abs(o.x-t.x),i="M ".concat(t.x," ").concat(t.y," C ").concat(t.x+n," ").concat(t.y,", ").concat(o.x-n," ").concat(o.y,", ").concat(o.x," ").concat(o.y);this._ConnectDragLine.setAttribute("d",i)}}}},{key:"_endConnection",value:function(e){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting");var t=document.elementFromPoint(e.clientX,e.clientY);if(t){var o=t.getAttribute("data-port-hash"),n=t.getAttribute("data-node-hash"),r=t.getAttribute("data-port-direction");o&&n&&"input"===r&&this._FlowView.addConnection(this._ConnectSourceNodeHash,this._ConnectSourcePortHash,n,o)}this._State=i.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_cancelConnection",value:function(){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting"),this._State=i.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_startPanning",value:function(e){this._FlowView.deselectAll(),this._State=i.PANNING,this._PanStartX=e.clientX,this._PanStartY=e.clientY,this._PanStartPanX=this._FlowView.viewState.PanX,this._PanStartPanY=this._FlowView.viewState.PanY,this._SVGElement.classList.add("panning")}},{key:"_onPan",value:function(e){var t=e.clientX-this._PanStartX,o=e.clientY-this._PanStartY;this._FlowView.viewState.PanX=this._PanStartPanX+t,this._FlowView.viewState.PanY=this._PanStartPanY+o,this._FlowView.updateViewportTransform()}},{key:"_endPanning",value:function(e){this._SVGElement.classList.remove("panning"),this._State=i.IDLE}},{key:"_selectConnection",value:function(e){var t=this._getConnectionHash(e);t&&this._FlowView.selectConnection(t)}},{key:"_getElementType",value:function(e){if(!e)return"background";var t=e.getAttribute?e.getAttribute("data-element-type"):null;if(t)return t;for(var o=e.parentElement,n=0;o&&n<5;){if(t=o.getAttribute?o.getAttribute("data-element-type"):null)return t;o=o.parentElement,n++}return"background"}},{key:"_getNodeHash",value:function(e){if(!e)return null;var t=e.getAttribute?e.getAttribute("data-node-hash"):null;if(t)return t;for(var o=e.parentElement,n=0;o&&n<5;){if(t=o.getAttribute?o.getAttribute("data-node-hash"):null)return t;o=o.parentElement,n++}return null}},{key:"_getPanelHash",value:function(e){if(!e)return null;var t=e.getAttribute?e.getAttribute("data-panel-hash"):null;if(t)return t;for(var o=e.parentElement,n=0;o&&n<5;){if(t=o.getAttribute?o.getAttribute("data-panel-hash"):null)return t;o=o.parentElement,n++}return null}},{key:"_getConnectionHash",value:function(e){if(!e)return null;var t=e.getAttribute?e.getAttribute("data-connection-hash"):null;if(t)return t;for(var o=e.parentElement,n=0;o&&n<5;){if(t=o.getAttribute?o.getAttribute("data-connection-hash"):null)return t;o=o.parentElement,n++}return null}}])}(n);t.exports=r,t.exports.INTERACTION_STATES=i},{"fable-serviceproviderbase":6}],54:[function(e,t,o){var n=e("fable-serviceproviderbase"),i=e("../providers/layouts/Layout-Custom.js"),r=e("../providers/layouts/Layout-Layered.js"),a=e("../providers/layouts/Layout-ForcedFromCenter.js"),l=e("../providers/layouts/Layout-Grid.js"),s=e("../providers/layouts/Layout-Circular.js"),c=e("../providers/layouts/Layout-Tabular.js"),d=e("../providers/layouts/Layout-Columnar.js"),p=e("../providers/edges/Edge-Bezier.js"),h=e("../providers/edges/Edge-Orthogonal.js"),u=e("../providers/edges/Edge-Straight.js"),f=e("../providers/edges/Edge-OrthogonalSnap.js"),g=e("../providers/edges/Edge-Perimeter.js"),m=e("../providers/edges/Edge-Perimeter-Linear.js"),v=e("../providers/edges/Edge-Perimeter-Orthogonal.js"),w=[i,r,a,l,s,c,d],y=[p,h,u,f,g,m,v],b="Layered",S=function(e){function t(e,o,n){var i;_classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowLayout",i._FlowView=o&&o.FlowView?o.FlowView:null,i._HorizontalSpacing=250,i._VerticalSpacing=120,i._StartX=100,i._StartY=100,i._Algorithms={},i._EdgeThemes={};for(var r=0;r<w.length;r++)i.registerAlgorithm(w[r]);for(var a=0;a<y.length;a++)i.registerEdgeTheme(y[a]);return i}return _inherits(t,e),_createClass(t,[{key:"registerAlgorithm",value:function(e){return e&&"object"===_typeof(e)?"string"!=typeof e.Name||""===e.Name?(this.log.warn("PictServiceFlowLayout registerAlgorithm: descriptor.Name is required"),!1):"function"!=typeof e.Apply?(this.log.warn("PictServiceFlowLayout registerAlgorithm: descriptor.Apply for '".concat(e.Name,"' must be a function")),!1):(this._Algorithms[e.Name]=e,!0):(this.log.warn("PictServiceFlowLayout registerAlgorithm: descriptor must be an object"),!1)}},{key:"getAlgorithm",value:function(e){return this._Algorithms[e]||null}},{key:"getAlgorithmNames",value:function(){return Object.keys(this._Algorithms)}},{key:"listAlgorithms",value:function(){for(var e=Object.keys(this._Algorithms),t=[],o=0;o<e.length;o++)t.push(this._Algorithms[e[o]]);return t}},{key:"getMergedParameters",value:function(e,t){var o=this.getAlgorithm(e);return o?Object.assign({},o.DefaultParameters||{},t||{}):Object.assign({},t||{})}},{key:"registerEdgeTheme",value:function(e){return e&&"object"===_typeof(e)?"string"!=typeof e.Name||""===e.Name?(this.log.warn("PictServiceFlowLayout registerEdgeTheme: descriptor.Name is required"),!1):"function"!=typeof e.GeneratePath?(this.log.warn("PictServiceFlowLayout registerEdgeTheme: descriptor.GeneratePath for '".concat(e.Name,"' must be a function")),!1):(this._EdgeThemes[e.Name]=e,!0):(this.log.warn("PictServiceFlowLayout registerEdgeTheme: descriptor must be an object"),!1)}},{key:"getEdgeTheme",value:function(e){return this._EdgeThemes[e]||null}},{key:"getEdgeThemeNames",value:function(){return Object.keys(this._EdgeThemes)}},{key:"listEdgeThemes",value:function(){for(var e=Object.keys(this._EdgeThemes),t=[],o=0;o<e.length;o++)t.push(this._EdgeThemes[e[o]]);return t}},{key:"resolveActiveEdgeTheme",value:function(e){var t=e&&e.Data||{},o=this._FlowView,n=o?o._FlowData:null;if(t.EdgeTheme){var i=this.getEdgeTheme(t.EdgeTheme);if(i)return i}if("orthogonal"===t.LineMode&&!t.EdgeTheme){var r=this.getEdgeTheme("Orthogonal");if(r)return r}if(n&&n.EdgeTheme){var a=this.getEdgeTheme(n.EdgeTheme);if(a)return a}if(n&&n.LayoutAlgorithm){var l=this.getAlgorithm(n.LayoutAlgorithm);if(l&&l.DefaultEdgeTheme){var s=this.getEdgeTheme(l.DefaultEdgeTheme);if(s)return s}}return this.getEdgeTheme("Bezier")}},{key:"getMergedEdgeThemeParameters",value:function(e,t){var o=this.getEdgeTheme(e);return o?Object.assign({},o.DefaultParameters||{},t||{}):Object.assign({},t||{})}},{key:"applyLayout",value:function(e,t,o,n){var i=this.getAlgorithm(o);if(i||(this.log.warn("PictServiceFlowLayout applyLayout: unknown algorithm '".concat(o,"', falling back to '").concat(b,"'")),i=this.getAlgorithm(b))){var r=Object.assign({},i.DefaultParameters||{},n||{});i.Apply(e,t,r)}}},{key:"autoLayout",value:function(e,t,o,n){if(e&&0!==e.length){var i="string"==typeof o&&""!==o?o:b;this.applyLayout(e,t,i,n)}}},{key:"snapToGrid",value:function(e,t){return!t||t<=0?e:Math.round(e/t)*t}},{key:"autoLayoutSubset",value:function(e,t,o){if(e&&0!==e.length){var n=this._StartX,i=this._StartY;if(t&&t.length>0){for(var r=-1/0,a=0;a<t.length;a++){var l=t[a].X+(t[a].Width||180);l>r&&(r=l)}n=r+this._HorizontalSpacing}for(var s={},c=0;c<e.length;c++)s[e[c].Hash]=!0;for(var d={},p={},h={},u=0;u<e.length;u++){var f=e[u];d[f.Hash]=f,p[f.Hash]=0,h[f.Hash]=[]}for(var g=0;g<o.length;g++){var m=o[g],v=s[m.SourceNodeHash],w=s[m.TargetNodeHash];v&&w&&(p[m.TargetNodeHash]++,h[m.SourceNodeHash].push(m.TargetNodeHash))}var y=[],b=[],S={};for(var _ in p)0===p[_]&&b.push(_);for(;b.length>0;){for(var k=[],P=[],F=0;F<b.length;F++){var T=b[F];if(!S[T]){S[T]=!0,k.push(T);for(var C=h[T]||[],D=0;D<C.length;D++){var x=C[D];p[x]--,p[x]<=0&&!S[x]&&P.push(x)}}}k.length>0&&y.push(k),b=P}for(var L=[],A=0;A<e.length;A++)S[e[A].Hash]||L.push(e[A].Hash);L.length>0&&y.push(L);for(var V=n,H=0;H<y.length;H++){for(var M=y[H],B=0,N=i,I=0;I<M.length;I++){var E=d[M[I]];if(E){E.X=V,E.Y=N;var R=E.Width||180,O=E.Height||80;B=Math.max(B,R),N+=O+this._VerticalSpacing}}V+=B+this._HorizontalSpacing}}}},{key:"centerNodes",value:function(e,t,o){if(e&&0!==e.length){for(var n=1/0,i=1/0,r=-1/0,a=-1/0,l=0;l<e.length;l++)n=Math.min(n,e[l].X),i=Math.min(i,e[l].Y),r=Math.max(r,e[l].X+(e[l].Width||180)),a=Math.max(a,e[l].Y+(e[l].Height||80));for(var s=t-(n+r)/2,c=o-(i+a)/2,d=0;d<e.length;d++)e[d].X+=s,e[d].Y+=c}}}])}(n);t.exports=S},{"../providers/edges/Edge-Bezier.js":34,"../providers/edges/Edge-Orthogonal.js":35,"../providers/edges/Edge-OrthogonalSnap.js":36,"../providers/edges/Edge-Perimeter-Linear.js":37,"../providers/edges/Edge-Perimeter-Orthogonal.js":38,"../providers/edges/Edge-Perimeter.js":39,"../providers/edges/Edge-Straight.js":41,"../providers/layouts/Layout-Circular.js":42,"../providers/layouts/Layout-Columnar.js":44,"../providers/layouts/Layout-Custom.js":45,"../providers/layouts/Layout-ForcedFromCenter.js":46,"../providers/layouts/Layout-Grid.js":47,"../providers/layouts/Layout-Layered.js":48,"../providers/layouts/Layout-Tabular.js":49,"fable-serviceproviderbase":6}],55:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowPanelManager",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"openPanel",value:function(e){var t=this._FlowView.getNode(e);if(!t)return!1;var o=this._FlowView._NodeTypeProvider.getNodeType(t.Type);if(!o)return!1;var n=this._FlowView._FlowData.OpenPanels.find(function(t){return t.NodeHash===e});if(n)return n;var i,r,a,l,s=o.PropertiesPanel,c="panel-".concat(this.fable.getUUID());s?(i=s.DefaultWidth||300,r=s.DefaultHeight||200,a=s.PanelType||"Base",l=s.Title||o.Label||"Properties"):(i=240,r=180,a="Info",l=o.Label||t.Title||"Node Info");var d={Hash:c,NodeHash:e,PanelType:a,Title:l,X:t.X+t.Width+30,Y:t.Y,Width:i,Height:r};return this._FlowView._FlowData.OpenPanels.push(d),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelOpened",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),d}},{key:"closePanel",value:function(e){var t=this._FlowView._FlowData.OpenPanels.findIndex(function(t){return t.Hash===e});if(t<0)return!1;var o=this._FlowView._FlowData.OpenPanels.splice(t,1)[0];return this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(e),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelClosed",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"closePanelForNode",value:function(e){var t=this._FlowView._FlowData.OpenPanels.filter(function(t){return t.NodeHash===e});if(0===t.length)return!1;for(var o=0;o<t.length;o++){var n=this._FlowView._FlowData.OpenPanels.indexOf(t[o]);n>=0&&this._FlowView._FlowData.OpenPanels.splice(n,1),this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(t[o].Hash)}return!0}},{key:"togglePanel",value:function(e){var t=this._FlowView._FlowData.OpenPanels.find(function(t){return t.NodeHash===e});return t?(this.closePanel(t.Hash),!1):this.openPanel(e)}},{key:"updatePanelPosition",value:function(e,t,o){var n=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e});if(n){if(n.X=t,n.Y=o,this._FlowView._resetHandlesForPanel(e),this._FlowView._PanelsLayer){var i=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'.concat(e,'"]'));i&&(i.setAttribute("x",String(t)),i.setAttribute("y",String(o)))}this._FlowView._renderTethersForNode(n.NodeHash)}}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],56:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowPathGenerator",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"computeDepartApproach",value:function(e,t,o){var n=this._FlowView._GeometryProvider,i=n.sideDirection(e.side||"right"),r=n.sideDirection(t.side||"left");return{departX:e.x+i.dx*o,departY:e.y+i.dy*o,approachX:t.x+r.dx*o,approachY:t.y+r.dy*o,fromDir:i,toDir:r}}},{key:"computeAutoOrthogonalCorners",value:function(e,t,o,n,i,r,a){var l,s,c,d=a||0,p=Math.abs(i.dx)>0,h=Math.abs(r.dx)>0;if(p&&h){var u=(e+o)/2+d;l={x:u,y:t},s={x:u,y:n},c={x:u,y:(t+n)/2}}else if(p||h)p&&!h?(l={x:o+d,y:t},s={x:o+d,y:n},c={x:o+d,y:(t+n)/2}):(l={x:e,y:n+d},s={x:o,y:n+d},c={x:(e+o)/2,y:n+d});else{var f=(t+n)/2+d;l={x:e,y:f},s={x:o,y:f},c={x:(e+o)/2,y:f}}return{corner1:l,corner2:s,midpoint:c}}},{key:"evaluateCubicBezier",value:function(e,t,o,n,i){var r=1-i,a=r*r,l=a*r,s=i*i,c=s*i;return{x:l*e.x+3*a*i*t.x+3*r*s*o.x+c*n.x,y:l*e.y+3*a*i*t.y+3*r*s*o.y+c*n.y}}},{key:"buildBezierPathString",value:function(e,t,o,n,i,r){return"M ".concat(e.x," ").concat(e.y," L ").concat(t.x," ").concat(t.y," C ").concat(o.x," ").concat(o.y,", ").concat(n.x," ").concat(n.y,", ").concat(i.x," ").concat(i.y," L ").concat(r.x," ").concat(r.y)}},{key:"buildSplitBezierPathString",value:function(e,t,o,n,i,r,a,l,s){return"M ".concat(e.x," ").concat(e.y," L ").concat(t.x," ").concat(t.y," C ").concat(o.x," ").concat(o.y,", ").concat(n.x," ").concat(n.y,", ").concat(i.x," ").concat(i.y," C ").concat(r.x," ").concat(r.y,", ").concat(a.x," ").concat(a.y,", ").concat(l.x," ").concat(l.y," L ").concat(s.x," ").concat(s.y)}},{key:"buildMultiBezierPathString",value:function(e,t,o,n,i,r,a){for(var l=[t],s=0;s<o.length;s++)l.push(o[s]);l.push(n);for(var c="M ".concat(e.x," ").concat(e.y," L ").concat(t.x," ").concat(t.y),d=0;d<l.length-1;d++){var p=l[d],h=l[d+1],u=h.x-p.x,f=h.y-p.y,g=Math.sqrt(u*u+f*f);g<1&&(g=1);var m=.35*g,v=void 0,w=void 0;if(0===d)v=r.dx,w=r.dy;else{var y=l[d-1],b=l[d+1];v=b.x-y.x,w=b.y-y.y;var S=Math.sqrt(v*v+w*w);S<1&&(S=1),v/=S,w/=S}var _=void 0,k=void 0;if(d===l.length-2)_=-a.dx,k=-a.dy;else{var P=l[d],F=l[d+2];_=F.x-P.x,k=F.y-P.y;var T=Math.sqrt(_*_+k*k);T<1&&(T=1),_/=T,k/=T}var C=p.x+v*m,D=p.y+w*m,x=h.x-_*m,L=h.y-k*m;c+=" C ".concat(C," ").concat(D,", ").concat(x," ").concat(L,", ").concat(h.x," ").concat(h.y)}return c+=" L ".concat(i.x," ").concat(i.y)}},{key:"buildOrthogonalPathString",value:function(e,t,o,n,i,r){return"M ".concat(e.x," ").concat(e.y," L ").concat(t.x," ").concat(t.y," L ").concat(o.x," ").concat(o.y," L ").concat(n.x," ").concat(n.y," L ").concat(i.x," ").concat(i.y," L ").concat(r.x," ").concat(r.y)}},{key:"computeDirectionalGeometry",value:function(e,t){var o,n=this._FlowView._GeometryProvider.sideDirection(e.side||"right"),i=this._FlowView._GeometryProvider.sideDirection(t.side||"left"),r=e.x+20*n.dx,a=e.y+20*n.dy,l=t.x+20*i.dx,s=t.y+20*i.dy,c=Math.abs(l-r),d=Math.abs(s-a),p=Math.sqrt(c*c+d*d),h=Math.max(Math.min(.4*p,180),30),u=0!==n.dx&&0!==i.dx||0!==n.dy&&0!==i.dy,f=!1;if(u&&(1===n.dx&&-1===i.dx&&t.x>=e.x||-1===n.dx&&1===i.dx&&t.x<=e.x||1===n.dy&&-1===i.dy&&t.y>=e.y||-1===n.dy&&1===i.dy&&t.y<=e.y)&&(f=!0),f){var g=0!==n.dx?c:d;o=Math.max(.35*g,30)}else o=u?Math.max(h,60):Math.max(.8*h,40);return{departX:r,departY:a,approachX:l,approachY:s,cp1X:r+n.dx*o,cp1Y:a+n.dy*o,cp2X:l+i.dx*o,cp2Y:s+i.dy*o,startDir:n,endDir:i}}},{key:"distanceToSegment",value:function(e,t,o,n,i,r){var a=i-o,l=r-n,s=a*a+l*l;if(s<.001){var c=e-o,d=t-n;return Math.sqrt(c*c+d*d)}var p=((e-o)*a+(t-n)*l)/s;p<0&&(p=0),p>1&&(p=1);var h=e-(o+p*a),u=t-(n+p*l);return Math.sqrt(h*h+u*u)}},{key:"getAutoMidpoint",value:function(e,t){var o=this.computeDirectionalGeometry(e,t);return this.evaluateCubicBezier({x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},.5)}},{key:"getAutoMidpointSimple",value:function(e,t,o){var n=this.computeDepartApproach(e,t,o),i=Math.abs(n.approachX-n.departX),r=Math.abs(n.approachY-n.departY),a=.4*Math.max(i,r,40),l={x:n.departX,y:n.departY},s={x:n.departX+n.fromDir.dx*a,y:n.departY+n.fromDir.dy*a},c={x:n.approachX+n.toDir.dx*a,y:n.approachY+n.toDir.dy*a},d={x:n.approachX,y:n.approachY};return this.evaluateCubicBezier(l,s,c,d,.5)}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],57:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowPortRenderer",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"renderPorts",value:function(e,t,o,n,i,r){if(this._FlowView&&e.Ports&&Array.isArray(e.Ports)){i&&i.PortLabelsVertical,i&&i.PortLabelPadding,i&&i.PortLabelsOutside;for(var a=this._FlowView._GeometryProvider,l=this._collectConnectedPortHashes(e.Hash),s={},c=0;c<e.Ports.length;c++){var d=e.Ports[c],p=d.Side||("input"===d.Direction?"left":"right");s[p]||(s[p]=[]),s[p].push(d)}var h={};for(var u in s)h[u]=s[u].length;for(var f in s)for(var g=s[f],m=a?a.getEdgeFromSide(f):f,v=0;v<g.length;v++){var w=g[v],y=this.getPortLocalPosition(f,v,g.length,o,n,r,h),b=null;if(w.Label){var S=w.PortType&&{"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"}[w.PortType]||"#95a5a6",_=12,k=5*w.Label.length,P=void 0,F=void 0,T=void 0,C=void 0,D=void 0,x=void 0,L=void 0,A=void 0,V=void 0,H=void 0;"left"===m?(C=(P=1)+5+5,D="start",x=P+(T=10+k+5+2)-2,L=F=y.y-6,A=2,V=_,H="M "+P+" "+F+" L "+(P+T)+" "+F+" L "+(P+T)+" "+(F+_)+" L "+P+" "+(F+_)):"right"===m?(C=(P=o-(T=7+k+5+5)-1)+2+5,D="start",x=P,L=F=y.y-6,A=2,V=_,H="M "+(P+T)+" "+F+" L "+P+" "+F+" L "+P+" "+(F+_)+" L "+(P+T)+" "+(F+_)):"top"===m?(T=k+10,P=y.x-T/2,F=1,C=y.x,D="middle",x=P,L=F+_-2,A=T,V=2,H="M "+P+" "+F+" L "+P+" "+(F+_)+" L "+(P+T)+" "+(F+_)+" L "+(P+T)+" "+F):(T=k+10,P=y.x-T/2,F=n-_-1,C=y.x,D="middle",x=P,L=F,A=T,V=2,H="M "+P+" "+(F+_)+" L "+P+" "+F+" L "+(P+T)+" "+F+" L "+(P+T)+" "+(F+_));var M=this._FlowView._SVGHelperProvider.createSVGElement("g");M.setAttribute("class","pict-flow-port-badge"),M.setAttribute("data-port-hash",w.Hash),M.setAttribute("data-node-hash",e.Hash),this._wirePortHintHover(M,w.Hash,null);var B=this._FlowView._SVGHelperProvider.createSVGElement("rect");B.setAttribute("class","pict-flow-port-label-bg"),B.setAttribute("x",String(P)),B.setAttribute("y",String(F)),B.setAttribute("width",String(T)),B.setAttribute("height",String(_)),B.setAttribute("fill","var(--pf-port-label-bg, rgba(255, 253, 240, 0.5))"),M.appendChild(B);var N=this._FlowView._SVGHelperProvider.createSVGElement("path");N.setAttribute("class","pict-flow-port-label-bg"),N.setAttribute("d",H),N.setAttribute("fill","none"),N.setAttribute("stroke",S),N.setAttribute("stroke-width","0.75"),M.appendChild(N);var I=this._FlowView._SVGHelperProvider.createSVGElement("rect");I.setAttribute("class","pict-flow-port-label-bg"),I.setAttribute("x",String(x)),I.setAttribute("y",String(L)),I.setAttribute("width",String(A)),I.setAttribute("height",String(V)),I.setAttribute("fill",S),M.appendChild(I),t.appendChild(M),(b=this._FlowView._SVGHelperProvider.createSVGElement("text")).setAttribute("class","pict-flow-port-label"),b.setAttribute("fill","var(--pf-port-label-text, #2c3e50)"),b.textContent=w.Label,b.setAttribute("x",String(C)),b.setAttribute("y",String(F+6)),b.setAttribute("text-anchor",D),b.setAttribute("dominant-baseline","central")}if(!l[w.Hash]){var E=this._FlowView._ConnectorShapesProvider,R=void 0;if(E)R=E.createPortElement(w,y,e.Hash);else{R=this._FlowView._SVGHelperProvider.createSVGElement("circle");var O="pict-flow-port ".concat(w.Direction);w.PortType&&(O+=" port-type-".concat(w.PortType)),R.setAttribute("class",O),R.setAttribute("cx",String(y.x)),R.setAttribute("cy",String(y.y)),R.setAttribute("r","5"),R.setAttribute("data-port-hash",w.Hash),R.setAttribute("data-node-hash",e.Hash),R.setAttribute("data-port-direction",w.Direction),w.PortType&&R.setAttribute("data-port-type",w.PortType),R.setAttribute("data-element-type","port")}t.appendChild(R)}b&&t.appendChild(b)}}}},{key:"_wirePortHintHover",value:function(e,t,o){if(e&&"function"==typeof e.setAttribute&&this._FlowView&&this._FlowView.options){var n=this._FlowView.options.ViewIdentifier,i=t?'"'+t+'", null':'null, "'+o+'"';e.setAttribute("onmouseenter","_Pict.views['"+n+"']._activatePortHints("+i+")"),e.setAttribute("onmouseleave","_Pict.views['"+n+"']._deactivatePortHints("+i+")")}}},{key:"_collectConnectedPortHashes",value:function(e){var t={};if(!this._FlowView||!this._FlowView._FlowData||!Array.isArray(this._FlowView._FlowData.Connections))return t;for(var o=this._FlowView._FlowData.Connections,n=0;n<o.length;n++){var i=o[n];i.SourceNodeHash===e&&i.SourcePortHash&&(t[i.SourcePortHash]=!0),i.TargetNodeHash===e&&i.TargetPortHash&&(t[i.TargetPortHash]=!0)}return t}},{key:"getPortLocalPosition",value:function(e,t,o,n,i,r,a){return this._FlowView._GeometryProvider.getPortLocalPosition(e,t,o,n,i,r,a)}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],58:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowRenderManager",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"renderFlow",value:function(){if(this._FlowView&&this._FlowView._NodesLayer&&this._FlowView._ConnectionsLayer){for(;this._FlowView._NodesLayer.firstChild;)this._FlowView._NodesLayer.removeChild(this._FlowView._NodesLayer.firstChild);for(;this._FlowView._ConnectionsLayer.firstChild;)this._FlowView._ConnectionsLayer.removeChild(this._FlowView._ConnectionsLayer.firstChild);if(this._FlowView._EndpointsLayer)for(;this._FlowView._EndpointsLayer.firstChild;)this._FlowView._EndpointsLayer.removeChild(this._FlowView._EndpointsLayer.firstChild);if(this._FlowView._PortHintsLayer)for(;this._FlowView._PortHintsLayer.firstChild;)this._FlowView._PortHintsLayer.removeChild(this._FlowView._PortHintsLayer.firstChild);for(var e=0;e<this._FlowView._FlowData.Connections.length;e++){var t=this._FlowView._FlowData.Connections[e],o=this._FlowView._FlowData.ViewState.SelectedConnectionHash===t.Hash;this._FlowView._ConnectionRenderer.renderConnection(t,this._FlowView._ConnectionsLayer,o)}for(var n=0;n<this._FlowView._FlowData.Nodes.length;n++){var i=this._FlowView._FlowData.Nodes[n],r=this._FlowView._FlowData.ViewState.SelectedNodeHash===i.Hash,a=this._FlowView._NodeTypeProvider.getNodeType(i.Type);if(a&&a.DefaultPorts&&i.Ports)for(var l=0;l<i.Ports.length;l++)for(var s=i.Ports[l],c=0;c<a.DefaultPorts.length;c++){var d=a.DefaultPorts[c];if(d.Label===s.Label&&d.Direction===s.Direction){d.PortType&&(s.PortType=d.PortType),d.Side&&(s.Side=d.Side);break}}this._FlowView._NodeView.renderNode(i,this._FlowView._NodesLayer,r,a)}this._FlowView._PropertiesPanelView&&this._FlowView._PanelsLayer&&this._FlowView._TethersLayer&&this._FlowView._PropertiesPanelView.renderPanels(this._FlowView._FlowData.OpenPanels,this._FlowView._PanelsLayer,this._FlowView._TethersLayer,this._FlowView._FlowData.ViewState.SelectedTetherHash),this._FlowView.updateViewportTransform()}}},{key:"renderSingleConnection",value:function(e){if(this._FlowView&&this._FlowView._ConnectionsLayer){this._removeConnectionElements(e);var t=this._FlowView.getConnection(e);if(t){var o=this._FlowView._FlowData.ViewState.SelectedConnectionHash===e;this._FlowView._ConnectionRenderer.renderConnection(t,this._FlowView._ConnectionsLayer,o)}}}},{key:"renderSingleTether",value:function(e){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){for(var t=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(e,'"]')),o=0;o<t.length;o++)t[o].remove();var n=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e});if(n){var i=this._FlowView.getNode(n.NodeHash);if(i){var r=this._FlowView._FlowData.ViewState.SelectedTetherHash===e;this._FlowView._TetherService.renderTether(n,i,this._FlowView._TethersLayer,r,this._FlowView.options.ViewIdentifier)}}}}},{key:"updateNodePosition",value:function(e,t,o){if(this._FlowView){var n=this._FlowView.getNode(e);if(n){this._FlowView.options.EnableGridSnap&&(t=this._FlowView._LayoutService.snapToGrid(t,this._FlowView.options.GridSnapSize),o=this._FlowView._LayoutService.snapToGrid(o,this._FlowView.options.GridSnapSize)),n.X=t,n.Y=o,this._FlowView._resetHandlesForNode(e);var i=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(e,'"]'));i&&i.setAttribute("transform","translate(".concat(t,", ").concat(o,")")),this.renderConnectionsForNode(e),this.renderTethersForNode(e)}}}},{key:"renderConnectionsForNode",value:function(e){if(this._FlowView&&this._FlowView._ConnectionsLayer)for(var t=this._FlowView._FlowData.Connections.filter(function(t){return t.SourceNodeHash===e||t.TargetNodeHash===e}),o=0;o<t.length;o++){var n=t[o],i=this._FlowView._FlowData.ViewState.SelectedConnectionHash===n.Hash;this._removeConnectionElements(n.Hash),this._FlowView._ConnectionRenderer.renderConnection(n,this._FlowView._ConnectionsLayer,i)}}},{key:"_removeConnectionElements",value:function(e){for(var t=[this._FlowView._ConnectionsLayer,this._FlowView._EndpointsLayer,this._FlowView._PortHintsLayer],o=0;o<t.length;o++){var n=t[o];if(n)for(var i=n.querySelectorAll('[data-connection-hash="'.concat(e,'"]')),r=0;r<i.length;r++)i[r].remove()}}},{key:"renderTethersForNode",value:function(e){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){var t=this._FlowView._FlowData.OpenPanels.filter(function(t){return t.NodeHash===e});if(0!==t.length)for(var o=0;o<t.length;o++){for(var n=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(t[o].Hash,'"]')),i=0;i<n.length;i++)n[i].remove();var r=this._FlowView.getNode(t[o].NodeHash);if(r){var a=this._FlowView._FlowData.ViewState.SelectedTetherHash===t[o].Hash;this._FlowView._TetherService.renderTether(t[o],r,this._FlowView._TethersLayer,a,this._FlowView.options.ViewIdentifier)}}}}},{key:"reinjectMarkerDefs",value:function(){if(this._FlowView&&this._FlowView._ConnectorShapesProvider&&this._FlowView._SVGElement){var e=this._FlowView.options.ViewIdentifier,t=this._FlowView._SVGElement.querySelector("defs");if(t){for(var o=t.querySelectorAll("marker"),n=0;n<o.length;n++)o[n].remove();var i=this._FlowView._ConnectorShapesProvider.generateMarkerDefs(e),r=document.createElementNS("http://www.w3.org/2000/svg","svg");for(r.innerHTML=i;r.firstChild;)t.appendChild(r.firstChild)}}}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],59:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowSelectionManager",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"selectNode",value:function(e){var t=this._FlowView._FlowData.ViewState.SelectedNodeHash;if(this._FlowView._FlowData.ViewState.SelectedNodeHash=e,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&e!==t){var o=e?this._FlowView._FlowData.Nodes.find(function(t){return t.Hash===e}):null;this._FlowView._EventHandlerProvider.fireEvent("onNodeSelected",o)}}},{key:"selectConnection",value:function(e){var t=this._FlowView._FlowData.ViewState.SelectedConnectionHash;if(this._FlowView._FlowData.ViewState.SelectedConnectionHash=e,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&e!==t){var o=e?this._FlowView._FlowData.Connections.find(function(t){return t.Hash===e}):null;this._FlowView._EventHandlerProvider.fireEvent("onConnectionSelected",o)}}},{key:"selectTether",value:function(e){var t=this._FlowView._FlowData.ViewState.SelectedTetherHash;if(this._FlowView._FlowData.ViewState.SelectedTetherHash=e,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&e!==t){var o=e?this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e}):null;this._FlowView._EventHandlerProvider.fireEvent("onTetherSelected",o)}}},{key:"deselectAll",value:function(){this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow()}},{key:"deleteSelected",value:function(){return this._FlowView._FlowData.ViewState.SelectedNodeHash?this._FlowView.removeNode(this._FlowView._FlowData.ViewState.SelectedNodeHash):!!this._FlowView._FlowData.ViewState.SelectedConnectionHash&&this._FlowView.removeConnection(this._FlowView._FlowData.ViewState.SelectedConnectionHash)}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],60:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowTether",i._FlowView=o&&o.FlowView?o.FlowView:null,i}return _inherits(t,e),_createClass(t,[{key:"getSmartAnchors",value:function(e,t){var o,n,i=t.X+t.Width/2,r=t.Y+t.Height/2,a=e.X+e.Width/2-i,l=e.Y+e.Height/2-r;Math.abs(a)>=Math.abs(l)?a>=0?(o="right",n="left"):(o="left",n="right"):l>=0?(o="bottom",n="top"):(o="top",n="bottom");var s=this._FlowView._GeometryProvider.getEdgeCenter(t,o),c=this._FlowView._GeometryProvider.getEdgeCenter(e,n);return{nodeAnchor:Object.assign(s,{side:o}),panelAnchor:Object.assign(c,{side:n})}}},{key:"generateBezierPath",value:function(e,t,o,n){var i=this._FlowView._GeometryProvider.sideDirection(e.side),r=this._FlowView._GeometryProvider.sideDirection(t.side),a=e.x+20*i.dx,l=e.y+20*i.dy,s=t.x+20*r.dx,c=t.y+20*r.dy;if(null==o||null==n){var d=Math.abs(s-a),p=Math.abs(c-l),h=.4*Math.max(d,p,40),u=a+i.dx*h,f=l+i.dy*h,g=s+r.dx*h,m=c+r.dy*h;return this._FlowView._PathGenerator.buildBezierPathString({x:e.x,y:e.y},{x:a,y:l},{x:u,y:f},{x:g,y:m},{x:s,y:c},{x:t.x,y:t.y})}var v=a+30*i.dx,w=l+30*i.dy,y=s+30*r.dx,b=c+30*r.dy,S=s-a,_=c-l,k=Math.sqrt(S*S+_*_)||1,P=o-25*(S/=k),F=n-25*(_/=k),T=o+25*S,C=n+25*_;return this._FlowView._PathGenerator.buildSplitBezierPathString({x:e.x,y:e.y},{x:a,y:l},{x:v,y:w},{x:P,y:F},{x:o,y:n},{x:T,y:C},{x:y,y:b},{x:s,y:c},{x:t.x,y:t.y})}},{key:"generateOrthogonalPath",value:function(e,t,o,n){var i,r,a=this._FlowView._GeometryProvider.sideDirection(e.side),l=this._FlowView._GeometryProvider.sideDirection(t.side),s=e.x+20*a.dx,c=e.y+20*a.dy,d=t.x+20*l.dx,p=t.y+20*l.dy;if(o&&o.corner1&&o.corner2)i=o.corner1,r=o.corner2;else{var h=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(s,c,d,p,a,l,n);i=h.corner1,r=h.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:e.x,y:e.y},{x:s,y:c},{x:i.x,y:i.y},{x:r.x,y:r.y},{x:d,y:p},{x:t.x,y:t.y})}},{key:"getAutoMidpoint",value:function(e,t){return this._FlowView._PathGenerator.getAutoMidpointSimple(e,t,20)}},{key:"getOrthoGeometry",value:function(e,t,o){var n,i=this._FlowView._GeometryProvider.sideDirection(e.side),r=this._FlowView._GeometryProvider.sideDirection(t.side),a=e.x+20*i.dx,l=e.y+20*i.dy,s=t.x+20*r.dx,c=t.y+20*r.dy;o.TetherHandleCustomized&&null!=o.TetherOrthoCorner1X?((n=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,l,s,c,i,r,o.TetherOrthoMidOffset||0)).corner1={x:o.TetherOrthoCorner1X,y:o.TetherOrthoCorner1Y},n.corner2={x:o.TetherOrthoCorner2X,y:o.TetherOrthoCorner2Y}):n=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,l,s,c,i,r,o.TetherOrthoMidOffset||0);var d={x:(n.corner1.x+n.corner2.x)/2,y:(n.corner1.y+n.corner2.y)/2};return{corner1:n.corner1,corner2:n.corner2,midpoint:d}}},{key:"generatePath",value:function(e,t,o){if("orthogonal"===(e.TetherLineMode||"bezier")){var n=null;return e.TetherHandleCustomized&&null!=e.TetherOrthoCorner1X&&(n={corner1:{x:e.TetherOrthoCorner1X,y:e.TetherOrthoCorner1Y},corner2:{x:e.TetherOrthoCorner2X,y:e.TetherOrthoCorner2Y}}),this.generateOrthogonalPath(t,o,n,e.TetherOrthoMidOffset||0)}var i=this._getTetherBezierHandles(e);if(i.length>0)return this.generateMultiBezierPath(t,o,i);var r=e.TetherHandleCustomized&&null!=e.TetherBezierHandleX?e.TetherBezierHandleX:null,a=e.TetherHandleCustomized&&null!=e.TetherBezierHandleY?e.TetherBezierHandleY:null;return this.generateBezierPath(t,o,r,a)}},{key:"_getTetherBezierHandles",value:function(e){return e&&e.TetherHandleCustomized?Array.isArray(e.TetherBezierHandles)&&e.TetherBezierHandles.length>0?e.TetherBezierHandles:null!=e.TetherBezierHandleX&&null!=e.TetherBezierHandleY?[{x:e.TetherBezierHandleX,y:e.TetherBezierHandleY}]:[]:[]}},{key:"generateMultiBezierPath",value:function(e,t,o){var n=this._FlowView._GeometryProvider.sideDirection(e.side),i=this._FlowView._GeometryProvider.sideDirection(t.side),r={x:e.x+20*n.dx,y:e.y+20*n.dy},a={x:t.x+20*i.dx,y:t.y+20*i.dy};return this._FlowView._PathGenerator.buildMultiBezierPathString(e,r,e.side,a,t.side,t,o)}},{key:"updateHandlePosition",value:function(e,t,o,n){if(e.TetherHandleCustomized=!0,t&&t.startsWith("bezier-handle-")){var i=parseInt(t.replace("bezier-handle-",""),10);!isNaN(i)&&Array.isArray(e.TetherBezierHandles)&&i<e.TetherBezierHandles.length&&(e.TetherBezierHandles[i].x=o,e.TetherBezierHandles[i].y=n)}else switch(t){case"bezier-midpoint":Array.isArray(e.TetherBezierHandles)&&0!==e.TetherBezierHandles.length?(e.TetherBezierHandles[0].x=o,e.TetherBezierHandles[0].y=n):e.TetherBezierHandles=[{x:o,y:n}],e.TetherBezierHandleX=o,e.TetherBezierHandleY=n;break;case"ortho-corner1":e.TetherOrthoCorner1X=o,e.TetherOrthoCorner1Y=n;break;case"ortho-corner2":e.TetherOrthoCorner2X=o,e.TetherOrthoCorner2Y=n;break;case"ortho-midpoint":e.TetherOrthoMidOffset=e.TetherOrthoMidOffset||0,e._TetherMidDragX=o,e._TetherMidDragY=n}}},{key:"resetHandlePositions",value:function(e){e.TetherHandleCustomized&&(e.TetherHandleCustomized=!1,e.TetherBezierHandles=[],e.TetherBezierHandleX=null,e.TetherBezierHandleY=null,e.TetherOrthoCorner1X=null,e.TetherOrthoCorner1Y=null,e.TetherOrthoCorner2X=null,e.TetherOrthoCorner2Y=null,e.TetherOrthoMidOffset=0)}},{key:"resetHandlesForNode",value:function(e,t){for(var o=0;o<e.length;o++){var n=e[o];n.NodeHash===t&&this.resetHandlePositions(n)}}},{key:"addHandle",value:function(e,t,o,n,i){e.TetherLineMode="bezier",Array.isArray(e.TetherBezierHandles)||(e.TetherBezierHandles=[],null!=e.TetherBezierHandleX&&null!=e.TetherBezierHandleY&&e.TetherBezierHandles.push({x:e.TetherBezierHandleX,y:e.TetherBezierHandleY}));var r=0;this._FlowView._ConnectionRenderer&&n&&i&&(r=this._FlowView._ConnectionRenderer.computeInsertionIndex(e.TetherBezierHandles,{x:t,y:o},n,i)),e.TetherBezierHandles.splice(r,0,{x:t,y:o}),e.TetherHandleCustomized=!0}},{key:"removeHandle",value:function(e,t){Array.isArray(e.TetherBezierHandles)&&(t<0||t>=e.TetherBezierHandles.length||(e.TetherBezierHandles.splice(t,1),0===e.TetherBezierHandles.length&&(e.TetherHandleCustomized=!1,e.TetherBezierHandleX=null,e.TetherBezierHandleY=null)))}},{key:"toggleLineMode",value:function(e){var t=e.TetherLineMode||"bezier";return e.TetherLineMode="bezier"===t?"orthogonal":"bezier",e.TetherHandleCustomized=!1,e.TetherBezierHandles=[],e.TetherBezierHandleX=null,e.TetherBezierHandleY=null,e.TetherOrthoCorner1X=null,e.TetherOrthoCorner1Y=null,e.TetherOrthoCorner2X=null,e.TetherOrthoCorner2Y=null,e.TetherOrthoMidOffset=0,e.TetherLineMode}},{key:"renderTether",value:function(e,t,o,n,i){if(t){var r=this.getSmartAnchors(e,t),a=r.panelAnchor,l=r.nodeAnchor,s=this.generatePath(e,a,l),c=this._FlowView._ConnectorShapesProvider;if(c){var d=c.createTetherHitAreaElement(s,e.Hash);o.appendChild(d);var p=c.createTetherPathElement(s,e.Hash,n,i);o.appendChild(p)}else{var h=this._FlowView._SVGHelperProvider.createSVGElement("path");h.setAttribute("class","pict-flow-tether-hitarea"),h.setAttribute("d",s),h.setAttribute("data-element-type","tether-hitarea"),h.setAttribute("data-panel-hash",e.Hash),o.appendChild(h);var u=this._FlowView._SVGHelperProvider.createSVGElement("path");u.setAttribute("class","pict-flow-tether-line".concat(n?" selected":"")),u.setAttribute("d",s),u.setAttribute("marker-end","url(#flow-tether-arrowhead-".concat(i,")")),u.setAttribute("data-element-type","tether"),u.setAttribute("data-panel-hash",e.Hash),o.appendChild(u)}n&&this._renderHandles(e,o,a,l)}}},{key:"_renderHandles",value:function(e,t,o,n){if("orthogonal"===(e.TetherLineMode||"bezier")){var i=this.getOrthoGeometry(o,n,e);this._createHandle(t,e.Hash,"ortho-corner1",i.corner1.x,i.corner1.y,"pict-flow-tether-handle"),this._createHandle(t,e.Hash,"ortho-midpoint",i.midpoint.x,i.midpoint.y,"pict-flow-tether-handle-midpoint"),this._createHandle(t,e.Hash,"ortho-corner2",i.corner2.x,i.corner2.y,"pict-flow-tether-handle")}else{var r=this._getTetherBezierHandles(e);if(r.length>0)for(var a=0;a<r.length;a++)this._createHandle(t,e.Hash,"bezier-handle-"+a,r[a].x,r[a].y,"pict-flow-tether-handle");else{var l=this.getAutoMidpoint(o,n);this._createHandle(t,e.Hash,"bezier-midpoint",l.x,l.y,"pict-flow-tether-handle-midpoint")}}}},{key:"_createHandle",value:function(e,t,o,n,i,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-tether-handle-midpoint"===r?"tether-handle-midpoint":"tether-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(e,t,o,n,i,a,"tether-handle","data-panel-hash")}}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],61:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictServiceFlowViewportManager",i._FlowView=o&&o.FlowView?o.FlowView:null,i._IsFullscreen=!1,i}return _inherits(t,e),_createClass(t,[{key:"updateViewportTransform",value:function(){if(this._FlowView._ViewportElement){var e=this._FlowView._FlowData.ViewState;this._FlowView._ViewportElement.setAttribute("transform","translate(".concat(e.PanX,", ").concat(e.PanY,") scale(").concat(e.Zoom,")"))}}},{key:"setZoom",value:function(e,t,o){var n=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,e)),i=this._FlowView._FlowData.ViewState.Zoom;if("number"==typeof t&&"number"==typeof o){var r=this._FlowView._FlowData.ViewState;r.PanX=t-(t-r.PanX)*(n/i),r.PanY=o-(o-r.PanY)*(n/i)}this._FlowView._FlowData.ViewState.Zoom=n,this.updateViewportTransform()}},{key:"zoomToFit",value:function(){if(0!==this._FlowView._FlowData.Nodes.length&&this._FlowView._SVGElement){for(var e=1/0,t=1/0,o=-1/0,n=-1/0,i=0;i<this._FlowView._FlowData.Nodes.length;i++){var r=this._FlowView._FlowData.Nodes[i];e=Math.min(e,r.X),t=Math.min(t,r.Y),o=Math.max(o,r.X+r.Width),n=Math.max(n,r.Y+r.Height)}var a=o-e+100,l=n-t+100,s=this._FlowView._SVGElement.getBoundingClientRect(),c=s.width/a,d=s.height/l,p=Math.min(c,d,1);p=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,p));var h=(e+o)/2,u=(t+n)/2;this._FlowView._FlowData.ViewState.Zoom=p,this._FlowView._FlowData.ViewState.PanX=s.width/2-h*p,this._FlowView._FlowData.ViewState.PanY=s.height/2-u*p,this.updateViewportTransform()}}},{key:"screenToSVGCoords",value:function(e,t){if(!this._FlowView._SVGElement)return{x:e,y:t};var o=this._FlowView._SVGElement.createSVGPoint();o.x=e,o.y=t;var n=this._FlowView._SVGElement.getScreenCTM();if(n){var i=n.inverse(),r=o.matrixTransform(i),a=this._FlowView._FlowData.ViewState;return{x:(r.x-a.PanX)/a.Zoom,y:(r.y-a.PanY)/a.Zoom}}return{x:e,y:t}}},{key:"toggleFullscreen",value:function(){var e=this._FlowView.options.ViewIdentifier,t=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(e));if(t.length<1)return this._IsFullscreen;var o=t[0];return this._IsFullscreen=!this._IsFullscreen,this._IsFullscreen?o.classList.add("pict-flow-fullscreen"):o.classList.remove("pict-flow-fullscreen"),this._IsFullscreen}},{key:"exitFullscreen",value:function(){if(this._IsFullscreen){var e=this._FlowView.options.ViewIdentifier,t=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(e));t.length>0&&t[0].classList.remove("pict-flow-fullscreen"),this._IsFullscreen=!1}}}])}(e("fable-serviceproviderbase"));t.exports=n},{"fable-serviceproviderbase":6}],62:[function(e,t,o){var n=e("pict-view"),i={ViewIdentifier:"Flow-FloatingToolbar",DefaultRenderable:"Flow-FloatingToolbar-Content",DefaultDestinationAddress:"#Flow-FloatingToolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",CSS:!1,Templates:[{Hash:"Flow-FloatingToolbar-Template",Template:'\n<div class="pict-flow-floating-toolbar" id="Flow-FloatingToolbar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-floating-grip" id="Flow-FloatingGrip-{~D:Record.FlowViewIdentifier~}" title="Drag to move · Double-click to collapse"\n\t\tonmousedown="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._startDrag(event)"\n\t\tondblclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleGripDoubleClick(event)">\n\t\t<span id="Flow-FloatingIcon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t</div>\n\t<button class="pict-flow-floating-btn" data-flow-action="add-node" title="Add Node"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'add-node\')">\n\t\t<span id="Flow-FloatingIcon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="cards-popup" title="Cards"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'cards-popup\')">\n\t\t<span id="Flow-FloatingIcon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="delete-selected" title="Delete Selected"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'delete-selected\')">\n\t\t<span id="Flow-FloatingIcon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-in" title="Zoom In"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'zoom-in\')">\n\t\t<span id="Flow-FloatingIcon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-out" title="Zoom Out"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'zoom-out\')">\n\t\t<span id="Flow-FloatingIcon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-fit" title="Fit to View"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'zoom-fit\')">\n\t\t<span id="Flow-FloatingIcon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="auto-layout" title="Auto Layout"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'auto-layout\')">\n\t\t<span id="Flow-FloatingIcon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="layout-popup" title="Layout"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'layout-popup\')">\n\t\t<span id="Flow-FloatingIcon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="fullscreen" title="Toggle Fullscreen"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'fullscreen\')">\n\t\t<span id="Flow-FloatingIcon-fullscreen-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="dock-toolbar" title="Dock Toolbar"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._FloatingToolbarView._handleButtonClick(\'dock-toolbar\')">\n\t\t<span id="Flow-FloatingIcon-dock-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-FloatingToolbar-Content",TemplateHash:"Flow-FloatingToolbar-Template",DestinationAddress:"#Flow-FloatingToolbar-Container",RenderMethod:"replace"}]},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(i)),o),n])).serviceType="PictViewFlowFloatingToolbar",r._ToolbarView=null,r._FlowView=null,r._IsCollapsed=!1,r._IsDragging=!1,r._DragStartX=0,r._DragStartY=0,r._DragStartLeft=0,r._DragStartTop=0,r._BoundMouseMove=null,r._BoundMouseUp=null,r}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,o,n){return _superPropGet(t,"render",this,3)([e,o,this.options])}},{key:"onAfterRender",value:function(e,o,n,i){var r=this.options.FlowViewIdentifier;this._populateIcons();var a=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(r));if(a.length>0){if(!1===this.options.EnableAddNode){var l=a[0].querySelector('[data-flow-action="add-node"]');l&&l.remove()}if(!1===this.options.EnableCardPalette){var s=a[0].querySelector('[data-flow-action="cards-popup"]');s&&s.remove()}}return _superPropGet(t,"onAfterRender",this,3)([e,o,n,i])}},{key:"_handleButtonClick",value:function(e){"dock-toolbar"!==e?this._ToolbarView&&this._ToolbarView._handleToolbarAction(e):this._ToolbarView&&this._ToolbarView._setToolbarMode("docked")}},{key:"_handleGripDoubleClick",value:function(e){e&&"function"==typeof e.preventDefault&&(e.preventDefault(),e.stopPropagation()),this._toggleCollapse()}},{key:"_populateIcons",value:function(){var e=this._FlowView?this._FlowView._IconProvider:null;if(e)for(var t=this.options.FlowViewIdentifier,o={grip:"grip",plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",fullscreen:"fullscreen",dock:"dock"},n=Object.keys(o),i=0;i<n.length;i++){var r="Flow-FloatingIcon-".concat(n[i],"-").concat(t),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=e.getIconSVGMarkup(o[n[i]],16))}}},{key:"_toggleCollapse",value:function(){var e=this.options.FlowViewIdentifier,t=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(e));t.length<1||(this._IsCollapsed=!this._IsCollapsed,this._IsCollapsed?t[0].classList.add("collapsed"):t[0].classList.remove("collapsed"))}},{key:"_startDrag",value:function(e){var t=this;e.preventDefault();var o=this.options.FlowViewIdentifier,n=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(o));if(!(n.length<1)){var i=n[0];this._IsDragging=!0,this._DragStartX=e.clientX,this._DragStartY=e.clientY,this._DragStartLeft=i.offsetLeft,this._DragStartTop=i.offsetTop,this._BoundMouseMove=function(e){t._onDragMove(e)},this._BoundMouseUp=function(){t._onDragEnd()},document.addEventListener("mousemove",this._BoundMouseMove),document.addEventListener("mouseup",this._BoundMouseUp)}}},{key:"_onDragMove",value:function(e){if(this._IsDragging){var t=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));if(!(o.length<1)){var n=o[0],i=e.clientX-this._DragStartX,r=e.clientY-this._DragStartY,a=this._DragStartLeft+i,l=this._DragStartTop+r,s=n.parentElement;if(s){var c=s.clientWidth-n.offsetWidth,d=s.clientHeight-n.offsetHeight;a=Math.max(0,Math.min(a,c)),l=Math.max(0,Math.min(l,d))}n.style.left=a+"px",n.style.top=l+"px"}}}},{key:"_onDragEnd",value:function(){if(this._IsDragging=!1,this._BoundMouseMove&&(document.removeEventListener("mousemove",this._BoundMouseMove),this._BoundMouseMove=null),this._BoundMouseUp&&(document.removeEventListener("mouseup",this._BoundMouseUp),this._BoundMouseUp=null),this._ToolbarView){var e=this.options.FlowViewIdentifier,t=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(e));t.length>0&&(this._ToolbarView._FloatingPosition.X=t[0].offsetLeft,this._ToolbarView._FloatingPosition.Y=t[0].offsetTop)}}},{key:"show",value:function(){var e=this.options.FlowViewIdentifier,t=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(e));t.length>0&&(t[0].style.display="block");var o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(e));o.length>0&&this._ToolbarView&&(o[0].style.left=this._ToolbarView._FloatingPosition.X+"px",o[0].style.top=this._ToolbarView._FloatingPosition.Y+"px"),this._IsCollapsed&&o.length>0&&(this._IsCollapsed=!1,o[0].classList.remove("collapsed"))}},{key:"hide",value:function(){var e=this.options.FlowViewIdentifier,t=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(e));t.length>0&&(t[0].style.display="none")}}])}(n);t.exports=r,t.exports.default_configuration=i},{"pict-view":137}],63:[function(e,t,o){var n=e("pict-view"),i={ViewIdentifier:"Flow-NodeRenderer",AutoRender:!1,NodeTitleBarHeight:22},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(i)),o),n])).serviceType="PictViewFlowNode",r._FlowView=null,r}return _inherits(t,e),_createClass(t,[{key:"renderNode",value:function(e,t,o,n){var i=this,r=this._FlowView._SVGHelperProvider.createSVGElement("g"),a="pict-flow-node ".concat(o?"selected":""," pict-flow-node-").concat(e.Type||"default");n&&(n.PortLabelsOnHover&&(a+=" pict-flow-node-port-labels-hover"),n.PortLabelsVertical&&(a+=" pict-flow-node-port-labels-vertical"));var l=void 0!==e.ColorRole?e.ColorRole:n&&n.ColorRole;l&&"none"!==l&&(a+=" pict-flow-node-color-"+l),r.setAttribute("class",a),r.setAttribute("transform","translate(".concat(e.X,", ").concat(e.Y,")")),r.setAttribute("data-node-hash",e.Hash),r.setAttribute("data-element-type","node"),this._FlowView._PortRenderer&&"function"==typeof this._FlowView._PortRenderer._wirePortHintHover&&this._FlowView._PortRenderer._wirePortHintHover(r,null,e.Hash);var s=e.Width||180,c=e.Height||80,d=this.options.NodeTitleBarHeight,p=this._FlowView._GeometryProvider;if(p&&e.Ports&&e.Ports.length>0){var h=p.computeMinimumNodeHeight(e.Ports,d);h>c&&(c=h)}e.Width=s,e.Height=c;var u="rect";if(this._FlowView._ThemeProvider){var f=this._FlowView._ThemeProvider.getActiveTheme();f&&f.NodeBodyMode&&(u=f.NodeBodyMode)}"bracket"===u?this._renderBracketNodeBody(r,e,s,c,d,n):this._renderRectNodeBody(r,e,s,c,d,n);var g=!1,m=12;if(n&&n.CardMetadata){var v=n.CardMetadata,w=this._FlowView._IconProvider;(v.Icon||w)&&(g=!0)}var y=this._FlowView._SVGHelperProvider.createSVGElement("text");y.setAttribute("class","pict-flow-node-title"),g?(y.setAttribute("x",String(24)),y.setAttribute("text-anchor","start")):(y.setAttribute("x",String(s/2)),y.setAttribute("text-anchor","middle")),y.setAttribute("y",String(d/2+1)),y.setAttribute("dominant-baseline","central"),y.textContent=e.Title||"Untitled",r.appendChild(y);var b=!n||!1!==n.ShowTypeLabel,S=function(){if(b&&n&&n.Label&&n.Label!==e.Title){var t=i._FlowView._SVGHelperProvider.createSVGElement("text");t.setAttribute("class","pict-flow-node-type-label"),t.setAttribute("x",String(s/2)),t.setAttribute("y",String(d+16)),t.setAttribute("text-anchor","middle"),t.setAttribute("dominant-baseline","central"),t.textContent=n.Label,r.appendChild(t)}if(n&&n.CardMetadata){var o=n.CardMetadata,a=i._FlowView._IconProvider,l=!1,p=(d-m)/2;if(o.Icon&&a&&!a.isEmojiIcon(o.Icon)){var h=a.resolveIconKey(o),u=a.renderIconIntoSVGGroup(h,r,8,p,m);u&&u.setAttribute("class",(u.getAttribute("class")||"")+" pict-flow-node-title-icon"),l=!0}else if(o.Icon&&a&&a.isEmojiIcon(o.Icon)){var f=i._FlowView._SVGHelperProvider.createSVGElement("text");f.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),f.setAttribute("font-size",String(m)),f.setAttribute("text-anchor","middle"),f.setAttribute("dominant-baseline","central"),f.setAttribute("pointer-events","none"),f.setAttribute("x",String(14)),f.setAttribute("y",String(d/2)),f.textContent=o.Icon,r.appendChild(f),l=!0}else if(o.Icon){var g=i._FlowView._SVGHelperProvider.createSVGElement("text");g.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),g.setAttribute("font-size",String(m)),g.setAttribute("text-anchor","middle"),g.setAttribute("dominant-baseline","central"),g.setAttribute("pointer-events","none"),g.setAttribute("x",String(14)),g.setAttribute("y",String(d/2)),g.textContent=o.Icon,r.appendChild(g),l=!0}if(!l&&a){var v=a.renderIconIntoSVGGroup("default",r,8,p,m);v&&v.setAttribute("class",(v.getAttribute("class")||"")+" pict-flow-node-title-icon")}var w=d+(c-d)/2;if(b&&o.Code){var y=i._FlowView._SVGHelperProvider.createSVGElement("text");y.setAttribute("class","pict-flow-node-card-code"),y.setAttribute("font-size","10"),y.setAttribute("font-family","monospace"),y.setAttribute("fill","#7f8c8d"),y.setAttribute("text-anchor","middle"),y.setAttribute("dominant-baseline","central"),y.setAttribute("pointer-events","none"),y.setAttribute("x",String(s/2)),y.setAttribute("y",String(w)),y.textContent=o.Code,r.appendChild(y)}if(o.Tooltip||o.Description){var S=i._FlowView._SVGHelperProvider.createSVGElement("title");S.textContent=o.Tooltip||o.Description,r.appendChild(S)}}};if(!n||!1!==n.LabelsInFront?(this._renderBodyContent(e,r,s,c,n),S(),this._renderPorts(e,r,s,c,n)):(S(),this._renderPorts(e,r,s,c,n),this._renderBodyContent(e,r,s,c,n)),n&&n.PropertiesPanel){var _,k=10,P=s-k-4,F=c-k-4,T=this._FlowView._ConnectorShapesProvider;T?_=T.createPanelIndicatorElement(e.Hash,P,F,k,k):((_=this._FlowView._SVGHelperProvider.createSVGElement("rect")).setAttribute("class","pict-flow-node-panel-indicator"),_.setAttribute("x",String(P)),_.setAttribute("y",String(F)),_.setAttribute("width",String(k)),_.setAttribute("height",String(k)),_.setAttribute("rx","2"),_.setAttribute("ry","2"),_.setAttribute("data-node-hash",e.Hash),_.setAttribute("data-element-type","panel-indicator"));var C=this._FlowView._SVGHelperProvider.createSVGElement("title");C.textContent="Double-click to open properties",_.appendChild(C),r.appendChild(_)}t.appendChild(r)}},{key:"_renderPorts",value:function(e,t,o,n,i){this._FlowView._PortRenderer.renderPorts(e,t,o,n,i,this.options.NodeTitleBarHeight)}},{key:"_renderBodyContent",value:function(e,t,o,n,i){if(i&&i.BodyContent){var r=i.BodyContent,a=r.ContentType;if(a){var l=this.options.NodeTitleBarHeight,s="number"==typeof r.Padding?r.Padding:2,c={x:s,y:l+s,width:o-2*s,height:n-l-2*s},d=this._FlowView.pict||this.pict;if(r.Templates&&Array.isArray(r.Templates)){this._registeredBodyTemplates||(this._registeredBodyTemplates=new Set);for(var p=0;p<r.Templates.length;p++){var h=r.Templates[p];h.Hash&&h.Template&&!this._registeredBodyTemplates.has(h.Hash)&&(d.TemplateProvider.addTemplate(h.Hash,h.Template,"PictViewFlowNode-BodyContent"),this._registeredBodyTemplates.add(h.Hash))}}switch(a){case"svg":this._renderBodyContentSVG(e,t,r,c,i,d);break;case"html":this._renderBodyContentHTML(e,t,r,c,i,d);break;case"canvas":this._renderBodyContentCanvas(e,t,r,c,i);break;default:this.log.warn("PictViewFlowNode _renderBodyContent: unknown ContentType ["+a+"]")}}}}},{key:"_renderBodyContentSVG",value:function(e,t,o,n,i,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("g");a.setAttribute("class","pict-flow-node-body-content"),a.setAttribute("transform","translate(".concat(n.x,", ").concat(n.y,")"));var l=this._resolveBodyTemplate(o,e,r);if(l){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");for(s.innerHTML=l;s.firstChild;)a.appendChild(s.firstChild)}"function"==typeof o.RenderCallback&&o.RenderCallback(a,e,i,n),t.appendChild(a)}},{key:"_renderBodyContentHTML",value:function(e,t,o,n,i,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");a.setAttribute("class","pict-flow-node-body-content-fo"),a.setAttribute("x",String(n.x)),a.setAttribute("y",String(n.y)),a.setAttribute("width",String(n.width)),a.setAttribute("height",String(n.height));var l=document.createElement("div");l.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),l.setAttribute("class","pict-flow-node-body-content-html"),l.setAttribute("onpointerdown","event.stopPropagation()"),l.setAttribute("onwheel","event.stopPropagation()");var s=this._resolveBodyTemplate(o,e,r);s&&(l.innerHTML=s),"function"==typeof o.RenderCallback&&o.RenderCallback(l,e,i,n),a.appendChild(l),t.appendChild(a)}},{key:"_renderBodyContentCanvas",value:function(e,t,o,n,i){var r=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");r.setAttribute("class","pict-flow-node-body-content-fo"),r.setAttribute("x",String(n.x)),r.setAttribute("y",String(n.y)),r.setAttribute("width",String(n.width)),r.setAttribute("height",String(n.height));var a=document.createElement("canvas");a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),a.setAttribute("class","pict-flow-node-body-content-canvas"),a.width=Math.floor(n.width),a.height=Math.floor(n.height),a.style.width="100%",a.style.height="100%",a.setAttribute("onpointerdown","event.stopPropagation()"),a.setAttribute("onwheel","event.stopPropagation()"),"function"==typeof o.RenderCallback&&o.RenderCallback(a,e,i,n),r.appendChild(a),t.appendChild(r)}},{key:"_resolveBodyTemplate",value:function(e,t,o){return e.TemplateHash?o.parseTemplateByHash(e.TemplateHash,t):e.Template?o.parseTemplate(e.Template,t,null,[t]):null}},{key:"_renderRectNodeBody",value:function(e,t,o,n,i,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(n)),a.setAttribute("data-node-hash",t.Hash),a.setAttribute("data-element-type","node-body"),r&&r.BodyStyle)for(var l in r.BodyStyle)a.setAttribute(l,r.BodyStyle[l]);if(t.BodyStyle)for(var s in t.BodyStyle)a.setAttribute(s,t.BodyStyle[s]);if(t.Style){var c=[];t.Style.BodyFill&&c.push("fill:"+t.Style.BodyFill),t.Style.BodyStroke&&c.push("stroke:"+t.Style.BodyStroke),t.Style.BodyStrokeWidth&&c.push("stroke-width:"+t.Style.BodyStrokeWidth),c.length>0&&a.setAttribute("style",c.join(";"))}e.appendChild(a);var d=this._FlowView._SVGHelperProvider.createSVGElement("rect");d.setAttribute("class","pict-flow-node-title-bar"),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(o)),d.setAttribute("height",String(i)),d.setAttribute("data-node-hash",t.Hash),d.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&d.setAttribute("fill",r.TitleBarColor),t.TitleBarColor&&d.setAttribute("fill",t.TitleBarColor),e.appendChild(d);var p=this._FlowView._SVGHelperProvider.createSVGElement("rect");p.setAttribute("class","pict-flow-node-title-bar-bottom"),p.setAttribute("x","0"),p.setAttribute("y",String(i-8)),p.setAttribute("width",String(o)),p.setAttribute("height","8"),p.setAttribute("data-node-hash",t.Hash),p.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&p.setAttribute("fill",r.TitleBarColor),t.TitleBarColor&&p.setAttribute("fill",t.TitleBarColor),t.Style&&t.Style.TitleBarColor&&(d.setAttribute("style","fill:"+t.Style.TitleBarColor),p.setAttribute("style","fill:"+t.Style.TitleBarColor)),e.appendChild(p)}},{key:"_renderBracketNodeBody",value:function(e,t,o,n,i,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body pict-flow-node-bracket-fill"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(n)),a.setAttribute("data-node-hash",t.Hash),a.setAttribute("data-element-type","node-body"),t.Style){var l=[];t.Style.BodyFill&&l.push("fill:"+t.Style.BodyFill),l.length>0&&a.setAttribute("style",l.join(";"))}e.appendChild(a);var s=this._FlowView._SVGHelperProvider.createSVGElement("rect");s.setAttribute("class","pict-flow-node-title-bar pict-flow-node-bracket-title-fill"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("width",String(o)),s.setAttribute("height",String(i)),s.setAttribute("data-node-hash",t.Hash),s.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&s.setAttribute("style","fill:"+r.TitleBarColor),t.Style&&t.Style.TitleBarColor&&s.setAttribute("style","fill:"+t.Style.TitleBarColor),e.appendChild(s);var c={SerifLength:6,TitleSeparator:!0};if(this._FlowView._ThemeProvider){var d=this._FlowView._ThemeProvider.getActiveTheme();d&&d.BracketConfig&&(c=Object.assign(c,d.BracketConfig))}var p=0;this._FlowView._ThemeProvider&&(p=this._FlowView._ThemeProvider.getNodeNoiseAmplitude());var h="";this._FlowView._NoiseProvider&&(h=this._FlowView._NoiseProvider.generateBracketPath(o,n,c.SerifLength,c.TitleSeparator?i:0,p,t.Hash));var u=this._FlowView._SVGHelperProvider.createSVGElement("path");if(u.setAttribute("class","pict-flow-node-bracket"),u.setAttribute("d",h),u.setAttribute("data-node-hash",t.Hash),u.setAttribute("data-element-type","node-body"),t.Style){var f=[];t.Style.BodyStroke&&f.push("stroke:"+t.Style.BodyStroke),t.Style.BodyStrokeWidth&&f.push("stroke-width:"+t.Style.BodyStrokeWidth),f.length>0&&u.setAttribute("style",f.join(";"))}e.appendChild(u)}}])}(n);t.exports=r,t.exports.default_configuration=i},{"pict-view":137}],64:[function(e,t,o){var n=e("pict-view"),i={ViewIdentifier:"Flow-PropertiesPanel",AutoRender:!1,Templates:[{Hash:"Flow-InfoPanel-Wrapper",Template:'<div class="pict-flow-info-panel">{~D:Record.PanelContent~}</div>'},{Hash:"Flow-InfoPanel-Header-Icon",Template:'<div class="pict-flow-info-panel-header with-icon">{~D:Record.Icon~} {~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Header",Template:'<div class="pict-flow-info-panel-header">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Description",Template:'<div class="pict-flow-info-panel-description">{~D:Record.Description~}</div>'},{Hash:"Flow-InfoPanel-Badges",Template:'<div class="pict-flow-info-panel-badges">{~D:Record.BadgesContent~}</div>'},{Hash:"Flow-InfoPanel-Badge-Category",Template:'<span class="pict-flow-info-panel-badge category">{~D:Record.Category~}</span>'},{Hash:"Flow-InfoPanel-Badge-Code",Template:'<span class="pict-flow-info-panel-badge code">{~D:Record.Code~}</span>'},{Hash:"Flow-InfoPanel-Section-Inputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Inputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Section-Outputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Outputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Input",Template:'<div class="pict-flow-info-panel-port input">{~D:Record.Label~}{~D:Record.Constraint~}</div>'},{Hash:"Flow-InfoPanel-Port-Output",Template:'<div class="pict-flow-info-panel-port output">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Constraint",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.ConstraintText~}</span>'},{Hash:"Flow-InfoPanel-Section-Generic",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">{~D:Record.SectionTitle~}</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Event",Template:'<div class="pict-flow-info-panel-port event">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Value",Template:'<div class="pict-flow-info-panel-port value">{~D:Record.Label~}{~D:Record.DataType~}</div>'},{Hash:"Flow-InfoPanel-Port-DataType",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.DataTypeText~}</span>'},{Hash:"Flow-NodeProps-Editor",Template:'<div class="pict-flow-node-props-fields" data-flow-view="{~D:Record.FlowViewIdentifier~}" data-node-hash="{~D:Record.NodeHash~}"><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title</label><input type="text" class="pict-flow-node-props-input" data-prop="Title" value="{~D:Record.Title~}" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Width" value="{~D:Record.Width~}" min="60" step="10" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Height</label><input type="number" class="pict-flow-node-props-input" data-prop="Height" value="{~D:Record.Height~}" min="40" step="10" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Fill</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyFill" value="{~D:Record.BodyFillValue~}" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Stroke</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyStroke" value="{~D:Record.BodyStrokeValue~}" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Stroke Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Style.BodyStrokeWidth" value="{~D:Record.BodyStrokeWidthValue~}" min="0" max="10" step="0.5" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title Bar</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.TitleBarColor" value="{~D:Record.TitleBarColorValue~}" oninput="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._applyNodePropChange(\'{~D:Record.NodeHash~}\', this.getAttribute(\'data-prop\'), this.value, this.type, event)" onpointerdown="event.stopPropagation()" /></div></div>'}]},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(i)),o),n])).serviceType="PictViewFlowPropertiesPanel",r._FlowView=null,r._PanelInstances={},r}return _inherits(t,e),_createClass(t,[{key:"renderPanels",value:function(e,t,o,n){if(t&&o&&this._FlowView){for(var i=Array.isArray(e)?e:[],r=new Set,a=t.querySelectorAll(".pict-flow-panel-foreign-object"),l=0;l<a.length;l++)r.add(a[l].getAttribute("data-panel-hash"));for(var s=new Set,c=0;c<i.length;c++)s.add(i[c].Hash);for(var d=0;d<a.length;d++){var p=a[d].getAttribute("data-panel-hash");s.has(p)||(a[d].remove(),this._PanelInstances[p]&&(this._PanelInstances[p].destroy(),delete this._PanelInstances[p]))}for(var h=0;h<i.length;h++){var u=i[h];if(r.has(u.Hash)){var f=t.querySelector('[data-panel-hash="'.concat(u.Hash,'"]'));f&&(f.setAttribute("x",String(u.X)),f.setAttribute("y",String(u.Y)),f.setAttribute("width",String(u.Width)),f.setAttribute("height",String(u.Height)))}else this._createPanelForeignObject(u,t)}for(;o.firstChild;)o.removeChild(o.firstChild);for(var g=0;g<i.length;g++){var m=n===i[g].Hash;this._renderTether(i[g],o,m)}}}},{key:"_createPanelForeignObject",value:function(e,t){var o=this._FlowView._PanelChromeProvider;if(o){var n=o.createPanelForeignObject(e,t);n&&this._renderPanelContent(e,n);var i=t.querySelector('[data-panel-hash="'.concat(e.Hash,'"]'));i&&(this._renderAppearanceTab(e,i),this._renderHelpTab(e,i))}}},{key:"_renderPanelContent",value:function(e,t){var o=this._FlowView.getNode(e.NodeHash);if(o){var n=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(n)if(n.PropertiesPanel){var i=n.PropertiesPanel,r=i.PanelType||"Base",a="PictFlowCardPropertiesPanel-".concat(r),l=null;this._PanelInstances[e.Hash]?l=this._PanelInstances[e.Hash]:(this.fable.servicesMap.hasOwnProperty(a)?l=this.fable.instantiateServiceProviderWithoutRegistration(a,i):this.fable.servicesMap.hasOwnProperty("PictFlowCardPropertiesPanel")&&(l=this.fable.instantiateServiceProviderWithoutRegistration("PictFlowCardPropertiesPanel",i)),l&&(l._FlowView=this._FlowView,this._PanelInstances[e.Hash]=l)),l&&l.render(t,o),this._renderPortSummary(t,n)}else this._renderInfoPanelContent(t,o,n)}}},{key:"_renderInfoPanelContent",value:function(e,t,o){var n=o.CardMetadata||{},i=o.DefaultPorts||[],r=i.filter(function(e){return"input"===e.Direction}),a=i.filter(function(e){return"output"===e.Direction}),l=o.Label||t.Type,s=[],c=this._FlowView._IconProvider;if(n.Icon&&c&&!c.isEmojiIcon(n.Icon)){var d=c.resolveIconKey(n),p=c.getIconSVGMarkup(d,18);s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:p,Label:l}))}else if(n.Icon)s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:n.Icon,Label:l}));else if(c){var h=c.getIconSVGMarkup("default",18);s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:h,Label:l}))}else s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header",{Label:l}));if(n.Description&&s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Description",{Description:n.Description})),n.Category||n.Code){var u="";n.Category&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Category",{Category:n.Category})),n.Code&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Code",{Code:n.Code})),s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Badges",{BadgesContent:u}))}if(r.length>0){for(var f="",g=0;g<r.length;g++){var m=r[g],v=this._getPortConstraintHTML(m);f+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Input",{Label:m.Label||"In",Constraint:v})}s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Inputs",{PortsContent:f}))}if(a.length>0){for(var w="",y=0;y<a.length;y++){var b=a[y];w+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Output",{Label:b.Label||"Out"})}s.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Outputs",{PortsContent:w}))}e.innerHTML=this.pict.parseTemplateByHash("Flow-InfoPanel-Wrapper",{PanelContent:s.join("")})}},{key:"_renderPortSummary",value:function(e,t){var o=t.DefaultPorts||[];if(0!==o.length){for(var n=[],i=[],r=[],a=0;a<o.length;a++){var l=o[a],s=l.PortType||"";"event-in"===s?n.push(l):"event-out"===s||"error"===s?i.push(l):"value"===s&&r.push(l)}if(0!==n.length||0!==i.length||0!==r.length){var c=[];if(n.length>0){for(var d="",p=0;p<n.length;p++)d+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:n[p].Label||n[p].Name||"Event In"});c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Inputs",PortsContent:d}))}if(i.length>0){for(var h="",u=0;u<i.length;u++){var f=i[u],g=f.Label||f.Name||"Event Out";"error"===f.PortType&&(g+=" ⚠"),h+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:g})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Outputs",PortsContent:h}))}if(r.length>0){for(var m="",v=0;v<r.length;v++){var w=r[v],y=w.Label||w.Name||"Output",b="";w.DataType&&(b=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-DataType",{DataTypeText:w.DataType})),m+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Value",{Label:y,DataType:b})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"State Outputs",PortsContent:m}))}if(c.length>0){var S=document.createElement("div");S.className="pict-flow-info-panel pict-flow-port-summary",S.innerHTML=c.join(""),e.appendChild(S)}}}}},{key:"_getPortConstraintHTML",value:function(e){var t="number"==typeof e.MinimumInputCount?e.MinimumInputCount:0,o="number"==typeof e.MaximumInputCount?e.MaximumInputCount:-1;if(t>0||o>0){var n="";return n=o<0?"(min ".concat(t,")"):t===o?"(exactly ".concat(t,")"):"(".concat(t,"–").concat(o,")"),this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Constraint",{ConstraintText:n})}return""}},{key:"_renderAppearanceTab",value:function(e,t){var o=this._FlowView.getNode(e.NodeHash);if(o){var n=t.querySelector('.pict-flow-panel-tab-pane[data-tab="appearance"]');if(n){var i=o.Style||{},r=this._FlowView._NodeTypeProvider.getNodeType(o.Type),a="#2c3e50",l="#ffffff",s="#d0d4d8";r&&(r.TitleBarColor&&(a=r.TitleBarColor),r.BodyStyle&&(r.BodyStyle.fill&&(l=r.BodyStyle.fill),r.BodyStyle.stroke&&(s=r.BodyStyle.stroke)));var c={Title:o.Title||"",Width:o.Width||180,Height:o.Height||80,BodyFillValue:i.BodyFill||l,BodyStrokeValue:i.BodyStroke||s,BodyStrokeWidthValue:i.BodyStrokeWidth||1,TitleBarColorValue:i.TitleBarColor||a,NodeHash:e.NodeHash,FlowViewIdentifier:this._FlowView.options.ViewIdentifier};this.pict.ContentAssignment.assignContent(n,this.pict.parseTemplateByHash("Flow-NodeProps-Editor",c))}}}},{key:"_renderHelpTab",value:function(e,t){var o=this._FlowView.getNode(e.NodeHash);if(o){var n=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(n){var i=n.CardMetadata&&n.CardMetadata.Help?n.CardMetadata.Help:null;if(i){var r=t.querySelector('.pict-flow-panel-tab[data-tab-target="help"]');r&&(r.style.display="");var a=t.querySelector('.pict-flow-panel-tab-pane[data-tab="help"]');a&&(a.innerHTML='<div class="pict-flow-panel-help-content">'+i+"</div>")}}}}},{key:"switchPanelTab",value:function(e){var t=e.closest("foreignObject");if(t){for(var o=e.getAttribute("data-tab-target"),n=t.querySelectorAll(".pict-flow-panel-tab"),i=t.querySelectorAll(".pict-flow-panel-tab-pane"),r=0;r<n.length;r++)n[r].classList.remove("active");for(var a=0;a<i.length;a++)i[a].classList.remove("active"),i[a].style.display="none";e.classList.add("active");var l=t.querySelector('.pict-flow-panel-tab-pane[data-tab="'+o+'"]');l&&(l.classList.add("active"),l.style.display="block")}}},{key:"_applyNodePropChange",value:function(e,t,o,n){var i=this._FlowView.getNode(e);if(i){var r=o;if("number"!==n||(r=parseFloat(o),!isNaN(r))){if("Title"===t)i.Title=r;else if("Width"===t)i.Width=r;else if("Height"===t)i.Height=r;else if(t.startsWith("Style.")){i.Style||(i.Style={});var a=t.substring(6);i.Style[a]=r}this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"_renderTether",value:function(e,t,o){var n=this._FlowView._TetherService;if(n){var i=this._FlowView.getNode(e.NodeHash);if(i){var r=this._FlowView.options.ViewIdentifier;n.renderTether(e,i,t,o,r)}}}},{key:"marshalAllFromPanels",value:function(){for(var e in this._PanelInstances){var t=this._PanelInstances[e];t&&t._NodeData&&t.marshalFromPanel(t._NodeData)}}},{key:"destroyPanel",value:function(e){this._PanelInstances[e]&&(this._PanelInstances[e].destroy(),delete this._PanelInstances[e])}},{key:"destroyAllPanels",value:function(){for(var e in this._PanelInstances)this._PanelInstances[e].destroy();this._PanelInstances={}}}])}(n);t.exports=r,t.exports.default_configuration=i},{"pict-view":137}],65:[function(e,t,o){var n=e("pict-view"),i={ViewIdentifier:"Flow-Toolbar",DefaultRenderable:"Flow-Toolbar-Content",DefaultDestinationAddress:"#Flow-Toolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",EnablePalette:!0,EnableAddNode:!0,EnableCardPalette:!0,CSS:!1,Templates:[{Hash:"Flow-Toolbar-Template",Template:'\n<div class="pict-flow-toolbar" id="Flow-Toolbar-Bar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="add-node" id="Flow-Toolbar-AddNode-{~D:Record.FlowViewIdentifier~}" title="Add Node"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'add-node\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Node</span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="cards-popup" id="Flow-Toolbar-Cards-{~D:Record.FlowViewIdentifier~}" title="Card Palette"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'cards-popup\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Cards</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-CardsChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="delete-selected" title="Delete Node"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'delete-selected\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="layout-popup" id="Flow-Toolbar-Layout-{~D:Record.FlowViewIdentifier~}" title="Manage saved layouts"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'layout-popup\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Layouts</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-LayoutChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<div class="pict-flow-toolbar-btn-split" id="Flow-Toolbar-Auto-{~D:Record.FlowViewIdentifier~}">\n\t\t\t<button class="pict-flow-toolbar-btn pict-flow-toolbar-btn-split-main" data-flow-action="apply-current-layout" title="Apply current layout algorithm"\n\t\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'apply-current-layout\')">\n\t\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-auto-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t\t<span class="pict-flow-toolbar-btn-text">Auto</span>\n\t\t\t</button>\n\t\t\t<button class="pict-flow-toolbar-btn pict-flow-toolbar-btn-split-chevron" data-flow-action="layout-algorithm-popup" title="Choose layout algorithm"\n\t\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'layout-algorithm-popup\')">\n\t\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-AutoChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t</button>\n\t\t</div>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-in" title="Zoom In"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'zoom-in\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-out" title="Zoom Out"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'zoom-out\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-fit" title="Fit to View"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'zoom-fit\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group pict-flow-toolbar-right">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="settings-popup" id="Flow-Toolbar-Settings-{~D:Record.FlowViewIdentifier~}" title="Theme Settings"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'settings-popup\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-settings-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="fullscreen" id="Flow-Toolbar-Fullscreen-{~D:Record.FlowViewIdentifier~}" title="Toggle Fullscreen"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'fullscreen\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Fullscreen-Icon-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="toggle-floating" title="Float"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'toggle-floating\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="collapse-toolbar" title="Collapse Toolbar"\n\t\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'collapse-toolbar\')">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-collapse-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n</div>\n<div class="pict-flow-toolbar-collapsed" id="Flow-Toolbar-Collapsed-{~D:Record.FlowViewIdentifier~}">\n\t<button class="pict-flow-toolbar-expand-btn" data-flow-action="expand-toolbar" title="Expand Toolbar" id="Flow-Toolbar-ExpandBtn-{~D:Record.FlowViewIdentifier~}"\n\t\tonclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._handleToolbarAction(\'expand-toolbar\')">\n\t\t<span id="Flow-Toolbar-Icon-expand-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n<div class="pict-flow-toolbar-popup-anchor" id="Flow-Toolbar-PopupAnchor-{~D:Record.FlowViewIdentifier~}">\n</div>\n'},{Hash:"Flow-AddNode-List",Template:"{~TS:Flow-AddNode-Row:Record.Rows~}"},{Hash:"Flow-AddNode-Row",Template:'<div class="pict-flow-popup-list-item" data-node-type="{~D:Record.NodeType~}" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._addNodeFromPopup(this.getAttribute(\'data-node-type\'))"><span class="pict-flow-popup-list-item-icon">{~D:Record.IconHTML~}</span><span class="pict-flow-popup-list-item-label">{~D:Record.Label~}</span>{~NE:Record.Code^<span class="pict-flow-popup-list-item-code">{~D:Record.Code~}</span>~}</div>'},{Hash:"Flow-Cards-List",Template:"{~TS:Flow-Cards-Category:Record.Categories~}"},{Hash:"Flow-Cards-Category",Template:'<div class="pict-flow-palette-category" style="padding:0.35em 0.5em;"><div class="pict-flow-palette-category-label">{~D:Record.Name~}</div><div class="pict-flow-palette-cards">{~TS:Flow-Cards-Card:Record.Cards~}</div></div>'},{Hash:"Flow-Cards-Card",Template:'<div class="pict-flow-palette-card{~D:Record.DisabledClass~}" data-card-type="{~D:Record.CardType~}" title="{~D:Record.Tooltip~}" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._addCardFromPopup(this.getAttribute(\'data-card-type\'))">{~NE:Record.IconHTML^<span class="pict-flow-palette-card-icon">{~D:Record.IconHTML~}</span>~}{~NE:Record.IconEmoji^<span class="pict-flow-palette-card-icon">{~D:Record.IconEmoji~}</span>~}{~NE:Record.SwatchColor^<span class="pict-flow-palette-card-swatch" style="background-color: {~D:Record.SwatchColor~};"></span>~}<span class="pict-flow-palette-card-title">{~D:Record.Label~}</span>{~NE:Record.Code^<span class="pict-flow-palette-card-code">{~D:Record.Code~}</span>~}</div>'},{Hash:"Flow-Layout-List",Template:"{~TS:Flow-Layout-Row:Record.Rows~}"},{Hash:"Flow-Layout-Row",Template:'<div class="pict-flow-popup-layout-row" data-layout-hash="{~D:Record.LayoutHash~}" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._restoreLayoutFromPopup(\'{~D:Record.LayoutHash~}\', event)"><span class="pict-flow-popup-layout-name">{~D:Record.Name~}</span><button class="pict-flow-popup-layout-delete" title="Delete layout" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._ToolbarView._deleteLayoutFromPopup(\'{~D:Record.LayoutHash~}\', event)">{~D:Record.DeleteIconHTML~}</button></div>'},{Hash:"Flow-Layout-OptionList",Template:"{~TS:Flow-Layout-Option:Record.Options~}"},{Hash:"Flow-Layout-Option",Template:'<option value="{~D:Record.Value~}"{~D:Record.SelectedAttr~}>{~D:Record.Label~}</option>'}],Renderables:[{RenderableHash:"Flow-Toolbar-Content",TemplateHash:"Flow-Toolbar-Template",DestinationAddress:"#Flow-Toolbar-Container",RenderMethod:"replace"}]},r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(i)),o),n])).serviceType="PictViewFlowToolbar",r._FlowView=null,r._ToolbarMode="docked",r._ActivePopup=null,r._FloatingPosition={X:80,Y:80},r._DocumentClickHandler=null,r._FloatingToolbarView=null,r._LayoutFormMetacontroller=null,r._LayoutFormHostID=null,r._LayoutFormExpanded=!0,r}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,o,n){return _superPropGet(t,"render",this,3)([e,o,this.options])}},{key:"onAfterRender",value:function(e,o,n,i){var r=this.options.FlowViewIdentifier;if(this._populateToolbarIcons(),!1===this.options.EnableAddNode){var a=this.pict.ContentAssignment.getElement("#Flow-Toolbar-AddNode-".concat(r));a.length>0&&a[0].remove()}if(!1===this.options.EnableCardPalette){var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Cards-".concat(r));l.length>0&&l[0].remove()}if(!1===this.options.EnableLayoutMenu){var s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Auto-".concat(r));s.length>0&&s[0].remove()}return _superPropGet(t,"onAfterRender",this,3)([e,o,n,i])}},{key:"_populateToolbarIcons",value:function(){var e=this._FlowView?this._FlowView._IconProvider:null;if(e){for(var t=this.options.FlowViewIdentifier,o={plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit",auto:"auto-layout",cards:"cards",layout:"layout",settings:"settings",grip:"grip",collapse:"collapse",expand:"expand"},n=Object.keys(o),i=0;i<n.length;i++){var r="Flow-Toolbar-Icon-".concat(n[i],"-").concat(t),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=e.getIconSVGMarkup(o[n[i]],14))}var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(t));l.length>0&&(l[0].innerHTML=e.getIconSVGMarkup("fullscreen",14));var s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-CardsChevron-".concat(t));s.length>0&&(s[0].innerHTML=e.getIconSVGMarkup("chevron-down",8));var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-LayoutChevron-".concat(t));c.length>0&&(c[0].innerHTML=e.getIconSVGMarkup("chevron-down",8));var d=this.pict.ContentAssignment.getElement("#Flow-Toolbar-AutoChevron-".concat(t));d.length>0&&(d[0].innerHTML=e.getIconSVGMarkup("chevron-down",8))}}},{key:"_openPopup",value:function(e){var t=this;if(this._ActivePopup!==e){this._closePopup();var o=this.options.FlowViewIdentifier,n=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(o));if(!(n.length<1)){var i=document.createElement("div");switch(i.className="pict-flow-toolbar-popup",i.setAttribute("id","Flow-Toolbar-Popup-".concat(o)),e){case"add-node":this._buildAddNodePopup(i);break;case"cards":this._buildCardsPopup(i);break;case"layout":this._buildLayoutPopup(i);break;case"layout-algorithm":this._buildLayoutAlgorithmPopup(i);break;case"settings":this._buildSettingsPopup(i)}if(n[0].appendChild(i),this._ActivePopup=e,this._positionPopup(i,e),setTimeout(function(){t._DocumentClickHandler=function(o){if(!i.contains(o.target)){var n=o.target.closest("[data-flow-action]");if(n){var r=n.getAttribute("data-flow-action");if(r===e||r===e.replace("-popup","")+"-popup")return}t._closePopup()}},document.addEventListener("click",t._DocumentClickHandler,!0)},0),"add-node"===e){var r=i.querySelector(".pict-flow-popup-search");r&&setTimeout(function(){r.focus()},50)}}}else this._closePopup()}},{key:"_closePopup",value:function(){this._DocumentClickHandler&&(document.removeEventListener("click",this._DocumentClickHandler,!0),this._DocumentClickHandler=null);var e=this.options.FlowViewIdentifier,t=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Popup-".concat(e));t.length>0&&t[0].parentNode.removeChild(t[0]),this._ActivePopup=null}},{key:"_positionPopup",value:function(e,t){var o,n=this.options.FlowViewIdentifier;switch(t){case"add-node":o="#Flow-Toolbar-AddNode-".concat(n);break;case"cards":o="#Flow-Toolbar-Cards-".concat(n);break;case"layout":o="#Flow-Toolbar-Layout-".concat(n);break;case"layout-algorithm":o="#Flow-Toolbar-Auto-".concat(n);break;case"settings":o="#Flow-Toolbar-Settings-".concat(n);break;default:return}var i=this.pict.ContentAssignment.getElement(o);if(!(i.length<1)){var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(n));if(!(r.length<1)){var a=i[0].getBoundingClientRect(),l=r[0].getBoundingClientRect(),s=a.left-l.left;e.style.left=s+"px",e.style.top="0px"}}}},{key:"_buildAddNodePopup",value:function(e){var t=this.options.FlowViewIdentifier,o=this._FlowView?this._FlowView._IconProvider:null,n=o?o.getIconSVGMarkup("search",12):"",i="Flow-Toolbar-AddNodeList-".concat(t),r="Flow-Toolbar-AddNodeSearch-".concat(t),a=this._renderNodeListHTML("");this.pict.ContentAssignment.assignContent(e,'<div class="pict-flow-popup-search-wrapper"><span class="pict-flow-popup-search-icon">'+n+'</span><input id="'+r+'" class="pict-flow-popup-search" type="text" placeholder="Search node types..." oninput="_Pict.views[\''+t+"']._ToolbarView._filterNodeList('"+i+'\', this.value)" /></div><div id="'+i+'" class="pict-flow-popup-node-list">'+a+"</div>")}},{key:"_renderNodeListHTML",value:function(e){if(!this._FlowView||!this._FlowView._NodeTypeProvider)return"";for(var t=this.options.FlowViewIdentifier,o=this._FlowView._NodeTypeProvider.getNodeTypes(),n=Object.keys(o),i=(e||"").toLowerCase().trim(),r=this._FlowView._IconProvider,a=[],l=0;l<n.length;l++){var s=o[n[l]],c=s.CardMetadata||{};if(!1!==c.Enabled){if(i){var d=(s.Label||"").toLowerCase(),p=(c.Code||"").toLowerCase(),h=(c.Category||"").toLowerCase();if(d.indexOf(i)<0&&p.indexOf(i)<0&&h.indexOf(i)<0)continue}var u="";if(r){var f=r.resolveIconKey(c);u=r.getIconSVGMarkup(f,16)}a.push({NodeType:n[l],Label:s.Label||"",IconHTML:u,Code:c.Code||"",FlowViewIdentifier:t})}}return 0===a.length?'<div class="pict-flow-popup-list-empty">No matching node types</div>':this.pict.parseTemplateByHash("Flow-AddNode-List",{Rows:a})}},{key:"_filterNodeList",value:function(e,t){var o=document.getElementById(e);o&&this.pict.ContentAssignment.assignContent(o,this._renderNodeListHTML(t))}},{key:"_addNodeFromPopup",value:function(e){this._addNodeAtCenter(e),this._closePopup()}},{key:"_buildCardsPopup",value:function(e){var t=this.options.FlowViewIdentifier,o=this._FlowView?this._FlowView._IconProvider:null,n=o?o.getIconSVGMarkup("search",12):"",i="Flow-Toolbar-CardsList-".concat(t),r="Flow-Toolbar-CardsSearch-".concat(t),a=this._renderCardsListHTML("");this.pict.ContentAssignment.assignContent(e,'<div class="pict-flow-popup-search-wrapper"><span class="pict-flow-popup-search-icon">'+n+'</span><input id="'+r+'" class="pict-flow-popup-search" type="text" placeholder="Search cards..." oninput="_Pict.views[\''+t+"']._ToolbarView._filterCardsList('"+i+'\', this.value)" /></div><div id="'+i+'" class="pict-flow-popup-node-list">'+a+"</div>"),setTimeout(function(){var e=document.getElementById(r);e&&e.focus()},50)}},{key:"_renderCardsListHTML",value:function(e){if(!this._FlowView||!this._FlowView._NodeTypeProvider)return"";for(var t=this.options.FlowViewIdentifier,o=this._FlowView._NodeTypeProvider.getCardsByCategory(),n=Object.keys(o),i=(e||"").toLowerCase().trim(),r=this._FlowView._IconProvider,a=0,l=[],s=0;s<n.length;s++){for(var c=n[s],d=o[c],p=[],h=0;h<d.length;h++){var u=d[h],f=u.CardMetadata||{};if(i){var g=(u.Label||"").toLowerCase(),m=(f.Code||"").toLowerCase(),v=c.toLowerCase();if(g.indexOf(i)<0&&m.indexOf(i)<0&&v.indexOf(i)<0)continue}var w="",y=!1;f.Icon&&r&&!r.isEmojiIcon(f.Icon)?w=r.getIconSVGMarkup(r.resolveIconKey(f),14):f.Icon?y=!0:r&&(w=r.getIconSVGMarkup("default",14)),p.push({CardType:u.Hash,Label:u.Label||"",Code:f.Code||"",IconHTML:w,IconEmoji:y?f.Icon:"",DisabledClass:!1===f.Enabled?" disabled":"",Tooltip:f.Tooltip||f.Description||"",SwatchColor:w||y||!u.TitleBarColor?"":u.TitleBarColor,FlowViewIdentifier:t})}0!==p.length&&(a+=p.length,l.push({Name:c,Cards:p,FlowViewIdentifier:t}))}return 0===a?'<div class="pict-flow-popup-list-empty">'+(i?"No matching cards":"No card types available")+"</div>":this.pict.parseTemplateByHash("Flow-Cards-List",{Categories:l})}},{key:"_filterCardsList",value:function(e,t){var o=document.getElementById(e);o&&this.pict.ContentAssignment.assignContent(o,this._renderCardsListHTML(t))}},{key:"_addCardFromPopup",value:function(e){this._addCardFromPalette(e),this._closePopup()}},{key:"_buildLayoutPopup",value:function(e){for(var t=this.options.FlowViewIdentifier,o=this._FlowView?this._FlowView._IconProvider:null,n=o?o.getIconSVGMarkup("save",14):"✓",i=o?o.getIconSVGMarkup("trash",12):"×",r="Flow-Toolbar-LayoutSaveRow-".concat(t),a="Flow-Toolbar-LayoutSaveInputRow-".concat(t),l="Flow-Toolbar-LayoutSaveInput-".concat(t),s="Flow-Toolbar-LayoutList-".concat(t),c=this._FlowView&&this._FlowView._LayoutProvider?this._FlowView._LayoutProvider.getLayouts():[],d=[],p=0;p<c.length;p++)d.push({LayoutHash:c[p].Hash,Name:c[p].Name||"",DeleteIconHTML:i,FlowViewIdentifier:t});var h=0===d.length?'<div class="pict-flow-popup-list-empty">No saved layouts</div>':this.pict.parseTemplateByHash("Flow-Layout-List",{Rows:d});this.pict.ContentAssignment.assignContent(e,'<div class="pict-flow-popup-layout-save-section"><div id="'+r+'" class="pict-flow-popup-layout-save" onclick="_Pict.views[\''+t+"']._ToolbarView._showLayoutSaveInput('"+r+"', '"+a+"', '"+l+'\')"><span class="pict-flow-popup-layout-save-icon">'+n+'</span><span>Save Current Layout</span></div><div id="'+a+'" class="pict-flow-popup-layout-save-input-row" style="display:none;"><input id="'+l+'" class="pict-flow-popup-layout-save-input" type="text" placeholder="Layout name..." onclick="event.stopPropagation()" onkeydown="_Pict.views[\''+t+"']._ToolbarView._handleLayoutSaveKey(event, '"+l+"', '"+r+"', '"+a+'\')" /><button class="pict-flow-popup-layout-save-confirm" title="Save" onclick="_Pict.views[\''+t+"']._ToolbarView._confirmLayoutSave('"+l+"')\">"+n+'</button></div></div><div class="pict-flow-popup-divider"></div><div id="'+s+'">'+h+"</div>")}},{key:"_showLayoutSaveInput",value:function(e,t,o){var n=document.getElementById(e),i=document.getElementById(t),r=document.getElementById(o);n&&(n.style.display="none"),i&&(i.style.display=""),r&&(r.value="",setTimeout(function(){r.focus()},50))}},{key:"_handleLayoutSaveKey",value:function(e,t,o,n){if("Enter"===e.key)e.preventDefault(),this._confirmLayoutSave(t);else if("Escape"===e.key){var i=document.getElementById(o),r=document.getElementById(n);r&&(r.style.display="none"),i&&(i.style.display="")}}},{key:"_confirmLayoutSave",value:function(e){var t=document.getElementById(e);if(t){var o=(t.value||"").trim();if(""!==o){this._FlowView._LayoutProvider.saveLayout(o);var n=this.options.FlowViewIdentifier,i=document.getElementById("Flow-Toolbar-Popup-".concat(n));i&&this._buildLayoutPopup(i)}}}},{key:"_restoreLayoutFromPopup",value:function(e,t){t&&t.target&&t.target.closest(".pict-flow-popup-layout-delete")||(this._FlowView._LayoutProvider.restoreLayout(e),this._closePopup())}},{key:"_deleteLayoutFromPopup",value:function(e,t){t&&"function"==typeof t.stopPropagation&&t.stopPropagation(),this._FlowView._LayoutProvider.deleteLayout(e);var o=this.options.FlowViewIdentifier,n=document.getElementById("Flow-Toolbar-Popup-".concat(o));n&&this._buildLayoutPopup(n)}},{key:"_buildLayoutAlgorithmPopup",value:function(e){if(this._FlowView&&this._FlowView._LayoutService){var t=this.options.FlowViewIdentifier,o=this._FlowView._LayoutService,n=this._FlowView.getLayoutAlgorithm(),i=o.getAlgorithm(n.Algorithm),r=this._FlowView.getEdgeTheme(),a=r.Theme,l=r.Override,s=i&&i.DefaultEdgeTheme||"Bezier",c=this._FlowView?this._FlowView._IconProvider:null,d=c?c.getIconSVGMarkup("settings",13):"⚙",p=o.listAlgorithms().map(function(e){return{Value:e.Name,Label:e.Label||e.Name,SelectedAttr:e.Name===n.Algorithm?' selected="selected"':""}}),h=[];h.push({Value:"__inherit__",Label:"Inherit from layout (".concat(s,")"),SelectedAttr:l?"":' selected="selected"'});for(var u=o.listEdgeThemes(),f=0;f<u.length;f++)h.push({Value:u[f].Name,Label:u[f].Label||u[f].Name,SelectedAttr:u[f].Name===l?' selected="selected"':""});var g=this.pict.parseTemplateByHash("Flow-Layout-OptionList",{Options:p}),m=this.pict.parseTemplateByHash("Flow-Layout-OptionList",{Options:h}),v=!(!i||!(i.ParameterManifest&&i.ParameterManifest.Descriptors||i.ParameterSchema&&Object.keys(i.ParameterSchema).length>0)),w=i&&i.Description?'<div class="pict-flow-popup-control-description">'+i.Description+"</div>":"",y="";v&&(y='<button type="button" class="pict-flow-popup-collapse-toggle" aria-expanded="'+(this._LayoutFormExpanded?"true":"false")+'" title="'+(this._LayoutFormExpanded?"Hide parameters":"Show parameters")+'" onclick="_Pict.views[\''+t+"']._ToolbarView._toggleLayoutFormCollapsed(this)\">"+d+"</button>");var b="Flow-Toolbar-AutoApply-".concat(t),S="Custom"===n.Algorithm?" disabled":"",_="Custom"===n.Algorithm?' title="Custom does not auto-position nodes"':"",k="";if(a){var P=o.getEdgeTheme(a);P&&P.Description&&(k='<div class="pict-flow-popup-control-description">'+P.Description+"</div>")}var F="Flow-Toolbar-LayoutParamFormHost-".concat(t);this.pict.ContentAssignment.assignContent(e,'<div class="pict-flow-popup-settings-section pict-flow-popup-layout-algorithm-row"><label class="pict-flow-popup-settings-label">Algorithm</label><div class="pict-flow-popup-layout-algorithm-controls"><select class="pict-flow-popup-settings-select pict-flow-popup-layout-algorithm-select" data-layout-control="algorithm" onclick="event.stopPropagation()" onchange="_Pict.views[\''+t+"']._ToolbarView._handleLayoutAlgoChange(this.value)\">"+g+"</select>"+y+"</div></div>"+w+'<div id="'+F+'"></div><div class="pict-flow-popup-divider"></div><div class="pict-flow-popup-settings-section"><label class="pict-flow-popup-settings-label">Edge theme</label><select class="pict-flow-popup-settings-select" data-layout-control="edge-theme" onclick="event.stopPropagation()" onchange="_Pict.views[\''+t+"']._ToolbarView._handleEdgeThemeChange(this.value)\">"+m+"</select></div>"+k+'<div class="pict-flow-popup-divider"></div><div class="pict-flow-popup-settings-section" style="display:flex;align-items:center;gap:8px;"><input type="checkbox" id="'+b+'"'+(n.AutoApply?' checked="checked"':"")+' onclick="event.stopPropagation()" onchange="_Pict.views[\''+t+'\']._ToolbarView._handleAutoApplyChange(this.checked)" /><label class="pict-flow-popup-settings-label" for="'+b+'" style="cursor:pointer;">Auto-apply on changes</label></div><div class="pict-flow-popup-divider"></div><div class="pict-flow-popup-settings-section" style="padding:4px 8px;"><button class="pict-flow-popup-layout-save-confirm" style="width:100%;padding:6px;"'+S+_+" onclick=\"_Pict.views['"+t+"']._ToolbarView._handleApplyLayoutNow()\">Apply Now</button></div>");var T=e.querySelector("#"+F);T&&this._buildLayoutParameterFormSection(T,i,n)}}},{key:"_handleLayoutAlgoChange",value:function(e){if(this._FlowView&&this._FlowView._LayoutService){var t=this._FlowView._LayoutService.getAlgorithm(e),o=t&&t.DefaultParameters?JSON.parse(JSON.stringify(t.DefaultParameters)):{};this._FlowView.setLayoutAlgorithm(e,o);var n=this.options.FlowViewIdentifier,i=document.getElementById("Flow-Toolbar-Popup-".concat(n));i&&this._buildLayoutAlgorithmPopup(i)}}},{key:"_handleEdgeThemeChange",value:function(e){if(this._FlowView){"__inherit__"===e?this._FlowView.setEdgeTheme(null):this._FlowView.setEdgeTheme(e);var t=this.options.FlowViewIdentifier,o=document.getElementById("Flow-Toolbar-Popup-".concat(t));o&&this._buildLayoutAlgorithmPopup(o)}}},{key:"_handleAutoApplyChange",value:function(e){this._FlowView&&this._FlowView.setLayoutAutoApply(e)}},{key:"_handleApplyLayoutNow",value:function(){this._FlowView&&("Custom"!==this._FlowView.getLayoutAlgorithm().Algorithm&&this._FlowView.applyCurrentLayout())}},{key:"_toggleLayoutFormCollapsed",value:function(e){this._LayoutFormExpanded=!this._LayoutFormExpanded,e.setAttribute("aria-expanded",this._LayoutFormExpanded?"true":"false"),e.title=this._LayoutFormExpanded?"Hide parameters":"Show parameters";var t=this._LayoutFormHostID?document.getElementById(this._LayoutFormHostID):null;t&&t.setAttribute("data-collapsed",this._LayoutFormExpanded?"false":"true")}},{key:"_buildLayoutParameterFormSection",value:function(e,t,o){if(t){var n=!(!t.ParameterManifest||!t.ParameterManifest.Descriptors),i=this._resolveMetacontrollerServiceType();if(n&&i)this._mountLayoutParameterMetacontroller(e,t,o,i);else{var r=t.ParameterSchema?t.ParameterSchema:{},a=Object.keys(r);if(0!==a.length){var l=document.createElement("div");l.className="pict-flow-popup-divider",e.appendChild(l);var s=document.createElement("div");s.className="pict-flow-popup-settings-label",s.style.fontWeight="bold",s.style.padding="4px 8px",s.textContent="Parameters",e.appendChild(s);for(var c=0;c<a.length;c++){var d=a[c],p=r[d],h=o.Parameters&&o.Parameters.hasOwnProperty(d)?o.Parameters[d]:p.Default,u=document.createElement("div");u.className="pict-flow-popup-settings-section",u.style.display="flex",u.style.alignItems="center",u.style.gap="8px";var f=document.createElement("label");f.className="pict-flow-popup-settings-label",f.textContent=p.Label||d,f.style.flex="1",u.appendChild(f);var g=this._buildLayoutParamInput(d,p,h);u.appendChild(g),e.appendChild(u)}}}}}},{key:"_evictLayoutFormViews",value:function(){if(this.pict&&this.pict.views){for(var e=Object.keys(this.pict.views),t=0;t<e.length;t++){var o=e[t];0===o.indexOf("PictSectionForm-")&&o.indexOf("PictFlowLayout")>0?delete this.pict.views[o]:0===o.indexOf("PictSectionForm-PFL")&&delete this.pict.views[o]}this._LayoutFormMetacontroller=null}}},{key:"_resolveMetacontrollerServiceType",value:function(){return this.fable&&this.fable.servicesMap?this.fable.servicesMap.hasOwnProperty("PictFormMetacontroller")?"PictFormMetacontroller":this.fable.servicesMap.hasOwnProperty("PictViewFormMetacontroller")?"PictViewFormMetacontroller":null:null}},{key:"_mountLayoutParameterMetacontroller",value:function(e,t,o,n){var i=JSON.parse(JSON.stringify(t.ParameterManifest)),r=this.options.FlowViewIdentifier,a=document.createElement("div");a.className="pict-flow-popup-divider",e.appendChild(a);var l="Flow-Toolbar-LayoutForm-".concat(r);this._LayoutFormHostID=l;var s=document.createElement("div");s.id=l,s.className="pict-flow-popup-layout-form-host",s.setAttribute("data-collapsed",this._LayoutFormExpanded?"false":"true"),s.setAttribute("onclick","event.stopPropagation()"),s.setAttribute("onchange","_Pict.views['"+r+"']._ToolbarView._pushLayoutFormBack('"+o.Algorithm+"')"),s.setAttribute("oninput","_Pict.views['"+r+"']._ToolbarView._pushLayoutFormBack('"+o.Algorithm+"')"),e.appendChild(s);var c=o.Algorithm;this.pict.AppData[c]=this.pict.AppData[c]||{},this.pict.AppData[c].PictFlowLayoutEditor=this.pict.AppData[c].PictFlowLayoutEditor||{},this.pict.AppData[c].PictFlowLayoutEditor.Parameters=JSON.parse(JSON.stringify(o.Parameters||{})),this._evictLayoutFormViews();try{this._LayoutFormMetacontroller=this.fable.instantiateServiceProviderWithoutRegistration(n,{ViewIdentifier:"Flow-Toolbar-LayoutForm-MC-".concat(r,"-").concat(this.fable.getUUID()),DefaultDestinationAddress:"#".concat(l),AutoRender:!1,AutoPopulateAfterRender:!0,AutoSolveBeforeRender:!1})}catch(e){this.log.warn("Failed to instantiate ".concat(n,": ").concat(e.message)),this._LayoutFormMetacontroller=null}if(this._LayoutFormMetacontroller){var d="Pict-".concat(this._LayoutFormMetacontroller.UUID,"-FormContainer");s.innerHTML='<div id="'.concat(d,'" class="pict-form pict-flow-popup-layout-form"></div>');try{var p="function"==typeof this._LayoutFormMetacontroller.injectManifest?this._LayoutFormMetacontroller.injectManifest.bind(this._LayoutFormMetacontroller):null;if(!p)throw new Error("Metacontroller exposes neither injectManifest nor injectManifestAndRender");var h=p("function"==typeof this._LayoutFormMetacontroller.createDistinctManifest?this._LayoutFormMetacontroller.createDistinctManifest(i,o.Algorithm):i),u=s.querySelector("#".concat(d));if(u){for(var f="",g=0;g<h.length;g++){var m=h[g].options.DefaultDestinationAddress;m&&"#"===m.charAt(0)&&(m=m.substring(1)),f+='<div id="'.concat(m,'" class="pict-form-view"></div>')}u.innerHTML=f}setTimeout(function(){for(var e=0;e<h.length;e++)h[e].render(),"function"==typeof h[e].marshalToView&&h[e].marshalToView()},0)}catch(e){return this.log.warn("PictViewFlowToolbar: layout-form injection failed: ".concat(e.message)),void(s.innerHTML='<em style="padding:8px;display:block;opacity:0.7;">Form render error: '.concat(e.message,"</em>"))}}else s.innerHTML='<em style="padding:8px;display:block;opacity:0.7;">pict-section-form not available; parameter form skipped.</em>'}},{key:"_pushLayoutFormBack",value:function(e){var t=this;this._LayoutFormPushScheduled||(this._LayoutFormPushScheduled=!0,Promise.resolve().then(function(){if(t._LayoutFormPushScheduled=!1,t._FlowView){var o=((t.pict.AppData[e]||{}).PictFlowLayoutEditor||{}).Parameters||{},n=Object.assign({},t._FlowView.getLayoutAlgorithm().Parameters||{},o);t._FlowView.setLayoutAlgorithm(e,n)}}))}},{key:"_buildLayoutParamInput",value:function(e,t,o){var n,i="_Pict.views['"+this.options.FlowViewIdentifier+"']._ToolbarView",r=e.replace(/'/g,"\\'");if("boolean"===t.Type)(n=document.createElement("input")).type="checkbox",n.checked=!!o,n.setAttribute("onchange",i+"._updateLayoutParameter('"+r+"', this.checked)");else if("enum"===t.Type&&Array.isArray(t.Options)){(n=document.createElement("select")).className="pict-flow-popup-settings-select";for(var a=0;a<t.Options.length;a++){var l=document.createElement("option");l.value=t.Options[a],l.textContent=t.Options[a],t.Options[a]===o&&(l.selected=!0),n.appendChild(l)}n.setAttribute("onchange",i+"._updateLayoutParameter('"+r+"', this.value)")}else if("number"===t.Type||"Number"===t.Type||"PreciseNumber"===t.Type){(n=document.createElement("input")).type="number",n.className="pict-flow-popup-settings-input";var s="PreciseNumber"===t.Type;"number"==typeof t.Min&&(n.min=String(t.Min)),"number"==typeof t.Max&&(n.max=String(t.Max)),n.step=s?"any":"1",n.value=null==o?"":String(o),n.style.width="90px";var c=s?"true":"false";n.setAttribute("onchange",i+"._updateLayoutNumberParameter('"+r+"', this.value, "+c+")")}else(n=document.createElement("input")).type="text",n.className="pict-flow-popup-settings-input",n.value=null==o?"":String(o),n.style.width="90px",n.setAttribute("onchange",i+"._updateLayoutParameter('"+r+"', this.value)");return n.setAttribute("onclick","event.stopPropagation()"),n}},{key:"_updateLayoutParameter",value:function(e,t){if(this._FlowView){var o=this._FlowView.getLayoutAlgorithm(),n=Object.assign({},o.Parameters||{});n[e]=t,this._FlowView.setLayoutAlgorithm(o.Algorithm,n)}}},{key:"_updateLayoutNumberParameter",value:function(e,t,o){if(""!==t)if(o)this._updateLayoutParameter(e,t);else{var n=parseFloat(t);isNaN(n)||this._updateLayoutParameter(e,n)}}},{key:"_buildSettingsPopup",value:function(e){if(this._FlowView&&this._FlowView._ThemeProvider){for(var t=this.options.FlowViewIdentifier,o=this._FlowView._ThemeProvider,n=o.getThemeKeys(),i=o.getActiveThemeKey(),r=[],a=0;a<n.length;a++){var l=o._Themes[n[a]];r.push({Value:n[a],Label:l.Label||n[a],SelectedAttr:n[a]===i?' selected="selected"':""})}var s=this.pict.parseTemplateByHash("Flow-Layout-OptionList",{Options:r}),c=Math.round(100*o.getNoiseLevel()),d=o.getActiveTheme(),p=!!(d&&d.NoiseConfig&&d.NoiseConfig.Enabled)?"":"display:none;";this.pict.ContentAssignment.assignContent(e,'<div class="pict-flow-popup-settings-section"><label class="pict-flow-popup-settings-label">Theme</label><select class="pict-flow-popup-settings-select" onclick="event.stopPropagation()" onchange="_Pict.views[\''+t+"']._ToolbarView._handleThemeSelectChange(this.value)\">"+s+'</select></div><div class="pict-flow-popup-divider"></div><div class="pict-flow-popup-settings-section pict-flow-popup-settings-noise" data-settings-type="noise" style="'+p+'"><label class="pict-flow-popup-settings-label">Noise</label><div class="pict-flow-popup-settings-slider-row"><input type="range" class="pict-flow-popup-settings-slider" min="0" max="100" value="'+c+'" onclick="event.stopPropagation()" onpointerdown="event.stopPropagation()" oninput="_Pict.views[\''+t+'\']._ToolbarView._handleNoiseSliderInput(this)" /><span class="pict-flow-popup-settings-slider-value">'+c+"%</span></div></div>")}}},{key:"_handleThemeSelectChange",value:function(e){if(this._FlowView){this._FlowView.setTheme(e);var t=this.options.FlowViewIdentifier,o=document.getElementById("Flow-Toolbar-Popup-".concat(t));o&&this._refreshNoiseSlider(o)}}},{key:"_handleNoiseSliderInput",value:function(e){var t=parseInt(e.value,10);if(!isNaN(t)){var o=t/100,n=e.parentNode?e.parentNode.querySelector(".pict-flow-popup-settings-slider-value"):null;n&&(n.textContent=t+"%"),this._FlowView&&this._FlowView.setNoiseLevel(o)}}},{key:"_refreshNoiseSlider",value:function(e){var t=e.querySelector('[data-settings-type="noise"]');if(t){var o=this._FlowView._ThemeProvider.getActiveTheme();if(o&&o.NoiseConfig&&o.NoiseConfig.Enabled){t.style.display="";var n=t.querySelector(".pict-flow-popup-settings-slider"),i=t.querySelector(".pict-flow-popup-settings-slider-value");if(n){var r=Math.round(100*this._FlowView._ThemeProvider.getNoiseLevel());n.value=String(r),i&&(i.textContent=r+"%")}}else t.style.display="none"}}},{key:"_setToolbarMode",value:function(e){this._closePopup();var t=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(t)),n=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Collapsed-".concat(t));switch(e){case"docked":o.length>0&&(o[0].style.display=""),n.length>0&&n[0].classList.remove("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide();break;case"floating":o.length>0&&(o[0].style.display="none"),n.length>0&&n[0].classList.remove("visible"),this._showFloatingToolbar();break;case"collapsed":o.length>0&&(o[0].style.display="none"),n.length>0&&n[0].classList.add("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide()}this._ToolbarMode=e}},{key:"_showFloatingToolbar",value:function(){if(this._FlowView){if(!this._FloatingToolbarView){var e=this.options.FlowViewIdentifier;this._FloatingToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowFloatingToolbar",{FlowViewIdentifier:e,DefaultDestinationAddress:"#Flow-FloatingToolbar-Container-".concat(e),EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette}),this._FloatingToolbarView._ToolbarView=this,this._FloatingToolbarView._FlowView=this._FlowView,this._FloatingToolbarView.render()}this._FloatingToolbarView.show()}}},{key:"_addNodeAtCenter",value:function(e){if(this._FlowView){var t=this._FlowView.viewState,o=this._FlowView._SVGElement,n=o?o.clientWidth:600,i=o?o.clientHeight:400,r=(-t.PanX+n/2)/t.Zoom,a=(-t.PanY+i/2)/t.Zoom,l=this._FlowView.flowData.Nodes.length;r+=l%5*30,a+=l%5*30,this._FlowView.addNode(e,r,a)}}},{key:"_addCardFromPalette",value:function(e){if(this._FlowView){var t=this._FlowView.viewState,o=(200-t.PanX)/t.Zoom,n=(200-t.PanY)/t.Zoom,i=this._FlowView.flowData.Nodes.length;o+=i%5*40,n+=i%5*40,this._FlowView.addNode(e,o,n)}}},{key:"_handleToolbarAction",value:function(e){if(this._FlowView){var t=this.options.FlowViewIdentifier;switch(e){case"add-node":this._openPopup("add-node");break;case"delete-selected":this._FlowView.deleteSelected();break;case"zoom-in":this._FlowView.setZoom(this._FlowView.viewState.Zoom+this._FlowView.options.ZoomStep);break;case"zoom-out":this._FlowView.setZoom(this._FlowView.viewState.Zoom-this._FlowView.options.ZoomStep);break;case"zoom-fit":this._FlowView.zoomToFit();break;case"auto-layout":case"apply-current-layout":this._FlowView.autoLayout();break;case"cards-popup":this._openPopup("cards");break;case"layout-popup":this._openPopup("layout");break;case"layout-algorithm-popup":this._openPopup("layout-algorithm");break;case"apply-layout":this._FlowView.applyCurrentLayout();break;case"settings-popup":this._openPopup("settings");break;case"toggle-floating":"floating"===this._ToolbarMode?this._setToolbarMode("docked"):this._setToolbarMode("floating");break;case"collapse-toolbar":this._setToolbarMode("collapsed");break;case"expand-toolbar":this._setToolbarMode("docked");break;case"fullscreen":var o=this._FlowView.toggleFullscreen(),n=this._FlowView._IconProvider,i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(t));i.length>0&&n&&(i[0].innerHTML=n.getIconSVGMarkup(o?"exit-fullscreen":"fullscreen",14));var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(t));r.length>0&&r[0].setAttribute("title",o?"Exit Fullscreen":"Toggle Fullscreen");break;default:this.log.warn("PictViewFlowToolbar: unknown action '".concat(e,"'"))}}}}])}(n);t.exports=r,t.exports.default_configuration=i},{"pict-view":137}],66:[function(e,t,o){var n=e("pict-view"),i=e("../services/PictService-Flow-InteractionManager.js"),r=e("../services/PictService-Flow-ConnectionRenderer.js"),a=e("../services/PictService-Flow-Tether.js"),l=e("../services/PictService-Flow-Layout.js"),s=e("../services/PictService-Flow-PathGenerator.js"),c=e("../services/PictService-Flow-ViewportManager.js"),d=e("../services/PictService-Flow-SelectionManager.js"),p=e("../services/PictService-Flow-PanelManager.js"),h=e("../services/PictService-Flow-DataManager.js"),u=e("../services/PictService-Flow-ConnectionHandleManager.js"),f=e("../services/PictService-Flow-RenderManager.js"),g=e("../services/PictService-Flow-PortRenderer.js"),m=e("../providers/PictProvider-Flow-NodeTypes.js"),v=e("../providers/PictProvider-Flow-EventHandler.js"),w=e("../providers/PictProvider-Flow-Layouts.js"),y=e("../providers/PictProvider-Flow-SVGHelpers.js"),b=e("../providers/PictProvider-Flow-Geometry.js"),S=e("../providers/PictProvider-Flow-PanelChrome.js"),_=e("../providers/PictProvider-Flow-CSS.js"),k=e("../providers/PictProvider-Flow-Icons.js"),P=e("../providers/PictProvider-Flow-ConnectorShapes.js"),F=e("../providers/PictProvider-Flow-Theme.js"),T=e("../providers/PictProvider-Flow-Noise.js"),C=e("./PictView-Flow-Node.js"),D=e("./PictView-Flow-Toolbar.js"),x=e("./PictView-Flow-FloatingToolbar.js"),L=e("./PictView-Flow-PropertiesPanel.js"),A=e("../PictFlowCardPropertiesPanel.js"),V=e("../panels/FlowCardPropertiesPanel-Template.js"),H=e("../panels/FlowCardPropertiesPanel-Markdown.js"),M=e("../panels/FlowCardPropertiesPanel-Form.js"),B=e("../panels/FlowCardPropertiesPanel-View.js"),N={ViewIdentifier:"Pict-Flow",DefaultRenderable:"Flow-Container",DefaultDestinationAddress:"#Flow-Container",AutoRender:!1,FlowDataAddress:!1,TargetElementAddress:"#Flow-SVG-Container",EnableToolbar:!0,EnableAddNode:!0,EnableCardPalette:!0,IncludeDefaultNodeTypes:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0,EnableGridSnap:!1,GridSnapSize:20,EnableLayoutMenu:!0,MinZoom:.1,MaxZoom:5,ZoomStep:.1,DefaultNodeType:"default",DefaultNodeWidth:180,DefaultNodeHeight:80,DefaultLayoutAlgorithm:"Custom",DefaultLayoutParameters:{},DefaultLayoutAutoApply:!1,DefaultEdgeTheme:null,DefaultEdgeThemeParameters:{},CSS:!1,Templates:[{Hash:"Flow-PanelChrome-Template",Template:'<div class="pict-flow-panel" xmlns="http://www.w3.org/1999/xhtml"><div class="pict-flow-panel-titlebar" data-element-type="panel-titlebar" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-title-text">{~D:Record.Title~}</span><span class="pict-flow-panel-close-btn" data-element-type="panel-close" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-close-icon"></span></span></div><div class="pict-flow-panel-content" data-panel-hash="{~D:Record.Hash~}" onpointerdown="event.stopPropagation()" onwheel="event.stopPropagation()"><div class="pict-flow-panel-tab-pane active" data-tab="properties" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tab-pane" data-tab="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div><div class="pict-flow-panel-tab-pane" data-tab="appearance" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div></div><div class="pict-flow-panel-resize-handle" data-element-type="panel-resize" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tabbar" data-panel-hash="{~D:Record.Hash~}" onpointerdown="event.stopPropagation()" onwheel="event.stopPropagation()"><div class="pict-flow-panel-tab active" data-tab-target="properties" data-panel-hash="{~D:Record.Hash~}" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._handlePanelTabClick(this, event)">Properties</div><div class="pict-flow-panel-tab" data-tab-target="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._handlePanelTabClick(this, event)">Help</div><div class="pict-flow-panel-tab" data-tab-target="appearance" data-panel-hash="{~D:Record.Hash~}" onclick="_Pict.views[\'{~D:Record.FlowViewIdentifier~}\']._handlePanelTabClick(this, event)">Appearance</div></div></div>'},{Hash:"Flow-Container-Template",Template:'\n<div class="pict-flow-container" id="Flow-Wrapper-{~D:Record.ViewIdentifier~}">\n\t<div id="Flow-Toolbar-{~D:Record.ViewIdentifier~}"></div>\n\t<div id="Flow-FloatingToolbar-Container-{~D:Record.ViewIdentifier~}" style="display:none;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100;"></div>\n\t<div class="pict-flow-svg-container" id="Flow-SVG-Container-{~D:Record.ViewIdentifier~}">\n\t\t<svg class="pict-flow-svg"\n\t\t\tid="Flow-SVG-{~D:Record.ViewIdentifier~}"\n\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\tonpointerdown="_Pict.views[\'{~D:Record.ViewIdentifier~}\']._handleSVGPointerDown(event)"\n\t\t\tonpointermove="_Pict.views[\'{~D:Record.ViewIdentifier~}\']._handleSVGPointerMove(event)"\n\t\t\tonpointerup="_Pict.views[\'{~D:Record.ViewIdentifier~}\']._handleSVGPointerUp(event)"\n\t\t\tonpointerleave="_Pict.views[\'{~D:Record.ViewIdentifier~}\']._handleSVGPointerUp(event)"\n\t\t\tonwheel="_Pict.views[\'{~D:Record.ViewIdentifier~}\']._handleSVGWheel(event)"\n\t\t\toncontextmenu="_Pict.views[\'{~D:Record.ViewIdentifier~}\']._handleSVGContextMenu(event)">\n\t\t\t<defs>\n\t\t\t\t<pattern id="flow-grid-{~D:Record.ViewIdentifier~}"\n\t\t\t\t\twidth="20" height="20" patternUnits="userSpaceOnUse">\n\t\t\t\t\t<line x1="20" y1="0" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t\t<line x1="0" y1="20" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t</pattern>\n\t\t\t</defs>\n\t\t\t<rect width="10000" height="10000" x="-5000" y="-5000"\n\t\t\t\tfill="url(#flow-grid-{~D:Record.ViewIdentifier~})"\n\t\t\t\tclass="pict-flow-grid-background" />\n\t\t\t<g class="pict-flow-viewport" id="Flow-Viewport-{~D:Record.ViewIdentifier~}">\n\t\t\t\t<g class="pict-flow-connections-layer" id="Flow-Connections-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-nodes-layer" id="Flow-Nodes-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-endpoints-layer" id="Flow-Endpoints-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-port-hints-layer" id="Flow-PortHints-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-tethers-layer" id="Flow-Tethers-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-panels-layer" id="Flow-Panels-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t</g>\n\t\t</svg>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Container",TemplateHash:"Flow-Container-Template",DestinationAddress:"#Flow-Container",RenderMethod:"replace"}]},I=function(e){function t(e,o,n){var I;_classCallCheck(this,t);var E=Object.assign({},JSON.parse(JSON.stringify(N)),o);return(I=_callSuper(this,t,[e,E,n])).serviceType="PictSectionFlow",I._ServiceRegistry=[{ServiceType:"PictProviderFlowSVGHelpers",Library:y,Property:"_SVGHelperProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowGeometry",Library:b,Property:"_GeometryProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowNoise",Library:T,Property:"_NoiseProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowTheme",Library:F,Property:"_ThemeProvider"},{ServiceType:"PictProviderFlowCSS",Library:_,Property:"_CSSProvider",PostInit:"registerCSS"},{ServiceType:"PictProviderFlowIcons",Library:k,Property:"_IconProvider",PostInit:"registerIconTemplates"},{ServiceType:"PictProviderFlowConnectorShapes",Library:P,Property:"_ConnectorShapesProvider"},{ServiceType:"PictProviderFlowPanelChrome",Library:S,Property:"_PanelChromeProvider"},{ServiceType:"PictProviderFlowNodeTypes",Library:m,Property:"_NodeTypeProvider",ExtraOptions:function(){return{AdditionalNodeTypes:I.options.NodeTypes,IncludeDefaultNodeTypes:I.options.IncludeDefaultNodeTypes}}},{ServiceType:"PictProviderFlowEventHandler",Library:v,Property:"_EventHandlerProvider"},{ServiceType:"PictProviderFlowLayouts",Library:w,Property:"_LayoutProvider",PostInit:"loadPersistedLayouts"},{ServiceType:"PictServiceFlowPathGenerator",Library:s,Property:"_PathGenerator"},{ServiceType:"PictServiceFlowDataManager",Library:h,Property:"_DataManager"},{ServiceType:"PictServiceFlowConnectionHandleManager",Library:u,Property:"_ConnectionHandleManager"},{ServiceType:"PictServiceFlowRenderManager",Library:f,Property:"_RenderManager"},{ServiceType:"PictServiceFlowPortRenderer",Library:g,Property:"_PortRenderer"},{ServiceType:"PictServiceFlowInteractionManager",Library:i,Property:"_InteractionManager"},{ServiceType:"PictServiceFlowConnectionRenderer",Library:r,Property:"_ConnectionRenderer"},{ServiceType:"PictServiceFlowTether",Library:a,Property:"_TetherService"},{ServiceType:"PictServiceFlowLayout",Library:l,Property:"_LayoutService"},{ServiceType:"PictServiceFlowViewportManager",Library:c,Property:"_ViewportManager"},{ServiceType:"PictServiceFlowSelectionManager",Library:d,Property:"_SelectionManager"},{ServiceType:"PictServiceFlowPanelManager",Library:p,Property:"_PanelManager"},{ServiceType:"PictViewFlowNode",Library:C,RegisterOnly:!0},{ServiceType:"PictViewFlowToolbar",Library:D,RegisterOnly:!0},{ServiceType:"PictViewFlowFloatingToolbar",Library:x,RegisterOnly:!0},{ServiceType:"PictViewFlowPropertiesPanel",Library:L,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel",Library:A,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Template",Library:V,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Markdown",Library:H,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Form",Library:M,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-View",Library:B,RegisterOnly:!0}],I._registerServiceTypes(),I._FlowData={Nodes:[],Connections:[],OpenPanels:[],SavedLayouts:[],ViewState:{PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null},LayoutAlgorithm:I.options.DefaultLayoutAlgorithm||"Custom",LayoutParameters:JSON.parse(JSON.stringify(I.options.DefaultLayoutParameters||{})),LayoutAutoApply:!!I.options.DefaultLayoutAutoApply,EdgeTheme:I.options.DefaultEdgeTheme||null,EdgeThemeParameters:JSON.parse(JSON.stringify(I.options.DefaultEdgeThemeParameters||{}))},I._AutoApplyInProgress=!1,I._AutoApplyHandlerHashes=[],I._SVGElement=null,I._ViewportElement=null,I._NodesLayer=null,I._ConnectionsLayer=null,I._EndpointsLayer=null,I._PortHintsLayer=null,I._TethersLayer=null,I._PanelsLayer=null,I._DataManager=null,I._ConnectionHandleManager=null,I._RenderManager=null,I._PortRenderer=null,I._InteractionManager=null,I._ConnectionRenderer=null,I._TetherService=null,I._LayoutService=null,I._PathGenerator=null,I._ViewportManager=null,I._SelectionManager=null,I._PanelManager=null,I._CSSProvider=null,I._IconProvider=null,I._ConnectorShapesProvider=null,I._ThemeProvider=null,I._NoiseProvider=null,I._SVGHelperProvider=null,I._GeometryProvider=null,I._PanelChromeProvider=null,I._NodeTypeProvider=null,I._LayoutProvider=null,I._EventHandlerProvider=null,I._NodeView=null,I._ToolbarView=null,I._PropertiesPanelView=null,I.initialRenderComplete=!1,I}return _inherits(t,e),_createClass(t,[{key:"_registerServiceTypes",value:function(){for(var e=0;e<this._ServiceRegistry.length;e++){var t=this._ServiceRegistry[e];this.fable.servicesMap.hasOwnProperty(t.ServiceType)||this.fable.addServiceType(t.ServiceType,t.Library)}}},{key:"_instantiateServices",value:function(){for(var e=0;e<this._ServiceRegistry.length;e++){var t=this._ServiceRegistry[e];if(!t.RegisterOnly&&!this[t.Property]){var o=t.NoFlowView?{}:{FlowView:this};"function"==typeof t.ExtraOptions&&Object.assign(o,t.ExtraOptions()),this[t.Property]=this.fable.instantiateServiceProviderWithoutRegistration(t.ServiceType,o),t.PostInit&&"function"==typeof this[t.Property][t.PostInit]&&this[t.Property][t.PostInit]()}}}},{key:"flowData",get:function(){return this._FlowData}},{key:"viewState",get:function(){return this._FlowData.ViewState}},{key:"_IsFullscreen",get:function(){return!!this._ViewportManager&&this._ViewportManager._IsFullscreen}},{key:"render",value:function(e,o){return _superPropGet(t,"render",this,3)([e,o,this.options])}},{key:"renderAsync",value:function(e,o,n,i,r){return"function"==typeof n||void 0===n?_superPropGet(t,"renderAsync",this,3)([e,o,this.options,i,n||r]):_superPropGet(t,"renderAsync",this,3)([e,o,n,i,r])}},{key:"onBeforeInitialize",value:function(){return _superPropGet(t,"onBeforeInitialize",this,3)([]),this._ThemeProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowTheme",{FlowView:this}),this._NoiseProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowNoise"),this.options.Theme&&this._ThemeProvider.setTheme(this.options.Theme),"number"==typeof this.options.NoiseLevel&&this._ThemeProvider.setNoiseLevel(this.options.NoiseLevel),this._instantiateServices(),this._subscribeToHostTheme(),_superPropGet(t,"onBeforeInitialize",this,3)([])}},{key:"_subscribeToHostTheme",value:function(){var e=this,t=this._resolveHostThemeProvider();t&&"function"==typeof t.onApply&&(this._HostThemeUnsubscribe=t.onApply(function(){e._CSSProvider&&e._CSSProvider.registerCSS(),e._reinjectMarkerDefs(),e.initialRenderComplete&&e.renderFlow()}))}},{key:"_resolveHostThemeProvider",value:function(){var e=this.pict;if(!e)return null;if(e.providers)for(var t=Object.keys(e.providers),o=0;o<t.length;o++){var n=e.providers[t[o]];if(n&&"function"==typeof n.onApply&&"function"==typeof n.applyTheme&&"function"==typeof n.listThemes)return n}return null}},{key:"onAfterRender",value:function(e,o,n,i){return this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(t,"onAfterRender",this,3)([e,o,n,i])}},{key:"onAfterInitialRender",value:function(){var e=this.options.ViewIdentifier,t=this.pict.ContentAssignment.getElement("#Flow-SVG-".concat(e));if(t.length<1)return this.log.error("PictSectionFlow could not find SVG element #Flow-SVG-".concat(e)),!1;this._SVGElement=t[0];var o=this.pict.ContentAssignment.getElement("#Flow-Viewport-".concat(e));o.length>0&&(this._ViewportElement=o[0]);var n=this.pict.ContentAssignment.getElement("#Flow-Nodes-".concat(e));n.length>0&&(this._NodesLayer=n[0]);var i=this.pict.ContentAssignment.getElement("#Flow-Connections-".concat(e));i.length>0&&(this._ConnectionsLayer=i[0]);var r=this.pict.ContentAssignment.getElement("#Flow-Endpoints-".concat(e));r.length>0&&(this._EndpointsLayer=r[0]);var a=this.pict.ContentAssignment.getElement("#Flow-PortHints-".concat(e));a.length>0&&(this._PortHintsLayer=a[0]);var l=this.pict.ContentAssignment.getElement("#Flow-Tethers-".concat(e));l.length>0&&(this._TethersLayer=l[0]);var s=this.pict.ContentAssignment.getElement("#Flow-Panels-".concat(e));if(s.length>0&&(this._PanelsLayer=s[0]),this._instantiateServices(),this._ConnectorShapesProvider&&this._SVGElement){var c=this._SVGElement.querySelector("defs");if(c){var d=this._ConnectorShapesProvider.generateMarkerDefs(e),p=document.createElementNS("http://www.w3.org/2000/svg","svg");for(p.innerHTML=d;p.firstChild;)c.appendChild(p.firstChild)}}this.options.EnableToolbar&&(this._ToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowToolbar",Object.assign({},D.default_configuration,{ViewIdentifier:"Flow-Toolbar-".concat(e),DefaultDestinationAddress:"#Flow-Toolbar-".concat(e),FlowViewIdentifier:e,EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette})),this._ToolbarView&&"function"==typeof this._ToolbarView.render&&(this._ToolbarView._FlowView=this,this._ToolbarView.render())),this._NodeView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowNode",Object.assign({},C.default_configuration,{ViewIdentifier:"Flow-NodeRenderer-".concat(e),AutoRender:!1})),this._NodeView._FlowView=this,this._PropertiesPanelView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowPropertiesPanel",Object.assign({},L.default_configuration,{ViewIdentifier:"Flow-PropertiesPanel-".concat(e),AutoRender:!1})),this._PropertiesPanelView._FlowView=this,this._InteractionManager.initialize(this._SVGElement,this._ViewportElement),this._subscribeAutoApplyHandlers(),this.options.FlowDataAddress&&this.marshalToView(),this.renderFlow()}},{key:"marshalToView",value:function(){return this._DataManager.marshalToView()}},{key:"marshalFromView",value:function(){return this._DataManager.marshalFromView()}},{key:"getFlowData",value:function(){return this._DataManager.getFlowData()}},{key:"setFlowData",value:function(e){return this._DataManager.setFlowData(e)}},{key:"addNode",value:function(e,t,o,n,i){return this._DataManager.addNode(e,t,o,n,i)}},{key:"removeNode",value:function(e){return this._DataManager.removeNode(e)}},{key:"addConnection",value:function(e,t,o,n,i){return this._DataManager.addConnection(e,t,o,n,i)}},{key:"removeConnection",value:function(e){return this._DataManager.removeConnection(e)}},{key:"selectNode",value:function(e){return this._SelectionManager.selectNode(e)}},{key:"selectConnection",value:function(e){return this._SelectionManager.selectConnection(e)}},{key:"deselectAll",value:function(){return this._SelectionManager.deselectAll()}},{key:"deleteSelected",value:function(){return this._SelectionManager.deleteSelected()}},{key:"updateViewportTransform",value:function(){return this._ViewportManager.updateViewportTransform()}},{key:"setZoom",value:function(e,t,o){return this._ViewportManager.setZoom(e,t,o)}},{key:"zoomToFit",value:function(){return this._ViewportManager.zoomToFit()}},{key:"autoLayout",value:function(e,t){if(this._LayoutService){var o,n;if("string"==typeof e&&""!==e)o=e,n=t||{};else{var i=this._FlowData.LayoutAlgorithm;n=(o="string"==typeof i&&""!==i&&"Custom"!==i?i:"Layered")===this._FlowData.LayoutAlgorithm&&this._FlowData.LayoutParameters||{}}this._LayoutService.autoLayout(this._FlowData.Nodes,this._FlowData.Connections,o,n),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData)}}},{key:"applyCurrentLayout",value:function(){if(this._LayoutService){var e=this._FlowData.LayoutAlgorithm||"Custom";this._AutoApplyInProgress=!0;try{"Custom"!==e&&this._LayoutService.applyLayout(this._FlowData.Nodes,this._FlowData.Connections,e,this._FlowData.LayoutParameters||{});var t=this._LayoutService.resolveActiveEdgeTheme({});if(t&&"function"==typeof t.AdjustLayout)try{var o=this._LayoutService.getMergedEdgeThemeParameters(t.Name,this._FlowData.EdgeThemeParameters||{});t.AdjustLayout(this._FlowData.Nodes,this._FlowData.Connections,o)}catch(e){this.log.warn("PictSectionFlow edge theme '".concat(t.Name,"' AdjustLayout threw: ").concat(e.message))}var n=!(!t||"function"!=typeof t.AdjustLayout);if(!("Custom"!==e)&&!n)return;this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData)}finally{this._AutoApplyInProgress=!1}}}},{key:"setEdgeTheme",value:function(e,t){if(this._LayoutService&&(null==e||"string"==typeof e)){if(e){var o=this._LayoutService.getEdgeTheme(e);if(!o)return void this.log.warn("PictSectionFlow setEdgeTheme: unknown theme '".concat(e,"'"));this._FlowData.EdgeTheme=e,this._FlowData.EdgeThemeParameters=Object.assign({},o.DefaultParameters||{},t||{})}else this._FlowData.EdgeTheme=null,this._FlowData.EdgeThemeParameters=t?Object.assign({},t):{};this.applyCurrentLayout()}}},{key:"getEdgeTheme",value:function(){var e=this._LayoutService?this._LayoutService.resolveActiveEdgeTheme({}):null;return{Theme:e?e.Name:null,Override:this._FlowData.EdgeTheme||null,Parameters:JSON.parse(JSON.stringify(this._FlowData.EdgeThemeParameters||{}))}}},{key:"setLayoutAlgorithm",value:function(e,t,o){if(this._LayoutService&&"string"==typeof e&&""!==e){var n=this._LayoutService.getAlgorithm(e);n?(this._FlowData.LayoutAlgorithm=e,this._FlowData.LayoutParameters=Object.assign({},n.DefaultParameters||{},t||{}),"boolean"==typeof o&&(this._FlowData.LayoutAutoApply=o),this.applyCurrentLayout(),this.renderFlow()):this.log.warn("PictSectionFlow setLayoutAlgorithm: unknown algorithm '".concat(e,"'"))}}},{key:"setLayoutAutoApply",value:function(e){this._FlowData.LayoutAutoApply=!!e,this.marshalFromView()}},{key:"getLayoutAlgorithm",value:function(){return{Algorithm:this._FlowData.LayoutAlgorithm||"Custom",Parameters:JSON.parse(JSON.stringify(this._FlowData.LayoutParameters||{})),AutoApply:!!this._FlowData.LayoutAutoApply}}},{key:"_subscribeAutoApplyHandlers",value:function(){var e=this;if(this._EventHandlerProvider&&!(this._AutoApplyHandlerHashes.length>0))for(var t=["onNodeAdded","onNodeRemoved","onConnectionCreated","onConnectionRemoved"],o=0;o<t.length;o++){var n=this._EventHandlerProvider.registerHandler(t[o],function(){e._AutoApplyInProgress||e._FlowData.LayoutAutoApply&&e._FlowData.LayoutAlgorithm&&"Custom"!==e._FlowData.LayoutAlgorithm&&e.applyCurrentLayout()});n&&this._AutoApplyHandlerHashes.push({Event:t[o],Hash:n})}}},{key:"toggleFullscreen",value:function(){return this._ViewportManager.toggleFullscreen()}},{key:"exitFullscreen",value:function(){return this._ViewportManager.exitFullscreen()}},{key:"setTheme",value:function(e){this._ThemeProvider?this._ThemeProvider.setTheme(e)&&(this._CSSProvider&&this._CSSProvider.registerCSS(),this._reinjectMarkerDefs(),this.initialRenderComplete&&this.renderFlow(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onThemeChanged",e)):this.log.warn("PictSectionFlow setTheme: ThemeProvider not available")}},{key:"setNoiseLevel",value:function(e){this._ThemeProvider?(this._ThemeProvider.setNoiseLevel(e),this.initialRenderComplete&&this.renderFlow()):this.log.warn("PictSectionFlow setNoiseLevel: ThemeProvider not available")}},{key:"getNoiseLevel",value:function(){return this._ThemeProvider?this._ThemeProvider.getNoiseLevel():0}},{key:"getThemeKey",value:function(){return this._ThemeProvider?this._ThemeProvider.getActiveThemeKey():"default"}},{key:"_reinjectMarkerDefs",value:function(){return this._RenderManager.reinjectMarkerDefs()}},{key:"getNode",value:function(e){return this._FlowData.Nodes.find(function(t){return t.Hash===e})||null}},{key:"getConnection",value:function(e){return this._FlowData.Connections.find(function(t){return t.Hash===e})||null}},{key:"selectTether",value:function(e){return this._SelectionManager.selectTether(e)}},{key:"updateConnectionHandle",value:function(e,t,o,n){return this._ConnectionHandleManager.updateConnectionHandle(e,t,o,n)}},{key:"addConnectionHandle",value:function(e,t,o){return this._ConnectionHandleManager.addConnectionHandle(e,t,o)}},{key:"removeConnectionHandle",value:function(e,t){return this._ConnectionHandleManager.removeConnectionHandle(e,t)}},{key:"_resetHandlesForNode",value:function(e){return this._ConnectionHandleManager.resetHandlesForNode(e)}},{key:"_resetHandlesForPanel",value:function(e){return this._ConnectionHandleManager.resetHandlesForPanel(e)}},{key:"addTetherHandle",value:function(e,t,o){var n=this._FlowData.OpenPanels.find(function(t){return t.Hash===e});if(n&&this._TetherService){var i=this.getNode(n.NodeHash);if(i){var r=this._TetherService.getSmartAnchors(n,i);this._TetherService.addHandle(n,t,o,r.panelAnchor,r.nodeAnchor),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData)}}}},{key:"removeTetherHandle",value:function(e,t){var o=this._FlowData.OpenPanels.find(function(t){return t.Hash===e});o&&this._TetherService&&(this._TetherService.removeHandle(o,t),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"updateTetherHandle",value:function(e,t,o,n){var i=this._FlowData.OpenPanels.find(function(t){return t.Hash===e});i&&(this._TetherService&&this._TetherService.updateHandlePosition(i,t,o,n),this._renderSingleTether(e))}},{key:"getPortPosition",value:function(e,t){var o=this.getNode(e);if(!o)return null;var n=o.Ports.find(function(e){return e.Hash===t});if(!n)return null;var i=o.Ports.filter(function(e){return e.Side===n.Side}),r=i.indexOf(n),a=i.length,l=this._NodeView&&this._NodeView.options.NodeTitleBarHeight||28,s=o.Height||80;if(this._GeometryProvider&&o.Ports&&o.Ports.length>0){var c=this._GeometryProvider.computeMinimumNodeHeight(o.Ports,l);c>s&&(s=c)}var d=this._GeometryProvider.buildPortCountsBySide(o.Ports),p=this._GeometryProvider.getPortLocalPosition(n.Side,r,a,o.Width,s,l,d);return{x:o.X+p.x,y:o.Y+p.y,side:n.Side||"right"}}},{key:"screenToSVGCoords",value:function(e,t){return this._ViewportManager.screenToSVGCoords(e,t)}},{key:"renderFlow",value:function(){return this._RenderManager.renderFlow()}},{key:"_renderSingleConnection",value:function(e){return this._RenderManager.renderSingleConnection(e)}},{key:"_renderSingleTether",value:function(e){return this._RenderManager.renderSingleTether(e)}},{key:"updateNodePosition",value:function(e,t,o){return this._RenderManager.updateNodePosition(e,t,o)}},{key:"_renderConnectionsForNode",value:function(e){return this._RenderManager.renderConnectionsForNode(e)}},{key:"_renderTethersForNode",value:function(e){return this._RenderManager.renderTethersForNode(e)}},{key:"openPanel",value:function(e){return this._PanelManager.openPanel(e)}},{key:"closePanel",value:function(e){return this._PanelManager.closePanel(e)}},{key:"closePanelForNode",value:function(e){return this._PanelManager.closePanelForNode(e)}},{key:"togglePanel",value:function(e){return this._PanelManager.togglePanel(e)}},{key:"updatePanelPosition",value:function(e,t,o){return this._PanelManager.updatePanelPosition(e,t,o)}},{key:"_handlePanelTabClick",value:function(e,t){t&&"function"==typeof t.stopPropagation&&t.stopPropagation(),this._PropertiesPanelView&&this._PropertiesPanelView.switchPanelTab(e)}},{key:"_applyNodePropChange",value:function(e,t,o,n,i){i&&"function"==typeof i.stopPropagation&&i.stopPropagation(),this._PropertiesPanelView&&this._PropertiesPanelView._applyNodePropChange(e,t,o,n)}},{key:"_activatePortHints",value:function(e,t){this._togglePortHints(e,t,!0)}},{key:"_deactivatePortHints",value:function(e,t){this._togglePortHints(e,t,!1)}},{key:"_togglePortHints",value:function(e,t,o){for(var n=e?'.pict-flow-port-hint[data-port-hash="'+e+'"]':'.pict-flow-port-hint[data-node-hash="'+t+'"]',i=(this._SVGElement||document).querySelectorAll(n),r=0;r<i.length;r++)o?i[r].setAttribute("data-active","true"):i[r].removeAttribute("data-active")}},{key:"_handleSVGPointerDown",value:function(e){this._InteractionManager&&this._InteractionManager._onPointerDown(e)}},{key:"_handleSVGPointerMove",value:function(e){this._InteractionManager&&this._InteractionManager._onPointerMove(e)}},{key:"_handleSVGPointerUp",value:function(e){this._InteractionManager&&this._InteractionManager._onPointerUp(e)}},{key:"_handleSVGWheel",value:function(e){this._InteractionManager&&this._InteractionManager._onWheel(e)}},{key:"_handleSVGContextMenu",value:function(e){this._InteractionManager&&this._InteractionManager.handleContextMenu(e)}}])}(n);t.exports=I,t.exports.default_configuration=N},{"../PictFlowCardPropertiesPanel.js":18,"../panels/FlowCardPropertiesPanel-Form.js":19,"../panels/FlowCardPropertiesPanel-Markdown.js":20,"../panels/FlowCardPropertiesPanel-Template.js":21,"../panels/FlowCardPropertiesPanel-View.js":22,"../providers/PictProvider-Flow-CSS.js":23,"../providers/PictProvider-Flow-ConnectorShapes.js":24,"../providers/PictProvider-Flow-EventHandler.js":25,"../providers/PictProvider-Flow-Geometry.js":26,"../providers/PictProvider-Flow-Icons.js":27,"../providers/PictProvider-Flow-Layouts.js":28,"../providers/PictProvider-Flow-NodeTypes.js":29,"../providers/PictProvider-Flow-Noise.js":30,"../providers/PictProvider-Flow-PanelChrome.js":31,"../providers/PictProvider-Flow-SVGHelpers.js":32,"../providers/PictProvider-Flow-Theme.js":33,"../services/PictService-Flow-ConnectionHandleManager.js":50,"../services/PictService-Flow-ConnectionRenderer.js":51,"../services/PictService-Flow-DataManager.js":52,"../services/PictService-Flow-InteractionManager.js":53,"../services/PictService-Flow-Layout.js":54,"../services/PictService-Flow-PanelManager.js":55,"../services/PictService-Flow-PathGenerator.js":56,"../services/PictService-Flow-PortRenderer.js":57,"../services/PictService-Flow-RenderManager.js":58,"../services/PictService-Flow-SelectionManager.js":59,"../services/PictService-Flow-Tether.js":60,"../services/PictService-Flow-ViewportManager.js":61,"./PictView-Flow-FloatingToolbar.js":62,"./PictView-Flow-Node.js":63,"./PictView-Flow-PropertiesPanel.js":64,"./PictView-Flow-Toolbar.js":65,"pict-view":137}],67:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t},[{key:"confirm",value:function(e,t){var o=this,n=Object.assign({},this._modal.options.DefaultConfirmOptions,t);return new Promise(function(t){var i=o._buildDialog(n.title,e,t,n);o._showDialog(i,t)})}},{key:"doubleConfirm",value:function(e,t){var o=this,n=Object.assign({},this._modal.options.DefaultDoubleConfirmOptions,t);return new Promise(function(t){var i=o._buildDoubleConfirmDialog(n.title,e,t,n);o._showDialog(i,t)})}},{key:"_buildDialog",value:function(e,t,o,n){var i=this,r=this._modal._nextId(),a=n.dangerous?"danger":"primary",l=document.createElement("div");l.className="pict-modal-dialog",n.unbounded&&(l.className+=" pict-modal-dialog--unbounded"),l.id="pict-modal-"+r,l.setAttribute("role","dialog"),l.setAttribute("aria-modal","true"),l.style.width="420px",l.innerHTML='<div class="pict-modal-dialog-header"><span class="pict-modal-dialog-title">'+this._escapeHTML(e)+'</span><button class="pict-modal-dialog-close" aria-label="Close">&times;</button></div><div class="pict-modal-dialog-body"><p>'+this._escapeHTML(t)+'</p></div><div class="pict-modal-dialog-footer"><button class="pict-modal-btn" data-action="cancel">'+this._escapeHTML(n.cancelLabel)+'</button><button class="pict-modal-btn pict-modal-btn--'+a+'" data-action="confirm">'+this._escapeHTML(n.confirmLabel)+"</button></div>";var s=l.querySelector(".pict-modal-dialog-close"),c=l.querySelector('[data-action="cancel"]'),d=l.querySelector('[data-action="confirm"]'),p=function(e){i._dismissDialog(l,e,o)};return s.addEventListener("click",function(){p(!1)}),c.addEventListener("click",function(){p(!1)}),d.addEventListener("click",function(){p(!0)}),l._dismiss=p,l._focusTarget=c,l}},{key:"_buildDoubleConfirmDialog",value:function(e,t,o,n){var i=this,r=this._modal._nextId(),a="string"==typeof n.confirmPhrase&&n.confirmPhrase.length>0,l=document.createElement("div");l.className="pict-modal-dialog",n.unbounded&&(l.className+=" pict-modal-dialog--unbounded"),l.id="pict-modal-"+r,l.setAttribute("role","dialog"),l.setAttribute("aria-modal","true"),l.style.width="420px";var s="<p>"+this._escapeHTML(t)+"</p>";if(a){var c=n.phrasePrompt.replace("{phrase}",n.confirmPhrase);s+='<div class="pict-modal-confirm-prompt">'+this._escapeHTML(c)+'</div><input type="text" class="pict-modal-confirm-input" autocomplete="off" spellcheck="false" />'}l.innerHTML='<div class="pict-modal-dialog-header"><span class="pict-modal-dialog-title">'+this._escapeHTML(e)+'</span><button class="pict-modal-dialog-close" aria-label="Close">&times;</button></div><div class="pict-modal-dialog-body">'+s+'</div><div class="pict-modal-dialog-footer"><button class="pict-modal-btn" data-action="cancel">'+this._escapeHTML(n.cancelLabel)+'</button><button class="pict-modal-btn pict-modal-btn--danger" data-action="confirm" disabled>'+this._escapeHTML(n.confirmLabel)+"</button></div>";var d=l.querySelector(".pict-modal-dialog-close"),p=l.querySelector('[data-action="cancel"]'),h=l.querySelector('[data-action="confirm"]'),u=function(e){i._dismissDialog(l,e,o)};if(d.addEventListener("click",function(){u(!1)}),p.addEventListener("click",function(){u(!1)}),a){var f=l.querySelector(".pict-modal-confirm-input");f.addEventListener("input",function(){h.disabled=f.value!==n.confirmPhrase}),h.addEventListener("click",function(){h.disabled||u(!0)}),l._focusTarget=f}else{var g=0;n.confirmLabel;h.disabled=!1,h.addEventListener("click",function(){1===++g?h.textContent="Click again to confirm":u(!0)}),l._focusTarget=p}return l._dismiss=u,l}},{key:"_showDialog",value:function(e,t){var o={element:e,dismiss:e._dismiss,type:"confirm"},n=null;this._modal.options.OverlayClickDismisses&&(n=function(){e._dismiss(!1)}),this._modal._overlay.show(n),document.body.appendChild(e),this._modal._activeModals.push(o),e.offsetHeight,e.classList.add("pict-modal-visible"),e._focusTarget&&e._focusTarget.focus(),e._keyHandler=function(t){"Escape"===t.key&&e._dismiss(!1)},document.addEventListener("keydown",e._keyHandler)}},{key:"_dismissDialog",value:function(e,t,o){if(!e._dismissed){if(e._dismissed=!0,e._keyHandler&&document.removeEventListener("keydown",e._keyHandler),e.classList.remove("pict-modal-visible"),this._modal._activeModals=this._modal._activeModals.filter(function(t){return t.element!==e}),this._modal._activeModals.length>0){var n=this._modal._activeModals[this._modal._activeModals.length-1];this._modal._overlay.updateClickHandler(this._modal.options.OverlayClickDismisses?n.dismiss:null)}this._modal._overlay.hide(),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},220),o(t)}}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}])}();t.exports=n},{}],68:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t,this._activeMenu=null},[{key:"dropdown",value:function(e,t){var o=this,n=Object.assign({align:"left",position:"auto",maxHeight:"60vh",closeOnSelect:!0},t||{}),i=this._resolveAnchor(e),r=this._anchorRect(e,i);if(!r)return Promise.resolve(null);if(this._activeMenu&&this._activeMenu.anchor===i)return this._activeMenu.promise;this.dismissAll();var a,l=Array.isArray(n.items)?n.items:[],s=new Promise(function(e){a=e}),c=this._buildMenu(l,n);document.body.appendChild(c),this._positionMenu(c,r,n),c.offsetHeight,c.classList.add("pict-modal-visible");for(var d=function(e){c._dismissed||(c._dismissed=!0,document.removeEventListener("mousedown",f,!0),document.removeEventListener("keydown",g,!0),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),c.classList.remove("pict-modal-visible"),setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c)},180),o._activeMenu&&o._activeMenu.element===c&&(o._activeMenu=null),"function"==typeof n.onClose&&n.onClose(e),a(e))},p=c.querySelectorAll("[data-pict-modal-dropdown-item]"),h=function(){var e=p[u];e.addEventListener("click",function(t){if(!e.hasAttribute("data-disabled")){t.stopPropagation();var o=parseInt(e.getAttribute("data-index"),10),i=l[o],r=e.getAttribute("data-hash");"function"==typeof n.onSelect&&n.onSelect(r,i),!1!==n.closeOnSelect&&d({Hash:r,Item:i})}})},u=0;u<p.length;u++)h();var f=function(e){c.contains(e.target)||i&&i.contains&&i.contains(e.target)||d(null)};document.addEventListener("mousedown",f,!0);var g=function(e){if("Escape"===e.key)return e.stopPropagation(),void d(null);if("ArrowDown"===e.key||"ArrowUp"===e.key)e.preventDefault(),o._focusNeighbor(c,"ArrowDown"===e.key?1:-1);else if("Enter"===e.key||" "===e.key){var t=document.activeElement;t&&c.contains(t)&&t.hasAttribute("data-pict-modal-dropdown-item")&&(e.preventDefault(),t.click())}};document.addEventListener("keydown",g,!0);var m=function(){var t=o._anchorRect(e,i);t&&o._positionMenu(c,t,n)};return window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),setTimeout(function(){o._focusFirstEnabled(c)},0),this._activeMenu={element:c,anchor:i,promise:s,dismiss:d},s}},{key:"dismissAll",value:function(){if(this._activeMenu){var e=this._activeMenu.dismiss;this._activeMenu=null,e(null)}}},{key:"_resolveAnchor",value:function(e){return e?"string"==typeof e?document.querySelector(e):1===e.nodeType?e:null:null}},{key:"_anchorRect",value:function(e,t){return t&&"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():e&&"object"===_typeof(e)&&"number"==typeof e.left&&"number"==typeof e.top?{left:e.left,top:e.top,width:e.width||0,height:e.height||0,right:e.left+(e.width||0),bottom:e.top+(e.height||0)}:null}},{key:"_buildMenu",value:function(e,t){var o=this._modal._nextId(),n=document.createElement("div");n.className="pict-modal-dropdown",t.className&&(n.className+=" "+t.className),n.id="pict-modal-dropdown-"+o,n.setAttribute("role","menu"),n.style.maxHeight=t.maxHeight;for(var i="",r=0;r<e.length;r++){var a=e[r];if(a.Separator)i+='<div class="pict-modal-dropdown-separator" role="separator"></div>';else if(a.Header)i+='<div class="pict-modal-dropdown-header">'+this._escapeHTML(a.Header)+"</div>";else{var l="pict-modal-dropdown-item";a.Style&&(l+=" pict-modal-dropdown-item--"+a.Style),a.Disabled&&(l+=" pict-modal-dropdown-item--disabled");var s=' data-pict-modal-dropdown-item data-index="'+r+'" data-hash="'+this._escapeHTML(a.Hash||"")+'" role="menuitem" tabindex="-1"';a.Disabled&&(s+=' aria-disabled="true" data-disabled'),a.Tooltip&&(s+=' title="'+this._escapeHTML(a.Tooltip)+'"');var c=a.Icon?'<span class="pict-modal-dropdown-item-icon">'+a.Icon+"</span>":"",d=a.Hint?'<span class="pict-modal-dropdown-item-hint">'+this._escapeHTML(a.Hint)+"</span>":"";i+='<div class="'+l+'"'+s+">"+c+'<span class="pict-modal-dropdown-item-label">'+this._escapeHTML(a.Label||"")+"</span>"+d+"</div>"}}return n.innerHTML=i,n}},{key:"_positionMenu",value:function(e,t,o){var n=o.minWidth||(t.width>=80?Math.ceil(t.width)+"px":"160px");e.style.minWidth=n;var i,r=e.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth,l=(window.innerHeight||document.documentElement.clientHeight)-t.bottom-4,s=t.top-4;i="above"===o.position||"below"!==o.position&&(r.height>l&&s>l);var c,d,p=Math.max(80,(i?s:l)-8);e.style.maxHeight=p+"px",c="right"===o.align?t.right-r.width:"center"===o.align?t.left+(t.width-r.width)/2:t.left,c=Math.min(c,a-r.width-4),c=Math.max(4,c),i?(d=Math.max(4,t.top-r.height-4),e.classList.add("pict-modal-dropdown--above")):(d=t.bottom+4,e.classList.remove("pict-modal-dropdown--above")),e.style.left=Math.round(c)+"px",e.style.top=Math.round(d)+"px"}},{key:"_focusFirstEnabled",value:function(e){var t=e.querySelectorAll("[data-pict-modal-dropdown-item]:not([data-disabled])");t.length&&t[0].focus()}},{key:"_focusNeighbor",value:function(e,t){var o=Array.prototype.slice.call(e.querySelectorAll("[data-pict-modal-dropdown-item]:not([data-disabled])"));if(o.length){var n=document.activeElement,i=o.indexOf(n);o[-1===i?t>0?0:o.length-1:(i+t+o.length)%o.length].focus()}}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}])}();t.exports=n},{}],69:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t,this._element=null,this._refCount=0},[{key:"show",value:function(e){var t=this;this._refCount++,this._element||(this._element=document.createElement("div"),this._element.className="pict-modal-overlay",document.body.appendChild(this._element),this._element.offsetHeight,this._element.classList.add("pict-modal-visible")),e&&(this._currentClickHandler=e,this._element.onclick=function(e){e.target===t._element&&t._currentClickHandler&&t._currentClickHandler()})}},{key:"updateClickHandler",value:function(e){this._currentClickHandler=e||null}},{key:"hide",value:function(){if(this._refCount--,this._refCount<=0&&(this._refCount=0,this._element)){this._element.classList.remove("pict-modal-visible");var e=this._element;setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},220),this._element=null,this._currentClickHandler=null}}},{key:"destroy",value:function(){this._refCount=0,this._element&&this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null,this._currentClickHandler=null}}])}();t.exports=n},{}],70:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t,this._panels=[]},[{key:"create",value:function(e,t){var o=this,n=this._modal&&this._modal.options&&this._modal.options.DefaultPanelOptions||{},i=Object.assign({},{position:"right",width:340,minWidth:200,maxWidth:600,collapsible:!0,collapsed:!1,persist:!1,persistKey:"",onResize:null,onToggle:null},n,t);if("undefined"==typeof document)return this._nullHandle();var r=document.querySelector(e);if(!r)return this._nullHandle();var a=this._modal._nextId(),l="right"===i.position,s=!1,c=i.width,d=!1;if(i.persist&&i.persistKey)try{var p=localStorage.getItem("pict-panel-"+i.persistKey);if(p){var h=JSON.parse(p);"number"==typeof h.width&&(c=h.width),"boolean"==typeof h.collapsed&&(i.collapsed=h.collapsed)}}catch(e){}r.classList.add("pict-panel"),r.classList.add(l?"pict-panel-right":"pict-panel-left"),r.style.width=c+"px","none"===r.style.display&&(r.style.display="");var u=document.createElement("div");u.className="pict-panel-edge "+(l?"pict-panel-edge-right":"pict-panel-edge-left");var f=document.createElement("div");f.className="pict-panel-resize",u.appendChild(f);var g=null;i.collapsible&&((g=document.createElement("div")).className="pict-panel-tab",g.title="Toggle panel",u.appendChild(g)),r.parentNode?l?r.parentNode.insertBefore(u,r):r.parentNode.insertBefore(u,r.nextSibling):r.insertBefore(u,r.firstChild);var m="undefined"!=typeof window&&window.pict?window.pict:null,v=function(e){return m&&"function"==typeof m.icon?m.icon(e):""},w=function(){if(g){var e=v("ChevronRight"),t=v("ChevronLeft");g.innerHTML=l?s?t:e:s?e:t}},y=function(){if(i.persist&&i.persistKey)try{localStorage.setItem("pict-panel-"+i.persistKey,JSON.stringify({width:c,collapsed:s}))}catch(e){}},b=function(){s||d||(s=!0,r.classList.add("pict-panel-collapsed"),u.classList.add("pict-panel-edge-collapsed"),w(),y(),"function"==typeof i.onToggle&&i.onToggle(!0))},S=function(){s&&!d&&(s=!1,u.classList.remove("pict-panel-edge-collapsed"),r.classList.remove("pict-panel-collapsed"),r.style.width=c+"px",w(),y(),"function"==typeof i.onToggle&&i.onToggle(!1))},_=function(){s?S():b()};g&&g.addEventListener("click",function(e){e.stopPropagation(),_()});var k=function(e){if(!s){e.preventDefault();var t=e.clientX,o=r.offsetWidth;f.classList.add("dragging"),r.style.transition="none",document.body.style.userSelect="none",document.body.style.cursor="col-resize";var n=function(e){var n=l?t-e.clientX:e.clientX-t,a=Math.max(i.minWidth,Math.min(i.maxWidth,o+n));r.style.width=a+"px"},a=function(e){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a),f.classList.remove("dragging"),r.style.transition="",document.body.style.userSelect="",document.body.style.cursor="",c=r.offsetWidth,y(),"function"==typeof i.onResize&&i.onResize(c)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}};f.addEventListener("mousedown",k),w(),i.collapsed&&(s=!0,r.classList.add("pict-panel-collapsed"),u.classList.add("pict-panel-edge-collapsed"),w());var P={id:a,collapse:b,expand:S,toggle:_,setWidth:function(e){if(!d){var t=Math.max(i.minWidth,Math.min(i.maxWidth,e));c=t,s||(r.style.width=t+"px"),y(),"function"==typeof i.onResize&&i.onResize(t)}},destroy:function(){if(!d){d=!0,f.removeEventListener("mousedown",k),u.parentNode&&u.remove(),r.classList.remove("pict-panel","pict-panel-right","pict-panel-left","pict-panel-collapsed"),r.style.width="",r.style.transition="";var e=o._panels.indexOf(P);e>=0&&o._panels.splice(e,1)}}};return this._panels.push(P),P}},{key:"_nullHandle",value:function(){return{id:0,collapse:function(){},expand:function(){},toggle:function(){},setWidth:function(){},destroy:function(){}}}},{key:"destroyAll",value:function(){for(var e=this._panels.slice(),t=0;t<e.length;t++)e[t].destroy()}}])}();t.exports=n},{}],71:[function(e,t,o){var n="pict-modal-shell:",i=function(){return _createClass(function e(t,o,n){var i=this;_classCallCheck(this,e),_defineProperty(this,"_onDragMove",function(e){if(i._activeDrag){var t=i._activeDrag,o=(("x"===t.Axis?e.clientX:e.clientY)-t.StartCoord)*t.Direction;if(t.PendingSize=t.StartSize+o,!t.RAFId){var n=i;t.RAFId="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){n._flushDrag()}):setTimeout(function(){n._flushDrag()},16)}}}),_defineProperty(this,"_onDragEnd",function(){if(i._activeDrag){var e=i._activeDrag;null!==e.PendingSize&&i._flushDrag(),e.RAFId&&"undefined"!=typeof window&&window.cancelAnimationFrame&&window.cancelAnimationFrame(e.RAFId),document.body.classList.remove("pict-modal-shell-dragging-x"),document.body.classList.remove("pict-modal-shell-dragging-y"),e.Panel.El.classList.remove("pict-modal-shell-panel-resizing"),document.removeEventListener("pointermove",i._onDragMove),document.removeEventListener("pointerup",i._onDragEnd),e.Panel._persist(),i._activeDrag=null}}),this._modal=t,this._viewport=o,this._options=n||{},this._panels=[],this._panelsByHash={},this._centerDestinationEl=null,this._idCounter=0,this._activeDrag=null,this._persistenceEnabled=!1!==this._options.Persistence,this._persistenceKey=this._persistenceEnabled?this._resolvePersistenceKey(this._options.PersistenceKey):null,this._buildSkeleton()},[{key:"addPanel",value:function(e){var t=new r(this,e||{});return this._panels.push(t),this._panelsByHash[t.Hash]=t,this._mountPanel(t),t._renderContentView(),t}},{key:"getPanel",value:function(e){return this._panelsByHash[e]||null}},{key:"getPanels",value:function(){return this._panels.slice()}},{key:"openPanel",value:function(e){var t=this._panelsByHash[e];return t&&t.popup(),t||null}},{key:"center",value:function(e){if((e=e||{}).ContentDestinationId){this._centerDestinationEl&&this._centerDestinationEl.parentNode===this._centerEl&&this._centerEl.removeChild(this._centerDestinationEl);var t=document.createElement("div");t.id=e.ContentDestinationId,t.className="pict-modal-shell-center-content";for(var o=null,n=this._centerEl.children,i=0;i<n.length;i++){var r=n[i];if(r.classList&&r.classList.contains("pict-modal-shell-panel-bottom")){o=r;break}}o?this._centerEl.insertBefore(t,o):this._centerEl.appendChild(t),this._centerDestinationEl=t}return this._centerEl}},{key:"getCenterEl",value:function(){return this._centerEl}},{key:"destroy",value:function(){for(var e=0;e<this._panels.length;e++)this._panels[e].destroy(!0);this._panels=[],this._panelsByHash={},this._wrapperEl&&this._wrapperEl.parentNode&&this._wrapperEl.parentNode.removeChild(this._wrapperEl),this._detachDragHandlers()}},{key:"_resolvePersistenceKey",value:function(e){if("string"==typeof e&&e.length>0)return n+e;try{if("undefined"!=typeof window&&window.location&&window.location.hostname)return n+window.location.hostname}catch(e){}return n+"default"}},{key:"_loadState",value:function(){if(!this._persistenceKey)return null;try{var e="undefined"!=typeof window?window.localStorage:null;if(!e)return null;var t=e.getItem(this._persistenceKey);if(!t)return null;var o=JSON.parse(t);return o&&1===o.Version?o.Panels&&"object"===_typeof(o.Panels)?o.Panels:{}:null}catch(e){return null}}},{key:"_loadPanelState",value:function(e){var t=this._loadState();return t&&t[e]||null}},{key:"_savePanelState",value:function(e,t){if(this._persistenceKey)try{var o="undefined"!=typeof window?window.localStorage:null;if(!o)return;var n=this._loadState()||{};n[e]=t,o.setItem(this._persistenceKey,JSON.stringify({Version:1,Panels:n,SavedAt:(new Date).toISOString()}))}catch(e){}}},{key:"_buildSkeleton",value:function(){this._viewport.innerHTML="",this._viewport.classList.add("pict-modal-shell-host"),this._wrapperEl=document.createElement("div"),this._wrapperEl.className="pict-modal-shell",this._topRow=document.createElement("div"),this._topRow.className="pict-modal-shell-row pict-modal-shell-row-top",this._wrapperEl.appendChild(this._topRow),this._middleRow=document.createElement("div"),this._middleRow.className="pict-modal-shell-row pict-modal-shell-row-middle",this._wrapperEl.appendChild(this._middleRow),this._leftStack=document.createElement("div"),this._leftStack.className="pict-modal-shell-side pict-modal-shell-side-left",this._middleRow.appendChild(this._leftStack),this._centerEl=document.createElement("div"),this._centerEl.className="pict-modal-shell-center",this._middleRow.appendChild(this._centerEl),this._rightStack=document.createElement("div"),this._rightStack.className="pict-modal-shell-side pict-modal-shell-side-right",this._middleRow.appendChild(this._rightStack),this._bottomRow=document.createElement("div"),this._bottomRow.className="pict-modal-shell-row pict-modal-shell-row-bottom",this._wrapperEl.appendChild(this._bottomRow),this._overlayLayer=document.createElement("div"),this._overlayLayer.className="pict-modal-shell-overlay-layer",this._middleRow.appendChild(this._overlayLayer),this._viewport.appendChild(this._wrapperEl)}},{key:"_mountPanel",value:function(e){if("overlay"!==e.Position){if("center"===e.Scope)return this._centerEl.classList.add("pict-modal-shell-center-with-inner-panel"),void("top"===e.Side?this._centerEl.insertBefore(e.El,this._centerEl.firstChild):this._centerEl.appendChild(e.El));("top"===e.Side?this._topRow:"bottom"===e.Side?this._bottomRow:"left"===e.Side?this._leftStack:"right"===e.Side?this._rightStack:this._wrapperEl).appendChild(e.El)}else this._overlayLayer.appendChild(e.El)}},{key:"_attachDragStart",value:function(e,t){t.preventDefault();var o="top"===e.Side||"bottom"===e.Side?"y":"x";this._activeDrag={Panel:e,Axis:o,StartCoord:"x"===o?t.clientX:t.clientY,StartSize:e.Size,Direction:"left"===e.Side||"top"===e.Side?1:-1,PendingSize:null,RAFId:0},document.body.classList.add("x"===o?"pict-modal-shell-dragging-x":"pict-modal-shell-dragging-y"),e.El.classList.add("pict-modal-shell-panel-resizing");try{t.target.setPointerCapture&&t.target.setPointerCapture(t.pointerId)}catch(e){}document.addEventListener("pointermove",this._onDragMove),document.addEventListener("pointerup",this._onDragEnd)}},{key:"_flushDrag",value:function(){var e=this._activeDrag;e&&(e.RAFId=0,null!==e.PendingSize&&(e.Panel.setSize(e.PendingSize),e.PendingSize=null))}},{key:"_detachDragHandlers",value:function(){document.removeEventListener("pointermove",this._onDragMove),document.removeEventListener("pointerup",this._onDragEnd)}}])}(),r=function(){return _createClass(function e(t,o){_classCallCheck(this,e),this._shell=t,this._config=o,this.Hash=o.Hash||"panel-"+ ++t._idCounter,this.Side="right"===o.Side||"bottom"===o.Side||"left"===o.Side?o.Side:"top",this.Mode="collapsible"===o.Mode||"resizable"===o.Mode?o.Mode:"fixed",this.Position="overlay"===o.Position?"overlay":"pinned",this.Scope="center"!==o.Scope||"top"!==this.Side&&"bottom"!==this.Side?"shell":"center",this.Title=o.Title||"",this.Icon=o.Icon||"",this.MinSize="number"==typeof o.MinSize?o.MinSize:40,this.MaxSize="number"==typeof o.MaxSize?o.MaxSize:1200,this.Hidden=!!o.Hidden,this.CollapsedSize="number"==typeof o.CollapsedSize?o.CollapsedSize:this.Hidden?0:24,this.PersistEnabled=t._persistenceEnabled&&!1!==o.Persist;var n="left"===this.Side||"right"===this.Side?240:60;if(this.Size="number"==typeof o.Size?o.Size:n,this.Collapsed=!!o.Collapsed,this.PersistEnabled){var i=t._loadPanelState(this.Hash);i&&("number"==typeof i.Size&&(this.Size=i.Size),"boolean"==typeof i.Collapsed&&(this.Collapsed=i.Collapsed))}this._clampSize(),this._buildEl(o),this._applySize(),this._applyCollapsedClass(),this.ResponsiveDrawer="number"==typeof o.ResponsiveDrawer&&o.ResponsiveDrawer>0?o.ResponsiveDrawer:0,this.DrawerHeight="string"==typeof o.DrawerHeight&&o.DrawerHeight?o.DrawerHeight:"33vh",this._mediaQuery=null,this._mediaQueryHandler=null,this.ResponsiveDrawer>0&&this._wireResponsiveDrawer()},[{key:"getContentEl",value:function(){return this._contentEl}},{key:"getContentView",value:function(){if(!this._config.ContentView)return null;var e=this._shell._modal&&this._shell._modal.pict;return e&&e.views&&e.views[this._config.ContentView]||null}},{key:"collapse",value:function(){this._setCollapsed(!0)}},{key:"expand",value:function(){this._setCollapsed(!1)}},{key:"toggle",value:function(){this._setCollapsed(!this.Collapsed)}},{key:"popup",value:function(){this.Collapsed?this._setCollapsed(!1):(this._renderContentView(),this._flash())}},{key:"setSize",value:function(e){"number"==typeof e&&isFinite(e)&&(this.Size=e,this._clampSize(),this._applySize())}},{key:"destroy",value:function(e){if(this._unwireResponsiveDrawer(),this.El&&this.El.parentNode&&this.El.parentNode.removeChild(this.El),!e){var t=this._shell._panels.indexOf(this);t>=0&&this._shell._panels.splice(t,1),delete this._shell._panelsByHash[this.Hash]}}},{key:"_clampSize",value:function(){this.Size<this.MinSize&&(this.Size=this.MinSize),this.Size>this.MaxSize&&(this.Size=this.MaxSize)}},{key:"_wireResponsiveDrawer",value:function(){if("undefined"!=typeof window&&window.matchMedia){this._mediaQuery=window.matchMedia("(max-width: "+this.ResponsiveDrawer+"px)"),this.El&&this.El.style.setProperty("--pict-modal-drawer-height",this.DrawerHeight);var e=this;this._mediaQueryHandler=function(t){var o=t&&"boolean"==typeof t.matches?t.matches:e._mediaQuery.matches;e._setDrawerMode(o)},this._mediaQuery.addEventListener?this._mediaQuery.addEventListener("change",this._mediaQueryHandler):this._mediaQuery.addListener&&this._mediaQuery.addListener(this._mediaQueryHandler),this._mediaQueryHandler({matches:this._mediaQuery.matches}),this._resizeHandler=function(){e._setDrawerMode(e._mediaQuery.matches)},window.addEventListener("resize",this._resizeHandler)}}},{key:"_unwireResponsiveDrawer",value:function(){this._resizeHandler&&"undefined"!=typeof window&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._mediaQuery&&this._mediaQueryHandler&&(this._mediaQuery.removeEventListener?this._mediaQuery.removeEventListener("change",this._mediaQueryHandler):this._mediaQuery.removeListener&&this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null,this._mediaQueryHandler=null)}},{key:"_setDrawerMode",value:function(e){if(this._shell&&this._shell._middleRow&&!(!this.El||!this.El.classList.contains("pict-modal-shell-panel-drawer"))!==!!e){if(e)this._shell._middleRow.classList.add("pict-modal-shell-drawer-active"),this.El&&this.El.classList.add("pict-modal-shell-panel-drawer");else{for(var t=!1,o=this._shell._panels||[],n=0;n<o.length;n++){var i=o[n];if(i!==this&&i._mediaQuery&&i._mediaQuery.matches&&i.ResponsiveDrawer>0){t=!0;break}}t||this._shell._middleRow.classList.remove("pict-modal-shell-drawer-active"),this.El&&this.El.classList.remove("pict-modal-shell-panel-drawer")}this._applySize()}}},{key:"_buildEl",value:function(e){var t=document.createElement("div");t.className="pict-modal-shell-panel pict-modal-shell-panel-"+this.Side+" pict-modal-shell-panel-mode-"+this.Mode+("overlay"===this.Position?" pict-modal-shell-panel-overlay":"")+(this.Hidden?" pict-modal-shell-panel-hidden":""),t.setAttribute("data-shell-panel-hash",this.Hash),t.setAttribute("data-shell-panel-side",this.Side),t.setAttribute("data-shell-panel-mode",this.Mode);var o=document.createElement("div");if(o.className="pict-modal-shell-panel-content",this._contentEl=document.createElement("div"),e.ContentDestinationId&&(this._contentEl.id=e.ContentDestinationId),this._contentEl.className="pict-modal-shell-panel-content-inner",o.appendChild(this._contentEl),t.appendChild(o),("collapsible"===this.Mode||"resizable"===this.Mode)&&!this.Hidden){this._collapseTab=document.createElement("button"),this._collapseTab.type="button",this._collapseTab.className="pict-modal-shell-panel-collapse-tab",this._collapseTab.setAttribute("aria-label",this.Title?"Toggle "+this.Title:"Toggle panel"),this._collapseTab.title=this.Title||"Toggle",this._collapseTab.innerHTML=(this.Icon?'<span class="pict-modal-shell-panel-collapse-tab-icon">'+this.Icon+"</span>":"")+(this.Title?'<span class="pict-modal-shell-panel-collapse-tab-title">'+this._escape(this.Title)+"</span>":"");var n=this;this._collapseTab.addEventListener("click",function(){n.toggle()}),t.appendChild(this._collapseTab)}if("resizable"===this.Mode){this._resizeHandle=document.createElement("div"),this._resizeHandle.className="pict-modal-shell-panel-resize-handle",this._resizeHandle.setAttribute("aria-hidden","true");var i=this;this._resizeHandle.addEventListener("pointerdown",function(e){i.Collapsed||i._shell._attachDragStart(i,e)}),t.appendChild(this._resizeHandle)}this.El=t}},{key:"_applySize",value:function(){var e=this.Collapsed?this.CollapsedSize:this.Size;"left"===this.Side||"right"===this.Side?(this.El.style.width=e+"px",this.El.style.height=""):(this.El.style.height=e+"px",this.El.style.width="")}},{key:"_applyCollapsedClass",value:function(){this.Collapsed?this.El.classList.add("pict-modal-shell-panel-collapsed"):this.El.classList.remove("pict-modal-shell-panel-collapsed")}},{key:"_setCollapsed",value:function(e){if(this.Collapsed!==!!e){var t=this.Collapsed;this.Collapsed=!!e,this._applyCollapsedClass(),this._applySize(),this._persist(),t&&!this.Collapsed?(this._renderContentView(),this._fireHook("OnExpand")):!t&&this.Collapsed&&this._fireHook("OnCollapse"),this._fireHook("OnToggle",this.Collapsed)}}},{key:"_fireHook",value:function(e,t){var o=this._config[e];if("function"==typeof o)try{void 0!==t?o(t,this):o(this)}catch(e){}}},{key:"_renderContentView",value:function(){var e=this.getContentView();if(e&&"function"==typeof e.render)try{e.render()}catch(e){}}},{key:"_flash",value:function(){if(this.El){this.El.classList.add("pict-modal-shell-panel-flash");var e=this;clearTimeout(this._flashTimer),this._flashTimer=setTimeout(function(){e.El&&e.El.classList.remove("pict-modal-shell-panel-flash")},700)}}},{key:"_persist",value:function(){this.PersistEnabled&&this._shell._savePanelState(this.Hash,{Collapsed:this.Collapsed,Size:this.Size})}},{key:"_escape",value:function(e){return String(e||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}}])}(),a=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t,this._shellsByViewport=new WeakMap},[{key:"shell",value:function(e,t){var o="string"==typeof e?document.querySelector(e):e;if(!o)throw new Error("Pict-Modal-Shell.shell: viewport not found for "+e);var n=this._shellsByViewport.get(o);if(n)return n;var r=new i(this._modal,o,t);return this._shellsByViewport.set(o,r),r}}])}();t.exports=a,t.exports.PictModalShell=i,t.exports.ShellPanel=r,t.exports.STORAGE_PREFIX=n,t.exports.SCHEMA_VERSION=1},{}],72:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t,this._containers={}},[{key:"toast",value:function(e,t){var o=this,n=Object.assign({},this._modal.options.DefaultToastOptions,t),i=this._getContainer(n.position),r=this._modal._nextId(),a=document.createElement("div");a.className="pict-modal-toast pict-modal-toast--"+n.type,a.id="pict-modal-toast-"+r;var l='<span class="pict-modal-toast-message">'+this._escapeHTML(e)+"</span>";n.dismissible&&(l+='<button class="pict-modal-toast-dismiss" aria-label="Dismiss">&times;</button>'),a.innerHTML=l;var s=!1,c=null,d=function(){s||(s=!0,c&&clearTimeout(c),a.classList.remove("pict-modal-visible"),a.classList.add("pict-modal-toast-exit"),o._modal._activeToasts=o._modal._activeToasts.filter(function(e){return e.element!==a}),setTimeout(function(){a.parentNode&&a.parentNode.removeChild(a),o._cleanupContainer(n.position)},220))},p={dismiss:d};if(n.dismissible){var h=a.querySelector(".pict-modal-toast-dismiss");h&&h.addEventListener("click",d)}i.appendChild(a);var u={element:a,dismiss:d,handle:p};return this._modal._activeToasts.push(u),a.offsetHeight,a.classList.add("pict-modal-visible"),n.duration>0&&(c=setTimeout(d,n.duration)),p}},{key:"_getContainer",value:function(e){if(this._containers[e])return this._containers[e];var t=document.createElement("div");return t.className="pict-modal-toast-container pict-modal-toast-container--"+e,document.body.appendChild(t),this._containers[e]=t,t}},{key:"_cleanupContainer",value:function(e){var t=this._containers[e];t&&0===t.children.length&&(t.parentNode&&t.parentNode.removeChild(t),delete this._containers[e])}},{key:"dismissAll",value:function(){for(var e=this._modal._activeToasts.slice(),t=0;t<e.length;t++)e[t].dismiss()}},{key:"destroy",value:function(){this.dismissAll();for(var e=Object.keys(this._containers),t=0;t<e.length;t++){var o=this._containers[e[t]];o&&o.parentNode&&o.parentNode.removeChild(o)}this._containers={}}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}])}();t.exports=n},{}],73:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t},[{key:"tooltip",value:function(e,t,o){var n=Object.assign({},this._modal.options.DefaultTooltipOptions,o);return this._attachTooltip(e,t,!1,n)}},{key:"richTooltip",value:function(e,t,o){var n=Object.assign({},this._modal.options.DefaultTooltipOptions,o);return this._attachTooltip(e,t,!0,n)}},{key:"_attachTooltip",value:function(e,t,o,n){var i=this,r=null,a=null,l=null,s=!1,c=this._modal._nextId(),d=function(){if(!s&&!r){(r=document.createElement("div")).className="pict-modal-tooltip pict-modal-tooltip--"+n.position,r.id="pict-modal-tooltip-"+c,r.setAttribute("role","tooltip"),r.style.maxWidth=n.maxWidth,n.interactive&&r.classList.add("pict-modal-tooltip-interactive");var a=document.createElement("div");a.className="pict-modal-tooltip-arrow";var d=document.createElement("div");o?d.innerHTML=t:d.textContent=t,r.appendChild(a),r.appendChild(d),document.body.appendChild(r),e.setAttribute("aria-describedby",r.id),i._positionTooltip(r,e,n.position),r.offsetHeight,r.classList.add("pict-modal-visible"),i._modal._activeTooltips.push({element:r,targetElement:e,destroy:m}),n.interactive&&r&&(r.addEventListener("mouseenter",function(){l&&(clearTimeout(l),l=null)}),r.addEventListener("mouseleave",function(){p()}))}},p=function(){if(r){r.classList.remove("pict-modal-visible");var t=r;r=null,e.removeAttribute("aria-describedby"),i._modal._activeTooltips=i._modal._activeTooltips.filter(function(e){return e.element!==t}),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},220)}},h=function(){l&&(clearTimeout(l),l=null),a=setTimeout(d,n.delay)},u=function(){a&&(clearTimeout(a),a=null),n.interactive?l=setTimeout(p,100):p()},f=function(){a=setTimeout(d,n.delay)},g=function(){a&&(clearTimeout(a),a=null),p()};e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",u),e.addEventListener("focusin",f),e.addEventListener("focusout",g);var m=function(){s||(s=!0,a&&clearTimeout(a),l&&clearTimeout(l),p(),e.removeEventListener("mouseenter",h),e.removeEventListener("mouseleave",u),e.removeEventListener("focusin",f),e.removeEventListener("focusout",g))};return{destroy:m}}},{key:"_positionTooltip",value:function(e,t,o){var n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=o;"top"===r&&n.top<i.height+8?r="bottom":"bottom"===r&&window.innerHeight-n.bottom<i.height+8?r="top":"left"===r&&n.left<i.width+8?r="right":"right"===r&&window.innerWidth-n.right<i.width+8&&(r="left"),e.className=e.className.replace(/pict-modal-tooltip--\w+/,"pict-modal-tooltip--"+r);var a=0,l=0;switch(r){case"top":a=n.top-i.height-8,l=n.left+n.width/2-i.width/2;break;case"bottom":a=n.bottom+8,l=n.left+n.width/2-i.width/2;break;case"left":a=n.top+n.height/2-i.height/2,l=n.left-i.width-8;break;case"right":a=n.top+n.height/2-i.height/2,l=n.right+8}l=Math.max(4,Math.min(l,window.innerWidth-i.width-4)),a=Math.max(4,Math.min(a,window.innerHeight-i.height-4)),e.style.top=a+"px",e.style.left=l+"px"}},{key:"dismissAll",value:function(){for(var e=this._modal._activeTooltips.slice(),t=0;t<e.length;t++)e[t].destroy()}}])}();t.exports=n},{}],74:[function(e,t,o){var n=function(){return _createClass(function e(t){_classCallCheck(this,e),this._modal=t},[{key:"show",value:function(e){var t=this,o=Object.assign({},this._modal.options.DefaultModalOptions,e);return new Promise(function(e){var n=t._buildDialog(o,e);t._showDialog(n,o,e)})}},{key:"_buildDialog",value:function(e,t){var o=this,n=this._modal._nextId(),i=document.createElement("div");i.className="pict-modal-dialog",e.unbounded&&(i.className+=" pict-modal-dialog--unbounded"),i.id="pict-modal-"+n,i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.style.width=e.width;var r="";(e.title||e.closeable)&&(r='<div class="pict-modal-dialog-header">',r+='<span class="pict-modal-dialog-title">'+this._escapeHTML(e.title)+"</span>",e.closeable&&(r+='<button class="pict-modal-dialog-close" aria-label="Close">&times;</button>'),r+="</div>");var a='<div class="pict-modal-dialog-body">'+(e.content||"")+"</div>",l="";if(e.buttons&&e.buttons.length>0){l='<div class="pict-modal-dialog-footer">';for(var s=0;s<e.buttons.length;s++){var c=e.buttons[s],d="pict-modal-btn";c.Style&&(d+=" pict-modal-btn--"+c.Style),l+='<button class="'+d+'" data-hash="'+this._escapeHTML(c.Hash)+'">'+this._escapeHTML(c.Label)+"</button>"}l+="</div>"}i.innerHTML=r+a+l;var p=function(n){o._dismissDialog(i,n,t,e)};if(e.closeable){var h=i.querySelector(".pict-modal-dialog-close");h&&h.addEventListener("click",function(){p(null)})}for(var u=i.querySelectorAll("[data-hash]"),f=function(){var e=u[g];e.addEventListener("click",function(){p(e.getAttribute("data-hash"))})},g=0;g<u.length;g++)f();return i._dismiss=p,i}},{key:"_showDialog",value:function(e,t,o){var n={element:e,dismiss:e._dismiss,type:"window"},i=null;this._modal.options.OverlayClickDismisses&&t.closeable&&(i=function(){e._dismiss(null)}),this._modal._overlay.show(i),document.body.appendChild(e),this._modal._activeModals.push(n),e.offsetHeight,e.classList.add("pict-modal-visible");var r=e.querySelector(".pict-modal-btn")||e.querySelector(".pict-modal-dialog-close");r&&r.focus(),e._keyHandler=function(o){"Escape"===o.key&&t.closeable&&e._dismiss(null)},document.addEventListener("keydown",e._keyHandler),"function"==typeof t.onOpen&&t.onOpen(e)}},{key:"_dismissDialog",value:function(e,t,o,n){if(!e._dismissed){if(e._dismissed=!0,e._keyHandler&&document.removeEventListener("keydown",e._keyHandler),e.classList.remove("pict-modal-visible"),this._modal._activeModals=this._modal._activeModals.filter(function(t){return t.element!==e}),this._modal._activeModals.length>0){var i=this._modal._activeModals[this._modal._activeModals.length-1];this._modal._overlay.updateClickHandler(this._modal.options.OverlayClickDismisses?i.dismiss:null)}this._modal._overlay.hide(),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},220),"function"==typeof n.onClose&&n.onClose(t),o(t)}}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?"":e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}])}();t.exports=n},{}],75:[function(e,t,o){t.exports={AutoInitialize:!0,AutoRender:!1,AutoSolveWithApp:!1,ViewIdentifier:"Pict-Section-Modal",OverlayClickDismisses:!0,DefaultConfirmOptions:{title:"Confirm",confirmLabel:"OK",cancelLabel:"Cancel",dangerous:!1,unbounded:!1},DefaultDoubleConfirmOptions:{title:"Are you sure?",confirmLabel:"Confirm",cancelLabel:"Cancel",phrasePrompt:'Type "{phrase}" to confirm:',confirmPhrase:"",unbounded:!1},DefaultModalOptions:{title:"",content:"",buttons:[],closeable:!0,width:"480px",unbounded:!1},DefaultTooltipOptions:{position:"top",delay:200,maxWidth:"300px",interactive:!1},DefaultToastOptions:{type:"info",duration:3e3,position:"top-right",dismissible:!0},DefaultPanelOptions:{position:"right",width:340,minWidth:200,maxWidth:600,collapsible:!0,collapsed:!1,persist:!1,persistKey:""},Templates:[],Renderables:[],CSS:"\n/* pict-section-modal */\n.pict-modal-root\n{\n\t/* Defaults are routed through pict-provider-theme tokens so apps\n\t using the theme provider get themed modals automatically. Each\n\t var() carries its original hex as the fallback so apps that don't\n\t install pict-provider-theme look exactly as before. Apps may\n\t still override any --pict-modal-* var directly to layer over the\n\t theme-driven defaults. */\n\n\t/* Overlay */\n\t--pict-modal-overlay-bg: rgba(0, 0, 0, 0.5);\n\n\t/* Dialog */\n\t--pict-modal-bg: var(--theme-color-background-panel, #ffffff);\n\t--pict-modal-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-border: var(--theme-color-border-default, #e0e0e0);\n\t--pict-modal-border-radius: 8px;\n\t--pict-modal-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);\n\t--pict-modal-header-bg: var(--theme-color-background-secondary, #f5f5f5);\n\t--pict-modal-header-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-header-border: var(--theme-color-border-default, #e0e0e0);\n\n\t/* Buttons */\n\t--pict-modal-btn-bg: var(--theme-color-background-secondary, #e0e0e0);\n\t--pict-modal-btn-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-btn-hover-bg: var(--theme-color-background-hover, #d0d0d0);\n\t--pict-modal-btn-primary-bg: var(--theme-color-brand-primary, #2563eb);\n\t--pict-modal-btn-primary-fg: var(--theme-color-text-on-brand, #ffffff);\n\t--pict-modal-btn-primary-hover-bg:var(--theme-color-brand-primary-hover,#1d4ed8);\n\t--pict-modal-btn-danger-bg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-btn-danger-fg: var(--theme-color-text-on-brand, #ffffff);\n\t--pict-modal-btn-danger-hover-bg: var(--theme-color-status-error, #b91c1c);\n\t--pict-modal-btn-border-radius: 4px;\n\n\t/* Toast */\n\t--pict-modal-toast-bg: var(--theme-color-background-panel, #333333);\n\t--pict-modal-toast-fg: var(--theme-color-text-primary, #ffffff);\n\t--pict-modal-toast-success-bg: var(--theme-color-status-success, #16a34a);\n\t--pict-modal-toast-warning-bg: var(--theme-color-status-warning, #d97706);\n\t--pict-modal-toast-error-bg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-toast-info-bg: var(--theme-color-status-info, #2563eb);\n\t--pict-modal-toast-border-radius: 6px;\n\t--pict-modal-toast-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n\n\t/* Tooltip */\n\t--pict-modal-tooltip-bg: var(--theme-color-background-tertiary,#1a1a1a);\n\t--pict-modal-tooltip-fg: var(--theme-color-text-primary, #ffffff);\n\t--pict-modal-tooltip-border-radius:4px;\n\t--pict-modal-tooltip-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n\t/* Dropdown */\n\t--pict-modal-dropdown-bg: var(--theme-color-background-panel, #ffffff);\n\t--pict-modal-dropdown-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-dropdown-border: var(--theme-color-border-default, #e0e0e0);\n\t--pict-modal-dropdown-border-radius: 6px;\n\t--pict-modal-dropdown-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);\n\t--pict-modal-dropdown-item-hover-bg: var(--theme-color-background-hover, rgba(37, 99, 235, 0.10));\n\t--pict-modal-dropdown-item-hover-fg: var(--theme-color-text-primary, #1a1a1a);\n\t--pict-modal-dropdown-item-disabled-fg: var(--theme-color-text-muted, #9aa0a6);\n\t--pict-modal-dropdown-separator: var(--theme-color-border-light, #e8e8e8);\n\t--pict-modal-dropdown-header-fg: var(--theme-color-text-secondary, #6b7280);\n\t--pict-modal-dropdown-danger-fg: var(--theme-color-status-error, #dc2626);\n\t--pict-modal-dropdown-primary-fg: var(--theme-color-brand-primary, #2563eb);\n\n\t/* Typography */\n\t--pict-modal-font-family: var(--theme-typography-family-sans, system-ui, -apple-system, sans-serif);\n\t--pict-modal-font-size: 14px;\n\t--pict-modal-title-font-size: 16px;\n\n\t/* Animation */\n\t--pict-modal-transition-duration: 200ms;\n}\n\n/* Overlay */\n.pict-modal-overlay\n{\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 1000;\n\tbackground: var(--pict-modal-overlay-bg);\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-overlay.pict-modal-visible\n{\n\topacity: 1;\n}\n\n/* Dialog */\n.pict-modal-dialog\n{\n\tposition: fixed;\n\tz-index: 1010;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%) translateY(-20px);\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n\n\tmax-width: 90vw;\n\tmax-height: 90vh;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tbackground: var(--pict-modal-bg);\n\tcolor: var(--pict-modal-fg);\n\tborder: 1px solid var(--pict-modal-border);\n\tborder-radius: var(--pict-modal-border-radius);\n\tbox-shadow: var(--pict-modal-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n}\n\n.pict-modal-dialog.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translate(-50%, -50%) translateY(0);\n}\n\n/* Unbounded modifier — lets callers opt out of the 90vh/90vw viewport cap.\n Use with caution: content taller than the viewport will push buttons\n below the fold. */\n.pict-modal-dialog.pict-modal-dialog--unbounded\n{\n\tmax-height: none;\n\tmax-width: none;\n}\n\n.pict-modal-dialog-header\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 12px 16px;\n\tbackground: var(--pict-modal-header-bg);\n\tcolor: var(--pict-modal-header-fg);\n\tborder-bottom: 1px solid var(--pict-modal-header-border);\n\tborder-radius: var(--pict-modal-border-radius) var(--pict-modal-border-radius) 0 0;\n}\n\n.pict-modal-dialog-title\n{\n\tfont-size: var(--pict-modal-title-font-size);\n\tfont-weight: 600;\n}\n\n.pict-modal-dialog-close\n{\n\tbackground: none;\n\tborder: none;\n\tfont-size: 20px;\n\tcursor: pointer;\n\tcolor: var(--pict-modal-fg);\n\tpadding: 0 4px;\n\tline-height: 1;\n\topacity: 0.6;\n}\n\n.pict-modal-dialog-close:hover\n{\n\topacity: 1;\n}\n\n.pict-modal-dialog-body\n{\n\tpadding: 16px;\n\toverflow-y: auto;\n\tflex: 1;\n}\n\n.pict-modal-dialog-footer\n{\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tpadding: 12px 16px;\n\tborder-top: 1px solid var(--pict-modal-border);\n}\n\n/* Buttons */\n.pict-modal-btn\n{\n\tpadding: 8px 16px;\n\tborder: none;\n\tborder-radius: var(--pict-modal-btn-border-radius);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tcursor: pointer;\n\tbackground: var(--pict-modal-btn-bg);\n\tcolor: var(--pict-modal-btn-fg);\n\ttransition: background var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-btn:hover\n{\n\tbackground: var(--pict-modal-btn-hover-bg);\n}\n\n.pict-modal-btn:disabled\n{\n\topacity: 0.5;\n\tcursor: not-allowed;\n}\n\n.pict-modal-btn--primary\n{\n\tbackground: var(--pict-modal-btn-primary-bg);\n\tcolor: var(--pict-modal-btn-primary-fg);\n}\n\n.pict-modal-btn--primary:hover\n{\n\tbackground: var(--pict-modal-btn-primary-hover-bg);\n}\n\n.pict-modal-btn--danger\n{\n\tbackground: var(--pict-modal-btn-danger-bg);\n\tcolor: var(--pict-modal-btn-danger-fg);\n}\n\n.pict-modal-btn--danger:hover\n{\n\tbackground: var(--pict-modal-btn-danger-hover-bg);\n}\n\n/* Double confirm input */\n.pict-modal-confirm-input\n{\n\twidth: 100%;\n\tpadding: 8px 12px;\n\tmargin-top: 12px;\n\tborder: 1px solid var(--pict-modal-border);\n\tborder-radius: var(--pict-modal-btn-border-radius);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tbox-sizing: border-box;\n}\n\n.pict-modal-confirm-input:focus\n{\n\toutline: 2px solid var(--pict-modal-btn-primary-bg);\n\toutline-offset: -1px;\n}\n\n.pict-modal-confirm-prompt\n{\n\tmargin-top: 12px;\n\tfont-size: 13px;\n\tcolor: var(--pict-modal-fg);\n\topacity: 0.7;\n}\n\n/* Toast container */\n.pict-modal-toast-container\n{\n\tposition: fixed;\n\tz-index: 1030;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tpointer-events: none;\n\tmax-width: 400px;\n}\n\n.pict-modal-toast-container--top-right\n{\n\ttop: 16px;\n\tright: 16px;\n}\n\n.pict-modal-toast-container--top-left\n{\n\ttop: 16px;\n\tleft: 16px;\n}\n\n.pict-modal-toast-container--bottom-right\n{\n\tbottom: 16px;\n\tright: 16px;\n}\n\n.pict-modal-toast-container--bottom-left\n{\n\tbottom: 16px;\n\tleft: 16px;\n}\n\n.pict-modal-toast-container--top-center\n{\n\ttop: 16px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.pict-modal-toast-container--bottom-center\n{\n\tbottom: 16px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n/* Toast */\n.pict-modal-toast\n{\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tpadding: 12px 16px;\n\tborder-radius: var(--pict-modal-toast-border-radius);\n\tbox-shadow: var(--pict-modal-toast-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tbackground: var(--pict-modal-toast-bg);\n\tcolor: var(--pict-modal-toast-fg);\n\tpointer-events: auto;\n\topacity: 0;\n\ttransform: translateX(100%);\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-toast.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translateX(0);\n}\n\n.pict-modal-toast.pict-modal-toast-exit\n{\n\topacity: 0;\n\ttransform: translateX(100%);\n}\n\n.pict-modal-toast--info\n{\n\tbackground: var(--pict-modal-toast-info-bg);\n}\n\n.pict-modal-toast--success\n{\n\tbackground: var(--pict-modal-toast-success-bg);\n}\n\n.pict-modal-toast--warning\n{\n\tbackground: var(--pict-modal-toast-warning-bg);\n}\n\n.pict-modal-toast--error\n{\n\tbackground: var(--pict-modal-toast-error-bg);\n}\n\n.pict-modal-toast-message\n{\n\tflex: 1;\n}\n\n.pict-modal-toast-dismiss\n{\n\tbackground: none;\n\tborder: none;\n\tcolor: inherit;\n\tfont-size: 18px;\n\tcursor: pointer;\n\tpadding: 0 2px;\n\tline-height: 1;\n\topacity: 0.7;\n}\n\n.pict-modal-toast-dismiss:hover\n{\n\topacity: 1;\n}\n\n/* Tooltip */\n.pict-modal-tooltip\n{\n\tposition: fixed;\n\tz-index: 1020;\n\tpadding: 6px 10px;\n\tborder-radius: var(--pict-modal-tooltip-border-radius);\n\tbox-shadow: var(--pict-modal-tooltip-shadow);\n\tbackground: var(--pict-modal-tooltip-bg);\n\tcolor: var(--pict-modal-tooltip-fg);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: 13px;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity var(--pict-modal-transition-duration) ease;\n\twhite-space: normal;\n\tword-wrap: break-word;\n}\n\n.pict-modal-tooltip.pict-modal-tooltip-interactive\n{\n\tpointer-events: auto;\n}\n\n.pict-modal-tooltip.pict-modal-visible\n{\n\topacity: 1;\n}\n\n.pict-modal-tooltip-arrow\n{\n\tposition: absolute;\n\twidth: 8px;\n\theight: 8px;\n\tbackground: var(--pict-modal-tooltip-bg);\n\ttransform: rotate(45deg);\n}\n\n.pict-modal-tooltip--top .pict-modal-tooltip-arrow\n{\n\tbottom: -4px;\n\tleft: 50%;\n\tmargin-left: -4px;\n}\n\n.pict-modal-tooltip--bottom .pict-modal-tooltip-arrow\n{\n\ttop: -4px;\n\tleft: 50%;\n\tmargin-left: -4px;\n}\n\n.pict-modal-tooltip--left .pict-modal-tooltip-arrow\n{\n\tright: -4px;\n\ttop: 50%;\n\tmargin-top: -4px;\n}\n\n.pict-modal-tooltip--right .pict-modal-tooltip-arrow\n{\n\tleft: -4px;\n\ttop: 50%;\n\tmargin-top: -4px;\n}\n\n/* ── Dropdown ─────────────────────────────────────────────────────────\n Anchor-positioned menu (no overlay). Used for nav menus and\n \"split button\" addenda — see Pict-Modal-Dropdown.js.\n*/\n.pict-modal-dropdown\n{\n\tposition: fixed;\n\tz-index: 1025;\n\tmin-width: 160px;\n\tmax-width: 360px;\n\tmax-height: 60vh;\n\toverflow-y: auto;\n\tbackground: var(--pict-modal-dropdown-bg);\n\tcolor: var(--pict-modal-dropdown-fg);\n\tborder: 1px solid var(--pict-modal-dropdown-border);\n\tborder-radius: var(--pict-modal-dropdown-border-radius);\n\tbox-shadow: var(--pict-modal-dropdown-shadow);\n\tfont-family: var(--pict-modal-font-family);\n\tfont-size: var(--pict-modal-font-size);\n\tpadding: 4px 0;\n\topacity: 0;\n\ttransform: translateY(-4px);\n\ttransition: opacity var(--pict-modal-transition-duration) ease,\n\t transform var(--pict-modal-transition-duration) ease;\n}\n\n.pict-modal-dropdown.pict-modal-dropdown--above { transform: translateY(4px); }\n\n.pict-modal-dropdown.pict-modal-visible\n{\n\topacity: 1;\n\ttransform: translateY(0);\n}\n\n.pict-modal-dropdown-item\n{\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 7px 14px;\n\tcursor: pointer;\n\tuser-select: none;\n\tcolor: inherit;\n\toutline: none;\n}\n\n.pict-modal-dropdown-item:hover,\n.pict-modal-dropdown-item:focus\n{\n\tbackground: var(--pict-modal-dropdown-item-hover-bg);\n\tcolor: var(--pict-modal-dropdown-item-hover-fg);\n}\n\n.pict-modal-dropdown-item--disabled\n{\n\tcursor: not-allowed;\n\tcolor: var(--pict-modal-dropdown-item-disabled-fg);\n}\n\n.pict-modal-dropdown-item--disabled:hover,\n.pict-modal-dropdown-item--disabled:focus\n{\n\tbackground: transparent;\n\tcolor: var(--pict-modal-dropdown-item-disabled-fg);\n}\n\n.pict-modal-dropdown-item--primary { color: var(--pict-modal-dropdown-primary-fg); }\n.pict-modal-dropdown-item--danger { color: var(--pict-modal-dropdown-danger-fg); }\n\n.pict-modal-dropdown-item-icon\n{\n\tflex: 0 0 auto;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.pict-modal-dropdown-item-icon svg { width: 100%; height: 100%; display: block; }\n\n.pict-modal-dropdown-item-label { flex: 1 1 auto; min-width: 0; }\n\n.pict-modal-dropdown-item-hint\n{\n\tflex: 0 0 auto;\n\tfont-size: 11px;\n\topacity: 0.6;\n\tmargin-left: 12px;\n}\n\n.pict-modal-dropdown-separator\n{\n\theight: 1px;\n\tbackground: var(--pict-modal-dropdown-separator);\n\tmargin: 4px 0;\n}\n\n.pict-modal-dropdown-header\n{\n\tpadding: 6px 14px 2px;\n\tfont-size: 11px;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.04em;\n\tcolor: var(--pict-modal-dropdown-header-fg);\n}\n\n/* ── Resizable / Collapsible Panels ──────────────── */\n.pict-panel\n{\n\tposition: relative;\n\ttransition: width 0.2s ease;\n\tflex-shrink: 0;\n\toverflow: visible;\n}\n.pict-panel-collapsed\n{\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\toverflow: visible;\n}\n.pict-panel-collapsed > *:not(.pict-panel-edge)\n{\n\tdisplay: none;\n}\n\n/* Edge container — zero-width flex sibling of the panel.\n Sits next to the panel in the flex layout; children\n use absolute positioning to overlap the panel boundary. */\n.pict-panel-edge\n{\n\tposition: relative;\n\twidth: 0;\n\tflex-shrink: 0;\n\tz-index: 50;\n\toverflow: visible;\n}\n\n/* Resize handle — thin strip on the panel boundary */\n.pict-panel-resize\n{\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\twidth: 4px;\n\tcursor: col-resize;\n\tbackground: transparent;\n\ttransition: background 0.15s, width 0.15s;\n}\n.pict-panel-edge-right .pict-panel-resize\n{\n\tright: 0;\n\tborder-right: 1px solid var(--pict-panel-border, #DDD6CA);\n}\n.pict-panel-edge-left .pict-panel-resize\n{\n\tleft: 0;\n\tborder-left: 1px solid var(--pict-panel-border, #DDD6CA);\n}\n.pict-panel-resize:hover,\n.pict-panel-edge:hover .pict-panel-resize\n{\n\twidth: 5px;\n\tbackground: var(--pict-panel-accent, #2E7D74);\n\topacity: 0.5;\n}\n.pict-panel-resize.dragging\n{\n\twidth: 5px;\n\tbackground: var(--pict-panel-accent, #2E7D74);\n\topacity: 1;\n\ttransition: none;\n}\n.pict-panel-edge-collapsed .pict-panel-resize\n{\n\tdisplay: none;\n}\n\n/* Collapse tab — tucked sliver at rest, slides out on hover */\n.pict-panel-tab\n{\n\tposition: absolute;\n\ttop: 8px;\n\twidth: 8px;\n\theight: 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n\tbackground: var(--pict-panel-border, #DDD6CA);\n\tborder: 1px solid var(--pict-panel-border, #DDD6CA);\n\tcursor: pointer;\n\tcolor: var(--pict-panel-fg, #8A7F72);\n\tfont-size: 10px;\n\tline-height: 1;\n\topacity: 0.5;\n\ttransition: opacity 0.25s, width 0.2s ease, height 0.2s ease, left 0.2s ease, right 0.2s ease, background 0.2s;\n\tz-index: 51;\n}\n.pict-panel-edge:hover .pict-panel-tab,\n.pict-panel-tab:hover\n{\n\twidth: 20px;\n\theight: 32px;\n\topacity: 1;\n\toverflow: visible;\n\tbackground: var(--pict-panel-bg, #FAF8F4);\n}\n/* Right panel: tab to the left of the edge */\n.pict-panel-edge-right .pict-panel-tab\n{\n\tright: 0;\n\tborder-right: none;\n\tborder-radius: 4px 0 0 4px;\n}\n.pict-panel-edge-right:hover .pict-panel-tab,\n.pict-panel-edge-right .pict-panel-tab:hover\n{\n\tright: 0;\n}\n/* Left panel: tab to the right of the edge */\n.pict-panel-edge-left .pict-panel-tab\n{\n\tleft: 0;\n\tborder-left: none;\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-panel-edge-left:hover .pict-panel-tab,\n.pict-panel-edge-left .pict-panel-tab:hover\n{\n\tleft: 0;\n}\n/* When collapsed — more visible */\n.pict-panel-edge-collapsed .pict-panel-tab\n{\n\twidth: 10px;\n\theight: 28px;\n\topacity: 0.6;\n}\n.pict-panel-edge-collapsed .pict-panel-tab:hover,\n.pict-panel-edge-collapsed:hover .pict-panel-tab\n{\n\twidth: 20px;\n\theight: 32px;\n\topacity: 1;\n\toverflow: visible;\n\tbackground: var(--pict-panel-bg, #FAF8F4);\n}\n\n/* ───────────────────────────────────────────────────────────────────\n * Pict-Modal-Shell — viewport-managing layout for top / right /\n * bottom / left panels around a center.\n * ───────────────────────────────────────────────────────────────── */\n\n.pict-modal-shell-host { display: block; height: 100%; min-height: 0; }\n.pict-modal-shell\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\tmin-height: 0;\n\tposition: relative;\n\tcolor: var(--pict-modal-fg, var(--theme-color-text-primary, #1a1a1a));\n\tbackground: var(--theme-color-background-primary, transparent);\n}\n.pict-modal-shell-row { display: flex; min-width: 0; min-height: 0; }\n/* \"First added = at the edge\" convention is held by reversing the\n flex-direction on the bottom row + right side. That way, for ALL\n four sides, calling addPanel() N times stacks panel #1 against\n the viewport edge, panel #2 just inside it, panel #3 further in,\n and so on. Without these reverses, top + left worked that way but\n bottom + right inverted (first-added at content side, last-added\n at edge), which surprised callers. */\n.pict-modal-shell-row-top { flex: 0 0 auto; flex-direction: column; }\n.pict-modal-shell-row-bottom { flex: 0 0 auto; flex-direction: column-reverse; }\n.pict-modal-shell-row-middle\n{\n\tflex: 1 1 0;\n\tflex-direction: row;\n\tmin-height: 0;\n\tposition: relative;\n}\n.pict-modal-shell-side\n{\n\tdisplay: flex;\n\tflex: 0 0 auto;\n\tmin-height: 0;\n}\n.pict-modal-shell-side-left { flex-direction: row; }\n.pict-modal-shell-side-right { flex-direction: row-reverse; }\n.pict-modal-shell-center\n{\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmin-height: 0;\n\toverflow: auto;\n\tposition: relative;\n}\n.pict-modal-shell-center-content\n{\n\tmin-height: 100%;\n}\n/* Center column gains this class when at least one Scope:'center'\n panel is added. The center stops scrolling internally — that job\n moves to the content destination — and switches to a vertical flex\n so the destination and any inner panels stack cleanly. */\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\toverflow: hidden;\n}\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel > .pict-modal-shell-center-content\n{\n\tflex: 1 1 0;\n\tmin-height: 0;\n\toverflow: auto;\n}\n.pict-modal-shell-center.pict-modal-shell-center-with-inner-panel > .pict-modal-shell-panel\n{\n\tflex: 0 0 auto;\n\twidth: 100%;\n}\n\n/* Panels — base */\n.pict-modal-shell-panel\n{\n\t/* How far the collapse-tab's panel-bg \"merge bar\" extends INTO\n\t the panel past the tab's geometric edge. Painted via box-shadow\n\t on the tab (no DOM impact), it masks any 1px theme border on an\n\t inner element, content padding offset, or resize-handle hover\n\t bleed in the strip between the tab's panel-facing edge and the\n\t first real pixel of panel content. Consumers can bump this for\n\t themes with thicker (2+px) inner borders. */\n\t--pict-modal-collapse-tab-merge: 2px;\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tbox-sizing: border-box;\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n\tcolor: inherit;\n\tmin-width: 0;\n\tmin-height: 0;\n\ttransition: width 140ms ease, height 140ms ease;\n}\n.pict-modal-shell-panel-content\n{\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\tmin-height: 0;\n\toverflow: auto;\n}\n.pict-modal-shell-panel-content-inner\n{\n\tmin-height: 100%;\n}\n/* Panel boundary — fixed-mode panels get a hairline border for explicit\n demarcation. Collapsible / resizable panels DROP the boundary border\n (background contrast separates them from the center anyway) so the\n collapse tab can pull out cleanly without a hairline cutting across\n it. The host stylesheet still gets full control via the panel's own\n background. */\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-top { border-bottom: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-bottom { border-top: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-left { border-right: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n.pict-modal-shell-panel-mode-fixed.pict-modal-shell-panel-right { border-left: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #e0e0e0)); }\n\n/* Resize handle — absolute on the inner edge of each panel. */\n.pict-modal-shell-panel-resize-handle\n{\n\tposition: absolute;\n\tbackground: transparent;\n\tz-index: 5;\n\ttransition: background-color 120ms ease;\n}\n/* Resize handle hover — use the active brand's mode-aware primary\n color (set by pict-section-theme's Brand provider as\n --brand-color-primary-mode) so the resize affordance picks up the\n app's wordmark color. Falls back to the theme's brand-primary\n token if no brand is registered. */\n.pict-modal-shell-panel-resize-handle:hover\n{\n\tbackground: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\topacity: 0.4;\n}\n.pict-modal-shell-panel-left .pict-modal-shell-panel-resize-handle { right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }\n.pict-modal-shell-panel-right .pict-modal-shell-panel-resize-handle { left: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }\n.pict-modal-shell-panel-top .pict-modal-shell-panel-resize-handle { bottom:-3px; left: 0; right: 0; height: 6px; cursor: row-resize; }\n.pict-modal-shell-panel-bottom .pict-modal-shell-panel-resize-handle { top: -3px; left: 0; right: 0; height: 6px; cursor: row-resize; }\n\n/* Collapse tab — slim sliver flush on the panel's OUTER boundary\n (where the resize handle sits), modelled on retold-content-system's\n sidebar tab. At rest it's a 6×28 px sliver; hover expands to\n 18×36 px without overlapping the panel's own content. The tab is\n positioned with its center on the boundary so half pokes into the\n adjacent area — the only place we can safely take over without\n stepping on app UI inside the panel. Title text only renders in the\n collapsed state where there's room for it. */\n.pict-modal-shell-panel-collapse-tab\n{\n\tposition: absolute;\n\tdisplay: flex; /* not inline-flex — avoids baseline alignment quirks */\n\talign-items: center;\n\tjustify-content: center;\n\toverflow: hidden;\n\tborder: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #d0d7de));\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n\tcolor: var(--theme-color-text-muted, #6b7280);\n\tfont: inherit;\n\tfont-size: 10px;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcursor: pointer;\n\tz-index: 50;\n\topacity: 0.55;\n\tpadding: 0;\n\tbox-sizing: border-box;\n\tline-height: 0; /* keep child boxes from inflating around the rotated chevron */\n\t/* Geometry (width/height/right/left) is intentionally NOT animated.\n\t Sliding the tab's outer edge inward on hover-out makes it look like\n\t the tab is \"sliding into\" the panel content — weird visual.\n\t Snapping the size change instead, and animating only the appearance\n\t (opacity/color/shadow), gives a clean fade-in/out with no boundary\n\t weirdness. */\n\ttransition: opacity 160ms ease,\n\t background-color 160ms ease, color 160ms ease,\n\t border-color 160ms ease, box-shadow 160ms ease;\n}\n/* Hover state pulls accent color from the active brand (mode-aware,\n so it's legible in both light + dark) with theme brand-primary as\n fallback. The whole point of brand colors is that they show up\n across the app's chrome. */\n.pict-modal-shell-panel-collapse-tab:hover,\n.pict-modal-shell-panel:hover > .pict-modal-shell-panel-collapse-tab\n{\n\topacity: 1;\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n/* Drop shadow casts AWAY from the panel so the tab feels pulled out\n (extension of the panel) rather than floating across the boundary.\n The first shadow value is the merge-bar (panel-bg colored, offset\n INTO the panel) which has to be repeated here so the hover override\n doesn't drop it. */\n.pict-modal-shell-panel-left:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\tcalc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t3px 0 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-right:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\tvar(--pict-modal-collapse-tab-merge) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t-3px 0 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-top:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\t0 calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t0 3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbox-shadow:\n\t\t0 var(--pict-modal-collapse-tab-merge) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff)),\n\t\t0 -3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n\n/* Side panels: slim VERTICAL sliver pulled OUT of the panel's outer\n boundary like a drawer tab. The geometric inner edge sits 1px\n INSIDE the panel boundary, and the merge-bar box-shadow paints\n another --pict-modal-collapse-tab-merge px of panel-bg color past\n it INTO the panel — together they mask any 1px theme border on an\n inner element, content padding offset, or resize-handle hover bleed\n that would otherwise leak between the tab and the panel content.\n The tab grows OUTWARD only on hover; the inner edge stays put so\n the tab always looks like an extension of the panel rather than a\n floating button. Border-left is removed for left panels (and\n border-right for right panels) so the panel-facing edge is open. */\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab\n{\n\tright: -5px; top: 14px; width: 6px; height: 28px;\n\tborder-radius: 0 4px 4px 0;\n\tborder-left: 0;\n\tbox-shadow: calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab\n{\n\tleft: -5px; top: 14px; width: 6px; height: 28px;\n\tborder-radius: 4px 0 0 4px;\n\tborder-right: 0;\n\tbox-shadow: var(--pict-modal-collapse-tab-merge) 0 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n/* Hover: same inner anchor (panelRight - 1), tab grows outward to\n width 18 → right: -17px. Top + height grow downward only (top\n stays, height extends so the tab visually 'drops' the chevron\n into view). */\n.pict-modal-shell-panel-left:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-left > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 18px; height: 36px; right: -17px;\n}\n.pict-modal-shell-panel-right:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 18px; height: 36px; left: -17px;\n}\n\n/* Top / bottom panels: slim HORIZONTAL sliver pulled OUT of the\n horizontal boundary, anchored 14 px in from the right. Same\n inner-edge-anchored + merge-bar pattern as the side panels — the\n merge-bar offsets vertically instead of horizontally. */\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab\n{\n\tbottom: -5px; right: 14px; width: 28px; height: 6px;\n\tborder-radius: 0 0 4px 4px;\n\tborder-top: 0;\n\tbox-shadow: 0 calc(-1 * var(--pict-modal-collapse-tab-merge)) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab\n{\n\ttop: -5px; right: 14px; width: 28px; height: 6px;\n\tborder-radius: 4px 4px 0 0;\n\tborder-bottom: 0;\n\tbox-shadow: 0 var(--pict-modal-collapse-tab-merge) 0 0 var(--pict-modal-bg, var(--theme-color-background-panel, #ffffff));\n}\n.pict-modal-shell-panel-top:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 36px; height: 18px; bottom: -17px;\n}\n.pict-modal-shell-panel-bottom:hover > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab:hover\n{\n\twidth: 36px; height: 18px; top: -17px;\n}\n\n.pict-modal-shell-panel-collapse-tab-title { display: none; white-space: nowrap; }\n\n/* Auto-generated chevron glyph inside the tab — only visible once the\n tab is wide / tall enough to show it (i.e. hover state, or when the\n panel is collapsed). Direction follows side + state.\n Sized 5×5 (down from 6) so even with rotation the visual stays\n well clear of the tab's overflow:hidden bounds at 18×36 hover and\n the 24px collapsed tab strip width. flex-shrink:0 ensures the\n pseudo never collapses to zero in tight tab dimensions. */\n.pict-modal-shell-panel-collapse-tab::before\n{\n\tcontent: '';\n\tdisplay: block;\n\twidth: 5px; height: 5px;\n\tflex-shrink: 0;\n\topacity: 0;\n\tborder-right: 1.5px solid currentColor;\n\tborder-bottom: 1.5px solid currentColor;\n\ttransform: rotate(135deg);\n\ttransform-origin: center center;\n\ttransition: opacity 160ms ease, transform 160ms ease;\n}\n.pict-modal-shell-panel:hover > .pict-modal-shell-panel-collapse-tab::before,\n.pict-modal-shell-panel-collapse-tab:hover::before,\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before\n{\n\topacity: 1;\n}\n.pict-modal-shell-panel-right > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-45deg); }\n.pict-modal-shell-panel-top > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-135deg); }\n.pict-modal-shell-panel-bottom > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(45deg); }\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-45deg); }\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(135deg); }\n.pict-modal-shell-panel-top.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(45deg); }\n.pict-modal-shell-panel-bottom.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before { transform: rotate(-135deg); }\n\n/* Collapsed state — content disappears, only the collapse tab remains. */\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-content\n{\n\tdisplay: none;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-resize-handle\n{\n\tdisplay: none;\n}\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed\n{\n\t/* When collapsed, side panels rotate the title for vertical reading. */\n\toverflow: hidden;\n}\n/* When collapsed: the entire panel becomes the tab strip — full width\n for sides, full height for top/bottom — with the title visible\n vertically (sides) or horizontally (top/bottom). The little sliver\n tab on the boundary disappears (we don't need it anymore — clicking\n anywhere on the panel toggles it back open). */\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-top.pict-modal-shell-panel-collapsed,\n.pict-modal-shell-panel-bottom.pict-modal-shell-panel-collapsed\n{\n\toverflow: hidden;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\t/* Promote the tab to FILL the collapsed panel (not just hug its\n\t content) so the centered chevron + title group sits in the middle\n\t of the panel. Without explicit width/height: 100%, the position:\n\t absolute element shrinks to its natural content size and the\n\t group ends up flush at the top of the panel — where the chevron\n\t gets clipped by the topbar. */\n\tposition: absolute !important;\n\ttop: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;\n\twidth: 100% !important;\n\theight: 100% !important;\n\tborder: 0;\n\tborder-radius: 0;\n\tbackground: transparent;\n\topacity: 0.85;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tpadding: 12px 4px; /* keeps chevron + title clear of edges */\n\tbox-shadow: none;\n\tcolor: var(--theme-color-text-muted, #6b7280);\n\tbox-sizing: border-box;\n\toverflow: hidden;\n}\n.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab:hover\n{\n\tbackground: var(--theme-color-background-hover, var(--pict-modal-bg, #fff));\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbox-shadow: none;\n}\n/* Side panels (collapsed): rotate the title for vertical reading. */\n.pict-modal-shell-panel-left.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-right.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\twriting-mode: vertical-rl;\n\ttext-orientation: mixed;\n}\n.pict-modal-shell-panel-collapsed .pict-modal-shell-panel-collapse-tab-title\n{\n\tdisplay: inline;\n}\n\n/* Hidden panels — when Hidden:true is passed to addPanel, the collapsed\n state has zero footprint: no collapse tab (the tab is never built),\n the panel root is display:none, and the resize handle vanishes. The\n only path to the open state is a programmatic expand()/toggle() from\n somewhere else in the app (e.g. a topbar gear button). When expanded,\n the panel renders normally — so resize/drag handles continue to work\n while the panel is open. */\n.pict-modal-shell-panel-hidden.pict-modal-shell-panel-collapsed\n{\n\tdisplay: none !important;\n}\n\n/* Overlay panels — float over the middle row instead of taking layout\n space. The overlay layer is positioned absolutely inside the middle\n row; individual overlay panels stack with positive z-index. */\n.pict-modal-shell-overlay-layer\n{\n\tposition: absolute;\n\tinset: 0;\n\tpointer-events: none;\n\tz-index: 10;\n}\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel\n{\n\tpointer-events: auto;\n\tposition: absolute;\n\tbox-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);\n}\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-left { left: 0; top: 0; bottom: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-right { right: 0; top: 0; bottom: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-top { top: 0; left: 0; right: 0; }\n.pict-modal-shell-overlay-layer .pict-modal-shell-panel-bottom { bottom: 0; left: 0; right: 0; }\n\n/* ─────────────────────────────────────────────────────────────────\n Responsive drawer mode — .pict-modal-shell-drawer-active toggles\n onto the middle row when any panel with ResponsiveDrawer crosses\n below its breakpoint. Flips the row's flex-direction from row to\n column, stacking side panels above the center and stretching them\n to full width. Each opted-in panel itself gets the\n .pict-modal-shell-panel-drawer class so per-panel rules below\n target only the drawer-mode panels (right + non-drawer panels in\n the same row are unaffected). The drawer height is read from a\n per-panel --pict-modal-drawer-height CSS variable (default\n 33vh, set in JS from the DrawerHeight option).\n ───────────────────────────────────────────────────────────────── */\n.pict-modal-shell-row-middle.pict-modal-shell-drawer-active\n{\n\tflex-direction: column;\n\t/* The drawer tab lives outside the drawer's bottom edge — ancestor\n\t chain MUST allow it to escape clip. */\n\toverflow: visible;\n}\n.pict-modal-shell-row-middle.pict-modal-shell-drawer-active .pict-modal-shell-side\n{\n\t/* Side stacks stretch full-width and lay out their panels as a\n\t horizontal row of stacked drawers (so two drawers from the same\n\t side don't end up overlapping). overflow: visible so the\n\t per-panel tab can extend below the side stack into the workspace. */\n\twidth: 100% !important;\n\tflex-direction: column;\n\toverflow: visible;\n}\n/* The drawer-tagged panel itself: kill the inline width set by\n _applySize (we override with !important since the inline style has\n higher specificity than a class selector), then size by height\n from the CSS variable. Resize handle is hidden in drawer mode\n because horizontal dragging doesn't translate to vertical sizing\n and the user already has the collapse tab to dismiss / restore.\n\n padding-bottom reserves an 18px strip at the bottom of the panel\n for the tab. The tab sits INSIDE the drawer's footprint — never\n below it — so the workspace header below the drawer is never in\n the same vertical band as the tab. (Previously the tab hung\n below the drawer's bottom edge into the workspace's top padding;\n that made the tab visually compete with the workspace header,\n even when the tab box-model bounds technically cleared the\n header.) box-sizing: border-box so the padding eats from the\n 33vh, not adding to it. */\n.pict-modal-shell-panel-drawer\n{\n\twidth: 100% !important;\n\tmax-width: 100% !important;\n\theight: var(--pict-modal-drawer-height, 33vh);\n\ttransition: height 140ms ease;\n\tpadding-bottom: 18px;\n\tbox-sizing: border-box;\n\toverflow: visible !important;\n\t/* Clip the panel bg to its CONTENT area only — the 18px\n\t padding-bottom reserve (where the tab lives) becomes\n\t transparent, so the middle row's primary background shows\n\t through. Without this the reserve would render with the\n\t panel's chrome bg, creating a visible \"strip\" between the\n\t drawer content above and the workspace below — the tab would\n\t look like it's sitting on its own miscoloured band rather\n\t than at the seam between drawer and workspace. */\n\tbackground-clip: content-box;\n}\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed\n{\n\t/* Collapsed = \"just the tab strip is visible\". 18px matches the\n\t panel's tab reserve so the height is consistent across states.\n\t When this is 0 the tab would have nowhere to render and the\n\t user couldn't reopen the drawer. */\n\theight: 18px !important;\n\tpadding-bottom: 0 !important;\n\t/* Drop the panel's bg in collapsed state — without this the 18px\n\t strip shows the --pict-modal-bg (panel chrome) which doesn't\n\t match the workspace --theme-color-background-primary below it,\n\t creating a visible \"drawer band\" around the tab that breaks the\n\t illusion of the tab belonging to the workspace area. With\n\t transparent bg the middle row's primary background shows\n\t through, the strip blends with the workspace, and the tab pill\n\t reads as a free-floating handle. */\n\tbackground: transparent !important;\n}\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-resize-handle\n{\n\tdisplay: none;\n}\n/* The drawer's collapse tab is a horizontal pill protruding from the\n bottom of the drawer (rather than the inner edge of a side panel).\n Override the side-panel positioning rules from above so the tab\n always sits at the drawer's bottom-center seam, in both expanded\n and collapsed states. The expand-from-zero affordance: when\n collapsed (height: 0), the tab still hangs below \"where the\n drawer would be\" — a small handle the user can click to pull\n the drawer back down. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab,\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\tposition: absolute !important;\n\t/* Anchored to the panel's BOTTOM edge — the tab lives INSIDE the\n\t drawer's footprint (in the 18px reserve at the bottom), never\n\t below it into the workspace. This means the workspace below\n\t the drawer is never sharing a vertical band with the tab, so\n\t the workspace header doesn't optically compete with it.\n\t bottom: 4px aligns the tab's top edge exactly with the panel's\n\t CONTENT-AREA bottom (panel.height − padding-bottom 18px). With\n\t border-top: 0 on the tab, the seam between the drawer content\n\t above and the tab body is invisible — they share --pict-modal-bg\n\t and merge into one shape, the tab reading as a labelled\n\t extension of the drawer hanging downward. Collapsed state\n\t keeps the smaller offset (overridden below) because its panel\n\t has no padding-bottom, so the math doesn't apply. */\n\ttop: auto !important;\n\tbottom: 4px !important;\n\tleft: 50% !important;\n\tright: auto !important;\n\ttransform: translate(-50%, 0) !important;\n\twidth: 64px !important;\n\theight: 14px !important;\n\t/* CRITICAL: border-box + padding: 0 — the collapsed-state base\n\t rule inherits \"padding: 12px 4px\" (so the chevron clears the\n\t edges of a tab that fills a 24px-wide side strip). In drawer\n\t mode the tab is a 14px tall pill, NOT a strip-fill, so that\n\t 12px vertical padding would balloon the tab's outer height to\n\t ~38px and crash into the workspace header text. The chevron\n\t is centered via flex anyway. */\n\tbox-sizing: border-box !important;\n\tpadding: 0 !important;\n\t/* Rounded BOTTOM corners + no top border — the tab looks like a\n\t traditional drawer-handle/tab hanging from above. Its rounded\n\t bottom curves face the workspace (the \"open downward\" affordance\n\t for a top drawer). border-top: 0 lets the tab visually merge\n\t with whatever's directly above it inside the panel (sidebar\n\t content when expanded, the panel background when collapsed). */\n\tborder-radius: 0 0 8px 8px;\n\tborder: 1px solid var(--pict-modal-border, var(--theme-color-border-default, #cfd5dd));\n\tborder-top: 0;\n\tbackground: var(--pict-modal-bg, var(--theme-color-background-panel, #fff));\n\topacity: 0.95;\n\tz-index: 20;\n\t/* The default side-panel hover-grow values would yank the tab off\n\t to the wrong spot in drawer mode — neutralise. */\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab:hover,\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab:hover\n{\n\topacity: 1;\n\twidth: 96px !important;\n\t/* height stays at 14px — the tab is anchored with bottom, so any\n\t height growth would push the tab's TOP edge UPWARD past the\n\t space available above it. In EXPANDED state that crashes into\n\t the drawer content above; in COLLAPSED state it crashes into\n\t the topbar's brand stripes. Width-only growth (64 to 96, +50%)\n\t still gives the \"tab is reaching toward me\" affordance without\n\t the encroachment. */\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbox-shadow: 0 3px 6px -2px rgba(0, 0, 0, 0.18);\n}\n/* Collapsed-state bottom-offset override. Expanded panels have an\n 18px padding-bottom reserve, and \"bottom: 4px\" anchors the tab's\n top edge exactly at the content-area boundary (so it merges\n visually with the drawer above). Collapsed panels have\n padding-bottom: 0 and a total height of 18px — \"bottom: 4px\"\n there would put the tab's top at the panel's actual top edge,\n crashing the (border-top: 0) tab into the topbar. The smaller\n \"bottom: 2px\" keeps the 14px tab vertically centered in the 18px\n strip with 2px margins on either side. */\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab\n{\n\tbottom: 2px !important;\n}\n/* Chevron inside the tab: point UP when expanded (the drawer\n collapses UP / out of view, so the arrow indicates \"click me to\n send the drawer up\"), DOWN when collapsed (the drawer expands DOWN\n into view). Rotations come from the existing top-panel chevron\n table: rotate(-135deg) → UP arrow, rotate(45deg) → DOWN arrow. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab::before\n{\n\ttransform: rotate(-135deg) !important;\n}\n.pict-modal-shell-panel-drawer.pict-modal-shell-panel-collapsed > .pict-modal-shell-panel-collapse-tab::before\n{\n\ttransform: rotate(45deg) !important;\n}\n/* The collapse tab's existing title-text span is hidden when reduced\n to a pill — there's no horizontal room. The chevron alone reads\n correctly. */\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-title,\n.pict-modal-shell-panel-drawer > .pict-modal-shell-panel-collapse-tab .pict-modal-shell-panel-collapse-tab-icon\n{\n\tdisplay: none;\n}\n\n/* Drag-active state — disable text selection + change cursor globally\n so resize feels solid even when the cursor briefly leaves the handle. */\n.pict-modal-shell-dragging-x, .pict-modal-shell-dragging-y { user-select: none; }\n.pict-modal-shell-dragging-x * { cursor: col-resize !important; }\n.pict-modal-shell-dragging-y * { cursor: row-resize !important; }\n\n/* Per-panel resize-active state — kills the panel's collapse/expand\n width/height transition for the duration of a drag. Without this,\n every pointermove starts a fresh 140 ms transition and the resize\n visibly lags behind the cursor (\"choppy\"). With it disabled the\n panel snaps to the new size on the same frame as the pointer, which\n feels native. */\n.pict-modal-shell-panel-resizing { transition: none !important; }\n.pict-modal-shell-panel-resizing > .pict-modal-shell-panel-resize-handle\n{\n\tbackground: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\topacity: 0.5;\n}\n\n/* Panel popup-attention flash — fires when popup() is called on an\n already-open panel. Brief brand-colored inset glow so the user sees\n that their click landed even though the panel didn't change shape.\n Class is added by the shell, auto-removed after ~700 ms. */\n@keyframes pict-modal-shell-panel-flash\n{\n\t0% { box-shadow: inset 0 0 0 0 transparent; }\n\t30% { box-shadow: inset 0 0 0 3px var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)); }\n\t100% { box-shadow: inset 0 0 0 0 transparent; }\n}\n.pict-modal-shell-panel-flash\n{\n\tanimation: pict-modal-shell-panel-flash 600ms ease-out;\n}\n"}},{}],76:[function(e,t,o){var n=e("pict-view"),i=e("./Pict-Modal-Overlay.js"),r=e("./Pict-Modal-Confirm.js"),a=e("./Pict-Modal-Window.js"),l=e("./Pict-Modal-Toast.js"),s=e("./Pict-Modal-Tooltip.js"),c=e("./Pict-Modal-Panel.js"),d=e("./Pict-Modal-Dropdown.js"),p=e("./Pict-Modal-Shell.js"),h=e("./Pict-Section-Modal-DefaultConfiguration.js"),u=function(e){function t(e,o,n){var u;return _classCallCheck(this,t),(u=_callSuper(this,t,[e,Object.assign({},h,o),n]))._activeModals=[],u._activeTooltips=[],u._activeToasts=[],u._idCounter=0,u._overlay=new i(u),u._confirm=new r(u),u._window=new a(u),u._toast=new l(u),u._tooltip=new s(u),u._panel=new c(u),u._dropdown=new d(u),u._shell=new p(u),u}return _inherits(t,e),_createClass(t,[{key:"onBeforeInitialize",value:function(){return _superPropGet(t,"onBeforeInitialize",this,3)([]),"undefined"!=typeof document&&document.body&&(document.body.classList.contains("pict-modal-root")||document.body.classList.add("pict-modal-root")),_superPropGet(t,"onBeforeInitialize",this,3)([])}},{key:"_nextId",value:function(){return this._idCounter++,this._idCounter}},{key:"confirm",value:function(e,t){return this._confirm.confirm(e,t)}},{key:"doubleConfirm",value:function(e,t){return this._confirm.doubleConfirm(e,t)}},{key:"show",value:function(e){return this._window.show(e)}},{key:"tooltip",value:function(e,t,o){return this._tooltip.tooltip(e,t,o)}},{key:"richTooltip",value:function(e,t,o){return this._tooltip.richTooltip(e,t,o)}},{key:"toast",value:function(e,t){return this._toast.toast(e,t)}},{key:"dropdown",value:function(e,t){return this._dropdown.dropdown(e,t)}},{key:"dismissDropdowns",value:function(){this._dropdown.dismissAll()}},{key:"panel",value:function(e,t){return this._panel.create(e,t)}},{key:"shell",value:function(e,t){return this._shell.shell(e,t)}},{key:"dismissModals",value:function(){for(var e=this._activeModals.slice(),t=e.length-1;t>=0;t--)e[t].dismiss(null)}},{key:"dismissTooltips",value:function(){this._tooltip.dismissAll()}},{key:"dismissToasts",value:function(){this._toast.dismissAll()}},{key:"dismissAll",value:function(){this.dismissModals(),this.dismissTooltips(),this.dismissToasts(),this.dismissDropdowns()}},{key:"destroyPanels",value:function(){this._panel.destroyAll()}},{key:"destroy",value:function(){if(this.dismissAll(),this.destroyPanels(),this._overlay.destroy(),this._toast.destroy(),"function"==typeof _superPropGet(t,"destroy",this,1))return _superPropGet(t,"destroy",this,3)([])}}])}(n);t.exports=u,t.exports.default_configuration=h},{"./Pict-Modal-Confirm.js":67,"./Pict-Modal-Dropdown.js":68,"./Pict-Modal-Overlay.js":69,"./Pict-Modal-Panel.js":70,"./Pict-Modal-Shell.js":71,"./Pict-Modal-Toast.js":72,"./Pict-Modal-Tooltip.js":73,"./Pict-Modal-Window.js":74,"./Pict-Section-Modal-DefaultConfiguration.js":75,"pict-view":137}],77:[function(e,t,o){var n=e("pict-provider"),i=e("pict-provider-theme"),r=e("./views/PictView-Theme-Picker.js"),a=e("./views/PictView-Theme-ModeToggle.js"),l=e("./views/PictView-Theme-ScaleSelect.js"),s=e("./views/PictView-Theme-Button.js"),c=e("./views/PictView-Theme-BrandStrip.js"),d=e("./views/PictView-Theme-Brand-Mark.js"),p=e("./views/PictView-Theme-TopBar.js"),h=e("./views/PictView-Theme-BottomBar.js"),u=e("./Theme-Persistence.js"),f=e("./Theme-Scale.js"),g=e("./Theme-Brand.js"),m=e("./themes/_catalog.js"),v={Picker:{lib:r,hash:"Theme-Picker"},ModeToggle:{lib:a,hash:"Theme-ModeToggle"},ScaleSelect:{lib:l,hash:"Theme-ScaleSelect"},Button:{lib:s,hash:"Theme-Button"},BrandStrip:{lib:c,hash:"Theme-BrandStrip"},BrandMark:{lib:d,hash:"Theme-Brand-Mark"},TopBar:{lib:p,hash:"Theme-TopBar"},BottomBar:{lib:h,hash:"Theme-BottomBar"}};function w(e){if(!e||!e.providers||!e.providers.Theme)return e&&e.log&&e.log.warn&&e.log.warn("pict-section-theme.registerCatalog: pict.providers.Theme not found — register the runtime first"),0;for(var t=e.providers.Theme,o=m.list(),n=0,i=0;i<o.length;i++)t.registerTheme(o[i].Bundle)&&n++;return n}function y(e,t){if(!e||"function"!=typeof e.addProvider)throw new Error("pict-section-theme: requires a Pict instance");var o=t||{};if(!e.providers||!e.providers.Theme){var n=Object.assign({},i.default_configuration,o.ProviderOptions||{});e.addProvider("Theme",n,i)}!1!==o.RegisterCatalog&&w(e);for(var r=Array.isArray(o.Views)?o.Views:Object.keys(v),a=0;a<r.length;a++){var l=v[r[a]];if(l){if(!e.views||!e.views[l.hash]){var s=Object.assign({},l.lib.default_configuration,o.ViewOptions&&o.ViewOptions[r[a]]||{});e.addView(l.hash,s,l.lib)}}else e.log&&e.log.warn&&e.log.warn('pict-section-theme: unknown view name "'+r[a]+'" — skipped')}var c=e.providers.Theme,d=!1!==o.Persistence,p=null,h=o.ApplyDefault||null,m=o.DefaultMode||null,y="number"==typeof o.DefaultScale?o.DefaultScale:null;if(d&&c){p=u.resolveKey(o.PersistenceKey);var b=u.load(p);b&&b.ThemeHash&&"function"==typeof c.getTheme&&c.getTheme(b.ThemeHash)?(h=b.ThemeHash,b.Mode&&(m=b.Mode),b.Scale&&(y=b.Scale)):b&&b.Scale&&(y=b.Scale);var S=function(){var e="function"==typeof c.getActiveTheme?c.getActiveTheme():{Hash:null,Mode:null};u.save(p,{ThemeHash:e.Hash,Mode:e.Mode,Scale:f.getActive()})};c.onApply(S),f.onChange(S)}return h&&c&&c.applyTheme(h,m),null!==y&&f.applyScale(y),o.Brand&&g.applyBrand(o.Brand),c&&p&&(c._persistenceKey=p),c}var b=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n])).serviceType="PictSectionTheme",y(i.pict,i.options),i}return _inherits(t,e),_createClass(t,[{key:"mount",value:function(e){var t=e||{},o=t.Container;if(!o)return null;var n="string"==typeof o?this.pict&&this.pict.ContentAssignment?this.pict.ContentAssignment.getElement(o):document.querySelector(o):o;if(n&&n.length&&!n.tagName&&(n=n[0]),!n)return this.pict&&this.pict.log&&this.pict.log.warn&&this.pict.log.warn("pict-section-theme.mount: container not found for "+o),null;for(var i=Array.isArray(t.Views)&&t.Views.length?t.Views:["Picker","ModeToggle","ScaleSelect"],r=[],a=[],l=0;l<i.length;l++){var s=v[i[l]];if(s){var c=(s.lib.default_configuration.DefaultDestinationAddress||"").replace(/^#/,"");c&&(r.push('<div class="pict-theme-mount-row pict-theme-mount-row-'+s.hash.toLowerCase()+'"><div id="'+c+'"></div></div>'),a.push(s.hash))}}var d="pict-theme-mount"+(t.WrapperClass?" "+t.WrapperClass:"");n.innerHTML='<div class="'+d+'">'+r.join("")+"</div>";for(var p=0;p<a.length;p++){var h=this.pict.views[a[p]];if(h&&"function"==typeof h.render)try{h.render()}catch(e){}}return{container:n,viewsRendered:a}}}])}(n);t.exports=b,t.exports.default_configuration={ProviderIdentifier:"Theme-Section",AutoInitialize:!1,ApplyDefault:null,DefaultMode:null,DefaultScale:null,Persistence:!0,PersistenceKey:null,RegisterCatalog:!0,Views:null,ViewOptions:null,Brand:null,ProviderOptions:null},t.exports.Provider=i,t.exports.PictSectionThemeProvider=b,t.exports.PickerView=r,t.exports.ModeToggleView=a,t.exports.ButtonView=s,t.exports.ScaleSelectView=l,t.exports.BrandStripView=c,t.exports.BrandMarkView=d,t.exports.TopBarView=p,t.exports.BottomBarView=h,t.exports.Catalog=m,t.exports.Brand=g,t.exports.Scale=f,t.exports.Persistence=u,t.exports.registerCatalog=w,t.exports.listCatalog=function(){for(var e=m.list(),t=[],o=0;o<e.length;o++){var n=e[o],i=n.Bundle||{},r=i.Modes||{};t.push({Hash:n.Hash,Name:i.Name||n.Hash,Category:n.Category||"Other",Strategy:r.Strategy||"single",DefaultMode:r.Default||"light",IsDefault:!!n.IsDefault})}return t},t.exports.install=function(e,t){if(!e||"function"!=typeof e.addProvider)throw new Error("pict-section-theme.install: first arg must be a Pict instance");return y(e,t||{})},t.exports.clearPersistence=function(e){var t=e&&e.providers&&e.providers.Theme&&e.providers.Theme._persistenceKey||u.resolveKey(null);return u.clear(t)}},{"./Theme-Brand.js":78,"./Theme-Persistence.js":80,"./Theme-Scale.js":81,"./themes/_catalog.js":85,"./views/PictView-Theme-BottomBar.js":126,"./views/PictView-Theme-Brand-Mark.js":127,"./views/PictView-Theme-BrandStrip.js":128,"./views/PictView-Theme-Button.js":129,"./views/PictView-Theme-ModeToggle.js":130,"./views/PictView-Theme-Picker.js":131,"./views/PictView-Theme-ScaleSelect.js":132,"./views/PictView-Theme-TopBar.js":133,"pict-provider":15,"pict-provider-theme":9}],78:[function(e,t,o){var n="pict-brand",i="pict-brand-favicon",r="pict-brand-favicon-dark",a=null,l=[];function s(e){return"string"==typeof e&&/^\s*<svg[\s>]/i.test(e)}function c(e){return"string"==typeof e&&/^(data:|https?:|\/|\.\.?\/)/.test(e)}function d(e){return e&&"string"==typeof e.IconType?e.IconType:e&&e.Icon?s(e.Icon)?"svg":c(e.Icon)?"image":null:null}function p(e){if("string"==typeof e&&e.length>0)return{Light:e,Dark:e,Base:e};if(e&&"object"===_typeof(e)){var t="string"==typeof e.Light&&e.Light.length>0?e.Light:null,o="string"==typeof e.Dark&&e.Dark.length>0?e.Dark:null;return t||o?{Light:t=t||o,Dark:o=o||t,Base:"string"==typeof e.Base&&e.Base.length>0?e.Base:t}:null}return null}function h(e){return e&&"string"==typeof e?s(e)?"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e).replace(/'/g,"%27").replace(/"/g,"%22"):c(e)?e:null:null}function u(){"undefined"!=typeof document&&[i,r].forEach(function(e){var t=document.getElementById(e);t&&t.parentNode&&t.parentNode.removeChild(t)})}function f(e){var t,o=e.Colors;return":root {\n\t--brand-color-primary: "+o.Primary+";\n\t--brand-color-secondary: "+o.Secondary+";\n\t--brand-color-primary-light: "+o.PrimaryLight+";\n\t--brand-color-primary-dark: "+o.PrimaryDark+";\n\t--brand-color-secondary-light: "+o.SecondaryLight+";\n\t--brand-color-secondary-dark: "+o.SecondaryDark+";\n\t--brand-color-primary-mode: "+o.PrimaryLight+";\n\t--brand-color-secondary-mode: "+o.SecondaryLight+";\n\t--brand-name: "+(t=e.Name,'"'+String(t||"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'";\n}\n')+(".theme-dark {\n\t--brand-color-primary-mode: "+o.PrimaryDark+";\n\t--brand-color-secondary-mode: "+o.SecondaryDark+";\n}\n")}function g(e){var t=a;if(null===e){if(a=null,"undefined"!=typeof document){var o=document.getElementById(n);o&&o.parentNode&&o.parentNode.removeChild(o)}return u(),v(null,t),null}var l=function(e){if(!e||"object"!==_typeof(e))return null;var t=e.Colors||{},o=p(t.Primary),n=p(t.Secondary);if(!o||!n)return null;var i=t.PrimaryLight||o.Light,r=t.PrimaryDark||o.Dark,a=t.SecondaryLight||n.Light,l=t.SecondaryDark||n.Dark;return{Hash:e.Hash||"brand",Name:e.Name||e.Hash||"Brand",Icon:e.Icon||null,IconType:d(e),Tagline:"string"==typeof e.Tagline?e.Tagline:null,Favicon:e.Favicon||null,FaviconDark:e.FaviconDark||null,Colors:{Primary:o.Base,Secondary:n.Base,PrimaryLight:i,PrimaryDark:r,SecondaryLight:a,SecondaryDark:l}}}(e);return l?(a=l,function(e){if("undefined"!=typeof document){var t=document.getElementById(n);t||((t=document.createElement("style")).id=n,document.head.appendChild(t)),t.textContent=e}}(f(l)),function(e){if("undefined"!=typeof document){u();var t=h(e.Favicon),o=h(e.FaviconDark);if(t||o){var n=!(!t||!o);if(t){var a=document.createElement("link");a.id=i,a.rel="icon",a.href=t,/^data:image\/svg\+xml/.test(t)&&(a.type="image/svg+xml"),n&&(a.media="(prefers-color-scheme: light)"),document.head.appendChild(a)}if(o){var l=document.createElement("link");l.id=r,l.rel="icon",l.href=o,/^data:image\/svg\+xml/.test(o)&&(l.type="image/svg+xml"),n&&(l.media="(prefers-color-scheme: dark)"),document.head.appendChild(l)}}}}(l),v(l,t),l):("undefined"!=typeof console&&console.warn&&console.warn("Theme-Brand.applyBrand: bad brand object — needs Colors.Primary + Colors.Secondary as strings."),a)}function m(e){var t=l.indexOf(e);t>=0&&l.splice(t,1)}function v(e,t){for(var o=0;o<l.length;o++)try{l[o](e,t)}catch(e){}}t.exports={applyBrand:g,getActive:function(){return a},onChange:function(e){return"function"!=typeof e?function(){}:(l.push(e),function(){m(e)})},offChange:m,reset:function(){g(null),l=[]},STYLE_ELEMENT_ID:n,FAVICON_LINK_ID:i,FAVICON_DARK_LINK_ID:r}},{}],79:[function(e,t,o){function n(e,t){var o="number"==typeof e&&e>0?e:14;return'<svg class="pict-theme-icon" width="'+o+'" height="'+o+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+t+"</svg>"}function i(e){return n(e,'<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>')}function r(e){return n(e,'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>')}function a(e){var t="number"==typeof e&&e>0?e:14;return'<svg class="pict-theme-icon pict-theme-icon-paired" width="'+1.6*t+'" height="'+t+'" viewBox="0 0 38 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="12" r="3"/><path d="M8 4v1.5M8 18.5V20M2.5 12H4M12 12h1.5M4.1 7.1l1 1M11.1 7.1l-1 1M4.1 16.9l1-1M11.1 16.9l-1-1"/><path d="M33 13.5A6.5 6.5 0 1 1 26 6a5 5 0 0 0 7 7.5z"/></svg>'}t.exports={iconSun:i,iconMoon:r,iconSystem:function(e){return n(e,'<rect x="2" y="4" width="20" height="14" rx="2"/><path d="M8 21h8M12 18v3"/>')},iconPaired:a,iconChevronDown:function(e){var t="number"==typeof e&&e>0?e:10;return'<svg class="pict-theme-icon pict-theme-icon-chevron" width="'+t+'" height="'+t+'" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 4.5l3 3 3-3"/></svg>'},iconForTheme:function(e,t,o){return"single"===e?"dark"===t?r(o):i(o):a(o)},DEFAULT_SIZE_PX:14}},{}],80:[function(e,t,o){var n="pict-section-theme:";function i(){try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(e){}return null}t.exports={resolveKey:function(e){var t="string"==typeof e&&e.length>0?e:function(){try{if("undefined"!=typeof window&&window.location&&window.location.hostname)return window.location.hostname}catch(e){}return"default"}();return n+t},load:function(e){var t,o,n=i();if(!n)return null;try{t=n.getItem(e)}catch(e){return null}if(!t)return null;try{o=JSON.parse(t)}catch(e){return null}if(!o||"object"!==_typeof(o))return null;if(1!==o.Version)return null;if("string"!=typeof o.ThemeHash||0===o.ThemeHash.length)return null;var r=null;return"number"==typeof o.Scale&&isFinite(o.Scale)&&o.Scale>0&&(r=o.Scale),{ThemeHash:o.ThemeHash,Mode:"string"==typeof o.Mode&&o.Mode.length>0?o.Mode:null,Scale:r}},save:function(e,t){var o=i();if(!o)return!1;if(!t||"string"!=typeof t.ThemeHash||0===t.ThemeHash.length)return!1;var n={Version:1,ThemeHash:t.ThemeHash,Mode:"string"==typeof t.Mode&&t.Mode.length>0?t.Mode:null,Scale:"number"==typeof t.Scale&&isFinite(t.Scale)&&t.Scale>0?t.Scale:null,SavedAt:(new Date).toISOString()};try{return o.setItem(e,JSON.stringify(n)),!0}catch(e){return!1}},clear:function(e){var t=i();if(!t)return!1;try{return t.removeItem(e),!0}catch(e){return!1}},STORAGE_PREFIX:n,SCHEMA_VERSION:1}},{}],81:[function(e,t,o){var n="pict-theme-scale",i="--theme-scale",r=1,a=[];function l(e){var t=a.indexOf(e);t>=0&&a.splice(t,1)}t.exports={applyScale:function(e){var t,o=r,l=(t=Number(e),!isFinite(t)||t<=0?1:t<.5?.5:t>3?3:t);return r=l,function(e){if("undefined"!=typeof document){var t=document.getElementById(n);t||((t=document.createElement("style")).id=n,document.head.appendChild(t)),t.textContent=e}}(function(e){return":root {\n\t"+i+": "+e+";\n}\nhtml {\n\tzoom: "+e+";\n}\n"}(l)),o!==l&&function(e,t){for(var o=0;o<a.length;o++)try{a[o](e,t)}catch(e){}}(l,o),l},getActive:function(){return r},onChange:function(e){return"function"!=typeof e?function(){}:(a.push(e),function(){l(e)})},offChange:l,reset:function(){if(r=1,"undefined"!=typeof document){var e=document.getElementById(n);e&&e.parentNode&&e.parentNode.removeChild(e)}a=[]},PRESETS:[{Value:.75,Label:"Tiny (75%)"},{Value:.85,Label:"Small (85%)"},{Value:1,Label:"Default (100%)"},{Value:1.15,Label:"Comfortable (115%)"},{Value:1.25,Label:"Large (125%)"},{Value:1.5,Label:"Huge (150%)"},{Value:1.75,Label:"Extra Huge (175%)"},{Value:2,Label:"Massive (200%)"}],DEFAULT_SCALE:1,MIN_SCALE:.5,MAX_SCALE:3,STYLE_ELEMENT_ID:n,CSS_VAR_NAME:i}},{}],82:[function(e,t,o){t.exports={Hash:"1970s-console",Name:"1970s Console",Category:"Fun",Version:"0.0.1",Description:"Amber phosphor on brown-black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A1000",Secondary:"#140C00",Tertiary:"#1E1400",Panel:"#1C1200",Viewer:"#100A00",Hover:"#2A1C00",Selected:"#3A2800",Thumb:"#140C00"},Text:{Primary:"#FFAA00",Secondary:"#DD8800",Muted:"#AA6600",Dim:"#884400",Placeholder:"#663300"},Brand:{Accent:"#FFCC00",AccentHover:"#FFDD44"},Border:{Default:"#2A1800",Light:"#3A2200"},Status:{Danger:"#FF4400",DangerMuted:"#AA3300"},Scrollbar:{Track:"#2A1800",Hover:"#3A2800"},Selection:{Background:"rgba(255, 204, 0, 0.2)"},Focus:{Outline:"#FFCC00"},Syntax:{Keyword:"#FFB000",String:"#FFD080",Number:"#FFB000",Comment:"#806020",Operator:"#FFB000",Punctuation:"#FFD080",Function:"#FFB000",Variable:"#FFE090",Type:"#FFB000",Builtin:"#FFB000",Property:"#FF6E40",Tag:"#FF6E40",AttrName:"#FFB000",AttrValue:"#FFD080"}},Typography:{Family:{Sans:"'Courier New', 'Lucida Console', monospace",Mono:"'Courier New', 'Lucida Console', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#DD8800",Accent:"#FFCC00",Muted:"#884400",Light:"#1E1400",WarmBeige:"#201800",TealTint:"#1A1000",Lavender:"#1C1200",AmberTint:"#221800",PdfFill:"#201000",PdfText:"#FF4400"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.405Z",CompilerVersion:1}},{}],83:[function(e,t,o){t.exports={Hash:"1980s-console",Name:"1980s Console",Category:"Fun",Version:"0.0.1",Description:"Green phosphor on black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#001200",Secondary:"#000E00",Tertiary:"#001600",Panel:"#001400",Viewer:"#000A00",Hover:"#002200",Selected:"#003800",Thumb:"#000E00"},Text:{Primary:"#00FF00",Secondary:"#00CC00",Muted:"#009900",Dim:"#006600",Placeholder:"#004400"},Brand:{Accent:"#00FF66",AccentHover:"#44FF88"},Border:{Default:"#002A00",Light:"#003A00"},Status:{Danger:"#FF0000",DangerMuted:"#AA0000"},Scrollbar:{Track:"#002A00",Hover:"#004400"},Selection:{Background:"rgba(0, 255, 102, 0.2)"},Focus:{Outline:"#00FF66"},Syntax:{Keyword:"#00FF00",String:"#90FF90",Number:"#FFFF00",Comment:"#208020",Operator:"#00FF00",Punctuation:"#90FF90",Function:"#00FF00",Variable:"#C0FFC0",Type:"#FFFF00",Builtin:"#FFFF00",Property:"#FF4040",Tag:"#FF4040",AttrName:"#FFFF00",AttrValue:"#90FF90"}},Typography:{Family:{Sans:"'Courier New', monospace",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#00CC00",Accent:"#00FF66",Muted:"#006600",Light:"#001600",WarmBeige:"#001A00",TealTint:"#001200",Lavender:"#001400",AmberTint:"#001800",PdfFill:"#140000",PdfText:"#FF0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],84:[function(e,t,o){t.exports={Hash:"1990s-website",Name:"1990s Web Site",Category:"Fun",Version:"0.0.1",Description:"Blue links on grey, beveled Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#C0C0C0",Secondary:"#B0B0B0",Tertiary:"#A8A8A8",Panel:"#B8B8B8",Viewer:"#D0D0D0",Hover:"#B8B8D0",Selected:"#000080",Thumb:"#B0B0B0"},Text:{Primary:"#000000",Secondary:"#000080",Muted:"#404040",Dim:"#606060",Placeholder:"#808080"},Brand:{Accent:"#0000FF",AccentHover:"#0000CC"},Border:{Default:"#808080",Light:"#A0A0A0"},Status:{Danger:"#FF0000",DangerMuted:"#990000"},Scrollbar:{Track:"#808080",Hover:"#606060"},Selection:{Background:"rgba(0, 0, 128, 0.3)"},Focus:{Outline:"#0000FF"},Syntax:{Keyword:"#0000FF",String:"#008000",Number:"#A52A2A",Comment:"#808080",Operator:"#000080",Punctuation:"#000000",Function:"#0000A0",Variable:"#000000",Type:"#A52A2A",Builtin:"#A52A2A",Property:"#800080",Tag:"#800080",AttrName:"#A52A2A",AttrValue:"#008000"}},Typography:{Family:{Sans:"'Times New Roman', Times, serif",Mono:"'Courier New', Courier, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#000080",Accent:"#0000FF",Muted:"#606060",Light:"#A8A8A8",WarmBeige:"#B0B0B0",TealTint:"#A0A0A0",Lavender:"#ABABD0",AmberTint:"#B8B0A0",PdfFill:"#C0A0A0",PdfText:"#FF0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],85:[function(e,t,o){var n=function(){return _createClass(function e(){_classCallCheck(this,e),this._themes=new Map,this._loadStarterSet()},[{key:"_loadStarterSet",value:function(){for(var t=[{Hash:"pict-default",Category:"Default",IsDefault:!0,Bundle:e("./pict-default.json")},{Hash:"retold-mono",Category:"Default",Bundle:e("./retold-mono.json")},{Hash:"retold-manager",Category:"App",Bundle:e("./retold-manager.json")},{Hash:"retold-content-system",Category:"App",Bundle:e("./retold-content-system.json")},{Hash:"retold-labs",Category:"App",Bundle:e("./retold-labs.json")},{Hash:"retold-labs-cyberpunk",Category:"App",Bundle:e("./retold-labs-cyberpunk.json")},{Hash:"retold-labs-retro",Category:"App",Bundle:e("./retold-labs-retro.json")},{Hash:"ultravisor-desert-dusk",Category:"App",Bundle:e("./ultravisor-desert-dusk.json")},{Hash:"ultravisor-desert-day",Category:"App",Bundle:e("./ultravisor-desert-day.json")},{Hash:"ultravisor-desert-sunset",Category:"App",Bundle:e("./ultravisor-desert-sunset.json")},{Hash:"ultravisor-professional-light",Category:"App",Bundle:e("./ultravisor-professional-light.json")},{Hash:"ultravisor-professional-dark",Category:"App",Bundle:e("./ultravisor-professional-dark.json")},{Hash:"ultravisor-desert-canyon",Category:"App",Bundle:e("./ultravisor-desert-canyon.json")},{Hash:"ocean",Category:"Paired",Bundle:e("./ocean.json")},{Hash:"playground-corp",Category:"Paired",Bundle:e("./playground-corp.json")},{Hash:"flow-modern",Category:"Flow",Bundle:e("./flow-modern.json")},{Hash:"flow-sketch",Category:"Flow",Bundle:e("./flow-sketch.json")},{Hash:"flow-blueprint",Category:"Flow",Bundle:e("./flow-blueprint.json")},{Hash:"flow-mono",Category:"Flow",Bundle:e("./flow-mono.json")},{Hash:"flow-retro-80s",Category:"Flow",Bundle:e("./flow-retro-80s.json")},{Hash:"flow-retro-90s",Category:"Flow",Bundle:e("./flow-retro-90s.json")},{Hash:"flow-whiteboard",Category:"Flow",Bundle:e("./flow-whiteboard.json")},{Hash:"twilight",Category:"Grey",Bundle:e("./twilight.json")},{Hash:"night",Category:"Grey",Bundle:e("./night.json")},{Hash:"evening",Category:"Grey",Bundle:e("./evening.json")},{Hash:"afternoon",Category:"Grey",Bundle:e("./afternoon.json")},{Hash:"daylight",Category:"Grey",Bundle:e("./daylight.json")},{Hash:"cyberpunk",Category:"Fun",Bundle:e("./cyberpunk.json")},{Hash:"synthwave",Category:"Fun",Bundle:e("./synthwave.json")},{Hash:"neo-tokyo",Category:"Fun",Bundle:e("./neo-tokyo.json")},{Hash:"solarized-dark",Category:"Fun",Bundle:e("./solarized-dark.json")},{Hash:"forest",Category:"Fun",Bundle:e("./forest.json")},{Hash:"hotdog",Category:"Fun",Bundle:e("./hotdog.json")},{Hash:"1970s-console",Category:"Fun",Bundle:e("./1970s-console.json")},{Hash:"1980s-console",Category:"Fun",Bundle:e("./1980s-console.json")},{Hash:"1990s-website",Category:"Fun",Bundle:e("./1990s-website.json")},{Hash:"early-2000s",Category:"Fun",Bundle:e("./early-2000s.json")},{Hash:"databeacon-nineteen-97",Category:"Retro",Bundle:e("./databeacon-nineteen-97.json")},{Hash:"databeacon-mac-classic",Category:"Retro",Bundle:e("./databeacon-mac-classic.json")},{Hash:"databeacon-next",Category:"Retro",Bundle:e("./databeacon-next.json")},{Hash:"databeacon-beos",Category:"Retro",Bundle:e("./databeacon-beos.json")},{Hash:"databeacon-sgi",Category:"Retro",Bundle:e("./databeacon-sgi.json")},{Hash:"mobile-debug",Category:"Debug",Bundle:e("./mobile-debug.json")}],o=0;o<t.length;o++){var n=Object.assign({},t[o],{Source:t[o].Source||"starter"});this._themes.set(n.Hash,n)}}},{key:"register",value:function(e){if(!e||"object"!==_typeof(e))throw new Error("ThemeRegistry.register: entry must be an object");if("string"!=typeof e.Hash||0===e.Hash.length)throw new Error("ThemeRegistry.register: entry.Hash is required");if(!e.Bundle||"object"!==_typeof(e.Bundle))throw new Error("ThemeRegistry.register: entry.Bundle is required");var t=Object.assign({Source:"host"},e);return this._themes.set(e.Hash,t),t}},{key:"unregister",value:function(e){return this._themes.delete(e)}},{key:"get",value:function(e){return this._themes.get(e)}},{key:"has",value:function(e){return this._themes.has(e)}},{key:"list",value:function(){return Array.from(this._themes.values())}},{key:"clear",value:function(){this._themes.clear()}},{key:"loadStarterSet",value:function(){this._loadStarterSet()}},{key:"count",get:function(){return this._themes.size}},{key:"registerFromURL",value:(t=_asyncToGenerator(_regenerator().m(function e(t,o){var n,i,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if("function"==typeof fetch){e.n=1;break}throw new Error("ThemeRegistry.registerFromURL: fetch is not available in this environment");case 1:return e.n=2,fetch(t);case 2:if((n=e.v).ok){e.n=3;break}throw new Error("ThemeRegistry.registerFromURL: HTTP "+n.status+" for "+t);case 3:return e.n=4,n.json();case 4:if((i=e.v)&&"object"===_typeof(i)&&"string"==typeof i.Hash){e.n=5;break}throw new Error("ThemeRegistry.registerFromURL: payload missing Hash");case 5:return r=o||{},e.a(2,this.register({Hash:r.Hash||i.Hash,Bundle:i,Category:r.Category||"Garden",IsDefault:!!r.IsDefault,Source:t}))}},e,this)})),function(e,o){return t.apply(this,arguments)})},{key:"length",get:function(){return this._themes.size}},{key:Symbol.iterator,value:function(){return this._themes.values()}}]);var t}(),i=new n,r=new Proxy(i,{get:function(e,t,o){if("string"==typeof t&&/^\d+$/.test(t)){var n=parseInt(t,10);return e.list()[n]}return Reflect.get(e,t,o)},has:function(e,t){return"string"==typeof t&&/^\d+$/.test(t)?parseInt(t,10)<e.length:Reflect.has(e,t)}});t.exports=r,t.exports.ThemeRegistry=n},{"./1970s-console.json":82,"./1980s-console.json":83,"./1990s-website.json":84,"./afternoon.json":86,"./cyberpunk.json":87,"./databeacon-beos.json":88,"./databeacon-mac-classic.json":89,"./databeacon-next.json":90,"./databeacon-nineteen-97.json":91,"./databeacon-sgi.json":92,"./daylight.json":93,"./early-2000s.json":94,"./evening.json":95,"./flow-blueprint.json":96,"./flow-modern.json":97,"./flow-mono.json":98,"./flow-retro-80s.json":99,"./flow-retro-90s.json":100,"./flow-sketch.json":101,"./flow-whiteboard.json":102,"./forest.json":103,"./hotdog.json":104,"./mobile-debug.json":105,"./neo-tokyo.json":106,"./night.json":107,"./ocean.json":108,"./pict-default.json":109,"./playground-corp.json":110,"./retold-content-system.json":111,"./retold-labs-cyberpunk.json":112,"./retold-labs-retro.json":113,"./retold-labs.json":114,"./retold-manager.json":115,"./retold-mono.json":116,"./solarized-dark.json":117,"./synthwave.json":118,"./twilight.json":119,"./ultravisor-desert-canyon.json":120,"./ultravisor-desert-day.json":121,"./ultravisor-desert-dusk.json":122,"./ultravisor-desert-sunset.json":123,"./ultravisor-professional-dark.json":124,"./ultravisor-professional-light.json":125}],86:[function(e,t,o){t.exports={Hash:"afternoon",Name:"Afternoon",Category:"Grey",Version:"0.0.1",Description:"Warm light grey, softer contrast Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#E8E4E0",Secondary:"#DAD6D2",Tertiary:"#D0CCC8",Panel:"#DDD9D5",Viewer:"#F0ECE8",Hover:"#CCC8C4",Selected:"#B8B4B0",Thumb:"#DAD6D2"},Text:{Primary:"#2A2A2A",Secondary:"#404040",Muted:"#707070",Dim:"#909090",Placeholder:"#B0B0B0"},Brand:{Accent:"#555555",AccentHover:"#333333"},Border:{Default:"#C0BCB8",Light:"#D0CCC8"},Status:{Danger:"#AA3333",DangerMuted:"#886655"},Scrollbar:{Track:"#B8B4B0",Hover:"#A0A09C"},Selection:{Background:"rgba(85, 85, 85, 0.2)"},Focus:{Outline:"#555555"},Syntax:{Keyword:"#7038A0",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#666666",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"Georgia, 'Times New Roman', serif",Mono:"'Courier New', Courier, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#404040",Accent:"#555555",Muted:"#909090",Light:"#D0CCC8",WarmBeige:"#DAD6D2",TealTint:"#CCC8C4",Lavender:"#D2D0CE",AmberTint:"#D8D2C8",PdfFill:"#D8C8C0",PdfText:"#AA3333"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],87:[function(e,t,o){t.exports={Hash:"cyberpunk",Name:"Cyberpunk",Category:"Fun",Version:"0.0.1",Description:"Electric green on black Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0A0E0A",Secondary:"#060806",Tertiary:"#0E120E",Panel:"#0C100C",Viewer:"#040604",Hover:"#142014",Selected:"#1A3A1A",Thumb:"#060806"},Text:{Primary:"#C8FFC8",Secondary:"#A0D8A0",Muted:"#608860",Dim:"#406040",Placeholder:"#305030"},Brand:{Accent:"#00FF41",AccentHover:"#44FF77"},Border:{Default:"#1A2A1A",Light:"#224022"},Status:{Danger:"#FF3333",DangerMuted:"#AA2222"},Scrollbar:{Track:"#1A2A1A",Hover:"#2A4A2A"},Selection:{Background:"rgba(0, 255, 65, 0.2)"},Focus:{Outline:"#00FF41"},Syntax:{Keyword:"#FF00FF",String:"#00FF41",Number:"#FFFF00",Comment:"#406040",Operator:"#00FFFF",Punctuation:"#A0D8A0",Function:"#FF00FF",Variable:"#C8FFC8",Type:"#FFFF00",Builtin:"#FFFF00",Property:"#FF3333",Tag:"#FF3333",AttrName:"#FFFF00",AttrValue:"#00FF41"}},Typography:{Family:{Sans:"'Lucida Console', 'Courier New', monospace",Mono:"'Lucida Console', 'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#A0D8A0",Accent:"#00FF41",Muted:"#406040",Light:"#0E120E",WarmBeige:"#101610",TealTint:"#0C140C",Lavender:"#0E120E",AmberTint:"#141810",PdfFill:"#181010",PdfText:"#FF3333"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.406Z",CompilerVersion:1}},{}],88:[function(e,t,o){t.exports={Hash:"databeacon-beos",Name:"DataBeacon — BeOS",Version:"0.0.1",Description:"BeOS palette — cool teals with orange accents. Light: sky-blue desktop. Dark: deep ocean panels with cyan highlights.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#e0e8ec",Dark:"#0a1a22"},Secondary:{Light:"#c8d6de",Dark:"#102530"},Tertiary:{Light:"#d4dfe5",Dark:"#0d1f29"},Panel:{Light:"#f0f4f6",Dark:"#142430"},Input:{Light:"#ffffff",Dark:"#1b313f"},Hover:{Light:"#d7dee2",Dark:"#091820"},Selected:{Light:"#c2d4da",Dark:"#19353e"}},Text:{Primary:{Light:"#101820",Dark:"#b0d0e0"},Secondary:{Light:"#40525e",Dark:"#7a98a8"},Muted:{Light:"#6e828e",Dark:"#556a78"},Placeholder:{Light:"#95a5ae",Dark:"#3a4e59"},OnBrand:{Light:"#ffffff",Dark:"#0a1a22"}},Brand:{Primary:{Light:"#3a7a8a",Dark:"#60b0c0"},PrimaryHover:{Light:"#4e98aa",Dark:"#80ccdc"},Accent:{Light:"#3a7a8a",Dark:"#60b0c0"},AccentHover:{Light:"#4e98aa",Dark:"#80ccdc"}},Border:{Default:{Light:"#8ba3b0",Dark:"#466070"},Light:{Light:"#b5c5ce",Dark:"#283d49"},Strong:{Light:"#6f828c",Dark:"#384c59"}},Status:{Success:{Light:"#2a7a4a",Dark:"#4ac06a"},Warning:{Light:"#cc9930",Dark:"#ffc860"},Error:{Light:"#cc5530",Dark:"#ff8060"},Info:{Light:"#3a7a8a",Dark:"#60b0c0"}},Scrollbar:{Track:{Light:"#c8d6de",Dark:"#102530"},Thumb:{Light:"#7c929f",Dark:"#4d6574"},Hover:{Light:"#6e828e",Dark:"#556a78"}},Selection:{Background:{Light:"#aac4cc",Dark:"#254a54"},Text:{Light:"#101820",Dark:"#b0d0e0"}},Focus:{Outline:{Light:"#3a7a8a",Dark:"#60b0c0"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#cc5530",Dark:"#ff8060"},String:{Light:"#2a7a4a",Dark:"#4ac06a"},Number:{Light:"#cc9930",Dark:"#ffc860"},Comment:{Light:"#6e828e",Dark:"#556a78"},Operator:{Light:"#3a7a8a",Dark:"#60b0c0"},Punctuation:{Light:"#40525e",Dark:"#7a98a8"},Function:{Light:"#3a7a8a",Dark:"#60b0c0"},Variable:{Light:"#101820",Dark:"#b0d0e0"},Type:{Light:"#cc9930",Dark:"#ffc860"},Builtin:{Light:"#cc9930",Dark:"#ffc860"},Property:{Light:"#cc5530",Dark:"#ff8060"},Tag:{Light:"#cc5530",Dark:"#ff8060"},AttrName:{Light:"#cc9930",Dark:"#ffc860"},AttrValue:{Light:"#2a7a4a",Dark:"#4ac06a"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"220px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"BeOS",Tagline:"Connect, introspect, and expose remote databases"}}},{}],89:[function(e,t,o){t.exports={Hash:"databeacon-mac-classic",Name:"DataBeacon — Mac Classic",Version:"0.0.1",Description:"Mac OS 8/9 Platinum palette — soft greys with sky blue accents. Light: classic Mac platinum. Dark: charcoal panels with the same blue accent family.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#dddddd",Dark:"#202020"},Secondary:{Light:"#cccccc",Dark:"#2a2a2a"},Tertiary:{Light:"#d4d4d4",Dark:"#252525"},Panel:{Light:"#f0f0f0",Dark:"#2e2e2e"},Input:{Light:"#ffffff",Dark:"#3a3a3a"},Hover:{Light:"#d4d4d4",Dark:"#1e1e1e"},Selected:{Light:"#c0cce3",Dark:"#2b3748"}},Text:{Primary:{Light:"#000000",Dark:"#dddddd"},Secondary:{Light:"#444444",Dark:"#b0b0b0"},Muted:{Light:"#777777",Dark:"#777777"},Placeholder:{Light:"#9a9a9a",Dark:"#585858"},OnBrand:{Light:"#ffffff",Dark:"#0a0a0a"}},Brand:{Primary:{Light:"#4080ff",Dark:"#60a0ff"},PrimaryHover:{Light:"#60a0ff",Dark:"#80b8ff"},Accent:{Light:"#4080ff",Dark:"#60a0ff"},AccentHover:{Light:"#60a0ff",Dark:"#80b8ff"}},Border:{Default:{Light:"#999999",Dark:"#555555"},Light:{Light:"#bbbbbb",Dark:"#3a3a3a"},Strong:{Light:"#7a7a7a",Dark:"#444444"}},Status:{Success:{Light:"#339933",Dark:"#60cc60"},Warning:{Light:"#cc6600",Dark:"#ff9933"},Error:{Light:"#cc0000",Dark:"#ff4060"},Info:{Light:"#4080ff",Dark:"#60a0ff"}},Scrollbar:{Track:{Light:"#cccccc",Dark:"#2a2a2a"},Thumb:{Light:"#888888",Dark:"#666666"},Hover:{Light:"#777777",Dark:"#777777"}},Selection:{Background:{Light:"#aabfe7",Dark:"#344867"},Text:{Light:"#000000",Dark:"#dddddd"}},Focus:{Outline:{Light:"#4080ff",Dark:"#60a0ff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#cc0000",Dark:"#ff4060"},String:{Light:"#339933",Dark:"#60cc60"},Number:{Light:"#cc6600",Dark:"#ff9933"},Comment:{Light:"#777777",Dark:"#777777"},Operator:{Light:"#4080ff",Dark:"#60a0ff"},Punctuation:{Light:"#444444",Dark:"#b0b0b0"},Function:{Light:"#4080ff",Dark:"#60a0ff"},Variable:{Light:"#000000",Dark:"#dddddd"},Type:{Light:"#cc6600",Dark:"#ff9933"},Builtin:{Light:"#cc6600",Dark:"#ff9933"},Property:{Light:"#cc0000",Dark:"#ff4060"},Tag:{Light:"#cc0000",Dark:"#ff4060"},AttrName:{Light:"#cc6600",Dark:"#ff9933"},AttrValue:{Light:"#339933",Dark:"#60cc60"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"220px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"Mac Classic",Tagline:"Connect, introspect, and expose remote databases"}}},{}],90:[function(e,t,o){t.exports={Hash:"databeacon-next",Name:"DataBeacon — NeXT",Version:"0.0.1",Description:"NeXTSTEP palette — stone backgrounds with rich purple accents. Light: warm stone. Dark: deep aubergine with lavender highlights.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#e8e6dd",Dark:"#1a1420"},Secondary:{Light:"#d6d3c8",Dark:"#221a2c"},Tertiary:{Light:"#dfdcd2",Dark:"#1e1726"},Panel:{Light:"#f5f3ed",Dark:"#251c2e"},Input:{Light:"#ffffff",Dark:"#2f253a"},Hover:{Light:"#dedcd4",Dark:"#18131e"},Selected:{Light:"#d1c7d2",Dark:"#352a42"}},Text:{Primary:{Light:"#1e1a26",Dark:"#e8e6dd"},Secondary:{Light:"#4c465a",Dark:"#b8b4c6"},Muted:{Light:"#7a7488",Dark:"#7a7488"},Placeholder:{Light:"#a09ba5",Dark:"#585263"},OnBrand:{Light:"#ffffff",Dark:"#1a1420"}},Brand:{Primary:{Light:"#6a3fa0",Dark:"#b090e0"},PrimaryHover:{Light:"#8557c0",Dark:"#c8aef0"},Accent:{Light:"#6a3fa0",Dark:"#b090e0"},AccentHover:{Light:"#8557c0",Dark:"#c8aef0"}},Border:{Default:{Light:"#9a96a6",Dark:"#5e5468"},Light:{Light:"#c1bec1",Dark:"#3c3444"},Strong:{Light:"#7b7884",Dark:"#4b4353"}},Status:{Success:{Light:"#3a7a3a",Dark:"#7acc7a"},Warning:{Light:"#b88a00",Dark:"#ffcf4a"},Error:{Light:"#aa2c3a",Dark:"#ff6a80"},Info:{Light:"#6a3fa0",Dark:"#b090e0"}},Scrollbar:{Track:{Light:"#d6d3c8",Dark:"#221a2c"},Thumb:{Light:"#8a8597",Dark:"#6c6478"},Hover:{Light:"#7a7488",Dark:"#7a7488"}},Selection:{Background:{Light:"#bfb0c9",Dark:"#4a3b5d"},Text:{Light:"#1e1a26",Dark:"#e8e6dd"}},Focus:{Outline:{Light:"#6a3fa0",Dark:"#b090e0"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#aa2c3a",Dark:"#ff6a80"},String:{Light:"#3a7a3a",Dark:"#7acc7a"},Number:{Light:"#b88a00",Dark:"#ffcf4a"},Comment:{Light:"#7a7488",Dark:"#7a7488"},Operator:{Light:"#6a3fa0",Dark:"#b090e0"},Punctuation:{Light:"#4c465a",Dark:"#b8b4c6"},Function:{Light:"#6a3fa0",Dark:"#b090e0"},Variable:{Light:"#1e1a26",Dark:"#e8e6dd"},Type:{Light:"#b88a00",Dark:"#ffcf4a"},Builtin:{Light:"#b88a00",Dark:"#ffcf4a"},Property:{Light:"#aa2c3a",Dark:"#ff6a80"},Tag:{Light:"#aa2c3a",Dark:"#ff6a80"},AttrName:{Light:"#b88a00",Dark:"#ffcf4a"},AttrValue:{Light:"#3a7a3a",Dark:"#7acc7a"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"220px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"NeXT",Tagline:"Connect, introspect, and expose remote databases"}}},{}],91:[function(e,t,o){t.exports={Hash:"databeacon-nineteen-97",Name:"DataBeacon — 1997 (Win95/98)",Version:"0.0.1",Description:"Windows 95/98 retro palette — beige + navy + maroon. Light: classic Win95 desktop. Dark: indigo-grey background with sky/coral accents.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#ece9d8",Dark:"#1e1e2e"},Secondary:{Light:"#d8d3b8",Dark:"#26263a"},Tertiary:{Light:"#e2dec8",Dark:"#222234"},Panel:{Light:"#fffbf0",Dark:"#2a2a3a"},Input:{Light:"#ffffff",Dark:"#343450"},Hover:{Light:"#e2dfcf",Dark:"#1c1c2c"},Selected:{Light:"#c1bfc8",Dark:"#2f3553"}},Text:{Primary:{Light:"#1a1a1a",Dark:"#ece9d8"},Secondary:{Light:"#4a4a4a",Dark:"#b8b6a8"},Muted:{Light:"#7a7a7a",Dark:"#7e7c70"},Placeholder:{Light:"#a1a09a",Dark:"#5c5b58"},OnBrand:{Light:"#ffffff",Dark:"#1a1a1a"}},Brand:{Primary:{Light:"#000080",Dark:"#80a0ff"},PrimaryHover:{Light:"#0000cc",Dark:"#a0b8ff"},Accent:{Light:"#000080",Dark:"#80a0ff"},AccentHover:{Light:"#0000cc",Dark:"#a0b8ff"}},Border:{Default:{Light:"#808080",Dark:"#4e4e68"},Light:{Light:"#b6b4ac",Dark:"#36364b"},Strong:{Light:"#666666",Dark:"#3e3e53"}},Status:{Success:{Light:"#008000",Dark:"#80ff80"},Warning:{Light:"#808000",Dark:"#ffcc00"},Error:{Light:"#800000",Dark:"#ff8080"},Info:{Light:"#000080",Dark:"#80c0ff"}},Scrollbar:{Track:{Light:"#d8d3b8",Dark:"#26263a"},Thumb:{Light:"#7d7d7d",Dark:"#66656c"},Hover:{Light:"#7a7a7a",Dark:"#7e7c70"}},Selection:{Background:{Light:"#a09ebb",Dark:"#3d4770"},Text:{Light:"#1a1a1a",Dark:"#ece9d8"}},Focus:{Outline:{Light:"#000080",Dark:"#80a0ff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#800000",Dark:"#ff8080"},String:{Light:"#008000",Dark:"#80ff80"},Number:{Light:"#808000",Dark:"#ffcc00"},Comment:{Light:"#7a7a7a",Dark:"#7e7c70"},Operator:{Light:"#000080",Dark:"#80a0ff"},Punctuation:{Light:"#4a4a4a",Dark:"#b8b6a8"},Function:{Light:"#000080",Dark:"#80c0ff"},Variable:{Light:"#1a1a1a",Dark:"#ece9d8"},Type:{Light:"#808000",Dark:"#ffcc00"},Builtin:{Light:"#808000",Dark:"#ffcc00"},Property:{Light:"#800000",Dark:"#ff8080"},Tag:{Light:"#800000",Dark:"#ff8080"},AttrName:{Light:"#808000",Dark:"#ffcc00"},AttrValue:{Light:"#008000",Dark:"#80ff80"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"220px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"1997 (Win95/98)",Tagline:"Connect, introspect, and expose remote databases"}}},{}],92:[function(e,t,o){t.exports={Hash:"databeacon-sgi",Name:"DataBeacon — SGI",Version:"0.0.1",Description:"SGI Indy / IRIX palette — magenta with cyan highlights. Light: signature SGI grey. Dark: deep workstation black with the same hot magenta.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#c8c8c8",Dark:"#1a1a1a"},Secondary:{Light:"#b8b8b8",Dark:"#232323"},Tertiary:{Light:"#c0c0c0",Dark:"#1e1e1e"},Panel:{Light:"#dcdcdc",Dark:"#252525"},Input:{Light:"#ffffff",Dark:"#2e2e2e"},Hover:{Light:"#c0c0c0",Dark:"#181818"},Selected:{Light:"#c8a9bb",Dark:"#432635"}},Text:{Primary:{Light:"#202020",Dark:"#e0e0e0"},Secondary:{Light:"#4a4a4a",Dark:"#a8a8a8"},Muted:{Light:"#6e6e6e",Dark:"#707070"},Placeholder:{Light:"#8d8d8d",Dark:"#515151"},OnBrand:{Light:"#ffffff",Dark:"#0a0a0a"}},Brand:{Primary:{Light:"#c82080",Dark:"#ff60b0"},PrimaryHover:{Light:"#e040a0",Dark:"#ff80c8"},Accent:{Light:"#c82080",Dark:"#ff60b0"},AccentHover:{Light:"#e040a0",Dark:"#ff80c8"}},Border:{Default:{Light:"#808080",Dark:"#505050"},Light:{Light:"#a4a4a4",Dark:"#353535"},Strong:{Light:"#666666",Dark:"#404040"}},Status:{Success:{Light:"#208040",Dark:"#50d080"},Warning:{Light:"#e8a818",Dark:"#ffd050"},Error:{Light:"#e83018",Dark:"#ff6060"},Info:{Light:"#3080c0",Dark:"#60c0ff"}},Scrollbar:{Track:{Light:"#b8b8b8",Dark:"#232323"},Thumb:{Light:"#777777",Dark:"#606060"},Hover:{Light:"#6e6e6e",Dark:"#707070"}},Selection:{Background:{Light:"#c892b0",Dark:"#63304a"},Text:{Light:"#202020",Dark:"#e0e0e0"}},Focus:{Outline:{Light:"#c82080",Dark:"#ff60b0"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#e83018",Dark:"#ff6060"},String:{Light:"#208040",Dark:"#50d080"},Number:{Light:"#e8a818",Dark:"#ffd050"},Comment:{Light:"#6e6e6e",Dark:"#707070"},Operator:{Light:"#c82080",Dark:"#ff60b0"},Punctuation:{Light:"#4a4a4a",Dark:"#a8a8a8"},Function:{Light:"#3080c0",Dark:"#60c0ff"},Variable:{Light:"#202020",Dark:"#e0e0e0"},Type:{Light:"#e8a818",Dark:"#ffd050"},Builtin:{Light:"#e8a818",Dark:"#ffd050"},Property:{Light:"#e83018",Dark:"#ff6060"},Tag:{Light:"#e83018",Dark:"#ff6060"},AttrName:{Light:"#e8a818",Dark:"#ffd050"},AttrValue:{Light:"#208040",Dark:"#50d080"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"220px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"SGI",Tagline:"Connect, introspect, and expose remote databases"}}},{}],93:[function(e,t,o){t.exports={Hash:"daylight",Name:"Daylight",Category:"Grey",Version:"0.0.1",Description:"Bright white, dark text Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#FFFFFF",Secondary:"#F0F0F0",Tertiary:"#E8E8E8",Panel:"#F5F5F5",Viewer:"#FAFAFA",Hover:"#E0E0E0",Selected:"#C8C8C8",Thumb:"#F0F0F0"},Text:{Primary:"#1A1A1A",Secondary:"#333333",Muted:"#666666",Dim:"#888888",Placeholder:"#AAAAAA"},Brand:{Accent:"#444444",AccentHover:"#222222"},Border:{Default:"#D0D0D0",Light:"#E0E0E0"},Status:{Danger:"#CC0000",DangerMuted:"#884444"},Scrollbar:{Track:"#C0C0C0",Hover:"#A0A0A0"},Selection:{Background:"rgba(68, 68, 68, 0.2)"},Focus:{Outline:"#444444"},Syntax:{Keyword:"#7038A0",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#444444",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"'Segoe UI', system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#333333",Accent:"#444444",Muted:"#888888",Light:"#E8E8E8",WarmBeige:"#F0F0F0",TealTint:"#E0E0E0",Lavender:"#EBEBEB",AmberTint:"#F0EDE8",PdfFill:"#F0E0E0",PdfText:"#CC0000"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],94:[function(e,t,o){t.exports={Hash:"early-2000s",Name:"Early 2000s Web",Category:"Fun",Version:"0.0.1",Description:"Teal and silver, Web 2.0 Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#E8F4F8",Secondary:"#D0E8EE",Tertiary:"#C0DDE6",Panel:"#D8EEF2",Viewer:"#F0F8FA",Hover:"#B0D4E0",Selected:"#88C4D8",Thumb:"#D0E8EE"},Text:{Primary:"#1A3A4A",Secondary:"#2A4A5A",Muted:"#5A7A8A",Dim:"#7A9AAA",Placeholder:"#9ABACA"},Brand:{Accent:"#0099CC",AccentHover:"#00AADD"},Border:{Default:"#A0C8D8",Light:"#B8D8E4"},Status:{Danger:"#CC3300",DangerMuted:"#994422"},Scrollbar:{Track:"#A0C8D8",Hover:"#88B8CC"},Selection:{Background:"rgba(0, 153, 204, 0.2)"},Focus:{Outline:"#0099CC"},Syntax:{Keyword:"#1A4080",String:"#2E7A3A",Number:"#A86B00",Comment:"#888888",Operator:"#1F6FB5",Punctuation:"#333333",Function:"#3357C7",Variable:"#222222",Type:"#A86B00",Builtin:"#A86B00",Property:"#B62828",Tag:"#B62828",AttrName:"#A86B00",AttrValue:"#2E7A3A"}},Typography:{Family:{Sans:"Verdana, Geneva, Tahoma, sans-serif",Mono:"'Lucida Console', Monaco, monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#2A4A5A",Accent:"#0099CC",Muted:"#7A9AAA",Light:"#C0DDE6",WarmBeige:"#D0E8EE",TealTint:"#B0D8E4",Lavender:"#C8DCE6",AmberTint:"#D8E0D0",PdfFill:"#E0C8C0",PdfText:"#CC3300"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],95:[function(e,t,o){t.exports={Hash:"evening",Name:"Evening",Category:"Grey",Version:"0.0.1",Description:"Medium grey, transitional Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#484848",Secondary:"#3C3C3C",Tertiary:"#424242",Panel:"#454545",Viewer:"#363636",Hover:"#525252",Selected:"#606060",Thumb:"#3C3C3C"},Text:{Primary:"#E0E0E0",Secondary:"#D0D0D0",Muted:"#A0A0A0",Dim:"#888888",Placeholder:"#707070"},Brand:{Accent:"#C0C0C0",AccentHover:"#E0E0E0"},Border:{Default:"#585858",Light:"#606060"},Status:{Danger:"#FF6666",DangerMuted:"#AA6666"},Scrollbar:{Track:"#585858",Hover:"#686868"},Selection:{Background:"rgba(192, 192, 192, 0.25)"},Focus:{Outline:"#C0C0C0"},Syntax:{Keyword:"#B894FF",String:"#A8D8B0",Number:"#FFB880",Comment:"#8A8A8A",Operator:"#7EC0FF",Punctuation:"#BBBBBB",Function:"#FFCC80",Variable:"#DDDDDD",Type:"#FFB880",Builtin:"#FFB880",Property:"#FF9494",Tag:"#FF9494",AttrName:"#FFB880",AttrValue:"#A8D8B0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0D0D0",Accent:"#C0C0C0",Muted:"#888888",Light:"#424242",WarmBeige:"#484848",TealTint:"#3E3E3E",Lavender:"#444444",AmberTint:"#4A4640",PdfFill:"#4A3C3C",PdfText:"#FF6666"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],96:[function(e,t,o){t.exports={Hash:"flow-blueprint",Name:"Flow Blueprint",Version:"0.0.1",Description:"Technical-drawing aesthetic — white-on-navy with yellow selection. Single-mode (always dark blueprint).",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1a3a6a",Secondary:"#142e54",Tertiary:"rgba(255,255,255,0.1)",Panel:"#1a3a6a",Hover:"rgba(255,255,255,0.06)",Selected:"rgba(255,221,68,0.18)"},Text:{Primary:"#ffffff",Secondary:"rgba(255,255,255,0.7)",Muted:"rgba(255,255,255,0.5)",OnBrand:"#0d2244"},Brand:{Primary:"#ffdd44",PrimaryHover:"#ffe978",Accent:"#88ffbb"},Border:{Default:"rgba(255,255,255,0.6)",Light:"rgba(255,255,255,0.15)",Strong:"#ffffff"},Status:{Success:"#88ffbb",Warning:"#ffdd44",Error:"#ff8888",Info:"#88bbff"},Scrollbar:{Track:"rgba(255,255,255,0.05)",Thumb:"rgba(255,255,255,0.3)",Hover:"rgba(255,255,255,0.5)"},Focus:{Outline:"#ffdd44"},Shadow:{Color:"rgba(0, 0, 0, 0.4)"}}},Brand:{Name:"Flow Blueprint",Tagline:"Technical drawing on navy"}}},{}],97:[function(e,t,o){t.exports={Hash:"flow-modern",Name:"Flow Modern",Version:"0.0.1",Description:"The default modern look for pict-section-flow — clean, theme-neutral. Paired light/dark.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#1a1a1a"},Secondary:{Light:"#f5f5f5",Dark:"#242424"},Tertiary:{Light:"#ecf0f1",Dark:"#2e2e2e"},Panel:{Light:"#ffffff",Dark:"#222222"},Hover:{Light:"#eef3f7",Dark:"#2a2a2a"},Selected:{Light:"#dde7f3",Dark:"#2a3550"}},Text:{Primary:{Light:"#2c3e50",Dark:"#ededed"},Secondary:{Light:"#7f8c8d",Dark:"#bdbdbd"},Muted:{Light:"#95a5a6",Dark:"#888888"},OnBrand:{Light:"#ffffff",Dark:"#1a1a1a"}},Brand:{Primary:{Light:"#2255aa",Dark:"#5b8aff"},PrimaryHover:{Light:"#1a4488",Dark:"#7ba4ff"},Accent:{Light:"#1abc9c",Dark:"#4fd1b5"}},Border:{Default:{Light:"#bdc3c7",Dark:"#3a3a3a"},Light:{Light:"#ecf0f1",Dark:"#2c2c2c"},Strong:{Light:"#95a5a6",Dark:"#5a5a5a"}},Status:{Success:{Light:"#27ae60",Dark:"#5fc377"},Warning:{Light:"#f39c12",Dark:"#f0b84a"},Error:{Light:"#e74c3c",Dark:"#ff7373"},Info:{Light:"#3498db",Dark:"#5fb4ff"}},Scrollbar:{Track:{Light:"#ecf0f1",Dark:"#1f1f1f"},Thumb:{Light:"#bdc3c7",Dark:"#3f3f3f"},Hover:{Light:"#95a5a6",Dark:"#5a5a5a"}},Focus:{Outline:{Light:"#2255aa",Dark:"#5b8aff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}}}},Brand:{Name:"Flow Modern",Tagline:"Clean modern flow editor look"}}},{}],98:[function(e,t,o){t.exports={Hash:"flow-mono",Name:"Flow Mono",Version:"0.0.1",Description:"High-contrast monochrome flow editor look. Paired light/dark — pure black on white or white on black.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#000000"},Secondary:{Light:"#f0f0f0",Dark:"#1a1a1a"},Tertiary:{Light:"#e0e0e0",Dark:"#262626"},Panel:{Light:"#ffffff",Dark:"#000000"},Hover:{Light:"#eeeeee",Dark:"#1f1f1f"},Selected:{Light:"#dddddd",Dark:"#333333"}},Text:{Primary:{Light:"#000000",Dark:"#ffffff"},Secondary:{Light:"#444444",Dark:"#cccccc"},Muted:{Light:"#888888",Dark:"#888888"},OnBrand:{Light:"#ffffff",Dark:"#000000"}},Brand:{Primary:{Light:"#444444",Dark:"#bbbbbb"},PrimaryHover:{Light:"#222222",Dark:"#dddddd"},Accent:{Light:"#666666",Dark:"#999999"}},Border:{Default:{Light:"#000000",Dark:"#ffffff"},Light:{Light:"#cccccc",Dark:"#333333"},Strong:{Light:"#000000",Dark:"#ffffff"}},Status:{Success:{Light:"#000000",Dark:"#ffffff"},Warning:{Light:"#000000",Dark:"#ffffff"},Error:{Light:"#000000",Dark:"#ffffff"},Info:{Light:"#000000",Dark:"#ffffff"}},Scrollbar:{Track:{Light:"#f0f0f0",Dark:"#1a1a1a"},Thumb:{Light:"#888888",Dark:"#888888"},Hover:{Light:"#444444",Dark:"#cccccc"}},Focus:{Outline:{Light:"#000000",Dark:"#ffffff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.25)",Dark:"rgba(255, 255, 255, 0.25)"}}}},Brand:{Name:"Flow Mono",Tagline:"Monochrome ink-on-paper"}}},{}],99:[function(e,t,o){t.exports={Hash:"flow-retro-80s",Name:"Flow Retro 80s",Version:"0.0.1",Description:"Neon-on-purple synthwave aesthetic for the flow editor. Single-mode (always dark) — '80s arcade glow.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0a0015",Secondary:"#1a0a2e",Tertiary:"#2a0a4e",Panel:"#1a0a2e",Hover:"#2a0a4e",Selected:"#3a1466"},Text:{Primary:"#00ffff",Secondary:"#ff66ff",Muted:"#9966cc",OnBrand:"#0a0015"},Brand:{Primary:"#ff00ff",PrimaryHover:"#ff66ff",Accent:"#00ffff"},Border:{Default:"#ff00ff",Light:"#2a0a4e",Strong:"#ff00ff"},Status:{Success:"#00ff66",Warning:"#ffdd44",Error:"#ff4477",Info:"#00ffff"},Scrollbar:{Track:"#1a0a2e",Thumb:"#ff00ff",Hover:"#ff66ff"},Focus:{Outline:"#00ffff"},Shadow:{Color:"rgba(255, 0, 255, 0.4)"}}},Brand:{Name:"Flow Retro 80s",Tagline:"Neon synthwave glow"}}},{}],100:[function(e,t,o){t.exports={Hash:"flow-retro-90s",Name:"Flow Retro 90s",Version:"0.0.1",Description:"Windows-95 aesthetic — gray panels, navy title bars, teal desktop. Single-mode (always its specific palette).",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#008080",Secondary:"#c0c0c0",Tertiary:"#d0d0d0",Panel:"#c0c0c0",Hover:"#d0d0d0",Selected:"#a8c8e0"},Text:{Primary:"#000000",Secondary:"#404040",Muted:"#606060",OnBrand:"#ffffff"},Brand:{Primary:"#000080",PrimaryHover:"#0000a0",Accent:"#008000"},Border:{Default:"#808080",Light:"#a0a0a0",Strong:"#404040"},Status:{Success:"#008000",Warning:"#808000",Error:"#800000",Info:"#000080"},Scrollbar:{Track:"#c0c0c0",Thumb:"#808080",Hover:"#404040"},Focus:{Outline:"#008080"},Shadow:{Color:"#404040"}}},Brand:{Name:"Flow Retro 90s",Tagline:"Workstation chrome from the 90s"}}},{}],101:[function(e,t,o){t.exports={Hash:"flow-sketch",Name:"Flow Sketch",Version:"0.0.1",Description:"Warm-paper sketch aesthetic for the flow editor. Single-mode (always light) — sketches live on paper.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#fffef5",Secondary:"#faf8ed",Tertiary:"#f0ece0",Panel:"#fffef5",Hover:"#f4f0e2",Selected:"#e8dfc8"},Text:{Primary:"#333333",Secondary:"#555555",Muted:"#888888",OnBrand:"#ffffff"},Brand:{Primary:"#2255aa",PrimaryHover:"#1a4488",Accent:"#c47b5a"},Border:{Default:"#444444",Light:"#ccccaa",Strong:"#222222"},Status:{Success:"#55aa77",Warning:"#d4a040",Error:"#c44836",Info:"#5577bb"},Scrollbar:{Track:"#f0ece0",Thumb:"#c5c0a8",Hover:"#9e9a82"},Focus:{Outline:"#2255aa"},Shadow:{Color:"rgba(0, 0, 0, 0.08)"}}},Brand:{Name:"Flow Sketch",Tagline:"Hand-drawn paper aesthetic"}}},{}],102:[function(e,t,o){t.exports={Hash:"flow-whiteboard",Name:"Flow Whiteboard",Version:"0.0.1",Description:"Minimal whiteboard aesthetic — transparent fills with colored brackets per node type. Single-mode (light).",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#ffffff",Secondary:"#fafafa",Tertiary:"#f5f5f5",Panel:"#ffffff",Hover:"#f0f0f0",Selected:"#e0eaff"},Text:{Primary:"#333333",Secondary:"#555555",Muted:"#999999",OnBrand:"#ffffff"},Brand:{Primary:"#2255aa",PrimaryHover:"#1a4488",Accent:"#1abc9c"},Border:{Default:"#888888",Light:"#cccccc",Strong:"#555555"},Status:{Success:"#27ae60",Warning:"#f39c12",Error:"#e74c3c",Info:"#3498db"},Scrollbar:{Track:"#f5f5f5",Thumb:"#cccccc",Hover:"#888888"},Focus:{Outline:"#2255aa"},Shadow:{Color:"rgba(0, 0, 0, 0.06)"}}},Brand:{Name:"Flow Whiteboard",Tagline:"Minimal whiteboard sketching"}}},{}],103:[function(e,t,o){t.exports={Hash:"forest",Name:"Forest",Category:"Fun",Version:"0.0.1",Description:"Deep greens and earth browns Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A2018",Secondary:"#141A12",Tertiary:"#1E2620",Panel:"#1C221A",Viewer:"#101410",Hover:"#283828",Selected:"#344834",Thumb:"#141A12"},Text:{Primary:"#D0DCC8",Secondary:"#B0C4A8",Muted:"#809878",Dim:"#607858",Placeholder:"#486040"},Brand:{Accent:"#6AAF5C",AccentHover:"#88CC78"},Border:{Default:"#2A3A28",Light:"#3A4A38"},Status:{Danger:"#CC4422",DangerMuted:"#884422"},Scrollbar:{Track:"#2A3A28",Hover:"#3A4A38"},Selection:{Background:"rgba(106, 175, 92, 0.25)"},Focus:{Outline:"#6AAF5C"},Syntax:{Keyword:"#D4E157",String:"#A5D6A7",Number:"#FFB74D",Comment:"#5D6F58",Operator:"#80CBC4",Punctuation:"#A8C8A0",Function:"#FFCC80",Variable:"#C8E6C9",Type:"#FFB74D",Builtin:"#FFB74D",Property:"#FF8A65",Tag:"#FF8A65",AttrName:"#FFB74D",AttrValue:"#A5D6A7"}},Typography:{Family:{Sans:"'Palatino Linotype', 'Book Antiqua', Palatino, serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#B0C4A8",Accent:"#6AAF5C",Muted:"#607858",Light:"#1E2620",WarmBeige:"#22281E",TealTint:"#1A221A",Lavender:"#1E2420",AmberTint:"#262218",PdfFill:"#261A18",PdfText:"#CC4422"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],104:[function(e,t,o){t.exports={Hash:"hotdog",Name:"Hotdog",Category:"Fun",Version:"0.0.1",Description:"Red and mustard yellow, garish Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#8B0000",Secondary:"#6B0000",Tertiary:"#7B0000",Panel:"#750000",Viewer:"#550000",Hover:"#AA1111",Selected:"#BB3300",Thumb:"#6B0000"},Text:{Primary:"#FFD700",Secondary:"#FFC000",Muted:"#CC9900",Dim:"#AA7700",Placeholder:"#886600"},Brand:{Accent:"#FFD700",AccentHover:"#FFEE44"},Border:{Default:"#AA2222",Light:"#BB3333"},Status:{Danger:"#FFFF00",DangerMuted:"#CCCC00"},Scrollbar:{Track:"#AA2222",Hover:"#CC3333"},Selection:{Background:"rgba(255, 215, 0, 0.3)"},Focus:{Outline:"#FFD700"},Syntax:{Keyword:"#FFD800",String:"#FFFFFF",Number:"#FFD800",Comment:"#9C2828",Operator:"#FFD800",Punctuation:"#FFFFFF",Function:"#FFD800",Variable:"#FFFFFF",Type:"#FFD800",Builtin:"#FFD800",Property:"#FFD800",Tag:"#FFD800",AttrName:"#FFD800",AttrValue:"#FFFFFF"}},Typography:{Family:{Sans:"Impact, 'Arial Black', sans-serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#FFC000",Accent:"#FFD700",Muted:"#AA7700",Light:"#7B0000",WarmBeige:"#800000",TealTint:"#6B0000",Lavender:"#780000",AmberTint:"#7A1000",PdfFill:"#6B0000",PdfText:"#FFFF00"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.407Z",CompilerVersion:1}},{}],105:[function(e,t,o){t.exports={Hash:"mobile-debug",Name:"Mobile Container Debug",Category:"Debug",Version:"0.0.1",Description:"Unique color per container for layout debugging Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#FF0000",Secondary:"#00CCCC",Tertiary:"#00AA00",Panel:"#FFAA00",Viewer:"#333333",Hover:"rgba(255, 255, 255, 0.2)",Selected:"rgba(255, 255, 255, 0.3)",Thumb:"#AA00AA"},Text:{Primary:"#FFFFFF",Secondary:"#EEEEEE",Muted:"#CCCCCC",Dim:"#AAAAAA",Placeholder:"#888888"},Brand:{Accent:"#FFFF00",AccentHover:"#FFFF88"},Border:{Default:"#FFFFFF",Light:"#CCCCCC"},Status:{Danger:"#FF0000",DangerMuted:"#CC4444"},Scrollbar:{Track:"#888888",Hover:"#AAAAAA"},Selection:{Background:"rgba(255, 255, 0, 0.3)"},Focus:{Outline:"#FFFF00"},Syntax:{Keyword:"#A626A4",String:"#50A14F",Number:"#986801",Comment:"#A0A1A7",Operator:"#0184BC",Punctuation:"#383A42",Function:"#4078F2",Variable:"#383A42",Type:"#C18401",Builtin:"#986801",Property:"#E45649",Tag:"#E45649",AttrName:"#986801",AttrValue:"#50A14F"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#FFFFFF",Accent:"#FFFF00",Muted:"#CCCCCC",Light:"#333333",WarmBeige:"#FFAA00",TealTint:"#00CCCC",Lavender:"#AA00AA",AmberTint:"#FFAA00",PdfFill:"#FF4444",PdfText:"#FFFFFF"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],106:[function(e,t,o){t.exports={Hash:"neo-tokyo",Name:"Neo-Tokyo",Category:"Fun",Version:"0.0.1",Description:"Neon pink on dark navy Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0D0D2B",Secondary:"#080820",Tertiary:"#121235",Panel:"#0F0F28",Viewer:"#060615",Hover:"#1A1A42",Selected:"#2A1845",Thumb:"#080820"},Text:{Primary:"#E8E0F0",Secondary:"#D0C8E0",Muted:"#9088A8",Dim:"#6860A0",Placeholder:"#504888"},Brand:{Accent:"#FF2D8A",AccentHover:"#FF5AA0"},Border:{Default:"#2A2050",Light:"#382868"},Status:{Danger:"#FF4466",DangerMuted:"#AA3355"},Scrollbar:{Track:"#2A2050",Hover:"#3A3068"},Selection:{Background:"rgba(255, 45, 138, 0.25)"},Focus:{Outline:"#FF2D8A"},Syntax:{Keyword:"#FF4E9F",String:"#A1FFCE",Number:"#FFD93D",Comment:"#807A9E",Operator:"#7DF9FF",Punctuation:"#C0BCEB",Function:"#FFCC80",Variable:"#E0D8FF",Type:"#FFD93D",Builtin:"#FFD93D",Property:"#FF6E6E",Tag:"#FF6E6E",AttrName:"#FFD93D",AttrValue:"#A1FFCE"}},Typography:{Family:{Sans:"'Courier New', monospace",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0C8E0",Accent:"#FF2D8A",Muted:"#6860A0",Light:"#121235",WarmBeige:"#141438",TealTint:"#100E30",Lavender:"#141232",AmberTint:"#1A1228",PdfFill:"#1A1028",PdfText:"#FF4466"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],107:[function(e,t,o){t.exports={Hash:"night",Name:"Night",Category:"Grey",Version:"0.0.1",Description:"Near-black, minimal contrast Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#0A0A0A",Secondary:"#060606",Tertiary:"#0E0E0E",Panel:"#0C0C0C",Viewer:"#040404",Hover:"#161616",Selected:"#252525",Thumb:"#060606"},Text:{Primary:"#888888",Secondary:"#707070",Muted:"#555555",Dim:"#444444",Placeholder:"#333333"},Brand:{Accent:"#666666",AccentHover:"#808080"},Border:{Default:"#1A1A1A",Light:"#222222"},Status:{Danger:"#AA4444",DangerMuted:"#663333"},Scrollbar:{Track:"#1A1A1A",Hover:"#2A2A2A"},Selection:{Background:"rgba(102, 102, 102, 0.2)"},Focus:{Outline:"#666666"},Syntax:{Keyword:"#C28FFF",String:"#B0E0B0",Number:"#FFA070",Comment:"#888888",Operator:"#80C8FF",Punctuation:"#BBBBBB",Function:"#FFD080",Variable:"#DDDDDD",Type:"#FFB870",Builtin:"#FFB870",Property:"#FF9090",Tag:"#FF9090",AttrName:"#FFB870",AttrValue:"#B0E0B0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#707070",Accent:"#666666",Muted:"#444444",Light:"#0E0E0E",WarmBeige:"#121212",TealTint:"#0C0C0C",Lavender:"#101010",AmberTint:"#141210",PdfFill:"#141010",PdfText:"#AA4444"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],108:[function(e,t,o){t.exports={Hash:"ocean",Name:"Ocean",Version:"0.0.1",Description:"Cool blue-greens (180-235°) with warm coral / amber punctuation (5-30°). Paired light/dark; feels like sea + sun on the horizon.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#f4f9fb",Dark:"#0e1820"},Secondary:{Light:"#e8f1f5",Dark:"#15212b"},Tertiary:{Light:"#dde9ee",Dark:"#1f2c38"},Panel:{Light:"#ffffff",Dark:"#1a2632"},Hover:{Light:"#e0eef3",Dark:"#26323f"},Selected:{Light:"#c8e1ea",Dark:"#1e3a48"}},Text:{Primary:{Light:"#0e2832",Dark:"#e1ecf0"},Secondary:{Light:"#3a5662",Dark:"#a8c0c8"},Muted:{Light:"#6c828b",Dark:"#7a8e96"},Placeholder:{Light:"#90a4ad",Dark:"#5a6e76"}},Brand:{Primary:{Light:"#0e7c8a",Dark:"#4dc4d4"},PrimaryHover:{Light:"#0a6371",Dark:"#6dd4e2"},Accent:{Light:"#e8a050",Dark:"#f0b878"}},Border:{Default:{Light:"#c0d5dc",Dark:"#2c3d49"},Light:{Light:"#d8e6ec",Dark:"#1f2c38"},Strong:{Light:"#90b0bc",Dark:"#4a6470"}},Status:{Success:{Light:"#1f8a52",Dark:"#4dc97a"},Warning:{Light:"#d68910",Dark:"#f0b020"},Error:{Light:"#c93a3a",Dark:"#ff6464"},Info:{Light:"#0e7c8a",Dark:"#4dc4d4"}},Data:{1:{Light:"#0e7c8a",Dark:"#4dc4d4"},2:{Light:"#e8a050",Dark:"#f0b878"},3:{Light:"#1f8a52",Dark:"#4dc97a"},4:{Light:"#c93a3a",Dark:"#ff6464"},5:{Light:"#b07bac",Dark:"#cda6cf"},6:{Light:"#d68910",Dark:"#f0b020"},7:{Light:"#5a7f9e",Dark:"#82a0c4"},8:{Light:"#6c828b",Dark:"#a8c0c8"}},Scrollbar:{Track:{Light:"#dde9ee",Dark:"#15212b"},Thumb:{Light:"#a8c2cc",Dark:"#324658"},Hover:{Light:"#7a99a4",Dark:"#506876"}},Selection:{Background:{Light:"#c8e1ea",Dark:"#1e3a48"},Text:{Light:"#0e2832",Dark:"#e1ecf0"}},Focus:{Outline:{Light:"#0e7c8a",Dark:"#4dc4d4"}},Shadow:{Color:{Light:"rgba(14, 40, 50, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#0e7c8a",Dark:"#4dc4d4"},String:{Light:"#1f8a52",Dark:"#4dc97a"},Number:{Light:"#d68910",Dark:"#f0b020"},Comment:{Light:"#90a4ad",Dark:"#5a6e76"},Operator:{Light:"#3a5662",Dark:"#a8c0c8"},Punctuation:{Light:"#3a5662",Dark:"#a8c0c8"},Function:{Light:"#0e7c8a",Dark:"#4dc4d4"},Variable:{Light:"#0e2832",Dark:"#e1ecf0"},Type:{Light:"#e8a050",Dark:"#f0b878"},Builtin:{Light:"#d68910",Dark:"#f0b020"},Property:{Light:"#c93a3a",Dark:"#ff6464"},Tag:{Light:"#c93a3a",Dark:"#ff6464"},AttrName:{Light:"#d68910",Dark:"#f0b020"},AttrValue:{Light:"#1f8a52",Dark:"#4dc97a"}},Editor:{LineNumberBackground:{Light:"#e8f1f5",Dark:"#15212b"},LineNumberText:{Light:"#90a4ad",Dark:"#5a6e76"},CurrentLineHighlight:{Light:"#e0eef3",Dark:"#26323f"},SelectionBackground:{Light:"#c8e1ea",Dark:"#1e3a48"},GutterBorder:{Light:"#d8e6ec",Dark:"#1f2c38"}}},Typography:{Family:{Sans:"system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",Serif:"Georgia, Cambria, Times New Roman, Times, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.45",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Shadow:{SM:"0 1px 2px var(--theme-color-shadow-color)",MD:"0 2px 6px var(--theme-color-shadow-color)",LG:"0 6px 18px var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"100ms",Normal:"200ms",Slow:"400ms"}},Brand:{Name:"Ocean",Tagline:"Cool waters, warm sun"}}},{}],109:[function(e,t,o){t.exports={Hash:"pict-default",Name:"Pict Default",Version:"0.0.1",Description:"The reference paired light/dark theme for pict-based applications. Neutral palette suitable for any app; dark mode is mid-grey rather than pure black to reduce eye strain.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#1a1a1a"},Secondary:{Light:"#f5f5f5",Dark:"#242424"},Tertiary:{Light:"#ebebeb",Dark:"#2e2e2e"},Panel:{Light:"#ffffff",Dark:"#222222"},Hover:{Light:"#f0f0f0",Dark:"#2a2a2a"},Selected:{Light:"#e0eaff",Dark:"#2a3550"}},Text:{Primary:{Light:"#1a1a1a",Dark:"#ededed"},Secondary:{Light:"#454545",Dark:"#bdbdbd"},Muted:{Light:"#6b6b6b",Dark:"#888888"},Placeholder:{Light:"#9a9a9a",Dark:"#6a6a6a"}},Brand:{Primary:{Light:"#3357c7",Dark:"#6b8eff"},PrimaryHover:{Light:"#2848b3",Dark:"#88a4ff"},Accent:{Light:"#c75033",Dark:"#ff8a6b"}},Border:{Default:{Light:"#d6d6d6",Dark:"#3a3a3a"},Light:{Light:"#e9e9e9",Dark:"#2c2c2c"},Strong:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Status:{Success:{Light:"#2e7a3a",Dark:"#5fc377"},Warning:{Light:"#a86b00",Dark:"#f0b84a"},Error:{Light:"#b62828",Dark:"#ff7373"},Info:{Light:"#1f6fb5",Dark:"#5fb4ff"}},Data:{1:{Light:"#3357c7",Dark:"#6b8eff"},2:{Light:"#c75033",Dark:"#ff8a6b"},3:{Light:"#2e7a3a",Dark:"#5fc377"},4:{Light:"#a86b00",Dark:"#f0b84a"},5:{Light:"#6b3aac",Dark:"#b08eff"},6:{Light:"#1f6fb5",Dark:"#5fb4ff"},7:{Light:"#c63a8e",Dark:"#ff7fb6"},8:{Light:"#6b6b6b",Dark:"#bdbdbd"}},Scrollbar:{Track:{Light:"#ebebeb",Dark:"#1f1f1f"},Thumb:{Light:"#c2c2c2",Dark:"#3f3f3f"},Hover:{Light:"#a0a0a0",Dark:"#5a5a5a"}},Selection:{Background:{Light:"#bcd2ff",Dark:"#3a4f7a"},Text:{Light:"#1a1a1a",Dark:"#ededed"}},Focus:{Outline:{Light:"#3357c7",Dark:"#6b8eff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}},Editor:{LineNumberBackground:{Light:"#f5f5f5",Dark:"#1f1f1f"},LineNumberText:{Light:"#9a9a9a",Dark:"#6a6a6a"},CurrentLineHighlight:{Light:"#f0f0f0",Dark:"#2a2a2a"},SelectionBackground:{Light:"#bcd2ff",Dark:"#3a4f7a"},GutterBorder:{Light:"#e9e9e9",Dark:"#2c2c2c"}}},Typography:{Family:{Sans:"system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",Serif:"Georgia, Cambria, Times New Roman, Times, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.45",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Shadow:{SM:"0 1px 2px var(--theme-color-shadow-color)",MD:"0 2px 6px var(--theme-color-shadow-color)",LG:"0 6px 18px var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"100ms",Normal:"200ms",Slow:"400ms"}},Brand:{Name:"Pict",Tagline:"A JavaScript MVC framework for building web applications."},CSS:[{Hash:"pict-default-brand-accents",Priority:600,Content:"/* pict-default — subtle brand-aware accents.\n Falls back gracefully to theme-color tokens when no brand is registered,\n so non-branded apps still look right. */\na { text-decoration-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, currentColor)); text-decoration-thickness: 2px; text-underline-offset: 3px; }\nh1 { border-bottom: 2px solid var(--brand-color-primary-mode, var(--theme-color-border-default, transparent)); padding-bottom: 6px; }\nh2 { border-bottom: 1px solid var(--brand-color-secondary-mode, var(--theme-color-border-light, transparent)); padding-bottom: 4px; }"}]}},{}],110:[function(e,t,o){t.exports={Hash:"playground-corp",Name:"Playground Corp",Version:"0.0.1",Description:"A different paired starter — corporate teal palette, rounder corners.",Comprehensive:!0,Modes:{Strategy:"system",Default:"light"},Tokens:{Color:{Background:{Primary:{Light:"#fbfbfd",Dark:"#0e1416"},Secondary:{Light:"#eef3f6",Dark:"#152024"},Tertiary:{Light:"#dde7ec",Dark:"#1e2c30"},Panel:{Light:"#ffffff",Dark:"#162126"},Hover:{Light:"#e5edf1",Dark:"#1d292e"}},Text:{Primary:{Light:"#0a1d22",Dark:"#e3edf0"},Secondary:{Light:"#3a5b65",Dark:"#a8c0c8"},Muted:{Light:"#647e87",Dark:"#7a929a"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Brand:{Primary:{Light:"#117a8b",Dark:"#3ec0d4"},PrimaryHover:{Light:"#0e6271",Dark:"#5fd0e0"},Accent:{Light:"#d97706",Dark:"#fb923c"}},Border:{Default:{Light:"#cfdce1",Dark:"#2c3a3f"},Strong:{Light:"#86a3ac",Dark:"#4d5e64"}},Status:{Success:{Light:"#0f7a52",Dark:"#34d399"},Warning:{Light:"#b45309",Dark:"#fbbf24"},Error:{Light:"#9f1239",Dark:"#fb7185"},Info:{Light:"#1e6fbe",Dark:"#60a5fa"}},Syntax:{Keyword:{Light:"#a626a4",Dark:"#c678dd"},String:{Light:"#50a14f",Dark:"#98c379"},Number:{Light:"#986801",Dark:"#d19a66"},Comment:{Light:"#a0a1a7",Dark:"#7f848e"},Operator:{Light:"#0184bc",Dark:"#56b6c2"},Punctuation:{Light:"#383a42",Dark:"#abb2bf"},Function:{Light:"#4078f2",Dark:"#61afef"},Variable:{Light:"#383a42",Dark:"#e06c75"},Type:{Light:"#c18401",Dark:"#e5c07b"},Builtin:{Light:"#986801",Dark:"#d19a66"},Property:{Light:"#e45649",Dark:"#e06c75"},Tag:{Light:"#e45649",Dark:"#e06c75"},AttrName:{Light:"#986801",Dark:"#d19a66"},AttrValue:{Light:"#50a14f",Dark:"#98c379"}}},Typography:{Family:{Sans:"Inter, system-ui, sans-serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{SM:"0.875rem",MD:"1rem",LG:"1.25rem"},Weight:{Regular:"400",Bold:"700"}},Spacing:{XS:"4px",SM:"8px",MD:"14px",LG:"20px",XL:"28px"},Radius:{SM:"4px",MD:"10px",LG:"16px"}},Brand:{Name:"Corp"},Aliases:{"--pict-modal-overlay-bg":"Color.Background.Tertiary","--pict-modal-bg":"Color.Background.Panel","--pict-modal-fg":"Color.Text.Primary","--pict-modal-border":"Color.Border.Default","--pict-modal-shadow":"Color.Border.Strong","--pict-modal-header-bg":"Color.Background.Secondary","--pict-modal-header-fg":"Color.Text.Primary","--pict-modal-header-border":"Color.Border.Default","--pict-modal-btn-bg":"Color.Background.Secondary","--pict-modal-btn-fg":"Color.Text.Primary","--pict-modal-btn-hover-bg":"Color.Background.Hover","--pict-modal-btn-primary-bg":"Color.Brand.Primary","--pict-modal-btn-primary-fg":"Color.Text.OnBrand","--pict-modal-btn-primary-hover-bg":"Color.Brand.PrimaryHover","--pict-modal-btn-danger-bg":"Color.Status.Error","--pict-modal-btn-danger-fg":"Color.Text.OnBrand","--pict-modal-btn-danger-hover-bg":"Color.Status.Error","--pict-modal-toast-bg":"Color.Background.Panel","--pict-modal-toast-fg":"Color.Text.Primary","--pict-modal-toast-shadow":"Color.Border.Strong","--pict-modal-toast-success-bg":"Color.Status.Success","--pict-modal-toast-error-bg":"Color.Status.Error","--pict-modal-toast-warning-bg":"Color.Status.Warning","--pict-modal-toast-info-bg":"Color.Status.Info","--pict-modal-tooltip-bg":"Color.Background.Tertiary","--pict-modal-tooltip-fg":"Color.Text.Primary","--pict-modal-font-family":"Typography.Family.Sans","--pict-um-bg":"Color.Background.Panel","--pict-um-fg":"Color.Text.Primary","--pict-um-muted":"Color.Text.Muted","--pict-um-accent":"Color.Brand.Primary","--pict-um-border":"Color.Border.Default","--pict-um-border-soft":"Color.Border.Light","--pict-um-input-bg":"Color.Background.Primary","--pict-um-pill-bg":"Color.Background.Tertiary","--pict-um-font":"Typography.Family.Sans"}}},{}],111:[function(e,t,o){t.exports={Hash:"retold-content-system",Name:"Retold Content System",Version:"0.0.1",Description:"Default palette for the Retold Content System editor — warm beige with teal accents. Light side preserves the original retold-content-system.css palette verbatim; dark side keeps the teal accent and warms the backgrounds into a deep walnut/charcoal range so dark mode reads as the same family of values rather than a generic dark theme.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#F5F3EE",Dark:"#1F1B17"},Secondary:{Light:"#FAF8F4",Dark:"#2A251F"},Tertiary:{Light:"#F0EDE8",Dark:"#332D26"},Panel:{Light:"#FFFFFF",Dark:"#26221C"},Hover:{Light:"#EDE9E3",Dark:"#383028"},Selected:{Light:"#DCE9E7",Dark:"#1E3833"}},Text:{Primary:{Light:"#3D3229",Dark:"#E8DCC8"},Secondary:{Light:"#5E5549",Dark:"#C0B5A4"},Muted:{Light:"#8A7F72",Dark:"#8E8478"},Placeholder:{Light:"#A89E91",Dark:"#6E6457"},OnBrand:{Light:"#FFFFFF",Dark:"#1F1B17"}},Brand:{Primary:{Light:"#2E7D74",Dark:"#4FB3A6"},PrimaryHover:{Light:"#3A9E92",Dark:"#65CBBE"},Accent:{Light:"#2E7D74",Dark:"#4FB3A6"},AccentHover:{Light:"#3A9E92",Dark:"#65CBBE"}},Border:{Default:{Light:"#DDD6CA",Dark:"#3F362C"},Light:{Light:"#E8E2D7",Dark:"#33291F"},Strong:{Light:"#C4BDB0",Dark:"#5A4F40"}},Status:{Success:{Light:"#7BC47F",Dark:"#8FD493"},Warning:{Light:"#E8A94D",Dark:"#F0BE6E"},Error:{Light:"#D9534F",Dark:"#E87B78"},Info:{Light:"#5DA6C7",Dark:"#7FBDD8"}},Data:{1:{Light:"#2E7D74",Dark:"#4FB3A6"},2:{Light:"#E8A94D",Dark:"#F0BE6E"},3:{Light:"#7BC47F",Dark:"#8FD493"},4:{Light:"#D9534F",Dark:"#E87B78"},5:{Light:"#A07ACC",Dark:"#BCA0DC"},6:{Light:"#5DA6C7",Dark:"#7FBDD8"},7:{Light:"#C46B8A",Dark:"#D8919E"},8:{Light:"#8A7F72",Dark:"#B8AFA4"}},Scrollbar:{Track:{Light:"#F5F0E8",Dark:"#26221C"},Thumb:{Light:"#C4BDB0",Dark:"#4A4036"},Hover:{Light:"#8A7F72",Dark:"#6A5F50"}},Selection:{Background:{Light:"#CDE3E0",Dark:"#2E5B55"},Text:{Light:"#3D3229",Dark:"#E8DCC8"}},Focus:{Outline:{Light:"#2E7D74",Dark:"#4FB3A6"}},Shadow:{Color:{Light:"rgba(61, 50, 41, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#A0532E",Dark:"#E89A6E"},String:{Light:"#3F8A52",Dark:"#8FD493"},Number:{Light:"#A86B00",Dark:"#E8A94D"},Comment:{Light:"#8A7F72",Dark:"#8E8478"},Operator:{Light:"#2E7D74",Dark:"#4FB3A6"},Punctuation:{Light:"#5E5549",Dark:"#C0B5A4"},Function:{Light:"#2E5E96",Dark:"#7FBDD8"},Variable:{Light:"#3D3229",Dark:"#E8DCC8"},Type:{Light:"#A86B00",Dark:"#E8A94D"},Builtin:{Light:"#A86B00",Dark:"#E8A94D"},Property:{Light:"#A0532E",Dark:"#E89A6E"},Tag:{Light:"#A0532E",Dark:"#E89A6E"},AttrName:{Light:"#A86B00",Dark:"#E8A94D"},AttrValue:{Light:"#3F8A52",Dark:"#8FD493"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"250px",TopbarHeight:"48px",StatusbarHeight:"28px"}},Brand:{Name:"Retold Content",Tagline:"Author content for the Retold ecosystem."}}},{}],112:[function(e,t,o){t.exports={Hash:"retold-labs-cyberpunk",Name:"Retold Labs Cyberpunk",Version:"0.0.1",Description:'retold-labs’ neon "cyberpunk" identity — cyan/magenta on near-black (dark) or violet on light. Preserves the original cyberpunk-light / cyberpunk-dark palettes verbatim.',Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#eae8f0",Dark:"#0a0a12"},Secondary:{Light:"#ddd8ea",Dark:"#12101e"},Tertiary:{Light:"#ddd8ea",Dark:"#12101e"},Panel:{Light:"#f4f2fa",Dark:"#1a1628"},Sidebar:{Light:"#1e1430",Dark:"#06060e"},Hover:{Light:"rgba(130, 0, 200, 0.06)",Dark:"rgba(0, 255, 255, 0.08)"},Selected:{Light:"rgba(138, 0, 212, 0.10)",Dark:"rgba(0, 229, 255, 0.12)"}},Text:{Primary:{Light:"#1a1028",Dark:"#e8e0f0"},Secondary:{Light:"#4a3868",Dark:"#b0a8c8"},Muted:{Light:"#7a6a98",Dark:"#6a6488"},Placeholder:{Light:"#7a6a98",Dark:"#6a6488"},OnBrand:{Light:"#d0c8e0",Dark:"#d0c8e0"}},Brand:{Primary:{Light:"#8a00d4",Dark:"#00e5ff"},PrimaryHover:{Light:"#b040f0",Dark:"#60f0ff"},Accent:{Light:"#8a00d4",Dark:"#00e5ff"},AccentHover:{Light:"#b040f0",Dark:"#60f0ff"}},Border:{Default:{Light:"#c8c0d8",Dark:"#2a2440"},Light:{Light:"#c8c0d8",Dark:"#2a2440"},Strong:{Light:"#2a2040",Dark:"#1a1430"}},Status:{Success:{Light:"#00a050",Dark:"#39ff14"},Warning:{Light:"#d41878",Dark:"#ff2ec4"},Error:{Light:"#c82050",Dark:"#ff3860"},Info:{Light:"#8a00d4",Dark:"#00e5ff"}},Scrollbar:{Track:{Light:"#ddd8ea",Dark:"#12101e"},Thumb:{Light:"#c8c0d8",Dark:"#2a2440"},Hover:{Light:"#7a6a98",Dark:"#6a6488"}},Selection:{Background:{Light:"rgba(138, 0, 212, 0.10)",Dark:"rgba(0, 229, 255, 0.12)"},Text:{Light:"#1a1028",Dark:"#e8e0f0"}},Focus:{Outline:{Light:"#8a00d4",Dark:"#00e5ff"}},Shadow:{Color:{Light:"rgba(26, 16, 40, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#8a00d4",Dark:"#00e5ff"},String:{Light:"#00a050",Dark:"#39ff14"},Number:{Light:"#d41878",Dark:"#ff2ec4"},Comment:{Light:"#7a6a98",Dark:"#6a6488"},Operator:{Light:"#8a00d4",Dark:"#00e5ff"},Punctuation:{Light:"#4a3868",Dark:"#b0a8c8"},Function:{Light:"#8a00d4",Dark:"#00e5ff"},Variable:{Light:"#1a1028",Dark:"#e8e0f0"},Type:{Light:"#d41878",Dark:"#ff2ec4"},Builtin:{Light:"#d41878",Dark:"#ff2ec4"},Property:{Light:"#c82050",Dark:"#ff3860"},Tag:{Light:"#8a00d4",Dark:"#00e5ff"},AttrName:{Light:"#d41878",Dark:"#ff2ec4"},AttrValue:{Light:"#00a050",Dark:"#39ff14"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"230px",TopbarHeight:"52px",StatusbarHeight:"28px"}},Brand:{Name:"Retold Labs",Tagline:"Run, compare, and distribute ML experiments across the mesh"}}},{}],113:[function(e,t,o){t.exports={Hash:"retold-labs-retro",Name:"Retold Labs Retro",Version:"0.0.1",Description:'retold-labs’ "retro" identity — amber/green phosphor on dark or sepia/olive on light. Preserves the original retro-light / retro-dark palettes verbatim.',Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#f5f0e0",Dark:"#0c0c08"},Secondary:{Light:"#ebe4d0",Dark:"#161610"},Tertiary:{Light:"#ebe4d0",Dark:"#161610"},Panel:{Light:"#faf6e8",Dark:"#1e1e14"},Sidebar:{Light:"#3a3020",Dark:"#080804"},Hover:{Light:"rgba(140, 80, 20, 0.06)",Dark:"rgba(255, 176, 0, 0.08)"},Selected:{Light:"rgba(140, 80, 20, 0.10)",Dark:"rgba(255, 176, 0, 0.12)"}},Text:{Primary:{Light:"#2e2418",Dark:"#d0c8a0"},Secondary:{Light:"#5c4a30",Dark:"#a09870"},Muted:{Light:"#8a7450",Dark:"#706848"},Placeholder:{Light:"#8a7450",Dark:"#706848"},OnBrand:{Light:"#d8c8a0",Dark:"#c8b870"}},Brand:{Primary:{Light:"#8c5014",Dark:"#ffb000"},PrimaryHover:{Light:"#b06820",Dark:"#ffc840"},Accent:{Light:"#8c5014",Dark:"#ffb000"},AccentHover:{Light:"#b06820",Dark:"#ffc840"}},Border:{Default:{Light:"#d0c4a8",Dark:"#2a2a1e"},Light:{Light:"#d0c4a8",Dark:"#2a2a1e"},Strong:{Light:"#4a4030",Dark:"#1a1a10"}},Status:{Success:{Light:"#2e7830",Dark:"#40c850"},Warning:{Light:"#2e7830",Dark:"#40c850"},Error:{Light:"#a03020",Dark:"#e04030"},Info:{Light:"#8c5014",Dark:"#ffb000"}},Scrollbar:{Track:{Light:"#ebe4d0",Dark:"#161610"},Thumb:{Light:"#d0c4a8",Dark:"#2a2a1e"},Hover:{Light:"#8a7450",Dark:"#706848"}},Selection:{Background:{Light:"rgba(140, 80, 20, 0.10)",Dark:"rgba(255, 176, 0, 0.12)"},Text:{Light:"#2e2418",Dark:"#d0c8a0"}},Focus:{Outline:{Light:"#8c5014",Dark:"#ffb000"}},Shadow:{Color:{Light:"rgba(46, 36, 24, 0.12)",Dark:"rgba(0, 0, 0, 0.55)"}},Syntax:{Keyword:{Light:"#8c5014",Dark:"#ffb000"},String:{Light:"#2e7830",Dark:"#40c850"},Number:{Light:"#2e7830",Dark:"#40c850"},Comment:{Light:"#8a7450",Dark:"#706848"},Operator:{Light:"#8c5014",Dark:"#ffb000"},Punctuation:{Light:"#5c4a30",Dark:"#a09870"},Function:{Light:"#8c5014",Dark:"#ffb000"},Variable:{Light:"#2e2418",Dark:"#d0c8a0"},Type:{Light:"#2e7830",Dark:"#40c850"},Builtin:{Light:"#2e7830",Dark:"#40c850"},Property:{Light:"#a03020",Dark:"#e04030"},Tag:{Light:"#8c5014",Dark:"#ffb000"},AttrName:{Light:"#2e7830",Dark:"#40c850"},AttrValue:{Light:"#2e7830",Dark:"#40c850"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"230px",TopbarHeight:"52px",StatusbarHeight:"28px"}},Brand:{Name:"Retold Labs",Tagline:"Run, compare, and distribute ML experiments across the mesh"}}},{}],114:[function(e,t,o){t.exports={Hash:"retold-labs",Name:"Retold Labs",Version:"0.0.1",Description:'retold-labs’ original "professional" identity — warm beige with teal accents and a deep teal sidebar. Light side preserves professional-light verbatim; dark side preserves professional-dark.',Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#faf6f0",Dark:"#14201e"},Secondary:{Light:"#f0ebe2",Dark:"#1a2c2a"},Tertiary:{Light:"#f0ebe2",Dark:"#1a2c2a"},Panel:{Light:"#ffffff",Dark:"#1e3532"},Sidebar:{Light:"#1a3a3a",Dark:"#0e1a18"},Hover:{Light:"rgba(13, 138, 138, 0.06)",Dark:"rgba(45, 212, 191, 0.08)"},Selected:{Light:"rgba(13, 138, 138, 0.10)",Dark:"rgba(45, 212, 191, 0.12)"}},Text:{Primary:{Light:"#2c2416",Dark:"#e0ebe8"},Secondary:{Light:"#5c4f3d",Dark:"#a8bfb8"},Muted:{Light:"#8a7d6b",Dark:"#6a8a82"},Placeholder:{Light:"#8a7d6b",Dark:"#6a8a82"},OnBrand:{Light:"#c8dcd8",Dark:"#c8dcd8"}},Brand:{Primary:{Light:"#0d8a8a",Dark:"#2dd4bf"},PrimaryHover:{Light:"#14b8a6",Dark:"#5eead4"},Accent:{Light:"#0d8a8a",Dark:"#2dd4bf"},AccentHover:{Light:"#14b8a6",Dark:"#5eead4"}},Border:{Default:{Light:"#ddd5c8",Dark:"#2a4a44"},Light:{Light:"#ddd5c8",Dark:"#2a4a44"},Strong:{Light:"#2a5454",Dark:"#1e3a36"}},Status:{Success:{Light:"#2e9e5a",Dark:"#4ade80"},Warning:{Light:"#e07830",Dark:"#f59e4a"},Error:{Light:"#c9442e",Dark:"#f87171"},Info:{Light:"#0d8a8a",Dark:"#2dd4bf"}},Scrollbar:{Track:{Light:"#f0ebe2",Dark:"#1a2c2a"},Thumb:{Light:"#ddd5c8",Dark:"#2a4a44"},Hover:{Light:"#8a7d6b",Dark:"#6a8a82"}},Selection:{Background:{Light:"rgba(13, 138, 138, 0.10)",Dark:"rgba(45, 212, 191, 0.12)"},Text:{Light:"#2c2416",Dark:"#e0ebe8"}},Focus:{Outline:{Light:"#0d8a8a",Dark:"#2dd4bf"}},Shadow:{Color:{Light:"rgba(44, 36, 22, 0.12)",Dark:"rgba(0, 0, 0, 0.45)"}},Syntax:{Keyword:{Light:"#0d8a8a",Dark:"#2dd4bf"},String:{Light:"#2e9e5a",Dark:"#4ade80"},Number:{Light:"#e07830",Dark:"#f59e4a"},Comment:{Light:"#8a7d6b",Dark:"#6a8a82"},Operator:{Light:"#0d8a8a",Dark:"#2dd4bf"},Punctuation:{Light:"#5c4f3d",Dark:"#a8bfb8"},Function:{Light:"#0d8a8a",Dark:"#2dd4bf"},Variable:{Light:"#2c2416",Dark:"#e0ebe8"},Type:{Light:"#e07830",Dark:"#f59e4a"},Builtin:{Light:"#e07830",Dark:"#f59e4a"},Property:{Light:"#c9442e",Dark:"#f87171"},Tag:{Light:"#0d8a8a",Dark:"#2dd4bf"},AttrName:{Light:"#e07830",Dark:"#f59e4a"},AttrValue:{Light:"#2e9e5a",Dark:"#4ade80"}}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"500",Bold:"700"},LineHeight:{Tight:"1.2",Normal:"1.5",Loose:"1.7"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"2px",MD:"4px",LG:"8px",XL:"12px",Pill:"999px"},Layout:{SidebarWidth:"230px",TopbarHeight:"52px",StatusbarHeight:"28px"}},Brand:{Name:"Retold Labs",Tagline:"Run, compare, and distribute ML experiments across the mesh"}}},{}],115:[function(e,t,o){t.exports={Hash:"retold-manager",Name:"Retold Manager",Description:"Default palette for the Retold Manager application — GitHub-style dark on slate with a parallel light variant. Dark side mirrors retold-manager.css's original colors verbatim; light side is a sympathetic translation tuned for daytime use. The retold-manager.css :root block proxies its --color-* names through these --theme-color-* tokens (with the original hexes as fallbacks), so this theme drives the whole app cleanly and other catalog themes still skin most of it.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#f6f8fa",Dark:"#0e1116"},Secondary:{Light:"#eef1f4",Dark:"#161b22"},Tertiary:{Light:"#e4e8ec",Dark:"#1c2128"},Panel:{Light:"#ffffff",Dark:"#161b22"},PanelAlt:{Light:"#f0f3f6",Dark:"#1c2128"},Hover:{Light:"#eaeef2",Dark:"#1c2128"},Selected:{Light:"#dbe7ff",Dark:"#243454"}},Border:{Default:{Light:"#d0d7de",Dark:"#30363d"},Light:{Light:"#e1e4e8",Dark:"#21262d"},Strong:{Light:"#a8b1bb",Dark:"#484f58"}},Brand:{Primary:{Light:"#0969da",Dark:"#2f81f7"},PrimaryHover:{Light:"#0550ae",Dark:"#1f6feb"},Accent:{Light:"#0969da",Dark:"#2f81f7"},AccentHover:{Light:"#0550ae",Dark:"#1f6feb"}},Text:{Primary:{Light:"#1f2328",Dark:"#e6edf3"},Secondary:{Light:"#3b424a",Dark:"#c9d1d9"},Muted:{Light:"#656d76",Dark:"#8b949e"},Placeholder:{Light:"#8c959f",Dark:"#6e7681"},OnBrand:{Light:"#ffffff",Dark:"#ffffff"}},Status:{Success:{Light:"#1a7f37",Dark:"#3fb950"},Danger:{Light:"#cf222e",Dark:"#f85149"},Warning:{Light:"#9a6700",Dark:"#d29922"},Error:{Light:"#cf222e",Dark:"#f85149"},Info:{Light:"#0969da",Dark:"#2f81f7"}},Data:{1:{Light:"#0969da",Dark:"#2f81f7"},2:{Light:"#cf222e",Dark:"#f85149"},3:{Light:"#1a7f37",Dark:"#3fb950"},4:{Light:"#9a6700",Dark:"#d29922"},5:{Light:"#8250df",Dark:"#a371f7"},6:{Light:"#bf3989",Dark:"#db61a2"},7:{Light:"#1b7c83",Dark:"#39c5cf"},8:{Light:"#656d76",Dark:"#8b949e"}},Scrollbar:{Track:{Light:"#eef1f4",Dark:"#161b22"},Thumb:{Light:"#c1c8cf",Dark:"#30363d"},Hover:{Light:"#a8b1bb",Dark:"#484f58"}},Selection:{Background:{Light:"#cfe6ff",Dark:"#243454"},Text:{Light:"#1f2328",Dark:"#e6edf3"}},Focus:{Outline:{Light:"#0969da",Dark:"#2f81f7"}},Syntax:{Keyword:{Light:"#cf222e",Dark:"#ff7b72"},String:{Light:"#0a3069",Dark:"#a5d6ff"},Number:{Light:"#0550ae",Dark:"#79c0ff"},Comment:{Light:"#6e7781",Dark:"#8b949e"},Operator:{Light:"#cf222e",Dark:"#ff7b72"},Punctuation:{Light:"#24292f",Dark:"#c9d1d9"},Function:{Light:"#8250df",Dark:"#d2a8ff"},Variable:{Light:"#24292f",Dark:"#c9d1d9"},Type:{Light:"#953800",Dark:"#ffa657"},Builtin:{Light:"#0550ae",Dark:"#79c0ff"},Property:{Light:"#0550ae",Dark:"#79c0ff"},Tag:{Light:"#116329",Dark:"#7ee787"},AttrName:{Light:"#8250df",Dark:"#d2a8ff"},AttrValue:{Light:"#0a3069",Dark:"#a5d6ff"}}},Typography:{Family:{Sans:'-apple-system, BlinkMacSystemFont, "SF Pro", "Segoe UI", sans-serif',Mono:'ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace'}},Layout:{SidebarWidth:"280px",TopbarHeight:"44px",StatusbarHeight:"28px"}}}},{}],116:[function(e,t,o){t.exports={Hash:"retold-mono",Name:"Retold Mono",Version:"0.0.2",Description:"High-contrast monochrome theme — black on white in light mode, white on black in dark mode. Useful for print, simple admin tooling, and as a paired-mode reference theme that proves the toggle works on something visually unmistakable.",Comprehensive:!0,Modes:{Strategy:"system",Default:"system"},Tokens:{Color:{Background:{Primary:{Light:"#ffffff",Dark:"#000000"},Secondary:{Light:"#f0f0f0",Dark:"#101010"},Tertiary:{Light:"#e2e2e2",Dark:"#1c1c1c"},Panel:{Light:"#ffffff",Dark:"#000000"},Hover:{Light:"#ebebeb",Dark:"#1a1a1a"},Selected:{Light:"#d6d6d6",Dark:"#2a2a2a"}},Text:{Primary:{Light:"#000000",Dark:"#ffffff"},Secondary:{Light:"#222222",Dark:"#dddddd"},Muted:{Light:"#555555",Dark:"#aaaaaa"},Placeholder:{Light:"#888888",Dark:"#777777"}},Brand:{Primary:{Light:"#000000",Dark:"#ffffff"},PrimaryHover:{Light:"#222222",Dark:"#dddddd"},Accent:{Light:"#444444",Dark:"#bbbbbb"}},Border:{Default:{Light:"#888888",Dark:"#666666"},Light:{Light:"#cccccc",Dark:"#333333"},Strong:{Light:"#000000",Dark:"#ffffff"}},Status:{Success:{Light:"#000000",Dark:"#ffffff"},Warning:{Light:"#000000",Dark:"#ffffff"},Error:{Light:"#000000",Dark:"#ffffff"},Info:{Light:"#000000",Dark:"#ffffff"}},Data:{1:{Light:"#000000",Dark:"#ffffff"},2:{Light:"#262626",Dark:"#e0e0e0"},3:{Light:"#404040",Dark:"#c0c0c0"},4:{Light:"#595959",Dark:"#a0a0a0"},5:{Light:"#737373",Dark:"#808080"},6:{Light:"#8c8c8c",Dark:"#737373"},7:{Light:"#a6a6a6",Dark:"#595959"},8:{Light:"#bfbfbf",Dark:"#404040"}},Scrollbar:{Track:{Light:"#e0e0e0",Dark:"#101010"},Thumb:{Light:"#888888",Dark:"#666666"},Hover:{Light:"#444444",Dark:"#bbbbbb"}},Selection:{Background:{Light:"#000000",Dark:"#ffffff"},Text:{Light:"#ffffff",Dark:"#000000"}},Focus:{Outline:{Light:"#000000",Dark:"#ffffff"}},Shadow:{Color:{Light:"rgba(0, 0, 0, 0.18)",Dark:"rgba(255, 255, 255, 0.18)"}},Syntax:{Keyword:{Light:"#000000",Dark:"#ffffff"},String:{Light:"#555555",Dark:"#cccccc"},Number:{Light:"#000000",Dark:"#ffffff"},Comment:{Light:"#888888",Dark:"#888888"},Operator:{Light:"#000000",Dark:"#ffffff"},Punctuation:{Light:"#444444",Dark:"#bbbbbb"},Function:{Light:"#000000",Dark:"#ffffff"},Variable:{Light:"#000000",Dark:"#ffffff"},Type:{Light:"#222222",Dark:"#dddddd"},Builtin:{Light:"#222222",Dark:"#dddddd"},Property:{Light:"#444444",Dark:"#bbbbbb"},Tag:{Light:"#000000",Dark:"#ffffff"},AttrName:{Light:"#444444",Dark:"#bbbbbb"},AttrValue:{Light:"#555555",Dark:"#cccccc"}}},Typography:{Family:{Sans:"Helvetica, Arial, sans-serif",Serif:"Georgia, Times New Roman, serif",Mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Size:{XS:"0.75rem",SM:"0.875rem",MD:"1rem",LG:"1.125rem",XL:"1.375rem",XXL:"1.75rem"},Weight:{Regular:"400",Medium:"600",Bold:"700"},LineHeight:{Tight:"1.15",Normal:"1.4",Loose:"1.65"}},Spacing:{XS:"4px",SM:"8px",MD:"12px",LG:"16px",XL:"24px",XXL:"32px"},Radius:{None:"0",SM:"0",MD:"0",LG:"0",XL:"0",Pill:"999px"},Shadow:{SM:"0 1px 0 var(--theme-color-shadow-color)",MD:"0 2px 0 var(--theme-color-shadow-color)",LG:"0 4px 0 var(--theme-color-shadow-color)"},ZIndex:{Base:"0",Dropdown:"100",Sticky:"200",Overlay:"900",Modal:"1000",Toast:"2000",Tooltip:"3000"},Duration:{Fast:"0ms",Normal:"0ms",Slow:"0ms"}},Brand:{Name:"Retold Mono",Tagline:"Black on white. White on black. Nothing else."},CSS:[{Hash:"retold-mono-brand-accents",Priority:600,Content:"/* retold-mono — keeps the all-monochrome aesthetic but lets brand colors\n in for narrow accent moments. The thick rule under H1 is brand primary;\n the hair rule under H2 is brand secondary. Without a brand registered\n they fall back to mono black/grey. */\na { text-decoration-color: var(--brand-color-primary-mode, currentColor); text-decoration-thickness: 2px; text-underline-offset: 3px; }\nh1 { border-bottom: 3px solid var(--brand-color-primary-mode, var(--theme-color-text-primary, #000)); padding-bottom: 6px; }\nh2 { border-bottom: 1px solid var(--brand-color-secondary-mode, var(--theme-color-border-default, #888)); padding-bottom: 4px; }"}]}},{}],117:[function(e,t,o){t.exports={Hash:"solarized-dark",Name:"Solarized Dark",Category:"Fun",Version:"0.0.1",Description:"Schoonover's classic palette Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#002B36",Secondary:"#073642",Tertiary:"#003B4A",Panel:"#00303C",Viewer:"#001E28",Hover:"#0A4858",Selected:"#155868",Thumb:"#073642"},Text:{Primary:"#FDF6E3",Secondary:"#EEE8D5",Muted:"#93A1A1",Dim:"#839496",Placeholder:"#657B83"},Brand:{Accent:"#268BD2",AccentHover:"#45A0E0"},Border:{Default:"#0A4050",Light:"#125868"},Status:{Danger:"#DC322F",DangerMuted:"#AA2A28"},Scrollbar:{Track:"#0A4050",Hover:"#125868"},Selection:{Background:"rgba(38, 139, 210, 0.25)"},Focus:{Outline:"#268BD2"},Syntax:{Keyword:"#859900",String:"#2AA198",Number:"#D33682",Comment:"#586E75",Operator:"#268BD2",Punctuation:"#93A1A1",Function:"#B58900",Variable:"#FDF6E3",Type:"#B58900",Builtin:"#CB4B16",Property:"#268BD2",Tag:"#268BD2",AttrName:"#B58900",AttrValue:"#2AA198"}},Typography:{Family:{Sans:"'Source Code Pro', 'Fira Code', monospace",Mono:"'Source Code Pro', 'Fira Code', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#EEE8D5",Accent:"#268BD2",Muted:"#839496",Light:"#003B4A",WarmBeige:"#073642",TealTint:"#004050",Lavender:"#003848",AmberTint:"#0A3A30",PdfFill:"#0A3028",PdfText:"#DC322F"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],118:[function(e,t,o){t.exports={Hash:"synthwave",Name:"Synthwave",Category:"Fun",Version:"0.0.1",Description:"Purple and pink neon Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1A0A2E",Secondary:"#140824",Tertiary:"#200E38",Panel:"#1C0C32",Viewer:"#100620",Hover:"#2A1848",Selected:"#3A2060",Thumb:"#140824"},Text:{Primary:"#E8C0F8",Secondary:"#D0A8E8",Muted:"#9878B8",Dim:"#7858A8",Placeholder:"#584088"},Brand:{Accent:"#FF71CE",AccentHover:"#FF99DD"},Border:{Default:"#302050",Light:"#402868"},Status:{Danger:"#FF4488",DangerMuted:"#AA3366"},Scrollbar:{Track:"#302050",Hover:"#402868"},Selection:{Background:"rgba(255, 113, 206, 0.25)"},Focus:{Outline:"#FF71CE"},Syntax:{Keyword:"#FF6AD5",String:"#FFE066",Number:"#FF6AD5",Comment:"#9C8AC1",Operator:"#26F0F1",Punctuation:"#C8B6E2",Function:"#26F0F1",Variable:"#FFE0FF",Type:"#FFD93D",Builtin:"#FFD93D",Property:"#FF477E",Tag:"#FF477E",AttrName:"#FFD93D",AttrValue:"#FFE066"}},Typography:{Family:{Sans:"'Trebuchet MS', sans-serif",Mono:"'Courier New', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#D0A8E8",Accent:"#FF71CE",Muted:"#7858A8",Light:"#200E38",WarmBeige:"#221040",TealTint:"#1A0C30",Lavender:"#1E0E36",AmberTint:"#241028",PdfFill:"#241020",PdfText:"#FF4488"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],119:[function(e,t,o){t.exports={Hash:"twilight",Name:"Twilight",Category:"Grey",Version:"0.0.1",Description:"Dark grey, low light. Ported from RetoldRemote-ThemeDefinitions.js to the pict-provider-theme manifest format. Single-mode (no light/dark bifurcation). Aliases preserve the legacy `--retold-*` variable names so existing CSS keeps working through the migration.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1E1E1E",Secondary:"#181818",Tertiary:"#252525",Panel:"#202020",Viewer:"#141414",Hover:"#2E2E2E",Selected:"#404040",Thumb:"#181818"},Text:{Primary:"#E0E0E0",Secondary:"#C8C8C8",Muted:"#909090",Dim:"#707070",Placeholder:"#585858"},Brand:{Accent:"#A0A0A0",AccentHover:"#C0C0C0"},Border:{Default:"#333333",Light:"#404040"},Status:{Danger:"#FF6666",DangerMuted:"#AA6666"},Scrollbar:{Track:"#404040",Hover:"#505050"},Selection:{Background:"rgba(160, 160, 160, 0.25)"},Focus:{Outline:"#A0A0A0"},Syntax:{Keyword:"#B58FFF",String:"#9CDFB0",Number:"#FFB870",Comment:"#6E6E6E",Operator:"#7CC5FF",Punctuation:"#C0C0C0",Function:"#FFD080",Variable:"#E0E0E0",Type:"#FFB870",Builtin:"#FFB870",Property:"#FF8B8B",Tag:"#FF8B8B",AttrName:"#FFB870",AttrValue:"#9CDFB0"}},Typography:{Family:{Sans:"system-ui, -apple-system, sans-serif",Mono:"'SF Mono', 'Fira Code', 'Consolas', monospace"}}},Aliases:{"--retold-bg-primary":"Color.Background.Primary","--retold-bg-secondary":"Color.Background.Secondary","--retold-bg-tertiary":"Color.Background.Tertiary","--retold-bg-panel":"Color.Background.Panel","--retold-bg-viewer":"Color.Background.Viewer","--retold-bg-hover":"Color.Background.Hover","--retold-bg-selected":"Color.Background.Selected","--retold-bg-thumb":"Color.Background.Thumb","--retold-text-primary":"Color.Text.Primary","--retold-text-secondary":"Color.Text.Secondary","--retold-text-muted":"Color.Text.Muted","--retold-text-dim":"Color.Text.Dim","--retold-text-placeholder":"Color.Text.Placeholder","--retold-accent":"Color.Brand.Accent","--retold-accent-hover":"Color.Brand.AccentHover","--retold-border":"Color.Border.Default","--retold-border-light":"Color.Border.Light","--retold-danger":"Color.Status.Danger","--retold-danger-muted":"Color.Status.DangerMuted","--retold-scrollbar":"Color.Scrollbar.Track","--retold-scrollbar-hover":"Color.Scrollbar.Hover","--retold-selection-bg":"Color.Selection.Background","--retold-focus-outline":"Color.Focus.Outline","--retold-font-family":"Typography.Family.Sans","--retold-font-mono":"Typography.Family.Mono"},IconColors:{Primary:"#C8C8C8",Accent:"#A0A0A0",Muted:"#707070",Light:"#252525",WarmBeige:"#2A2A2A",TealTint:"#222222",Lavender:"#282828",AmberTint:"#2E2A24",PdfFill:"#2E2224",PdfText:"#E06060"},CSS:[],SVG:{},Image:{},CompiledAt:"2026-05-03T18:12:53.408Z",CompilerVersion:1}},{}],120:[function(e,t,o){t.exports={Hash:"ultravisor-desert-canyon",Name:"Ultravisor — Desert Canyon",Version:"0.0.1",Description:"Vibrant desert palette — orange brand and teal accents on deep canyon-brown backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#18120e",Secondary:"#221a14",Tertiary:"#2e2018",Panel:"#221a14",Hover:"#3a2a1e",Selected:"#3a2a1e"},Text:{Primary:"#d8c8b0",Secondary:"#e8d8c0",Muted:"#a09080",Placeholder:"#685040",OnBrand:"#18120e"},Brand:{Primary:"#e8943a",PrimaryHover:"#f0a44a",Accent:"#18a0a0",AccentHover:"#30b0b0"},Border:{Default:"#3a2a1e",Light:"#2e2018",Strong:"#4a3a2e"},Status:{Success:"#18a0a0",Warning:"#e0c870",Error:"#e05830",Info:"#18a0a0"},Scrollbar:{Track:"#221a14",Thumb:"#3a2a1e",Hover:"#4a3a2e"},Selection:{Background:"#3a2a1e",Text:"#e8d8c0"},Focus:{Outline:"#e8943a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#221a14",LineNumberText:"#685040",CurrentLineHighlight:"#2e2018",SelectionBackground:"#3a2a1e",GutterBorder:"#2e2018"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],121:[function(e,t,o){t.exports={Hash:"ultravisor-desert-day",Name:"Ultravisor — Desert Day",Version:"0.0.1",Description:"Ultravisor's warm light palette — cream backgrounds, deep walnut text, teal accents. Single-mode light.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#faf6f0",Secondary:"#f0e6d6",Tertiary:"#e8ddd0",Panel:"#ffffff",Hover:"#f0e6d6",Selected:"#e8ddd0"},Text:{Primary:"#3d2b1f",Secondary:"#2e1e14",Muted:"#8a7560",Placeholder:"#a09080",OnBrand:"#ffffff"},Brand:{Primary:"#5c3d2e",PrimaryHover:"#7a5040",Accent:"#3a8a8c",AccentHover:"#2a7070"},Border:{Default:"#e0d0b8",Light:"#e8ddd0",Strong:"#c8b8a0"},Status:{Success:"#5a7a30",Warning:"#b08020",Error:"#a03040",Info:"#3a8a8c"},Scrollbar:{Track:"#f0e6d6",Thumb:"#d0c0a8",Hover:"#c0b098"},Selection:{Background:"#e8ddd0",Text:"#2e1e14"},Focus:{Outline:"#c2703e"},Shadow:{Color:"rgba(92, 61, 46, 0.10)"},Syntax:{Keyword:"#A0532E",String:"#3F8A52",Number:"#A86B00",Comment:"#8A7F72",Operator:"#2E7D74",Punctuation:"#5E5549",Function:"#2E5E96",Variable:"#3D3229",Type:"#A86B00",Builtin:"#A86B00",Property:"#A0532E",Tag:"#A0532E",AttrName:"#A86B00",AttrValue:"#3F8A52"},Editor:{LineNumberBackground:"#f0e6d6",LineNumberText:"#a09080",CurrentLineHighlight:"#f5ede0",SelectionBackground:"#e8ddd0",GutterBorder:"#e0d0b8"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],122:[function(e,t,o){t.exports={Hash:"ultravisor-desert-dusk",Name:"Ultravisor — Desert Dusk",Version:"0.0.1",Description:"Ultravisor's original default — warm tan brand on muted dark desert backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1a1714",Secondary:"#252018",Tertiary:"#302818",Panel:"#252018",Hover:"#3a3028",Selected:"#3a3028"},Text:{Primary:"#c8b8a0",Secondary:"#d8c8a8",Muted:"#907860",Placeholder:"#706050",OnBrand:"#FFFFFF"},Brand:{Primary:"#c4956a",PrimaryHover:"#d4a57a",Accent:"#4a9090",AccentHover:"#5aacac"},Border:{Default:"#3a3028",Light:"#302818",Strong:"#4a4038"},Status:{Success:"#8a9a5a",Warning:"#c0a050",Error:"#b04050",Info:"#4a9090"},Scrollbar:{Track:"#252018",Thumb:"#3a3028",Hover:"#4a4038"},Selection:{Background:"#3a3028",Text:"#d8c8a8"},Focus:{Outline:"#c4956a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#252018",LineNumberText:"#706050",CurrentLineHighlight:"#302818",SelectionBackground:"#3a3028",GutterBorder:"#302818"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],123:[function(e,t,o){t.exports={Hash:"ultravisor-desert-sunset",Name:"Ultravisor — Desert Sunset",Version:"0.0.1",Description:"Ultravisor's golden-hour palette — orange brand on rust-warmed dark backgrounds. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#1e1610",Secondary:"#2a2018",Tertiary:"#342818",Panel:"#2a2018",Hover:"#3a2e22",Selected:"#3a2e22"},Text:{Primary:"#d4c4aa",Secondary:"#e0d0b8",Muted:"#8a7560",Placeholder:"#6a5840",OnBrand:"#1e1610"},Brand:{Primary:"#e8943a",PrimaryHover:"#f0a44a",Accent:"#2a8a8a",AccentHover:"#3a9a9a"},Border:{Default:"#3a2e22",Light:"#342818",Strong:"#4a3e32"},Status:{Success:"#6a9a3a",Warning:"#d4a46a",Error:"#c44e2a",Info:"#2a8a8a"},Scrollbar:{Track:"#2a2018",Thumb:"#3a2e22",Hover:"#4a3e32"},Selection:{Background:"#3a2e22",Text:"#e0d0b8"},Focus:{Outline:"#e8943a"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#2a2018",LineNumberText:"#6a5840",CurrentLineHighlight:"#342818",SelectionBackground:"#3a2e22",GutterBorder:"#342818"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],124:[function(e,t,o){t.exports={Hash:"ultravisor-professional-dark",Name:"Ultravisor — Professional Dark",Version:"0.0.1",Description:"Dark modern palette — slate-blue text on inky surfaces, sky-blue brand. Single-mode dark.",Comprehensive:!0,Modes:{Strategy:"single",Default:"dark"},Tokens:{Color:{Background:{Primary:"#111318",Secondary:"#1a1d24",Tertiary:"#22252e",Panel:"#1a1d24",Hover:"#282c34",Selected:"#282c34"},Text:{Primary:"#c8cdd5",Secondary:"#e0e4ea",Muted:"#8b92a0",Placeholder:"#5a6070",OnBrand:"#ffffff"},Brand:{Primary:"#60a5fa",PrimaryHover:"#93c5fd",Accent:"#60a5fa",AccentHover:"#93c5fd"},Border:{Default:"#282c34",Light:"#22252e",Strong:"#3a3f4a"},Status:{Success:"#34d399",Warning:"#fbbf24",Error:"#f87171",Info:"#60a5fa"},Scrollbar:{Track:"#1a1d24",Thumb:"#282c34",Hover:"#3a3f4a"},Selection:{Background:"#1e2230",Text:"#e0e4ea"},Focus:{Outline:"#60a5fa"},Shadow:{Color:"rgba(0, 0, 0, 0.30)"},Syntax:{Keyword:"#E89A6E",String:"#8FD493",Number:"#E8A94D",Comment:"#8E8478",Operator:"#4FB3A6",Punctuation:"#C0B5A4",Function:"#7FBDD8",Variable:"#E8DCC8",Type:"#E8A94D",Builtin:"#E8A94D",Property:"#E89A6E",Tag:"#E89A6E",AttrName:"#E8A94D",AttrValue:"#8FD493"},Editor:{LineNumberBackground:"#1a1d24",LineNumberText:"#5a6070",CurrentLineHighlight:"#22252e",SelectionBackground:"#1e2230",GutterBorder:"#22252e"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],125:[function(e,t,o){t.exports={Hash:"ultravisor-professional-light",Name:"Ultravisor — Professional Light",Version:"0.0.1",Description:"Bright modern palette — slate text on near-white backgrounds, royal-blue brand. Single-mode light.",Comprehensive:!0,Modes:{Strategy:"single",Default:"light"},Tokens:{Color:{Background:{Primary:"#f5f6f8",Secondary:"#ffffff",Tertiary:"#e4e7ec",Panel:"#ffffff",Hover:"#f0f1f4",Selected:"#e4e7ec"},Text:{Primary:"#2d3748",Secondary:"#1a202c",Muted:"#6b7280",Placeholder:"#9ca3af",OnBrand:"#ffffff"},Brand:{Primary:"#3b82f6",PrimaryHover:"#2563eb",Accent:"#3b82f6",AccentHover:"#2563eb"},Border:{Default:"#e2e5ea",Light:"#eceef2",Strong:"#c8cdd5"},Status:{Success:"#10b981",Warning:"#f59e0b",Error:"#ef4444",Info:"#3b82f6"},Scrollbar:{Track:"#f0f1f4",Thumb:"#d1d5db",Hover:"#b0b5bd"},Selection:{Background:"#dbeafe",Text:"#1a202c"},Focus:{Outline:"#3b82f6"},Shadow:{Color:"rgba(0, 0, 0, 0.06)"},Syntax:{Keyword:"#A0532E",String:"#3F8A52",Number:"#A86B00",Comment:"#8A7F72",Operator:"#2E7D74",Punctuation:"#5E5549",Function:"#2E5E96",Variable:"#3D3229",Type:"#A86B00",Builtin:"#A86B00",Property:"#A0532E",Tag:"#A0532E",AttrName:"#A86B00",AttrValue:"#3F8A52"},Editor:{LineNumberBackground:"#f5f6f8",LineNumberText:"#9ca3af",CurrentLineHighlight:"#f0f1f4",SelectionBackground:"#dbeafe",GutterBorder:"#e2e5ea"}},Typography:{Family:{Sans:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Serif:"Georgia, Cambria, 'Times New Roman', Times, serif",Mono:"'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace"}},Layout:{SidebarWidth:"260px",TopbarHeight:"56px",StatusbarHeight:"28px"}},Brand:{Name:"Ultravisor",Tagline:"Process supervision and workflow automation"}}},{}],126:[function(e,t,o){var n=function(e){function t(e,o,n){return _classCallCheck(this,t),_callSuper(this,t,[e,o,n])}return _inherits(t,e),_createClass(t,[{key:"onAfterRender",value:function(e,o,n,i){var r=this;if(this.pict.CSSMap.injectCSS(),"undefined"!=typeof document&&this.options.Height){var a=document.querySelector(".pict-theme-bottombar");a&&(a.style.minHeight=this.options.Height+"px")}var l=function(e){if(e){var t=r.pict.views[e];t?t.render():r.log&&r.log.warn&&r.log.warn('Theme-BottomBar: slot view "'+e+'" not registered')}};return l(this.options.StatusView),l(this.options.InfoView),l(this.options.ActionsView),_superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"setStatusView",value:function(e){this._setSlotView("StatusView","#Theme-BottomBar-Status",e)}},{key:"setInfoView",value:function(e){this._setSlotView("InfoView","#Theme-BottomBar-Info",e)}},{key:"setActionsView",value:function(e){this._setSlotView("ActionsView","#Theme-BottomBar-Actions",e)}},{key:"_setSlotView",value:function(e,t,o){if(this.options[e]=o||null,"undefined"!=typeof document){var n=document.querySelector(t);n&&(n.innerHTML="")}if(o){var i=this.pict.views[o];i?i.render():this.log&&this.log.warn&&this.log.warn('Theme-BottomBar: view "'+o+'" not registered')}}}])}(e("pict-view"));t.exports=n,t.exports.default_configuration={ViewIdentifier:"Theme-BottomBar",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-BottomBar",DefaultRenderable:"Theme-BottomBar-Renderable",StatusView:null,InfoView:null,ActionsView:null,Height:32,Templates:[{Hash:"Theme-BottomBar-Template",Template:'\n<div class="pict-theme-bottombar">\n\t<div class="pict-theme-bottombar-status" id="Theme-BottomBar-Status"></div>\n\t<div class="pict-theme-bottombar-info" id="Theme-BottomBar-Info"></div>\n\t<div class="pict-theme-bottombar-actions" id="Theme-BottomBar-Actions"></div>\n</div>'}],Renderables:[{RenderableHash:"Theme-BottomBar-Renderable",TemplateHash:"Theme-BottomBar-Template",ContentDestinationAddress:"#Theme-BottomBar",RenderMethod:"replace"}],CSS:"\n.pict-theme-bottombar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\t/* The min-height is rewritten per-instance in onAfterRender from the\n\t Height option (default 32). A fixed px value avoids the\n\t percent-height resolution trap the pict-section-modal shell sets\n\t up — see the comment on Theme-TopBar's CSS for the full story. */\n\tmin-height: 32px;\n\tpadding: 0 14px;\n\tbox-sizing: border-box;\n\tbackground: var(--theme-color-background-secondary, transparent);\n\tfont-size: var(--theme-typography-size-xs, 12px);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\t/* Single medium brand-primary stripe at the top of the bottombar.\n\t The topbar carries the full two-stripe identifier; on the\n\t bottombar (which is only 32px tall) a single 2px primary line is\n\t enough to seat the brand colour at the bottom of the page\n\t without competing for visual weight against the content row. */\n\tborder-top: 2px solid var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n.pict-theme-bottombar-status {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tmax-width: 50%;\n}\n.pict-theme-bottombar-info {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 12px;\n\tmin-width: 0;\n\toverflow: hidden;\n}\n.pict-theme-bottombar-actions {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}",CSSPriority:500}},{"pict-view":137}],127:[function(e,t,o){var n=e("pict-view"),i=e("../Theme-Brand.js"),r=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n]))._unsubscribeFromBrand=null,i}return _inherits(t,e),_createClass(t,[{key:"onAfterInitialize",value:function(){return this._subscribeToBrand(),_superPropGet(t,"onAfterInitialize",this,1)?_superPropGet(t,"onAfterInitialize",this,3)([]):void 0}},{key:"onBeforeRender",value:function(e){return this._refreshAppData(),_superPropGet(t,"onBeforeRender",this,1)?_superPropGet(t,"onBeforeRender",this,3)([e]):void 0}},{key:"onAfterRender",value:function(e,o,n,i){return this.pict.CSSMap.injectCSS(),_superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"_subscribeToBrand",value:function(){if(!this._unsubscribeFromBrand){var e=this;this._unsubscribeFromBrand=i.onChange(function(){e.render()})}}},{key:"_refreshAppData",value:function(){var e=i.getActive();if(this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},e){var t=!1!==this.options.ShowIcon,o=!1!==this.options.ShowName,n=t&&"svg"===e.IconType&&e.Icon?[{IconHTML:e.Icon}]:[],r=t&&"image"===e.IconType&&e.Icon?[{IconURL:e.Icon}]:[],a=o&&e.Name?[{Name:e.Name}]:[];this.pict.AppData.PictSectionTheme.BrandMark={BodySlot:[{Tooltip:e.Tagline||e.Name||"",IconSVGSlot:n,IconImgSlot:r,NameSlot:a}]}}else this.pict.AppData.PictSectionTheme.BrandMark={BodySlot:[]}}}])}(n);t.exports=r,t.exports.default_configuration={ViewIdentifier:"Theme-Brand-Mark",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Brand-Mark",DefaultRenderable:"Theme-Brand-Mark-Renderable",ShowIcon:!0,ShowName:!0,Templates:[{Hash:"Theme-Brand-Mark-Template",Template:"{~TS:Theme-Brand-Mark-Body-Template:AppData.PictSectionTheme.BrandMark.BodySlot~}"},{Hash:"Theme-Brand-Mark-Body-Template",Template:'\n<span class="pict-theme-brand-mark" title="{~D:Record.Tooltip~}">\n\t{~TS:Theme-Brand-Mark-IconSVG-Template:Record.IconSVGSlot~}\n\t{~TS:Theme-Brand-Mark-IconImg-Template:Record.IconImgSlot~}\n\t{~TS:Theme-Brand-Mark-Name-Template:Record.NameSlot~}\n</span>'},{Hash:"Theme-Brand-Mark-IconSVG-Template",Template:'<span class="pict-theme-brand-mark-icon">{~D:Record.IconHTML~}</span>'},{Hash:"Theme-Brand-Mark-IconImg-Template",Template:'<span class="pict-theme-brand-mark-icon"><img src="{~D:Record.IconURL~}" alt=""></span>'},{Hash:"Theme-Brand-Mark-Name-Template",Template:'<span class="pict-theme-brand-mark-name">{~D:Record.Name~}</span>'}],Renderables:[{RenderableHash:"Theme-Brand-Mark-Renderable",TemplateHash:"Theme-Brand-Mark-Template",ContentDestinationAddress:"#Theme-Brand-Mark",RenderMethod:"replace"}],CSS:"\n.pict-theme-brand-mark {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\t/* line-height: 1 collapses the inherited ~1.2 line-box around the\n\t name glyphs. Without this the inline-flex container is taller\n\t than its visible content, the line-box adds asymmetric space\n\t above the caps, and the whole mark looks pushed up vs.\n\t neighbouring buttons that sit on standard 12px-text baselines. */\n\tline-height: 1;\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-text-primary, #1a1a1a));\n\tuser-select: none;\n}\n.pict-theme-brand-mark-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 22px;\n\theight: 22px;\n\tcolor: currentColor;\n}\n.pict-theme-brand-mark-icon img,\n.pict-theme-brand-mark-icon svg {\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: block;\n}\n.pict-theme-brand-mark-name {\n\t/* Font size dropped from 15 → 14 so the brand name reads closer\n\t to the typical 12px action-button text height; bigger glyphs\n\t reaching higher into the row are why the mark looked optically\n\t high. The 2px brand-secondary underline keeps the mark feeling\n\t distinctly branded; padding-bottom: 1px was an asymmetric nudge\n\t that shifted the visual center up — removed. */\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\tborder-bottom: 2px solid var(--brand-color-secondary-mode, transparent);\n\twhite-space: nowrap;\n}\n/* Compact form — at narrow viewports the brand mark collapses to\n icon-only. The icon alone still reads as the brand (the deterministic\n logo is designed to be recognisable without the wordmark) and freeing\n up the wordmark's width keeps the nav buttons reachable on tablet /\n small-laptop widths. The threshold matches the topbar's compact\n breakpoint in Theme-TopBar. */\n@media (max-width: 720px) {\n\t.pict-theme-brand-mark-name {\n\t\tdisplay: none;\n\t}\n}",CSSPriority:500}},{"../Theme-Brand.js":78,"pict-view":137}],128:[function(e,t,o){var n=e("pict-view"),i=e("../Theme-Brand.js"),r=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n]))._unsubscribeFromBrand=null,i}return _inherits(t,e),_createClass(t,[{key:"onAfterInitialize",value:function(){return this._subscribeToBrand(),_superPropGet(t,"onAfterInitialize",this,1)?_superPropGet(t,"onAfterInitialize",this,3)([]):void 0}},{key:"onBeforeRender",value:function(e){return this._refreshAppData(),_superPropGet(t,"onBeforeRender",this,1)?_superPropGet(t,"onBeforeRender",this,3)([e]):void 0}},{key:"onAfterRender",value:function(e,o,n,i){return this.pict.CSSMap.injectCSS(),_superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"_subscribeToBrand",value:function(){if(!this._unsubscribeFromBrand){var e=this;this._unsubscribeFromBrand=i.onChange(function(){e.render()})}}},{key:"_refreshAppData",value:function(){var e=i.getActive();if(this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},e){var t=!1!==this.options.ShowName,o=[],n=[];"svg"===e.IconType&&e.Icon?o=[{IconHTML:e.Icon}]:"image"===e.IconType&&e.Icon&&(n=[{IconURL:e.Icon}]);var r=t?[{Name:e.Name,IconSVGSlot:o,IconImgSlot:n}]:[],a=e.Name+(e.Tagline?" — "+e.Tagline:"");this.pict.AppData.PictSectionTheme.BrandStrip={BodySlot:[{Tooltip:a,NameRowSlot:r,PrimaryHeight:this.options.PrimaryStripeHeight||3,SecondaryHeight:this.options.SecondaryStripeHeight||1}]}}else this.pict.AppData.PictSectionTheme.BrandStrip={BodySlot:[]}}}])}(n);r.default_configuration={ViewIdentifier:"Theme-BrandStrip",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-BrandStrip",DefaultRenderable:"Theme-BrandStrip-Renderable",PrimaryStripeHeight:3,SecondaryStripeHeight:1,ShowName:!0,Templates:[{Hash:"Theme-BrandStrip-Template",Template:"\n{~TS:Theme-BrandStrip-Body-Template:AppData.PictSectionTheme.BrandStrip.BodySlot~}"},{Hash:"Theme-BrandStrip-Body-Template",Template:'\n<div class="pict-theme-brandstrip" title="{~D:Record.Tooltip~}">\n\t{~TS:Theme-BrandStrip-NameRow-Template:Record.NameRowSlot~}\n\t<div class="pict-theme-brandstrip-stripes">\n\t\t<div class="pict-theme-brandstrip-stripe pict-theme-brandstrip-stripe-primary"\n\t\t style="height: {~D:Record.PrimaryHeight~}px;"></div>\n\t\t<div class="pict-theme-brandstrip-stripe pict-theme-brandstrip-stripe-secondary"\n\t\t style="height: {~D:Record.SecondaryHeight~}px;"></div>\n\t</div>\n</div>'},{Hash:"Theme-BrandStrip-NameRow-Template",Template:'\n<div class="pict-theme-brandstrip-row">\n\t{~TS:Theme-BrandStrip-IconSVG-Template:Record.IconSVGSlot~}\n\t{~TS:Theme-BrandStrip-IconImg-Template:Record.IconImgSlot~}\n\t<span class="pict-theme-brandstrip-name">{~D:Record.Name~}</span>\n</div>'},{Hash:"Theme-BrandStrip-IconSVG-Template",Template:'<span class="pict-theme-brandstrip-icon">{~D:Record.IconHTML~}</span>'},{Hash:"Theme-BrandStrip-IconImg-Template",Template:'<span class="pict-theme-brandstrip-icon"><img src="{~D:Record.IconURL~}" alt=""></span>'}],Renderables:[{RenderableHash:"Theme-BrandStrip-Renderable",TemplateHash:"Theme-BrandStrip-Template",ContentDestinationAddress:"#Theme-BrandStrip",RenderMethod:"replace"}],CSS:"\n.pict-theme-brandstrip {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tuser-select: none;\n}\n.pict-theme-brandstrip-row {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 6px 12px 4px;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcolor: var(--brand-color-primary, var(--theme-color-text-muted, #6b6b6b));\n}\n.pict-theme-brandstrip-name {\n\tborder-bottom: 2px solid var(--brand-color-secondary, transparent);\n\tpadding-bottom: 1px;\n}\n.pict-theme-brandstrip-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px; height: 16px;\n\tcolor: var(--brand-color-primary, currentColor);\n}\n.pict-theme-brandstrip-icon img,\n.pict-theme-brandstrip-icon svg {\n\twidth: 100%; height: 100%;\n\tdisplay: block;\n}\n.pict-theme-brandstrip-stripes {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n}\n.pict-theme-brandstrip-stripe {\n\twidth: 100%;\n}\n.pict-theme-brandstrip-stripe-primary {\n\tbackground: var(--brand-color-primary, transparent);\n}\n.pict-theme-brandstrip-stripe-secondary {\n\tbackground: var(--brand-color-secondary, transparent);\n}",CSSPriority:500},t.exports=r},{"../Theme-Brand.js":78,"pict-view":137}],129:[function(e,t,o){var n=e("pict-view"),i=e("../Theme-Icons.js"),r={ViewIdentifier:"Theme-Button",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Button",DefaultRenderable:"Theme-Button-Renderable",ProviderHash:"Theme",ModalViewHash:"Pict-Section-Modal",PickerViewHash:"Theme-Picker",ModeToggleViewHash:"Theme-ModeToggle",ScaleSelectViewHash:"Theme-ScaleSelect",Title:"Theme",AriaLabel:"Open theme menu",ModalTitle:"Theme",ModalWidth:"320px",Templates:[{Hash:"Theme-Button-Template",Template:'\n<button type="button"\n class="pict-theme-button"\n aria-label="{~D:AppData.PictSectionTheme.Button.AriaLabel~}"\n title="{~D:AppData.PictSectionTheme.Button.Title~}"\n onclick="_Pict.views[\'Theme-Button\'].openMenu();">\n\t'.concat(i.iconSun(16),"\n</button>")},{Hash:"Theme-Button-Modal-Template",Template:'\n<div class="pict-theme-button-menu">\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Theme</label>\n\t\t<div id="Theme-Picker"></div>\n\t</div>\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Mode</label>\n\t\t<div id="Theme-ModeToggle"></div>\n\t</div>\n\t<div class="pict-theme-button-menu-row">\n\t\t<label class="pict-theme-button-menu-label">Scale</label>\n\t\t<div id="Theme-ScaleSelect"></div>\n\t</div>\n</div>'}],Renderables:[{RenderableHash:"Theme-Button-Renderable",TemplateHash:"Theme-Button-Template",ContentDestinationAddress:"#Theme-Button",RenderMethod:"replace"}],CSS:"\n.pict-theme-button {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\t/* Sized to match a typical 12px-font / 6px-12px-padding text button\n\t (~28px tall) so this drops cleanly into a topbar row alongside\n\t action buttons without standing taller and crashing the row's\n\t visual rhythm. Squareish — width matches height for the icon. */\n\twidth: 28px;\n\theight: 28px;\n\tpadding: 0;\n\tborder-radius: 6px;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n.pict-theme-button:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n}\n.pict-theme-button-icon { width: 16px; height: 16px; }\n.pict-theme-button-menu { display: flex; flex-direction: column; gap: 14px; }\n.pict-theme-button-menu-row { display: flex; flex-direction: column; gap: 6px; }\n.pict-theme-button-menu-label {\n\tfont-size: 11px;\n\tfont-weight: 600;\n\tletter-spacing: 0.4px;\n\ttext-transform: uppercase;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}",CSSPriority:500},a=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"onBeforeRender",value:function(e){return this._refreshAppData(),_superPropGet(t,"onBeforeRender",this,1)?_superPropGet(t,"onBeforeRender",this,3)([e]):void 0}},{key:"onAfterRender",value:function(e,o,n,i){return this.pict.CSSMap.injectCSS(),_superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"openMenu",value:function(){var e=this._modal();if(!e)return"undefined"!=typeof console&&console.warn('Theme-Button: pict-section-modal view not found at "'+(this.options.ModalViewHash||"Pict-Section-Modal")+'" — cannot open theme menu.'),null;var t=this.pict.parseTemplateByHash("Theme-Button-Modal-Template",{}),o=this;return e.show({title:this.options.ModalTitle||"Theme",content:t,width:this.options.ModalWidth||"320px",closeable:!0,buttons:[],onOpen:function(){o._mountSubViews()}})}},{key:"_modal",value:function(){var e=this.options.ModalViewHash||"Pict-Section-Modal";return this.pict&&this.pict.views&&this.pict.views[e]}},{key:"_mountSubViews",value:function(){var e=this.pict.views[this.options.PickerViewHash||"Theme-Picker"];e&&e.render();var t=this.pict.views[this.options.ModeToggleViewHash||"Theme-ModeToggle"];t&&t.render();var o=this.pict.views[this.options.ScaleSelectViewHash||"Theme-ScaleSelect"];o&&o.render()}},{key:"_refreshAppData",value:function(){this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.Button={Title:this.options.Title||"Theme",AriaLabel:this.options.AriaLabel||"Open theme menu"}}}])}(n);a.default_configuration=r,t.exports=a},{"../Theme-Icons.js":79,"pict-view":137}],130:[function(e,t,o){var n=e("pict-view"),i=e("../Theme-Icons.js"),r={ViewIdentifier:"Theme-ModeToggle",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-ModeToggle",DefaultRenderable:"Theme-ModeToggle-Renderable",ProviderHash:"Theme",Labels:{Light:"Light",Dark:"Dark",System:"System"},ShowIcons:!0,Templates:[{Hash:"Theme-ModeToggle-Template",Template:'\n<div class="pict-theme-modetoggle-wrap">\n\t<div class="pict-theme-modetoggle{~NE:AppData.PictSectionTheme.ModeToggle.Disabled^ pict-theme-modetoggle-disabled~}"\n\t role="group" aria-label="Color mode"\n\t title="{~D:AppData.PictSectionTheme.ModeToggle.WrapTitle~}">\n\t\t{~TS:Theme-ModeToggle-Button-Template:AppData.PictSectionTheme.ModeToggle.Buttons~}\n\t</div>\n\t{~TS:Theme-ModeToggle-LockedNote-Template:AppData.PictSectionTheme.ModeToggle.LockedNoteSlot~}\n</div>'},{Hash:"Theme-ModeToggle-Button-Template",Template:'\n<button type="button"\n class="pict-theme-modetoggle-btn{~NE:Record.Active^ pict-theme-modetoggle-btn-active~}{~NE:Record.LockedOut^ pict-theme-modetoggle-btn-lockedout~}"\n title="{~D:Record.Title~}"\n aria-pressed="{~D:Record.Active~}"\n aria-disabled="{~D:Record.LockedOut~}"\n onclick="_Pict.views[\'Theme-ModeToggle\'].pickMode(\'{~D:Record.Mode~}\');">\n\t{~TS:Theme-ModeToggle-Icon-Light:Record.IconLight~}{~TS:Theme-ModeToggle-Icon-Dark:Record.IconDark~}{~TS:Theme-ModeToggle-Icon-System:Record.IconSystem~}<span class="pict-theme-modetoggle-label">{~D:Record.Label~}</span>\n</button>'},{Hash:"Theme-ModeToggle-LockedNote-Template",Template:'\n<div class="pict-theme-modetoggle-locked-note" role="note">\n\t<svg class="pict-theme-modetoggle-locked-icon" viewBox="0 0 24 24" fill="none"\n\t stroke="currentColor" stroke-width="2" stroke-linecap="round"\n\t stroke-linejoin="round" aria-hidden="true">\n\t\t<rect x="4" y="11" width="16" height="9" rx="2"/>\n\t\t<path d="M8 11V7a4 4 0 0 1 8 0v4"/>\n\t</svg>\n\t<span>{~D:Record.Message~}</span>\n</div>'},{Hash:"Theme-ModeToggle-Icon-Light",Template:i.iconSun()},{Hash:"Theme-ModeToggle-Icon-Dark",Template:i.iconMoon()},{Hash:"Theme-ModeToggle-Icon-System",Template:i.iconSystem()}],Renderables:[{RenderableHash:"Theme-ModeToggle-Renderable",TemplateHash:"Theme-ModeToggle-Template",ContentDestinationAddress:"#Theme-ModeToggle",RenderMethod:"replace"}],CSS:"\n.pict-theme-modetoggle-wrap { display: inline-flex; flex-direction: column; gap: 6px; }\n.pict-theme-modetoggle {\n\tdisplay: inline-flex;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tborder-radius: 6px;\n\toverflow: hidden;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tfont-size: 12px;\n}\n.pict-theme-modetoggle-btn {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 4px 10px;\n\tborder: 0;\n\tbackground: transparent;\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\tborder-right: 1px solid var(--theme-color-border-default, #cfd5dd);\n\ttransition: background-color 120ms ease, color 120ms ease;\n}\n.pict-theme-modetoggle-btn:last-child { border-right: 0; }\n.pict-theme-modetoggle-btn:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n}\n.pict-theme-modetoggle-btn-active {\n\tbackground: var(--theme-color-brand-primary, #2563eb);\n\tcolor: var(--theme-color-text-on-brand, #ffffff);\n}\n.pict-theme-modetoggle-btn-active:hover {\n\tbackground: var(--theme-color-brand-primary-hover, #1e54cc);\n\tcolor: var(--theme-color-text-on-brand, #ffffff);\n}\n/* When the active theme is single-mode the entire group becomes\n non-interactive. The locked-out buttons (the ones the theme cannot\n switch to) get a strikethrough so the cause is unmistakable; the\n active button stays styled normally so users can still see which\n mode the theme IS using. */\n.pict-theme-modetoggle-disabled .pict-theme-modetoggle-btn {\n\tpointer-events: none;\n\tcursor: not-allowed;\n}\n.pict-theme-modetoggle-disabled .pict-theme-modetoggle-btn-lockedout {\n\topacity: 0.45;\n\ttext-decoration: line-through;\n\ttext-decoration-thickness: 1.5px;\n}\n/* Icons come from Theme-Icons.js with explicit width/height baked into\n the <svg>. We only need to nudge their vertical alignment with the\n button label. */\n.pict-theme-modetoggle .pict-theme-icon {\n\tdisplay: inline-block; vertical-align: -2px;\n}\n.pict-theme-modetoggle-label { line-height: 1; }\n.pict-theme-modetoggle-locked-note {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tfont-size: 11px;\n\tline-height: 1.3;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n\tpadding: 0 2px;\n}\n.pict-theme-modetoggle-locked-icon {\n\twidth: 12px; height: 12px;\n\tflex: 0 0 12px;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}",CSSPriority:500},a=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n]))._unsubscribeFromProvider=null,i}return _inherits(t,e),_createClass(t,[{key:"onAfterInitialize",value:function(){return this._subscribeToProvider(),_superPropGet(t,"onAfterInitialize",this,1)?_superPropGet(t,"onAfterInitialize",this,3)([]):void 0}},{key:"onBeforeRender",value:function(e){return this._refreshAppData(),_superPropGet(t,"onBeforeRender",this,1)?_superPropGet(t,"onBeforeRender",this,3)([e]):void 0}},{key:"onAfterRender",value:function(e,o,n,i){return this.pict.CSSMap.injectCSS(),_superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"pickMode",value:function(e){var t=this._provider();if(!t)return!1;var o=t.setMode(e);if(o&&"function"==typeof this.options.OnModeChange)try{this.options.OnModeChange(e)}catch(e){}return o||this.render(),o}},{key:"_subscribeToProvider",value:function(){if(!this._unsubscribeFromProvider){var e=this._provider();if(e&&"function"==typeof e.onApply){var t=this;this._unsubscribeFromProvider=e.onApply(function(){t.render()})}}}},{key:"_provider",value:function(){var e=this.options.ProviderHash||"Theme";return this.pict&&this.pict.providers&&this.pict.providers[e]}},{key:"_refreshAppData",value:function(){var e=this._provider(),t=e?e.getActiveTheme():null,o=t&&t.Mode||"light",n=!1,i=null,a=null;if(t&&t.Hash&&e&&"function"==typeof e.getTheme){var l=e.getTheme(t.Hash);(n="single"===(l&&l.Modes&&l.Modes.Strategy||"single"))&&(i=l.Modes&&l.Modes.Default||o||"light",a=l.Name||l.Hash||"this theme")}for(var s=this.options.Labels||r.Labels,c=!1!==this.options.ShowIcons,d=[{Mode:"light",Label:s.Light||"Light"},{Mode:"dark",Label:s.Dark||"Dark"},{Mode:"system",Label:s.System||"System"}],p=[],h=0;h<d.length;h++){var u=d[h],f=o===u.Mode,g=n&&u.Mode!==i,m=void 0;if(g)m=a+" is fixed to "+(i.charAt(0).toUpperCase()+i.slice(1))+" mode — pick a different theme to switch.";else m=u.Label+" mode";p.push({Mode:u.Mode,Label:u.Label,Title:m,Active:f,LockedOut:g,IconLight:c&&"light"===u.Mode?[{}]:[],IconDark:c&&"dark"===u.Mode?[{}]:[],IconSystem:c&&"system"===u.Mode?[{}]:[]})}var v=[],w="";if(n){var y=a+" is fixed to "+(i.charAt(0).toUpperCase()+i.slice(1))+" mode";v=[{Message:y}],w=y+" — pick a different theme to switch modes."}this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.ModeToggle={ActiveMode:o,Disabled:n,LockedToMode:i,ThemeName:a,Buttons:p,LockedNoteSlot:v,WrapTitle:w}}}])}(n);a.default_configuration=r,t.exports=a},{"../Theme-Icons.js":79,"pict-view":137}],131:[function(e,t,o){var n=e("pict-view"),i=e("../Theme-Icons.js"),r=function(t){function o(e,t,n){var i;return _classCallCheck(this,o),(i=_callSuper(this,o,[e,t,n]))._unsubscribeFromProvider=null,i}return _inherits(o,t),_createClass(o,[{key:"onAfterInitialize",value:function(){return this._subscribeToProvider(),_superPropGet(o,"onAfterInitialize",this,1)?_superPropGet(o,"onAfterInitialize",this,3)([]):void 0}},{key:"onBeforeRender",value:function(e){return this._refreshAppData(),_superPropGet(o,"onBeforeRender",this,1)?_superPropGet(o,"onBeforeRender",this,3)([e]):void 0}},{key:"onAfterRender",value:function(e,t,n,i){return this.pict.CSSMap.injectCSS(),_superPropGet(o,"onAfterRender",this,1)?_superPropGet(o,"onAfterRender",this,3)([e,t,n,i]):void 0}},{key:"openMenu",value:function(e){var t=this._modal();if(!t)return"undefined"!=typeof console&&console.warn&&console.warn("Theme-Picker: pict-section-modal not registered — cannot open menu."),null;var o=this._buildMenuItems(),n=this;return t.dropdown(e,{items:o,align:"left",minWidth:"260px",maxHeight:"60vh",className:"pict-theme-picker-menu",closeOnSelect:!0,onSelect:function(e){n.pick(e)}})}},{key:"pick",value:function(e){var t=this._provider();if(!t)return!1;var o=t.getActiveTheme(),n=o?o.Mode:null,i=t.applyTheme(e,n);if(i&&"function"==typeof this.options.OnPick)try{this.options.OnPick(e)}catch(e){}return i}},{key:"_subscribeToProvider",value:function(){if(!this._unsubscribeFromProvider){var e=this._provider();if(e&&"function"==typeof e.onApply){var t=this;this._unsubscribeFromProvider=e.onApply(function(){t.render()})}}}},{key:"_provider",value:function(){var e=this.options.ProviderHash||"Theme";return this.pict&&this.pict.providers&&this.pict.providers[e]}},{key:"_modal",value:function(){var e=this.options.ModalViewHash||"Pict-Section-Modal";return this.pict&&this.pict.views&&this.pict.views[e]}},{key:"_buildMenuItems",value:function(){var e=this._provider(),t=e?e.listThemes():[],o=e?e.getActiveTheme():{Hash:null},n=o&&o.Hash||null,r=this._loadCatalog(),a={},l=[];Array.isArray(this.options.Categories)&&(l=this.options.Categories.slice());for(var s=0;s<r.length;s++){var c=r[s],d=c.Category||"Other";a[c.Hash]=d,l.indexOf(d)<0&&l.push(d)}for(var p={},h=0;h<t.length;h++){var u=t[h],f=a[u.Hash]||"Other";p[f]||(p[f]=[],l.indexOf(f)<0&&l.push(f)),p[f].push(u)}for(var g=!1!==this.options.ShowModeIcons,m=[],v=0;v<l.length;v++){var w=l[v];if(p[w]&&0!==p[w].length){m.push({Header:w});for(var y=0;y<p[w].length;y++){var b=p[w][y],S=g?i.iconForTheme(b.Strategy,b.DefaultMode,14):"";m.push({Hash:b.Hash,Label:b.Name||b.Hash,Icon:S,Style:b.Hash===n?"active":null,Tooltip:this._capabilityLabel(b)})}}}return m}},{key:"_capabilityLabel",value:function(e){if("single"===(e.Strategy||"single")){var t=e.DefaultMode||"light";return(e.Name||e.Hash)+" — "+("dark"===t?"dark only":"light only")}return(e.Name||e.Hash)+" — light + dark"}},{key:"_refreshAppData",value:function(){for(var e=this._provider(),t=e?e.listThemes():[],o=e?e.getActiveTheme():{Hash:null},n=o&&o.Hash||null,r=null,a=0;a<t.length;a++)if(t[a].Hash===n){r=t[a];break}var l=[];!1!==this.options.ShowModeIcons&&r&&(l=[{IconHTML:i.iconForTheme(r.Strategy,r.DefaultMode,14)}]),this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.Picker={ActiveHash:n,ActiveLabel:r?r.Name||r.Hash:"Choose a theme",TriggerTooltip:r?this._capabilityLabel(r)+" — click to change":"Choose a theme",TriggerGlyphSlot:l,ChevronHTML:i.iconChevronDown(10)},this.pict.AppData.PictSectionTheme.AllThemes=t}},{key:"_loadCatalog",value:function(){try{return e("../themes/_catalog.js")}catch(e){return[]}}}])}(n);r.default_configuration={ViewIdentifier:"Theme-Picker",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-Picker",DefaultRenderable:"Theme-Picker-Renderable",ProviderHash:"Theme",ModalViewHash:"Pict-Section-Modal",Categories:null,ShowModeIcons:!0,Templates:[{Hash:"Theme-Picker-Template",Template:'\n<button type="button" class="pict-theme-picker"\n title="{~D:AppData.PictSectionTheme.Picker.TriggerTooltip~}"\n onclick="_Pict.views[\'Theme-Picker\'].openMenu(this);">\n\t{~TS:Theme-Picker-Trigger-Glyph:AppData.PictSectionTheme.Picker.TriggerGlyphSlot~}\n\t<span class="pict-theme-picker-name">{~D:AppData.PictSectionTheme.Picker.ActiveLabel~}</span>\n\t<span class="pict-theme-picker-chevron">{~D:AppData.PictSectionTheme.Picker.ChevronHTML~}</span>\n</button>'},{Hash:"Theme-Picker-Trigger-Glyph",Template:'<span class="pict-theme-picker-trigger-glyph">{~D:Record.IconHTML~}</span>'}],Renderables:[{RenderableHash:"Theme-Picker-Renderable",TemplateHash:"Theme-Picker-Template",ContentDestinationAddress:"#Theme-Picker",RenderMethod:"replace"}],CSS:"\n.pict-theme-picker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tmin-width: 200px;\n\tmax-width: 100%;\n\tpadding: 6px 10px;\n\tborder-radius: 6px;\n\tfont: inherit;\n\tfont-size: 13px;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tcursor: pointer;\n\ttext-align: left;\n\ttransition: border-color 120ms ease, box-shadow 120ms ease;\n}\n.pict-theme-picker:hover { border-color: var(--theme-color-text-muted, #6b6b6b); }\n.pict-theme-picker:focus, .pict-theme-picker:focus-visible {\n\toutline: none;\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n\tbox-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}\n.pict-theme-picker .pict-theme-picker-name {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n.pict-theme-picker .pict-theme-picker-chevron {\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n.pict-theme-picker-trigger-glyph {\n\tdisplay: inline-flex; align-items: center;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}\n\n/* Skin the modal-dropdown items with cleaner spacing for our glyphs. */\n.pict-theme-picker-menu .pict-modal-dropdown-item-icon {\n\twidth: 28px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tcolor: var(--theme-color-text-muted, #6b6b6b);\n}\n.pict-theme-picker-menu .pict-modal-dropdown-item--active {\n\tbackground: var(--theme-color-background-selected, #e0eaff);\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n}\n.pict-theme-picker-menu .pict-modal-dropdown-item--active .pict-modal-dropdown-item-icon {\n\tcolor: var(--theme-color-brand-primary, #2563eb);\n}",CSSPriority:500},r.APPDATA_ADDRESS="PictSectionTheme.Picker",t.exports=r},{"../Theme-Icons.js":79,"../themes/_catalog.js":85,"pict-view":137}],132:[function(e,t,o){var n=e("pict-view"),i=e("../Theme-Scale.js"),r=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,o,n]))._unsubscribeFromScale=null,i}return _inherits(t,e),_createClass(t,[{key:"onAfterInitialize",value:function(){return this._subscribeToScale(),_superPropGet(t,"onAfterInitialize",this,1)?_superPropGet(t,"onAfterInitialize",this,3)([]):void 0}},{key:"onBeforeRender",value:function(e){return this._refreshAppData(),_superPropGet(t,"onBeforeRender",this,1)?_superPropGet(t,"onBeforeRender",this,3)([e]):void 0}},{key:"onAfterRender",value:function(e,o,n,i){return this.pict.CSSMap.injectCSS(),_superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"pickScale",value:function(e){var t=i.applyScale(e);if("function"==typeof this.options.OnScaleChange)try{this.options.OnScaleChange(t)}catch(e){}return t}},{key:"_subscribeToScale",value:function(){if(!this._unsubscribeFromScale){var e=this;this._unsubscribeFromScale=i.onChange(function(){e.render()})}}},{key:"_refreshAppData",value:function(){for(var e=Array.isArray(this.options.Presets)?this.options.Presets:i.PRESETS,t=i.getActive(),o=0,n=1/0,r=0;r<e.length;r++){var a=Math.abs(e[r].Value-t);a<n&&(n=a,o=r)}for(var l=[],s=0;s<e.length;s++){var c=e[s];l.push({Value:c.Value,Label:c.Label,Selected:s===o})}var d="Viewport scale — currently "+Math.round(100*t)+"%";this.pict.AppData.PictSectionTheme=this.pict.AppData.PictSectionTheme||{},this.pict.AppData.PictSectionTheme.ScaleSelect={ActiveScale:t,Tooltip:d,Options:l}}}])}(n);r.default_configuration={ViewIdentifier:"Theme-ScaleSelect",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-ScaleSelect",DefaultRenderable:"Theme-ScaleSelect-Renderable",Presets:null,Templates:[{Hash:"Theme-ScaleSelect-Template",Template:'\n<select class="pict-theme-scaleselect"\n title="{~D:AppData.PictSectionTheme.ScaleSelect.Tooltip~}"\n onchange="_Pict.views[\'Theme-ScaleSelect\'].pickScale(parseFloat(this.value));">\n\t{~TS:Theme-ScaleSelect-Option-Template:AppData.PictSectionTheme.ScaleSelect.Options~}\n</select>'},{Hash:"Theme-ScaleSelect-Option-Template",Template:'\n<option value="{~D:Record.Value~}"{~NE:Record.Selected^ selected~}>{~D:Record.Label~}</option>'}],Renderables:[{RenderableHash:"Theme-ScaleSelect-Renderable",TemplateHash:"Theme-ScaleSelect-Template",ContentDestinationAddress:"#Theme-ScaleSelect",RenderMethod:"replace"}],CSS:"\n.pict-theme-scaleselect {\n\tmin-width: 180px;\n\tpadding: 6px 10px;\n\tborder-radius: 6px;\n\tfont: inherit;\n\tfont-size: 13px;\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-primary, #1f2933);\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tcursor: pointer;\n}\n.pict-theme-scaleselect:focus {\n\toutline: none;\n\tborder-color: var(--theme-color-brand-primary, #2563eb);\n\tbox-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);\n}",CSSPriority:500},t.exports=r},{"../Theme-Scale.js":81,"pict-view":137}],133:[function(e,t,o){var n=function(e){function t(e,o,n){return _classCallCheck(this,t),_callSuper(this,t,[e,o,n])}return _inherits(t,e),_createClass(t,[{key:"onAfterRender",value:function(e,o,n,i){if(this.pict.CSSMap.injectCSS(),"undefined"!=typeof document&&this.options.Height){var r=document.querySelector(".pict-theme-topbar");r&&(r.style.minHeight=this.options.Height+"px")}if(this._applyCompactBreakpoint(),"undefined"!=typeof document&&this.options.NavAlign){var a={left:"flex-start",right:"flex-end",center:"center"}[this.options.NavAlign];if(a){var l=document.querySelector(".pict-theme-topbar-nav");l&&(l.style.justifyContent=a)}}if(!1!==this.options.MountBrandMark){var s=this.pict.views["Theme-Brand-Mark"];s&&s.render()}if(this.options.NavView){var c=this.pict.views[this.options.NavView];c?c.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: NavView "'+this.options.NavView+'" not registered')}if(this.options.UserView){var d=this.pict.views[this.options.UserView];d?d.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: UserView "'+this.options.UserView+'" not registered')}if(!1!==this.options.MountThemeButton){var p=this.pict.views["Theme-Button"];p&&p.render()}return _superPropGet(t,"onAfterRender",this,1)?_superPropGet(t,"onAfterRender",this,3)([e,o,n,i]):void 0}},{key:"setNavView",value:function(e){this.options.NavView=e||null,this._mountSlot("#Theme-TopBar-Nav",this.options.NavView)}},{key:"setUserView",value:function(e){this.options.UserView=e||null,this._mountSlot("#Theme-TopBar-User",this.options.UserView)}},{key:"_mountSlot",value:function(e,t){if("undefined"!=typeof document){var o=document.querySelector(e);o&&(o.innerHTML="")}if(t){var n=this.pict.views[t];n?n.render():this.log&&this.log.warn&&this.log.warn('Theme-TopBar: view "'+t+'" not registered')}}},{key:"_applyCompactBreakpoint",value:function(){if("undefined"!=typeof document){var e=this.options.CompactBreakpoint;if(null!=e&&900!==e){var t="pict-theme-topbar-compact-"+this.UUID,o=document.getElementById(t);o||((o=document.createElement("style")).id=t,document.head.appendChild(o)),o.textContent="number"!=typeof e||e<=0?".pict-theme-topbar-nav { display: flex !important; }\n.pict-theme-topbar-user-slot { display: flex !important; }\n.pict-theme-topbar-burger { display: none !important; }\n.pict-theme-topbar-user { margin-left: 0 !important; }\n":"@media (max-width: "+e+"px) {\n\t.pict-theme-topbar-nav { display: none !important; }\n\t.pict-theme-topbar-user-slot { display: none !important; }\n\t.pict-theme-topbar-burger { display: inline-flex !important; }\n\t.pict-theme-topbar-user { margin-left: auto !important; }\n}\n@media (min-width: "+(e+1)+"px) {\n\t.pict-theme-topbar-nav { display: flex !important; }\n\t.pict-theme-topbar-user-slot { display: flex !important; }\n\t.pict-theme-topbar-burger { display: none !important; }\n\t.pict-theme-topbar-user { margin-left: 0 !important; }\n}\n"}}}},{key:"openBurgerMenu",value:function(){if("undefined"==typeof document)return null;var e=this.pict.views["Pict-Section-Modal"];if(!e||"function"!=typeof e.show)return"undefined"!=typeof console&&console.warn&&console.warn("Theme-TopBar: pict-section-modal not registered — burger menu unavailable."),null;var t=[],o=document.querySelector("#Theme-TopBar-Nav"),n=document.querySelector("#Theme-TopBar-User");o&&o.innerHTML.trim()&&t.push('<div class="pict-theme-burger-menu-section">'+o.innerHTML+"</div>"),n&&n.innerHTML.trim()&&t.push('<div class="pict-theme-burger-menu-section">'+n.innerHTML+"</div>"),0===t.length&&t.push('<div class="pict-theme-burger-menu-empty">No menu items configured.</div>');var i='<div class="pict-theme-burger-menu">'+t.join("")+"</div>";return e.show({title:"Menu",content:i,width:"280px",closeable:!0,buttons:[]})}}])}(e("pict-view"));t.exports=n,t.exports.default_configuration={ViewIdentifier:"Theme-TopBar",AutoInitialize:!0,AutoRender:!1,DefaultDestinationAddress:"#Theme-TopBar",DefaultRenderable:"Theme-TopBar-Renderable",MountBrandMark:!0,MountThemeButton:!0,NavView:null,UserView:null,Height:56,NavAlign:"right",CompactBreakpoint:900,Templates:[{Hash:"Theme-TopBar-Template",Template:'\n<div class="pict-theme-topbar">\n\t<div class="pict-theme-topbar-mark"><div id="Theme-Brand-Mark"></div></div>\n\t<div class="pict-theme-topbar-nav" id="Theme-TopBar-Nav"></div>\n\t<div class="pict-theme-topbar-user">\n\t\t<div class="pict-theme-topbar-user-slot" id="Theme-TopBar-User"></div>\n\t\t<div class="pict-theme-topbar-user-button"><div id="Theme-Button"></div></div>\n\t\t<button type="button" class="pict-theme-topbar-burger"\n\t\t\taria-label="More navigation"\n\t\t\ttitle="Menu"\n\t\t\tonclick="_Pict.views[\'Theme-TopBar\'].openBurgerMenu();">\n\t\t\t<svg width="20" height="20" viewBox="0 0 24 24" fill="none"\n\t\t\t\tstroke="currentColor" stroke-width="2"\n\t\t\t\tstroke-linecap="round" stroke-linejoin="round"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M3 6h18M3 12h18M3 18h18"/>\n\t\t\t</svg>\n\t\t</button>\n\t</div>\n</div>'}],Renderables:[{RenderableHash:"Theme-TopBar-Renderable",TemplateHash:"Theme-TopBar-Template",ContentDestinationAddress:"#Theme-TopBar",RenderMethod:"replace"}],CSS:'\n.pict-theme-topbar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\t/* The min-height is rewritten per-instance in onAfterRender from the\n\t Height option (default 56). Avoids the percent-height resolution\n\t trap: pict-section-modal\'s panel destination uses min-height: 100%\n\t on its inner div, which means a child\'s height: 100% / min-height:\n\t 100% resolves against the parent\'s *property* (auto), not its\n\t resolved size — and collapses the row to its content. A fixed px\n\t value gives align-items: center real space to centre into. */\n\tmin-height: 56px;\n\tpadding: 0 14px;\n\tbox-sizing: border-box;\n\tbackground: var(--theme-color-background-panel, transparent);\n\t/* Brand stripes are drawn by .pict-theme-topbar::after as an absolute\n\t element overlaying the bottom 5px of the row. Using ::after rather\n\t than border-bottom + box-shadow lets us put a transparent gap\n\t between the two stripes (border / box-shadow can\'t draw gaps).\n\t Position relative so the ::after positions to this row. */\n\tposition: relative;\n}\n/* Two-stripe brand identifier at the bottom of the topbar:\n 4px brand-primary (thicker — the dominant identifier)\n 2px transparent gap (clearly readable separation)\n 3px brand-secondary (thinner than primary but still substantial)\n Earlier iterations used 1–2px stripes; both read clearly at light\n mode but dark-mode secondary colors are often desaturated (lifted)\n so the eye can miss a thin band against a dark background. The\n current sizes push the secondary above the perception threshold\n regardless of palette. Stripes overlay the bottom 9px of the row;\n content (which centres in the full row via align-items: center)\n keeps its visual position. */\n.pict-theme-topbar::after {\n\tcontent: \'\';\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\theight: 9px;\n\tpointer-events: none;\n\tbackground: linear-gradient(\n\t\tto bottom,\n\t\tvar(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)) 0,\n\t\tvar(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb)) 4px,\n\t\ttransparent 4px,\n\t\ttransparent 6px,\n\t\tvar(--brand-color-secondary-mode, var(--theme-color-brand-secondary, transparent)) 6px,\n\t\tvar(--brand-color-secondary-mode, var(--theme-color-brand-secondary, transparent)) 9px\n\t);\n}\n.pict-theme-topbar-mark {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n}\n.pict-theme-topbar-nav {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\talign-items: center;\n\t/* Default to right-aligning nav items inside the stretched slot —\n\t the convention retold-* apps converged on. Overridden per-instance\n\t from the NavAlign option in onAfterRender. */\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tmin-width: 0;\n\t/* Horizontally scrollable when the nav overflows (narrow viewports\n\t with many buttons) — better than overflow:hidden which would\n\t silently clip buttons offscreen. The vertical axis stays clipped\n\t so a tall accidental child doesn\'t blow up the row height. A\n\t proper overflow menu is a future enhancement; this gets us safe\n\t degradation today. */\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\t/* Hide the scrollbar by default; modern browsers pick up the\n\t trackpad scroll without it. Apps wanting a visible scrollbar\n\t can override at higher specificity. */\n\tscrollbar-width: none;\n}\n.pict-theme-topbar-nav::-webkit-scrollbar { display: none; }\n/* Active-route indicator. The convention every host app should follow:\n put aria-current="page" on the button (or anchor) representing the\n current route. The W3C-standard attribute reads correctly to screen\n readers and gets a brand-tinted highlight here. Apps that already\n ship their own active styling can override these rules — they\'re\n keyed off attribute selectors so no class collision is possible. */\n.pict-theme-topbar-nav [aria-current="page"],\n.pict-theme-topbar-user [aria-current="page"] {\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tbackground: var(--theme-color-background-hover, rgba(37, 99, 235, 0.08));\n}\n.pict-theme-topbar-user {\n\tflex: 0 0 auto;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n.pict-theme-topbar-user-slot {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n.pict-theme-topbar-user-button {\n\tdisplay: flex;\n\talign-items: center;\n}\n/* Burger button — hidden by default; the media query (or the inline\n per-instance JS that swaps it via CompactBreakpoint) shows it once\n the viewport drops below the host\'s compact threshold. Sized to\n match Theme-Button (28×28) so the row\'s rhythm is preserved. */\n.pict-theme-topbar-burger {\n\tdisplay: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 28px;\n\theight: 28px;\n\tpadding: 0;\n\tborder-radius: 6px;\n\tborder: 1px solid var(--theme-color-border-default, #cfd5dd);\n\tbackground: var(--theme-color-background-secondary, #fbfbfc);\n\tcolor: var(--theme-color-text-secondary, #4a5568);\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n.pict-theme-topbar-burger:hover {\n\tbackground: var(--theme-color-background-hover, #f0f0f0);\n\tcolor: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n\tborder-color: var(--brand-color-primary-mode, var(--theme-color-brand-primary, #2563eb));\n}\n/* Burger menu popup — applied to the cloned nav + user DOM inside\n pict-section-modal. The cloned children inherit their original\n styling (action buttons, badges, etc.) so the popup looks visually\n consistent with what was on the topbar. */\n.pict-theme-burger-menu {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n.pict-theme-burger-menu-section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n/* Cloned children render as a vertical stack inside the popup — flip\n the horizontal flex layouts to column so each button takes a full\n row instead of cramming side-by-side at narrow width. */\n.pict-theme-burger-menu .rm-topbar-nav,\n.pict-theme-burger-menu .rm-topbar-user,\n.pict-theme-burger-menu [class*="-topbar-nav"],\n.pict-theme-burger-menu [class*="-topbar-user"] {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: stretch;\n\tgap: 6px;\n}\n.pict-theme-burger-menu button { width: 100%; text-align: left; }\n.pict-theme-burger-menu .rm-topbar-nav-divider,\n.pict-theme-burger-menu [class*="divider"] { display: none; }\n/* Compact mode — defaults to a 900px breakpoint. The onAfterRender\n handler injects a per-instance <style> rule when the host passes a\n different CompactBreakpoint, so this @media block is the fallback\n for hosts that accept the default. */\n@media (max-width: 900px) {\n\t.pict-theme-topbar-nav { display: none !important; }\n\t.pict-theme-topbar-user-slot { display: none !important; }\n\t.pict-theme-topbar-burger { display: inline-flex; }\n\t/* In wide mode the flex-1 nav slot pushes the user-area to the\n\t right edge. With the nav hidden the user-area would collapse\n\t left of the now-empty middle; the auto-margin re-creates the\n\t "push right" effect so the theme button + burger stay flush\n\t against the right edge of the topbar. */\n\t.pict-theme-topbar-user { margin-left: auto; }\n}',CSSPriority:500}},{"pict-view":137}],134:[function(e,t,o){t.exports={name:"pict-template",version:"1.0.15",description:"Pict Template Base Class",main:"source/Pict-Template.js",scripts:{start:"node source/Pict-Template.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ."},types:"types/source/Pict-Template.d.ts",repository:{type:"git",url:"git+https://github.com/fable-retold/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/fable-retold/pict-view/issues"},homepage:"https://github.com/fable-retold/pict-view#readme",devDependencies:{pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],135:[function(e,t,o){var n=e("fable-serviceproviderbase"),i=e("../package.json"),r=function(e){function t(e,o,n){var r;return _classCallCheck(this,t),(r=_callSuper(this,t,[e,o,n])).fable,r.pict=r.fable,r.serviceType="PictTemplate",r._Package=i,r}return _inherits(t,e),_createClass(t,[{key:"render",value:function(e,t,o,n,i){return""}},{key:"renderAsync",value:function(e,t,o,n,i,r){return o(null,this.render(e,t,n,i,r))}},{key:"addPattern",value:function(e,t){return this.pict.MetaTemplate.addPatternBoth(e,t,this.render,this.renderAsync,this)}},{key:"resolveStateFromAddress",value:function(e,t,o,n,i,r){return this.pict.resolveStateFromAddress(e,t,o,n,i,r)}}])}(n);t.exports=r,t.exports.template_hash="Default"},{"../package.json":134,"fable-serviceproviderbase":6}],136:[function(e,t,o){t.exports={name:"pict-view",version:"1.0.68",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/fable-retold/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/fable-retold/pict-view/issues"},homepage:"https://github.com/fable-retold/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.363",quackage:"^1.0.65",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.67","fable-serviceproviderbase":"^3.0.19"}}},{}],137:[function(e,t,o){var n=e("fable-serviceproviderbase"),i=e("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(e){function t(e,o,n){var a;_classCallCheck(this,t),(a=_callSuper(this,t,[e,Object.assign({},JSON.parse(JSON.stringify(r)),o),n])).fable,a.options,a.UUID,a.Hash,a.log;var l=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),l&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=i,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var s=0;s<a.options.Templates.length;s++){var c=a.options.Templates[s];"Hash"in c&&"Template"in c?(c.Source||(c.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(c.Hash,c.Template,c.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(s," in the options array."),c)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var h=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),u=a.options.CSSProvider?a.options.CSSProvider:h;a.pict.CSSMap.addCSS(h,a.options.CSS,u,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var g=a.options.Renderables[f];a.addRenderable(g)}return a}return _inherits(t,e),_createClass(t,[{key:"addRenderable",value:function(e,t,o,n,i){var r;"object"==_typeof(e)?r=e:r={RenderableHash:e,TemplateHash:t,DefaultTemplateRecordAddress:o,ContentDestinationAddress:n,RenderMethod:"string"!=typeof i?i:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(e){return this.onBeforeInitialize(),e()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(e){return this.onInitialize(),e()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(e){var t=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),e();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return o&&t.log.error("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ViewIdentifier," initialization failed: ").concat(o.message||o),{stack:o.stack}),t.initializeTimestamp=t.pict.log.getTimeStamp(),t.pict.LogNoisiness>0&&t.log.info("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ViewIdentifier," initialization complete.")),e()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(e){return this.onAfterInitialize(),e()}},{key:"onBeforeRender",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(e,t){return this.onBeforeRender(t),e()}},{key:"onBeforeProject",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(e,t){return this.onBeforeProject(t),e()}},{key:"buildRenderOptions",value:function(e,t,o){var n={Valid:!0};return n.RenderableHash="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,n.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(n.RenderableHash," (param ").concat(e,"because it is not a valid renderable.")),n.Valid=!1),n.Renderable=this.renderables[n.RenderableHash],n.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(e,") because it does not exist.")),n.Valid=!1),n.DestinationAddress="string"==typeof t?t:"string"==typeof n.Renderable.ContentDestinationAddress?n.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,n.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(e,") because it does not have a valid destination address (param ").concat(t,").")),n.Valid=!1),"object"===_typeof(o)?(n.RecordAddress="Passed in as object",n.Record=o):(n.RecordAddress="string"==typeof o?o:"string"==typeof n.Renderable.DefaultTemplateRecordAddress?n.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,n.Record="string"==typeof n.RecordAddress?this.pict.DataProvider.getDataByAddress(n.RecordAddress):void 0),n}},{key:"assignRenderContent",value:function(e,t,o){return this.pict.ContentAssignment.projectContent(e.RenderMethod,t,o,e.TestAddress)}},{key:"render",value:function(e,t,o,n){return this.renderWithScope(this,e,t,o,n)}},{key:"renderWithScope",value:function(e,t,o,n,i){var r,a,l,s="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return s?("__Virtual"==s?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:i&&i.TransactionHash,RootRenderableViewHash:i&&i.RootRenderableViewHash}:(r=Object.assign({},this.renderables[s])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(s,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(n)?(l=n,a="Passed in as object"):l="string"==typeof(a="string"==typeof n?n:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(s,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(s,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,l,null,[this],e,{RootRenderable:"object"===_typeof(i)?i:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(s,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(s," (param ").concat(t,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(s," (param ").concat(t,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(s," (param ").concat(t,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(e,t,o,n,i){return this.renderWithScopeAsync(this,e,t,o,n,i)}},{key:"renderWithScopeAsync",value:function(e,t,o,n,i,r){var a,l,s,c=this,d="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof n?n:"function"==typeof o?o:"function"==typeof t?t:"function"==typeof i?i:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(e){e&&c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.Name," renderAsync Auto Callback Error: ").concat(e),e)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(t,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(t,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:i&&"function"!=typeof i&&i.TransactionHash,RootRenderableViewHash:i&&"function"!=typeof i&&i.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(t,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(t,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(t,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(n)?(s=n,l="Passed in as object"):(l="string"==typeof n?n:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,s="string"==typeof l?this.pict.DataProvider.getDataByAddress(l):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(l,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var h=this.fable.newAnticipate();h.anticipate(function(e){c.onBeforeRenderAsync(e,a)}),h.anticipate(function(o){c.pict.parseTemplateByHash(a.TemplateHash,s,function(e,n){return e?(c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(t,") because it did not parse the template."),e),o(e)):(a.Content=n,o())},[c],e,{RootRenderable:"object"===_typeof(i)?i:a})}),h.anticipate(function(e){c.onBeforeProjectAsync(e,a)}),h.anticipate(function(e){c.onProjectAsync(e,a)}),"virtual-assignment"!==a.RenderMethod&&(h.anticipate(function(e){c.onAfterProjectAsync(e,a)}),h.anticipate(function(e){c.onAfterRenderAsync(e,a)})),h.wait(p)}},{key:"renderDefaultAsync",value:function(e){this.renderAsync(e)}},{key:"basicRender",value:function(e,t,o){return this.basicRenderWithScope(this,e,t,o)}},{key:"basicRenderWithScope",value:function(e,t,o,n){var i=this.buildRenderOptions(t,o,n);return i.Valid?(this.assignRenderContent(i.Renderable,i.DestinationAddress,this.pict.parseTemplateByHash(i.Renderable.TemplateHash,i.Record,null,[this],e,{RootRenderable:i.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(i.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(e,t,o,n){return this.basicRenderWithScopeAsync(this,e,t,o,n)}},{key:"basicRenderWithScopeAsync",value:function(e,t,o,n,i){var r=this,a="function"==typeof i?i:"function"==typeof n?n:"function"==typeof o?o:"function"==typeof t?t:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(e){e&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(e),e)});var l=this.buildRenderOptions(t,o,n);if(!l.Valid){var s="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(l.RenderableHash," because it is not valid.");return this.log.error(s),a(new Error(s))}this.pict.parseTemplateByHash(l.Renderable.TemplateHash,l.Record,function(e,t){return e?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(l.RenderableHash," because it did not parse the template."),e),a(e)):(r.assignRenderContent(l.Renderable,l.DestinationAddress,t),a())},[this],e,{RootRenderable:l.Renderable})}},{key:"onProject",value:function(e){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===e.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(e.TransactionHash,{ViewHash:this.Hash,Renderable:e},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(e.RenderableHash,"] content length ").concat(e.Content.length," to Destination [").concat(e.ContentDestinationAddress,"] using Async render method ").concat(e.RenderMethod,".")),this.pict.ContentAssignment.projectContent(e.RenderMethod,e.ContentDestinationAddress,e.Content,e.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(e,t){return this.onProject(t),e()}},{key:"onAfterRender",value:function(e){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),e&&e.RootRenderableViewHash===this.Hash){var t,o=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{for(o.s();!(t=o.n()).done;){var n=t.value,i=this.pict.views[n.Data.ViewHash];i?(i.onAfterProject(),i.onAfterRender(n.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(n.Data.ViewHash,"."))}}catch(e){o.e(e)}finally{o.f()}this.pict.TransactionTracking.unregisterTransaction(e.TransactionHash)}return!0}},{key:"onAfterRenderAsync",value:function(e,t){var o=this;this.onAfterRender(t);var n=this.fable.newAnticipate(),i=t&&t.RootRenderableViewHash===this.Hash;if(i){var r,a=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{var l=function(){var e=r.value,i=o.pict.views[e.Data.ViewHash];if(!i)return o.log.error("PictView [".concat(o.UUID,"]::[").concat(o.Hash,"] ").concat(o.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(e.Data.ViewHash,".")),1;n.anticipate(i.onAfterProjectAsync.bind(i)),n.anticipate(function(t){i.onAfterRenderAsync(t,e.Data.Renderable)})};for(a.s();!(r=a.n()).done;)l()}catch(e){a.e(e)}finally{a.f()}}return n.wait(function(n){return i&&t&&t.TransactionHash&&o.pict.TransactionTracking.unregisterTransaction(t.TransactionHash),e(n)})}},{key:"onAfterProject",value:function(e){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(e,t){return e()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(e){return this.onBeforeSolve(),e()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(e){return this.onSolve(),e()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(e){var t=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),n="function"==typeof e?e:null;n||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," solveAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeSolveAsync.bind(this)),o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ViewIdentifier," solveAsync() complete.")),t.lastSolvedTimestamp=t.pict.log.getTimeStamp(),n(e)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(e){return this.onAfterSolve(),e()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(e){return this.onBeforeMarshalFromView(),e()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(e){return this.onMarshalFromView(),e()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(e){var t=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),n="function"==typeof e?e:null;n||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),o.anticipate(this.onMarshalFromViewAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ViewIdentifier," marshalFromViewAsync() complete.")),t.lastMarshalFromViewTimestamp=t.pict.log.getTimeStamp(),n(e)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(e){return this.onAfterMarshalFromView(),e()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(e){return this.onBeforeMarshalToView(),e()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(e){return this.onMarshalToView(),e()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(e){var t=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),n="function"==typeof e?e:null;n||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(e){e&&t.log.error("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.Name," marshalToViewAsync Auto Callback Error: ").concat(e),e)}),o.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),o.anticipate(this.onMarshalToViewAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewAsync.bind(this)),o.wait(function(e){return t.pict.LogNoisiness>2&&t.log.trace("PictView [".concat(t.UUID,"]::[").concat(t.Hash,"] ").concat(t.options.ViewIdentifier," marshalToViewAsync() complete.")),t.lastMarshalToViewTimestamp=t.pict.log.getTimeStamp(),n(e)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(e){return this.onAfterMarshalToView(),e()}},{key:"isPictView",get:function(){return!0}}])}(n);t.exports=a},{"../package.json":136,"fable-serviceproviderbase":6}],138:[function(e,t,o){var n={"@":{DataType:"AutoIdentity",Label:"Auto ID",HasSize:!1},"%":{DataType:"GUID",Label:"GUID",HasSize:!1},$:{DataType:"String",Label:"String",HasSize:!0},"*":{DataType:"Text",Label:"Text",HasSize:!1},"#":{DataType:"Numeric",Label:"Numeric",HasSize:!1},".":{DataType:"Decimal",Label:"Decimal",HasSize:!0},"&":{DataType:"DateTime",Label:"Date/Time",HasSize:!1},"^":{DataType:"Boolean",Label:"Boolean",HasSize:!1}},i={};for(var r in n)i[n[r].DataType]=r;t.exports={MICRODDL_TYPE_MAP:n,DATATYPE_TO_SYMBOL:i,columnsToMicroDDL:function(e,t){for(var o=["!"+(t||"Untitled").replace(/[^a-zA-Z0-9_]/g,"")],r=0;r<e.length;r++){var a=e[r],l=i[a.DataType]||"$",s=l+(a.Name||"Column"+r);n[l].HasSize&&a.Size&&(s+=" "+a.Size),o.push(s)}return o.join("\n")},microDDLToColumns:function(e){for(var t=e.split("\n"),o=[],i=0;i<t.length;i++){var r=t[i].trim();if(!(!r||r.startsWith("!")||r.startsWith("//")||r.startsWith("--")||r.startsWith("->"))){var a=r.charAt(0);if(n.hasOwnProperty(a)){var l=r.substring(1).trim().split(/\s+/);o.push({Name:l[0]||"",DataType:n[a].DataType,Size:l[1]||""})}}}return o}}},{}],139:[function(e,t,o){var n=e("pict-view"),i=e("./MappingEditor-SchemaUtils.js"),r=function(t){function o(e,t,n){var i;return _classCallCheck(this,o),(i=_callSuper(this,o,[e,t,n]))._EditingContextID=0,i._EditingName="",i._CurrentMappings=[],i._SelectedMappingID=0,i._DiscoveredFields={},i._FlowView=null,i._MapEditorMode="flow",i._MappingSources=[],i._MappingStores=[],i._CurrentTargetSchema=null,i}return _inherits(o,t),_createClass(o,[{key:"_doLoadMappings",value:function(e){return Promise.resolve({Mappings:[]})}},{key:"_doLoadSources",value:function(){return Promise.resolve([])}},{key:"_doLoadStores",value:function(e){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(e){return Promise.resolve({SchemaDefinition:""})}},{key:"_doLoadMapping",value:function(e){return Promise.resolve({Mapping:null})}},{key:"_doDeleteMapping",value:function(e){return Promise.resolve({})}},{key:"_doDiscoverSourceFields",value:function(e,t,o){return Promise.resolve({Headers:[],SampleSize:0})}},{key:"_doCreateMapping",value:function(e,t){return Promise.resolve({Mapping:{}})}},{key:"_doUpdateMapping",value:function(e,t){return Promise.resolve({Mapping:{}})}},{key:"_onClose",value:function(){}},{key:"_doToast",value:function(e,t){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];o&&"function"==typeof o.toast?o.toast(e,t):this.log.info("[MeadowMappingEditor] "+e)}},{key:"_doConfirm",value:function(e,t){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];return o&&"function"==typeof o.confirm?o.confirm(e,t):Promise.resolve("undefined"!=typeof window&&window.confirm(e))}},{key:"editMappings",value:function(e,t){var o=this;this._EditingContextID=e,this._EditingName=t||"",this.render();var n=document.getElementById("MeadowMap-Editor"),i=document.getElementById("MeadowMap-Title");n&&(n.classList.add("active"),n.scrollIntoView({behavior:"smooth",block:"nearest"})),i&&(i.textContent="Mappings: "+(t||"Untitled"));var r=document.getElementById("MeadowMap-List-Wrap"),a=document.getElementById("MeadowMap-Detail");r&&(r.style.display=""),a&&(a.style.display="none"),Promise.all([this._doLoadMappings(e),this._doLoadSources(),this._doLoadStores(e),this._doLoadTargetSchema(e)]).then(function(e){o._CurrentMappings=e[0]&&e[0].Mappings?e[0].Mappings:[],o._MappingSources=Array.isArray(e[1])?e[1]:[],o._MappingStores=e[2]&&e[2].Stores?e[2].Stores:[];for(var t=0;t<o._MappingSources.length;t++){var n=o._MappingSources[t];Array.isArray(n.Columns)&&n.Columns.length>0&&(o._DiscoveredFields[n.IDSource]=n.Columns)}var i=e[3];i&&i.SchemaDefinition&&(o._CurrentTargetSchema=i.SchemaDefinition),o.refreshMappingList()})}},{key:"closeMappingEditor",value:function(){this._FlowView&&(this._FlowView=null),this._SelectedMappingID=0,this._onClose()}},{key:"refreshMappingList",value:function(){var e=document.getElementById("MeadowMap-List");if(e)if(0!==this._CurrentMappings.length){var t=this.options.ViewIdentifier,o='<table class="meadow-mapping-list-table"><thead><tr>';o+="<th>ID</th><th>Name</th><th>Source</th><th>Active</th><th>Actions</th>",o+="</tr></thead><tbody>";for(var n=0;n<this._CurrentMappings.length;n++){for(var i=this._CurrentMappings[n],r="—",a=0;a<this._MappingSources.length;a++)if(this._MappingSources[a].IDSource===i.IDSource){r=this._MappingSources[a].Name||"Source "+i.IDSource;break}o+="<tr>",o+="<td>"+i.IDProjectionMapping+"</td>",o+="<td><strong>"+(i.Name||"—")+"</strong></td>",o+="<td>"+r+"</td>",o+="<td>"+(i.Active?"✓":"✗")+"</td>",o+="<td>",o+='<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="window._Pict.views[\''+t+"'].openMappingDetail("+i.IDProjectionMapping+')">Edit</button> ',o+='<button class="meadow-mapping-btn meadow-mapping-btn-danger meadow-mapping-btn-small" onclick="window._Pict.views[\''+t+"'].deleteMapping("+i.IDProjectionMapping+')">Delete</button>',o+="</td>",o+="</tr>"}o+="</tbody></table>",e.innerHTML=o}else e.innerHTML='<div style="text-align:center; padding:1.5em; color:var(--theme-color-text-muted, #a09070);">No mappings yet. Create one to map source fields to target columns.</div>'}},{key:"newMapping",value:function(){var e=this;this._SelectedMappingID=0;var t=document.getElementById("MeadowMap-List-Wrap"),o=document.getElementById("MeadowMap-Detail");t&&(t.style.display="none"),o&&(o.style.display="");var n=document.getElementById("MeadowMap-Name");n&&(n.value="");var i=this._MappingSources.length>0?this._MappingSources[0].IDSource:void 0;this._populateSourceDropdown(i),this._populateStoreChecklist();var r=document.getElementById("MeadowMap-JSON");if(r){var a=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),l="GUID"+a,s="ID"+a,c={};c[l]="{~D:Record.IDRecord~}",c[s]="{~D:Record.IDRecord~}",r.value=JSON.stringify({Entity:a,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:l,Mappings:c,Solvers:[],ManyfestAddresses:!1},null,"\t")}var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),this._FlowView=null,this.switchMapMode("flow"),this.initFlowView(),this._doLoadTargetSchema(this._EditingContextID).then(function(t){t&&t.SchemaDefinition&&(e._CurrentTargetSchema=t.SchemaDefinition),e._rebuildFlowNodes()})}},{key:"openMappingDetail",value:function(e){var t=this;this._SelectedMappingID=e,this._doLoadMapping(e).then(function(e){if(e&&e.Mapping){var o=e.Mapping,n=document.getElementById("MeadowMap-List-Wrap"),i=document.getElementById("MeadowMap-Detail");n&&(n.style.display="none"),i&&(i.style.display="");var r=document.getElementById("MeadowMap-Name");r&&(r.value=o.Name||""),t._populateSourceDropdown(o.IDSource);var a=null;try{var l=JSON.parse(o.MappingConfiguration||"{}");Array.isArray(l.TargetStores)&&l.TargetStores.length>0&&(a=l.TargetStores)}catch(e){}!a&&o.IDProjectionStore&&(a=[o.IDProjectionStore]),t._populateStoreChecklist(a);var s={};try{s=JSON.parse(o.MappingConfiguration||"{}")}catch(e){}Array.isArray(s.sourceColumns)&&s.sourceColumns.length>0&&(t._DiscoveredFields[o.IDSource]=s.sourceColumns);var c=document.getElementById("MeadowMap-JSON");c&&(c.value=JSON.stringify(s,null,"\t"));var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),t._FlowView=null,t.switchMapMode("flow"),t.initFlowView(),t._doLoadTargetSchema(t._EditingContextID).then(function(e){if(e&&e.SchemaDefinition&&(t._CurrentTargetSchema=e.SchemaDefinition),t._FlowView){var n=null;try{n=JSON.parse(o.FlowDiagramState||"null")}catch(e){}n&&n.Nodes&&n.Nodes.length>0&&"function"==typeof t._FlowView.setFlowData&&t._FlowView.setFlowData(n)}t._rebuildFlowNodes()})}else t._doToast("Mapping not found.","error")})}},{key:"deleteMapping",value:(n=_asyncToGenerator(_regenerator().m(function e(t){var o=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._doConfirm("Delete this mapping?",{title:"Delete Mapping",confirmLabel:"Delete",dangerous:!0});case 1:if(e.v){e.n=2;break}return e.a(2);case 2:this._doDeleteMapping(t).then(function(){o._doLoadMappings(o._EditingContextID).then(function(e){o._CurrentMappings=e&&e.Mappings?e.Mappings:[],o.refreshMappingList()})});case 3:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"switchMapMode",value:function(e){this._MapEditorMode=e;var t=document.getElementById("MeadowMap-Flow-Wrap"),o=document.getElementById("MeadowMap-JSON-Wrap"),n=document.getElementById("MeadowMap-Mode-Flow"),i=document.getElementById("MeadowMap-Mode-JSON");if("flow"===e)t&&(t.style.display=""),o&&(o.style.display="none"),n&&n.classList.add("active"),i&&i.classList.remove("active");else if(t&&(t.style.display="none"),o&&(o.style.display=""),n&&n.classList.remove("active"),i&&i.classList.add("active"),this._FlowView&&"function"==typeof this._FlowView.getFlowData){var r=this.flowToMappingConfig(),a=document.getElementById("MeadowMap-JSON");a&&(a.value=JSON.stringify(r,null,"\t"))}}},{key:"_populateSourceDropdown",value:function(e){var t=document.getElementById("MeadowMap-Source");if(t){for(var o='<option value="0">Select a source...</option>',n=0;n<this._MappingSources.length;n++){var i=this._MappingSources[n],r=i.IDSource===e?" selected":"";o+='<option value="'+i.IDSource+'"'+r+">"+(i.Name||"Source "+i.IDSource)+"</option>"}t.innerHTML=o}}},{key:"_populateStoreChecklist",value:function(e){var t=document.getElementById("MeadowMap-Stores");if(t){var o={};if(Array.isArray(e))for(var n=0;n<e.length;n++)o[e[n]]=!0;else e&&(o[e]=!0);if(0!==this._MappingStores.length){for(var i="",r=0;r<this._MappingStores.length;r++){var a=this._MappingStores[r],l=o[a.IDProjectionStore]?" checked":"",s=(a.TargetTableName||"Store "+a.IDProjectionStore)+" ("+(a.Status||"Unknown")+")";i+="<label>",i+='<input type="checkbox" value="'+a.IDProjectionStore+'"'+l+">",i+=" "+s,i+="</label>"}t.innerHTML=i}else t.innerHTML='<div style="font-size:0.82em; color:var(--theme-color-text-muted, #a09070);">No stores configured yet.</div>'}}},{key:"_getCheckedStoreIDs",value:function(){var e=document.getElementById("MeadowMap-Stores");if(!e)return[];for(var t=e.querySelectorAll('input[type="checkbox"]:checked'),o=[],n=0;n<t.length;n++)o.push(parseInt(t[n].value,10));return o}},{key:"discoverSourceFields",value:function(){var e=this,t=document.getElementById("MeadowMap-Source"),o=t?parseInt(t.value,10):0;o?this._doDiscoverSourceFields(this._EditingContextID,o,50).then(function(t){if(t&&t.Error)e._doToast("Error: "+t.Error,{type:"error"});else{var n=t&&t.Headers?t.Headers:[];e._DiscoveredFields[o]=n,e._doToast("Discovered "+n.length+" fields from "+(t.SampleSize||0)+" records: "+n.join(", "),{type:"success",duration:6e3}),e._rebuildFlowNodes()}}):this._doToast("Select a source first.",{type:"warning"})}},{key:"_rebuildFlowNodes",value:function(){var e=document.getElementById("MeadowMap-Source"),t=e?parseInt(e.value,10):0,o=this._DiscoveredFields[t]||[],n=this._getSchemaColumns();if(this.initFlowView(),this._FlowView){for(var i="Source: "+(e&&e.selectedIndex>=0?e.options[e.selectedIndex].text:"Source"),r="Target: "+(this._EditingName||"Target"),a=[{Hash:"src-whole-record",Direction:"output",Side:"right",Label:"Whole Record"}],l=0;l<o.length;l++)a.push({Hash:"src-field-"+o[l].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"output",Side:"right",Label:o[l]});for(var s=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),c="GUID"+s,d="ID"+s,p=[{Hash:"tgt-col-"+c,Direction:"input",Side:"left",Label:c},{Hash:"tgt-col-"+d,Direction:"input",Side:"left",Label:d}],h=0;h<n.length;h++)n[h]!==c&&n[h]!==d&&p.push({Hash:"tgt-col-"+n[h].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"input",Side:"left",Label:n[h]});for(var u=this._FlowView.getFlowData(),f=null,g=null,m=0;m<u.Nodes.length;m++)"SRC"===u.Nodes[m].Type&&(f=u.Nodes[m]),"TGT"===u.Nodes[m].Type&&(g=u.Nodes[m]);if(f){for(var v=a.slice(),w={},y=0;y<v.length;y++)w[v[y].Hash]=!0;for(var b=f.Ports||[],S=0;S<b.length;S++)w[b[S].Hash]||v.push(b[S]);for(var _=this._FlowView._FlowData.Nodes,k=0;k<_.length;k++)if(_[k].Hash===f.Hash){_[k].Ports=v,_[k].Title=i;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-src-"+this.fable.getUUID(),Type:"SRC",X:50,Y:50,Width:200,Height:100,Title:i,Ports:a,Data:{}});if(g){for(var P=p.slice(),F={},T=0;T<P.length;T++)F[P[T].Hash]=!0;for(var C=g.Ports||[],D=0;D<C.length;D++)F[C[D].Hash]||P.push(C[D]);for(var x=this._FlowView._FlowData.Nodes,L=0;L<x.length;L++)if(x[L].Hash===g.Hash){x[L].Ports=P,x[L].Title=r;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-tgt-"+this.fable.getUUID(),Type:"TGT",X:550,Y:50,Width:200,Height:100,Title:r,Ports:p,Data:{}});"function"==typeof this._FlowView.renderFlow?this._FlowView.renderFlow():"function"==typeof this._FlowView.render&&this._FlowView.render()}}},{key:"_getSchemaColumns",value:function(){var e=[],t=this._CurrentTargetSchema||"";if(t)for(var o=i.microDDLToColumns(t),n=0;n<o.length;n++)e.push(o[n].Name);return e}},{key:"initFlowView",value:function(){if(!this._FlowView){var t=document.getElementById("MeadowMap-Flow-Container");if(t)try{var o=e("pict-section-flow");this._FlowView=this.pict.addView("MeadowMapping-Flow",{ViewIdentifier:"MeadowMapping-Flow",DefaultDestinationAddress:"#MeadowMap-Flow-Container",EnableToolbar:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0},o);var n=e("./flow-cards/FlowCard-MappingSource.js"),i=e("./flow-cards/FlowCard-MappingTarget.js"),r=e("./flow-cards/FlowCard-TemplateExpression.js"),a=e("./flow-cards/FlowCard-SolverExpression.js");this.pict.addServiceType("FlowCardMappingSource",n),this.pict.addServiceType("FlowCardMappingTarget",i),this.pict.addServiceType("FlowCardTemplateExpression",r),this.pict.addServiceType("FlowCardSolverExpression",a),"function"==typeof this._FlowView.render&&this._FlowView.render();var l=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingSource",{}),s=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingTarget",{}),c=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardTemplateExpression",{}),d=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardSolverExpression",{});l.registerWithFlowView(this._FlowView),s.registerWithFlowView(this._FlowView),c.registerWithFlowView(this._FlowView),d.registerWithFlowView(this._FlowView)}catch(e){this.log.error("Failed to initialize flow view: "+e.message),t.innerHTML='<div style="padding:2em; text-align:center; color:var(--theme-color-text-muted, #a09070);">Flow editor could not be loaded. Use JSON Config mode instead.</div>'}}}},{key:"flowToMappingConfig",value:function(){var e=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),t="GUID"+e,o="ID"+e,n={Entity:e,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:t,Mappings:{},Solvers:[],ManyfestAddresses:!1};if(!this._FlowView||"function"!=typeof this._FlowView.getFlowData)return n;var i=this._FlowView.getFlowData();if(!i||!i.Connections)return n;var r={},a={};if(i.Nodes)for(var l=0;l<i.Nodes.length;l++){var s=i.Nodes[l];if(r[s.Hash]=s,s.Ports)for(var c=0;c<s.Ports.length;c++)a[s.Ports[c].Hash]={Label:s.Ports[c].Label,NodeHash:s.Hash,NodeType:s.Type}}for(var d={},p=0;p<i.Connections.length;p++){var h=i.Connections[p],u=a[h.SourcePortHash],f=a[h.TargetPortHash];if(u&&f&&"TGT"===f.NodeType){var g=f.Label;if(g){var m=r[u.NodeHash];if(m)if("SRC"===m.Type){var v=u.Label;if("Whole Record"===v)continue;var w=h.Data&&h.Data.Template?h.Data.Template:"{~D:Record."+v+"~}";g===t&&(n.GUIDTemplate=w),n.Mappings[g]=w}else if("TPL"===m.Type){var y=m.Data&&m.Data.TemplateExpression?m.Data.TemplateExpression:"";y&&(g===t&&(n.GUIDTemplate=y),n.Mappings[g]=y)}else if("SOL"===m.Type){var b=m.Data&&m.Data.SolverExpression?m.Data.SolverExpression:"";b&&(d[m.Hash]||(d[m.Hash]={expression:b,outputs:{}}),d[m.Hash].outputs[g]=!0)}}}}n.Mappings.hasOwnProperty(t)||(n.Mappings[t]=n.GUIDTemplate),n.Mappings.hasOwnProperty(o)||(n.Mappings[o]="{~D:Record.IDRecord~}");for(var S=Object.keys(d),_=0;_<S.length;_++)n.Solvers.push(d[S[_]]);return n}},{key:"saveMapping",value:function(){var e=this,t=document.getElementById("MeadowMap-Name"),o=document.getElementById("MeadowMap-Source"),n=t?t.value.trim():"",i=o?parseInt(o.value,10):0,r=this._getCheckedStoreIDs(),a=r.length>0?r[0]:0;if(n){var l;if("json"===this._MapEditorMode){var s=document.getElementById("MeadowMap-JSON"),c=s?s.value:"{}";try{l=JSON.parse(c)}catch(e){return void this._doToast("Invalid JSON: "+e.message,{type:"error"})}}else l=this.flowToMappingConfig();l.TargetStores=r;var d=this._DiscoveredFields[i];Array.isArray(d)&&d.length>0&&(l.sourceColumns=d);var p={};this._FlowView&&"function"==typeof this._FlowView.getFlowData&&(p=this._FlowView.getFlowData());var h={Name:n,IDSource:i,IDProjectionStore:a,MappingConfiguration:JSON.stringify(l),FlowDiagramState:JSON.stringify(p),Active:1};(this._SelectedMappingID?this._doUpdateMapping(this._SelectedMappingID,h):this._doCreateMapping(this._EditingContextID,h)).then(function(t){t&&t.Error?e._doToast("Error: "+t.Error,{type:"error"}):(t&&t.Mapping&&t.Mapping.IDProjectionMapping&&(e._SelectedMappingID=t.Mapping.IDProjectionMapping),e._doToast("Mapping saved.",{type:"success"}),e._doLoadMappings(e._EditingContextID).then(function(t){e._CurrentMappings=t&&t.Mappings?t.Mappings:[]}))})}else this._doToast("Enter a mapping name.",{type:"warning"})}}]);var n}(n);t.exports=r,t.exports.default_configuration={ViewIdentifier:"MeadowMappingEditor",DefaultRenderable:"MeadowMappingEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:"\n\t\t/* Meadow Mapping Editor */\n\t\t.meadow-mapping-editor {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.meadow-mapping-editor.active {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.meadow-mapping-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 1em;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-header h3 {\n\t\t\tmargin: 0;\n\t\t\tflex: 1;\n\t\t}\n\t\t.meadow-mapping-list-table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-list-table th {\n\t\t\ttext-align: left;\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--theme-color-text-muted, #a09070);\n\t\t\tpadding: 0.5em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-default, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-list-table td {\n\t\t\tpadding: 0.35em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--theme-color-border-light, #e8ddc8);\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.meadow-flow-container {\n\t\t\twidth: 100%;\n\t\t\theight: 500px;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--theme-color-background-secondary, #fcf8f0);\n\t\t\tmargin-bottom: 0.75em;\n\t\t}\n\t\t.meadow-mapping-json-editor {\n\t\t\twidth: 100%;\n\t\t\tmin-height: 300px;\n\t\t\tfont-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.75em;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--theme-color-background-panel, #fcf8f0);\n\t\t\tcolor: var(--theme-color-text-primary, #3a3020);\n\t\t\tresize: vertical;\n\t\t\ttab-size: 4;\n\t\t}\n\t\t.meadow-mapping-store-checklist {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.5em;\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.meadow-mapping-store-checklist label {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--theme-color-border-light, #e8ddc8);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--theme-color-background-panel, #fcf8f0);\n\t\t}\n\t\t.meadow-mapping-store-checklist label:has(input:checked) {\n\t\t\tborder-color: var(--theme-color-brand-primary, #18a5a0);\n\t\t\tbackground: var(--theme-color-background-selected, rgba(24,165,160,0.12));\n\t\t}\n\t\t.meadow-mapping-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 0.35em 0.9em;\n\t\t\tfont-size: 0.82em;\n\t\t\tfont-weight: 500;\n\t\t\tborder-radius: 4px;\n\t\t\tborder: 1px solid transparent;\n\t\t\tcursor: pointer;\n\t\t\ttext-decoration: none;\n\t\t\tline-height: 1.4;\n\t\t}\n\t\t.meadow-mapping-btn-primary {\n\t\t\tbackground: var(--theme-color-brand-primary, #18a5a0);\n\t\t\tcolor: var(--theme-color-background-panel, #fff);\n\t\t\tborder-color: var(--theme-color-brand-primary, #18a5a0);\n\t\t}\n\t\t.meadow-mapping-btn-primary:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-secondary {\n\t\t\tbackground: var(--theme-color-background-panel, #fcf8f0);\n\t\t\tcolor: var(--theme-color-text-primary, #3a3020);\n\t\t\tborder-color: var(--theme-color-border-default, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-btn-secondary:hover {\n\t\t\tbackground: var(--theme-color-border-light, #e8ddc8);\n\t\t}\n\t\t.meadow-mapping-btn-danger {\n\t\t\tbackground: var(--theme-color-status-error, #e74c3c);\n\t\t\tcolor: var(--theme-color-background-panel, #fff);\n\t\t\tborder-color: var(--theme-color-status-error, #e74c3c);\n\t\t}\n\t\t.meadow-mapping-btn-danger:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-small {\n\t\t\tpadding: 0.2em 0.6em;\n\t\t\tfont-size: 0.78em;\n\t\t}\n\t\t.meadow-schema-mode-tabs {\n\t\t\tdisplay: flex;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.meadow-schema-mode-tab {\n\t\t\tpadding: 0.25em 0.75em;\n\t\t\tfont-size: 0.8em;\n\t\t\tborder: 1px solid var(--theme-color-border-default, #d6c8ae);\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tbackground: var(--theme-color-background-panel, #fcf8f0);\n\t\t\tcolor: var(--theme-color-text-primary, #3a3020);\n\t\t}\n\t\t.meadow-schema-mode-tab.active {\n\t\t\tbackground: var(--theme-color-brand-primary, #18a5a0);\n\t\t\tcolor: var(--theme-color-background-panel, #fff);\n\t\t\tborder-color: var(--theme-color-brand-primary, #18a5a0);\n\t\t}\n\t\t.meadow-section-title {\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--theme-color-text-muted, #a09070);\n\t\t}\n\t",Templates:[{Hash:"MeadowMappingEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--theme-color-border-default); border-radius:4px; background:var(--theme-color-background-panel); color:var(--theme-color-text-primary);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--theme-color-border-default); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"MyTable","GUIDTemplate":"{~D:Record.IDRecord~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--theme-color-text-muted); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MeadowMappingEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MeadowMappingEditor-Content",TemplateHash:"MeadowMappingEditor-Template",DestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]}},{"./MappingEditor-SchemaUtils.js":138,"./flow-cards/FlowCard-MappingSource.js":140,"./flow-cards/FlowCard-MappingTarget.js":141,"./flow-cards/FlowCard-SolverExpression.js":142,"./flow-cards/FlowCard-TemplateExpression.js":143,"pict-section-flow":16,"pict-view":137}],140:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,Object.assign({},{Title:"Mapping Source",Name:"Mapping Source",Code:"SRC",Category:"Data Source",Description:"Source dataset with discovered record fields",TitleBarColor:"#2980b9",Width:200,Height:100,Inputs:[],Outputs:[{Name:"Whole Record",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),n])).serviceType="FlowCardMappingSource",i}return _inherits(t,e),_createClass(t)}(e("pict-section-flow").PictFlowCard);t.exports=n,t.exports.default_configuration={Title:"Mapping Source",Code:"SRC",Category:"Data Source",TitleBarColor:"#2980b9",Width:200,Height:100}},{"pict-section-flow":16}],141:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,Object.assign({},{Title:"Mapping Target",Name:"Mapping Target",Code:"TGT",Category:"Data Target",Description:"Mapping target table with schema columns",TitleBarColor:"#27ae60",Width:200,Height:100,Inputs:[],Outputs:[],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),n])).serviceType="FlowCardMappingTarget",i}return _inherits(t,e),_createClass(t)}(e("pict-section-flow").PictFlowCard);t.exports=n,t.exports.default_configuration={Title:"Mapping Target",Code:"TGT",Category:"Data Target",TitleBarColor:"#27ae60",Width:200,Height:100}},{"pict-section-flow":16}],142:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,Object.assign({},{Title:"Solver Expression",Name:"Solver Expression",Code:"SOL",Category:"Transform",Description:"Apply a Fable solver expression for conditional logic and computed values",TitleBarColor:"#d35400",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:var(--theme-color-border-default, #ccc); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.SolverExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Solver Expression",Configuration:{Template:"<div style=\"padding:8px;\"><label style=\"display:block; margin-bottom:4px; font-weight:bold; font-size:12px;\">Solver Expression</label><textarea id=\"FlowCard-SOL-{~D:Record.Hash~}\" style=\"width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:var(--theme-color-border-default, #e0e0e0); border:1px solid var(--theme-color-text-secondary, #444); border-radius:4px; padding:6px;\" onchange=\"(function(el){var n=pict.views['MeadowMapping-Flow'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash==='{~D:Record.Hash~}'){n._FlowData.Nodes[i].Data.SolverExpression=el.value;if(typeof n.renderFlow==='function')n.renderFlow();break;}}}})(this)\">{~D:Record.Data.SolverExpression~}</textarea><div style=\"font-size:10px; color:var(--theme-color-text-muted, #888); margin-top:4px;\">Example: IF(IncomingRecord.Type == 'Premium', 'GOLD', 'SILVER')</div></div>"}}},o),n])).serviceType="FlowCardSolverExpression",i}return _inherits(t,e),_createClass(t)}(e("pict-section-flow").PictFlowCard);t.exports=n,t.exports.default_configuration={Title:"Solver Expression",Code:"SOL",Category:"Transform",TitleBarColor:"#d35400",Width:220,Height:90}},{"pict-section-flow":16}],143:[function(e,t,o){var n=function(e){function t(e,o,n){var i;return _classCallCheck(this,t),(i=_callSuper(this,t,[e,Object.assign({},{Title:"Template Expression",Name:"Template Expression",Code:"TPL",Category:"Transform",Description:"Apply a Manyfest template expression to map source fields to a target column",TitleBarColor:"#8e44ad",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:var(--theme-color-border-default, #ccc); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.TemplateExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Template Expression",Configuration:{Template:'<div style="padding:8px;"><label style="display:block; margin-bottom:4px; font-weight:bold; font-size:12px;">Template Expression</label><textarea id="FlowCard-TPL-{~D:Record.Hash~}" style="width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:var(--theme-color-border-default, #e0e0e0); border:1px solid var(--theme-color-text-secondary, #444); border-radius:4px; padding:6px;" onchange="(function(el){var n=pict.views[\'MeadowMapping-Flow\'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash===\'{~D:Record.Hash~}\'){n._FlowData.Nodes[i].Data.TemplateExpression=el.value;if(typeof n.renderFlow===\'function\')n.renderFlow();break;}}}})(this)">{~D:Record.Data.TemplateExpression~}</textarea><div style="font-size:10px; color:var(--theme-color-text-muted, #888); margin-top:4px;">Use {~D:Record.FieldName~} syntax. Example: {~D:Record.Name~} in {~D:Record.City~}</div></div>'}}},o),n])).serviceType="FlowCardTemplateExpression",i}return _inherits(t,e),_createClass(t)}(e("pict-section-flow").PictFlowCard);t.exports=n,t.exports.default_configuration={Title:"Template Expression",Code:"TPL",Category:"Transform",TitleBarColor:"#8e44ad",Width:220,Height:90}},{"pict-section-flow":16}]},{},[2])(2)});
2
35
  //# sourceMappingURL=mapping-demo-editor.min.js.map