eservices-core 1.3.347 → 1.3.348

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.
@@ -1,13 +1,13 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.justify-content-center{justify-content:center}.user-select-none{-webkit-user-select:none;user-select:none}.flex{display:flex}.flex_column,.flex-column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow,.flex-grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_center,.text-center{text-align:center}.text_bold,.text-bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color-light{color:var(--color-light)}.color-primary{color:var(--color-primary)}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.transition-fast{transition:.1s}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.gap-25{gap:25px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number,.widget-table-cell_money{text-align:end}.widget-list-cell-history{cursor:pointer}.widget-list-cell-history>span{color:var(--color-primary);font-size:16px;padding:0 10px}.widget-table-cell_multi-select>.container-input-wrap{align-items:center}.overflow_auto,.overflow-auto{overflow:auto}.overflow_hidden,.overflow-hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.padding-5{padding:5px}.padding-0{padding:0}.padding-15{padding:15px}.padding-20{padding:20px}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.flex,.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-flex-align-center{align-items:center}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.gap-10{gap:10px}.gap-15{gap:15px}.gap-5{gap:5px}.gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.padding-bottom-10{padding-bottom:10px}.padding-10{padding:10px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.widget-table__head-cell[data-v-aa18d6fa]{padding:18px;text-align:start}.widget-table__head-label[data-v-aa18d6fa]{font-weight:600;font-size:14px;line-height:19px}.widget-filter-text[data-v-f6da3bed]{padding:20px 10px}.widget-filter-enum[data-v-4c82f6e7]{padding:3px 0;max-height:400px;max-width:340px;min-width:180px;overflow:hidden auto}.widget-filter-enum-item[data-v-4c82f6e7]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-4c82f6e7]:hover{background-color:#f1f1f1}.widget-filter-number[data-v-f9cd559e]{padding:4px 6px}[dir=rtl] .icon[data-v-8a72b45f]{transform:scaleX(-1)}.widget-spinner[data-v-0ef9ae88],.widget-spinner[data-v-0ef9ae88]:after{border-radius:50%;width:14px;height:14px}.widget-spinner[data-v-0ef9ae88]{font-size:2px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;transform:translateZ(0);animation:spinnerAnimation-0ef9ae88 1.1s infinite linear}@keyframes spinnerAnimation-0ef9ae88{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-button[data-v-450dc564]{position:relative}.widget-button-spinner[data-v-450dc564]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.widget-multi-button-wrap[data-v-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{grid-template-columns:1fr var(--button-size);background-color:var(--primary);grid-template-rows:var(--button-size);transition:var(--fast)}.widget-multi-button_active[data-v-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]:hover{background-color:#223296}tr[data-v-344a8cc1]{border:1px solid #F3F4FC;height:30px}th[data-v-344a8cc1],td[data-v-344a8cc1]{position:relative;padding:0 11px}th[data-v-344a8cc1]{text-align:left}p[data-v-344a8cc1]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-ccffc6bd]{position:sticky;top:-1px;z-index:1}.test-block[data-v-ccffc6bd]{position:absolute;z-index:2;display:none;height:calc(100% + 1px);place-content:center;inset-block-start:-1px;padding-inline:10px;background-color:#e7f2ff;-webkit-user-select:none;user-select:none;white-space:nowrap}.widget-list-head th[data-v-ccffc6bd]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}.widget-head-cell[data-v-d131e64e]{display:flex;gap:4px}.widget-head-cell-order[data-v-d131e64e]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-d131e64e]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-d131e64e]{padding:7px}.widget-head-cell-order-icon[data-v-d131e64e]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-d131e64e]{transform:rotate(180deg)}.widget-filter-item-container[data-v-43ed0322]{position:relative}.widget-filter-item-arrow[data-v-43ed0322]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-43ed0322]{font-weight:700}.widget-filter-item[data-v-43ed0322]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item[data-v-43ed0322]:not(.widget-filter-item_active){opacity:.6}.widget-filter-item-label[data-v-43ed0322]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-43ed0322]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0;box-shadow:0 2px 2px #00000040;background-color:#fff}.widget-filter-item-arrow[data-v-43ed0322]{transition:.2s}.widget-table-search[data-v-b712f344]{gap:5px;padding:0 10px 0 12px}.widget-table-search-icon[data-v-b712f344]{align-self:center}.widget-table-search-input[data-v-b712f344]{outline:none;background-color:transparent;border:0;padding:6px 5px;font-size:16px}.widget-table-panel-filter[data-v-8f09ec8d]{justify-content:space-between;background-color:var(--color-primary)}.widget-fast-table[data-v-a946181d]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:max-content minmax(0,1fr);gap:15px}.widget-fast-table-body[data-v-a946181d]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:max-content minmax(0,1fr)}.widget-fast-table-head[data-v-a946181d]{display:grid;gap:15px}.main-table[data-v-a946181d]{overflow:auto}.version-item[data-v-66cf2326]{display:grid;gap:2px 10px;grid-template-rows:max-content;grid-template-columns:min-content minmax(100px,200px) 1fr 1fr}.version-item-date[data-v-66cf2326]{white-space:nowrap}.line-clamp_5[data-v-66cf2326]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.history-header[data-v-cc723f37]{align-items:center;position:sticky;top:0;background-color:#fff;grid-template-rows:max-content;grid-template-columns:20px 210px 1fr 1fr}.container-history[data-v-cc723f37]{display:flex;flex-direction:column-reverse;overflow:auto}.wrap-modal-version-history[data-v-cc723f37]{min-height:380px}@media screen and (min-width: 756px){.wrap-modal-version-history[data-v-cc723f37]{min-width:800px;max-width:1000px}}.wrap-history[data-v-cc723f37]{height:100%;overflow:auto}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.justify-content-center{justify-content:center}.user-select-none{-webkit-user-select:none;user-select:none}.flex{display:flex}.flex_column,.flex-column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow,.flex-grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_center,.text-center{text-align:center}.text_bold,.text-bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color-light{color:var(--color-light)}.color-primary{color:var(--color-primary)}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.transition-fast{transition:.1s}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.gap-25{gap:25px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number,.widget-table-cell_money{text-align:end}.widget-list-cell-history{cursor:pointer}.widget-list-cell-history>span{color:var(--color-primary);font-size:16px;padding:0 10px}.widget-table-cell_multi-select>.container-input-wrap{align-items:center}.overflow_auto,.overflow-auto{overflow:auto}.overflow_hidden,.overflow-hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.padding-5{padding:5px}.padding-0{padding:0}.padding-15{padding:15px}.padding-20{padding:20px}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.flex,.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-flex-align-center{align-items:center}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.gap-10{gap:10px}.gap-15{gap:15px}.gap-5{gap:5px}.gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.padding-bottom-10{padding-bottom:10px}.padding-10{padding:10px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.widget-table__head-cell[data-v-aa18d6fa]{padding:18px;text-align:start}.widget-table__head-label[data-v-aa18d6fa]{font-weight:600;font-size:14px;line-height:19px}.widget-filter-text[data-v-f6da3bed]{padding:20px 10px}.widget-filter-enum[data-v-4c82f6e7]{padding:3px 0;max-height:400px;max-width:340px;min-width:180px;overflow:hidden auto}.widget-filter-enum-item[data-v-4c82f6e7]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-4c82f6e7]:hover{background-color:#f1f1f1}.widget-filter-number[data-v-f9cd559e]{padding:4px 6px}[dir=rtl] .icon[data-v-8a72b45f]{transform:scaleX(-1)}.widget-spinner[data-v-0ef9ae88],.widget-spinner[data-v-0ef9ae88]:after{border-radius:50%;width:14px;height:14px}.widget-spinner[data-v-0ef9ae88]{font-size:2px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;transform:translateZ(0);animation:spinnerAnimation-0ef9ae88 1.1s infinite linear}@keyframes spinnerAnimation-0ef9ae88{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-button[data-v-450dc564]{position:relative}.widget-button-spinner[data-v-450dc564]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.widget-multi-button-wrap[data-v-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{grid-template-columns:1fr var(--button-size);background-color:var(--primary);grid-template-rows:var(--button-size);transition:var(--fast)}.widget-multi-button_active[data-v-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]:hover{background-color:#223296}tr[data-v-344a8cc1]{border:1px solid #F3F4FC;height:30px}th[data-v-344a8cc1],td[data-v-344a8cc1]{position:relative;padding:0 11px}th[data-v-344a8cc1]{text-align:left}p[data-v-344a8cc1]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-ccffc6bd]{position:sticky;top:-1px;z-index:1}.test-block[data-v-ccffc6bd]{position:absolute;z-index:2;display:none;height:calc(100% + 1px);place-content:center;inset-block-start:-1px;padding-inline:10px;background-color:#e7f2ff;-webkit-user-select:none;user-select:none;white-space:nowrap}.widget-list-head th[data-v-ccffc6bd]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}.widget-head-cell[data-v-d131e64e]{display:flex;gap:4px}.widget-head-cell-order[data-v-d131e64e]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-d131e64e]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-d131e64e]{padding:7px}.widget-head-cell-order-icon[data-v-d131e64e]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-d131e64e]{transform:rotate(180deg)}.widget-filter-item-container[data-v-43ed0322]{position:relative}.widget-filter-item-arrow[data-v-43ed0322]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-43ed0322]{font-weight:700}.widget-filter-item[data-v-43ed0322]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item[data-v-43ed0322]:not(.widget-filter-item_active){opacity:.6}.widget-filter-item-label[data-v-43ed0322]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-43ed0322]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0;box-shadow:0 2px 2px #00000040;background-color:#fff}.widget-filter-item-arrow[data-v-43ed0322]{transition:.2s}.widget-table-search[data-v-b712f344]{gap:5px;padding:0 10px 0 12px}.widget-table-search-icon[data-v-b712f344]{align-self:center}.widget-table-search-input[data-v-b712f344]{outline:none;background-color:transparent;border:0;padding:6px 5px;font-size:16px}.widget-table-panel-filter[data-v-8f09ec8d]{justify-content:space-between;background-color:var(--color-primary)}.widget-fast-table[data-v-49d95223]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:max-content minmax(0,1fr);gap:15px}.widget-fast-table-body[data-v-49d95223]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:max-content minmax(0,1fr)}.widget-fast-table-head[data-v-49d95223]{display:grid;gap:15px}.main-table[data-v-49d95223]{overflow:auto}.version-item[data-v-66cf2326]{display:grid;gap:2px 10px;grid-template-rows:max-content;grid-template-columns:min-content minmax(100px,200px) 1fr 1fr}.version-item-date[data-v-66cf2326]{white-space:nowrap}.line-clamp_5[data-v-66cf2326]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.history-header[data-v-cc723f37]{align-items:center;position:sticky;top:0;background-color:#fff;grid-template-rows:max-content;grid-template-columns:20px 210px 1fr 1fr}.container-history[data-v-cc723f37]{display:flex;flex-direction:column-reverse;overflow:auto}.wrap-modal-version-history[data-v-cc723f37]{min-height:380px}@media screen and (min-width: 756px){.wrap-modal-version-history[data-v-cc723f37]{min-width:800px;max-width:1000px}}.wrap-history[data-v-cc723f37]{height:100%;overflow:auto}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";var Nt=e=>{throw TypeError(e)};var Rt=(e,t,n)=>t.has(e)||Nt("Cannot "+n);var Be=(e,t,n)=>(Rt(e,t,"read from private field"),n?n.call(e):t.get(e)),Ve=(e,t,n)=>t.has(e)?Nt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,o)=>(Rt(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);/*!
3
- * eservices-core v1.3.347
3
+ * eservices-core v1.3.348
4
4
  * (c) 2025 ESERVICES
5
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),R=require("jenesius-vue-form"),de=require("vue-router"),Mn=require("date-and-time"),Ke=require("debug"),U=require("jenesius-vue-modal"),x=class x extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=x.ID++}static ParentFormNotFound(){return new x("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new x("Composite object name is undefined",t)}static EntityWithoutName(t){return new x("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new x(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new x("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new x("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new x(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return x.ApiNotAvailable()}static ApiError(t){return new x("Request error",t)}static ApiNotAvailable(){return new x(`Sorry, we experience difficulties here.
6
- Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?x.ApiNotAvailable():new x(t||"Authorization Error",n)}static ApiResponseParseFailed(){return x.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new x("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new x(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new x("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new x("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new x(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new x(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,o){return new x(`Array already includes the element with value ${t}`,{array:n,table:o})}static MetadataEntityIsNotAvailable(t){return new x(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new x("The request took too long to complete. Try again later.")}};x.ID=0;let ae=x;const jn="Please try again later or submit a feedback if problem doesn't go.";function Un(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return jn}})}function ve(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw ae.ApiNotAvailable()}).then(n=>Un(n).then(o=>{if(!n.ok)throw o;return o}))}class Wn{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,o)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),t[n]=o,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}new Wn;class Hn{static invite(t,n,o){return ve("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:o})})}static accept(t,n){return ve("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return ve("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class qn{static getRequiredDocuments(t,n,o){const a=new URLSearchParams({entity:t,primaryKey:n,statusCode:o});return fetch(`/close-api/views/required-documents?${a.toString()}`).then(i=>i.json())}}class ye{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${ye.url()}/calculator/${t}`)}static calculate(t,n){return ve(`/${ye.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):ae.ApiNotAvailable()})}static parseMetadataField(t){function n(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return ve(`/${ye.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return ve(`/${ye.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}const Gn={class:"widget-table__head-cell"},zn={key:1,class:"widget-table__head-label margin_0 text_overflow"},Ht=r.defineComponent({__name:"widget-table-head-cell",props:{label:{},type:{}},emits:["select"],setup(e,{emit:t}){const n=t;function o(){n("select")}return(a,i)=>(r.openBlock(),r.createElementBlock("th",Gn,[a.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,onClick:o})):(r.openBlock(),r.createElementBlock("span",zn,r.toDisplayString(a.label),1))]))}}),Kn={class:"widget-table__head"},Yn=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>Ht),(t,n)=>(r.openBlock(),r.createElementBlock("tr",Kn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.config,o=>r.renderSlot(t.$slots,"default",r.mergeProps({ref_for:!0},o),void 0,!0)),256))]))}}),M=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Xn=M(Yn,[["__scopeId","data-v-aa18d6fa"]]);function lt(e){return Array.isArray(e)?lt(e[0]):typeof e!="string"?null:e}function oe(e){return lt(e.name)}function Jn(e){const t=new RegExp(/\$\{([a-zA-Z0-9_.]+)}/,"g"),n=[];let o;for(;(o=t.exec(e))!==null;)n.push(o[1]);return n}function Qn(e,t){return Jn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),R.utils.getPropFromObject(t,o))}),e}function et(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function Oe(e,t){const n=oe(e);if(typeof e.value=="string")return Qn(e.value,t);let o=n?R.utils.getPropFromObject(t,n):null;if(o===void 0&&(o=null),typeof e.value=="function")return e.value(o,t);if(e.value===null)return null;switch(e.unitValue&&(o=et(e.unitValue)(o)),e.unit&&(o=et(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=We(typeof o=="string"?o:null);break}case"TimeSpan":{const a=o==null?void 0:o.match(/((\d+).)?(\d+:\d+:\d+)/);a&&(o=`${a[2]||0} D ${a[3]}`);break}case"dateTime":case"dateWithTime":{o=mt(typeof o=="string"?o:null);break}case"money":{o=an(o);break}case"DateTime":{o=We(typeof o=="string"?o:null,e.format||I.dateTimeFormat);break}}return e.formatter&&(o=_e(e.formatter).exec(o,t)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const Zn=1,er=5e3,tr="static-folder",qt="request-error",Gt="EntityTypeName",nr="REFERENCE_CHANGES",S={LIST_ACTIVE_NEW:-1,DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:4e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",PROVIDE_ENTITY_NAME:"provide-entity-name",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",MODAL_SIMPLE_TOOL_PARAMETERS:"SimpleToolParameters",MODAL_BATCH_VALUES:"batch-values",MODAL_ENTITY:"form-entity",MODAL_HISTORY:"entity-history",TIME_TO_LIVE_SOCKET_REQUEST:45e3,CORE_DEBUG_LABEL:"eservices-core",VISIBLE_ITEM_PROVIDE_NAME:"visible-item-provider",EVENT_FORM_UPDATE:"form-update",EVENT_AFFECTED_ENTITY:"affected-entity",DEFAULT_ORDER_DIR:"asc",TABLE_MOCK_FIELD:"_A_MOCK_ID_FIELD",OBJECT_TYPE_NAME_FIELD:Gt,FIELD_NAME_REFERENCE_CHANGES:nr,PATH_RESOLVER_ENTITY:"resolver",TOOL_PRINT_NAME:"Print"};function Ye(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const rr={class:"widget-filter-text flex-column gap_10"},or={class:"flex gap_20"},ar=r.defineComponent({__name:"widget-filter-text",props:{values:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,a=new R.Form({parent:!1}),i={begin:"Begin with",end:"End with",include:"Contains"};function l(u="",f="include"){return{text:u,option:f}}r.onMounted(()=>{const u=n.values?typeof n.values=="string"?l(n.values):n.values:l();a.setValues(u)});function c(){o("update:values",a.values)}function s(){o("clear")}return r.watch(()=>n.values,u=>a.setValues(u||l()),{immediate:!0}),(u,f)=>{const d=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",rr,[r.createElementVNode("div",or,[r.createVNode(r.unref(R.FormField),{name:"text",type:"text",label:"Search"})]),r.createVNode(r.unref(R.FormField),{name:"option",type:"radio",options:i}),r.createElementVNode("div",null,[r.createVNode(d,{onClick:c,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(q)("Apply")),1)]),_:1}),r.createVNode(d,{onClick:s},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(q)("Clear")),1)]),_:1})])])}}}),ir=M(ar,[["__scopeId","data-v-f6da3bed"]]),sr={class:"widget-filter-enum"},lr={class:"flex gap-10 padding-10"},cr=r.defineComponent({__name:"widget-filter-entity",props:{baseEntity:{},filters:{},values:{},filterMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=r.ref([]),a=Fe(n.filterMetadata.entity),i=f=>(n.values||[]).includes(f),l=t;function c(f){const d=n.values||[];return d.includes(f)?l("update:values",d.filter(b=>b!==f)):l("update:values",[...d,f])}const s=ie(async()=>{o.value=await fe(n.baseEntity,{fields:n.filterMetadata.name.join(" "),order:[n.filterMetadata.name[1],"asc"],distinct:!0,filter:N(n.filters)}).then(f=>f.map(d=>({label:d[n.filterMetadata.name[1]],value:d[n.filterMetadata.name[0]]})))});function u(){l("update:values",[])}return r.watch(()=>s.loading,f=>{l("readProcess",f?"start":"end")},{immediate:!0}),r.watch(()=>a.value,()=>{s.loading||s.call()},{immediate:!0}),(f,d)=>{const b=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",sr,[r.createElementVNode("div",lr,[r.createVNode(b,{label:"Reload filter",loading:r.unref(s).loading||!1,icon:"reload",onClick:d[0]||(d[0]=()=>r.unref(s).call())},null,8,["loading"]),r.createVNode(b,{label:"Clear",onClick:u})]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,m=>(r.openBlock(),r.createBlock(r.unref(R.FormField),{class:"widget-filter-enum-item",key:m.value,onClick:()=>c(m.value),type:"single-checkbox","model-value":i(m.value),label:m.label},null,8,["onClick","model-value","label"]))),128))])}}}),ur=M(cr,[["__scopeId","data-v-4c82f6e7"]]),Se=r.reactive({});function dr(){Ot(),setInterval(Ot,50)}function zt(){return Se}function Ot(){const e={};Object.entries(localStorage).forEach(([t,n])=>{e[t]=!0,Se[t]!==n&&(Se[t]=n)}),Object.keys(Se).forEach(t=>{e[t]||delete Se[t]})}const fr={class:"widget-filter-number flex-column es-gap-10"},pr={class:"flex es-gap-10"},mr={class:"flex gap-10"},gr=r.defineComponent({__name:"widget-filter-number",props:{baseEntity:{},values:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=t,a=new R.Form({parent:!1}),i=sn(()=>{const c=a.getValueByName("min"),s=a.getValueByName("max");return o("update:values",{min:c,max:s})},800);a.onvalue(i),r.watch(()=>n.values,()=>{n.values&&a.setValues(n.values)},{immediate:!0});function l(){a.cleanValues()}return(c,s)=>{const u=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",fr,[r.createElementVNode("div",pr,[r.createVNode(r.unref(R.FormField),{name:"min",label:"More than",type:"number"}),r.createVNode(r.unref(R.FormField),{name:"max",label:"Less than",type:"number"})]),r.createElementVNode("div",mr,[r.createVNode(u,{label:"Clear",onClick:l})])])}}}),Lt=M(gr,[["__scopeId","data-v-f9cd559e"]]),I={getEntityLink(e,t){return`/forms/${e}/${t}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:ir,Entity:ur,Decimal:Lt,Integer:Lt},arrayListCellHandlers:[],arrayListRowHandlers:[],arrayFieldParamsHandlers:[]};function hr(e){dr();for(let t in e)I[t]=e[t]}const yr={props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>r.h(I.iconTag,{class:I.iconHandler?I.iconHandler(n):`icon icon-${n}`},I.iconHandlerText(n))}},Ee=M(yr,[["__scopeId","data-v-8a72b45f"]]),vr=Ke(Ye("setup-list-row"));function wr(e,t){const n=e.config.map(o=>br(o,e,t));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function br(e,t,n){const o=t.values;let a=Oe(e,o);Array.isArray(a)&&(a=a.join(", "));const i={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(f){i.onClick.push(()=>f(o,e,n))}function c(f){Array.isArray(f)?i.class.push(...f):i.class.push(f)}const s=[],u=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(r.h(R.FormField,{type:"single-checkbox",modelValue:t.selected})),l(Ft.bind(null,n,!0));break}case"select":{u.push(r.h(R.FormField,{type:"single-radio",modelValue:t.selected})),l(Ft.bind(null,n,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const f=e.link(o);if(f){const d=r.h(de.RouterLink,{to:f});u.push(d),c("widget-table-cell_link")}}catch(f){vr("Can't add router link",f)}if(e.href&&(u.push(r.h("a",{href:e.href(o),target:"_blank"})),c("widget-table-cell_link")),(typeof a=="string"||typeof a=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},a)),e.icon&&(typeof e.icon=="string"&&u.push(r.h(Ee,{name:e.icon})),typeof e.icon=="function")){const f=e.icon(o);f!==null&&u.push(r.h(Ee,{name:f}))}return e.class&&(typeof e.class=="function"?c(e.class(o)):c(e.class)),I.listCellHandler&&(console.log("listCellHandler is deprecated. Please use coreUtils.addListCellHandler instead."),I.listCellHandler(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),I.arrayListCellHandlers&&I.arrayListCellHandlers.forEach(f=>f(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),s.push(r.h("td",i,u)),s}function Ft(e,t){e.emit("select",t)}function ct(e,t){return()=>{try{return wr(e,t)}catch(n){return console.warn(n),null}}}const Er={props:{values:Object,config:Object,selected:Boolean},setup:ct},_r=["colspan"],xt=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=t,o=r.ref();return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(a,i)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:a.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.component),r.mergeProps(a.$attrs,{values:a.values,new:a.isNew,onClose:i[0]||(i[0]=l=>n("close")),onSave:i[1]||(i[1]=l=>n("save",l))}),null,16,["values","new"]))],8,_r)],512))}}),Qe="update:selectedRows",kr="update:activeRow",Kt=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},rowOptionsHandler:{type:Function,default:()=>({})}},emits:["save","order"],setup(e,{emit:t}){const n=e,o=r.ref(),a=t,i=r.useSlots(),l=r.computed(()=>{var m;return(m=i==null?void 0:i.default)==null?void 0:m.call(i)[0]});function c(){const h=n.selectedRows.length!==0?[]:[...n.array];a(Qe,h)}function s(m,h=!0){if(!n.selectedRows)return;if(!h)return a(Qe,n.selectedRows.includes(m)?[]:[m]);const g=[...n.selectedRows],v=g.indexOf(m);return v===-1?g.push(m):g.splice(v,1),a(Qe,g)}function u(m){a(kr,m)}function f(m){a("save",m),a("update:activeRow",null)}const d=r.computed(()=>{const m=n.config.filter(h=>h.visible!==!1);return n.shortcut?m.filter(h=>h.name?!!n.array.find(g=>![null,""].includes(Oe(h,g))):!0):m});r.watch(()=>n.activeRow,(m,h)=>{m===null&&typeof h=="number"&&setTimeout(()=>{if(!o.value)return;const g=o.value.querySelector(`tbody>tr:nth-child(${h+1})`)||o.value;g&&g.scrollIntoView({block:"center",behavior:"smooth"})},100)});function b(m){var g;const h={};return(g=I.arrayListRowHandlers)==null||g.forEach(v=>{try{Object.assign(h,v(m,n.rowOptionsHandler()))}catch{console.warn("Problem with arrayListRowHandler.")}}),h}return(m,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",{class:"widget-table",ref_key:"refTable",ref:o},[r.createElementVNode("thead",null,[r.createVNode(Xn,{config:d.value,onOrder:h[0]||(h[0]=g=>m.$emit("order",g))},{default:r.withCtx(g=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.$slots["head-cell"]||Ht),r.mergeProps(g,{onSelect:c}),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.array,(g,v)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:v},[r.createVNode(Er,r.mergeProps({test:v,config:d.value,values:g,selected:m.selectedRows.includes(g),onSelect:_=>s(g,_),onActivate:_=>u(v),class:m.classCallback?m.classCallback(g,v):"",ref_for:!0},b(g)),null,16,["test","config","values","selected","onSelect","onActivate","class"]),l.value&&m.activeRow===v?(r.openBlock(),r.createBlock(xt,{key:0,component:l.value,"row-length":m.config.length,values:g,onClose:h[1]||(h[1]=_=>a("update:activeRow",null)),onSave:f,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),m.activeRow===r.unref(S).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(xt,{key:0,component:l.value,"row-length":d.value.length,onClose:h[2]||(h[2]=g=>a("update:activeRow",null)),onSave:f,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],512),r.renderSlot(m.$slots,"footer")]))}}),Cr=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),Le=M(Cr,[["__scopeId","data-v-0ef9ae88"]]),Tr={class:"widget-button"},Sr=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("button",Tr,[t.wait?(r.openBlock(),r.createBlock(Le,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),Ar=M(Sr,[["__scopeId","data-v-450dc564"]]),Ir={class:"widget-multi-button-wrap position_relative cursor_pointer"},Nr={class:"widget-multi-button-body grid"},Rr=["onClick"],Or={class:"widget-multi-button-side-wrap"},Lr=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(l=>({"04895bf1":o.value}));const t=e,n=r.reactive({active:!1,wait:!1}),o=r.computed(()=>t.array.length+(t.label?1:0));function a(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function i(l=!n.active){n.active=l}return(l,c)=>(r.openBlock(),r.createElementBlock("div",Ir,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Nr,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>i())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,u)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:f=>{a(s.callback),i(!1)}},r.toDisplayString(s.label),9,Rr))),128))]),r.createElementVNode("div",Or,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>i())},[n.wait?(r.openBlock(),r.createBlock(r.unref(Le),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(Ee),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),Fr=M(Lr,[["__scopeId","data-v-d43a76ce"]]),xr={class:"widget-loader flex flex-align_center gap_10 padding_15"},Br={class:"text_md"},Xe=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",xr,[r.createVNode(Le,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",Br,r.toDisplayString(t.label),1)]))}}),Vr=["alt","src"],$r=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=r.ref();return r.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(o,a)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:n,src:o.src||o.$props.default},null,8,Vr))}}),Dr={props:{config:Array,values:Object,selected:Boolean},setup:ct},Pr=M(Dr,[["__scopeId","data-v-344a8cc1"]]),Mr=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),jr={class:"widget-list-head-cell"},Ur=Mr(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Wr=r.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e,o=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(a,i)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",jr,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":a.minWidth,"max-width":a.maxWidth,width:a.width})},[a.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,type:"single-checkbox",onClick:i[0]||(i[0]=r.withModifiers(l=>o("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:i[1]||(i[1]=l=>o("order"))},r.toDisplayString(a.title||a.label),1))],4),a.name&&a.order.length&&a.order[0]===a.name?(r.openBlock(),r.createBlock(r.unref(Ee),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":a.order.length>1&&a.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),Ur])]))}}),Hr=M(Wr,[["__scopeId","data-v-bf495d6a"]]),qr=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(),i=r.ref();r.onMounted(()=>{function u(h,g){let v=-1;do v++,g-=h[v];while(g>0&&v<h.length);return v}function f(h,g){let v=0;for(;g>0&&g>h[v]&&v<h.length;)g-=h[v],v++;return console.log(g,v),v>0?v:0}function d(h){try{i.value.style.insetInlineStart=h+"px"}catch(g){console.log(g)}}function b(h){try{i.value.style.width=h+"px",i.value.style.minWidth=h+"px",i.value.style.maxWidth=h+"px"}catch(g){console.log(g)}}function m(h){return h===null?!1:h.classList.contains("head-cell-resize")}a.value.addEventListener("pointerdown",function(g){var xe;function v(W){return W.screenX+w-T}const _=a.value,p=[..._.children].filter(W=>W.localName==="th"),w=((xe=_.offsetParent)==null?void 0:xe.scrollLeft)||0,y=p.map(W=>W.clientWidth),C=m(g.target),T=_.getBoundingClientRect().left,E=v(g),k=u(y,E),O=y.slice(0,k).reduce((W,G)=>W+G,0),V=E-O,P=_.offsetWidth,ee=p[k].clientWidth;if(n.config[k].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",y),console.log("max width",P),console.log("Start Position",E),console.log("Position From",k),console.log("Start Position",k),console.log("Global offset (Отступ самой таблицы от края экрана)",T),console.log("Del",V),console.groupEnd(),i.value.innerText=p[k].textContent||"",i.value.style.display="grid",i.value.style.width=ee+"px",i.value.style.cursor="grabbing",d(O),b(ee),document.addEventListener("pointermove",ne,{passive:!0}),document.addEventListener("pointerup",F);function F(W){if(console.group("END"),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",F),C&&(n.config[k].width=i.value.style.width,n.config[k].minWidth=i.value.style.width,n.config[k].maxWidth=i.value.style.width,l(n.config)),!C){const G=W.screenX+w-T;console.log("ENP Position",G);const me=f(y,G);if(console.log(k,"->",me),me!==k){const se=n.config[k],ge=n.config;ge.splice(k,1),ge.splice(me,0,se),l(ge)}else{const se=n.config[k].name;c(se)}}i.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function ne(W){if(C){const se=v(W)-E+ee;b(se);return}let G=W.screenX+w-T-V;G<0&&(G=0),G+ee>P&&(G=P-ee),d(G)}})});function l(u){o("update:config",u)}function c(u){if(!u)return;if(Array.isArray(u)){if(u.length<1)return;u=u[0]}if(n.order.length===0||n.order[0]!==u)return void s([u]);const f=n.order.length===1||n.order[1]==="asc"?"asc":"desc";s([u,f==="asc"?"desc":"asc"])}function s(u){o("update:order",u)}return(u,f)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:a},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.config,(d,b)=>(r.openBlock(),r.createBlock(Hr,r.mergeProps({key:d,ref_for:!0},d,{onOrder:m=>c(d.name),onSelect:f[0]||(f[0]=m=>o("select")),order:u.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:i},"test",512)],512))}}),Gr=M(qr,[["__scopeId","data-v-ccffc6bd"]]),zr={class:"widget-list"},Kr={class:"widget-list-body position_relative"},Yr=50,Xr=r.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e,o=t;function a(s,u=!0){if(n.selectedRows)if(!u)l(n.selectedRows.includes(s)?[]:[s]);else{const f=[...n.selectedRows],d=f.indexOf(s);d===-1?f.push(s):f==null||f.splice(d,1),l(f)}}function i(){var s;if(((s=n.selectedRows)==null?void 0:s.length)!==n.array.length)return l([...n.array]);l([])}function l(s){o("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+Yr>u.scrollHeight&&o("scrollEnd")}return(s,u)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",zr,[r.createElementVNode("thead",null,[r.createVNode(Gr,{onSelect:u[0]||(u[0]=f=>i()),"onUpdate:order":u[1]||(u[1]=f=>o("update:order",f)),"onUpdate:config":u[2]||(u[2]=f=>o("update:config",f)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",Kr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(f,d)=>{var b;return r.openBlock(),r.createBlock(Pr,{key:d,class:"widget-list-row",values:f,config:s.config,selected:(b=s.selectedRows)==null?void 0:b.includes(f),onSelect:m=>a(f,m)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function ut(){var i;const e=r.computed(()=>Object.keys(n).length===0||Object.values(n).includes(!0)),t=(i=r.getCurrentInstance())==null?void 0:i.uid;if(!t)throw"Undefined instance. Please check it.";const n=r.reactive({});r.provide(S.VISIBLE_ITEM_PROVIDE_NAME,{show(l){n[l]=!0},hide(l){n[l]=!1},remove(l){delete n[l]}});const o=r.inject(S.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(t)},hide(){o==null||o.hide(t)},remove(){o==null||o.remove(t)}},visibleItems:n}}function Yt(e){const t={name:e,entity:r.inject(S.PROVIDE_ENTITY_NAME)};if(!t.name)throw new Error("Field without name try use metadata.");const n=r.ref(!1),o=r.ref(null);return e.split(".").reduce((a,i,l,c)=>l===c.length-1?a:a.then(()=>{var u,f;const s=(f=(u=o.value)==null?void 0:u.fieldsByName[i])==null?void 0:f.referencedEntity;if(!s)throw new Error("---");return Z.initEntity(s).then(()=>s)}).then(s=>{o.value=Z.get(s),t.entity=s,t.name=c[l+1]}),Promise.resolve().then(()=>Z.initEntity(t.entity)).then(()=>{o.value=Z.get(t.entity)})).finally(()=>n.value=!0),r.computed(()=>{if(!n.value||!o.value)return;const a=o.value.fieldsByName[t.name];if(a)return a})}const Jr=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{},usageContext:{type:Boolean,default:!0}},setup(e){const t=e,n=R.Form.getParentForm();Fe();const o=_t(),a=r.computed(()=>{var h,g,v;const d=c.value,b=s(d),m={type:b,disabled:t.usageContext?!((h=l.value)!=null&&h.canSet):!1,label:t.label};return b==="Decimal"&&((v=(g=d==null?void 0:d.presentationType)==null?void 0:g.toLowerCase)==null?void 0:v.call(g))==="money"&&(m.money=!0),d&&Object.assign(m,{suffix:d.valueUnit||void 0,label:t.label||d.displayName}),Array.isArray(I.arrayFieldParamsHandlers)&&I.arrayFieldParamsHandlers.forEach(_=>Object.assign(m,_(d,l.value,m,n,t.name))),m}),i=["MultiText","MultiWideText"],l=r.computed(()=>{var d;return(d=o==null?void 0:o.value)==null?void 0:d.fields[t.name]}),c=Yt(t.name);function s(d){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(d){if(d.type==="Reference"||d.type==="Owned")return d.referencedEntity;if(d.dataType==="Boolean")return"single-checkbox";if(d.dataType==="DateTime")return"date";if(d.dataType==="Integer"||d.dataType==="Decimal")return"number";if(d.dataType==="List")return d.aggregatedEntity;if(i.includes(d.presentationType))return"textarea";if(d.presentationType==="PhoneNumber")return"tel"}return"text"}const u=r.computed(()=>{var d;return t.usageContext?((d=l.value)==null?void 0:d.canGet)===!0:!0}),{controller:f}=ut();return r.watch(()=>u.value,d=>d?f.show():f.hide(),{immediate:!0}),r.onUnmounted(()=>f.remove()),(d,b)=>u.value?(r.openBlock(),r.createBlock(r.unref(R.FormField),r.mergeProps({key:0},{...d.$attrs,...a.value},{name:d.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function Qr(e){return Array.isArray(e)&&(e==null?void 0:e[1])||S.DEFAULT_ORDER_DIR}const Zr=["fill"],eo=r.createElementVNode("path",{d:"M440-647 244-451q-12 12-28 11.5T188-452q-11-12-11.5-28t11.5-28l264-264q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l264 264q11 11 11 27.5T772-452q-12 12-28.5 12T715-452L520-647v447q0 17-11.5 28.5T480-160q-17 0-28.5-11.5T440-200v-447Z"},null,-1),to=[eo],no=r.defineComponent({__name:"widget-icon-arrow-up",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},to,8,Zr))}}),ro={class:"widget-fast-table-head-cell-td"},oo={key:1,class:"widget-head-cell-label"},ao={key:2,class:"widget-head-cell-order"},io=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{},type:{},isFullSelected:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=r.computed(()=>lt(n.name));r.computed(()=>Qr(n.order));const a=t;function i(){a("select")}return(l,c)=>{var s;return r.openBlock(),r.createElementBlock("td",ro,[r.createElementVNode("div",{class:r.normalizeClass(["widget-head-cell",[l.type==="multi-select"?"justify-content-center":""]]),onClick:c[0]||(c[0]=u=>l.$emit("order",l.name))},[l.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,"model-value":l.isFullSelected,onClick:i,type:"single-checkbox"},null,8,["model-value"])):(r.openBlock(),r.createElementBlock("span",oo,r.toDisplayString(l.label),1)),o.value===((s=l.order)==null?void 0:s[0])?(r.openBlock(),r.createElementBlock("div",ao,[r.createVNode(no,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${l.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)],2)])}}}),Xt=M(io,[["__scopeId","data-v-d131e64e"]]),so=["fill"],lo=r.createElementVNode("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"},null,-1),co=[lo],uo=r.defineComponent({__name:"widget-icon-keyboard-arrow-down",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},co,8,so))}}),fo={class:"widget-filter-item-popup"},po=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filters:{},filterItem:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,a=I.tableFilterEntityBind,i=r.ref(),l=r.computed(()=>{const m=n.filterItem;return m.entity?"Entity":m.type?m.type:null});function c(m){s.value=m==="start"}const s=r.ref(!1),u=r.computed(()=>Array.isArray(n.values)||typeof n.values=="string"?n.values.length>0:!!n.values),f=r.ref(!1);let d=null;function b(m=!f.value){f.value=m,!f.value&&d?(d(),d=null):i.value&&(d=R.utils.clickOutside(i.value,b.bind(null,!1)))}return(m,h)=>{var g;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:i},[r.createElementVNode("div",{class:r.normalizeClass(["widget-filter-item",{"widget-filter-item_active":u.value}]),onClick:h[0]||(h[0]=()=>b())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":u.value}])},r.toDisplayString(m.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(Le,{key:0})):(r.openBlock(),r.createBlock(uo,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":f.value})},null,8,["class"]))],2),r.withDirectives(r.createElementVNode("div",fo,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((g=r.unref(a))==null?void 0:g[l.value]),{key:0,"filter-metadata":m.filterItem,values:m.values,filters:m.filters,"base-entity":m.entity,onClear:h[1]||(h[1]=v=>o("clear")),"onUpdate:values":h[2]||(h[2]=v=>o("update:values",v)),onReadProcess:c},null,40,["filter-metadata","values","filters","base-entity"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Jt=M(po,[["__scopeId","data-v-43ed0322"]]),mo={class:"widget-table-search flex"},go=["value","placeholder"],ho=r.defineComponent({__name:"widget-table-search",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(a){const i=a.target;if(!i)return;const l=i.value;n("update:modelValue",l)}return(a,i)=>(r.openBlock(),r.createElementBlock("div",mo,[r.createVNode(Ee,{class:"widget-table-search-icon"},{default:r.withCtx(()=>[r.createTextVNode("search")]),_:1}),r.createElementVNode("input",{class:"widget-table-search-input",type:"text",alt:"Searching for data in a table",value:a.modelValue,onInput:o,placeholder:r.unref(q)("Filter by random text")},null,40,go)]))}}),yo=M(ho,[["__scopeId","data-v-b712f344"]]),vo={class:"widget-table-panel-filter flex"},wo={class:"flex"},bo=r.defineComponent({__name:"widget-table-panel-filters",props:{filtersConfig:{},filters:{},entity:{},search:{}},emits:["update:filters","update:search"],setup(e,{emit:t}){const n=e,o=t;function a(l,c){o("update:filters",{...n.filters,[l]:c})}function i(l){const c={...n.filters};delete c[l],o("update:filters",c)}return(l,c)=>(r.openBlock(),r.createElementBlock("div",vo,[r.createVNode(yo,{"model-value":l.search,"onUpdate:modelValue":c[0]||(c[0]=s=>o("update:search",s))},null,8,["model-value"]),r.createElementVNode("div",wo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.filtersConfig,(s,u)=>{var f;return r.openBlock(),r.createBlock(Jt,{key:u,entity:l.entity,"filter-item":s,values:(f=l.filters)==null?void 0:f[r.unref(oe)(s)],filters:l.filters,"onUpdate:values":d=>a(r.unref(oe)(s),d),onClear:d=>i(r.unref(oe)(s))},null,8,["entity","filter-item","values","filters","onUpdate:values","onClear"])}),128))])]))}}),Eo=M(bo,[["__scopeId","data-v-8f09ec8d"]]);function Qt(e,t){const n=document.createElement("a");n.href=e,t!=null&&t.blank&&(n.target="_blank"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{n.remove()},100)}function Zt(e,t){return L().emit("batch:delete",{...t,entity:e})}const _o={class:"widget-fast-table-tools flex gap-15"},ko=r.defineComponent({__name:"widget-fast-table-tools",props:{tools:{},loading:{type:Boolean},selectedRows:{},metadata:{},canCreate:{type:Boolean},canDelete:{type:Boolean},externalTools:{}},emits:["reload","export","new"],setup(e,{emit:t}){const n=e,o=de.useRouter(),a=t,i=[{name:"export",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:g=>a("export",g)},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>a("reload")},{name:"new",label:"Add New",icon:"new",buttonStyle:"primary",callback:()=>a("new")}],l=r.inject(S.PROVIDE_NAME_ACTIONS,null),c=r.computed(()=>(Array.isArray(n.tools)?n.tools:[]).reduce((g,v)=>(v.name==="*"?g.push(...i.map(_=>({..._,system:!0}))):g.push(v),g),[]));function s(g){return i.find(v=>v.name===g.name)}function u(g){return{...g,label:g.label||"Batch delete",callback:async()=>{const v=n.metadata,_=v.name,p=n.selectedRows||[];if(n.selectedRows.length===0)return Ie.add("error","Kindly select at least one record to delete");if(!await U.promptModal(S.MODAL_CONFIRM,{message:`Confirm deletion of ${n.selectedRows.length} entries.`}))return;const y=qe(_),C=p.map(T=>({primaryKey:T[y],version:v.versioned?T.Version:void 0}));await Zt(_,{elements:C}).then(T=>{T.forEach(E=>{E.type==="reject"&&D("error")(E.data)})}).catch(D("error")),a("reload")}}}function f(g){return{...g,label:g.label||"Batch update",callback:async()=>{const v=n.metadata,_=v.name,p=n.selectedRows||[];if(n.selectedRows.length===0)return Ie.add("error","Kindly select at least one record to update");const w=await U.promptModal(S.MODAL_BATCH_VALUES,{entity:_,availableFields:g.availableFields||[]});if(!w)return;const y=qe(_),C=p.map(T=>({primaryKey:T[y],version:v.versioned?T.Version:void 0}));await fn(_,{values:w,elements:C}).then(T=>{T.forEach(E=>{E.type==="reject"&&D("error")(E.data)})}).catch(D("error")),a("reload")}}}function d(g){return{...g,callback:()=>o.push(g.to)}}function b(g){return{...g,callback:()=>{const v=mn(g.filename);Qt(v,{blank:!0})}}}const m=r.computed(()=>{var _;const g=((_=l==null?void 0:l.actions)==null?void 0:_.value)||[],v=[];return c.value.forEach(p=>{if(!(typeof p.override=="string"&&!g.find(w=>w.name===p.override))){if(s(p)){if(p.system&&c.value.find(y=>y.name===p.name&&!y.system)||p.name==="new"&&!n.canCreate)return;const w=i.find(y=>y.name===p.name);if(w){const y=Object.assign({},w,{callback:()=>w.callback(p.params||{})});return v.push(y)}}if(p.name==="redirect")return v.push(d(p));if(p.name==="batch-update")return v.push(f(p));if(p.name==="batch-delete"&&n.metadata.canDelete)return v.push(u(p));if(p.name==="static-file")return v.push(b(p));{const w=g.find(y=>y.name===p.name);if(w)return v.push({label:w.title,...p,callback:()=>h(w)})}}}),Array.isArray(n.externalTools)&&v.push(...n.externalTools),v.map(p=>({...p,process:ie(p.callback)}))});function h(g){var p;const v=(p=g.action.parameters.find(w=>w.dataTypeName==="IntegerArray"))==null?void 0:p.name,_={};return v&&(_[v]=n.selectedRows.map(w=>{if(!(typeof w=="object"&&w!==null))return null;const y=n.metadata.fieldNameForIdentification;return y?w[y]:null})),g.callback(_)}return(g,v)=>{const _=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",_o,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,p=>(r.openBlock(),r.createBlock(_,{label:r.unref(q)(p.label),title:p.name,icon:p.icon,type:p.buttonStyle,loading:p.name==="reload"?g.loading:p.process.loading,onClick:()=>p.process.call()},null,8,["label","title","icon","type","loading","onClick"]))),256)),r.renderSlot(g.$slots,"default")])}}});function Co(e,t){const n=zt(),o=de.useRouter();let a=null;const i=r.reactive({entity:null,mark:null,settings:null});function l(y){const C={...d.value,...y};c(C)}function c(y){{const C=y.prefilters;C&&(Object.keys(C).forEach(T=>{var k,O;const E=C[T];Array.isArray(C[T])&&C[T].length===0&&i.settings&&!((O=(k=i.settings)==null?void 0:k.prefilters)!=null&&O[T])&&delete C[T],Pn(E)&&(typeof E.min!="number"&&delete E.min,typeof E.max!="number"&&delete E.max,Object.keys(E).length===0&&delete C[T])}),R.utils.isEmptyObject(C)&&delete y.prefilters)}localStorage.setItem(f(i.entity,a),JSON.stringify(y)),t&&t()}function s(){return i.entity?JSON.parse(localStorage[f(i.entity,a)]||"{}"):null}function u(y,C){i.entity=y,i.mark=C,m.call()}function f(y,C){return"list-configuration:"+y+(C?"-"+C:"")}const d=r.computed(()=>i.entity?JSON.parse(n[f(i.entity,a)]||"{}"):null),b=r.computed(()=>i.settings?at(i.entity,i.settings.config,{router:o,activate:e}):[]),m=ie(async function(){if(!i.entity)return;const C=await ln(i.entity,i.mark);i.settings=Object.freeze(C),a=C.mark,t&&t()}),h=r.computed(()=>{var T;const y=d.value.order||null,C=((T=i.settings)==null?void 0:T.order)||null;return y||C||[]}),g=r.computed(()=>{var T;const y=d.value.prefilters||{};return{...((T=i.settings)==null?void 0:T.prefilters)||{},...y}}),v=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.filters)||[]}),_=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.label)||null}),p=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.tools)||[]}),w=r.computed(()=>!R.utils.isEmptyObject(d.value));return{state:i,get customFilters(){return i.settings.customFilters||[]},set:u,get:s,configuration:d,update:l,computedPrefilter:g,computedFiltersConfiguration:v,get cellConfig(){return i.settings?at(i.entity,i.settings.config,{router:o,activate:e}):[]},get prefilters(){var y;return((y=s())==null?void 0:y.prefilters)||i.settings.prefilters||{}},get order(){var y;return((y=s())==null?void 0:y.order)||i.settings.order||[]},clean(){localStorage.removeItem(f(i.entity,a)),t&&t()},cellConfiguration:b,computedLabel:_,computedTools:p,computedHasLocalConfiguration:w,computedOrder:h,get displayModeForNew(){return i.settings.displayModeForNew||"inline"}}}var we;class en{constructor(t){Ve(this,we);this.unloaded=!1,this.offset=0,this.array=r.reactive([]),he(this,we,null),this.process=ie(this.load.bind(this)),this.entity=t,this.limit=50}set options(t){he(this,we,t)}get requestReadOptions(){return Object.assign({},Be(this,we)||null,{offset:this.offset,limit:this.limit})}async next(){this.unloaded||this.process.loading||await this.process.call()}reload(){return this.clear(),this.next()}clear(){this.array.splice(0,this.array.length),this.offset=0,this.unloaded=!1}get loading(){return this.process.loading}init(t){this.options=t,this.clear()}async load(){const t=await fe(this.entity,this.requestReadOptions);this.addData(t),t.length!==this.limit&&(this.unloaded=!0)}addData(t){this.array.push(...t.map(n=>Object.freeze(n))),this.offset+=t.length}}we=new WeakMap;function To(e,t){const n=setInterval(()=>{So(t)&&e.next()},2e3);r.onUnmounted(()=>{clearInterval(n)})}function So(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const Ao=["count","test"],Io={class:"widget-fast-table-head"},No={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},Ro={class:"widget-fast-table-body"},Oo=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean},hideActions:{type:Boolean},disableUsageContext:{type:Boolean},externalTools:{},selectedRows:{}},emits:["update:selectedRows"],setup(e,{expose:t,emit:n}){const o=n,a=e,i=de.useRouter(),l=r.computed(()=>!Array.isArray(a.selectedRows)),c=r.ref([]),s=r.computed(()=>{const A=new Set(l.value?c.value:a.selectedRows);return g.value.filter(B=>A.has(R.utils.getPropFromObject(B,w.value)))});function u(A){const B=A.map(z=>R.utils.getPropFromObject(z,w.value));if(l.value)return c.value=B;o("update:selectedRows",B)}const f=r.ref(null),d=r.computed(()=>f.value?g.value.indexOf(f.value[2]):null);function b(A,B,z){f.value=[A,B,z]}const m=new en(a.entity),h=r.ref(""),g=r.computed(()=>Array.isArray(ne.value)?h.value.length===0?m.array:m.array.filter(A=>!!ne.value.find(z=>{const le=Oe(z,A);return typeof le=="string"?le.includes(h.value):!1})):[]),v=r.ref(null),_=R.Form.getParentForm(),p=Fe(a.entity),w=r.computed(()=>p.value.fieldNameForIdentification),{state:y,update:C}=_t(a.entity,{masterEntities:a.masterEntities||[]}),T=ie(async()=>{try{c.value=[],await m.reload(),a.disableUsageContext||await C()}catch(A){const{message:B}=gt(A);v.value=B}});_ instanceof R.Form&&_.subscribe({read:T.call.bind(null),name:a.entity,type:"table"}),r.watch(()=>a.mark,()=>{F.set(a.entity,a.mark)});function E(){return N.and(N(F.prefilters),N(a.binding||{}))}const{controller:k}=ut();r.watch(()=>y.value,A=>{A&&(A.canRead?k.show():k.hide())},{immediate:!0});let O=[Ne.on("affected-entity",A=>{A.name===a.entity&&T.call()}),Ne.on("display-entity",async A=>{A.name===a.entity&&(m.loading&&await m.process.promise,b(A.name,A.primaryKey,g.value.find(B=>B[w.value]===A.primaryKey)))})];r.onUnmounted(()=>{O.map(A=>A()),k.remove()});function V(A){function B(ce){return Array.isArray(ce)?B(ce[0]):typeof ce!="string"?null:ce}const z=B(A);if(!z)return;const le=F.order;P("order",le[0]!==z?[z,"asc"]:le[1]==="desc"?[]:[z,"desc"])}function P(A,B){F.update({[A]:B})}const ee=r.computed(()=>T.wait),F=Co(b,()=>{m.init({customFilters:F.customFilters,fields:yt(ne.value).join(" "),order:F.order,filter:E(),useContextFilter:F.state.settings.useContextFilter}),m.next()}),ne=F.cellConfiguration;F.set(a.entity,a.mark),r.watch(()=>F.state.settings,()=>setTimeout(T.call,50));const xe=r.computed(()=>F.state.settings);t({listSettings:xe,array:g,config:ne,listDataController:m,selectedRows:s,selectedPrimaryKeys:c,listController:F});function W(A){U.openModal(S.MODAL_LIST_DOWNLOAD,{entity:a.entity,cellConfig:F.cellConfig,order:F.order,prefilters:E(),customFilters:F.customFilters,params:A,selectedRows:s.value})}function G(){switch(F.displayModeForNew){case"modal":return U.openModal(S.MODAL_ENTITY,{entity:a.entity});case"form":return i.push(Et(a.entity));case"inline":return f.value=[a.entity]}}function me(){F.clean()}function se(){return{entity:a.entity}}const ge=r.ref();return r.onMounted(()=>{To(m,ge.value)}),(A,B)=>{var ce,Tt,St;const z=r.resolveComponent("widget-button"),le=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",{class:"widget-fast-table",count:s.value.length,test:f.value},[r.createElementVNode("div",Io,[r.unref(F).computedLabel.value&&!A.hideLabel?(r.openBlock(),r.createElementBlock("p",No,r.toDisplayString(r.unref(q)(r.unref(F).computedLabel.value)),1)):r.createCommentVNode("",!0),r.unref(p)&&!A.hideActions?(r.openBlock(),r.createBlock(ko,{key:1,metadata:r.unref(p),tools:r.unref(F).computedTools.value,loading:ee.value,"selected-rows":s.value||[],onReload:r.unref(T).call,onExport:W,onNew:G,"can-create":((ce=r.unref(y))==null?void 0:ce.canCreate)||!1,"can-delete":((Tt=r.unref(y))==null?void 0:Tt.canDelete)||!1,"can-update":((St=r.unref(y))==null?void 0:St.canUpdate)||!1,externalTools:A.externalTools||[]},{default:r.withCtx(()=>[r.renderSlot(A.$slots,"tools",{},void 0,!0),r.unref(F).computedHasLocalConfiguration.value?(r.openBlock(),r.createBlock(z,{key:0,onClick:me,type:"primary",label:r.unref(q)("Clear all filters")},null,8,["label"])):r.createCommentVNode("",!0)]),_:3},8,["metadata","tools","loading","selected-rows","onReload","can-create","can-delete","can-update","externalTools"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Ro,[r.createVNode(Eo,{search:h.value,"onUpdate:search":B[0]||(B[0]=Y=>h.value=Y),entity:A.entity,"filters-config":r.unref(F).computedFiltersConfiguration.value,filters:r.unref(F).computedPrefilter.value,"onUpdate:filters":B[1]||(B[1]=Y=>P("prefilters",Y))},null,8,["search","entity","filters-config","filters"]),r.createVNode(r.unref(Kt),{config:r.unref(ne),array:g.value,"active-row":d.value,"onUpdate:activeRow":B[3]||(B[3]=Y=>f.value=null),onOrder:V,class:"table main-table","selected-rows":s.value,"onUpdate:selectedRows":u,"row-options-handler":se},{"head-cell":r.withCtx(Y=>{var Ce,At,It;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(A.$slots["head-cell"]?A.$slots["head-cell"]:Xt),r.mergeProps({label:Y.label},Y,{onOrder:V,order:r.unref(F).computedOrder.value,type:Y.type,"is-full-selected":((Ce=s.value)==null?void 0:Ce.length)===((At=g.value)==null?void 0:At.length)&&((It=g.value)==null?void 0:It.length)>0}),null,16,["label","order","type","is-full-selected"]))]}),footer:r.withCtx(()=>[r.createElementVNode("div",{style:{padding:"10px"},ref_key:"endOfTheScroll",ref:ge},null,512)]),default:r.withCtx(()=>{var Y,Ce;return[r.createVNode(le,{entity:(Y=f.value)==null?void 0:Y[0],"primary-key":((Ce=f.value)==null?void 0:Ce[1])||null,"master-entities":A.masterEntities||void 0,binding:A.binding,onFormUpdate:B[2]||(B[2]=()=>{f.value=null,r.unref(m).reload()})},null,8,["entity","primary-key","master-entities","binding"])]}),_:1},8,["config","array","active-row","selected-rows"])])],8,Ao)}}}),Lo=M(Oo,[["__scopeId","data-v-a946181d"]]);function tn(e,t={},n={}){const o=r.inject(S.PROVIDE_NAME_ACTIONS,null),a=typeof e=="string"?e:t,i=typeof t=="string"?n:t;return r.computed(()=>{var s;const c=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(u=>u.name===a);return c?{...c,...i}:null})}const Fo=r.defineComponent({__name:"widget-action",props:{name:{},overrideParams:{}},setup(e){const t=e,n=tn(t.name,t.overrideParams||{}),o=r.computed(()=>{if(n.value)return ie(n.value.callback)});return(a,i)=>{var c;const l=r.resolveComponent("widget-button");return r.unref(n)?(r.openBlock(),r.createBlock(l,{key:0,label:r.unref(n).label,loading:((c=o.value)==null?void 0:c.loading)||!1,onClick:i[0]||(i[0]=()=>{var s,u;return(u=(s=o.value)==null?void 0:s.call)==null?void 0:u.call(s,a.overrideParams||{})})},null,8,["label","loading"])):r.createCommentVNode("",!0)}}}),xo=r.defineComponent({__name:"WidgetResolverEntity",setup(e){const t=de.useRouter(),n=de.useRoute();function o(){const a=n.params.entity,i=n.params.primaryKey;vt(a,i).then(l=>t.replace(Et(l,i))).catch(l=>{D("error")(l),t.back()})}return r.onMounted(o),(a,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(Xe,{label:"Loading..."})]))}}),Bo=r.defineComponent({__name:"modal-list-download",props:{entity:{},cellConfig:{},prefilters:{},order:{},customFilters:{},params:{},selectedRows:{}},setup(e){const t=e,n=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:a,reject:i,start:l,init:c}=Fn("csv",t.params.overrideEntity||t.entity,t.cellConfig,t.prefilters,t.order,150,t.customFilters,{...t.params||{},selectedRows:t.selectedRows||[]});return U.onBeforeModalClose(i),r.onMounted(async()=>{await c(),l()}),r.watch(()=>o.finished,()=>{a(),U.popModal()}),(s,u)=>{const f=r.resolveComponent("widget-button"),d=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(d,null,{footer:r.withCtx(()=>[r.createVNode(f,{onClick:u[0]||(u[0]=b=>{r.unref(a)(),r.unref(U.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(Xe,{label:"Loading"})])]),_:1})}}}),nn=e=>(r.pushScopeId("data-v-66cf2326"),e=e(),r.popScopeId(),e),Vo={class:"version-item"},$o={class:"text_md"},Do={class:"version-item-date text_md"},Po=nn(()=>r.createElementVNode("span",null,null,-1)),Mo=nn(()=>r.createElementVNode("span",null,null,-1)),jo={class:"text_sm"},Uo={class:"text_sm line-clamp_5"},Wo={class:"text_sm line-clamp_5"},Ho=r.defineComponent({__name:"version-item",props:{selectedFields:{},date:{},customerName:{},version:{},changes:{},entity:{}},setup(e){const t=e;function n(i,l){const c=i.name.toLowerCase(),s=l.name.toLowerCase();return s==="version"?-1:c==="version"?1:s.startsWith("utc")?-1:c.startsWith("utc")?1:0}const o=r.computed(()=>[...t.changes||[]].sort(n)),a=r.computed(()=>(o.value||[]).filter(i=>Array.isArray(t.selectedFields)&&t.selectedFields.length!==0?t.selectedFields.includes(i.name):!0));return(i,l)=>(r.openBlock(),r.createElementBlock("div",Vo,[r.createElementVNode("span",$o,[r.createElementVNode("b",null,r.toDisplayString(i.version),1)]),r.createElementVNode("span",Do,[r.createElementVNode("b",null,r.toDisplayString(r.unref(mt)(i.date)),1)]),Po,r.createElementVNode("span",null,[r.createTextVNode("by "),r.createElementVNode("b",null,r.toDisplayString(i.customerName),1)]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.name},[Mo,r.createElementVNode("span",jo,r.toDisplayString(c.name),1),r.createElementVNode("span",Uo,r.toDisplayString(r.unref(nt)(i.entity,c.name,c.newValue)),1),r.createElementVNode("span",Wo,r.toDisplayString(r.unref(nt)(i.entity,c.name,c.oldValue)),1)],64))),128))]))}}),qo=M(Ho,[["__scopeId","data-v-66cf2326"]]),dt=e=>(r.pushScopeId("data-v-cc723f37"),e=e(),r.popScopeId(),e),Go={key:1,class:"wrap-history"},zo={class:"history-header grid gap_10"},Ko=dt(()=>r.createElementVNode("span",null,null,-1)),Yo=dt(()=>r.createElementVNode("span",{class:"text_md"},"New Value",-1)),Xo=dt(()=>r.createElementVNode("span",{class:"text_md"},"Old Value",-1)),Jo={class:"padding_15 grid gap_10 container-history"},Qo=r.defineComponent({__name:"modal-version-history",props:{entity:{},primaryKey:{}},setup(e){const t=e,n=r.computed(()=>`${l.value.description} Version History`),o=r.ref(),a=r.computed(()=>!s.value||Array.isArray(s.value)&&s.value.length===0?o.value:(o.value||[]).filter(d=>{var b;return d.action==="Insert"?!0:(b=d.changes)==null?void 0:b.find(m=>s.value&&s.value.includes(m.name))})),i=ie(u),l=Fe(t.entity),c=r.computed(()=>l.value.fields.map(d=>({label:d.displayName,value:d.name}))),s=r.ref(null);async function u(){try{const d=await pn({entity:t.entity,primaryKey:t.primaryKey});o.value=d.history}catch(d){D("error")(d)}}r.onMounted(()=>i.call());function f(d){return d.currentValues.map(b=>({name:b.fieldName,newValue:b.value})).filter(b=>b.newValue)}return(d,b)=>{const m=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(m,{label:n.value,class:"wrap-modal-version-history"},{default:r.withCtx(()=>[r.unref(i).loading?(r.openBlock(),r.createBlock(r.unref(Xe),{key:0,label:"Loading history..."})):(r.openBlock(),r.createElementBlock("div",Go,[r.createElementVNode("div",zo,[Ko,r.createVNode(r.unref(R.FormField),{type:"select",options:c.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=h=>s.value=h),multiple:""},null,8,["options","modelValue"]),Yo,Xo]),r.createElementVNode("div",Jo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(h,g)=>(r.openBlock(),r.createBlock(qo,{"selected-fields":s.value,date:h.utcCreated,"customer-name":h.userName,version:h.version,changes:h.action==="Insert"?f(h):h.changes,entity:d.entity,key:g},null,8,["selected-fields","date","customer-name","version","changes","entity"]))),128))])]))]),_:1},8,["label"])}}}),Zo=M(Qo,[["__scopeId","data-v-cc723f37"]]),Ge=class Ge{constructor(t,n){this.id=++Ge.globalId,this.eventName=t,this.data=n}};Ge.globalId=1;let Ae=Ge;class Ue{constructor(t,n){this.created=new Date().getTime(),this.timeToLive=0,this.once=!0,this.event=t,this.requestId=n}continue(t){this.timeToLive=new Date().getTime()-this.created+t}get expired(){return this.timeToLive===0?!1:new Date().getTime()-this.created>this.timeToLive}}class tt{static validateAnswer(t){return typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t}static checkForProgressHandler(t,n){var o,a,i,l;return t.event===((a=(o=n.data)==null?void 0:o.for)==null?void 0:a.event)&&t.requestId===((l=(i=n.data)==null?void 0:i.for)==null?void 0:l.requestId)}}const ea=Ke(Ye("use-socket"));function L(){return ta}const ta=function(){let e;function t(i,l,c={}){const s=new Ue(i);s.callback=l,s.once=c.once||!0,e.addHandler(s)}function n(i,l){t(i,l,{once:!0})}function o(i,l,c){const s=new Ae(i,l);return a(s,c)}function a(i,l){return e.sendMessage(i),new Promise((c,s)=>{const u=new Ue(i.eventName,i.id);u.callback=(f,d)=>{if(ea("Promise was resolve with next data:",f),na(d))return void s(f);l&&l(f,d),c(f)},u.once=!0,u.timeToLive=S.TIME_TO_LIVE_SOCKET_REQUEST,e.addHandler(u)})}return{get socket(){return e.instance},on:t,once:n,emit:o,addHandler(i){e.addHandler(i)},emitMessage:a,initialization(i){e=i}}}(),na=e=>!!tt.validateAnswer(e)&&e.event===qt;class ft extends Ue{constructor(t){super(t.eventName,t.id)}}function ra(e,t){const n=r.ref(null),o=L(),a=new Ae(e,t),i=new ft(a);i.callback=c=>n.value=c.progress;function l(){return o.addHandler(i),o.emitMessage(a)}return{call:l,progress:n}}function pt(e,t,n){const o=window.URL.createObjectURL(e);Qt(o,n),setTimeout(()=>{window.URL.revokeObjectURL(o)},100)}function oa(e,t){return fetch(`/close-api/document-builder/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CatalogId:t})}).then(n=>n.blob()).then(n=>{pt(n,e+t+"-print-form.pdf",{blank:!0})})}function mt(e){return We(e,"YYYY/MM/DD HH:mm:ss")}function We(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Mn.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function ie(e){function t(a){o.status=a}function n(...a){if(o.loading)return Promise.reject("The process has already started.");o.loading=!0,o.wait=!0;const i=Promise.resolve().then(()=>t(1)).then(()=>e(...a)).then(l=>(t(3),l)).catch(l=>{throw t(2),l}).finally(()=>{o.wait=!1,o.loading=!1,o.promise=null});return o.promise=i,i}const o=r.reactive({status:0,wait:!1,loading:!1,call:n,promise:null});return o}var rn=(e=>(e[e.init=0]="init",e[e.loading=1]="loading",e[e.error=2]="error",e[e.done=3]="done",e))(rn||{});function gt(e){return typeof e=="string"?$e(e):aa(e)?$e(e.message,e.children||e.details||[],e.traceId):ia(e)?$e(e.title,[e.detail||""],e.traceId):$e(S.DEFAULT_ERROR_MESSAGE)}function aa(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function ia(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function $e(e,t=[],n){return{message:e,children:t,traceId:n}}function D(e="error"){return function(t){const{message:n,children:o,traceId:a}=gt(t);Ie.add(e,n,{children:o,traceId:a})}}function fe(e,t={}){const n=L();return on(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:read",{entity:e,...t})}function on(e){return!!(e.id||e.primaryKey)}function ht(e,t){const n=L();return on(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:update",{...t,entity:e})}function yt(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function an(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(t,"0"),o[1].length>t&&(o[1]=o[1].substring(0,t)),o.join(".")}function sa(e,t){const n=new Map;return e.forEach(o=>{var i;const a=t(o);n.has(a)||n.set(a,[]),(i=n.get(a))==null||i.push(o)}),n}function la(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function ca(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function H(e,t={}){return X.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=X.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(n=>ca(n).then(o=>{if(!n.ok)throw o;return o}))}function sn(e,t=1e3){let n=0;return(...o)=>{clearTimeout(n),n=window.setTimeout(()=>e(...o),t)}}function ua(e,t){let n=!1;return(...o)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...o)}}const da=Ke(Ye("pretty-value-field-by-entity"));function nt(e,t,n){try{const o=Z.get(e);if(!o)throw new Error("For entity metadata is not loaded");const a=o.fieldsByName[t];if(!a)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return a.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(o){return da('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,t,n),n}}function ln(e,t){return L().emit("list-setting:read",{entity:e,mark:t})}function fa(e,t){return L().emit("metadata-field:treat",{entity:e,fieldName:t})}function cn(e,t){return L().emit("entity:create",{...t,entity:e})}function un(e,t){return L().emit("entity:delete",{...t,entity:e})}function pa(e,t){return L().emit("usage-context:read",{...t,entity:e})}function dn(e={}){return L().emit("tool:read",e)}function ma(){return L().emit("metadata-list:read",{})}function fn(e,t){return L().emit("batch:update",{...t,entity:e})}function vt(e,t){return L().emit("entity:resolve",{primaryKey:t,entity:e})}function pn(e){return L().emit("history:read",e)}function ga(e,t){return L().emit("entity:count",{...t,entity:e})}function mn(e){return`/${tr}/${e}`}function _e(e){return{exec(t,n){switch(e.name){case"replace-boolean":return _e.replaceBoolean(t,e.values);case"replace-record-operation":return _e.replaceRecordOperation(t)}}}}_e.replaceBoolean=ha;_e.replaceRecordOperation=ya;function ha(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function ya(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function va(e={}){return L().emit("tool:execute",e)}const wa=Ke(Ye("wrap-tool-response"));function gn(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=_a),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=Ca),e.handleCloseForm===void 0&&(e.handleCloseForm=Ta),e.handleValidationResult===void 0&&(e.handleValidationResult=ka),{...t,label:t.title,async callback(n={}){var l;const o=typeof e.values=="function"?e.values(t,e):e.values;let a={};t.action.targetName==="Record"&&o.hasOwnProperty("Id")&&(a.Id=o.Id,delete o.Id);const i=()=>va({name:t.name,values:{...o,...n},primaryKeys:a,usageContext:t.usageContext}).then(async c=>{var s,u,f,d;if(!ba(c))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const b of e.handlers)await b(t,c,e);if(!c.success)throw e.handleValidationResult&&c.validationEffect&&((u=(s=c.validationEffect)==null?void 0:s.results)!=null&&u.length)&&e.handleValidationResult(t,c.validationEffect,e),new Error(c.message);return t.showValidationResults&&e.handleValidationResult&&c.validationEffect&&(d=(f=c.validationEffect)==null?void 0:f.results)!=null&&d.length&&e.handleValidationResult(t,c.validationEffect,e),c.message&&Ie.add("info",c.message),Array.isArray(c.affectedEntities)&&e.handleAffectedEntity&&c.affectedEntities.forEach(b=>{var m;return(m=e.handleAffectedEntity)==null?void 0:m.call(e,t,b,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),c}).catch(c=>{if(D("error")(c),e.handleReject)return e.handleReject(t,c,e)});if((l=e.overrides)!=null&&l[t.name])return e.overrides[t.name](t,e);if(t.paramDialog){const c=await Sa(t,e);if(c===null)return;n=Object.assign(n,c||{})}return t.requireSave&&e.form&&e.form.changed?e.form.save().then(i):!t.confirmation||!e.handleConfirmation||t.paramDialog?i():e.handleConfirmation(t,i)}}}function ba(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function Ea(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function _a(e,t){const n=Ea(e.confirmation);if(!U.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await U.promptModal(S.MODAL_CONFIRM,{message:n}))return t()}function ka(e,t){const n=S.MODAL_VALIDATION_EFFECT;if(!U.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{U.pushModal(n,t)})}function Ca(e,t,n){var s;function o(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function a(u,f){u&&(wa("Affected Entity %s. Find form with name %s.",f,u.name),u.name===f&&o(u)&&u.read(),u instanceof R.Form&&u.dependencies.forEach(d=>a(d,f)))}Ne.emit("affected-entity",t);const{router:i,form:l}=n,c=typeof t.primaryKey=="string"?t.primaryKey:(s=t.primaryKey)==null?void 0:s.Id;if(i&&t&&t.name===e.redirectEntity){Ne.emit("display-entity",{primaryKey:c,name:t.name}),I.getEntityLink&&i.push(I.getEntityLink(t.name,c));return}a(l,t.name)}function Ta(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}function Sa(e,t){var n;if((n=e.paramDialog)!=null&&n.name)return U.promptModal(e.paramDialog.name,{paramDialog:e.paramDialog,tool:e,options:t})}let ue={};function q(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=R.utils.getPropFromObject((this==null?void 0:this.vocabulary)||ue,e);if(typeof n=="string")return Bt(n,t);const o=R.utils.getPropFromObject(ue==null?void 0:ue.root,e);return typeof o=="string"?Bt(o,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function Bt(e,t){return t.forEach((n,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),e}q.setGlobalVocabulary=function(e){ue=e};q.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),q.bind({vocabulary:R.utils.getPropFromObject(ue,t.toLowerCase())})};q.setVocabulary=function(e){return typeof e=="string"&&(e=R.utils.getPropFromObject(ue,e)),q.bind({vocabulary:e})};function Aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},$={},ot={exports:{}},pe={};function hn(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function Ia(e,t,n){}function Na(e,t,n){}var Ra=/javascript\s*\:/img;function Oa(e,t){return Ra.test(t)?"":t}pe.whiteList=hn();pe.getDefaultWhiteList=hn;pe.onAttr=Ia;pe.onIgnoreAttr=Na;pe.safeAttrValue=Oa;var La={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,a;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,a=e.length;o<a;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},Te=La;function Fa(e,t){e=Te.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,o=!1,a=0,i=0,l="";function c(){if(!o){var f=Te.trim(e.slice(a,i)),d=f.indexOf(":");if(d!==-1){var b=Te.trim(f.slice(0,d)),m=Te.trim(f.slice(d+1));if(b){var h=t(a,l.length,b,m,f);h&&(l+=h+"; ")}}}a=i+1}for(;i<n;i++){var s=e[i];if(s==="/"&&e[i+1]==="*"){var u=e.indexOf("*/",i+2);if(u===-1)break;i=u+1,a=i+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||c():s===`
7
- `&&c()}return Te.trim(l)}var xa=Fa,De=pe,Ba=xa;function Vt(e){return e==null}function Va(e){var t={};for(var n in e)t[n]=e[n];return t}function yn(e){e=Va(e||{}),e.whiteList=e.whiteList||De.whiteList,e.onAttr=e.onAttr||De.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||De.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||De.safeAttrValue,this.options=e}yn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,a=n.onAttr,i=n.onIgnoreAttr,l=n.safeAttrValue,c=Ba(e,function(s,u,f,d,b){var m=o[f],h=!1;if(m===!0?h=m:typeof m=="function"?h=m(d):m instanceof RegExp&&(h=m.test(d)),h!==!0&&(h=!1),d=l(f,d),!!d){var g={position:u,sourcePosition:s,source:b,isWhite:h};if(h){var v=a(f,d,g);return Vt(v)?f+":"+d:v}else{var v=i(f,d,g);if(!Vt(v))return v}}});return c};var $a=yn;(function(e,t){var n=pe,o=$a;function a(l,c){var s=new o(c);return s.process(l)}t=e.exports=a,t.FilterCSS=o;for(var i in n)t[i]=n[i];typeof window<"u"&&(window.filterCSS=e.exports)})(ot,ot.exports);var wt=ot.exports,bt={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,a;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,a=e.length;o<a;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},Da=wt.FilterCSS,Pa=wt.getDefaultWhiteList,He=bt;function vn(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var wn=new Da;function Ma(e,t,n){}function ja(e,t,n){}function Ua(e,t,n){}function Wa(e,t,n){}function bn(e){return e.replace(qa,"&lt;").replace(Ga,"&gt;")}function Ha(e,t,n,o){if(n=Sn(n),t==="href"||t==="src"){if(n=He.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(Pe.lastIndex=0,Pe.test(n))return""}else if(t==="style"){if($t.lastIndex=0,$t.test(n)||(Dt.lastIndex=0,Dt.test(n)&&(Pe.lastIndex=0,Pe.test(n))))return"";o!==!1&&(o=o||wn,n=o.process(n))}return n=An(n),n}var qa=/</g,Ga=/>/g,za=/"/g,Ka=/&quot;/g,Ya=/&#([a-zA-Z0-9]*);?/gim,Xa=/&colon;?/gim,Ja=/&newline;?/gim,Pe=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,$t=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Dt=/u\s*r\s*l\s*\(.*/gi;function En(e){return e.replace(za,"&quot;")}function _n(e){return e.replace(Ka,'"')}function kn(e){return e.replace(Ya,function(n,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function Cn(e){return e.replace(Xa,":").replace(Ja," ")}function Tn(e){for(var t="",n=0,o=e.length;n<o;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return He.trim(t)}function Sn(e){return e=_n(e),e=kn(e),e=Cn(e),e=Tn(e),e}function An(e){return e=En(e),e=bn(e),e}function Qa(){return""}function Za(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function o(l){return n?!0:He.indexOf(e,l)!==-1}var a=[],i=!1;return{onIgnoreTag:function(l,c,s){if(o(l))if(s.isClosing){var u="[/removed]",f=s.position+u.length;return a.push([i!==!1?i:s.position,f]),i=!1,u}else return i||(i=s.position),"[removed]";else return t(l,c,s)},remove:function(l){var c="",s=0;return He.forEach(a,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function ei(e){for(var t="",n=0;n<e.length;){var o=e.indexOf("<!--",n);if(o===-1){t+=e.slice(n);break}t+=e.slice(n,o);var a=e.indexOf("-->",o);if(a===-1)break;n=a+3}return t}function ti(e){var t=e.split("");return t=t.filter(function(n){var o=n.charCodeAt(0);return o===127?!1:o<=31?o===10||o===13:!0}),t.join("")}$.whiteList=vn();$.getDefaultWhiteList=vn;$.onTag=Ma;$.onIgnoreTag=ja;$.onTagAttr=Ua;$.onIgnoreTagAttr=Wa;$.safeAttrValue=Ha;$.escapeHtml=bn;$.escapeQuote=En;$.unescapeQuote=_n;$.escapeHtmlEntities=kn;$.escapeDangerHtml5Entities=Cn;$.clearNonPrintableCharacter=Tn;$.friendlyAttrValue=Sn;$.escapeAttrValue=An;$.onIgnoreTagStripAll=Qa;$.StripTagBody=Za;$.stripCommentTag=ei;$.stripBlankChar=ti;$.attributeWrapSign='"';$.cssFilter=wn;$.getDefaultCSSWhiteList=Pa;var Je={},re=bt;function ni(e){var t=re.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=re.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function ri(e){return e.slice(0,2)==="</"}function oi(e,t,n){var o="",a=0,i=!1,l=!1,c=0,s=e.length,u="",f="";e:for(c=0;c<s;c++){var d=e.charAt(c);if(i===!1){if(d==="<"){i=c;continue}}else if(l===!1){if(d==="<"){o+=n(e.slice(a,c)),i=c,a=c;continue}if(d===">"||c===s-1){o+=n(e.slice(a,i)),f=e.slice(i,c+1),u=ni(f),o+=t(i,o.length,u,f,ri(f)),a=c+1,i=!1;continue}if(d==='"'||d==="'")for(var b=1,m=e.charAt(c-b);m.trim()===""||m==="=";){if(m==="="){l=d;continue e}m=e.charAt(c-++b)}}else if(d===l){l=!1;continue}}return a<s&&(o+=n(e.substr(a))),o}var ai=/[^a-zA-Z0-9\\_:.-]/gim;function ii(e,t){var n=0,o=0,a=[],i=!1,l=e.length;function c(b,m){if(b=re.trim(b),b=b.replace(ai,"").toLowerCase(),!(b.length<1)){var h=t(b,m||"");h&&a.push(h)}}for(var s=0;s<l;s++){var u=e.charAt(s),f,d;if(i===!1&&u==="="){i=e.slice(n,s),n=s+1,o=e.charAt(n)==='"'||e.charAt(n)==="'"?n:li(e,s+1);continue}if(i!==!1&&s===o){if(d=e.indexOf(u,s+1),d===-1)break;f=re.trim(e.slice(o+1,d)),c(i,f),i=!1,s=d,n=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),i===!1)if(d=si(e,s),d===-1){f=re.trim(e.slice(n,s)),c(f),i=!1,n=s+1;continue}else{s=d-1;continue}else if(d=ci(e,s-1),d===-1){f=re.trim(e.slice(n,s)),f=Pt(f),c(i,f),i=!1,n=s+1;continue}else continue}return n<e.length&&(i===!1?c(e.slice(n)):c(i,Pt(re.trim(e.slice(n))))),re.trim(a.join(" "))}function si(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function li(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function ci(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function ui(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Pt(e){return ui(e)?e.substr(1,e.length-2):e}Je.parseTag=oi;Je.parseAttr=ii;var di=wt.FilterCSS,K=$,In=Je,fi=In.parseTag,pi=In.parseAttr,je=bt;function Me(e){return e==null}function mi(e){var t=je.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=je.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=je.trim(e.slice(0,-1))),{html:e,closing:n}}function gi(e){var t={};for(var n in e)t[n]=e[n];return t}function hi(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(o){return o.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function Nn(e){e=gi(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=K.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=hi(e.whiteList||e.allowList):e.whiteList=K.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":K.attributeWrapSign,e.onTag=e.onTag||K.onTag,e.onTagAttr=e.onTagAttr||K.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||K.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||K.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||K.safeAttrValue,e.escapeHtml=e.escapeHtml||K.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new di(e.css))}Nn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,a=n.onTag,i=n.onIgnoreTag,l=n.onTagAttr,c=n.onIgnoreTagAttr,s=n.safeAttrValue,u=n.escapeHtml,f=t.attributeWrapSign,d=t.cssFilter;n.stripBlankChar&&(e=K.stripBlankChar(e)),n.allowCommentTag||(e=K.stripCommentTag(e));var b=!1;n.stripIgnoreTagBody&&(b=K.StripTagBody(n.stripIgnoreTagBody,i),i=b.onIgnoreTag);var m=fi(e,function(h,g,v,_,p){var w={sourcePosition:h,position:g,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(o,v)},y=a(v,_,w);if(!Me(y))return y;if(w.isWhite){if(w.isClosing)return"</"+v+">";var C=mi(_),T=o[v],E=pi(C.html,function(k,O){var V=je.indexOf(T,k)!==-1,P=l(v,k,O,V);return Me(P)?V?(O=s(v,k,O,d),O?k+"="+f+O+f:k):(P=c(v,k,O,V),Me(P)?void 0:P):P});return _="<"+v,E&&(_+=" "+E),C.closing&&(_+=" /"),_+=">",_}else return y=i(v,_,w),Me(y)?u(_):y},u);return b&&(m=b.remove(m)),m};var yi=Nn;(function(e,t){var n=$,o=Je,a=yi;function i(c,s){var u=new a(s);return u.process(c)}t=e.exports=i,t.filterXSS=i,t.FilterXSS=a,function(){for(var c in n)t[c]=n[c];for(var s in o)t[s]=o[s]}(),typeof window<"u"&&(window.filterXSS=e.exports);function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(rt,rt.exports);var vi=rt.exports;const wi=Aa(vi);function bi(e){return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/\[icon:([^\]]+)]/g,"<widget-icon>$1</widget-icon>"),e=e.replace(/\[(.*)]\((.*)\)/g,'<router-link to = "$2">$1</router-link>'),wi(e)}function Ei(e,t,n,o){let a=e+t/60+n/3600;return(o=="S"||o=="W")&&(a=a*-1),a}function _i(e,t){const n={dir:e<0?t==="long"?"W":"S":t==="long"?"E":"N",deg:0|(e<0?e=-e:e),min:0|(e+=1e-9)%1*60,sec:(0|e*60%1*6e3)/100};return`${n.deg}° ${n.min}' ${n.sec}" ${n.dir}`}function Et(e,t){const n=["forms",e];return t&&n.push(t),"/"+n.join("/")}function Rn(e,t){return"/"+[S.PATH_RESOLVER_ENTITY,e,t].join("/")}function ki(){return`/${S.PATH_RESOLVER_ENTITY}/:entity/:primaryKey`}function qe(e){const t=Z.get(e);if(!t)throw new Error(`Metadata ${e} is still missing.`);return t.useCatalogInsteadId?"CatalogId":t.fieldNameForIdentification}function at(e,t,n){const o=q.getScope(e.toLowerCase());return t.map(a=>{typeof a.label=="string"&&(a.label=o(a.label)),a.type==="history"&&(a.onClick=l=>U.openModal(S.MODAL_HISTORY,{primaryKey:l[qe(e)],entity:e}),a.icon="history",a.class="widget-list-cell-history",a.hint="Open the History");const i=a.displayMode;if(i){const l=async c=>{try{const s=c[oe(a)];return[await vt(Ti(a,c),s),s]}catch{return[]}};i&&(i==="form"?a.link=c=>{const s=c[oe(a)];return s?Rn(a.entity,s):null}:a.onClick=async c=>{const[s,u]=await l(c);if(!s||!u)return null;switch(a.displayMode){case"modal":return U.openModal(S.MODAL_ENTITY,{entity:s,primaryKey:u});case"inline":return n.activate(s,u,c)}}),a.class="widget-table-cell_link cursor_pointer",typeof a.value!="string"&&(a.value=(c,s)=>s[a.name[1]])}return Ci(a,a.type,a.presentation),I.listConvertCellConfigHandler&&I.listConvertCellConfigHandler(e,a),a})}function Ci(e,t,n){switch(t){case"Decimal":{n==="Money"&&(e.type="money");break}}return e}const Ti=(e,t)=>e.useObjectTypeName?t[e.name[2]]:e.entity?e.entity:null;function Si(e){return L().emit("usage-context:read-mandatory-fields",e)}async function Ai(e,t,n){const o=await fetch(`/close-api/document-builder/${e}/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok)throw new Error(S.DEFAULT_ERROR_MESSAGE);const a=await o.blob();pt(a,`${e}.pdf`,{blank:!0})}function Ii(e){if(!Array.isArray(I.arrayListCellHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");I.arrayListCellHandlers.push(e)}function Ni(e,t){const n=oe(e);return n?R.utils.getPropFromObject(t,n):null}function Ri(e){if(!Array.isArray(I.arrayFieldParamsHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");I.arrayFieldParamsHandlers.push(e)}function Oi(e){if(!Array.isArray(I.arrayListRowHandlers))throw new Error("Configuration has mistake: arrayListRowHandlers is not an array");I.arrayListRowHandlers.push(e)}const Li={addListCellHandler:Ii,getCellModelValue:Ni,addFieldParamsHandler:Ri,addListRowHandler:Oi};var On=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(On||{});function Fi(){const e=r.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function xi(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function Ln(e,t){e()&&(await t(),await Ln(e,t))}function Bi(e,t,n={}){let o=!1;const a=r.ref(""),i=r.computed(()=>l.filter(E=>u(E,a.value))),l=r.reactive([]);let c=0;const s=r.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((E,k)=>xi(E,k));function f(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function d(){const E=y();return typeof E.limit!="number"&&(E.limit=100),E.offset=c,(n.request||fe)(e,E).then(O=>(c+=O.length,O))}function b(E,k){var V;return typeof E.Version=="number"?E.Version:(V=l.find(P=>P.Id===k))==null?void 0:V.Version}function m(E,k){const O=l.findIndex(V=>V.Id===E);if(O===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(O,1,k)}function h(E){const k=l.findIndex(O=>O.Id===E);if(k===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(k,1)}async function g(E,k){try{const O=y(),V=b(k,E);delete k.Version,await ht(e,{id:E,values:k,version:V,masterEntities:f()});const P=await fe(e,{fields:O.fields||"",id:E});m(E,P)}catch(O){D()(O)}}async function v(E,k={}){try{const O=y(),V=b(k,E);delete k.Version,await un(e,{id:E,version:V,masterEntities:f()}),h(E)}catch(O){D()(O)}}async function _(E){try{await cn(e,{values:E,masterEntities:f()}),await C()}catch(k){D()(k)}}let p;async function w(){s.value=!0;try{p!=null&&p.signal&&!p.signal.aborted&&p.abort();let E=p=new AbortController,k=0;const V=y().limit||0;if(a.value&&!V){console.warn("Using textSearch assumes the use of limit.");return}await Ln(()=>(V>0?k<V:!0)&&!o&&!E.signal.aborted,async()=>{const P=await d();E.signal.aborted||(l.push(...P),k+=P.filter(ee=>u(ee,a.value)).length,(P.length<V||V===0)&&(o=!0))})}catch(E){D()(E)}s.value=!1}function y(){return typeof t=="function"?t():t}async function C(){try{c=0,o=!1,l.splice(0,l.length),await w()}catch(E){D()(E)}}function T(){if(p)return p.abort();s.value=!1}return{array:l,updateById:g,next:w,reload:C,wait:s,create:_,deleteById:v,textSearch:a,filteredArray:i,abort:T}}function Vi(){function e(){return{organizations:X.organizations,currentContextId:X.contextId,person:X.person,context:X.context,contextType:X.contextType,userId:X.userId}}const t=r.reactive(e());return X.onupdateContext(()=>{Object.assign(t,e())}),t}function $i(e,t,n){return L().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function Di(e,t,n){return L().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function Pi(e,t){return L().emit("communication-message:create",{communicationId:e,text:t})}function Mi(e){return L().emit("communication-message:read",{communicationId:e})}function ji(e){const t=R.Form.getParentForm(),n=r.reactive([]);return t&&t.subscribe(e),e.read=()=>Mi(e.id).then(o=>(n.splice(0,n.length,...o),o)),{array:n}}function Ui(e,t){e.read=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw ae.EntityWithoutName(e);return fe(e.name,o)}).then(Ct).then(a=>(a.hasOwnProperty("Version")&&(e.version=a.Version),e.setValues(a),a)).catch(D())},e.save=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw ae.EntityWithoutName(e);return ht(e.name,{id:o.id,values:e.changes,version:e.version})}).then(a=>{e.version=a.version}).catch(a=>{throw D()(a),a})};function n(){return typeof t=="function"?t():t}}function Fe(e){if(!e)return r.inject(S.PROVIDE_NAME_METADATA);Z.initEntity(e);const t=r.computed(()=>Z.state[e]);return r.provide(S.PROVIDE_NAME_METADATA,t),r.provide(S.PROVIDE_ENTITY_NAME,e),t}function _t(e,t={}){if(!e)return r.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const n=r.ref(null);return r.provide(S.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await pa(e,Wi(t||{}))}}}function Wi(e){return typeof e=="function"?e():e}function Hi(e){if(!e)return r.inject(S.PROVIDE_NAME_ACTIONS);const t=r.ref(!1),n=r.reactive([]),o=r.computed(()=>n.map(l=>gn(e,l))),a={actions:o,update:i};r.provide(S.PROVIDE_NAME_ACTIONS,a),e.router=de.useRouter();function i(){if(t.value)return;t.value=!0,n.splice(0,n.length);const l=e==null?void 0:e.form;return dn({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(c=>n.splice(0,0,...c)).catch(D("error")).finally(()=>t.value=!1)}return{actions:o,update:i,loading:r.readonly(t)}}function qi(e){function t(n){n.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",t)}),r.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function Gi(e,t={}){const n=r.reactive([]),o=s=>{const u=r.unref(e);if(s===void 0){n.length===0?u.forEach(i):u.forEach(l);return}a(s)?l(s):i(s)},a=s=>n.includes(s),i=s=>{t.handleSelect&&!t.handleSelect(s)||a(s)||n.push(s)},l=s=>{const u=n.findIndex(f=>f===s);u!==-1&&n.splice(u,1)},c=r.computed(()=>{const s=r.unref(e);return n.length===s.length&&s.length!==0});return[n,o,c,i,l]}function zi(e){const t=r.ref(""),n=r.computed(()=>{const o=t.value.toLowerCase();return r.unref(e).filter(a=>t.value.length?Object.values(a).join().toLowerCase().includes(o):!0)});return{search:t,searchArray:n}}class Ze{static async getStartConfig(t,n){return L().emit("wizard:configuration",{process:t,entity:n})}static async startProcess(t,n){return L().emit("wizard:start",{process:t,entity:n})}static async runStep(t,n,o,a,i){return L().emit("wizard:step",{process:t,entity:n,stepName:o,token:a,values:i})}}function Ki(e){return e.statusName===j.Completed}function Yi(e){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(e.statusName)}function Xi(e){return e.statusName===j.ValidationError}function Ji(e){return e.statusName===j.Undefined}function Qi(e,t,n){let o=null,a=[];const i=r.ref(!1),l=r.ref(null),c=r.computed(()=>d(a,l.value)),s=r.ref(null),u=r.reactive([]),f=r.computed(()=>u.map(p=>d(a,p)));function d(p,w){return p.find(y=>y.name===w)||null}async function b(p){var w;if(Ji(p)){await n.onDisplayDataSet(p);return}if(!(Yi(p)&&!await n.onDisplayDataSet(p))){if(Xi(p))return void n.onValidation(p.validationResults);g(p),await r.nextTick();{const y=((w=d(a,l.value))==null?void 0:w.fields)||[];if([j.FinalStep,j.NextStep,j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(p.statusName)&&(!y.length||Zi(y,n.presets)))return _(n.presets||{})}Ki(p)&&n.onCompleted(p)}}async function m(){try{await h(),await v()}catch(p){D("error")(p)}}function h(){return i.value="Loading process information.",Ze.getStartConfig(t,e).then(p=>(s.value={label:p.processTitle,info:p.processInfo,icon:p.processIcon},a=p.steps.map(w=>{const y=w.frontendEntity.rootObject,C=Object.fromEntries(w.frontendEntity.objectTypes.map(T=>[T.name,T.properties]));return{label:w.title,name:w.stepName,number:w.number,rootObjectName:y,objectTypes:C,fields:C[y],buttonCaption:w.buttonCaption}}))).finally(()=>{i.value=!1})}function g(p){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation,j.NextStep,j.Completed,j.FinalStep].includes(p.statusName)?(o=p.token,l.value=p.nextStepName):console.log("Saving is not completed:",p),p}function v(){return i.value="Starting process",Ze.startProcess(t,e).then(b).catch(D("error")).finally(()=>{i.value=null})}function _(p={}){const w=l.value;return!o||!w?Promise.reject("Not step or token."):(i.value="Waiting for result...",Ze.runStep(t,e,w,o,p).then(b).then(y=>(u[u.length-1]!==w&&u.push(w),y)).catch(D("error")).finally(()=>{i.value=!1}))}return{initialize:m,loading:i,currentStepConfig:c,currentStepName:l,arrayPassedSteps:f,arrayProcessStepName:u,processInfo:s,next:_}}function Zi(e,t){for(let n=0;n<e.length;n++){const o=e[n];if(!R.utils.getPropFromObject(t,o.name))return!1}return!0}function es(e,t){const n=typeof e=="string"?e:e.name,o=Object.assign({},typeof e=="string"?{}:e.arguments,t||{});return{name:n,arguments:o}}function Fn(e,t,n,o,a,i,l,c={}){const s=L();i=i||150;let u=null;const f=[],d=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function b(p){p===null&&(p=""),p===void 0&&(p="-");let w=typeof p!="string"?String(p):p;return w=w.replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w='"'+w+'"'),w}async function m(){return fe(t,{offset:d.offset,...u}).then(p=>(d.offset+=i,p))}function h(){const p="data:text/csv;charset=utf-8,"+f.join(`\r
8
- `),w=encodeURI(p),y=document.createElement("a");y.setAttribute("href",w),y.setAttribute("download",`${t}.csv`),document.body.appendChild(y),y.click()}async function g(){if(n=c.extend?await s.emit("export-configuration:read",{entity:c.overrideEntity||t}).then(p=>p.map(w=>({label:w,name:w}))):n,u={limit:i||150,fields:yt(n),order:a,filter:typeof o=="string"?o:N(o||{}),customFilters:Array.isArray(l)?l.map(p=>{var w;return es(p,(w=c.customFiltersData)==null?void 0:w[typeof p=="string"?p:p.name])}):void 0},c.customFilters&&(u.customFilters=[...c.customFilters,...Array.isArray(u.customFilters)?u.customFilters:[]]),c.useSelectedRows&&Array.isArray(c.selectedRows)&&c.selectedRows.length){let p="";const w=await Z.initEntity(t);p=N({[w.primaryKey]:c.selectedRows.map(y=>y[w.primaryKey])}),u.filter.length?u.filter+=` and ${p}`:u.filter=p}c.overridePrefix&&typeof u.filter=="string"&&(u.filter=u.filter.replaceAll("@",p=>p+c.overridePrefix+".")),e==="csv"&&f.push(n.map(p=>b(p==null?void 0:p.label)).join(","))}function v(){d.rejected=!0}async function _(){return m().then(p=>{const w=p.map(y=>n.map(C=>b(Oe(C,y))).join(","));return f.push(...w),d.count=f.length,p.length}).then(p=>{if(p!==i&&(d.finished=!0),p===i&&!d.rejected)return _()}).catch(p=>{D("error")(p),U.closeModal()})}return{downloadFile:h,reject:v,state:d,start:_,init:g}}function xn(e,t){return r.computed(()=>(Bn.value||[]).filter(n=>n.entityName===e&&n.templateTarget===t))}xn.init=function(t){Bn.value=t};const Bn=r.ref(),Ie=new class{constructor(){this.store=r.reactive([])}add(t,n,o={}){const a=ts(o),i=new it(t,n,a.timeout,a.children,a.click,o.traceId||void 0);return this.store.push(i),a.timeout&&setTimeout(this.remove.bind(this,i.id),a.timeout*1e3),i}remove(t){const n=this.store.findIndex(o=>o.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function ts(e){function t(o){return!!o&&typeof o=="object"}const n={timeout:10,click:()=>null,children:[]};return t(e)?{timeout:e.timeout||n.timeout,click:e.click||n.click,children:e.children||n.children}:n}const ze=class ze{constructor(t,n,o,a,i,l){this.type=t,this.message=n,this.timeout=o,this.children=a,this.click=i,this.traceId=l,this.id=ze.cardId++}};ze.cardId=1;let it=ze;/*!
5
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),R=require("jenesius-vue-form"),ue=require("vue-router"),Mn=require("date-and-time"),Ke=require("debug"),U=require("jenesius-vue-modal"),B=class B extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=B.ID++}static ParentFormNotFound(){return new B("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new B("Composite object name is undefined",t)}static EntityWithoutName(t){return new B("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new B(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new B("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new B("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new B(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return B.ApiNotAvailable()}static ApiError(t){return new B("Request error",t)}static ApiNotAvailable(){return new B(`Sorry, we experience difficulties here.
6
+ Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?B.ApiNotAvailable():new B(t||"Authorization Error",n)}static ApiResponseParseFailed(){return B.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new B("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new B(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new B("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new B("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new B(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new B(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,o){return new B(`Array already includes the element with value ${t}`,{array:n,table:o})}static MetadataEntityIsNotAvailable(t){return new B(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new B("The request took too long to complete. Try again later.")}};B.ID=0;let ie=B;const jn="Please try again later or submit a feedback if problem doesn't go.";function Un(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return jn}})}function ve(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw ie.ApiNotAvailable()}).then(n=>Un(n).then(o=>{if(!n.ok)throw o;return o}))}class Wn{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,o)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),t[n]=o,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}new Wn;class Hn{static invite(t,n,o){return ve("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:o})})}static accept(t,n){return ve("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return ve("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class qn{static getRequiredDocuments(t,n,o){const a=new URLSearchParams({entity:t,primaryKey:n,statusCode:o});return fetch(`/close-api/views/required-documents?${a.toString()}`).then(i=>i.json())}}class ye{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${ye.url()}/calculator/${t}`)}static calculate(t,n){return ve(`/${ye.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):ie.ApiNotAvailable()})}static parseMetadataField(t){function n(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return ve(`/${ye.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return ve(`/${ye.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}const Gn={class:"widget-table__head-cell"},zn={key:1,class:"widget-table__head-label margin_0 text_overflow"},Ht=r.defineComponent({__name:"widget-table-head-cell",props:{label:{},type:{}},emits:["select"],setup(e,{emit:t}){const n=t;function o(){n("select")}return(a,i)=>(r.openBlock(),r.createElementBlock("th",Gn,[a.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,onClick:o})):(r.openBlock(),r.createElementBlock("span",zn,r.toDisplayString(a.label),1))]))}}),Kn={class:"widget-table__head"},Yn=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>Ht),(t,n)=>(r.openBlock(),r.createElementBlock("tr",Kn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.config,o=>r.renderSlot(t.$slots,"default",r.mergeProps({ref_for:!0},o),void 0,!0)),256))]))}}),M=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Xn=M(Yn,[["__scopeId","data-v-aa18d6fa"]]);function lt(e){return Array.isArray(e)?lt(e[0]):typeof e!="string"?null:e}function ae(e){return lt(e.name)}function Jn(e){const t=new RegExp(/\$\{([a-zA-Z0-9_.]+)}/,"g"),n=[];let o;for(;(o=t.exec(e))!==null;)n.push(o[1]);return n}function Qn(e,t){return Jn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),R.utils.getPropFromObject(t,o))}),e}function et(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function Oe(e,t){const n=ae(e);if(typeof e.value=="string")return Qn(e.value,t);let o=n?R.utils.getPropFromObject(t,n):null;if(o===void 0&&(o=null),typeof e.value=="function")return e.value(o,t);if(e.value===null)return null;switch(e.unitValue&&(o=et(e.unitValue)(o)),e.unit&&(o=et(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=We(typeof o=="string"?o:null);break}case"TimeSpan":{const a=o==null?void 0:o.match(/((\d+).)?(\d+:\d+:\d+)/);a&&(o=`${a[2]||0} D ${a[3]}`);break}case"dateTime":case"dateWithTime":{o=mt(typeof o=="string"?o:null);break}case"money":{o=an(o);break}case"DateTime":{o=We(typeof o=="string"?o:null,e.format||I.dateTimeFormat);break}}return e.formatter&&(o=_e(e.formatter).exec(o,t)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const Zn=1,er=5e3,tr="static-folder",qt="request-error",Gt="EntityTypeName",nr="REFERENCE_CHANGES",S={LIST_ACTIVE_NEW:-1,DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:4e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",PROVIDE_ENTITY_NAME:"provide-entity-name",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",MODAL_SIMPLE_TOOL_PARAMETERS:"SimpleToolParameters",MODAL_BATCH_VALUES:"batch-values",MODAL_ENTITY:"form-entity",MODAL_HISTORY:"entity-history",TIME_TO_LIVE_SOCKET_REQUEST:45e3,CORE_DEBUG_LABEL:"eservices-core",VISIBLE_ITEM_PROVIDE_NAME:"visible-item-provider",EVENT_FORM_UPDATE:"form-update",EVENT_AFFECTED_ENTITY:"affected-entity",DEFAULT_ORDER_DIR:"asc",TABLE_MOCK_FIELD:"_A_MOCK_ID_FIELD",OBJECT_TYPE_NAME_FIELD:Gt,FIELD_NAME_REFERENCE_CHANGES:nr,PATH_RESOLVER_ENTITY:"resolver",TOOL_PRINT_NAME:"Print"};function Ye(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const rr={class:"widget-filter-text flex-column gap_10"},or={class:"flex gap_20"},ar=r.defineComponent({__name:"widget-filter-text",props:{values:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,a=new R.Form({parent:!1}),i={begin:"Begin with",end:"End with",include:"Contains"};function l(u="",f="include"){return{text:u,option:f}}r.onMounted(()=>{const u=n.values?typeof n.values=="string"?l(n.values):n.values:l();a.setValues(u)});function c(){o("update:values",a.values)}function s(){o("clear")}return r.watch(()=>n.values,u=>a.setValues(u||l()),{immediate:!0}),(u,f)=>{const d=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",rr,[r.createElementVNode("div",or,[r.createVNode(r.unref(R.FormField),{name:"text",type:"text",label:"Search"})]),r.createVNode(r.unref(R.FormField),{name:"option",type:"radio",options:i}),r.createElementVNode("div",null,[r.createVNode(d,{onClick:c,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(q)("Apply")),1)]),_:1}),r.createVNode(d,{onClick:s},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(q)("Clear")),1)]),_:1})])])}}}),ir=M(ar,[["__scopeId","data-v-f6da3bed"]]),sr={class:"widget-filter-enum"},lr={class:"flex gap-10 padding-10"},cr=r.defineComponent({__name:"widget-filter-entity",props:{baseEntity:{},filters:{},values:{},filterMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=r.ref([]),a=Fe(n.filterMetadata.entity),i=f=>(n.values||[]).includes(f),l=t;function c(f){const d=n.values||[];return d.includes(f)?l("update:values",d.filter(b=>b!==f)):l("update:values",[...d,f])}const s=se(async()=>{o.value=await de(n.baseEntity,{fields:n.filterMetadata.name.join(" "),order:[n.filterMetadata.name[1],"asc"],distinct:!0,filter:N(n.filters)}).then(f=>f.map(d=>({label:d[n.filterMetadata.name[1]],value:d[n.filterMetadata.name[0]]})))});function u(){l("update:values",[])}return r.watch(()=>s.loading,f=>{l("readProcess",f?"start":"end")},{immediate:!0}),r.watch(()=>a.value,()=>{s.loading||s.call()},{immediate:!0}),(f,d)=>{const b=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",sr,[r.createElementVNode("div",lr,[r.createVNode(b,{label:"Reload filter",loading:r.unref(s).loading||!1,icon:"reload",onClick:d[0]||(d[0]=()=>r.unref(s).call())},null,8,["loading"]),r.createVNode(b,{label:"Clear",onClick:u})]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,m=>(r.openBlock(),r.createBlock(r.unref(R.FormField),{class:"widget-filter-enum-item",key:m.value,onClick:()=>c(m.value),type:"single-checkbox","model-value":i(m.value),label:m.label},null,8,["onClick","model-value","label"]))),128))])}}}),ur=M(cr,[["__scopeId","data-v-4c82f6e7"]]),Se=r.reactive({});function dr(){Ot(),setInterval(Ot,50)}function zt(){return Se}function Ot(){const e={};Object.entries(localStorage).forEach(([t,n])=>{e[t]=!0,Se[t]!==n&&(Se[t]=n)}),Object.keys(Se).forEach(t=>{e[t]||delete Se[t]})}const fr={class:"widget-filter-number flex-column es-gap-10"},pr={class:"flex es-gap-10"},mr={class:"flex gap-10"},gr=r.defineComponent({__name:"widget-filter-number",props:{baseEntity:{},values:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=t,a=new R.Form({parent:!1}),i=sn(()=>{const c=a.getValueByName("min"),s=a.getValueByName("max");return o("update:values",{min:c,max:s})},800);a.onvalue(i),r.watch(()=>n.values,()=>{n.values&&a.setValues(n.values)},{immediate:!0});function l(){a.cleanValues()}return(c,s)=>{const u=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",fr,[r.createElementVNode("div",pr,[r.createVNode(r.unref(R.FormField),{name:"min",label:"More than",type:"number"}),r.createVNode(r.unref(R.FormField),{name:"max",label:"Less than",type:"number"})]),r.createElementVNode("div",mr,[r.createVNode(u,{label:"Clear",onClick:l})])])}}}),Lt=M(gr,[["__scopeId","data-v-f9cd559e"]]),I={getEntityLink(e,t){return`/forms/${e}/${t}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:ir,Entity:ur,Decimal:Lt,Integer:Lt},arrayListCellHandlers:[],arrayListRowHandlers:[],arrayFieldParamsHandlers:[]};function hr(e){dr();for(let t in e)I[t]=e[t]}const yr={props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>r.h(I.iconTag,{class:I.iconHandler?I.iconHandler(n):`icon icon-${n}`},I.iconHandlerText(n))}},Ee=M(yr,[["__scopeId","data-v-8a72b45f"]]),vr=Ke(Ye("setup-list-row"));function wr(e,t){const n=e.config.map(o=>br(o,e,t));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function br(e,t,n){const o=t.values;let a=Oe(e,o);Array.isArray(a)&&(a=a.join(", "));const i={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(f){i.onClick.push(()=>f(o,e,n))}function c(f){Array.isArray(f)?i.class.push(...f):i.class.push(f)}const s=[],u=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(r.h(R.FormField,{type:"single-checkbox",modelValue:t.selected})),l(Ft.bind(null,n,!0));break}case"select":{u.push(r.h(R.FormField,{type:"single-radio",modelValue:t.selected})),l(Ft.bind(null,n,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const f=e.link(o);if(f){const d=r.h(ue.RouterLink,{to:f});u.push(d),c("widget-table-cell_link")}}catch(f){vr("Can't add router link",f)}if(e.href&&(u.push(r.h("a",{href:e.href(o),target:"_blank"})),c("widget-table-cell_link")),(typeof a=="string"||typeof a=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},a)),e.icon&&(typeof e.icon=="string"&&u.push(r.h(Ee,{name:e.icon})),typeof e.icon=="function")){const f=e.icon(o);f!==null&&u.push(r.h(Ee,{name:f}))}return e.class&&(typeof e.class=="function"?c(e.class(o)):c(e.class)),I.listCellHandler&&(console.log("listCellHandler is deprecated. Please use coreUtils.addListCellHandler instead."),I.listCellHandler(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),I.arrayListCellHandlers&&I.arrayListCellHandlers.forEach(f=>f(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),s.push(r.h("td",i,u)),s}function Ft(e,t){e.emit("select",t)}function ct(e,t){return()=>{try{return wr(e,t)}catch(n){return console.warn(n),null}}}const Er={props:{values:Object,config:Object,selected:Boolean},setup:ct},_r=["colspan"],xt=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=t,o=r.ref();return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(a,i)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:a.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.component),r.mergeProps(a.$attrs,{values:a.values,new:a.isNew,onClose:i[0]||(i[0]=l=>n("close")),onSave:i[1]||(i[1]=l=>n("save",l))}),null,16,["values","new"]))],8,_r)],512))}}),Qe="update:selectedRows",kr="update:activeRow",Kt=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},rowOptionsHandler:{type:Function,default:()=>({})}},emits:["save","order"],setup(e,{emit:t}){const n=e,o=r.ref(),a=t,i=r.useSlots(),l=r.computed(()=>{var m;return(m=i==null?void 0:i.default)==null?void 0:m.call(i)[0]});function c(){const h=n.selectedRows.length!==0?[]:[...n.array];a(Qe,h)}function s(m,h=!0){if(!n.selectedRows)return;if(!h)return a(Qe,n.selectedRows.includes(m)?[]:[m]);const g=[...n.selectedRows],v=g.indexOf(m);return v===-1?g.push(m):g.splice(v,1),a(Qe,g)}function u(m){a(kr,m)}function f(m){a("save",m),a("update:activeRow",null)}const d=r.computed(()=>{const m=n.config.filter(h=>h.visible!==!1);return n.shortcut?m.filter(h=>h.name?!!n.array.find(g=>![null,""].includes(Oe(h,g))):!0):m});r.watch(()=>n.activeRow,(m,h)=>{m===null&&typeof h=="number"&&setTimeout(()=>{if(!o.value)return;const g=o.value.querySelector(`tbody>tr:nth-child(${h+1})`)||o.value;g&&g.scrollIntoView({block:"center",behavior:"smooth"})},100)});function b(m){var g;const h={};return(g=I.arrayListRowHandlers)==null||g.forEach(v=>{try{Object.assign(h,v(m,n.rowOptionsHandler()))}catch{console.warn("Problem with arrayListRowHandler.")}}),h}return(m,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",{class:"widget-table",ref_key:"refTable",ref:o},[r.createElementVNode("thead",null,[r.createVNode(Xn,{config:d.value,onOrder:h[0]||(h[0]=g=>m.$emit("order",g))},{default:r.withCtx(g=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.$slots["head-cell"]||Ht),r.mergeProps(g,{onSelect:c}),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.array,(g,v)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:v},[r.createVNode(Er,r.mergeProps({test:v,config:d.value,values:g,selected:m.selectedRows.includes(g),onSelect:_=>s(g,_),onActivate:_=>u(v),class:m.classCallback?m.classCallback(g,v):"",ref_for:!0},b(g)),null,16,["test","config","values","selected","onSelect","onActivate","class"]),l.value&&m.activeRow===v?(r.openBlock(),r.createBlock(xt,{key:0,component:l.value,"row-length":m.config.length,values:g,onClose:h[1]||(h[1]=_=>a("update:activeRow",null)),onSave:f,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),m.activeRow===r.unref(S).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(xt,{key:0,component:l.value,"row-length":d.value.length,onClose:h[2]||(h[2]=g=>a("update:activeRow",null)),onSave:f,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],512),r.renderSlot(m.$slots,"footer")]))}}),Cr=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),Le=M(Cr,[["__scopeId","data-v-0ef9ae88"]]),Tr={class:"widget-button"},Sr=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("button",Tr,[t.wait?(r.openBlock(),r.createBlock(Le,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),Ar=M(Sr,[["__scopeId","data-v-450dc564"]]),Ir={class:"widget-multi-button-wrap position_relative cursor_pointer"},Nr={class:"widget-multi-button-body grid"},Rr=["onClick"],Or={class:"widget-multi-button-side-wrap"},Lr=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(l=>({"04895bf1":o.value}));const t=e,n=r.reactive({active:!1,wait:!1}),o=r.computed(()=>t.array.length+(t.label?1:0));function a(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function i(l=!n.active){n.active=l}return(l,c)=>(r.openBlock(),r.createElementBlock("div",Ir,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Nr,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>i())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,u)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:f=>{a(s.callback),i(!1)}},r.toDisplayString(s.label),9,Rr))),128))]),r.createElementVNode("div",Or,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>i())},[n.wait?(r.openBlock(),r.createBlock(r.unref(Le),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(Ee),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),Fr=M(Lr,[["__scopeId","data-v-d43a76ce"]]),xr={class:"widget-loader flex flex-align_center gap_10 padding_15"},Br={class:"text_md"},Xe=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",xr,[r.createVNode(Le,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",Br,r.toDisplayString(t.label),1)]))}}),Vr=["alt","src"],$r=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=r.ref();return r.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(o,a)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:n,src:o.src||o.$props.default},null,8,Vr))}}),Dr={props:{config:Array,values:Object,selected:Boolean},setup:ct},Pr=M(Dr,[["__scopeId","data-v-344a8cc1"]]),Mr=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),jr={class:"widget-list-head-cell"},Ur=Mr(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Wr=r.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e,o=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(a,i)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",jr,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":a.minWidth,"max-width":a.maxWidth,width:a.width})},[a.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,type:"single-checkbox",onClick:i[0]||(i[0]=r.withModifiers(l=>o("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:i[1]||(i[1]=l=>o("order"))},r.toDisplayString(a.title||a.label),1))],4),a.name&&a.order.length&&a.order[0]===a.name?(r.openBlock(),r.createBlock(r.unref(Ee),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":a.order.length>1&&a.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),Ur])]))}}),Hr=M(Wr,[["__scopeId","data-v-bf495d6a"]]),qr=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,o=t,a=r.ref(),i=r.ref();r.onMounted(()=>{function u(h,g){let v=-1;do v++,g-=h[v];while(g>0&&v<h.length);return v}function f(h,g){let v=0;for(;g>0&&g>h[v]&&v<h.length;)g-=h[v],v++;return console.log(g,v),v>0?v:0}function d(h){try{i.value.style.insetInlineStart=h+"px"}catch(g){console.log(g)}}function b(h){try{i.value.style.width=h+"px",i.value.style.minWidth=h+"px",i.value.style.maxWidth=h+"px"}catch(g){console.log(g)}}function m(h){return h===null?!1:h.classList.contains("head-cell-resize")}a.value.addEventListener("pointerdown",function(g){var xe;function v(W){return W.screenX+w-T}const _=a.value,p=[..._.children].filter(W=>W.localName==="th"),w=((xe=_.offsetParent)==null?void 0:xe.scrollLeft)||0,y=p.map(W=>W.clientWidth),C=m(g.target),T=_.getBoundingClientRect().left,E=v(g),k=u(y,E),O=y.slice(0,k).reduce((W,G)=>W+G,0),V=E-O,P=_.offsetWidth,te=p[k].clientWidth;if(n.config[k].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",y),console.log("max width",P),console.log("Start Position",E),console.log("Position From",k),console.log("Start Position",k),console.log("Global offset (Отступ самой таблицы от края экрана)",T),console.log("Del",V),console.groupEnd(),i.value.innerText=p[k].textContent||"",i.value.style.display="grid",i.value.style.width=te+"px",i.value.style.cursor="grabbing",d(O),b(te),document.addEventListener("pointermove",re,{passive:!0}),document.addEventListener("pointerup",F);function F(W){if(console.group("END"),document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",F),C&&(n.config[k].width=i.value.style.width,n.config[k].minWidth=i.value.style.width,n.config[k].maxWidth=i.value.style.width,l(n.config)),!C){const G=W.screenX+w-T;console.log("ENP Position",G);const pe=f(y,G);if(console.log(k,"->",pe),pe!==k){const le=n.config[k],me=n.config;me.splice(k,1),me.splice(pe,0,le),l(me)}else{const le=n.config[k].name;c(le)}}i.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function re(W){if(C){const le=v(W)-E+te;b(le);return}let G=W.screenX+w-T-V;G<0&&(G=0),G+te>P&&(G=P-te),d(G)}})});function l(u){o("update:config",u)}function c(u){if(!u)return;if(Array.isArray(u)){if(u.length<1)return;u=u[0]}if(n.order.length===0||n.order[0]!==u)return void s([u]);const f=n.order.length===1||n.order[1]==="asc"?"asc":"desc";s([u,f==="asc"?"desc":"asc"])}function s(u){o("update:order",u)}return(u,f)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:a},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.config,(d,b)=>(r.openBlock(),r.createBlock(Hr,r.mergeProps({key:d,ref_for:!0},d,{onOrder:m=>c(d.name),onSelect:f[0]||(f[0]=m=>o("select")),order:u.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:i},"test",512)],512))}}),Gr=M(qr,[["__scopeId","data-v-ccffc6bd"]]),zr={class:"widget-list"},Kr={class:"widget-list-body position_relative"},Yr=50,Xr=r.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e,o=t;function a(s,u=!0){if(n.selectedRows)if(!u)l(n.selectedRows.includes(s)?[]:[s]);else{const f=[...n.selectedRows],d=f.indexOf(s);d===-1?f.push(s):f==null||f.splice(d,1),l(f)}}function i(){var s;if(((s=n.selectedRows)==null?void 0:s.length)!==n.array.length)return l([...n.array]);l([])}function l(s){o("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+Yr>u.scrollHeight&&o("scrollEnd")}return(s,u)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",zr,[r.createElementVNode("thead",null,[r.createVNode(Gr,{onSelect:u[0]||(u[0]=f=>i()),"onUpdate:order":u[1]||(u[1]=f=>o("update:order",f)),"onUpdate:config":u[2]||(u[2]=f=>o("update:config",f)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",Kr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(f,d)=>{var b;return r.openBlock(),r.createBlock(Pr,{key:d,class:"widget-list-row",values:f,config:s.config,selected:(b=s.selectedRows)==null?void 0:b.includes(f),onSelect:m=>a(f,m)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function ut(){var i;const e=r.computed(()=>Object.keys(n).length===0||Object.values(n).includes(!0)),t=(i=r.getCurrentInstance())==null?void 0:i.uid;if(!t)throw"Undefined instance. Please check it.";const n=r.reactive({});r.provide(S.VISIBLE_ITEM_PROVIDE_NAME,{show(l){n[l]=!0},hide(l){n[l]=!1},remove(l){delete n[l]}});const o=r.inject(S.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(t)},hide(){o==null||o.hide(t)},remove(){o==null||o.remove(t)}},visibleItems:n}}function Yt(e){const t={name:e,entity:r.inject(S.PROVIDE_ENTITY_NAME)};if(!t.name)throw new Error("Field without name try use metadata.");const n=r.ref(!1),o=r.ref(null);return e.split(".").reduce((a,i,l,c)=>l===c.length-1?a:a.then(()=>{var u,f;const s=(f=(u=o.value)==null?void 0:u.fieldsByName[i])==null?void 0:f.referencedEntity;if(!s)throw new Error("---");return ee.initEntity(s).then(()=>s)}).then(s=>{o.value=ee.get(s),t.entity=s,t.name=c[l+1]}),Promise.resolve().then(()=>ee.initEntity(t.entity)).then(()=>{o.value=ee.get(t.entity)})).finally(()=>n.value=!0),r.computed(()=>{if(!n.value||!o.value)return;const a=o.value.fieldsByName[t.name];if(a)return a})}const Jr=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{},usageContext:{type:Boolean,default:!0}},setup(e){const t=e,n=R.Form.getParentForm();Fe();const o=_t(),a=r.computed(()=>{var h,g,v;const d=c.value,b=s(d),m={type:b,disabled:t.usageContext?!((h=l.value)!=null&&h.canSet):!1,label:t.label};return b==="Decimal"&&((v=(g=d==null?void 0:d.presentationType)==null?void 0:g.toLowerCase)==null?void 0:v.call(g))==="money"&&(m.money=!0),d&&Object.assign(m,{suffix:d.valueUnit||void 0,label:t.label||d.displayName}),Array.isArray(I.arrayFieldParamsHandlers)&&I.arrayFieldParamsHandlers.forEach(_=>Object.assign(m,_(d,l.value,m,n,t.name))),m}),i=["MultiText","MultiWideText"],l=r.computed(()=>{var d;return(d=o==null?void 0:o.value)==null?void 0:d.fields[t.name]}),c=Yt(t.name);function s(d){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(d){if(d.type==="Reference"||d.type==="Owned")return d.referencedEntity;if(d.dataType==="Boolean")return"single-checkbox";if(d.dataType==="DateTime")return"date";if(d.dataType==="Integer"||d.dataType==="Decimal")return"number";if(d.dataType==="List")return d.aggregatedEntity;if(i.includes(d.presentationType))return"textarea";if(d.presentationType==="PhoneNumber")return"tel"}return"text"}const u=r.computed(()=>{var d;return t.usageContext?((d=l.value)==null?void 0:d.canGet)===!0:!0}),{controller:f}=ut();return r.watch(()=>u.value,d=>d?f.show():f.hide(),{immediate:!0}),r.onUnmounted(()=>f.remove()),(d,b)=>u.value?(r.openBlock(),r.createBlock(r.unref(R.FormField),r.mergeProps({key:0},{...d.$attrs,...a.value},{name:d.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function Qr(e){return Array.isArray(e)&&(e==null?void 0:e[1])||S.DEFAULT_ORDER_DIR}const Zr=["fill"],eo=r.createElementVNode("path",{d:"M440-647 244-451q-12 12-28 11.5T188-452q-11-12-11.5-28t11.5-28l264-264q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l264 264q11 11 11 27.5T772-452q-12 12-28.5 12T715-452L520-647v447q0 17-11.5 28.5T480-160q-17 0-28.5-11.5T440-200v-447Z"},null,-1),to=[eo],no=r.defineComponent({__name:"widget-icon-arrow-up",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},to,8,Zr))}}),ro={class:"widget-fast-table-head-cell-td"},oo={key:1,class:"widget-head-cell-label"},ao={key:2,class:"widget-head-cell-order"},io=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{},type:{},isFullSelected:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=r.computed(()=>lt(n.name));r.computed(()=>Qr(n.order));const a=t;function i(){a("select")}return(l,c)=>{var s;return r.openBlock(),r.createElementBlock("td",ro,[r.createElementVNode("div",{class:r.normalizeClass(["widget-head-cell",[l.type==="multi-select"?"justify-content-center":""]]),onClick:c[0]||(c[0]=u=>l.$emit("order",l.name))},[l.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,"model-value":l.isFullSelected,onClick:i,type:"single-checkbox"},null,8,["model-value"])):(r.openBlock(),r.createElementBlock("span",oo,r.toDisplayString(l.label),1)),o.value===((s=l.order)==null?void 0:s[0])?(r.openBlock(),r.createElementBlock("div",ao,[r.createVNode(no,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${l.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)],2)])}}}),Xt=M(io,[["__scopeId","data-v-d131e64e"]]),so=["fill"],lo=r.createElementVNode("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"},null,-1),co=[lo],uo=r.defineComponent({__name:"widget-icon-keyboard-arrow-down",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},co,8,so))}}),fo={class:"widget-filter-item-popup"},po=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filters:{},filterItem:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,a=I.tableFilterEntityBind,i=r.ref(),l=r.computed(()=>{const m=n.filterItem;return m.entity?"Entity":m.type?m.type:null});function c(m){s.value=m==="start"}const s=r.ref(!1),u=r.computed(()=>Array.isArray(n.values)||typeof n.values=="string"?n.values.length>0:!!n.values),f=r.ref(!1);let d=null;function b(m=!f.value){f.value=m,!f.value&&d?(d(),d=null):i.value&&(d=R.utils.clickOutside(i.value,b.bind(null,!1)))}return(m,h)=>{var g;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:i},[r.createElementVNode("div",{class:r.normalizeClass(["widget-filter-item",{"widget-filter-item_active":u.value}]),onClick:h[0]||(h[0]=()=>b())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":u.value}])},r.toDisplayString(m.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(Le,{key:0})):(r.openBlock(),r.createBlock(uo,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":f.value})},null,8,["class"]))],2),r.withDirectives(r.createElementVNode("div",fo,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((g=r.unref(a))==null?void 0:g[l.value]),{key:0,"filter-metadata":m.filterItem,values:m.values,filters:m.filters,"base-entity":m.entity,onClear:h[1]||(h[1]=v=>o("clear")),"onUpdate:values":h[2]||(h[2]=v=>o("update:values",v)),onReadProcess:c},null,40,["filter-metadata","values","filters","base-entity"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Jt=M(po,[["__scopeId","data-v-43ed0322"]]),mo={class:"widget-table-search flex"},go=["value","placeholder"],ho=r.defineComponent({__name:"widget-table-search",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(a){const i=a.target;if(!i)return;const l=i.value;n("update:modelValue",l)}return(a,i)=>(r.openBlock(),r.createElementBlock("div",mo,[r.createVNode(Ee,{class:"widget-table-search-icon"},{default:r.withCtx(()=>[r.createTextVNode("search")]),_:1}),r.createElementVNode("input",{class:"widget-table-search-input",type:"text",alt:"Searching for data in a table",value:a.modelValue,onInput:o,placeholder:r.unref(q)("Filter by random text")},null,40,go)]))}}),yo=M(ho,[["__scopeId","data-v-b712f344"]]),vo={class:"widget-table-panel-filter flex"},wo={class:"flex"},bo=r.defineComponent({__name:"widget-table-panel-filters",props:{filtersConfig:{},filters:{},entity:{},search:{}},emits:["update:filters","update:search"],setup(e,{emit:t}){const n=e,o=t;function a(l,c){o("update:filters",{...n.filters,[l]:c})}function i(l){const c={...n.filters};delete c[l],o("update:filters",c)}return(l,c)=>(r.openBlock(),r.createElementBlock("div",vo,[r.createVNode(yo,{"model-value":l.search,"onUpdate:modelValue":c[0]||(c[0]=s=>o("update:search",s))},null,8,["model-value"]),r.createElementVNode("div",wo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.filtersConfig,(s,u)=>{var f;return r.openBlock(),r.createBlock(Jt,{key:u,entity:l.entity,"filter-item":s,values:(f=l.filters)==null?void 0:f[r.unref(ae)(s)],filters:l.filters,"onUpdate:values":d=>a(r.unref(ae)(s),d),onClear:d=>i(r.unref(ae)(s))},null,8,["entity","filter-item","values","filters","onUpdate:values","onClear"])}),128))])]))}}),Eo=M(bo,[["__scopeId","data-v-8f09ec8d"]]);function Qt(e,t){const n=document.createElement("a");n.href=e,t!=null&&t.blank&&(n.target="_blank"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{n.remove()},100)}function Zt(e,t){return L().emit("batch:delete",{...t,entity:e})}const _o={class:"widget-fast-table-tools flex gap-15"},ko=r.defineComponent({__name:"widget-fast-table-tools",props:{tools:{},loading:{type:Boolean},selectedRows:{},metadata:{},canCreate:{type:Boolean},canDelete:{type:Boolean},externalTools:{}},emits:["reload","export","new"],setup(e,{emit:t}){const n=e,o=ue.useRouter(),a=t,i=[{name:"export",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:g=>a("export",g)},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>a("reload")},{name:"new",label:"Add New",icon:"new",buttonStyle:"primary",callback:()=>a("new")}],l=r.inject(S.PROVIDE_NAME_ACTIONS,null),c=r.computed(()=>(Array.isArray(n.tools)?n.tools:[]).reduce((g,v)=>(v.name==="*"?g.push(...i.map(_=>({..._,system:!0}))):g.push(v),g),[]));function s(g){return i.find(v=>v.name===g.name)}function u(g){return{...g,label:g.label||"Batch delete",callback:async()=>{const v=n.metadata,_=v.name,p=n.selectedRows||[];if(n.selectedRows.length===0)return Ie.add("error","Kindly select at least one record to delete");if(!await U.promptModal(S.MODAL_CONFIRM,{message:`Confirm deletion of ${n.selectedRows.length} entries.`}))return;const y=qe(_),C=p.map(T=>({primaryKey:T[y],version:v.versioned?T.Version:void 0}));await Zt(_,{elements:C}).then(T=>{T.forEach(E=>{E.type==="reject"&&D("error")(E.data)})}).catch(D("error")),a("reload")}}}function f(g){return{...g,label:g.label||"Batch update",callback:async()=>{const v=n.metadata,_=v.name,p=n.selectedRows||[];if(n.selectedRows.length===0)return Ie.add("error","Kindly select at least one record to update");const w=await U.promptModal(S.MODAL_BATCH_VALUES,{entity:_,availableFields:g.availableFields||[]});if(!w)return;const y=qe(_),C=p.map(T=>({primaryKey:T[y],version:v.versioned?T.Version:void 0}));await fn(_,{values:w,elements:C}).then(T=>{T.forEach(E=>{E.type==="reject"&&D("error")(E.data)})}).catch(D("error")),a("reload")}}}function d(g){return{...g,callback:()=>o.push(g.to)}}function b(g){return{...g,callback:()=>{const v=mn(g.filename);Qt(v,{blank:!0})}}}const m=r.computed(()=>{var _;const g=((_=l==null?void 0:l.actions)==null?void 0:_.value)||[],v=[];return c.value.forEach(p=>{if(!(typeof p.override=="string"&&!g.find(w=>w.name===p.override))){if(s(p)){if(p.system&&c.value.find(y=>y.name===p.name&&!y.system)||p.name==="new"&&!n.canCreate)return;const w=i.find(y=>y.name===p.name);if(w){const y=Object.assign({},w,{callback:()=>w.callback(p.params||{})});return v.push(y)}}if(p.name==="redirect")return v.push(d(p));if(p.name==="batch-update")return v.push(f(p));if(p.name==="batch-delete"&&n.metadata.canDelete)return v.push(u(p));if(p.name==="static-file")return v.push(b(p));{const w=g.find(y=>y.name===p.name);if(w)return v.push({label:w.title,...p,callback:()=>h(w)})}}}),Array.isArray(n.externalTools)&&v.push(...n.externalTools),v.map(p=>({...p,process:se(p.callback)}))});function h(g){var p;const v=(p=g.action.parameters.find(w=>w.dataTypeName==="IntegerArray"))==null?void 0:p.name,_={};return v&&(_[v]=n.selectedRows.map(w=>{if(!(typeof w=="object"&&w!==null))return null;const y=n.metadata.fieldNameForIdentification;return y?w[y]:null})),g.callback(_)}return(g,v)=>{const _=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",_o,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,p=>(r.openBlock(),r.createBlock(_,{label:r.unref(q)(p.label),title:p.name,icon:p.icon,type:p.buttonStyle,loading:p.name==="reload"?g.loading:p.process.loading,onClick:()=>p.process.call()},null,8,["label","title","icon","type","loading","onClick"]))),256)),r.renderSlot(g.$slots,"default")])}}});function Co(e,t){const n=zt(),o=ue.useRouter();let a=null;const i=r.reactive({entity:null,mark:null,settings:null});function l(y){const C={...d.value,...y};c(C)}function c(y){{const C=y.prefilters;C&&(Object.keys(C).forEach(T=>{var k,O;const E=C[T];Array.isArray(C[T])&&C[T].length===0&&i.settings&&!((O=(k=i.settings)==null?void 0:k.prefilters)!=null&&O[T])&&delete C[T],Pn(E)&&(typeof E.min!="number"&&delete E.min,typeof E.max!="number"&&delete E.max,Object.keys(E).length===0&&delete C[T])}),R.utils.isEmptyObject(C)&&delete y.prefilters)}localStorage.setItem(f(i.entity,a),JSON.stringify(y)),t&&t()}function s(){return i.entity?JSON.parse(localStorage[f(i.entity,a)]||"{}"):null}function u(y,C){i.entity=y,i.mark=C,m.call()}function f(y,C){return"list-configuration:"+y+(C?"-"+C:"")}const d=r.computed(()=>i.entity?JSON.parse(n[f(i.entity,a)]||"{}"):null),b=r.computed(()=>i.settings?at(i.entity,i.settings.config,{router:o,activate:e}):[]),m=se(async function(){if(!i.entity)return;const C=await ln(i.entity,i.mark);i.settings=Object.freeze(C),a=C.mark,t&&t()}),h=r.computed(()=>{var T;const y=d.value.order||null,C=((T=i.settings)==null?void 0:T.order)||null;return y||C||[]}),g=r.computed(()=>{var T;const y=d.value.prefilters||{};return{...((T=i.settings)==null?void 0:T.prefilters)||{},...y}}),v=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.filters)||[]}),_=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.label)||null}),p=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.tools)||[]}),w=r.computed(()=>!R.utils.isEmptyObject(d.value));return{state:i,get customFilters(){return i.settings.customFilters||[]},set:u,get:s,configuration:d,update:l,computedPrefilter:g,computedFiltersConfiguration:v,get cellConfig(){return i.settings?at(i.entity,i.settings.config,{router:o,activate:e}):[]},get prefilters(){var y;return((y=s())==null?void 0:y.prefilters)||i.settings.prefilters||{}},get order(){var y;return((y=s())==null?void 0:y.order)||i.settings.order||[]},clean(){localStorage.removeItem(f(i.entity,a)),t&&t()},cellConfiguration:b,computedLabel:_,computedTools:p,computedHasLocalConfiguration:w,computedOrder:h,get displayModeForNew(){return i.settings.displayModeForNew||"inline"}}}var we;class en{constructor(t){Ve(this,we);this.unloaded=!1,this.offset=0,this.array=r.reactive([]),he(this,we,null),this.process=se(this.load.bind(this)),this.entity=t,this.limit=50}set options(t){he(this,we,t)}get requestReadOptions(){return Object.assign({},Be(this,we)||null,{offset:this.offset,limit:this.limit})}async next(){this.unloaded||this.process.loading||await this.process.call()}reload(){return this.clear(),this.next()}clear(){this.array.splice(0,this.array.length),this.offset=0,this.unloaded=!1}get loading(){return this.process.loading}init(t){this.options=t,this.clear()}async load(){const t=await de(this.entity,this.requestReadOptions);this.addData(t),t.length!==this.limit&&(this.unloaded=!0)}addData(t){this.array.push(...t.map(n=>Object.freeze(n))),this.offset+=t.length}}we=new WeakMap;function To(e,t){const n=setInterval(()=>{So(t)&&e.next()},2e3);r.onUnmounted(()=>{clearInterval(n)})}function So(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const Ao=["count","test"],Io={class:"widget-fast-table-head"},No={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},Ro={class:"widget-fast-table-body"},Oo=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean},hideActions:{type:Boolean},disableUsageContext:{type:Boolean},externalTools:{},selectedRows:{}},emits:["update:selectedRows"],setup(e,{expose:t,emit:n}){const o=n,a=e,i=ue.useRouter(),l=r.computed(()=>!Array.isArray(a.selectedRows)),c=r.ref([]),s=r.computed(()=>{const A=new Set(l.value?c.value:a.selectedRows);return g.value.filter(x=>A.has(R.utils.getPropFromObject(x,w.value)))});function u(A){const x=A.map(K=>R.utils.getPropFromObject(K,w.value));if(l.value)return c.value=x;o("update:selectedRows",x)}const f=r.ref(null),d=r.computed(()=>f.value?g.value.indexOf(f.value[2]):null);function b(A,x,K){f.value=[A,x,K]}const m=new en(a.entity),h=r.ref(""),g=r.computed(()=>{if(!Array.isArray(re.value))return[];if(h.value.length===0)return m.array;const A=h.value.toLowerCase();return m.array.filter(x=>!!re.value.find(ge=>{const J=Oe(ge,x);return typeof J=="string"?J.toLowerCase().includes(A):!1}))}),v=r.ref(null),_=R.Form.getParentForm(),p=Fe(a.entity),w=r.computed(()=>p.value.fieldNameForIdentification),{state:y,update:C}=_t(a.entity,{masterEntities:a.masterEntities||[]}),T=se(async()=>{try{c.value=[],await m.reload(),a.disableUsageContext||await C()}catch(A){const{message:x}=gt(A);v.value=x}});_ instanceof R.Form&&_.subscribe({read:T.call.bind(null),name:a.entity,type:"table"}),r.watch(()=>a.mark,()=>{F.set(a.entity,a.mark)});function E(){return N.and(N(F.prefilters),N(a.binding||{}))}const{controller:k}=ut();r.watch(()=>y.value,A=>{A&&(A.canRead?k.show():k.hide())},{immediate:!0});let O=[Ne.on("affected-entity",A=>{A.name===a.entity&&T.call()}),Ne.on("display-entity",async A=>{A.name===a.entity&&(m.loading&&await m.process.promise,b(A.name,A.primaryKey,g.value.find(x=>x[w.value]===A.primaryKey)))})];r.onUnmounted(()=>{O.map(A=>A()),k.remove()});function V(A){function x(J){return Array.isArray(J)?x(J[0]):typeof J!="string"?null:J}const K=x(A);if(!K)return;const ge=F.order;P("order",ge[0]!==K?[K,"asc"]:ge[1]==="desc"?[]:[K,"desc"])}function P(A,x){F.update({[A]:x})}const te=r.computed(()=>T.wait),F=Co(b,()=>{m.init({customFilters:F.customFilters,fields:yt(re.value).join(" "),order:F.order,filter:E(),useContextFilter:F.state.settings.useContextFilter}),m.next()}),re=F.cellConfiguration;F.set(a.entity,a.mark),r.watch(()=>F.state.settings,()=>setTimeout(T.call,50));const xe=r.computed(()=>F.state.settings);t({listSettings:xe,array:g,config:re,listDataController:m,selectedRows:s,selectedPrimaryKeys:c,listController:F});function W(A){U.openModal(S.MODAL_LIST_DOWNLOAD,{entity:a.entity,cellConfig:F.cellConfig,order:F.order,prefilters:E(),customFilters:F.customFilters,params:A,selectedRows:s.value})}function G(){switch(F.displayModeForNew){case"modal":return U.openModal(S.MODAL_ENTITY,{entity:a.entity});case"form":return i.push(Et(a.entity));case"inline":return f.value=[a.entity]}}function pe(){F.clean()}function le(){return{entity:a.entity}}const me=r.ref();return r.onMounted(()=>{To(m,me.value)}),(A,x)=>{var J,Tt,St;const K=r.resolveComponent("widget-button"),ge=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",{class:"widget-fast-table",count:s.value.length,test:f.value},[r.createElementVNode("div",Io,[r.unref(F).computedLabel.value&&!A.hideLabel?(r.openBlock(),r.createElementBlock("p",No,r.toDisplayString(r.unref(q)(r.unref(F).computedLabel.value)),1)):r.createCommentVNode("",!0),r.unref(p)&&!A.hideActions?(r.openBlock(),r.createBlock(ko,{key:1,metadata:r.unref(p),tools:r.unref(F).computedTools.value,loading:te.value,"selected-rows":s.value||[],onReload:r.unref(T).call,onExport:W,onNew:G,"can-create":((J=r.unref(y))==null?void 0:J.canCreate)||!1,"can-delete":((Tt=r.unref(y))==null?void 0:Tt.canDelete)||!1,"can-update":((St=r.unref(y))==null?void 0:St.canUpdate)||!1,externalTools:A.externalTools||[]},{default:r.withCtx(()=>[r.renderSlot(A.$slots,"tools",{},void 0,!0),r.unref(F).computedHasLocalConfiguration.value?(r.openBlock(),r.createBlock(K,{key:0,onClick:pe,type:"primary",label:r.unref(q)("Clear all filters")},null,8,["label"])):r.createCommentVNode("",!0)]),_:3},8,["metadata","tools","loading","selected-rows","onReload","can-create","can-delete","can-update","externalTools"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Ro,[r.createVNode(Eo,{search:h.value,"onUpdate:search":x[0]||(x[0]=Y=>h.value=Y),entity:A.entity,"filters-config":r.unref(F).computedFiltersConfiguration.value,filters:r.unref(F).computedPrefilter.value,"onUpdate:filters":x[1]||(x[1]=Y=>P("prefilters",Y))},null,8,["search","entity","filters-config","filters"]),r.createVNode(r.unref(Kt),{config:r.unref(re),array:g.value,"active-row":d.value,"onUpdate:activeRow":x[3]||(x[3]=Y=>f.value=null),onOrder:V,class:"table main-table","selected-rows":s.value,"onUpdate:selectedRows":u,"row-options-handler":le},{"head-cell":r.withCtx(Y=>{var Ce,At,It;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(A.$slots["head-cell"]?A.$slots["head-cell"]:Xt),r.mergeProps({label:Y.label},Y,{onOrder:V,order:r.unref(F).computedOrder.value,type:Y.type,"is-full-selected":((Ce=s.value)==null?void 0:Ce.length)===((At=g.value)==null?void 0:At.length)&&((It=g.value)==null?void 0:It.length)>0}),null,16,["label","order","type","is-full-selected"]))]}),footer:r.withCtx(()=>[r.createElementVNode("div",{style:{padding:"10px"},ref_key:"endOfTheScroll",ref:me},null,512)]),default:r.withCtx(()=>{var Y,Ce;return[r.createVNode(ge,{entity:(Y=f.value)==null?void 0:Y[0],"primary-key":((Ce=f.value)==null?void 0:Ce[1])||null,"master-entities":A.masterEntities||void 0,binding:A.binding,onFormUpdate:x[2]||(x[2]=()=>{f.value=null,r.unref(m).reload()})},null,8,["entity","primary-key","master-entities","binding"])]}),_:1},8,["config","array","active-row","selected-rows"])])],8,Ao)}}}),Lo=M(Oo,[["__scopeId","data-v-49d95223"]]);function tn(e,t={},n={}){const o=r.inject(S.PROVIDE_NAME_ACTIONS,null),a=typeof e=="string"?e:t,i=typeof t=="string"?n:t;return r.computed(()=>{var s;const c=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(u=>u.name===a);return c?{...c,...i}:null})}const Fo=r.defineComponent({__name:"widget-action",props:{name:{},overrideParams:{}},setup(e){const t=e,n=tn(t.name,t.overrideParams||{}),o=r.computed(()=>{if(n.value)return se(n.value.callback)});return(a,i)=>{var c;const l=r.resolveComponent("widget-button");return r.unref(n)?(r.openBlock(),r.createBlock(l,{key:0,label:r.unref(n).label,loading:((c=o.value)==null?void 0:c.loading)||!1,onClick:i[0]||(i[0]=()=>{var s,u;return(u=(s=o.value)==null?void 0:s.call)==null?void 0:u.call(s,a.overrideParams||{})})},null,8,["label","loading"])):r.createCommentVNode("",!0)}}}),xo=r.defineComponent({__name:"WidgetResolverEntity",setup(e){const t=ue.useRouter(),n=ue.useRoute();function o(){const a=n.params.entity,i=n.params.primaryKey;vt(a,i).then(l=>t.replace(Et(l,i))).catch(l=>{D("error")(l),t.back()})}return r.onMounted(o),(a,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(Xe,{label:"Loading..."})]))}}),Bo=r.defineComponent({__name:"modal-list-download",props:{entity:{},cellConfig:{},prefilters:{},order:{},customFilters:{},params:{},selectedRows:{}},setup(e){const t=e,n=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:a,reject:i,start:l,init:c}=Fn("csv",t.params.overrideEntity||t.entity,t.cellConfig,t.prefilters,t.order,150,t.customFilters,{...t.params||{},selectedRows:t.selectedRows||[]});return U.onBeforeModalClose(i),r.onMounted(async()=>{await c(),l()}),r.watch(()=>o.finished,()=>{a(),U.popModal()}),(s,u)=>{const f=r.resolveComponent("widget-button"),d=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(d,null,{footer:r.withCtx(()=>[r.createVNode(f,{onClick:u[0]||(u[0]=b=>{r.unref(a)(),r.unref(U.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(Xe,{label:"Loading"})])]),_:1})}}}),nn=e=>(r.pushScopeId("data-v-66cf2326"),e=e(),r.popScopeId(),e),Vo={class:"version-item"},$o={class:"text_md"},Do={class:"version-item-date text_md"},Po=nn(()=>r.createElementVNode("span",null,null,-1)),Mo=nn(()=>r.createElementVNode("span",null,null,-1)),jo={class:"text_sm"},Uo={class:"text_sm line-clamp_5"},Wo={class:"text_sm line-clamp_5"},Ho=r.defineComponent({__name:"version-item",props:{selectedFields:{},date:{},customerName:{},version:{},changes:{},entity:{}},setup(e){const t=e;function n(i,l){const c=i.name.toLowerCase(),s=l.name.toLowerCase();return s==="version"?-1:c==="version"?1:s.startsWith("utc")?-1:c.startsWith("utc")?1:0}const o=r.computed(()=>[...t.changes||[]].sort(n)),a=r.computed(()=>(o.value||[]).filter(i=>Array.isArray(t.selectedFields)&&t.selectedFields.length!==0?t.selectedFields.includes(i.name):!0));return(i,l)=>(r.openBlock(),r.createElementBlock("div",Vo,[r.createElementVNode("span",$o,[r.createElementVNode("b",null,r.toDisplayString(i.version),1)]),r.createElementVNode("span",Do,[r.createElementVNode("b",null,r.toDisplayString(r.unref(mt)(i.date)),1)]),Po,r.createElementVNode("span",null,[r.createTextVNode("by "),r.createElementVNode("b",null,r.toDisplayString(i.customerName),1)]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.name},[Mo,r.createElementVNode("span",jo,r.toDisplayString(c.name),1),r.createElementVNode("span",Uo,r.toDisplayString(r.unref(nt)(i.entity,c.name,c.newValue)),1),r.createElementVNode("span",Wo,r.toDisplayString(r.unref(nt)(i.entity,c.name,c.oldValue)),1)],64))),128))]))}}),qo=M(Ho,[["__scopeId","data-v-66cf2326"]]),dt=e=>(r.pushScopeId("data-v-cc723f37"),e=e(),r.popScopeId(),e),Go={key:1,class:"wrap-history"},zo={class:"history-header grid gap_10"},Ko=dt(()=>r.createElementVNode("span",null,null,-1)),Yo=dt(()=>r.createElementVNode("span",{class:"text_md"},"New Value",-1)),Xo=dt(()=>r.createElementVNode("span",{class:"text_md"},"Old Value",-1)),Jo={class:"padding_15 grid gap_10 container-history"},Qo=r.defineComponent({__name:"modal-version-history",props:{entity:{},primaryKey:{}},setup(e){const t=e,n=r.computed(()=>`${l.value.description} Version History`),o=r.ref(),a=r.computed(()=>!s.value||Array.isArray(s.value)&&s.value.length===0?o.value:(o.value||[]).filter(d=>{var b;return d.action==="Insert"?!0:(b=d.changes)==null?void 0:b.find(m=>s.value&&s.value.includes(m.name))})),i=se(u),l=Fe(t.entity),c=r.computed(()=>l.value.fields.map(d=>({label:d.displayName,value:d.name}))),s=r.ref(null);async function u(){try{const d=await pn({entity:t.entity,primaryKey:t.primaryKey});o.value=d.history}catch(d){D("error")(d)}}r.onMounted(()=>i.call());function f(d){return d.currentValues.map(b=>({name:b.fieldName,newValue:b.value})).filter(b=>b.newValue)}return(d,b)=>{const m=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(m,{label:n.value,class:"wrap-modal-version-history"},{default:r.withCtx(()=>[r.unref(i).loading?(r.openBlock(),r.createBlock(r.unref(Xe),{key:0,label:"Loading history..."})):(r.openBlock(),r.createElementBlock("div",Go,[r.createElementVNode("div",zo,[Ko,r.createVNode(r.unref(R.FormField),{type:"select",options:c.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=h=>s.value=h),multiple:""},null,8,["options","modelValue"]),Yo,Xo]),r.createElementVNode("div",Jo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(h,g)=>(r.openBlock(),r.createBlock(qo,{"selected-fields":s.value,date:h.utcCreated,"customer-name":h.userName,version:h.version,changes:h.action==="Insert"?f(h):h.changes,entity:d.entity,key:g},null,8,["selected-fields","date","customer-name","version","changes","entity"]))),128))])]))]),_:1},8,["label"])}}}),Zo=M(Qo,[["__scopeId","data-v-cc723f37"]]),Ge=class Ge{constructor(t,n){this.id=++Ge.globalId,this.eventName=t,this.data=n}};Ge.globalId=1;let Ae=Ge;class Ue{constructor(t,n){this.created=new Date().getTime(),this.timeToLive=0,this.once=!0,this.event=t,this.requestId=n}continue(t){this.timeToLive=new Date().getTime()-this.created+t}get expired(){return this.timeToLive===0?!1:new Date().getTime()-this.created>this.timeToLive}}class tt{static validateAnswer(t){return typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t}static checkForProgressHandler(t,n){var o,a,i,l;return t.event===((a=(o=n.data)==null?void 0:o.for)==null?void 0:a.event)&&t.requestId===((l=(i=n.data)==null?void 0:i.for)==null?void 0:l.requestId)}}const ea=Ke(Ye("use-socket"));function L(){return ta}const ta=function(){let e;function t(i,l,c={}){const s=new Ue(i);s.callback=l,s.once=c.once||!0,e.addHandler(s)}function n(i,l){t(i,l,{once:!0})}function o(i,l,c){const s=new Ae(i,l);return a(s,c)}function a(i,l){return e.sendMessage(i),new Promise((c,s)=>{const u=new Ue(i.eventName,i.id);u.callback=(f,d)=>{if(ea("Promise was resolve with next data:",f),na(d))return void s(f);l&&l(f,d),c(f)},u.once=!0,u.timeToLive=S.TIME_TO_LIVE_SOCKET_REQUEST,e.addHandler(u)})}return{get socket(){return e.instance},on:t,once:n,emit:o,addHandler(i){e.addHandler(i)},emitMessage:a,initialization(i){e=i}}}(),na=e=>!!tt.validateAnswer(e)&&e.event===qt;class ft extends Ue{constructor(t){super(t.eventName,t.id)}}function ra(e,t){const n=r.ref(null),o=L(),a=new Ae(e,t),i=new ft(a);i.callback=c=>n.value=c.progress;function l(){return o.addHandler(i),o.emitMessage(a)}return{call:l,progress:n}}function pt(e,t,n){const o=window.URL.createObjectURL(e);Qt(o,n),setTimeout(()=>{window.URL.revokeObjectURL(o)},100)}function oa(e,t){return fetch(`/close-api/document-builder/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CatalogId:t})}).then(n=>n.blob()).then(n=>{pt(n,e+t+"-print-form.pdf",{blank:!0})})}function mt(e){return We(e,"YYYY/MM/DD HH:mm:ss")}function We(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Mn.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function se(e){function t(a){o.status=a}function n(...a){if(o.loading)return Promise.reject("The process has already started.");o.loading=!0,o.wait=!0;const i=Promise.resolve().then(()=>t(1)).then(()=>e(...a)).then(l=>(t(3),l)).catch(l=>{throw t(2),l}).finally(()=>{o.wait=!1,o.loading=!1,o.promise=null});return o.promise=i,i}const o=r.reactive({status:0,wait:!1,loading:!1,call:n,promise:null});return o}var rn=(e=>(e[e.init=0]="init",e[e.loading=1]="loading",e[e.error=2]="error",e[e.done=3]="done",e))(rn||{});function gt(e){return typeof e=="string"?$e(e):aa(e)?$e(e.message,e.children||e.details||[],e.traceId):ia(e)?$e(e.title,[e.detail||""],e.traceId):$e(S.DEFAULT_ERROR_MESSAGE)}function aa(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function ia(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function $e(e,t=[],n){return{message:e,children:t,traceId:n}}function D(e="error"){return function(t){const{message:n,children:o,traceId:a}=gt(t);Ie.add(e,n,{children:o,traceId:a})}}function de(e,t={}){const n=L();return on(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:read",{entity:e,...t})}function on(e){return!!(e.id||e.primaryKey)}function ht(e,t){const n=L();return on(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:update",{...t,entity:e})}function yt(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function an(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(t,"0"),o[1].length>t&&(o[1]=o[1].substring(0,t)),o.join(".")}function sa(e,t){const n=new Map;return e.forEach(o=>{var i;const a=t(o);n.has(a)||n.set(a,[]),(i=n.get(a))==null||i.push(o)}),n}function la(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function ca(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function H(e,t={}){return X.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=X.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(n=>ca(n).then(o=>{if(!n.ok)throw o;return o}))}function sn(e,t=1e3){let n=0;return(...o)=>{clearTimeout(n),n=window.setTimeout(()=>e(...o),t)}}function ua(e,t){let n=!1;return(...o)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...o)}}const da=Ke(Ye("pretty-value-field-by-entity"));function nt(e,t,n){try{const o=ee.get(e);if(!o)throw new Error("For entity metadata is not loaded");const a=o.fieldsByName[t];if(!a)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return a.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(o){return da('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,t,n),n}}function ln(e,t){return L().emit("list-setting:read",{entity:e,mark:t})}function fa(e,t){return L().emit("metadata-field:treat",{entity:e,fieldName:t})}function cn(e,t){return L().emit("entity:create",{...t,entity:e})}function un(e,t){return L().emit("entity:delete",{...t,entity:e})}function pa(e,t){return L().emit("usage-context:read",{...t,entity:e})}function dn(e={}){return L().emit("tool:read",e)}function ma(){return L().emit("metadata-list:read",{})}function fn(e,t){return L().emit("batch:update",{...t,entity:e})}function vt(e,t){return L().emit("entity:resolve",{primaryKey:t,entity:e})}function pn(e){return L().emit("history:read",e)}function ga(e,t){return L().emit("entity:count",{...t,entity:e})}function mn(e){return`/${tr}/${e}`}function _e(e){return{exec(t,n){switch(e.name){case"replace-boolean":return _e.replaceBoolean(t,e.values);case"replace-record-operation":return _e.replaceRecordOperation(t)}}}}_e.replaceBoolean=ha;_e.replaceRecordOperation=ya;function ha(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function ya(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function va(e={}){return L().emit("tool:execute",e)}const wa=Ke(Ye("wrap-tool-response"));function gn(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=_a),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=Ca),e.handleCloseForm===void 0&&(e.handleCloseForm=Ta),e.handleValidationResult===void 0&&(e.handleValidationResult=ka),{...t,label:t.title,async callback(n={}){var l;const o=typeof e.values=="function"?e.values(t,e):e.values;let a={};t.action.targetName==="Record"&&o.hasOwnProperty("Id")&&(a.Id=o.Id,delete o.Id);const i=()=>va({name:t.name,values:{...o,...n},primaryKeys:a,usageContext:t.usageContext}).then(async c=>{var s,u,f,d;if(!ba(c))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const b of e.handlers)await b(t,c,e);if(!c.success)throw e.handleValidationResult&&c.validationEffect&&((u=(s=c.validationEffect)==null?void 0:s.results)!=null&&u.length)&&e.handleValidationResult(t,c.validationEffect,e),new Error(c.message);return t.showValidationResults&&e.handleValidationResult&&c.validationEffect&&(d=(f=c.validationEffect)==null?void 0:f.results)!=null&&d.length&&e.handleValidationResult(t,c.validationEffect,e),c.message&&Ie.add("info",c.message),Array.isArray(c.affectedEntities)&&e.handleAffectedEntity&&c.affectedEntities.forEach(b=>{var m;return(m=e.handleAffectedEntity)==null?void 0:m.call(e,t,b,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),c}).catch(c=>{if(D("error")(c),e.handleReject)return e.handleReject(t,c,e)});if((l=e.overrides)!=null&&l[t.name])return e.overrides[t.name](t,e);if(t.paramDialog){const c=await Sa(t,e);if(c===null)return;n=Object.assign(n,c||{})}return t.requireSave&&e.form&&e.form.changed?e.form.save().then(i):!t.confirmation||!e.handleConfirmation||t.paramDialog?i():e.handleConfirmation(t,i)}}}function ba(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function Ea(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function _a(e,t){const n=Ea(e.confirmation);if(!U.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await U.promptModal(S.MODAL_CONFIRM,{message:n}))return t()}function ka(e,t){const n=S.MODAL_VALIDATION_EFFECT;if(!U.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{U.pushModal(n,t)})}function Ca(e,t,n){var s;function o(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function a(u,f){u&&(wa("Affected Entity %s. Find form with name %s.",f,u.name),u.name===f&&o(u)&&u.read(),u instanceof R.Form&&u.dependencies.forEach(d=>a(d,f)))}Ne.emit("affected-entity",t);const{router:i,form:l}=n,c=typeof t.primaryKey=="string"?t.primaryKey:(s=t.primaryKey)==null?void 0:s.Id;if(i&&t&&t.name===e.redirectEntity){Ne.emit("display-entity",{primaryKey:c,name:t.name}),I.getEntityLink&&i.push(I.getEntityLink(t.name,c));return}a(l,t.name)}function Ta(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}function Sa(e,t){var n;if((n=e.paramDialog)!=null&&n.name)return U.promptModal(e.paramDialog.name,{paramDialog:e.paramDialog,tool:e,options:t})}let ce={};function q(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=R.utils.getPropFromObject((this==null?void 0:this.vocabulary)||ce,e);if(typeof n=="string")return Bt(n,t);const o=R.utils.getPropFromObject(ce==null?void 0:ce.root,e);return typeof o=="string"?Bt(o,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function Bt(e,t){return t.forEach((n,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),e}q.setGlobalVocabulary=function(e){ce=e};q.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),q.bind({vocabulary:R.utils.getPropFromObject(ce,t.toLowerCase())})};q.setVocabulary=function(e){return typeof e=="string"&&(e=R.utils.getPropFromObject(ce,e)),q.bind({vocabulary:e})};function Aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},$={},ot={exports:{}},fe={};function hn(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function Ia(e,t,n){}function Na(e,t,n){}var Ra=/javascript\s*\:/img;function Oa(e,t){return Ra.test(t)?"":t}fe.whiteList=hn();fe.getDefaultWhiteList=hn;fe.onAttr=Ia;fe.onIgnoreAttr=Na;fe.safeAttrValue=Oa;var La={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,a;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,a=e.length;o<a;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},Te=La;function Fa(e,t){e=Te.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,o=!1,a=0,i=0,l="";function c(){if(!o){var f=Te.trim(e.slice(a,i)),d=f.indexOf(":");if(d!==-1){var b=Te.trim(f.slice(0,d)),m=Te.trim(f.slice(d+1));if(b){var h=t(a,l.length,b,m,f);h&&(l+=h+"; ")}}}a=i+1}for(;i<n;i++){var s=e[i];if(s==="/"&&e[i+1]==="*"){var u=e.indexOf("*/",i+2);if(u===-1)break;i=u+1,a=i+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||c():s===`
7
+ `&&c()}return Te.trim(l)}var xa=Fa,De=fe,Ba=xa;function Vt(e){return e==null}function Va(e){var t={};for(var n in e)t[n]=e[n];return t}function yn(e){e=Va(e||{}),e.whiteList=e.whiteList||De.whiteList,e.onAttr=e.onAttr||De.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||De.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||De.safeAttrValue,this.options=e}yn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,a=n.onAttr,i=n.onIgnoreAttr,l=n.safeAttrValue,c=Ba(e,function(s,u,f,d,b){var m=o[f],h=!1;if(m===!0?h=m:typeof m=="function"?h=m(d):m instanceof RegExp&&(h=m.test(d)),h!==!0&&(h=!1),d=l(f,d),!!d){var g={position:u,sourcePosition:s,source:b,isWhite:h};if(h){var v=a(f,d,g);return Vt(v)?f+":"+d:v}else{var v=i(f,d,g);if(!Vt(v))return v}}});return c};var $a=yn;(function(e,t){var n=fe,o=$a;function a(l,c){var s=new o(c);return s.process(l)}t=e.exports=a,t.FilterCSS=o;for(var i in n)t[i]=n[i];typeof window<"u"&&(window.filterCSS=e.exports)})(ot,ot.exports);var wt=ot.exports,bt={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,a;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,a=e.length;o<a;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},Da=wt.FilterCSS,Pa=wt.getDefaultWhiteList,He=bt;function vn(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var wn=new Da;function Ma(e,t,n){}function ja(e,t,n){}function Ua(e,t,n){}function Wa(e,t,n){}function bn(e){return e.replace(qa,"&lt;").replace(Ga,"&gt;")}function Ha(e,t,n,o){if(n=Sn(n),t==="href"||t==="src"){if(n=He.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(Pe.lastIndex=0,Pe.test(n))return""}else if(t==="style"){if($t.lastIndex=0,$t.test(n)||(Dt.lastIndex=0,Dt.test(n)&&(Pe.lastIndex=0,Pe.test(n))))return"";o!==!1&&(o=o||wn,n=o.process(n))}return n=An(n),n}var qa=/</g,Ga=/>/g,za=/"/g,Ka=/&quot;/g,Ya=/&#([a-zA-Z0-9]*);?/gim,Xa=/&colon;?/gim,Ja=/&newline;?/gim,Pe=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,$t=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Dt=/u\s*r\s*l\s*\(.*/gi;function En(e){return e.replace(za,"&quot;")}function _n(e){return e.replace(Ka,'"')}function kn(e){return e.replace(Ya,function(n,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function Cn(e){return e.replace(Xa,":").replace(Ja," ")}function Tn(e){for(var t="",n=0,o=e.length;n<o;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return He.trim(t)}function Sn(e){return e=_n(e),e=kn(e),e=Cn(e),e=Tn(e),e}function An(e){return e=En(e),e=bn(e),e}function Qa(){return""}function Za(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function o(l){return n?!0:He.indexOf(e,l)!==-1}var a=[],i=!1;return{onIgnoreTag:function(l,c,s){if(o(l))if(s.isClosing){var u="[/removed]",f=s.position+u.length;return a.push([i!==!1?i:s.position,f]),i=!1,u}else return i||(i=s.position),"[removed]";else return t(l,c,s)},remove:function(l){var c="",s=0;return He.forEach(a,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function ei(e){for(var t="",n=0;n<e.length;){var o=e.indexOf("<!--",n);if(o===-1){t+=e.slice(n);break}t+=e.slice(n,o);var a=e.indexOf("-->",o);if(a===-1)break;n=a+3}return t}function ti(e){var t=e.split("");return t=t.filter(function(n){var o=n.charCodeAt(0);return o===127?!1:o<=31?o===10||o===13:!0}),t.join("")}$.whiteList=vn();$.getDefaultWhiteList=vn;$.onTag=Ma;$.onIgnoreTag=ja;$.onTagAttr=Ua;$.onIgnoreTagAttr=Wa;$.safeAttrValue=Ha;$.escapeHtml=bn;$.escapeQuote=En;$.unescapeQuote=_n;$.escapeHtmlEntities=kn;$.escapeDangerHtml5Entities=Cn;$.clearNonPrintableCharacter=Tn;$.friendlyAttrValue=Sn;$.escapeAttrValue=An;$.onIgnoreTagStripAll=Qa;$.StripTagBody=Za;$.stripCommentTag=ei;$.stripBlankChar=ti;$.attributeWrapSign='"';$.cssFilter=wn;$.getDefaultCSSWhiteList=Pa;var Je={},oe=bt;function ni(e){var t=oe.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=oe.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function ri(e){return e.slice(0,2)==="</"}function oi(e,t,n){var o="",a=0,i=!1,l=!1,c=0,s=e.length,u="",f="";e:for(c=0;c<s;c++){var d=e.charAt(c);if(i===!1){if(d==="<"){i=c;continue}}else if(l===!1){if(d==="<"){o+=n(e.slice(a,c)),i=c,a=c;continue}if(d===">"||c===s-1){o+=n(e.slice(a,i)),f=e.slice(i,c+1),u=ni(f),o+=t(i,o.length,u,f,ri(f)),a=c+1,i=!1;continue}if(d==='"'||d==="'")for(var b=1,m=e.charAt(c-b);m.trim()===""||m==="=";){if(m==="="){l=d;continue e}m=e.charAt(c-++b)}}else if(d===l){l=!1;continue}}return a<s&&(o+=n(e.substr(a))),o}var ai=/[^a-zA-Z0-9\\_:.-]/gim;function ii(e,t){var n=0,o=0,a=[],i=!1,l=e.length;function c(b,m){if(b=oe.trim(b),b=b.replace(ai,"").toLowerCase(),!(b.length<1)){var h=t(b,m||"");h&&a.push(h)}}for(var s=0;s<l;s++){var u=e.charAt(s),f,d;if(i===!1&&u==="="){i=e.slice(n,s),n=s+1,o=e.charAt(n)==='"'||e.charAt(n)==="'"?n:li(e,s+1);continue}if(i!==!1&&s===o){if(d=e.indexOf(u,s+1),d===-1)break;f=oe.trim(e.slice(o+1,d)),c(i,f),i=!1,s=d,n=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),i===!1)if(d=si(e,s),d===-1){f=oe.trim(e.slice(n,s)),c(f),i=!1,n=s+1;continue}else{s=d-1;continue}else if(d=ci(e,s-1),d===-1){f=oe.trim(e.slice(n,s)),f=Pt(f),c(i,f),i=!1,n=s+1;continue}else continue}return n<e.length&&(i===!1?c(e.slice(n)):c(i,Pt(oe.trim(e.slice(n))))),oe.trim(a.join(" "))}function si(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function li(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function ci(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function ui(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Pt(e){return ui(e)?e.substr(1,e.length-2):e}Je.parseTag=oi;Je.parseAttr=ii;var di=wt.FilterCSS,z=$,In=Je,fi=In.parseTag,pi=In.parseAttr,je=bt;function Me(e){return e==null}function mi(e){var t=je.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=je.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=je.trim(e.slice(0,-1))),{html:e,closing:n}}function gi(e){var t={};for(var n in e)t[n]=e[n];return t}function hi(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(o){return o.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function Nn(e){e=gi(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=z.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=hi(e.whiteList||e.allowList):e.whiteList=z.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":z.attributeWrapSign,e.onTag=e.onTag||z.onTag,e.onTagAttr=e.onTagAttr||z.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||z.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||z.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||z.safeAttrValue,e.escapeHtml=e.escapeHtml||z.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new di(e.css))}Nn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,a=n.onTag,i=n.onIgnoreTag,l=n.onTagAttr,c=n.onIgnoreTagAttr,s=n.safeAttrValue,u=n.escapeHtml,f=t.attributeWrapSign,d=t.cssFilter;n.stripBlankChar&&(e=z.stripBlankChar(e)),n.allowCommentTag||(e=z.stripCommentTag(e));var b=!1;n.stripIgnoreTagBody&&(b=z.StripTagBody(n.stripIgnoreTagBody,i),i=b.onIgnoreTag);var m=fi(e,function(h,g,v,_,p){var w={sourcePosition:h,position:g,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(o,v)},y=a(v,_,w);if(!Me(y))return y;if(w.isWhite){if(w.isClosing)return"</"+v+">";var C=mi(_),T=o[v],E=pi(C.html,function(k,O){var V=je.indexOf(T,k)!==-1,P=l(v,k,O,V);return Me(P)?V?(O=s(v,k,O,d),O?k+"="+f+O+f:k):(P=c(v,k,O,V),Me(P)?void 0:P):P});return _="<"+v,E&&(_+=" "+E),C.closing&&(_+=" /"),_+=">",_}else return y=i(v,_,w),Me(y)?u(_):y},u);return b&&(m=b.remove(m)),m};var yi=Nn;(function(e,t){var n=$,o=Je,a=yi;function i(c,s){var u=new a(s);return u.process(c)}t=e.exports=i,t.filterXSS=i,t.FilterXSS=a,function(){for(var c in n)t[c]=n[c];for(var s in o)t[s]=o[s]}(),typeof window<"u"&&(window.filterXSS=e.exports);function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(rt,rt.exports);var vi=rt.exports;const wi=Aa(vi);function bi(e){return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/\[icon:([^\]]+)]/g,"<widget-icon>$1</widget-icon>"),e=e.replace(/\[(.*)]\((.*)\)/g,'<router-link to = "$2">$1</router-link>'),wi(e)}function Ei(e,t,n,o){let a=e+t/60+n/3600;return(o=="S"||o=="W")&&(a=a*-1),a}function _i(e,t){const n={dir:e<0?t==="long"?"W":"S":t==="long"?"E":"N",deg:0|(e<0?e=-e:e),min:0|(e+=1e-9)%1*60,sec:(0|e*60%1*6e3)/100};return`${n.deg}° ${n.min}' ${n.sec}" ${n.dir}`}function Et(e,t){const n=["forms",e];return t&&n.push(t),"/"+n.join("/")}function Rn(e,t){return"/"+[S.PATH_RESOLVER_ENTITY,e,t].join("/")}function ki(){return`/${S.PATH_RESOLVER_ENTITY}/:entity/:primaryKey`}function qe(e){const t=ee.get(e);if(!t)throw new Error(`Metadata ${e} is still missing.`);return t.useCatalogInsteadId?"CatalogId":t.fieldNameForIdentification}function at(e,t,n){const o=q.getScope(e.toLowerCase());return t.map(a=>{typeof a.label=="string"&&(a.label=o(a.label)),a.type==="history"&&(a.onClick=l=>U.openModal(S.MODAL_HISTORY,{primaryKey:l[qe(e)],entity:e}),a.icon="history",a.class="widget-list-cell-history",a.hint="Open the History");const i=a.displayMode;if(i){const l=async c=>{try{const s=c[ae(a)];return[await vt(Ti(a,c),s),s]}catch{return[]}};i&&(i==="form"?a.link=c=>{const s=c[ae(a)];return s?Rn(a.entity,s):null}:a.onClick=async c=>{const[s,u]=await l(c);if(!s||!u)return null;switch(a.displayMode){case"modal":return U.openModal(S.MODAL_ENTITY,{entity:s,primaryKey:u});case"inline":return n.activate(s,u,c)}}),a.class="widget-table-cell_link cursor_pointer",typeof a.value!="string"&&(a.value=(c,s)=>s[a.name[1]])}return Ci(a,a.type,a.presentation),I.listConvertCellConfigHandler&&I.listConvertCellConfigHandler(e,a),a})}function Ci(e,t,n){switch(t){case"Decimal":{n==="Money"&&(e.type="money");break}}return e}const Ti=(e,t)=>e.useObjectTypeName?t[e.name[2]]:e.entity?e.entity:null;function Si(e){return L().emit("usage-context:read-mandatory-fields",e)}async function Ai(e,t,n){const o=await fetch(`/close-api/document-builder/${e}/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok)throw new Error(S.DEFAULT_ERROR_MESSAGE);const a=await o.blob();pt(a,`${e}.pdf`,{blank:!0})}function Ii(e){if(!Array.isArray(I.arrayListCellHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");I.arrayListCellHandlers.push(e)}function Ni(e,t){const n=ae(e);return n?R.utils.getPropFromObject(t,n):null}function Ri(e){if(!Array.isArray(I.arrayFieldParamsHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");I.arrayFieldParamsHandlers.push(e)}function Oi(e){if(!Array.isArray(I.arrayListRowHandlers))throw new Error("Configuration has mistake: arrayListRowHandlers is not an array");I.arrayListRowHandlers.push(e)}const Li={addListCellHandler:Ii,getCellModelValue:Ni,addFieldParamsHandler:Ri,addListRowHandler:Oi};var On=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(On||{});function Fi(){const e=r.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function xi(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function Ln(e,t){e()&&(await t(),await Ln(e,t))}function Bi(e,t,n={}){let o=!1;const a=r.ref(""),i=r.computed(()=>l.filter(E=>u(E,a.value))),l=r.reactive([]);let c=0;const s=r.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((E,k)=>xi(E,k));function f(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function d(){const E=y();return typeof E.limit!="number"&&(E.limit=100),E.offset=c,(n.request||de)(e,E).then(O=>(c+=O.length,O))}function b(E,k){var V;return typeof E.Version=="number"?E.Version:(V=l.find(P=>P.Id===k))==null?void 0:V.Version}function m(E,k){const O=l.findIndex(V=>V.Id===E);if(O===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(O,1,k)}function h(E){const k=l.findIndex(O=>O.Id===E);if(k===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(k,1)}async function g(E,k){try{const O=y(),V=b(k,E);delete k.Version,await ht(e,{id:E,values:k,version:V,masterEntities:f()});const P=await de(e,{fields:O.fields||"",id:E});m(E,P)}catch(O){D()(O)}}async function v(E,k={}){try{const O=y(),V=b(k,E);delete k.Version,await un(e,{id:E,version:V,masterEntities:f()}),h(E)}catch(O){D()(O)}}async function _(E){try{await cn(e,{values:E,masterEntities:f()}),await C()}catch(k){D()(k)}}let p;async function w(){s.value=!0;try{p!=null&&p.signal&&!p.signal.aborted&&p.abort();let E=p=new AbortController,k=0;const V=y().limit||0;if(a.value&&!V){console.warn("Using textSearch assumes the use of limit.");return}await Ln(()=>(V>0?k<V:!0)&&!o&&!E.signal.aborted,async()=>{const P=await d();E.signal.aborted||(l.push(...P),k+=P.filter(te=>u(te,a.value)).length,(P.length<V||V===0)&&(o=!0))})}catch(E){D()(E)}s.value=!1}function y(){return typeof t=="function"?t():t}async function C(){try{c=0,o=!1,l.splice(0,l.length),await w()}catch(E){D()(E)}}function T(){if(p)return p.abort();s.value=!1}return{array:l,updateById:g,next:w,reload:C,wait:s,create:_,deleteById:v,textSearch:a,filteredArray:i,abort:T}}function Vi(){function e(){return{organizations:X.organizations,currentContextId:X.contextId,person:X.person,context:X.context,contextType:X.contextType,userId:X.userId}}const t=r.reactive(e());return X.onupdateContext(()=>{Object.assign(t,e())}),t}function $i(e,t,n){return L().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function Di(e,t,n){return L().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function Pi(e,t){return L().emit("communication-message:create",{communicationId:e,text:t})}function Mi(e){return L().emit("communication-message:read",{communicationId:e})}function ji(e){const t=R.Form.getParentForm(),n=r.reactive([]);return t&&t.subscribe(e),e.read=()=>Mi(e.id).then(o=>(n.splice(0,n.length,...o),o)),{array:n}}function Ui(e,t){e.read=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw ie.EntityWithoutName(e);return de(e.name,o)}).then(Ct).then(a=>(a.hasOwnProperty("Version")&&(e.version=a.Version),e.setValues(a),a)).catch(D())},e.save=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw ie.EntityWithoutName(e);return ht(e.name,{id:o.id,values:e.changes,version:e.version})}).then(a=>{e.version=a.version}).catch(a=>{throw D()(a),a})};function n(){return typeof t=="function"?t():t}}function Fe(e){if(!e)return r.inject(S.PROVIDE_NAME_METADATA);ee.initEntity(e);const t=r.computed(()=>ee.state[e]);return r.provide(S.PROVIDE_NAME_METADATA,t),r.provide(S.PROVIDE_ENTITY_NAME,e),t}function _t(e,t={}){if(!e)return r.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const n=r.ref(null);return r.provide(S.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await pa(e,Wi(t||{}))}}}function Wi(e){return typeof e=="function"?e():e}function Hi(e){if(!e)return r.inject(S.PROVIDE_NAME_ACTIONS);const t=r.ref(!1),n=r.reactive([]),o=r.computed(()=>n.map(l=>gn(e,l))),a={actions:o,update:i};r.provide(S.PROVIDE_NAME_ACTIONS,a),e.router=ue.useRouter();function i(){if(t.value)return;t.value=!0,n.splice(0,n.length);const l=e==null?void 0:e.form;return dn({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(c=>n.splice(0,0,...c)).catch(D("error")).finally(()=>t.value=!1)}return{actions:o,update:i,loading:r.readonly(t)}}function qi(e){function t(n){n.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",t)}),r.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function Gi(e,t={}){const n=r.reactive([]),o=s=>{const u=r.unref(e);if(s===void 0){n.length===0?u.forEach(i):u.forEach(l);return}a(s)?l(s):i(s)},a=s=>n.includes(s),i=s=>{t.handleSelect&&!t.handleSelect(s)||a(s)||n.push(s)},l=s=>{const u=n.findIndex(f=>f===s);u!==-1&&n.splice(u,1)},c=r.computed(()=>{const s=r.unref(e);return n.length===s.length&&s.length!==0});return[n,o,c,i,l]}function zi(e){const t=r.ref(""),n=r.computed(()=>{const o=t.value.toLowerCase();return r.unref(e).filter(a=>t.value.length?Object.values(a).join().toLowerCase().includes(o):!0)});return{search:t,searchArray:n}}class Ze{static async getStartConfig(t,n){return L().emit("wizard:configuration",{process:t,entity:n})}static async startProcess(t,n){return L().emit("wizard:start",{process:t,entity:n})}static async runStep(t,n,o,a,i){return L().emit("wizard:step",{process:t,entity:n,stepName:o,token:a,values:i})}}function Ki(e){return e.statusName===j.Completed}function Yi(e){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(e.statusName)}function Xi(e){return e.statusName===j.ValidationError}function Ji(e){return e.statusName===j.Undefined}function Qi(e,t,n){let o=null,a=[];const i=r.ref(!1),l=r.ref(null),c=r.computed(()=>d(a,l.value)),s=r.ref(null),u=r.reactive([]),f=r.computed(()=>u.map(p=>d(a,p)));function d(p,w){return p.find(y=>y.name===w)||null}async function b(p){var w;if(Ji(p)){await n.onDisplayDataSet(p);return}if(!(Yi(p)&&!await n.onDisplayDataSet(p))){if(Xi(p))return void n.onValidation(p.validationResults);g(p),await r.nextTick();{const y=((w=d(a,l.value))==null?void 0:w.fields)||[];if([j.FinalStep,j.NextStep,j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(p.statusName)&&(!y.length||Zi(y,n.presets)))return _(n.presets||{})}Ki(p)&&n.onCompleted(p)}}async function m(){try{await h(),await v()}catch(p){D("error")(p)}}function h(){return i.value="Loading process information.",Ze.getStartConfig(t,e).then(p=>(s.value={label:p.processTitle,info:p.processInfo,icon:p.processIcon},a=p.steps.map(w=>{const y=w.frontendEntity.rootObject,C=Object.fromEntries(w.frontendEntity.objectTypes.map(T=>[T.name,T.properties]));return{label:w.title,name:w.stepName,number:w.number,rootObjectName:y,objectTypes:C,fields:C[y],buttonCaption:w.buttonCaption}}))).finally(()=>{i.value=!1})}function g(p){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation,j.NextStep,j.Completed,j.FinalStep].includes(p.statusName)?(o=p.token,l.value=p.nextStepName):console.log("Saving is not completed:",p),p}function v(){return i.value="Starting process",Ze.startProcess(t,e).then(b).catch(D("error")).finally(()=>{i.value=null})}function _(p={}){const w=l.value;return!o||!w?Promise.reject("Not step or token."):(i.value="Waiting for result...",Ze.runStep(t,e,w,o,p).then(b).then(y=>(u[u.length-1]!==w&&u.push(w),y)).catch(D("error")).finally(()=>{i.value=!1}))}return{initialize:m,loading:i,currentStepConfig:c,currentStepName:l,arrayPassedSteps:f,arrayProcessStepName:u,processInfo:s,next:_}}function Zi(e,t){for(let n=0;n<e.length;n++){const o=e[n];if(!R.utils.getPropFromObject(t,o.name))return!1}return!0}function es(e,t){const n=typeof e=="string"?e:e.name,o=Object.assign({},typeof e=="string"?{}:e.arguments,t||{});return{name:n,arguments:o}}function Fn(e,t,n,o,a,i,l,c={}){const s=L();i=i||150;let u=null;const f=[],d=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function b(p){p===null&&(p=""),p===void 0&&(p="-");let w=typeof p!="string"?String(p):p;return w=w.replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w='"'+w+'"'),w}async function m(){return de(t,{offset:d.offset,...u}).then(p=>(d.offset+=i,p))}function h(){const p="data:text/csv;charset=utf-8,"+f.join(`\r
8
+ `),w=encodeURI(p),y=document.createElement("a");y.setAttribute("href",w),y.setAttribute("download",`${t}.csv`),document.body.appendChild(y),y.click()}async function g(){if(n=c.extend?await s.emit("export-configuration:read",{entity:c.overrideEntity||t}).then(p=>p.map(w=>({label:w,name:w}))):n,u={limit:i||150,fields:yt(n),order:a,filter:typeof o=="string"?o:N(o||{}),customFilters:Array.isArray(l)?l.map(p=>{var w;return es(p,(w=c.customFiltersData)==null?void 0:w[typeof p=="string"?p:p.name])}):void 0},c.customFilters&&(u.customFilters=[...c.customFilters,...Array.isArray(u.customFilters)?u.customFilters:[]]),c.useSelectedRows&&Array.isArray(c.selectedRows)&&c.selectedRows.length){let p="";const w=await ee.initEntity(t);p=N({[w.primaryKey]:c.selectedRows.map(y=>y[w.primaryKey])}),u.filter.length?u.filter+=` and ${p}`:u.filter=p}c.overridePrefix&&typeof u.filter=="string"&&(u.filter=u.filter.replaceAll("@",p=>p+c.overridePrefix+".")),e==="csv"&&f.push(n.map(p=>b(p==null?void 0:p.label)).join(","))}function v(){d.rejected=!0}async function _(){return m().then(p=>{const w=p.map(y=>n.map(C=>b(Oe(C,y))).join(","));return f.push(...w),d.count=f.length,p.length}).then(p=>{if(p!==i&&(d.finished=!0),p===i&&!d.rejected)return _()}).catch(p=>{D("error")(p),U.closeModal()})}return{downloadFile:h,reject:v,state:d,start:_,init:g}}function xn(e,t){return r.computed(()=>(Bn.value||[]).filter(n=>n.entityName===e&&n.templateTarget===t))}xn.init=function(t){Bn.value=t};const Bn=r.ref(),Ie=new class{constructor(){this.store=r.reactive([])}add(t,n,o={}){const a=ts(o),i=new it(t,n,a.timeout,a.children,a.click,o.traceId||void 0);return this.store.push(i),a.timeout&&setTimeout(this.remove.bind(this,i.id),a.timeout*1e3),i}remove(t){const n=this.store.findIndex(o=>o.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function ts(e){function t(o){return!!o&&typeof o=="object"}const n={timeout:10,click:()=>null,children:[]};return t(e)?{timeout:e.timeout||n.timeout,click:e.click||n.click,children:e.children||n.children}:n}const ze=class ze{constructor(t,n,o,a,i,l){this.type=t,this.message=n,this.timeout=o,this.children=a,this.click=i,this.traceId=l,this.id=ze.cardId++}};ze.cardId=1;let it=ze;/*!
9
9
  * jenesius-event-emitter v1.0.2
10
10
  * (c) 2022 Jenesius
11
11
  * @license MIT
12
- */const Mt=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},jt=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},Ut=function(e,t){const n=this.events[e];if(!n)return;const o=n.indexOf(t);o!==-1&&n.splice(o,1)},Wt=function(){this.events={}};class te{constructor(){this.events={}}on(t,n){return Mt.call(this,t,n)}emit(t,n){return jt.call(this,t,n)}off(t,n){return Ut.call(this,t,n)}cleanEvents(){Wt.call(this)}static on(t,n){return Mt.call(te,t,n)}static emit(t,n){return jt.call(te,t,n)}static off(t,n){return Ut.call(te,t,n)}static cleanEvents(){Wt.call(te)}}te.events={};class ns extends te{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return Pi(this.id,t)}static checkAndGenerate(t,n,o){return Di(t,n,o).then(a=>a.length===0?$i(t,n,o):a[0])}}function rs(){return L().emit("client:read",{})}class kt extends Error{static ConstContextCannotBeChanged(){return new kt("The current context is set to constant. In order to change it, you need to put Manager into a changeable state.")}}var Re,be;const Q=class Q extends te{constructor(){super(...arguments);Ve(this,Re);Ve(this,be);this.isConstContext=!1,this.type="front",this.organizations=[],he(this,be,!1)}set language(n){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,n)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||Q.DEFAULT_LANGUAGE}get contextId(){return Be(this,Re)}set contextId(n){if(this.isConstContext)throw kt.ConstContextCannotBeChanged();he(this,Re,n)}get contextType(){var n;if(this.contextId)return((n=this.person)==null?void 0:n.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(n){he(this,be,n),this.emit(Q.EVENT_READY_UPDATE,n)}get ready(){return Be(this,be)}onReady(n){return this.on(Q.EVENT_READY_UPDATE,n)}onupdateContext(n){return this.on(Q.EVENT_CONTEXT_UPDATE,n)}setCurrentContext(n){if(this.contextId===n)return console.warn("[application-manager] The current context has already been installed.");this.contextId=n,localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(n)),this.emit(Q.EVENT_CONTEXT_UPDATE,n),console.log(`Current context id %c${n}`,"color: purple")}get context(){var n;return this.contextId?this.contextId===((n=this.person)==null?void 0:n.id)?this.person:this.organizations.find(o=>o.id===this.contextId)||null:null}async init(){try{const n=await this.loadCustomerData();this.customer=n,this.person=n,this.organizations=n.organizations,this.userId=n.userId,this.restoreCurrentContext(),this.ready=!0}catch(n){D()(n)}}restoreCurrentContext(){var o,a,i;if(typeof((o=this.customer)==null?void 0:o.constContextId)=="number"||((a=this.customer)==null?void 0:a.constContextId)===null)return this.setCurrentContext(this.customer.constContextId),this.isConstContext=!0;const n=((i=this.customer)==null?void 0:i.selectedContextId)||Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(n)&&n&&this.validateContextId(Number(n)))this.setCurrentContext(n);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return rs()}validateContextId(n){var o;try{return((o=this.person)==null?void 0:o.id)==n?!0:!!this.organizations.find(a=>a.id===n)}catch{return!1}}};Re=new WeakMap,be=new WeakMap,Q.DEFAULT_LANGUAGE="en",Q.EVENT_CONTEXT_UPDATE="event:context-update",Q.EVENT_READY_UPDATE="event:ready-update";let st=Q;function os(e){return L().emit("metadata:read",{entity:e})}const Z=function(){const t=r.reactive({}),n=new Map;function o(c){return t[c]}async function a(c){if(n.has(c)&&await n.get(c),t[c])return o(c);const s=await i(c);return l(c,s),o(c)}function i(c){const s=os(c).finally(()=>{n.delete(c)});return n.set(c,s),s}function l(c,s){t[c]=s}return{state:t,initEntity:a,get:o,loadingFlags:n}}();class as extends te{on(t,n){return super.on(t,n)}emit(t,n){console.log("[event-bus] emit",t,n),super.emit(t,n)}off(t,n){super.off(t,n)}}class is{constructor(t){this.pingTimeout=0,this.pendingMessages=new Set,this.handlers=new Set,this.URI=t,this.createNewInstance(),setInterval(()=>{(!this.instance||this.instance.readyState===3)&&this.createNewInstance()},S.DELAY_SOCKET_RECONNECT),setInterval(()=>{Array.from(this.handlers.values()).filter(n=>n.expired).forEach(n=>{n.requestId?this.notify({requestId:n.requestId,event:qt,data:{message:ae.RequestTookToLong().message}}):this.handlers.delete(n)})},2e3)}sendMessage(t){const n=JSON.stringify({requestId:t.id,event:t.eventName,data:t.data,contextId:X.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});this.isConnected()?this.sendDataBySocketConnection(n):(this.pendingMessages.add(t),console.log("Socket is not connected. Message(%s) was send to save-queue",t.eventName))}isConnected(){var t;return this.instance&&((t=this.instance)==null?void 0:t.readyState)===1}createNewInstance(){console.log(`%cInitializing sockets: %c${this.URI}`,"color: purple","color: black");const t=new WebSocket(this.URI);t.onopen=()=>{console.log("Socket was %cconnected%c at %s","color: green","color: black",new Date().toLocaleString()),Array.from(this.pendingMessages.values()).forEach(n=>{this.sendMessage(n),this.pendingMessages.delete(n)})},t.onmessage=n=>{try{if(this.isBinary(n.data))return this.heartbeat();const o=JSON.parse(n.data);if(!tt.validateAnswer(o)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(o);return}o.event==="progress"&&Array.from(this.handlers).filter(a=>tt.checkForProgressHandler(a,o)).forEach(a=>a.continue(S.TIME_TO_LIVE_SOCKET_REQUEST)),o.refresh&&(console.log("The page needs to be reloaded. Reboot after 3 seconds."),setTimeout(()=>location.reload(),3e3)),this.notify(o)}catch(o){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(o)}},t.onclose=function(n){console.log("Connection to server was stopped: %d %s",n.code,n.reason)},t.onerror=function(n){console.warn(n)},this.instance=t}isBinary(t){return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Blob]"}sendDataBySocketConnection(t){this.instance&&this.instance.send(t)}heartbeat(){if(!this.instance)return;this.pingTimeout&&clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var n,o;(o=(n=this.instance)==null?void 0:n.close)==null||o.call(n)},er*3);const t=new Uint8Array(1);t[0]=Zn,this.sendDataBySocketConnection(t)}notify(t){Array.from(this.handlers.values()).forEach(n=>{var a,i,l,c;const o=t.requestId;if(n instanceof ft&&n.event===((i=(a=t.data)==null?void 0:a.for)==null?void 0:i.event)&&n.requestId===((c=(l=t.data)==null?void 0:l.for)==null?void 0:c.requestId))return n.callback(t.data,t);(n.requestId&&n.requestId===o||!n.requestId&&n.event===t.event)&&(n.callback(t.data,t),n.once&&this.handlers.delete(n))})}addHandler(t){this.handlers.add(t)}}class J{static login(t){return H(I.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:I.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return J.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return J.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return J.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return J.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return H(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return J.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return J.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return J.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return H(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(J.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return H(`${I.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,o,a){return H(`${I.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:a})})}static confirmEmailByAccessRecovery(t,n,o,a){return H(`${I.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:a})})}static finishAccessRecovery(t,n,o,a){return H(`${I.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:o,ConfirmedPassword:a})})}}class ss{static readHistoryById(t,n){return H(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class ls{static getConfiguration(){return H("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await H(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class cs{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return H(`/open-api/internationalization/language/${t}`)}}class us{static async upload(t,n){const o=new FormData;return o.append("file",t),o.append("entityName",n),H("/close-api/files",{method:"POST",body:o}).then(a=>(a.filename=t.name,a))}static getFileLink(t){return`/close-api/files/${t}`}}var Vn=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Vn||{}),$n=(e=>(e.Approved="A",e.AwaitingFeedback="AF",e.AssignedForExam="AFE",e.Cancelled="C",e.Closed="CLS",e.Completed="CT",e.Draft="D",e.NotSatisfied="NSF",e.OnClarification="OC",e.Processing="P",e.Rejected="R",e.ReadyForExam="RFE",e.Submitted="S",e.SecurityCheck="SCK",e.Satisfied="SF",e.Withdrawn="W",e))($n||{});function Dn(e){return typeof e!="string"?!1:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}function ds(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function N(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];if(Array.isArray(o))return t.push(N.in(n,o)),t;if(Pn(o)&&(typeof o.min=="number"&&t.push(N.ge(n,o.min)),typeof o.max=="number"&&t.push(N.le(n,o.max))),fs(o)){if(o.text){const i=(l=>{switch(l){case"end":return N.endWith;case"begin":return N.beginWith;default:return N.includes}})(o.option);t.push(i(n,o.text))}return t}if(ds(o)){let a=function(i){var l;return((l=i.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&t.push(`@${n} ge ${a(o.start)}`),o.end&&t.push(`@${n} le ${a(o.end)}`),t}return typeof o=="number"||typeof o=="boolean"||typeof o=="string"?(t.push(N.eq(n,o)),t):(o===null&&t.push(N.is(n,o)),t)},[]).join(" and ")}function Pn(e){return e!==null&&typeof e=="object"&&("min"in e||"max"in e)}function fs(e){return e!==null&&typeof e=="object"&&"text"in e&&"option"in e}function ke(e){return typeof e=="string"&&Dn(e)?`{${e}}`:typeof e=="string"?`'${e}'`:`${e}`}N.includes=function(t,n){return`@${t} Contains ${ke(n)}`};N.beginWith=function(t,n){return`@${t} BeginWith ${ke(n)}`};N.endWith=function(t,n){return`@${t} EndWith ${ke(n)}`};N.notEq=function(t,n){return`@${t} nq ${ke(n)}`};N.eq=function(t,n){return Array.isArray(n)?N.in(t,n):`@${t} eq ${ke(n)}`};N.ge=function(t,n){return`@${t} ge ${n}`};N.le=function(t,n){return`@${t} le ${n}`};N.in=function(t,n){const o=n.map(ke).join(", ");return`@${t} in (${o})`};N.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":N.and(...n.map(o=>N.notEq(t,o)))};N.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(N.wrap).join(" and ")};N.wrap=function(t){return`(${t})`};N.is=function(t,n){return`@${t} is ${n}`};N.or=function(...t){return t.join(" or ")};function Ct(e){return Object.keys(e).reduce((t,n)=>{let o=e[n];const a=n.charAt(0).toUpperCase()+n.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=Ct(o)),t[a]=o,t},{})}var j=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(j||{});const X=new st,Ne=new as;exports.ApplicationStatus=$n;exports.AsyncProcessStatus=rn;exports.Communication=ns;exports.CoreError=ae;exports.DisplayListRow=On;exports.EventBus=Ne;exports.Filter=N;exports.ListDataController=en;exports.Manager=X;exports.MetadataStore=Z;exports.ModalListDownload=Bo;exports.ModalVersionHistory=Zo;exports.NotificationSystem=Ie;exports.OBJECT_TYPE_NAME_FIELD=Gt;exports.RecordOperation=Vn;exports.SocketHandler=Ue;exports.SocketMessage=Ae;exports.SocketProgressHandler=ft;exports.SocketSystem=is;exports.WidgetAction=Fo;exports.WidgetButton=Ar;exports.WidgetFastTable=Lo;exports.WidgetFastTableHeadCell=Xt;exports.WidgetField=Jr;exports.WidgetIcon=Ee;exports.WidgetImage=$r;exports.WidgetList=Xr;exports.WidgetLoader=Xe;exports.WidgetMultiButton=Fr;exports.WidgetResolverEntity=xo;exports.WidgetSpinner=Le;exports.WidgetTable=Kt;exports.WidgetTablePanelFilterItem=Jt;exports.asyncProcess=ie;exports.authService=J;exports.billingService=ye;exports.catchUniversal=D;exports.config=hr;exports.configuration=I;exports.constants=S;exports.convertDDToDMS=_i;exports.convertDMSToDD=Ei;exports.convertListConfig=at;exports.coreUtils=Li;exports.debounce=sn;exports.documentsService=qn;exports.downloadDocumentBuilderFile=oa;exports.fileService=us;exports.formatter=_e;exports.getCellName=oe;exports.getCellValue=Oe;exports.getEntityLink=Et;exports.getEntityResolveLink=Rn;exports.getNamesFromListConfig=yt;exports.getPathForResolveRouter=ki;exports.getPrimaryFieldNameForEntity=qe;exports.getUnitValue=et;exports.groupArrayByField=sa;exports.historyService=ss;exports.injectAction=tn;exports.internationalizationService=cs;exports.invitationService=Hn;exports.isUUID=Dn;exports.loadPrintForm=Ai;exports.openBlobFile=pt;exports.openService=ls;exports.parseError=gt;exports.parseTextByMarkdown=bi;exports.prettyDate=We;exports.prettyDateWithTime=mt;exports.prettyMoney=an;exports.prettyValueFieldByEntity=nt;exports.request=H;exports.setupListRow=ct;exports.socketProcess=ra;exports.staticLink=mn;exports.t=q;exports.throttle=ua;exports.universalBatchDelete=Zt;exports.universalBatchUpdate=fn;exports.universalEntityCount=ga;exports.universalEntityCreate=cn;exports.universalEntityDelete=un;exports.universalEntityRead=fe;exports.universalEntityResolve=vt;exports.universalEntityUpdate=ht;exports.universalHistoryRead=pn;exports.universalListSettingRead=ln;exports.universalMandatoryFieldsRead=Si;exports.universalMetadataFieldTreat=fa;exports.universalMetadataListRead=ma;exports.universalToolRead=dn;exports.useActions=Hi;exports.useCommunication=ji;exports.useEnter=qi;exports.useFormEntity=Ui;exports.useListActiveRow=Fi;exports.useListDownload=Fn;exports.useListEntity=Bi;exports.useListSearch=zi;exports.useListSelect=Gi;exports.useLocalStorage=zt;exports.useManagerState=Vi;exports.useMetadata=Fe;exports.useMetadataField=Yt;exports.usePrintForm=xn;exports.useSocket=L;exports.useUsageContext=_t;exports.useVisibleItem=ut;exports.useWizard=Qi;exports.uuidv4=la;exports.valuesToUpperCase=Ct;exports.wrapToolResponse=gn;
12
+ */const Mt=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},jt=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},Ut=function(e,t){const n=this.events[e];if(!n)return;const o=n.indexOf(t);o!==-1&&n.splice(o,1)},Wt=function(){this.events={}};class ne{constructor(){this.events={}}on(t,n){return Mt.call(this,t,n)}emit(t,n){return jt.call(this,t,n)}off(t,n){return Ut.call(this,t,n)}cleanEvents(){Wt.call(this)}static on(t,n){return Mt.call(ne,t,n)}static emit(t,n){return jt.call(ne,t,n)}static off(t,n){return Ut.call(ne,t,n)}static cleanEvents(){Wt.call(ne)}}ne.events={};class ns extends ne{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return Pi(this.id,t)}static checkAndGenerate(t,n,o){return Di(t,n,o).then(a=>a.length===0?$i(t,n,o):a[0])}}function rs(){return L().emit("client:read",{})}class kt extends Error{static ConstContextCannotBeChanged(){return new kt("The current context is set to constant. In order to change it, you need to put Manager into a changeable state.")}}var Re,be;const Z=class Z extends ne{constructor(){super(...arguments);Ve(this,Re);Ve(this,be);this.isConstContext=!1,this.type="front",this.organizations=[],he(this,be,!1)}set language(n){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,n)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||Z.DEFAULT_LANGUAGE}get contextId(){return Be(this,Re)}set contextId(n){if(this.isConstContext)throw kt.ConstContextCannotBeChanged();he(this,Re,n)}get contextType(){var n;if(this.contextId)return((n=this.person)==null?void 0:n.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(n){he(this,be,n),this.emit(Z.EVENT_READY_UPDATE,n)}get ready(){return Be(this,be)}onReady(n){return this.on(Z.EVENT_READY_UPDATE,n)}onupdateContext(n){return this.on(Z.EVENT_CONTEXT_UPDATE,n)}setCurrentContext(n){if(this.contextId===n)return console.warn("[application-manager] The current context has already been installed.");this.contextId=n,localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(n)),this.emit(Z.EVENT_CONTEXT_UPDATE,n),console.log(`Current context id %c${n}`,"color: purple")}get context(){var n;return this.contextId?this.contextId===((n=this.person)==null?void 0:n.id)?this.person:this.organizations.find(o=>o.id===this.contextId)||null:null}async init(){try{const n=await this.loadCustomerData();this.customer=n,this.person=n,this.organizations=n.organizations,this.userId=n.userId,this.restoreCurrentContext(),this.ready=!0}catch(n){D()(n)}}restoreCurrentContext(){var o,a,i;if(typeof((o=this.customer)==null?void 0:o.constContextId)=="number"||((a=this.customer)==null?void 0:a.constContextId)===null)return this.setCurrentContext(this.customer.constContextId),this.isConstContext=!0;const n=((i=this.customer)==null?void 0:i.selectedContextId)||Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(n)&&n&&this.validateContextId(Number(n)))this.setCurrentContext(n);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return rs()}validateContextId(n){var o;try{return((o=this.person)==null?void 0:o.id)==n?!0:!!this.organizations.find(a=>a.id===n)}catch{return!1}}};Re=new WeakMap,be=new WeakMap,Z.DEFAULT_LANGUAGE="en",Z.EVENT_CONTEXT_UPDATE="event:context-update",Z.EVENT_READY_UPDATE="event:ready-update";let st=Z;function os(e){return L().emit("metadata:read",{entity:e})}const ee=function(){const t=r.reactive({}),n=new Map;function o(c){return t[c]}async function a(c){if(n.has(c)&&await n.get(c),t[c])return o(c);const s=await i(c);return l(c,s),o(c)}function i(c){const s=os(c).finally(()=>{n.delete(c)});return n.set(c,s),s}function l(c,s){t[c]=s}return{state:t,initEntity:a,get:o,loadingFlags:n}}();class as extends ne{on(t,n){return super.on(t,n)}emit(t,n){console.log("[event-bus] emit",t,n),super.emit(t,n)}off(t,n){super.off(t,n)}}class is{constructor(t){this.pingTimeout=0,this.pendingMessages=new Set,this.handlers=new Set,this.URI=t,this.createNewInstance(),setInterval(()=>{(!this.instance||this.instance.readyState===3)&&this.createNewInstance()},S.DELAY_SOCKET_RECONNECT),setInterval(()=>{Array.from(this.handlers.values()).filter(n=>n.expired).forEach(n=>{n.requestId?this.notify({requestId:n.requestId,event:qt,data:{message:ie.RequestTookToLong().message}}):this.handlers.delete(n)})},2e3)}sendMessage(t){const n=JSON.stringify({requestId:t.id,event:t.eventName,data:t.data,contextId:X.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});this.isConnected()?this.sendDataBySocketConnection(n):(this.pendingMessages.add(t),console.log("Socket is not connected. Message(%s) was send to save-queue",t.eventName))}isConnected(){var t;return this.instance&&((t=this.instance)==null?void 0:t.readyState)===1}createNewInstance(){console.log(`%cInitializing sockets: %c${this.URI}`,"color: purple","color: black");const t=new WebSocket(this.URI);t.onopen=()=>{console.log("Socket was %cconnected%c at %s","color: green","color: black",new Date().toLocaleString()),Array.from(this.pendingMessages.values()).forEach(n=>{this.sendMessage(n),this.pendingMessages.delete(n)})},t.onmessage=n=>{try{if(this.isBinary(n.data))return this.heartbeat();const o=JSON.parse(n.data);if(!tt.validateAnswer(o)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(o);return}o.event==="progress"&&Array.from(this.handlers).filter(a=>tt.checkForProgressHandler(a,o)).forEach(a=>a.continue(S.TIME_TO_LIVE_SOCKET_REQUEST)),o.refresh&&(console.log("The page needs to be reloaded. Reboot after 3 seconds."),setTimeout(()=>location.reload(),3e3)),this.notify(o)}catch(o){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(o)}},t.onclose=function(n){console.log("Connection to server was stopped: %d %s",n.code,n.reason)},t.onerror=function(n){console.warn(n)},this.instance=t}isBinary(t){return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Blob]"}sendDataBySocketConnection(t){this.instance&&this.instance.send(t)}heartbeat(){if(!this.instance)return;this.pingTimeout&&clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var n,o;(o=(n=this.instance)==null?void 0:n.close)==null||o.call(n)},er*3);const t=new Uint8Array(1);t[0]=Zn,this.sendDataBySocketConnection(t)}notify(t){Array.from(this.handlers.values()).forEach(n=>{var a,i,l,c;const o=t.requestId;if(n instanceof ft&&n.event===((i=(a=t.data)==null?void 0:a.for)==null?void 0:i.event)&&n.requestId===((c=(l=t.data)==null?void 0:l.for)==null?void 0:c.requestId))return n.callback(t.data,t);(n.requestId&&n.requestId===o||!n.requestId&&n.event===t.event)&&(n.callback(t.data,t),n.once&&this.handlers.delete(n))})}addHandler(t){this.handlers.add(t)}}class Q{static login(t){return H(I.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:I.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return Q.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return Q.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return Q.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return Q.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return H(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return Q.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return Q.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return Q.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return H(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(Q.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return H(`${I.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,o,a){return H(`${I.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:a})})}static confirmEmailByAccessRecovery(t,n,o,a){return H(`${I.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:a})})}static finishAccessRecovery(t,n,o,a){return H(`${I.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:o,ConfirmedPassword:a})})}}class ss{static readHistoryById(t,n){return H(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class ls{static getConfiguration(){return H("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await H(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class cs{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return H(`/open-api/internationalization/language/${t}`)}}class us{static async upload(t,n){const o=new FormData;return o.append("file",t),o.append("entityName",n),H("/close-api/files",{method:"POST",body:o}).then(a=>(a.filename=t.name,a))}static getFileLink(t){return`/close-api/files/${t}`}}var Vn=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Vn||{}),$n=(e=>(e.Approved="A",e.AwaitingFeedback="AF",e.AssignedForExam="AFE",e.Cancelled="C",e.Closed="CLS",e.Completed="CT",e.Draft="D",e.NotSatisfied="NSF",e.OnClarification="OC",e.Processing="P",e.Rejected="R",e.ReadyForExam="RFE",e.Submitted="S",e.SecurityCheck="SCK",e.Satisfied="SF",e.Withdrawn="W",e))($n||{});function Dn(e){return typeof e!="string"?!1:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}function ds(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function N(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];if(Array.isArray(o))return t.push(N.in(n,o)),t;if(Pn(o)&&(typeof o.min=="number"&&t.push(N.ge(n,o.min)),typeof o.max=="number"&&t.push(N.le(n,o.max))),fs(o)){if(o.text){const i=(l=>{switch(l){case"end":return N.endWith;case"begin":return N.beginWith;default:return N.includes}})(o.option);t.push(i(n,o.text))}return t}if(ds(o)){let a=function(i){var l;return((l=i.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&t.push(`@${n} ge ${a(o.start)}`),o.end&&t.push(`@${n} le ${a(o.end)}`),t}return typeof o=="number"||typeof o=="boolean"||typeof o=="string"?(t.push(N.eq(n,o)),t):(o===null&&t.push(N.is(n,o)),t)},[]).join(" and ")}function Pn(e){return e!==null&&typeof e=="object"&&("min"in e||"max"in e)}function fs(e){return e!==null&&typeof e=="object"&&"text"in e&&"option"in e}function ke(e){return typeof e=="string"&&Dn(e)?`{${e}}`:typeof e=="string"?`'${e}'`:`${e}`}N.includes=function(t,n){return`@${t} Contains ${ke(n)}`};N.beginWith=function(t,n){return`@${t} BeginWith ${ke(n)}`};N.endWith=function(t,n){return`@${t} EndWith ${ke(n)}`};N.notEq=function(t,n){return`@${t} nq ${ke(n)}`};N.eq=function(t,n){return Array.isArray(n)?N.in(t,n):`@${t} eq ${ke(n)}`};N.ge=function(t,n){return`@${t} ge ${n}`};N.le=function(t,n){return`@${t} le ${n}`};N.in=function(t,n){const o=n.map(ke).join(", ");return`@${t} in (${o})`};N.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":N.and(...n.map(o=>N.notEq(t,o)))};N.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(N.wrap).join(" and ")};N.wrap=function(t){return`(${t})`};N.is=function(t,n){return`@${t} is ${n}`};N.or=function(...t){return t.join(" or ")};function Ct(e){return Object.keys(e).reduce((t,n)=>{let o=e[n];const a=n.charAt(0).toUpperCase()+n.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=Ct(o)),t[a]=o,t},{})}var j=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(j||{});const X=new st,Ne=new as;exports.ApplicationStatus=$n;exports.AsyncProcessStatus=rn;exports.Communication=ns;exports.CoreError=ie;exports.DisplayListRow=On;exports.EventBus=Ne;exports.Filter=N;exports.ListDataController=en;exports.Manager=X;exports.MetadataStore=ee;exports.ModalListDownload=Bo;exports.ModalVersionHistory=Zo;exports.NotificationSystem=Ie;exports.OBJECT_TYPE_NAME_FIELD=Gt;exports.RecordOperation=Vn;exports.SocketHandler=Ue;exports.SocketMessage=Ae;exports.SocketProgressHandler=ft;exports.SocketSystem=is;exports.WidgetAction=Fo;exports.WidgetButton=Ar;exports.WidgetFastTable=Lo;exports.WidgetFastTableHeadCell=Xt;exports.WidgetField=Jr;exports.WidgetIcon=Ee;exports.WidgetImage=$r;exports.WidgetList=Xr;exports.WidgetLoader=Xe;exports.WidgetMultiButton=Fr;exports.WidgetResolverEntity=xo;exports.WidgetSpinner=Le;exports.WidgetTable=Kt;exports.WidgetTablePanelFilterItem=Jt;exports.asyncProcess=se;exports.authService=Q;exports.billingService=ye;exports.catchUniversal=D;exports.config=hr;exports.configuration=I;exports.constants=S;exports.convertDDToDMS=_i;exports.convertDMSToDD=Ei;exports.convertListConfig=at;exports.coreUtils=Li;exports.debounce=sn;exports.documentsService=qn;exports.downloadDocumentBuilderFile=oa;exports.fileService=us;exports.formatter=_e;exports.getCellName=ae;exports.getCellValue=Oe;exports.getEntityLink=Et;exports.getEntityResolveLink=Rn;exports.getNamesFromListConfig=yt;exports.getPathForResolveRouter=ki;exports.getPrimaryFieldNameForEntity=qe;exports.getUnitValue=et;exports.groupArrayByField=sa;exports.historyService=ss;exports.injectAction=tn;exports.internationalizationService=cs;exports.invitationService=Hn;exports.isUUID=Dn;exports.loadPrintForm=Ai;exports.openBlobFile=pt;exports.openService=ls;exports.parseError=gt;exports.parseTextByMarkdown=bi;exports.prettyDate=We;exports.prettyDateWithTime=mt;exports.prettyMoney=an;exports.prettyValueFieldByEntity=nt;exports.request=H;exports.setupListRow=ct;exports.socketProcess=ra;exports.staticLink=mn;exports.t=q;exports.throttle=ua;exports.universalBatchDelete=Zt;exports.universalBatchUpdate=fn;exports.universalEntityCount=ga;exports.universalEntityCreate=cn;exports.universalEntityDelete=un;exports.universalEntityRead=de;exports.universalEntityResolve=vt;exports.universalEntityUpdate=ht;exports.universalHistoryRead=pn;exports.universalListSettingRead=ln;exports.universalMandatoryFieldsRead=Si;exports.universalMetadataFieldTreat=fa;exports.universalMetadataListRead=ma;exports.universalToolRead=dn;exports.useActions=Hi;exports.useCommunication=ji;exports.useEnter=qi;exports.useFormEntity=Ui;exports.useListActiveRow=Fi;exports.useListDownload=Fn;exports.useListEntity=Bi;exports.useListSearch=zi;exports.useListSelect=Gi;exports.useLocalStorage=zt;exports.useManagerState=Vi;exports.useMetadata=Fe;exports.useMetadataField=Yt;exports.usePrintForm=xn;exports.useSocket=L;exports.useUsageContext=_t;exports.useVisibleItem=ut;exports.useWizard=Qi;exports.uuidv4=la;exports.valuesToUpperCase=Ct;exports.wrapToolResponse=gn;
13
13
  //# sourceMappingURL=eservices-core.cjs.js.map