@sme.up/ketchup 11.0.0-SNAPSHOT-20241217120821 → 11.0.0-SNAPSHOT-20241217144747
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-cell-f64ce26f.js → f-cell-00ed0f88.js} +2 -2
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +88 -67
- package/dist/cjs/kup-box.cjs.entry.js +1 -1
- package/dist/cjs/kup-calendar.cjs.entry.js +3 -2
- package/dist/cjs/kup-cell.cjs.entry.js +3 -3
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +7 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +2 -2
- package/dist/cjs/kup-gantt_10.cjs.entry.js +23 -23
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-input-panel.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +11 -11
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +1 -1
- package/dist/cjs/kup-object-field.cjs.entry.js +1 -1
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +1 -1
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +1 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +38 -10
- package/dist/collection/components/kup-calendar/kup-calendar.js +24 -2
- package/dist/collection/components/kup-cell/kup-cell.js +2 -2
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
- package/dist/collection/components/kup-chip/kup-chip.js +2 -2
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +2 -2
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +46 -11
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +1 -1
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-dialog/kup-dialog.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.js +2 -2
- package/dist/collection/components/kup-echart/kup-echart.js +1 -1
- package/dist/collection/components/kup-editor/kup-editor.js +1 -1
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +2 -2
- package/dist/collection/components/kup-form/kup-form.js +2 -2
- package/dist/collection/components/kup-htm/kup-htm.js +1 -1
- package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +2 -2
- package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
- package/dist/collection/components/kup-list/kup-list-helper.js +3 -1
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
- package/dist/collection/components/kup-object-field/kup-object-field.js +1 -1
- package/dist/collection/components/kup-pdf/kup-pdf.js +1 -1
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
- package/dist/collection/components/kup-planner/kup-planner.js +1 -1
- package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
- package/dist/collection/components/kup-txt/kup-txt.js +1 -1
- package/dist/collection/components/kup-typography/kup-typography.js +1 -1
- package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
- package/dist/collection/f-components/f-cell/f-cell.js +2 -2
- package/dist/components/kup-accordion.js +1 -1
- package/dist/components/kup-activity-timeline.js +1 -1
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +5 -3
- package/dist/components/kup-card-list.js +2 -2
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +3 -3
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-custom-task-list-header.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +3 -3
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +4 -4
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gantt-calendar.js +1 -1
- package/dist/components/kup-gantt.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid-renderer.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-horizontal-scroll.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +4 -4
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +4 -4
- package/dist/components/kup-lazy.js +12 -12
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +6 -6
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-photo-frame.js +3 -3
- package/dist/components/kup-planner-renderer.js +1 -1
- package/dist/components/kup-planner.js +16 -16
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-standard-tooltip.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-switcher.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-task-gantt.js +1 -1
- package/dist/components/kup-task-list-header.js +1 -1
- package/dist/components/kup-task-list-table.js +1 -1
- package/dist/components/kup-task-list.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tooltip.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/kup-vertical-scroll.js +1 -1
- package/dist/components/{p-c97810e2.js → p-036b91a6.js} +1 -1
- package/dist/components/{p-a351db24.js → p-03aeb562.js} +2 -2
- package/dist/components/{p-3466bd5a.js → p-08373053.js} +1 -1
- package/dist/components/{p-776a38a0.js → p-41f531df.js} +15 -15
- package/dist/components/{p-822c3930.js → p-4311404d.js} +1 -1
- package/dist/components/{p-79c12fc7.js → p-4c7ef355.js} +2 -2
- package/dist/components/{p-f7c2ca1d.js → p-4d095265.js} +4 -4
- package/dist/components/{p-ff8bdafd.js → p-535c2227.js} +7 -7
- package/dist/components/{p-af3fcbd9.js → p-55e884c9.js} +3 -3
- package/dist/components/{p-ba7c1486.js → p-6c4f637c.js} +1 -1
- package/dist/components/{p-42f0b488.js → p-8353abf2.js} +2 -2
- package/dist/components/{p-f8c96edc.js → p-9793001e.js} +1 -1
- package/dist/components/{p-3bc624c9.js → p-9da60133.js} +1 -1
- package/dist/components/{p-22b40453.js → p-9de12833.js} +2 -2
- package/dist/components/{p-be17920c.js → p-a9d55e91.js} +2 -2
- package/dist/components/{p-babf447c.js → p-b275e6a3.js} +2 -2
- package/dist/components/{p-d8b0f5eb.js → p-d54bf97d.js} +5 -5
- package/dist/components/{p-074b0557.js → p-d797e199.js} +93 -69
- package/dist/components/{p-ae5af2ad.js → p-ddee2d87.js} +13 -13
- package/dist/esm/{f-cell-1256023f.js → f-cell-23d78e15.js} +2 -2
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js +88 -67
- package/dist/esm/kup-box.entry.js +1 -1
- package/dist/esm/kup-calendar.entry.js +3 -2
- package/dist/esm/kup-cell.entry.js +3 -3
- package/dist/esm/kup-custom-task-list-header_4.entry.js +7 -7
- package/dist/esm/kup-dashboard.entry.js +1 -1
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +2 -2
- package/dist/esm/kup-gantt_10.entry.js +23 -23
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +4 -4
- package/dist/esm/kup-input-panel.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +11 -11
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +1 -1
- package/dist/esm/kup-object-field.entry.js +1 -1
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner-renderer.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +1 -1
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-03626088.entry.js → p-14cd74b9.entry.js} +1 -1
- package/dist/ketchup/{p-f8c3b45b.entry.js → p-155f8ac8.entry.js} +1 -1
- package/dist/ketchup/{p-40b2e7e1.entry.js → p-191ffef4.entry.js} +1 -1
- package/dist/ketchup/{p-43e904b4.entry.js → p-213ec175.entry.js} +1 -1
- package/dist/ketchup/{p-c82def8f.entry.js → p-2685e746.entry.js} +1 -1
- package/dist/ketchup/{p-c143bb4f.entry.js → p-26ea9370.entry.js} +1 -1
- package/dist/ketchup/{p-2a0f6208.entry.js → p-270e166f.entry.js} +1 -1
- package/dist/ketchup/{p-383f0f64.entry.js → p-2c731626.entry.js} +1 -1
- package/dist/ketchup/{p-35e91a38.entry.js → p-2c7b2e13.entry.js} +1 -1
- package/dist/ketchup/p-32542996.entry.js +1 -0
- package/dist/ketchup/{p-7f2d6c8f.entry.js → p-3325cc15.entry.js} +1 -1
- package/dist/ketchup/{p-f3dcab80.entry.js → p-3ed6f1f5.entry.js} +1 -1
- package/dist/ketchup/p-46f52864.js +1 -0
- package/dist/ketchup/{p-47f63cc8.entry.js → p-4b2f6b96.entry.js} +1 -1
- package/dist/ketchup/{p-47ac897e.entry.js → p-58834d9a.entry.js} +1 -1
- package/dist/ketchup/p-599054a5.entry.js +16 -0
- package/dist/ketchup/{p-6242a54b.entry.js → p-61afb3e9.entry.js} +1 -1
- package/dist/ketchup/{p-801e0a58.entry.js → p-7dc67db6.entry.js} +1 -1
- package/dist/ketchup/{p-18ad3d25.entry.js → p-7f6b336d.entry.js} +1 -1
- package/dist/ketchup/{p-9ccb907e.entry.js → p-8413123b.entry.js} +1 -1
- package/dist/ketchup/{p-3aa599f4.entry.js → p-894e500b.entry.js} +1 -1
- package/dist/ketchup/p-8c65306d.entry.js +9 -0
- package/dist/ketchup/{p-f93fb43f.entry.js → p-994dd8aa.entry.js} +1 -1
- package/dist/ketchup/{p-21d05b2e.entry.js → p-a18842d7.entry.js} +1 -1
- package/dist/ketchup/{p-f81e7e01.entry.js → p-ab182c69.entry.js} +1 -1
- package/dist/ketchup/{p-d631b997.entry.js → p-ac327d1d.entry.js} +1 -1
- package/dist/ketchup/{p-193ae04f.entry.js → p-b0804c47.entry.js} +1 -1
- package/dist/ketchup/{p-36e492ac.entry.js → p-b10051e0.entry.js} +1 -1
- package/dist/ketchup/{p-612b260c.entry.js → p-eddd687c.entry.js} +1 -1
- package/dist/ketchup/{p-f7cb2d15.entry.js → p-f8cd1c6d.entry.js} +1 -1
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +5 -1
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +5 -0
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +1 -0
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +6 -1
- package/dist/types/components.d.ts +28 -2
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ketchup/p-06670b74.entry.js +0 -16
- package/dist/ketchup/p-4bb016dc.entry.js +0 -9
- package/dist/ketchup/p-5892775a.js +0 -1
- package/dist/ketchup/p-7c553de7.entry.js +0 -1
|
@@ -46,4 +46,4 @@ var r;if(Object.defineProperty(n,"__esModule",{value:!0}),String.fromCodePoint)r
|
|
|
46
46
|
* to-mark
|
|
47
47
|
* @version 1.0.1 | Tue Apr 13 2021
|
|
48
48
|
*/
|
|
49
|
-
!function(n,r){t.exports=r()}(window,(function(){return function(t){var n={};function r(i){if(n[i])return n[i].exports;var e=n[i]={i,l:!1,exports:{}};return t[i].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=t,r.c=n,r.d=function(t,n,i){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var e in t)r.d(i,e,function(n){return t[n]}.bind(null,e));return i},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=0)}([function(t,n,r){r.r(n);var i,e,o,u={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3},a=function(){function t(t){this._normalizeTextChildren(t),this._root=t,this._current=t}var n=t.prototype;return n.next=function(){var t,n=this._current;if(this._current){for(t=this._getNextNode(n);this._isNeedNextSearch(t,n);)t=(n=n.parentNode).nextSibling;this._current=t}return this._current},n.getNode=function(){return this._normalizeTextChildren(this._current),this._current},n._normalizeTextChildren=function(t){if(t&&!(t.childNodes.length<2))for(var n,r=t.firstChild;r.nextSibling;)n=r.nextSibling,r.nodeType===u.TEXT_NODE&&n.nodeType===u.TEXT_NODE?(r.nodeValue+=n.nodeValue,t.removeChild(n)):r=n},n.getNodeText=function(){var t=this.getNode();return t.nodeType===u.TEXT_NODE?t.nodeValue:t.textContent||t.innerText},n._isNeedNextSearch=function(t,n){return!t&&n!==this._root&&n.parentNode!==this._root},n._getNextNode=function(t){return t.firstChild||t.nextSibling},t}();o=u,(e="NODE_TYPE")in(i=a)?Object.defineProperty(i,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[e]=o;var s=/^[\s\r\n\t]+|[\s\r\n\t]+$/g,c=/>[\r\n\t]+</g,f=/>[ ]+</g;function h(t){var n;return"[object String]"===Object.prototype.toString.call(t)?(n=document.createElement("div")).innerHTML=l(t):n=t,n.__htmlRootByToMark=!0,n}function l(t){return(t=(t=t.replace(s,"")).replace(c,"><")).replace(f,"> <")}function v(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}h.preProcess=l;var d=/^\u0020/,p=/.+\u0020$/,g=/[\n\s\t]+/g,b=/^[\u0020\r\n\t]+|[\u0020\r\n\t]+$/g,m=/[\u0020]+/g,w=/[>(){}[\]+-.!#|]/g,y=/[[\]]/g,k=/!\[.*\]\(.*\)/g;function T(t,n,r){var i;for(i in r=r||null,t)if(t.hasOwnProperty(i)&&!1===n.call(r,t[i],i,t))break}function A(t){var n=t.tagName;return"S"===n||"B"===n||"I"===n||"EM"===n||"STRONG"===n||"A"===n||"IMG"===n||"CODE"===n}function E(t,n){T(n,(function(n,r){"converter"!==r?(t[r]||(t[r]={}),E(t[r],n)):t[r]=n}))}var L=function(){function t(t){this.rules={},this.lineFeedReplacement="",t&&this.addRules(t)}var n=t.prototype;return n.addRule=function(t,n){var r=t.split(", "),i=r.pop();for(n.fname=t;i;)this._setConverterWithSelector(i,n),i=r.pop()},n.addRules=function(t){T(t,(function(t,n){this.addRule(n,t)}),this)},n.getSpaceControlled=function(t,n){var r="",i="";return n.previousSibling&&(3===n.previousSibling.nodeType||A(n.previousSibling))&&(p.test(n.previousSibling.innerHTML||n.previousSibling.nodeValue)||d.test(n.innerHTML||n.nodeValue))&&(r=" "),n.nextSibling&&(3===n.nextSibling.nodeType||A(n.nextSibling))&&(d.test(n.nextSibling.innerHTML||n.nextSibling.nodeValue)||p.test(n.innerHTML||n.nodeValue))&&(i=" "),r+t+i},n.convert=function(t,n){var r,i=this._getConverter(t);return t&&t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute("data-tomark-pass")?(t.removeAttribute("data-tomark-pass"),r=function(t,n){var r=t.cloneNode(!1);return r.innerHTML=n,r.outerHTML}(t,n)):i?r=i.call(this,t,n):t&&(r=this.getSpaceControlled(this._getInlineHtml(t,n),t)),r||""},n._getInlineHtml=function(t,n){var r=t.outerHTML,i=t.tagName,e=n.replace(/\$/g,"$$$$");return r.replace(new RegExp("(<"+i+" ?.*?>).*(</"+i+">)","i"),"$1"+e+"$2")},n._getConverter=function(t){for(var n,r=this.rules;t&&r;)r=this._getNextRule(r,this._getRuleNameFromNode(t)),t=this._getPrevNode(t),r&&r.converter&&(n=r.converter);return n},n._getNextRule=function(t,n){return t[n]},n._getRuleNameFromNode=function(t){return t.tagName||"TEXT_NODE"},n._getPrevNode=function(t){var n,r=t.parentNode;return r&&!r.__htmlRootByToMark&&(n=r),n},n._setConverterWithSelector=function(t,n){var r=this.rules;this._eachSelector(t,(function(t){r[t]||(r[t]={}),r=r[t]})),r.converter=n},n._eachSelector=function(t,n){for(var r=t.split(" "),i=r.length-1;i>=0;)n(r[i]),i-=1},n.trim=function(t){return t.replace(b,"")},n.isEmptyText=function(t){return""===t.replace(g,"")},n.getSpaceCollapsedText=function(t){return t.replace(m," ")},n.escapeText=function(t){return t.replace(w,(function(t){return"\\"+t}))},n.escapeTextForLink=function(t){for(var n=[],r=k.exec(t);r;)n.push([r.index,r.index+r[0].length]),r=k.exec(t);return t.replace(y,(function(t,r){return n.some((function(t){return r>t[0]&&r<t[1]}))?t:"\\"+t}))},n.escapeTextHtml=function(n){return n.replace(new RegExp(t.markdownTextToEscapeHtmlRx.source,"g"),(function(t){return"\\"+t}))},n.escapeTextBackSlash=function(n){return n.replace(new RegExp(t.markdownTextToEscapeBackSlashRx.source,"g"),(function(t){return"\\"+t}))},n.escapePairedCharacters=function(n){return n.replace(new RegExp(t.markdownTextToEscapePairedCharsRx.source,"g"),(function(t){return"\\"+t}))},n._isNeedEscape=function(n){var r,i=!1,e=t.markdownTextToEscapeRx;for(r in e)if(e.hasOwnProperty(r)&&e[r].test(n)){i=!0;break}return i},n._isNeedEscapeHtml=function(n){return t.markdownTextToEscapeHtmlRx.test(n)},n._isNeedEscapeBackSlash=function(n){return t.markdownTextToEscapeBackSlashRx.test(n)},n.mix=function(t){E(this.rules,t.rules)},t.factory=function(n,r){var i=new t;return r?i.mix(n):r=n,i.addRules(r),i},t}();v(L,"markdownTextToEscapeRx",{codeblock:/(^ {4}[^\n]+\n*)+/,hr:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,heading:/^(#{1,6}) +[\s\S]+/,lheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,codeblockGfm:/^(`{3,})/,codeblockTildes:/^(~{3,})/}),v(L,"markdownTextToEscapeHtmlRx",/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\/>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/),v(L,"markdownTextToEscapeBackSlashRx",/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/),v(L,"markdownTextToEscapePairedCharsRx",/[*_~`]/);var x=/\n$/g,C=/[ \xA0]+\n\n/g,D=/([ \xA0]+\n){2,}/g,O=/href="(.*?)"/,S=/^/gm,N=L.factory({TEXT_NODE:function(t){var n=this.trim(this.getSpaceCollapsedText(t.nodeValue));return this._isNeedEscapeBackSlash(n)&&(n=this.escapeTextBackSlash(n)),n=this.escapePairedCharacters(n),this._isNeedEscapeHtml(n)&&(n=this.escapeTextHtml(n)),this._isNeedEscape(n)&&(n=this.escapeText(n)),this.getSpaceControlled(n,t)},"CODE TEXT_NODE":function(t){return t.nodeValue},"EM, I":function(t,n){var r="";return this.isEmptyText(n)||(r="*"+n+"*"),r},"STRONG, B":function(t,n){var r="";return this.isEmptyText(n)||(r="**"+n+"**"),r},A:function(t,n){var r,i=n,e="",o=O.exec(t.outerHTML);return o&&(r=o[1].replace(/&/g,"&")),t.title&&(e=' "'+t.title+'"'),!this.isEmptyText(n)&&r&&(i="["+this.escapeTextForLink(n)+"]("+r+e+")"),i},IMG:function(t){var n=t.getAttribute("src");return n?"":""},BR:function(){return" \n"},CODE:function(t,n){var r,i,e="";return this.isEmptyText(n)||(i=parseInt(t.getAttribute("data-backticks"),10),e=(r=isNaN(i)?"`":Array(i+1).join("`"))+n+r),e},P:function(t,n){var r="";return n=n.replace(D," \n"),this.isEmptyText(n)||(r="\n\n"+n+"\n\n"),r},"BLOCKQUOTE P":function(t,n){return n},"LI P":function(t,n){var r="";return this.isEmptyText(n)||(r=n),r},"H1, H2, H3, H4, H5, H6":function(t,n){for(var r="",i=parseInt(t.tagName.charAt(1),10);i;)r+="#",i-=1;return r+=" ","\n\n"+(r+=n)+"\n\n"},"LI H1, LI H2, LI H3, LI H4, LI H5, LI H6":function(t,n){var r=parseInt(t.tagName.charAt(1),10);return Array(r+1).join("#")+" "+n},"UL, OL":function(t,n){return"\n\n"+n+"\n\n"},"LI OL, LI UL":function(t,n){return"\n"+n.replace(C,"\n").replace(x,"").replace(S," ")},"UL LI":function(t,n){var r="";return n=n.replace(D," \n"),t.firstChild&&"P"===t.firstChild.tagName&&(r+="\n"),r+"* "+n+"\n"},"OL LI":function(t,n){for(var r="",i=parseInt(t.parentNode.getAttribute("start")||1,10);t.previousSibling;)1===(t=t.previousSibling).nodeType&&"LI"===t.tagName&&(i+=1);return n=n.replace(D," \n"),t.firstChild&&"P"===t.firstChild.tagName&&(r+="\n"),r+(i+". ")+n+"\n"},HR:function(){return"\n\n- - -\n\n"},BLOCKQUOTE:function(t,n){return n=n.replace(D,"\n\n"),"\n\n"+this.trim(n).replace(S,"> ")+"\n\n"},"PRE CODE":function(t,n){return"\n\n"+n.replace(x,"").replace(S," ")+"\n\n"}}),M=L.factory(N,{"DEL, S":function(t,n){return"~~"+n+"~~"},"PRE CODE":function(t,n){var r="",i=t.getAttribute("data-backticks");t.getAttribute("data-language")&&(r=" "+t.getAttribute("data-language")),i=parseInt(i,10);var e=isNaN(i)?"```":Array(i+1).join("`");return"\n\n"+e+r+"\n"+(n=n.replace(/(\r\n)|(\r)|(\n)/g,this.lineFeedReplacement))+"\n"+e+"\n\n"},PRE:function(t,n){return n},"UL LI":function(t,n){return N.convert(t,R(t,n))},"OL LI":function(t,n){return N.convert(t,R(t,n))},TABLE:function(t,n){return"\n\n"+n+"\n\n"},"TBODY, TFOOT":function(t,n){return n},"TR TD, TR TH":function(t,n){return" "+(n=n.replace(/(\r\n)|(\r)|(\n)/g,""))+" |"},"TD BR, TH BR":function(){return"<br>"},TR:function(t,n){return"|"+n+"\n"},THEAD:function(t,n){for(var r="",i=I(I(t,"TR")[0],"TH"),e=0,o=i.length;e<o;e+=1)r+=" "+B(i[e])+" |";return n?n+"|"+r+"\n":""}});function R(t,n){return-1!==t.className.indexOf("task-list-item")&&(n="["+(-1!==t.className.indexOf("checked")?"x":" ")+"] "+n),n}function B(t){var n,r,i,e=t.align;return i=t.textContent?t.textContent.length:t.innerText.length,n="",r="",e&&("left"===e?(n=":",i-=1):"right"===e?(r=":",i-=1):"center"===e&&(r=":",n=":",i-=2)),n+function(t,n){var r=t;for(n=Math.max(n,3);n>1;)r+=t,n-=1;return r}("-",i)+r}function I(t,n){for(var r=t.childNodes,i=[],e=0,o=r.length;e<o;e+=1)r[e].tagName&&r[e].tagName===n&&i.push(r[e]);return i}var q=/[ \xA0]+(\n\n)/g,F=/^[\n]+|[\s\n]+$/g,P=/([ \xA0]+\n){2,}/g,j=/([ \xA0]){2,}\n/g,_=/[ \xA0\n]+/g;function U(t,n){var r,i=!0;return t?(r=M,n&&(!1===(i=n.gfm)&&(r=N),r=n.renderer||r),function(t,n,r){return t=(t=(t=(t=(t=t.replace(q,"\n")).replace(P,"\n\n")).replace(_,(function(t){return(t.match(/\n/g)||[]).length>=3?"\n\n":t>=1?"\n":t}))).replace(F,"")).replace(new RegExp(r,"g"),"\n"),n&&(t=t.replace(j,"\n")),t}(function(t,n){for(var r="";t.next();)r+=H(t,n);return r}(new a(h(t)),r),i,r.lineFeedReplacement)):""}function H(t,n){for(var r="",i=t.getNode(),e=0,o=i.childNodes.length;e<o;e+=1)t.next(),r+=H(t,n);return n.convert(i,r)}U.Renderer=L,U.basicRenderer=N,U.gfmRenderer=M,n.default=U}]).default}))},function(t,n,r){var i=r(8);t.exports=function(t){return t&&t.className?i(t.className.baseVal)?t.className:t.className.baseVal:""}},function(t){t.exports=function(t){return"number"==typeof t||t instanceof Number}},function(t,n,r){var i=r(19),e=r.n(i),o=r(20),u=r.n(o),a=r(5),s=r.n(a),c=r(6),f=r.n(c),h=r(22),l=r(38),v=r(0),d=r(29),p=r(18),g=r(25),b=r(2),m="te-preview-highlight";n.a=function(t){var n,r;function i(n,r,i,e){var o;(o=t.call(this,n,r,i,e.isViewer)||this).lazyRunner.registerLazyRunFunction("invokeCodeBlock",o.invokeCodeBlockPlugins,o.delayCodeBlockTime,function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o));var u=e.linkAttribute,a=e.customHTMLRenderer,s=e.highlight,c=void 0!==s&&s;return o.renderHTML=Object(h.createRenderHTML)({gfm:!0,nodeId:!0,convertors:Object(d.a)(u,a)}),o.cursorNodeId=null,o._initEvent(c),o}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var o=i.prototype;return o._initEvent=function(t){var n=this;this.eventManager.listen("contentChangedFromMarkdown",this.update.bind(this)),t&&(this.eventManager.listen("cursorActivity",(function(t){n._updateCursorNode(t.markdownNode,t.cursor)})),this.eventManager.listen("blur",(function(){n._removeHighlight()}))),e()(this.el,"scroll",(function(t){n.eventManager.emit("scroll",{source:"preview",data:Object(p.a)(t.target.scrollTop,n._previewContent)})}))},o._removeHighlight=function(){if(this.cursorNodeId){var t=this._getElementByNodeId(this.cursorNodeId);t&&f()(t,m)}},o._updateCursorNode=function(t,n){t&&("tableRow"===(t=Object(b.b)(t,(function(t){return!Object(b.h)(t)}))).type?t=function(t,n){for(var r=n.ch,i=t.firstChild;i&&i.next&&!(Object(b.e)(i.next)>r+1);)i=i.next;return i}(t,n):"tableBody"===t.type&&(t=null));var r=t?t.id:null;if(this.cursorNodeId!==r){var i=t&&"frontMatter"===t.customType,e=this._getElementByNodeId(this.cursorNodeId),o=this._getElementByNodeId(r);e&&f()(e,m),o&&!i&&s()(o,m),this.cursorNodeId=r}},o._getElementByNodeId=function(t){return t?this._previewContent.querySelector('[data-nodeid="'+t+'"]'):null},o.update=function(t){var n=this;t.forEach((function(t){return n.replaceRangeNodes(t)})),this.eventManager.emit("previewRenderAfter",this)},o.replaceRangeNodes=function(t){var n=this,r=t.nodes,i=t.removedNodeRange,e=this._previewContent,o=this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",r.map((function(t){return n.renderHTML(t)})).join(""));if(i){var u=i.id,a=u[1],s=this._getElementByNodeId(u[0]),c=this._getElementByNodeId(a);if(s){var f;s.insertAdjacentHTML("beforebegin",o);for(var h=s;h&&h!==c;){var l=h.nextElementSibling;h.parentNode.removeChild(h),Object(g.c)(h),h=l}(null==(f=h)?void 0:f.parentNode)&&(v.a.remove(h),Object(g.c)(h))}}else e.insertAdjacentHTML("afterbegin",o);var d=this.getCodeBlockElements(r.map((function(t){return t.id})));d.length&&this.lazyRunner.run("invokeCodeBlock",d)},o.render=function(n){t.prototype.render.call(this,n),this.eventManager.emit("previewRenderAfter",this)},o.remove=function(){u()(this.el,"scroll"),this.el=null},i}(l.a)},function(t,n,r){var i=r(10),e=r.n(i),o=r(8),u=r.n(o),a=r(44),s=r.n(a),c=r(45),f=r.n(c),h=r(24),l=["previewBeforeHook","previewRenderAfter","previewNeedsRefresh","addImageBlobHook","setMarkdownAfter","contentChangedFromWysiwyg","changeFromWysiwyg","contentChangedFromMarkdown","changeFromMarkdown","change","changeModeToWysiwyg","changeModeToMarkdown","changeModeBefore","changeMode","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","openPopupAddLink","openPopupAddImage","openPopupAddTable","openPopupTableUtils","openHeadingSelect","openPopupCodeBlockLanguages","openPopupCodeBlockEditor","openDropdownToolbar","closePopupCodeBlockLanguages","closePopupCodeBlockEditor","closeAllPopup","command","addCommandBefore","htmlUpdate","markdownUpdate","renderedHtmlUpdated","removeEditor","convertorAfterMarkdownToHtmlConverted","convertorBeforeHtmlToMarkdownConverted","convertorAfterHtmlToMarkdownConverted","stateChange","wysiwygSetValueAfter","wysiwygSetValueBefore","wysiwygGetValueBefore","wysiwygProcessHTMLText","wysiwygRangeChangeAfter","wysiwygKeyEvent","scroll","click","mousedown","mouseover","mouseout","mouseup","contextmenu","keydown","keyup","keyMap","load","focus","blur","paste","pasteBefore","willPaste","copy","copyBefore","copyAfter","cut","cutAfter","drop","show","hide","changeLanguage","cursorActivity","requireScrollSync","requireScrollIntoView","setCodeBlockLanguages"],v=function(){function t(){this.events=new h.a,this.TYPE=new f.a(l)}var n=t.prototype;return n.listen=function(t,n){var r=this._getTypeInfo(t),i=this.events.get(r.type)||[];if(!this._hasEventType(r.type))throw new Error("There is no event type "+r.type);r.namespace&&(n.namespace=r.namespace),i.push(n),this.events.set(r.type,i)},n.emit=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i,o=n.shift(),a=this._getTypeInfo(o),s=this.events.get(a.type);return s&&e()(s,(function(t){var r=t.apply(void 0,n);u()(r)||(i=i||[]).push(r)})),i},n.emitReduce=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.shift(),o=this.events.get(i);return o&&e()(o,(function(t){var r=t.apply(void 0,n);s()(r)||(n[0]=r)})),n[0]},n._getTypeInfo=function(t){var n=t.split(".");return{type:n[0],namespace:n[1]}},n._hasEventType=function(t){return!u()(this.TYPE[this._getTypeInfo(t).type])},n.addEventType=function(t){if(this._hasEventType(t))throw new Error("There is already have event type "+t);this.TYPE.set(t)},n.removeEventHandler=function(t,n){var r=this,i=this._getTypeInfo(t),e=i.type,o=i.namespace;e&&n?this._removeEventHandlerWithHandler(e,n):e&&!o?this.events.delete(e):!e&&o?this.events.forEach((function(t,n){r._removeEventHandlerWithTypeInfo(n,o)})):e&&o&&this._removeEventHandlerWithTypeInfo(e,o)},n._removeEventHandlerWithHandler=function(t,n){var r=this.events.get(t)||[],i=r.indexOf(n);i>=0&&r.splice(i,1)},n._removeEventHandlerWithTypeInfo=function(t,n){var r=[],i=this.events.get(t);i&&(i.map((function(t){return t.namespace!==n&&r.push(t),null})),this.events.set(t,r))},t}();n.a=v},function(t,n,r){var i=r(32),e=r.n(i),o=r(22),u=r(29),a=r(0),s=new RegExp("(\\\\<|<)([A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*)(\\/?>)","g"),c=/^\s?\\-\\-\\-([\s\S]+?)\\-\\-\\-/,f=/ /g,h=/^(\s*\*\s+\d+)\./g;n.a=function(){function t(t,n){void 0===n&&(n={});var r=n.linkAttribute,i=n.customHTMLRenderer,e=n.extendedAutolinks,a=n.referenceDefinition,s=n.customParser,c=n.frontMatter,f=n.customProp;this.options=n,this.mdReader=new o.Parser({extendedAutolinks:e,disallowedHtmlBlockTags:["br"],referenceDefinition:a,disallowDeepHeading:!0,customParser:s,frontMatter:c}),this.renderHTML=Object(o.createRenderHTML)({gfm:!0,convertors:Object(u.a)(r,i),customProp:f}),this.eventManager=t}var n=t.prototype;return n._markdownToHtmlWithCodeHighlight=function(t){return this.renderHTML(this.mdReader.parse(t))},n._markdownToHtml=function(t){return t=t.replace(s,(function(t,n,r,i){return"\\"!==t[0]?""+n+r+" data-tomark-pass "+i:t})).replace(h,"$1\\."),this.renderHTML(this.mdReader.parse(t))},n._removeBrToMarkPassAttributeInCode=function(t){var n=a.a.createElementWith("<div>"+t+"</div>");return a.a.findAll(n,"code, pre").forEach((function(t){t.innerHTML=t.innerHTML.replace(/\sdata-tomark-pass\s(\/?)>/g,"$1>")})),n.innerHTML},n.toHTMLWithCodeHighlight=function(t){var n=this._markdownToHtmlWithCodeHighlight(t);return this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",n)},n.toHTML=function(t){var n=this._markdownToHtml(t);return n=this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",n),this._removeBrToMarkPassAttributeInCode(n)},n.initHtmlSanitizer=function(t){this.eventManager.listen("convertorAfterMarkdownToHtmlConverted",(function(n){return t(n,!0)}))},n.toMarkdown=function(t,n){var r=[];t=this.eventManager.emitReduce("convertorBeforeHtmlToMarkdownConverted",t),t=this._appendAttributeForLinkIfNeed(t),t=this._appendAttributeForBrIfNeed(t);var i=e()(t,n);return this.options.frontMatter&&(i=i.replace(c,"---$1---")),i=this.eventManager.emitReduce("convertorAfterHtmlToMarkdownConverted",i),(i=this._removeNewlinesBeforeAfterAndBlockElement(i)).split("\n").forEach((function(t,n){/^(<br>)+\||\|[^|]*\|/gi.test(t)?t=t.replace(/^(<br>)+\|/gi,(function(t){return t.replace(/<br>/gi,"<br>\n")})):/`[^`]*<br>[^`]*`/gi.test(t)||(t=t.replace(/<br>/gi,"<br>\n")),r[n]=t})),r.join("\n").replace(f," ")},n._removeNewlinesBeforeAfterAndBlockElement=function(t){return(t=t.replace(/<br>\n\n(#{1,6} .*|```|\||(\*+|-+|\d+\.) .*| *>[^\n]+.*)/g,"<br>$1")).replace(/(#{1,6} .*|```|\|)\n\n<br>/g,"$1\n<br>")},n._appendAttributeForLinkIfNeed=function(t){return t.replace(/!?\[.*\]\(<\s*a[^>]*>(.*?)<\s*\/\s*a>\)/gi,(function(t){return t.replace(/<a /gi,'<a data-tomark-pass="" ')}))},n._appendAttributeForBrIfNeed=function(t){var n=new RegExp(/([^>]|<\/a>|<\/code>|<\/span>|<\/b>|<\/i>|<\/s>|<img [^>]*>)/.source+/<br data-tomark-pass \/><br data-tomark-pass \/>/.source,"g");return(t=(t=(t=(t=(t=(t=t.replace(/<br>/gi,"<br />")).replace(/<br \/><br \/>/gi,"<br data-tomark-pass /><br data-tomark-pass />")).replace(/<br data-tomark-pass="">/gi,"<br data-tomark-pass />")).replace(/<br data-tomark-pass \/><br \/>(.)/gi,"<br data-tomark-pass /><br data-tomark-pass />$1")).replace(n,"$1<br /><br />")).replace(/(.)<br \/><br \/>(<h[1-6]>|<pre>|<table>|<ul>|<ol>|<blockquote>)/g,"$1<br /><br data-tomark-pass />$2")).replace(/(<\/h[1-6]>|<\/pre>|<\/table>|<\/ul>|<\/ol>|<\/blockquote>)<br \/>(.)/g,"$1<br data-tomark-pass />$2")},t}()},function(t,n,r){var i=r(4),e=r.n(i),o=r(9),u=r.n(o),a=function(){function t(){this.globalTOID=null,this.lazyRunFunctions={}}var n=t.prototype;return n.run=function(t,n,r,i){var e;return u()(t)?e=this._runRegisteredRun(t,n,r,i):(e=this._runSingleRun(t,n,r,i,this.globalTOID),this.globalTOID=e),e},n.registerLazyRunFunction=function(t,n,r,i){this.lazyRunFunctions[t]={fn:n,delay:r,context:i=i||this,TOID:null}},n._runSingleRun=function(t,n,r,i,e){return this._clearTOIDIfNeed(e),setTimeout((function(){t.call(r,n)}),i)},n._runRegisteredRun=function(t,n,r,i){var e=this.lazyRunFunctions[t],o=e.TOID;return o=this._runSingleRun(e.fn,n,r=r||e.context,i=i||e.delay,o),e.TOID=o,o},n._clearTOIDIfNeed=function(t){t&&clearTimeout(t)},t}(),s=r(0),c=r(30);n.a=function(){function t(t,n,r,i){this.eventManager=n,this.convertor=r,this.el=t,this.isViewer=!!i,this.delayCodeBlockTime=500,this._initContentSection(),this.lazyRunner=new a}var n=t.prototype;return n._initContentSection=function(){this._previewContent=s.a.createElementWith('<div class="tui-editor-contents"></div>'),this.el.appendChild(this._previewContent)},n.getCodeBlockElements=function(t){var n=this._previewContent,r=[];return(t?t.map((function(t){return n.querySelector('[data-nodeid="'+t+'"]')})).filter(Boolean):[n]).forEach((function(t){r.push.apply(r,s.a.findAll(t,"code[data-language]"))})),r},n.invokeCodeBlockPlugins=function(t){t.forEach((function(t){var n=t.getAttribute("data-language"),r=c.a.createCodeBlockHtml(n,t.textContent);t.innerHTML=r}))},n.refresh=function(t){void 0===t&&(t=""),this.render(this.convertor.toHTMLWithCodeHighlight(t)),this.invokeCodeBlockPlugins(this.getCodeBlockElements())},n.getHTML=function(){return this._previewContent.innerHTML},n.setHTML=function(t){this._previewContent.innerHTML=t},n.render=function(t){var n=this._previewContent;t=this.eventManager.emit("previewBeforeHook",t)||t,s.a.empty(n),n.innerHTML=t},n.setHeight=function(t){e()(this.el,{height:t+"px"})},n.setMinHeight=function(t){e()(this.el,{minHeight:t+"px"})},n.isVisible=function(){return"none"!==this.el.style.display},t}()},function(t,n,r){var i=r(17),e=r(8);t.exports=function(t,n){n=(n=i(n)?n.join(" "):n).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),e(t.className.baseVal)?t.className=n:t.className.baseVal=n}},function(t){var n="_feEventKey";t.exports=function(t,r){var i,e=t[n];return e||(e=t[n]={}),(i=e[r])||(i=e[r]=[]),i}},,function(t,n,r){var i=r(28);t.exports=function(t){return i(t)&&!1!==t}},function(t,n,r){var i=r(8),e=r(49),o=6048e5;t.exports=function(t,n){var r=location.hostname,u="TOAST UI "+t+" for "+r+": Statistics",a=window.localStorage.getItem(u);(i(window.tui)||!1!==window.tui.usageStatistics)&&(a&&!function(t){return(new Date).getTime()-t>o}(a)||(window.localStorage.setItem(u,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||e("https://www.google-analytics.com/collect",{v:1,t:"event",tid:n,cid:r,dp:r,dh:t,el:t,ec:"use"})}),1e3)))}},function(t,n,r){var i=r(42);t.exports=function(t){return!i(t)}},function(t,n,r){var i=r(34),e=r(17),o=r(3),u=r(26),a=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),s=0;function c(t){t&&this.set.apply(this,arguments)}c.prototype.set=function(t){var n=this;e(t)||(t=o(arguments)),u(t,(function(t){n._addItem(t)}))},c.prototype.getName=function(t){var n,r=this;return u(this,(function(i,e){if(r._isEnumItem(e)&&t===i)return n=e,!1})),n},c.prototype._addItem=function(t){var n;this.hasOwnProperty(t)||(n=this._makeEnumValue(),a?Object.defineProperty(this,t,{enumerable:!0,configurable:!1,writable:!1,value:n}):this[t]=n)},c.prototype._makeEnumValue=function(){var t;return t=s,s+=1,t},c.prototype._isEnumItem=function(t){return i(this[t])},t.exports=c},function(t,n,r){var i=r(10),e=r.n(i),o=r(7),u=r.n(o),a=r(19),s=r.n(a),c=r(20),f=r.n(c),h=r(35),l=r(36),v=r(1),d=r(37),p=r(0),g=r(30),b=r(31),m=r(12),w=r(23);function y(){return y=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},y.apply(this,arguments)}var k=function(){function t(t){var n=this;this.options=u()({useDefaultHTMLSanitizer:!0,linkAttribute:null,extendedAutolinks:!1,customConvertor:null,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1},t),this.codeBlockLanguages=[],this.eventManager=new l.a,this.commandManager=new v.a(this);var r=Object(m.c)(this.options.linkAttribute),i=Object(b.a)(this.options.plugins),o=i.parser,a=i.plugins,c=this.options,f=c.customHTMLSanitizer,p=c.extendedAutolinks,g=c.referenceDefinition,k=c.frontMatter,T={linkAttribute:r,customHTMLRenderer:y({},i.renderer,c.customHTMLRenderer),extendedAutolinks:p,referenceDefinition:g,customParser:o,frontMatter:k};this.convertor=this.options.customConvertor?new this.options.customConvertor(this.eventManager,T):new d.a(this.eventManager,T);var A=f||(this.options.useDefaultHTMLSanitizer?w.a:null);A&&this.convertor.initHtmlSanitizer(A),this.options.hooks&&e()(this.options.hooks,(function(t,r){n.addHook(r,t)})),this.options.events&&e()(this.options.events,(function(t,r){n.on(r,t)}));var E=this.options,L=E.el,x=E.initialValue,C=L.innerHTML;L.innerHTML="",this.preview=new h.a(L,this.eventManager,this.convertor,y({},T,{isViewer:!0})),s()(this.preview.el,"mousedown",this._toggleTask.bind(this)),a&&Object(b.b)(a,this),x?this.setMarkdown(x):C&&this.preview.setHTML(C),this.eventManager.emit("load",this)}var n=t.prototype;return n._toggleTask=function(t){var n=getComputedStyle(t.target,":before");!t.target.hasAttribute("data-te-task-disabled")&&t.target.hasAttribute("data-te-task")&&p.a.isInsideButtonBox(n,t.offsetX,t.offsetY)&&(p.a.toggleClass(t.target,"checked"),this.eventManager.emit("change",{source:"viewer",data:t}))},n.setMarkdown=function(t){this.markdownValue=t=t||"",this.preview.refresh(this.markdownValue),this.eventManager.emit("setMarkdownAfter",this.markdownValue)},n.on=function(t,n){this.eventManager.listen(t,n)},n.off=function(t){this.eventManager.removeEventHandler(t)},n.remove=function(){this.eventManager.emit("removeEditor"),f()(this.preview.el,"mousedown",this._toggleTask.bind(this)),this.preview.remove(),this.options=null,this.eventManager=null,this.commandManager=null,this.convertor=null,this.preview=null},n.addHook=function(t,n){this.eventManager.removeEventHandler(t),this.eventManager.listen(t,n)},n.isViewer=function(){return!0},n.isMarkdownMode=function(){return!1},n.isWysiwygMode=function(){return!1},n.setCodeBlockLanguages=function(t){var n=this;void 0===t&&(t=[]),t.forEach((function(t){n.codeBlockLanguages.indexOf(t)<0&&n.codeBlockLanguages.push(t)}))},t}();k.isViewer=!0,k.domUtils=p.a,k.codeBlockManager=g.a,k.WwCodeBlockManager=null,k.WwTableManager=null,k.WwTableSelectionManager=null,n.a=k},,function(t){t.exports=function(t){return null===t}},function(t,n,r){var i=r(10);t.exports=function(t,n){var r=document.createElement("img"),e="";return i(n,(function(t,n){e+="&"+n+"="+t})),e=e.substring(1),r.src=t+"?"+e,r.style.display="none",document.body.appendChild(r),document.body.removeChild(r),r}},,function(){},,,,,,,,,function(t,n,r){r.r(n);var i=r(46);r(51),n.default=i.a}]).default;const b=h(g.exports);var m,w,y,k,T,A,E=function(t,n,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!i:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(t):i?i.value:n.get(t)},L=function(t,n,r,i,e){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?e.call(t,r):e?e.value=r:n.set(t,r),r};const x=class{constructor(r){t(this,r),this.kupAutoSave=n(this,"kup-editor-autosave",6),this.kupReady=n(this,"kup-editor-ready",6),this.kupSave=n(this,"kup-editor-save",6),m.set(this,void 0),w.set(this,!1),y.set(this,""),k.set(this,u()),T.set(this,0),A.set(this,{options:{className:"kup-editor-unsaved-changes",el:this.createUnsavedChanges(),tooltip:"There are unsaved changes."},type:"button"}),this.editor=null,this.editorRef=void 0,this.viewer=null,this.autosaveTimer=void 0,this.editorHeight="auto",this.initialEditType="markdown",this.initialValue="",this.isReadOnly=!1,this.previewStyle="vertical",this.selectedTab="write",this.showSaveButton=!0,this.showToolbar=!0}onEditorRefUpdated(){this.editorRef&&!this.editor&&(this.isReadOnly?this.createViewer():this.createEditor())}onEditorUpdate(){this.editor&&setTimeout((()=>{this.editor&&(this.editor.moveCursorToStart(),"markdown"===this.initialEditType&&"tab"===this.previewStyle&&"preview"===this.selectedTab&&this.updateMarkDownPreviewTab())}),100)}onInitialEditTypeChanged(){"markdown"!=this.initialEditType&&"wysiwyg"!=this.initialEditType||!this.editor||(this.editor.changeMode(this.initialEditType),this.updateToolbarVisiblity())}onIsReadOnlyChanged(){this.isReadOnly?(this.editor.remove(),this.editor=null,this.createViewer()):(this.viewer.remove(),this.viewer=null,this.createEditor())}onPreviewStyleChanged(){"tab"!=this.previewStyle&&"vertical"!=this.previewStyle||!this.editor||(this.editor.changePreviewStyle(this.previewStyle),"vertical"==this.previewStyle&&this.editor.getUI().getToolbar().enableAllButton(),this.updateToolbarVisiblity())}onMarkdownPreviewTabChanged(){"markdown"!=this.initialEditType&&"tab"!=this.previewStyle||!this.editor||this.updateMarkDownPreviewTab()}onShowSaveButtonChanged(){if(this.editor){const t=this.editor.getUI().getToolbar();this.showSaveButton?t.insertItem(0,this.getToolBarWithSaveButton(!1)[0]):t.removeItem(0)}}onShowToolBarChanged(){this.editor&&this.updateToolbarVisiblity()}onAutosaveTimerChanged(){this.editor&&(E(this,m,"f")&&clearInterval(E(this,m,"f")),"number"==typeof this.autosaveTimer&&this.autosaveTimer>0&&this.setAutosaveInterval())}async getProps(t){return a(this,p,t)}async getValueAsHTML(){var t,n;return null!==(n=null===(t=this.editor)||void 0===t?void 0:t.getHtml())&&void 0!==n?n:""}async getValueAsMarkdown(){var t,n;return null!==(n=null===(t=this.editor)||void 0===t?void 0:t.getMarkdown())&&void 0!==n?n:""}async refresh(){r(this)}async setProps(t){s(this,p,t)}createEditor(){var t;const n={el:this.editorRef,events:{change:()=>{E(this,y,"f")!==this.editor.getMarkdown()?(E(this,w,"f")||(L(this,T,this.editor.getUI().getToolbar().getItems().length-1,"f"),this.editor.getUI().getToolbar().insertItem(E(this,T,"f"),E(this,A,"f"))),L(this,w,!0,"f")):(E(this,w,"f")&&this.editor.getUI().getToolbar().removeItem(E(this,T,"f")),L(this,w,!1,"f"))},focus:()=>{this.isReadOnly||this.showToolbar||(this.showToolbar=!0)}},height:null!==(t=this.editorHeight)&&void 0!==t?t:"auto",hideModeSwitch:!0,initialEditType:this.initialEditType,initialValue:this.initialValue,placeholder:"Type your text here...",previewStyle:this.previewStyle,usageStatistics:!1};this.showSaveButton&&(n.toolbarItems=this.getToolBarWithSaveButton()),this.editor=new d(n),L(this,y,this.editor.getMarkdown(),"f"),this.showToolbar||this.updateToolbarVisiblity(),"number"==typeof this.autosaveTimer&&this.autosaveTimer>0&&this.setAutosaveInterval()}createViewer(){this.viewer=new b({el:this.editorRef,initialValue:this.initialValue})}createSaveButton(){const t=document.createElement("button");return t.className="kup-editor-save-button",t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#585858" version="1.1" id="Capa_1" width="12px" height="12px" viewBox="0 0 407.096 407.096" xml:space="preserve">\n <g>\n <g>\n <path d="M402.115,84.008L323.088,4.981C319.899,1.792,315.574,0,311.063,0H17.005C7.613,0,0,7.614,0,17.005v373.086 c0,9.392,7.613,17.005,17.005,17.005h373.086c9.392,0,17.005-7.613,17.005-17.005V96.032 C407.096,91.523,405.305,87.197,402.115,84.008z M300.664,163.567H67.129V38.862h233.535V163.567z"/>\n <path d="M214.051,148.16h43.08c3.131,0,5.668-2.538,5.668-5.669V59.584c0-3.13-2.537-5.668-5.668-5.668h-43.08 c-3.131,0-5.668,2.538-5.668,5.668v82.907C208.383,145.622,210.92,148.16,214.051,148.16z"/>\n </g>\n </g>\n </svg>',t.addEventListener("click",this.onEditorSave.bind(this)),t}createDivider(){const t=document.createElement("div");return t.className="kup-editor-divider",{options:{className:"kup-editor-divider",el:t},type:"button"}}createUnsavedChanges(){const t=document.createElement("span");return t.className="kup-editor-unsaved-changes",t.innerText="Unsaved changes.",t}updateToolbarVisiblity(){const t=this.editor.getUI().getToolbar().el,n=t.parentElement;t.style.display="",n.style.display="",this.showToolbar||(t.style.display="none","markdown"==this.initialEditType&&"tab"==this.previewStyle||(n.style.display="none"))}setAutosaveInterval(){L(this,m,setInterval((()=>{this.onEditorAutoSave()}),this.autosaveTimer),"f")}onEditorSave(){this.editor.getUI().getToolbar().removeItem(E(this,T,"f")),L(this,w,!1,"f"),this.kupSave.emit(this.getSaveAndAutoSaveProps())}onEditorAutoSave(){this.kupAutoSave.emit(this.getSaveAndAutoSaveProps())}updateMarkDownPreviewTab(){const t=this.rootElement.querySelector(".te-markdown-tab-section");t&&("preview"===this.selectedTab&&t.querySelector("button:last-child").click(),"write"===this.selectedTab&&t.querySelector("button").click())}getToolBarWithSaveButton(t=!0){return[{options:{el:this.createSaveButton(),tooltip:"Save"},type:"button"},this.createDivider(),...t?this.getDefaultToolBarItems():[]]}getDefaultToolBarItems(){const t=["heading","bold","italic","strike",this.createDivider(),"hr","quote",this.createDivider(),"ul","ol","task","indent","outdent",this.createDivider(),"table","image","link",this.createDivider(),"code","codeblock"];return"markdown"==this.initialEditType&&t.push("scrollSync"),t}getSaveAndAutoSaveProps(){var t,n;return{comp:this,id:this.rootElement.id,htmlValue:null!==(t=this.editor.getHtml())&&void 0!==t?t:"",markdownValue:null!==(n=this.editor.getMarkdown())&&void 0!==n?n:""}}componentWillLoad(){E(this,k,"f").debug.logLoad(this,!1),E(this,k,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),E(this,k,"f").debug.logLoad(this,!0)}componentWillRender(){E(this,k,"f").debug.logRender(this,!1)}componentDidRender(){E(this,k,"f").debug.logRender(this,!0)}render(){return i(e,{key:"ffbd575e5192cccaf2c070c4586215cc7573f9ce"},i("div",{key:"21e2b1a060db3009c6595eb92f78361adff24d6c",id:c},i("div",{key:this.rootElement.id,ref:t=>this.editorRef=t,class:"kup-editor"})))}disconnectedCallback(){E(this,k,"f").theme.unregister(this),E(this,m,"f")&&clearInterval(E(this,m,"f"))}get rootElement(){return o(this)}static get watchers(){return{editorRef:["onEditorRefUpdated"],editor:["onEditorUpdate"],initialEditType:["onInitialEditTypeChanged"],isReadOnly:["onIsReadOnlyChanged"],previewStyle:["onPreviewStyleChanged"],selectedTab:["onMarkdownPreviewTabChanged"],showSaveButton:["onShowSaveButtonChanged"],showToolbar:["onShowToolBarChanged"],autosaveTimer:["onAutosaveTimerChanged"]}}};m=new WeakMap,w=new WeakMap,y=new WeakMap,k=new WeakMap,T=new WeakMap,A=new WeakMap;export{x as kup_editor}
|
|
49
|
+
!function(n,r){t.exports=r()}(window,(function(){return function(t){var n={};function r(i){if(n[i])return n[i].exports;var e=n[i]={i,l:!1,exports:{}};return t[i].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=t,r.c=n,r.d=function(t,n,i){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var e in t)r.d(i,e,function(n){return t[n]}.bind(null,e));return i},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=0)}([function(t,n,r){r.r(n);var i,e,o,u={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3},a=function(){function t(t){this._normalizeTextChildren(t),this._root=t,this._current=t}var n=t.prototype;return n.next=function(){var t,n=this._current;if(this._current){for(t=this._getNextNode(n);this._isNeedNextSearch(t,n);)t=(n=n.parentNode).nextSibling;this._current=t}return this._current},n.getNode=function(){return this._normalizeTextChildren(this._current),this._current},n._normalizeTextChildren=function(t){if(t&&!(t.childNodes.length<2))for(var n,r=t.firstChild;r.nextSibling;)n=r.nextSibling,r.nodeType===u.TEXT_NODE&&n.nodeType===u.TEXT_NODE?(r.nodeValue+=n.nodeValue,t.removeChild(n)):r=n},n.getNodeText=function(){var t=this.getNode();return t.nodeType===u.TEXT_NODE?t.nodeValue:t.textContent||t.innerText},n._isNeedNextSearch=function(t,n){return!t&&n!==this._root&&n.parentNode!==this._root},n._getNextNode=function(t){return t.firstChild||t.nextSibling},t}();o=u,(e="NODE_TYPE")in(i=a)?Object.defineProperty(i,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[e]=o;var s=/^[\s\r\n\t]+|[\s\r\n\t]+$/g,c=/>[\r\n\t]+</g,f=/>[ ]+</g;function h(t){var n;return"[object String]"===Object.prototype.toString.call(t)?(n=document.createElement("div")).innerHTML=l(t):n=t,n.__htmlRootByToMark=!0,n}function l(t){return(t=(t=t.replace(s,"")).replace(c,"><")).replace(f,"> <")}function v(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}h.preProcess=l;var d=/^\u0020/,p=/.+\u0020$/,g=/[\n\s\t]+/g,b=/^[\u0020\r\n\t]+|[\u0020\r\n\t]+$/g,m=/[\u0020]+/g,w=/[>(){}[\]+-.!#|]/g,y=/[[\]]/g,k=/!\[.*\]\(.*\)/g;function T(t,n,r){var i;for(i in r=r||null,t)if(t.hasOwnProperty(i)&&!1===n.call(r,t[i],i,t))break}function A(t){var n=t.tagName;return"S"===n||"B"===n||"I"===n||"EM"===n||"STRONG"===n||"A"===n||"IMG"===n||"CODE"===n}function E(t,n){T(n,(function(n,r){"converter"!==r?(t[r]||(t[r]={}),E(t[r],n)):t[r]=n}))}var L=function(){function t(t){this.rules={},this.lineFeedReplacement="",t&&this.addRules(t)}var n=t.prototype;return n.addRule=function(t,n){var r=t.split(", "),i=r.pop();for(n.fname=t;i;)this._setConverterWithSelector(i,n),i=r.pop()},n.addRules=function(t){T(t,(function(t,n){this.addRule(n,t)}),this)},n.getSpaceControlled=function(t,n){var r="",i="";return n.previousSibling&&(3===n.previousSibling.nodeType||A(n.previousSibling))&&(p.test(n.previousSibling.innerHTML||n.previousSibling.nodeValue)||d.test(n.innerHTML||n.nodeValue))&&(r=" "),n.nextSibling&&(3===n.nextSibling.nodeType||A(n.nextSibling))&&(d.test(n.nextSibling.innerHTML||n.nextSibling.nodeValue)||p.test(n.innerHTML||n.nodeValue))&&(i=" "),r+t+i},n.convert=function(t,n){var r,i=this._getConverter(t);return t&&t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute("data-tomark-pass")?(t.removeAttribute("data-tomark-pass"),r=function(t,n){var r=t.cloneNode(!1);return r.innerHTML=n,r.outerHTML}(t,n)):i?r=i.call(this,t,n):t&&(r=this.getSpaceControlled(this._getInlineHtml(t,n),t)),r||""},n._getInlineHtml=function(t,n){var r=t.outerHTML,i=t.tagName,e=n.replace(/\$/g,"$$$$");return r.replace(new RegExp("(<"+i+" ?.*?>).*(</"+i+">)","i"),"$1"+e+"$2")},n._getConverter=function(t){for(var n,r=this.rules;t&&r;)r=this._getNextRule(r,this._getRuleNameFromNode(t)),t=this._getPrevNode(t),r&&r.converter&&(n=r.converter);return n},n._getNextRule=function(t,n){return t[n]},n._getRuleNameFromNode=function(t){return t.tagName||"TEXT_NODE"},n._getPrevNode=function(t){var n,r=t.parentNode;return r&&!r.__htmlRootByToMark&&(n=r),n},n._setConverterWithSelector=function(t,n){var r=this.rules;this._eachSelector(t,(function(t){r[t]||(r[t]={}),r=r[t]})),r.converter=n},n._eachSelector=function(t,n){for(var r=t.split(" "),i=r.length-1;i>=0;)n(r[i]),i-=1},n.trim=function(t){return t.replace(b,"")},n.isEmptyText=function(t){return""===t.replace(g,"")},n.getSpaceCollapsedText=function(t){return t.replace(m," ")},n.escapeText=function(t){return t.replace(w,(function(t){return"\\"+t}))},n.escapeTextForLink=function(t){for(var n=[],r=k.exec(t);r;)n.push([r.index,r.index+r[0].length]),r=k.exec(t);return t.replace(y,(function(t,r){return n.some((function(t){return r>t[0]&&r<t[1]}))?t:"\\"+t}))},n.escapeTextHtml=function(n){return n.replace(new RegExp(t.markdownTextToEscapeHtmlRx.source,"g"),(function(t){return"\\"+t}))},n.escapeTextBackSlash=function(n){return n.replace(new RegExp(t.markdownTextToEscapeBackSlashRx.source,"g"),(function(t){return"\\"+t}))},n.escapePairedCharacters=function(n){return n.replace(new RegExp(t.markdownTextToEscapePairedCharsRx.source,"g"),(function(t){return"\\"+t}))},n._isNeedEscape=function(n){var r,i=!1,e=t.markdownTextToEscapeRx;for(r in e)if(e.hasOwnProperty(r)&&e[r].test(n)){i=!0;break}return i},n._isNeedEscapeHtml=function(n){return t.markdownTextToEscapeHtmlRx.test(n)},n._isNeedEscapeBackSlash=function(n){return t.markdownTextToEscapeBackSlashRx.test(n)},n.mix=function(t){E(this.rules,t.rules)},t.factory=function(n,r){var i=new t;return r?i.mix(n):r=n,i.addRules(r),i},t}();v(L,"markdownTextToEscapeRx",{codeblock:/(^ {4}[^\n]+\n*)+/,hr:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,heading:/^(#{1,6}) +[\s\S]+/,lheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,codeblockGfm:/^(`{3,})/,codeblockTildes:/^(~{3,})/}),v(L,"markdownTextToEscapeHtmlRx",/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\/>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/),v(L,"markdownTextToEscapeBackSlashRx",/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/),v(L,"markdownTextToEscapePairedCharsRx",/[*_~`]/);var x=/\n$/g,C=/[ \xA0]+\n\n/g,D=/([ \xA0]+\n){2,}/g,O=/href="(.*?)"/,S=/^/gm,N=L.factory({TEXT_NODE:function(t){var n=this.trim(this.getSpaceCollapsedText(t.nodeValue));return this._isNeedEscapeBackSlash(n)&&(n=this.escapeTextBackSlash(n)),n=this.escapePairedCharacters(n),this._isNeedEscapeHtml(n)&&(n=this.escapeTextHtml(n)),this._isNeedEscape(n)&&(n=this.escapeText(n)),this.getSpaceControlled(n,t)},"CODE TEXT_NODE":function(t){return t.nodeValue},"EM, I":function(t,n){var r="";return this.isEmptyText(n)||(r="*"+n+"*"),r},"STRONG, B":function(t,n){var r="";return this.isEmptyText(n)||(r="**"+n+"**"),r},A:function(t,n){var r,i=n,e="",o=O.exec(t.outerHTML);return o&&(r=o[1].replace(/&/g,"&")),t.title&&(e=' "'+t.title+'"'),!this.isEmptyText(n)&&r&&(i="["+this.escapeTextForLink(n)+"]("+r+e+")"),i},IMG:function(t){var n=t.getAttribute("src");return n?"":""},BR:function(){return" \n"},CODE:function(t,n){var r,i,e="";return this.isEmptyText(n)||(i=parseInt(t.getAttribute("data-backticks"),10),e=(r=isNaN(i)?"`":Array(i+1).join("`"))+n+r),e},P:function(t,n){var r="";return n=n.replace(D," \n"),this.isEmptyText(n)||(r="\n\n"+n+"\n\n"),r},"BLOCKQUOTE P":function(t,n){return n},"LI P":function(t,n){var r="";return this.isEmptyText(n)||(r=n),r},"H1, H2, H3, H4, H5, H6":function(t,n){for(var r="",i=parseInt(t.tagName.charAt(1),10);i;)r+="#",i-=1;return r+=" ","\n\n"+(r+=n)+"\n\n"},"LI H1, LI H2, LI H3, LI H4, LI H5, LI H6":function(t,n){var r=parseInt(t.tagName.charAt(1),10);return Array(r+1).join("#")+" "+n},"UL, OL":function(t,n){return"\n\n"+n+"\n\n"},"LI OL, LI UL":function(t,n){return"\n"+n.replace(C,"\n").replace(x,"").replace(S," ")},"UL LI":function(t,n){var r="";return n=n.replace(D," \n"),t.firstChild&&"P"===t.firstChild.tagName&&(r+="\n"),r+"* "+n+"\n"},"OL LI":function(t,n){for(var r="",i=parseInt(t.parentNode.getAttribute("start")||1,10);t.previousSibling;)1===(t=t.previousSibling).nodeType&&"LI"===t.tagName&&(i+=1);return n=n.replace(D," \n"),t.firstChild&&"P"===t.firstChild.tagName&&(r+="\n"),r+(i+". ")+n+"\n"},HR:function(){return"\n\n- - -\n\n"},BLOCKQUOTE:function(t,n){return n=n.replace(D,"\n\n"),"\n\n"+this.trim(n).replace(S,"> ")+"\n\n"},"PRE CODE":function(t,n){return"\n\n"+n.replace(x,"").replace(S," ")+"\n\n"}}),M=L.factory(N,{"DEL, S":function(t,n){return"~~"+n+"~~"},"PRE CODE":function(t,n){var r="",i=t.getAttribute("data-backticks");t.getAttribute("data-language")&&(r=" "+t.getAttribute("data-language")),i=parseInt(i,10);var e=isNaN(i)?"```":Array(i+1).join("`");return"\n\n"+e+r+"\n"+(n=n.replace(/(\r\n)|(\r)|(\n)/g,this.lineFeedReplacement))+"\n"+e+"\n\n"},PRE:function(t,n){return n},"UL LI":function(t,n){return N.convert(t,R(t,n))},"OL LI":function(t,n){return N.convert(t,R(t,n))},TABLE:function(t,n){return"\n\n"+n+"\n\n"},"TBODY, TFOOT":function(t,n){return n},"TR TD, TR TH":function(t,n){return" "+(n=n.replace(/(\r\n)|(\r)|(\n)/g,""))+" |"},"TD BR, TH BR":function(){return"<br>"},TR:function(t,n){return"|"+n+"\n"},THEAD:function(t,n){for(var r="",i=I(I(t,"TR")[0],"TH"),e=0,o=i.length;e<o;e+=1)r+=" "+B(i[e])+" |";return n?n+"|"+r+"\n":""}});function R(t,n){return-1!==t.className.indexOf("task-list-item")&&(n="["+(-1!==t.className.indexOf("checked")?"x":" ")+"] "+n),n}function B(t){var n,r,i,e=t.align;return i=t.textContent?t.textContent.length:t.innerText.length,n="",r="",e&&("left"===e?(n=":",i-=1):"right"===e?(r=":",i-=1):"center"===e&&(r=":",n=":",i-=2)),n+function(t,n){var r=t;for(n=Math.max(n,3);n>1;)r+=t,n-=1;return r}("-",i)+r}function I(t,n){for(var r=t.childNodes,i=[],e=0,o=r.length;e<o;e+=1)r[e].tagName&&r[e].tagName===n&&i.push(r[e]);return i}var q=/[ \xA0]+(\n\n)/g,F=/^[\n]+|[\s\n]+$/g,P=/([ \xA0]+\n){2,}/g,j=/([ \xA0]){2,}\n/g,_=/[ \xA0\n]+/g;function U(t,n){var r,i=!0;return t?(r=M,n&&(!1===(i=n.gfm)&&(r=N),r=n.renderer||r),function(t,n,r){return t=(t=(t=(t=(t=t.replace(q,"\n")).replace(P,"\n\n")).replace(_,(function(t){return(t.match(/\n/g)||[]).length>=3?"\n\n":t>=1?"\n":t}))).replace(F,"")).replace(new RegExp(r,"g"),"\n"),n&&(t=t.replace(j,"\n")),t}(function(t,n){for(var r="";t.next();)r+=H(t,n);return r}(new a(h(t)),r),i,r.lineFeedReplacement)):""}function H(t,n){for(var r="",i=t.getNode(),e=0,o=i.childNodes.length;e<o;e+=1)t.next(),r+=H(t,n);return n.convert(i,r)}U.Renderer=L,U.basicRenderer=N,U.gfmRenderer=M,n.default=U}]).default}))},function(t,n,r){var i=r(8);t.exports=function(t){return t&&t.className?i(t.className.baseVal)?t.className:t.className.baseVal:""}},function(t){t.exports=function(t){return"number"==typeof t||t instanceof Number}},function(t,n,r){var i=r(19),e=r.n(i),o=r(20),u=r.n(o),a=r(5),s=r.n(a),c=r(6),f=r.n(c),h=r(22),l=r(38),v=r(0),d=r(29),p=r(18),g=r(25),b=r(2),m="te-preview-highlight";n.a=function(t){var n,r;function i(n,r,i,e){var o;(o=t.call(this,n,r,i,e.isViewer)||this).lazyRunner.registerLazyRunFunction("invokeCodeBlock",o.invokeCodeBlockPlugins,o.delayCodeBlockTime,function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o));var u=e.linkAttribute,a=e.customHTMLRenderer,s=e.highlight,c=void 0!==s&&s;return o.renderHTML=Object(h.createRenderHTML)({gfm:!0,nodeId:!0,convertors:Object(d.a)(u,a)}),o.cursorNodeId=null,o._initEvent(c),o}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var o=i.prototype;return o._initEvent=function(t){var n=this;this.eventManager.listen("contentChangedFromMarkdown",this.update.bind(this)),t&&(this.eventManager.listen("cursorActivity",(function(t){n._updateCursorNode(t.markdownNode,t.cursor)})),this.eventManager.listen("blur",(function(){n._removeHighlight()}))),e()(this.el,"scroll",(function(t){n.eventManager.emit("scroll",{source:"preview",data:Object(p.a)(t.target.scrollTop,n._previewContent)})}))},o._removeHighlight=function(){if(this.cursorNodeId){var t=this._getElementByNodeId(this.cursorNodeId);t&&f()(t,m)}},o._updateCursorNode=function(t,n){t&&("tableRow"===(t=Object(b.b)(t,(function(t){return!Object(b.h)(t)}))).type?t=function(t,n){for(var r=n.ch,i=t.firstChild;i&&i.next&&!(Object(b.e)(i.next)>r+1);)i=i.next;return i}(t,n):"tableBody"===t.type&&(t=null));var r=t?t.id:null;if(this.cursorNodeId!==r){var i=t&&"frontMatter"===t.customType,e=this._getElementByNodeId(this.cursorNodeId),o=this._getElementByNodeId(r);e&&f()(e,m),o&&!i&&s()(o,m),this.cursorNodeId=r}},o._getElementByNodeId=function(t){return t?this._previewContent.querySelector('[data-nodeid="'+t+'"]'):null},o.update=function(t){var n=this;t.forEach((function(t){return n.replaceRangeNodes(t)})),this.eventManager.emit("previewRenderAfter",this)},o.replaceRangeNodes=function(t){var n=this,r=t.nodes,i=t.removedNodeRange,e=this._previewContent,o=this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",r.map((function(t){return n.renderHTML(t)})).join(""));if(i){var u=i.id,a=u[1],s=this._getElementByNodeId(u[0]),c=this._getElementByNodeId(a);if(s){var f;s.insertAdjacentHTML("beforebegin",o);for(var h=s;h&&h!==c;){var l=h.nextElementSibling;h.parentNode.removeChild(h),Object(g.c)(h),h=l}(null==(f=h)?void 0:f.parentNode)&&(v.a.remove(h),Object(g.c)(h))}}else e.insertAdjacentHTML("afterbegin",o);var d=this.getCodeBlockElements(r.map((function(t){return t.id})));d.length&&this.lazyRunner.run("invokeCodeBlock",d)},o.render=function(n){t.prototype.render.call(this,n),this.eventManager.emit("previewRenderAfter",this)},o.remove=function(){u()(this.el,"scroll"),this.el=null},i}(l.a)},function(t,n,r){var i=r(10),e=r.n(i),o=r(8),u=r.n(o),a=r(44),s=r.n(a),c=r(45),f=r.n(c),h=r(24),l=["previewBeforeHook","previewRenderAfter","previewNeedsRefresh","addImageBlobHook","setMarkdownAfter","contentChangedFromWysiwyg","changeFromWysiwyg","contentChangedFromMarkdown","changeFromMarkdown","change","changeModeToWysiwyg","changeModeToMarkdown","changeModeBefore","changeMode","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","openPopupAddLink","openPopupAddImage","openPopupAddTable","openPopupTableUtils","openHeadingSelect","openPopupCodeBlockLanguages","openPopupCodeBlockEditor","openDropdownToolbar","closePopupCodeBlockLanguages","closePopupCodeBlockEditor","closeAllPopup","command","addCommandBefore","htmlUpdate","markdownUpdate","renderedHtmlUpdated","removeEditor","convertorAfterMarkdownToHtmlConverted","convertorBeforeHtmlToMarkdownConverted","convertorAfterHtmlToMarkdownConverted","stateChange","wysiwygSetValueAfter","wysiwygSetValueBefore","wysiwygGetValueBefore","wysiwygProcessHTMLText","wysiwygRangeChangeAfter","wysiwygKeyEvent","scroll","click","mousedown","mouseover","mouseout","mouseup","contextmenu","keydown","keyup","keyMap","load","focus","blur","paste","pasteBefore","willPaste","copy","copyBefore","copyAfter","cut","cutAfter","drop","show","hide","changeLanguage","cursorActivity","requireScrollSync","requireScrollIntoView","setCodeBlockLanguages"],v=function(){function t(){this.events=new h.a,this.TYPE=new f.a(l)}var n=t.prototype;return n.listen=function(t,n){var r=this._getTypeInfo(t),i=this.events.get(r.type)||[];if(!this._hasEventType(r.type))throw new Error("There is no event type "+r.type);r.namespace&&(n.namespace=r.namespace),i.push(n),this.events.set(r.type,i)},n.emit=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i,o=n.shift(),a=this._getTypeInfo(o),s=this.events.get(a.type);return s&&e()(s,(function(t){var r=t.apply(void 0,n);u()(r)||(i=i||[]).push(r)})),i},n.emitReduce=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.shift(),o=this.events.get(i);return o&&e()(o,(function(t){var r=t.apply(void 0,n);s()(r)||(n[0]=r)})),n[0]},n._getTypeInfo=function(t){var n=t.split(".");return{type:n[0],namespace:n[1]}},n._hasEventType=function(t){return!u()(this.TYPE[this._getTypeInfo(t).type])},n.addEventType=function(t){if(this._hasEventType(t))throw new Error("There is already have event type "+t);this.TYPE.set(t)},n.removeEventHandler=function(t,n){var r=this,i=this._getTypeInfo(t),e=i.type,o=i.namespace;e&&n?this._removeEventHandlerWithHandler(e,n):e&&!o?this.events.delete(e):!e&&o?this.events.forEach((function(t,n){r._removeEventHandlerWithTypeInfo(n,o)})):e&&o&&this._removeEventHandlerWithTypeInfo(e,o)},n._removeEventHandlerWithHandler=function(t,n){var r=this.events.get(t)||[],i=r.indexOf(n);i>=0&&r.splice(i,1)},n._removeEventHandlerWithTypeInfo=function(t,n){var r=[],i=this.events.get(t);i&&(i.map((function(t){return t.namespace!==n&&r.push(t),null})),this.events.set(t,r))},t}();n.a=v},function(t,n,r){var i=r(32),e=r.n(i),o=r(22),u=r(29),a=r(0),s=new RegExp("(\\\\<|<)([A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*)(\\/?>)","g"),c=/^\s?\\-\\-\\-([\s\S]+?)\\-\\-\\-/,f=/ /g,h=/^(\s*\*\s+\d+)\./g;n.a=function(){function t(t,n){void 0===n&&(n={});var r=n.linkAttribute,i=n.customHTMLRenderer,e=n.extendedAutolinks,a=n.referenceDefinition,s=n.customParser,c=n.frontMatter,f=n.customProp;this.options=n,this.mdReader=new o.Parser({extendedAutolinks:e,disallowedHtmlBlockTags:["br"],referenceDefinition:a,disallowDeepHeading:!0,customParser:s,frontMatter:c}),this.renderHTML=Object(o.createRenderHTML)({gfm:!0,convertors:Object(u.a)(r,i),customProp:f}),this.eventManager=t}var n=t.prototype;return n._markdownToHtmlWithCodeHighlight=function(t){return this.renderHTML(this.mdReader.parse(t))},n._markdownToHtml=function(t){return t=t.replace(s,(function(t,n,r,i){return"\\"!==t[0]?""+n+r+" data-tomark-pass "+i:t})).replace(h,"$1\\."),this.renderHTML(this.mdReader.parse(t))},n._removeBrToMarkPassAttributeInCode=function(t){var n=a.a.createElementWith("<div>"+t+"</div>");return a.a.findAll(n,"code, pre").forEach((function(t){t.innerHTML=t.innerHTML.replace(/\sdata-tomark-pass\s(\/?)>/g,"$1>")})),n.innerHTML},n.toHTMLWithCodeHighlight=function(t){var n=this._markdownToHtmlWithCodeHighlight(t);return this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",n)},n.toHTML=function(t){var n=this._markdownToHtml(t);return n=this.eventManager.emitReduce("convertorAfterMarkdownToHtmlConverted",n),this._removeBrToMarkPassAttributeInCode(n)},n.initHtmlSanitizer=function(t){this.eventManager.listen("convertorAfterMarkdownToHtmlConverted",(function(n){return t(n,!0)}))},n.toMarkdown=function(t,n){var r=[];t=this.eventManager.emitReduce("convertorBeforeHtmlToMarkdownConverted",t),t=this._appendAttributeForLinkIfNeed(t),t=this._appendAttributeForBrIfNeed(t);var i=e()(t,n);return this.options.frontMatter&&(i=i.replace(c,"---$1---")),i=this.eventManager.emitReduce("convertorAfterHtmlToMarkdownConverted",i),(i=this._removeNewlinesBeforeAfterAndBlockElement(i)).split("\n").forEach((function(t,n){/^(<br>)+\||\|[^|]*\|/gi.test(t)?t=t.replace(/^(<br>)+\|/gi,(function(t){return t.replace(/<br>/gi,"<br>\n")})):/`[^`]*<br>[^`]*`/gi.test(t)||(t=t.replace(/<br>/gi,"<br>\n")),r[n]=t})),r.join("\n").replace(f," ")},n._removeNewlinesBeforeAfterAndBlockElement=function(t){return(t=t.replace(/<br>\n\n(#{1,6} .*|```|\||(\*+|-+|\d+\.) .*| *>[^\n]+.*)/g,"<br>$1")).replace(/(#{1,6} .*|```|\|)\n\n<br>/g,"$1\n<br>")},n._appendAttributeForLinkIfNeed=function(t){return t.replace(/!?\[.*\]\(<\s*a[^>]*>(.*?)<\s*\/\s*a>\)/gi,(function(t){return t.replace(/<a /gi,'<a data-tomark-pass="" ')}))},n._appendAttributeForBrIfNeed=function(t){var n=new RegExp(/([^>]|<\/a>|<\/code>|<\/span>|<\/b>|<\/i>|<\/s>|<img [^>]*>)/.source+/<br data-tomark-pass \/><br data-tomark-pass \/>/.source,"g");return(t=(t=(t=(t=(t=(t=t.replace(/<br>/gi,"<br />")).replace(/<br \/><br \/>/gi,"<br data-tomark-pass /><br data-tomark-pass />")).replace(/<br data-tomark-pass="">/gi,"<br data-tomark-pass />")).replace(/<br data-tomark-pass \/><br \/>(.)/gi,"<br data-tomark-pass /><br data-tomark-pass />$1")).replace(n,"$1<br /><br />")).replace(/(.)<br \/><br \/>(<h[1-6]>|<pre>|<table>|<ul>|<ol>|<blockquote>)/g,"$1<br /><br data-tomark-pass />$2")).replace(/(<\/h[1-6]>|<\/pre>|<\/table>|<\/ul>|<\/ol>|<\/blockquote>)<br \/>(.)/g,"$1<br data-tomark-pass />$2")},t}()},function(t,n,r){var i=r(4),e=r.n(i),o=r(9),u=r.n(o),a=function(){function t(){this.globalTOID=null,this.lazyRunFunctions={}}var n=t.prototype;return n.run=function(t,n,r,i){var e;return u()(t)?e=this._runRegisteredRun(t,n,r,i):(e=this._runSingleRun(t,n,r,i,this.globalTOID),this.globalTOID=e),e},n.registerLazyRunFunction=function(t,n,r,i){this.lazyRunFunctions[t]={fn:n,delay:r,context:i=i||this,TOID:null}},n._runSingleRun=function(t,n,r,i,e){return this._clearTOIDIfNeed(e),setTimeout((function(){t.call(r,n)}),i)},n._runRegisteredRun=function(t,n,r,i){var e=this.lazyRunFunctions[t],o=e.TOID;return o=this._runSingleRun(e.fn,n,r=r||e.context,i=i||e.delay,o),e.TOID=o,o},n._clearTOIDIfNeed=function(t){t&&clearTimeout(t)},t}(),s=r(0),c=r(30);n.a=function(){function t(t,n,r,i){this.eventManager=n,this.convertor=r,this.el=t,this.isViewer=!!i,this.delayCodeBlockTime=500,this._initContentSection(),this.lazyRunner=new a}var n=t.prototype;return n._initContentSection=function(){this._previewContent=s.a.createElementWith('<div class="tui-editor-contents"></div>'),this.el.appendChild(this._previewContent)},n.getCodeBlockElements=function(t){var n=this._previewContent,r=[];return(t?t.map((function(t){return n.querySelector('[data-nodeid="'+t+'"]')})).filter(Boolean):[n]).forEach((function(t){r.push.apply(r,s.a.findAll(t,"code[data-language]"))})),r},n.invokeCodeBlockPlugins=function(t){t.forEach((function(t){var n=t.getAttribute("data-language"),r=c.a.createCodeBlockHtml(n,t.textContent);t.innerHTML=r}))},n.refresh=function(t){void 0===t&&(t=""),this.render(this.convertor.toHTMLWithCodeHighlight(t)),this.invokeCodeBlockPlugins(this.getCodeBlockElements())},n.getHTML=function(){return this._previewContent.innerHTML},n.setHTML=function(t){this._previewContent.innerHTML=t},n.render=function(t){var n=this._previewContent;t=this.eventManager.emit("previewBeforeHook",t)||t,s.a.empty(n),n.innerHTML=t},n.setHeight=function(t){e()(this.el,{height:t+"px"})},n.setMinHeight=function(t){e()(this.el,{minHeight:t+"px"})},n.isVisible=function(){return"none"!==this.el.style.display},t}()},function(t,n,r){var i=r(17),e=r(8);t.exports=function(t,n){n=(n=i(n)?n.join(" "):n).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),e(t.className.baseVal)?t.className=n:t.className.baseVal=n}},function(t){var n="_feEventKey";t.exports=function(t,r){var i,e=t[n];return e||(e=t[n]={}),(i=e[r])||(i=e[r]=[]),i}},,function(t,n,r){var i=r(28);t.exports=function(t){return i(t)&&!1!==t}},function(t,n,r){var i=r(8),e=r(49),o=6048e5;t.exports=function(t,n){var r=location.hostname,u="TOAST UI "+t+" for "+r+": Statistics",a=window.localStorage.getItem(u);(i(window.tui)||!1!==window.tui.usageStatistics)&&(a&&!function(t){return(new Date).getTime()-t>o}(a)||(window.localStorage.setItem(u,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||e("https://www.google-analytics.com/collect",{v:1,t:"event",tid:n,cid:r,dp:r,dh:t,el:t,ec:"use"})}),1e3)))}},function(t,n,r){var i=r(42);t.exports=function(t){return!i(t)}},function(t,n,r){var i=r(34),e=r(17),o=r(3),u=r(26),a=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),s=0;function c(t){t&&this.set.apply(this,arguments)}c.prototype.set=function(t){var n=this;e(t)||(t=o(arguments)),u(t,(function(t){n._addItem(t)}))},c.prototype.getName=function(t){var n,r=this;return u(this,(function(i,e){if(r._isEnumItem(e)&&t===i)return n=e,!1})),n},c.prototype._addItem=function(t){var n;this.hasOwnProperty(t)||(n=this._makeEnumValue(),a?Object.defineProperty(this,t,{enumerable:!0,configurable:!1,writable:!1,value:n}):this[t]=n)},c.prototype._makeEnumValue=function(){var t;return t=s,s+=1,t},c.prototype._isEnumItem=function(t){return i(this[t])},t.exports=c},function(t,n,r){var i=r(10),e=r.n(i),o=r(7),u=r.n(o),a=r(19),s=r.n(a),c=r(20),f=r.n(c),h=r(35),l=r(36),v=r(1),d=r(37),p=r(0),g=r(30),b=r(31),m=r(12),w=r(23);function y(){return y=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},y.apply(this,arguments)}var k=function(){function t(t){var n=this;this.options=u()({useDefaultHTMLSanitizer:!0,linkAttribute:null,extendedAutolinks:!1,customConvertor:null,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1},t),this.codeBlockLanguages=[],this.eventManager=new l.a,this.commandManager=new v.a(this);var r=Object(m.c)(this.options.linkAttribute),i=Object(b.a)(this.options.plugins),o=i.parser,a=i.plugins,c=this.options,f=c.customHTMLSanitizer,p=c.extendedAutolinks,g=c.referenceDefinition,k=c.frontMatter,T={linkAttribute:r,customHTMLRenderer:y({},i.renderer,c.customHTMLRenderer),extendedAutolinks:p,referenceDefinition:g,customParser:o,frontMatter:k};this.convertor=this.options.customConvertor?new this.options.customConvertor(this.eventManager,T):new d.a(this.eventManager,T);var A=f||(this.options.useDefaultHTMLSanitizer?w.a:null);A&&this.convertor.initHtmlSanitizer(A),this.options.hooks&&e()(this.options.hooks,(function(t,r){n.addHook(r,t)})),this.options.events&&e()(this.options.events,(function(t,r){n.on(r,t)}));var E=this.options,L=E.el,x=E.initialValue,C=L.innerHTML;L.innerHTML="",this.preview=new h.a(L,this.eventManager,this.convertor,y({},T,{isViewer:!0})),s()(this.preview.el,"mousedown",this._toggleTask.bind(this)),a&&Object(b.b)(a,this),x?this.setMarkdown(x):C&&this.preview.setHTML(C),this.eventManager.emit("load",this)}var n=t.prototype;return n._toggleTask=function(t){var n=getComputedStyle(t.target,":before");!t.target.hasAttribute("data-te-task-disabled")&&t.target.hasAttribute("data-te-task")&&p.a.isInsideButtonBox(n,t.offsetX,t.offsetY)&&(p.a.toggleClass(t.target,"checked"),this.eventManager.emit("change",{source:"viewer",data:t}))},n.setMarkdown=function(t){this.markdownValue=t=t||"",this.preview.refresh(this.markdownValue),this.eventManager.emit("setMarkdownAfter",this.markdownValue)},n.on=function(t,n){this.eventManager.listen(t,n)},n.off=function(t){this.eventManager.removeEventHandler(t)},n.remove=function(){this.eventManager.emit("removeEditor"),f()(this.preview.el,"mousedown",this._toggleTask.bind(this)),this.preview.remove(),this.options=null,this.eventManager=null,this.commandManager=null,this.convertor=null,this.preview=null},n.addHook=function(t,n){this.eventManager.removeEventHandler(t),this.eventManager.listen(t,n)},n.isViewer=function(){return!0},n.isMarkdownMode=function(){return!1},n.isWysiwygMode=function(){return!1},n.setCodeBlockLanguages=function(t){var n=this;void 0===t&&(t=[]),t.forEach((function(t){n.codeBlockLanguages.indexOf(t)<0&&n.codeBlockLanguages.push(t)}))},t}();k.isViewer=!0,k.domUtils=p.a,k.codeBlockManager=g.a,k.WwCodeBlockManager=null,k.WwTableManager=null,k.WwTableSelectionManager=null,n.a=k},,function(t){t.exports=function(t){return null===t}},function(t,n,r){var i=r(10);t.exports=function(t,n){var r=document.createElement("img"),e="";return i(n,(function(t,n){e+="&"+n+"="+t})),e=e.substring(1),r.src=t+"?"+e,r.style.display="none",document.body.appendChild(r),document.body.removeChild(r),r}},,function(){},,,,,,,,,function(t,n,r){r.r(n);var i=r(46);r(51),n.default=i.a}]).default;const b=h(g.exports);var m,w,y,k,T,A,E=function(t,n,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!i:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(t):i?i.value:n.get(t)},L=function(t,n,r,i,e){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?e.call(t,r):e?e.value=r:n.set(t,r),r};const x=class{constructor(r){t(this,r),this.kupAutoSave=n(this,"kup-editor-autosave",6),this.kupReady=n(this,"kup-editor-ready",6),this.kupSave=n(this,"kup-editor-save",6),m.set(this,void 0),w.set(this,!1),y.set(this,""),k.set(this,u()),T.set(this,0),A.set(this,{options:{className:"kup-editor-unsaved-changes",el:this.createUnsavedChanges(),tooltip:"There are unsaved changes."},type:"button"}),this.editor=null,this.editorRef=void 0,this.viewer=null,this.autosaveTimer=void 0,this.editorHeight="auto",this.initialEditType="markdown",this.initialValue="",this.isReadOnly=!1,this.previewStyle="vertical",this.selectedTab="write",this.showSaveButton=!0,this.showToolbar=!0}onEditorRefUpdated(){this.editorRef&&!this.editor&&(this.isReadOnly?this.createViewer():this.createEditor())}onEditorUpdate(){this.editor&&setTimeout((()=>{this.editor&&(this.editor.moveCursorToStart(),"markdown"===this.initialEditType&&"tab"===this.previewStyle&&"preview"===this.selectedTab&&this.updateMarkDownPreviewTab())}),100)}onInitialEditTypeChanged(){"markdown"!=this.initialEditType&&"wysiwyg"!=this.initialEditType||!this.editor||(this.editor.changeMode(this.initialEditType),this.updateToolbarVisiblity())}onIsReadOnlyChanged(){this.isReadOnly?(this.editor.remove(),this.editor=null,this.createViewer()):(this.viewer.remove(),this.viewer=null,this.createEditor())}onPreviewStyleChanged(){"tab"!=this.previewStyle&&"vertical"!=this.previewStyle||!this.editor||(this.editor.changePreviewStyle(this.previewStyle),"vertical"==this.previewStyle&&this.editor.getUI().getToolbar().enableAllButton(),this.updateToolbarVisiblity())}onMarkdownPreviewTabChanged(){"markdown"!=this.initialEditType&&"tab"!=this.previewStyle||!this.editor||this.updateMarkDownPreviewTab()}onShowSaveButtonChanged(){if(this.editor){const t=this.editor.getUI().getToolbar();this.showSaveButton?t.insertItem(0,this.getToolBarWithSaveButton(!1)[0]):t.removeItem(0)}}onShowToolBarChanged(){this.editor&&this.updateToolbarVisiblity()}onAutosaveTimerChanged(){this.editor&&(E(this,m,"f")&&clearInterval(E(this,m,"f")),"number"==typeof this.autosaveTimer&&this.autosaveTimer>0&&this.setAutosaveInterval())}async getProps(t){return a(this,p,t)}async getValueAsHTML(){var t,n;return null!==(n=null===(t=this.editor)||void 0===t?void 0:t.getHtml())&&void 0!==n?n:""}async getValueAsMarkdown(){var t,n;return null!==(n=null===(t=this.editor)||void 0===t?void 0:t.getMarkdown())&&void 0!==n?n:""}async refresh(){r(this)}async setProps(t){s(this,p,t)}createEditor(){var t;const n={el:this.editorRef,events:{change:()=>{E(this,y,"f")!==this.editor.getMarkdown()?(E(this,w,"f")||(L(this,T,this.editor.getUI().getToolbar().getItems().length-1,"f"),this.editor.getUI().getToolbar().insertItem(E(this,T,"f"),E(this,A,"f"))),L(this,w,!0,"f")):(E(this,w,"f")&&this.editor.getUI().getToolbar().removeItem(E(this,T,"f")),L(this,w,!1,"f"))},focus:()=>{this.isReadOnly||this.showToolbar||(this.showToolbar=!0)}},height:null!==(t=this.editorHeight)&&void 0!==t?t:"auto",hideModeSwitch:!0,initialEditType:this.initialEditType,initialValue:this.initialValue,placeholder:"Type your text here...",previewStyle:this.previewStyle,usageStatistics:!1};this.showSaveButton&&(n.toolbarItems=this.getToolBarWithSaveButton()),this.editor=new d(n),L(this,y,this.editor.getMarkdown(),"f"),this.showToolbar||this.updateToolbarVisiblity(),"number"==typeof this.autosaveTimer&&this.autosaveTimer>0&&this.setAutosaveInterval()}createViewer(){this.viewer=new b({el:this.editorRef,initialValue:this.initialValue})}createSaveButton(){const t=document.createElement("button");return t.className="kup-editor-save-button",t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#585858" version="1.1" id="Capa_1" width="12px" height="12px" viewBox="0 0 407.096 407.096" xml:space="preserve">\n <g>\n <g>\n <path d="M402.115,84.008L323.088,4.981C319.899,1.792,315.574,0,311.063,0H17.005C7.613,0,0,7.614,0,17.005v373.086 c0,9.392,7.613,17.005,17.005,17.005h373.086c9.392,0,17.005-7.613,17.005-17.005V96.032 C407.096,91.523,405.305,87.197,402.115,84.008z M300.664,163.567H67.129V38.862h233.535V163.567z"/>\n <path d="M214.051,148.16h43.08c3.131,0,5.668-2.538,5.668-5.669V59.584c0-3.13-2.537-5.668-5.668-5.668h-43.08 c-3.131,0-5.668,2.538-5.668,5.668v82.907C208.383,145.622,210.92,148.16,214.051,148.16z"/>\n </g>\n </g>\n </svg>',t.addEventListener("click",this.onEditorSave.bind(this)),t}createDivider(){const t=document.createElement("div");return t.className="kup-editor-divider",{options:{className:"kup-editor-divider",el:t},type:"button"}}createUnsavedChanges(){const t=document.createElement("span");return t.className="kup-editor-unsaved-changes",t.innerText="Unsaved changes.",t}updateToolbarVisiblity(){const t=this.editor.getUI().getToolbar().el,n=t.parentElement;t.style.display="",n.style.display="",this.showToolbar||(t.style.display="none","markdown"==this.initialEditType&&"tab"==this.previewStyle||(n.style.display="none"))}setAutosaveInterval(){L(this,m,setInterval((()=>{this.onEditorAutoSave()}),this.autosaveTimer),"f")}onEditorSave(){this.editor.getUI().getToolbar().removeItem(E(this,T,"f")),L(this,w,!1,"f"),this.kupSave.emit(this.getSaveAndAutoSaveProps())}onEditorAutoSave(){this.kupAutoSave.emit(this.getSaveAndAutoSaveProps())}updateMarkDownPreviewTab(){const t=this.rootElement.querySelector(".te-markdown-tab-section");t&&("preview"===this.selectedTab&&t.querySelector("button:last-child").click(),"write"===this.selectedTab&&t.querySelector("button").click())}getToolBarWithSaveButton(t=!0){return[{options:{el:this.createSaveButton(),tooltip:"Save"},type:"button"},this.createDivider(),...t?this.getDefaultToolBarItems():[]]}getDefaultToolBarItems(){const t=["heading","bold","italic","strike",this.createDivider(),"hr","quote",this.createDivider(),"ul","ol","task","indent","outdent",this.createDivider(),"table","image","link",this.createDivider(),"code","codeblock"];return"markdown"==this.initialEditType&&t.push("scrollSync"),t}getSaveAndAutoSaveProps(){var t,n;return{comp:this,id:this.rootElement.id,htmlValue:null!==(t=this.editor.getHtml())&&void 0!==t?t:"",markdownValue:null!==(n=this.editor.getMarkdown())&&void 0!==n?n:""}}componentWillLoad(){E(this,k,"f").debug.logLoad(this,!1),E(this,k,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),E(this,k,"f").debug.logLoad(this,!0)}componentWillRender(){E(this,k,"f").debug.logRender(this,!1)}componentDidRender(){E(this,k,"f").debug.logRender(this,!0)}render(){return i(e,{key:"07d0005e073f28636c6f49ceb082fcca0a735beb"},i("div",{key:"9a59105ef8c70cd840adeada556259e739dd0818",id:c},i("div",{key:this.rootElement.id,ref:t=>this.editorRef=t,class:"kup-editor"})))}disconnectedCallback(){E(this,k,"f").theme.unregister(this),E(this,m,"f")&&clearInterval(E(this,m,"f"))}get rootElement(){return o(this)}static get watchers(){return{editorRef:["onEditorRefUpdated"],editor:["onEditorUpdate"],initialEditType:["onInitialEditTypeChanged"],isReadOnly:["onIsReadOnlyChanged"],previewStyle:["onPreviewStyleChanged"],selectedTab:["onMarkdownPreviewTabChanged"],showSaveButton:["onShowSaveButtonChanged"],showToolbar:["onShowToolBarChanged"],autosaveTimer:["onAutosaveTimerChanged"]}}};m=new WeakMap,w=new WeakMap,y=new WeakMap,k=new WeakMap,T=new WeakMap,A=new WeakMap;export{x as kup_editor}
|
|
@@ -11,6 +11,7 @@ export declare enum KupAutocompleteProps {
|
|
|
11
11
|
disabled = "Defaults at false. When set to true, the component is disabled.",
|
|
12
12
|
displayMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\".",
|
|
13
13
|
initialValue = "Sets the initial value of the component.",
|
|
14
|
+
initialValueDecode = "Sets the initial value decode of the component",
|
|
14
15
|
inputDelay = "Input event emission delay in milliseconds.",
|
|
15
16
|
minimumChars = "The minimum number of chars to trigger the autocomplete.",
|
|
16
17
|
selectMode = "Sets how to return the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\".",
|
|
@@ -56,6 +56,10 @@ export declare class KupAutocomplete {
|
|
|
56
56
|
* @default ""
|
|
57
57
|
*/
|
|
58
58
|
initialValue: string;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the initial value decode of the component
|
|
61
|
+
*/
|
|
62
|
+
initialValueDecode: string;
|
|
59
63
|
/**
|
|
60
64
|
* Enables a clear trailing icon.
|
|
61
65
|
* @default false
|
|
@@ -159,7 +163,7 @@ export declare class KupAutocomplete {
|
|
|
159
163
|
* Sets the value of the component.
|
|
160
164
|
* @param {string} value - Value of the component.
|
|
161
165
|
*/
|
|
162
|
-
setValue(value: string): Promise<void>;
|
|
166
|
+
setValue(value: string, valueDecode?: string): Promise<void>;
|
|
163
167
|
componentWillLoad(): void;
|
|
164
168
|
componentDidLoad(): void;
|
|
165
169
|
componentWillRender(): void;
|
|
@@ -38,6 +38,11 @@ export declare class KupCalendar {
|
|
|
38
38
|
* @default true
|
|
39
39
|
*/
|
|
40
40
|
editableEvents: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* When true, it will show the changeView
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
enableChangeView: boolean;
|
|
41
46
|
/**
|
|
42
47
|
* Type of the view.
|
|
43
48
|
* @default KupCalendarViewTypes.MONTH
|
|
@@ -10,6 +10,7 @@ export declare enum KupComboboxProps {
|
|
|
10
10
|
disabled = "Defaults at false. When set to true, the component is disabled.",
|
|
11
11
|
displayMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\".",
|
|
12
12
|
initialValue = "Sets the initial value of the component",
|
|
13
|
+
initialValueDecode = "Sets the initial value decode of the component",
|
|
13
14
|
isClearable = "Enables a clear trailing icon.",
|
|
14
15
|
isSelect = "Lets the combobox behave as a select element.",
|
|
15
16
|
selectMode = "Sets how to return the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"both\".",
|
|
@@ -44,6 +44,10 @@ export declare class KupCombobox {
|
|
|
44
44
|
* Sets the initial value of the component
|
|
45
45
|
*/
|
|
46
46
|
initialValue: string;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the initial value decode of the component
|
|
49
|
+
*/
|
|
50
|
+
initialValueDecode: string;
|
|
47
51
|
/**
|
|
48
52
|
* Enables a clear trailing icon.
|
|
49
53
|
* @default false
|
|
@@ -106,6 +110,7 @@ export declare class KupCombobox {
|
|
|
106
110
|
onKupIconClick(): void;
|
|
107
111
|
onKupItemClick(e: CustomEvent<KupListEventPayload>): void;
|
|
108
112
|
initialValueChange(newValue: string): void;
|
|
113
|
+
initialValueDecodeChange(newValue: string): void;
|
|
109
114
|
listenKeydown(e: KeyboardEvent): void;
|
|
110
115
|
/**
|
|
111
116
|
* Used to retrieve component's props values.
|
|
@@ -135,7 +140,7 @@ export declare class KupCombobox {
|
|
|
135
140
|
* Sets the component's value.
|
|
136
141
|
* @param {string} value - Value to be set.
|
|
137
142
|
*/
|
|
138
|
-
setValue(value: string): Promise<void>;
|
|
143
|
+
setValue(value: string, valueDecode?: string): Promise<void>;
|
|
139
144
|
componentWillLoad(): void;
|
|
140
145
|
componentDidLoad(): void;
|
|
141
146
|
componentWillRender(): void;
|
|
@@ -267,6 +267,10 @@ export namespace Components {
|
|
|
267
267
|
* @default ""
|
|
268
268
|
*/
|
|
269
269
|
"initialValue": string;
|
|
270
|
+
/**
|
|
271
|
+
* Sets the initial value decode of the component
|
|
272
|
+
*/
|
|
273
|
+
"initialValueDecode": string;
|
|
270
274
|
/**
|
|
271
275
|
* Input event emission delay in milliseconds.
|
|
272
276
|
* @default 300
|
|
@@ -324,7 +328,7 @@ export namespace Components {
|
|
|
324
328
|
* Sets the value of the component.
|
|
325
329
|
* @param value - Value of the component.
|
|
326
330
|
*/
|
|
327
|
-
"setValue": (value: string) => Promise<void>;
|
|
331
|
+
"setValue": (value: string, valueDecode?: string) => Promise<void>;
|
|
328
332
|
/**
|
|
329
333
|
* When true shows the drop-down icon, for open list.
|
|
330
334
|
* @default true
|
|
@@ -733,6 +737,11 @@ export namespace Components {
|
|
|
733
737
|
* @default true
|
|
734
738
|
*/
|
|
735
739
|
"editableEvents": boolean;
|
|
740
|
+
/**
|
|
741
|
+
* When true, it will show the changeView
|
|
742
|
+
* @default false
|
|
743
|
+
*/
|
|
744
|
+
"enableChangeView": boolean;
|
|
736
745
|
/**
|
|
737
746
|
* Used to retrieve component's props values.
|
|
738
747
|
* @param descriptions - When provided and true, the result will be the list of props with their description.
|
|
@@ -1323,6 +1332,10 @@ export namespace Components {
|
|
|
1323
1332
|
* Sets the initial value of the component
|
|
1324
1333
|
*/
|
|
1325
1334
|
"initialValue": string;
|
|
1335
|
+
/**
|
|
1336
|
+
* Sets the initial value decode of the component
|
|
1337
|
+
*/
|
|
1338
|
+
"initialValueDecode": string;
|
|
1326
1339
|
/**
|
|
1327
1340
|
* Enables a clear trailing icon.
|
|
1328
1341
|
* @default false
|
|
@@ -1368,7 +1381,7 @@ export namespace Components {
|
|
|
1368
1381
|
* Sets the component's value.
|
|
1369
1382
|
* @param value - Value to be set.
|
|
1370
1383
|
*/
|
|
1371
|
-
"setValue": (value: string) => Promise<void>;
|
|
1384
|
+
"setValue": (value: string, valueDecode?: string) => Promise<void>;
|
|
1372
1385
|
/**
|
|
1373
1386
|
* When true shows the drop-down icon, for open list.
|
|
1374
1387
|
*/
|
|
@@ -6220,6 +6233,10 @@ declare namespace LocalJSX {
|
|
|
6220
6233
|
* @default ""
|
|
6221
6234
|
*/
|
|
6222
6235
|
"initialValue"?: string;
|
|
6236
|
+
/**
|
|
6237
|
+
* Sets the initial value decode of the component
|
|
6238
|
+
*/
|
|
6239
|
+
"initialValueDecode"?: string;
|
|
6223
6240
|
/**
|
|
6224
6241
|
* Input event emission delay in milliseconds.
|
|
6225
6242
|
* @default 300
|
|
@@ -6658,6 +6675,11 @@ declare namespace LocalJSX {
|
|
|
6658
6675
|
* @default true
|
|
6659
6676
|
*/
|
|
6660
6677
|
"editableEvents"?: boolean;
|
|
6678
|
+
/**
|
|
6679
|
+
* When true, it will show the changeView
|
|
6680
|
+
* @default false
|
|
6681
|
+
*/
|
|
6682
|
+
"enableChangeView"?: boolean;
|
|
6661
6683
|
/**
|
|
6662
6684
|
* When disabled, the navigation toolbar won't be displayed.
|
|
6663
6685
|
* @default false
|
|
@@ -7152,6 +7174,10 @@ declare namespace LocalJSX {
|
|
|
7152
7174
|
* Sets the initial value of the component
|
|
7153
7175
|
*/
|
|
7154
7176
|
"initialValue"?: string;
|
|
7177
|
+
/**
|
|
7178
|
+
* Sets the initial value decode of the component
|
|
7179
|
+
*/
|
|
7180
|
+
"initialValueDecode"?: string;
|
|
7155
7181
|
/**
|
|
7156
7182
|
* Enables a clear trailing icon.
|
|
7157
7183
|
* @default false
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,F as e}from"./p-b0368f88.js";import{a as s,c as o}from"./p-1ee561ba.js";import{d as n,i as a,g as r,h}from"./p-008bdcdc.js";import{d as l,a as p,b as f,c,e as d}from"./p-53af4c87.js";import{d as u}from"./p-cd3a7d53.js";const g=class{constructor(i){t(this,i),this.label="",this.doubleView=!1,this.setDoubleView=void 0,this.fontFamily=void 0,this.fontSize=void 0}render(){return i("div",{key:"0dda65a73efcc5b8217019bf8d1d5d4a66277df6",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"07bfcbb99f759ae7968cb76af97e04666cdfb84f",class:"title"},i("span",{key:"59b6656d24f1b381455888534075a704eadf3757"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"7d6f5eca5945d49fd784089cc97906400f9279fe",class:"toggler"},i("label",{key:"6badb37501bdc190948b6fd101a04695b556fa87",htmlFor:"ch2",class:"switch"},i("input",{key:"07f2f293bec60e83caf3ff8590277c05a8cad26a",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"a6cb9c1484bf2fbec6a1e9cdb6b2fac06a35c03f",class:"slider"})),i("span",{key:"4def4a9d08f8eb2fecf7058ad24d44d0cf626dec",class:"label"},"Previsioni")))}};g.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.custom-task-list-wrapper{display:flex;justify-content:space-around;max-width:330px;place-items:"center";text-align:center;align-items:center}.title{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggler{max-width:max-content;padding:0 4px;text-align:right}.switch{position:relative;display:inline-block;width:30px;height:17px}.input{opacity:0;width:0;height:0}.input:checked+.slider{background-color:#003b77}.input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.input:focus+.slider{box-shadow:0 0 1px #003b77}.slider{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}.label{font-size:12px;padding:6px}.filter{font-size:12px}';const v=class{constructor(i){t(this,i),this.ganttId=void 0,this.tasks=[],this.rowHeight=0,this.rowWidth="",this.fontFamily="",this.fontSize="",this.scrollableTaskList=void 0,this.taskListScrollX=void 0,this.setSelectedTask=void 0,this.onclickTaskList=void 0,this.ondblclickTaskList=void 0,this.oncontextmenuTaskList=void 0,this.ontaskListScrollWidth=void 0}componentDidLoad(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}componentDidUpdate(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}updateTaskListScroll(){this.projectWrapperRef&&(this.projectWrapperRef.parentElement.scrollLeft=this.taskListScrollX)}render(){const t=new s,o={};this.scrollableTaskList&&(o.width=this.rowWidth);const a=this.tasks.reduce(((t,i)=>t.valuesToShow.length>i.valuesToShow.length?t:i)).valuesToShow.length+1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:o},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((s=>{var o,r,h,l;return i(e,null,"project"===s.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(o=s.valuesToShow)||void 0===o?void 0:o.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`task_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===s.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(r=s.styles)||void 0===r?void 0:r.backgroundColor}})):i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(h=s.styles)||void 0===h?void 0:h.backgroundColor}}),null===(l=s.valuesToShow)||void 0===l?void 0:l.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`phase_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var t;let e="";for(let t=0;t<s.valuesToShow.length;t++)e+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":e},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(t=s.valuesToShow)||void 0===t?void 0:t.map(((t,e)=>i("span",{class:0===e?"main":void 0,title:t.length>10?t:void 0,key:`detail_${s.id}_valuesToShow_${e}`},t))))})())}))))}static get watchers(){return{taskListScrollX:["updateTaskListScroll"]}}};v.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.container{margin-top:var(--kup-space-04)}.scrollable{overflow-x:auto;scrollbar-width:0}.scrollable .project-wrapper{display:table}.scrollable .project{width:100% !important;display:table-row}.scrollable .project>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid var(--kup-border-subtle, #acacac);border-top:1px solid var(--kup-border-subtle, #acacac);padding-left:12px}.scrollable .project>*:first-child{border-left:1px solid var(--kup-border-subtle, #acacac);border-bottom-left-radius:4px;border-top-left-radius:4px}.scrollable .project>*:last-child{border-right:1px solid var(--kup-border-subtle, #acacac);border-bottom-right-radius:4px;border-top-right-radius:4px}.scrollable .subrow{width:100% !important;display:table-row}.scrollable .subrow>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .subrow>*:first-child{border-left:1px solid #acacac}.scrollable .subrow>*:last-child{border-right:1px solid #acacac}.scrollable .timeline{width:100% !important;display:table-row}.scrollable .timeline>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .timeline>*:first-child{border-left:1px solid #acacac}.scrollable .timeline>*:last-child{border-right:1px solid #acacac}.scrollable .project:has(+.subrow)>*{border-bottom-left-radius:0;border-bottom-right-radius:0}.scrollable::-webkit-scrollbar{width:0;height:0}.project{background:var(--kup-layer-1);border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);box-sizing:border-box;color:var(--kup-text-secondary);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center;padding:var(--kup-space-03)}.project>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.project .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.subrow{cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400}.subrow>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.subrow:last-of-type{border-bottom:1px solid var(--kup-border-subtle)}.subrow:has(+.subrow),.project:has(+.subrow){border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.timeline{padding:var(--kup-space-03);cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400;box-sizing:border-box}.timeline>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.timeline .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";const x=class{constructor(i){t(this,i),this.dateSetup=void 0,this.locale=void 0,this.rtl=void 0,this.headerHeight=void 0,this.columnWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.currentDateIndicator=void 0,this.svgWidth=void 0,this.simplifiedHeader=void 0}componentWillLoad(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode}formatYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.year)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.year(t,this.locale):l.year(t,this.locale)}formatMonth(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.month)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.month(t,this.locale):l.month(t,this.locale)}formatMonthAndYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.monthAndYear)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.monthAndYear(t,this.locale):l.monthAndYear(t,this.locale)}formatWeek(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.week)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.week(t,this.locale):l.week(t,this.locale)}formatDay(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.day)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.day(t,this.locale):l.day(t,this.locale)}getCalendarValuesForYear(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatYear(a);if(e.push(i("text",{key:r,y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=a.getFullYear().toString();let e;e=this.rtl?(6+n+a.getFullYear()+1)*this.columnWidth:(6+n-a.getFullYear())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:this.headerHeight,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForMonth(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatMonth(a);if(e.push(i("text",{key:r+a.getFullYear(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=this.formatYear(a);let e;e=this.rtl?(6+n+a.getMonth()+1)*this.columnWidth:(6+n-a.getMonth())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForWeek(){const t=[],e=[];let s=1;const o=.5*this.headerHeight,n=this.dateSetup.dates;for(let a=n.length-1;a>=0;a--){const r=n[a];let h="";0!==a&&r.getMonth()===n[a-1].getMonth()||(h=this.formatMonthAndYear(r));const l=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},l)),h&&(a!==n.length-1&&t.push({key:h,value:h,x1Line:this.columnWidth*a+s*this.columnWidth,y1Line:0,y2Line:o,xText:this.columnWidth*a+this.columnWidth*s*.5,yText:.9*o}),s=0),s++}return[t,e]}getCalendarValuesForDay(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatDay(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),n+1!==o.length&&a.getMonth()!==o[n+1].getMonth()){const i=this.formatMonth(a);t.push({key:i+a.getFullYear(),value:i,x1Line:this.columnWidth*(n+1),y1Line:0,y2Line:s,xText:this.columnWidth*(n+1)-p(a.getMonth(),a.getFullYear())*this.columnWidth*.5,yText:.9*s})}}return[t,e]}getCalendarValuesForHour(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=f(this.locale,{hour:"numeric"}).format(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(n+ +this.rtl),class:"calendarBottomText"},r)),0!==n&&a.getDate()!==o[n-1].getDate()){const i=o[n-1],e=`${c(i,this.locale,"long")}, ${i.getDate()} ${d(i,this.locale)}`,r=(a.getHours()-24)/2;t.push({key:e+a.getFullYear(),value:e,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:this.columnWidth*(n+r),yText:.9*s})}}return[t,e]}getTopAndBottomValues(){switch(this.dateSetup.viewMode){case"hour":return this.getCalendarValuesForHour();case"day":return this.getCalendarValuesForDay();case"week":return this.getCalendarValuesForWeek();case"month":return this.getCalendarValuesForMonth();case"year":return this.getCalendarValuesForYear()}}render(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode;const[t,e]=this.getTopAndBottomValues();return i("svg",{key:"cb25f41952a9df647dde916bdec8777008f8fef3",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"1b2a22e86f120867dc36588d13d4529e85406b99",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"6fcae9075fdd1228f4d8975390abbe55acd3f659",x:0,y:0,width:this.columnWidth*this.dateSetup.dates.length,height:this.headerHeight,class:"calendarHeader"}),this.simplifiedHeader?null:e,t.map(this.simplifiedHeader?t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:2*t.y2Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value)):t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:t.y1Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value))),this.currentDateIndicator&&i("circle",{key:"049fd3ba1ebcef54ae8fe3e78ead566e21c5f76b",fill:this.currentDateIndicator.color,cx:this.currentDateIndicator.x+2.5,cy:this.headerHeight-8,r:"8"})))}};x.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.calendarBottomText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarTopTick{stroke:var(--kup-border-subtle)}.calendarTopText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarHeader{fill:var(--kup-layer-1);stroke:var(--kup-border-subtle);stroke-width:1.4;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,m,k,b,w,z={exports:{}};y=z.exports,m=function(){function t(t,i,e){this.r=0,this.g=0,this.b=0,this.set(t,i,e)}return t.prototype.set=function(t,i,e){this.r=this.clamp(t),this.g=this.clamp(i),this.b=this.clamp(e)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var i=Math.sin(t),e=Math.cos(t);this.multiply([.213+.787*e-.213*i,.715-.715*e-.715*i,.072-.072*e+.928*i,.213-.213*e+.143*i,.715+.285*e+.14*i,.072-.072*e-.283*i,.213-.213*e-.787*i,.715-.715*e+.715*i,.072+.928*e+.072*i])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var i=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),e=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),s=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=i,this.g=e,this.b=s},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,i){void 0===t&&(t=1),void 0===i&&(i=0),this.r=this.clamp(this.r*t+255*i),this.g=this.clamp(this.g*t+255*i),this.b=this.clamp(this.b*t+255*i)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,i=this.g/255,e=this.b/255,s=Math.max(t,i,e),o=Math.min(t,i,e),n=0,a=(s+o)/2;if(s===o)return{h:0,s:0,l:100*a};var r=s-o;return s===t?n=(i-e)/r+(i<e?6:0):s===i?n=(e-t)/r+2:s===e&&(n=(t-i)/r+4),{h:100*(n/=6),s:100*(a>.5?r/(2-s-o):r/(s+o)),l:100*a}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),k=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new m(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],i={loss:1/0},e=0;i.loss>this.options.acceptanceLossPercentage;){var s=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(s.loss<i.loss&&(i=s),(e+=1)>=this.options.maxChecks)break}return Object.assign({},i,{called:e})},t.prototype.solveNarrow=function(t){var i=t.loss,e=i+1;return this.spsa({A:i,a:[.25*e,.25*e,e,.25*e,.2*e,.2*e],c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,i){var e=100;return 2===i?e=7500:4!==i&&5!==i||(e=200),3===i?t>e?t%=e:t<0&&(t=e+t%e):t<0?t=0:t>e&&(t=e),t},t.prototype.spsa=function(t){for(var i=t.A,e=t.a,s=t.c,o=t.values,n=t.maxTriesInLoop,a=void 0===n?500:n,r=t.called,h=void 0===r?0:r,l=null,p=1/0,f=new Array(6),c=new Array(6),d=new Array(6),u=0;u<a;u++){for(var g=s/Math.pow(u+1,.16666666666666666),v=0;v<6;v++)f[v]=Math.random()>.5?1:-1,c[v]=o[v]+g*f[v],d[v]=o[v]-g*f[v];var x=this.loss(c)-this.loss(d);for(v=0;v<6;v++){var y=x/(2*g)*f[v],m=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-m*y,v)}var k=this.loss(o);k<p&&(l=o.slice(0),p=k)}return{values:l,loss:p,called:h}},t.prototype.loss=function(t){var i=this.reusedColor;i.set(0,0,0),i.invert(t[0]/100),i.sepia(t[1]/100),i.saturate(t[2]/100),i.hueRotate(3.6*t[3]),i.brightness(t[4]/100),i.contrast(t[5]/100);var e=i.hsl();return Math.abs(i.r-this.target.r)+Math.abs(i.g-this.target.g)+Math.abs(i.b-this.target.b)+Math.abs(e.h-this.targetHSL.h)+Math.abs(e.s-this.targetHSL.s)+Math.abs(e.l-this.targetHSL.l)},t.prototype.css=function(t){var i=function(i,e){return void 0===e&&(e=1),Math.round(t[i]*e)};return["invert("+i(0)+"%)","sepia("+i(1)+"%)","saturate("+i(2)+"%)","hue-rotate("+i(3,3.6)+"deg)","brightness("+i(4)+"%)","contrast("+i(5)+"%);"].join(" ")},t}(),b=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},w={},y.clearCache=function(t){t?w[t]&&delete w[t]:w={}},y.hexToCSSFilter=function(t,i){var e,s,o,n,a,r;if(void 0===i&&(i={}),w[t]&&!i.forceFilterRecalculation)return Object.assign({},w[t],{cache:!0});try{if(o=(e=
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
function(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,o,n=e.call(t),a=[];try{for(;(void 0===i||i-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(t){o={error:t}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return a}((r=t,4===r.length?[parseInt("0x"+r[1]+r[1]),parseInt("0x"+r[2]+r[2]),parseInt("0x"+r[3]+r[3])]:7===r.length?[parseInt("0x"+r[1]+r[2]),parseInt("0x"+r[3]+r[4]),parseInt("0x"+r[5]+r[6])]:[]),3))[1],n=e[2],!b(s=e[0])||!b(o)||!b(n))throw new Error("hextToRgb returned an invalid value for '"+t+"'");a=new m(Number(s),Number(o),Number(n))}catch(t){throw new Error("Color value should be in HEX format. "+t)}var h=new k(a,Object.assign({},{acceptanceLossPercentage:5,maxChecks:30,forceFilterRecalculation:!1},i));return w[t]=Object.assign({},h.solve(),{hex:t,rgb:[s,o,n],cache:!1})},Object.defineProperty(y,"__esModule",{value:!0});const T=class{constructor(i){t(this,i),this.tasks=void 0,this.dates=void 0,this.ganttEvent=void 0,this.selectedTask=void 0,this.rowHeight=0,this.columnWidth=0,this.timeStep=0,this.taskHeight=0,this.arrowColor="",this.arrowIndent=0,this.fontFamily="",this.fontSize="",this.rtl=!1,this.hideLabel=!1,this.showSecondaryDates=!1,this.currentDateIndicator=void 0,this.projection=void 0,this.readOnly=!1,this.gridProps=void 0,this.dateChange=void 0,this.progressChange=void 0,this.doubleClick=void 0,this.barClick=void 0,this.barDblClick=void 0,this.barContextMenu=void 0,this.delete=void 0,this.setFailedTask=void 0,this.setSelectedTask=void 0,this.eventStart=void 0,this.eMouseDown=void 0,this.phaseDrop=void 0,this.setGanttEvent=void 0,this.phaseDragScroll=void 0,this.xStep=0,this.initEventX1Delta=0,this.initEventXClick=0,this.isMoving=!1,this.point=void 0,this.svg=void 0,this.currentTarget=void 0,this.dragScrollInterval=void 0,this.dropZoneTask=void 0}componentDidLoad(){this.point=this.createSVGPoint(),this.updateXStep()}createSVGPoint(){if(this.svg)return this.svg.createSVGPoint()}updateXStep(){const t=this.dates[1].getTime()-this.dates[0].getTime()-60*this.dates[1].getTimezoneOffset()*1e3+60*this.dates[0].getTimezoneOffset()*1e3;this.xStep=this.timeStep*this.columnWidth/t}updateSvgMove(){const t=async t=>{var i,e;if(!this.ganttEvent.changedTask||!this.point||!this.svg)return;t.preventDefault(),this.point.x=t.clientX,this.point.y=t.clientY;const s=this.point.matrixTransform(null===(e=null===(i=this.svg)||void 0===i?void 0:i.getScreenCTM())||void 0===e?void 0:e.inverse()),{isChanged:o,changedTask:n}=h(s.x,this.ganttEvent.action,this.ganttEvent.changedTask,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,s.y);this.currentTarget&&(this.addGhostPreview(t),this.handleAutoScrollForPhaseDrag(t),this.addDropzoneVisualization()),o&&this.setGanttEvent(Object.assign(Object.assign({},this.ganttEvent),{action:this.ganttEvent.action,changedTask:n}))},i=async e=>{var s,o,n;clearInterval(this.dragScrollInterval),this.resetDropzoneVisualization();const{action:a,originalSelectedTask:r,changedTask:l}=this.ganttEvent;if(!(l&&this.point&&this.svg&&r))return;e.preventDefault(),this.point.x=e.clientX;const p=this.point.matrixTransform(null===(o=null===(s=this.svg)||void 0===s?void 0:s.getScreenCTM())||void 0===o?void 0:o.inverse());this.currentTarget=null;const{changedTask:f}=h(p.x,a,l,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,p.y),c=r.start!==f.start||r.end!==f.end||r.progress!==f.progress||r.y!==f.y;this.svg.removeEventListener("mousemove",t),this.svg.removeEventListener("mouseup",i),null===(n=this.svg.querySelector(".ghost-preview"))||void 0===n||n.remove(),this.setGanttEvent({action:""}),this.isMoving=!1;let d,u,g=!0;if("move"===a&&c&&"task"===f.type&&(d=this.tasks.find((t=>this.isPhaseWithinTaskArea(l,t)&&"project"===t.type)),u=this.tasks.find((t=>t.id==r.id.split("_").shift()))),(null==d?void 0:d.id)&&(null==u?void 0:u.id)!==(null==d?void 0:d.id))this.phaseDrop(r,u,f,d);else if(("move"===a||"end"===a||"start"===a)&&this.dateChange&&c)try{const t=await this.dateChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}else if(this.progressChange&&c)try{const t=this.progressChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}g||this.setFailedTask(r)};this.isMoving||"move"!==this.ganttEvent.action&&"end"!==this.ganttEvent.action&&"start"!==this.ganttEvent.action&&"progress"!==this.ganttEvent.action||!this.svg||(this.svg.addEventListener("mousemove",t),this.svg.addEventListener("mouseup",i),this.isMoving=!0)}hasMovedHorizontally(t){return!this.readOnly&&this.initEventXClick!==t.clientX}addGhostPreview(t){var i;null===(i=this.svg.querySelector(".ghost-preview"))||void 0===i||i.remove();const e=Object.assign(Object.assign({},t),{dataTransfer:new DataTransfer}),s=this.currentTarget;s.classList.add("ghost-preview"),this.svg.appendChild(s.cloneNode(!0));const o=s.getBoundingClientRect();e.dataTransfer.setDragImage(s,e.clientX-o.left,e.clientY-o.top)}handleAutoScrollForPhaseDrag(t){var i,e;const s=null===(e=null===(i=this.svg)||void 0===i?void 0:i.parentElement)||void 0===e?void 0:e.parentElement;if(s)if(clearInterval(this.dragScrollInterval),s.clientHeight<s.scrollHeight){const i=s.getBoundingClientRect(),e=t.clientY-i.top,o=5;e-20<o?this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop-=o)}),1):e+20>i.height-o&&(this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop+=o)}),1))}else{const i=20,e=window.innerHeight,s=t.clientY;s<i?window.scrollBy(0,-i):s>e-i&&window.scrollBy(0,i)}}isPhaseWithinTaskArea(t,i){return t.y+t.height>=i.ySecondary&&t.y<=i.ySecondary+i.height&&t.x2>=i.x1&&t.x1<=i.x2}addDropzoneVisualization(){var t;this.resetDropzoneVisualization();const i=this.tasks.filter((t=>{var i,e,s;return"project"==t.type&&(null===(s=null===(e=null===(i=this.ganttEvent.originalSelectedTask)||void 0===i?void 0:i.id)||void 0===e?void 0:e.split("_"))||void 0===s?void 0:s.shift())!=t.id})),e=this.ganttEvent.changedTask;this.dropZoneTask=i.find((t=>this.isPhaseWithinTaskArea(e,t))),(null===(t=this.dropZoneTask)||void 0===t?void 0:t.ySecondary)&&this.getBarRectsForDropzoneVisualization().forEach((t=>{t.setAttribute("fill",u.barDropZoneColor)}))}resetDropzoneVisualization(){if(!this.dropZoneTask)return;const t=this.getBarRectsForDropzoneVisualization(),i=!!this.selectedTask&&this.dropZoneTask.id===this.selectedTask.id;t.forEach((t=>{t.setAttribute("fill",this.getBarColor(i,this.dropZoneTask.styles))}))}getBarRectsForDropzoneVisualization(){let t;if(this.showSecondaryDates){const i=this.svg.querySelector(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`),e=[i];let s=i.nextElementSibling;for(;null!==s;)e.push(s),s=s.nextElementSibling;let o=i.previousElementSibling;for(;null!==o;)e.unshift(o),o=o.previousElementSibling;t=e}else t=this.svg.querySelectorAll(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`);return t}handleBarEventStart(t,i,e){var s;if(e)if(a(e)){if("delete"===t&&this.delete)try{const e=this.delete(i);void 0!==e&&e&&this.setGanttEvent({action:t,changedTask:i})}catch(t){console.error("Error on Delete. "+t)}}else if("mouseenter"===t)this.ganttEvent.action||this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else if("mouseleave"===t)"mouseenter"===this.ganttEvent.action&&this.setGanttEvent({action:""});else if("dblclick"===t)this.doubleClick&&this.doubleClick(i);else if("click"===t)!this.hasMovedHorizontally(e)&&this.barClick&&this.barClick(i);else if("contextmenu"===t)e.preventDefault(),this.barContextMenu&&this.barContextMenu(e,i);else if("move"===t){if(!this.svg||!this.point)return;this.point.x=e.clientX;const o=this.point.matrixTransform(null===(s=this.svg.getScreenCTM())||void 0===s?void 0:s.inverse());this.currentTarget="task"===i.type?e.currentTarget.cloneNode(!0):null,this.initEventX1Delta=o.x-i.x1,this.point.y=e.clientY,this.initEventXClick=e.clientX,this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i})}else this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else"select"===t&&this.setSelectedTask(i.id)}getTaskIcon(t){const e=z.exports.hexToCSSFilter(t.color);return i("image",{href:t.url,filter:e.filter.replace(";",""),x:t.x,y:t.y,width:t.width,height:t.height})}renderKupBar(t,e,s,o){var n,a,r;return i("g",{class:"barWrapper","tab-index":0,"data-type":t.type},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,!this.readOnly&&!!this.dateChange&&!t.isDisabled,t,t.x1secondary,(null!==(n=t.x2secondary)&&void 0!==n?n:0)-(null!==(a=t.x1secondary)&&void 0!==a?a:0),t.ySecondary),i("g",{class:"handleGroup"},s&&i("g",null,this.renderKupBarDateHandle(t.x1+1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"start"),this.renderKupBarDateHandle(t.x2-t.handleWidth-1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"end")),o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(r=t.icon.color)&&void 0!==r?r:"#000000",url:t.icon.url,width:t.height/2+"px",height:t.height/2+"px",x:t.x1+(t.x2-t.x1)-t.height/2/2,y:t.y-t.height/2/2/2+(this.showSecondaryDates?t.height/2:0)}))}renderKupBarDisplay(t,e,s,o,n,a,r,h,l,p,f,c,d,u){if(this.showSecondaryDates&&void 0!==c){const g=o/2;return i("g",{onMouseDown:t=>p&&this.handleBarEventStart("move",f,t)},i("rect",{key:"top semi-transparent bar",x:c,width:d,y:null!=u?u:e,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),opacity:.5,class:"barBackground"}),i("rect",{key:"main bar",x:t,width:s,y:e+g,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{key:"progress bar",x:n,width:a,y:e+g,height:g,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}return i("g",{onMouseDown:t=>{p&&this.handleBarEventStart("move",f,t)}},i("rect",{x:t,width:s,y:e,height:o,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{x:n,width:a,y:e,height:o,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}renderKupBarDateHandle(t,e,s,o,n,a,r){return i("rect",{x:t,y:e,width:s,height:o,class:"barHandle",ry:n,rx:n,onMouseDown:t=>this.handleBarEventStart(r,a,t)})}renderKupBarSmall(t,e,s,o){return i("g",{class:"barWrapper","tab-index":0},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,s,t),i("g",{class:"handleGroup"},o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t,"small"),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})))}renderKupBarTimeLine(t,s){return i("g",{"tab-index":0},i("rect",{fill:s,x:"0",width:"100%",y:t.y,height:t.height,rx:0,ry:0}),t.barChildren.map((t=>{var s;return i(e,null,i("rect",{style:{cursor:"pointer"},key:t.id,fill:t.styles.backgroundColor,x:t.x1,width:t.x2-t.x1,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius}),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(s=t.icon.color)&&void 0!==s?s:"#000000",url:t.icon.url,width:t.height+"px",height:t.height+"px",x:t.x1+(t.x2-t.x1)-t.height/2,y:t.y-t.height/2/2}))})))}renderKupArrow(t,e){const[s,o]=this.rtl?this.drownPathAndTriangleRTL(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent):this.drownPathAndTriangle(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent);return i("g",{class:"arrow"},i("path",{"stroke-width":"1.5",d:s,fill:"none"}),i("polygon",{points:o}))}drownPathAndTriangle(t,i,e,s,o){const n=i.y+s/2,a=t.x2+2*o;return[`M ${t.x2} ${t.y+s/2}\n h ${o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a<i.x1?"":"H "+(i.x1-o)}\n V ${n}\n h ${a>i.x1?o:i.x1-t.x2-o}`,`${i.x1},${n}\n ${i.x1-5},${n-5}\n ${i.x1-5},${n+5}`]}drownPathAndTriangleRTL(t,i,e,s,o){const n=i.y+s/2,a=t.x1-2*o;return[`M ${t.x1} ${t.y+s/2}\n h ${-o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a>i.x2?"":`H ${i.x2+o}`}\n V ${n}\n h ${a<i.x2?-o:i.x2-t.x1+o}`,`${i.x2},${n}\n ${i.x2+5},${n+5}\n ${i.x2+5},${n-5}`]}getBarColor(t,i){return t?i.backgroundSelectedColor:i.backgroundColor}getProcessColor(t,i){return t?i.progressSelectedColor:i.progressColor}calculateProgressPoint(t,i="bar"){return r("bar"==i?+!this.rtl*t.progressWidth+t.progressX:t.progressWidth+t.x1,t.y,t.height)}render(){let t=0;const e=[],s=[i("line",{key:"RowLineFirst",x1:0,y1:0,x2:this.gridProps.svgWidth,y2:0,class:"gridRowLine"})];for(const o of this.tasks)e.push(i("rect",{key:"Row"+o.id,x:0,y:t,width:this.gridProps.svgWidth,height:this.rowHeight,class:"gridRow"})),s.push(i("line",{key:"RowLine"+o.id,x1:0,y1:t+this.rowHeight,x2:this.gridProps.svgWidth,y2:t+this.rowHeight,class:"gridRowLine"})),t+=this.rowHeight;let o=0;const n=[];for(let e=0;e<this.dates.length;e++)n.push(i("line",{key:this.dates[e].getTime(),x1:o,y1:0,x2:o,y2:t,class:"gridTick"})),o+=this.columnWidth;return i("svg",{key:"1768bf87d7d08070ce0d27dbb6981999e9839919",xmlns:"http://www.w3.org/2000/svg",width:this.gridProps.svgWidth,height:this.rowHeight*this.tasks.length+"px","font-family":this.fontFamily,ref:t=>this.svg=t},i("g",{key:"57d2d52600d5c9a3187a1a1779b409ea716ce527",class:"grid"},i("g",{key:"cf522a94564a34298d2cc91efc46af3ed4e053f0",class:"rows"},e),i("g",{key:"738d6d128ecd5398ba8aa5c333742854e082fbd7",class:"rowLines"},s),i("g",{key:"5e36d94d36900a7decf630abf4a614067b14735e",class:"ticks"},n)),i("g",{key:"132f69c4f73953bbf998bf2acd30693d25b93d67",class:"content"},this.currentDateIndicator&&i("rect",{key:"de9e545038e482212e621ca4c2f1222339fd203d",fill:this.currentDateIndicator.color,x:this.currentDateIndicator.x+1.5,y:"0",width:"2",height:"100%"}),this.projection&&i("rect",{key:"7e077d951e8c2b125a4e25698542515a20d9ac86",fill:this.projection.color,x:this.projection.x0,y:"0",width:this.projection.xf-this.projection.x0,height:"100%","fill-opacity":"0.35"}),i("g",{key:"ab75796381aaadbda8285965a66e91602185366f",class:"arrows",fill:this.arrowColor,stroke:this.arrowColor},this.tasks.map((t=>t.barChildren.map((i=>{"timeline"!==t.type&&this.renderKupArrow(t,i)}))))),i("g",{key:"18b7c7ff265294ba6d4aa93717d5a375264c421b",class:"bar","font-family":this.fontFamily,"font-size":this.fontSize},this.tasks.map((t=>{const e="project"===t.type;return i("g",{onKeyDown:i=>{"Delete"===i.key&&(t.isDisabled||this.handleBarEventStart("delete",t,i)),i.stopPropagation()},onMouseEnter:i=>{this.handleBarEventStart("mouseenter",t,i)},onMouseLeave:i=>{this.handleBarEventStart("mouseleave",t,i)},onDblClick:()=>{this.barDblClick(t)},onClick:i=>{this.handleBarEventStart("click",t,i)},onContextMenu:i=>{this.handleBarEventStart("contextmenu",t,i)},onFocus:()=>{this.handleBarEventStart("select",t)},class:"task-wrapper"},(()=>{const i={task:t,arrowIndent:this.arrowIndent,isDelete:!t.isDisabled,taskHeight:this.taskHeight,isSelected:!!this.selectedTask&&t.id===this.selectedTask.id,rtl:this.rtl,hideLabel:this.hideLabel},s=t.styles,o=i.isSelected?s.backgroundSelectedColor:s.backgroundColor,n=!(this.readOnly||!this.dateChange||t.isDisabled||e),a=!this.readOnly&&!!this.progressChange&&!t.isDisabled,r=!this.readOnly&&!!this.dateChange&&!t.isDisabled;switch(t.typeInternal){case"project":default:return this.renderKupBar(t,i.isSelected,n,a);case"smalltask":return this.renderKupBarSmall(t,i.isSelected,r,a);case"timeline":return this.renderKupBarTimeLine(t,o)}})())})),this.currentTarget&&this.ganttEvent.changedTask&&i("g",{key:"71036ce8e3180a6e31ef329e11ad35f7622a5889",class:"task-wrapper"},this.renderKupBar(this.ganttEvent.changedTask,!1,!1,!1)))))}static get watchers(){return{columnWidth:["updateXStep"],dates:["updateXStep"],timeStep:["updateXStep","updateSvgMove"],ganttEvent:["updateSvgMove"],xStep:["updateSvgMove"],svg:["updateSvgMove"],initEventX1Delta:["updateSvgMove"],point:["updateSvgMove"],rtl:["updateSvgMove"],onProgressChange:["updateSvgMove"],onDateChange:["updateSvgMove"]}}};T.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.gridRow{fill:var(--kup-layer-1)}.gridRowLine{stroke:transparent}.gridTick{stroke:var(--kup-border-subtle)}.barHandle{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}.barBackground{user-select:none;stroke-width:0}.barWrapper{cursor:pointer;outline:none}.task-wrapper{outline:none !important}.barWrapper:hover .barHandle{visibility:visible;opacity:1}.barLabel{fill:var(--kup-layer-0);text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.barLabelOutside{fill:var(--kup-text-secondary);text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ghost-preview{opacity:0.5}";export{g as kup_custom_task_list_header,v as kup_custom_task_list_table,x as kup_gantt_calendar,T as kup_grid_renderer}
|