@genesislcap/design-system-configurator 14.193.0 → 14.193.2
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/{206.206.d804c38263ac7aacdfc8.js → 206.206.b62226591869ba6dd9fa.js} +3 -3
- package/dist/{279.279.eadb3eb3776f65f20e06.js → 279.279.936e2953fa75b5400af8.js} +1 -1
- package/dist/531.4d3a32da02abd23b2434c87fceb7851e.js.map +1 -0
- package/dist/{531.531.2a753201475271a4276a.js → 531.531.a42c0d6636aee1ca38e1.js} +79 -56
- package/dist/{548.548.13206cdf93b4b580db99.js → 548.548.b658f759625f6af7017c.js} +1 -1
- package/dist/653.653.fb44c5cbb4ebd12a09fc.js +2 -0
- package/dist/{653.cda2755851515fbf4ce54a3f75f7351b.js.map → 653.cd79d6d50e9f0dfe8ed96f08357afbae.js.map} +1 -1
- package/dist/698.698.7e67d8bcfc37ced7c101.js +2 -0
- package/dist/698.ec949aaccbe09a8fa565ef1bab946487.js.map +1 -0
- package/dist/designSystemConfigurator.b1e1eac85ee5ba1ec2e13a365322a82d.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.6ea3b8581106a24a65e4.js +2 -0
- package/dist/main.f398386966650d8141457a6143994fb3.js.map +1 -0
- package/dist/remoteEntry.js +2 -2
- package/package.json +12 -12
- package/dist/531.e7d837b3dc03a9828045d28ab13761e4.js.map +0 -1
- package/dist/653.653.a242d57c6068263ac549.js +0 -2
- package/dist/698.698.ecbde0971fe5af2c5a94.js +0 -2
- package/dist/698.b0a13f590ef38f01fab872dcb7effa7e.js.map +0 -1
- package/dist/designSystemConfigurator.0565ff32793c2e1336cf64f70d3f46ad.js.map +0 -1
- package/dist/main.cf9d5206f96b6b0d9b582acd3ac5ea07.js.map +0 -1
- package/dist/main.dc4364e8ee87b9deb697.js +0 -2
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
`)}
|
|
173
173
|
`;class W extends s.Avatar{}const q={delegatesFocus:!0,mode:"open"},K={media:Y},X=W.compose(Object.assign({baseName:"avatar",template:U,styles:G,shadowOptions:q},K)),Z=(e,t)=>r.css`
|
|
174
174
|
${(0,s.badgeStyles)(e,t)}
|
|
175
|
-
`,Q=(e,t)=>(0,n.badgeTemplate)(e,t);class J extends s.Badge{}const ee=void 0,te={},oe=J.compose(Object.assign({baseName:"badge",template:Q,styles:Z,shadowOptions:ee},te));var ie=o(
|
|
175
|
+
`,Q=(e,t)=>(0,n.badgeTemplate)(e,t);class J extends s.Badge{}const ee=void 0,te={},oe=J.compose(Object.assign({baseName:"badge",template:Q,styles:Z,shadowOptions:ee},te));var ie=o(10281);const ae=(0,ie.createLogger)("foundation-ui"),ne=r.css`
|
|
176
176
|
@keyframes delete-animate {
|
|
177
177
|
from {
|
|
178
178
|
height: 100px;
|
|
@@ -1663,9 +1663,9 @@
|
|
|
1663
1663
|
<div class="title" part="title">
|
|
1664
1664
|
<slot name="title"></slot>
|
|
1665
1665
|
</div>
|
|
1666
|
-
|
|
1666
|
+
<${e}-button class="exit" part="exit" aria-label="exit" ${(0,r.ref)("exit")} appearance="stealth" @click=${e=>e.closeFlyout()}>
|
|
1667
1667
|
<${e}-icon name="times"></${e}-icon>
|
|
1668
|
-
|
|
1668
|
+
</${e}-button>
|
|
1669
1669
|
</div>
|
|
1670
1670
|
`)}
|
|
1671
1671
|
<div class="content" part="content">
|
|
@@ -1679,7 +1679,7 @@
|
|
|
1679
1679
|
</div>
|
|
1680
1680
|
`,$n=r.html`
|
|
1681
1681
|
${e=>wn(F(e))}
|
|
1682
|
-
`;class Sn extends n.FoundationElement{constructor(){super(...arguments),this.position="right",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}closedChanged(){this.closed||setTimeout((()=>this.visuallyhidden=!1),1)}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}}(0,x.__decorate)([r.attr],Sn.prototype,"position",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Sn.prototype,"displayHeader",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Sn.prototype,"closed",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Sn.prototype,"visuallyhidden",void 0);const Cn=void 0,kn={},Fn=Sn.compose(Object.assign({baseName:"flyout",styles:xn,template:$n,shadowOptions:Cn},kn));var _n;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(_n||(_n={}));const On=e=>{const t=e?`-${e}`:"";return r.css`
|
|
1682
|
+
`;class Sn extends n.FoundationElement{constructor(){super(...arguments),this.position="right",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}closedChanged(){this.closed||(setTimeout((()=>this.visuallyhidden=!1),1),this.focusExit())}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}focusExit(){this.exit.focus()}}(0,x.__decorate)([r.attr],Sn.prototype,"position",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Sn.prototype,"displayHeader",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Sn.prototype,"closed",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Sn.prototype,"visuallyhidden",void 0);const Cn=void 0,kn={},Fn=Sn.compose(Object.assign({baseName:"flyout",styles:xn,template:$n,shadowOptions:Cn},kn));var _n;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(_n||(_n={}));const On=e=>{const t=e?`-${e}`:"";return r.css`
|
|
1683
1683
|
${t&&`@media only screen and ${_n[e]} {`}
|
|
1684
1684
|
:host(.spacing${t}-1x) slot {
|
|
1685
1685
|
gap: calc(var(--design-unit) * 2px);
|
|
@@ -1908,7 +1908,7 @@
|
|
|
1908
1908
|
min-height: 40px;
|
|
1909
1909
|
padding: 0 calc(var(--design-unit) * 2.25px);
|
|
1910
1910
|
border-width: 0;
|
|
1911
|
-
background: var(--neutral-fill-input-rest);
|
|
1911
|
+
background-color: var(--neutral-fill-input-rest);
|
|
1912
1912
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
1913
1913
|
}
|
|
1914
1914
|
|
|
@@ -1984,6 +1984,7 @@
|
|
|
1984
1984
|
overflow-y: scroll;
|
|
1985
1985
|
scrollbar-width: thin;
|
|
1986
1986
|
scrollbar-color: var(--neutral-layer-2) var(--neutral-layer-4);
|
|
1987
|
+
list-style: none;
|
|
1987
1988
|
}
|
|
1988
1989
|
|
|
1989
1990
|
.checkbox-container zero-checkbox {
|
|
@@ -1995,10 +1996,6 @@
|
|
|
1995
1996
|
cursor: not-allowed;
|
|
1996
1997
|
}
|
|
1997
1998
|
|
|
1998
|
-
#filter-search {
|
|
1999
|
-
padding: 5px;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
1999
|
::-webkit-scrollbar {
|
|
2003
2000
|
width: 12px;
|
|
2004
2001
|
}
|
|
@@ -2052,10 +2049,34 @@
|
|
|
2052
2049
|
.label-hidden {
|
|
2053
2050
|
display: none;
|
|
2054
2051
|
}
|
|
2052
|
+
|
|
2053
|
+
ol,
|
|
2054
|
+
li {
|
|
2055
|
+
margin: 0;
|
|
2056
|
+
padding: 0;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
.checkbox {
|
|
2060
|
+
width: 100%;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
.select-all {
|
|
2064
|
+
width: 100%;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
.display-value {
|
|
2068
|
+
position: absolute;
|
|
2069
|
+
right: 40px;
|
|
2070
|
+
line-height: var(--type-ramp-base-line-height);
|
|
2071
|
+
color: var(--neutral-foreground-rest);
|
|
2072
|
+
font-size: var(--type-ramp-base-font-size);
|
|
2073
|
+
line-height: var(--type-ramp-base-line-height);
|
|
2074
|
+
font-family: var(--body-font);
|
|
2075
|
+
}
|
|
2055
2076
|
`;let Ps=class extends mt{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t;return(0,x.__awaiter)(this,void 0,void 0,(function*(){e.connectedCallback.call(this),this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||ae.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')}))}clearData(){this.select.options=[]}syncComponentData(e){var t;const o=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map((e=>({value:e[this.valueField],label:e[this.labelField]})));(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=o}handleStreamInserts(e){ae.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ae.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ae.debug("handleStreamUpdates - Method not implemented.")}};(0,x.__decorate)([(0,r.attr)({attribute:"value-field"})],Ps.prototype,"valueField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"label-field"})],Ps.prototype,"labelField",void 0),Ps=(0,x.__decorate)([(0,r.customElement)({name:"multiselect-datasource"})],Ps);const Bs=(e="foundation")=>r.html`
|
|
2056
2077
|
<label
|
|
2057
2078
|
part="label"
|
|
2058
|
-
for="
|
|
2079
|
+
for="display-field"
|
|
2059
2080
|
class=${e=>{var t;return(0,w.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
2060
2081
|
>
|
|
2061
2082
|
<slot
|
|
@@ -2063,8 +2084,23 @@
|
|
|
2063
2084
|
${(0,r.slotted)({property:"defaultSlottedNodes",filter:n.whitespaceFilter})}
|
|
2064
2085
|
></slot>
|
|
2065
2086
|
</label>
|
|
2066
|
-
<div class="root" part="root">
|
|
2087
|
+
<div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}">
|
|
2067
2088
|
<div class="control" part="control">
|
|
2089
|
+
<input
|
|
2090
|
+
id="display-field"
|
|
2091
|
+
part="filter-search"
|
|
2092
|
+
role="combobox"
|
|
2093
|
+
aria-haspopup="listbox"
|
|
2094
|
+
aria-controls="checkbox-container"
|
|
2095
|
+
aria-expanded=${e=>e.open?"true":"false"}
|
|
2096
|
+
?readonly=${e=>!e.search}
|
|
2097
|
+
@click=${e=>e.toggle()}
|
|
2098
|
+
?disabled="${e=>e.disabled}"
|
|
2099
|
+
value=${(0,Ge.O)((e=>e.filterSearchValue),"string","input")}
|
|
2100
|
+
placeholder="${e=>e.getDisplayValue}"
|
|
2101
|
+
@input=${(e,t)=>e.inputHandler()}
|
|
2102
|
+
@change=${(e,t)=>e.changeHandler(t.event)}
|
|
2103
|
+
/>
|
|
2068
2104
|
<div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}>
|
|
2069
2105
|
<svg
|
|
2070
2106
|
viewBox="0 0 12 7"
|
|
@@ -2076,47 +2112,34 @@
|
|
|
2076
2112
|
<path d="${"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"}" />
|
|
2077
2113
|
</svg>
|
|
2078
2114
|
</div>
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
readonly
|
|
2083
|
-
type="text"
|
|
2084
|
-
id="display-field"
|
|
2085
|
-
part="display-field"
|
|
2086
|
-
:value="${e=>e.getDisplayValue}"
|
|
2087
|
-
:disabled="${e=>e.disabled}"
|
|
2088
|
-
@click=${e=>e.toggle()}
|
|
2089
|
-
/>
|
|
2115
|
+
${(0,r.when)((e=>e.filterSearchValue&&e.selectedOptions.length),r.html`
|
|
2116
|
+
<div class="display-value">${e=>e.getDisplayValue}</div>
|
|
2117
|
+
`)}
|
|
2090
2118
|
</div>
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
<${e}-text-field
|
|
2094
|
-
id="filter-search"
|
|
2095
|
-
part="filter-search"
|
|
2096
|
-
value=${(0,Ge.O)((e=>e.filterSearchValue),"string","input")}
|
|
2097
|
-
placeholder="${e=>e.getPlaceholder}"
|
|
2098
|
-
@input=${(e,t)=>e.inputHandler()}
|
|
2099
|
-
@change=${(e,t)=>e.changeHandler(t.event)}
|
|
2100
|
-
></${e}-text-field>
|
|
2119
|
+
${(0,r.when)((e=>e.loading),r.html`
|
|
2120
|
+
<${e}-progress slot="indicator"></${e}-progress>
|
|
2101
2121
|
`)}
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2122
|
+
<ol
|
|
2123
|
+
${(0,r.ref)("optionsElement")}
|
|
2124
|
+
id="checkbox-container"
|
|
2125
|
+
class="checkbox-container options"
|
|
2126
|
+
aria-multiselectable="true"
|
|
2127
|
+
>
|
|
2128
|
+
${(0,r.when)((e=>e.all),r.html`
|
|
2129
|
+
<${e}-button
|
|
2130
|
+
class="select-all"
|
|
2131
|
+
@click=${e=>e.selectCheckboxAll()}
|
|
2132
|
+
?disabled="${(e,t)=>e.isAllOptionsDisabled}"
|
|
2133
|
+
>
|
|
2134
|
+
Select All ${e=>e.name}
|
|
2135
|
+
</${e}-button>
|
|
2136
|
+
`)}
|
|
2137
|
+
${(0,r.repeat)((e=>e.filteredAvailableOptions),r.html`
|
|
2138
|
+
<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}>
|
|
2118
2139
|
<${e}-checkbox
|
|
2119
2140
|
part="checkbox"
|
|
2141
|
+
class="checkbox"
|
|
2142
|
+
@keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}
|
|
2120
2143
|
@click=${(e,t)=>t.parent.selectCheckboxOne(e)}
|
|
2121
2144
|
@change=${(e,t)=>t.parent.changeHandler(t.event)}
|
|
2122
2145
|
?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}"
|
|
@@ -2124,19 +2147,19 @@
|
|
|
2124
2147
|
>
|
|
2125
2148
|
${(e,t)=>t.parent.getItemLabel(e)}
|
|
2126
2149
|
</${e}-checkbox>
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
</
|
|
2150
|
+
</li>
|
|
2151
|
+
`)}
|
|
2152
|
+
${(0,r.when)((e=>e.showCreatable),r.html`
|
|
2153
|
+
<${e}-button @click=${e=>e.addOption()}>Create "${e=>e.filterSearchValue}"</${e}-button>
|
|
2154
|
+
`)}
|
|
2155
|
+
</ol>
|
|
2133
2156
|
</div>
|
|
2134
2157
|
<slot
|
|
2135
2158
|
${(0,r.slotted)({property:"slottedDatasource",filter:e=>e instanceof Ps})}
|
|
2136
2159
|
></slot>
|
|
2137
2160
|
`,zs=r.html`
|
|
2138
2161
|
${Bs()}
|
|
2139
|
-
`,js=void 0,Vs={};class Gs extends n.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=ze.BELOW,this.initialisedOptions=!1}debounceChanged(e,t){this.debouncedInputHandler=nt()(this.asyncSetFilter,t)}openChanged(e,t){var o,i,a,n;t?(document.addEventListener("mousedown",this.clickOutside),null===(o=this.arrowIcon)||void 0===o||o.classList.add("flipped"),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(a=this.arrowIcon)||void 0===a||a.classList.remove("flipped"),null===(n=this.optionsElement)||void 0===n||n.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===ze.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map((e=>this.optionGetter(e)))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const o=t.getBoundingClientRect(),i=this.getBoundingClientRect(),a=o.top+o.height/2;e=i.top<a?ze.BELOW:ze.ABOVE}else{const t=this.getBoundingClientRect(),o=window.innerHeight,i=t.top,a=o-t.bottom;e=a<t.height&&i>a?ze.ABOVE:ze.BELOW}}e===ze.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===ze.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return"string"!=typeof e?e.value:e}getItemLabel(e){let t;return e?(t="string"==typeof e?e:e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find((e=>this.optionGetter(e)===this.selectedOptions[0]));e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get
|
|
2162
|
+
`,js=void 0,Vs={};class Gs extends n.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=ze.BELOW,this.initialisedOptions=!1}debounceChanged(e,t){this.debouncedInputHandler=nt()(this.asyncSetFilter,t)}openChanged(e,t){var o,i,a,n;t?(document.addEventListener("mousedown",this.clickOutside),null===(o=this.arrowIcon)||void 0===o||o.classList.add("flipped"),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(a=this.arrowIcon)||void 0===a||a.classList.remove("flipped"),null===(n=this.optionsElement)||void 0===n||n.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===ze.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map((e=>this.optionGetter(e)))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const o=t.getBoundingClientRect(),i=this.getBoundingClientRect(),a=o.top+o.height/2;e=i.top<a?ze.BELOW:ze.ABOVE}else{const t=this.getBoundingClientRect(),o=window.innerHeight,i=t.top,a=o-t.bottom;e=a<t.height&&i>a?ze.ABOVE:ze.BELOW}}e===ze.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===ze.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return"string"!=typeof e?e.value:e}getItemLabel(e){let t;return e?(t="string"==typeof e?e:e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find((e=>this.optionGetter(e)===this.selectedOptions[0]));e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter((e=>!this.isOptionDisabled(e))).map((e=>this.optionGetter(e))),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter((t=>{var o,i;const a="string"==typeof t?t:null!==(o=t.label)&&void 0!==o?o:t.value;return(null!==(i=null==a?void 0:a.toLowerCase())&&void 0!==i?i:"")===e}))}setFilter(){this.filteredAvailableOptions=[...this.options.filter((e=>{var t;const o=("string"==typeof e?e:null!==(t=e.label)&&void 0!==t?t:e.value).toLowerCase(),i=this.filterSearchValue.toLowerCase();return this.filterByContains?o.indexOf(i)>=0:o.startsWith(i)}))]}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){if(this.slottedDatasource.length>0){const e=this.slottedDatasource[0].datasource.resourceType;e===it.v.DATASERVER&&kt(this.slottedDatasource[0],this.filterSearchValue),e===it.v.REQUEST_SERVER&&Ft(this.slottedDatasource[0],this.filterSearchValue)}else this.loading=!1,ae.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality.")}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){C(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}}(0,x.__decorate)([r.attr],Gs.prototype,"name",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"auto-position"})],Gs.prototype,"autoPosition",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Gs.prototype,"all",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Gs.prototype,"allSelected",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Gs.prototype,"search",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Gs.prototype,"disabled",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Gs.prototype,"creatable",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Gs.prototype,"async",void 0),(0,x.__decorate)([r.attr],Gs.prototype,"debounce",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"filter-by-contains"})],Gs.prototype,"filterByContains",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"defaultSlottedNodes",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"slottedDatasource",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"valueFormatter",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"loading",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"filterSearchValue",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"open",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"options",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"selectedOptions",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"filteredAvailableOptions",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"scrollContainer",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"position",void 0),(0,x.__decorate)([r.observable],Gs.prototype,"onAllSelectedCallback",void 0),(0,x.__decorate)([r.volatile],Gs.prototype,"getDisplayValue",null),(0,x.__decorate)([r.volatile],Gs.prototype,"getPlaceholder",null),(0,x.__decorate)([r.volatile],Gs.prototype,"isAllOptionsDisabled",null),(0,x.__decorate)([r.volatile],Gs.prototype,"showCreatable",null);const Us=Gs.compose(Object.assign({baseName:"multiselect",template:zs,styles:Hs,shadowOptions:js},Vs));class Ys{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),o=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(o.map(((e,t)=>[e,t])));this._group=new RegExp(`[${t.find((e=>"group"===e.type)).value}]`,"g"),this._decimal=new RegExp(`[${t.find((e=>"decimal"===e.type)).value}]`),this._separator=new RegExp(`[$${t.find((e=>"decimal"===e.type)).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${o.join("")}]`,"g"),this._index=e=>i.get(e)}parse(e){return(e=e.trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e:NaN}hasSeparator(e){return this._separator.test(e)}}const Ws=(e,t)=>r.css`
|
|
2140
2163
|
${(0,s.numberFieldStyles)(e,t)}
|
|
2141
2164
|
::part(label) {
|
|
2142
2165
|
color: var(--neutral-foreground-rest);
|
|
@@ -3754,4 +3777,4 @@
|
|
|
3754
3777
|
<slot></slot>
|
|
3755
3778
|
</template>
|
|
3756
3779
|
`;var mu;!function(e){e.NOTIFICATION_EVENT="notification-event"}(mu||(mu={}));const vu={mode:"open",delegatesFocus:!0};class gu extends n.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t;return(0,x.__awaiter)(this,void 0,void 0,(function*(){if(e.connectedCallback.call(this),this.addEventListener(mu.NOTIFICATION_EVENT,(e=>{e.stopImmediatePropagation(),_a(e.detail,this.tagName,this.notificationListener)})),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void ae.debug(`Genesis Datasource init failed for ${this.resourceName}`);this.dataSub=null===(t=this.datasource.stream)||void 0===t?void 0:t.subscribe((e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,ct.d)(e))}))}}))}disconnectedCallback(){var e,t;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.datasource)||void 0===t||t.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach((e=>{this.showNotificationToast(e)}))}showNotificationToast(e){const{HEADER:t,MESSAGE:o,NOTIFY_SEVERITY:i}=e,a=e.CREATED_AT?new Date(e.CREATED_AT):void 0,n=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let s=[];this.toastButtons&&this.toastButtons.length>0&&(s=this.toastButtons.filter((({condition:t})=>!t||t({details:e}))));((e,t,o)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let i={title:e.title,body:e.body},a={};e.createdAt&&(i=Object.assign({createdAt:e.createdAt},i)),e.logLevel in ie.LogLevel&&(i=Object.assign({logLevel:e.logLevel},i)),e.toast&&(a=Object.assign({toast:e.toast},a),i=Object.assign({config:a},i)),ka(i,t,o)})({title:t,body:o,createdAt:a,toast:{details:e,type:null==i?void 0:i.toLowerCase(),buttons:s,autoClose:void 0!==n?!!n:!!this.closeTimeout,closeTimeout:null!=n?n:this.closeTimeout}},this.tagName)}}(0,x.__decorate)([r.observable],gu.prototype,"notificationListener",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"resource-name"})],gu.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"close-timeout",converter:r.nullableNumberConverter})],gu.prototype,"closeTimeout",void 0),(0,x.__decorate)([r.observable],gu.prototype,"toastButtons",void 0),(0,x.__decorate)([pt.yW],gu.prototype,"datasource",void 0);const fu=gu.compose({baseName:"notification-listener",template:hu,shadowOptions:vu}),bu=(e,t)=>o=>{const i="function"==typeof t?t:(a=t,e=>Object.assign(Object.assign({},a),e));var a;return r.FASTElement.define(class extends e{},i(o))};function yu(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=r.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}const xu=e=>!e.navId||"header"===e.navId,wu=10;function $u(e,t=xu,o=wu){const i=[];return e.filter((e=>e.navItems&&e.navItems.some(t))).forEach(((e,a)=>{e.navItems.filter(t).map(((t,i)=>{var n,s,r,l;const d=null!==(n=t.placementIndex)&&void 0!==n?n:a*o+i;return Object.assign(Object.assign({},t),{navId:null!==(s=t.navId)&&void 0!==s?s:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})})).forEach((e=>i.push(e)))})),i.sort(((e,t)=>e.placementIndex-t.placementIndex))}var Su,Cu=o(63734);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Su||(Su={}));class ku{constructor(e){this.analytics=(0,Cu.Ay)(e)}trackEvent(e,t){ma.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const Fu=n.DI.createInterface((e=>e.singleton(ku)));var _u=o(3479),Ou=o(80751),Du=o(98647);let Tu=class extends(_u.Ix.from(r.FASTElement)){connectedCallback(){super.connectedCallback(),r.DOM.queueUpdate((()=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.$router.config=this.config}))))}};Tu=(0,x.__decorate)([(0,r.customElement)({name:"foundation-router"})],Tu);class Lu extends Ou.s{constructor(){super(...arguments),this.definitions=[]}map(...e){this.definitions=[...e,...this.definitions],super.map(...e)}}(0,x.__decorate)([r.observable],Lu.prototype,"definitions",void 0);class Eu extends Du.Y{constructor(){super(...arguments),this.routes=new Lu(this)}getNavItems(e=xu){return $u(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.analytics.trackEvent(Su.routeChanged,{path:e.route.endpoint.path})}))})}construct(e){return this.container.get(e)}}(0,x.__decorate)([n.Container],Eu.prototype,"container",void 0),(0,x.__decorate)([Fu],Eu.prototype,"analytics",void 0),(0,x.__decorate)([er.KJ],Eu.prototype,"user",void 0);const Au=()=>_r().register(cu)}}]);
|
|
3757
|
-
//# sourceMappingURL=531.
|
|
3780
|
+
//# sourceMappingURL=531.4d3a32da02abd23b2434c87fceb7851e.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<design-system-preview></design-system-preview>
|
|
4
4
|
<design-system-export slot="export" tokensPath="${e=>e.tokensPath}"></design-system-export>
|
|
5
5
|
</design-system-editor>
|
|
6
|
-
`;var s=n(68871),a=n(
|
|
6
|
+
`;var s=n(68871),a=n(47291),i=n(95339),c=n(44405);a.DesignSystemPreview,a.DesignSystemEditor,a.DesignSystemExport;const d=(0,n(10281).createLogger)("design-system-configurator");var u=n(97478),p=n.n(u),l=n(27135),f=n.n(l),m=n(61301),h=n.n(m),v=n(49222),g=n.n(v),y=n(6626),A=n.n(y),b=n(88279),C=n.n(b),_=n(62860),E={};E.styleTagTransform=C(),E.setAttributes=g(),E.insert=h().bind(null,"head"),E.domAPI=f(),E.insertStyleElement=A();p()(_.A,E);_.A&&_.A.locals&&_.A.locals;const S=o.css`
|
|
7
7
|
:host {
|
|
8
8
|
display: flex;
|
|
9
9
|
height: 100%;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[653,792],{653:(e,s,n)=>{Promise.all([n.e(418),n.e(405),n.e(281),n.e(339),n.e(548)]).then(n.bind(n,96548))}}]);
|
|
2
|
+
//# sourceMappingURL=653.cd79d6d50e9f0dfe8ed96f08357afbae.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"653.653.xxxxxxxxxxxxxxxxxxxx.js","mappings":"uJAAA,
|
|
1
|
+
{"version":3,"file":"653.653.xxxxxxxxxxxxxxxxxxxx.js","mappings":"uJAAA,iF","sources":["webpack://@genesislcap/design-system-configurator/./src/index.federated.ts"],"sourcesContent":["import('./index');\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[698],{79780:(e,t,s)=>{s.d(t,{Es:()=>n});var i=s(34387);class r extends BroadcastChannel{constructor(){super(...arguments),this.postMessage=(...e)=>{const[t,s]=e;super.postMessage({type:t,detail:s})},this.isMessageType=(e,t)=>{var s;return(null===(s=t.data)||void 0===s?void 0:s.type)===e}}}const n=e=>{class t extends r{constructor(){super(e)}}return i.DI.createInterface((e=>e.transient(t)))}},40113:(e,t,s)=>{s.d(t,{N:()=>L});var i=s(8202),r=s(92277),n=s(57418),o=s(34387),a=s(97156),c=s(43543),d=s(21281),h=s(10447),u=s(56653),l=s(98316),E=s(17465);const g=o.DI.createInterface();function v(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(E.v.warn("PasswordCredential not available in this browser."),!1):(E.v.warn("CredentialsContainer not available in this browser."),!1)}const S=":";function _(e="",t=S,s){return e.split(t,s).map((e=>e.trim())).filter((e=>""!==e))}function m(e,t=S){const s="string"==typeof e&&e.trim();return!!s&&s.includes(t)}function p(e,t=S){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function T(e,t=S){for(const s of e)if(m(s,t))return s;return e.find((e=>"string"==typeof e&&!!e.trim()))}function R(e,t,s){const i="string"==typeof e&&e.trim();return!i||s&&!i.includes(s)||p(i)>1?s&&t&&s!==t?`${t}:${s}`:t||s:i}function O(e="credential"){E.v.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const A={password:!0,mediation:"optional"},f={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let I=class{constructor(e,t=f){this.session=e,this.config=t}createBasicCredentials(e){return{type:u.h.BASIC,username:e.username,password:e.password,mfaToken:this.getMFAToken()}}createRefreshCredentials(e){var t,s,i;return{type:u.h.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(s=null==e?void 0:e.refreshToken)&&void 0!==s?s:this.getRefreshToken(),mfaToken:null!==(i=null==e?void 0:e.mfaToken)&&void 0!==i?i:this.getMFAToken()}}createSSOCredentials(e){var t;return{type:u.h.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const s=e&&!!e.id&&!!e.name&&!e.name.includes(S)&&p(e.id)<=1;return t?s&&!!e.password:s}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[s]=_(t.name||t.id),[i,r]=_(T([t.id,t.name]));return[{id:R(t.id||t.name,s,r),name:s,password:t.password||""},!0]}catch(e){O("PasswordCredential")}if(t)try{const e=t,[s]=_(e.name||e.username||e.organisation),[i,r]=_(T([e.organisation||e.username||e.name]));return[{id:R(e.id||e.username||e.name,s,r),name:s,password:e.password||""},!1]}catch(e){O("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!v())return;const t=new PasswordCredential(e);return E.v.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)}))}getCredentialsFromContainer(e=A){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(v())return E.v.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)}))}storeCredentialsInCookie(e){const{password:t}=e,s=(0,i.__rest)(e,["password"]),r=this.config.cookie.storePasswords?e:s;return E.v.debug("Storing credentials in cookie"),!!h.A.set(this.config.cookie.name,JSON.stringify(r),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){E.v.debug("Getting credentials from cookie");const e=h.A.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(v()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))}))}getCredentials(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return v()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())}))}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")||this.session.getLocalStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")||this.session.getLocalStorageItem("refreshToken")}getMFAToken(){return this.session.getSessionStorageItem("mfaToken")}removeCookie(){h.A.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username"),this.session.removeLocalStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken"),this.session.removeLocalStorageItem("refreshToken")}removeMFAToken(){this.session.removeSessionStorageItem("mfaToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken(),this.removeMFAToken()}preventSilentAccess(){return v()&&navigator.credentials.preventSilentAccess()}};I=(0,i.__decorate)([(0,i.__param)(0,l.N),(0,i.__param)(1,(0,o.optional)(g))],I);const M=o.DI.createInterface((e=>e.singleton(I))),b=e=>Array.isArray(e)?e.map((e=>null!=e?e:"")):[],C=e=>{try{if("EVENT_LOGIN_AUTH_ACK"===(null==e?void 0:e.MESSAGE_TYPE)){const{DETAILS:i}=e;return{messageType:e.MESSAGE_TYPE,sourceRef:e.SOURCE_REF,userName:e.USER_NAME,updateQueue:e.UPDATE_QUEUE,zeroMqProxyModeEnabled:e.ZERO_MQ_PROXY_MODE_ENABLED,zeroMqProxyInboundPort:e.ZERO_MQ_PROXY_INBOUND_PORT,zeroMqProxyOutboundPort:e.ZERO_MQ_PROXY_OUTBOUND_PORT,userKVs:e.USER,details:i?{system:(s=i.SYSTEM,s?{date:s.DATE}:null),heartbeatIntervalSecs:i.HEARTBEAT_INTERVAL_SECS,failedLoginAttempts:i.FAILED_LOGIN_ATTEMPTS,rejectedLoginAttempts:i.REJECTED_LOGIN_ATTEMPTS,lastLoginDatetime:i.LAST_LOGIN_DATETIME,daysToPasswordExpiry:i.DAYS_TO_PASSWORD_EXPIRY,product:(t=i.PRODUCT,t?t.map((e=>({name:e.NAME,version:e.VERSION}))):[])}:null,permission:b(e.PERMISSION),profile:b(e.PROFILE)}}throw new Error("No Entity mapping implementation for provided DTO")}catch(e){throw E.v.error(e),e}var t,s};let N=class{loggedUserResultChanged(){var e;null===(e=this.isLoggedInSubject)||void 0===e||e.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return this.currentUser.isAuthenticated}constructor(e,t,s,i,r){this.session=e,this.connect=t,this.messageBuilder=s,this.credentialManager=i,this.currentUser=r,this.isWorking=!1,this.isLoggedInSubject=new a.t(this.isLoggedIn),this.currentUser.addAuthenticationChangeListener((e=>{var t;null===(t=this.isLoggedInSubject)||void 0===t||t.next(e.detail)}))}login(e){var t;return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.isWorking=!0;try{const s=this.messageBuilder.createLoginMessage(e),i=yield this.connect.send(s);if(!i||i.ERROR||(null===(t=i.DETAILS)||void 0===t?void 0:t.ERROR))throw new u.l(s,i);this.applyAuthResults({authToken:i.SESSION_AUTH_TOKEN,refreshToken:i.REFRESH_AUTH_TOKEN,profiles:i.PROFILE,username:i.USER_NAME,permissions:i.PERMISSION,sessionId:i.SESSION_ID}),this.currentUser.set(C(i)),this.session.setAuthResult(i),E.v.debug("Login Authentication Result:",i)}catch(e){if(E.v.error("Login Authentication Error:",e),!(e instanceof u.l&&e.isIgnorableError()))throw this.removeAuthResults(),this.currentUser.unset(),e;E.v.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult}))}logout(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.isWorking=!0;let t={success:!1};try{const s=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage();const{CODE:i,DETAILS:r,ERROR:n,MESSAGE_TYPE:o,OIDC_LOGOUT_URL:a}=yield this.connect.send(s),c=null!==(e=null==r?void 0:r.ERROR)&&void 0!==e?e:n,h=o===d.Go.LOGOUT_NACK;h&&E.v.warn("Unexpected Logout NACK received during logout.",c),t={success:o===d.Go.LOGOUT_ACK||i===d.x6.SESSION_NOT_FOUND||!h,error:c},a&&window.open(a,"_self")}catch(e){const s=new u.l(e.sentMessage,e.receivedMessage);if(E.v.error("Logout Authentication Error:",s),!s.isIgnorableError())throw e;E.v.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.currentUser.unset(),this.isWorking=!1}return t}))}reAuthFromSession(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const e=yield this.ensureConnection(),t=this.credentialManager.createRefreshCredentials();if(e&&this.credentialManager.validateRefreshCredentials(t)){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===d.Gp.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.currentUser.set(C(t)),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.currentUser.unset(),!1}))}ensureConnection(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)}))}getLoggedUserFromMessage(e){const t=e.USER_NAME,s=e.SESSION_AUTH_TOKEN,i=e.REFRESH_AUTH_TOKEN;return t&&s&&i?{username:t,authToken:s,refreshToken:i,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId}:this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null}};(0,i.__decorate)([n.observable],N.prototype,"isWorking",void 0),(0,i.__decorate)([n.observable],N.prototype,"loggedUserResult",void 0),N=(0,i.__decorate)([(0,i.__param)(0,l.N),(0,i.__param)(1,c.dm),(0,i.__param)(2,d.lT),(0,i.__param)(3,M),(0,i.__param)(4,r.KJ)],N);const L=o.DI.createInterface((e=>e.singleton(N)))},56653:(e,t,s)=>{var i;s.d(t,{h:()=>i,l:()=>r}),function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(i||(i={}));class r extends Error{constructor(e,t,s="Auth Failed \n"){super(s),this.sent=e,this.received=t,Object.setPrototypeOf(this,r.prototype)}isIgnorableError(){var e,t,s,i,r,n,o,a;return!!(null===(i=null===(s=null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)||void 0===s?void 0:s.toLowerCase())||void 0===i?void 0:i.includes("request needs the user to be logged"))||!!(null===(a=null===(o=null===(n=null===(r=this.received)||void 0===r?void 0:r.DETAILS)||void 0===n?void 0:n.ERROR)||void 0===o?void 0:o.toLowerCase())||void 0===a?void 0:a.includes("is not logged in"))}getMessageError(){var e,t;return Array.isArray(null===(e=this.received)||void 0===e?void 0:e.ERROR)?null===(t=this.received)||void 0===t?void 0:t.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}getDetailsError(){var e,t,s,i;return Array.isArray(null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)?null===(i=null===(s=this.received)||void 0===s?void 0:s.DETAILS)||void 0===i?void 0:i.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}hasPasswordExpiredError(){return this.hasErrorCode("PASSWORD_EXPIRED")}hasMFAError(){return this.hasErrorCode("MFA_REQUIRED")||this.hasErrorCode("MFA_FAILED")}hasErrorCode(e){var t,s;return!!Array.isArray(null===(t=this.received)||void 0===t?void 0:t.ERROR)&&(null===(s=this.received)||void 0===s?void 0:s.ERROR.some((t=>t.CODE===e)))}errorDetailFormatter(e){return`\n ${e.CODE}: \n ${e.TEXT}`}}},24669:(e,t,s)=>{s.d(t,{EQ:()=>a,a4:()=>o});var i=s(17190),r=s(34387);class n{constructor(){this.streamListeners=(0,i.r)(),this.streamCompleteListeners=(0,i.r)(),this.streamErrorListeners=(0,i.r)(),this.commitListeners=(0,i.r)(),this.metadataListeners=(0,i.r)()}addStreamListener(e,t,s){var i,r,n;const o=null===(i=this.streamListeners)||void 0===i?void 0:i.subscribe(e),a=null===(r=this.streamCompleteListeners)||void 0===r?void 0:r.subscribe(t),c=null===(n=this.streamErrorListeners)||void 0===n?void 0:n.subscribe(s);return()=>{o(),a(),c()}}onStreamEvent(e,t,s,i){var r;null===(r=this.streamListeners)||void 0===r||r.publish(new CustomEvent("connect-stream-event",{detail:{functions:i,message:t,resourceName:e,stream:s}}))}onStreamErrorEvent(e,t,s){var i;null===(i=this.streamErrorListeners)||void 0===i||i.publish(new CustomEvent("connect-stream-error-event",{detail:{resourceName:e,stream:t,error:s}}))}onStreamCompleteEvent(e,t){var s;null===(s=this.streamCompleteListeners)||void 0===s||s.publish(new CustomEvent("connect-stream-complete-event",{detail:{resourceName:e,stream:t}}))}addCommitListener(e){var t;return null===(t=this.commitListeners)||void 0===t?void 0:t.subscribe(e)}onCommitEvent(e,t){var s;null===(s=this.commitListeners)||void 0===s||s.publish(new CustomEvent("connect-commit-event",{detail:{eventName:e,message:t}}))}addMetadataListener(e){var t;return null===(t=this.metadataListeners)||void 0===t?void 0:t.subscribe(e)}onMetadataEvent(e,t,s){var i;null===(i=this.metadataListeners)||void 0===i||i.publish(new CustomEvent("connect-metadata-event",{detail:{resourceName:e,message:t,error:s}}))}}const o=r.DI.createInterface((e=>e.singleton(n))),a=r.DI.createInterface((e=>e.aliasTo(o)))},43543:(e,t,s)=>{s.d(t,{dm:()=>D,tn:()=>P});var i=s(8202),r=s(84686),n=s(57418),o=s(34387),a=s(77909);class c{constructor(){this.cachedMetadata=new Map,this.cachedJsonSchema=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}getJsonSchemaFor(e){return this.cachedJsonSchema.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}hasJsonSchemaFor(e){return this.cachedJsonSchema.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}setJsonSchemaFor(e,t){this.cachedJsonSchema.set(e,t)}}const d=o.DI.createInterface((e=>e.singleton(c)));var h=s(17465),u=s(24669),l=s(49587),E=s(49229),g=s(97156),v=s(7827),S=s(1762),_=s(84190),m=s(78213),p=s(66640),T=s(16220),R=s(98316);let O=class{constructor(e){this.serializer=e}get(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(s)}))}post(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(s)}))}};O=(0,i.__decorate)([(0,i.__param)(0,E.b_)],O);const A=o.DI.createInterface((e=>e.singleton(O))),f={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},{})},I=o.DI.createInterface((e=>e.instance(f)));var M=s(21281);const b=(e,t)=>((null==t?void 0:t.ROW)&&e&&e.length>0?t.ROW.forEach((t=>{const s=t;if(s&&s.DETAILS){const i=s.DETAILS.ROW_REF,r=s.DETAILS.OPERATION;"INSERT"===r&&(e.find((e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===i}))||e.unshift(s)),"DELETE"===r&&(e=e.filter((e=>{var s,i;return(null===(s=t.DETAILS)||void 0===s?void 0:s.ROW_REF)!==(null===(i=e.DETAILS)||void 0===i?void 0:i.ROW_REF)}))),"MODIFY"===r&&(e=e.map((e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===i?Object.assign(Object.assign({},e),s):e})))}})):!t||e&&0!==e.length||(e=[...new Set(t.ROW)]),e);let C=class e{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,s,i,r,n){var o;this.http=e,this.messageBuilder=t,this.session=s,this.metaCache=i,this.serializer=r,this.config=n,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new g.t(this._isConnected),this.isConnected$=null===(o=this.isConnectedSubject)||void 0===o?void 0:o.asObservable(),this.ongoingTurbo={},this.streams=new Map}checkHost(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:M.Go.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===M.Go.HEARTBEAT_PONG))}catch(e){return h.v.error(e),!1}}))}send(t,s){return this.http.post(e.getUrl(this.host,t),{body:e.getBody(t),headers:this.messageBuilder.createHTTPHeadersFromMessage(t)})}httpMode(){return!0}setValidSession(e){h.v.warn("setValidSession() called while in http polling mode.")}connect(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.v.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.send(s).then((e=>(this.dataLogoff(s.SOURCE_REF).catch((e=>h.v.error(e))),e)))}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (stream) message created -> `,r);const n=r.SOURCE_REF;this.streams.set(n,{SOURCE_REF:n,POLLING_FREQUENCY:new g.t(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const o=this.streams.get(n).POLLING_FREQUENCY,a=(0,v.x)((0,S.H)(this.send(r)),o.pipe((0,_.n)((e=>(0,m.Y)(e)))).pipe((0,_.n)((()=>(0,S.H)(this.getMessage(r)))))).pipe((0,p.v)((()=>this.streams.has(n))),(0,T.j)((()=>{h.v.debug(`Terminating stream for ${e} - ${n}`),this.dataLogoff(n)})));return this.streams.get(n).STREAM=a,a}streamState(e,t=(()=>{}),s=(()=>{}),i,r=[]){return this.stream(e,t,s,i).pipe((0,a.S)(b,r))}streamWithoutAutoTeardown(e,t,s,i){return h.v.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0"),this.stream(e,t,s,i)}getMessage(t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.http.get(e.getUrl(this.host,t),{headers:this.messageBuilder.createHTTPHeadersFromMessage(t)})}))}getMoreRows(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.v.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}getMoreColumns(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.send(t)}))}dataLogoff(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(h.v.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e,t=!0){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e);return h.v.debug(`HTTP MODE - ${t.MESSAGE_TYPE} (metadata) message created -> `,t),this.send(t).then((e=>e.DETAILS))}))}getJSONSchema(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,M.Gp.JSON_SCHEMA_REQUEST);return h.v.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.v.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (request server) message created -> `,s),this.send(s)}getAvailableResources(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createResourcesMessage(e);return h.v.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (getResources) message created -> `,t),this.send(t)}))}commitEvent(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.v.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (commit) message created -> `,s),this.send(s).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var s;if(!(null===(s=null==t?void 0:t.MESSAGE_TYPE)||void 0===s?void 0:s.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void h.v.debug(`${e} polling frequency is already accelerated.`);const i=this.config.polling.POLLING_MAP[e];if(!(null==i?void 0:i.TEMP_FREQUENCY)||!i.AMOUNT_OF_POLLS)return;const r=i.TEMP_FREQUENCY,n=r*i.AMOUNT_OF_POLLS,o=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of i.QUERIES)a[e]=r,o[e]||(o[e]=this.config.polling.POLLING_FREQUENCY);h.v.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${r}ms DURATION=${n}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{h.v.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:o}}),this.ongoingTurbo[e]=!1}),n)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=s,h.v.debug(`Setting polling frequency for ${t} = ${s}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(s)}))}}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const s=t.MESSAGE_TYPE;let i=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return s===M.Gp.DATA_LOGON&&(i=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${i}`}};(0,i.__decorate)([n.observable],C.prototype,"host",void 0),(0,i.__decorate)([n.observable],C.prototype,"isWorking",void 0),(0,i.__decorate)([n.observable],C.prototype,"_isConnected",void 0),(0,i.__decorate)([n.volatile],C.prototype,"isConnected",null),C=(0,i.__decorate)([(0,i.__param)(0,A),(0,i.__param)(1,M.lT),(0,i.__param)(2,R.N),(0,i.__param)(3,d),(0,i.__param)(4,E.b_),(0,i.__param)(5,I)],C);const N=o.DI.createInterface((e=>e.singleton(C)));var L=s(45230);let U=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}get isConnected$(){var e;return null===(e=this.socket.isConnectedSubject)||void 0===e?void 0:e.asObservable()}get host(){return this.socket.host}constructor(e,t,s,i,r){this.socket=e,this.messageBuilder=t,this.metaCache=s,this.events=i,this.config=r,this.isWorking=!1}httpMode(){return!1}setValidSession(e){h.v.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}send(e,t){return this.socket.send(e,t)}connect(e=r.vN){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.socket.reset(),this.socket.connect(e,this.config.connect,this.config.reconnect)}))}disconnect(){this.socket.reset()}snapshot(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.socket.send(s)}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`${r.MESSAGE_TYPE} (stream) message created -> `,r);const n=this.socket.sendForStream(r,t,(t=>{s(t),this.events.onStreamErrorEvent(e,n,t)}),(()=>{this.events.onStreamCompleteEvent(e,n)}));return this.events.onStreamEvent(e,r,n,{onMessage:t,onError:s}),n}streamState(e,t=(()=>{}),s=(()=>{}),i,r=[]){return this.stream(e,t,s,i).pipe((0,a.S)(b,r))}streamWithoutAutoTeardown(e,t,s,i){h.v.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0");const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`${r.MESSAGE_TYPE} (stream without auto-teardown) message created -> `,r);const n=this.socket.sendForStreamWithoutTeardown(r,t,(t=>{s(t),this.events.onStreamErrorEvent(e,n,t)}));return this.events.onStreamEvent(e,r,n,{onMessage:t,onError:s}),n}getMoreRows(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t,!1)}))}getMoreColumns(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.socket.send(t)}))}dataLogoff(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(t&&this.metaCache.hasMetadataFor(e))return h.v.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const i=this.messageBuilder.createMetaRequestMessage(e);let r,n;h.v.debug(`${i.MESSAGE_TYPE} (metadata) message created -> `,i);try{this.isWorking=!0;const t=yield this.socket.send(i);r=null!==(s=null==t?void 0:t.DETAILS)&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setMetadataFor(e,r)}catch(e){throw n=e,h.v.error(e),n}finally{this.events.onMetadataEvent(e,i,n),this.isWorking=!1}return r}))}getJSONSchema(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(t&&this.metaCache.hasJsonSchemaFor(e))return h.v.debug(`Cached JsonSchema retrieved for ${e}`),this.metaCache.getJsonSchemaFor(e);const i=this.messageBuilder.createMetaRequestMessage(e,M.Gp.JSON_SCHEMA_REQUEST);let r;h.v.debug(`${i.MESSAGE_TYPE} (json schema) message created -> `,i);try{this.isWorking=!0,r=null!==(s=yield this.socket.send(i))&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setJsonSchemaFor(e,r)}catch(e){h.v.error(e)}finally{this.isWorking=!1}return r}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} (request server) message created -> `,s),this.socket.send(s)}getAvailableResources(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createResourcesMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} (resources) message created -> `,t),this.socket.send(t)}))}commitEvent(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);h.v.debug(`${s.MESSAGE_TYPE} (commit) message created -> `,s);const i=this.socket.send(s);return this.events.onCommitEvent(e,s),i}))}};(0,i.__decorate)([n.observable],U.prototype,"isWorking",void 0),U=(0,i.__decorate)([(0,i.__param)(0,L.yQ),(0,i.__param)(1,M.lT),(0,i.__param)(2,d),(0,i.__param)(3,u.EQ),(0,i.__param)(4,l.R)],U);const w="true"===r.PF||!1,y=o.DI.createInterface((e=>e.singleton(U))),D=o.DI.createInterface((e=>w?e.aliasTo(N):e.aliasTo(y)));function P(){return o.DI.getOrCreateDOMContainer().get(D)}},49587:(e,t,s)=>{s.d(t,{R:()=>n});var i=s(34387);const r={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,verboseHeartbeat:!1,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0},isWebSocketExpression:new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i")},n=i.DI.createInterface((e=>e.instance(r)))},21281:(e,t,s)=>{s.d(t,{Go:()=>i,Gp:()=>r,lT:()=>E,x6:()=>n,z2:()=>u});var i,r,n,o=s(8202),a=s(32808),c=s(34387),d=s(56653),h=s(98316);!function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MORE_COLUMNS="MORE_COLUMNS",e.MORE_COLUMNS_ACK="MORE_COLUMNS_ACK",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(i||(i={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.RESOURCES_REQUEST_ACK="RESOURCES_REQUEST_ACK",e.RESOURCES_REQUEST_NACK="RESOURCES_REQUEST_NACK",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(r||(r={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(n||(n={}));const u=(e,t)=>!!Array.isArray(null==e?void 0:e.ERROR)&&(null==e?void 0:e.ERROR.some((e=>{var s,i;return(null===(s=e.CODE)||void 0===s?void 0:s.includes(`${t}`))||(null===(i=e.STATUS_CODE)||void 0===i?void 0:i.includes(`${t}`))})));let l=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case d.h.BASIC:t={USER_NAME:e.username,PASSWORD:e.password,MFA_CODE:e.mfaToken};break;case d.h.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken,MFA_CODE:e.mfaToken};break;case d.h.SSO:t={SSO_TOKEN:e.ssoToken};break;case d.h.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,s;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(s=e.sessionId)&&void 0!==s?s:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:r.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createResourcesMessage(e){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.RESOURCES_REQUEST},e)}createMetaRequestMessage(e,t=r.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken"),MFA_CODE:this.session.getSessionStorageItem("mfaToken")}}}createChangePasswordMessage(e,t,s){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:s}}}createForgotPasswordMessage(e,t,s=e){return{USER_NAME:s,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,s,i=e){return{USER_NAME:i,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:s}}}createMoreRowsMessage(e){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:i.MORE_ROWS,DETAILS:{SOURCE_REF:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createMoreColumnsMessage(e){return Object.assign(Object.assign({},this.createMoreRowsMessage(e)),{MESSAGE_TYPE:i.MORE_COLUMNS})}createHTTPHeadersFromMessage(e,t="application/json; charset=UTF-8"){const s={"Content-type":t};return e.SOURCE_REF&&(s["source-ref"]=e.SOURCE_REF,s.SOURCE_REF=e.SOURCE_REF),e.SESSION_AUTH_TOKEN&&(s["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===r.EVENT_LOGOUT&&(s["SESSION-ID"]=e.SESSION_ID),s}createHeartbeatPingMessage(e=!1){return{MESSAGE_TYPE:i.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId(),VERBOSE:e,DETAILS:{},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};l=(0,o.__decorate)([(0,o.__param)(0,h.N),(0,o.__param)(1,a.k)],l);const E=c.DI.createInterface((e=>e.singleton(l)))},45230:(e,t,s)=>{s.d(t,{yQ:()=>D,Ol:()=>P});var i=s(8202),r=s(92277),n=s(84686),o=s(49229),a=s(32808),c=s(57418),d=s(34387),h=s(50049),u=s(37970),l=s(75841),E=s(26274),g=s(53193),v=s(84190),S=s(82834),_=s(66640),m=s(53940),p=s(48653),T=s(98316),R=s(17465),O=s(49587),A=s(21281);const f=1e4,I=6e4;var M;!function(e){e.Linear="linear",e.Exponential="exponential"}(M||(M={}));const b=(e,t)=>{const{reconnectInterval:s=f}=e,i=s>I?I:s,r=Math.round(Math.log2(I/i));return i*Math.pow(2,t%r)},C=e=>{const{reconnectInterval:t=f}=e;return t>I?I:t};var N=s(5709);class L{constructor(e){this.interval=e,this.workerScript=`\n const startTime = Date.now();\n setInterval(function() {\n self.postMessage(Date.now() - startTime);\n }, ${this.interval});\n `}start(e){this.stop(),this.runWorker(e)}stop(){this.worker&&(this.worker.terminate(),delete this.worker)}runWorker(e){this.worker||(this.worker=new Worker(URL.createObjectURL(new Blob([this.workerScript],{type:"text/javascript"}))),this.worker.onmessage=t=>e(t.data))}}class U extends h.B{constructor(){super()}}u.c;class w{constructor(e,t,s,i){this._message=e,this._onMessage=t,this._onError=s,this._isSubscription=i}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let y=class{get isConfigured(){return this.status.isConfigured}get isConnecting(){return this.status.isConnecting}get isConnected(){return this.status.isConnected}get isConnectedSubject(){return this.status.isConnectedSubject}get isDisconnected(){return this.status.isDisconnected}get isDisconnectedByServer(){return this.status.isDisconnectedByServer}get isReconnecting(){return this.status.isReconnecting}get hasValidSession(){return R.v.deprecated("get hasValidSession","Use {@link @genesislcap/foundation-user#User.isAuthenticated} directly instead.","15.0.0"),this.user.isAuthenticated}set hasValidSession(e){R.v.deprecated("set hasValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}get host(){var e;return null!==(e=this.url)&&void 0!==e?e:n.vN}constructor(e,t,s,i,r,n,o){this.messageBuilder=e,this.session=t,this.serializer=s,this.uuid=i,this.status=r,this.user=n,this.config=o,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e=n.vN,t,s){var r;return this.url=e,this.connectOptions=null!=t?t:this.config.connect,this.reconnectOptions=null!=s?s:this.config.reconnect,(null===(r=this.config.isWebSocketExpression)||void 0===r?void 0:r.test(this.host))?new Promise((e=>{var t,s,r,n;R.v.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`),this.status.isConnecting=!this.isReconnecting;(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(s=this.socketSubscription)||void 0===s||s.unsubscribe(),this.websocket=new p.Q({url:this.url,openObserver:{next:()=>{this.session.setSessionStorageItem("hostUrl",this.url),this.status.isConnected=!0,this.prepareHeartbeat(),R.v.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.status.onClose(t),this.isDisconnectedByServer&&R.v.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:e=>this.serializer.serialize(e),deserializer:e=>this.serializer.deserialize(e)});this.socketSubscription=this.websocket.subscribe(null!==(n=null===(r=this.connectOptions)||void 0===r?void 0:r.connectObserver)&&void 0!==n?n:{next:e=>(0,i.__awaiter)(this,void 0,void 0,(function*(){var t;const s=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,R.v.info,s);const{SOURCE_REF:i,MESSAGE_TYPE:r}=e,n=this.getMessageHandler(i,r);if(!n)return void(e.MESSAGE_TYPE===A.Go.MSG_NACK&&e.ERROR&&e.ERROR.forEach((t=>{R.v.error(`MessageType: ${e.MESSAGE_TYPE} | Error Details:`,t)})));let o=!1;switch(e.MESSAGE_TYPE){case A.Gp.EVENT_LOGIN_AUTH_ACK:{const s=e.DETAILS;s.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=s.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case A.Go.LOGOUT_ACK:return n.onReceivedMessage.call(this,e),void this.cleanMessages();case A.Go.LOGON_ACK:return;case A.Go.LOGOFF_ACK:if(e.LOGGED_OUT&&this.user.isAuthenticated){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);(null==t?void 0:t.MESSAGE_TYPE)===A.Gp.EVENT_LOGIN_AUTH_ACK&&(this.session.setAuthResult(t),this.wsMessageHandlers.forEach((e=>{e.isSubscription&&(e.sentMessage.SESSION_AUTH_TOKEN=t.SESSION_AUTH_TOKEN,this.websocket.next(e.sentMessage))})))}break;case A.Go.QUERY_UPDATE:n.isSubscription||this.sendDataLogoff(i);break;case A.Go.MSG_NACK:case A.Go.LOGON_NACK:o=!0}o?n.onReceivedError.call(this,{receivedMessage:e,sentMessage:n.sentMessage}):n.onReceivedMessage.call(this,e),this.wsMessages.next(e),n.isSubscription||this.removeMessageHandler(i)})),error:e=>{R.v.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.isDisconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():R.v.info("Connection is now closed")}}),this.status.isConfigured=!0})):(R.v.error(`Specified host (${this.host}) is not valid WebSocket url. Connection will not proceed.`),void R.v.warn("Make sure the host url starts with wss:// or ws://"))}prepareHeartbeat(){var e,t,s,r;this.heartbeatTicker&&this.heartbeatTicker.stop();const n=()=>(0,i.__awaiter)(this,void 0,void 0,(function*(){var e,t,s;if(!this.isConnected)return;const i=this.messageBuilder.createHeartbeatPingMessage(null===(e=this.connectOptions)||void 0===e?void 0:e.verboseHeartbeat);(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatPingCallback)&&this.connectOptions.heartbeatPingCallback(i);const r=yield this.send(i);(null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatPongCallback)&&this.connectOptions.heartbeatPongCallback(r),this.heartbeatIsEnabled=r.MESSAGE_TYPE===A.Go.HEARTBEAT_PONG&&r.SOURCE_REF===i.SOURCE_REF,void 0!==r.IS_AUTHENTICATED&&(this.hasValidSession=r.IS_AUTHENTICATED)}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(r=null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatInterval)&&void 0!==r?r:this.heartbeatInterval;this.heartbeatTicker=new L(e),this.heartbeatTicker.start((()=>{this.websocket&&this.isConnected&&(n(),this.heartbeatLoggingIsEnabled&&R.v.debug(`Sending a heartbeat ping every ${e} ms`))}))}}reconnect(){var e,t,s,i,r;const n=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||n)return;this.status.isReconnecting=!0;const o=(null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectStrategy)===M.Exponential?b:C,a=this.isConnectedSubject.asObservable().pipe((0,v.n)((e=>e?(0,l.of)(-1):((e,t)=>new u.c((s=>{let i,r=0;return function n(){s.next(r),clearTimeout(i),i=setTimeout(n,t(e,r)),r+=1}(),()=>{clearTimeout(i)}})))(this.reconnectOptions,o).pipe((0,S.Z)((e=>{var t,s,i;let r;return r=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(i=null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectAttempts)&&void 0!==i?i:10,e<r?(0,l.of)(e):(this.status.reconnectionLimitReached=!0,(0,E.$)((()=>new Error(`Max reconnect attempts ${r} reached.`))))}))))),(0,_.v)((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(r=null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectObserver)&&void 0!==r?r:{next:e=>{R.v.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;R.v.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.status.isReconnecting=!1},complete:()=>{R.v.info(this.isConnected?"Reconnected":"Disconnected"),this.status.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.status.isConnected=!1,this.status.isConfigured=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new U,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return Promise.reject(new Error("WebSocket connection is closed"));const s=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,R.v.info,s),new Promise(((s,i)=>{const r=e=>{s(e)},n=e=>{i(e)};t&&this.setMessageHandler(e,r,n),this.websocket.next(e)}))}sendForStream(e,t,s,i){if(!this.isConnected)return(0,E.$)((()=>new Error("WebSocket connection is closed")));const r=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,R.v.info,r),this.setMessageHandler(e,t,s,!0),c.DOM.queueUpdate((()=>this.websocket.next(e))),new u.c((t=>{const s=new h.B;return this.wsMessages.pipe((0,m.p)((t=>t.SOURCE_REF===e.SOURCE_REF)),(0,g.Q)(s)).subscribe({next:e=>{t.next(e)},error:e=>{t.error(e)},complete:()=>{t.complete()}}),()=>{s.complete(),this.sendDataLogoff(e.SOURCE_REF),this.removeMessageHandler(e.SOURCE_REF),i&&i()}}))}sendForStreamWithoutTeardown(e,t,s){if(!this.isConnected)return(0,E.$)((()=>new Error("WebSocket connection is closed")));const i=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,R.v.info,i),this.setMessageHandler(e,t,s,!0),this.websocket.next(e),this.wsMessages.pipe((0,m.p)((t=>t.SOURCE_REF===e.SOURCE_REF)))}setMessageHandler(e,t,s,i=!1){const r=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,R.v.debug,r),this.wsMessageHandlers.set(e.SOURCE_REF,new w(e,t,s,i))}sendDataLogoff(e){this.send(this.messageBuilder.createDataLogoffMessage(e),!1)}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const s=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,R.v.debug,s),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,s){switch(e){case A.Gp.DATA_LOGOFF:t(s);break;case A.Go.HEARTBEAT_PING:case A.Go.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(s);break;default:this.messageLoggingIsEnabled&&t(s)}}};(0,i.__decorate)([c.observable],y.prototype,"websocket",void 0),(0,i.__decorate)([c.observable],y.prototype,"wsMessages",void 0),(0,i.__decorate)([c.observable],y.prototype,"wsMessageHandlers",void 0),(0,i.__decorate)([c.observable],y.prototype,"heartbeatIsEnabled",void 0),y=(0,i.__decorate)([(0,i.__param)(0,A.lT),(0,i.__param)(1,T.N),(0,i.__param)(2,o.b_),(0,i.__param)(3,a.k),(0,i.__param)(4,N.S5),(0,i.__param)(5,r.KJ),(0,i.__param)(6,O.R)],y);const D=d.DI.createInterface((e=>e.singleton(y)));function P(){return d.DI.getOrCreateDOMContainer().get(D)}},5709:(e,t,s)=>{s.d(t,{S5:()=>d});var i=s(8202),r=s(92277),n=s(57418),o=s(34387),a=s(97156);class c{constructor(){this.isConfigured=!1,this.isConnecting=!1,this.isConnected=!1,this.isReconnecting=!1,this.reconnectionLimitReached=!1,this.isConnectedSubject=new a.t(this.isConnected)}get hasValidSession(){return this.user.isAuthenticated}get isDisconnected(){return!this.isConnected}get isDisconnectedByServer(){return void 0!==this.closedClean&&!this.closedClean}isConnectedChanged(){var e;this.isConnected&&this.resetClosedState(),this.isConnecting=!1,this.isReconnecting=!1,null===(e=this.isConnectedSubject)||void 0===e||e.next(this.isConnected)}isReconnectingChanged(){this.isReconnecting&&(this.reconnectionLimitReached=!1)}resetClosedState(){this.closedCode=void 0,this.closedReason=void 0,this.closedClean=void 0}serialize(){return{isConfigured:this.isConfigured,isConnecting:this.isConnecting,isConnected:this.isConnected,isDisconnected:this.isDisconnected,isDisconnectedByServer:this.isDisconnectedByServer,isReconnecting:this.isReconnecting,reconnectionLimitReached:this.reconnectionLimitReached,hasValidSession:this.hasValidSession,closedCode:this.closedCode,closedReason:this.closedReason,closedClean:this.closedClean}}onClose(e){this.isConnected=!1,this.closedCode=e.code,this.closedReason=e.reason,this.closedClean=e.wasClean}}(0,i.__decorate)([n.observable],c.prototype,"isConfigured",void 0),(0,i.__decorate)([n.observable],c.prototype,"isConnecting",void 0),(0,i.__decorate)([n.observable],c.prototype,"isConnected",void 0),(0,i.__decorate)([n.observable],c.prototype,"isReconnecting",void 0),(0,i.__decorate)([n.observable],c.prototype,"reconnectionLimitReached",void 0),(0,i.__decorate)([n.observable],c.prototype,"closedCode",void 0),(0,i.__decorate)([n.observable],c.prototype,"closedReason",void 0),(0,i.__decorate)([n.observable],c.prototype,"closedClean",void 0),(0,i.__decorate)([r.KJ],c.prototype,"user",void 0);const d=o.DI.createInterface((e=>e.singleton(c)))},34193:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(17465);function r(e,t="ROW_REF"){const s=e=>{const s=Object.assign(Object.assign({},e),{[t]:e.DETAILS[t]});return delete s.DETAILS,s},r=[],n=[],o=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":r.push(s(t));break;case"MODIFY":o.push(s(t));break;case"DELETE":n.push(s(t));break;default:i.v.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:r,deletes:n,updates:o,SOURCE_REF:e.SOURCE_REF}}},6884:(e,t,s)=>{s.d(t,{aB:()=>a,OD:()=>n});var i=s(34387);var r=s(34193);class n{}n.MAX_ROWS_250=250,n.MAX_VIEW_1000=1e3,n.REQ_REP_POLLING_INTERVAL_MS=1e4,n.DATASERVER_ROW_ID="ROW_REF",n.REQUEST_SERVER_ROW_ID="RECORD_ID";const o={options:{criteria:"",isSnapshot:!1,maxRows:n.MAX_ROWS_250,maxView:n.MAX_VIEW_1000,pollingInterval:n.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1},criteriaToFields:function(e){const t=e.split("&&").map((e=>e.trim())),s={};return t.forEach((e=>{if(e.startsWith("Expr"))switch(e.match(/Expr\.(\w+)\(/)[1]){case"dateIsToday":{const t=/Expr\.dateIsToday\((\w+)\)/,[,i]=e.match(t),r=new Date;s[`${i}_FROM`]=`${r.toISOString().replace(/-/g,"").split("T")[0]}-00:00`,r.setDate(r.getDate()+1),s[`${i}_TO`]=`${r.toISOString().replace(/-/g,"").split("T")[0]}-00:00`}break;case"dateTimeIsGreaterEqual":{const t=/Expr\.dateTimeIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_FROM`]=r}break;case"dateTimeIsLessEqual":{const t=/Expr\.dateTimeIsLessEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_TO`]=r}break;case"containsIgnoreCase":{const t=/Expr\.containsIgnoreCase\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[i]=`*${r}*`}}else{const t=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),i=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");s[t]=i}})),s},dataServerResultFilter:r.d},a=i.DI.createInterface((e=>e.instance(o)))},9033:(e,t,s)=>{s.d(t,{yW:()=>f});var i=s(8202),r=s(57418),n=s(34387),o=s(51046),a=s(8790),c=s(1762),d=s(84190),h=s(66640),u=s(40113),l=s(43543),E=s(48707),g=s(17465),v=s(79780);const S={throwWhenUnavailable:!0,throwWhenUnknown:!1},_=n.DI.createInterface((e=>e.instance(S))),m=(0,v.Es)("genesis-resources");let p=class{constructor(e,t){this.connect=e,this.config=t}isValidResource(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!(e=null==e?void 0:e.trim()))return!1;yield this.getResources();return!!this.resources.find((t=>t.RESOURCE_NAME===e))}))}getResourceTypeFor(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){yield this.getResources();const t=this.resources.find((t=>t.RESOURCE_NAME===e));if(t)return t.RESOURCE_TYPE;const s=`${e} resource does not exist.`;if(g.v.error(s),this.config.throwWhenUnknown)throw new Error(s)}))}destroy(){this.resources=void 0,this.resourcesPromise=void 0}getResources(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(this.resourcesPromise)yield this.resourcesPromise;else{this.resourcesPromise=this.connect.getAvailableResources();const t=yield this.resourcesPromise;if(this.resources=null==t?void 0:t.RESOURCES,!(null===(e=this.resources)||void 0===e?void 0:e.length)){const e="Genesis resources unavailable.";if(g.v.error(e),this.config.throwWhenUnavailable)throw new Error(e)}this.postLoadedMessage(),this.resourcesPromise=void 0}}))}postLoadedMessage(){const e=n.DI.getOrCreateDOMContainer().get(m);e.postMessage("resources-loaded",this.resources),e.close()}};p=(0,i.__decorate)([(0,i.__param)(0,l.dm),(0,i.__param)(1,_)],p);const T=n.DI.createInterface((e=>e.singleton(p)));var R=s(6884),O=s(39087);let A=class{get initialized(){var e;return!!(null===(e=this.status)||void 0===e?void 0:e.isInitialized)}constructor(e,t,s,i){this.connect=e,this.auth=t,this.resources=s,this.config=i,this.fetchMetadataRequired=!0,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.availableIndexes=[],this.readOnly=!0}validResourceName(e){return g.v.deprecated("Datasource.validResourceName","Use `GenesisResources.isValidResource` instead."),!!e&&!!e.trim().length}init(e,t=this.fetchMetadataRequired){return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.fetchMetadataRequired=t,this.options=Object.assign(Object.assign({},this.config.options),e);const s=this.options.resourceName;if(!(this.connect.isConnected||(yield this.connect.connect())))return g.v.error(`Unable to connect to ${this.connect.host} to get ${s} datasource`),this.reportStatus(),!1;return(yield this.resources.isValidResource(s))?(this.resourceType=yield this.resources.getResourceTypeFor(s),this.resourceType?(g.v.debug(`Initializing ${s} datasource from ${this.connect.host}`),this.options.isSnapshot||(this.stream=yield this.createStream()),this.fetchMetadataRequired&&(yield this.fetchAndApplyMetadata(this.options.resourceName)),g.v.debug(`${s} datasource initialization ${this.initialized?"success":"failed"}`),this.reportStatus(),this.initialized):(g.v.error(`Unable to get the resource type for ${s} datasource from ${this.connect.host}`),this.reportStatus(),!1)):(g.v.error(`${s} datasource does not exist on ${this.connect.host}`),this.reportStatus(),!1)}))}deinit(){var e;g.v.debug("Datasource.deinit",null===(e=this.options)||void 0===e?void 0:e.resourceName),this.status=void 0,this.fetchMetadataRequired=void 0,this.options={},this.resourceType=void 0,this.availableIndexes=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[]}destroy(){var e;g.v.debug("Datasource.destroy",null===(e=this.options)||void 0===e?void 0:e.resourceName),this.deinit(),delete this.stream,this.status=void 0}get params(){var e;const t={CRITERIA_MATCH:this.options.criteria,FIELDS:this.options.fields,MAX_ROWS:this.options.maxRows,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,POLLING_INTERVAL:this.options.pollingInterval,DISABLE_POLLING:this.options.disablePolling,REQUEST:this.options.request,REVERSE:this.options.reverse};if(this.options.orderBy)if((null===(e=this.availableIndexes)||void 0===e?void 0:e.findIndex((e=>e.NAME===this.options.orderBy)))>-1)t.ORDER_BY=this.options.orderBy;else{const e=this.availableIndexes.map((e=>e.NAME));g.v.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return g.v.debug("Getting configured params:",t),t}snapshot(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){switch(g.v.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case O.v.DATASERVER:return this.connect.snapshot(this.options.resourceName,this.params);case O.v.REQUEST_SERVER:{const t=this.params,{REQUEST:s,CRITERIA_MATCH:r}=t,n={DETAILS:(0,i.__rest)(t,["REQUEST","CRITERIA_MATCH"]),REQUEST:Object.assign(Object.assign(Object.assign({},Object.fromEntries(this.requestFields.map((e=>[e.NAME,"*"])))),this.params.REQUEST),(null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.criteria)?this.config.criteriaToFields(this.options.criteria):{})};return this.connect.request(this.options.resourceName,n)}default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}}))}snapshotFiltered(e="ROW_REF"){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0}))}createStream(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(![O.v.DATASERVER,O.v.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===O.v.DATASERVER?this.createDataserverStream():(g.v.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())}))}createDataserverStream(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.connect.stream(this.options.resourceName,(e=>{}),(e=>g.v.error(e)),this.params)}))}createReqRepStream(){return(0,o.O)(0,this.params.DISABLE_POLLING?void 0:this.params.POLLING_INTERVAL).pipe((0,d.n)((()=>(0,a.z)([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe((0,h.v)((()=>this.connect.isConnected&&this.auth.isLoggedIn)),(0,d.n)((()=>(0,c.H)(this.snapshot())))))))}fetchAndApplyMetadata(e){var t,s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){try{g.v.debug(`Requesting metadata for ${this.options.resourceName} Datasource`);const e=yield this.connect.getMetadata(this.options.resourceName);e&&(this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.originalFieldDef=(0,E.a)(e),this.fieldMetadata=(0,E.X)(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.fetchMetadataRequired=!1),this.status=this.normaliseStatus({isInitialized:!0,metadataRequired:!0,hasMetadata:(null===(s=this.fieldMetadata)||void 0===s?void 0:s.length)>0})}catch(t){g.v.error(`Metadata Fetch failed for ${e}:`,t),this.status=this.normaliseStatus({isInitialized:!1,metadataRequired:!0,hasMetadata:!1})}}))}reportStatus(e={}){var t;const s=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseStatus(e),g.v.debug(`Dispatching '${O.w}'`,this.status),null==s||s.dispatchEvent(new CustomEvent(O.w,{detail:this.status,bubbles:s!==document,composed:!0}))}normaliseStatus(e){var t,s,i,r,n;const o=null!==(t=e.isInitialized)&&void 0!==t?t:this.initialized,a=null!==(s=e.metadataRequired)&&void 0!==s?s:this.fetchMetadataRequired,c=null!==(i=e.hasMetadata)&&void 0!==i?i:(null===(r=this.fieldMetadata)||void 0===r?void 0:r.length)>0;return{name:null===(n=this.options)||void 0===n?void 0:n.resourceName,type:this.resourceType,isInitialized:o,metadataRequired:a,hasMetadata:c}}};(0,i.__decorate)([r.observable],A.prototype,"status",void 0),(0,i.__decorate)([r.observable],A.prototype,"fetchMetadataRequired",void 0),(0,i.__decorate)([r.observable],A.prototype,"originalFieldDef",void 0),(0,i.__decorate)([r.observable],A.prototype,"fieldMetadata",void 0),(0,i.__decorate)([r.observable],A.prototype,"requestFields",void 0),(0,i.__decorate)([r.observable],A.prototype,"availableIndexes",void 0),(0,i.__decorate)([r.observable],A.prototype,"readOnly",void 0),(0,i.__decorate)([r.observable],A.prototype,"stream",void 0),A=(0,i.__decorate)([(0,i.__param)(0,l.dm),(0,i.__param)(1,u.N),(0,i.__param)(2,T),(0,i.__param)(3,R.aB)],A);const f=n.DI.createInterface((e=>e.transient(A)))},40370:(e,t,s)=>{s.d(t,{C:()=>a});var i=s(8202),r=s(57418),n=s(17465),o=s(39087);const a=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;this.resourceName||n.v.warn("Target classes must have a resourceName property to use the DatasourceEventHandler mixin.");const s=e.detail;if(s.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==s.isInitialized||s.metadataRequired&&e.hasMetadata!==s.hasMetadata)&&(this.datasourceStatus=s)}})}datasourceStatusChanged(e,t){n.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(o.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(o.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,i.__decorate)([r.observable],t.prototype,"datasourceStatus",void 0),t}},39087:(e,t,s)=>{var i;s.d(t,{v:()=>i,w:()=>r}),function(e){e.DATASERVER="DATASERVER",e.EVENT_HANDLER="EVENT_HANDLER",e.REQUEST_SERVER="REQUEST_SERVER"}(i||(i={}));const r="datasource-status-changed"},96730:(e,t,s)=>{function i(e,t=";"){return e?e.split(t).map((e=>e.trim())).sort(((e,t)=>e.localeCompare(t))).join(t):e}s.d(t,{Q:()=>i})},41119:(e,t,s)=>{var i;s.d(t,{v:()=>r,w:()=>i}),function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.ENUM="ENUM",e.DATE="DATE",e.DATETIME="DATETIME",e.CUSTOM="CUSTOM"}(i||(i={}));const r={STRING:i.STRING,ENUM:i.ENUM,BOOLEAN:i.BOOLEAN,INT:i.NUMBER,LONG:i.NUMBER,DOUBLE:i.NUMBER,BIGDECIMAL:i.NUMBER,DATE:i.DATE,DATETIME:i.DATETIME}},48707:(e,t,s)=>{s.d(t,{X:()=>o,a:()=>a});var i=s(39087),r=s(17465),n=s(41119);const o=e=>e?e.map((e=>{const t={name:e.NAME,type:n.v[e.TYPE]||n.w.STRING};if(e.TYPE===n.w.ENUM&&e.VALID_VALUES)try{t.enumOptions=Array.isArray(e.VALID_VALUES)?e.VALID_VALUES:e.VALID_VALUES.split("|")}catch(e){r.v.error(e),t.enumOptions=[]}return t})):null,a=e=>{const t=null==e?void 0:e.TYPE;if(t===i.v.DATASERVER)return e.FIELD||[];if(t===i.v.REQUEST_SERVER)return e.REPLY_FIELD||[];throw new Error(`Unsupported resource type: ${t}`)}},98316:(e,t,s)=>{s.d(t,{N:()=>n});var i=s(34387);class r{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e))),this.removeLocalStorageItem("refreshToken")}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){var t;this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID),(null===(t=e.DETAILS)||void 0===t?void 0:t.MFA_CODE)&&this.setSessionStorageItem("mfaToken",e.DETAILS.MFA_CODE)}captureReturnUrl(){const{pathname:e,search:t,hash:s}=location;if("/login"===e)return;const i=`${"/"!==e?e:""}`;this.returnUrl=`${i}${t}${s}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,s){"local"===s?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const n=i.DI.createInterface((e=>e.singleton(r)))},17465:(e,t,s)=>{s.d(t,{v:()=>r});var i=s(10281);const r=(0,i.createLogger)("foundation-comms")},92277:(e,t,s)=>{s.d(t,{KJ:()=>E});var i=s(84225),r=s(17190),n=s(57418),o=s(34387),a=s(79780);const c=(0,s(10281).createLogger)("foundation-user"),d={trackActionExclusions:[],trackPathExclusions:[""],setUser(e,t){if(e.isAuthenticated)throw new Error("User already set. If this is intentional, please call User.unset first.");return c.debug("setUser",t),e.rawProperties=structuredClone(t),e.userKVs=t.userKVs,e.details=t.details,e.permission=t.permission,e.profile=t.profile,e.sourceRef=t.sourceRef,e.userName=t.userName,e.isAuthenticated=!0,e},unsetUser:e=>(c.debug("unsetUser"),e.rawProperties=void 0,e.userKVs=void 0,e.details=void 0,e.permission=void 0,e.profile=void 0,e.sourceRef=void 0,e.userName=void 0,e.isAuthenticated=!1,e)},h=o.DI.createInterface((e=>e.instance(d))),u=(0,a.Es)("genesis-user");class l{constructor(){this.pathHistory=[],this.actionHistory=[],this.isAuthenticated=!1,this.authenticationChangeListeners=(0,r.r)()}set(e){return this.config.setUser(this,e)}unset(){return this.config.unsetUser(this)}get isAnonymous(){return!this.isAuthenticated}isAdmin(){return this.hasProfile("ADMIN")}isBanned(){return this.hasProfile("BANNED")}hasPermission(e){return this.hasKey(this.permission,e)}hasProfile(e){return this.hasKey(this.profile,e)}trackPath(){const{pathname:e,search:t,hash:s}=location,i=`${`${"/"!==e?e:""}`}${t}${s}`;if(!this.config.trackPathExclusions.includes(i))return this.pathHistory.push(i),i}clearPaths(){this.pathHistory=[]}lastPath(){const e=this.pathHistory.length;return e>0?this.pathHistory[e-1]:void 0}trackAction(e){this.config.trackActionExclusions.includes(e)||this.actionHistory.push(e)}clearActions(){this.actionHistory=[]}lastAction(){const e=this.actionHistory.length;return e>0?this.actionHistory[e-1]:void 0}clearTrackingHistory(){this.clearPaths(),this.clearActions()}hasKey(e,t){return!!(e&&e.length&&t)&&(Array.isArray(t)||(t=[t]),t.some((t=>e.includes(t))))}addAuthenticationChangeListener(e){var t;return null===(t=this.authenticationChangeListeners)||void 0===t?void 0:t.subscribe(e)}isAuthenticatedChanged(){var e;null===(e=this.authenticationChangeListeners)||void 0===e||e.publish(new CustomEvent("user-authentication-change",{detail:this.isAuthenticated}));const t=o.DI.getOrCreateDOMContainer().get(u);t.postMessage("user-authentication-change",this.isAuthenticated),t.close()}userNameChanged(){n.Observable.notify(this,"username")}get username(){return n.Observable.track(this,"username"),this.userName}permissionChanged(){n.Observable.notify(this,"permissions")}get permissions(){return n.Observable.track(this,"permissions"),this.permission}profileChanged(){n.Observable.notify(this,"profiles")}get profiles(){return n.Observable.track(this,"profiles"),this.profile}hasAdminProfile(){return this.isAdmin()}}(0,i.__decorate)([h],l.prototype,"config",void 0),(0,i.__decorate)([n.observable],l.prototype,"pathHistory",void 0),(0,i.__decorate)([n.observable],l.prototype,"actionHistory",void 0),(0,i.__decorate)([n.observable],l.prototype,"isAuthenticated",void 0),(0,i.__decorate)([n.observable],l.prototype,"userKVs",void 0),(0,i.__decorate)([n.observable],l.prototype,"details",void 0),(0,i.__decorate)([n.observable],l.prototype,"permission",void 0),(0,i.__decorate)([n.observable],l.prototype,"profile",void 0),(0,i.__decorate)([n.observable],l.prototype,"sourceRef",void 0),(0,i.__decorate)([n.observable],l.prototype,"userName",void 0),(0,i.__decorate)([n.observable],l.prototype,"rawProperties",void 0);const E=o.DI.createInterface((e=>e.singleton(l)))},40729:(e,t,s)=>{s.d(t,{O:()=>d});var i=s(57418);const r=new Map([["FAST-TEXT-AREA","input"],["FAST-TEXT-FIELD","input"],["FOUNDATION-TEXT-AREA","input"],["FOUNDATION-TEXT-FIELD","input"],["INPUT","input"],["ZERO-TEXT-FIELD","input"]]);function n(e){this.keyAttr||(this.target[this.targetName]=e)}function o(e,t){this.keyAttr&&(this.updateTarget=n),this.originalBind.call(this,e,t),this.target.addEventListener(this.changeEvent,this.changeHandler)}function a(){this.originalUnbind.call(this),this.target.removeEventListener(this.changeEvent,this.changeHandler)}class c extends i.HTMLBindingDirective{constructor(e,t,s,i){super(e),this.keyAttr=i,this.conversionType=t,this.eventName=s}createBehavior(e){const t=super.createBehavior(e);return t.originalBind=t.bind,t.originalUnbind=t.unbind,t.keyAttr=this.keyAttr,t.bind=o,t.unbind=a,t.changeEvent=function(e,t){var s;const i=e.tagName;return"default"===t?null!==(s=r.get(i))&&void 0!==s?s:"change":t}(e,this.eventName),t.changeHandler=()=>{const e="boolean"===this.conversionType?t.target.checked:t.target.value;if(this.keyAttr){const s=t.bindingObserver.last,i=t.target[this.keyAttr];s.propertySource[s.propertyName][i]=this.convert(e)}else{const s=t.bindingObserver.last;s.propertySource[s.propertyName]=this.convert(e)}},t}convert(e){if(null==e)return e;switch(this.conversionType){case"time":const t=new Date(e).getTime();return isNaN(t)?void 0:t;case"number":return e.length?Number(e):void 0;case"string":return String(e);case"boolean":return Boolean(e);default:return e}}}function d(e,t="string",s="default",i){return new c(e,t,s,i)}},70997:(e,t,s)=>{function i(e,t,s){const i=e=>"function"==typeof e?e:()=>e,r=i(t),n=i(s);return(t,s)=>e(t,s)?r(t,s):n(t,s)}s.d(t,{q:()=>i})},84686:(e,t,s)=>{s.d(t,{PF:()=>i,vN:()=>n});let i,r="gwf";try{"undefined"!=typeof SOCKET_EXT&&(r=SOCKET_EXT)}catch(e){}try{i=FORCE_HTTP}catch(e){}const n=`${location.protocol.replace("http","ws")}//${location.host}/${r}/`;"true"===i?location.protocol:location.protocol.replace("http","ws");let o,a,c,d,h=null;try{"undefined"!=typeof API_HOST&&(h=API_HOST)}catch(e){}try{o=""}catch(e){}try{a=DEFAULT_ORGANISATION}catch(e){}try{c=DEFAULT_PASSWORD}catch(e){}try{d=DEFAULT_USER}catch(e){}},12066:(e,t,s)=>{s.d(t,{CL:()=>r,zT:()=>o});const i=10;function r(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,i)}const n=19;function o(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,n).replace("T"," ")}},17190:(e,t,s)=>{s.d(t,{j:()=>r,r:()=>i});const i=()=>{let e=[];return{subscribe:t=>(e.push(t),()=>e=e.filter((e=>e!==t))),publish(t){e.forEach((e=>e(t)))}}},r=(e,t)=>{const s={root:document.documentElement};new IntersectionObserver((e=>{e.forEach((e=>{t(e.intersectionRatio>0)}))}),s).observe(e)}},49229:(e,t,s)=>{s.d(t,{b_:()=>h});var i=s(17914),r=s(34387),n=s(61455);const o=r.DI.createInterface();function a(e){return Number.isSafeInteger(+e)?Number(e):(0,n.Fq)(e)?BigInt.asIntN(64,e):parseFloat(e)}const c={parse:e=>(0,n.qg)(e,null,a),stringify:e=>(0,n.As)(e)};let d=class{constructor(e=c){this.config=e,this.serialize=e=>this.config.stringify(e)}deserialize(e){return e?"string"==typeof e?this.config.parse(e):e&&e.ok?e.text().then((e=>this.config.parse(e))):(e&&e.data&&(e=e.data),this.config.parse(e)):Promise.resolve({})}};d=(0,i.__decorate)([(0,i.__param)(0,(0,r.optional)(o))],d);const h=r.DI.createInterface((e=>e.singleton(d)))},21530:(e,t,s)=>{s.d(t,{O:()=>r});var i=s(28745);const r=(e,t)=>{var s;let r=document.getElementById(t);if(r)return void i.v.debug(`\n An element with the id of '${t}' already exists and likely has the css rules applied.\n `);const n=null!==(s=document.head)&&void 0!==s?s:document.getElementsByTagName("head")[0];r=document.createElement("style"),r.id=t,n.appendChild(r);const o=r.sheet.insertRule(e);return()=>{r&&(r.sheet.deleteRule(o),n.removeChild(r))}}},80273:(e,t,s)=>{s.d(t,{Du:()=>c,IT:()=>o,WP:()=>r,f4:()=>a,zz:()=>n});var i=s(21530);const r=(e,t)=>{(0,i.O)(e,t)};var n,o;!function(e){e.Italic="italic",e.Normal="normal"}(n||(n={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(o||(o={}));const a=(e,t=n.Normal,s=o.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${s};\n`,c={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}},28745:(e,t,s)=>{s.d(t,{v:()=>r});var i=s(10281);const r=(0,i.createLogger)("foundation-utils")},32808:(e,t,s)=>{s.d(t,{k:()=>c});var i=s(17914),r=s(34387),n=s(31261),o=s(28745);class a{constructor(){}createId(e=!1){const t=(0,n.A)();return e&&o.v.debug(`UUID.createID ${t}`),t}createRemoteId(e=!1){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=(0,n.A)();return e&&o.v.debug(`UUID.createRemoteID ${t}`),t}))}}const c=r.DI.createInterface((e=>e.singleton(a)))}}]);
|
|
2
|
+
//# sourceMappingURL=698.ec949aaccbe09a8fa565ef1bab946487.js.map
|