eservices-core 1.3.181 → 1.3.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eservices-core.cjs.js +5 -5
- package/dist/eservices-core.es.js +345 -345
- package/dist/eservices-core.umd.js +5 -5
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
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}.flex{display:flex}.flex_column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.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_bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.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_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}.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}.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;color:#4f4f4f}.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{text-align:right}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.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-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.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}.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}.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-498c4f00]{padding:18px;text-align:start}.widget-table__head-label[data-v-498c4f00]{font-weight:600;font-size:14px;line-height:19px}[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-abbdaab5]{display:flex;gap:4px}.widget-head-cell-order[data-v-abbdaab5]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-order-icon[data-v-abbdaab5]:first-child{transform:rotate(180deg)}.widget-head-cell-label[data-v-abbdaab5]{cursor:pointer}')),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}.flex{display:flex}.flex_column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.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_bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.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_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}.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}.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;color:#4f4f4f}.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{text-align:right}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.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-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.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}.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}.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-498c4f00]{padding:18px;text-align:start}.widget-table__head-label[data-v-498c4f00]{font-weight:600;font-size:14px;line-height:19px}[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-9737752c]{display:flex;gap:4px}.widget-head-cell-order[data-v-9737752c]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-order-icon[data-v-9737752c]:first-child{transform:rotate(180deg)}.widget-head-cell-label[data-v-9737752c]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-9737752c]{padding:7px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
"use strict";var Ze=e=>{throw TypeError(e)};var et=(e,t,n)=>t.has(e)||Ze("Cannot "+n);var tt=(e,t,n)=>(et(e,t,"read from private field"),n?n.call(e):t.get(e)),nt=(e,t,n)=>t.has(e)?Ze("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Oe=(e,t,n,r)=>(et(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);/*!
|
|
3
|
-
* eservices-core v1.3.
|
|
3
|
+
* eservices-core v1.3.183
|
|
4
4
|
* (c) 2024 ESERVICES
|
|
5
5
|
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),F=require("jenesius-vue-form"),Be=require("vue-router"),Kt=require("date-and-time"),Ie=require("debug"),ee=require("jenesius-vue-modal"),_=class _ extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=_.ID++}static ParentFormNotFound(){return new _("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new _("Composite object name is undefined",t)}static EntityWithoutName(t){return new _("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new _(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new _("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new _("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new _(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return _.ApiNotAvailable()}static ApiError(t){return new _("Request error",t)}static ApiNotAvailable(){return new _(`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?_.ApiNotAvailable():new _(t||"Authorization Error",n)}static ApiResponseParseFailed(){return _.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new _("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new _(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new _("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new _("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new _(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new _(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new _(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new _(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new _("The request took too long to complete. Try again later.")}};_.ID=0;let K=_;const Qt="Please try again later or submit a feedback if problem doesn't go.";function Zt(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return Qt}})}function H(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw K.ApiNotAvailable()}).then(n=>Zt(n).then(r=>{if(!n.ok)throw r;return r}))}class en{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),t[n]=r,!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 en;function rt(e){return{...e,createdEntities:e.createdEntites}}const oe=class oe{static async getStartConfig(t,n){return H([oe.url,t,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(t,n){return H([oe.url,t,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(rt)}static async runStep(t,n,r,i,a){return H([oe.url,t,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:i,values:a})}).then(rt)}};oe.url="/close-api/views/process-wizard";let ie=oe;class tn{static invite(t,n,r){return H("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:r})})}static accept(t,n){return H("/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 H("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class nn{static getRequiredDocuments(t,n,r){const i=new URLSearchParams({entity:t,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(a=>a.json())}}class re{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${re.url()}/calculator/${t}`)}static calculate(t,n){return H(`/${re.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):K.ApiNotAvailable()})}static parseMetadataField(t){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return H(`/${re.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return H(`/${re.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}function rn(e){return e.statusName==="Completed"}function on(e){return e.statusName==="FinalStepWithConfirmation"}function an(e){return e.statusName==="ValidationError"}function sn(e,t,n){let r=null;const i=o.reactive({wait:null});let a=[],l=null;const c=o.ref(null);function s(){c.value=a.find(d=>d.name===l)||null}function u(){var d;return l?((d=a.find(b=>b.name===l))==null?void 0:d.fields)||[]:[]}function p(d){if(s(),an(d))return void n.onValidation(d.validationResults);if((d.statusName==="FinalStep"||d.statusName==="NextStep")&&(!u().length||ln(u(),n.presets)))return w(n.presets||{});rn(d)&&n.onCompleted(d),on(d)&&n.onConfirmation(d)}async function m(){try{await f(),await T()}catch(d){const{message:b}=de(d);ge.add("error",b)}}function f(){return i.wait="Loading process information.",ie.getStartConfig(t,e).then(d=>{a=d.steps.map(b=>({label:b.title,name:b.stepName,number:b.number,fields:b.frontendEntity.objectTypes.reduce((k,N)=>(N.properties.forEach(O=>{k.push({name:O.name,label:O.title,type:O.refEntityName||O.dataType})}),k),[])}))}).then(d=>(i.wait=!1,d))}function v(d){return["FinalStepWithConfirmation","NextStep","Completed","FinalStep"].includes(d.statusName)&&(r=d.token,l=d.nextStepName),d}function g(d){const b=de(d);ge.add("error",b.message)}function T(){return i.wait="Starting process",ie.startProcess(t,e).then(v).then(p).catch(g).finally(()=>{i.wait=null})}function w(d={}){return!r||!l?Promise.reject("Not step or token."):(i.wait="Waiting for result...",ie.runStep(t,e,l,r,d).then(v).then(p).catch(g).finally(()=>{i.wait=!1}))}return{initialize:m,state:i,currentStepConfig:o.readonly(c),next:w}}function ln(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(!F.utils.getPropFromObject(t,r.name))return!1}return!0}const cn={class:"widget-table__head-cell"},un={class:"widget-table__head-label margin_0 text_overflow"},wt=o.defineComponent({__name:"widget-table-head-cell",props:{label:{}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("th",cn,[o.createElementVNode("span",un,o.toDisplayString(t.label),1)]))}}),fn={class:"widget-table__head"},dn=o.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return o.computed(()=>R.componentTableHeadCell||wt),(t,n)=>(o.openBlock(),o.createElementBlock("tr",fn,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.config,r=>o.renderSlot(t.$slots,"default",o.mergeProps({ref_for:!0},r),void 0,!0)),256))]))}}),X=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},pn=X(dn,[["__scopeId","data-v-498c4f00"]]);function Ve(e){return Array.isArray(e)?Ve(e[0]):typeof e!="string"?null:e}function Me(e){return Ve(e.name)}function gn(e){const t=new RegExp(/\$\{([a-zA-Z0-9.]+)}/,"g"),n=[];let r;for(;(r=t.exec(e))!==null;)n.push(r[1]);return n}function mn(e,t){return gn(e).forEach(r=>{e=e.replace(new RegExp("\\$\\{"+r+"}","g"),F.utils.getPropFromObject(t,r))}),e}function $e(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function je(e,t){const n=Me(e);if(typeof e.value=="string")return mn(e.value,t);let r=n?F.utils.getPropFromObject(t,n):null;if(r===void 0&&(r=null),typeof e.value=="function")return e.value(r,t);if(e.value===null)return null;if(e.unitValue&&(r=$e(e.unitValue)(r)),e.unit&&(r=$e(e.unit)(r)),e.type)switch(e.type){case"number":{typeof r=="number"&&(r=new Intl.NumberFormat().format(r));break}case"date":{r=qe(typeof r=="string"?r:null);break}case"dateTime":case"dateWithTime":{r=Tt(typeof r=="string"?r:null);break}case"money":{r=Ct(r);break}}return e.formatter&&(r=le(e.formatter).exec(r,t)),typeof r=="boolean"&&(r=r?"✓":"—"),r}const A={LIST_ACTIVE_NEW:"list-active-new",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:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4,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"};function Ne(e){return[A.CORE_DEBUG_LABEL,e].join(":")}const R={getEntityLink(e,t){return`/forms/${e}/${t}`},iconHandlerText(){return""},iconTag:"i"};function hn(e){for(let t in e)R[t]=e[t]}const yn={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()=>o.h(R.iconTag,{class:R.iconHandler?R.iconHandler(n):`icon icon-${n}`},R.iconHandlerText(n))}},se=X(yn,[["__scopeId","data-v-8a72b45f"]]),vn=Ie(Ne("setup-list-row"));function wn(e,t){const n=e.config.map(r=>bn(r,e,t));return o.h("tr",{class:"widget-table__row widget-table-row"},n)}function bn(e,t,n){const r=t.values;let i=je(e,r);const a={onClick:[],class:["widget-table__cell widget-table-cell"]};function l(p){a.onClick.push(()=>p(r,e,n))}function c(p){Array.isArray(p)?a.class.push(...p):a.class.push(p)}const s=[],u=[];if(e.hide&&e.hide(r))return[o.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(o.h(F.FormField,{type:"single-checkbox",modelValue:t.selected})),l(ot.bind(null,n,!0));break}case"select":{u.push(o.h(F.FormField,{type:"single-radio",modelValue:t.selected})),l(ot.bind(null,n,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const p=e.link(r);if(p){const m=o.h(Be.RouterLink,{to:p});u.push(m),c("widget-table-cell_link")}}catch(p){vn("Can't add router link",p)}if(e.href&&(u.push(o.h("a",{href:e.href(r),target:"_blank"})),c("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&u.push(o.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&u.push(o.h(se,{name:e.icon})),typeof e.icon=="function")){const p=e.icon(r);p!==null&&u.push(o.h(se,{name:p}))}return e.class&&(typeof e.class=="function"?c(e.class(r)):c(e.class)),R.listCellHandler&&R.listCellHandler(e,r,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n}),s.push(o.h("td",a,u)),s}function ot(e,t){e.emit("select",t)}function Ue(e,t){return()=>{try{return wn(e,t)}catch(n){return console.warn(n),null}}}const En={props:{values:Object,config:Object,selected:Boolean},setup:Ue},Tn=["colspan"],it=o.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=t,r=o.ref();return o.onMounted(()=>{setTimeout(()=>{r.value&&r.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,a)=>(o.openBlock(),o.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:r},[o.createElementVNode("td",{colspan:i.rowLength},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.component),o.mergeProps(i.$attrs,{values:i.values,new:i.isNew,onClose:a[0]||(a[0]=l=>n("close")),onSave:a[1]||(a[1]=l=>n("save",l))}),null,16,["values","new"]))],8,Tn)],512))}}),kn={class:"widget-table"},at="update:selectedRows",Cn="update:activeRow",bt=o.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},useMockField:{type:Boolean,default:!1}},emits:["save","order"],setup(e,{emit:t}){const n=e,r=t,i=o.useSlots(),a=o.computed(()=>{var f;return(f=i==null?void 0:i.default)==null?void 0:f.call(i)[0]});function l(f){return n.useMockField?gt(f):f}function c(f,v=!0){if(!n.selectedRows)return;if(!v)return r(at,n.selectedRows.includes(f)?[]:[f]);const g=[...n.selectedRows],T=g.indexOf(f);return T===-1?g.push(f):g.splice(T,1),r(at,g)}function s(f){r(Cn,f)}function u(f){r("save",f),r("update:activeRow",null)}const p=o.computed(()=>n.shortcut?n.config.filter(f=>f.name?!!n.array.find(g=>![null,""].includes(je(f,g))):!0):n.config),m=o.computed(()=>n.useMockField?n.array.filter(gt):n.array);return(f,v)=>(o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("table",kn,[o.createElementVNode("thead",null,[o.createVNode(pn,{config:p.value,onOrder:v[0]||(v[0]=g=>f.$emit("order",g))},{default:o.withCtx(g=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(f.$slots["head-cell"]||wt),o.normalizeProps(o.guardReactiveProps(g)),null,16))]),_:1},8,["config"])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,g=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:f.index},[o.createVNode(En,{config:p.value,values:g,selected:f.selectedRows.includes(l(g)),onSelect:T=>c(l(g),T),onActivate:T=>s(l(g)),class:o.normalizeClass(f.classCallback?f.classCallback(g):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),a.value&&f.activeRow===l(g)?(o.openBlock(),o.createBlock(it,{key:0,component:a.value,"row-length":f.config.length,values:g,onClose:v[1]||(v[1]=T=>r("update:activeRow",null)),onSave:u,"is-new":!1},null,8,["component","row-length","values"])):o.createCommentVNode("",!0)],64))),128)),f.activeRow===o.unref(A).LIST_ACTIVE_NEW?(o.openBlock(),o.createBlock(it,{key:0,component:a.value,"row-length":p.value.length,onClose:v[2]||(v[2]=g=>r("update:activeRow",null)),onSave:u,"is-new":!0},null,8,["component","row-length"])):o.createCommentVNode("",!0)])])]))}}),An=o.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:"widget-spinner",style:o.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),he=X(An,[["__scopeId","data-v-0ef9ae88"]]),_n={class:"widget-button"},Sn=o.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("button",_n,[t.wait?(o.openBlock(),o.createBlock(he,{key:0,class:"widget-button-spinner"})):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),In=X(Sn,[["__scopeId","data-v-450dc564"]]),Nn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Rn={class:"widget-multi-button-body grid"},Ln=["onClick"],On={class:"widget-multi-button-side-wrap"},$n=o.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){o.useCssVars(l=>({"04895bf1":r.value}));const t=e,n=o.reactive({active:!1,wait:!1}),r=o.computed(()=>t.array.length+(t.label?1:0));function i(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function a(l=!n.active){n.active=l}return(l,c)=>(o.openBlock(),o.createElementBlock("div",Nn,[o.createElementVNode("div",{class:o.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[o.createElementVNode("div",Rn,[l.label?(o.openBlock(),o.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>a())},o.toDisplayString(l.label),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.array,(s,u)=>(o.openBlock(),o.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:p=>{i(s.callback),a(!1)}},o.toDisplayString(s.label),9,Ln))),128))]),o.createElementVNode("div",On,[o.createElementVNode("div",{class:o.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>a())},[n.wait?(o.openBlock(),o.createBlock(o.unref(he),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(o.openBlock(),o.createBlock(o.unref(se),{key:1,class:"widget-multi-button-side-icon"},{default:o.withCtx(()=>[o.createTextVNode("angle-small-down")]),_:1})):o.createCommentVNode("",!0)],2)])],2)]))}}),xn=X($n,[["__scopeId","data-v-d43a76ce"]]),Dn={class:"widget-loader flex flex-align_center gap_10 padding_15"},Fn={class:"text_md"},Pn=o.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",Dn,[o.createVNode(he,{color:"var(--primary)",class:"padding_10"}),o.createElementVNode("span",Fn,o.toDisplayString(t.label),1)]))}}),Bn=["alt","src"],Vn=o.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=o.ref();return o.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(r,i)=>(o.openBlock(),o.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,Bn))}}),Mn={props:{config:Array,values:Object,selected:Boolean},setup:Ue},jn=X(Mn,[["__scopeId","data-v-344a8cc1"]]),Un=e=>(o.pushScopeId("data-v-bf495d6a"),e=e(),o.popScopeId(),e),Wn={class:"widget-list-head-cell"},qn=Un(()=>o.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Gn=o.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,r=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(i,a)=>(o.openBlock(),o.createElementBlock("th",null,[o.createElementVNode("div",Wn,[o.createElementVNode("div",{class:"head-cell-content flex_grow",style:o.normalizeStyle({"min-width":i.minWidth,"max-width":i.maxWidth,width:i.width})},[i.type==="multi-select"?(o.openBlock(),o.createBlock(o.unref(F.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=o.withModifiers(l=>r("select"),["stop","prevent"]))})):(o.openBlock(),o.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:a[1]||(a[1]=l=>r("order"))},o.toDisplayString(i.title||i.label),1))],4),i.name&&i.order.length&&i.order[0]===i.name?(o.openBlock(),o.createBlock(o.unref(se),{key:0,class:o.normalizeClass(["head-cell-order",{"head-cell-order_down":i.order.length>1&&i.order[1]==="desc"}])},{default:o.withCtx(()=>[o.createTextVNode("core-arrow-up")]),_:1},8,["class"])):o.createCommentVNode("",!0),qn])]))}}),zn=X(Gn,[["__scopeId","data-v-bf495d6a"]]),Hn=o.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(),a=o.ref();o.onMounted(()=>{function u(g,T){let w=-1;do w++,T-=g[w];while(T>0&&w<g.length);return w}function p(g,T){let w=0;for(;T>0&&T>g[w]&&w<g.length;)T-=g[w],w++;return console.log(T,w),w>0?w:0}function m(g){try{a.value.style.insetInlineStart=g+"px"}catch(T){console.log(T)}}function f(g){try{a.value.style.width=g+"px",a.value.style.minWidth=g+"px",a.value.style.maxWidth=g+"px"}catch(T){console.log(T)}}function v(g){return g===null?!1:g.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(T){var ce;function w(V){return V.screenX+k-E}const d=i.value,b=[...d.children].filter(V=>V.localName==="th"),k=((ce=d.offsetParent)==null?void 0:ce.scrollLeft)||0,N=b.map(V=>V.clientWidth),O=v(T.target),E=d.getBoundingClientRect().left,h=w(T),y=u(N,h),C=N.slice(0,y).reduce((V,W)=>V+W,0),S=h-C,$=d.offsetWidth,P=b[y].clientWidth;if(n.config[y].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",T.screenX),console.log("Widths",N),console.log("max width",$),console.log("Start Position",h),console.log("Position From",y),console.log("Start Position",y),console.log("Global offset (Отступ самой таблицы от края экрана)",E),console.log("Del",S),console.groupEnd(),a.value.innerText=b[y].textContent||"",a.value.style.display="grid",a.value.style.width=P+"px",a.value.style.cursor="grabbing",m(C),f(P),document.addEventListener("pointermove",J,{passive:!0}),document.addEventListener("pointerup",I);function I(V){if(console.group("END"),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",I),O&&(n.config[y].width=a.value.style.width,n.config[y].minWidth=a.value.style.width,n.config[y].maxWidth=a.value.style.width,l(n.config)),!O){const W=V.screenX+k-E;console.log("ENP Position",W);const ve=p(N,W);if(console.log(y,"->",ve),ve!==y){const ue=n.config[y],Le=n.config;Le.splice(y,1),Le.splice(ve,0,ue),l(Le)}else{const ue=n.config[y].name;c(ue)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function J(V){if(O){const ue=w(V)-h+P;f(ue);return}let W=V.screenX+k-E-S;W<0&&(W=0),W+P>$&&(W=$-P),m(W)}})});function l(u){r("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 p=n.order.length===1||n.order[1]==="asc"?"asc":"desc";s([u,p==="asc"?"desc":"asc"])}function s(u){r("update:order",u)}return(u,p)=>(o.openBlock(),o.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.config,(m,f)=>(o.openBlock(),o.createBlock(zn,o.mergeProps({key:m,ref_for:!0},m,{onOrder:v=>c(m.name),onSelect:p[0]||(p[0]=v=>r("select")),order:u.order}),null,16,["onOrder","order"]))),128)),o.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),Xn=X(Hn,[["__scopeId","data-v-ccffc6bd"]]),Jn={class:"widget-list"},Yn={class:"widget-list-body position_relative"},Kn=50,Qn=o.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,r=t;function i(s,u=!0){if(n.selectedRows)if(!u)l(n.selectedRows.includes(s)?[]:[s]);else{const p=[...n.selectedRows],m=p.indexOf(s);m===-1?p.push(s):p==null||p.splice(m,1),l(p)}}function a(){var s;if(((s=n.selectedRows)==null?void 0:s.length)!==n.array.length)return l([...n.array]);l([])}function l(s){r("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+Kn>u.scrollHeight&&r("scrollEnd")}return(s,u)=>(o.openBlock(),o.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[o.createElementVNode("table",Jn,[o.createElementVNode("thead",null,[o.createVNode(Xn,{onSelect:u[0]||(u[0]=p=>a()),"onUpdate:order":u[1]||(u[1]=p=>r("update:order",p)),"onUpdate:config":u[2]||(u[2]=p=>r("update:config",p)),config:s.config,order:s.order},null,8,["config","order"])]),o.createElementVNode("tbody",Yn,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.array,(p,m)=>{var f;return o.openBlock(),o.createBlock(jn,{key:m,class:"widget-list-row",values:p,config:s.config,selected:(f=s.selectedRows)==null?void 0:f.includes(p),onSelect:v=>i(p,v)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function We(){var a;const e=o.computed(()=>Object.keys(n).length===0||Object.values(n).includes(!0)),t=(a=o.getCurrentInstance())==null?void 0:a.uid;if(!t)throw"Undefined instance. Please check it.";const n=o.reactive({});o.provide(A.VISIBLE_ITEM_PROVIDE_NAME,{show(l){n[l]=!0},hide(l){n[l]=!1},remove(l){delete n[l]}});const r=o.inject(A.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){r==null||r.show(t)},hide(){r==null||r.hide(t)},remove(){r==null||r.remove(t)}},visibleItems:n}}const Zn=o.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const t=e,n=Ye(),r=Ke(),i=o.computed(()=>{var T,w;const f=s.value,v=u(f),g={type:v,disabled:!((T=c.value)!=null&&T.canSet),label:t.label};return f&&Object.assign(g,{suffix:v==="number"?f.valueUnit:void 0,required:l.includes(v||"")?!1:f.required,label:t.label||f.displayName}),Object.assign(g,((w=R.fieldParamsHandler)==null?void 0:w.call(R,f,c.value,g))||{}),g}),a=["MultiText","MultiWideText"],l=["switch","single-checkbox","single-radio"],c=o.computed(()=>{var f;return(f=r==null?void 0:r.value)==null?void 0:f.fields[t.name]}),s=o.computed(()=>{if(!n.value)return;const f=n.value.fieldsByName[t.name];if(f)return f});function u(f){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(f){if(f.type==="Reference"||f.type==="Owned")return f.referencedEntity;if(f.dataType==="Boolean")return"single-checkbox";if(f.dataType==="DateTime")return"date";if(f.dataType==="Integer"||f.dataType==="Decimal")return"number";if(f.dataType==="List")return f.aggregatedEntity;if(a.includes(f.presentationType))return"textarea";if(f.presentationType==="PhoneNumber")return"tel"}return"text"}const p=o.computed(()=>{var f;return((f=c.value)==null?void 0:f.canGet)===!0}),{controller:m}=We();return o.watch(()=>p.value,f=>f?m.show():m.hide(),{immediate:!0}),o.onUnmounted(()=>m.remove()),(f,v)=>p.value?(o.openBlock(),o.createBlock(o.unref(F.FormField),o.mergeProps({key:0},{...f.$attrs,...i.value},{name:f.name}),null,16,["name"])):o.createCommentVNode("",!0)}}),er={width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tr=["fill"],st=o.defineComponent({__name:"widget-icon-triangle",props:{color:{default:"#424242"}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",er,[o.createElementVNode("path",{d:"M4.39043 4.51196C4.19027 4.76216 3.80973 4.76216 3.60957 4.51196L0.649878 0.812348C0.387973 0.484966 0.621059 0 1.04031 0H6.95969C7.37894 0 7.61203 0.484966 7.35012 0.812348L4.39043 4.51196Z",fill:t.color||"#424242"},null,8,tr)]))}});function nr(e){return Array.isArray(e)&&(e==null?void 0:e[1])||A.DEFAULT_ORDER_DIR}const rr={class:"widget-head-cell-label"},or={key:0,class:"widget-head-cell-order"},ir=o.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{}},setup(e){const t=e,n=o.computed(()=>Ve(t.name)),r=o.computed(()=>nr(t.order));return(i,a)=>{var l;return o.openBlock(),o.createElementBlock("td",null,[o.createElementVNode("div",{class:"widget-head-cell",onClick:a[0]||(a[0]=c=>i.$emit("order",i.name))},[o.createElementVNode("span",rr,o.toDisplayString(i.label),1),n.value===((l=i.order)==null?void 0:l[0])?(o.openBlock(),o.createElementBlock("div",or,[o.createVNode(st,{class:"widget-head-cell-order-icon",color:r.value==="asc"?"var(--color-primary)":null},null,8,["color"]),o.createVNode(st,{class:"widget-head-cell-order-icon",color:r.value==="desc"?"var(--color-primary)":null},null,8,["color"])])):o.createCommentVNode("",!0)])])}}}),Et=X(ir,[["__scopeId","data-v-abbdaab5"]]),ar={class:"es-grid es-gap-15"},sr={key:0,class:"title-md color-primary margin-0"},lr={key:0,class:"widget-table-loader es-flex es-gap-10 es-flex-align-center es-padding-10 text-main"},cr=o.createElementVNode("span",null,"Loading...",-1),ur={class:"widget-fast-table-tools es-flex es-gap-15"},fr={class:""},dr=o.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{}},setup(e){const t=e,n=Be.useRouter(),r=o.ref([]),i=o.ref(null),a=o.ref(null),l=o.ref(null),c=F.Form.getParentForm();Ye(t.entity);const{state:s,update:u}=Ke(t.entity,{masterEntities:t.masterEntities||[]}),p=(t.actions||[]).map(E=>Lt(E)),m=o.computed(()=>i.value?Ht(t.entity,i.value.config):[]),f=o.computed(()=>{var E;return((E=i.value)==null?void 0:E.displayItem)||Je.inline}),v=o.computed(()=>{var E;return((E=i.value)==null?void 0:E.newItem)||f.value}),g=ke(async()=>{try{await w.call(),await u()}catch(E){const{message:h}=de(E);a.value=h}});c instanceof F.Form&&c.subscribe({read:g.call.bind(null),name:t.entity,type:"table"}),o.onMounted(()=>{T.call(),g.call()});const T=ke(async function(){const h=t.entity;i.value=await St(h,t.mark)}),w=ke(async function(){var y,C;const h=t.entity;a.value=null,r.value=(await pe(h,{fields:kt(m.value).join(" "),order:((y=i.value)==null?void 0:y.order)||[],filter:x.and(x(t.binding||{}),x(((C=i.value)==null?void 0:C.prefilters)||{}))})).map(Wo)});async function d(E){var y;if(E===null)return l.value=null;const h=E==null?void 0:E.Id;if(!h&&((y=i.value)!=null&&y.linkNew))return n.push(i.value.linkNew);if(f.value==="form")return n.push(Xe(t.entity,h));if(f.value==="inline")return l.value=E||A.LIST_ACTIVE_NEW;f.value==="modal"?(await ee.promptModal("form",{entity:t.entity,id:h}),await w.call()):l.value=A.LIST_ACTIVE_NEW}const{controller:b}=We();o.watch(()=>s.value,E=>{E&&(E.canRead?b.show():b.hide())},{immediate:!0}),o.onUnmounted(()=>b.remove());const k=[{icon:"reload",label:"Reload",callback(){g.call()}}];let N=[me.on("affected-entity",E=>{E.name===t.entity&&w.call()}),me.on("display-entity",async E=>{E.name===t.entity&&(w.promise&&await w.promise,l.value=r.value.find(h=>h.Id===E.id)||null)})];o.onUnmounted(()=>N.map(E=>E()));function O(E){var P;function h(I){return Array.isArray(I)?h(I[0]):typeof I!="string"?null:I}const y=h(E);if(!y)return;const C=(P=i.value)==null?void 0:P.order;(I=>{if(i.value)return i.value.order=I,!0})(C[0]!==y?[y]:C[1]==="desc"?[]:[y,"desc"])&&w.call()}return(E,h)=>{var S,$,P;const y=o.resolveComponent("widget-button"),C=o.resolveComponent("widget-fast-table-form");return o.openBlock(),o.createElementBlock("div",ar,[(S=i.value)!=null&&S.label?(o.openBlock(),o.createElementBlock("p",sr,o.toDisplayString(($=i.value)==null?void 0:$.label),1)):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:"slide-up"},{default:o.withCtx(()=>[o.unref(g).wait||o.unref(T).wait?(o.openBlock(),o.createElementBlock("div",lr,[o.createVNode(o.unref(he),{color:"var(--color-primary)"}),cr])):o.createCommentVNode("",!0)]),_:1}),o.createElementVNode("div",ur,[v.value==="form"||(P=o.unref(s))!=null&&P.canCreate?(o.openBlock(),o.createBlock(y,{key:0,callback:d,type:"primary"},{default:o.withCtx(()=>[o.createTextVNode(" Add New ")]),_:1})):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(p).filter(I=>!!I.value),I=>{var J;return o.openBlock(),o.createBlock(y,{callback:(J=I.value)==null?void 0:J.callback,type:"primary"},{default:o.withCtx(()=>{var ce;return[o.createTextVNode(o.toDisplayString((ce=I.value)==null?void 0:ce.label),1)]}),_:2},1032,["callback"])}),256)),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(k,I=>o.createVNode(y,{onClick:()=>I.callback,callback:I.callback},{default:o.withCtx(()=>[o.createVNode(se,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(I.icon),1)]),_:2},1024),o.createElementVNode("span",null,o.toDisplayString(I.label),1)]),_:2},1032,["onClick","callback"])),64))]),o.createElementVNode("div",fr,[o.createVNode(o.unref(bt),{config:m.value,array:r.value,"active-row":l.value,"onUpdate:activeRow":d,onOrder:O,class:"table"},{"head-cell":o.withCtx(I=>{var J;return[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(E.$slots["head-cell"]?E.$slots["head-cell"]:Et),o.mergeProps({label:I.label},I,{onOrder:O,order:((J=i.value)==null?void 0:J.order)||[]}),null,16,["label","order"]))]}),default:o.withCtx(()=>{var I;return[o.createVNode(C,{entity:E.entity,id:(I=l.value)==null?void 0:I.Id,"master-entities":E.masterEntities||void 0,binding:E.binding,onFormUpdate:h[0]||(h[0]=()=>{l.value=null,o.unref(w).call()})},null,8,["entity","id","master-entities","binding"])]}),_:1},8,["config","array","active-row"])])])}}});function Tt(e){return qe(e,"YYYY/MM/DD HH:mm:ss")}function qe(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Kt.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function ke(e){function t(...r){if(n.wait)return Promise.reject("The process has already started.");n.wait=!0;const i=Promise.resolve().then(()=>e(...r)).finally(()=>{n.wait=!1,n.promise=null});return n.promise=i,i}const n=o.reactive({wait:!1,call:t,promise:null});return n}function de(e){return typeof e=="string"?we(e):pr(e)?we(e.message,e.children||e.details||[]):gr(e)?we(e.title,[e.detail||""]):we(A.DEFAULT_ERROR_MESSAGE)}function pr(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function gr(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function we(e,t=[]){return{message:e,children:t}}function U(e="error"){return function(t){const{message:n,children:r}=de(t);ge.add(e,n,{children:r})}}function pe(e,t={}){return D().emit("entity:read",{...t,entity:e})}function Ge(e,t){return D().emit("entity:update",{...t,entity:e})}function kt(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function Ct(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let r=String(e).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(t,"0"),r[1].length>t&&(r[1]=r[1].substring(0,t)),r.join(".")}function mr(e,t){const n=new Map;return e.forEach(r=>{var a;const i=t(r);n.has(i)||n.set(i,[]),(a=n.get(i))==null||a.push(r)}),n}function hr(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function yr(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return A.DEFAULT_ERROR_MESSAGE}})}function B(e,t={}){return j.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=j.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(A.DEFAULT_ERROR_MESSAGE)}).then(n=>yr(n).then(r=>{if(!n.ok)throw r;return r}))}function vr(e,t=1e3){let n=0;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function wr(e,t){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...r)}}const br=Ie(Ne("pretty-value-field-by-entity"));function Er(e,t,n){try{const r=_e.get(e);if(!r)throw new Error("For entity metadata is not loaded");const i=r.fieldsByName[t];if(!i)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return i.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return br('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,e,t,n),n}}const Tr=1,kr=5e3,Cr="static-folder",At="request-error",Ar="Distinguisher",Q=Ie(Ne("use-socket"));function D(){return Sr}function _r(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Sr=function(){let e=1,t,n;const r=new Set;let i=0;const a=new Set;function l(){if(t)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{t.close()},kr*2);const d=new Uint8Array(1);d[0]=Tr,t.send(d)}setInterval(()=>{Array.from(r).forEach(d=>{w(d)&&(Q("Handler for event %s requestId %d was expired",d.event,d.requestId),d.requestId?s({requestId:d.requestId,event:At,data:{message:K.RequestTookToLong().message}}):r.delete(d))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},A.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:a,requestId:e,handlers:r,socketInstance:t}}function s(d){const b=[...r.values()];Q("Handlers array length is %d. Response event: %s. Request id: %d",r.size,d.event,d.requestId),b.forEach(k=>{const N=d.requestId;(k.requestId&&k.requestId===N||!k.requestId&&k.event===d.event)&&(Q("Find appropriated handler: %d, event: %s",e,k.event),k.callback(d.data,d),k.once&&(r.delete(k),Q("Handler was removed by *once* params was passed. %o",k)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(d){Q("Connection to server was stopped: %d %s",d.code,d.reason),Array.from(r).forEach(b=>{b.guaranteedAnswer&&b.serializeString&&a.add(b.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(d=>{p(d),a.delete(d)})},t.onerror=function(d){console.warn(d)},t.onmessage=d=>{var b;try{if(_r(d.data)){l();return}const k=JSON.parse(d.data);if(!_t(k)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(k);return}(b=k==null?void 0:k.data)!=null&&b.refresh&&location.reload(),s(k)}catch(k){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(k)}}}function p(d){t.send(d)}function m(d,b){T({event:d,callback:b})}function f(d,b){T({event:d,callback:b,once:!0})}function v(){return t&&(t==null?void 0:t.readyState)===1}function g(d,b,k){const N=++e,O=JSON.stringify({requestId:N,event:d,data:b,contextId:j.contextId,url:R.socketURLHandler?R.socketURLHandler():window.location.href});return v()?p(O):(a.add(O),Q("Socket is not connected. Message was send to save-queue")),new Promise((E,h)=>{T({event:d,requestId:N,once:!0,guaranteedAnswer:!0,serializeString:O,callback:(y,C)=>{if(Q("Promise was resolve with next data:",y),Ir(C))return void h(y);k&&k(y,C),E(y)},timeToLive:A.TIME_TO_LIVE_SOCKET_REQUEST})})}function T(d){const b={timeToLive:0,...d,created:new Date().getTime()};r.add(b)}function w(d){return d.timeToLive===0||typeof d.timeToLive!="number"?!1:new Date().getTime()-d.created>d.timeToLive}return{get socket(){return t},on:m,once:f,emit:g,initialization(d){n=d},getDevInfo:c}}(),Ir=e=>!!_t(e)&&e.event===At,_t=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function St(e,t){return D().emit("list-setting:read",{entity:e,mark:t})}function Nr(e,t){return D().emit("metadata-field:treat",{entity:e,fieldName:t})}function It(e,t){return D().emit("entity:create",{...t,entity:e})}function Nt(e,t){return D().emit("entity:delete",{...t,entity:e})}function Rr(e,t){return D().emit("usage-context:read",{...t,entity:e})}function Rt(e={}){return D().emit("tool:read",e)}function Lr(){return D().emit("metadata-list:read",{})}function Lt(e,t={},n={}){const r=o.inject(A.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:t,a=typeof t=="string"?n:t;return o.computed(()=>{var s;const c=((typeof e=="string"?(s=r==null?void 0:r.actions)==null?void 0:s.value:o.unref(e))||[]).find(u=>u.name===i);return c?{...c,...a}:null})}function Or(e){return D().emit("history:read",e)}function $r(e,t){return D().emit("entity:count",{...t,entity:e})}function xr(e){return`/${Cr}/${e}`}function le(e){return{exec(t,n){switch(e.name){case"replace-boolean":return le.replaceBoolean(t,e.values);case"replace-record-operation":return le.replaceRecordOperation(t)}}}}le.replaceBoolean=Dr;le.replaceRecordOperation=Fr;function Dr(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function Fr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Pr(e={}){return D().emit("tool:execute",e)}const Br=Ie(Ne("wrap-tool-response"));function Ot(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=jr),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=Wr),e.handleCloseForm===void 0&&(e.handleCloseForm=qr),e.handleValidationResult===void 0&&(e.handleValidationResult=Ur),{...t,label:t.title,callback(){var i;const n=typeof e.values=="function"?e.values(t,e):e.values,r=()=>Pr({name:t.name,values:n,usageContext:t.usageContext}).then(async a=>{var l,c;if(!Vr(a))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const s of e.handlers)await s(t,a,e);if(!a.success)throw e.handleValidationResult&&a.validationEffect&&((c=(l=a.validationEffect)==null?void 0:l.results)!=null&&c.length)&&e.handleValidationResult(t,a.validationEffect,e),new Error(a.message);return a.message&&ge.add("info",a.message),Array.isArray(a.affectedEntities)&&e.handleAffectedEntity&&a.affectedEntities.forEach(s=>{var u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,t,s,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),a}).catch(U("error"));return(i=e.overrides)!=null&&i[t.name]?e.overrides[t.name](t,e):t.requireSave&&e.form&&e.form.changed?e.form.save().then(r):!t.confirmation||!e.handleConfirmation?r():e.handleConfirmation(t,r)}}}function Vr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function Mr(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 jr(e,t){const n=Mr(e.confirmation);if(!ee.getComponentFromStore(A.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await ee.promptModal(A.MODAL_CONFIRM,{message:n}))return t()}function Ur(e,t){const n=A.MODAL_VALIDATION_EFFECT;if(!ee.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{ee.pushModal(n,t)})}function Wr(e,t,n){var s;function r(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function i(u,p){u&&(Br("Affected Entity %s. Find form with name %s.",p,u.name),u.name===p&&r(u)&&u.read(),u instanceof F.Form&&u.dependencies.forEach(m=>i(m,p)))}me.emit("affected-entity",t);const{router:a,form:l}=n,c=(s=t.primaryKey)==null?void 0:s.Id;if(a&&t&&t.name===e.redirectEntity){me.emit("display-entity",{id:c,name:t.name}),R.getEntityLink&&a.push(R.getEntityLink(t.name,c));return}i(l,t.name)}function qr(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}let Z={};function te(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=F.utils.getPropFromObject((this==null?void 0:this.vocabulary)||Z,e);if(typeof n=="string")return lt(n,t);const r=F.utils.getPropFromObject(Z==null?void 0:Z.root,e);return typeof r=="string"?lt(r,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function lt(e,t){return t.forEach((n,r)=>{e=e.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),e}te.setGlobalVocabulary=function(e){Z=e};te.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),te.bind({vocabulary:F.utils.getPropFromObject(Z,t.toLowerCase())})};te.setVocabulary=function(e){return typeof e=="string"&&(e=F.utils.getPropFromObject(Z,e)),te.bind({vocabulary:e})};function Gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}},L={},De={exports:{}},ne={};function $t(){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 zr(e,t,n){}function Hr(e,t,n){}var Xr=/javascript\s*\:/img;function Jr(e,t){return Xr.test(t)?"":t}ne.whiteList=$t();ne.getDefaultWhiteList=$t;ne.onAttr=zr;ne.onIgnoreAttr=Hr;ne.safeAttrValue=Jr;var Yr={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,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,"")}},fe=Yr;function Kr(e,t){e=fe.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,r=!1,i=0,a=0,l="";function c(){if(!r){var p=fe.trim(e.slice(i,a)),m=p.indexOf(":");if(m!==-1){var f=fe.trim(p.slice(0,m)),v=fe.trim(p.slice(m+1));if(f){var g=t(i,l.length,f,v,p);g&&(l+=g+"; ")}}}i=a+1}for(;a<n;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var u=e.indexOf("*/",a+2);if(u===-1)break;a=u+1,i=a+1,r=!1}else s==="("?r=!0:s===")"?r=!1:s===";"?r||c():s===`
|
|
7
|
-
`&&c()}return fe.trim(l)}var Qr=Kr,be=ne,Zr=Qr;function ct(e){return e==null}function eo(e){var t={};for(var n in e)t[n]=e[n];return t}function xt(e){e=eo(e||{}),e.whiteList=e.whiteList||be.whiteList,e.onAttr=e.onAttr||be.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||be.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||be.safeAttrValue,this.options=e}xt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,i=n.onAttr,a=n.onIgnoreAttr,l=n.safeAttrValue,c=Zr(e,function(s,u,p,m,f){var v=r[p],g=!1;if(v===!0?g=v:typeof v=="function"?g=v(m):v instanceof RegExp&&(g=v.test(m)),g!==!0&&(g=!1),m=l(p,m),!!m){var T={position:u,sourcePosition:s,source:f,isWhite:g};if(g){var w=i(p,m,T);return ct(w)?p+":"+m:w}else{var w=a(p,m,T);if(!ct(w))return w}}});return c};var to=xt;(function(e,t){var n=ne,r=to;function i(l,c){var s=new r(c);return s.process(l)}t=e.exports=i,t.FilterCSS=r;for(var a in n)t[a]=n[a];typeof window<"u"&&(window.filterCSS=e.exports)})(De,De.exports);var ze=De.exports,He={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,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}},no=ze.FilterCSS,ro=ze.getDefaultWhiteList,Ae=He;function Dt(){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 Ft=new no;function oo(e,t,n){}function io(e,t,n){}function ao(e,t,n){}function so(e,t,n){}function Pt(e){return e.replace(co,"<").replace(uo,">")}function lo(e,t,n,r){if(n=Wt(n),t==="href"||t==="src"){if(n=Ae.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(Ee.lastIndex=0,Ee.test(n))return""}else if(t==="style"){if(ut.lastIndex=0,ut.test(n)||(ft.lastIndex=0,ft.test(n)&&(Ee.lastIndex=0,Ee.test(n))))return"";r!==!1&&(r=r||Ft,n=r.process(n))}return n=qt(n),n}var co=/</g,uo=/>/g,fo=/"/g,po=/"/g,go=/&#([a-zA-Z0-9]*);?/gim,mo=/:?/gim,ho=/&newline;?/gim,Ee=/((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,ut=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,ft=/u\s*r\s*l\s*\(.*/gi;function Bt(e){return e.replace(fo,""")}function Vt(e){return e.replace(po,'"')}function Mt(e){return e.replace(go,function(n,r){return r[0]==="x"||r[0]==="X"?String.fromCharCode(parseInt(r.substr(1),16)):String.fromCharCode(parseInt(r,10))})}function jt(e){return e.replace(mo,":").replace(ho," ")}function Ut(e){for(var t="",n=0,r=e.length;n<r;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return Ae.trim(t)}function Wt(e){return e=Vt(e),e=Mt(e),e=jt(e),e=Ut(e),e}function qt(e){return e=Bt(e),e=Pt(e),e}function yo(){return""}function vo(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function r(l){return n?!0:Ae.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,c,s){if(r(l))if(s.isClosing){var u="[/removed]",p=s.position+u.length;return i.push([a!==!1?a:s.position,p]),a=!1,u}else return a||(a=s.position),"[removed]";else return t(l,c,s)},remove:function(l){var c="",s=0;return Ae.forEach(i,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function wo(e){for(var t="",n=0;n<e.length;){var r=e.indexOf("<!--",n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var i=e.indexOf("-->",r);if(i===-1)break;n=i+3}return t}function bo(e){var t=e.split("");return t=t.filter(function(n){var r=n.charCodeAt(0);return r===127?!1:r<=31?r===10||r===13:!0}),t.join("")}L.whiteList=Dt();L.getDefaultWhiteList=Dt;L.onTag=oo;L.onIgnoreTag=io;L.onTagAttr=ao;L.onIgnoreTagAttr=so;L.safeAttrValue=lo;L.escapeHtml=Pt;L.escapeQuote=Bt;L.unescapeQuote=Vt;L.escapeHtmlEntities=Mt;L.escapeDangerHtml5Entities=jt;L.clearNonPrintableCharacter=Ut;L.friendlyAttrValue=Wt;L.escapeAttrValue=qt;L.onIgnoreTagStripAll=yo;L.StripTagBody=vo;L.stripCommentTag=wo;L.stripBlankChar=bo;L.attributeWrapSign='"';L.cssFilter=Ft;L.getDefaultCSSWhiteList=ro;var Re={},Y=He;function Eo(e){var t=Y.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=Y.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function To(e){return e.slice(0,2)==="</"}function ko(e,t,n){var r="",i=0,a=!1,l=!1,c=0,s=e.length,u="",p="";e:for(c=0;c<s;c++){var m=e.charAt(c);if(a===!1){if(m==="<"){a=c;continue}}else if(l===!1){if(m==="<"){r+=n(e.slice(i,c)),a=c,i=c;continue}if(m===">"||c===s-1){r+=n(e.slice(i,a)),p=e.slice(a,c+1),u=Eo(p),r+=t(a,r.length,u,p,To(p)),i=c+1,a=!1;continue}if(m==='"'||m==="'")for(var f=1,v=e.charAt(c-f);v.trim()===""||v==="=";){if(v==="="){l=m;continue e}v=e.charAt(c-++f)}}else if(m===l){l=!1;continue}}return i<s&&(r+=n(e.substr(i))),r}var Co=/[^a-zA-Z0-9\\_:.-]/gim;function Ao(e,t){var n=0,r=0,i=[],a=!1,l=e.length;function c(f,v){if(f=Y.trim(f),f=f.replace(Co,"").toLowerCase(),!(f.length<1)){var g=t(f,v||"");g&&i.push(g)}}for(var s=0;s<l;s++){var u=e.charAt(s),p,m;if(a===!1&&u==="="){a=e.slice(n,s),n=s+1,r=e.charAt(n)==='"'||e.charAt(n)==="'"?n:So(e,s+1);continue}if(a!==!1&&s===r){if(m=e.indexOf(u,s+1),m===-1)break;p=Y.trim(e.slice(r+1,m)),c(a,p),a=!1,s=m,n=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(m=_o(e,s),m===-1){p=Y.trim(e.slice(n,s)),c(p),a=!1,n=s+1;continue}else{s=m-1;continue}else if(m=Io(e,s-1),m===-1){p=Y.trim(e.slice(n,s)),p=dt(p),c(a,p),a=!1,n=s+1;continue}else continue}return n<e.length&&(a===!1?c(e.slice(n)):c(a,dt(Y.trim(e.slice(n))))),Y.trim(i.join(" "))}function _o(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function So(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function Io(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function No(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function dt(e){return No(e)?e.substr(1,e.length-2):e}Re.parseTag=ko;Re.parseAttr=Ao;var Ro=ze.FilterCSS,M=L,Gt=Re,Lo=Gt.parseTag,Oo=Gt.parseAttr,Ce=He;function Te(e){return e==null}function $o(e){var t=Ce.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=Ce.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=Ce.trim(e.slice(0,-1))),{html:e,closing:n}}function xo(e){var t={};for(var n in e)t[n]=e[n];return t}function Do(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(r){return r.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function zt(e){e=xo(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=M.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Do(e.whiteList||e.allowList):e.whiteList=M.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":M.attributeWrapSign,e.onTag=e.onTag||M.onTag,e.onTagAttr=e.onTagAttr||M.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||M.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||M.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||M.safeAttrValue,e.escapeHtml=e.escapeHtml||M.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Ro(e.css))}zt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,i=n.onTag,a=n.onIgnoreTag,l=n.onTagAttr,c=n.onIgnoreTagAttr,s=n.safeAttrValue,u=n.escapeHtml,p=t.attributeWrapSign,m=t.cssFilter;n.stripBlankChar&&(e=M.stripBlankChar(e)),n.allowCommentTag||(e=M.stripCommentTag(e));var f=!1;n.stripIgnoreTagBody&&(f=M.StripTagBody(n.stripIgnoreTagBody,a),a=f.onIgnoreTag);var v=Lo(e,function(g,T,w,d,b){var k={sourcePosition:g,position:T,isClosing:b,isWhite:Object.prototype.hasOwnProperty.call(r,w)},N=i(w,d,k);if(!Te(N))return N;if(k.isWhite){if(k.isClosing)return"</"+w+">";var O=$o(d),E=r[w],h=Oo(O.html,function(y,C){var S=Ce.indexOf(E,y)!==-1,$=l(w,y,C,S);return Te($)?S?(C=s(w,y,C,m),C?y+"="+p+C+p:y):($=c(w,y,C,S),Te($)?void 0:$):$});return d="<"+w,h&&(d+=" "+h),O.closing&&(d+=" /"),d+=">",d}else return N=a(w,d,k),Te(N)?u(d):N},u);return f&&(v=f.remove(v)),v};var Fo=zt;(function(e,t){var n=L,r=Re,i=Fo;function a(c,s){var u=new i(s);return u.process(c)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,function(){for(var c in n)t[c]=n[c];for(var s in r)t[s]=r[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)})(xe,xe.exports);var Po=xe.exports;const Bo=Gr(Po);function Vo(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>'),Bo(e)}function Mo(e,t,n,r){let i=e+t/60+n/3600;return(r=="S"||r=="W")&&(i=i*-1),i}function jo(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 Xe(e,t){return`/forms/${e}/${t}`}function Ht(e,t,n){const r=te.getScope(e.toLowerCase());return t.map(i=>(typeof i.label=="string"&&(i.label=r(i.label)),i.type==="history"&&(i.onClick=a=>ee.openModal("modal-history",{id:a.Id,entity:e}),i.icon="history",i.class="widget-list-cell-history"),(i.entity||i.useObjectTypeName)&&Array.isArray(i.name)&&i.name.length>1&&(i.modal===!0?(i.onClick=a=>{ee.openModal("form",{entity:pt(i,a),id:a[Me(i)]})},i.class="widget-table-cell_link cursor_pointer"):i.link=a=>{if(typeof a!="object"||a==null)return null;const l=i.name[0],c=a[l];return c?Xe(pt(i,a),c):null},i.value=(a,l)=>l[i.name[1]]),Uo(i,i.type,i.presentation),i))}function Uo(e,t,n){switch(t){case"DateTime":{e.type="dateWithTime";break}case"Decimal":{n==="Money"&&(e.type="money");break}}return e}const pt=(e,t)=>e.useObjectTypeName?t[e.name[2]]:e.entity?e.entity:null;function gt(e){return typeof e!="object"||e===null?null:e[A.TABLE_MOCK_FIELD]}function Wo(e,t){return typeof e!="object"||e===null?(console.warn("cell data is not a valid object."),e):(typeof t=="string"||typeof t=="number"||typeof t=="function"?(typeof t=="function"&&(t=t(e)),e[A.TABLE_MOCK_FIELD]=t):e[A.TABLE_MOCK_FIELD]=e.Id,e)}var Je=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(Je||{});function qo(){const e=o.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function Go(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function Xt(e,t){e()&&(await t(),await Xt(e,t))}function zo(e,t,n={}){let r=!1;const i=o.ref(""),a=o.computed(()=>l.filter(h=>u(h,i.value))),l=o.reactive([]);let c=0;const s=o.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((h,y)=>Go(h,y));function p(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function m(){const h=N();return typeof h.limit!="number"&&(h.limit=100),h.offset=c,(n.request||pe)(e,h).then(C=>(c+=C.length,C))}function f(h,y){var S;return typeof h.Version=="number"?h.Version:(S=l.find($=>$.Id===y))==null?void 0:S.Version}function v(h,y){const C=l.findIndex(S=>S.Id===h);if(C===-1)throw new Error(`Can't found item with Id ${h}`);l.splice(C,1,y)}function g(h){const y=l.findIndex(C=>C.Id===h);if(y===-1)throw new Error(`Can't found item with Id ${h}`);l.splice(y,1)}async function T(h,y){try{const C=N(),S=f(y,h);delete y.Version,await Ge(e,{id:h,values:y,version:S,masterEntities:p()});const $=await pe(e,{fields:C.fields||"",id:h});v(h,$)}catch(C){U()(C)}}async function w(h,y={}){try{const C=N(),S=f(y,h);delete y.Version,await Nt(e,{id:h,version:S,masterEntities:p()}),g(h)}catch(C){U()(C)}}async function d(h){try{await It(e,{values:h,masterEntities:p()}),await O()}catch(y){U()(y)}}let b;async function k(){s.value=!0;try{b!=null&&b.signal&&!b.signal.aborted&&b.abort();let h=b=new AbortController,y=0;const S=N().limit||0;if(i.value&&!S){console.warn("Using textSearch assumes the use of limit.");return}await Xt(()=>(S>0?y<S:!0)&&!r&&!h.signal.aborted,async()=>{const $=await m();h.signal.aborted||(l.push(...$),y+=$.filter(P=>u(P,i.value)).length,($.length<S||S===0)&&(r=!0))})}catch(h){U()(h)}s.value=!1}function N(){return typeof t=="function"?t():t}async function O(){try{c=0,r=!1,l.splice(0,l.length),await k()}catch(h){U()(h)}}function E(){if(b)return b.abort();s.value=!1}return{array:l,updateById:T,next:k,reload:O,wait:s,create:d,deleteById:w,textSearch:i,filteredArray:a,abort:E}}function Ho(){function e(){return{organizations:j.organizations,currentContextId:j.contextId,person:j.person,context:j.context,contextType:j.contextType,userId:j.userId}}const t=o.reactive(e());return j.onupdateContext(()=>{Object.assign(t,e())}),t}function Xo(e,t,n){return D().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function Jo(e,t,n){return D().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function Yo(e,t){return D().emit("communication-message:create",{communicationId:e,text:t})}function Ko(e){return D().emit("communication-message:read",{communicationId:e})}function Qo(e){const t=F.Form.getParentForm(),n=o.reactive([]);return t&&t.subscribe(e),e.read=()=>Ko(e.id).then(r=>(n.splice(0,n.length,...r),r)),{array:n}}function Zo(e,t){e.read=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw K.EntityWithoutName(e);return pe(e.name,r)}).then(Qe).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(U())},e.save=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw K.EntityWithoutName(e);return Ge(e.name,{id:r.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw U()(i),i})};function n(){return typeof t=="function"?t():t}}function Ye(e){if(!e)return o.inject(A.PROVIDE_NAME_METADATA);_e.initEntity(e);const t=o.computed(()=>_e.state[e]);return o.provide(A.PROVIDE_NAME_METADATA,t),t}function Ke(e,t={}){if(!e)return o.inject(A.PROVIDE_NAME_USAGE_CONTEXT);const n=o.ref(null);return o.provide(A.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await Rr(e,ei(t||{}))}}}function ei(e){return typeof e=="function"?e():e}function ti(e){if(!e)return o.inject(A.PROVIDE_NAME_ACTIONS);const t=o.ref(!1),n=o.reactive([]),r=o.computed(()=>n.map(l=>Ot(e,l))),i={actions:r,update:a};o.provide(A.PROVIDE_NAME_ACTIONS,i),e.router=Be.useRouter();function a(){if(t.value)return;t.value=!0,n.splice(0,n.length);const l=e==null?void 0:e.form;return Rt({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(U("error")).finally(()=>t.value=!1)}return{actions:r,update:a,loading:o.readonly(t)}}function ni(e){function t(n){n.key==="Enter"&&e()}o.onMounted(()=>{document.addEventListener("keypress",t)}),o.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function ri(e,t={}){const n=o.reactive([]),r=s=>{const u=o.unref(e);if(s===void 0){n.length===0?u.forEach(a):u.forEach(l);return}i(s)?l(s):a(s)},i=s=>n.includes(s),a=s=>{t.handleSelect&&!t.handleSelect(s)||i(s)||n.push(s)},l=s=>{const u=n.findIndex(p=>p===s);u!==-1&&n.splice(u,1)},c=o.computed(()=>{const s=o.unref(e);return n.length===s.length&&s.length!==0});return[n,r,c,a,l]}function oi(e){const t=o.ref(""),n=o.computed(()=>{const r=t.value.toLowerCase();return o.unref(e).filter(i=>t.value.length?Object.values(i).join().toLowerCase().includes(r):!0)});return{search:t,searchArray:n}}const ge=new class{constructor(){this.store=o.reactive([])}add(t,n,r={}){const i=ii(r),a=new Fe(t,n,i.timeout,i.children,i.click);return this.store.push(a),i.timeout&&setTimeout(this.remove.bind(this,a.id),i.timeout*1e3),a}remove(t){const n=this.store.findIndex(r=>r.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function ii(e){function t(r){return!!r&&typeof r=="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 Se=class Se{constructor(t,n,r,i,a){this.type=t,this.message=n,this.timeout=r,this.children=i,this.click=a,this.id=Se.cardId++}};Se.cardId=1;let Fe=Se;/*!
|
|
6
|
+
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?_.ApiNotAvailable():new _(t||"Authorization Error",n)}static ApiResponseParseFailed(){return _.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new _("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new _(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new _("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new _("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new _(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new _(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new _(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new _(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new _("The request took too long to complete. Try again later.")}};_.ID=0;let K=_;const Qt="Please try again later or submit a feedback if problem doesn't go.";function Zt(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return Qt}})}function H(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw K.ApiNotAvailable()}).then(n=>Zt(n).then(r=>{if(!n.ok)throw r;return r}))}class en{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),t[n]=r,!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 en;function rt(e){return{...e,createdEntities:e.createdEntites}}const oe=class oe{static async getStartConfig(t,n){return H([oe.url,t,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(t,n){return H([oe.url,t,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(rt)}static async runStep(t,n,r,i,a){return H([oe.url,t,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:i,values:a})}).then(rt)}};oe.url="/close-api/views/process-wizard";let ie=oe;class tn{static invite(t,n,r){return H("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:r})})}static accept(t,n){return H("/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 H("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class nn{static getRequiredDocuments(t,n,r){const i=new URLSearchParams({entity:t,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(a=>a.json())}}class re{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${re.url()}/calculator/${t}`)}static calculate(t,n){return H(`/${re.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):K.ApiNotAvailable()})}static parseMetadataField(t){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return H(`/${re.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return H(`/${re.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}function rn(e){return e.statusName==="Completed"}function on(e){return e.statusName==="FinalStepWithConfirmation"}function an(e){return e.statusName==="ValidationError"}function sn(e,t,n){let r=null;const i=o.reactive({wait:null});let a=[],l=null;const c=o.ref(null);function s(){c.value=a.find(d=>d.name===l)||null}function u(){var d;return l?((d=a.find(b=>b.name===l))==null?void 0:d.fields)||[]:[]}function p(d){if(s(),an(d))return void n.onValidation(d.validationResults);if((d.statusName==="FinalStep"||d.statusName==="NextStep")&&(!u().length||ln(u(),n.presets)))return w(n.presets||{});rn(d)&&n.onCompleted(d),on(d)&&n.onConfirmation(d)}async function m(){try{await f(),await T()}catch(d){const{message:b}=de(d);ge.add("error",b)}}function f(){return i.wait="Loading process information.",ie.getStartConfig(t,e).then(d=>{a=d.steps.map(b=>({label:b.title,name:b.stepName,number:b.number,fields:b.frontendEntity.objectTypes.reduce((k,N)=>(N.properties.forEach(O=>{k.push({name:O.name,label:O.title,type:O.refEntityName||O.dataType})}),k),[])}))}).then(d=>(i.wait=!1,d))}function v(d){return["FinalStepWithConfirmation","NextStep","Completed","FinalStep"].includes(d.statusName)&&(r=d.token,l=d.nextStepName),d}function g(d){const b=de(d);ge.add("error",b.message)}function T(){return i.wait="Starting process",ie.startProcess(t,e).then(v).then(p).catch(g).finally(()=>{i.wait=null})}function w(d={}){return!r||!l?Promise.reject("Not step or token."):(i.wait="Waiting for result...",ie.runStep(t,e,l,r,d).then(v).then(p).catch(g).finally(()=>{i.wait=!1}))}return{initialize:m,state:i,currentStepConfig:o.readonly(c),next:w}}function ln(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(!F.utils.getPropFromObject(t,r.name))return!1}return!0}const cn={class:"widget-table__head-cell"},un={class:"widget-table__head-label margin_0 text_overflow"},wt=o.defineComponent({__name:"widget-table-head-cell",props:{label:{}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("th",cn,[o.createElementVNode("span",un,o.toDisplayString(t.label),1)]))}}),fn={class:"widget-table__head"},dn=o.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return o.computed(()=>R.componentTableHeadCell||wt),(t,n)=>(o.openBlock(),o.createElementBlock("tr",fn,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.config,r=>o.renderSlot(t.$slots,"default",o.mergeProps({ref_for:!0},r),void 0,!0)),256))]))}}),X=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},pn=X(dn,[["__scopeId","data-v-498c4f00"]]);function Ve(e){return Array.isArray(e)?Ve(e[0]):typeof e!="string"?null:e}function Me(e){return Ve(e.name)}function gn(e){const t=new RegExp(/\$\{([a-zA-Z0-9.]+)}/,"g"),n=[];let r;for(;(r=t.exec(e))!==null;)n.push(r[1]);return n}function mn(e,t){return gn(e).forEach(r=>{e=e.replace(new RegExp("\\$\\{"+r+"}","g"),F.utils.getPropFromObject(t,r))}),e}function $e(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function je(e,t){const n=Me(e);if(typeof e.value=="string")return mn(e.value,t);let r=n?F.utils.getPropFromObject(t,n):null;if(r===void 0&&(r=null),typeof e.value=="function")return e.value(r,t);if(e.value===null)return null;if(e.unitValue&&(r=$e(e.unitValue)(r)),e.unit&&(r=$e(e.unit)(r)),e.type)switch(e.type){case"number":{typeof r=="number"&&(r=new Intl.NumberFormat().format(r));break}case"date":{r=qe(typeof r=="string"?r:null);break}case"dateTime":case"dateWithTime":{r=Tt(typeof r=="string"?r:null);break}case"money":{r=Ct(r);break}}return e.formatter&&(r=le(e.formatter).exec(r,t)),typeof r=="boolean"&&(r=r?"✓":"—"),r}const A={LIST_ACTIVE_NEW:"list-active-new",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:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4,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"};function Ne(e){return[A.CORE_DEBUG_LABEL,e].join(":")}const R={getEntityLink(e,t){return`/forms/${e}/${t}`},iconHandlerText(){return""},iconTag:"i"};function hn(e){for(let t in e)R[t]=e[t]}const yn={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()=>o.h(R.iconTag,{class:R.iconHandler?R.iconHandler(n):`icon icon-${n}`},R.iconHandlerText(n))}},se=X(yn,[["__scopeId","data-v-8a72b45f"]]),vn=Ie(Ne("setup-list-row"));function wn(e,t){const n=e.config.map(r=>bn(r,e,t));return o.h("tr",{class:"widget-table__row widget-table-row"},n)}function bn(e,t,n){const r=t.values;let i=je(e,r);const a={onClick:[],class:["widget-table__cell widget-table-cell"]};function l(p){a.onClick.push(()=>p(r,e,n))}function c(p){Array.isArray(p)?a.class.push(...p):a.class.push(p)}const s=[],u=[];if(e.hide&&e.hide(r))return[o.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(o.h(F.FormField,{type:"single-checkbox",modelValue:t.selected})),l(ot.bind(null,n,!0));break}case"select":{u.push(o.h(F.FormField,{type:"single-radio",modelValue:t.selected})),l(ot.bind(null,n,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const p=e.link(r);if(p){const m=o.h(Be.RouterLink,{to:p});u.push(m),c("widget-table-cell_link")}}catch(p){vn("Can't add router link",p)}if(e.href&&(u.push(o.h("a",{href:e.href(r),target:"_blank"})),c("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&u.push(o.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&u.push(o.h(se,{name:e.icon})),typeof e.icon=="function")){const p=e.icon(r);p!==null&&u.push(o.h(se,{name:p}))}return e.class&&(typeof e.class=="function"?c(e.class(r)):c(e.class)),R.listCellHandler&&R.listCellHandler(e,r,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n}),s.push(o.h("td",a,u)),s}function ot(e,t){e.emit("select",t)}function Ue(e,t){return()=>{try{return wn(e,t)}catch(n){return console.warn(n),null}}}const En={props:{values:Object,config:Object,selected:Boolean},setup:Ue},Tn=["colspan"],it=o.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=t,r=o.ref();return o.onMounted(()=>{setTimeout(()=>{r.value&&r.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,a)=>(o.openBlock(),o.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:r},[o.createElementVNode("td",{colspan:i.rowLength},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.component),o.mergeProps(i.$attrs,{values:i.values,new:i.isNew,onClose:a[0]||(a[0]=l=>n("close")),onSave:a[1]||(a[1]=l=>n("save",l))}),null,16,["values","new"]))],8,Tn)],512))}}),kn={class:"widget-table"},at="update:selectedRows",Cn="update:activeRow",bt=o.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},useMockField:{type:Boolean,default:!1}},emits:["save","order"],setup(e,{emit:t}){const n=e,r=t,i=o.useSlots(),a=o.computed(()=>{var f;return(f=i==null?void 0:i.default)==null?void 0:f.call(i)[0]});function l(f){return n.useMockField?gt(f):f}function c(f,v=!0){if(!n.selectedRows)return;if(!v)return r(at,n.selectedRows.includes(f)?[]:[f]);const g=[...n.selectedRows],T=g.indexOf(f);return T===-1?g.push(f):g.splice(T,1),r(at,g)}function s(f){r(Cn,f)}function u(f){r("save",f),r("update:activeRow",null)}const p=o.computed(()=>n.shortcut?n.config.filter(f=>f.name?!!n.array.find(g=>![null,""].includes(je(f,g))):!0):n.config),m=o.computed(()=>n.useMockField?n.array.filter(gt):n.array);return(f,v)=>(o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("table",kn,[o.createElementVNode("thead",null,[o.createVNode(pn,{config:p.value,onOrder:v[0]||(v[0]=g=>f.$emit("order",g))},{default:o.withCtx(g=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(f.$slots["head-cell"]||wt),o.normalizeProps(o.guardReactiveProps(g)),null,16))]),_:1},8,["config"])]),o.createElementVNode("tbody",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,g=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:f.index},[o.createVNode(En,{config:p.value,values:g,selected:f.selectedRows.includes(l(g)),onSelect:T=>c(l(g),T),onActivate:T=>s(l(g)),class:o.normalizeClass(f.classCallback?f.classCallback(g):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),a.value&&f.activeRow===l(g)?(o.openBlock(),o.createBlock(it,{key:0,component:a.value,"row-length":f.config.length,values:g,onClose:v[1]||(v[1]=T=>r("update:activeRow",null)),onSave:u,"is-new":!1},null,8,["component","row-length","values"])):o.createCommentVNode("",!0)],64))),128)),f.activeRow===o.unref(A).LIST_ACTIVE_NEW?(o.openBlock(),o.createBlock(it,{key:0,component:a.value,"row-length":p.value.length,onClose:v[2]||(v[2]=g=>r("update:activeRow",null)),onSave:u,"is-new":!0},null,8,["component","row-length"])):o.createCommentVNode("",!0)])])]))}}),An=o.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:"widget-spinner",style:o.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),he=X(An,[["__scopeId","data-v-0ef9ae88"]]),_n={class:"widget-button"},Sn=o.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("button",_n,[t.wait?(o.openBlock(),o.createBlock(he,{key:0,class:"widget-button-spinner"})):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),In=X(Sn,[["__scopeId","data-v-450dc564"]]),Nn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Rn={class:"widget-multi-button-body grid"},Ln=["onClick"],On={class:"widget-multi-button-side-wrap"},$n=o.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){o.useCssVars(l=>({"04895bf1":r.value}));const t=e,n=o.reactive({active:!1,wait:!1}),r=o.computed(()=>t.array.length+(t.label?1:0));function i(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function a(l=!n.active){n.active=l}return(l,c)=>(o.openBlock(),o.createElementBlock("div",Nn,[o.createElementVNode("div",{class:o.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[o.createElementVNode("div",Rn,[l.label?(o.openBlock(),o.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>a())},o.toDisplayString(l.label),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.array,(s,u)=>(o.openBlock(),o.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:p=>{i(s.callback),a(!1)}},o.toDisplayString(s.label),9,Ln))),128))]),o.createElementVNode("div",On,[o.createElementVNode("div",{class:o.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>a())},[n.wait?(o.openBlock(),o.createBlock(o.unref(he),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(o.openBlock(),o.createBlock(o.unref(se),{key:1,class:"widget-multi-button-side-icon"},{default:o.withCtx(()=>[o.createTextVNode("angle-small-down")]),_:1})):o.createCommentVNode("",!0)],2)])],2)]))}}),xn=X($n,[["__scopeId","data-v-d43a76ce"]]),Dn={class:"widget-loader flex flex-align_center gap_10 padding_15"},Fn={class:"text_md"},Pn=o.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",Dn,[o.createVNode(he,{color:"var(--primary)",class:"padding_10"}),o.createElementVNode("span",Fn,o.toDisplayString(t.label),1)]))}}),Bn=["alt","src"],Vn=o.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=o.ref();return o.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(r,i)=>(o.openBlock(),o.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,Bn))}}),Mn={props:{config:Array,values:Object,selected:Boolean},setup:Ue},jn=X(Mn,[["__scopeId","data-v-344a8cc1"]]),Un=e=>(o.pushScopeId("data-v-bf495d6a"),e=e(),o.popScopeId(),e),Wn={class:"widget-list-head-cell"},qn=Un(()=>o.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Gn=o.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,r=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(i,a)=>(o.openBlock(),o.createElementBlock("th",null,[o.createElementVNode("div",Wn,[o.createElementVNode("div",{class:"head-cell-content flex_grow",style:o.normalizeStyle({"min-width":i.minWidth,"max-width":i.maxWidth,width:i.width})},[i.type==="multi-select"?(o.openBlock(),o.createBlock(o.unref(F.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=o.withModifiers(l=>r("select"),["stop","prevent"]))})):(o.openBlock(),o.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:a[1]||(a[1]=l=>r("order"))},o.toDisplayString(i.title||i.label),1))],4),i.name&&i.order.length&&i.order[0]===i.name?(o.openBlock(),o.createBlock(o.unref(se),{key:0,class:o.normalizeClass(["head-cell-order",{"head-cell-order_down":i.order.length>1&&i.order[1]==="desc"}])},{default:o.withCtx(()=>[o.createTextVNode("core-arrow-up")]),_:1},8,["class"])):o.createCommentVNode("",!0),qn])]))}}),zn=X(Gn,[["__scopeId","data-v-bf495d6a"]]),Hn=o.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(),a=o.ref();o.onMounted(()=>{function u(g,T){let w=-1;do w++,T-=g[w];while(T>0&&w<g.length);return w}function p(g,T){let w=0;for(;T>0&&T>g[w]&&w<g.length;)T-=g[w],w++;return console.log(T,w),w>0?w:0}function m(g){try{a.value.style.insetInlineStart=g+"px"}catch(T){console.log(T)}}function f(g){try{a.value.style.width=g+"px",a.value.style.minWidth=g+"px",a.value.style.maxWidth=g+"px"}catch(T){console.log(T)}}function v(g){return g===null?!1:g.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(T){var ce;function w(V){return V.screenX+k-E}const d=i.value,b=[...d.children].filter(V=>V.localName==="th"),k=((ce=d.offsetParent)==null?void 0:ce.scrollLeft)||0,N=b.map(V=>V.clientWidth),O=v(T.target),E=d.getBoundingClientRect().left,h=w(T),y=u(N,h),C=N.slice(0,y).reduce((V,W)=>V+W,0),S=h-C,$=d.offsetWidth,P=b[y].clientWidth;if(n.config[y].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",T.screenX),console.log("Widths",N),console.log("max width",$),console.log("Start Position",h),console.log("Position From",y),console.log("Start Position",y),console.log("Global offset (Отступ самой таблицы от края экрана)",E),console.log("Del",S),console.groupEnd(),a.value.innerText=b[y].textContent||"",a.value.style.display="grid",a.value.style.width=P+"px",a.value.style.cursor="grabbing",m(C),f(P),document.addEventListener("pointermove",J,{passive:!0}),document.addEventListener("pointerup",I);function I(V){if(console.group("END"),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",I),O&&(n.config[y].width=a.value.style.width,n.config[y].minWidth=a.value.style.width,n.config[y].maxWidth=a.value.style.width,l(n.config)),!O){const W=V.screenX+k-E;console.log("ENP Position",W);const ve=p(N,W);if(console.log(y,"->",ve),ve!==y){const ue=n.config[y],Le=n.config;Le.splice(y,1),Le.splice(ve,0,ue),l(Le)}else{const ue=n.config[y].name;c(ue)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function J(V){if(O){const ue=w(V)-h+P;f(ue);return}let W=V.screenX+k-E-S;W<0&&(W=0),W+P>$&&(W=$-P),m(W)}})});function l(u){r("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 p=n.order.length===1||n.order[1]==="asc"?"asc":"desc";s([u,p==="asc"?"desc":"asc"])}function s(u){r("update:order",u)}return(u,p)=>(o.openBlock(),o.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.config,(m,f)=>(o.openBlock(),o.createBlock(zn,o.mergeProps({key:m,ref_for:!0},m,{onOrder:v=>c(m.name),onSelect:p[0]||(p[0]=v=>r("select")),order:u.order}),null,16,["onOrder","order"]))),128)),o.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),Xn=X(Hn,[["__scopeId","data-v-ccffc6bd"]]),Jn={class:"widget-list"},Yn={class:"widget-list-body position_relative"},Kn=50,Qn=o.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,r=t;function i(s,u=!0){if(n.selectedRows)if(!u)l(n.selectedRows.includes(s)?[]:[s]);else{const p=[...n.selectedRows],m=p.indexOf(s);m===-1?p.push(s):p==null||p.splice(m,1),l(p)}}function a(){var s;if(((s=n.selectedRows)==null?void 0:s.length)!==n.array.length)return l([...n.array]);l([])}function l(s){r("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+Kn>u.scrollHeight&&r("scrollEnd")}return(s,u)=>(o.openBlock(),o.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[o.createElementVNode("table",Jn,[o.createElementVNode("thead",null,[o.createVNode(Xn,{onSelect:u[0]||(u[0]=p=>a()),"onUpdate:order":u[1]||(u[1]=p=>r("update:order",p)),"onUpdate:config":u[2]||(u[2]=p=>r("update:config",p)),config:s.config,order:s.order},null,8,["config","order"])]),o.createElementVNode("tbody",Yn,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.array,(p,m)=>{var f;return o.openBlock(),o.createBlock(jn,{key:m,class:"widget-list-row",values:p,config:s.config,selected:(f=s.selectedRows)==null?void 0:f.includes(p),onSelect:v=>i(p,v)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function We(){var a;const e=o.computed(()=>Object.keys(n).length===0||Object.values(n).includes(!0)),t=(a=o.getCurrentInstance())==null?void 0:a.uid;if(!t)throw"Undefined instance. Please check it.";const n=o.reactive({});o.provide(A.VISIBLE_ITEM_PROVIDE_NAME,{show(l){n[l]=!0},hide(l){n[l]=!1},remove(l){delete n[l]}});const r=o.inject(A.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){r==null||r.show(t)},hide(){r==null||r.hide(t)},remove(){r==null||r.remove(t)}},visibleItems:n}}const Zn=o.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const t=e,n=Ye(),r=Ke(),i=o.computed(()=>{var T,w;const f=s.value,v=u(f),g={type:v,disabled:!((T=c.value)!=null&&T.canSet),label:t.label};return f&&Object.assign(g,{suffix:v==="number"?f.valueUnit:void 0,required:l.includes(v||"")?!1:f.required,label:t.label||f.displayName}),Object.assign(g,((w=R.fieldParamsHandler)==null?void 0:w.call(R,f,c.value,g))||{}),g}),a=["MultiText","MultiWideText"],l=["switch","single-checkbox","single-radio"],c=o.computed(()=>{var f;return(f=r==null?void 0:r.value)==null?void 0:f.fields[t.name]}),s=o.computed(()=>{if(!n.value)return;const f=n.value.fieldsByName[t.name];if(f)return f});function u(f){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(f){if(f.type==="Reference"||f.type==="Owned")return f.referencedEntity;if(f.dataType==="Boolean")return"single-checkbox";if(f.dataType==="DateTime")return"date";if(f.dataType==="Integer"||f.dataType==="Decimal")return"number";if(f.dataType==="List")return f.aggregatedEntity;if(a.includes(f.presentationType))return"textarea";if(f.presentationType==="PhoneNumber")return"tel"}return"text"}const p=o.computed(()=>{var f;return((f=c.value)==null?void 0:f.canGet)===!0}),{controller:m}=We();return o.watch(()=>p.value,f=>f?m.show():m.hide(),{immediate:!0}),o.onUnmounted(()=>m.remove()),(f,v)=>p.value?(o.openBlock(),o.createBlock(o.unref(F.FormField),o.mergeProps({key:0},{...f.$attrs,...i.value},{name:f.name}),null,16,["name"])):o.createCommentVNode("",!0)}}),er={width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tr=["fill"],st=o.defineComponent({__name:"widget-icon-triangle",props:{color:{default:"#424242"}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",er,[o.createElementVNode("path",{d:"M4.39043 4.51196C4.19027 4.76216 3.80973 4.76216 3.60957 4.51196L0.649878 0.812348C0.387973 0.484966 0.621059 0 1.04031 0H6.95969C7.37894 0 7.61203 0.484966 7.35012 0.812348L4.39043 4.51196Z",fill:t.color||"#424242"},null,8,tr)]))}});function nr(e){return Array.isArray(e)&&(e==null?void 0:e[1])||A.DEFAULT_ORDER_DIR}const rr={class:"widget-fast-table-head-cell-td"},or={class:"widget-head-cell-label"},ir={key:0,class:"widget-head-cell-order"},ar=o.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{}},setup(e){const t=e,n=o.computed(()=>Ve(t.name)),r=o.computed(()=>nr(t.order));return(i,a)=>{var l;return o.openBlock(),o.createElementBlock("td",rr,[o.createElementVNode("div",{class:"widget-head-cell",onClick:a[0]||(a[0]=c=>i.$emit("order",i.name))},[o.createElementVNode("span",or,o.toDisplayString(i.label),1),n.value===((l=i.order)==null?void 0:l[0])?(o.openBlock(),o.createElementBlock("div",ir,[o.createVNode(st,{class:"widget-head-cell-order-icon",color:r.value==="asc"?"var(--color-primary)":null},null,8,["color"]),o.createVNode(st,{class:"widget-head-cell-order-icon",color:r.value==="desc"?"var(--color-primary)":null},null,8,["color"])])):o.createCommentVNode("",!0)])])}}}),Et=X(ar,[["__scopeId","data-v-9737752c"]]),sr={class:"es-grid es-gap-15"},lr={key:0,class:"title-md color-primary margin-0"},cr={key:0,class:"widget-table-loader es-flex es-gap-10 es-flex-align-center es-padding-10 text-main"},ur=o.createElementVNode("span",null,"Loading...",-1),fr={class:"widget-fast-table-tools es-flex es-gap-15"},dr={class:""},pr=o.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{}},setup(e){const t=e,n=Be.useRouter(),r=o.ref([]),i=o.ref(null),a=o.ref(null),l=o.ref(null),c=F.Form.getParentForm();Ye(t.entity);const{state:s,update:u}=Ke(t.entity,{masterEntities:t.masterEntities||[]}),p=(t.actions||[]).map(E=>Lt(E)),m=o.computed(()=>i.value?Ht(t.entity,i.value.config):[]),f=o.computed(()=>{var E;return((E=i.value)==null?void 0:E.displayItem)||Je.inline}),v=o.computed(()=>{var E;return((E=i.value)==null?void 0:E.newItem)||f.value}),g=ke(async()=>{try{await w.call(),await u()}catch(E){const{message:h}=de(E);a.value=h}});c instanceof F.Form&&c.subscribe({read:g.call.bind(null),name:t.entity,type:"table"}),o.onMounted(()=>{T.call(),g.call()});const T=ke(async function(){const h=t.entity;i.value=await St(h,t.mark)}),w=ke(async function(){var y,C;const h=t.entity;a.value=null,r.value=(await pe(h,{fields:kt(m.value).join(" "),order:((y=i.value)==null?void 0:y.order)||[],filter:x.and(x(t.binding||{}),x(((C=i.value)==null?void 0:C.prefilters)||{}))})).map(qo)});async function d(E){var y;if(E===null)return l.value=null;const h=E==null?void 0:E.Id;if(!h&&((y=i.value)!=null&&y.linkNew))return n.push(i.value.linkNew);if(f.value==="form")return n.push(Xe(t.entity,h));if(f.value==="inline")return l.value=E||A.LIST_ACTIVE_NEW;f.value==="modal"?(await ee.promptModal("form",{entity:t.entity,id:h}),await w.call()):l.value=A.LIST_ACTIVE_NEW}const{controller:b}=We();o.watch(()=>s.value,E=>{E&&(E.canRead?b.show():b.hide())},{immediate:!0}),o.onUnmounted(()=>b.remove());const k=[{icon:"reload",label:"Reload",callback(){g.call()}}];let N=[me.on("affected-entity",E=>{E.name===t.entity&&w.call()}),me.on("display-entity",async E=>{E.name===t.entity&&(w.promise&&await w.promise,l.value=r.value.find(h=>h.Id===E.id)||null)})];o.onUnmounted(()=>N.map(E=>E()));function O(E){var P;function h(I){return Array.isArray(I)?h(I[0]):typeof I!="string"?null:I}const y=h(E);if(!y)return;const C=((P=i.value)==null?void 0:P.order)||[];(I=>{if(i.value)return i.value.order=I,!0})(C[0]!==y?[y]:C[1]==="desc"?[]:[y,"desc"])&&w.call()}return(E,h)=>{var S,$,P;const y=o.resolveComponent("widget-button"),C=o.resolveComponent("widget-fast-table-form");return o.openBlock(),o.createElementBlock("div",sr,[(S=i.value)!=null&&S.label?(o.openBlock(),o.createElementBlock("p",lr,o.toDisplayString(($=i.value)==null?void 0:$.label),1)):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:"slide-up"},{default:o.withCtx(()=>[o.unref(g).wait||o.unref(T).wait?(o.openBlock(),o.createElementBlock("div",cr,[o.createVNode(o.unref(he),{color:"var(--color-primary)"}),ur])):o.createCommentVNode("",!0)]),_:1}),o.createElementVNode("div",fr,[v.value==="form"||(P=o.unref(s))!=null&&P.canCreate?(o.openBlock(),o.createBlock(y,{key:0,callback:d,type:"primary"},{default:o.withCtx(()=>[o.createTextVNode(" Add New ")]),_:1})):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(p).filter(I=>!!I.value),I=>{var J;return o.openBlock(),o.createBlock(y,{callback:(J=I.value)==null?void 0:J.callback,type:"primary"},{default:o.withCtx(()=>{var ce;return[o.createTextVNode(o.toDisplayString((ce=I.value)==null?void 0:ce.label),1)]}),_:2},1032,["callback"])}),256)),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(k,I=>o.createVNode(y,{onClick:()=>I.callback,callback:I.callback},{default:o.withCtx(()=>[o.createVNode(se,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(I.icon),1)]),_:2},1024),o.createElementVNode("span",null,o.toDisplayString(I.label),1)]),_:2},1032,["onClick","callback"])),64))]),o.createElementVNode("div",dr,[o.createVNode(o.unref(bt),{config:m.value,array:r.value,"active-row":l.value,"onUpdate:activeRow":d,onOrder:O,class:"table"},{"head-cell":o.withCtx(I=>{var J;return[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(E.$slots["head-cell"]?E.$slots["head-cell"]:Et),o.mergeProps({label:I.label},I,{onOrder:O,order:((J=i.value)==null?void 0:J.order)||[]}),null,16,["label","order"]))]}),default:o.withCtx(()=>{var I;return[o.createVNode(C,{entity:E.entity,id:(I=l.value)==null?void 0:I.Id,"master-entities":E.masterEntities||void 0,binding:E.binding,onFormUpdate:h[0]||(h[0]=()=>{l.value=null,o.unref(w).call()})},null,8,["entity","id","master-entities","binding"])]}),_:1},8,["config","array","active-row"])])])}}});function Tt(e){return qe(e,"YYYY/MM/DD HH:mm:ss")}function qe(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Kt.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function ke(e){function t(...r){if(n.wait)return Promise.reject("The process has already started.");n.wait=!0;const i=Promise.resolve().then(()=>e(...r)).finally(()=>{n.wait=!1,n.promise=null});return n.promise=i,i}const n=o.reactive({wait:!1,call:t,promise:null});return n}function de(e){return typeof e=="string"?we(e):gr(e)?we(e.message,e.children||e.details||[]):mr(e)?we(e.title,[e.detail||""]):we(A.DEFAULT_ERROR_MESSAGE)}function gr(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function mr(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function we(e,t=[]){return{message:e,children:t}}function U(e="error"){return function(t){const{message:n,children:r}=de(t);ge.add(e,n,{children:r})}}function pe(e,t={}){return D().emit("entity:read",{...t,entity:e})}function Ge(e,t){return D().emit("entity:update",{...t,entity:e})}function kt(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function Ct(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let r=String(e).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(t,"0"),r[1].length>t&&(r[1]=r[1].substring(0,t)),r.join(".")}function hr(e,t){const n=new Map;return e.forEach(r=>{var a;const i=t(r);n.has(i)||n.set(i,[]),(a=n.get(i))==null||a.push(r)}),n}function yr(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function vr(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return A.DEFAULT_ERROR_MESSAGE}})}function B(e,t={}){return j.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=j.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(A.DEFAULT_ERROR_MESSAGE)}).then(n=>vr(n).then(r=>{if(!n.ok)throw r;return r}))}function wr(e,t=1e3){let n=0;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function br(e,t){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...r)}}const Er=Ie(Ne("pretty-value-field-by-entity"));function Tr(e,t,n){try{const r=_e.get(e);if(!r)throw new Error("For entity metadata is not loaded");const i=r.fieldsByName[t];if(!i)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return i.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return Er('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,e,t,n),n}}const kr=1,Cr=5e3,Ar="static-folder",At="request-error",_r="Distinguisher",Q=Ie(Ne("use-socket"));function D(){return Ir}function Sr(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Ir=function(){let e=1,t,n;const r=new Set;let i=0;const a=new Set;function l(){if(t)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{t.close()},Cr*2);const d=new Uint8Array(1);d[0]=kr,t.send(d)}setInterval(()=>{Array.from(r).forEach(d=>{w(d)&&(Q("Handler for event %s requestId %d was expired",d.event,d.requestId),d.requestId?s({requestId:d.requestId,event:At,data:{message:K.RequestTookToLong().message}}):r.delete(d))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},A.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:a,requestId:e,handlers:r,socketInstance:t}}function s(d){const b=[...r.values()];Q("Handlers array length is %d. Response event: %s. Request id: %d",r.size,d.event,d.requestId),b.forEach(k=>{const N=d.requestId;(k.requestId&&k.requestId===N||!k.requestId&&k.event===d.event)&&(Q("Find appropriated handler: %d, event: %s",e,k.event),k.callback(d.data,d),k.once&&(r.delete(k),Q("Handler was removed by *once* params was passed. %o",k)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(d){Q("Connection to server was stopped: %d %s",d.code,d.reason),Array.from(r).forEach(b=>{b.guaranteedAnswer&&b.serializeString&&a.add(b.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(d=>{p(d),a.delete(d)})},t.onerror=function(d){console.warn(d)},t.onmessage=d=>{var b;try{if(Sr(d.data)){l();return}const k=JSON.parse(d.data);if(!_t(k)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(k);return}(b=k==null?void 0:k.data)!=null&&b.refresh&&location.reload(),s(k)}catch(k){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(k)}}}function p(d){t.send(d)}function m(d,b){T({event:d,callback:b})}function f(d,b){T({event:d,callback:b,once:!0})}function v(){return t&&(t==null?void 0:t.readyState)===1}function g(d,b,k){const N=++e,O=JSON.stringify({requestId:N,event:d,data:b,contextId:j.contextId,url:R.socketURLHandler?R.socketURLHandler():window.location.href});return v()?p(O):(a.add(O),Q("Socket is not connected. Message was send to save-queue")),new Promise((E,h)=>{T({event:d,requestId:N,once:!0,guaranteedAnswer:!0,serializeString:O,callback:(y,C)=>{if(Q("Promise was resolve with next data:",y),Nr(C))return void h(y);k&&k(y,C),E(y)},timeToLive:A.TIME_TO_LIVE_SOCKET_REQUEST})})}function T(d){const b={timeToLive:0,...d,created:new Date().getTime()};r.add(b)}function w(d){return d.timeToLive===0||typeof d.timeToLive!="number"?!1:new Date().getTime()-d.created>d.timeToLive}return{get socket(){return t},on:m,once:f,emit:g,initialization(d){n=d},getDevInfo:c}}(),Nr=e=>!!_t(e)&&e.event===At,_t=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function St(e,t){return D().emit("list-setting:read",{entity:e,mark:t})}function Rr(e,t){return D().emit("metadata-field:treat",{entity:e,fieldName:t})}function It(e,t){return D().emit("entity:create",{...t,entity:e})}function Nt(e,t){return D().emit("entity:delete",{...t,entity:e})}function Lr(e,t){return D().emit("usage-context:read",{...t,entity:e})}function Rt(e={}){return D().emit("tool:read",e)}function Or(){return D().emit("metadata-list:read",{})}function Lt(e,t={},n={}){const r=o.inject(A.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:t,a=typeof t=="string"?n:t;return o.computed(()=>{var s;const c=((typeof e=="string"?(s=r==null?void 0:r.actions)==null?void 0:s.value:o.unref(e))||[]).find(u=>u.name===i);return c?{...c,...a}:null})}function $r(e){return D().emit("history:read",e)}function xr(e,t){return D().emit("entity:count",{...t,entity:e})}function Dr(e){return`/${Ar}/${e}`}function le(e){return{exec(t,n){switch(e.name){case"replace-boolean":return le.replaceBoolean(t,e.values);case"replace-record-operation":return le.replaceRecordOperation(t)}}}}le.replaceBoolean=Fr;le.replaceRecordOperation=Pr;function Fr(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function Pr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Br(e={}){return D().emit("tool:execute",e)}const Vr=Ie(Ne("wrap-tool-response"));function Ot(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=Ur),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=qr),e.handleCloseForm===void 0&&(e.handleCloseForm=Gr),e.handleValidationResult===void 0&&(e.handleValidationResult=Wr),{...t,label:t.title,callback(){var i;const n=typeof e.values=="function"?e.values(t,e):e.values,r=()=>Br({name:t.name,values:n,usageContext:t.usageContext}).then(async a=>{var l,c;if(!Mr(a))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const s of e.handlers)await s(t,a,e);if(!a.success)throw e.handleValidationResult&&a.validationEffect&&((c=(l=a.validationEffect)==null?void 0:l.results)!=null&&c.length)&&e.handleValidationResult(t,a.validationEffect,e),new Error(a.message);return a.message&&ge.add("info",a.message),Array.isArray(a.affectedEntities)&&e.handleAffectedEntity&&a.affectedEntities.forEach(s=>{var u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,t,s,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),a}).catch(U("error"));return(i=e.overrides)!=null&&i[t.name]?e.overrides[t.name](t,e):t.requireSave&&e.form&&e.form.changed?e.form.save().then(r):!t.confirmation||!e.handleConfirmation?r():e.handleConfirmation(t,r)}}}function Mr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function jr(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 Ur(e,t){const n=jr(e.confirmation);if(!ee.getComponentFromStore(A.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await ee.promptModal(A.MODAL_CONFIRM,{message:n}))return t()}function Wr(e,t){const n=A.MODAL_VALIDATION_EFFECT;if(!ee.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{ee.pushModal(n,t)})}function qr(e,t,n){var s;function r(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function i(u,p){u&&(Vr("Affected Entity %s. Find form with name %s.",p,u.name),u.name===p&&r(u)&&u.read(),u instanceof F.Form&&u.dependencies.forEach(m=>i(m,p)))}me.emit("affected-entity",t);const{router:a,form:l}=n,c=(s=t.primaryKey)==null?void 0:s.Id;if(a&&t&&t.name===e.redirectEntity){me.emit("display-entity",{id:c,name:t.name}),R.getEntityLink&&a.push(R.getEntityLink(t.name,c));return}i(l,t.name)}function Gr(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}let Z={};function te(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=F.utils.getPropFromObject((this==null?void 0:this.vocabulary)||Z,e);if(typeof n=="string")return lt(n,t);const r=F.utils.getPropFromObject(Z==null?void 0:Z.root,e);return typeof r=="string"?lt(r,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function lt(e,t){return t.forEach((n,r)=>{e=e.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),e}te.setGlobalVocabulary=function(e){Z=e};te.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),te.bind({vocabulary:F.utils.getPropFromObject(Z,t.toLowerCase())})};te.setVocabulary=function(e){return typeof e=="string"&&(e=F.utils.getPropFromObject(Z,e)),te.bind({vocabulary:e})};function zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}},L={},De={exports:{}},ne={};function $t(){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 Hr(e,t,n){}function Xr(e,t,n){}var Jr=/javascript\s*\:/img;function Yr(e,t){return Jr.test(t)?"":t}ne.whiteList=$t();ne.getDefaultWhiteList=$t;ne.onAttr=Hr;ne.onIgnoreAttr=Xr;ne.safeAttrValue=Yr;var Kr={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,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,"")}},fe=Kr;function Qr(e,t){e=fe.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,r=!1,i=0,a=0,l="";function c(){if(!r){var p=fe.trim(e.slice(i,a)),m=p.indexOf(":");if(m!==-1){var f=fe.trim(p.slice(0,m)),v=fe.trim(p.slice(m+1));if(f){var g=t(i,l.length,f,v,p);g&&(l+=g+"; ")}}}i=a+1}for(;a<n;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var u=e.indexOf("*/",a+2);if(u===-1)break;a=u+1,i=a+1,r=!1}else s==="("?r=!0:s===")"?r=!1:s===";"?r||c():s===`
|
|
7
|
+
`&&c()}return fe.trim(l)}var Zr=Qr,be=ne,eo=Zr;function ct(e){return e==null}function to(e){var t={};for(var n in e)t[n]=e[n];return t}function xt(e){e=to(e||{}),e.whiteList=e.whiteList||be.whiteList,e.onAttr=e.onAttr||be.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||be.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||be.safeAttrValue,this.options=e}xt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,i=n.onAttr,a=n.onIgnoreAttr,l=n.safeAttrValue,c=eo(e,function(s,u,p,m,f){var v=r[p],g=!1;if(v===!0?g=v:typeof v=="function"?g=v(m):v instanceof RegExp&&(g=v.test(m)),g!==!0&&(g=!1),m=l(p,m),!!m){var T={position:u,sourcePosition:s,source:f,isWhite:g};if(g){var w=i(p,m,T);return ct(w)?p+":"+m:w}else{var w=a(p,m,T);if(!ct(w))return w}}});return c};var no=xt;(function(e,t){var n=ne,r=no;function i(l,c){var s=new r(c);return s.process(l)}t=e.exports=i,t.FilterCSS=r;for(var a in n)t[a]=n[a];typeof window<"u"&&(window.filterCSS=e.exports)})(De,De.exports);var ze=De.exports,He={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,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}},ro=ze.FilterCSS,oo=ze.getDefaultWhiteList,Ae=He;function Dt(){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 Ft=new ro;function io(e,t,n){}function ao(e,t,n){}function so(e,t,n){}function lo(e,t,n){}function Pt(e){return e.replace(uo,"<").replace(fo,">")}function co(e,t,n,r){if(n=Wt(n),t==="href"||t==="src"){if(n=Ae.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(Ee.lastIndex=0,Ee.test(n))return""}else if(t==="style"){if(ut.lastIndex=0,ut.test(n)||(ft.lastIndex=0,ft.test(n)&&(Ee.lastIndex=0,Ee.test(n))))return"";r!==!1&&(r=r||Ft,n=r.process(n))}return n=qt(n),n}var uo=/</g,fo=/>/g,po=/"/g,go=/"/g,mo=/&#([a-zA-Z0-9]*);?/gim,ho=/:?/gim,yo=/&newline;?/gim,Ee=/((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,ut=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,ft=/u\s*r\s*l\s*\(.*/gi;function Bt(e){return e.replace(po,""")}function Vt(e){return e.replace(go,'"')}function Mt(e){return e.replace(mo,function(n,r){return r[0]==="x"||r[0]==="X"?String.fromCharCode(parseInt(r.substr(1),16)):String.fromCharCode(parseInt(r,10))})}function jt(e){return e.replace(ho,":").replace(yo," ")}function Ut(e){for(var t="",n=0,r=e.length;n<r;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return Ae.trim(t)}function Wt(e){return e=Vt(e),e=Mt(e),e=jt(e),e=Ut(e),e}function qt(e){return e=Bt(e),e=Pt(e),e}function vo(){return""}function wo(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function r(l){return n?!0:Ae.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,c,s){if(r(l))if(s.isClosing){var u="[/removed]",p=s.position+u.length;return i.push([a!==!1?a:s.position,p]),a=!1,u}else return a||(a=s.position),"[removed]";else return t(l,c,s)},remove:function(l){var c="",s=0;return Ae.forEach(i,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function bo(e){for(var t="",n=0;n<e.length;){var r=e.indexOf("<!--",n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var i=e.indexOf("-->",r);if(i===-1)break;n=i+3}return t}function Eo(e){var t=e.split("");return t=t.filter(function(n){var r=n.charCodeAt(0);return r===127?!1:r<=31?r===10||r===13:!0}),t.join("")}L.whiteList=Dt();L.getDefaultWhiteList=Dt;L.onTag=io;L.onIgnoreTag=ao;L.onTagAttr=so;L.onIgnoreTagAttr=lo;L.safeAttrValue=co;L.escapeHtml=Pt;L.escapeQuote=Bt;L.unescapeQuote=Vt;L.escapeHtmlEntities=Mt;L.escapeDangerHtml5Entities=jt;L.clearNonPrintableCharacter=Ut;L.friendlyAttrValue=Wt;L.escapeAttrValue=qt;L.onIgnoreTagStripAll=vo;L.StripTagBody=wo;L.stripCommentTag=bo;L.stripBlankChar=Eo;L.attributeWrapSign='"';L.cssFilter=Ft;L.getDefaultCSSWhiteList=oo;var Re={},Y=He;function To(e){var t=Y.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=Y.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function ko(e){return e.slice(0,2)==="</"}function Co(e,t,n){var r="",i=0,a=!1,l=!1,c=0,s=e.length,u="",p="";e:for(c=0;c<s;c++){var m=e.charAt(c);if(a===!1){if(m==="<"){a=c;continue}}else if(l===!1){if(m==="<"){r+=n(e.slice(i,c)),a=c,i=c;continue}if(m===">"||c===s-1){r+=n(e.slice(i,a)),p=e.slice(a,c+1),u=To(p),r+=t(a,r.length,u,p,ko(p)),i=c+1,a=!1;continue}if(m==='"'||m==="'")for(var f=1,v=e.charAt(c-f);v.trim()===""||v==="=";){if(v==="="){l=m;continue e}v=e.charAt(c-++f)}}else if(m===l){l=!1;continue}}return i<s&&(r+=n(e.substr(i))),r}var Ao=/[^a-zA-Z0-9\\_:.-]/gim;function _o(e,t){var n=0,r=0,i=[],a=!1,l=e.length;function c(f,v){if(f=Y.trim(f),f=f.replace(Ao,"").toLowerCase(),!(f.length<1)){var g=t(f,v||"");g&&i.push(g)}}for(var s=0;s<l;s++){var u=e.charAt(s),p,m;if(a===!1&&u==="="){a=e.slice(n,s),n=s+1,r=e.charAt(n)==='"'||e.charAt(n)==="'"?n:Io(e,s+1);continue}if(a!==!1&&s===r){if(m=e.indexOf(u,s+1),m===-1)break;p=Y.trim(e.slice(r+1,m)),c(a,p),a=!1,s=m,n=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(m=So(e,s),m===-1){p=Y.trim(e.slice(n,s)),c(p),a=!1,n=s+1;continue}else{s=m-1;continue}else if(m=No(e,s-1),m===-1){p=Y.trim(e.slice(n,s)),p=dt(p),c(a,p),a=!1,n=s+1;continue}else continue}return n<e.length&&(a===!1?c(e.slice(n)):c(a,dt(Y.trim(e.slice(n))))),Y.trim(i.join(" "))}function So(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Io(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function No(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Ro(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function dt(e){return Ro(e)?e.substr(1,e.length-2):e}Re.parseTag=Co;Re.parseAttr=_o;var Lo=ze.FilterCSS,M=L,Gt=Re,Oo=Gt.parseTag,$o=Gt.parseAttr,Ce=He;function Te(e){return e==null}function xo(e){var t=Ce.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=Ce.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=Ce.trim(e.slice(0,-1))),{html:e,closing:n}}function Do(e){var t={};for(var n in e)t[n]=e[n];return t}function Fo(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(r){return r.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function zt(e){e=Do(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=M.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Fo(e.whiteList||e.allowList):e.whiteList=M.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":M.attributeWrapSign,e.onTag=e.onTag||M.onTag,e.onTagAttr=e.onTagAttr||M.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||M.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||M.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||M.safeAttrValue,e.escapeHtml=e.escapeHtml||M.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Lo(e.css))}zt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,i=n.onTag,a=n.onIgnoreTag,l=n.onTagAttr,c=n.onIgnoreTagAttr,s=n.safeAttrValue,u=n.escapeHtml,p=t.attributeWrapSign,m=t.cssFilter;n.stripBlankChar&&(e=M.stripBlankChar(e)),n.allowCommentTag||(e=M.stripCommentTag(e));var f=!1;n.stripIgnoreTagBody&&(f=M.StripTagBody(n.stripIgnoreTagBody,a),a=f.onIgnoreTag);var v=Oo(e,function(g,T,w,d,b){var k={sourcePosition:g,position:T,isClosing:b,isWhite:Object.prototype.hasOwnProperty.call(r,w)},N=i(w,d,k);if(!Te(N))return N;if(k.isWhite){if(k.isClosing)return"</"+w+">";var O=xo(d),E=r[w],h=$o(O.html,function(y,C){var S=Ce.indexOf(E,y)!==-1,$=l(w,y,C,S);return Te($)?S?(C=s(w,y,C,m),C?y+"="+p+C+p:y):($=c(w,y,C,S),Te($)?void 0:$):$});return d="<"+w,h&&(d+=" "+h),O.closing&&(d+=" /"),d+=">",d}else return N=a(w,d,k),Te(N)?u(d):N},u);return f&&(v=f.remove(v)),v};var Po=zt;(function(e,t){var n=L,r=Re,i=Po;function a(c,s){var u=new i(s);return u.process(c)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,function(){for(var c in n)t[c]=n[c];for(var s in r)t[s]=r[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)})(xe,xe.exports);var Bo=xe.exports;const Vo=zr(Bo);function Mo(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>'),Vo(e)}function jo(e,t,n,r){let i=e+t/60+n/3600;return(r=="S"||r=="W")&&(i=i*-1),i}function Uo(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 Xe(e,t){return`/forms/${e}/${t}`}function Ht(e,t,n){const r=te.getScope(e.toLowerCase());return t.map(i=>(typeof i.label=="string"&&(i.label=r(i.label)),i.type==="history"&&(i.onClick=a=>ee.openModal("modal-history",{id:a.Id,entity:e}),i.icon="history",i.class="widget-list-cell-history"),(i.entity||i.useObjectTypeName)&&Array.isArray(i.name)&&i.name.length>1&&(i.modal===!0?(i.onClick=a=>{ee.openModal("form",{entity:pt(i,a),id:a[Me(i)]})},i.class="widget-table-cell_link cursor_pointer"):i.link=a=>{if(typeof a!="object"||a==null)return null;const l=i.name[0],c=a[l];return c?Xe(pt(i,a),c):null},i.value=(a,l)=>l[i.name[1]]),Wo(i,i.type,i.presentation),i))}function Wo(e,t,n){switch(t){case"DateTime":{e.type="dateWithTime";break}case"Decimal":{n==="Money"&&(e.type="money");break}}return e}const pt=(e,t)=>e.useObjectTypeName?t[e.name[2]]:e.entity?e.entity:null;function gt(e){return typeof e!="object"||e===null?null:e[A.TABLE_MOCK_FIELD]}function qo(e,t){return typeof e!="object"||e===null?(console.warn("cell data is not a valid object."),e):(typeof t=="string"||typeof t=="number"||typeof t=="function"?(typeof t=="function"&&(t=t(e)),e[A.TABLE_MOCK_FIELD]=t):e[A.TABLE_MOCK_FIELD]=e.Id,e)}var Je=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(Je||{});function Go(){const e=o.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function zo(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function Xt(e,t){e()&&(await t(),await Xt(e,t))}function Ho(e,t,n={}){let r=!1;const i=o.ref(""),a=o.computed(()=>l.filter(h=>u(h,i.value))),l=o.reactive([]);let c=0;const s=o.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((h,y)=>zo(h,y));function p(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function m(){const h=N();return typeof h.limit!="number"&&(h.limit=100),h.offset=c,(n.request||pe)(e,h).then(C=>(c+=C.length,C))}function f(h,y){var S;return typeof h.Version=="number"?h.Version:(S=l.find($=>$.Id===y))==null?void 0:S.Version}function v(h,y){const C=l.findIndex(S=>S.Id===h);if(C===-1)throw new Error(`Can't found item with Id ${h}`);l.splice(C,1,y)}function g(h){const y=l.findIndex(C=>C.Id===h);if(y===-1)throw new Error(`Can't found item with Id ${h}`);l.splice(y,1)}async function T(h,y){try{const C=N(),S=f(y,h);delete y.Version,await Ge(e,{id:h,values:y,version:S,masterEntities:p()});const $=await pe(e,{fields:C.fields||"",id:h});v(h,$)}catch(C){U()(C)}}async function w(h,y={}){try{const C=N(),S=f(y,h);delete y.Version,await Nt(e,{id:h,version:S,masterEntities:p()}),g(h)}catch(C){U()(C)}}async function d(h){try{await It(e,{values:h,masterEntities:p()}),await O()}catch(y){U()(y)}}let b;async function k(){s.value=!0;try{b!=null&&b.signal&&!b.signal.aborted&&b.abort();let h=b=new AbortController,y=0;const S=N().limit||0;if(i.value&&!S){console.warn("Using textSearch assumes the use of limit.");return}await Xt(()=>(S>0?y<S:!0)&&!r&&!h.signal.aborted,async()=>{const $=await m();h.signal.aborted||(l.push(...$),y+=$.filter(P=>u(P,i.value)).length,($.length<S||S===0)&&(r=!0))})}catch(h){U()(h)}s.value=!1}function N(){return typeof t=="function"?t():t}async function O(){try{c=0,r=!1,l.splice(0,l.length),await k()}catch(h){U()(h)}}function E(){if(b)return b.abort();s.value=!1}return{array:l,updateById:T,next:k,reload:O,wait:s,create:d,deleteById:w,textSearch:i,filteredArray:a,abort:E}}function Xo(){function e(){return{organizations:j.organizations,currentContextId:j.contextId,person:j.person,context:j.context,contextType:j.contextType,userId:j.userId}}const t=o.reactive(e());return j.onupdateContext(()=>{Object.assign(t,e())}),t}function Jo(e,t,n){return D().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function Yo(e,t,n){return D().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function Ko(e,t){return D().emit("communication-message:create",{communicationId:e,text:t})}function Qo(e){return D().emit("communication-message:read",{communicationId:e})}function Zo(e){const t=F.Form.getParentForm(),n=o.reactive([]);return t&&t.subscribe(e),e.read=()=>Qo(e.id).then(r=>(n.splice(0,n.length,...r),r)),{array:n}}function ei(e,t){e.read=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw K.EntityWithoutName(e);return pe(e.name,r)}).then(Qe).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(U())},e.save=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw K.EntityWithoutName(e);return Ge(e.name,{id:r.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw U()(i),i})};function n(){return typeof t=="function"?t():t}}function Ye(e){if(!e)return o.inject(A.PROVIDE_NAME_METADATA);_e.initEntity(e);const t=o.computed(()=>_e.state[e]);return o.provide(A.PROVIDE_NAME_METADATA,t),t}function Ke(e,t={}){if(!e)return o.inject(A.PROVIDE_NAME_USAGE_CONTEXT);const n=o.ref(null);return o.provide(A.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await Lr(e,ti(t||{}))}}}function ti(e){return typeof e=="function"?e():e}function ni(e){if(!e)return o.inject(A.PROVIDE_NAME_ACTIONS);const t=o.ref(!1),n=o.reactive([]),r=o.computed(()=>n.map(l=>Ot(e,l))),i={actions:r,update:a};o.provide(A.PROVIDE_NAME_ACTIONS,i),e.router=Be.useRouter();function a(){if(t.value)return;t.value=!0,n.splice(0,n.length);const l=e==null?void 0:e.form;return Rt({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(U("error")).finally(()=>t.value=!1)}return{actions:r,update:a,loading:o.readonly(t)}}function ri(e){function t(n){n.key==="Enter"&&e()}o.onMounted(()=>{document.addEventListener("keypress",t)}),o.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function oi(e,t={}){const n=o.reactive([]),r=s=>{const u=o.unref(e);if(s===void 0){n.length===0?u.forEach(a):u.forEach(l);return}i(s)?l(s):a(s)},i=s=>n.includes(s),a=s=>{t.handleSelect&&!t.handleSelect(s)||i(s)||n.push(s)},l=s=>{const u=n.findIndex(p=>p===s);u!==-1&&n.splice(u,1)},c=o.computed(()=>{const s=o.unref(e);return n.length===s.length&&s.length!==0});return[n,r,c,a,l]}function ii(e){const t=o.ref(""),n=o.computed(()=>{const r=t.value.toLowerCase();return o.unref(e).filter(i=>t.value.length?Object.values(i).join().toLowerCase().includes(r):!0)});return{search:t,searchArray:n}}const ge=new class{constructor(){this.store=o.reactive([])}add(t,n,r={}){const i=ai(r),a=new Fe(t,n,i.timeout,i.children,i.click);return this.store.push(a),i.timeout&&setTimeout(this.remove.bind(this,a.id),i.timeout*1e3),a}remove(t){const n=this.store.findIndex(r=>r.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function ai(e){function t(r){return!!r&&typeof r=="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 Se=class Se{constructor(t,n,r,i,a){this.type=t,this.message=n,this.timeout=r,this.children=i,this.click=a,this.id=Se.cardId++}};Se.cardId=1;let Fe=Se;/*!
|
|
8
8
|
* jenesius-event-emitter v1.0.2
|
|
9
9
|
* (c) 2022 Jenesius
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/const mt=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},ht=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},yt=function(e,t){const n=this.events[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)},vt=function(){this.events={}};class z{constructor(){this.events={}}on(t,n){return mt.call(this,t,n)}emit(t,n){return ht.call(this,t,n)}off(t,n){return yt.call(this,t,n)}cleanEvents(){vt.call(this)}static on(t,n){return mt.call(z,t,n)}static emit(t,n){return ht.call(z,t,n)}static off(t,n){return yt.call(z,t,n)}static cleanEvents(){vt.call(z)}}z.events={};class ai extends z{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return Yo(this.id,t)}static checkAndGenerate(t,n,r){return Jo(t,n,r).then(i=>i.length===0?Xo(t,n,r):i[0])}}function si(){return D().emit("client:read",{})}var ae;const G=class G extends z{constructor(){super(...arguments);nt(this,ae);this.type="front",this.organizations=[],Oe(this,ae,!1)}set language(n){localStorage.setItem(A.LOCALSTORAGE_LANGUAGE_KEY,n)}get language(){return localStorage.getItem(A.LOCALSTORAGE_LANGUAGE_KEY)||G.DEFAULT_LANGUAGE}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){Oe(this,ae,n),this.emit(G.EVENT_READY_UPDATE,n)}get ready(){return tt(this,ae)}onReady(n){return this.on(G.EVENT_READY_UPDATE,n)}onupdateContext(n){return this.on(G.EVENT_CONTEXT_UPDATE,n)}setCurrentContext(n){if(this.contextId===n)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(n),localStorage.setItem(A.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(n)),this.emit(G.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(r=>r.id===this.contextId)||null:null}async init(){try{const n=await this.loadCustomerData();this.person=n,this.organizations=n.organizations,this.userId=n.userId,this.restoreCurrentContext(),this.ready=!0}catch(n){U()(n)}}restoreCurrentContext(){const n=Number.parseInt(localStorage.getItem(A.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(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 si()}validateContextId(n){var r;try{return((r=this.person)==null?void 0:r.id)==n?!0:!!this.organizations.find(i=>i.id===n)}catch{return!1}}};ae=new WeakMap,G.DEFAULT_LANGUAGE="en",G.EVENT_CONTEXT_UPDATE="event:context-update",G.EVENT_READY_UPDATE="event:ready-update";let Pe=G;function li(e){return D().emit("metadata:read",{entity:e})}const _e=function(){const t=o.reactive({}),n=new Map;function r(c){return t[c]}async function i(c){if(n.has(c)&&await n.get(c),t[c])return;const s=await a(c);l(c,s)}function a(c){const s=li(c).finally(()=>{n.delete(c)});return n.set(c,s),s}function l(c,s){t[c]=s}return{state:t,initEntity:i,get:r}}();class ci extends z{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 q{static login(t){return B(R.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:R.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 B(`${R.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 B(`${R.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 B(`${R.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,r,i){return B(`${R.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:i})})}static confirmEmailByAccessRecovery(t,n,r,i){return B(`${R.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:i})})}static finishAccessRecovery(t,n,r){return B(`${R.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:r,ConfirmedPassword:r})})}}class ui{static readHistoryById(t,n){return B(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class fi{static getConfiguration(){return B("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await B(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class di{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return B(`/open-api/internationalization/language/${t}`)}}class pi{static async upload(t,n){const r=new FormData;return r.append("file",t),B(`/close-api/files?entityName=${n}`,{method:"POST",body:r}).then(i=>(i.filename=t.name,i))}}var Jt=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Jt||{}),Yt=(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))(Yt||{});function gi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function x(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];if(Array.isArray(r)){const i=r.map(a=>typeof a=="string"?`'${a}'`:a).join(", ");return r.length&&t.push(`@${n} in (${i})`),t}if(gi(r)){let i=function(a){var l;return((l=a.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return r.start&&t.push(`@${n} ge ${i(r.start)}`),r.end&&t.push(`@${n} le ${i(r.end)}`),t}return typeof r=="number"||typeof r=="boolean"?(t.push(`@${n} eq ${r}`),t):typeof r=="string"?(r.length!==0&&t.push(`@${n} eq '${r}'`),t):(r===null&&t.push(x.is(n,r)),t)},[]).join(" and ")}function ye(e){return typeof e=="string"?`'${e}'`:`${e}`}x.includes=function(t,n){return`@${t} Contains ${ye(n)}`};x.beginWith=function(t,n){return`@${t} BeginWith ${ye(n)}`};x.notEq=function(t,n){return`@${t} nq ${ye(n)}`};x.eq=function(t,n){return Array.isArray(n)?x.in(t,n):`@${t} eq ${ye(n)}`};x.in=function(t,n){const r=n.map(ye).join(", ");return`@${t} in (${r})`};x.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":x.and(...n.map(r=>x.notEq(t,r)))};x.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(x.wrap).join(" and ")};x.wrap=function(t){return`(${t})`};x.is=function(t,n){return`@${t} is ${n}`};x.or=function(...t){return t.join(" or ")};function Qe(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];const i=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Qe(r)),t[i]=r,t},{})}const j=new Pe,me=new ci;exports.ApplicationStatus=Yt;exports.Communication=ai;exports.CoreError=K;exports.DisplayListRow=Je;exports.EventBus=me;exports.Filter=x;exports.Manager=j;exports.MetadataStore=_e;exports.NotificationSystem=ge;exports.OBJECT_TYPE_NAME_FIELD=Ar;exports.RecordOperation=Jt;exports.WidgetButton=In;exports.WidgetFastTable=dr;exports.WidgetFastTableHeadCell=Et;exports.WidgetField=Zn;exports.WidgetIcon=se;exports.WidgetImage=Vn;exports.WidgetList=Qn;exports.WidgetLoader=Pn;exports.WidgetMultiButton=xn;exports.WidgetSpinner=he;exports.WidgetTable=bt;exports.asyncProcess=ke;exports.authService=q;exports.billingService=re;exports.catchUniversal=U;exports.config=hn;exports.configuration=R;exports.constants=A;exports.convertDDToDMS=jo;exports.convertDMSToDD=Mo;exports.convertListConfig=Ht;exports.debounce=vr;exports.documentsService=nn;exports.fileService=pi;exports.formatter=le;exports.getCellName=Me;exports.getCellValue=je;exports.getEntityLink=Xe;exports.getNamesFromListConfig=kt;exports.getUnitValue=$e;exports.groupArrayByField=mr;exports.historyService=ui;exports.injectAction=Lt;exports.internationalizationService=di;exports.invitationService=tn;exports.openService=fi;exports.parseError=de;exports.parseTextByMarkdown=Vo;exports.prettyDate=qe;exports.prettyDateWithTime=Tt;exports.prettyMoney=Ct;exports.prettyValueFieldByEntity=Er;exports.processWizardService=ie;exports.request=B;exports.setupListRow=Ue;exports.staticLink=xr;exports.t=te;exports.throttle=wr;exports.universalEntityCount=$r;exports.universalEntityCreate=It;exports.universalEntityDelete=Nt;exports.universalEntityRead=pe;exports.universalEntityUpdate=Ge;exports.universalHistoryRead=Or;exports.universalListSettingRead=St;exports.universalMetadataFieldTreat=Nr;exports.universalMetadataListRead=Lr;exports.universalToolRead=Rt;exports.useActions=ti;exports.useCommunication=Qo;exports.useEnter=ni;exports.useFormEntity=Zo;exports.useListActiveRow=qo;exports.useListEntity=zo;exports.useListSearch=oi;exports.useListSelect=ri;exports.useManagerState=Ho;exports.useMetadata=Ye;exports.useSocket=D;exports.useUsageContext=Ke;exports.useVisibleItem=We;exports.useWizard=sn;exports.uuidv4=hr;exports.valuesToUpperCase=Qe;exports.wrapToolResponse=Ot;
|
|
11
|
+
*/const mt=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},ht=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},yt=function(e,t){const n=this.events[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)},vt=function(){this.events={}};class z{constructor(){this.events={}}on(t,n){return mt.call(this,t,n)}emit(t,n){return ht.call(this,t,n)}off(t,n){return yt.call(this,t,n)}cleanEvents(){vt.call(this)}static on(t,n){return mt.call(z,t,n)}static emit(t,n){return ht.call(z,t,n)}static off(t,n){return yt.call(z,t,n)}static cleanEvents(){vt.call(z)}}z.events={};class si extends z{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return Ko(this.id,t)}static checkAndGenerate(t,n,r){return Yo(t,n,r).then(i=>i.length===0?Jo(t,n,r):i[0])}}function li(){return D().emit("client:read",{})}var ae;const G=class G extends z{constructor(){super(...arguments);nt(this,ae);this.type="front",this.organizations=[],Oe(this,ae,!1)}set language(n){localStorage.setItem(A.LOCALSTORAGE_LANGUAGE_KEY,n)}get language(){return localStorage.getItem(A.LOCALSTORAGE_LANGUAGE_KEY)||G.DEFAULT_LANGUAGE}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){Oe(this,ae,n),this.emit(G.EVENT_READY_UPDATE,n)}get ready(){return tt(this,ae)}onReady(n){return this.on(G.EVENT_READY_UPDATE,n)}onupdateContext(n){return this.on(G.EVENT_CONTEXT_UPDATE,n)}setCurrentContext(n){if(this.contextId===n)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(n),localStorage.setItem(A.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(n)),this.emit(G.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(r=>r.id===this.contextId)||null:null}async init(){try{const n=await this.loadCustomerData();this.person=n,this.organizations=n.organizations,this.userId=n.userId,this.restoreCurrentContext(),this.ready=!0}catch(n){U()(n)}}restoreCurrentContext(){const n=Number.parseInt(localStorage.getItem(A.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(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 li()}validateContextId(n){var r;try{return((r=this.person)==null?void 0:r.id)==n?!0:!!this.organizations.find(i=>i.id===n)}catch{return!1}}};ae=new WeakMap,G.DEFAULT_LANGUAGE="en",G.EVENT_CONTEXT_UPDATE="event:context-update",G.EVENT_READY_UPDATE="event:ready-update";let Pe=G;function ci(e){return D().emit("metadata:read",{entity:e})}const _e=function(){const t=o.reactive({}),n=new Map;function r(c){return t[c]}async function i(c){if(n.has(c)&&await n.get(c),t[c])return;const s=await a(c);l(c,s)}function a(c){const s=ci(c).finally(()=>{n.delete(c)});return n.set(c,s),s}function l(c,s){t[c]=s}return{state:t,initEntity:i,get:r}}();class ui extends z{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 q{static login(t){return B(R.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:R.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 B(`${R.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 B(`${R.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 B(`${R.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,r,i){return B(`${R.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:i})})}static confirmEmailByAccessRecovery(t,n,r,i){return B(`${R.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:i})})}static finishAccessRecovery(t,n,r){return B(`${R.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:r,ConfirmedPassword:r})})}}class fi{static readHistoryById(t,n){return B(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class di{static getConfiguration(){return B("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await B(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class pi{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return B(`/open-api/internationalization/language/${t}`)}}class gi{static async upload(t,n){const r=new FormData;return r.append("file",t),B(`/close-api/files?entityName=${n}`,{method:"POST",body:r}).then(i=>(i.filename=t.name,i))}}var Jt=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Jt||{}),Yt=(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))(Yt||{});function mi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function x(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];if(Array.isArray(r)){const i=r.map(a=>typeof a=="string"?`'${a}'`:a).join(", ");return r.length&&t.push(`@${n} in (${i})`),t}if(mi(r)){let i=function(a){var l;return((l=a.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return r.start&&t.push(`@${n} ge ${i(r.start)}`),r.end&&t.push(`@${n} le ${i(r.end)}`),t}return typeof r=="number"||typeof r=="boolean"?(t.push(`@${n} eq ${r}`),t):typeof r=="string"?(r.length!==0&&t.push(`@${n} eq '${r}'`),t):(r===null&&t.push(x.is(n,r)),t)},[]).join(" and ")}function ye(e){return typeof e=="string"?`'${e}'`:`${e}`}x.includes=function(t,n){return`@${t} Contains ${ye(n)}`};x.beginWith=function(t,n){return`@${t} BeginWith ${ye(n)}`};x.notEq=function(t,n){return`@${t} nq ${ye(n)}`};x.eq=function(t,n){return Array.isArray(n)?x.in(t,n):`@${t} eq ${ye(n)}`};x.in=function(t,n){const r=n.map(ye).join(", ");return`@${t} in (${r})`};x.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":x.and(...n.map(r=>x.notEq(t,r)))};x.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(x.wrap).join(" and ")};x.wrap=function(t){return`(${t})`};x.is=function(t,n){return`@${t} is ${n}`};x.or=function(...t){return t.join(" or ")};function Qe(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];const i=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Qe(r)),t[i]=r,t},{})}const j=new Pe,me=new ui;exports.ApplicationStatus=Yt;exports.Communication=si;exports.CoreError=K;exports.DisplayListRow=Je;exports.EventBus=me;exports.Filter=x;exports.Manager=j;exports.MetadataStore=_e;exports.NotificationSystem=ge;exports.OBJECT_TYPE_NAME_FIELD=_r;exports.RecordOperation=Jt;exports.WidgetButton=In;exports.WidgetFastTable=pr;exports.WidgetFastTableHeadCell=Et;exports.WidgetField=Zn;exports.WidgetIcon=se;exports.WidgetImage=Vn;exports.WidgetList=Qn;exports.WidgetLoader=Pn;exports.WidgetMultiButton=xn;exports.WidgetSpinner=he;exports.WidgetTable=bt;exports.asyncProcess=ke;exports.authService=q;exports.billingService=re;exports.catchUniversal=U;exports.config=hn;exports.configuration=R;exports.constants=A;exports.convertDDToDMS=Uo;exports.convertDMSToDD=jo;exports.convertListConfig=Ht;exports.debounce=wr;exports.documentsService=nn;exports.fileService=gi;exports.formatter=le;exports.getCellName=Me;exports.getCellValue=je;exports.getEntityLink=Xe;exports.getNamesFromListConfig=kt;exports.getUnitValue=$e;exports.groupArrayByField=hr;exports.historyService=fi;exports.injectAction=Lt;exports.internationalizationService=pi;exports.invitationService=tn;exports.openService=di;exports.parseError=de;exports.parseTextByMarkdown=Mo;exports.prettyDate=qe;exports.prettyDateWithTime=Tt;exports.prettyMoney=Ct;exports.prettyValueFieldByEntity=Tr;exports.processWizardService=ie;exports.request=B;exports.setupListRow=Ue;exports.staticLink=Dr;exports.t=te;exports.throttle=br;exports.universalEntityCount=xr;exports.universalEntityCreate=It;exports.universalEntityDelete=Nt;exports.universalEntityRead=pe;exports.universalEntityUpdate=Ge;exports.universalHistoryRead=$r;exports.universalListSettingRead=St;exports.universalMetadataFieldTreat=Rr;exports.universalMetadataListRead=Or;exports.universalToolRead=Rt;exports.useActions=ni;exports.useCommunication=Zo;exports.useEnter=ri;exports.useFormEntity=ei;exports.useListActiveRow=Go;exports.useListEntity=Ho;exports.useListSearch=ii;exports.useListSelect=oi;exports.useManagerState=Xo;exports.useMetadata=Ye;exports.useSocket=D;exports.useUsageContext=Ke;exports.useVisibleItem=We;exports.useWizard=sn;exports.uuidv4=yr;exports.valuesToUpperCase=Qe;exports.wrapToolResponse=Ot;
|
|
12
12
|
//# sourceMappingURL=eservices-core.cjs.js.map
|