@pega/constellationjs 0.25.1 → 0.26.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/README.md +6 -3
- package/dist/bootstrap-shell.js +1 -1
- package/dist/bootstrap-shell.js.br +0 -0
- package/dist/bootstrap-shell.js.gz +0 -0
- package/dist/constellation-core-react-native.js +2 -0
- package/dist/constellation-core-react-native.js.br +0 -0
- package/dist/constellation-core-react-native.js.gz +0 -0
- package/dist/constellation-core-react-native.js.map +1 -0
- package/dist/constellation-core-web.js +1 -1
- package/dist/constellation-core-web.js.LICENSE.txt +124 -0
- package/dist/constellation-core-web.js.br +0 -0
- package/dist/constellation-core-web.js.gz +0 -0
- package/dist/constellation-core-web.js.map +1 -1
- package/dist/constellation-core.c9cf42c5.js +2 -0
- package/dist/constellation-core.c9cf42c5.js.LICENSE.txt +124 -0
- package/dist/constellation-core.c9cf42c5.js.br +0 -0
- package/dist/constellation-core.c9cf42c5.js.gz +0 -0
- package/dist/constellation-core.c9cf42c5.js.map +1 -0
- package/dist/constellation-core.json +1 -1
- package/dist/js/libphonenumber-web.js +1 -1
- package/dist/js/libphonenumber-web.js.br +0 -0
- package/dist/js/libphonenumber-web.js.gz +0 -0
- package/dist/js/libphonenumber-web.js.map +1 -1
- package/dist/js/libphonenumber.a5a4a2d2.js +2 -0
- package/dist/js/libphonenumber.a5a4a2d2.js.br +0 -0
- package/dist/js/libphonenumber.a5a4a2d2.js.gz +0 -0
- package/dist/js/libphonenumber.a5a4a2d2.js.map +1 -0
- package/dist/lib_asset.json +1 -1
- package/package.json +1 -1
- package/dist/constellation-core.31733a3d.js +0 -2
- package/dist/constellation-core.31733a3d.js.br +0 -0
- package/dist/constellation-core.31733a3d.js.gz +0 -0
- package/dist/constellation-core.31733a3d.js.map +0 -1
- package/dist/js/libphonenumber.1e95a712.js +0 -2
- package/dist/js/libphonenumber.1e95a712.js.br +0 -0
- package/dist/js/libphonenumber.1e95a712.js.gz +0 -0
- package/dist/js/libphonenumber.1e95a712.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var e,t,n={631:(e,t,n)=>{var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var s=e.length,a=n+(r?1:-1);for(;r?a--:++a<s;)if(t(e[a],a,e))return a;return-1}(e,f,n);var r=n-1,s=e.length;for(;++r<s;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,s=e?e.length:0;++r<s;)if(n(t,e[r]))return!0;return!1}function g(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function f(e){return e!=e}function m(e,t){return e.has(t)}var I,y=Array.prototype,E=Function.prototype,A=Object.prototype,_=d["__core-js_shared__"],C=(I=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",S=E.toString,T=A.hasOwnProperty,N=A.toString,O=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=d.Symbol,D=A.propertyIsEnumerable,R=y.splice,b=P?P.isConcatSpreadable:void 0,v=Math.max,x=G(d,"Map"),w=G(Object,"create");function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.__data__=new F;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function V(e,t,n,r){var s,a=-1,o=p,i=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}(t,(s=n,function(e){return s(e)}))),r?(o=h,i=!1):t.length>=200&&(o=m,i=!1,t=new U(t));e:for(;++a<c;){var d=e[a],g=n?n(d):d;if(d=r||0!==d?d:0,i&&g==g){for(var f=u;f--;)if(t[f]===g)continue e;l.push(d)}else o(t,g,r)||l.push(d)}return l}function k(e,t,n,r,s){var a=-1,o=e.length;for(n||(n=W),s||(s=[]);++a<o;){var i=e[a];t>0&&n(i)?t>1?k(i,t-1,n,r,s):g(s,i):r||(s[s.length]=i)}return s}function $(e){if(!Q(e)||(t=e,C&&C in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:c;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $(n)?n:void 0}function W(e){return Y(e)||function(e){return J(e)&&T.call(e,"callee")&&(!D.call(e,"callee")||N.call(e)==a)}(e)||!!(b&&e&&e[b])}M.prototype.clear=function(){this.__data__=w?w(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return j(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new(x||L),string:new M}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this},U.prototype.add=U.prototype.push=function(e){return this.__data__.set(e,r),this},U.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return J(e)?V(e,k(t,1,J,!0)):[]},q=v(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=v(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var s=Array(q+1);++t<q;)s[t]=e[t];return s[q]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(H,this,s)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&!X(e)}function J(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function X(e){var t=Q(e)?N.call(e):"";return t==o||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},188:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var I,y=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],C=(I=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",S=E.toString,T=A.hasOwnProperty,N=A.toString,O=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,D=y.splice,R=k(m,"Map"),b=k(Object,"create"),v=P?P.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function U(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:$(n);for(var r=0,s=t.length;null!=e&&r<s;)e=e[B(t[r++])];return r&&r==s?e:void 0}function j(e){if(!H(e)||(t=e,C&&C in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}w.prototype.clear=function(){this.__data__=b?b(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return F(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(R||M),string:new w}},L.prototype.delete=function(e){return V(this,e).delete(e)},L.prototype.get=function(e){return V(this,e).get(e)},L.prototype.has=function(e){return V(this,e).has(e)},L.prototype.set=function(e,t){return V(this,e).set(e,t),this};var $=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(G.Cache||L),n}G.Cache=L;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:U(e,t);return void 0===r?n:r}},928:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,I="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,E=I||y||Function("return this")();var A,_=Array.prototype,C=Function.prototype,S=Object.prototype,T=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",O=C.toString,P=S.hasOwnProperty,D=S.toString,R=RegExp("^"+O.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=E.Symbol,v=S.propertyIsEnumerable,x=_.splice,w=W(E,"Map"),M=W(Object,"create"),L=b?b.prototype:void 0,F=L?L.toString:void 0;function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function $(e,t){return null!=e&&P.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:f;return n.test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return d.test(e)||!u.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var s,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(s=null!=e&&n(e,l)))break;e=e[l]}return s||!!(c=e?e.length:0)&&X(c)&&function(e,t){return t=null==t?a:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&X(e.length)&&!J(e)}(e)}(e)&&P.call(e,"callee")&&(!v.call(e,"callee")||D.call(e)==o)}(e))}U.prototype.clear=function(){this.__data__=M?M(null):{}},U.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},U.prototype.get=function(e){var t=this.__data__;if(M){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return M?void 0!==t[e]:P.call(t,e)},U.prototype.set=function(e,t){return this.__data__[e]=M&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():x.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},V.prototype.clear=function(){this.__data__={hash:new U,map:new(w||j),string:new U}},V.prototype.delete=function(e){return G(this,e).delete(e)},V.prototype.get=function(e){return G(this,e).get(e)},V.prototype.has=function(e){return G(this,e).has(e)},V.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,s){n.push(r?s.replace(g,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(Y.Cache||V),n}Y.Cache=V;var K=Array.isArray;function J(e){var t=Q(e)?D.call(e):"";return t==i||t==c}function X(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&D.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,$)}},529:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,s="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",d="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=t&&!t.nodeType&&t,I=m&&e&&!e.nodeType&&e,y=I&&I.exports===m;var E,A,_,C=Function.prototype,S=Object.prototype,T=f["__core-js_shared__"],N=(E=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",O=C.toString,P=S.hasOwnProperty,D=S.toString,R=RegExp("^"+O.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=y?f.Buffer:void 0,v=S.propertyIsEnumerable,x=b?b.isBuffer:void 0,w=(A=Object.keys,_=Object,function(e){return A(_(e))}),M=q(f,"DataView"),L=q(f,"Map"),F=q(f,"Promise"),U=q(f,"Set"),j=q(f,"WeakMap"),V=!v.call({valueOf:1},"valueOf"),k=Y(M),$=Y(L),B=Y(F),G=Y(U),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return D.call(e)};function Y(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&X(e)}(e)&&P.call(e,"callee")&&(!v.call(e,"callee")||D.call(e)==s)}(M&&z(new M(new ArrayBuffer(1)))!=d||L&&z(new L)!=i||F&&z(F.resolve())!=c||U&&z(new U)!=l||j&&z(new j)!=u)&&(z=function(e){var t=D.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return d;case $:return i;case B:return c;case G:return l;case W:return u}return t});var J=Array.isArray;function X(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=x||function(){return!1};function Z(e){var t=ee(e)?D.call(e):"";return t==a||t==o}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(X(e)&&(J(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(V||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||S)}(e))return!w(e).length;for(var n in e)if(P.call(e,n))return!1;return!0}},216:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=1,a=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",I="[object Null]",y="[object Object]",E="[object Promise]",A="[object Proxy]",_="[object RegExp]",C="[object Set]",S="[object String]",T="[object Symbol]",N="[object Undefined]",O="[object WeakMap]",P="[object ArrayBuffer]",D="[object DataView]",R=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[i]=v[c]=v[P]=v[u]=v[D]=v[d]=v[p]=v[h]=v[f]=v[m]=v[y]=v[_]=v[C]=v[S]=v[O]=!1;var x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,M=x||w||Function("return this")(),L=t&&!t.nodeType&&t,F=L&&e&&!e.nodeType&&e,U=F&&F.exports===L,j=U&&x.process,V=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=V&&V.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,J=M["__core-js_shared__"],X=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=U?M.Buffer:void 0,re=M.Symbol,se=M.Uint8Array,ae=K.propertyIsEnumerable,oe=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,ue=(H=Object.keys,q=Object,function(e){return H(q(e))}),de=Ve(M,"DataView"),pe=Ve(M,"Map"),he=Ve(M,"Promise"),ge=Ve(M,"Set"),fe=Ve(M,"WeakMap"),me=Ve(Object,"create"),Ie=Ge(de),ye=Ge(pe),Ee=Ge(he),Ae=Ge(ge),_e=Ge(fe),Ce=re?re.prototype:void 0,Se=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}function De(e){var t=this.__data__=new Ne(e);this.size=t.size}function Re(e,t){var n=qe(e),r=!n&&He(e),s=!n&&!r&&ze(e),a=!n&&!r&&!s&&Qe(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function be(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function ve(e){return null==e?void 0===e?N:I:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var s=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return s}(e):function(e){return ee.call(e)}(e)}function xe(e){return Xe(e)&&ve(e)==i}function we(e,t,n,r,o){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,r,o,l){var h=qe(e),g=qe(t),I=h?c:$e(e),E=g?c:$e(t),A=(I=I==i?y:I)==y,N=(E=E==i?y:E)==y,O=I==E;if(O&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(O&&!A)return l||(l=new De),h||Qe(e)?Fe(e,t,n,r,o,l):function(e,t,n,r,o,i,c){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new se(e),new se(t)));case u:case d:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case _:case S:return e==t+"";case f:var l=B;case C:var h=r&s;if(l||(l=G),e.size!=t.size&&!h)return!1;var g=c.get(e);if(g)return g==t;r|=a,c.set(e,t);var I=Fe(l(e),l(t),r,o,i,c);return c.delete(e),I;case T:if(Se)return Se.call(e)==Se.call(t)}return!1}(e,t,I,n,r,o,l);if(!(n&s)){var R=A&&Q.call(e,"__wrapped__"),b=N&&Q.call(t,"__wrapped__");if(R||b){var v=R?e.value():e,x=b?t.value():t;return l||(l=new De),o(v,x,n,r,l)}}if(!O)return!1;return l||(l=new De),function(e,t,n,r,a,o){var i=n&s,c=Ue(e),l=c.length,u=Ue(t),d=u.length;if(l!=d&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var f=!0;o.set(e,t),o.set(t,e);var m=i;for(;++p<l;){var I=e[h=c[p]],y=t[h];if(r)var E=i?r(y,I,h,t,e,o):r(I,y,h,e,t,o);if(!(void 0===E?I===y||a(I,y,n,r,o):E)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var A=e.constructor,_=t.constructor;A==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,l)}(e,t,n,r,we,o))}function Me(e){return!(!Je(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:R).test(Ge(e))}function Le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return ue(e);var t,n,r,s=[];for(var a in Object(e))Q.call(e,a)&&"constructor"!=a&&s.push(a);return s}function Fe(e,t,n,r,o,i){var c=n&s,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var p=-1,h=!0,g=n&a?new Pe:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var f=e[p],m=t[p];if(r)var I=c?r(m,f,p,t,e,i):r(f,m,p,e,t,i);if(void 0!==I){if(I)continue;h=!1;break}if(g){if(!$(t,(function(e,t){if(s=t,!g.has(s)&&(f===e||o(f,e,n,r,i)))return g.push(t);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Ue(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}(r,n(e))}(e,Ze,ke)}function je(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=be(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=be(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return be(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=be(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(pe||Ne),string:new Te}},Oe.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Oe.prototype.get=function(e){return je(this,e).get(e)},Oe.prototype.has=function(e){return je(this,e).has(e)},Oe.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,r),this},Pe.prototype.has=function(e){return this.__data__.has(e)},De.prototype.clear=function(){this.__data__=new Ne,this.size=0},De.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},De.prototype.get=function(e){return this.__data__.get(e)},De.prototype.has=function(e){return this.__data__.has(e)},De.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}(ce(e),(function(t){return ae.call(e,t)})))}:function(){return[]},$e=ve;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||b.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(de&&$e(new de(new ArrayBuffer(1)))!=D||pe&&$e(new pe)!=f||he&&$e(he.resolve())!=E||ge&&$e(new ge)!=C||fe&&$e(new fe)!=O)&&($e=function(e){var t=ve(e),n=t==y?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case Ie:return D;case ye:return f;case Ee:return E;case Ae:return C;case _e:return O}return t});var He=xe(function(){return arguments}())?xe:function(e){return Xe(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Je(e))return!1;var t=ve(e);return t==h||t==g||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Xe(e)&&Ke(e.length)&&!!v[ve(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?Re(e):Le(e);var t}e.exports=function(e,t){return we(e,t)}},692:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[a]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[i]=f["[object Map]"]=f["[object Number]"]=f[u]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,y=m||I||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,_=A&&A.exports===E,C=_&&m.process,S=function(){try{var e=A&&A.require&&A.require("util").types;return e||C&&C.binding&&C.binding("util")}catch(e){}}(),T=S&&S.isTypedArray;var N,O,P,D=Array.prototype,R=Function.prototype,b=Object.prototype,v=y["__core-js_shared__"],x=R.toString,w=b.hasOwnProperty,M=(N=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",L=b.toString,F=x.call(Object),U=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=_?y.Buffer:void 0,V=y.Symbol,k=y.Uint8Array,$=j?j.allocUnsafe:void 0,B=(O=Object.getPrototypeOf,P=Object,function(e){return O(P(e))}),G=Object.create,W=b.propertyIsEnumerable,H=D.splice,q=V?V.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,J=Date.now,X=Ee(y,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!ve(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function se(e,t){var n=Oe(e),r=!n&&Ne(e),s=!n&&!r&&De(e),a=!n&&!r&&!s&&we(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!w.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function ae(e,t,n){(void 0!==n&&!Te(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function oe(e,t,n){var r=e[t];w.call(e,t)&&Te(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:w.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(X||te),string:new ee}},ne.prototype.delete=function(e){var t=ye(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return ye(this,e).get(e)},ne.prototype.has=function(e){return ye(this,e).has(e)},ne.prototype.set=function(e,t){var n=ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,ue=function(e,t,n){for(var r=-1,s=Object(e),a=n(e),o=a.length;o--;){var i=a[le?o:++r];if(!1===t(s[i],i,s))break}return e};function de(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=w.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var s=L.call(e);r&&(t?e[q]=n:delete e[q]);return s}(e):function(e){return L.call(e)}(e)}function pe(e){return xe(e)&&de(e)==a}function he(e){return!(!ve(e)||function(e){return!!M&&M in e}(e))&&(Re(e)?U:h).test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=_e(e),n=[];for(var r in e)("constructor"!=r||!t&&w.call(e,r))&&n.push(r);return n}function fe(e,t,n,r,s){e!==t&&ue(t,(function(a,o){if(s||(s=new re),ve(a))!function(e,t,n,r,s,a,o){var i=Ce(e,n),c=Ce(t,n),l=o.get(c);if(l)return void ae(e,n,l);var d=a?a(i,c,n+"",e,t,o):void 0,p=void 0===d;if(p){var h=Oe(c),g=!h&&De(c),f=!h&&!g&&we(c);d=c,h||g||f?Oe(i)?d=i:xe(A=i)&&Pe(A)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):g?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=$?$(n):new e.constructor(n);return e.copy(r),r}(c,!0)):f?(p=!1,m=c,I=!0?(y=m.buffer,E=new y.constructor(y.byteLength),new k(E).set(new k(y)),E):m.buffer,d=new m.constructor(I,m.byteOffset,m.length)):d=[]:function(e){if(!xe(e)||de(e)!=u)return!1;var t=B(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==F}(c)||Ne(c)?(d=i,Ne(i)?d=function(e){return function(e,t,n,r){var s=!n;n||(n={});var a=-1,o=t.length;for(;++a<o;){var i=t[a],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),s?ce(n,i,c):oe(n,i,c)}return n}(e,Me(e))}(i):ve(i)&&!Re(i)||(d=function(e){return"function"!=typeof e.constructor||_e(e)?{}:Z(B(e))}(c))):p=!1}var m,I,y,E;var A;p&&(o.set(c,d),s(d,c,r,a,o),o.delete(c));ae(e,n,d)}(e,t,o,n,fe,r,s);else{var i=r?r(Ce(e,o),a,o+"",e,t,s):void 0;void 0===i&&(i=a),ae(e,o,i)}}),Me)}function me(e,t){return Se(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=K(r.length-t,0),o=Array(a);++s<a;)o[s]=r[t+s];s=-1;for(var i=Array(t+1);++s<t;)i[s]=r[s];return i[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,t,Ue),e+"")}var Ie=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ue;function ye(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function Ce(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Se=function(e){var t=0,n=0;return function(){var r=J(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Ie);function Te(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return xe(e)&&w.call(e,"callee")&&!W.call(e,"callee")},Oe=Array.isArray;function Pe(e){return null!=e&&be(e.length)&&!Re(e)}var De=Y||function(){return!1};function Re(e){if(!ve(e))return!1;var t=de(e);return t==i||t==c||t==o||t==d}function be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=T?function(e){return function(t){return e(t)}}(T):function(e){return xe(e)&&be(e.length)&&!!f[de(e)]};function Me(e){return Pe(e)?se(e,!0):ge(e)}var Le,Fe=(Le=function(e,t,n,r){fe(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,s=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(s=Le.length>3&&"function"==typeof s?(r--,s):void 0,a&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?Pe(n)&&Ae(t,n.length):"string"==r&&t in n)&&Te(n[t],e)}(t[0],t[1],a)&&(s=r<3?void 0:s,r=1),e=Object(e);++n<r;){var o=t[n];o&&Le(e,o,n,s)}return e})));function Ue(e){return e}e.exports=Fe},835:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,y=m||I||Function("return this")();var E,A=Array.prototype,_=Function.prototype,C=Object.prototype,S=y["__core-js_shared__"],T=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=_.toString,O=C.hasOwnProperty,P=C.toString,D=RegExp("^"+N.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=y.Symbol,b=A.splice,v=G(y,"Map"),x=G(Object,"create"),w=R?R.prototype:void 0,M=w?w.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];O.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function V(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!J(e)||(t=e,T&&T in t))return!1;var t,n=function(e){var t=J(e)?P.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?D:g;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function $(e,t,n,r){if(!J(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||X(e))return!0;return u.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var s=-1,a=t.length,o=a-1,i=e;null!=i&&++s<a;){var c=q(t[s]),d=n;if(s!=o){var p=i[c];void 0===(d=r?r(p,c,i):void 0)&&(d=J(p)?p:W(t[s+1])?[]:{})}j(i,c,d),i=i[c]}return e}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}L.prototype.clear=function(){this.__data__=x?x(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:O.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},F.prototype.clear=function(){this.__data__=[]},F.prototype.delete=function(e){var t=this.__data__,n=V(t,e);return!(n<0)&&(n==t.length-1?t.pop():b.call(t,n,1),!0)},F.prototype.get=function(e){var t=this.__data__,n=V(t,e);return n<0?void 0:t[n][1]},F.prototype.has=function(e){return V(this.__data__,e)>-1},F.prototype.set=function(e,t){var n=this.__data__,r=V(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new L,map:new(v||F),string:new L}},U.prototype.delete=function(e){return B(this,e).delete(e)},U.prototype.get=function(e){return B(this,e).get(e)},U.prototype.has=function(e){return B(this,e).has(e)},U.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(X(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(p,(function(e,t,r,s){n.push(r?s.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||X(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(z.Cache||U),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=U;var K=Array.isArray;function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function X(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&P.call(e)==c}e.exports=function(e,t,n){return null==e?e:$(e,t,n)}},521:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var I,y=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],C=(I=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",S=E.toString,T=A.hasOwnProperty,N=A.toString,O=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.Symbol,D=y.splice,R=$(m,"Map"),b=$(Object,"create"),v=P?P.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function U(e){if(!z(e)||(t=e,C&&C in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:h;return n.test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:V(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r<s;)a[r]=e[r+t];return a}(t,0,-1))}(e,t=B(t,e)?[t]:V(t));var n,r,s=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&T.call(e,s))||delete e[s]}function V(e){return q(e)?e:G(e)}function k(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function $(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return U(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}w.prototype.clear=function(){this.__data__=b?b(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():D.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return F(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(R||M),string:new w}},L.prototype.delete=function(e){return k(this,e).delete(e)},L.prototype.get=function(e){return k(this,e).get(e)},L.prototype.has=function(e){return k(this,e).has(e)},L.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(H.Cache||L),n}H.Cache=L;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},953:e=>{class t{constructor(e,t,n,r,s){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=s,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let a=this.gen_table();this.table=a,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=a[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:s,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+s^e[o])]<<s^t<<8-s&a<<s;t>>=s}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,s=1<<n,a="";for(let o=0;o<r;o++){let r="";for(let a=0;a<s;a++){let s=e[o<<n|a];s="000000000"+s.toString(16),s=s.substr(s.length-t),r+="0x"+s+", "}a+=" "+r+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,s=void 0!==typeof BigInt&&BigInt(256);class a{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%s)),e/=s;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends a{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends a{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const u={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function d(e){}e.exports={CRC:t,crc:function(e,n,r,s,a){let o=new t(e,n,r,s,a);return o.calculate.bind(o)},makeBufferConverter:c,models:u,crc1:d,crc6:d,crc8:d,crc10:d,crc16:d,crc24:d,crc32:d,crc32c:d};for(let t in u){let n=u[t];e.exports[t]=n.calculate.bind(n)}},754:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=754,e.exports=t}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e](a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"js/libphonenumber-web.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",s.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var i,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack",t+a),i.src=n),e[n]=[r];var p=(t,r)=>{i.onerror=i.onload=null,clearTimeout(h);var s=e[n];if(delete e[n],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={388:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise(((n,s)=>r=e[t]=[n,s]));n.push(r[2]=a);var o=s.p+s.u(t),i=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,r[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,i,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(r in i)s.o(i,r)&&(s.m[r]=i[r]);if(c)c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunkconstellation_corejs_library=self.webpackChunkconstellation_corejs_library||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e={};s.r(e),s.d(e,{buildContextName:()=>H,buildModalContext:()=>K,buildTransientContextName:()=>q,getContainerIdFromContext:()=>X,getParentContext:()=>J,getParentContextName:()=>W,getTargetFromContext:()=>Y,getTransientContext:()=>z});var t={};s.r(t),s.d(t,{getResolvedTargetName:()=>Pt,getRoutingInfo:()=>Dt,getSemanticURLFromRoutingInfo:()=>Rt});var n={};s.r(n),s.d(n,{evaluate:()=>an,handleChange:()=>rn,hasDeclareExpression:()=>nn,updateDeclareExpressions:()=>sn});var r={};s.r(r),s.d(r,{hasBrowserEnv:()=>Ar,hasStandardBrowserEnv:()=>Cr,hasStandardBrowserWebWorkerEnv:()=>Sr,navigator:()=>_r,origin:()=>Tr});var a={};s.r(a),s.d(a,{publishExpressions:()=>ki,publishResponse:()=>$i});var o={};s.r(o),s.d(o,{doesRestApiExist:()=>zi,getCancelTokenSource:()=>Yi,getCaseApi:()=>Xi,getHeaderProcessor:()=>Wi,invokeCustomRestApi:()=>qi,invokeRestApi:()=>Hi,isRequestCanceled:()=>Ki,registerInterceptor:()=>Ji});var i={};s.r(i),s.d(i,{fetchViewResources:()=>Td,updateViewResources:()=>Sd});var c={};s.r(c),s.d(c,{CONTAINER_NAMES:()=>Ip,CONTAINER_TYPES:()=>mp,addRootContainerItem:()=>Xp,areContainerItemsPresent:()=>Tp,clearTransientData:()=>rh,closeContainerItem:()=>Jp,getActiveContainerItemContext:()=>Lp,getActiveContainerItemIDFromRoutingInfo:()=>fh,getActiveContainerItemName:()=>vp,getActiveContext:()=>dh,getChildContainerItems:()=>Fp,getChildContainers:()=>Up,getChildContainersContexts:()=>jp,getContainerAPI:()=>oh,getContainerAccessOrder:()=>Sp,getContainerData:()=>Ap,getContainerItemByKey:()=>Dp,getContainerItemData:()=>_p,getContainerItemName:()=>Op,getContainerItems:()=>Cp,getContainerLimit:()=>Gp,getContainerParentContext:()=>gh,getContainerType:()=>bp,getContextByTargetAndKey:()=>hh,getDataContextName:()=>Mp,getFlowContainer:()=>Ih,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Yp,getParentContainerItem:()=>mh,getRootContainerName:()=>uh,getSuggestionContexts:()=>Vp,getTargetFromContainerItemID:()=>Kp,getTransientItems:()=>eh,hasContainerItems:()=>Bp,isContainerDirty:()=>zp,isContainerInitialized:()=>Rp,isContainerItemActive:()=>xp,isContainerItemContextBeingUsedInOtherContainers:()=>Zp,isContainerItemExists:()=>Np,isContainerLimitReached:()=>Hp,isContainerMultipleMode:()=>$p,isContainerSingleMode:()=>kp,purgeTransientData:()=>sh,removeContainer:()=>ih,replaceTransientData:()=>nh,resetContainersPayload:()=>qp,setContainerLimit:()=>Wp,updateCaseContextEtag:()=>lh,updateParentLastUpdateTime:()=>ph,updateRelatedContextEtag:()=>ch,updateTransientData:()=>th});var l={};s.r(l),s.d(l,{getAIAgent:()=>pg,getAdditionalInfo:()=>Ig,getDataPageKeys:()=>gg,getDataPageMetadata:()=>ag,getEmbeddedPropertyMetadata:()=>Qh,getFieldParameters:()=>lg,getFieldsByClassName:()=>cg,getGenAICoach:()=>dg,getInsight:()=>ig,getLocaleUtilsForLanguage:()=>Jh,getLocalizationServiceFromStore:()=>Xh,getLookUpDataPage:()=>fg,getLookUpDataPageInfo:()=>mg,getParagraph:()=>ug,getPersonalizationMetadata:()=>og,getPropertyMetadata:()=>Kh,getResolvedFieldMetadata:()=>yg,getSavableDataPage:()=>hg,isViewExists:()=>rg,mergeStore:()=>Yh,resolveNavigation:()=>sg,resolveView:()=>ng,updateNavigationStore:()=>eg,updateStores:()=>tg,updateViewStore:()=>Zh});var u={};s.r(u),s.d(u,{dispatch:()=>Ng,doesContextExist:()=>Vg,getActionType:()=>xg,getContextValue:()=>bg,getDataObject:()=>Og,getReferenceTokens:()=>Cg,getSharedDataObject:()=>Pg,getStore:()=>Tg,getValue:()=>Rg,isMergeable:()=>Mg,lookupContextValue:()=>vg,mergeDeep:()=>Lg,removeItem:()=>wg,replaceValue:()=>Ug,resetStore:()=>jg,setStore:()=>Sg,updateValue:()=>Fg});var d={};s.r(d),s.d(d,{activateContainerItem:()=>mf,addContainerItem:()=>af,addMessages:()=>If,addSharedData:()=>Pf,addTransientItem:()=>of,addWork:()=>tf,clearTransientData:()=>lf,createWork:()=>Kg,error:()=>Of,finishAssignment:()=>Cf,initContainers:()=>rf,listAction:()=>Rf,loadView:()=>Zg,mergeData:()=>Xg,openAssignment:()=>Sf,openWorkByHandle:()=>nf,postProcess:()=>Nf,purgeTransientData:()=>df,removeAllTransientItems:()=>Ef,removeContainerItem:()=>yf,removeSharedData:()=>Df,removeTransientItem:()=>Af,replaceContainerItem:()=>_f,replaceTransientData:()=>uf,resetContainers:()=>sf,resetLoading:()=>gf,setLoading:()=>hf,setSharedProperty:()=>vf,setStateProperty:()=>xf,showCasePreview:()=>bf,showHarness:()=>Qg,showHistory:()=>Tf,showPage:()=>ef,upMergeAndRemoveContainerItem:()=>ff,updateContainerItem:()=>pf,updateTransientData:()=>cf});var p=s(216),h=s.n(p);let g,f,m;const I=e=>{e&&(g=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},g.BASEURL=e.server,g.ACTIONURL=e["action-end-point"],g.DATAURL=e["data-end-point"],m=e.reAuthUrl)},y=()=>m,E=()=>g.BASEURL,A=e=>fetch(`${g.BASEURL}${g.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),_=e=>{f=e},C=()=>f;var S=s(953),T=s(521),N=s.n(T),O=s(928),P=s.n(O),D=s(188),R=s.n(D),b=s(835),v=s.n(b),x=s(692),w=s.n(x),M=s(529),L=s.n(M);const F=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},U={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails",OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:"SubscriptView"},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_INFO_CLASSNAME:"caseInfo.className",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"}},j={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_DYNAMIC_WHENS:"summary_of_dynamic_whens__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",CUSTOM_ERROR:"custom error",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_ERROR:"onRefreshError",ON_REFRESH_COMPLETE:"onRefreshComplete",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",PARAGRAPH_ANNOTATION:"@PARAGRAPH",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",PY_CONFIRM:"pyConfirm",LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...U,getProperty:e=>F.map(e)},V="pyRemoteCaseDetails";class k{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>Hg.getProperty(".RemoteSystemID",j.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=vh.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const $=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let s=`${t}${j.FORWARD_SLASH_STRING}${e}`;const a=Ap(s);if(a||t!==j.APP.APP&&t!==j.APP.ROOT)if(a){if(n&&B[s])return r=`${s}${j.UNDERSCORE_STRING}${B[s]}`,r;B[s]?B[s]+=1:B[s]=1,r=`${s}${j.UNDERSCORE_STRING}${B[s]}`}else r=H(e,W(t));else s=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[s]?B[s]+=1:B[s]=1,r=`${s}${j.UNDERSCORE_STRING}${B[s]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},z=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},Y=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},K=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},J=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},X=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",se="SHOW_INSIGHT",ae="SHOW_DASHBOARD",oe="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",le="CREATE_WORK",ue="OPEN_WORK_BY_HANDLE",de="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",ge="OPEN_ASSIGNMENT",fe="MERGE_DATA",me="REMOVE_ITEM",Ie="GET_DATAOBJECT_ACTIONS",ye="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",_e="RESET_CONTAINERS",Ce="ADD_CONTAINER_ITEM",Se="REMOVE_CONTAINER_ITEM",Te="ADD_TRANSIENT_ITEM",Ne="UPDATE_TRANSIENT_DATA",Oe="REMOVE_TRANSIENT_ITEM",Pe="REMOVE_ALL_TRANSIENT_ITEMS",De="CLEAR_TRANSIENT_DATA",Re="PURGE_TRANSIENT_DATA",be="REPLACE_TRANSIENT_DATA",ve="ACTIVATE_CONTAINER_ITEM",xe="UPDATE_CONTAINER_ITEM",we="UPMERGE_AND_REMOVE_CONTAINER_ITEM",Me="REPLACE_CONTAINER_ITEM",Le="ACTIVATE_MODAL_CONTAINER_ITEM",Fe="REMOVE_CONTAINER",Ue="ADD_SUGGESTION_CONTEXT",je="showView",Ve="showData",ke="showInsight",$e="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="deleteCaseInCreateStage",ze="openLocalAction",Ye="openProcessAction",Ke="caseWideActions",Je="openBulkAction",Xe="performBulkAction",Qe="launchAssignment",Ze="ADD_MESSAGES",et="CLEAR_MESSAGES",tt="RESET_STORE",nt="FETCH_DATAPAGE",rt="ADD_SHARED_DATA",st="REMOVE_SHARED_DATA",at="LIST_ACTION",ot="DELETE_CASE_SUMMARY",it="ALTER_BLOCKING_ACTION_COUNT",ct="CREATE_DATA_OBJECT",lt="DELETE_DATA_OBJECT",ut="VIEW_DATA_OBJECT",dt="UPDATE_DATA_OBJECT",pt="OPEN_DATA_OBJECT_ACTION",ht="SUBMIT_DATA_OBJECT_ACTION",gt="OPEN_EMBEDDED_DATA_MODAL",ft="SUBMIT_EMBEDDED_DATA_MODAL",mt="SUBMIT_SUBSCRIPT",It="FILL_FORM_WITH_AI",yt="createWork",Et="openAssignment",At="openCase",_t="OPEN_OBJECT_ACTION",Ct="EXECUTE_OBJECT_WIDE_ACTION",St="createObject",Tt="getObject",Nt="getObjectWideAction",Ot="createExternalObject",Pt=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=Ap(r),n||t.includes("/")?n||(r=Pt(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},Dt=(e,t)=>{const n=Pt(e,t);return n&&Ap(n)?Ap(n):{}},Rt=(e,t)=>bh.getSemanticURL(je,{page:e},t);class bt{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=jt[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser?._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes?.[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=Ut[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=jt[this._state];this._subParser=new bt(this._grammar,e,t)}_endSubExpression(){jt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,bt._setParent(e,this._position)):this._tree=e,this._position=e}}const vt=bt,xt="identifier",wt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Mt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Lt={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":wt,AND:wt,and:wt,"||":Mt,OR:Mt,or:Mt,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Ft={BinaryExpression:function(e){const t=[];let n="";const r=e.right,s=e.operator,a=e.left;if(t[0]=this.evaluateAST(a),a.operationType===xt&&this._context){const e=a.value;n=this._context.getFieldMetadata(e.substring(1))?.type??""}t[1]=r?this.evaluateAST(r,n):"";return(0,this._grammar[s].evaluate)(t[0],t[1])},identifier:function(e){return this._localDataObject?$g.getIn(this._localDataObject,e.value?e.value.substring(1).split("."):[])??"":this._contextTreeNodeContext?Hg.getLitePropertyValue(this._contextTreeNodeContext,e.value)??"":this._context.getValue(e.value)??""},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value:"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;return(0,this._grammar[t].evaluate)(n)}},Ut={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;const r=n?n.operator:null,s=r?this._grammar[r]:null,a=s?s.precedence:null;if(a&&t)for(;n?.operator&&a>=t;)this._position=n,n=n._parent;const o={operationType:"BinaryExpression",operator:e.value,left:this._position};vt._setParent(this._position,o),this._position=n,this.setPositionInAST(o)},identifier:function(e){const t={operationType:xt,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},jt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:xt},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Ut.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Vt=["binaryOperator","unaryOperator","openParenthesis"],kt=/^\s*$/,$t=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Bt=/\\\\/,Gt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Wt=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],Ht=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class qt{constructor(e){this._grammar=e}static _isNegative(e){return Vt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(kt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match($t)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(Bt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>qt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[Gt.join("|"),e.join("|"),Wt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=qt._unquote(e):e.match(Ht)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match($t)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)qt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&qt._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const zt=qt;const Yt=class{constructor(e,t){this._grammar={...Lt},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new zt(this._grammar).tokenize(this._expression),t=new vt(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return Zt(e.operationType,Ft)&&Ft[e.operationType].call(this,e,t)}},Kt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new Yt(n,t)},Jt=e=>!e||e.buildAST(),Xt=(e,t,n)=>!e||e.evaluate(t,n),Qt=(e,t,n)=>{const r=Kt(e,t),s=Jt(r);return Xt(s,n)},Zt=(e,t)=>e in t;const en=class{static handleExpression(e,t,n,r){const s=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:s}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:Hg.getPropertyValue(`${n}.pxObjClass`,null,t)||Hg.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>Ng({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},tn={},nn=(e,t)=>tn[t]&&Object.hasOwn(tn[t],e),rn=e=>{const{context:t}=e;nn(e.reference,t)&&en.handleExpression(e.reference,e.value,tn[t][e.reference],t)},sn=(e={})=>{$g.copy(e,tn)},an=(e,t,n)=>Qt(e,t,n?.pConnect.getPConnect());const on=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const cn=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){$g.copy(e,this.componentMap)}mergeOverrideMap(e={}){$g.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const ln=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const un=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),s=-1===r?e:e.substring(0,r),a=ln.getHandler(s);return a?a(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return ln.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=cn.getComponent(t.type);if(!r?.mapping)return;const s=r.mapping(t.config);if(s&&s["@map"]){const t=s["@map"],{source:r}=t;if(!r)return;const a=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let s=n[r];s&&0===s.indexOf(".")?(s=s.substring(1),t[r]=e[s]):t[r]=s})),r.push(t)}))}}}static getPropertyName(e=""){if(e&&$g.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if($g.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return $g.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}};function dn(e,t){return function(){return e.apply(t,arguments)}}const{toString:pn}=Object.prototype,{getPrototypeOf:hn}=Object,{iterator:gn,toStringTag:fn}=Symbol,mn=(In=Object.create(null),e=>{const t=pn.call(e);return In[t]||(In[t]=t.slice(8,-1).toLowerCase())});var In;const yn=e=>(e=e.toLowerCase(),t=>mn(t)===e),En=e=>t=>typeof t===e,{isArray:An}=Array,_n=En("undefined");function Cn(e){return null!==e&&!_n(e)&&null!==e.constructor&&!_n(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sn=yn("ArrayBuffer");const Tn=En("string"),Nn=En("function"),On=En("number"),Pn=e=>null!==e&&"object"==typeof e,Dn=e=>{if("object"!==mn(e))return!1;const t=hn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||fn in e||gn in e)},Rn=yn("Date"),bn=yn("File"),vn=yn("Blob"),xn=yn("FileList"),wn=yn("URLSearchParams"),[Mn,Ln,Fn,Un]=["ReadableStream","Request","Response","Headers"].map(yn);function jn(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),An(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Cn(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Vn(e,t){if(Cn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,$n=e=>!_n(e)&&e!==kn;const Bn=(Gn="undefined"!=typeof Uint8Array&&hn(Uint8Array),e=>Gn&&e instanceof Gn);var Gn;const Wn=yn("HTMLFormElement"),Hn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qn=yn("RegExp"),zn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jn(n,((n,s)=>{let a;!1!==(a=t(n,s,e))&&(r[s]=a||n)})),Object.defineProperties(e,r)};const Yn=yn("AsyncFunction"),Kn=(Jn="function"==typeof setImmediate,Xn=Nn(kn.postMessage),Jn?setImmediate:Xn?(Qn=`axios@${Math.random()}`,Zn=[],kn.addEventListener("message",(({source:e,data:t})=>{e===kn&&t===Qn&&Zn.length&&Zn.shift()()}),!1),e=>{Zn.push(e),kn.postMessage(Qn,"*")}):e=>setTimeout(e));var Jn,Xn,Qn,Zn;const er="undefined"!=typeof queueMicrotask?queueMicrotask.bind(kn):"undefined"!=typeof process&&process.nextTick||Kn,tr={isArray:An,isArrayBuffer:Sn,isBuffer:Cn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Nn(e.append)&&("formdata"===(t=mn(e))||"object"===t&&Nn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Sn(e.buffer),t},isString:Tn,isNumber:On,isBoolean:e=>!0===e||!1===e,isObject:Pn,isPlainObject:Dn,isEmptyObject:e=>{if(!Pn(e)||Cn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Mn,isRequest:Ln,isResponse:Fn,isHeaders:Un,isUndefined:_n,isDate:Rn,isFile:bn,isBlob:vn,isRegExp:qn,isFunction:Nn,isStream:e=>Pn(e)&&Nn(e.pipe),isURLSearchParams:wn,isTypedArray:Bn,isFileList:xn,forEach:jn,merge:function e(){const{caseless:t}=$n(this)&&this||{},n={},r=(r,s)=>{const a=t&&Vn(n,s)||s;Dn(n[a])&&Dn(r)?n[a]=e(n[a],r):Dn(r)?n[a]=e({},r):An(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&jn(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(jn(t,((t,r)=>{n&&Nn(t)?e[r]=dn(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,a,o;const i={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)o=s[a],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&hn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:mn,kindOfTest:yn,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(An(e))return e;let t=e.length;if(!On(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[gn]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Wn,hasOwnProperty:Hn,hasOwnProp:Hn,reduceDescriptors:zn,freezeMethods:e=>{zn(e,((t,n)=>{if(Nn(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Nn(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return An(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Vn,global:kn,isContextDefined:$n,isSpecCompliantForm:function(e){return!!(e&&Nn(e.append)&&"FormData"===e[fn]&&e[gn])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Pn(e)){if(t.indexOf(e)>=0)return;if(Cn(e))return e;if(!("toJSON"in e)){t[r]=e;const s=An(e)?[]:{};return jn(e,((e,t)=>{const a=n(e,r+1);!_n(a)&&(s[t]=a)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:Yn,isThenable:e=>e&&(Pn(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch),setImmediate:Kn,asap:er,isIterable:e=>null!=e&&Nn(e[gn])};function nr(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}tr.inherits(nr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:tr.toJSONObject(this.config),code:this.code,status:this.status}}});const rr=nr.prototype,sr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{sr[e]={value:e}})),Object.defineProperties(nr,sr),Object.defineProperty(rr,"isAxiosError",{value:!0}),nr.from=(e,t,n,r,s,a)=>{const o=Object.create(rr);return tr.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),nr.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const ar=nr;function or(e){return tr.isPlainObject(e)||tr.isArray(e)}function ir(e){return tr.endsWith(e,"[]")?e.slice(0,-2):e}function cr(e,t,n){return e?e.concat(t).map((function(e,t){return e=ir(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const lr=tr.toFlatObject(tr,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ur=function(e,t,n){if(!tr.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=tr.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!tr.isUndefined(t[e])}))).metaTokens,s=n.visitor||l,a=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&tr.isSpecCompliantForm(t);if(!tr.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(tr.isDate(e))return e.toISOString();if(tr.isBoolean(e))return e.toString();if(!i&&tr.isBlob(e))throw new ar("Blob is not supported. Use a Buffer instead.");return tr.isArrayBuffer(e)||tr.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let i=e;if(e&&!s&&"object"==typeof e)if(tr.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(tr.isArray(e)&&function(e){return tr.isArray(e)&&!e.some(or)}(e)||(tr.isFileList(e)||tr.endsWith(n,"[]"))&&(i=tr.toArray(e)))return n=ir(n),i.forEach((function(e,r){!tr.isUndefined(e)&&null!==e&&t.append(!0===o?cr([n],r,a):null===o?n:n+"[]",c(e))})),!1;return!!or(e)||(t.append(cr(s,n,a),c(e)),!1)}const u=[],d=Object.assign(lr,{defaultVisitor:l,convertValue:c,isVisitable:or});if(!tr.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!tr.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),tr.forEach(n,(function(n,a){!0===(!(tr.isUndefined(n)||null===n)&&s.call(t,n,tr.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function dr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function pr(e,t){this._pairs=[],e&&ur(e,this,t)}const hr=pr.prototype;hr.append=function(e,t){this._pairs.push([e,t])},hr.toString=function(e){const t=e?function(t){return e.call(this,t,dr)}:dr;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const gr=pr;function fr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mr(e,t,n){if(!t)return e;const r=n&&n.encode||fr;tr.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let a;if(a=s?s(t,n):tr.isURLSearchParams(t)?t.toString():new gr(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const Ir=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){tr.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},yr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Er={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:gr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ar="undefined"!=typeof window&&"undefined"!=typeof document,_r="object"==typeof navigator&&navigator||void 0,Cr=Ar&&(!_r||["ReactNative","NativeScript","NS"].indexOf(_r.product)<0),Sr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Tr=Ar&&window.location.href||"http://localhost",Nr={...r,...Er};const Or=function(e){function t(e,n,r,s){let a=e[s++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=s>=e.length;if(a=!a&&tr.isArray(r)?r.length:a,i)return tr.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;r[a]&&tr.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],s)&&tr.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}(r[a])),!o}if(tr.isFormData(e)&&tr.isFunction(e.entries)){const n={};return tr.forEachEntry(e,((e,r)=>{t(function(e){return tr.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Pr={transitional:yr,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=tr.isObject(e);s&&tr.isHTMLForm(e)&&(e=new FormData(e));if(tr.isFormData(e))return r?JSON.stringify(Or(e)):e;if(tr.isArrayBuffer(e)||tr.isBuffer(e)||tr.isStream(e)||tr.isFile(e)||tr.isBlob(e)||tr.isReadableStream(e))return e;if(tr.isArrayBufferView(e))return e.buffer;if(tr.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ur(e,new Nr.classes.URLSearchParams,{visitor:function(e,t,n,r){return Nr.isNode&&tr.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=tr.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ur(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(tr.isString(e))try{return(t||JSON.parse)(e),tr.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Pr.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(tr.isResponse(e)||tr.isReadableStream(e))return e;if(e&&tr.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ar.from(e,ar.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nr.classes.FormData,Blob:Nr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tr.forEach(["delete","get","head","post","put","patch"],(e=>{Pr.headers[e]={}}));const Dr=Pr,Rr=tr.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),br=Symbol("internals");function vr(e){return e&&String(e).trim().toLowerCase()}function xr(e){return!1===e||null==e?e:tr.isArray(e)?e.map(xr):String(e)}function wr(e,t,n,r,s){return tr.isFunction(r)?r.call(this,t,n):(s&&(t=n),tr.isString(t)?tr.isString(r)?-1!==t.indexOf(r):tr.isRegExp(r)?r.test(t):void 0:void 0)}class Mr{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=vr(t);if(!s)throw new Error("header name must be a non-empty string");const a=tr.findKey(r,s);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=xr(e))}const a=(e,t)=>tr.forEach(e,((e,n)=>s(e,n,t)));if(tr.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(tr.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&Rr[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(tr.isObject(e)&&tr.isIterable(e)){let n,r,s={};for(const t of e){if(!tr.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?tr.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=vr(e)){const n=tr.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(tr.isFunction(t))return t.call(this,e,n);if(tr.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=vr(e)){const n=tr.findKey(this,e);return!(!n||void 0===this[n]||t&&!wr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=vr(e)){const s=tr.findKey(n,e);!s||t&&!wr(0,n[s],s,t)||(delete n[s],r=!0)}}return tr.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!wr(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return tr.forEach(this,((r,s)=>{const a=tr.findKey(n,s);if(a)return t[a]=xr(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();o!==s&&delete t[s],t[o]=xr(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return tr.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&tr.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[br]=this[br]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=vr(e);t[r]||(!function(e,t){const n=tr.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return tr.isArray(e)?e.forEach(r):r(e),this}}Mr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),tr.reduceDescriptors(Mr.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),tr.freezeMethods(Mr);const Lr=Mr;function Fr(e,t){const n=this||Dr,r=t||n,s=Lr.from(r.headers);let a=r.data;return tr.forEach(e,(function(e){a=e.call(n,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function Ur(e){return!(!e||!e.__CANCEL__)}function jr(e,t,n){ar.call(this,null==e?"canceled":e,ar.ERR_CANCELED,t,n),this.name="CanceledError"}tr.inherits(jr,ar,{__CANCEL__:!0});const Vr=jr;function kr(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ar("Request failed with status code "+n.status,[ar.ERR_BAD_REQUEST,ar.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const $r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[o];s||(s=c),n[a]=i,r[a]=c;let u=o,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-s<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const Br=function(e,t){let n,r,s=0,a=1e3/t;const o=(t,a=Date.now())=>{s=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-s;i>=a?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),a-i)))},()=>n&&o(n)]},Gr=(e,t,n=3)=>{let r=0;const s=$r(50,250);return Br((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=a-r,c=s(i);r=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Wr=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Hr=e=>(...t)=>tr.asap((()=>e(...t))),qr=Nr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Nr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Nr.origin),Nr.navigator&&/(msie|trident)/i.test(Nr.navigator.userAgent)):()=>!0,zr=Nr.hasStandardBrowserEnv?{write(e,t,n,r,s,a){const o=[e+"="+encodeURIComponent(t)];tr.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),tr.isString(r)&&o.push("path="+r),tr.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Yr(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Kr=e=>e instanceof Lr?{...e}:e;function Jr(e,t){t=t||{};const n={};function r(e,t,n,r){return tr.isPlainObject(e)&&tr.isPlainObject(t)?tr.merge.call({caseless:r},e,t):tr.isPlainObject(t)?tr.merge({},t):tr.isArray(t)?t.slice():t}function s(e,t,n,s){return tr.isUndefined(t)?tr.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function a(e,t){if(!tr.isUndefined(t))return r(void 0,t)}function o(e,t){return tr.isUndefined(t)?tr.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,s,a){return a in t?r(n,s):a in e?r(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t,n)=>s(Kr(e),Kr(t),0,!0)};return tr.forEach(Object.keys({...e,...t}),(function(r){const a=c[r]||s,o=a(e[r],t[r],r);tr.isUndefined(o)&&a!==i||(n[r]=o)})),n}const Xr=e=>{const t=Jr({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=Lr.from(i),t.url=mr(Yr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),tr.isFormData(r))if(Nr.hasStandardBrowserEnv||Nr.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(Nr.hasStandardBrowserEnv&&(s&&tr.isFunction(s)&&(s=s(t)),s||!1!==s&&qr(t.url))){const e=a&&o&&zr.read(o);e&&i.set(a,e)}return t},Qr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Xr(e);let s=r.data;const a=Lr.from(r.headers).normalize();let o,i,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=Lr.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());kr((function(e){t(e),g()}),(function(e){n(e),g()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new ar("Request aborted",ar.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new ar("Network Error",ar.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||yr;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ar(t,s.clarifyTimeoutError?ar.ETIMEDOUT:ar.ECONNABORTED,e,f)),f=null},void 0===s&&a.setContentType(null),"setRequestHeader"in f&&tr.forEach(a.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),tr.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),h&&([c,u]=Gr(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,l]=Gr(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Vr(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const I=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);I&&-1===Nr.protocols.indexOf(I)?n(new ar("Unsupported protocol "+I+":",ar.ERR_BAD_REQUEST,e)):f.send(s||null)}))},Zr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ar?t:new Vr(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,s(new ar(`timeout ${t} of ms exceeded`,ar.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:i}=r;return i.unsubscribe=()=>tr.asap(o),i}},es=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},ts=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ns=(e,t,n,r)=>{const s=async function*(e,t){for await(const n of ts(e))yield*es(n,t)}(e,t);let a,o=0,i=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return i(),void e.close();let a=r.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),s.return())},{highWaterMark:2})},rs="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ss=rs&&"function"==typeof ReadableStream,as=rs&&("function"==typeof TextEncoder?(os=new TextEncoder,e=>os.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var os;const is=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},cs=ss&&is((()=>{let e=!1;const t=new Request(Nr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ls=ss&&is((()=>tr.isReadableStream(new Response("").body))),us={stream:ls&&(e=>e.body)};var ds;rs&&(ds=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!us[e]&&(us[e]=tr.isFunction(ds[e])?t=>t[e]():(t,n)=>{throw new ar(`Response type '${e}' is not supported`,ar.ERR_NOT_SUPPORT,n)})})));const ps=async(e,t)=>{const n=tr.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(tr.isBlob(e))return e.size;if(tr.isSpecCompliantForm(e)){const t=new Request(Nr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return tr.isArrayBufferView(e)||tr.isArrayBuffer(e)?e.byteLength:(tr.isURLSearchParams(e)&&(e+=""),tr.isString(e)?(await as(e)).byteLength:void 0)})(t):n},hs=rs&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:a,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Xr(e);l=l?(l+"").toLowerCase():"text";let h,g=Zr([s,a&&a.toAbortSignal()],o);const f=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let m;try{if(c&&cs&&"get"!==n&&"head"!==n&&0!==(m=await ps(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(tr.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Wr(m,Gr(Hr(c)));r=ns(n.body,65536,e,t)}}tr.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;h=new Request(t,{...p,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let a=await fetch(h,p);const o=ls&&("stream"===l||"response"===l);if(ls&&(i||o&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=tr.toFiniteNumber(a.headers.get("content-length")),[n,r]=i&&Wr(t,Gr(Hr(i),!0))||[];a=new Response(ns(a.body,65536,n,(()=>{r&&r(),f&&f()})),e)}l=l||"text";let I=await us[tr.findKey(us,l)||"text"](a,e);return!o&&f&&f(),await new Promise(((t,n)=>{kr(t,n,{data:I,headers:Lr.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:h})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ar("Network Error",ar.ERR_NETWORK,e,h),{cause:t.cause||t});throw ar.from(t,t&&t.code,e,h)}}),gs={http:null,xhr:Qr,fetch:hs};tr.forEach(gs,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const fs=e=>`- ${e}`,ms=e=>tr.isFunction(e)||null===e||!1===e,Is=e=>{e=tr.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!ms(n)&&(r=gs[(t=String(n)).toLowerCase()],void 0===r))throw new ar(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+a]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(fs).join("\n"):" "+fs(e[0]):"as no adapter specified";throw new ar("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ys(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vr(null,e)}function Es(e){ys(e),e.headers=Lr.from(e.headers),e.data=Fr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Is(e.adapter||Dr.adapter)(e).then((function(t){return ys(e),t.data=Fr.call(e,e.transformResponse,t),t.headers=Lr.from(t.headers),t}),(function(t){return Ur(t)||(ys(e),t&&t.response&&(t.response.data=Fr.call(e,e.transformResponse,t.response),t.response.headers=Lr.from(t.response.headers))),Promise.reject(t)}))}const As="1.11.0",_s={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{_s[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Cs={};_s.transitional=function(e,t,n){function r(e,t){return"[Axios v"+As+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,a)=>{if(!1===e)throw new ar(r(s," has been removed"+(t?" in "+t:"")),ar.ERR_DEPRECATED);return t&&!Cs[s]&&(Cs[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,a)}},_s.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Ss={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ar("options must be an object",ar.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new ar("option "+a+" must be "+n,ar.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ar("Unknown option "+a,ar.ERR_BAD_OPTION)}},validators:_s},Ts=Ss.validators;class Ns{constructor(e){this.defaults=e||{},this.interceptors={request:new Ir,response:new Ir}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Jr(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&Ss.assertOptions(n,{silentJSONParsing:Ts.transitional(Ts.boolean),forcedJSONParsing:Ts.transitional(Ts.boolean),clarifyTimeoutError:Ts.transitional(Ts.boolean)},!1),null!=r&&(tr.isFunction(r)?t.paramsSerializer={serialize:r}:Ss.assertOptions(r,{encode:Ts.function,serialize:Ts.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ss.assertOptions(t,{baseUrl:Ts.spelling("baseURL"),withXsrfToken:Ts.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&tr.merge(s.common,s[t.method]);s&&tr.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=Lr.concat(a,s);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Es.bind(this),void 0];for(e.unshift(...o),e.push(...c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=o.length;let p=t;for(d=0;d<u;){const e=o[d++],t=o[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Es.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return mr(Yr((e=Jr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}tr.forEach(["delete","get","head","options"],(function(e){Ns.prototype[e]=function(t,n){return this.request(Jr(n||{},{method:e,url:t,data:(n||{}).data}))}})),tr.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,s){return this.request(Jr(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ns.prototype[e]=t(),Ns.prototype[e+"Form"]=t(!0)}));const Os=Ns;class Ps{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new Vr(e,r,s),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ps((function(t){e=t})),cancel:e}}}const Ds=Ps;const Rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rs).forEach((([e,t])=>{Rs[t]=e}));const bs=Rs;const vs=function e(t){const n=new Os(t),r=dn(Os.prototype.request,n);return tr.extend(r,Os.prototype,n,{allOwnKeys:!0}),tr.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Jr(t,n))},r}(Dr);vs.Axios=Os,vs.CanceledError=Vr,vs.CancelToken=Ds,vs.isCancel=Ur,vs.VERSION=As,vs.toFormData=ur,vs.AxiosError=ar,vs.Cancel=vs.CanceledError,vs.all=function(e){return Promise.all(e)},vs.spread=function(e){return function(t){return e.apply(null,t)}},vs.isAxiosError=function(e){return tr.isObject(e)&&!0===e.isAxiosError},vs.mergeConfig=Jr,vs.AxiosHeaders=Lr,vs.formToJSON=e=>Or(tr.isHTMLForm(e)?new FormData(e):e),vs.getAdapter=Is,vs.HttpStatusCode=bs,vs.default=vs;const xs=vs;function ws(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ms=ws((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var Ls=function(e,t){return Ls=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ls(e,t)};function Fs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ls(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Us(e,t,n,r){return new(n||(n=Promise))((function(s,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function i(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function js(e,t){var n,r,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){a.label=i[1];break}if(6===i[0]&&a.label<s[1]){a.label=s[1],s=i;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(i);break}s[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Vs(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ks(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return o}function $s(e,t,n){if(n||2===arguments.length)for(var r,s=0,a=t.length;s<a;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function Bs(e){return this instanceof Bs?(this.v=e,this):new Bs(e)}function Gs(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,s=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){s[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||i(e,t)}))},t&&(r[e]=t(r[e])))}function i(e,t){try{(n=s[e](t)).value instanceof Bs?Promise.resolve(n.value.v).then(c,l):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function Ws(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Vs(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,s){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,s,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Hs=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function qs(e){return"function"==typeof e}function zs(e){return qs(null==e?void 0:e.then)}var Ys=ws((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function Ks(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Js=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Vs(a),i=o.next();!i.done;i=o.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(qs(c))try{c()}catch(e){s=e instanceof Ys?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Vs(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{Zs(p)}catch(e){s=null!=s?s:[],e instanceof Ys?s=$s($s([],ks(s)),ks(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(s)throw new Ys(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Zs(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Ks(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ks(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Xs=Js.EMPTY;function Qs(e){return e instanceof Js||e&&"closed"in e&&qs(e.remove)&&qs(e.add)&&qs(e.unsubscribe)}function Zs(e){qs(e)?e():e.unsubscribe()}var ea={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ta={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=ta.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,$s([e,t],ks(n))):setTimeout.apply(void 0,$s([e,t],ks(n)))},clearTimeout:function(e){var t=ta.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function na(e){ta.setTimeout((function(){var t=ea.onUnhandledError;if(!t)throw e;t(e)}))}function ra(){}var sa=aa("C",void 0,void 0);function aa(e,t,n){return{kind:e,value:t,error:n}}var oa=null;function ia(e){if(ea.useDeprecatedSynchronousErrorHandling){var t=!oa;if(t&&(oa={errorThrown:!1,error:null}),e(),t){var n=oa,r=n.errorThrown,s=n.error;if(oa=null,r)throw s}}else e()}var ca=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Qs(t)&&t.add(n)):n.destination=fa,n}return Fs(t,e),t.create=function(e,t,n){return new pa(e,t,n)},t.prototype.next=function(e){this.isStopped?ga(function(e){return aa("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ga(aa("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ga(sa,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Js),la=Function.prototype.bind;function ua(e,t){return la.call(e,t)}var da=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ha(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ha(e)}else ha(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ha(e)}},e}(),pa=function(e){function t(t,n,r){var s,a,o=e.call(this)||this;qs(t)||!t?s={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&ea.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&ua(t.next,a),error:t.error&&ua(t.error,a),complete:t.complete&&ua(t.complete,a)}):s=t;return o.destination=new da(s),o}return Fs(t,e),t}(ca);function ha(e){var t;ea.useDeprecatedSynchronousErrorHandling?(t=e,ea.useDeprecatedSynchronousErrorHandling&&oa&&(oa.errorThrown=!0,oa.error=t)):na(e)}function ga(e,t){var n=ea.onStoppedNotification;n&&ta.setTimeout((function(){return n(e,t)}))}var fa={closed:!0,next:ra,error:function(e){throw e},complete:ra},ma="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ia(e){return e}function ya(e){return 0===e.length?Ia:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Ea=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,s=this,a=(r=e)&&r instanceof ca||function(e){return e&&qs(e.next)&&qs(e.error)&&qs(e.complete)}(r)&&Qs(r)?e:new pa(e,t,n);return ia((function(){var e=s,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Aa(t))((function(t,r){var s=new pa({next:function(t){try{e(t)}catch(e){r(e),s.unsubscribe()}},error:r,complete:t});n.subscribe(s)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[ma]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ya(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Aa(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Aa(e){var t;return null!==(t=null!=e?e:ea.Promise)&&void 0!==t?t:Promise}function _a(e){return qs(e[ma])}function Ca(e){return Symbol.asyncIterator&&qs(null==e?void 0:e[Symbol.asyncIterator])}function Sa(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Ta="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Na(e){return qs(null==e?void 0:e[Ta])}function Oa(e){return Gs(this,arguments,(function(){var t,n,r;return js(this,(function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Bs(t.read())];case 3:return n=s.sent(),r=n.value,n.done?[4,Bs(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Bs(r)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Pa(e){return qs(null==e?void 0:e.getReader)}function Da(e){if(e instanceof Ea)return e;if(null!=e){if(_a(e))return s=e,new Ea((function(e){var t=s[ma]();if(qs(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Hs(e))return r=e,new Ea((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(zs(e))return n=e,new Ea((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,na)}));if(Ca(e))return Ra(e);if(Na(e))return t=e,new Ea((function(e){var n,r;try{for(var s=Vs(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()}));if(Pa(e))return Ra(Oa(e))}var t,n,r,s;throw Sa(e)}function Ra(e){return new Ea((function(t){(function(e,t){var n,r,s,a;return Us(this,void 0,void 0,(function(){var o,i;return js(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Ws(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),s={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function ba(e,t,n,r,s){void 0===r&&(r=0),void 0===s&&(s=!1);var a=t.schedule((function(){n(),s?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!s)return a}function va(e){return function(t){if(function(e){return qs(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function xa(e,t,n,r,s){return new wa(e,t,n,r,s)}var wa=function(e){function t(t,n,r,s,a,o){var i=e.call(this,t)||this;return i.onFinalize=a,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=s?function(e){try{s(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Fs(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(ca);function Ma(e,t){return void 0===t&&(t=0),va((function(n,r){n.subscribe(xa(r,(function(n){return ba(r,e,(function(){return r.next(n)}),t)}),(function(){return ba(r,e,(function(){return r.complete()}),t)}),(function(n){return ba(r,e,(function(){return r.error(n)}),t)})))}))}function La(e,t){return void 0===t&&(t=0),va((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Fa(e,t){if(!e)throw new Error("Iterable cannot be null");return new Ea((function(n){ba(n,t,(function(){var r=e[Symbol.asyncIterator]();ba(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Ua(e,t){if(null!=e){if(_a(e))return function(e,t){return Da(e).pipe(La(t),Ma(t))}(e,t);if(Hs(e))return function(e,t){return new Ea((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(zs(e))return function(e,t){return Da(e).pipe(La(t),Ma(t))}(e,t);if(Ca(e))return Fa(e,t);if(Na(e))return function(e,t){return new Ea((function(n){var r;return ba(n,t,(function(){r=e[Ta](),ba(n,t,(function(){var e,t,s;try{t=(e=r.next()).value,s=e.done}catch(e){return void n.error(e)}s?n.complete():n.next(t)}),0,!0)})),function(){return qs(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Pa(e))return function(e,t){return Fa(Oa(e),t)}(e,t)}throw Sa(e)}function ja(e,t){return t?Ua(e,t):Da(e)}function Va(e,t,n){var r=qs(e)||t||n?{next:e,error:t,complete:n}:e;return r?va((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var s=!0;e.subscribe(xa(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;s=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;s=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;s&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):Ia}function ka(e){return va((function(t,n){var r,s=null,a=!1;s=t.subscribe(xa(n,void 0,void 0,(function(o){r=Da(e(o,ka(e)(t))),s?(s.unsubscribe(),s=null,r.subscribe(n)):a=!0}))),a&&(s.unsubscribe(),s=null,r.subscribe(n))}))}class $a{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new $a(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const Ba=$a;const Ga=class{constructor(e,t,n,r={}){this.type=U.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},Wa=/(([^.]+)\[\d+\])/g,Ha=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(Wa);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},qa=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:za,WHEN:Ya,DECLARATIVE_TARGET:Ka,PAGELIST:Ja}=j.CONTEXT_TREE_NODE_TYPES;const Xa=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[za,new Map],[Ya,new Map],[Ka,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===Ja){const n=this.references.get(za);n.set(e,t),this.references.set(za,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=qa(n.name,e);return-1!==r&&+r>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(za),s=this.references.get(Ka);[...r.keys(),...s.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=Ha(e);return+n>=t})).forEach((e=>{const t=r.get(e),n=t?.parent;n?.removeChildren(),r.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new Ba(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),s=r?.get(e);s?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,s){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${r}`,o=new Ga(t,n,r,s),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:Qa,FIELD:Za,CONTEXT:eo,DECLARATIVE_TARGET:to,WHEN:no}=U.CONTEXT_TREE_NODE_TYPES;const ro=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new Xa(eo,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const r=this.addContextNode(e).addNode("PAGE",t);let s=r.getReference(n);return s||(s=r.addNode("VIEW",n),r.addReference(n,s)),s}pushChildPageNodeToParentView(e,t,n){const r=e.children;let s=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){s=!0;break}s||r.push(t),t.parent=e}addViewNode(e,t,n,r){const s=this.addContextNode(e).addNode("PAGE",t);let a=null;if(r&&n!==r){a=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else a=s.addNode("VIEW",n);s.addReference(n,a);const o=t.split(".");for(;o.length>0;){o.pop();const n=o.join("."),a=this.getContextNode(e)?.getNode("PAGE",n),i=a?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,s,t);break}}return a}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,s){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,s);return o&&a.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,s){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,s),a?.removeReference(`${t}${r}`,Za,s),a?.removeReference(`${t}${r}`,to,s)}removeViewNode(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=o?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&o?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,r):a.type===Qa?this.removeChildViewNodes(e,t,a.name,r):(s.removeReference(a.name,Za,a.props.index),s.removeReference(a.name,to,a.props.index),"PAGELIST"!==a.type&&"Address"!==a.props?.componentName||this.deleteAllListNodes(e,a.name))})),a?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&s?.references?.get(r)?.delete(e)};r(Za),r(to)}deleteListNode(e,t,n){const r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&s?.references?.get(r)?.delete(e)};r(Za),r(to)}getPageListNode(e,t,n,r){const s=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return s?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(Za,r)}_findViewNode(e,t,n,r){let s=r.addNode("PAGE",t)?.getReference(n);if(s)return s;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(s=r.addNode("PAGE",e)?.getReference(n),s)return s}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,s,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),c=this.createFieldNode(i,t,r,a);return c&&this.updateFieldNode(o,i,c,e,t,r,s),c}createFieldNode(e,t,n,r){const{isDeclarativeTarget:s}=r;return s?e.addNode(to,`${t}${n}`,r):e.addNode(Za,`${t}${n}`,r)}updateFieldNode(e,t,n,r,s,a,o){const i=`${s}${a}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(r,n.name),e.addReference(i,n),n.value=o,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,r,s,a)}handleFieldInsideList(e,t,n,r,s){const a=Kp(n),o=_p(a,n)||{},i=`${r}${s}`;let c=null;if(o?.subscriptFieldName||o?.isPageGroup)c=r.substring(0,r.lastIndexOf(`.${o?.index??""}`))||i.substring(0,i.lastIndexOf(`.${o?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=r.substring(0,r.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let r=e.getReference(n,Za);r||(r=t.addNode(Za,n,{}),e.addReference(n,r))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const s=this.getContextNode(e),[a,o,i]=Ha(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...r,rowIndex:i});const c=s?.getReference(`${t}.${n}`,Za);c&&c instanceof Ba&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,s){this.getPageListNode(e,t,n,r)?.addEventListener(s)}mutatePageList(e,t,n,r,s=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,Za);o&&o instanceof Ba&&o.triggerEvent(r,s)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(Za)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(Za)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(to)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(Za)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(to)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(Za)?.get(t);r instanceof Ba&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,Za),n=this.getContextReferencesByType(e,to);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,Za)?.get(t)||!!this.getContextReferencesByType(e,to)?.get(t)}addWhenNode(e,t,n,r,s,a){const o=this.getContextNode(e);o?.addWhen(t,n,r,s,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(to)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,s=t.pageReference??U.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:s,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(no)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,s=e.name,a=e?.props?.pageReference??U.CASE_INFO.CASE_INFO_CONTENT;r.push({name:s,pageReference:a,referenceName:n,type:t})})),r}},so={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.DATA_INFO.DATA_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.OBJECT_INFO.OBJECT_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},ao=(e="",t="",n,r)=>{let s=[],a=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){s=[j.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)s.push(a[e]);s.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,a[a.length-1])}else n===U.PAGE?s=[...so.PAGE_MESSAGES_PATH]:n===j.HTTP?s=[...so.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?s=[...so.CASE_MESSAGE_PATH]:r&&(s=[j.CONTEXT_DATA,...o.split(".")]);return s.filter(Boolean)},oo=(e,t,n)=>{const r={content:{}},s=`${t.split(".").slice(2).join(".")}[${n}]`,a=$g.getIn(e?.content,s.split("."));return a&&$g.setIn(r.content,s.split("."),{...a}),r},io=(e,t,n,r,s,a,o={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,r,s),c=r>s?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),s=`${a}[${r}]`;o[`${a}[${r+("up"===c?1:-1)}]`]=$g.getIn(e[t],[j.CONTEXT_DATA,...s.split(".")]),$g.deleteIn(e[t],[j.CONTEXT_DATA,...s.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{$g.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],o[n])}))},co=(e,t,n,r,s)=>{const a=$g.deepClone($g.getIn(e,[`${t}`])),o=$g.getIn(a,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!o)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),l=((e,t,n)=>{const r=$g.getIn(e,[j.CONTEXT_DATA,...n.split(".")],{});return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(a,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const u=oo(o,i,r).content;if(u&&Object.keys(u).length>0){const n={},o=`${i}[${r}]`,c=$g.getIn(a,[j.CONTEXT_DATA,...o.split(".")]);n[`${i}[${s}]`]=c,$g.deleteIn(e[t],[j.CONTEXT_DATA,...o.split(".")]),io(e,t,l,r,s,i,n)}else io(e,t,l,r,s,i)},lo=e=>{const{type:t,property:n,category:r,context:s,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=Og(s);let c=[];const l=$g.getIn(i,ao(o,a,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===U.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&ro.mutateField(s,a,n,{messages:[...c],type:U.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},uo=e=>{const{property:t,pageReference:n,category:r,context:s,type:a,isListEntry:o,clearContextMessages:i,deletingIndex:c}=e,l={context:s,type:a};t&&!o?(ro.mutateField(s,n,t,{type:et,fieldName:t}),l.property=t,l.pageReference=n):o?(l.pageReference=n,l.isListEntry=o,l.deletingIndex=c):l.category=r,Ng(i?{type:et,payload:{stateObj:e.stateObj,context:s}}:{type:et,payload:l})},po=e=>{const{messages:t,property:n,pageReference:r,category:s,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=r):o.category=s,Ng({type:Ze,payload:o})},ho=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&ho(e[r],t,n)}t.pop()}return n},go=(e,t)=>{let n=lo({context:j.APP.ROOT,category:"HTTP"});if(vh.getRenderingMode()===j.EMBED){const e=lo({context:j.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=lo({context:t,category:"HTTP"});n?e&&(n=n.concat(lo({context:t,category:"HTTP"}))):n=lo({context:t,category:"HTTP"})}return n},fo=e=>{let t=null;t=Up(e)[0]?vp(Up(e)[0]):e,t&&uo({context:t,stateObj:Og(t),clearContextMessages:!0})},mo=e=>($g.getIn(Og(e),so.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===j.CUSTOM_ERROR)),Io={addMessages:po,getValidationErrorMessages:(e,t)=>{const n=Og(e),r=(e=>{let t=so.CONTENT_FIELDS_PATH;e?.objectInfo?t=xl.isObjectCaseType(e?.objectInfo?.objectTypeID)?so.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=so.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),s=$g.getIn(n,[...r])||{},a=[];return ho(s,[],[]).forEach((e=>{const n=$g.getIn(s,[...e,j.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===j.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?a.push({label:`${e.fieldLabel}:`,description:n}):a.push(n)}}))}))})),a},getMessages:lo,clearMessages:uo,getRootContainerHttpMessages:go,clearContextMessagesInActiveWorkArea:fo,clearContextMessages:e=>{const{context:t}=e;Ng({type:et,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:mo},yo=Io;const Eo=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const Ao=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let s=0,a=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(a=s),s+=1})),-1!==a&&r.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,s){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(s&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===r})),!a){const s=new Eo(e,t,n,r);this.subscribers[e].push(s)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const _o=class{static subscribe(e,t,n,r=!1,s="app"){Ao.subscribe(e,n,t,s,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Ao.publish(e,t)}static unsubscribe(e,t,n="app"){Ao.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Ao.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Ao.clearContext(e)}};const Co=new class{#e;#t;constructor(){this.#e="true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="true"===localStorage.getItem("inspectorFlag");this.#e=!e,localStorage.setItem("inspectorFlag",this.#e.toString()),_o.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,_o.publish(j.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class So{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new So(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Qo(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Zo()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,s=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:bh.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let l="";t?l=`&session_index=${t}`:`${c}`?l=`&UserIdentifier=${c}`:n&&(l=`&Password=${window.atob(n)}`);const u=new Uint8Array(64);window.crypto?.getRandomValues(u),this.config.codeVerifier=this.base64UrlSafeEncode(u),this.updateConfig(this.config,!1);const d=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${a}?client_id=${r}&response_type=code&redirect_uri=${s}&scope=openid${d}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";const t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,s=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),u=new URLSearchParams;return n&&u.append("client_id",n),r&&u.append("client_secret",r),u.append("grant_type","authorization_code"),u.append("code",l),s&&u.append("redirect_uri",s),o&&u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),Ho(a,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:u.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?Jo({pzCTkn:e?.csrf}):(Xo({tokenInfo:e}),Jo({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const To=So,No=async()=>new Promise((async(e,t)=>{const n=ei();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:s=null}=n.tokenInfo,{revoke:a}=n.endPoints,{client_id:o,client_secret:i,secureCookie:c,serverType:l}=n,u="launchpad"===l,d={"content-type":"application/x-www-form-urlencoded"};i&&!u&&(d.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const p=new URLSearchParams;i?u&&(p.append("client_id",o),p.append("client_secret",i)):p.append("client_id",o),c&&p.append("send_token_as_cookie","true");const h=s?"refresh_token":"access_token",g="access_token"===h?r:s;!c&&g&&p.append("token",g),p.append("token_type_hint",h),a&&await Ho(a,{method:"POST",headers:new Headers(d),credentials:c?"include":"omit",body:p.toString(),withoutDefaultHeaders:!0}),Jo({Authorization:null}),Xo({tokenInfo:null}),e()})),Oo=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new To(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(y()?`${y()}`:"/?reAuth=true");return t},Po=(e,t)=>{Oo(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};_o.publish(U.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},Do=e=>{let t="",n={},r={},s=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const a=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(s=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.clientSecret&&a.append("client_secret",e.clientSecret),e.secureCookie&&a.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&a.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:a.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};Xo({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?Jo({pzCTkn:n?.csrf}):Jo({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(n)},failure:t=>{if(e.popupReauth)return Po(t,e);_o.publish(U.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:Po};return{url:t,config:n,callback:r,isRefreshTokenPresent:s}},Ro=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),bo=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},vo=(e,t,n)=>{const{config:r}=e,{url:s,config:a,callback:o,isRefreshTokenPresent:i}=Do(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=qo(r.url,r,c,t);return i?Ho(s,a).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),_o.publish("updateSession",{updateStatus:"success"}),_o.publish("OnUpdateSession",{}),l.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&Ro(e.config.url,n)?(o?.failure?.(r.url,n),l):Promise.reject(e))):(o?.failure?.(r.url,n),l)},xo=(e,t,n,r)=>{if(e.config&&Ro(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(_o.unsubscribeAllWithEventType(Fo),t.setUpdateSessionStatus(!0),"custom"===n?.authType){_o.publish(U.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:s}=bo(e);return qo(n,r,s,t)}return vo(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=bo(e);return Ho(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[U.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[U.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=e.config.headers.context;return po({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const wo=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Mo=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:Co.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Hg.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:Co.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:Co.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(j.SKIPCOREHEADERS))return void delete e[j.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&$.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},Lo=Mo;const Fo="updateSession",Uo={},jo=new wo,Vo=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(_o.unsubscribe(U.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{_o.publish(U.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),_o.subscribe(U.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let ko={},$o={},Bo={},Go="";const Wo=e=>{ko=e},Ho=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:s=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0}=r;Go=s,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,withoutDefaultHeaders:l=!1,...u}=t,{Authorization:d,pzCTkn:p,...h}=t.headers||{};l||Lo.injectCoreAdditionalHeaders(h,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&Uo[a]>=0?Uo[a]+=1:a&&void 0===Uo[a]&&(Uo[a]=1);let g=l?{...h}:{...Lo.getDefaultHeaders(),...Lo.getRegisteredHeaders(),...h,context:n};if(e&&Ro(e,$o)&&jo.getUpdateSessionStatus()||!jo.getUpdateSessionStatus()){Ro(e,$o)&&"OAuth2.0"===$o?.authType&&(g={...h});const{restApi:t}=bh.doesRestApiExist("Logout")&&bh.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Vo.setTimerID(Vo.resetInactiveTimeout(Vo.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?r(a):n?r(t.defaultValue):s(new Ms)}})}))}(ja(xs({context:n,...u,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:g,withCredentials:(f=$o,!("OAuth2.0"!==f?.authType||!f.secureCookie)||!("custom"!==f?.authType||!f.customCookies)||void 0)})).pipe(Va((()=>{const e=Lo.getCoreHeadersFromContext(g.context);e&&(e=>{_o.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})})),ka((e=>{const t=g,n=!!t?.[j.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:t?.[j.COREHEADER_APP_DEBUG_ID],[j.COREHEADER_APP_DEBUG_LEVELS]:Co.getDebugLevels()}}:Lo.getCoreHeadersFromContext(g.context);throw n&&(e=>{_o.publish(j.PUB_SUB_EVENTS.FETCH_FAILURE,e)})({...n,error:e}),e}))))}var f;return qo(e,t,n,jo)},qo=(e,t,n,r)=>new Promise(((s,a)=>{_o.subscribe(Fo,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?Ho(e,t,n).then((e=>s(e))).catch((e=>a(e))):a(o.updateStatus.error)}),Fo)})),zo=e=>{Uo[e]>0&&(Uo[e]-=1,0===Uo[e]&&delete Uo[e])};xs.interceptors.request.use((e=>(ko.request&&(e=ko.request(e)),e)),(e=>Promise.reject(e))),xs.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),po({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(lo({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&uo({type:"error",category:"HTTP",context:e.config.headers.context}),lo({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&uo({type:"error",category:"PAGE",context:e.config.headers.context})),zo(e.config.headers.context)),ko.response&&(e=ko.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&zo(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&Ro(e.config.url,$o)||_o.subscribe(Fo,(e=>{jo.setUpdateSessionStatus(!e.updateStatus)}),Fo),xo(e,jo,$o,e.response&&e.response.status&&e.response.status===Number(Go)?Go:null))));const Yo=()=>xs.CancelToken.source(),Ko=e=>xs.isCancel(e),Jo=e=>{Lo.setDefaultHeaders(e)},Xo=e=>{$o={...$o,...e}},Qo=e=>{Bo={...Bo,...e}},Zo=()=>({...Bo}),ei=()=>({...$o});const ti=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),s=Number(r)+1;return`${e.substring(0,t)}(${s})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),r=e.substring(t+1,n),s=Number(r);if(!Number.isNaN(s)){const r=s-1;return`${e.substring(0,t)}[${r}]${e.substring(n+1)}`}}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}};const ni=class{static execute(e,t,n,r){const s={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{s[e]=n[e],delete n[e]})),delete n.nonFormProperties);const a={instruction:"string"==typeof t?"ADD":"INSERT",content:{...$g.unflatten(n)}},o=JSON.parse(JSON.stringify(a));delete o.content.classID;return{instruction:{target:$g.buildInstructionPageReference(r,e),content:{...o.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:a,displayPropertPayload:s}}};const ri=class{static execute(e,t,n,r,s,a,o,i){const c={instruction:"UPDATE",content:{...$g.unflatten(r)},isDefault:i},l={content:{...c.content},target:$g.buildInstructionPageReference(s,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return a||Ng(Rf({...c,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${s}${t}`,skipDirtyValidation:o})),l}};const si=class{static execute(e,t,n){return{target:$g.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const ai=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:$g.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||Ng(Rf({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const oi=class{static execute(e,t,n,r){return{target:$g.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const ii=class{static execute(e,t,n){const r={instruction:"REPLACE",content:{...$g.unflatten(t)}};return{instruction:{target:$g.buildInstructionPageReference(n,e),content:{...r.content},instruction:"REPLACE"},actionPayload:r}}};const ci=class{static execute(e,t){return{target:$g.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const li=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const ui=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new li(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const r=e.getValue(this.target)||[];if(Array.isArray(r)){if(t)return void r.forEach(((e,r)=>{t.forEach((t=>{const s=Al(t),a={};let o=!0;n&&(a[Al(n)]=crypto.randomUUID(),o=!1);const i={[s]:$g.getIn(e,s),...a};this.update(i,r+1,o,{isDefault:!0,skipDirtyValidation:!0})}))}));r.forEach(((e,t)=>{if(n&&!e[Al(n)]){const e={};e[Al(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&r&&"object"==typeof r&&!Array.isArray(r)&&Object.keys(r).length>0&&this.processObjectRows(r,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((r=>{const s=e[r];t.forEach((e=>{const t=Al(e),a={};let o=!0;n&&(a[Al(n)]=crypto.randomUUID(),o=!1);const i={[`${t}`]:$g.getIn(s,t),...a};this.update(i,r,o,{isDefault:!0})}))}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,r){const{isDefault:s=!1,skipPageinstruction:a,skipDirtyValidation:o=!1}=r,i=ri.execute(this.contextName,this.target,t,e,this.pageReference,n,o,s);if(!a){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!s){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=Lg($g.deepClone(n),e,r)}if(this.current?.automatic!==s||this.current?.instruction?.groupIndex!==t&&this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(i),s&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=Lg($g.deepClone(t),$g.unflatten(e),r)}}}delete(e,t){const n=si.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||Ng(Rf({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:s,actionPayload:a={content:{}},displayPropertPayload:o={}}=ni.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=Lg($g.deepClone(n),e,r)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=s:this.insertNode(s),n||(a.content={...a.content,...o},Ng(Rf({...a,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:r.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e,t){const{instruction:n,actionPayload:r}=ii.execute(this.target,e,this.pageReference);this.insertNode(n),t||Ng(Rf({...r,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}deletePage(e){const t=ci.execute(this.target,this.pageReference);this.insertNode(t),e||Ng(Rf({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=oi.execute(this.target,e,t,this.pageReference);this.insertNode(r),Ng(Rf({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=ai.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),ai.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=Lg($g.deepClone(t),e)}},di={},pi={},hi={},gi=(e,t,n)=>{di[e]||(di[e]={}),di[e][t]||(di[e][t]={content:[]}),pi[e]||(pi[e]=[],hi[e]=[]),yl.isStateMachineExist(e,n,t)||yl.setStateMachine(e,t,n,new ui(t,n,e))},fi=e=>ti.formatPageReference(e),mi=(e,t)=>{const n=pi[e],r=hi[e],s=Al(t),a=s?.substring(0,s.indexOf("["));r?.indexOf(a)<0&&hi[e].push(a),n?.indexOf(s)<0&&pi[e].push(s)},Ii=e=>{delete pi[e]},yi=e=>yl.buildPageInstructionsByContext(e),Ei=e=>{yl.clearStateMachines(e),delete di[e]},Ai=(e,t,n,r)=>{let[,s]=t.split(`${e}[${r}]`);""!==s&&void 0!==s&&(s=s.startsWith(".")?s.substring(1):s,Object.keys(n).forEach((e=>{n[`${s}.${e}`]=n[e],delete n[e]})))},_i=(e,t,n,r,s)=>{const{skipStateUpdate:a=!1,insertIfEmpty:o=!1}=s||{},i=n.getContextName(),c=n.getReferenceList(),l=r||n.getPageReference(),u=fi(c);gi(i,u,l),mi(i,`${c}[${t}]`),Ai(c,l,e,t);const d={instruction:j.LIST_ACTIONS.INSERT,content:{...$g.unflatten(e)}};delete JSON.parse(JSON.stringify(d)).content.classID;const p=yl.getStateMachine(i,l,u);o&&p?.root||p.insert(e,t+1,a,{c11nEnv:n})},Ci=(e,t,n=0,r={})=>{const{skipStateUpdate:s=!0,pageRef:a}=r,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(U.CONTENT)+U.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=fi(i);gi(o,l,c),mi(o,`${i}[${n}]`),Ai(i,c,e,n);yl.getStateMachine(o,c,l).update(e,n+1,s,r)},Si=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Ti=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(Si(e,n)){const n=$g.getPropertyName(e),s=n.substr(n.indexOf(".")+1).split(".");if(s.length>1){let e=$g.getIn(t,s)??"";if(!e){const n=`!P!${s.join(":")}`;e=$g.getIn(t,n)??""}$g.setIn(r,s,e)}else{const e=$g.getIn(t,s)??"";r[s[s.length-1]]=e}}})),r},Ni=(e,t,n,r,s)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:r?s:e.getStateProps().value})},Oi=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:s=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===j.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let u=t.getPageReference(),d=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,u,o);const p=t.getRawMetadata();let h=null;const g=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(d=p?.config?.dataRelationshipContext,h=u.concat(".").concat(d),u=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,d,h),{datasource:{parameters:I={}}}=m,y={...I};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=$g.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(y,m,c),c){let n=o;n=fi(n);const r=t.getValue(f)||[];gi(t.getContextName(),n,u);const a=[];let i=r.length;e.forEach((e=>{const t=Ti(I,e,d),o={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!s){const r=yl.getStateMachine(l,u,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}a.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),Ng(Rf({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Ti(y,e[0],d);Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],g?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,n[e])}))}Ni(t,f,i,c,d),r()})),Pi=e=>{if(!e)return!1;const t=(n=e,yl.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const Di=(e,t,n={})=>{const{skipStateUpdate:r=!1}=n,s=e.getPageReference(),a=fi(t);gi(e.getContextName(),t,s);yl.getStateMachine(e.getContextName(),s,a).deleteAll(r)},Ri=e=>({insert:(t,n,r,s)=>_i(t,n,e,r,s),update:(t,n,r)=>Ci(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r={})=>{const s=n.getPageReference(),{stateMachineTarget:a}=yl.getStateMachineObjByPath(`${s}${e}`,n.getContextName(),`${s}${e}`.endsWith("]"));if(!a){let e=s.substring(0,s.lastIndexOf("["));e||(e=s.substring(0,s.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&gi(n.getContextName(),t,e)}yl.executeStateMachine(n.getContextName(),`${s}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:s=!1}=r||{},a=t.getContextName(),o=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+o}[${e}]`,l=fi(o);uo({type:U.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:a,isListEntry:!0,deletingIndex:e}),gi(a,l,i),mi(a,`${o}[${e}]`);const u=yl.getStateMachine(a,i,l);"string"==typeof e?u.delete(e,s):u.delete(e+1,s);const d=yl.getUnConnectedStateMachines(a)||{};Object.keys(d).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(d[e]=null)}))})(t,e,n,r),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),s=n.getReferenceList(),a=n.getPageReference(),o=fi(s);gi(r,o,a),ro.deleteAllListNodes(r,`${a}${o}`,!1),mi(r,`${s}[${t}]`),yl.getStateMachine(r,a,o).move(e+1,t+1);const i=yl.getUnConnectedStateMachines(r)||{};Object.keys(i)?.forEach((e=>{e.includes(`${a}${o}`)&&e!==`${a}${o}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Oi(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),s=[];let a=t.getPageReference();const o=n===j.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):a.substring(a.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=a.concat(".").concat(i),a=l);const u=o?`${a}${r}`:a;let d=t.getValue(u)||[];if(Array.isArray(d)||(d=[d]),e)return Promise.resolve(d);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return d.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return Si(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&s.push(t.trim())})),Promise.resolve(s)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),s=e.getPageReference(),a=t,o=`${s}${t}`;return new Promise((t=>{let i=a;i=fi(i),gi(r,i,s),yl.getStateMachine(r,s,i).deleteAll(),Ni(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:s,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(r===j.LIST_SELECTION_MODE.MULTI&&s?i=s:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=fi(i);const r=yl.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const s=e.getContextName(),a=e.getPageReference(),o=fi(t);gi(s,o,a),yl.getStateMachine(s,a,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n)=>Di(e,t,n),replacePage:(t,n,r)=>((e,t,n,r)=>{const{skipStateUpdate:s=!1}=r||{},a=e.getPageReference(),o=e.getContextName();gi(o,t,a),mi(o,$g.buildInstructionPageReference(a,t)),yl.getStateMachine(o,a,t).replacePage(n,s)})(e,t,n,r),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:r=!1}=n||{},s=e.getPageReference(),a=e.getContextName();gi(a,t,s),mi(a,$g.buildInstructionPageReference(s,t)),yl.getStateMachine(a,s,t).deletePage(r)})(e,t,n)});const bi=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?$g.mergeDeep(e,this.fieldDefaults):$g.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},vi="downloadAttachment",xi={},wi=e=>{const t=Yo();return xi[e]=t,t},Mi=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},Li=e=>{let t,n,r,s;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,s=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:Mi(e.pyMimeFileExtension||e.MimeType),error:e.error||null,thumbnail:e.thumbnail||null},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:s,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null),localAttachment:!!e.localAttachment}}},Fi=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,"pyCount"))n=!0,t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>Li(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(Li)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},Ui={uploadAttachment:(e,t,n,r)=>{const s=new FormData;s.append("appendUniqueIdToFileName","true"),s.append("file",e);const{restApi:a,reqType:o}=Wf("uploadAttachment",{});return Ho(a,{method:o,headers:{"Content-Type":"multipart/form-data"},body:s,onUploadProgress:t,signal:wi(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(Ko,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete xi[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const s={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(s.signal=wi(n).token)}const{restApi:a,reqType:o}=Wf("linkCaseAttachment",{caseID:e});return Ho(a,{...s,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:s}=Wf("getCaseAttachments",{caseID:e,includeThumbnail:n});return Ho(r,{method:s},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:s}=Wf("getAttachmentCategories",{caseID:e,type:t});return Ho(r,{method:s},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=Wf(vi,{attachmentID:e});return Ho(r,{method:s,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=Wf("editAttachment",{attachmentID:e});return Ho(r,{method:s,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Wf("deleteAttachment",{attachmentID:e});return Ho(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Wf("downloadDocument",{documentID:e});return Ho(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:s}=Wf("deleteDocument",{caseID:e,documentID:t});return Ho(r,{method:s},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{xi[e]&&(xi[e].cancel(),delete xi[e])},buildFilePropsFromResponse:Li,getAttachmentURL:e=>{const{restApi:t}=Wf(vi,{attachmentID:e});return t},prepareAttachmentData:Fi,validateAttachments:(e,t)=>{let n=e;if("object"==typeof t&&"attachments"in t){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=Fi(t);0===e.length&&(n="")}return n}};class ji{constructor(){this.validators={}}static messageDispatcher(e,t,n,r,s){if(r){const a=[];a.push({type:U.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:s,message:r}),po({messages:a,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,s,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=r;switch(e){case"radiobuttons":o=i;break;case"attachment":o=Ui.validateAttachments(r,i);break;case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),ji.messageDispatcher(t,n,s,c,ti.getFieldLabel(a))}return c}validateType(e,t,n,r,s,a){let o=null;const i={pageReference:n,context:s,property:t,target:a?.target,required:a?.required};let c=bi.getDefaultsforType(a?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(r,i),(""!==r||bi.getDefaultsforType(a?.componentName||"")?.showErrorWhenEmpty)&&ji.messageDispatcher(t,n,s,o,a?.label));const l=a?.validationType;return c=l&&bi.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(r,i),ji.messageDispatcher(t,n,s,o,a?.label)),o}validate(e,t,n,r={}){const{context:s,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let l=null;return a||o||(c||(l=this.validateRequired(e,t,i,n,s,r)),l||(l=this.validateType(e,t,i,n,s,r))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const Vi=new ji,ki=(e,t)=>{e.DeclareExpressions&&t.context&&sn({[t.context]:e.DeclareExpressions})},$i=(e,t,n=!1)=>{const r=$g.getIn(e,j.RESOURCES);r&&((e=>{e&&tg(e)})(r),ki(r,t)),n||Xf({...e,options:t})};class Bi{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:s,viewType:a=qc.PAGE,pageName:o,context:i=j.APP.APP,debugInfo:c,headers:l,retrieveActionViewForNewObject:u=!1}=t;let d={};n&&n.content&&(d=n.content);const{content:p,pageInstructions:h}=Bi.getExternalObjectContent(e,u,i);let g={[Bi.getKeyBasedOnWorkType(e)]:e,content:{...d,...r,...xl.isExternalObject(e)&&!u&&{...p}}};g={...g,...xl.isExternalObject(e)&&!u&&{pageInstructions:h},...!xl.isObjectCaseType(e)&&{processID:s}};const f=Bi.getObjectTypeViewPayload(u,e);return Hi(xl.getRouteKeyForCreateWork(e,u),{body:g,queryPayload:{...f,caseClassName:e,viewType:a,params:{pageName:o}},headers:{...l,...c&&{...Lo.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:g,headers:Yc(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?{objectTypeID:t,actionID:"Create"}:{};static getExternalObjectContent=(e,t,n)=>{if(xl.isExternalObject(e)&&!t){const e=Kc(n,{isExternalObject:!0}),{content:t,pageInstructions:r}=e.content;return{content:t,pageInstructions:r}}return{}};static getKeyBasedOnWorkType=e=>xl.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const Gi=Bi,Wi=()=>({registerHeader:(...e)=>Lo.registerHeader(...e),unRegisterHeader:(...e)=>Lo.unRegisterHeader(...e),getRegisteredHeaders:()=>Lo.getRegisteredHeaders()}),Hi=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:s={},responseType:a},o,i)=>{const{restApi:c,reqType:l}=Wf(e,n),u={method:l,headers:s,body:t,...a&&{responseType:a}};return r&&(u.signal=r.token),Ho(c,u,o,i??{})},qi=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:s=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return Ho(e,{method:t,headers:r,body:n,withoutDefaultHeaders:s},a)},zi=e=>bh.doesRestApiExist(e),Yi=()=>Yo(),Ki=e=>Ko(e),Ji=e=>{Wo(e)},Xi=()=>Gi,Qi="getCustomComponent",Zi="text/javascript";const ec=new class{getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=vh.getBuiltOnAppNames(),s=this.loadAndFilterPegaComponentsConfig(e,r);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t,e));const o=[],i=vh.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([s,a]),[n,r]=t,i=[];for(const t of r)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);o.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([s,a,e]).then((e=>{const t=this.mergeComponentList(e);o.push(...t)}))}if(n.alternateDesignSystemURL&&1===o.length){const r=await this.getSvcComponentsConfigADS(e,t,n);o[0].alternateDesignSystemConfig=r}return{data:{components:o}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,s=[...t,...n];return this.appStaticUrl?s.map((e=>{const{name:t,type:n,subtype:s}=e,a=r.reduce(((e,r)=>(t===r.name&&n===r.type&&s===r.subtype&&(e=r),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let s=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(s=!1):r[e.field]!==e.value&&(s=!1)})),s&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const r=vh.environmentInfoObject?.pyInfinityStaticService;if(r){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync("D_pzGetComponentsConfig","",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(e)))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,s=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&s?.data?.components?.length>0&&(s.data.components=s.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===s?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s.data.components[0].alternateDesignSystemConfig=r}return s}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){const t=vh.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:r,callUrl:s}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[s]||(this.imageBlobUrlCache[s]=this.fetchImage(n,r,s,t)),this.imageBlobUrlCache[s]}buildImageRequest(e,t){let n,r="getBinaryFile",s=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^\s!]+)!.*\/OPERATORIMAGES\//i,a=e.match(t);a&&a[1]?(r="getOperatorImage",n={user_ID:a[1].toLowerCase()}):n={fileID:e},s=Wf(r,n)?.restApi||s}return{callUrlKey:r,queryPayload:n,callUrl:s}}fetchImage(e,t,n,r){return r?Hi(e,{queryPayload:t}).then((e=>{const t=this.decodeBase64ToByteArray(e.data),n=new Blob([t]);return window.URL.createObjectURL(n)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e+=1)r[e]=t.charCodeAt(e);return r}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=vh.environmentInfoObject?.pyInfinityStaticService;if(t){const t=vh.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?$g.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`;return(await Hi(Qi,{queryPayload:{componentName:r}})).data}const n=vh.environmentInfoObject?.pyC11nDXCBDevURL,r=n?`${n}/index.js`:`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,s=await fetch(r,n?{}:{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!s.ok)throw new Error(s.statusText);return await s.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e){try{const t=vh.environmentInfoObject?.pyInfinityStaticService,n=vh.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(n){r=`${n.replace(/\/+$/,"")}/index.js`}if(t&&!n){const t=vh.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?$g.parsePegaDateTimeToTimestamp(t):null,r=`${e}${n?`?v=${n}`:""}`,s=await Hi(Qi,{queryPayload:{componentName:r}});return void this.appendCustomScriptToHead(s.data)}if(t||n){const e=document.createElement("script");return e.src=r,e.type="text/javascript",e.onerror=()=>console.error("Error while appending custom component map"),void document.head.appendChild(e)}const s=n?{}:{headers:{Authorization:`Bearer ${this.b2sJWT}`}},a=await fetch(r,s);a.ok||console.error("Error while fetching custom component map");const o=await a.text();this.setCCV2LibId(e),this.appendCustomScriptToHead(o)}catch(e){console.error("Exception while appending custom component map:",e)}}async appendCustomScriptToHead(e){try{const t=document.createElement("script");t.src=window.URL.createObjectURL(new Blob([e],{type:Zi})),t.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(t)}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([r],{type:Zi})),s.onload=()=>t(e),s.onerror=()=>n(e),document.head.appendChild(s)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,r)=>{const s=document.createElement(t);if("script"===t){const t=s;t.onload=()=>{n(e)},t.onerror=()=>{r(e)},t.type=Zi,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=s;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(s)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let s=n?Object.values(e)[0]:this.getStaticServerUrl();s=s.endsWith("/")?s:`${s}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(s+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(s+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(s.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n),a=r?.tenant_id,{restApi:o,reqType:i}=Gf("getAssetsFromIsolations",{isolationID:a,assetPath:e})||{},c=`${this.appStaticUrl}${o}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},tc="component-loader",nc={},rc=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=ec.getLoader(),r=t||ec.staticServerURL;if(ec.getLoader(tc))return ec.getLoader(tc)(e,r);const s=new Set(Object.keys(nc)),a=e.flatMap((e=>{if(s.has(e))return[];const t=cn.getComponent(e);if(!t){const t=`${ec.getConstellationServiceUrl()}/v860/${ec.getAppAlias()}/component/${e}.js`;return s.add(e),[n(t,ec.getTypes.SCRIPT)]}const a=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${r}${e}`,ec.getTypes.SCRIPT))),o=(t.styles||[]).map((e=>n(`${r}${e}`,ec.getTypes.STYLE)));return s.add(e),[...a,...o]}));return Promise.all(a.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))};const sc=new class{#n;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#n=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?$g.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(zi("getUserSettings")){const{restApi:e,reqType:t}=Wf("getUserSettings");Ho(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{vh.getUserSettings()?this.userSettings=vh.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return $g.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let n;if(!zi("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=Wf("updateUserSettings");const{restApi:r,reqType:s}=n;return Ho(r,{method:s,body:$g.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#n){this.#n=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};_o.subscribe(j.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}getURLParam(e,t){let n=new URL(window.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!vh.shouldUseURLParams())return;const r=new URL(window.location.href);if(t=n?btoa(t):t,r.searchParams.get(e)===t)return;r.searchParams.set(e,t);window.history.pushState({type:"ui-navigation"},"",r)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const ac=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&Ng({type:oe,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>{setTimeout((()=>t(e)),this.pauseDuration)}));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&Ng({type:ie,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}};const oc=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,s="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:s,promise:t,resolve:n,reject:r,actionPayload:a};return this.actionMgrActions[e]=i,o&&ac.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,r;""===t&&(t=this.getNextActionMgrId());const s=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,s,n,r,e),{actionMgrID:t,promise:s}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let s=e;return r?(setTimeout((()=>{r.resolve(t)}),0),ac.disableLoadingIndicator(r.actionPayload,n)):s=null,s}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let s=e;return r?(r.reject(n),ac.disableLoadingIndicator(r.actionPayload,t)):s=null,s}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=$.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=V,e.gadgetId=t.gadgetId??xl.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}};class ic{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const cc=ic,lc=(e,t,n)=>bh.getResolvedSemanticURL(e,t,n),uc={getResolvedSemanticURL:lc,getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ve,ACTION_SHOWVIEW:je,ACTION_GETOBJECT:Tt,ACTION_SHOWINSIGHT:ke,ACTION_SHOWDASHBOARD:$e}),updateSemanticURLAndDocumentTitle:e=>bh.updateSemanticURLAndDocumentTitle(e),getSemanticURLForToaster:(e,t,n=!1)=>lc(n?Tt:Be,{caseClassName:e},{[n?"objectID":"workID"]:t})},dc={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${j.DATA}.${j.CASE_INFO.BUSINESS_ID}`},pc=e=>$g.getIn(e,j.getProperty(dc.CASE_CLASS_NAME),j.EMPTY_STRING),hc=e=>$g.getIn(e,j.getProperty(dc.CASE_INFO_ID),j.EMPTY_STRING),gc=(e,t)=>{const n=hc(t);$g.setIn(e,"key",n)},fc=e=>$g.getIn(e,j.getProperty(dc.CASE_INFO),{}),mc=e=>{const t=Tg();if(!e)return!1;const n=W(e),r=Kp(n),s=Kp(e);if(!r||!s)return!1;const a=_p(r,n),o=_p(s,e);if(!a||!o)return!1;const{key:i}=a;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},Ic=e=>{const t=hc(e),n=$g.getIn(e,j.getProperty(dc.BUSINESS_ID),j.EMPTY_STRING),r=t.toLowerCase().includes(n.toLowerCase())?n:t,s=pc(e);return{businessID:n,caseType:s,resolvedURL:uc.getSemanticURLForToaster(s,r,xl.isObjectCaseType(s))}},yc=e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Ec=e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},Ac=e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},_c={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Cc=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||cc.getTargetViewContainerName(e)},Sc=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},Tc=e=>e===Ip.WORKAREA,Nc=e=>e===Ip.MODAL,Oc=e=>e===ve,Pc=e=>e===Ee,Dc=e=>e&&e.find((e=>e.type===Ee)),Rc=e=>$g.getIn(e,_c.CASE_INFO,{}),bc=e=>e?e.split(" ").pop():void 0,vc=e=>$g.getIn(e,_c.CASE_CLASS_NAME,j.EMPTY_STRING),xc=(e,t=!1)=>{const n=t?fc(e):Rc(e);return Ml(n)&&Ll(vh.getOperatorIdentifier(),n)},wc=e=>$g.getIn(e,_c.CASE_INFO_ID,j.EMPTY_STRING),Mc=e=>$g.getIn(e,_c.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),Lc=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:s}=n;e.push(Nf(yf,{containerItemID:t,context:s||Mp(t),target:r}))}},Fc=e=>{const t=Tg();if(!e)return!1;const n=W(e),r=Kp(n),s=Kp(e);if(!r||!s)return!1;const a=_p(r,n),o=_p(s,e);if(!a||!o)return!1;const{key:i}=a||{};let{key:c}=o||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},Uc=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,s=wc(t);$g.setIn(e,"key",s);const a=Ml(Rc(t));if(!r&&(e=>{const t=$g.getIn(e,_c.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=Mc(t),[,r]=n.split("!");(e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:a}),$g.setIn(e,"flowName",r)}},jc=(e,t)=>{const{attachmentsExist:n}=t;n&&$g.setIn(e,U.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),$g.setIn(e,U.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Vc=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return Dc(e)?(r=j.PROMISE_VALUE.REJECT,n?oc.rejectActionByID(t,!0,n):oc.rejectActionByID(t)):oc.resolveActionByID(t),r},kc=e=>{const t=vh.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},$c=()=>"true"===vh?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,Bc=(e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r){const{caseClassName:a,skipAssignmentsUpdate:o}=n,i=W(r),c=Kp(i),l=c&&Ap(c),u=c&&vp(c),d=Y(i);u&&l?.items?.[u]?.key===t?.caseID&&e.push(Nf(Zg,{containerItemID:i,context:i,container:d,containerName:d,caseId:s,viewName:U.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:i},caseClassName:a,...void 0!==o&&{skipAssignmentsUpdate:o}}))}},Gc=(e,t)=>{const n=vc(e?.response),r=Rc(e?.response),{caseTypeID:s}=r,a=vh.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&rg(j.CASESUMMARY_VIEW_NAME,s)&&Bc(t,e?.actionInPayload,{caseClassName:n,skipAssignmentsUpdate:!0})},Wc=e=>Og(e)?.context_data?.caseViewMode,{RESOURCE_TYPES:Hc}=U,qc={PAGE:"page",FORM:"form"},zc={[Hc.CASE]:[We,Be,Ge],[Hc.OBJECT]:[St,Tt,Ot],[Hc.PAGE]:[je,ke],[Hc.DATA]:[Ve],ASSIGNMENT:[Qe]},Yc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:s}=n;return e[U.REMOTE_SYSTEM_ID]||e[U.REMOTE_SYSTEM_ID.toLowerCase()]||s?r.RemoteSystemID=e[U.REMOTE_SYSTEM_ID]||e[U.REMOTE_SYSTEM_ID.toLowerCase()]||s:t&&$.isRemoteCase(t)&&(r.RemoteSystemID=$.getRemoteHeader(t)),r},Kc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=Pl(e,{isTransientContext:a,includeDisabledFields:o,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,a&&(l={}));const u=sp(e,!1);!a&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const s=Og(t),a=R()(s,U.CASE_INFO.CASE_INFO_CLASSID),o=Kh(n,a);("True-False"===o?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(l,e);const d=w()(u,l);let p={};({content:p}=((e,t,n=!1,r=!1)=>{let s={};const a=n||r?t?.objectInfo:t?.caseInfo;return(e||a)&&(s=e?{...t}:{...a}),{content:s}})(a,d,i,c));const h=[...yi(e)];s&&h.forEach((e=>{delete e.content?.EmbedListUUID__})),p.pageInstructions=h;if((pi[e]||[]).forEach((e=>{if(p?.content){const t=e?.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");$g.deleteIn(p.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!a&&d?.dataInfo)return p={...d.dataInfo,pageInstructions:p.pageInstructions},{content:p};const g=Rg(".pzAdditionalPayload",j.CASE_INFO.CASE_INFO_CONTENT,e);return p.content&&g&&(p.content.pzAdditionalPayload=g),{content:p}},Jc=(e,t)=>{let n,r,s={};const a=$g.getIn(e,j.UI_RESOURCES),o=$g.getIn(e,"confirmationNote");a?(n=$g.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=$g.getIn(e,j.ROOT),s=$g.getIn(e,j.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,flowName:l}=e;let{semanticURL:u,key:d}=e;const p=i?.objectInfo?.ID;p&&(d=d||p,u=u||`objects/${p}`);const h=$g.getIn(e,"nextAssignmentInfo",null),g=$g.getIn(e,"nextAssignmentInfo.context",""),f=$g.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:I,debugInfo:y,isExternalObjectCreationFlow:E}=t;return{data:{...i,key:d,flowName:l,coreHeaders:y&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:y.debugId}},[j.getProperty(j.CASE_INFO.CASE_INFO)]:{...i[j.getProperty(j.CASE_INFO.CASE_INFO)],actionButtons:s,headers:t.headers},[j.CONTEXT_DATA]:m?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:I,errors:c,isExternalObjectCreationFlow:E}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:u,nextAssignmentInfo:h,assignmentContext:g,confirmationLinks:f,key:d,root:r,...t}},Xc=async(e,t,n,r=!1,s=!1)=>{const a=$g.getIn(e,j.LOCALE_REFERENCES);await Mh.loadLocaleResources(a);const o=$g.getIn(e,j.COMPONENTS);if(o)try{await rc(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Xf({...e,options:i,directUrlUpdation:!0}):$i(e,i,s)},Qc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},Zc=e=>{if(e){const[,t]=e.split("!");return{key:Qc(e),flowName:t}}return{}},el=(e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const s=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${s}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,o=$g.deepClone(e);o[j.ERROR_FIELD_IN_PAGE]=s,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("(")))?r.push(o):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const s=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(s)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}},tl=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:s}=t,a=n&&n.response?n.response.data:"",o=Rl(r);return s&&oc.rejectActionByID(s,!0,n),Nf(Of,"Error action triggered",a,r,o)},nl=(e,t)=>kp(e)&&Bp(e)?Nf(_f,t):Nf(af,t),rl=(e,t,n=j.APP.APP,r={})=>{let s=null;const{buildNew:a=!0}=r;return kp(e)?s=Bp(e)?vp(e):H(t,n):$p(e)&&(Bp(e)&&!a?s=Lp(e):Bp(e)&&!a||(s=H(t,n))),s},sl=e=>e&&e.type===Ce,al=e=>{let t=!1;const n=jp(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&up(r)){t=!0;break}}return t},ol=(e,t={})=>{let n=!1,r=!1,s={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1}=t;if(kp(e)){const t=vp(e);if(!t)return{continueExecution:a,removeActionPayload:s};const r=Mp(t);up(r)&&(n=!0),u||n||(n=al(t))}else if($p(e)&&Hp(e)){let t=Yp(e);t||(t=vp(e),r=!0),s.containerItemID=t,s.context=Mp(t)}if(n){const e=l||np;o=window.confirm(Mh.getLocaleValue(e,"Messages"))}if(!o&&n&&(s={},a=!1),r){const e=Mh.getLocaleValue(rp,"Messages");c?i=window.confirm(e):(window.alert(e),a=!1)}return!i&&r&&(s={},a=!1),{continueExecution:a,removeActionPayload:s}},il=(e,t)=>{let n=!1;const r=vh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:s,isParallelCall:a,skipFlowNameCheck:o}=t;if(!s)return{};const[,i]=s.split("!")||"",c=o?s:Qc(s),l=Op(e,c);let u={},d=!1;if(l&&!r&&((e,t)=>{const n=_p(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,u=_p(e,l),!o)){let e=u?.flowName;const t=Sc(l),r=Fp(l);if(r.length){const n=Pt(t,r[0]);e=_p(n,r[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:s}}},cl=(e,t,n)=>e===Hc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,s=Op(e,r);return s&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:s,semanticURL:r}}})(t,n):e===Hc.ASSIGNMENT?il(t,{...n,type:e}):e===Hc.CASE||e===Hc.OBJECT?il(t,{...n,skipFlowNameCheck:!0,type:e}):{},ll=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),ul=(e=[])=>{Bp(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(Nf(sf,qp({context:U.APP.APP,name:j.PREVIEW})))},dl=e=>{let t;for(const n of Object.keys(zc))if(zc[n].includes(e)){t=n;break}return t},pl=(e,t,n="")=>{const{data:r={},context:s,caseViewMode:a}=e,o={data:{...r},caseViewMode:a,context:W(s)};$g.deleteIn(o.data,"shared"),$g.setIn(o.data,["context_data","caseViewMode"],a),t.push({type:ot,payload:{context:o.context}});const i=n&&![U.CASE_INFO.CASE_INFO_CONTENT,U.DATA_INFO.DATA_INFO_CONTENT].includes(n);t.push(Nf(Xg,{...o,...i&&{uiRootReference:n}}))},hl=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=$g.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=$g.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:$g.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:$g.getIn(t,["payload","context"]),context:$g.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),Ng(e),e=e.filter((e=>e.type!==he))}const s=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:$g.getIn(t,["payload","target"]),context:$g.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);kp(s.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(s.isMultiDoc=!0,e=[]);const a={type:ge,payload:{...s}};e.push(a),Ng(e)}else Ng(e)}},gl=(e,t)=>w()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),fl=e=>{let t={},n=gh(e);for(;n;){const e=Kc(n);t=gl(e.content,t),n=gh(n)}return t};class ml{static getChanges(e){return{...sp(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t||{},{content:s}=Kc(e,{isTransientContext:n,includeDisabledFields:r});return s}static isStateModified(e){return up(e)}static isFormValid(e,t){return Dl(e,t)}static clearChangedProperties(e){return Ei(e),Ii(e),pp(e)}static getEditableFields(e){return bl(e)}static setCustomValidator(e,t){Vi.register(e,t)}static isPropertyEditable(e,t){return ml.getEditableFields(e).some((e=>e.name===t))}}const Il=ml;const yl=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const s=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(s,e,!0,!0),o=(t,n,r=!1)=>{const s=r?this.states:this.unConnectedStates;s[e]||(s[e]={}),s[e][t]||(s[e][t]={}),s[e][t]=n};if(a&&a.targetPageReference!==r.targetPageReference)return a.addChild(r),void o(s,r);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(s)){const t=e.substring(0,s.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],r.addChild(n),o(t,n)})),this.states[e][s]=r):o(s,r,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((s=>{const a=ro.getContextReferences(e)?.get(s),o=a&&Hg.resolveContextTreeNodeProps(a.props)||{},i=n[s];if(a&&!0!==o.readOnly){const e=i.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),$g.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,""),r=ro.getFieldReferenceForProperty(e,t);if("Multiselect"===r?.props?.componentName&&n?.current?.instruction?.instruction===j.LIST_ACTIONS.DELETE_ALL)return;n.root=null,n.current=null;const s=this.getUnConnectedStateMachines(e)||{};Object.keys(s).forEach((e=>{e.includes(t)&&delete s[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const r=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&r&&gi(t,r,n)}getStateMachineObjByPath(e,t,n,r=!1){const s=/\[\d+\]$/gm,a=e;let o;for(;e&&!this.isStateMachineExist(t,"",e);){const i=Kp(t),c=_p(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(o=null,n&&e.endsWith("]")){if(o=e.match(s),o=o?.[o.length-1]?.substring(1,o[o.length-1].length-1),[e]=e.split(s),!r&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(a,t);break}}else{if(c?.index&&e.includes(c.index)&&l){const t=e.split(".");o=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:o}:{}}executeStateMachine(e,t,n,r=!0,s={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,r);if(!a)return!1;const i=Kp(e),c=_p(i,e)||{};let[,l]=t.split(a);if(!l)return!1;const u=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==o&&([,l]=u?l.split(/(?=\.\w+)/):l.split(/^\[\d+\]/gm));const d={[Al(l)]:n},p=this.getStateMachine(e,"",a);if(null!==o)if(u){const t=yi(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},o,s.skipStateUpdate??!0,s)})),p?.update(d,o,s.skipStateUpdate??!0,s)}else p?.update(d,Number(o)+1,s.skipStateUpdate??!0,s);else p?.updatePage($g.unflatten(d));return!0}registerForServerChanges(){Ag.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){Ag.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const r="].";if(!t.includes(".classID")&&Il.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(r)){const s=t.substring(0,t.lastIndexOf("[")),a=Il.getEditableFields(e);if(["multiselect","checkbox"].includes(a.find((e=>e.name===s))?.type)){const a=ro.getContextReferences(e),o=a?.get(s),i=t.substring(t.lastIndexOf(r)+2);o?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){Ag.unRegisterForListChanges()}},El={},Al=e=>e.startsWith(".")?e.substring(1):e,_l=e=>{delete El[e]},Cl=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Hg.resolveContextTreeNodeProps(e),s=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.disabled),a="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),o=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||o)&&!a&&s},Sl=(e,t,n,r,s)=>(yl.executeStateMachine(e,r,Hg.getLitePropertyValue(n,t))||s.push(r),s),Tl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:s=!0}=n;return(!r||r&&!s)&&!Array.isArray(Hg.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},Nl=(e,t={})=>{let n=[];const r=[],s=ro.getContextReferences(e);return s?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let s=[];for(const[a,o]of e){const e=Hg.resolveContextTreeNodeProps(o.props),i=e.propertyName;Cl(o.props,{includeDisabledFields:r})&&Tl(a,e,n)&&(s=Sl(t,i,e,a,s))}return{editableFormFieldsReferenceList:s}})(s,e,t)),El[e]&&r.push(...Object.keys(El[e].fieldOrder??{})),{formInputs:n,formPageFields:r}):{formInputs:n,formPageFields:r}},Ol=e=>{let t=[];const n=ro.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Cl(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},Pl=(e,t={})=>{const n={},r=Og(e),{ignoreFieldsInsideList:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>e||t?n?.objectInfo:n?.caseInfo)(i,c,r);if(a||l){const{formInputs:t,formPageFields:i}=Nl(e,{ignoreFieldsInsideList:s,includeDisabledFields:o});((e,t,n)=>{e.forEach((e=>{let r=$g.getIn(t,e);"object"==typeof r&&(r=$g.deepClone(r),delete r?.classID),$g.buildObject(e,n,r)}))})(i,r,n),t&&t.length>0?t.forEach((e=>{$g.buildObject(e,n,$g.getIn(r,e))})):a||$g.buildObject(U.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!a&&r?.dataInfo?.content){const{formInputs:t}=Nl(e,{ignoreFieldsInsideList:s});t.forEach((e=>{$g.buildObject(e,n,$g.getIn(r,e))}))}return n},Dl=(e,t)=>{const n=ro.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,s]of n){const n=Hg.resolveContextTreeNodeProps(s.props);if(Cl(s.props)&&(!t||e.includes(t))){const e=Vi.validate(n.componentName?.toLowerCase(),n.propertyName,Hg.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},Rl=(e,t=!1)=>{const n=ro.getContextReferences(e),r=[];if(n)for(const[e,s]of n){if(!1!==Hg.resolveContextTreeNodeProps(s.props).visibility){const n=8,s=t?e:e.substring(e.indexOf("content")+n);r.push(s)}}return r},bl=e=>{const t=[],n=ro.getContextReferences(e);if(n)for(const[e,r]of n){const n=Hg.resolveContextTreeNodeProps(r.props);Cl(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class vl{static isCaseActive(e,t){if(!e||!t)return!1;const n=Ap(t);if(n){const r=vp(t),{items:s={}}=n;return!(!r||!s[r]||s[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:s}=Wf("loadView",n);return Ho(r,{method:s},t)};static isExternalCaseType=e=>{const t=vh.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e));return!!t};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:s}=Wf(Ke,n);return Ho(`${r}?viewType=page`,{method:s},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const s={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:a}=Wf(Ke,s),o=t[e];return Ho(`${a}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>Og(e)?.caseMessages;static getPropertiesToReplace=e=>(Ol(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(Ol(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>$g.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>$.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>$.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=vh.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=vh.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&t[0].DisplayMandatoryInputsForObject};static getRouteKeyForCreateWork=(e,t=!1)=>vl.isExternalObject(e)&&t?"retrieveActionViewForNewObject":vl.isObjectCaseType(e)?St:yt}const xl=vl,wl=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},Ml=e=>{if(xl.isObjectCaseType(String(e?.objectTypeID))&&!wl(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},Ll=(e,t)=>{if(e&&t){const n=$g.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:s}=n;return"worklist"===s?.toLowerCase()&&r===e}return!1},Fl=(e,t)=>{const n=Hg.getPropertyValue(U.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Hg.getPropertyValue(U.CASE_INFO.AVAILABLEACTIONS,t,e);let s=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(s=e.type.toLowerCase()===U.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=Og(e);s=t?.context_data?.actionType===j.CASE}return s},Ul=e=>bg(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),jl=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Vl=(e,t,n)=>{let r;const s=e?.find((e=>e.ID===t))?.actions,a=s?.filter((e=>e.ID===j.FIX_BROKEN_ASSIGNMENTS))||[];return r=n&&a?.length>0?a[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r},kl=(e,t,n)=>{let r,s,a,o,i,c,l,u,d;const p=Og(e),h=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID;return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,s=p.caseInfo.ID,a=p.caseInfo.assignments,o=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,u=p.caseInfo.caseTypeID,d=p.caseInfo.caseTypeName):p?.objectInfo&&xl.isObjectCaseType(h)?(s=p.objectInfo.ID,o=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,l=p.objectInfo.businessID,u=p.objectInfo.objectTypeID,d=p.objectInfo.objectTypeName):(r=t.getValue(j.getProperty(U.CASE_INFO.ASSIGNMENT_ID)),s=t.getValue(j.getProperty(U.CASE_INFO.CASE_INFO_ID)),a=t.getValue(j.getProperty(U.CASE_INFO.ASSIGNMENTS)),o=t.getValue(j.getProperty(U.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(j.getProperty(U.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(j.getProperty(U.CASE_INFO.CASE_INFO)),l=t.getValue(j.getProperty(U.CASE_INFO.BUSINESS_ID)),u=t.getValue(j.getProperty(U.CASE_INFO.CASE_TYPE_ID)),d=t.getValue(j.getProperty(U.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:r,caseID:s,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}},$l=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),r=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{r.append(t,String(e[t]))})),n.search=r.toString(),n.toString()}return t},Bl=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],r=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===r){n.forEach((e=>{e.isErrorButton=!0}));const r=e.payload.context,s=Og(r),a=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,s?.caseInfo?.actionButtons?.secondary||[]),o={data:{["dataObject"===t?U.DATA_INFO.DATA_INFO:U.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:a}}},target:Kp(r),context:r};Ng({type:fe,payload:o})}};const Gl=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,s=ro.getContextReferences(e)?.get(`${t}${r}`)?.props;return s?Hg.resolveContextTreeNodeProps(s):s})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:s}=Vi.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return s?{status:!1,message:s}:{status:!0}}},Wl="OPEN_PROCESS_ACTION",Hl="OPEN_ASSIGNMENT",ql="DELETE_CASE_IN_CREATE_STAGE",zl="SAVE_AND_CLOSE",Yl=e=>({type:zl,payload:e}),Kl="DELETE_WORK";const Jl=class{static getSavableDataPage(e){return hg(e)}static getLookUpDataPage(e){return fg(e)}static getLookUpDataPageInfo(e){return mg(e)}static getDataPageKeys(e){return gg(e)}};const Xl=class{static getPropertyName(e){return un.getPropertyName(e)}static isProperty(e){return un.isProperty(e)}static getLeafPropertyName(e){return un.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class Ql{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:s,items:a}=e;if(s&&a){const e=s[s.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const s=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=s,{viewName:l,viewContext:u}=this.processRootViewDetails(i,s,t);if(!l)return null;return Md({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===Ip.WORKAREA||n===Ip.MODAL||l===j.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:s}={}}=e,{context:a}=t;let o=s,i=r;const c=Xl.isProperty(s),l=Xl.isProperty(r);if(l){const e=Xl.getPropertyName(r);i=Rg(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=Xl.getPropertyName(s);o=Rg(`.${e}`,i,a)}return c&&l&&""!==o&&(o=s,i=r),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,s;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=vp(e),a=_p(e,t);a&&({key:r,flowName:s}=a)}t.addContainerItem({semanticURL:"",key:r,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(j.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),r=t.find((e=>e.ID===n));return r?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(j.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:r})=>{const s=e.map((e=>({...e,caseName:t,caseTypeID:r})));n=n.concat(s)})),n};static hasAssignments=e=>{const t=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=Ql.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||Ql.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return Ql.hasNotificationMessages(t)||!Ql.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:r}=t;return r&&(!Ql.isCaseWideLocalAction(n)||Ql.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(j.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),r=e.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],s=Ql.getChildCaseAssignments(e)||[];let a=JSON.parse(JSON.stringify(s));a=a.map((e=>(e.isChild=!0,e)));const o=[...r,...a];let i=JSON.parse(JSON.stringify(o));return t&&!Ql.showTodo(e)&&(i=i.map((t=>(t.name=Ql.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const Zl=Ql;const eu=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=oc.getNextActionMgrId();let n,r;const s=new Promise(((e,t)=>{n=e,r=t}));if(!n||!r)throw new Error("resolveFn or rejectFn is not defined.");return oc.register(t,s,n,r,e),{actionMgrID:t,promise:s}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),o={...r,...e,actionMgrID:s};return Ng(rf(o)),a}addContainerItem(e){const t=Ce,n=this.c11nEnv,r=n.getMetadata(),{children:s}=r||{};let a;Array.isArray(s)&&s.length>0&&([a]=s);const o=n.getContextName(),i=n.getContainerName(),c=H(i,o,e?.containerType===j.CONTAINER_TYPE.SINGLE),l=Pt(i,o),u={root:{...a,config:{...a?.config,context:a?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),h={...u,...e,actionMgrID:d};return Ng(af(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=xe,n={context:Mp(e.containerItemID),target:Kp(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ng(pf(a)),s}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=ve,n={target:Kp(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ng(mf(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Se,n={context:Mp(e.containerItemID),target:Kp(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ng(yf(a)),s}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=_e,n=qp(e),{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return Ng(sf(a)),s}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),s=z(t,r),a=eh(r);return s&&a.includes(s)||Ng(of({transientItemID:s,contextName:r,target:Kp(r),data:n})),s}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!eh(r).includes(t))return;Ng(cf({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:s}=e;if(s&&r){if(!eh(t).includes(s))return;Ng(Af({target:n,containerItemID:r,transientItemID:s}))}}createContainerPConnect(e,t,n,r=!1){Zl.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Bp(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Rp(e,t)}};var tu=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function nu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,s=e.length;return n=1===s?function(t){return tu(t.type,e[0])}:function(t){for(var n=0;n<s;n++)if(tu(t.type,e[n]))return!0;return!1},va((function(e,t){var s=0;e.subscribe(xa(t,(function(e){return n.call(r,e,s++)&&t.next(e)})))}))}function ru(e,t){return va((function(n,r){var s=null,a=0,o=!1,i=function(){return o&&!s&&r.complete()};n.subscribe(xa(r,(function(n){null==s||s.unsubscribe();var o=0,c=a++;Da(e(n,c)).subscribe(s=xa(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){s=null,i()})))}),(function(){o=!0,i()})))}))}function su(e,t){return va((function(n,r){var s=0;n.subscribe(xa(r,(function(n){r.next(e.call(t,n,s++))})))}))}function au(e,t,n){return void 0===n&&(n=1/0),qs(t)?au((function(n,r){return su((function(e,s){return t(n,e,r,s)}))(Da(e(n,r)))}),n):("number"==typeof t&&(n=t),va((function(t,r){return function(e,t,n,r,s,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},h=function(e){return l<r?g(e):c.push(e)},g=function(e){a&&t.next(e),l++;var i=!1;Da(n(e,u++)).subscribe(xa(t,(function(e){null==s||s(e),a?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?ba(t,o,(function(){return g(e)})):g(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(xa(t,h,(function(){d=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function ou(e){return e&&qs(e.schedule)}function iu(e){return e[e.length-1]}function cu(e){return ou(iu(e))?e.pop():void 0}function lu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ja(e,cu(e))}var uu=new Ea((function(e){return e.complete()}));function du(e){return e?function(e){return new Ea((function(t){return e.schedule((function(){return t.complete()}))}))}(e):uu}const pu=(e,t,n)=>ka((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),lu(Of(e,r,t,null,n))))),hu=(e,t)=>n=>new Ea((r=>{let s={},a=0;return n.pipe(au((n=>{const r=Date.now();let o;return o=t||h(),o&&o(n,s)&&r-a<e?du():(s=n,a=r,lu(n))}))).subscribe(r)})),gu=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s}=e,a={data_view_ID:t},{restApi:o,reqType:i}=Wf("createDataObject",a),{content:c}=Kc(s);return ja(Ho(o,{method:i,headers:r,body:{data:c.content,pageInstructions:c?.pageInstructions}},s)).pipe(su((t=>({response:t.data,actionInPayload:e}))),pu("Error occurred during ajax call at createDataObject Epic",n))},fu=e=>{const{dataLookUp:t,context:n,headers:r,viewName:s,requestPayload:a}=e,o={data_view_ID:t,view_ID:s},{restApi:i,reqType:c}=Wf("readDataObject",o);return ja(Ho(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe(su((t=>({response:t.data,headers:Yc(t.headers),actionInPayload:e}))),pu("Error occurred during ajax call at getDataObjectView Epic",n))},mu=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=Wf("updateDataObject",o),{content:l}=Kc(s);return ja(Ho(i,{method:c,headers:{...r,"if-match":e?.etag},body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},s)).pipe(su((t=>({response:t.data,actionInPayload:e}))),pu("Error occurred during ajax call at updateDataObject Epic",n))},Iu=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:s,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:s},{restApi:i,reqType:c}=Wf("openDataObjectAction",o);return ja(Ho(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe(su((t=>({response:t.data,headers:Yc(t.headers),actionInPayload:e}))),pu("Error occurred during ajax call at getDataObjectView Epic",n))},yu=e=>{const{savableDatapage:t,context:n,headers:r,actionID:s,keys:a,containerItemID:o,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:s};let{restApi:l}=Wf("submitDataObjectAction",c);const{reqType:u}=Wf("submitDataObjectAction",c),{content:d}=Kc(o);return l=$l(i,l),ja(Ho(l,{method:u,headers:{...r,"if-match":e?.etag},body:{data:{...d?.content,...a},pageInstructions:d?.pageInstructions||[]}},n)).pipe(su((t=>({response:t.data,actionInPayload:e}))),pu("Error occurred during ajax call at getDataObjectView Epic",n))};const Eu=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,s){const a={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][s]=a}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:s}=n;Vd(e,r,t,s,{})}}},Au="postDataViewMetadata",_u={getData:(e,t,n,r)=>((e,t,n,r={})=>{const s={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=Wf("getListData",s);return Ho(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:s,reqType:a}=Wf("getListDataCount",r);return Ho(s,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const s=!!n,a=!!r,o=bh.doesRestApiExist(Au),i=(s||a)&&o?Au:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=Wf(i,c);if(o){if(s)return Ho(l,{method:u,body:{associationFilter:n}},t);if(a)return Ho(l,{method:u,body:{propertyFilter:r}},t)}return Ho(l,{method:u},t)},getDataObjectView:(e,t,n,r,s={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=Wf("readDataObject",c);return Ho(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},r,i)},getCaseEditMetadata:(e,t)=>xl.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>xl.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>xl.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:s,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=Wf("moveListRecords",c);return Ho(l,{method:u,body:{content:{sourceID:n,destinationID:r,context:s,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Up("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${ec.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=vh.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const Cu=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const Su=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),s=this.users[e];if(s)return s.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return bu.subscribe(a,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],bu.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};var Tu=s(631),Nu=s.n(Tu);const Ou=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),s=Object.keys(e);0===Nu()(r,s).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};bu.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}};const Pu=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Ou("CASE",t)}return this.subscriptions[e]}};const Du=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static publishCaseValuesUpdate(e,t){const n=`${t.actionInContext}/workarea`;Object.entries(e.message).forEach((([e,t])=>{const r=Lp(n)||"",s=this.transformReference(e),{pageReference:a,propertyName:o}=this.extractReferenceParts(s);e.match(/\.\w+\[\d+\]\.\w+/)&&yl.executeStateMachine(r,s,t,!0,{skipStateUpdate:!0});Ng([{type:Q,payload:{reference:s,value:t,context:r}},{type:ee,payload:{reference:s,value:t,context:r,pageReference:a,propertyName:o}}])}))}};class Ru{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new Su;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=ec.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${r}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=ec.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){const t=Ru.agentSubscribeIdMap.get(e.assignmentID);Ru.unsubscribe(t??""),Ru.agentSubscribeIdMap.delete(e.assignmentID)}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=Ru.subscribe(t,(t=>{Du.publishCaseValuesUpdate(t,e)}));Ru.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket?.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const s=this.subscribers[r];s.filter.matcher===e&&$g.isEqual(s.filter.criteria,n)&&s.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){_o.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,Ru.subscribeAgentMessageCaseValues),_o.subscribe(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,Ru.unsubscribeAgentMessageCaseValues),this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const s=r||`${Date.now()}_${this.connectionsCount}`,a=new Cu(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(a,s),s):(this.inProgressSubscriptions.push({messageSubscriber:a,id:s}),null===this.webSocket&&this.initConnection(this.connectionConfig),s)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>Pu.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:ec.b2sJWT}};Hi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(ec.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const bu=Ru;const vu=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){const t=[],{pageNumber:n,pageSize:r}=e,s=n*r;let a=s-r;for(;a<s;a+=1){if(!this.records[a])return this.maxRecords===a?t:[];t.push(this.records[a])}return t}return this.records}mergeRecords(e,t){if(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:r}=t,s=n*r;let a=0;for(let t=s-r+1-1;t<s;t+=1)this.records[t]=e[a],a+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=Lg(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const xu=new class{SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t,n,r){const s=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][s]){const t=this.dataStore[e][s];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},r,s,a={}){if(this.subscribeToMessageService(e),a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,s)||a.invalidateCache){const o=await this.fetchData(e,n,r,s,t,a),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,s);if(o.length>0)return Promise.resolve({data:o});const i=await this.fetchData(e,n,r,s,t,a);return{...i.data,data:this.mergeDataStore(e,n,r,s,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){this.subscribeToMessageService(e);const s=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][s]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][s]);delete this.dataStore[e][s],this._removeDataStoreMetaEntry(e,n,s)}const{restApi:a,reqType:o}=Wf(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o},c=a&&n&&0===Object.keys(n).length?a.split("?")[0]:a;return Ho(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[s]:t.data},this._addDataStoreMetaEntry(e,n,s)),t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const s=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[s]??={};const o=a[s];return!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&$g.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new vu;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const s=this.dataStoreMeta[e];s[r]??=[];const a=s[r];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,s){const a=this.generateHash(e,t,r),o=s?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new vu);const i=this.dataStore[e][a];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,a),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}subscribeToUpdate(e,t,n,r,s,a){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},a&&!this.subscribers[e].callback?.[a]&&(this.subscribers[e].callback[a]=s),this.subscribeToCascadeUpdates(e,t,n,r,a)}unsubscribe(e,t,n,r,s){delete this.subscribers[e]?.callback?.[s],t&&t.length>0&&Ag.unRegisterFields(n,r,t,s)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:s=""}=n,a=this.subscribers[r];this.markDataInstanceDirty(r,""===s?null:JSON.parse(s)),t&&this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r?.push(this.generateHash(e,null)),r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,s=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(s){const t=[];t.push(this.generateHash(n,s,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=ag(e);return"reloadOncePerInteraction"===t?.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const r=ag(e);let s=[];r||(s=Object.keys(t||{}).map((e=>({name:e}))));let a="",o=e;const i=[];return(r?.parameters||s).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(a=$g.getHashedString(i.join(j.HASH_DELIMITER)),o=e+j.UNDERSCORE_STRING+a),o}async fetchData(e,t,n,r,s,a){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=a,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),o&&(l.useExtendedTimeout=!0),n&&(l.paging=n),r&&(l.query=r),_u.getData(e,l,s,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,r,s){t&&t.length>0&&Ag.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),s)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};bu.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const wu=class{constructor(e,t,n,r,s=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=s,this.maxsize=a,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,r,s=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),s&&!s.dataViewCallMap[t]?(this.combiner(s,e),s.dataViewCallMap[t]={promise:n,resolve:r}):s?n=s.dataViewCallMap[t].promise:(s={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(s.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(s):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const Mu=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,s,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new wu(t,n,s,r,a,o)),this.bufferedDataQueues[e]}},Lu=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,Fu=e=>e.map((e=>e.field)),Uu=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let s=(t.query?.filter).logic;const a=Object.keys(n).length;Lu(n,r)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),n.F0.rhs.values.push(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=r[e],s=s.replace(e,o)})),(e.query?.filter).logic+=` OR ${s}`);const o=Fu(e.query?.select);Fu(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},ju=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!$g.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Vu=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:s}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:s(e,n)})}))},ku=e=>({combiner:Uu,comparator:ju,separator:Vu,...e}),$u=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Bu{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const s=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),a=$g.getHashedString(s),o=`${e.dataSource}_${a}`,i=_u.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const s=JSON.parse(`${window.sessionStorage.getItem(i)}`);if(t&&Bu.searchResultsCache?.[t]?.[o])n(Bu.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Bu.searchResultsCache?.persisted?.[o])n(Bu.searchResultsCache.persisted[o]);else{const a=new Bu(e,t);JSON.stringify(s.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=s.dataSourceMetaData,a.isQueryable=s.isQueryable,a.isInitialised=s.isInitialised,a.associationFilter=s.associationFilter,Bu.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{$u(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Bu.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&ag(e.dataSource)){const r=new Bu(e,t),s=ag(e.dataSource);r.isQueryable=!!s?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=s,$u(i,JSON.stringify({isQueryable:s?.isQueryable,dataSourceMetaData:s,isInitialised:!0})),r.context=t,Bu.initializeCache(t,e,o,r),n(r)}else{const s=new Bu(e,t);s.associationFilter=e.associationFilter,s.propertyFilter=e.propertyFilter,s.fetchMetaData(t).then((r=>{$u(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Bu.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new Mu;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(ku(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Bu.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Bu.searchResultsCache[e]&&(Bu.searchResultsCache[e]={}),Bu.searchResultsCache[e][n]=r):(void 0===Bu.searchResultsCache.persisted&&(Bu.searchResultsCache.persisted={}),Bu.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return _u.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Bu.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>xu.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Bu.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return xu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return xu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!Vg(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=xu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,s)=>(Object.keys(s).every((a=>!(r?.includes(a)&&s[a]&&this.positionMatches(`${s[a]}`,e,n))||(t.push({...s}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,s=r?e.toLowerCase():e,a=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return s.startsWith(a);case"contains":return s.includes(a);case"equals":return s===a;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,s={};let a=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${a}`;a+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const u={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:r?"true":"false"},lhs:i,rhs:c,comparator:l};s[o]=u}}));const o=Object.keys(s).join(" OR ");return{filterConditions:s,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),..._u.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,..._u.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const Gu=Bu;class Wu{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,s){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:s}]}registerForRefresh(e,t,n,r,s){n=$g.convertClipboardPageToPageRefNotation(n);const a=r.split("/").join(j.HASH_DELIMITER),o=$g.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[s]?.[n]){this.propChangeRefreshMap[s][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[s][n].push({uniqueHash:o,callback:t})}else Wu.initializeRefreshCache(this.propChangeRefreshMap,s,n,o,t);else if(this.refreshMap?.[s]?.[`${e}-${n}`]){this.refreshMap[s][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[s][`${e}-${n}`].push({uniqueHash:o,callback:t})}else Wu.initializeRefreshCache(this.refreshMap,s,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const Hu=new Wu;const qu=class{static cleanCaches(e){Ag.purgeCascadeFields(e),Eu.removeContext(e),Gu.clearContextedCache(e),_o.cleanContextSubscribers(e),_l(e),ro.removeContextTreeNode(e),bu.clearContext(e),Hu.deRegisterForRefresh(e)}},zu="GET_DESCENDANTS",Yu={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData"};const Ku=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};const Ju=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(a)n.push({type:fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(s.length>0))return;{const t=s.shift();a=!a,n.push({type:fe,payload:{context:e,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),t&&n.push(t)}}Ng(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=Og(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return s.length<=0&&!a&&(r<=0?(n.push(e),a=!a):s.push(e),n.unshift({type:fe,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),Ng(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Og(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(Ng({type:fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return Og(e)?(Ng({type:it,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...Og(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(Ng({type:it,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=Og(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&$g.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),Ng({type:fe,payload:{context:e,data:{...n}}}),ac.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Og(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},Xu=(e,t)=>{const n={},r=Jl.getLookUpDataPage(e),s=Jl.getDataPageKeys(r);if(s)for(const e of s)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:s}},Qu=(e,t)=>{const n=Jl.getSavableDataPage(e),r=Jl.getDataPageKeys(n);return r?.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:r}},Zu=e=>{_o.publish(U.PUB_SUB_EVENTS.EVENT_CANCEL,e)},ed=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const td=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),s=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(U.CASE_INFO.CASE_TYPE_ID),l=t?void 0:Dl(this.c11nEnv.getContextName()),u=this.c11nEnv.getValue("isProcessAction","isProcessAction");return zg.buildActionObject({context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:s,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:u,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,s,a="";a=t&&null!==t.actionMgrID?t.actionMgrID||"":oc.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,s=t}));if(!r||!s)throw new Error("resolveFn or rejectFn is not defined.");return oc.register(a,o,r,s,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=U.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=zg.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:s}=this.actionsApiPromise(r,n);return Ng({type:r,payload:{...n,containerName:U.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!up(t)){return new eu(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=zg.buildActionObject({containerItemID:e,context:t},this.c11nEnv),s=t&&t.includes(j.MODAL);Ng({type:n,payload:{...r,isModalAction:s,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,r);return a.then((()=>{Zu({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=Tg()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));if(ng(U.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const r=Jl.getSavableDataPage(n),s=ct,a=!!e&&e.includes(j.MODAL),o=zg.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return Ng({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:Dl(e)}}),i}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=lt,r=Jl.getSavableDataPage(e),s=Jl.getDataPageKeys(r),a={};if(s)for(const e of s)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=zg.buildActionObject({dataViewName:r,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return Ng({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const r=ut,{dataPageID:s,dataViewParameters:a}=Xu(e,t),o=zg.buildActionObject({dataLookUp:s,keyProperties:t,requestPayload:a,viewName:n.viewName||U.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return Ng({type:"VIEW_DATA_OBJECT",payload:{...o}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=Tg()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:s,keys:a}=Qu(r,t),o=dt,i=e&&e.includes(j.MODAL),c=zg.buildActionObject({containerItemID:e,dataPageID:s,key:a},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:u}=this.actionsApiPromise(o,c);return Ng({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:Dl(e),etag:l}}),u}openDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const s=pt,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=Xu(e,t),c=zg.buildActionObject({actionID:n,actionName:r,dataViewParameters:a,lookupDatapage:o,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return Ng({type:s,payload:{...c}}),l}submitDataObjectAction(e,t,n,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:s}=Tg()?.getState()||{},a=s[e]?.dataInfo?.content?.classID;if(!a)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const o=r?.jsActionQueryParams,i=mh(e),c=Kp(i),l=_p(c,i)||{},{resourceType:u="",key:d=""}=l,p=ht,{dataPageID:h,keys:g}=Qu(a,t),f=zg.buildActionObject({containerItemID:e,actionID:n,resourceType:u,key:d,keys:g,savableDatapage:h,containerName:j.MODAL,context:e,jsActionQueryParams:o},this.c11nEnv);f.context=e;const m=s[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(p,f);return Ng({type:p,payload:{...f,isFormValid:Dl(e),etag:m}}),I}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase",t);const{dockable:n=!1}=t?.modalOptions||{};let r=((e,t)=>xl.isExternalObject(e)&&!t?"CREATE_EXTERNAL_OBJECT":xl.isObjectCaseType(e)?"CREATE_OBJECT":le)(e,Rg(".isExternalObjectCreationFlow","context_data",this.c11nEnv.getContextName()));const s=zg.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);if(s.headers={...s.headers},t.channelName?s.headers[j.X_ORIGIN_CHANNEL]=t.channelName:vh.isWSSPortal()&&(s.headers[j.X_ORIGIN_CHANNEL]="WSS"),$.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:a}=$.getRemoteCase(e);if(s.className=e,s.class=t,oc.setRemoteCaseHeaderByContext(s,n),$.isTraditionalRemoteCase(e)){const n={className:e,name:a,action:yt,remoteClassName:t};r=oc.setTraditionalRemoteCaseParams(s,n)}}if(Co.getPreviewMode()){s.debugInfo={debugId:$g.generateUniqueID()};const e=Lo.getCoreHeadersFromContext(s?.context||""),t=String(e?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]||"");t&&r!==le&&(s.debugInfo={debugId:t})}return Ng({type:r,payload:{...s}}),a}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=Ie,r=zg.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,r);return Ng({type:n,payload:{...r}}),s}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),r=zg.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise("GET_DESCENDANTS",r),a=(o={...r,context:n},{type:zu,payload:o});var o;return Ng(a),s}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let s=xl.isObjectCaseType(t)?"GET_OBJECT":ue;const a=zg.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return a.headers={...a.headers},n.channelName?a.headers[j.X_ORIGIN_CHANNEL]=n.channelName:vh.isWSSPortal()&&(a.headers[j.X_ORIGIN_CHANNEL]="WSS"),a.className=t,$.isRemoteCase(t)&&(s=this.setRemoteCaseParamsForOpenCase(a,t,n.remoteCaseMeta)??s),Co.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(a.debugInfo={debugId:$g.generateUniqueID()}),Ng({type:s,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:s,name:a}=$.getRemoteCase(t);if(oc.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,$.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:a,action:At,remoteClassName:s};return oc.setTraditionalRemoteCaseParams(e,r)}}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=j.PRIMARY,r.isChild=n.isChild);let s=Hl;const a=zg.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);if(a.headers=a.headers||{},n.channelName?a.headers[j.X_ORIGIN_CHANNEL]=n.channelName:vh.isWSSPortal()&&(a.headers[j.X_ORIGIN_CHANNEL]="WSS"),$.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:o}=$.getRemoteCase(t);if(oc.setRemoteCaseHeaderByContext(a,r),$.isTraditionalRemoteCase(t)){a.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:o,action:Et,remoteClassName:e};s=oc.setTraditionalRemoteCaseParams(a,r)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Co.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:$g.generateUniqueID()});const i={context:a.context||n.context,containerName:a.containerName||n.containerName,targetContainerName:a.containerName||n.containerName,viewType:a.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return Ng({type:s,payload:{...a,...i}}),o}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=Mp(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=ro.getContextReferences(e);if(t)for(const[,e]of t)if(Hg.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return po({messages:e,context:r,category:U.PAGE}),Promise.reject({type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const s=t?.isTriggeredFromDifferentContext,{caseID:a,assignments:o,localActionID:i,caseActions:c,caseInfo:l,businessID:u,caseTypeID:d,caseTypeName:p}=kl(e,this.c11nEnv,{isTriggeredFromDifferentContext:s}),h=Ml(l);let g,f=!1;if(c){const e=c.find((e=>e.ID===i));f="Case"===e?.type}else g=Og(n);let{assignmentID:m}=kl(e,this.c11nEnv,{isTriggeredFromDifferentContext:s});g?.context_data?.actionType&&(f=g.context_data.actionType===j.CASE,m=m||g.context_data.assignmentID);const I=((e,t,n,r)=>{let s;return s=e?Vl(e,t,n):r||"Create",s})(o,m,i,l?.activeActionID),[y,E]=a.split(" "),A={class:y,actionID:I,assignmentID:m,caseID:a,workID:E,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:f,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:u,caseTypeID:d,caseTypeName:p};e?.includes(j.MODAL)&&(A.containerName=j.MODAL,A.isModalAction=!0),A.outcome=t.outcomeID,A.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(A.viewType=qc.FORM);const _=((e,t)=>xl.isObjectCaseType(e)||t?Ct:pe)(d,l?.isObjectWideAction),C=zg.buildActionObject(A,this.c11nEnv),{promise:S}=this.actionsApiPromise(_,C);return C.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||Og(n).context_data.isProcessAction,C.headers??={},vh.isWSSPortal()&&(C.headers[j.X_ORIGIN_CHANNEL]="WSS"),Ju.executeOrQueueDeferredAction({type:_,payload:{...C,context:n}}),S}getNextWork(){if("HYBRID"===vh.getRenderingMode())return _o.publish(U.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:vh.getOperatorIdentifier()}),Promise.resolve();const e=Hl,t=zg.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return Ng({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Hl,n=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,s=zg.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,s),o={type:t,payload:{...s,caseID:n,headers:r}};return Ng(o),a}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(U.CASE_INFO.CASES),r=this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(s.containerName=j.MODAL,s.isModalAction=!0);const a=zg.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=Mp(e);return Ng({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:Dl(i),classID:this.c11nEnv.getCurrentClassID()}}),o}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue(U.CASE_INFO.CASES),r=this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},a=zg.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=Mp(e);return Ng({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:Dl(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:r}=t,s=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:s,runningMode:r,...t},o="OPEN_BULK_ACTION",i=zg.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return Ng({type:o,payload:{...i}}),c}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));return new eu(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Ng({type:Q,payload:{reference:U.CASE_INFO.APPROVALFLAG,value:j.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Ng({type:Q,payload:{reference:U.CASE_INFO.APPROVALFLAG,value:j.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(U.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:U.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:U.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return Ng([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Q,payload:{reference:U.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:U.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:U.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return Ng([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,ed(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:s,...t},o=(e=>"Object"===e.type||xl.isObjectCaseType(e?.caseClassName||"")||window.location.href.includes("/objects/")?_t:"OPEN_LOCAL_ACTION")(t),i=zg.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);if(o===_t)return Ng({type:o,payload:{...i}}),c;const l=this.c11nEnv.getContextName(),u=Up(l)[0];let d=!1;const p=$.getRemoteHeaderByContext(l);let h;if(oc.setRemoteCaseHeaderByContext(i,p),!u)return h=l,Ng({type:o,payload:{...i,contextName:l,continueExecution:d}}),c;h=vp(u);const g=Ap(u);if(g?.accessedOrder.forEach((e=>{n===g.items[e].key&&(d=!0,h=g.items[e].context)})),!d||h&&"review"===Tg()?.getState()?.data[h]?.context_data?.caseViewMode)return Ng({type:o,payload:{...i,contextName:l,continueExecution:d}}),c;const f=h,m=f&&f.includes(j.MODAL),I=t.assignKey||this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),y=Og(h),E=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,A=this.c11nEnv.getContainerName(),_=this.c11nEnv.getValue(U.CASE_INFO.CASE_TYPE_ID),C=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=zg.buildActionObject({context:f,containerItemID:h,assignmentID:I,actionID:E,caseID:n,containerName:A,caseType:_,isModalAction:m,isFormValid:!0,isProcessAction:C},this.c11nEnv);S.context=h;const T=Mp(h),N=this.c11nEnv.getCaseSummary(),O=Ml(N),P=zg.buildActionObject({caseID:n,containerItemID:h,cancelContext:T},this.c11nEnv);let D={};return m?(P.acTargetName=j.MODAL,P.isInCreateStage=O,P.isModalAction=m,D={...P}):D={...P,acName:Pt(this.c11nEnv.getContainerName(),P.context)},Ng({type:o,payload:{...i,contextName:l,saveActionPayload:S,cancelActionPayload:D,continueExecution:d}}),c}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,ed(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:s,isProcessAction:!0,...t},o=Wl,i=zg.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return Ng({type:o,payload:{...i}}),c}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(U.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(U.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),s=Ml(this.c11nEnv.getCaseSummary()),a=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),o={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:s,caseID:a};t&&t.includes(j.MODAL)&&(o.acTargetName=j.MODAL);const i=zg.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=Mp(t);return Ng({type:n,payload:{...i,containerItemID:t,context:l}}),c}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:n}=U,r=he,s=Mp(e),a=e&&e.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),i=Ml(o),c=this.c11nEnv.getValue(j.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=zg.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv);let d={};a?(u.acTargetName=j.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:Pt(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(r,u);return Ng({type:r,payload:d}),p.then((()=>{t||Zu({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=U,n=e,r=He,s=e&&e.includes(j.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=zg.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!up(n)){return new eu(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{Zu({caseID:a,context:this.c11nEnv.getContextName()})}))}Ng({type:r,payload:{...o,isModalAction:s}});const{promise:i}=this.actionsApiPromise(r,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=U,n=He,r=e,s=r&&r.includes(j.MODAL),a=this.c11nEnv.getCaseSummary(),o=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID)),i=Ml(a),c=this.c11nEnv.getValue(j.getProperty(t.CASE_INFO_ID)),l=zg.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv),u=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=vh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(l.isProcessAction=u,i&&(s||d)&&!wl(a)){const t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=up(r);if(this.shouldDeleteCaseInCreateStage(c,t,d)){const t=!0===Boolean(xl.isExternalObject(o));return this.deleteCaseInCreateStage(e,t)}Ng({type:n,payload:{...l,isModalAction:s,isChildCase:jl(a),isInCreateStage:i}})}const{promise:p}=this.actionsApiPromise(n,l);return p.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=zl,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return Ju.executeOrQueueDeferredAction(Yl(n)),r}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=zl,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return Ng(Yl(n)),r}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=ql,r=e,s=r&&r.includes(j.MODAL),a=this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.CASE_TYPE_ID)),i=zg.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const u=`${j.APP.APP}/${Ip.PRIMARY}`,d=rl(u,Ip.PRIMARY);i.parentContext=d,s&&(i.targetName=j.MODAL,i.containerName=Ip.MODAL,i.isModalAction=s),Ng((e=>({type:ql,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{Zu({caseID:a,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=bh.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return Ho(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:s}=bh.getRestEndPoint("updateRecents")||{},a=`${E()}${s}`;return Ho(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=bh.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return Ho(t,{method:"GET",headers:{}}).then((e=>(Object.keys(ro.rootNodes).forEach((e=>{qu.cleanCaches(e)})),ro.rootNodes={},sessionStorage.clear(),jg(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Ho(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Ip.PREVIEW,containerName:Ip.PREVIEW,context:U.APP.APP,...t})}showDataPreview(e,t,n){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:Ip.PREVIEW,containerName:Ip.PREVIEW,context:U.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=zg.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:$.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const s=te,{promise:a}=this.actionsApiPromise(s,r,!1);return Ng({type:s,payload:{...r}}),a}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const r=zg.buildActionObject({viewName:e,className:t},this.c11nEnv),s=ne,{promise:a}=this.actionsApiPromise(s,r);return Co.getPreviewMode()&&(r.debugInfo={debugId:$g.generateUniqueID()}),Ng({type:s,payload:{...r,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),a}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=zg.buildActionObject({},this.c11nEnv),r=se,{promise:s}=this.actionsApiPromise(r,n);return Ng({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),s}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=zg.buildActionObject({},this.c11nEnv),r=ae,{promise:s}=this.actionsApiPromise(r,n);return Ng({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),s}showData(e,t,n,r={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const s=zg.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:$.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),a=re;r?.containerName||(r.containerName="HYBRID"===vh.getRenderingMode()?Ku.getRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME):cc.getTargetViewContainerName(a));const{promise:o}=this.actionsApiPromise(a,s);return Ng({type:a,payload:{...s,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){zg.changeHandler(e,t)}eventHandler(e,t){zg.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,r={skipDirtyValidation:!1}){const s=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),o=Hg.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,r);let i=this.c11nEnv.getValue(j.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=Rg(`.${c.join(".")}.classID`,a,s)),e=$g.trimDotForProperty(e),Ng({type:ee,payload:{reference:o,value:t,context:s,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:s=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1,associatedProperty:c}=n,l=this.c11nEnv.getContextName();let u=this.c11nEnv.getPageReference();const d=a?.startsWith(u)?a.replace(u,""):a;u=a||u;const p=Hg.getContextPath(u,e);let h=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(d?`${d}${e}`:e,t,{isArrayDeepMerge:s,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),uo({type:U.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:u,context:l,isListEntry:o}),Ng({type:Q,payload:{reference:p,value:t,context:l,isArrayDeepMerge:s,skipDirtyValidation:i,...h&&{isStrictTracking:h},...r&&{removePropertyFromChangedList:r},...c&&{associatedProperty:`${u}${c}`}}})}activateModalContainerItem(e){const t=Le,{context:n}=e,r=n&&n.includes(j.MODAL),s=zg.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(s.containerName=j.MODAL,s.isModalAction=r),Ng({type:t,payload:s});const{promise:a}=this.actionsApiPromise(t,s);return a}refreshCaseView(e,t,n,r={}){const{promise:s,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d,isArrayDeepMerge:p}=r,h={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:d};r.refreshFor&&(h.refreshFor=r?.refreshFor),r.resetForm&&(h.resetForm=r?.resetForm);const g=u||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>Ul(e)&&!Fl(e,t))(g,f)||Fl(g,f))?qd(g,n,h):Vd(e,t,g,n,h),s}refreshEmbeddedDataWithAction(e,t,n,r,s,a,o,i,c={}){const{promise:l}=this.actionsApiPromise(Yu.REFRESH_DATA),u=this.c11nEnv.getContextName();return kd(e,t,n,u,r||this.c11nEnv.getPageReference(),s,a,o,i,c),l}openEmbeddedDataModal(e,t,n,r,s,a,o,i){const c=gt;let l=t.getCaseInfo().getKey();const u=t.getValue(U.CASE_INFO.IS_LOCAL_ACTION),d=t.getValue(U.CASE_INFO.ASSIGNMENT_ID),p=((e,t,n)=>n||t!==j.ACTION?e.getValue(U.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(U.CASE_INFO.ASSIGNMENTACTION_ID))(t,o,u),h=t.getPageReference();let g="string"==typeof r?`${t.getPageReference().replace(j.getProperty(U.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${r}`:`${t.getPageReference().replace(j.getProperty(U.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${r}]`;h.startsWith(U.OBJECT_INFO.OBJECT_INFO)&&!l&&(l=t.getCaseInfo().getObjectKey(),g=`${t.getPageReference().replace(U.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${r}]`);const f={targetProperty:n,index:r,viewID:e,ID:l,actionType:s,interestPage:$g.convertPageRefToClipboardPageNotation(g),heading:a,editType:o,interestPageActionID:o===j.ACTION?i:void 0,actionID:p,isLocalAction:u,operationFlag:j.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof r,assignmentID:u||o!==j.ACTION?void 0:d},m=zg.buildActionObject(f,this.c11nEnv);if(o===j.ACTION){const e=$g.getETag(m.context);m.headers={"If-Match":e}}const{promise:I}=this.actionsApiPromise(c,m);if(vh.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=un.trimAnnotation(e.config.value),r=Kh(n.startsWith(".")?n.replace(".",""):n,e.config.classID);r?.isDeclarativeTarget&&ro.addFieldNode(t.getContextName(),h+g,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:h+g})}))}return Ng({type:c,payload:{...m,containerName:U.MODAL,skipSemanticUrl:!0}}),I}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ft;let n=this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.CASE_INFO_ID));const r=this.c11nEnv.getValue(j.getProperty(U.CASE_INFO.ASSIGNMENT_ID));let s=this.c11nEnv.getPageReference().replace(j.getProperty(U.CASE_INFO.CASE_INFO_CONTENT),"");const a=Mp(e),o=this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:u,viewName:d,parentContext:p}=o;s.startsWith(U.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(U.OBJECT_INFO.OBJECT_INFO_ID),s=this.c11nEnv.getPageReference().replace(U.OBJECT_INFO.OBJECT_INFO_CONTENT,""));const h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:d,isFormValid:Dl(a),interestPage:$g.convertPageRefToClipboardPageNotation(s),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:u,operationFlag:j.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:r};e&&e.includes(j.MODAL)&&(h.containerName=j.MODAL,h.isModalAction=!0);const g=zg.buildActionObject(h,this.c11nEnv);if(c===j.ACTION){const e=$g.getETag(g.context);g.headers={"If-Match":e}}const{promise:f}=this.actionsApiPromise(t,g);if(up(a)){const[e,t,n]=Ha(this.c11nEnv.getPageReference());ro.mutatePageList(p,e,t,{type:et,rowIndex:n}),Ng({type:et,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return Ju.executeOrQueueDeferredAction({type:t,payload:{...g,context:a}}),f}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Mp(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:s}=this.actionsApiPromise(It);return qd(t,n,{actionMgrID:s,isFillFormWithAI:!0,preserveClientChanges:!1}),r}handleSubscript(e,t){if(!ng(U.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=mt,r=zg.buildActionObject({containerItemID:e},t);Ng({type:n,payload:{...r,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Dl(e),context:e}});const{promise:s}=this.actionsApiPromise(n,r);return s}showSubscriptCreateView(e,t,n,r=U.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const s=zg.buildActionObject({viewName:r,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),a=ne,{promise:o}=this.actionsApiPromise(a,s);return Ng({type:a,payload:{...s,containerName:U.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),o}deleteWork(e,t){if(!e)return Promise.reject(new Error("workId is required parameter"));const n=xl.isExternalCaseType(t),r=zg.buildActionObject({workId:e,caseTypeID:t,isExternalCase:n},this.c11nEnv),{promise:s}=this.actionsApiPromise("DELETE_WORK",r);var a;return Ng((a={...r},{type:Kl,payload:a})),s}};const nd=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:s}=Wf("getCaseStages",n);return(await Ho(r,{method:s},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return Ml(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO));return wl(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=_p(t,n),{config:s}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=s?.type===j.VIEW?s?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.VIEW_NAME)))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes("pyViewContext")){const t=e.caseInfo?.content??{},r=t.pyViewContext;if(""===r)return n.caseInfo.content;if("string"==typeof r&&r.includes("(")&&r.includes(")")){const e=r.substring(1,r.indexOf("(")),n=parseInt(r.substring(r.indexOf("(")+1,r.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n]}}const r=t.split(/[.[\]]/).filter((e=>e));for(const e of r)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=_p(e,t),{config:r}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),s=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO)),a=r?.type===j.VIEW?r.context:null;if(a){const e=this.getValueByPath({caseInfo:s},a);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(j.getProperty(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(j.getProperty(j.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=W(this.c11nEnv.getContextName());let n;t&&(n=Og(t));const r=n?.caseInfo?.availableActions,s=Og(this.c11nEnv.getContextName()),a=s?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],r=this.getChildAssignments()||[];let s=JSON.parse(JSON.stringify(r));s=s.map((e=>(e.isChild=!0,e)));const a=[...n,...s];let o=JSON.parse(JSON.stringify(a));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.getProperty(j.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(j.OBJECT_INFO.OBJECT_INFO);return wl(e)}},{RESOURCE_TYPES:rd}=U;const sd=class{static openCase(e,t,n,r={}){const s={insKey:e,acTargetName:n,actionMgrID:oc.getNextActionMgrId(),context:t,...r},a=ue;r&&r.channelName?s.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:vh.isWSSPortal()&&(s.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=oc.actionManagerPromise(a,s.actionMgrID);return Ng({type:a,payload:s}),o}static openAssignment(e,t,n,r={}){const s={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:oc.getNextActionMgrId(),context:t,...r},a=ge;r&&r.channelName?s.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:vh.isWSSPortal()&&(s.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=oc.actionManagerPromise(a,s.actionMgrID);return Ng({type:a,payload:{...s}}),o}static createCase(e,t,n,r={}){const s=le,a={class:e,acTargetName:n,actionMgrID:oc.getNextActionMgrId(),context:t,...r};r&&r.channelName?a.headers={[j.X_ORIGIN_CHANNEL]:r.channelName}:vh.isWSSPortal()&&(a.headers={[j.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=oc.actionManagerPromise(s,a.actionMgrID);return Ng({type:s,payload:{...a}}),o}static getNextWork(e,t,n={}){const r=ge,s={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:oc.getNextActionMgrId(),context:e,...n},{promise:a}=oc.actionManagerPromise(r,s.actionMgrID);return Ng({type:r,payload:{...s}}),a}static getOpenedCaseItems(e){const t=[],n=Ap(e);if(n){const{items:r={}}=n,s=Object.keys(r),a=vp(e);s.forEach((n=>{if(r[n]&&(r[n].resourceType===rd.CASE||r[n].resourceType===rd.ASSIGNMENT||r[n].resourceType===rd.OBJECT)){const{key:s="",context:o}=r[n],i=r[n],c=s.substring(s.indexOf(" ")+1),l=Rg(".caseTypeID",j.CASE_INFO.CASE_INFO,o),u=a===n;t.push({...i,key:s,workID:s,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:r,reqType:s}=Wf(Be,n),a={},o=$.getRemoteHeaderFromSourceClass(t??"");return o&&(a.RemoteSystemID=o),Ho(r,{method:s,headers:a})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=Wf("getBulkActions"),r=e.map((e=>({ID:e}))),s=r.length,a=s/5,o={},i=[];for(let e=0;e<s;e+=a)o.cases=r.slice(e,e+a),o.cases.length&&i.push(Ho(t,{method:n,body:o}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0===e?l=c[e].data.availableActions:l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=Wf("getCaseBulkActions",t),s=await Ho(n,{method:r});let a=[];return s.data?.availableActions?.length&&(a=s.data.availableActions),a}};class ad{constructor(e){ad._instance=this,this.context=`${e}/${j.SUGGESTION}`,Tg()?.getState().data?.[this.context]||Ng({type:Ue,payload:{context:this.context,data:{}}})}getField(e){return Rg(e,"",this.context)}setField(e,t){Ng({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){Ng({type:me,payload:{reference:e,context:this.context,...t}}),_o.publish(j.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){Ng(Xg({context:this.context,data:e,isArrayDeepMerge:!0}))}}const od=ad;const id=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=Pg();return n?$g.getIn(n,t):null}static setSharedState(e,t){e&&Ng(vf({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:s=!0,pageReference:a,removePropertyFromChangedList:o=!1}=r;if(!e||!t)return;Ng(xf({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:s,removePropertyFromChangedList:o}))}static getSuggestionsContext(e){return new od(e)}static triggerRefresh(e,t){zd({context:e,pageReference:t})}};let cd;const ld=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=cd.getValue(t);return cd.registerAdditionalProps({[t]:`@P ${t}`}),e}}};class ud{static getParagraphStream(e,t){return((e,t)=>{cd=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,ld);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}static isDecisionParagraph(e,t){const n=ug(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),r=ug(e,n);let s;if(r?.useDecision){const n=r.dynamicContents.length;for(let a=0;a<n-1;a+=1)if(Hg.resolveWhen(r.dynamicContents[a].when,t)){s=r.dynamicContents[a],e=`${e}#${s.when}`;break}s||(s=r.dynamicContents.pop())}else s=r;const a=r?.definedOnClassID,o=Mh.getParagraphLocaleValue(a||n,e);return o?ud.getParagraphStream(o,t):s?.content?ud.getParagraphStream(s.content,t):null}}const dd=ud;class pd{constructor(e){this.fieldType=e}applyFallback(e){const t=bi.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class hd{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new pd(e);default:return}}}const gd="DATAPAGE",fd="VIEW",md="FIELD",Id="PARAGRAPH",yd=(e,t,n,r)=>{const s=[fd,md,Id],a=[gd,Id];(!t||s.includes(e)&&!n)&&console.warn(`Invalid parameters for locale reference: type=${e}, id=${t}, scope=${n}, path=${r}`);const o=a.includes(e)&&r?`#${r}`:"",i=e===gd?"@BASECLASS":n;return e===gd||s.includes(e)?`${i}!${e}!${t}${o}`.toUpperCase():`${e}!${t}${o}`.toUpperCase()};class Ed{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=Jh(this.locale),r=this.#r(e,this.localeReference?n.localeStore[`${this.localeReference.toUpperCase()}`]:{})||this.#r(e,n.localeStore[Ed.COMMON_LABELS])||this.#r(e,n.localeStore[Ed.COMPONENT_FIELDS])||this.#s(e)||e;return(t?this.#a(r,t):r)||e}getLocalizedMessage(e,t){const n=Jh(this.locale).localeStore[Ed.MESSAGES]??{},r=this.#r(e,n)??e;return(t?this.#a(r,t):r)||e}getLocalizedDataPage(e,t,n,r){if(!t||!n||!e)return e;const s=yd(gd,t,void 0,n),a=Jh(this.locale),o=this.#r(e,a.localeStore[s])??this.#r(e,a.localeStore[Ed.COMMON_LABELS])??this.#s(e)??e;return(r?this.#a(o,r):o)||e}#a(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#s(e){if(0===this.lookupList.length)return;const t=Jh(this.locale);for(const n of this.lookupList){const r=this.#r(e,t.localeStore[n]);if(r)return r}}#r(e,t){if(null==e||!t)return;const n=t[e]??t[e];return"string"==typeof n?n:void 0}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const Ad=e=>F.getNeedsMapping()||e?.info===U.OBJECT_INFO.OBJECT_INFO?U.OBJECT_INFO.OBJECT_INFO:U.CASE_INFO.CASE_INFO,_d=(e,t)=>{const n=Ad(t);e.data=e.data??{};const{assignments:r,availableActions:s=[]}=e.data[n]??{};if(r&&Array.isArray(r)&&r.length>0&&r[0].actions&&Array.isArray(r[0].actions)&&!t?.stopMergeActions){r[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||s.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=s}},Cd=(e,t)=>{const n=Ad(t);if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return _d(t),t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const r=e,{uiResources:{actionButtons:s,navigation:a},nextAssignmentInfo:o}=r;if(r.data&&r.data[n]&&(s&&(r.data[n].actionButtons=s),a&&(r.data[n].navigation=a),t&&t[U.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,_d(r,t),e.confirmationNote)){const{confirmationNote:e}=r,t=[e];r.data.caseMessages=t}return t&&t.isCreateDataObject&&(r.data=r.data??{},r.data.dataInfo={},r.data.dataInfo.content=r.data.pyPortal,r.uiResources.root.config.context="dataInfo.content",r.uiResources.context_data.dataInfo=r.uiResources.context_data.dataInfo??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data.dataInfo.content??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data?.pyPortal,delete r.data.pyPortal,delete r.key),o&&(r.data=r.data??{},r.data.nextAssignmentInfo=o),r},Sd=async e=>{const t=Cd(e),n=$g.getIn(t,j.COMPONENTS);$i(t,{},!0);const r=$g.getIn(t,j.LOCALE_REFERENCES);await Mh.loadLocaleResources(r||[]),await rc(n)},Td=(e,t,n)=>Hg.resolveView(e,t,n);const Nd=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Hg.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Hg.getContextPath(this.datasource,this.index);return this.index+=1,Md({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Od{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,Md({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Pd=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new Nd(e,e.context||"",t);if(n){const n=vg(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new Nd(e.children[0],n||e.context,t)}return e?.children?new Od(e.children,t):void 0};class Dd{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>Xl.isProperty(e))).map((e=>Xl.getPropertyName(e)))}}const Rd=new Dd;let bd;Object.freeze(Rd);const vd=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const s=e[r],a=un.trimAnnotation(s);if("string"!=typeof a&&"string"!=typeof s||!($g.isValidAnnotation(s)&&$g.isPropertyRef(a)||s.startsWith("@W ")||s.startsWith("@DW ")||s.startsWith("@E ")||s.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const s={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),vd(e,t[r][n],s)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},vd(a,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},xd=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...$g.deepClone(t.inheritedProps)]};class wd{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:s}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=s,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=$g.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&xd(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=ti.formatePageReferenceToArrayIndex(this.meta.config.value)),vd(this._rawConfig,this._stateProps),this._isState=!$g.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=$g.isExpressionExist(this._rawConfig.config),this._isWhenExist=$g.isWhenExist(this._rawConfig.config),this._isValidatorExist=Vi.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=U.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let a=this.options.pageReference;this.options.pageReference&&(a=un.handleAnnotation(this.options.pageReference,this)),this._pageReference=Hg.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const o="reference"===this._type&&$g.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=Hg.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=un.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=$g.isExpressionExist(e),this._isWhenExist=$g.isWhenExist(e),this._isValidatorExist=Vi.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=un.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Wd(this)}(o||i||c)&&$d(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(j.PARAGRAPH_ANNOTATION)){const r=un.trimAnnotation(t);n=dd.isDecisionParagraph(r,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=un.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=un.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:s,disabled:a,visibility:o,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const u="Address"===this._type&&this._rawConfig?.config?.associatedView?un.trimAnnotation(this._rawConfig.config.associatedView):"",d=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:un.trimAnnotation(t),label:d?.startsWith("@")?un.handleAnnotation(d,this,void 0):d,required:r,readOnly:s,disabled:a,visibility:o||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};ro.addFieldNode(this._contextName,this._pageReference,(u||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)ro.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",un.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)ro.removeViewNode(this._contextName,this._pageReference,un.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;ro.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&ro.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&ro.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&ro.addViewNode(this._contextName,this._pageReference,un.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&ro.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=$g.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=un.isProperty(n)?un.trimAnnotation(n):""}e&&n.forEach((n=>{ro.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,readOnly:r,disabled:s,visibility:a,validationType:o,selectionMode:i,selectionList:c,selectionKey:l,referenceList:u,renderMode:d,caption:p}=this.getRawConfigProps(),h=t||p;let g=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(g=this.getSelfReferencingDatapageKeys()),ro.addPageListNode(this._contextName,this._pageReference,this.viewName??"",un.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:un.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?un.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:s,visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:o,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:d,referenceList:u,selectionKey:l,index:this.index,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?g:void 0});const f=this.getValue(un.trimAnnotation(this.getPropertyName()),this._pageReference)||[];ro.updatePageListNode(this._contextName,this._pageReference,un.trimAnnotation(this.getPropertyName()),f.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){$g.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=Td(t,this,e);if(!n)return;const r=this.getRawMetadata()?.config?.referenceList;if(!r)return;let s={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(s=n.config.parameters);const a=$g.generateDataPageHashWithParameters(s,r,this),o=Pg(),i=o?o[r]?.[a]:{};return Array.isArray(i?.pxResults)?i.pxResults:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new nd(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getValue(j.getProperty(j.CASE_INFO.CASE_TYPE_ID));return Mh.getCaseLocaleReference(e)}getListActions(){return Ri(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Hg.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=Ip.PRIMARY,name:r,routingInfo:s}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===s)&&r?r:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=u?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=Hg.getContextPath(this.getPageReference(),n),s=t?id.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!s,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...bi.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=hd.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),$g.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),r=vh.getLocale()??"en-US",s=new Ed(r,n),a=this.getCaseLocaleReference();return a&&s.setLookupList([a]),s}getRawConfigProps(){const e={...bi.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Hg.resolveProps(e,t,this),un.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),vd(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),r=this.getComponentConfig(),s=n===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE){const n=vp(`${j.APP.APP}/${this.getContainerName()}`),r=lo({context:n,category:U.PAGE});e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||un.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=lo({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:U.MESSAGES.MESSAGES_TYPE_ERROR}),r=lo({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:U.MESSAGES.MESSAGES_TYPE_INFO});n&&n[0]&&(e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status),r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===j.ROOT_CONTAINER){const n=go(s,vp(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const r=id.getSharedState("isLoggedOut");e.isLoggedOut=r,this._stateProps.isLoggedOut=r;const a=lo({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages}if(n===j.HYBRID_VIEW_CONTAINER){const n=lo({context:j.APP.APP,category:j.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=sd.getOpenedCaseItems(`${U.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===j.APP_SHELL){const n=j.APP.APP,r=vp(`${n}/${this.getContainerName()}`),s=[...lo({context:n,category:"PAGE"})||[],...lo({context:r,category:"PAGE"})||[]],a=s.length>0?s:void 0;e.pageMessages=a&&t(a),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===j.SCALARLIST&&(this._stateProps.value=e.value),n===j.APP_SHELL||n===j.MODAL_VIEW_CONTAINER||n===j.CASE_CREATE_STAGE||r.template===j.CASE_PREVIEW){let t=lo({context:j.APP.APP,category:"HTTP"});const n=lo({context:vp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(lo({context:vp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=lo({context:vp(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(e.message))):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(n===j.VIEW_CONTAINER||n===j.FLOW_CONTAINER||n===j.MODAL_VIEW_CONTAINER||n===j.PREVIEW_VIEW_CONTAINER||n===j.ROOT_CONTAINER){if(e.routingInfo=Dt(this.getContainerName(),this._contextName),n===j.ROOT_CONTAINER&&(e.rootConfig=Dd.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===j.FLOW_CONTAINER){const n=lo({context:this.getContextName(),category:j.CASEMESSAGES}),r=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const s=Up(r)[0];if(s){const n=vp(s),r=u?.getStore()?.getState()?.data;r&&n&&(e.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=r[n]?.caseInfo?.lastUpdateTime);const a=lo({context:n,category:U.PAGE}),o=lo({context:n,category:"HTTP"});e.httpMessages=t(o),e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,o?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===j.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else r.template===j.CASE_VIEW||r.template===j.SELF_SERVICE_CASE_VIEW||r.template===j.CASE_PREVIEW||r.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const a=this.getInheritedProps()?.shouldAutoRefresh;a&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:a}=this.getPropertyDetails(r,n,t);if(s&&"string"==typeof s&&(s.includes(a)||s.includes(j.ATTACHMENT_ANNOTATION))){const t=un.getPropertyName(s),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Ig(`${this._pageReference}.${t}`,this._contextName);return e?.additionalInformation&&this.setStateProps({additionalInformation:n}),(n||null===n)&&(e.additionalInformation=n),e}resolvePageClass(e){const t=this.getValue(j.CASE_INFO.CASE_INFO_CLASSID);if(!t)return;const n=e.split(".").slice(0,-1);let r=t;for(const e of n){const t=Kh(e,r);if(!t)return;if(r=Array.isArray(t)?t[0]?.pageClass:t.pageClass,!r)return}return r}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(Kh(e,t),e)}const n=t.pop(),r=t.join(".")?".":"";let s=this.getValue(`${r}${t.join(".")}${j.CLASS_ID}`);return s||(s=this.resolvePageClass(e)),this.resolvePropertyMetadata(Kh(n,s),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(Kh(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[j.getProperty(U.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(j.getProperty(U.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Fl(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[U.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[U.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new Gl(this)}isEditable(){return!(!this._rawConfig||!this._rawConfig.config||this._inheritedConfig&&this._inheritedConfig.readOnly||!(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)||"string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST")||Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly)||Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?un.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||un.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||un.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const r=n.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let a=n._type&&s.includeTypes.includes(n._type)&&!s.excludeTemplates.includes(r.template);if(!!r.highlightedData&&r.highlightedData.length&&r.showHighlightedData&&(a=!1),!a)return!0;const o=n.getChildren();return!!o&&o.some((t=>t.getPConnect().getComputedVisibility(e)))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return Og(e||this.getContextName())}getImagePath(e){return`${ec.getConstellationServiceUrl()}/v860/${ec.getAppAlias()}/image/${e}?org=${bh.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=Pd(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#o(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),s=r&&t?`${r}#${t}`:r,a=this.getLocalizationService(s).getLocalizedText(e);return a===e?this.getLocalizationService().getLocalizedText(e):a}getLocalizedValueForFieldLabel(e){e.startsWith(".")&&(e=e.substring(1));const t=this.getFieldMetadata(e)?.label,n=this.getLocaleRuleName(),r=this?.getMetadata();let s=null;if(r){const n=r?.type,a=["View","Region"];let o=r?.config?.label||r?.config?.caption?`@FL ${e}`:null;const i=Array.isArray(r?.config?.inheritedProps)?r.config.inheritedProps.find((e=>"label"===e.prop)):null;if(!o&&i&&(o=i.value),o?.startsWith(j.FIELD_LABEL_ANNOTATION)){const e=this.#i(o);return Mh.getLocaleValue(t,void 0,e,s)}n&&!a.includes(n)&&(s=n)}return this.getLocalizationService(n).getLocalizedText(t)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?Hg.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):Hg.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:s}=e;s&&(this._inheritedConfig.hideLabel=s),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),xd(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Hg.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,s={}){let a,o;const{isArrayDeepMerge:i}=s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),Ng({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};lp(n)}getContextDataValue(e,t){return bg(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),Ng(Xg({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;Ng({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){Ng(Of(e,t||{},n,t?.formFields))}getComponent(){return bd({getPConnect:()=>this})}createComponent(e,t,n,r){let s=this._pageReference;if(t){const e=vg(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);s=Hg.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=un.handleAnnotation(e,this),s=Hg.getContextPath(this._pageReference,e)||""}return bd(Md({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:s,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName},useCustomContext:this.useCustomContext}),r)}getReferencedView(){if(this.meta)return Hg.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,Md({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new eu(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new td(this)),this._actionsApi}getActionManager(){return oc}doesContextExist(e){return Vg(e??this.getContextName())}getGoogleMapsAPIKey(){return C()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=Og(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?uo({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?uo({type:"error",...e}):(uo({type:"error",...e,context:j.APP.APP}),uo({type:"error",...e,context:vp(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return vg(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Al(t);El[e]?El[e].fieldOrder[r]=n:El[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,s])=>{if(Array.isArray(s)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Di(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<s.length;e+=1)_i(s[e],e,r,void 0,{})}else"object"==typeof s&&r(s,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=id.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Hg.getContextPath(this.getPageReference(),n),s=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,s),this.getActionsApi().triggerFieldChange(n,s),t.removeField(r,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Hg.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,id.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const r=on.getDependencies(this._contextName,n);r?.forEach((e=>{id.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:r={}}={}}=n||{};return Object.values(r).forEach((n=>{const[,r]=n.split("."),s=t?.split(".").pop();r===s&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(e,t){const n=Xl.isPropertyInternal(t),r=e.datasource,s=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!s&&(i||n||!r&&(a||o)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),this.isReadOnlyField(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#o(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===Dd.allowedComponetsForBulkProcessing[t]||!0===Dd.allowedComponetsForBulkProcessing[t]?.[n])}#i(e){const t=e.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),r=n?.pop();let s=`${r}`;const a=this.getFieldMetadata(s),o=a?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),i=a?.definedOnClassID;return s=`${i||o}!FIELD!${s}`,s}}function Md(e){const t=new wd(e);return{getPConnect:()=>t}}function Ld(e){bd=e}const Fd=e=>({type:Yu.REFRESH_DATA,payload:e}),Ud={},jd=(e,t,n,r,s,a,o,i)=>{if(!(e&&r&&t))return;const c=i.actionMgrID||oc.getNextActionMgrId(),l={ID:e,actionID:t,objectTypeID:n,context:r,caseWideAction:s,isObjectType:a,isExternalObject:o,options:{...i,actionMgrID:c}};i.isFillFormWithAI?Ng((e=>({type:It,payload:e}))(l)):Ng(Fd(l))},Vd=(e,t,n,r,s)=>{if(!(e&&n&&t))return;r&&(r=$g.convertPageRefToClipboardPageNotation(r));Ng(Fd({ID:e,viewID:t,context:n,options:s,caseViewAction:!0,interestPage:r}))},kd=(e,t,n,r,s,a,o,i,c,l={})=>{if(!((e||t)&&r&&n&&s))return;s&&(s=$g.convertPageRefToClipboardPageNotation(s));const u={ID:o||c!==j.ACTION?e:t,actionID:n,context:r,options:l,interestPage:s,interestPageActionID:a,isLocalAction:o,isMultiRecordData:i,editType:c};Ng(Fd(u))},$d=(e,t,n)=>{Ud[t]||(Ud[t]={}),e&&!Ud[t][e]&&(Ud[t][e]={pageReference:n})},Bd=(e,t,n)=>{const r={pageName:(s=t.substring(t.lastIndexOf(" ")+1)).substring(0,s.lastIndexOf(".")),propertyName:s.substring(s.lastIndexOf(".")+1)};var s;const a=Kh(r.propertyName,n||e.getValue(j.CLASS_ID,r.pageName));return!!a?.isDeclarativeTarget},Gd=(e,t)=>{const n=e.getRawMetadata()?.config?.value;let r=!1;if(n){const s=Kh(un.getLeafPropertyName(n),t||Hg.resolveClassID(n,e.getPageReference(),e.getContextName()));if(r=!!s?.isDeclarativeTarget,!r&&s?.additionalInformation){const e=un.trimAnnotation(s?.additionalInformation);r=dd.isDecisionParagraph(e,s.classID)}!r&&s?.datasource?.parameters&&(r=((e,t,n)=>{let r=!1;if(Array.isArray(t)){const s=t=>{const s=t.value;return s.startsWith("@P")&&(r=Bd(e,s,n)),r};t.some(s)}else if("object"==typeof t)for(const s of Object.keys(t))if(t[s].startsWith("@P")&&(r=Bd(e,t[s],n),r))break;return r})(e,s?.datasource?.parameters,t)),r||(r=s?.datasource?.tableType===j.DECISION)}return r},Wd=e=>{(e.isWhenExist()||Gd(e))&&$d(e.getCurrentView(),e.getContextName(),e.getPageReference())},Hd=e=>{if(!e)return!1;const t=Tg()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return xl.isObjectCaseType(n)},qd=(e,t,n)=>{const r=Fl(e,t),s=xl.isObjectCaseType(n?.classID)||t.startsWith(j.OBJECT_INFO.OBJECT_INFO);let a,o,i="",c=!1;const l=n=>Hg.getPropertyValue(n,t,e)||"";if(s&&Hd(e))i=l(U.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),c=xl.isExternalObject(i),n.isObjectWideAction=!0,a=l(U.OBJECT_INFO.ACTIVE_ACTION_ID)||j.VIEW_NAMES.OBJECT_CREATE_VIEW,o=l(j.getProperty(U.CASE_INFO.CASE_INFO_ID))||i;else if(a=l(U.CASE_INFO.ACTIVE_ACTION_ID)||l(U.CASE_INFO.ASSIGNMENTACTION_ID),r)o=l(j.getProperty(U.CASE_INFO.CASE_INFO_ID));else{o=l(j.getProperty(U.CASE_INFO.ASSIGNMENT_ID))||l(j.getProperty(U.CONTEXT_DATA_ASSIGNMENTID))}jd(o,a,i,e,r,s,c,n)},zd=e=>{const{context:t,pageReference:n}=e,r=(e=>Ud[e]&&Object.keys(Ud[e]).length>0&&Ul(e))(t);if(!r)return;const s=Hg.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:a,editType:o}=s||{};if(a){const e=Hg.getPropertyValue(U.CASE_INFO.CASE_INFO_ID,n,t),r=Hg.getPropertyValue(U.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:u,viewName:d}=s;o===j.ACTION?kd(e,r,l,t,i,c,u,a,o):Vd(e,d,t,i,{})}else qd(t,n,{})},Yd=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},Kd=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),r=t.url?.includes("/refresh?refreshFor="),s=e.url?.endsWith("/refresh")&&!n,a=t.url?.endsWith("/refresh")&&!r;if(s&&a)return e.url===t.url;if(s&&r)return!0;if(n){if(a)return"CANCEL_REFRESH";if(r)return!1}return!1},Jd=e=>{const t=(e=>{const t=[];return ro.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let s=r.join(".");e&&s&&(s=$g.convertPageRefToClipboardPageNotation(s),t.push({name:e,context:s}))})),t})(e),n=(e=>{const t=[];return ro.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const s=r.split(".");s.shift();let a=s.join(".");e&&a&&(a=$g.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const Xd=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:Qd}=j;let Zd={},ep={},tp={};const np="You will lose unsaved changes. Do you want to continue?",rp="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",sp=(e=Qd.APP,t,n)=>{let r=[],s=[];t||(r=Rl(e,!0)),n||(s=(e=>{const t=ro.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Hg.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const a={};((e,t,n)=>{const r=ep[t]||{};Object.keys(r).forEach((t=>{const s=r[t].associatedProperty;Object.hasOwn(r,t)&&(void 0===s||n.includes(s))&&$g.buildObject(t,e,r[t].value)}))})(a,e,r);const o=Zd[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&r.includes(e)||t;Object.hasOwn(o,e)&&n&&!s.includes(e)&&$g.buildObject(e,a,o[e].value)})),a},ap=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete Zd[t]?.[n],delete ep[t]?.[n]},op=e=>e&&tp[e],ip=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:s,associatedProperty:a}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=Rg(t.reference,null,n):(e[o]={initialValue:r||Rg(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,a&&(e[o].associatedProperty=a),s&&e[o].value===e[o].initialValue&&ap(t)},cp=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;ro.isFieldExists(n,r)||(ep[n]=ep[n]||{},ip(ep[n],t)),Zd[n]=Zd[n]||{},ip(Zd[n],t)},lp=({value:e,context:t,reference:n})=>{const r=Kp(t),s=_p(r,t)||{};if(Xd.isPageInstruction(n)||s?.subscriptFieldName)return;const a=n?.startsWith(".")?n?.substr(1):n;Zd[t]=Zd[t]||{};Zd[t][a]||(Zd[t][a]={initialValue:Rg(a,null,t)}),Zd[t][a].value=e},up=e=>e&&Zd[e]&&Object.keys(Zd[e]).some((t=>Zd[e][t].initialValue!==Zd[e][t].value))||!!op(e),dp=(e,t)=>{if(!e||!t)return!1;const n=Zd[e]&&Zd[e][t];return!!n&&n.previousValue!==n.value},pp=e=>{e&&Zd[e]?(Zd[e]={},ep[e]={}):"all"===e&&(Zd={},ep={},tp={}),tp[e]&&(tp[e]=!1)},hp={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(rn(r),(e=>{const{context:t,pageReference:n,value:r,reference:s}=e;Ag.triggerCascade(t,s,r);const a=on.getDependencies(t,s),o=Ag.getResetDependencies(t,s),i={context:t,datapages:{}};[...a,...o].forEach((e=>{const n=$g.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=n.split("."),r=`.${e.pop()}`,s=e.join(".");yl.getStateMachine(t,s,r).deleteAll()}else Xd.isPageInstruction(n)&&yl.executeStateMachine(t,n,""),Ng({type:Q,payload:{reference:n,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),a.forEach((r=>{let s=n;r.startsWith(n)||(s="");const a=r.replace(`${s}`,"").split(".").filter((e=>!!e));a.pop();const o=a.join("."),c=Rg(`.${o}`,s,t)?.classID||e.classID,l=Kh(r.split(".").pop(),c),{datasource:u}=l,d={},p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=Xl.isProperty(e.value)?Rg(`.${$g.getFullPropertyReference([o,$g.getPropertyName(e.value)])}`,s,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(j.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(j.NULL_STRING))}));const h=u.name.concat(j.UNDERSCORE_STRING,$g.getHashedString(p.join(j.HASH_DELIMITER))),{name:g}=u,f=ag(g);i.datapages[h]={mode:u.mode,propertyName:r,name:u.name,dataViewParameters:d,refreshStrategy:f?.refreshStrategy}})),a.length&&Ng({type:nt,payload:i})})(r),setTimeout((()=>{(dp(r.context,r.reference)||Pi(r.context))&&zd(r),Hu.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)}),0)),n===at&&!r?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:s,instruction:a,skipDirtyValidation:o=!1}=r;0===s&&"INSERT"===a&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const r of n){const n=Md({meta:r}).getPConnect();if(n.isWhenExist()||Gd(n,t))return!0;if(r.children&&e(t,r.children))return!0}return!1}(n.contextClass,n.children??[])),t&&$d(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),zd({context:e,pageReference:t}),o||(tp[`${e}`]=!0)}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:s,skipDirtyValidation:a=!1}=r;ro.updateFieldNodeValue(s,e,r.value),Xd.isPageInstruction(e)||a?a||(tp[`${s}`]=!0):cp(t),(r.removePropertyFromChangedList||n)&&ap(r)}if(n===De||n===Re){const{transientItemID:e,data:t}=r;$g.iterateLeafNodes(t,(t=>{ap({context:e,value:"",reference:t.join(".")})}))}if(n&&[xe,Se,Me,Pe].includes(n)){pp(r.context),Ag.purgeResetDependencies(r.context),(e=>{e&&Ud[e]&&delete Ud[e]})(r.context);(r.childContainersContexts||[]).forEach((e=>{pp(e)}));(r.transientItems||[]).forEach((e=>{pp(e)}))}e(t)},getChanges:sp,recordChange:cp,isDirty:()=>Object.keys(Zd).some((e=>up(e))),isPropertyDirty:dp,isContextDirty:up,resetChangedProperties:pp,deleteRecordedChange:ap,isComplexObjectMerged:op};const gp=new class{getCoreheaders(e){const t=`${U.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=vp(t),r=Mp(n),s=Hg.getProperty(j.COREHEADERS,"",r);if(s&&e in s)return s[e]}},fp={defaultLimit:16},mp={SINGLE:"single",MULTIPLE:"multiple"},Ip={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},yp=()=>Tg()?.getState()?.containers;function Ep(e){return"string"==typeof e&&""!==e.trim()}const Ap=e=>Ep(e)?Tg()?.getState().containers[e]:null,_p=(e,t)=>{if(!Ep(e)||!Ep(t))return null;const n=yp(),r=n?.[e];return r&&r.items&&r.items[t]||null},Cp=e=>Ep(e)?Tg()?.getState().containers[e]?.items:null,Sp=e=>Ep(e)&&Tg()?.getState().containers[e]?.accessedOrder||[],Tp=e=>Ep(e)&&Sp(e)?.length>0||!1,Np=(e,t,n)=>{if(!Ep(e)||!Ep(t))return!1;const r=yp(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e===t);if(t&&a)for(const e of Object.keys(a))if(o(t,a[e].key))return!0;return!1},Op=(e,t,n)=>{if(!Ep(e)||!Ep(t))return null;const r=yp(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e of Object.keys(a))if(o(t,a[e].key))return e;return null},Pp=(e,t)=>{if(e&&t)for(const s of Object.keys(t))if(n=e,r=t[s].key,n?.toLowerCase()===r?.toLowerCase())return t[s];var n,r;return null},Dp=e=>{if(!Ep(e))return null;const t=yp()??{};for(const n of Object.keys(t))if(t[n]){const r=t[n].items??null,s=Pp(e,r);if(s)return s}return null},Rp=(e,t)=>{if(!Ep(e)||!Ep(t))return!1;const n=yp();return n&&Object.hasOwn(n,`${e}/${t}`)},bp=(e,t)=>{if(!Ep(e)||!Ep(t))return null;const n=yp(),r=n?.[`${e}/${t}`];return r&&r.type},vp=e=>{if(!Ep(e))return null;let t=null;const n=yp();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r;t=s&&s.length>0?s[s.length-1]:null}return t},xp=(e,t,n)=>{if(!Ep(e)||!Ep(t))return!1;const r=Op(e,t,n);return!!r&&r===vp(e)},wp=(e,t)=>{let n=null;const r=yp();if(!r)return null;for(const s of Object.keys(r))if(r[s].items){const a=r[s].items[e];if(n=a?a[t]:null,n)break}return n},Mp=e=>Ep(e)?wp(e,"context"):null,Lp=e=>{if(!Ep(e))return null;let t=null;const n=yp();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r,a=s&&s.length>0?s[s.length-1]:null;t=Mp(a)}return t},Fp=e=>{if(!Ep(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const s=yp();if(!s)return[];const a=n=>{const s=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&s.push(n),n===e&&(r=!0)})),s};for(const e of Object.keys(s))if(s[e].items){const t=a(s[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Up=e=>{if(!Ep(e))return[];const t=[],n=yp();if(!n)return[];for(const r of Object.keys(n))r.startsWith(e)&&r!==e&&t.push(r);return t},jp=e=>{if(!Ep(e))return[];const t=[],n=yp();if(!n)return[];for(const r of Object.keys(n))if(r.startsWith(e)&&r!==e){(Sp(r)||[]).forEach((n=>{Mp(n)!==e&&t.push(Mp(n))}))}return t},Vp=e=>{const t=[...jp(e),e],n=[],r=Tg()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},kp=e=>Ep(e)?e&&Ap(e)&&Ap(e).type===mp.SINGLE:null,$p=e=>Ep(e)?e&&Ap(e)&&Ap(e).type===mp.MULTIPLE:null,Bp=e=>Ep(e)&&Ap(e)&&Ap(e).items&&Object.keys(Ap(e)?.items).length>0||!1,Gp=e=>e&&fp[e]?fp[e]:fp.defaultLimit,Wp=(e,t=fp.defaultLimit)=>{Ep(e)&&(fp[e]=t)},Hp=e=>{if(!Ep(e))return!1;let t=!1;const n=Ap(e),{items:r={}}=n,s=Object.keys(r),a=Gp(e);return s&&s.length>0&&s.length>=a&&(t=!0),t},qp=e=>{if(!e||!Ep(e.name)||!Ep(e.context))return null;const t=e?.name,n=Ap(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],s=Up(`${j.APP.APP}/${j.PREVIEW}`),a=jp(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...a],childContainers:s}},zp=e=>{if(!Ep(e))return!1;const t=Mp(e);return up(t)||al(e)},Yp=e=>{if(!Ep(e))return null;let t;const n=Ap(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!zp(n)){t=n;break}}return t},Kp=e=>{if(!Ep(e))return null;const{containers:t}=Tg()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.slice(0,n)},Jp=(e,t={})=>{if(!Ep(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Kp(e),r=Mp(e),{skipDirtyCheck:s}=t;let a=!0,o=[];if(zp(e)&&!s&&(a=window.confirm(Mh.getLocaleValue(np,"Messages"))),a){const{accessedOrder:t=[],items:s={},type:a}=Ap(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=s[i]||{},{semanticURL:l=j.FORWARD_SLASH_STRING,context:u}=c;o.length>0&&l&&l!==j.FORWARD_SLASH_STRING?Xf({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:u}}):Xf({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});Ng(yf({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:a}}))}return Promise.resolve({newAccessedOrder:o,removeItem:a})},Xp=(e,t,n,r)=>{const s="root",a=H(t,s,!0),o=Pt(t,s),i={data:n,context:r?"app":a},c=[af({root:e,containerItemID:a,context:r?"app":a,target:o,containerName:t})];c.push(Xg(i)),Ng(c)},Qp=(e,t,n)=>{let r=Sp(e);r=r.filter((e=>e!==t));let s=!1;for(let e=0;e<r.length;e+=1){if(Mp(r[e])===n){s=!0;break}}return s},Zp=e=>{if(!Ep(e))return!1;const t=yp(),n=Mp(e),r=t?Object.keys(t):[];let s=!1;for(let t=0;t<r.length&&(s=Qp(r[t],e,n),!s);t+=1);return s},eh=e=>{Array.isArray(e)||(e=[e]);const t=yp()||{};return e.map((e=>{const n=Kp(e);return $g.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},th=e=>{const{transientItemID:t,data:n,options:r}=e,s=$g.deepClone(Tg()?.getState().data[t]);r?.reset&&$g.iterateLeafNodes(s,(e=>{"classID"!==e[e.length-1]&&$g.setIn(s,e,"")})),Ng(cf({transientItemID:t,data:$g.mergeDeep(n,s)}))},nh=e=>{const{transientItemID:t,data:n}=e;Ng(uf({transientItemID:t,data:n}))},rh=e=>{const t=$g.deepClone(Tg()?.getState().data[e]);$g.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&$g.setIn(t,e,"")})),Ng(lf({transientItemID:e,data:t}))},sh=e=>{const t=$g.deepClone(Tg()?.getState().data[e]);$g.iterateLeafNodes(t,(e=>$g.setIn(t,e,""))),Ng(df({transientItemID:e,data:t}))};class ah{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const oh=()=>ah,ih=e=>{const t={containerName:e};t.childContainers=Up(e),Ng({type:Fe,payload:t})},ch=(e,t)=>{const n=Fp(e),{key:r}=_p(Kp(e),e),s=[];n.forEach((e=>{const{key:n}=_p(Kp(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Kp(e),context:e};s.push({type:fe,payload:n})}})),s.length&&Ng(s)},lh=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Kp(e),context:e};n.push({type:fe,payload:r}),n.length&&Ng(n)},uh=()=>vh.isPortalLoaded?"app":"root",dh=()=>gp,ph=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Kp(e),context:e};Ng({type:fe,payload:n})},hh=(e,t)=>{const n=Op(e,t),r=Op(`${n}/workarea`,t);return Mp(r)},gh=e=>Ep(e)?wp(e,"parentContext"):null,fh=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},mh=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Ih=()=>Zl,yh=/{(.*?)}/i,Eh=/{(.*?)}/g,Ah=e=>null!==e.match(yh),_h=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),Ch=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},Sh=()=>_h(window.location.pathname),Th=()=>_h(window.location.pathname+window.location.search),Nh=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}},Oh=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),s=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&"activeTab"!==e&&s.set(e,t);const a=new URLSearchParams(s).toString();return a?`${t}?${a}`:t}return e},Ph=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),r=n.indexOf("assignments"),s=n.slice(r-2).join("/"),a=n[n.length-1],o=Gf(Ge,{assignmentID:a});return{routeEndpoint:o?.restApi,requestType:o?.reqType,payload:{assignmentID:a},options:t,routeKey:Qe,urlPath:s}})(e,t):bh.getEndPointInfo(e),Dh=()=>{const e=vh.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const Rh=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{Ah(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>_h(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>_h(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return(e=e.replace(n,"")).startsWith("/")&&Dh()&&"PREVIEW"!==vh.getRenderingMode()&&this.setDefaultClassName(""),_h(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails(e,t){if(!t)return this.appRoutes[e];let n="",r={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.values(this.appRoutes).forEach((t=>{t.payload?.page===e?(n=t.routeKey,r={...t.payload}):this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,r={...this.appRoutes[e].payload})})),{routeKey:n,payload:r}}transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!$.isRemoteCase(t))return e;const{RemoteClassGroup:r,RemoteSystemID:s}=$.getRemoteCase(t);return{...e,caseID:n?.replace(t,r?.toUpperCase()),RemoteSystemID:s}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=Dh();let n=this.processUrl(e,!0),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);r||(n=this.processUrl(this.defaultViewUrlPath,!t),r=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:s,payload:a}=this.getRouteDetails(r,t);if(!this.appRoutesMeta?.[s]?.restApi)return null;const{reqType:o,endPoint:i,params:c}=this.appRoutesMeta[s].restApi,l={routeKey:s,requestType:o,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(a)}};return this._resolveRoute(l,this.processUrl(e,!1),r)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let s=r;if(Ah(r)){const e=r.match(Eh);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(s=s.replace(e,n[t]))}))}const a=Jf(s),o=new URL(a);return this.isDefaultPortal()||this.getPortalName()&&!o.searchParams.toString().includes("portal=")&&o.searchParams.append("portal",this.getPortalName()),o.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:s}=e;if(s&&!r)return;const a=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(bc(t))),o=`${U.APP.APP}${j.FORWARD_SLASH_STRING}${U.PRIMARY}`,i={semanticURL:a,directUrlUpdation:!0,options:{acName:o,context:Lp(o)}};Kf(i);const c=r.substring(r.lastIndexOf("-")+1),l=t.substring(t.lastIndexOf(" ")+1),u=vh.environmentInfoObject?.pxApplication?.pyLabel;sm(`${c} (${l}) - ${u}`)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},s=r?.split("/").length,a=r?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const o=Object.keys(this.appRoutes).filter((e=>s===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return a?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const r=this.appRoutes[e].payload,s={...n};delete s.dataViewName,delete s.dataContext;const a=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&($g.isEmpty(a)||$g.isEmpty(s)?o:Object.keys(s).every((e=>Object.hasOwn(a,e))))}));return i?this._getQueryParamsResolvedURL(i,n):o.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,s]=e.includes("?")?e.split("?"):[e];if(s){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const a=new URLSearchParams(s),o={};for(const[r,s]of a.entries())if("string"==typeof s&&Ah(s)){const a=this._getDynamicKeyName(s);o[r]=n?t[a]||e[a.toLowerCase()]:t[a]}else"string"==typeof s&&(o[r]=s);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:s}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(s=`${s}&pageName=${t.params.pageName}`);const a=s.match(Eh);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),r=new RegExp(a[e],"g");s=s.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:s,reqType:n,body:e}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[s,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=s.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],Ah(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e of Object.keys(d))Ah(d[e])?u[e]=p[e]||h[e.toLowerCase()]:u[e]=d[e];let g;a&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!Ah(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(Eh);for(let s=0;s<t.length;s+=1){const a=t[s],o=this._getDynamicKeyName(a);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(a,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r of Object.keys(e)){let s=e[r];if("string"==typeof s&&Ah(s)){const e=s.match(Eh);for(let n=0;n<e.length;n+=1){const r=e[n],a=this._getDynamicKeyName(r);if(void 0!==t[a]){const e=t[a];s=s.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${a}} in payload- {${a}} is missing in semantic url construct`)}n[r]=s}else"object"==typeof s&&(n[r]=this._resolvePayloadRecursive(s,t))}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let r=this._findMatchedRouteInStaticList(n,t);return void 0!==r?r:(r=this._findMatchedRouteInDynamicList(e),void 0!==r?r:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),r=t?.toLowerCase();if(Dh()){const e=this._findMatchingRouteByClass(n,r);if(!e)return;const t=Object.values(e)[0],s=t?.payload?.page||"";return this.setStaticRoutePage(s),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,r])=>{if(!r)return!1;const s=r.payload?.page?.toLowerCase(),a=r.payload?.pageClass?.toLowerCase(),o=s===e||n.toLowerCase()===e;return t?o&&a===t:o}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,s]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==r.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!Ah(e)&&e!==r[o]&&Ch(e)!==r[o])return!1}if(s){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(s.toLowerCase()),r=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())a.add(e);if(a.size!==r.size)return!1;for(const n of r){if(!a.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{Nh(e,t,"warning"),Nh("Error in Generated Routing Table",null,"error"),Nh("Back | Forward for this page may NOT work as intended",null,"warning"),Nh("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},bh=Rh;const vh=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||$g.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return bh.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===j.PORTAL_TYPE.WSS}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(j.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Co.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){const t=this.environmentInfoObject?.pyLanguagePacks||[];return(t.find((t=>t.pyLangCode===e))?.pyBundles??t.find((e=>e.pyLangCode===j.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}};const xh=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=s+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1);n+=this.keyMap[a],t=s+1}return n}};class wh{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent,r=t.toUpperCase();r.startsWith("@BASECLASS!DATAPAGE!")&&r.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${r}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===r?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,r)};updateLocaleStore=(e,t)=>{const n=e.fields||e,r=this.localeStore[t];r?$g.mergeDeep(n,r):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){const s=this.#c(n,t),a=this.#l(e);a&&(e=xh.formatLocaleKey(e));const o=s?this.localeStore[s.toUpperCase()]??{}:{},i=r?this.localeStore[r.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:a?xh.replaceWithValue(o[e]||i[e]||e):o[e]||i[e]||e}#c(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${j.PARAGRAPH}!${t}`,r=this.localeStore[n.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):null}getPortalLocaleReference(e){return 2!==vh.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${vh.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=vh.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:ec.getSvcLocale(t,`${e}.json`)}))),s=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(s.map((async(e,t)=>{if("fulfilled"===e.status){const s=r[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:s.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){if(vh.getLocalizationVersion()===j.LOCALIZATION_V2)return;const t=vh.getUseLocale(),n=vh.getBaseLocale();if(vh&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await this.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const r=[];for(let t=0;t<e.length;){const s=e[t];if(0!==s.length){const e=n.indexOf(s);if(-1===e)return null;if(t>0){const t=n.slice(0,e);r.push(t)}n=n.slice(e+s.length)}t+=1}return n&&r.push(n),r}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const r of Object.keys(e)){const s=r.split(/\{\d+\}/),a=this.matchPatternWithText(s,t);if(a){const t=e[r];if(n=this.replacePlaceHolders(a,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=vh.getLocale();return this.availableLangPacks||(this.availableLangPacks=await ec.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#l(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const Mh=new wh;ln.registerHandler("@L",((e,t)=>t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e))),ln.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Hg.getLitePropertyValue(n))),ln.registerHandler("@E",((e,t,n)=>{try{const r=Kt(e),s=Jt(r);return Xt(s,t,n)}catch(e){}return!0})),ln.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:s}=n??{};r=bg(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,s)}return!0===r||"true"===r})),ln.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let s="",a="";const o=t.getPageReference();if(e.startsWith(".")){s=`${o}.${e.substring(1)}`;const r=e.split(".").filter((e=>!!e));r.length>1&&(r.pop(),a=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),s=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===j.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=un.getPropertyName(e?.propertyForDisplayText??""),r=un.getPropertyName(e?.propertyForValue??""),s=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return s?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const d=un.getPropertyName(n?.datasource?.propertyForDisplayText),p=un.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(un.isProperty(e?.value)){let t=Rg(`.${$g.getFullPropertyReference([a,un.getPropertyName(e.value)])}`,o,g);f.push($g.getFullPropertyReference([o,a,un.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),g){const e=on.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,s])]}else e[t]=[s]})),on.addContextName(g,e)}const m=function(e,t,n,r){let s="",a=n;if(t.join(j.HASH_DELIMITER)&&(s=$g.getHashedString(t.join(j.HASH_DELIMITER)),a=n+j.UNDERSCORE_STRING+s),r){const e=Pg(),t=e?e[n]?.[a]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=e.getDataObject(),i=(o?.[n]||{})[a]||{};return Array.isArray(i?.pxResults)?i.pxResults:[]}(t,r,l,c),I=t.getLocalizationService();return m.map((e=>{let t=e[d]||e[`.${d}`];var n;return"string"==typeof t&&(n=t,t=I.getLocalizedDataPage(n,l,d)),{key:e[p]||e[`.${p}`],value:t}}))})),ln.registerHandler("@ROUTING_INFO",((e,t)=>Dt(t.getContainerName(),t.getContextName()))),ln.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return vh.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return vh.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return vh.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return vh.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService("APP!APPLICATION").getLocalizedText(vh.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return vh.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return vh.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return vh.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return vh.getOperatorWorkGroup();default:return e}})),ln.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],r=t.getComponentConfig(),s=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(s){const{fields:e,copyAll:t,filterDownloadedFields:a}=r[s],o=[];return n.forEach((n=>{const r={};t||a?Object.keys(n).forEach((e=>{const t=un.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const s=un.getPropertyName(e[t]);r[t]=n[s]})),o.push(r)})),o}return[]})),ln.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let s="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),s=`.${a.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:a,value:o}=n;r.name=a,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${s}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),ln.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Hg.getLitePropertyValue(n,e),s=t?.getReferencedUser(r)||Hg.getReferencedUser(r,n);return{userId:r,userName:s?s.UserName:null}})),ln.registerHandler("@ACTIVE_CASES",((e,t)=>sd.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),ln.registerHandler("@LR",(e=>e)),ln.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),ln.registerHandler("@SHARED",(e=>id.getSharedState(e))),ln.registerHandler("@PARAGRAPH",((e,t)=>dd.processParagraph(e,t))),ln.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),s=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return $g.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=$g.getIn(o,n)),o&&r.length>0?(s&&(o=o.filter((e=>Qt(s,e)))),o.map((e=>$g.getIn(e,r)))):null})),ln.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),ln.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),ln.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Hg.getLitePropertyValue(n),Ui.prepareAttachmentData(r)})),ln.registerHandler("@FL",((e,t)=>t.getLocalizedValueForFieldLabel(e))),ln.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),ln.registerHandler("@GENAICOACH",((e,t)=>dg(e,t.getCurrentClassID()))),ln.registerHandler("@AIAGENT",((e,t)=>{const n=pg(e,t.getCurrentClassID());if(n)return n;const r=t.getComponentConfig();if(r){const n=r?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const r={label:n.label};t.resolveConfigProps({label:n.label},r);const s=r.label;return{insName:`${n.ruleNamespace}__${e}`,label:t.getLocalizedValue(s),type:"agent"}}}return null})),ln.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),s=t.getPageReference();Hu.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",s,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${s.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${s}${e}`,`${r}/${s}`,r)})),ln.registerHandler("@DW",((e,t,n)=>{let r;const s=`${j.CONTEXT_DATA}.${j.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(t)r=t.getValue(s);else{const{context:e}=n??{};r=Rg(s,null,e)}return!0===r||"true"===r}));const Lh={},Fh={},Uh={},jh={},Vh={},kh={},$h={},Bh={},Gh={},Wh={},Hh={},qh={},zh={},Yh=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],s=t[n];s?((e,t,n,r)=>{const s=Array.isArray(n)?n:[n];(Array.isArray(r)?r:[r]).forEach((e=>{const t=s.findIndex((t=>t.classID===e.classID));if(-1===t)s.push(e);else{const n={isDeclarativeTarget:!1},r={...s[t],...n,...e};s[t]=r}})),t[e]=1===s.length?s[0]:s})(n,t,s,r):t[n]=r})):$g.copy(e,t)},Kh=(e,t="")=>{if(!e)return null;const n=jh[e];if(!n)return null;if(!t)return $g.deepClone(n);let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r?$g.deepClone(r):null},Jh=e=>(qh[e]||(qh[e]=new wh),qh[e]),Xh=(e,t)=>(zh[e]||(zh[e]=t()),zh[e]),Qh=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let s;const a=Kh(e,t);return r.length&&(s=r.join(".")),{...a,embeddedType:n,category:s}}const[s,...a]=e.split("."),o=Kh(s,t);return o&&r.push(o.label),Qh(a.join("."),o?.pageClass,o?.type,r)},Zh=e=>{Yh(e,Fh)},eg=e=>{Yh(e,Uh)},tg=e=>{(e=>{e.views&&Yh(e.views,Fh),e.navigations&&Yh(e.navigations,Uh),e.personalizations&&Yh(e.personalizations,kh),e.insights&&Yh(e.insights,$h),e.paragraphs&&Yh(e.paragraphs,Lh),e.dataTypes&&Yh(e.dataTypes,Bh),e.datapages&&Yh(e.datapages,Gh),e.genAICoaches&&Yh(e.genAICoaches,Wh),e.AIAgents&&Yh(e.AIAgents,Hh)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const r=t[n];if(Array.isArray(r)){if(r.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const r=yd(md,n,t.definedOnClassID??t.classID);t.localeReference=r})),1===r.length){const[e]=r;t[n]=e}}else e.datapages&&r?.datasource&&"DataPage"===r.datasource.tableType&&(r.datasource.mode=e.datapages[r.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{Vh[e]=t[e]})),Yh(e.fields,jh)},ng=e=>Fh[e],rg=(e,t)=>{const n=Fh[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},sg=e=>Uh[e],ag=e=>e in Vh?Vh[e]:null,og=e=>e in kh?kh[e]:null,ig=e=>e in $h?$h[e]:null,cg=e=>{const t={};return Object.keys(jh).forEach((n=>{const r=jh[n];let s;Array.isArray(r)?s=r.find((t=>e===t.classID)):e===r.classID&&(s=r),s&&(t[n]=$g.deepClone(s))})),t},lg=(e,t)=>{const n=Kh(e,t),r=n?.datasource?.parameters;return r?$g.deepClone(r):null},ug=(e,t)=>{let n=null;const r=Lh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?$g.deepClone(n):null},dg=(e,t)=>{let n=null;const r=Wh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?$g.deepClone(n):null},pg=(e,t)=>{let n=null;const r=Hh[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?$g.deepClone(n):null},hg=e=>{if(e in Bh){const{savableDataPage:t}=Bh[e];return t}return null},gg=e=>{const t=Gh[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:s}=t;if(r)return s.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const a=Bh[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},fg=e=>{if(e in Bh){const{lookupDataPage:t}=Bh[e];return t}return null},mg=e=>{if(Object.hasOwn(Bh,e)){const{lookupDataPageInfo:t}=Bh[e];return t}return null},Ig=(e,t)=>{const n=e.split("."),r=n.pop(),s=new wd({options:{pageReference:`${n.join(".")}`,context:t}}),a=Kh(r,s.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=un.trimAnnotation(a);return dd.processParagraph(o,s)},yg=(e,t)=>{const n=e.split("."),r=n.pop(),s=new wd({options:{pageReference:`${n.join(".")}`,context:t}}),a=Kh(r,s.getCurrentClassID()),o={};return s._classID=s.getCurrentClassID(),s.resolveConfigProps(a,o),o};class Eg{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,s,a="singleRecord"){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,s);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=$g.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:a})}else i[t]=[{propertyName:o,mode:a}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,s){if(!e||!n||!r?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,s);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=$g.getFullPropertyReference([i,t]),t in o){const e=o[t];$g.removeExistingDependentProperty(e,a)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,r,s){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const a=this.cascadeSubscribers[e][`${t}${n}`];if(!a[s]){a[s]=r;const o=Rg(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,s){const a=Eg._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,r,s),Eu.enableCascade(e))}unRegisterListField(e,t,n,r){const s=Eg._getFieldsForList(e,t,n);s.length>0&&this.unRegisterFields(e,t,s,r)}static _getFieldsForList(e,t,n){const r=[],s=Kh(n,Rg("classID",t,e));return s&&!Array.isArray(s)&&s.datasource&&s.datasource.parameters&&Object.values(s.datasource.parameters).forEach((e=>{if(un.isProperty(e)){const t=un.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const s=this.cascadeSubscribers[e][`${t}${n}`];s[r]&&delete s[r]}))}triggerCascade(e,t,n,r){let s=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((a=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==a&&o.previousValue!==n&&(s=!0,r?r.add(o[a]):o[a](t,n))})),s&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=Rg(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=Rg(t,"",e);n(e,t,r)}))}))}_updateChangedProperties(e,t,n,r,s,a,o,i){const c=n&&i.some((e=>r.startsWith(e)));if(e!==t||c){const e=r.lastIndexOf("."),t=r.substring(0,e),i=r.substring(e),c=yo.getMessages({type:"error",property:i,context:s,pageReference:t});if(c?.length>0&&o.push(r),!n)return;a.push(r)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&$g.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,r,s,a,o){if("object"!=typeof e){s.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=Rg(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,r,a,o)}const i=Object.keys(e??{});for(let c=0,l=i.length;c<l;c+=1){const l=i[c],u=`${n}.${l}`;if(Array.isArray(e[l])){const n=Rg(u,"",t);n&&n?.length===e[l].length||o.push(u)}this._getServerProperties(e[l],t,u,r,s,a,o)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],s=[],a=[],o=$g.getIn(e,n);return o&&t?(this._getServerProperties(o,t,n,r,a,s,[]),{changedListProperty:r,leafProperty:a,changedPropertyWithError:s}):{changedListProperty:r,leafProperty:a,changedPropertyWithError:s}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Ag=new Eg;let _g=null;const Cg=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),Sg=e=>{_g=e},Tg=()=>_g,Ng=e=>{if(!e)return;let t=[],n=[],r=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:r}=Ag.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),_g?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(r.length&&!e.payload.skipValidation){r.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{yo.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const r=ro.getFieldReferenceForProperty(e.payload.context,`${n}${t}`),s=Hg.resolveContextTreeNodeProps(r.props);Vi.validate(s.componentName?.toLowerCase(),s.propertyName,Hg.getLitePropertyValue(s,s.propertyName),s)}))}Ag.handleServerChanges(e.payload.context,t,n)}},Og=e=>Tg()?.getState().data?.[e],Pg=()=>Tg()?.getState().data[j.SHARED],Dg=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const s=e?.startsWith(".")?t+e:e,a=Cg(s);return $g.getIn(n,a)},Rg=(e,t,n)=>Dg(e,t,Og(n)),bg=(e,t,n)=>Dg(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,Og(n)),vg=(e,t,n)=>((e,t,n)=>{const r=Cg(`${t}.${n}`);return $g.getIn(e,r)})(Og(n),`${j.CONTEXT_DATA}.${e}`,t),xg=e=>{const{context:t}=e,n=Tg()?.getState().data[t];if(n)return de;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?Ce:de},wg=(e,t)=>{const n=Cg(t);return $g.deleteIn(e,n)},Mg=e=>!Array.isArray(e)&&"object"==typeof e,Lg=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:s=[],propertiesToReArrange:a=[]}=n;Array.isArray(e)&&!t&&(t=[]),Array.isArray(s)&&s.length>0&&s.forEach((t=>{t.allowMultiple?t.allowMultiple&&!a.includes(t.path)&&$g.setIn(e,t.path,[]):$g.setIn(e,t.path,{})})),a.length>0&&$g.rearrangeProperties(a,e);const o=(e,t)=>{if(Mg(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return w()(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return w()(e,t,o);{const n=t.length;if(void 0===r&&n===e.length)return w()(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},Fg=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:s}=r,a=Cg(t);if("object"==typeof n){const t=Lg($g.getIn(e,a),n,{isArrayDeepMerge:s});return $g.setIn(e,a,t)}return $g.setIn(e,a,n)},Ug=(e,t,n)=>{const r=Cg(t);return $g.setIn(e,r,n)},jg=()=>{const e=tt,{promise:t,actionMgrID:n}=oc.actionManagerPromise(e);return Ng({type:e,payload:{actionMgrID:n}}),t},Vg=e=>{const t=Tg()?.getState();return!!t?.data?.[e]};class kg{static mergeDeep(e,t){return w()(t,e)}static hasIn(e,t){return P()(e,t)}static getIn(e,t,n){return R()(e,t,n)}static setIn(e,t,n){return v()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return L()(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let t=0;t<e.length;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r of Object.keys(e)){const s=e[r];s&&"object"==typeof s&&!Array.isArray(s)?n=kg.isWhenExist(s):t.includes(r)&&"string"==typeof s&&s?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const r=new Set;if(e&&Object.keys(e).forEach((s=>{const a=e[s];t.includes(s)&&"string"==typeof a&&a.startsWith("@W ")&&(n=un.trimAnnotation(a),r.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=un.trimAnnotation(t[e]),r.add(n))}))}return[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r of Object.keys(e))t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let s=0;for(;s<r.length-1;s+=1){const e=r[s];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[s]]||(t[r[s]]=Array.isArray(n)?[]:{}),Lg(t[r[s]],n,{isArrayDeepMerge:!0})):t[r[s]]=n};static getHashedString(e){return(0,S.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&kg.isEqual(e[n[r]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):""}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([s,a])=>{r.push(Array.isArray(e)?Number(s):s),Array.isArray(a)?a.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof a?n(a,r):t(r.slice(),a),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let s;r.reduce(((e,t,a)=>(s=e[t]?e[t]:Number.isNaN(Number(r[a+1]))?r.length-1===a?n:{}:[],e[t]=s,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{kg.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const s=t?`${t}.${r}`:r;kg.flatten(e[r],s,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(j.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(j.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return ti.formatPageReference(n)}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&oc.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];"string"==typeof r?n="true"===r||"false"!==r&&r:"object"==typeof r?(n=r,kg.convertObjectWithStringToBoolean(r)):n=r,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=kg.getIn(t,e);if(!n)return;const r=Object.hasOwn(n,"pyCount");if(r&&(n=n.pxResults),!n)return;const s=n.filter((e=>!e.error)),a=n.filter((e=>e.error));kg.setIn(t,r?`${e}.pxResults`:e,[...s,...a])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],r=n.findIndex((e=>e.startsWith("workarea"))),s=n.findIndex((e=>e.startsWith("modal")));return-1!==r?t=n.slice(0,r+1).join("/"):-1!==s&&(t=n.slice(0,s+1).join("/")),Tg()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return kg.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const r=[];let s="";const a=n.getPageReference(),o=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let s=un.isProperty(n)?Rg(`.${un.getPropertyName(n)}`,a,o):n;null!=s&&""!==s||(s=j.NULL_STRING),r.push(s)}));let i=t;const c=r.join(j.HASH_DELIMITER);return c&&(s=kg.getHashedString(c),i=t+j.UNDERSCORE_STRING+s),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t)return null;const[,n,r,s,a,o,i,c]=t.map(Number);return new Date(n,r-1,s,a,o,i,c).getTime()}static containsEncodedPattern=e=>/%[0-9A-Fa-f]{2}/.test(e)}const $g=kg,Bg=j.SUMMARY_OF_LISTS,Gg=j.SUMMARY_OF_WHEN_CONDITIONS;class Wg{static updateData(e){Object.keys(e).forEach((t=>{Ng(Xg({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{Ng(Xg({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Gg}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return sg("string"==typeof n?n:"")}static resolveView(e,t,n=""){const r=ng(this.resolveName(e,t));let s=[];if(Array.isArray(r)&&r.length>0){if(t&&r.length>1){if(n||(n=t.getValue(j.CLASS_ID)||""),!n)return;s=r.filter((e=>e[j.CLASSID]===n))}return 0===s.length?r[0]:s[0]}return r}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=un.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=un.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let r;if(t)r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName());else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){r="manual"===t.dataRetrievalType?t.classID:t.pageClass}r||(r=n.ruleClass)}return r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,s=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===s?r=this.resolveNavigation(a||o,t):"view"===s?r=this.resolveView(a||o,t,c||""):"widget"===s&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return Rg(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const s=vg(`${t}.${Bg}`,e,n);s&&(r=this.resolvePropertyReference(t,s,n))}return r}static getPropertyValue(e,t,n){return e=un.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Wg.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:r,hasSuggestions:s,pageReference:a,context:o}=e;let i=t||r||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):s&&i===r?Wg.getPropertyValue(i,a,o?`${o}/${j.SUGGESTION}`:void 0):Wg.getPropertyValue(i,a,o||void 0)}static _handlePropString(e,t,n,r,s){n.startsWith("@")?e[t]=un.handleAnnotation(n,r,s):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const s=e[r];"string"==typeof s?this._handlePropString(e,r,s,t,n):Array.isArray(s)?s.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof s&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?($g.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?($g.mergeDeep(e,t),this._resolveProps(t,void 0,e),$g.resolveStringBooleans(t)):t}static resolveClassID(e,t,n){const r=un.trimAnnotation(e);let s;for(s=r.startsWith(".")?`${t}${r}`:`${r}`;s;){const e=Rg(j.CLASS_ID,s,n);if(e)return e;s=s.substring(0,s.lastIndexOf("."))}return null}}const Hg=Wg;const qg=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const zg=class{static#u=[];static#d=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=qg.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const s=e[r],a={actionHandler:s.handler,component:t,eventType:n,config:s.config};this.#u.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===vh.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=oc.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,s={};Hg.resolveProps(r,s,n),t&&(t(e.eventType,s,n),this.#g())};static#g=()=>{if(!this.#d){if(0===this.#u.length)return;const e=this.#u.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#u.length>0&&this.#g()}};static#f=()=>{this.#g()};static#m=(e,t,n)=>{this.#p(e,t,n),this.#f()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Hg.getContextPath(t,n)};static#I(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:s,actions:a}=n[r];if(a){const n=this.getActionHandlers(a,s,t);n&&n.length>0&&this.#m(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();uo({type:U.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===vh.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let n,{target:s}=t;null===s&&t&&t.auxiliaryTarget&&(s=t.auxiliaryTarget),n=void 0===s?t.value:"value"in s?s.value:s.innerText;const a=this.getFullRef(e);Ng({type:Q,payload:{reference:a,value:n,context:r}}),void 0!==s&&this.isEditable(s)&&!this.isNonKeyInput(s)||Ng({type:ee,payload:{reference:a,pageReference:e.getPageReference(),value:n,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),s=e.getStateProps();for(const e of Object.keys(t)){const a=s[e],o=t[e];Ng({type:Q,payload:{reference:Hg.getContextPath(n,a),value:o,context:r}}),Ng({type:ee,payload:{reference:Hg.getContextPath(n,a),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:r,validationValue:s}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&uo({type:U.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?s:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),this.isNonKeyInput(n)||Ng({type:ee,payload:{reference:a,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#I(e,n)};static pause=()=>{this.#d=!0};static resume=()=>{this.#d=!1,this.#g()};static isQueueEmpty=()=>0===this.#u.length;static clearQueue=()=>{this.#u=[]};static getActionsQueue=()=>this.#u;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Yg="CREATE_WORK",Kg=e=>({type:Yg,payload:e});const Jg=(e,t,n,r,s="")=>{const a=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,r,s,a,o){const i=r.substring(0,r.indexOf("[")),c=r.substring(r.indexOf("[")+1,r.indexOf("]"));let l=t[i];const u=`${$g.trimDotForProperty(s)}.${i}`;o.includes(u)&&Object.hasOwn(l,"pyCount")&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[r]),a.push(i),n.add(`${s}.${r}`))}(e,t,n,o,s,a,r):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),Jg(e[o],t[o],n,r,`${s}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,a)},Xg=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[],propertiesToReArrange:s=[]}=t,{context:a,data:o,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=sp(a,!0),u=Og(a);let d={};if(u&&o){d=JSON.parse(JSON.stringify(u));const e=JSON.parse(JSON.stringify(o));s.length>0&&$g.rearrangeProperties(s,d);const t=new Set;Jg(l,d,t,s),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=$g.trimDotForProperty(e);const[s,a,o]=Ha(e);if(s&&a&&o&&!r.has(`${s}.${a}`)){const e=$g.getIn(n,`${s}.${a}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+o&&$g.setIn(t,`${s}.${a}[${n}]`,e)})),r.add(`${s}.${a}`)}}))})(t,d,e)}!function(e,t){const n=$g.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=$g.getIn(t,j.REFERENCED_USERS,{}),void $g.setIn(e,j.REFERENCED_USERS,{...r,...n});r=$g.getIn(t,j.REFERENCED_USERS,[]);const s=new Map;for(const e of[...r,...n])if(s.has(e.UserID)){const t=s.get(e.UserID);s.set(e.UserID,{...t,...e})}else s.set(e.UserID,e);n.length=0;for(const e of s.values())n.push(e)}}(o,u);const p=$g.getIn(e?.data,j.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),h=xl.isExternalObject(p),g=h?{[j.OBJECT_INFO.OBJECT_INFO]:{[j.CONTENT]:{...d[j.OBJECT_INFO.OBJECT_INFO]?.[j.CONTENT]}}}:{[j.CASE_INFO.CASE_INFO]:{[j.CONTENT]:{...d[j.CASE_INFO.CASE_INFO]?.[j.CONTENT]}}},f=h?j.OBJECT_INFO.OBJECT_INFO_CONTENT:j.CASE_INFO.CASE_INFO_CONTENT;let m=o;return c?(n.forEach((e=>{const t=`${f}.${e}`;$g.deleteIn(g,t)})),m=Lg(o,g,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=Zd[e]||{};Object.keys(n).forEach((e=>{$g.hasIn(t,e)&&(n[e].value=$g.getIn(t,e))}));let r=yl.getStateMachinesByContext(e)||{};r={...r,...yl.getUnConnectedStateMachines(e)||{}},Object.keys(r).forEach((n=>{if($g.hasIn(t,n)){const r=$g.getIn(t,n);r&&Array.isArray(r)&&0===r.length&&yl.setStateMachineEmpty(e,n)}}))})(a,o),{type:fe,payload:{...e,data:m,...r.length>0?{propertiesToReplace:r}:null,...s.length>0?{propertiesToReArrange:s}:null}}},Qg=e=>({type:"SHOW_HARNESS",payload:e}),Zg=e=>({type:te,payload:e}),ef=e=>({type:ne,payload:e}),tf=e=>({type:"ADD_WORK",payload:e}),nf=e=>({type:ue,payload:e}),rf=e=>({type:Ae,payload:e}),sf=e=>({type:_e,payload:e}),af=e=>({type:Ce,payload:e}),of=e=>({type:Te,payload:e}),cf=e=>({type:Ne,payload:e}),lf=e=>({type:De,payload:e}),uf=e=>({type:be,payload:e}),df=e=>({type:Re,payload:e}),pf=e=>{const{containerItemID:t}=e;e.suggestionContexts=Vp(t);const n=e?.data?.caseInfo?.content,r=Object.keys(n||{}).length>0;return e.propertiesToReplace=r?xl.getPropertiesToReplace(t):[],{type:xe,payload:e}},hf=e=>{const{context:t}=e;return{type:oe,payload:{context:t}}},gf=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},ff=e=>({type:we,payload:e}),mf=e=>({type:ve,payload:e}),If=e=>({type:Ze,payload:e}),yf=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Mp(n)),e.context=r,e.deleteContext=!Zp(n),e.childContainers=Up(n),e.childContainersContexts=jp(n),e.transientItems=eh([...e.childContainersContexts,n]),e.suggestionContexts=Vp(n),n===t&&(e.caseID=Rg(j.CASE_INFO.CASE_INFO_ID,"",t)||Rg(j.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=Rg(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Se,payload:e}},Ef=e=>{const{containerItemID:t}=e;return e.transientItems=eh([...jp(t),t]),{type:Pe,payload:e}},Af=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Oe,payload:e}},_f=e=>{const{context:t,containerItemID:n}=e;let r=t;if(r||(r=Mp(n)),e.context=r,e.childContainers=Up(n),e.childContainersContexts=jp(n),e.transientItems=eh([...e.childContainersContexts,n]),e.suggestionContexts=Vp(n),n===t){e.caseID=Rg(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=Rg(j.CASE_INFO.REMOTESYSTEMID,"",t);const n=Rg(j.CASE_INFO.CASE_INFO_CLASSNAME,"",t);$.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:Me,payload:e}},Cf=e=>({type:pe,payload:e}),Sf=e=>({type:ge,payload:e}),Tf=e=>({type:ye,payload:e}),Nf=(e,...t)=>(zg.resume(),e(...t)),Of=(e,t,n,r,s)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:s}}),Pf=e=>({type:rt,payload:e}),Df=e=>({type:st,payload:e}),Rf=e=>({type:at,payload:e}),bf=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),vf=e=>({type:ce,payload:e}),xf=e=>({type:Q,payload:e}),wf="add",Mf="replace",Lf=["portal","noPortal","preview","debug","devtool","activeTab"];let Ff="",Uf="Home",jf="",Vf=!0;const kf=e=>(Vf=e,Vf),$f=()=>Vf,Bf=(e,t,n)=>bh.getSemanticURL(e,t,n),Gf=(e,t)=>bh.getRestEndPoint(e,t),Wf=(e,t)=>{let n=E();const r=Gf(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},Hf=(e,t,n)=>{const{root:r,resources:s}=e,{views:a}=s,{config:o}=r,i=wf;let c="";if(n)c=n;else{const e=a[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(Eh);if(l){const e=$g.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},qf=(e,t,n)=>{let r,s;r=_h(t)?`${e}/${t}`:e;const a=_h(n?.pxURLPath);a&&(r=`${r}/${a}`);try{s=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(Dh()?(r=((e,t,n,r,s)=>{const a=bh.getStaticRoutePage(),o=Uf?.toLowerCase(),i=a?.toLowerCase(),c=r?.toLowerCase();return i!==o&&c!==o||s.has("noPortal")?e:`${t}/${n}`})(r,e,t,i,c),bh.setStaticRoutePage("")):i.toLowerCase()!==Uf.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!bh.isDefaultPortal()){const e=bh.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return s=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&Lf.includes(n)&&e.append(n,r);return e})(s,c),s.toString()&&(r+=`?${s.toString()}`),r},zf=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r,queryParam:s},a=!1)=>{let o,i,c;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(a)o=t,i=n,c=r;else{const{uiResources:n,data:r}=e;({options:c}=e),o=t&&t.pxURLPath&&Ah(t.pxURLPath)?Hf(n,r,t.pxURLPath):t||Hf(n,r),i=bh.getEndPointInfo(o.pxURLPath),o.pxURLPath=i.urlPath}let l=qf(Ff,bh.getApplicationPath(),o);const{title:u}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:bh.getApplicationName()),n===`${Ff}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),s=r.split("/");return/\d/.test(r)?{title:`${e} - ${s[s.length-1]}`}:{title:`${e} - ${s[0]}`}})(jf,bh.getApplicationPath(),l),d=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(i,{...c,title:u});o?.historyAction===wf?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(d,u,l):o?.historyAction===Mf&&(s&&(l+=`?${s}`),((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(d,u,l))},Yf=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:wf,pxURLPath:""},t.pxURLPath=e.semanticURL),zf(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},Kf=e=>{Yf(e)},Jf=e=>{const t={pxURLPath:e};return qf(Ff,bh.getApplicationPath(),t)},Xf=e=>{const{uiResources:t}=e;$f()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,s=t.config,a=s.type,o=s.name;if("VIEW"===a.toUpperCase()){const e=r[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&Yf(e)},Qf=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},Zf=(e,t,n)=>{const{caseClassName:r,workID:s}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=$.getRemoteCase(r),u={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:At,viewName:V,gadgetId:xl.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${s}`,containerName:a,name:l};Ng(d.showPage(u))},em=e=>{const t=(e=>"ui-navigation"===e.state?.type?(_o.publish(U.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);t&&($.isTraditionalRemoteCase(t.payload?.caseClassName)?Zf({...t},t.options):Ng(d.showHistory(Qf(t))))},tm=()=>bh.getApplicationPath()!==Sh(),nm=e=>{const{acName:t,context:n,defaultViewLabel:r,ruleName:s,className:a}=e,o=((e,t)=>{const n=bh.getRoutingInfo();if(Dh()&&Object.values(n?.routes).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const r=e.split(" ").join(""),s=e.split(" ").join("-").toLowerCase(),a=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes[r]?r:n?.routes[s]?s:n?.routes[a]?a:e})(s||r,a);(e=>{Uf=e})(o),bh.setDefaultRoute(o),bh.setDefaultClassName(a);const i=H(t,n),c=Pt(t,n),l="true"===vh.getIsExtraCallRequiredForDefaultHome(),u={historyAction:Mf,pxURLPath:""};let p,h=null;const g={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&tm()){const t=Oh(Th());vh.shouldUseURLParams()&&(h=t.includes("?")?t.split("?")[1]:null),p=Ph(t,g),u.pxURLPath=p.urlPath,void 0!==p.payload?.pageClass&&(p.payload.pageClass=Tg()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:g,routeKey:p.routeKey};$.isTraditionalRemoteCase(p?.payload?.caseClassName)?Zf(r,e,g.context):Ng(d[n](Qf(r)))}else p=bh.getEndPointInfo(Uf),u.pxURLPath="";zf(null,{urlPathObjParam:u,infoParam:p,optionsParam:g,queryParam:h},!0)},rm=(e,t=!1)=>{var n;Ff=e.domain,!1===t&&$f()&&(n=em,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),bh.init(e,Uf)},sm=e=>{(e=>{window.document.title=e})(e)};function am(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var om=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),im=()=>Math.random().toString(36).substring(7).split("").join("."),cm={INIT:`@@redux/INIT${im()}`,REPLACE:`@@redux/REPLACE${im()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${im()}`};function lm(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function um(e,t,n){if("function"!=typeof e)throw new Error(am(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(am(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(am(1));return n(um)(e,t)}let r=e,s=t,a=new Map,o=a,i=0,c=!1;function l(){o===a&&(o=new Map,a.forEach(((e,t)=>{o.set(t,e)})))}function u(){if(c)throw new Error(am(3));return s}function d(e){if("function"!=typeof e)throw new Error(am(4));if(c)throw new Error(am(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(am(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!lm(e))throw new Error(am(7));if(void 0===e.type)throw new Error(am(8));if("string"!=typeof e.type)throw new Error(am(17));if(c)throw new Error(am(9));try{c=!0,s=r(s,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:cm.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(am(10));r=e,p({type:cm.REPLACE})},[om]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(am(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[om](){return this}}}}}function dm(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const s=t[r];0,"function"==typeof e[s]&&(n[s]=e[s])}const r=Object.keys(n);let s;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:cm.INIT}))throw new Error(am(12));if(void 0===n(void 0,{type:cm.PROBE_UNKNOWN_ACTION()}))throw new Error(am(13))}))}(n)}catch(e){s=e}return function(e={},t){if(s)throw s;let a=!1;const o={};for(let s=0;s<r.length;s++){const i=r[s],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(am(14))}o[i]=u,a=a||u!==l}return a=a||r.length!==Object.keys(e).length,a?o:e}}function pm(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function hm(e){return({dispatch:t,getState:n})=>r=>s=>"function"==typeof s?s(t,n,e):r(s)}var gm=hm(),fm=hm,mm=Symbol.for("immer-nothing"),Im=Symbol.for("immer-draftable"),ym=Symbol.for("immer-state");function Em(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Am=Object.getPrototypeOf;function _m(e){return!!e&&!!e[ym]}function Cm(e){return!!e&&(Tm(e)||Array.isArray(e)||!!e[Im]||!!e.constructor?.[Im]||Rm(e)||bm(e))}var Sm=Object.prototype.constructor.toString();function Tm(e){if(!e||"object"!=typeof e)return!1;const t=Am(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Sm}function Nm(e,t){0===Om(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function Om(e){const t=e[ym];return t?t.type_:Array.isArray(e)?1:Rm(e)?2:bm(e)?3:0}function Pm(e,t){return 2===Om(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Dm(e,t,n){const r=Om(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Rm(e){return e instanceof Map}function bm(e){return e instanceof Set}function vm(e){return e.copy_||e.base_}function xm(e,t){if(Rm(e))return new Map(e);if(bm(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Tm(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[ym];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const s=n[r],a=t[s];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Am(e),t)}{const t=Am(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function wm(e,t=!1){return Lm(e)||_m(e)||!Cm(e)||(Om(e)>1&&(e.set=e.add=e.clear=e.delete=Mm),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>wm(t,!0)))),e}function Mm(){Em(2)}function Lm(e){return Object.isFrozen(e)}var Fm,Um={};function jm(e){const t=Um[e];return t||Em(0),t}function Vm(){return Fm}function km(e,t){t&&(jm("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $m(e){Bm(e),e.drafts_.forEach(Wm),e.drafts_=null}function Bm(e){e===Fm&&(Fm=e.parent_)}function Gm(e){return Fm={drafts_:[],parent_:Fm,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Wm(e){const t=e[ym];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Hm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[ym].modified_&&($m(t),Em(4)),Cm(e)&&(e=qm(t,e),t.parent_||Ym(t,e)),t.patches_&&jm("Patches").generateReplacementPatches_(n[ym].base_,e,t.patches_,t.inversePatches_)):e=qm(t,n,[]),$m(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mm?e:void 0}function qm(e,t,n){if(Lm(t))return t;const r=t[ym];if(!r)return Nm(t,((s,a)=>zm(e,r,t,s,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ym(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let s=t,a=!1;3===r.type_&&(s=new Set(t),t.clear(),a=!0),Nm(s,((s,o)=>zm(e,r,t,s,o,n,a))),Ym(e,t,!1),n&&e.patches_&&jm("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function zm(e,t,n,r,s,a,o){if(_m(s)){const o=qm(e,s,a&&t&&3!==t.type_&&!Pm(t.assigned_,r)?a.concat(r):void 0);if(Dm(n,r,o),!_m(o))return;e.canAutoFreeze_=!1}else o&&n.add(s);if(Cm(s)&&!Lm(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;qm(e,s),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Ym(e,s)}}function Ym(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wm(t,n)}var Km={get(e,t){if(t===ym)return e;const n=vm(e);if(!Pm(n,t))return function(e,t,n){const r=Qm(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Cm(r)?r:r===Xm(e.base_,t)?(eI(e),e.copy_[t]=tI(r,e)):r},has:(e,t)=>t in vm(e),ownKeys:e=>Reflect.ownKeys(vm(e)),set(e,t,n){const r=Qm(vm(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Xm(vm(e),t),o=r?.[ym];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((s=n)===(a=r)?0!==s||1/s==1/a:s!=s&&a!=a)&&(void 0!==n||Pm(e.base_,t)))return!0;eI(e),Zm(e)}var s,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Xm(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,eI(e),Zm(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=vm(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Em(11)},getPrototypeOf:e=>Am(e.base_),setPrototypeOf(){Em(12)}},Jm={};function Xm(e,t){const n=e[ym];return(n?vm(n):e)[t]}function Qm(e,t){if(!(t in e))return;let n=Am(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Am(n)}}function Zm(e){e.modified_||(e.modified_=!0,e.parent_&&Zm(e.parent_))}function eI(e){e.copy_||(e.copy_=xm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Nm(Km,((e,t)=>{Jm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Jm.deleteProperty=function(e,t){return Jm.set.call(this,e,t,void 0)},Jm.set=function(e,t,n){return Km.set.call(this,e[0],t,n,e[0])};function tI(e,t){const n=Rm(e)?jm("MapSet").proxyMap_(e,t):bm(e)?jm("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Vm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Km;n&&(s=[r],a=Jm);const{revoke:o,proxy:i}=Proxy.revocable(s,a);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:Vm()).drafts_.push(n),n}function nI(e){if(!Cm(e)||Lm(e))return e;const t=e[ym];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xm(e,t.scope_.immer_.useStrictShallowCopy_)}else n=xm(e,!0);return Nm(n,((e,t)=>{Dm(n,e,nI(t))})),t&&(t.finalized_=!1),n}var rI=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...s){return r.produce(e,(e=>t.call(this,e,...s)))}}let r;if("function"!=typeof t&&Em(6),void 0!==n&&"function"!=typeof n&&Em(7),Cm(e)){const s=Gm(this),a=tI(e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?$m(s):Bm(s)}return km(s,n),Hm(r,s)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===mm&&(r=void 0),this.autoFreeze_&&wm(r,!0),n){const t=[],s=[];jm("Patches").generateReplacementPatches_(e,r,t,s),n(t,s)}return r}Em(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Cm(e)||Em(8),_m(e)&&(e=function(e){_m(e)||Em(10);return nI(e)}(e));const t=Gm(this),n=tI(e,void 0);return n[ym].isManual_=!0,Bm(t),n}finishDraft(e,t){const n=e&&e[ym];n&&n.isManual_||Em(9);const{scope_:r}=n;return km(r,t),Hm(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=jm("Patches").applyPatches_;return _m(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},sI=rI.produce;rI.produceWithPatches.bind(rI),rI.setAutoFreeze.bind(rI),rI.setUseStrictShallowCopy.bind(rI),rI.applyPatches.bind(rI),rI.createDraft.bind(rI),rI.finishDraft.bind(rI);var aI="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?pm:pm.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var oI=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function iI(e){return Cm(e)?sI(e,(()=>{})):e}var cI="RTK_autoBatch",lI=e=>t=>{setTimeout(t,e)},uI=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new oI(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let s=!0,a=!1,o=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:lI(10):"callback"===e.type?e.queueNotification:lI(e.timeout),l=()=>{o=!1,a&&(a=!1,i.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>s&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return s=!e?.meta?.[cI],a=!s,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{s=!0}}})})("object"==typeof n?n:void 0)),r};function dI(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:s=!0}=e??{};let a=new oI;return t&&("boolean"==typeof t?a.push(gm):a.push(fm(t.extraArgument))),a},{reducer:n,middleware:r,devTools:s=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!lm(n))throw new Error(fI(1));c=dm(n)}l="function"==typeof r?r(t):t();let u=pm;s&&(u=aI({trace:!1,..."object"==typeof s&&s}));const d=function(...e){return t=>(n,r)=>{const s=t(n,r);let a=()=>{throw new Error(am(15))};const o={getState:s.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=pm(...i)(s.dispatch),{...s,dispatch:a}}}(...l),p=uI(d);return um(c,o,u(..."function"==typeof i?i(p):p()))}function pI(e){const t={},n=[];let r;const s={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(fI(28));if(r in t)throw new Error(fI(29));return t[r]=n,s},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),s),addDefaultCase:e=>(r=e,s)};return e(s),[t,n,r]}function hI(e,t){let n,[r,s,a]=pI(t);if("function"==typeof e)n=()=>iI(e());else{const t=iI(e);n=()=>t}function o(e=n(),t){let o=[r[t.type],...s.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===o.filter((e=>!!e)).length&&(o=[a]),o.reduce(((e,n)=>{if(n){if(_m(e)){const r=n(e,t);return void 0===r?e:r}if(Cm(e))return sI(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return o.getInitialState=n,o}var{assign:gI}=Object;Symbol.for("rtk-state-proxy-original");function fI(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var mI=function(e){function t(t,n){return e.call(this)||this}return Fs(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Js),II={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=II.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,$s([e,t],ks(n))):setInterval.apply(void 0,$s([e,t],ks(n)))},clearInterval:function(e){var t=II.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},yI=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Fs(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),II.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&II.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ks(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(mI),EI=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return Fs(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(yI),AI={now:function(){return(AI.delegate||Date).now()},delegate:void 0},_I=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=AI.now,e}(),CI=function(e){function t(t,n){void 0===n&&(n=_I.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Fs(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(_I),SI=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t}(CI))(EI),TI=ws((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),NI=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Fs(t,e),t.prototype.lift=function(e){var t=new OI(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new TI},t.prototype.next=function(e){var t=this;ia((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=Vs(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;ia((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;ia((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,s=n.isStopped,a=n.observers;return r||s?Xs:(this.currentObservers=null,a.push(e),new Js((function(){t.currentObservers=null,Ks(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,s=t.isStopped;n?e.error(r):s&&e.complete()},t.prototype.asObservable=function(){var e=new Ea;return e.source=this,e},t.create=function(e,t){return new OI(e,t)},t}(Ea),OI=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Fs(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Xs},t}(NI),PI=function(e,t){return PI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},PI(e,t)};Object.create;Object.create;var DI=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new NI,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}PI(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Ea);const RI=e=>{let t=new Set,n=t;const r=()=>{t===n&&(t=new Set(t))},s=e=>{let n=!0;return r(),t.add(e),()=>{n&&(r(),t.delete(e),n=!1)}},a=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let r=!1,o=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{o?r=!0:a()})),{...n,dispatch:e=>{const t=o;t||(r=!1,o=!0);const n=i(e),s=r&&!t;return t||(r=!1,o=!1),s&&a(),n},subscribe:s}}},bI=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{xu.updateDataPageStore(t),Object.keys(t).forEach((n=>{$g.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{$g.setIn(e,[j.SHARED,n,r],t[n][r])})):$g.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&$g.deleteIn(e,[r,"shared"])},vI=(e,t,n=!1)=>{const{context:r,caseViewMode:s=(n?void 0:j.PERFORM_MODE),containerName:a}=t;a!==Ip.WORKAREA&&s&&$g.setIn(e,[r,"context_data","caseViewMode"],s)},xI=(e,t)=>{const{context:n}=t;$g.setIn(e,[n,"context_data","actionType"],t.actionType),$g.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},wI=(e,t=[])=>{t.forEach((t=>$g.deleteIn(e,t)))},MI=(e,t=[])=>{t.forEach((t=>$g.deleteIn(e,t)))},LI=(e,t=[])=>{t.forEach((t=>{$g.deleteIn(e,t)}))},FI=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:s=!0}=n;$g.deleteIn(e,[t,"nextAssignmentInfo"]),$g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),$g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),$g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),$g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),$g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),s&&($g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),$g.deleteIn(e,[t,"caseMessages"])),r&&($g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),$g.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},UI=hI({},(e=>{e.addCase(Ce,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&FI(e,t.payload.context);const{target:n}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,vI(e,t.payload),xI(e,t.payload),bI(e,t.payload),((e,t)=>{const{context:n}=t;$g.deleteIn(e,[n,"context_data","blocking_action_counter"]),$g.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase(xe,((e,t)=>{t.payload.doDeleteCaseSummary&&FI(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=Lg(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=Lg(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&xI(e,t.payload),vI(e,t.payload),bI(e,t.payload),MI(e,t.payload.suggestionContexts)})).addCase(Se,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:r,deleteContext:s}=t;s&&$g.deleteIn(e,[r]),$g.deleteIn(e,[n])})(e,t.payload),LI(e,n),wI(e,t.payload.transientItems),MI(e,t.payload.suggestionContexts)})).addCase(_e,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{$g.deleteIn(e,[t])})):$g.deleteIn(e,[n])})).addCase(we,((e,t)=>{const{context:n,contextToBeRemoved:r,data:s,childContainersContextsToBeRemoved:a}=t.payload;FI(e,t.payload.context),vI(e,t.payload),e[n]=Lg(e[n],e[r]),e[n]=Lg(e[n],s),$g.deleteIn(e,[r]),LI(e,a),bI(e,t.payload)})).addCase(Me,((e,t)=>{const{context:n,pulseReplace:r=!0,childContainersContexts:s=[]}=t.payload;let{data:a}=t.payload;const o=$g.getIn(e[n],"pulse");let i=$g.getIn(e[n],"OperatorID"),c=$g.getIn(e[n],"pxRequestor");c&&a.pxRequestor&&(c=$g.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=$g.mergeDeep(i,a.OperatorID)),!r&&o&&(a=Fg(a,"pulse",o),a=Fg(a,"OperatorID",i),a=Fg(a,"pxRequestor",c)),$g.setIn(e,n,a),vI(e,t.payload),bI(e,t.payload),LI(e,s),wI(e,t.payload.transientItems),MI(e,t.payload.suggestionContexts)})).addCase(ot,((e,t)=>{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;FI(e,n,{doDeleteConfirmationDetails:r})})).addCase(Te,((e,t)=>{const{transientItemID:n,data:r}=t.payload;$g.setIn(e,n,r)})).addCase(Oe,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>$g.deleteIn(e,t)))})).addCase(Pe,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>$g.deleteIn(e,t)))})).addCase(Ne,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Lg($g.getIn(e,n),r)})).addCase(De,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Lg($g.getIn(e,n),r)})).addCase(Re,((e,t)=>{const{transientItemID:n,data:r}=t.payload;Object.keys(r??{}).forEach((t=>{$g.deleteIn(e,[n,t])}))})).addCase(be,((e,t)=>{const{transientItemID:n,data:r}=t.payload;$g.deleteIn(e,n),$g.setIn(e,n,r)})).addCase(ce,((e,t)=>{const{key:n,value:r}=t.payload;$g.setIn(e,`${j.SHARED}.${n}`,r)})).addCase(Ue,((e,t)=>{const{context:n,data:r}=t.payload;return $g.setIn(e,n,r)}))})),jI=UI,VI=hI({},(e=>{e.addCase(fe,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:r=[],uiRootReference:s=""}=t.payload,a=s&&"string"==typeof t.payload.context?`${t.payload.context}.${s}`:t.payload.context,o="string"==typeof a?Cg(a):[],i={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...r]};s&&o.length?$g.setIn(e,o,Lg($g.getIn(e,o),$g.getIn(t.payload.data,Cg(s)),i)):e[t.payload.context]=Lg(e[t.payload.context],t.payload.data,i),vI(e,t.payload,!0),bI(e,t.payload)})).addCase(Q,((e,t)=>{const{context:n,reference:r,value:s,isArrayDeepMerge:a}=t.payload;Fg(e[n],r,s,{isArrayDeepMerge:a})})).addCase(Z,((e,t)=>{const{context:n,reference:r,value:s}=t.payload;Ug(e[n],r,s)})).addCase(me,((e,t)=>{wg(e[t.payload.context],t.payload.reference)})).addCase(oe,((e,t)=>{$g.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(ie,((e,t)=>{$g.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(rt,((e,t)=>{const{data:n}=t.payload;bI(e,{data:{shared:n}})})).addCase(st,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;$g.deleteIn(e.shared,[n,r]);const s=$g.getIn(e.shared,[n]);s&&0===Object.keys(s).length&&$g.deleteIn(e.shared,[n])}))})).addCase(it,((e,t)=>{const n=$g.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?$g.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):$g.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)}))})),kI=VI,$I=/\[(\d+)\]$/gi,BI=/(\d+)/gi,GI=/\[.\]$/gi,WI=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const s=$g.getIn(t,r);if(s){const t=ho(s,[],[]);for(const s of t)$g.setIn(e[n],[...r,...s],{})}},HI=(e,t,n,r)=>{const{property:s,pageReference:a,category:o,type:i}=r.payload,c=$g.getIn(e[t],n);if(c&&o===j.CASEMESSAGES)$g.setIn(e[t],ao(s,a,o),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&$g.setIn(e[t],ao(s,a,o),r)}},qI=(e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return WI(e,i,c),e;const l=ao(n,r,s,a);if(Number.isInteger(o)){$g.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=$g.getIn(e[c],t)||{};const r=(u=Object.keys(n),[...u].sort(((e,t)=>{const n=e.match($I),r=t.match($I);if(!n&&!r)return e.localeCompare(t);if(!n&&r)return-1;if(n?.length&&r?.length){const e=n[0].match(BI),t=r[0].match(BI);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=r.map((e=>n[e])),n.forEach(((n,s)=>{const a=r[s].match($I);if(a?.length){const i=parseInt(a[0].match(BI)[0],10);i>o&&($g.deleteIn(e[c],t.concat(r[s])),$g.setIn(e[c],t.concat(r[s].replace(GI,`[${i-1}]`)),n))}}))}else $g.setIn(e[c],l,{});var u;return e};function zI(e,t){const n=$g.getIn(e,t);return void 0!==n?.dataInfo?.content}const YI=(e,t)=>{const n=$g.getIn(e,t);return!0===xl.isObjectCaseType(n?.objectInfo?.objectTypeID)};function KI(e,t){let n=so.FIELD_MESSAGES_PATH;return zI(e,t)?n=so.DATA_OBJECT_FIELD_MESSAGES_PATH:YI(e,t)&&(n=so.OBJECT_FIELD_MESSAGES_PATH),n}const JI=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=$g.getIn(n,j.ERROR_FIELD_IN_PAGE).slice(1),s=$g.getIn(n,j.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(s){let a="caseInfo.content";zI(e,t)?a="dataInfo.content":YI(e,t)&&(a="objectInfo.content");let o=r?`${a}.${r}`:a;o=o.replace(/\(/g,"[").replace(/\)/g,"]");const i=ao(s,o,j.PROPERTY),c=$g.getIn(e[t],`${o}.classID`),l=Kh(s,c),u=vh.getLocale()??"en-US",d=new Ed(u,l?.localeReference),p={type:U.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:d.getLocalizedText(l.label)}},h=$g.getIn(e[t],i,[]);if($g.isContains(h,p))return;$g.setIn(e[t],i,[...h,p])}})(e,t,n)}))};function XI(e,t){const{err:n,formFields:r}=t.payload;let{context:s}=t.payload;const{fieldErrors:a,pageErrors:o}=el(n.errorDetails,r),i=KI(e,s);if($g.setIn(e,[s,...i],{}),$g.setIn(e,[s,...so.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{const n=$g.getIn(t,j.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(t);if(!n)return!1;const r=t.substring(t.lastIndexOf(".")+1),a=ao(r,n,j.PROPERTY);$g.setIn(e,[s,...a],[])}}})),a.length>0&&JI(e,s,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:U.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[s]||(s=j.APP.APP),$g.setIn(e,[s,...so.PAGE_MESSAGES_PATH],t)}else s.includes&&s.includes(Ip.WORKAREA)&&(s=W(s)),$g.deleteIn(e,[s,...so.PAGE_MESSAGES_PATH]);return e}const QI=hI({},(e=>{e.addCase(Ee,((e,t)=>t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?XI(e,t):e)).addCase(xe,((e,t)=>{const{context:n}=t.payload,r=[n,...KI(e,n)],s=[n,...so.PAGE_MESSAGES_PATH];if($g.setIn(e,r,{}),$g.setIn(e,s,[]),n&&n.includes(Ip.WORKAREA)){const t=[J(n),...so.PAGE_MESSAGES_PATH];$g.setIn(e,t,[])}})).addCase(et,((e,t)=>{const{isListEntry:n,clearAll:r,context:s}=t.payload;return r?($g.deleteIn(e,[s,j.CONTEXT_DATA]),e):n?qI(e,t):((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return WI(e,o,i),e;const l=ao(n,r,s,a);return s===j.PAGE&&i?.includes(Ip.WORKAREA)&&(c=W(i)),HI(e,c,l,t),HI(e,i,l,t),e})(e,t)})).addCase(Ze,((e,t)=>{const{messages:n,property:r,pageReference:s,context:a,category:o}=t.payload,i=ao(r,s,o);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&$g.setIn(e[a],ao(r,s,o),n)}))})),ZI=QI,ey=(e,t,n,r,s)=>{$g.setIn(e[t],[...n,r],s)},ty=hI({},(e=>{e.addCase(at,((e,t)=>{const{instruction:n,actions:r,context:s,referenceList:a,listIndex:o,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,u=Cg(a);switch(n){case j.LIST_ACTIONS.ADD:ey(e,s,u,i,l);break;case j.LIST_ACTIONS.INSERT:ey(e,s,u,o,l);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,s)=>{const a=Lg($g.getIn(e[t],[...n,r],{}),s);$g.setIn(e[t],[...n,r],a)})(e,s,u,o??i,l);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r,s)=>{const a=$g.getIn(e[t],n,[]);"string"==typeof r?delete a[r]:a.splice(r,1),$g.setIn(e[t],n,a),ro.deleteListNode(t,[s],a.length)})(e,s,u,o??i,a);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,s)=>{const a=$g.getIn(e[t],[...n,r],{}),o=$g.getIn(e[t],n,[]);o.splice(r,1),o.splice(s,0,a),$g.setIn(e[t],n,o),co(e,t,n?.join("."),r,s)})(e,s,u,o,c);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const s=$g.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:a,listIndex:o}=e;if(r===j.LIST_ACTIONS.SELECT){s[o]=a;const e=n?.join(".");mi(t,e)}else delete s[o]})),$g.setIn(e[t],n,s.filter(Boolean))})(e,s,u,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{$g.setIn(e[t],n,[])})(e,s,u);break;case j.LIST_ACTIONS.REPLACE:((e,t,n,r)=>{$g.setIn(e[t],n,r)})(e,s,u,l);break;case j.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{$g.setIn(e[t],n,{})})(e,s,u)}}))})),ny=[kI,jI,ZI,ty],ry=(e,t)=>(e||(e=uy().data),t.type===tt?uy().data:(ny.forEach((n=>{e=n(e,t)})),e)),sy={},ay=(e,t=[])=>{t.forEach((t=>{$g.deleteIn(e,[t])}))},oy=(e,t)=>{const{type:n,payload:r}=t,s=n===xe,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:h="",clearView:g=!1}=r;return c?$g.setIn(e,[a,"items",l,"view"],c):g&&$g.deleteIn(e,[a,"items",l,"view"]),o&&$g.setIn(e,[a,"items",l,"context"],o),d&&$g.setIn(e,[a,"items",l,"flowName"],d),(!s||s&&h)&&$g.setIn(e,[a,"items",l,"key"],h.trim()),((e,t,n,r)=>{""===e&&$g.deleteIn(t,[n,"items",r,"key"])})(h,e,a,l),(!s||s&&i)&&$g.setIn(e,[a,"items",l,"semanticURL"],i),(!s||s&&p)&&$g.setIn(e,[a,"items",l,"resourceType"],p),ay(e,u),e},iy=hI(sy,(e=>{e.addCase(tt,(()=>sy)).addCase(Ae,((e,t)=>{const{context:n,name:r,type:s,actionMgrID:a}=t.payload,o=`${n}/${r}`;if(oc.resolveActionByID(a,null,!1),e[o])return e;$g.setIn(e,[o],{type:s,accessedOrder:[],items:{}})})).addCase(Fe,((e,t)=>{const{containerName:n,childContainers:r=[]}=t.payload;$g.deleteIn(e,[n]),r.forEach((t=>{$g.deleteIn(e,[t])}))})).addCase(_e,((e,t)=>{const{context:n,name:r,actionMgrID:s,childContainers:a}=t.payload,o=`${n}/${r}`;oc.resolveActionByID(s,null,!1),$g.setIn(e,[o,"accessedOrder"],[]),$g.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{$g.deleteIn(e,[t])}))})).addCase(Ce,((e,t)=>{const{target:n,context:r,isInCreateStage:s,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:m,modalOptions:I,resourceStatus:y,actionID:E,isMultiRecordData:A,acTertiary:_,parentContext:C,heading:S,isTraditionalRemoteCase:T,readOnly:N,referenceList:O,subscriptName:P,subscriptFieldName:D,pageGroupName:R,isPageGroup:b,index:v}=t.payload,x=e[n],M=x&&x.type,L=x&&x.accessedOrder||[],F=x&&x.items||{};if(e[n]&&"single"===M&&L.length>0)return oy(e,t);const U={accessedOrder:[...L,c],items:{...F,[c]:{view:i,semanticURL:o,key:u,flowName:d,readOnly:N,context:r,isInCreateStage:s,resourceType:p,actionName:h,isMinimizable:g,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:I,isTraditionalRemoteCase:T,resourceStatus:y,referenceList:O,subscriptName:P,subscriptFieldName:D,pageGroupName:R,isPageGroup:b,index:v,...E&&{actionID:E},..._&&{acTertiary:_},...A&&{isMultiRecordData:A},...C&&{parentContext:C},heading:S}}};oc.resolveActionByID(l,null,!1),e[n]=w()(e[n],U)})).addCase(xe,((e,t)=>{const{actionMgrID:n,data:r}=t.payload;try{oy(e,t),oc.resolveActionByID(n,r,!1)}catch{oc.rejectActionByID(n,!1)}})).addCase(Me,((e,t)=>((e,t)=>{const{actionMgrID:n,data:r,target:s,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[s]?.type;let c=e&&e[s]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],$g.setIn(e,[s,"items",a,"transientItems"],[]),$g.setIn(e,[s,"accessedOrder"],c),o=oy(e,t),oc.resolveActionByID(n,r,!1)}catch{oc.rejectActionByID(n,!1)}return o})(e,t))).addCase(ve,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:s}=t.payload;try{const t=$g.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),$g.setIn(e,[n,"accessedOrder"],t),oc.resolveActionByID(s,null,!1)}catch{oc.rejectActionByID(s,!1)}})).addCase(we,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=$g.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));$g.setIn(e,[n,"accessedOrder"],t),$g.deleteIn(e,[n,"items",r]),ay(e,a),oc.resolveActionByID(s,null,!1)}catch{oc.rejectActionByID(s,!1)}})).addCase(Se,((e,t)=>{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=$g.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));$g.setIn(e,[n,"accessedOrder"],t),$g.deleteIn(e,[n,"items",r]),ay(e,a),oc.resolveActionByID(s,null,!1)}catch{oc.rejectActionByID(s,!1)}})).addCase(Te,((e,t)=>{const{transientItemID:n,target:r,contextName:s}=t.payload,a=$g.getIn(e,[r,"items",s,"transientItems"])??[];$g.setIn(e,[r,"items",s,"transientItems"],[...a,n])})).addCase(Pe,((e,t)=>{const{target:n,containerItemID:r}=t.payload;$g.deleteIn(e,[n,"items",r,"transientItems"])})).addCase(Oe,((e,t)=>{const{target:n,transientItemID:r,containerItemID:s}=t.payload,a=($g.getIn(e,[n,"items",s,"transientItems"])??[]).filter((e=>e!==r));$g.setIn(e,[n,"items",s,"transientItems"],a)}))})),cy=iy;let ly={};const uy=()=>ly,dy=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];ly={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),{data:ry,containers:cy});function py(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=cu(e),r=function(e,t){return"number"==typeof iu(e)?e.pop():t}(e,1/0),s=e;return s.length?1===s.length?Da(s[0]):function(e){return void 0===e&&(e=1/0),au(Ia,e)}(r)(ja(s,n)):uu}const hy=(e,t=!1)=>e===j.ACTION?t?Yu.REFRESH_CASE_DATA:Yu.REFRESH_ASSIGNMENT_DATA:Yu.REFRESH_CASE_VIEW,gy=e=>{const{context:t}=e;let n={...Kc(t).content,contextData:!1};const r=fl(t);$g.isEmpty(r)||(n=gl(r,n));const s=hy(e.editType,e.isLocalAction),{restApi:a,reqType:o}=Wf(s,{ID:e.isLocalAction||e.editType!==j.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=a;return e.editType===j.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,ja(Ho(i,{method:o,body:n,headers:e.headers},t)).pipe(su((t=>({actionInPayload:e,response:t.data,headers:Yc(t.headers)}))),pu(": Error occurred during ajax call : ",t))},fy={},{VIEW:my,FIELD:Iy}=j.CONTEXT_TREE_NODE_TYPES,yy=(e,t,n)=>{const r=t.value.data[n]?.objectInfo?.headers,s=t.value.data[n]?.caseInfo?.headers;return e&&r?r:s},Ey=e=>(e=>Uo[e])(e)>0&&fy[e],Ay=(e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:s,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c,isMultiRecordData:l,editType:u,isLocalAction:d,interestPageActionID:p}=e,{optionalPayload:h}=c;h&&(t.content={...h});let g={},f={...t},m=Yu.REFRESH;if(r||l&&u===j.ACTION){const t=hy(u,d);l&&u===j.ACTION&&(f.interestPageActionID=p),g=Wf(t,e),f={...f,interestPage:i}}else o?g=((e,t)=>{const{isObjectType:n,isExternalObject:r,actionID:s,context:a}=e;if(t||n&&Hd(a))return Wf(r&&"Create"===s?Yu.REFRESH_EXTERNAL_OBJECT:Yu.REFRESH_CASE_DATA,e);return Wf(Yu.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(s.length>0||a.length>0)&&({restAPI:g,requestBody:f,requestType:m}=((e,t,n,r,s)=>(s={...s,calculations:{fields:t,whens:n}},{restAPI:Wf(r?Yu.RECALCULATE_CASE_DATA:Yu.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:s,requestType:Yu.RECALCULATE}))(e,s,a,n,f));return{restAPI:g,requestBody:f,requestType:m}},_y=[(e,t)=>e.pipe(nu(Yu.REFRESH_DATA,It),su((e=>e.payload)),au((e=>{const{context:n,contextData:r,options:s,isObjectType:a}=e,{propertyName:o="",classID:i="",isObjectWideAction:c}=s,l=Kc(n,{skipUUID:a,isObjectWideAction:c});let u=[],d=[],p=!1;vh.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:u=[],whens:d=[]}=Jd(n)),p=d.some((e=>e.type===my))):p=!0;const h=d.filter((e=>e.type===Iy)),g=$g.getPropertyName(o),f=g?g.split("."):[],m=f.pop(),I=f.join("."),y=[];I&&((e,t,n,r,s)=>{const a=Kh(e,t);if(!a||"copy"!==a.dataRetrievalType)return;const o=$g.getIn(n,`content.content.${e}`);if(!o||"object"!=typeof o)return;const i=r?Object.keys(o).filter((e=>e!==r)):Object.keys(o);i.length>0&&(i.forEach((e=>delete o[e])),s.push(e))})(I,i,l,m,y),e.serverPrecedenceFields=y;let E={...l.content,contextData:r};const A=fl(n);$g.isEmpty(A)||(E=gl(A,E));const _=Ay({...e,fieldsWithDeclarativeTargets:u,fieldsWithWhen:h,isViewsWithWhen:p},E);Ju.registerBlockingAction(n).catch((()=>{}));const{restAPI:C,requestBody:S,requestType:T}=_;(e={...e,requestType:T}).requestType=T;const{reqType:N,restApi:O}=C,P={...yy(a,t,n)};P&&!P.etag&&e.isMultiRecordData&&e.editType===j.ACTION&&(P.etag=$g.getETag(e.context));return ja(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if(Ey(r)){const t=[];for(let n=0;n<fy[r].length;){const s=fy[r][n],a=Kd(s,e);if("CANCEL_REFRESH"===a){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===a&&(t.push(n),s.cancelConfig?.cancel()),n+=1}t.forEach((e=>{fy[r].splice(e,1)}))}const s=Yo();return e.signal=s.token,e.cancelConfig=s,fy[r]?fy[r].push(e):fy[r]=[e],_o.publish(j.ON_REFRESH_START,{context:n}),Ho(e.url,e,n,{cancelContext:r}).then((e=>(delete fy[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete fy[r],e}))})({reqHeaders:P,context:n,method:N,body:S,url:Yd(e,O)},e)).pipe(su((t=>{const r=((e,t,n)=>{if(!xl.isObjectCaseType(t)&&!n)return e;const r=$g.getIn(e?.data,U.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return xl.isExternalObject(r)?e:F.transformCaseData(e)})(t?.data,s?.classID,a);return s?.resetForm&&ro.removeContextTreeNode(n),{response:{...r},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:Yc(t.headers)}})),pu(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),au((async e=>{if(e&&e.type===Ee)return _o.publish(j.ON_REFRESH_ERROR,{context:e.payload?.context}),Ju.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),tl(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:s,serverPrecedenceFields:a,requestType:o}=t,i=cc.getTargetViewContainerName(je),c=Pt(i,s),l={acName:c,context:s},u=Cd(n,{[U.STOPMERGEACTIONS]:!0,[U.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Yu.REFRESH&&await Xc(u,t,l);const d={target:c,context:s};let p=yl.getStateMachinesByContext(s)||{};const h=Jc(u,d);p={...p,...yl.getUnConnectedStateMachines(s)||{}},Object.keys(p).forEach((e=>{if($g.hasIn(h.data,e)){const t=$g.getIn(h.data,e),n=Rg(e,void 0,s),r=ro.getContextReferences(s)?.get(e);Array.isArray(t)&&Array.isArray(n)&&n.length!==t.length&&"Multiselect"!==r?.props?.componentName&&yl.setStateMachineEmpty(s,e)}})),h.isArrayDeepMerge=t.options?.isArrayDeepMerge,h.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const g=xl.getPropertiesToReArrange(s),f=Nf(Xg,h,{serverPrecedenceFields:a,propertiesToReArrange:g});return yl.registerForServerChanges(),Ng(f),oc.resolveActionByID(r,h),yl.unRegisterForServerChanges(),Ju.deRegisterBlockingAction(s).catch((()=>{})),_o.publish(j.ON_REFRESH_COMPLETE,{context:s}),[]})))],Cy=_y,Sy=[e=>e.pipe(nu(nt),au((async e=>{const{context:t}=e.payload,n={},r={},s=Object.keys(e.payload.datapages).map((s=>{const a=e.payload.datapages[s];if(a.mode===j.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=Pg()[a.name];if(n&&s in n){const r=n[s],{loadTime:a}=r;if(!_u.isTimeElapsed(a,e,t))return}}return _u.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===j.READONLY?r:n;t[a.name]?t[a.name][s]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[s]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(s);const a=[];return Object.keys(n).length&&a.push(Xg({context:t,data:n})),Object.keys(r).length&&a.push(Pf({data:r,context:t})),Ng(a),[]})))],Ty=Sy;class Ny{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>s.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{switch(e.data.action){case Ny.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case Ny.LOAD_PREVIEW:this.loadPreview(e);break;case Ny.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case Ny.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case Ny.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case Ny.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case Ny.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case Ny.CANCEL_CASE:this.handleCaseCancel();break;case Ny.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(_o.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=Up(U.APP.APP),t=e[e.length-1],n=vp(t),r=Og(n)?.caseInfo?.ID;if(r&&n&&Md({}).getPConnect().getActionsApi().getDescendants(r,n),Fc(n)){const e=mh(n);e&&Md({}).getPConnect().getActionsApi().getDescendants(r,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){Md({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=Md({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",s=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(s,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:s}=e.data;let a=r;r===Ny.OPEN_WORK_ITEM&&(a=Ny.OPEN_WORK_BY_HANDLE),bh.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:a});Md({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),s,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){Md({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:U.PRIMARY,context:U.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${U.APP.APP}${j.FORWARD_SLASH_STRING}${U.PRIMARY}`;Md({meta:{},options:{context:Lp(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${U.APP.APP}${j.FORWARD_SLASH_STRING}${U.PRIMARY}`;Md({meta:{},options:{context:Lp(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:r,caseInitProperties:s}=e.data;if(n===this.getUniqueId()){const e=`${U.APP.APP}${j.FORWARD_SLASH_STRING}${U.PRIMARY}`,n=Md({meta:{},options:{context:Lp(e)}}),a=new URLSearchParams((s+r).slice(1)),o=this.setStartingFields(a);n.getPConnect().getActionsApi().createWork(t,{startingFields:o})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),_o.subscribe(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),_o.subscribe(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{_o.unsubscribeAllWithEventType(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),_o.unsubscribeAllWithEventType(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:Ny.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:Ny.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:Ny.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const Oy=new Ny,Py="nextAssignmentInfo",Dy="nextAssignmentInfo.context",Ry=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||cc.getTargetViewContainerName(We)},by=e=>kp(e)?{continueExecution:!0,removeActionPayload:{}}:ol(e),vy=e=>{const t=$g.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return Ml(t)&&Ll(vh.getOperatorIdentifier(),t)},xy=(e,t)=>{const{class:n,context:r,viewType:s=qc.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:vh.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),ja(Gi.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe(su((({response:t,headers:n})=>(F.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),pu("Error occurred during ajax call at createWork Epic : ",r))},wy=e=>{_o.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},My=e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},Ly=e=>{let t=0,n=[],r={},s=!1;return e.pipe(nu(Yg),hu(100),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{context:n}=e,r=Ry(e),a=Pt(r,n),{continueExecution:o,removeActionPayload:i}=by(a);return s=kc(e.class),o?(e.isTraditionalUICase=s,xy(e,{removeActionPayload:i})):(oc.rejectActionByID(t),du())})),au((async e=>{if(e&&e.type===Ee)return e.payload.context=uh(),n.push(tl(e)),n;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e;let l;l=!(a.renderInline||vh.getDefaultCasePage()||s)&&vy(o),$g.setIn(o.data,U.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const u=Ry({...a,isInCreateStage:l}),d=Pt(u,a.context),p=rl(d,u,a.context);if(!Nc(u)&&kp(d)){const{continueExecution:e}=ol(d);if(!e)return oc.rejectActionByID(t),du()}if(!(a?.openCaseViewAfterCreate??!0)&&!l){const e=Mc(o),{businessID:t,caseType:s,resolvedURL:a}=Ic(o);return r={id:t,label:s,href:a},wy(r),My({caseId:t,assignmentId:e,caseType:s}),n}const h=Cd(o),g=String(bc(wc(h)));let f=Bf("createWork",{caseClassName:vc(h)});f=f.replace(/{.+?}/,g),h.semanticURL=f,sc.setComponentCache(g,Lo.addDebugHeaders(a.debugInfo)),((e,t)=>{const n=vy(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:s}=t,a=s&&!$c();$g.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,a);const m={acName:d,context:p},I=Wc(p);await Xc(h,a,m);const y={target:d,context:p,containerItemID:p,headers:i,semanticURL:f,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,currentCaseViewMode:I,assignmentContext:$g.getIn(h,Dy),nextAssignmentInfo:$g.getIn(h,Py),resourceType:U.CASE,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};Uc(y,h);const E=Jc(h,y);s&&(E.data.caseInfo.content.coexistenceAction="openAssignment");const A=nl(d,E);return sl(A)&&Lc(n,{removeActionPayload:c,target:d}),n.push(A),ul(n),n})),su((()=>{const e=$c(),a=Ml($g.getIn(n[0]?.payload,"data.caseInfo"));return s&&e&&a?Oy.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,hl,n):hl(n),Vc(n,t),r={},n=[],n})))},{RESOURCE_TYPES:Fy}=U,Uy=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:s,isChild:a}=e,o=Rc(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?qc.PAGE:n||(!Tc(r)&&!Tc(s)||a?qc.PAGE:qc.FORM)},jy=(e,t,n,r,s)=>{if(Lc(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=vp(t);let r=null;return n&&(r=_p(t,n)),r?.key===e&&$p(t)})(r.key,n))r.context=Lp(n),r.containerItemID=r.context,e.push(Nf(_f,r));else if((s?.isChild||s?.isRemote)&&s?.isMultiDoc){const t=Kp(s.context);r.target=t,r.context=s.context,r.containerItemID=s.context,e.push(Nf(_f,r))}else{const t=Kp(r.context),n=Op(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(Nf(_f,r))):e.push(Nf(af,r))}},Vy=(e,t,n,r,s,a,o)=>{kp(t)&&Bp(t)?((e,t,n,r,s)=>{Uy(e,t)===qc.FORM?(n.caseViewMode=r||j.PERFORM_MODE,s.push(Nf(pf,n))):s.push(Nf(_f,n))})(r,s,e,a,n):jy(n,o,t,e,r)},ky=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:s,isGetNextWork:a,doNotMergeMessagesForStatusCode:o})=>Ho(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...Lo.addDebugHeaders(r)}}},s,{doNotMergeHttpMessagesForStatusCode:a?o:""}),$y=(e,t)=>{const n=Uy(e),{headers:r,context:s,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e;let h,g;({restApi:h,reqType:g}=o?Wf("getNextWork",{viewType:n}):c?Wf("openStage",{caseID:u,stageID:l}):Wf(Ge,{assignmentID:a,viewType:n}));const{removeActionPayload:f}=t,m=vh.getDefaultCasePage();let I="",y=e.pageName;e.isTraditionalUICase&&(y="pyDetails"),I=m?`${h}?viewType=${n}&pageName=${m}`:y?`${h}?viewType=${n}&pageName=${y}`:`${h}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{I+=`&${e}=${d[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=Yc(t,e.remoteClassName)),t})(e);return ja(ky({restUrl:I,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"})).pipe(su((e=>{if(vh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return Ml(e.data.data.caseInfo)?e:(I=y?I.replaceAll(y,"pyDetails"):I,vh.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I})}return e})),au((e=>e?.isReloadWithDifferentViewTypeRequired?ky({restUrl:I,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"}):lu(e))),su((t=>{const{key:s,flowName:o}=Zc(a);return F.analyseResponse(t),{response:{...t.data,key:s,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:Yc({...r,...t.headers})}})),pu("Error occurred during ajax call at openAssignment Epic : ",s))},{RESOURCE_TYPES:By}=U,Gy=e=>{const t="Browser"===vh.getRuntime();let n=0,r=[];const s=[];let a=!1,o=!1;return e.pipe(nu(Hl),su((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),au((e=>{a=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?qc.FORM:Uy(e),e.viewType=r;const s=Cc(Ge,e),i=Pt(s,t),{activate:c,activateContainerActionPayload:l}=cl(By.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return lu({type:ve,activateContainerActionPayload:l,actionInPayload:e});const u=vp(i);let d;d=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:u?ol(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=d;return p?(o=kc(e.className),e.isTraditionalUICase=o,$y(e,{removeActionPayload:h})):(oc.rejectActionByID(n),du())})),au((async e=>{if(e?.type===Ee){if(a){const{payload:t}=e,{err:n}=t,r=n.response.status;s.push({status:Number(r)})}return r.push(tl(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:u,activateContainerActionPayload:d}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Hl,s=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...n,caseID:s,headers:l}};return r.push(a),r}const{context:p,caseViewMode:h,debugInfo:g}=n,f=i?.data?.caseInfo?.caseTypeID;o=kc(f),n.isTraditionalUICase=o;let m=((e,t)=>{const n=Rc(e);let r;r=!vh.getDefaultCasePage()&&Ml(n);const{isChild:s,containerName:a,isTraditionalUICase:o}=t,i=s&&r,c=r&&!t.isActionFromToDoList;return!i&&!c||o?a||Cc(Ge,t):j.MODAL})(i,n);o&&(m=n.containerName??m);const I=Pt(m,p);if(t===ve)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:s,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=Mp(s);await Xc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:u}),e.push(Nf(mf,{containerItemID:s,target:i,isParallelAssignment:a,insKey:o,resourceType:Fy.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,d,{actionInPayload:n,target:I}),ul(r),r;const y=i?.data?.caseInfo?.content,E=i?.data?.caseInfo?.ID,A=i?.uiResources?.root?.config?.name,_=i?.uiResources?.root?.config?.context;y&&!y.pyViewName&&A&&"page"!==n.viewType&&($g.setIn(y,"pyViewName",A),$g.setIn(y,"pyViewContext",_));const C=Cd(i);((e,t)=>{const n=Rc(e),r=wc(e),s=Ml(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=i&&!$c(),l=o===qc.PAGE&&(!s||c)&&!a,{caseTypeID:u}=n;if(l){const t=Bf(Be,{caseClassName:u}).replace(/{.+?}/,String(bc(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(C,n);const S=rl(I,m,p),T=n.debugInfo||{};T?.debugId||(T.debugId=Lo.getCoreHeadersFromContext(p)?.debugInfo?.[j.COREHEADER_APP_DEBUG_ID]),sc.setComponentCache(E,Lo.addDebugHeaders(T));const N={acName:I,target:I,context:S};await Xc(C,n,N);const O={target:I,context:S,containerItemID:S,headers:l,parentContext:W(n?.context),isMinimizable:Ml($g.getIn(C,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:U.ASSIGNMENT,debugInfo:g};Uc(O,C,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const P=Jc(C,O);return n.isProcessAction&&(P.data.isProcessAction=n.isProcessAction),o&&(P.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,P),Vy(P,I,r,n,i,h,u),((e,t)=>{if(e=$.getRemoteCaseClassBySourceClass(e)??e,$.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:r,name:s}=$.getRemoteCase(e);if(t.headers?.RemoteSystemID||oc.setRemoteCaseHeaderByContext(t,r),$.isTraditionalRemoteCase(e)){t.assignmentID=t.assignments?.[0]?.ID;const r={className:e,name:s,action:Et,remoteClassName:n};oc.setTraditionalRemoteCaseParams(t,r)}}})(f,P.data.caseInfo),c===qc.FORM&&Fc(P.containerItemID)&&pl(P,r,_),ul(r),(e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:n.assignmentID,caseKey:P.key}),r})),su((()=>{const e=n,t=$c(),a=Ml($g.getIn(r[0]?.payload,"data.caseInfo"));return o&&t&&a?Oy.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,Ng,r):Ng(r),Vc(r,e,s),r[0]?.payload?.isParallelAssignment&&Ng({type:Hl,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},Wy=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:vh.getDefaultCasePage(),l=Wf(Be,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),ja(Ho(u,{method:d,headers:{...r,...a&&{...Lo.addDebugHeaders(a)}}},s)).pipe(su((t=>(F.analyseResponse(t),{response:t.data,actionInPayload:e,headers:Yc({...r,...t.headers}),removeActionPayload:i}))),pu("Error occurred during ajax call at openWorkByHandle Epic : ",s))},Hy="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:qy}=U,zy=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:s,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=r,p=Cc(Be,r),h=Pt(p,l);if(Oc(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Cc(Be,s),l=Pt(c,a),u=Mp(r);await Xc({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(Nf(mf,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:r});else{const s=rl(h,p,l,{buildNew:!0}),a=Cd(o),g=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,s=wc(e),a=n?r:vc(e);let o=Bf(Be,{caseClassName:a},{id:t?.insKey});return o=o?.replace("{workID}",String(bc(s)))?.replace("{id}",t?.insKey),o})(a,r);a.semanticURL=g,a.directUrlUpdation=!u;const f={acName:h,context:s};await Xc(a,r,f);const m=Jc(a,{target:h,context:s,containerItemID:s,semanticURL:g,headers:c,debugInfo:d});m.caseViewMode=j.REVIEW_MODE,m.resourceType=qy.CASE,n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle"),Uc(m,a,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=Wc(e?.actionInPayload?.context);const I=nl(h,m);i.containerItemID&&sl(I)&&t.push(Nf(yf,{containerItemID:i.containerItemID,target:h})),t.push(I)}ul(t);const g=r.insKey;Ac({caseKey:g,actionInContext:l})},Yy=e=>{let t=0,n=[];return e.pipe(nu(Hy),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{context:n,isChild:r,viewType:s}=e,a=Cc(Be,e),o=Pt(a,n);let i,c=!0;if("none"!==s){const e=ol(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return oc.rejectActionByID(t),du();const{activate:l,activateContainerActionPayload:u}=cl(qy.CASE,o,e);return l&&!r&&"none"!==s?lu({type:ve,activateContainerActionPayload:u,actionInPayload:e}):Wy(e,{removeActionPayload:i})})),au((async e=>{if(e&&Pc(e.type))return n.push(tl(e)),n;const t=Og(e?.actionInPayload?.context),r=kc(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Cd(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ot,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r&&s.data.caseInfo?.content&&(s.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(Nf(Xg,s));const a=Kp(e?.actionInPayload?.context),o=Sc(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(Fc(e?.actionInPayload?.context)){const t=Jc(e?.response,{...i});pl({...t,isArrayDeepMerge:!0},n)}}}else await zy(e,n,r);return n})),su((()=>(Ng(n),Vc(n,t),n=[],n))))},Ky="FINISH_ASSIGNMENT",{RESOURCE_TYPES:Jy}=U,Xy=(e,t)=>{const{containerItemID:n,context:r,actionMgrID:s,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=Sc(n),a=Pt(t,r);e.push(Nf(mf,{containerItemID:n,target:a,actionMgrID:s}))}},Qy=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r,isInCreateStage:s,isProcessAction:a}=t,o=Mp(n),i=`${o?.includes("root")?j.APP.ROOT:j.APP.APP}/${Ip.MODAL}`;e.push(Nf(yf,{containerItemID:n,context:o,target:i,skipReleaseLockRequest:r,isInCreateStage:s,isProcessAction:a}))},Zy=e=>Rg(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,eE=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r,s,a)=>{const{caseID:o}=n,i=(c=t,$g.getIn(c,_c.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var c;const l=s?pc(t):vc(t),{caseViewMode:u,headers:d,semanticURL:p,actionMgrID:h,directUrlUpdation:g,key:f,flowName:m,resourceType:I}=r,y=Kp(n?.context),E=_p(y,n?.context)?.acTertiary;Object.assign(a,{caseId:o,assignmentId:i,caseType:l,isSubmitFromBlendedUI:E}),Qy(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${Ip.PRIMARY}`,_=rl(A,Ip.PRIMARY),C=Lo.getCoreHeadersFromContext(n.context)||!1,S=Jc(t,{target:A,context:_,containerItemID:_,caseViewMode:u,headers:d,semanticURL:p,key:f,flowName:m,resourceType:I,directUrlUpdation:g,debugInfo:C&&C.debugInfo&&{debugId:C.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(kp(A)){const t=Og(_),s=wc({data:t}),[,a]=s?s.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!Zy(n.context))return e;{const{continueExecution:t}=ol(A,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,oc.rejectActionByID(h),du();S.currentCaseViewMode=Wc(S?.context),e.push(Nf(_f,S))}}else e.push(Nf(af,S));return t.directUrlUpdation=g,t.semanticURL=p,await Xc(t,{...S,acName:A},{acName:A,context:_}),e},tE=(e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===Me));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const s=Ef({target:n,containerItemID:r});s.payload.transientItems.length&&e.push(s)},nE=e=>/^app\/preview_[0-9]*/g.test(e),rE=(e,t)=>{const n=W(e);return!nE(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},sE=e=>{if(!Zy(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}},aE=(e,t,n,r)=>{const{data:s,caseViewMode:a}=t,o={data:s,caseViewMode:a,context:n};if($g.setIn(o.data,["context_data","caseViewMode"],a),e.push({type:ot,payload:{context:n}}),r){const t={data:F.transformObjectToCase(s),caseViewMode:a,context:n};e.push(Nf(Xg,t))}e.push(Nf(Xg,o))},oE=async(e,t,n,r,s,a,o,i,c,l)=>{const{headers:u}=c,d=l?j.OBJECT_INFO.OBJECT_INFO:j.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=Og(e),r=c?.response?.data?.caseInfo?.assignments??[],s=n?.caseInfo?.assignments??[],a=Wc(e)===j.PERFORM_MODE,o=r[0]?.ID!==s[0]?.ID,i=r.length>0&&s.length>0;a&&o&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(r,s[0]?.ID))}const p=kp(Kp(e));let h=!1;const g=Kp(n),f=Ap(g),m=vp(g);m&&f?.items?.[m]?.key===c?.actionInPayload?.caseID&&(h=!0),Qy(s,{...r,skipReleaseLockRequest:!0});const I=Sc(e),y={target:Kp(e),containerItemID:e,context:e,containerName:I};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const E=J(n),A=Og(E),_=Og(r.context),C=A[d]?.ID,S=_[d]?.ID,T=Og(e)?.caseInfo?.ID;if(p&&C===S||!p&&(""===o||"review"===t.caseViewMode||!a&&t.root&&0===Object.keys(t.root).length&&T===t.data?.caseInfo?.ID))(void 0===t?.data[d]?.content||void 0!==t.data[d].content&&"object"==typeof t.data[d].content&&0===Object.keys(t.data[d].content).length)&&(t.root=void 0,delete t.data?.caseMessages),t.caseViewMode===j.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,r=t?.data?.caseInfo?.assignments??[],s=r[0]?.ID;return n!==s})(r,i)&&(t.flowName=" ",t.clearView=!0),s.push(Nf(pf,{...t,key:o,resourceType:"",...y}));else if(a){const a=Kp(e),i=Op(a,o);if(i)y.target=a,y.context=i,y.containerItemID=i,s.push(Nf(pf,{...t,key:o,resourceType:"",...y}));else{const e=Up(n)[0];if(r.target=e,r.context=rl(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,s.push(Nf(af,{...r,...t}));const n=r.containerItemID;s.push(Nf(mf,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Kp(e),r.containerName=Sc(e),r.context=e,r.containerItemID=e,$g.setIn(t,"acName",y.target),await Xc(i,t),h&&(n.includes(j.WORKAREA)&&Fc(n)&&(n=J(n)),aE(s,t,n,l)),!a&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=Kp(e);return Op(n,t)})(e,o),n={data:{[d]:{headers:u}},context:t};s.push(Nf(Xg,n)),s.push(Fd(((e,t=!1,n=!1)=>{const r=oc.getNextActionMgrId();return{ID:Hg.getPropertyValue(U.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Hg.getPropertyValue(U.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{Qy(s,r);let e=!1;const o=Kp(n),i=Ap(o),u=vp(o);if(u&&i?.items?.[u]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=Up(n)[0];r.target=e,r.context=rl(e,j.WORKAREA,n),r.containerItemID=r.context,s.push(Nf(af,{...r,...t}));const a=r.containerItemID;s.push(Nf(mf,{parentContainerTarget:e,containerItemID:a}))}e&&aE(s,t,n,l)}},iE=async(e,t,n,r,s,a,o)=>{const i=a?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(Qy(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${Ip.PRIMARY}`,s=rl(r,Ip.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:s,acTargetName:j.PRIMARY,isChild:!0},o={type:ue,payload:{...a}};n.push(o)}})(e.data[i].parentCaseInfo,t,s);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=Kp(t?.context),r=_p(n,t?.context)?.parentContext,s=Kp(r);t?.isProcessAction&&Np(s,c)&&ph(r,e?.data[i]?.lastUpdateTime)}n.resourceType=Jy.CASE,n.directUrlUpdation=!0,t.isProcessAction||await eE(s,{translatedDXAPIResponse:r,actionInPayload:t},n,a,o)},cE=async(e,t,n,r,s)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t,o=xl.getPropertiesToReplace(a);s.push(Nf(pf,{...e,...r,propertiesToReplace:o})),$g.setIn(e,"acName",r.target),await Xc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:s}=t,a=Mp(s);if(a&&Fc(s)){const t=J(a),o={data:n,caseViewMode:r,context:t};$g.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:ot,payload:{context:t}});const i=xl.getPropertiesToReplace(s);e.push(Nf(Xg,o,{propertiesToReplace:i}))}})(s,t,e)},lE=async(e,t,n,r,s,a,o,i,c,l={})=>{const{isCaseWideAction:u,isInCreateStage:d,containerItemID:p}=e,h=W(e.context),g=xc(s,c),f=c?pc(s):vc(s),m=d&&!g&&!u,I=Up(h)[0],y=I?vp(I):h,E=Sc(p),A=Mp(p),_=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:E});m&&!nE(e.context)?await iE(i,e,t,s,a,c,l):rE(e.context,y)?await oE(y,t,h,e,a,n,r,s,o,c):!u&&!c||rE(e.context,y)?await cE(t,e,s,_,a):(Qy(a,e),((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,a=W(r),o=Mp(a);e.push(Nf(Zg,{containerItemID:a,context:o,container:Ip.PREVIEW,containerName:Ip.PREVIEW,caseId:s,viewName:U.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:f}))},uE=(e,t,n)=>{const{isModalAction:r,isCaseWideAction:s,caseID:a}=t,o=rE(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;yc({caseID:a,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:s,stages:i,stageID:c})},dE=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER],s=r.startsWith(".")?r.slice(1):r;if(s){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=j.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));const o=ao(s,a,j.PROPERTY),i={type:U.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};ro.mutateField(n,a,o[o.length-1],{messages:[i],type:U.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r})}}))},pE=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:s}=e;return t&&r&&!s?qc.PAGE:n||qc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?"executeCaseWideActions":"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:s,viewType:d};let{restApi:g}=Wf(p,h);const{reqType:f}=Wf(p,h);d&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),i&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${i}`:`${g}?outcome=${i}`),g=$l(c,g),e.viewType=d;const{content:m}=Kc(a),I=u.value.data[a]?.caseInfo?.headers||{},{etag:y}=I,E={"if-match":y,...l,...o};return ja(Ho(g,{method:f,body:m,headers:E},a)).pipe(su((t=>{const{data:n,headers:r}=t;return F.analyseResponse(n),{response:n,actionInPayload:e,headers:Yc({...E,...r})}})),pu("Error occurred during ajax call at finishAssignment Epic : ",a))},hE=e=>{_o.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},gE=e=>{_o.publish(j.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:fE}=U,mE=(e,t)=>{let n=0,r=[],s={},a="",o={},i=!1,c=!1;return e.pipe(nu(Ky),au((e=>{const l=vh.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),a=e.payload.context,uo({context:a,stateObj:Og(a),clearContextMessages:!0}),!Dl(a)||mo(a)){const t={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,t),Ju.handleDeferredActionCompletion(e.payload.context).then((()=>{gE({errorType:U.ERROR_TYPE.CLIENT})})),lu([])}return lu(e.payload).pipe(au((e=>{Xy(r,e);const n={...e};return pE(n,{state$:t})})),au((async e=>{if(e&&e.type===Ee){Bl(e);const t=tl(e);return r.push(t),r}Gu.clearContextedCache(a);const{headers:t,actionInPayload:u,response:d}=e,{containerItemID:p,context:h=Mp(p),isModalAction:g,isInCreateStage:f}=u;i=u.isCaseWideAction,c=u.isProcessAction;const m=Kp(p);u.target=m;const I=Sc(p),y=Object.freeze({target:u.target,containerItemID:p,context:h,containerName:I});$g.setIn(d.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),$g.setIn(d.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),d?.uiResources?.root?.config?.name&&"page"!==u.viewType&&$g.setIn(d.data,j.CASE_INFO.VIEW_NAME,d?.uiResources?.root?.config?.name),hE({submitResponse:d});let E=Cd(d,{[U.STOPMERGEACTIONS]:!d.nextAssignmentInfo});const A=vc(E),_=W(u.context),C=Up(_)[0]?vp(Up(_)[0]):_,S=xc(E),T=f&&!S;!g||f||rE(u.context,C)||(E=ll(E,Og(p)));const N=Jc(E,{headers:t,actionMgrID:n,directUrlUpdation:!1});let O,P;jc(N.data,u),N.caseClassName=A,N.resourceType=fE.ASSIGNMENT,N.headers=t;const D=E?.data?.caseInfo?.assignments?.some((e=>e.ID===u.assignmentID)),R=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(E,u),b=((e,t,n,r,s)=>{let a;const o=Kp(t);return a=$p(o)?Op(o,n.data?.caseInfo?.ID):vp(o),r&&e&&bg(null,j.CASE_VIEW_MODE_PROP,a)===j.PERFORM_MODE&&s})(D,C,E,g,R),v=u?.actionID===U.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(E?.data?.nextAssignmentInfo&&!v)N.caseViewMode=j.PERFORM_MODE,O=wc(E),P=!0;else if(b&&!v)E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM?N.caseViewMode=j.REVIEW_MODE:N.caseViewMode=j.PERFORM_MODE,O=wc(E),N.flowName=" ",N.deleteAssignmentSpecificResources=!1,P=!1;else{N.caseViewMode=j.REVIEW_MODE;const e=kp(Kp(C));O=E?.confirmationNote&&E?.uiResources?.root?.config?.name===j.PY_CONFIRM&&!e?wc(E):"",P=!1}const x=wc(E);Uc(N,E,{skipFlowNameUpdate:N?.caseViewMode===j.REVIEW_MODE||b});const w=Bf("createWork",{caseClassName:A}).replace(/{.+?}/,String(bc(x)));if(E.semanticURL=w,N.semanticURL=w,g?(await lE(u,N,P,O,E,r,e,d,!1,o),T&&(s=sE(u))):f&&l&&!S?(vh.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Ip.PRIMARY,targetContainerName:Ip.PRIMARY,viewType:qc.PAGE,isLastStepInCreateStage:!0,context:n},s={type:ge,payload:{...r}};t.push(s)})(d,r,W(h))):await cE(N,u,E,y,r),Gc(e,r),Ju.handleDeferredActionCompletion(a).catch((()=>{})),uE(N,u,C),!E?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:s}=t;return{isCaseWideAction:n,caseID:wc(e),assignmentID:n?null:r,actionID:s||null}})(E,u);Ec({...e,containerItemID:p})}return tE(r,{transientItemID:p,target:m,isModalAction:g}),r})),su((()=>{const e=r.find((e=>e.type===Ee));return e?(Ju.handleDeferredActionCompletion(a).then((()=>{gE({errorType:U.ERROR_TYPE.SERVER})})).catch((()=>{})),dE(e),oc.rejectActionByID(n)):oc.resolveActionByID(n,s),o?.caseId&&(e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})(o),hl(r),(i||c)&&(e=>{_o.publish(j.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0}),r=[],s={},o={},r})))})))},IE="CANCEL_ASSIGNMENT",yE=e=>{const t={},{routeKey:n,isModalAction:r,caseID:s,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=Wf(i,{ID:s,caseID:s,viewType:qc.PAGE}),u=sc.getComponentCache(s),d=u&&"object"==typeof u?u:{};return ja(Ho(c,{method:l,headers:{...t,...d}},a,{includeRemoteSystemIdIfPresent:!!o})).pipe(su((t=>(sc.resetComponentCache(s),r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:Yc(t.headers)}))),pu(": Error occurred during ajax call at release lock request : ",a))},EE=(e,t)=>{const{isModalAction:n}=t;return yE({routeKey:"cancelAssignment",isModalAction:n,...e})},AE=e=>{let t=0,n=[];return e.pipe(nu(IE),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{isModalAction:n}=e;e.context||(e.context=Mp(e.containerItemID));const{context:r}=e,s=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Ip.MODAL:Sc(n)})(e),a=Pt(s,r),{continueExecution:o}=ol(a);return o?(e.RemoteSystemID=$.getRemoteHeaderByContext(e.context)??void 0,ja(EE(e,{isModalAction:n}))):(oc.rejectActionByID(t),du())})),au((e=>{if(e&&e.type===Ee)return n.push(tl(e)),ja([n]);const{actionInPayload:r,response:s}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=r;s?.data.caseInfo&&(s.data.caseInfo.availableProcesses=s.data.caseInfo.availableProcesses??[]);const c=Kp(a),l=Mp(a),u={target:o?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:a,caseViewMode:o?j.PERFORM_MODE:j.REVIEW_MODE,context:l,actionMgrID:t,key:wc(s),skipReleaseLockRequest:!1};return i&&n.push(Nf(pf,u)),!o&&Fc(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:s,response:a}=t,o=W(n),i={context:Mp(o),data:{...a.data,referencedUsers:s,context_data:{caseViewMode:r}}};a?.data?.caseInfo&&(a.data.caseInfo.assignments??=[]),e.push(Nf(Xg,i))})(n,{childContainerItemID:a,caseViewMode:j.REVIEW_MODE,referencedUsers:s?.data.referencedUsers,response:s}),u.skipReleaseLockRequest=!0,n.push(Nf(yf,u)),ja([n])})),su((()=>(Ng(n),Vc(n,t),n=[],n))))},_E="NAVIGATE_TO_STEP",CE=(e,t)=>{const{ID:n,stepID:r,containerItemID:s,context:a=Mp(s),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?qc.PAGE:qc.FORM},{restApi:l,reqType:u}=Wf("navigateToStep",c),{content:d}=Kc(a),p=i.value.data[a].caseInfo.headers;return ja(Ho(`${l}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe(su((t=>({response:t.data,actionInPayload:e,headers:Yc({...p,...t.headers})}))),pu("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:SE}=U,TE=(e,t)=>{let n=0,r=[];return e.pipe(nu(_E),ru((e=>(({actionMgrID:n}=e.payload),lu(e.payload).pipe(au((e=>(fo(e.context),CE(e,{state$:t})))),au((async e=>{if(e&&Pc(e.type))return r.push(tl(e)),r;const{actionInPayload:t,response:n,headers:s}=e,{containerItemID:a,context:o=Mp(a),isModalAction:i}=t;Gu.clearContextedCache(t.context);const c=Kp(a),l=Sc(a),u=Object.freeze({target:c,containerItemID:a,context:o,containerName:l}),d=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name,h=n?.uiResources?.root?.config?.context;d&&!d.pyViewName&&p&&"page"!==t.viewType&&($g.setIn(d,"pyViewName",p),$g.setIn(d,"pyViewContext",h));const g=Cd(n),f={acName:c,...u};await Xc(g,t,f);const m=Jc(g,{...u,headers:s});n?.nextAssignmentInfo||(m.caseViewMode=j.REVIEW_MODE),Gc(e,r),m.doDeleteCaseSummary=t.doDeleteCaseSummary,m.resourceType=SE.ASSIGNMENT,Uc(m,g),jc(m.data,t);const I=g.data?.caseInfo?.stages,y=g.data?.caseInfo?.stageID;return yc({caseID:wc(g),isModalAction:i,stages:I,stageID:y}),Fc(a)&&pl(m,r),r.push(Nf(pf,m)),ul(r),r})),su((()=>(Ng(r),Vc(r,n),r=[],r))))))))},NE=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:s}=Wf(qe,{ID:t});return ja(Ho(r,{method:s},n)).pipe(su((t=>(F.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Yc(t.headers)}))),pu(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},OE=e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},PE=(e,t)=>{let n,r=0,s=[];return e.pipe(nu(ql),su((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),au((e=>e.ignoreCaseDeletion?lu({actionInPayload:e}):NE(e))),au((async e=>{if(e&&Pc(e.type)){const{payload:t}=e,n=tl({...e,...t,actionMgrID:r});return s.push(n),s}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?Ip.MODAL:Ip.PRIMARY,c=Pt(i,a);if(!o&&c){const e={acName:c,target:c,context:a},r=t.value.containers[c],{semanticURL:s}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await Xc({directUrlUpdation:!0,semanticURL:s},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:j.PRIMARY,isChild:!0},t={type:ue,payload:{...e}};s.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return s.push(Nf(yf,l)),s})),su((()=>(Ng(s),Vc(s,r)===j.PROMISE_VALUE.RESOLVE&&OE({caseType:n}),s=[],s))))};function DE(e,t){return qs(t)?au(e,t,1):au(e,1)}const RE=(e,t)=>{const{assignmentID:n,actionID:r,context:s}=e,{restApi:a,reqType:o}=Wf("save",{assignmentID:n,actionID:r}),{content:i}=Kc(s),c=t.value.data[s]?.caseInfo?.headers;return ja(Ho(a,{method:o,body:i,headers:{"if-match":c&&c.etag}},s)).pipe(su((t=>({response:t.data,actionInPayload:e,headers:Yc(t.headers)}))),pu(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",s))},bE=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:s}=e;let a=[];return lu(n.payload).pipe(au((e=>RE(e,r))),DE((e=>{if(e&&Pc(e.type))return lu(e);const{containerItemID:t}=e&&e.actionInPayload,r=W(t),s=Kp(r),o=Ap(s),i=Up(r)[0];let c=i?vp(Up(r)[0]):r;if(!kp(Kp(c))){const t=Ap(i);t?.accessedOrder.forEach((n=>{e.actionInPayload.caseID===t.items[n].key&&(c=t.items[n].context)}))}const l=vp(s);n.payload.canUpdateAvailableActions&&_d(e.response);if(c&&a.push((t=>Nf(Xg,{context:t,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}}))(c)),o?.items?.[l]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},s=xl.getPropertiesToReplace(t);a.push(Nf(Xg,n,{propertiesToReplace:s})),a.push(Nf(pf,{context:t}))}return Gc(e,a),yE({...e.actionInPayload,RemoteSystemID:$.getRemoteHeaderByContext(e.actionInPayload.context)??void 0})})),au((async n=>{if(n&&Pc(n.type)){const{payload:t}=n,r=tl({...n,...t,actionMgrID:s});a.push(r);const o=e.action.payload.modalLoadingContainer;if(o){const e=o.context,{context_data:t}=Og(e)||{};t?.isLoading&&Jp(e)}return a}const{actionInPayload:r}=n,{context:o,containerName:i}=r,c={target:Pt(i,o),containerItemID:o,context:o};return t||a.push(Nf(yf,c)),a})),su((()=>(Ng(a),Vc(a,s),(e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e)})({context:n.payload.context,assignmentID:n.payload.assignmentID}),t||(a=[]),Ju.isDeferredActionInProgress(n.payload.context)&&Ju.handleDeferredActionCompletion(n.payload.context),a))))},vE=(e,t)=>{let n,r=0;return e.pipe(nu(zl),ru((e=>{const{saveOnly:s}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return bE({action:e,state$:t,actionMgrID:r,caseType:n},s)})))},xE=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",_o.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",_o.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:wE}=j,{RESOURCE_TYPES:ME}=U,LE=(e,t)=>{const{actionID:n,assignmentID:r,caseID:s,context:a,openActionType:o,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,u=l?Ye:(e=>{const t=e.localActionType.toLowerCase();return t===wE.CASE_WIDE||t===wE.EXPRESS?Ke:ze})(e),d=qc.FORM,{reqType:p}=Wf(u,{caseID:s,ID:r,actionID:n,viewType:d});let{restApi:h}=Wf(u,{caseID:s,ID:r,actionID:n,viewType:d});e.actionType=u===Ke?j.CASE:j.ASSIGNMENT,h&&!h.includes("viewType=")&&(h=h.includes("?")?`${h}&viewType=${d}`:`${h}?viewType=${d}`);const g=i?.context??a;return ja(Ho(h,{method:p,headers:c},g)).pipe(su((t=>({response:t.data,actionInPayload:e,headers:Yc(t.headers,"",e.headers)}))),pu(`: Error occurred during ajax call at ${o} Epic : `,g))},FE=(e,t)=>{const{isProcessAction:n}=t,r=n?Ye:ze;e.openActionType=r;let s;if("modal"===Cc(r,e)){s=Up(e.contextName)[0]?Up(e.contextName)[0]:Kp(e.contextName);const n=s?vp(s):e.contextName,r=Mp(n),a=Cc(e.openActionType,e),o=Pt(a,e.context),i=K(e.context,H(a,e.context));if(Ng(af({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),Ng(hf({context:i})),e.modalLoadingContainer={target:o,context:i},!Up(e.contextName)[0])return LE(e,t);if(!e.continueExecution)return LE(e,t);if(!up(r))return LE(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return ja([Yl(e.saveActionPayload)]).pipe(au((e=>(e=>{let t,n=0;const r=[],s={value:Tg()?.getState()};return lu(e).pipe(nu(zl),ru((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),lu([])}return bE({action:e,state$:s,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),au((n=>{if(1===n.length&&Pc(n[0].type)){const{continueExecution:n}=ol(s);if(!n)return oc.rejectActionByID(e.actionMgrID),uu.pipe(Va((()=>du()))).toPromise();if(n)return LE(e,t)}return LE(e,t)})),su((e=>e)))}return LE(e,t)},UE=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Cd(e),u=Cc(o,r),d=c?.target??Pt(u,s);let p,h,g=!1;!Bp(d)||$p(d)&&!Np(d,e.data.caseInfo.ID)?(h=H(u,s),Nc(u)&&(h=K(s,h)),p=h,g=!0):(p=$p(d)?Op(d,e.data.caseInfo.ID):vp(d),h=Mp(p));const f={acName:d,target:d,containerName:u,context:h};await Xc(l,r,f),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let I;I=m?j.PERFORM_MODE:j.REVIEW_MODE;const y=Jc(l,{target:d,context:h,containerItemID:p,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Nc(u),resourceType:ME.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});m&&Uc(y,l),Nc(u)&&delete y.doDeleteCaseSummary,r.openActionType===Je&&(y.isBulkAction=!0,y.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",y.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",y.data.caseInfo.cases=r.selectedList);const E=g?af:pf;if(y.data.context_data.isProcessAction=r.isProcessAction,t.push(Nf(E,y)),g||t.push(Nf(gf,y)),g){const s=Up(r.contextName),a=Op(s,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push(Nf(Xg,e))}}return p!==vp(d)&&t.push(Nf(mf,{target:d,containerItemID:p})),Fc(p)&&!c?.context&&pl(y,t),y.caseViewMode===j.REVIEW_MODE&&t.push(Nf(yf,y)),t},jE="OPEN_LOCAL_ACTION",VE=(e,t)=>FE(e,t),kE=e=>{let t=0,n=[];return e.pipe(nu(jE),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>VE(e,{actionMgrID:t}))),au((async e=>{if(!e)return uu;if(Pc(e.type)){const t=tl(e);n.push(t);const{context_data:r}=Og(e.payload.context)||{};return r?.isLoading&&n.push(Nf(gf,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return $g.setIn(s,"data.caseInfo.activeActionID",a),$g.setIn(s.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&$g.setIn(s.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await UE(s,n,{headers:r,actionInPayload:t}),xE(t),n})),su((()=>(Ng(n),Vc(n,t),n=[],n))))},$E=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:s,bulkContextID:a="",bulkContextType:o=""}=e,i=Je,{reqType:c,restApi:l}=Wf(i,{caseTypeID:s,actionID:t,bulkContextID:a,bulkContextType:o});return ja(Ho(l,{method:c},n)).pipe(su((t=>({response:t.data,actionInPayload:e,headers:Yc(t.headers)}))),pu(`: Error occurred during ajax call at ${r} Epic : `,n))},BE=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",_o.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",_o.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},GE="OPEN_BULK_ACTION",WE=e=>{let t=0,n=[];return e.pipe(nu(GE),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Je;const s=Cc(Je,e),a=Pt(s,n),{continueExecution:o}=ol(a);return o?$E(e):(oc.rejectActionByID(r),du())})(e,{actionMgrID:t}))),au((async e=>{if(e&&Pc(e.type)){const t=tl(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return $g.setIn(s,"data.caseInfo.activeActionID",a),await UE(s,n,{headers:r,actionInPayload:t}),BE(t),n})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))};var HE=Array.isArray,qE=Object.getPrototypeOf,zE=Object.prototype,YE=Object.keys;function KE(e){if(1===e.length){var t=e[0];if(HE(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&qE(r)===zE){var n=YE(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var JE=Array.isArray;function XE(e){return su((function(t){return function(e,t){return JE(t)?e.apply(void 0,$s([],ks(t))):e(t)}(e,t)}))}function QE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return qs(iu(e))?e.pop():void 0}(e),r=KE(e),s=r.args,a=r.keys,o=new Ea((function(e){var t=s.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Da(s[t]).subscribe(xa(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(XE(n)):o}const ZE=e=>{const{actionID:t,context:n,cases:r,classID:s}=e,{content:a}=Kc(n,{nonEmptyAndChangedData:!0});let o=5;try{const e=id.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===s))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,l=Xe,{reqType:u,restApi:d}=Wf(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)a.cases=i.slice(t,t+c),a.cases.length&&p.push(ja(Ho(d,{method:u,body:a},n)).pipe(su((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Yc({...r})}})),pu("Error occurred during ajax call at submitbulkaction Epic : ",n)));return QE(p)},eA=e=>{_o.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},tA="SUBMIT_BULK_ACTION",nA=e=>{let t,n=0,r=[],s="";return e.pipe(nu(tA),ru((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),lu([])}return lu(e.payload).pipe(au((e=>(t=e,ZE(t)))),au((e=>{let n=0,a=0;const o=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),a+=Number(t.failureCount),a&&t.results.forEach((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),s=`${n} record(s) updated`,eA({submitResponse:e}),t.target="HYBRID"===vh.getRenderingMode()?Kp(i):`${j.APP.APP}/${Ip.MODAL}`,r.push(Nf(yf,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&r.push(Nf(If,{messages:[{type:"error",message:1===a?"1 record failed to update":`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),su((()=>(oc.resolveActionByID(n,s),Ng(r),r=[],r))))})))},rA=e=>{const{actionID:t,context:n,cases:r}=e,{content:s}=Kc(n,{nonEmptyAndChangedData:!0});s.cases=r.map((e=>({ID:e})));const a=Xe,{reqType:o,restApi:i}=Wf(a,{actionID:t,runningMode:"async"});return ja(Ho(i,{method:o,body:s},n)).pipe(su((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Yc({...r})}})),pu("Error occurred during ajax call at submitbulkaction Epic : ",n))},sA=e=>{_o.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},aA="SUBMIT_BULK_ACTION_ASYNC",oA=e=>{let t,n=0,r=[],s="";return e.pipe(nu(aA),ru((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),lu([])}return lu(e.payload).pipe(ru((e=>(t=e,rA(t)))),su((e=>{const n=[],{containerItemID:a,context:o}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),s="Processing bulk actions, please refresh to check completion",sA({submitResponse:i}),t.target=`${j.APP.APP}/${Ip.MODAL}`,r.push(Nf(yf,{containerItemID:a,context:o,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(Nf(If,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(o)||o,category:"HTTP",showHeader:!1})),r})),su((()=>(oc.resolveActionByID(n,s),Ng(r),r=[],r))))})))},iA=(e,t)=>FE(e,t),cA=e=>{let t=0,n=[];return e.pipe(nu(Wl),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>(fo(e.context),iA(e,{actionMgrID:t,isProcessAction:!0})))),au((async e=>{if(e&&Pc(e.type)){const t=tl(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e;return await UE(s,n,{headers:r,actionInPayload:t}),n})),su((()=>(hl(n),Vc(n,t),n=[],n))))},lA=e=>{let t=0,n=[];return e.pipe(nu(Se,Me),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:s,skipReleaseLockRequest:a,currentCaseViewMode:o,isProcessAction:i,isInCreateStage:c}=e,l=o===j.PERFORM_MODE,u=n&&l;return i&&c?yE(e):t!==r||s||a||!u?t?.includes(j.MODAL)&&Wc(mh(t))===j.REVIEW_MODE?yE(e):lu([]):yE(e)})),au((e=>(e&&Pc(e.type)&&n.push(tl(e)),n))),su((()=>(Ng(n),Vc(n,t),n=[],n))))};var uA=new CI(yI),dA=uA;function pA(e,t,n){void 0===e&&(e=0),void 0===n&&(n=dA);var r=-1;return null!=t&&(ou(t)?n=t:r=t),new Ea((function(t){var s,a=(s=e)instanceof Date&&!isNaN(s)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}function hA(e,t){return void 0===e&&(e=0),void 0===t&&(t=uA),e<0&&(e=0),pA(e,e,t)}function gA(e){return va((function(t,n){var r=!1,s=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(xa(n,(function(t){null==a||a.unsubscribe(),r=!0,s=t,a=xa(n,o,ra),Da(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){s=a=null})))}))}const fA=(e,t,n,r,s)=>{if(s!==j.RESOURCE_STATUS.CREATE)return;yl.isStateMachineExist(e,t,n)||yl.setStateMachine(e,n,t,new ui(n,t,e));yl.getStateMachine(e,t,n).insert({},"string"==typeof r?r:r+1,!0,{isDefault:!0})},mA=(e,t,n,r,s)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===r||"UPDATE"===r)&&(e.data.caseInfo.content[s][t][n]=t)},IA=e=>{const t=!e.isLocalAction&&e.editType===j.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},yA=e=>{let t=0,n=[],r="";return e.pipe(nu(gt),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>gy(e))),au((async e=>{if(e&&e.type===Ee)return n.push(tl(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:s,headers:a}=e,o=t.containerName,i=Pt(o,t.context);let c=rl(i,o,t.context);c=K(t.context,c);const{pageReference:l,targetProperty:u,index:d,subscriptFieldName:p,pageGroupName:h,actionType:g,isPageGroup:f}=t,m=l?.startsWith(U.OBJECT_INFO.OBJECT_INFO);let I=null;m?(I=F.transformCaseData(s),I.uiResources.root.config.context=`${l}${u}[${d}]`):I=s;const y=Cd(I);y.key=t.ID,y.data?.caseInfo?(y.data.caseInfo.ID=t.ID,mA(y,d,p,g,h)):y.data?.objectInfo&&(y.data.objectInfo.ID=t.ID);const{interestPageActionID:E,editType:A,isLocalAction:_,actionID:C}=t,S={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:E,editType:A,isLocalAction:_,actionID:C};y.uiResources.context_data.modalView=S;const T=Og(t.context)?.context_data?.caseInfo,N=`${t.pageReference}${t.targetProperty}`,O=oo(T,N,t.index);y.uiResources.context_data.caseInfo={...y.uiResources.context_data.caseInfo,content:$g.mergeDeep(y.uiResources.context_data.caseInfo?.content,O?.content)};const P=Hg.getProperty(j.CASE_INFO.REMOTESYSTEMID,"",t.context),D={acName:i,context:c};await Xc(y,t,D);const R={target:i,context:c,containerItemID:c,headers:a,index:d,subscriptFieldName:p,pageGroupName:h,isPageGroup:f};P&&(R.headers={...R.headers,RemoteSystemID:P});const b=$g.deepClone(y.data?.caseInfo?.content);y.data?.caseInfo&&A===j.ACTION&&(v()(y.data,`${l}${u}`,new Array(d+1).fill({})),v()(y.data,`${l}${u}[${d}]`,Rg(`${u}[${d}]`,l,t.context)));const x=Jc(y,R);y.data?.caseInfo&&(y.data.caseInfo.content=b);const w=Jc(y,R);x.resourceStatus=t.actionType,x.isMultiRecordData=!0,x.parentContext=t.context,x.heading=t.heading,x.data.caseInfo&&A===j.ACTION&&(x.data.caseInfo={...x.data.caseInfo,...IA(t),isLocalAction:t.isLocalAction}),w.skipValidation=!0;const M=nl(i,x);r=c,n.push(M),ul(n);const L=Nf(Xg,w);return{actionsOut:n,actionInPayload:t,mergeAction:L}})),su((({actionInPayload:e,mergeAction:s})=>(Dc(n)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],e.skipPageInstructions||fA(r,e.pageReference,e.targetProperty,e.index,e.actionType),e.editType===j.ACTION&&(yl.registerForServerChanges(),Ng(s),yl.unRegisterForServerChanges()),n))))},EA=e=>{let t,n="",r=[];return e.pipe(nu(ft),ru((e=>{t=e.payload;const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const t={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,t),Ju.handleDeferredActionCompletion(e.payload.context),lu([])}return lu(e.payload).pipe(au((e=>(t=e,gy(t)))),au((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Ee){const{context:n,pageReference:r}=t,s={context:n},{response:a}=e,o=r?.startsWith(U.OBJECT_INFO.OBJECT_INFO);let i=null;o?(i=F.transformCaseData(a),i.uiResources.root.config.context=r):i=a;const c=Cd(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const l=Jc(c,s);l.skipValidation=!0;const u=Nf(Xg,l);yl.registerForServerChangesSync(),Ng(u),yl.unRegisterForServerChanges()}return e})(e,t))),au((async e=>{if(e&&e.type===Ee){const t=tl(e);return r.push(t),r}const{containerItemID:n,context:s,pageReference:a}=t;return((e,t,n,r)=>{yi(e).forEach((e=>{const s=$g.convertClipboardPageToPageRefNotation(e.target);yl.isStateMachineExist(t,n,s)||yl.setStateMachine(t,s,n,new ui(s,n,t));const a=yl.getStateMachine(t,n,s);switch(e.instruction.toLowerCase()){case"insert":a.insert(e.content,e.listIndex,r,{});break;case"update":a.update(e.content,e.listIndex??e.groupIndex,r,{});break;case"delete":e.listIndex?a.delete(e.listIndex,r):e.groupIndex?a.delete(e.groupIndex,r):a.deletePage();break;case"replace":a.replacePage(e.content);break;case"move":a.move(e.listIndex,e.listMoveToIndex);break;case"add":a.insert(e.content,e.groupIndex,r,{});break;case"delete all":a.deleteAll()}}))})(s,t.parentContext,a.startsWith(U.OBJECT_INFO.OBJECT_INFO_CONTENT)?j.getProperty(U.OBJECT_INFO.OBJECT_INFO_CONTENT):j.getProperty(U.CASE_INFO.CASE_INFO_CONTENT),!1),r.push(Nf(yf,{containerItemID:n,context:s,target:t.target,skipReleaseLockRequest:!0})),r})),su((()=>{if(Dc(r))oc.rejectActionByID(n),Ju.handleDeferredActionCompletion(t.context);else{oc.resolveActionByID(n),Ju.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Hg.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Hg.getPropertyValue(j.getProperty(U.CASE_INFO.CASE_INFO_ID),r,t.parentContext),n=Hg.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),a=s.replace(j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),"");Vd(e,n,t.parentContext,a,{})}else qd(t.parentContext,j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),{})}return Ng(r),r=[],r})))})))},AA=e=>{const{caseID:t,headers:n,debugInfo:r,context:s}=e,a=Wf("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;return ja(Ho(o,{method:i,headers:{...n,...r&&{...Lo.addDebugHeaders(r)}}},s)).pipe(su((t=>({actionInPayload:e,response:t.data,headers:Yc({...n,...t.headers})}))),pu("Error ocurred during ajax call at getDescendants Epic : ",s))},_A=e=>{let t=0,n=[];return e.pipe(nu(zu),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>AA(e))),au((async e=>{if(e&&Pc(e.type))return n.push(tl(e)),n;const{actionInPayload:t,response:r}=e,s={};$g.setIn(s,"caseInfo.childCases",r?.childCases??[]);const a={data:s,context:t?.context};return n.push(Nf(Xg,a)),n})),su((()=>(Ng(n),Vc(n,t),n=[],n))))},CA=e=>{let t,n="",r=[],s={};return e.pipe(nu(mt),ru((e=>{t=e.payload;const{isFormValid:a}=e.payload;return({actionMgrID:n}=e.payload),a?lu(e.payload).pipe(au((e=>(t=e,lu({})))),au((async()=>{const{containerItemID:e}=t,a=Og(e),o=e,i=a?.dataInfo.content;delete i.classID;const c=W(o),l=Up(c).length,u=Up(c)[l-1]?vp(Up(c)[l-1]):c,d=Kp(e),p=_p(d,e)||{},h=p?.referenceList?.replaceAll(".",""),g=p?.subscriptName,f=Og(u),m={containerItemID:u,data:{...f,caseInfo:{content:{...i}}}};r.push(Nf(pf,m)),((e,t,n)=>{up(t)&&e.push(Nf(yf,{containerItemID:n,skipReleaseLockRequest:!0}))})(r,o,e);const I=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:r,activeWorkArea:s,subscriptFieldName:a,actionMgrID:o,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[a],containerName:U.MODAL,pageReference:U.CASE_INFO.CASE_INFO_CONTENT,viewID:U.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:U.RESOURCE_STATUS.CREATE,interestPage:`.${r}.${n[a]??""}`,targetProperty:`.${r??""}`,pageGroupName:r,context:s??"",subscriptFieldName:a};return{type:gt,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:o,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:f,subscriptData:i,pageGroupName:h,activeWorkArea:u,subscriptFieldName:g,actionMgrID:n,containerItemID:e});return r.push(I),s=i,r})),su((()=>(oc.resolveActionByID(n,s),Ng(r),r=[],r)))):(((e,t)=>{const n={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};oc.rejectActionByID(e,!0,n),Ju.handleDeferredActionCompletion(t)})(n,e.payload.context),lu([]))})))},SA=[Ly,Gy,Yy,kE,WE,nA,oA,cA,mE,TE,AE,lA,vE,PE,e=>e.pipe(nu(He),gA((()=>hA(100))),su((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:s,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}=e.payload;return oc.resolveActionByID(t),_o.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!s&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}),[]}))),e=>e.pipe(nu(Le),gA((()=>hA(100))),su((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:s}=e.payload,a=Pt(r,n);return oc.resolveActionByID(t),Ng(Nf(mf,{containerItemID:s,target:a,doDeleteCaseSummary:!1})),[]}))),yA,EA,_A,CA],TA=SA;function NA(){return va((function(e,t){e.subscribe(xa(t,ra))}))}const{RESOURCE_TYPES:OA}=U,PA=[e=>e.pipe(nu(te),su((e=>e.payload)),au((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Ip.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=Pt(Ip.PREVIEW,e.context),n=rl(t,Ip.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);Ng(af({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if($.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=$.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:s}=Wf("loadView",t);return e.viewContext===OA.PAGE&&({restApi:r,reqType:s}=Wf(je,{page:e.viewName,pageClass:e.pageClass})),ja(Ho(r,{method:s,headers:n},e.context)).pipe(su((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:Yc(t.headers),rootView:$g.getIn(r,j.ROOT)}})),pu(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),au((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=tl(e),e?.payload?.context?.includes(Ip.PREVIEW)){const n={...Og(e.payload.context),caseInfo:{progress:!1,error:!0}},r=Pt(Ip.PREVIEW,e.payload.context);t.actionsOut=Nf(pf,{key:n.key,target:r,containerName:Ip.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:s}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete r?.data?.caseInfo?.assignments,delete r?.data?.caseInfo?.availableActions,delete r?.data?.caseInfo?.availableProcesses);const{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,s=t||cc.getTargetViewContainerName(je),a=r?.target??Pt(s,e.context);return{target:a,context:r?.context??(t===Ip.PREVIEW&&n?e.context:rl(a,s,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=Cd(r),u.directUrlUpdation=!1,await Xc(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:s},p=Jc(u,d);if(p.resourceType=OA.CASE,o&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=Kp(p?.context);((e,t,n,r,s)=>{e&&s===Ip.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=Nf(pf,{...n,containerName:s})):e?(r.actionsOut=[],r.actionsOut.push(Nf(mf,{target:t,containerItemID:e}))):r.actionsOut=Nf(af,{...n,containerName:s})})(Op(e,p.key),e,p,t,o)}else p.preserveClientChanges=!0,t.actionsOut=[],o===Ip.PREVIEW&&t.actionsOut.push({type:ot,payload:{context:c}}),((e,t)=>{if(e.key){const n=Kp(e?.context);Op(n,e.key)&&t.actionsOut.push(Nf(Xg,e))}else t.actionsOut.push(Nf(Xg,e))})(p,t)}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:s}=e.actionConfig;return"pyCasePreview"===s&&(e=>{_o.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),su((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(oc.resolveActionByID(n,e),F.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(nu(ne),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{_o.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:s,className:a,skipSemanticUrl:o=!1,containerName:i=cc.getTargetViewContainerName(je)}=e,c=n&&{...Lo.addDebugHeaders(n)},l=Pt(i,r);let u="",d={},p=!0;if(!o){if(u=Bf(je,{page:s,pageClass:a}),l&&u){const{activate:t,activateContainerActionPayload:n}=cl(OA.PAGE,l,{semanticURL:u});if(t)return lu({type:ve,activateContainerActionPayload:n,actionConfig:e})}if(vp(l)&&({continueExecution:p,removeActionPayload:d}=ol(l)),!p)return oc.rejectActionByID(t),du()}const{restApi:h,reqType:g}=Wf(je,{page:s,pageClass:a});return ja(Ho(h,{method:g,headers:c},r)).pipe(su((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:Yc(t.headers),removeActionPayload:d,skipSemanticUrl:o}})),pu(": Error ocurred during ajax call at showPage Epic : ",e.context))})),au((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Ee)return n.push(tl(e)),t;let{type:r}=e;const{actionConfig:s,skipSemanticUrl:a}=e,o=s.containerName||cc.getTargetViewContainerName(ne),i=Pt(o,s.context);_o.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,r)=>{let s={},a=e;if(n.isTraditionalRemoteCase){s={...n};const e=Op(r,s.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=ve)}return{remoteCasePayload:s,updatedType:a}})(r,e,s,i);if(r=l??r,s.isDeferLoaded){const{response:r,headers:o={}}=e,{isCreateDataObject:c,context:l}=s,u=Cd(r,{isCreateDataObject:c});u.directUrlUpdation=!a;const d={acName:i,context:l};await Xc(u,s,d);const p=Jc(u,{containerItemID:l,target:i,headers:o,context:l});t.rootView=$g.getIn(u,j.ROOT),n.push(Nf(Xg,p))}else if(r===ve){const{activateContainerActionPayload:{semanticURL:t,containerItemID:r}}=e,a={acName:i,context:Mp(r)};s.isTraditionalRemoteCase||await Xc({directUrlUpdation:!0,semanticURL:t},s,a,!0),n.push(Nf(mf,{target:i,containerItemID:r}))}else{const t=rl(i,o,s.context),{response:r,headers:l={},removeActionPayload:u}=e,d=Cd(r,{isCreateDataObject:s.isCreateDataObject});d.directUrlUpdation=!a;const p={acName:i,context:t},h=Wc(t);await Xc(d,s,p);const g={target:i,context:t,containerItemID:t,headers:l,debugInfo:s.debugInfo,currentCaseViewMode:h,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName},f=Jc(d,g);f.resourceType=U.PAGE,s.isCreateDataObject&&(f.resourceType=U.RESOURCE_TYPES.DATA,f.resourceStatus=U.RESOURCE_STATUS.CREATE,delete f.data.caseInfo,f.referenceList=s.referenceListStr,f.subscriptName=s.subscriptName),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=U.CASE,n.key=xl.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:bc(xl.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(s,c,f),f.data??={},f.data.traditionalGadgetId=xl.getUniqueGadgetId();const m=nl(i,f);u.containerItemID&&sl(m)&&n.push(Nf(yf,{containerItemID:u.containerItemID,target:i})),n.push(m),ul(n)}return _o.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),su((({actionManagerID:e=0,rootView:t})=>{oc.resolveActionByID(e,t),Ng(n),n=[]})),NA())}],DA=PA,RA=(e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:o,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:l}=t,{restApi:u,reqType:d,body:p}=Wf(Ve,{pageName:r,dataContext:s,dataContextParameters:a}),h={};return h.RemoteSystemID=c,ja(Ho(u,{method:d,headers:h,body:p},n)).pipe(su((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:Yc(t.headers),removeActionPayload:l,skipSemanticUrl:i}))),pu("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:bA}=U,vA=(e,t)=>{const n=Object.getOwnPropertyDescriptor(e,t);return Object.hasOwn(e,t)&&n&&!0===n.writable&&"string"==typeof e[t]},xA=e=>{let t,n=0,r=[];return e.pipe(nu(re),DE((e=>(({actionMgrID:n}=e.payload),lu(e.payload).pipe(au((e=>((e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:d}=e;for(let e=0,t=Object.keys(a);e<t.length;e+=1){const n=t[e];vA(a,n)&&(a[n]=decodeURIComponent(a[n]))}const p=Pt(u,n);let h="",g={},f=!1;for(let e=0,t=Object.keys(a);e<t.length;e+=1){const n=t[e],r=a[n];vA(a,n)&&(a[n]=$g.containsEncodedPattern(r)?r:encodeURIComponent(r))}if(!o){h=Bf(Ve,{pageName:r,dataViewName:s},a);const{activate:n,activateContainerActionPayload:o}=cl(bA.PAGE,p,{semanticURL:h});if(n)return lu({type:ve,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:f,removeActionPayload:g}=ol(p)),!f)return oc.rejectActionByID(t),du()}return RA({context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:h,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:d},{removeActionPayload:g})})(e,n))),au((async e=>{if(e&&e.type===Ee)return r.push(tl(e)),r;const{type:n,actionConfig:s,headers:a,response:o,skipSemanticUrl:i}=e;t=$g.getIn(o,j.ROOT);const{containerName:c,parentAction:l,resourceType:u}=s,d=Pt(c,s.context);let p;const h=Wc(s?.context);if(s.isDeferLoaded){p=Cd(o),p.directUrlUpdation=!i;const t={acName:d,context:s.context};await Xc(p,s,t);const n={target:d,headers:a,context:s.context,containerItemID:e.containerItemID},c=Jc(p,n);return r=Nf(Xg,c),r}if(n===ve){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:Mp(n)};await Xc({directUrlUpdation:!0,semanticURL:t},s,a,!0),r.push(Nf(mf,{target:d,containerItemID:n,resourceType:bA.DATA}))}else if("DATA"===u&&l===ht){const{context:e}=s,t=o?.data,n={context:e,data:t};r.push(Nf(Xg,n))}else{const t=rl(d,c,s.context),{removeActionPayload:n}=e;p=Cd(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await Xc(p,s,l);const u=Jc(p,{target:d,context:t,containerItemID:t,headers:a,currentCaseViewMode:h});u.resourceType=bA.DATA;const g=nl(d,u);n.containerItemID&&sl(g)&&r.push(Nf(yf,{containerItemID:n.containerItemID,target:d})),ul(r),r.push(g)}return r})),su((()=>(oc.resolveActionByID(n,t),Ng(r),r=[],r))))))))},wA=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,s={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:a,reqType:o}=Wf("deleteDataObject",s);return ja(Ho(a,{method:o},n)).pipe(su((t=>({response:t.data,actionInPayload:e}))),pu("Error occurred during ajax call at deleteDataObject Epic",n))},MA=e=>{let t=0,n=[];return e.pipe(nu(lt),hu(100),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>wA(e))),au((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=tl({...e,...r,actionMgrID:t});return n.push(s),n}return[]})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))},LA=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,s={data_view_ID:t},{restApi:a,reqType:o}=Wf("getDataObjectActions",s);return ja(Ho(a,{method:o,body:{dataViewParameters:n}},r)).pipe(su((e=>({...e.data}))),pu("Error occurred during ajax call at GET data object actions : ",e.context))},FA=e=>{let t=0,n=[];let r={};return e.pipe(nu(Ie),hu(100),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>LA(e))),au((async e=>e&&e.type===Ee?(n.push(tl(e)),n):(r=e,[]))),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t,r),Ng(n),n=[],n))))},UA=[xA,e=>{let t=0,n=[];return e.pipe(nu(ct),hu(100),ru((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(t,!0,e),lu([])}return lu(e.payload).pipe(au((e=>gu(e))),au((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=tl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?Ip.MODAL:Ip.PRIMARY,i={target:Pt(o,s),containerItemID:s,context:s};return n.push(Nf(yf,i)),n})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(nu(ut),hu(100),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>fu(e))),au((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=tl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,readOnly:i,actionName:c}=r,l=Pt(o,r.context),u=rl(l,o,r.context),d={acName:l,context:u};if(s?.data?.dataInfo){const{dataInfo:e}=s.data;e.dataContext||=r.dataLookUp,e.dataContextParameters||=r.requestPayload}await Xc(s,r,d);const p=Jc(s,{target:l,context:u,containerItemID:u,headers:a});return p.resourceType=U.RESOURCE_TYPES.DATA,p.resourceStatus=U.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(r.requestPayload),n.push(Nf(af,p)),n})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(nu(dt),hu(100),ru((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(t,!0,e),lu([])}return lu(e.payload).pipe(au((e=>mu(e))),au((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=tl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?Ip.MODAL:Ip.PRIMARY,i={target:Pt(o,s),containerItemID:s,context:s};return n.push(Nf(yf,i)),n})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))})))},MA,FA,e=>{let t=0,n=[];return e.pipe(nu(pt),hu(100),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>Iu(e))),au((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=tl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=r,u=Pt(o,r.context);let d=H(o,c);d=K(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:U.RESOURCE_TYPES.DATA,resourceStatus:U.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l};if(s?.data?.dataInfo){const{dataInfo:e}=s.data;e.dataContext||=r.lookupDatapage,e.dataContextParameters||=r.dataViewParameters}const h={acName:u,context:c};await Xc(s,r,h);const g=Jc(s,p);return n.push(Nf(af,g)),n})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(nu(ht),hu(100),ru((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const s=e.payload.context;if(!r){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(t,!0,e),lu([])}return uo({context:s,stateObj:Og(s),clearContextMessages:!0}),lu(e.payload).pipe(au((e=>yu(e))),au((async e=>{if(e&&e.type===Ee){Bl(e,"dataObject");const{payload:r}=e,s=tl({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=r,u=Pt(o,r.context),d={acName:u,context:r.context};await Xc(s,r,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:r.context};return n=((e,t,n,r)=>{const{resourceType:s,key:a,containerItemID:o}=r,i=Jc(n,t);i.resourceType=s||U.RESOURCE_TYPES.DATA;const c=J(o);e.push(Nf(yf,i));const l=Rg(".dataContext","dataInfo",c),u=Rg(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:s,parentAction:ht,dataContext:l,dataContextParameters:u},p=l&&u&&Bf(Ve,{pageName:j.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...d}};e.push(t)}else if(s!==j.PAGE&&a===p&&o?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,s,{key:l,resourceType:c,containerItemID:i}),n})),su((()=>(1===n.length&&Pc(n[0].type)?oc.rejectActionByID(t):oc.resolveActionByID(t),Ng(n),n=[],n))))})))}],jA=UA;function VA(e,t){return void 0===t&&(t=uA),va((function(n,r){var s=null,a=null,o=null,i=function(){if(s){s.unsubscribe(),s=null;var e=a;a=null,r.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return s=this.schedule(void 0,n-a),void r.add(s);i()}n.subscribe(xa(r,(function(n){a=n,o=t.now(),s||(s=t.schedule(c,e),r.add(s))}),(function(){i(),r.complete()}),void 0,(function(){a=s=null})))}))}const{RESOURCE_TYPES:{CASE:kA,DATA:$A,OBJECT:BA}}=U;let GA=[],WA=!1,HA=!1;const qA={},zA=[e=>e.pipe(nu(ye),VA(200),su((e=>e.payload)),au((e=>{HA=!1,_o.subscribe(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{HA=!0}));const t=Co.getPreviewMode()&&Lo.addDebugHeaders({debugId:$g.generateUniqueID()});qA.dataContext=e.payload.dataViewName,qA.dataContextParameters=(e=>{if(!e)return e;const t={};for(let n=0,r=Object.keys(e);n<r.length;n+=1){const s=r[n];if(Object.hasOwn(e,s)){const n=e[s];t[s]=$g.containsEncodedPattern(n)?decodeURIComponent(n):encodeURIComponent(n)}}return t})(e.payload.dataViewKeys);const{context:n,requestType:r,routeKey:s}=e;let{routeEndpoint:a}=e;a&&(a.indexOf("viewType={viewType}")>0?a=a.replace("{viewType}","page"):a.indexOf('viewType=""')>0&&(a=a.replace('viewType=""','viewType="page"'))),WA=s===Tt,WA&&F.setNeedsMapping(!0);const o=E()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if($.isRemoteCase(u)){const{RemoteSystemID:e}=$.getRemoteCase(u);l.RemoteSystemID=e}if(vh.isWSSPortal()&&(l[j.X_ORIGIN_CHANNEL]="WSS"),"POST"===r){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(dl(s)){case kA:case BA:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case $A:i=qA;break;default:i=c}return ja(Ho(o,{method:r,body:i,headers:{...l,...t}},n)).pipe(su((t=>({response:{...t.data},payload:e,headers:Yc(t.headers,"",l)}))),pu(": Error occurred during ajax call at historyEpic : ",e))}return ja(Ho(o,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(su((n=>({response:n.data,payload:e,headers:{...Yc(n.headers),...t}}))),ka((r=>{if(s===Qe){const n={messages:[{type:"error",message:r.response.data.errorDetails[0].localizedValue}],category:"PAGE"};sc.setComponentCache("assignments-launchAssignment-Error",n);const s=Oh(Th()),a=bh.getEndPointInfo(s.split("/assignments")[0]),o=E()+a.routeEndpoint;return e={...e,routeKey:Be,resetSemanticURL:!0},ja(Ho(o,{method:a.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(su((n=>({response:n.data,payload:e,headers:{...Yc(n.headers),...t}}))))}return lu(Of(": Error occurred during ajax call at historyEpic : ",r,n))})))})),au((async e=>{if(HA)return GA;if(_o.subscribe(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{HA=!0})),e&&e.type===Ee)return tl(e);const{headers:t={},response:n,payload:r}=e,s=Cd(n,{[U.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=r.options.acName,o=kp(a)&&Bp(a)?vp(a):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[j.COREHEADER_APP_DEBUG_ID]}};let l=r?.payload?.pageClass;const u=r?.payload?.page,d=WA?Tt:Be,p=WA?r.payload.objectID:r.payload.workID,h=WA?"{objectID}":"{workID}";let g=WA?`objects/${p}`:"";r?.payload?.caseName&&p&&(g=Bf(d,{caseName:e.payload.payload.caseName}),g=g?.replace(h,p)||"",l=r?.payload?.caseClassName),(r?.routeKey===Qe||r?.resetSemanticURL)&&((e,t)=>{const n=wc(t);let r=Bf(Be,{caseClassName:vc(t)},{id:n});r=r?.replace("{workID}",String(bc(n))).replace("{id}",String(bc(n))),Xf({directUrlUpdation:!0,semanticURL:r,options:{}})})(0,s),_o.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});const f=$g.getIn(s,j.LOCALE_REFERENCES);await Mh.loadLocaleResources(f);const m=$g.getIn(s,j.COMPONENTS);m&&await rc(m),$i(s,r.options.actionConfig,!0),_o.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:u,pageClass:l});let I=Jc(s,c);return I=((e,t,n)=>{if(e===Hc.CASE||e===Hc.OBJECT||e===Hc.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=Zc(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===Hc.ASSIGNMENT?(n.caseViewMode=j.PERFORM_MODE,n.resourceType=Hc.CASE):n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(dl(e.payload.routeKey),{...n.data,semanticURL:g,caseViewMode:j.REVIEW_MODE},I),GA.push(nl(a,I)),((e,t)=>{let n=sc.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(Nf(If,n)),sc.resetComponentCache("assignments-launchAssignment-Error"))})(o,GA),ul(GA),GA})),su((()=>(HA||Ng(GA),GA=[],WA=!1,HA=!1,GA))),pu("Error occurred"))],YA=zA,KA=[e=>{let t=0;return e.pipe(nu(tt),su((e=>(({actionMgrID:t}=e.payload),e.payload))),su((()=>{const e=Tg()?.getState(),n=uy();return h()(e,n)&&t>0?oc.resolveActionByID(t,{}):oc.rejectActionByID(t),[]})),NA())}],JA=[e=>{let t=0,n=[];return e.pipe(nu(se),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let s,a="";n||(a=Bf(ke,{insightID:"{insightID}"}),a=a.replace("{insightID}",r),s=bh.getEndPointInfo(a));const{restApi:o,reqType:i}=Wf(ke,{...s?.payload||[],insightID:r});return ja(Ho(o,{method:i},t)).pipe(su((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),pu(": Error occurred during ajax call at showPage Epic : ",e.context))})),au((async e=>{if(e&&e.type===Ee)return n.push(tl(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=cc.getTargetViewContainerName(ne),a=Pt(s,t.context),o=rl(a,s,t.context),{response:i}=e,c=Cd(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await Xc(c,t,l,u,d);const p=Jc(c,{target:a,context:o,containerItemID:o});p.resourceType=U.PAGE;const h=nl(a,p);return n.push(h),ul(n),n})),su((()=>{oc.resolveActionByID(t),Ng(n),n=[]})),NA())}],XA=JA,QA=[e=>{let t=0,n=[];return e.pipe(nu(ae),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let s="";n||(s=Bf($e,{dashboardID:r}),s=s.replace("{dashboardID}",r));const{restApi:a,reqType:o}=Wf($e,{dashboardID:r});return ja(Ho(a,{method:o},t)).pipe(su((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),pu(": Error occurred during ajax call at showPage Epic : ",e.context))})),au((async e=>{if(e&&e.type===Ee)return n.push(tl(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=cc.getTargetViewContainerName(ne),a=Pt(s,t.context),o=rl(a,s,t.context),{response:i}=e,c=Cd(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await Xc(c,t,l,u,d);const p=Jc(c,{target:a,context:o,containerItemID:o});p.resourceType=U.PAGE;const h=nl(a,p);return n.push(h)})),su((()=>{oc.resolveActionByID(t),Ng(n),n=[]})),NA())}],ZA=QA,e_=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||cc.getTargetViewContainerName(St)},t_=e=>"pzCreateDetails"===e?.uiResources?.root?.config?.name||!1,n_=(e,t)=>{const n=t_(e),{skipBrowserSemanticUrlUpdate:r=!1}=t;$g.setIn(e,["directUrlUpdation"],!n&&!r)},r_=e=>e.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,s_=(e,t)=>{let n;return n=!e.renderInline&&!vh.getDefaultCasePage()&&t_(t),n},a_=(e,t)=>{const{class:n,context:r,viewType:s=qc.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:vh.getDefaultCasePage();return ja(Gi.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe(su((({response:t,headers:n})=>(F.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),pu("Error occurred during ajax call at createObject Epic : ",r))},o_="CREATE_OBJECT",i_=e=>{let t,n=0,r=[],s={};return e.pipe(nu(o_),hu(100),ru((e=>{if(({actionMgrID:n}=e.payload),xl.isExternalObject(e.payload.class)&&!Dl(e.payload.context)){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,e),lu([])}return lu(e.payload).pipe(au((e=>{const{context:r}=e;t=e.class;const s=e_(e),a=Pt(s,r),{continueExecution:o,removeActionPayload:i}=by(a);return o?a_(e,{removeActionPayload:i}):(oc.rejectActionByID(n),du())})),au((async e=>{if(e&&e.type===Ee)return e.payload.context=((e,t)=>xl.isExternalObject(e)&&t?t:uh())(t,e.payload.context),r.push(tl(e)),r;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e,l=s_(a,o);$g.setIn(o.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const u=e_({...a,isInCreateStage:l}),d=Pt(u,a.context),p=rl(d,u,a.context);if(((e,t)=>{xl.isExternalObject(e.class)&&(e.containerItemID=e.context,Qy(t,e))})(a,r),((e,t,n)=>!Nc(e)&&kp(t)&&!xl.isExternalObject(n))(u,d,t)){const{continueExecution:e}=ol(d);if(!e)return oc.rejectActionByID(n),du()}if(((e,t)=>!e&&!t)(a?.openCaseViewAfterCreate??!0,l)){const{businessID:e,caseType:t,resolvedURL:n}=Ic(o);return s={id:e,label:t,href:n},wy(s),My({caseId:e,caseType:t}),r}(e=>{xl.isExternalObject(e.class)&&wy({content:Mh.getLocaleValue("Successfully submitted!","Assignment")})})(a);const h=Cd(o),g=String(bc(hc(h)));let f=Bf(St,{caseClassName:pc(h)});f=f.replace(/{.+?}/,g),h.semanticURL=f,sc.setComponentCache(g,Lo.addDebugHeaders(a.debugInfo)),n_(h,a);const m={acName:d,context:p};await Xc(h,a,m);const I={target:d,context:p,headers:i,semanticURL:f,caseViewMode:r_(h),containerItemID:p,isInCreateStage:l,isMinimizable:l,assignmentContext:$g.getIn(h,Dy),nextAssignmentInfo:$g.getIn(h,Py),resourceType:U.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};gc(I,h);const y=Jc(h,I),E=nl(d,y);return((e,t,n)=>{if(sl(e)){const{removeActionPayload:e,target:r}=t;Lc(n,{removeActionPayload:e,target:r})}})(E,{removeActionPayload:c,target:d},r),r.push(E),ul(r),r})),su((()=>(hl(r),Vc(r,n),(e=>{xl.isExternalObject(e)&&F.setNeedsMapping(!1)})(t),s={},r=[],r))))})))},c_=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},jsActionQueryParams:i}=e,{state$:c}=t,l=qc.PAGE,u="executeObjectWideAction",d={assignmentID:n,actionID:r,viewType:l,objectID:s};let{restApi:p}=Wf(u,d);const{reqType:h}=Wf(u,d);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=$l(i,p),e.viewType=l;const{content:g}=Kc(a,{isObjectWideAction:!0}),f=c.value.data[a]?.objectInfo?.headers||{},{etag:m}=f,I={"if-match":m,...o};return ja(Ho(p,{method:h,body:g,headers:I},a)).pipe(su((t=>{const{data:n,headers:r}=t;return F.analyseResponse(t.data),{actionInPayload:e,response:n,headers:Yc({...I,...r})}})),pu("Error occurred during ajax call at executeObjectWideAction Epic : ",a))},l_=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:hc(e)}},{RESOURCE_TYPES:u_}=U,d_=(e,t)=>{let n=0,r=[],s={},a="";return e.pipe(nu(Ct),ru((e=>{if(({actionMgrID:n}=e.payload),a=e.payload.context,uo({context:a,stateObj:Og(a),clearContextMessages:!0}),!Dl(a)){const t={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return oc.rejectActionByID(n,!0,t),Ju.handleDeferredActionCompletion(e.payload.context),lu([])}return lu(e.payload).pipe(au((e=>{Xy(r,e);const n={...e};return c_(n,{state$:t})})),au((async e=>{if(e?.type===Ee){const t=tl(e);return r.push(t),r}Gu.clearContextedCache(a);const{headers:t,actionInPayload:o,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:u}=o,d=Kp(c);o.target=d,$g.setIn(i.data,j.OBJECT_INFO_IS_LOCAL_ACTION,!1),hE({submitResponse:i});let p=Cd(i,{[U.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const h=pc(p),g=W(o.context),f=Up(g)[0]?vp(Up(g)[0]):g,m=(e=>{const t=fc(e);return Ml(t)&&Ll(vh.getOperatorIdentifier(),t)})(p),I=u&&!m;!l||u||rE(o.context,f)||(p=ll(p,Og(c)));const y=Jc(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&$g.setIn(e,U.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),$g.setIn(e,U.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(y.data,o),y.caseClassName=h,y.resourceType=u_.ASSIGNMENT,y.headers=t;const E=hc(p);gc(y,p);const A=Bf(St,{caseClassName:h}).replace(/{.+?}/,String(bc(E)));p.semanticURL=A,y.semanticURL=A,await lE(o,y,!1,E,p,r,e,i,!0),I&&(s=sE(o),My({caseId:o.caseID,caseType:o.caseTypeID,assignmentId:o.assignmentID})),((e,t)=>{const n=pc(e?.response),r=fc(e?.response),{caseTypeID:s}=r,a=vh.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&rg(j.CASESUMMARY_VIEW_NAME,s)&&Bc(t,e?.actionInPayload,{caseClassName:n})})(e,r),Ju.handleDeferredActionCompletion(a),uE(y,o,f);const _=l_(p,o);return Ec({..._,containerItemID:c}),tE(r,{transientItemID:c,target:d,isModalAction:l}),r})),su((()=>{const e=r.find((e=>e.type===Ee));return e?(Ju.handleDeferredActionCompletion(a),dE(e),oc.rejectActionByID(n)):oc.resolveActionByID(n,s),hl(r),F.setNeedsMapping(!1),r=[],s={},r})))})))},p_=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:vh.getDefaultCasePage(),l=Wf(Tt,{objectID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),ja(Ho(u,{method:d,headers:{...r,...a&&{...Lo.addDebugHeaders(a)}}},s)).pipe(su((t=>(F.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Yc({...r,...t.headers}),removeActionPayload:i}))),pu("Error occurred during ajax call at getObject Epic : ",s))},h_="GET_OBJECT",{RESOURCE_TYPES:g_}=U,f_=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:r,type:s,response:a,removeActionPayload:o,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,d=Cc(Tt,n),p=Pt(d,c);if(Oc(s))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Cc(Tt,s),l=Pt(c,a),u=Mp(r);await Xc({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(Nf(mf,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:n});else{const e=rl(p,d,c,{buildNew:!0}),r=Cd(a),s=(e=>{const t=hc(e),n=pc(e);let r=Bf(Tt,{objectClassName:n});return r=r?.replace("{objectID}",String(bc(t))),r})(r);r.semanticURL=s,r.directUrlUpdation=!l;const h={acName:p,context:e};await Xc(r,n,h);const g=Jc(r,{target:p,context:e,containerItemID:e,semanticURL:s,headers:i,debugInfo:u});g.caseViewMode=j.REVIEW_MODE,g.resourceType=g_.OBJECT,gc(g,r);const f=nl(p,g);o.containerItemID&&sl(f)&&t.push(Nf(yf,{containerItemID:o.containerItemID,target:p})),t.push(f)}ul(t);const h=n.insKey;Ac({caseKey:h,actionInContext:c})},m_=e=>{let t=0,n=[];return e.pipe(nu(h_),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{context:n,isChild:r,viewType:s}=e,a=Cc(Tt,e),o=Pt(a,n);let i,c=!0;if("none"!==s){const e=ol(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return oc.rejectActionByID(t),du();const{activate:l,activateContainerActionPayload:u}=cl(g_.OBJECT,o,e);return l&&!r&&"none"!==s?lu({type:ve,activateContainerActionPayload:u,actionInPayload:e}):p_(e,{removeActionPayload:i})})),au((async e=>{if(e&&Pc(e.type))return n.push(tl(e)),n;if("none"===e?.actionInPayload?.viewType){const t=Og(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==j.PERFORM_MODE){const t=Cd(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ot,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),n.push(Nf(Xg,r));const s=Kp(e?.actionInPayload?.context),a=Sc(e?.actionInPayload?.context),o=Object.freeze({target:s,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:a});if(mc(e?.actionInPayload?.context)){const t=Jc(e?.response,{...o});pl({...t,isArrayDeepMerge:!0},n)}}}else await f_(e,n);return n})),su((()=>(Ng(n),Vc(n,t),n=[],n))))},I_="OPEN_OBJECT_ACTION",y_=e=>{const{actionID:t,caseID:n,context:r,openActionType:s,modalLoadingContainer:a}=e,o=qc.FORM,i=Wf(Nt,{objectID:n,actionID:t,viewType:o}),{reqType:c}=i;let{restApi:l}=i;e.actionType=j.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${o}`:`${l}?viewType=${o}`);const u=a?.context??r;return ja(Ho(l,{method:c,headers:{}},u)).pipe(su((t=>(F.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:Yc(t.headers)}))),pu(`: Error occurred during ajax call at ${s} Epic : `,u))},E_=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Cd(e,{info:U.OBJECT_INFO.OBJECT_INFO}),u=Cc(o,r),d=c?.target??Pt(u,s),{context:p,containerItemID:h,isNewContainerItem:g}=((e,t,n,r)=>{let s,a,o=!1;const i=$p(e);return!Bp(e)||i&&!Np(e,r)?(a=H(t,n),Nc(t)&&(a=K(n,a)),s=a,o=!0):(s=i?Op(e,r):vp(e),a=Mp(s)),{context:a,containerItemID:s,isNewContainerItem:o}})(d,u,s,e.data.objectInfo.ID),f={acName:d,target:d,containerName:u,context:p};await Xc(l,r,f);const m=l.uiResources?.root,I=(e=>e?j.PERFORM_MODE:j.REVIEW_MODE)(m),y=Jc(l,{target:d,context:p,containerItemID:h,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Nc(u),resourceType:U.RESOURCE_TYPES.OBJECT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,actionType:r.actionType});if(m&&gc(y,l),Nc(u)&&delete y.doDeleteCaseSummary,t.push(Nf((e=>e?af:pf)(g),y)),g||t.push(Nf(gf,y)),g){const s=Up(r.contextName),a=Op(s,e.data.objectInfo.ID);if(a){const e={data:{objectInfo:{headers:n}},context:a};t.push(Nf(Xg,e))}}return h!==vp(d)&&t.push(Nf(mf,{target:d,containerItemID:h})),mc(h)&&!c?.context&&pl(y,t),t},A_=e=>{e.openActionType=Nt;if(Cc(e.openActionType,e)===j.MODAL){const t=Cc(e.openActionType,e),n=Pt(t,e.context),r=K(e.context,H(t,e.context));Ng(af({target:n,context:r,containerItemID:r,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.getProperty(j.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),Ng(hf({context:r})),e.modalLoadingContainer={target:n,context:r},y_(e)}return y_(e)},__=e=>{let t=0,n=[];return e.pipe(nu(I_),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>A_(e))),au((async e=>{if(Pc(e.type)){const t=tl(e);n.push(t);const r=Og(e.payload.context);return r?.context_data?.isLoading&&n.push(Nf(gf,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return $g.setIn(s,"data.objectInfo.activeActionID",a),$g.setIn(s.data,j.getProperty(j.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&$g.setIn(s.data,j.getProperty(j.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await E_(s,n,{headers:r,actionInPayload:t}),xE(t),n})),su((()=>(Ng(n),Vc(n,t),n=[],n))))},C_=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||cc.getTargetViewContainerName(Ot)},S_=(e,t)=>{const{class:n,context:r,viewType:s=qc.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:vh.getDefaultCasePage();return ja(Gi.createCase(n,{...e,pageName:o,viewType:s,context:r,retrieveActionViewForNewObject:!0})).pipe(su((({response:t,headers:n})=>(F.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),pu("Error occurred during ajax call at createObject Epic : ",r))},T_="CREATE_EXTERNAL_OBJECT",N_=e=>{let t=0,n=[];return e.pipe(nu(T_),hu(100),su((e=>(({actionMgrID:t}=e.payload),e.payload))),au((e=>{const{context:n}=e,r=C_(e),s=Pt(r,n),{continueExecution:a,removeActionPayload:o}=by(s);return a?S_(e,{removeActionPayload:o}):(oc.rejectActionByID(t),du())})),au((async e=>{if(e&&e.type===Ee)return e.payload.context=uh(),n.push(tl(e)),n;const{actionInPayload:r,response:s,headers:a,removeActionPayload:o}=e,i=s_(r,s);$g.setIn(s.data,j.getProperty(j.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const c=C_({...r,isInCreateStage:i}),l=Pt(c,r.context),u=rl(l,c,r.context);if(!Nc(c)&&kp(l)){const{continueExecution:e}=ol(l);if(!e)return oc.rejectActionByID(t),du()}const d=Cd(s);let p=Bf(Ot,{caseClassName:pc(d)});p=p.replace(/{.+?}/,String(bc(hc(d)))),d.semanticURL=p,n_(d,r);const h={acName:l,context:u};await Xc(d,r,h);const g={target:l,context:u,headers:a,semanticURL:p,caseViewMode:r_(d),containerItemID:u,isInCreateStage:i,isMinimizable:i,assignmentContext:$g.getIn(d,Dy),nextAssignmentInfo:$g.getIn(d,Py),resourceType:U.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};gc(g,d);const f=Jc(d,g),m=nl(l,f);return sl(m)&&Lc(n,{removeActionPayload:o,target:l}),n.push(m),ul(n),n})),su((()=>(hl(n),Vc(n,t),n=[],n))))},O_=e=>{const{workId:t,context:n,isExternalCase:r}=e,s=r?qe:"deleteWork",{restApi:a,reqType:o}=Wf(s,{ID:t});return ja(Ho(a,{method:o},n)).pipe(su((t=>({response:t.data,actionInPayload:e,headers:Yc(t.headers)}))),pu("Error occurred during ajax call at deleteWork Epic : ",n))},P_=e=>{_o.publish(j.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},D_=e=>{let t,n=0,r=[];return e.pipe(nu(Kl),su((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),au((e=>e.ignoreWorkDeletion?lu({actionInPayload:e}):O_(e))),au((async e=>{if(e&&Pc(e.type)){const{payload:t}=e,s=tl({...e,...t,actionMgrID:n});return r.push(s),r}const{actionInPayload:t}=e,{context:s}=t;return wy({content:Mh.getLocaleValue("Deleted successfully!","Messages")}),s?.includes(j.PREVIEW)&&r.push(Nf(sf,qp({context:j.APP.APP,name:j.PREVIEW}))),s?.includes(j.PRIMARY)&&window?.history?.back(),r})),su((()=>(Ng(r),Vc(r,n)===j.PROMISE_VALUE.RESOLVE&&P_({caseTypeID:t}),r=[],r))))},R_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return py.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...Cy,...TA,...DA,...YA,...jA,...Ty,...KA,...XA,...ZA,...[i_,m_,d_,__,N_,D_]),b_=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:s,context:a,transientItemID:o}=r;"HTTP"!==s&&[Ce,xe,Se,Me,Ne,be].includes(n)&&(_l(a||o),ro.removeContextTreeNode(a||o)),e(t)},v_={},x_=e=>{const t=$g.getIn(v_,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),s=$g.getIn(v_,[r,t],[]),a=s&&s.length>0&&s.indexOf(e);if(a>-1&&s.splice(a,1),!s||s&&0===s.length){$g.deleteIn(v_,[r,t]);const e=$g.getIn(v_,[r]);e&&0===Object.keys(e).length&&$g.deleteIn(v_,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),$g.deleteIn(v_,[j.CONTEXT,e]);const r=$g.getIn(v_,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&$g.deleteIn(v_,[j.CONTEXT]),n.length>0&&Ng(Df({dataPagesToBeRemoved:n}))},w_=(e={},t)=>{Object.keys(e).forEach((n=>{const r=$g.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=$g.getIn(v_,[j.CONTEXT,n]);if($g.getIn(v_,[e])){const r=$g.getIn(v_,[e,t],[]);$g.setIn(v_,[e,t],[...new Set([...r,n])])}else $g.setIn(v_,[e,t],[n]);r?$g.setIn(v_,[j.CONTEXT,n],[...new Set([...r,t])]):$g.setIn(v_,[j.CONTEXT,n],[t])})(n,e,t)}))}))},M_=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:r=[]}={},type:s}=e;if(((e,t)=>{t&&t.length>0&&(e===Me||e===Se)&&t.forEach((e=>{x_(e)}))})(s,r),s===Ce||s===fe||s===rt){const e=s===rt?t:t.shared;w_(e,n)}else s===Me?(x_(n),w_(t.shared,n)):s===Se&&x_(n)})),e(t)},L_=e=>t=>n=>{const{type:r,payload:{target:s,containerItemID:a,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:u}=U;if(r===Se){const{resourceType:t,key:n,context:r}=$g.getIn(e.getState(),["containers",s,"items",a])||{},o={resourceType:t,key:n,context:r,containerItemID:a};_o.publish(u.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),s===`${U.APP.APP}/${j.PRIMARY}`&&l===j.CONTAINER_TYPE.MULTIPLE&&_o.publish(u.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===Me||r===Se)&&i.forEach((e=>{qu.cleanCaches(e)})),r!==Me&&r!==Se||qu.cleanCaches(o),t(n)},F_=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null}={},type:s}=t;!n||s!==Ce&&s!==xe&&s!==Me&&s!==Se||(Ei(n),Ii(n)),r&&s===De&&(Ei(r),Ii(r)),e(t)},U_=function(e){void 0===e&&(e={});var t,n=new(0,SI.constructor)(SI.schedulerActionCtor),r=new NI,s=function(s){t=s;var a=new NI,o=new NI,i=a.asObservable().pipe(Ma(n)),c=new DI(o.pipe(Ma(n)),t.getState());return r.pipe(su((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),au((function(e){return ja(e).pipe(La(n),Ma(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),a.next(n),r}}};return s.run=function(e){r.next(e)},s}(),j_=e=>{if(null!==Tg())return void jg();const t=[hp.propertyChangeMiddleware,b_,M_,F_,U_,L_],n=dI({reducer:dy(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(RI).concat(RI)});U_.run(R_),Sg(n)},V_={publishConstellationLoadedEvent:()=>{_o.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const k_=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Op(t,e)};Md({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:Op(t,e)};Md({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=Md({meta:{type:"PreviewViewContainer",config:{name:j.PREVIEW}},options:{context:j.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:j.PRIMARY,context:j.APP.APP}),Rp(j.APP.APP,j.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:j.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Md({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=hh(t,e);return Il.isStateModified(n)}getEventUtils(){return V_}getBroadcastUtils(){return Oy}isTraditionalUICase(e){return kc(e)}};const $_=class{static openCase(e,t=U.APP.APP,n={}){return n.renderInline=!0,n.pageName?vh.setDefaultCasePage(n.pageName):(vh.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?vh.disableAssignmentHeader(n.disableAssignmentHeader):vh.disableAssignmentHeader(!1),sd.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=U.APP.APP,n={}){return n.renderInline=!0,n.pageName?vh.setDefaultCasePage(n.pageName):(vh.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?vh.disableAssignmentHeader(n.disableAssignmentHeader):vh.disableAssignmentHeader(!1),sd.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=U.APP.APP,t={}){return t.renderInline=!0,t.pageName?vh.setDefaultCasePage(t.pageName):(vh.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?vh.disableAssignmentHeader(t.disableAssignmentHeader):vh.disableAssignmentHeader(!1),sd.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=U.APP.APP,n={}){return n.renderInline=!0,n.pageName?vh.setDefaultCasePage(n.pageName):(vh.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?vh.disableAssignmentHeader(n.disableAssignmentHeader):vh.disableAssignmentHeader(!1),sd.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=U.APP.APP,r={}){const s=ne;r?.defaultCasePage?vh.setDefaultCasePage(r.defaultCasePage):vh.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?vh.disableAssignmentHeader(r.disableAssignmentHeader):vh.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:oc.getNextActionMgrId(),context:n},{promise:o}=oc.actionManagerPromise(s,a.actionMgrID);return Ng({type:s,payload:{...a}}),o}static getCurrentContextAPI(e,t=U.APP.APP){return Md({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const B_=new class{createC11nEnv=e=>Md(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>cn;getStateManager=()=>u;getActionCreators=()=>d;getStreamObservable=()=>a;getActionProcessor=()=>zg;getActionHandler=()=>qg;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...$g.getIn(e,j.ROOT),options:n};j_(e),$i(e,n,!0);const s=this.createC11nEnv({meta:r,isRoot:!0});_o.publish(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:r,uiResources:s={}}=e,{root:a}=s,o=$g.getIn(s,j.CONTEXT_DATA),i=Cd(e);await Xc(i,{},{},!1,!0);const c={...r,[j.CONTEXT_DATA]:o};Xp(a,t,c,n)};fetchEndPointResource=(e,t,n)=>{Ho(e,{method:"GET"},j.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await rc(n);const r=this.createC11nEnv({meta:e,isRoot:!0});Tg()||j_({}),_o.publish(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{ec.initServer(e,t,n)};loadView=async(e,t,n=[])=>{I();const r=Cd(e),s=$g.getIn(r,j.VIEWS),a=$g.getIn(r,j.NAVIGATIONS),o=$g.getIn(r,j.COMPONENTS)||[];o.push(...n);const i=$g.getIn(r,j.STATIC_SERVER_URL),c=$g.getIn(r,j.APPLICATION_DATA);s&&Zh(s),a&&eg(a),(e=>{e&&(jf=e.pyLabel)})(c),i&&ec.initServer(i),await rc(o,i),this.renderApp(r,t)};initAppShell=(e,t,n)=>{rm(e),cc.buildActionTargetMap(t),I(n)};initRoutingTable=(e,t)=>{rm(e,!0),I(t)};setAppAlias=e=>{ec.setAppAlias(e)};getHomeRestApi=e=>{const t=E(),{restApi:n}=Gf("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(tm()&&!t){const t=Sh(),r=bh.processUrl(t,!0),s=bh._getMatchedRouteInRoutingTable(r)||"",a=bh.getRoutingInfo(),o=bh.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=a&&a.routes[s].payload;c=c.replace("{workID}",i).replace("{id}",i),n=bh.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=bh.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,s,a)=>{const{config:o}=t||{},i=o?.name;if(Tg()||j_({}),a){const e=`${j.APP.ROOT}/${i}`;ih(e),oh().deleteContainerItem(e)}(oh().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&jg(),Ng(Xg({data:{},context:j.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${i}`}}),l=c.getPConnect(),u=`${l.getContextName()}/${l.getContainerName()}`;vp(u)||"noPortal"===o?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const d=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await rc(d),_o.publish(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:s})};loadViewByName=(e,t,n,r)=>{let s=this.getViewRestApi(e,n);s===E()&&(s=this.getHomeRestApi(t)),this.fetchEndPointResource(s,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{nm(e)};checkIfSemanticURL=()=>tm();onPCoreReady=e=>{_o.subscribe(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{_o.subscribe(U.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{bi.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{_(e)};setFetchDefaultHeaders=e=>{Jo(e)};setFetchAuthInfo=e=>{Xo(e)};getCaseApi=()=>sd;getMashupApi=()=>$_;enableAppRouting=e=>{kf(e)};initStore=()=>j_({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Md({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}}};const G_=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer||null,this.contextPath=e.contextPath,this.messagingService=e.messagingService||null,this.reAuthUrl=e.reAuthUrl||null}};const W_=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode||"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping||{},this.envType=e.envType,this.serviceConfig=new G_(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1}},H_=e=>"fulfilled"===e.status,q_=async()=>{const e=vh.getLocale();let t;const n=vh.getLocalizationVersion();try{let r;2===n?r=[e]:(r=[Mh.GENERIC_BUNDLE_KEY,Mh.MESSAGE_BUNDLE_KEY,Mh.FIELD_LABELS_BUNDLE_KEY],t=await Mh.isCurrentLocalePackAvailable());const s=r.map((async r=>{2===n?await(async e=>{const t=vh.getAvailableLocalePacks(),n=vh.getLocalizationBundles();let r;if(e&&t&&t.includes(e)?r=[Hi("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(r=n.map((e=>Hi("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!r||0===r.length)return;const s=200,a=201;(await Promise.allSettled(r)).filter(H_).forEach((({value:e})=>{if([s,a].includes(e.status)&&e.data){const t=e.data,n=Jh(vh.getLocale()??"en-US");Object.keys(t).forEach((e=>{Mh.setLocaleForRule(t[e],e),n.setLocaleForRule(t[e],e)}))}}))})(r):t&&await(async(e,t)=>{const n=await ec.getSvcLocale(t,`${e}.json`);if(n.ok&&e){const t=await n.json();Mh.setLocaleForRule(t,e)}})(r,e)}));await Promise.allSettled(s)}catch(e){console.warn(e)}},z_="@P .viewConfig";let Y_=0;const K_=new class{init(e){const t=new W_(e),n={...t.environmentInfo,renderingMode:t.renderingMode};kf(t.enableRouting),j_({}),vh.setTheme(t.theme),vh.setCookieComplianceMethod(t.cookieComplianceMethod),vh.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),bi.updateFieldDefaults(t.fieldDefaults),bi.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),Lo.setDefaultHeaders(t.additionalHeaders),this.#y(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),ec.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),_(t.serviceConfig.googleMapKey),ec.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),Mh.setTimezone(t.timezone),vh.setEnvironmentInfo(n),vh.setLocale(t.locale),$.setRemoteCaseMapping(t.remoteCaseMapping),bu.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),sc.init(),t.initBroadcast&&k_.getBroadcastUtils().init()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Md({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};importReactRoot=async()=>{const e=[];return B_.getComponentsRegistry().getComponent("ReactRoot")?.modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",e),s.setAttribute("async",t),s.onload=n(),s.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(s)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,s)=>{const a=new URLSearchParams(t);let o=!1;"true"===n&&(o=!0);let i=null,c=null,l=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1]),t.length>1&&"assignments"===t[2]&&t[3]&&(l=t[3])}else o=!1;let u=r;i&&(u=`${u}/${i}`),c&&(u=`${u}/${c}`),l&&(u=`${u}/assignments/${l}`),o&&(a.has("noPortal")||a.append("noPortal","true"),c&&s&&a.append("view",s));const d=a.toString();return u+=d?`?${d}`:"",u};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:s,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:f,contextPath:m}=n;let I=window.location.origin;const y={};if(void 0!==l&&(I=l),m&&(I=`${I}${m}`),f&&"LAUNCHPAD"!==h&&(I=`${I}/${f}`),e.restServerConfig=I,!0===d){const e=this.buildSemanticUrl(r,s,a,I,i);!o&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),y.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(y.dynamicLoadComponents=!1);let E=null;if(f){const e=f.indexOf("/app/");E=e>=0?f.substring(e+1):f}if(Object.keys(y).length>0&&window.PCore.setBehaviorOverrides(y),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===vh.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),this.init(e)};launchViewByName=(e,t,n,r,s,a,o,i)=>{Y_+=1;const c=i||`mashup${Y_}`,l={type:"RootContainer",config:{viewConfig:z_,renderingMode:"view",name:c}};B_.loadRootComponent(e,l,s,a,o).then((()=>B_.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,s,a,o)=>{Y_+=1;const i="hybrid"===o?`hybrid_${Y_}`:o;Y_+=1;const c=i||`mashup${Y_}`,l={type:"RootContainer",config:{viewConfig:z_,renderingMode:"portal",name:c}};o===j.HYBRID&&Ku.setRuntimeParam(j.HYRBID_ROOT_CONTAINERNAME,c),Ku.setRuntimeParams(r),B_.loadRootComponent(e,l,n,s,a).then((()=>B_.updateStoreWithUiRoot(t,c,!1)))};launchPortal=async(e,t,n=`portal${Y_+=1}`,r=[])=>{const s={type:"RootContainer",config:{viewConfig:z_,renderingMode:"portal",skeleton:"LoadingComponent",name:n}},a=[...r,s.config.skeleton];vh.isPortalLoaded=!0;try{return await B_.loadRootComponent(e,s,a),B_.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0)=>{const n={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}B_.loadRootComponent(e,n,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&s(754)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:s,ccLibs:a,isAlternateDesignSystemEnabled:o,alternateDesignSystemName:i}=e;this.initCoreConfig(e);const c=async()=>{await this.importReactRoot();const e=vh.environmentInfoObject?.pyC11nDXCBDevURL;return e&&await ec.importCustomComponentMap(""),r&&!e&&await ec.importCustomComponentMap(r),vh.environmentInfoObject?.pyInfinityStaticService&&a&&a.length>0&&await Promise.all(a.map((e=>ec.importCustomComponentMap(e)))),"true"===o&&"other"!==i&&await this.importDesignSystemComponentMap(n,s,i),t&&t(),!0};return new Promise(((e,t)=>{q_().then((async()=>{const t=B_.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await c()):_o.subscribe("component-map-loaded",(async()=>{e(await c())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&(PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess"),PCore.getPubSubUtils().subscribe("fetchFailure",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchFailure"))};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")};#y(e,t,n){rm(e),cc.buildActionTargetMap(t),I(n)}},J_={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Wf("createViewRuleByID");return Ho(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Wf("getViewRuleByID",{ID:e});return Ho(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:s}=Wf("updateViewRuleByID",{ID:e});return Ho(r,{method:s,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Wf("deleteViewRuleByID",{ID:e});return Ho(n,{method:r},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:r,reqType:s}=Wf("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Ho(r,{method:s,body:{calculations:{fields:n}}}).then((e=>e.data))}},X_={"Content-Type":"application/json"},Q_={addCaseFollower:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({users:t.map((e=>({ID:e})))});return Hi("addCaseFollower",{body:s,queryPayload:r,headers:X_},n)},deleteCaseFollower:(e,t,n)=>Hi("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Hi("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},Z_={addRelatedCases:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({cases:t});return Hi("addRelatedCases",{body:s,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Hi("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Hi("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},eC="operatorDetails",tC={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Wf(eC,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Hi(eC,{queryPayload:t})}return t?Hi("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Hi(eC,{body:{dataViewParameters:{ID:e}}})}},nC="postCustomFeedMessages",rC={"Content-Type":"application/json"};const sC=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,s,a,o)=>{const i=a.getLocalizationService();o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<s.length;e+=1)s[e].cancel();const d=Yi();return s.push(d),Hi("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async t=>{if(200===t.status&&t.data){s.pop();const n=[],c={};let l=!1,u=[];if(t?.data){if(u=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),l||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(l=!0)}))}if(l&&await Sd({uiResources:t.data.uiResources}),!r&&(r=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)}));const t=r.find((e=>"All"===e.id));t&&(t.on=n)}}}if(o&&a.getValue("pulse.messageIDs")){let r=a.getValue("pulse.messageIDs"),s=a.getValue("pulse.messages");r=[...r,...n],s={...s,...c},Object.values(s).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),a.updateState({pulse:{messages:s,messageIDs:r,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}})}else a.updateState({pulse:{messages:c,messageIDs:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}});const d=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:d}}return a.reportError(`getFeeds call failed ${t.status}`,t.data),""})).catch((e=>{Ki(e)||a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n,r=[],s=!1,a=[])=>{const o={message:t,context:e,parentMessageId:s?e:"",attachments:r,pyRecipients:a.length?a:void 0},i=0===a.length?{body:JSON.stringify(o),headers:rC}:{body:JSON.stringify(o),queryPayload:{type:"PegaSocial-Post-Private"},headers:rC};return Hi(a.length?nC:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const a=t?.data;if(s){a.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(a,s,n,r.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,s,n,r.length>0);return n.updateState({pulse:{messages:o,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>Hi(nC,{body:t,queryPayload:{type:e},headers:rC},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const r=e.data.data,s={ID:r.ID,pzInsKey:r.ID,classID:r.classID,pyPostType:r.pyPostType,postedByUser:r.postedByUser,pyIsDeleteEnabled:r.pyIsDeleteEnabled,pyMessageViewReference:r.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:r.pyCommentContext,pyPostedOn:r.postedTime,pyFeedTitle:r.postedByUser.name,pyIconReference:r.postedByUser.ID},...r.PostMessage};Td(r.messageViewReference,n,t.context)||await Sd({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[s.ID]:s,...n.getValue("pulse.messages")},messageIDs:[s.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:r,isReply:s=!1,recipients:a=[]})=>{const o=JSON.stringify({message:n,...a.length&&{pyRecipients:a}});return Hi("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:rC},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(s){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:a}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw r.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,r=!1)=>{const s={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},a=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(a)?.find((e=>e?.ID===s?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===s?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...s},e=n}else e=[...e,s];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(s.ID)?{...a[s.ID],...s}:s,t={...a,[s.ID]:e};return{messages:t,messageIDs:o.includes(s.ID)?o:[s.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.hasOwn(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,pConnectObj:s})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Hi(a,{body:o,queryPayload:{pulseContext:e},headers:rC},s.getContextName()).then((a=>{if(200===a.status)if(r){const r=s.getValue(`pulse.messages.${n}`),a=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const s=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=s-1,r=!1):(e=s+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));s.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const r={...s.getValue(`pulse.messages.${n}`)},a=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},s.updateState({pulse:{messages:{[e]:r}}})}else s.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{s.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let s=e;t&&(s=n);Hi("deleteFeedMessage",{queryPayload:{messageID:s}},r.getContextName()).then((s=>{if(200===s.status)if(t){const t=r.getValue(`pulse.messages.${e}`),s=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:s}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),s={...r.getValue("pulse.messages")};delete s[e],r.updateState({pulse:{messageIDs:n,messages:s}})}else r.reportError(`deleteMessage call failed with status ${s.status}`,s)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Hi("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:s,listSize:a=5}=e,o={pulseContext:n,searchFor:r,mentionsType:s,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Yi();return this.mentionsTagsCancelTokenSource.push(i),Hi("getMentionSuggestions",{queryPayload:o,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Ki(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Hi("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t)=>Hi("getViewRuleByMessageType",{queryPayload:{type:e}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,s={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=Yi();return this.mentionsTagsCancelTokenSource.push(a),Hi("getTagSuggestions",{queryPayload:s,cancelTokenSource:a},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Ki(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},aC={getTaggedCases:(e,t)=>Hi("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Hi("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({tags:t});return Hi("addTagsToCase",{body:s,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Hi("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>xu.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},oC=(e,t)=>{ch(t.getContextName(),e.etag),lh(t.getContextName(),e.etag)},iC={getParticipants:(e,t)=>Hi("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Hi("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Hi("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Hi("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,r,s)=>{const a={caseID:e},o={...n,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Hi("createParticipant",{body:o,queryPayload:a,headers:i},r.getContextName()).then((t=>{oC(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=Rl(s||r.getContextName());r.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},s),t(e.response)}))}))},updateParticipant:async(e,t,n,r,s)=>{const a={caseID:e,participantID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Hi("updateParticipant",{body:n,queryPayload:a,headers:o},r.getContextName()).then((t=>{oC(t.headers,r),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=Rl(s||r.getContextName());r.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},s),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},s={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Hi("deleteParticipant",{queryPayload:r,headers:s},n.getContextName()).then((t=>{oC(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function cC(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const lC="create",uC="update",dC="delete";function pC(e,t,n,r){const s=og(t);if(s){switch(e){case lC:case uC:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(s.allPersonalizations[n]=t),e&&(s.defaultPersonalization=n);break}case dC:delete s.allPersonalizations[n],s.defaultPersonalization===n&&(s.defaultPersonalization="");break;default:return null}return s}return null}const hC={},gC=async e=>{const t=og(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=cC(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Wf("getUIListPersonalizations",{listID:e});return Ho(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:cC(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},fC=async(e,t,n)=>{const{restApi:r,reqType:s}=Wf("createListPersonalization",{listID:e});return pC(lC,e,t,n),Ho(r,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return hC[t]=n,e}))},mC=async(e,t,n)=>{const r=hC[t]||t;pC(uC,e,t,n);const{restApi:s,reqType:a}=Wf("updateListPersonalization",{listID:e,personalizationID:r})||{};return Ho(s,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},IC=async(e,t)=>{const n=hC[t]||t;pC(dC,e,t);const{restApi:r,reqType:s}=Wf("deleteListPersonalization",{listID:e,personalizationID:n});return Ho(r,{method:s,body:{}}).then((e=>(hC[t]&&delete hC[t],e)))};const yC=function(e){return e?{createPersonalization:fC.bind(null,e),updatePersonalization:mC.bind(null,e),deletePersonalization:IC.bind(null,e),fetchPersonalizations:gC.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},EC="getDataObjects",AC="getInsightByID",_C=["LocalList","RemoteList","PromptList","DataPage"];let CC=null;const SC={},TC=e=>_u.getAppCacheKey(`PrimaryFields-${e}`);function NC(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const OC={getDataObjects:function(){const e=_u.getAppCacheKey(EC);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(e)}`));const{restApi:t,reqType:n}=Wf(EC,{}),r=Ho(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(CC)return CC;const t=_u.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Wf("getDataPages",{datapageRequestType:"explorable"});return CC=Ho(n,{method:r,datapageRequestType:"explorable"}),CC.then((e=>{CC=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),CC},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=ag(e);if(t&&t.classID){let e=cg(t.classID);const n=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(n&&!$g.isEmpty(n)){const r=n.reduce(((e,n)=>{const r=Qh(n,t.classID);return e[n]=r,e}),{});e={...e,...r}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&_C.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:NC(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Gu.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=_u.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(t)}`));const{restApi:n,reqType:r}=Wf("getListData",{dataViewName:"D_pzGetDefaultColumns"}),s=Ho(n,{method:r,body:{dataViewParameters:e}});return s.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),s},getFieldsForDataSource:function(e,t,n){if(!t){const t=ag(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=_u.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(r)}`));const s=_u.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return s.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),s},getPrimaryFieldsForDataSource:function(e="",t=""){const n=_u.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(`${window.sessionStorage.getItem(n)}`));const r=_u.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:s,classesToFetch:a,isTopLevelClassPresent:o,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let s=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=TC(t);window.sessionStorage.getItem(o)||(SC[t]?r.push(SC[t]):(n.push(t),t===e?s=!0:a.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:s,joinedClassesToFetch:a}}(e,n);return a.length&&s.push((async(e,t,n,r)=>{const s=_u.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=TC(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete SC[e]}))}));return e.forEach((e=>{SC[e]=s})),s})(a,o?e:void 0,o?t:void 0,i.length>0?i:void 0)),Promise.allSettled(s).then((()=>{const e={};return r.forEach((t=>{const n=TC(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(`${window.sessionStorage.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=Wf("getInsightIDs");return Ho(e,{method:t})},getInsightByID:function(e){const t=ig(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:s}=Wf(AC,n);return Ho(r,{method:s})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=Wf(AC,t);return Ho(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=Wf("createInsight");return Ho(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:s}=Wf("updateInsight",n);let a;return"UpdateDateTime"in t&&(a=t.UpdateDateTime),Ho(r,{method:s,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Wf("deleteInsight",t);return Ho(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Wf("exportToExcel");return Ho(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=Wf("exportToCSV");return Ho(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:s}=Wf("scheduleInsight",n);return Ho(r,{method:s,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:s,reqType:a}=Wf("updateScheduledInsight",r);return Ho(s,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:s}=Wf("deleteScheduledInsight",n);return Ho(r,{method:s})},translateStrings:function(e){const{restApi:t,reqType:n}=Wf("translateStrings");return Ho(t,{method:n,body:JSON.stringify(e)})}};const PC=new class{addRoutes=e=>{return t=e,void bh.addRoutes(t);var t}};const DC=class{static registerModule(e,t,n){n[e]=()=>t}};const RC=class{static getCaseEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)};const bC=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},vC={setTokens:e=>{Xo({tokenInfo:e}),Jo(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>_o.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>No(),getAuthInstance:e=>To.init(e),setAuthorizationHeader:e=>{Jo({Authorization:e}),setTimeout((()=>_o.publish("updateSession",{updateStatus:"success"})),0)}};const xC=new class{getDebouncedSubject(e){return(new NI).pipe(VA(e))}};Vi.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,s=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${s}(\\x2e${s})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t="Enter a valid email address"),t})),Vi.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),Vi.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),Vi.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";s.e(667).then(s.bind(s,654)).then((({parsePhoneNumberFromString:t})=>{Vi.register("phone",(n=>{let r=null;n&&!/^\+?\d+$/.test(n)&&(r=e);const s=n?.startsWith("+");if(n&&s){const s=t(n);s&&s.isPossible()&&n===s.number||(r=e)}return r}))}))}),j.PRIORITY.TRIVIAL);const wC=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};Vi.register("datetime",(e=>wC("DateTime",e))),Vi.register("date",(e=>wC("Date",e))),Vi.register("time",(e=>wC("Time",e)));const MC=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};Vi.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=MC(e.pxResults):Array.isArray(e)?t=MC(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const LC="createConversation",FC="sendMessage",UC="getConversations",jC="getMessages",VC=(e,t,n,r,s,a,o)=>{for(const e of o)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=Yi();return o.push(i),Hi(e,{queryPayload:UC===e?{assistantID:t,contextID:n,pageSize:r,pageIndex:s}:{agentID:t,contextID:n,pageSize:r,pageIndex:s},cancelTokenSource:i},a).then((e=>(o.pop(),e)))},kC=(e,t,n,r,s)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=Yi();return s.push(a),Hi(e,{queryPayload:jC===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},r).then((e=>(s.pop(),e)))},$C=(e,t,n,r,s)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=Yi();return s.push(a),Hi(e,{body:JSON.stringify({contextID:t}),cancelTokenSource:a,queryPayload:e===LC?{assistantID:n}:{agentID:n}},r).then((e=>(s.pop(),e)))},BC=(e,t,n,r,s,a)=>{const o={...r&&{request:r},...a&&a?.length>0&&{attachments:a}};return Hi(e,{body:JSON.stringify(o),queryPayload:e===FC?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n}},s)},GC={createConversation:(e,t,n,r=[])=>$C(LC,e,t,n,r),sendMessage:(e,t,n,r)=>BC(FC,e,t,n,r),createConversationForAgent:(e,t,n,r=[])=>$C("createConversationForAgent",e,t,n,r),sendMessageForAgent:(e,t,n,r,s)=>BC("sendMessageForAgent",e,t,n,r,s),likeAgentMessage:(e,t,n,r)=>Hi("likeAgentMessage",{queryPayload:{agentID:e,conversationID:t,messageID:n}},r),unLikeAgentMessage:(e,t,n,r,s="")=>{const a={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:s})};return Hi("dislikeAgentMessage",a,r)},getConversations:(e,t,n,r,s,a=[])=>VC(UC,e,t,n,r,s,a),getConversationsForAgent:(e,t,n,r,s,a=[])=>VC("getConversationsForAgent",e,t,n,r,s,a),getMessages:(e,t,n,r=[])=>kC(jC,e,t,n,r),getMessagesForAgent:(e,t,n,r=[])=>kC("getMessagesForAgent",e,t,n,r)};const WC=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=vh.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class HC{static behaviorOverrides={};getPersonalizationUtils=yC;constructor(){HC.behaviorOverrides={}}getPCoreVersion=()=>"8.23.0";onPCoreReady=e=>B_.onPCoreReady(e);onPCoreCleanup=e=>B_.onPCoreCleanup(e);getComponentsRegistry=()=>B_.getComponentsRegistry();checkIfSemanticURL=()=>B_.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(tm()){const e=bh.processUrl(Sh(),!0);return!!bh._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>PC;getViewResources=()=>i;configureForBrowserBookmark=e=>B_.configureForBrowserBookmark(e);getStore=()=>Tg();resetStore=()=>jg();getMessageManager=()=>yo;getCoexistenceManager=()=>k_;getStoreValue=(e,t,n)=>Rg(e,t,n);getContainerUtils=()=>c;getAnnotationUtils=()=>Xl;getFieldUtils=()=>ti;getFieldDefaultUtils=()=>bi;getAssetLoader=()=>ec;getAttachmentUtils=()=>Ui;getViewRuleApi=()=>J_;getFeedUtils=()=>sC;getTagUtils=()=>aC;getGenAIAssistantUtils=()=>GC;getStakeholderUtils=()=>iC;getUserApi=()=>tC;getCaseFollowerApi=()=>Q_;getCaseUtils=()=>xl;getStateUtils=()=>id;getRelatedCasesApi=()=>Z_;getDataApi=()=>Gu;getDataApiUtils=()=>_u;getAnalyticsUtils=()=>OC;getLocaleUtils=e=>{const t=e??vh.getLocale()??"en-US";return Jh(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{HC.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{HC.behaviorOverrides[e]=t};getBehaviorOverrides=()=>HC.behaviorOverrides;getBehaviorOverride=e=>HC.behaviorOverrides[e];getAsynchronousUtils=()=>xC;createPConnect=e=>Md(e);getPubSubUtils=()=>_o;registerComponentCreator=e=>{Ld(e)};getConstants=()=>Object.freeze(U);getResolvedConstantValue=e=>j.getProperty(e);getEvents=()=>RC;getRestClient=()=>o;getMashupApi=()=>$_;getEnvironmentInfo=()=>vh;getRuntimeParamsAPI=()=>Ku;getSemanticUrlUtils=()=>uc;getRemoteCaseUtils=()=>$;getNavigationUtils=()=>sc;registerModule=(e,t)=>DC.registerModule(e,t,this);getErrorHandler=()=>bC;getFormUtils=()=>Il;getMessagingServiceManager=()=>bu;getMetadataUtils=()=>l;getDataPageUtils=()=>xu;getDataTypeUtils=()=>Jl;getCascadeManager=()=>Ag;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>vC;getDebugger=()=>Co;getDeferLoadManager=()=>Eu;getExpressionEngine=()=>n;getActionsSequencer=()=>Ju;getRefreshManager=()=>Hu;getInitialiser=()=>K_;getBootstrapUtils=()=>B_;getContextTreeManager=()=>ro;getAccessPrivilege=()=>WC.getInstance();getObjectTransformer=()=>F;getAllStateMachines=(e,t,n)=>t&&n?yl.getAllStateMachines(e,t,n):yl.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>!1;getQualifiedName=(e,t)=>e;getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform")}const qC=new HC;globalThis.PCore=qC})()})();
|
|
1
|
+
(()=>{var e,t,n={953:e=>{class t{constructor(e,t,n,s,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=s,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let r=this.gen_table();this.table=r,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=r[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:s,crc_shift:a,mask:r}=this;if(this.reflect){t=this.reflected_xor_in;for(let s=0;s<e.length;s++){t=(n[255&(t^e[s])]^t>>>8)&r}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>s-8+a^e[o])]<<a^t<<8-a&r<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let s=e[n];this.reflect&&(s=l(s,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;s&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,s=e.length>>n,a=1<<n,r="";for(let o=0;o<s;o++){let s="";for(let r=0;r<a;r++){let a=e[o<<n|r];a="000000000"+a.toString(16),a=a.substr(a.length-t),s+="0x"+a+", "}r+=" "+s+"\n"}return r="[\n"+r.slice(0,-3)+"\n]",r}}const n="undefined"!=typeof Buffer,s="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class r{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(s){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends r{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends r{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(s&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let s=0;s<t;s++)n=n<<1|1&e,e>>=1;return n}const u={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function d(e){}e.exports={CRC:t,crc:function(e,n,s,a,r){let o=new t(e,n,s,a,r);return o.calculate.bind(o)},makeBufferConverter:c,models:u,crc1:d,crc6:d,crc8:d,crc10:d,crc16:d,crc24:d,crc32:d,crc32c:d};for(let t in u){let n=u[t];e.exports[t]=n.calculate.bind(n)}},754:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=754,e.exports=t}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>"js/libphonenumber-web.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",a.l=(n,s,r,o)=>{if(e[n])e[n].push(s);else{var i,c;if(void 0!==r)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+r){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack",t+r),i.src=n),e[n]=[s];var p=(t,s)=>{i.onerror=i.onload=null,clearTimeout(g);var a=e[n];if(delete e[n],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(s))),t)return t(s)},g=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={388:0};a.f.j=(t,n)=>{var s=a.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var r=new Promise(((n,a)=>s=e[t]=[n,a]));n.push(s[2]=r);var o=a.p+a.u(t),i=new Error;a.l(o,(n=>{if(a.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,s[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,r,[o,i,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(s in i)a.o(i,s)&&(a.m[s]=i[s]);if(c)c(a)}for(t&&t(n);l<o.length;l++)r=o[l],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunkconstellation_corejs_library=self.webpackChunkconstellation_corejs_library||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e={};a.r(e),a.d(e,{buildContextName:()=>Hs,buildModalContext:()=>Ks,buildTransientContextName:()=>qs,getContainerIdFromContext:()=>Js,getParentContext:()=>Qs,getParentContextName:()=>Ws,getTargetFromContext:()=>Ys,getTransientContext:()=>zs});var t={};a.r(t),a.d(t,{getResolvedTargetName:()=>jr,getRoutingInfo:()=>kr,getSemanticURLFromRoutingInfo:()=>Br});var n={};a.r(n),a.d(n,{evaluate:()=>yo,handleChange:()=>Io,hasDeclareExpression:()=>mo,updateDeclareExpressions:()=>Eo});var s={};a.r(s),a.d(s,{hasBrowserEnv:()=>Gi,hasStandardBrowserEnv:()=>Hi,hasStandardBrowserWebWorkerEnv:()=>qi,navigator:()=>Wi,origin:()=>zi});var r={};a.r(r),a.d(r,{publishExpressions:()=>dp,publishMetadata:()=>up,publishResponse:()=>pp});var o={};a.r(o),a.d(o,{doesRestApiExist:()=>Ep,getCancelTokenSource:()=>yp,getCaseApi:()=>Sp,getHeaderProcessor:()=>fp,invokeCustomRestApi:()=>Ip,invokeRestApi:()=>mp,isRequestCanceled:()=>Ap,registerInterceptor:()=>Cp});var i={};a.r(i),a.d(i,{fetchViewResources:()=>Ef,refreshViewByName:()=>Cf,updateViewResources:()=>If});var c={};a.r(c),a.d(c,{CONTAINER_NAMES:()=>PE,CONTAINER_TYPES:()=>DE,addRootContainerItem:()=>ly,areContainerItemsPresent:()=>LE,cleanupTransientContainer:()=>Iy,clearContainerItems:()=>yy,clearTransientData:()=>fy,closeContainerItem:()=>cy,getActiveContainerItemContext:()=>zE,getActiveContainerItemIDFromRoutingInfo:()=>Ry,getActiveContainerItemName:()=>GE,getActiveContext:()=>Ty,getChildContainerItemId:()=>vE,getChildContainerItems:()=>YE,getChildContainers:()=>KE,getChildContainersContexts:()=>QE,getContainerAPI:()=>Ay,getContainerAccessOrder:()=>ME,getContainerData:()=>bE,getContainerItemByKey:()=>kE,getContainerItemData:()=>xE,getContainerItemName:()=>VE,getContainerItems:()=>wE,getContainerLimit:()=>ty,getContainerParentContext:()=>Oy,getContainerType:()=>$E,getContextByTargetAndKey:()=>Py,getDataContextName:()=>qE,getFlowContainer:()=>vy,getLeastRecentlyUsedNonDirtyContainerItemID:()=>oy,getParentContainerItem:()=>by,getRootContainerName:()=>Ny,getSuggestionContexts:()=>JE,getTargetFromContainerItemID:()=>iy,getTransientItems:()=>py,hasContainerItems:()=>ey,isContainerDirty:()=>ry,isContainerInitialized:()=>BE,isContainerItemActive:()=>WE,isContainerItemContextBeingUsedInOtherContainers:()=>dy,isContainerItemExists:()=>UE,isContainerItemExistsWithoutKey:()=>FE,isContainerLimitReached:()=>sy,isContainerMultipleMode:()=>ZE,isContainerSingleMode:()=>XE,purgeTransientData:()=>my,removeContainer:()=>Cy,replaceTransientData:()=>hy,resetContainersPayload:()=>ay,setContainerLimit:()=>ny,updateCaseContextEtag:()=>_y,updateParentLastUpdateTime:()=>Dy,updateRelatedContextEtag:()=>Sy,updateTransientData:()=>gy});var l={};a.r(l),a.d(l,{beginDesignerRefresh:()=>_A,endDesignerRefresh:()=>NA,getAIAgent:()=>VA,getAdditionalInfo:()=>GA,getDataPageKeys:()=>kA,getDataPageMetadata:()=>bA,getDesignerViewStoreVersion:()=>SA,getEditableFieldConfigUtil:()=>HA,getEmbeddedPropertyMetadata:()=>AA,getFieldParameters:()=>MA,getFieldsByClassName:()=>wA,getFormat:()=>UA,getGenAICoach:()=>FA,getInsight:()=>xA,getLocaleUtilsForLanguage:()=>EA,getLocalizationServiceFromStore:()=>yA,getLookUpDataPage:()=>BA,getLookUpDataPageInfo:()=>$A,getParagraph:()=>LA,getPersonalizationMetadata:()=>vA,getPropertyMetadata:()=>IA,getResolvedFieldMetadata:()=>WA,getSavableDataPage:()=>jA,isViewExists:()=>OA,mergeStore:()=>mA,resolveNavigation:()=>RA,resolveView:()=>PA,updateNavigationStore:()=>TA,updateStores:()=>DA,updateViewStore:()=>CA});var u={};a.r(u),a.d(u,{dispatch:()=>XA,doesContextExist:()=>gC,getActionType:()=>rC,getContextValue:()=>sC,getDataObject:()=>ZA,getReferenceTokens:()=>KA,getSharedDataObject:()=>eC,getStore:()=>JA,getValue:()=>nC,isMergeable:()=>iC,lookupContextValue:()=>aC,mergeDeep:()=>lC,performReplaceAndRearrange:()=>cC,removeItem:()=>oC,replaceValue:()=>dC,resetStore:()=>pC,setStore:()=>QA,updateValue:()=>uC});var d={};a.r(d),a.d(d,{activateContainerItem:()=>WC,addContainerItem:()=>MC,addMessages:()=>HC,addSharedData:()=>tS,addTransientItem:()=>LC,addWork:()=>bC,clearTransientData:()=>FC,createWork:()=>NC,error:()=>eS,finishAssignment:()=>QC,initContainers:()=>xC,listAction:()=>sS,loadView:()=>OC,mergeData:()=>DC,openAssignment:()=>JC,openWorkByHandle:()=>vC,postProcess:()=>ZC,purgeTransientData:()=>jC,removeAllTransientItems:()=>zC,removeContainerItem:()=>qC,removeSharedData:()=>nS,removeTransientItem:()=>YC,replaceContainerItem:()=>KC,replaceTransientData:()=>VC,resetContainers:()=>wC,resetLoading:()=>$C,setLoading:()=>BC,setSharedProperty:()=>rS,setStateProperty:()=>oS,showCasePreview:()=>aS,showHarness:()=>PC,showHistory:()=>XC,showPage:()=>RC,upMergeAndRemoveContainerItem:()=>GC,updateContainerItem:()=>kC,updateTransientData:()=>UC});var p={};a.r(p),a.d(p,{buildResizeMessage:()=>CR,mashup:()=>SR});const g=function(){this.__data__=[],this.size=0};const h=function(e,t){return e===t||e!=e&&t!=t};const f=function(e,t){for(var n=e.length;n--;)if(h(e[n][0],t))return n;return-1};var m=Array.prototype.splice;const I=function(e){var t=this.__data__,n=f(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),--this.size,!0)};const E=function(e){var t=this.__data__,n=f(t,e);return n<0?void 0:t[n][1]};const y=function(e){return f(this.__data__,e)>-1};const A=function(e,t){var n=this.__data__,s=f(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this};function C(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}C.prototype.clear=g,C.prototype.delete=I,C.prototype.get=E,C.prototype.has=y,C.prototype.set=A;const S=C;const _=function(){this.__data__=new S,this.size=0};const N=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const T=function(e){return this.__data__.get(e)};const D=function(e){return this.__data__.has(e)};const P="object"==typeof global&&global&&global.Object===Object&&global;var O="object"==typeof self&&self&&self.Object===Object&&self;const R=P||O||Function("return this")();const b=R.Symbol;var v=Object.prototype,x=v.hasOwnProperty,w=v.toString,M=b?b.toStringTag:void 0;const L=function(e){var t=x.call(e,M),n=e[M];try{e[M]=void 0;var s=!0}catch(e){}var a=w.call(e);return s&&(t?e[M]=n:delete e[M]),a};var U=Object.prototype.toString;const F=function(e){return U.call(e)};var V=b?b.toStringTag:void 0;const j=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?L(e):F(e)};const k=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const B=function(e){if(!k(e))return!1;var t=j(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const $=R["__core-js_shared__"];var G,W=(G=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";const H=function(e){return!!W&&W in e};var q=Function.prototype.toString;const z=function(e){if(null!=e){try{return q.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Y=/^\[object .+?Constructor\]$/,K=Function.prototype,Q=Object.prototype,J=K.toString,X=Q.hasOwnProperty,Z=RegExp("^"+J.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ee=function(e){return!(!k(e)||H(e))&&(B(e)?Z:Y).test(z(e))};const te=function(e,t){return null==e?void 0:e[t]};const ne=function(e,t){var n=te(e,t);return ee(n)?n:void 0};const se=ne(R,"Map");const ae=ne(Object,"create");const re=function(){this.__data__=ae?ae(null):{},this.size=0};const oe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var ie=Object.prototype.hasOwnProperty;const ce=function(e){var t=this.__data__;if(ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(t,e)?t[e]:void 0};var le=Object.prototype.hasOwnProperty;const ue=function(e){var t=this.__data__;return ae?void 0!==t[e]:le.call(t,e)};const de=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ae&&void 0===t?"__lodash_hash_undefined__":t,this};function pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}pe.prototype.clear=re,pe.prototype.delete=oe,pe.prototype.get=ce,pe.prototype.has=ue,pe.prototype.set=de;const ge=pe;const he=function(){this.size=0,this.__data__={hash:new ge,map:new(se||S),string:new ge}};const fe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const me=function(e,t){var n=e.__data__;return fe(t)?n["string"==typeof t?"string":"hash"]:n.map};const Ie=function(e){var t=me(this,e).delete(e);return this.size-=t?1:0,t};const Ee=function(e){return me(this,e).get(e)};const ye=function(e){return me(this,e).has(e)};const Ae=function(e,t){var n=me(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Ce.prototype.clear=he,Ce.prototype.delete=Ie,Ce.prototype.get=Ee,Ce.prototype.has=ye,Ce.prototype.set=Ae;const Se=Ce;const _e=function(e,t){var n=this.__data__;if(n instanceof S){var s=n.__data__;if(!se||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new Se(s)}return n.set(e,t),this.size=n.size,this};function Ne(e){var t=this.__data__=new S(e);this.size=t.size}Ne.prototype.clear=_,Ne.prototype.delete=N,Ne.prototype.get=T,Ne.prototype.has=D,Ne.prototype.set=_e;const Te=Ne;const De=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Pe=function(e){return this.__data__.has(e)};function Oe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Se;++t<n;)this.add(e[t])}Oe.prototype.add=Oe.prototype.push=De,Oe.prototype.has=Pe;const Re=Oe;const be=function(e,t){for(var n=-1,s=null==e?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1};const ve=function(e,t){return e.has(t)};const xe=function(e,t,n,s,a,r){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var l=r.get(e),u=r.get(t);if(l&&u)return l==t&&u==e;var d=-1,p=!0,g=2&n?new Re:void 0;for(r.set(e,t),r.set(t,e);++d<i;){var h=e[d],f=t[d];if(s)var m=o?s(f,h,d,t,e,r):s(h,f,d,e,t,r);if(void 0!==m){if(m)continue;p=!1;break}if(g){if(!be(t,(function(e,t){if(!ve(g,t)&&(h===e||a(h,e,n,s,r)))return g.push(t)}))){p=!1;break}}else if(h!==f&&!a(h,f,n,s,r)){p=!1;break}}return r.delete(e),r.delete(t),p};const we=R.Uint8Array;const Me=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,s){n[++t]=[s,e]})),n};const Le=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Ue=b?b.prototype:void 0,Fe=Ue?Ue.valueOf:void 0;const Ve=function(e,t,n,s,a,r,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new we(e),new we(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return h(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var i=Me;case"[object Set]":var c=1&s;if(i||(i=Le),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;s|=2,o.set(e,t);var u=xe(i(e),i(t),s,a,r,o);return o.delete(e),u;case"[object Symbol]":if(Fe)return Fe.call(e)==Fe.call(t)}return!1};const je=function(e,t){for(var n=-1,s=t.length,a=e.length;++n<s;)e[a+n]=t[n];return e};const ke=Array.isArray;const Be=function(e,t,n){var s=t(e);return ke(e)?s:je(s,n(e))};const $e=function(e,t){for(var n=-1,s=null==e?0:e.length,a=0,r=[];++n<s;){var o=e[n];t(o,n,e)&&(r[a++]=o)}return r};const Ge=function(){return[]};var We=Object.prototype.propertyIsEnumerable,He=Object.getOwnPropertySymbols;const qe=He?function(e){return null==e?[]:(e=Object(e),$e(He(e),(function(t){return We.call(e,t)})))}:Ge;const ze=function(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s};const Ye=function(e){return null!=e&&"object"==typeof e};const Ke=function(e){return Ye(e)&&"[object Arguments]"==j(e)};var Qe=Object.prototype,Je=Qe.hasOwnProperty,Xe=Qe.propertyIsEnumerable;const Ze=Ke(function(){return arguments}())?Ke:function(e){return Ye(e)&&Je.call(e,"callee")&&!Xe.call(e,"callee")};const et=function(){return!1};var tt="object"==typeof exports&&exports&&!exports.nodeType&&exports,nt=tt&&"object"==typeof module&&module&&!module.nodeType&&module,st=nt&&nt.exports===tt?R.Buffer:void 0;const at=(st?st.isBuffer:void 0)||et;var rt=/^(?:0|[1-9]\d*)$/;const ot=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&rt.test(e))&&e>-1&&e%1==0&&e<t};const it=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;const lt=function(e){return Ye(e)&&it(e.length)&&!!ct[j(e)]};const ut=function(e){return function(t){return e(t)}};var dt="object"==typeof exports&&exports&&!exports.nodeType&&exports,pt=dt&&"object"==typeof module&&module&&!module.nodeType&&module,gt=pt&&pt.exports===dt&&P.process,ht=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}();var ft=ht&&ht.isTypedArray;const mt=ft?ut(ft):lt;var It=Object.prototype.hasOwnProperty;const Et=function(e,t){var n=ke(e),s=!n&&Ze(e),a=!n&&!s&&at(e),r=!n&&!s&&!a&&mt(e),o=n||s||a||r,i=o?ze(e.length,String):[],c=i.length;for(var l in e)!t&&!It.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ot(l,c))||i.push(l);return i};var yt=Object.prototype;const At=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yt)};const Ct=function(e,t){return function(n){return e(t(n))}};const St=Ct(Object.keys,Object);var _t=Object.prototype.hasOwnProperty;const Nt=function(e){if(!At(e))return St(e);var t=[];for(var n in Object(e))_t.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Tt=function(e){return null!=e&&it(e.length)&&!B(e)};const Dt=function(e){return Tt(e)?Et(e):Nt(e)};const Pt=function(e){return Be(e,Dt,qe)};var Ot=Object.prototype.hasOwnProperty;const Rt=function(e,t,n,s,a,r){var o=1&n,i=Pt(e),c=i.length;if(c!=Pt(t).length&&!o)return!1;for(var l=c;l--;){var u=i[l];if(!(o?u in t:Ot.call(t,u)))return!1}var d=r.get(e),p=r.get(t);if(d&&p)return d==t&&p==e;var g=!0;r.set(e,t),r.set(t,e);for(var h=o;++l<c;){var f=e[u=i[l]],m=t[u];if(s)var I=o?s(m,f,u,t,e,r):s(f,m,u,e,t,r);if(!(void 0===I?f===m||a(f,m,n,s,r):I)){g=!1;break}h||(h="constructor"==u)}if(g&&!h){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(g=!1)}return r.delete(e),r.delete(t),g};const bt=ne(R,"DataView");const vt=ne(R,"Promise");const xt=ne(R,"Set");const wt=ne(R,"WeakMap");var Mt="[object Map]",Lt="[object Promise]",Ut="[object Set]",Ft="[object WeakMap]",Vt="[object DataView]",jt=z(bt),kt=z(se),Bt=z(vt),$t=z(xt),Gt=z(wt),Wt=j;(bt&&Wt(new bt(new ArrayBuffer(1)))!=Vt||se&&Wt(new se)!=Mt||vt&&Wt(vt.resolve())!=Lt||xt&&Wt(new xt)!=Ut||wt&&Wt(new wt)!=Ft)&&(Wt=function(e){var t=j(e),n="[object Object]"==t?e.constructor:void 0,s=n?z(n):"";if(s)switch(s){case jt:return Vt;case kt:return Mt;case Bt:return Lt;case $t:return Ut;case Gt:return Ft}return t});const Ht=Wt;var qt="[object Arguments]",zt="[object Array]",Yt="[object Object]",Kt=Object.prototype.hasOwnProperty;const Qt=function(e,t,n,s,a,r){var o=ke(e),i=ke(t),c=o?zt:Ht(e),l=i?zt:Ht(t),u=(c=c==qt?Yt:c)==Yt,d=(l=l==qt?Yt:l)==Yt,p=c==l;if(p&&at(e)){if(!at(t))return!1;o=!0,u=!1}if(p&&!u)return r||(r=new Te),o||mt(e)?xe(e,t,n,s,a,r):Ve(e,t,c,n,s,a,r);if(!(1&n)){var g=u&&Kt.call(e,"__wrapped__"),h=d&&Kt.call(t,"__wrapped__");if(g||h){var f=g?e.value():e,m=h?t.value():t;return r||(r=new Te),a(f,m,n,s,r)}}return!!p&&(r||(r=new Te),Rt(e,t,n,s,a,r))};const Jt=function e(t,n,s,a,r){return t===n||(null==t||null==n||!Ye(t)&&!Ye(n)?t!=t&&n!=n:Qt(t,n,s,a,e,r))};const Xt=function(e,t){return Jt(e,t)};let Zt,en,tn;const nn=e=>{e&&(Zt=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},Zt.BASEURL=e.server,Zt.ACTIONURL=e["action-end-point"],Zt.DATAURL=e["data-end-point"],tn=e.reAuthUrl)},sn=()=>tn,an=()=>Zt.BASEURL,rn=e=>fetch(`${Zt.BASEURL}${Zt.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),on=e=>{en=e},cn=()=>en;var ln=a(953);const un=function(e){return"symbol"==typeof e||Ye(e)&&"[object Symbol]"==j(e)};var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pn=/^\w*$/;const gn=function(e,t){if(ke(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!un(e))||(pn.test(e)||!dn.test(e)||null!=t&&e in Object(t))};function hn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var s=arguments,a=t?t.apply(this,s):s[0],r=n.cache;if(r.has(a))return r.get(a);var o=e.apply(this,s);return n.cache=r.set(a,o)||r,o};return n.cache=new(hn.Cache||Se),n}hn.Cache=Se;const fn=hn;const mn=function(e){var t=fn(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t};var In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,En=/\\(\\)?/g;const yn=mn((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(In,(function(e,n,s,a){t.push(s?a.replace(En,"$1"):n||e)})),t}));const An=function(e,t){for(var n=-1,s=null==e?0:e.length,a=Array(s);++n<s;)a[n]=t(e[n],n,e);return a};var Cn=b?b.prototype:void 0,Sn=Cn?Cn.toString:void 0;const _n=function e(t){if("string"==typeof t)return t;if(ke(t))return An(t,e)+"";if(un(t))return Sn?Sn.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};const Nn=function(e){return null==e?"":_n(e)};const Tn=function(e,t){return ke(e)?e:gn(e,t)?[e]:yn(Nn(e))};const Dn=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const Pn=function(e){if("string"==typeof e||un(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const On=function(e,t){for(var n=0,s=(t=Tn(t,e)).length;null!=e&&n<s;)e=e[Pn(t[n++])];return n&&n==s?e:void 0};const Rn=function(e,t,n){var s=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(a);++s<a;)r[s]=e[s+t];return r};const bn=function(e,t){return t.length<2?e:On(e,Rn(t,0,-1))};var vn=Object.prototype.hasOwnProperty;const xn=function(e,t){var n=-1,s=(t=Tn(t,e)).length;if(!s)return!0;for(;++n<s;){var a=Pn(t[n]);if("__proto__"===a&&!vn.call(e,"__proto__"))return!1;if(("constructor"===a||"prototype"===a)&&n<s-1)return!1}var r=bn(e,t);return null==r||delete r[Pn(Dn(t))]};const wn=function(e,t){return null==e||xn(e,t)};var Mn=Object.prototype.hasOwnProperty;const Ln=function(e,t){return null!=e&&Mn.call(e,t)};const Un=function(e,t,n){for(var s=-1,a=(t=Tn(t,e)).length,r=!1;++s<a;){var o=Pn(t[s]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++s!=a?r:!!(a=null==e?0:e.length)&&it(a)&&ot(o,a)&&(ke(e)||Ze(e))};const Fn=function(e,t){return null!=e&&Un(e,t,Ln)};const Vn=function(e,t,n){var s=null==e?void 0:On(e,t);return void 0===s?n:s};const jn=function(){try{var e=ne(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const kn=function(e,t,n){"__proto__"==t&&jn?jn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Bn=Object.prototype.hasOwnProperty;const $n=function(e,t,n){var s=e[t];Bn.call(e,t)&&h(s,n)&&(void 0!==n||t in e)||kn(e,t,n)};const Gn=function(e,t,n,s){if(!k(e))return e;for(var a=-1,r=(t=Tn(t,e)).length,o=r-1,i=e;null!=i&&++a<r;){var c=Pn(t[a]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=o){var u=i[c];void 0===(l=s?s(u,c,i):void 0)&&(l=k(u)?u:ot(t[a+1])?[]:{})}$n(i,c,l),i=i[c]}return e};const Wn=function(e,t,n){return null==e?e:Gn(e,t,n)};const Hn=function(e,t,n){(void 0!==n&&!h(e[t],n)||void 0===n&&!(t in e))&&kn(e,t,n)};const qn=function(e){return function(t,n,s){for(var a=-1,r=Object(t),o=s(t),i=o.length;i--;){var c=o[e?i:++a];if(!1===n(r[c],c,r))break}return t}}();var zn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Yn=zn&&"object"==typeof module&&module&&!module.nodeType&&module,Kn=Yn&&Yn.exports===zn?R.Buffer:void 0,Qn=Kn?Kn.allocUnsafe:void 0;const Jn=function(e,t){if(t)return e.slice();var n=e.length,s=Qn?Qn(n):new e.constructor(n);return e.copy(s),s};const Xn=function(e){var t=new e.constructor(e.byteLength);return new we(t).set(new we(e)),t};const Zn=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const es=function(e,t){var n=-1,s=e.length;for(t||(t=Array(s));++n<s;)t[n]=e[n];return t};var ts=Object.create;const ns=function(){function e(){}return function(t){if(!k(t))return{};if(ts)return ts(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const ss=Ct(Object.getPrototypeOf,Object);const as=function(e){return"function"!=typeof e.constructor||At(e)?{}:ns(ss(e))};const rs=function(e){return Ye(e)&&Tt(e)};var os=Function.prototype,is=Object.prototype,cs=os.toString,ls=is.hasOwnProperty,us=cs.call(Object);const ds=function(e){if(!Ye(e)||"[object Object]"!=j(e))return!1;var t=ss(e);if(null===t)return!0;var n=ls.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&cs.call(n)==us};const ps=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};const gs=function(e,t,n,s){var a=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var i=t[r],c=s?s(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),a?kn(n,i,c):$n(n,i,c)}return n};const hs=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var fs=Object.prototype.hasOwnProperty;const ms=function(e){if(!k(e))return hs(e);var t=At(e),n=[];for(var s in e)("constructor"!=s||!t&&fs.call(e,s))&&n.push(s);return n};const Is=function(e){return Tt(e)?Et(e,!0):ms(e)};const Es=function(e){return gs(e,Is(e))};const ys=function(e,t,n,s,a,r,o){var i=ps(e,n),c=ps(t,n),l=o.get(c);if(l)Hn(e,n,l);else{var u=r?r(i,c,n+"",e,t,o):void 0,d=void 0===u;if(d){var p=ke(c),g=!p&&at(c),h=!p&&!g&&mt(c);u=c,p||g||h?ke(i)?u=i:rs(i)?u=es(i):g?(d=!1,u=Jn(c,!0)):h?(d=!1,u=Zn(c,!0)):u=[]:ds(c)||Ze(c)?(u=i,Ze(i)?u=Es(i):k(i)&&!B(i)||(u=as(c))):d=!1}d&&(o.set(c,u),a(u,c,s,r,o),o.delete(c)),Hn(e,n,u)}};const As=function e(t,n,s,a,r){t!==n&&qn(n,(function(o,i){if(r||(r=new Te),k(o))ys(t,n,i,s,e,a,r);else{var c=a?a(ps(t,i),o,i+"",t,n,r):void 0;void 0===c&&(c=o),Hn(t,i,c)}}),Is)};const Cs=function(e){return e};const Ss=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var _s=Math.max;const Ns=function(e,t,n){return t=_s(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,r=_s(s.length-t,0),o=Array(r);++a<r;)o[a]=s[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=s[a];return i[t]=n(o),Ss(e,this,i)}};const Ts=function(e){return function(){return e}};const Ds=jn?function(e,t){return jn(e,"toString",{configurable:!0,enumerable:!1,value:Ts(t),writable:!0})}:Cs;var Ps=Date.now;const Os=function(e){var t=0,n=0;return function(){var s=Ps(),a=16-(s-n);if(n=s,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Ds);const Rs=function(e,t){return Os(Ns(e,t,Cs),e+"")};const bs=function(e,t,n){if(!k(n))return!1;var s=typeof t;return!!("number"==s?Tt(n)&&ot(t,n.length):"string"==s&&t in n)&&h(n[t],e)};const vs=function(e){return Rs((function(t,n){var s=-1,a=n.length,r=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(a--,r):void 0,o&&bs(n[0],n[1],o)&&(r=a<3?void 0:r,a=1),t=Object(t);++s<a;){var i=n[s];i&&e(t,i,s,r)}return t}))}((function(e,t,n,s){As(e,t,n,s)}));var xs=Object.prototype.hasOwnProperty;const ws=function(e){if(null==e)return!0;if(Tt(e)&&(ke(e)||"string"==typeof e||"function"==typeof e.splice||at(e)||mt(e)||Ze(e)))return!e.length;var t=Ht(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(At(e))return!Nt(e).length;for(var n in e)if(xs.call(e,n))return!1;return!0};class Ms{static setNamespaceSupport=(e=!1)=>{Ms.namespaceEnabled=e};static isNamespaceEnabled=()=>Ms.namespaceEnabled??!1;static getNamespaceList=()=>{const e=globalThis.PCore,t=e?.getEnvironmentInfo?.();if(t&&"function"==typeof t.getFeatureMap)return t.getFeatureMap()?.namespaceList};static getQualifiedName=(e,t)=>{if(!Ms.isNamespaceEnabled())return e;const n=Ms.getNamespaceList();if(Array.isArray(n)){if(n.some((t=>{const n=`${t}__`;return e.startsWith(n)})))return e}return`${t}__${e}`};static getDefaultQualifiedName=e=>Ms.getQualifiedName(e,"PegaPlatform");static namespacePrefixedRuleName(e,t){return t?Ms.getQualifiedName(e,t):Ms.getDefaultQualifiedName(e)}static getQualifiedNameForComplexRuleReferences(e,t){const{namespace:n,marker:s}=t??{},a=`${s??"caseInfo.content"}.`,r=e.lastIndexOf(a);if(-1!==r){return e.slice(0,r+a.length)+e.slice(r+a.length).split(".").map((e=>Ms.namespacePrefixedRuleName(e,n))).join(".")}if(e.includes(".")){const t=e.startsWith("."),s=(t?e.slice(1):e).split(".").filter(Boolean).map((e=>Ms.namespacePrefixedRuleName(e,n))).join(".");return t?`.${s}`:s}return Ms.namespacePrefixedRuleName(e,n)}}const Ls=Ms;const Us=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},Fs={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:Ls.getDefaultQualifiedName("pyCaseTab"),DATA_OBJECT_CREATE_VIEW:Ls.getDefaultQualifiedName("Create"),DATA_OBJECT_EDIT_VIEW:Ls.getDefaultQualifiedName("pyEdit"),PY_DATA_PREVIEW:Ls.getDefaultQualifiedName("pyDataPreview"),PY_DETAILS:Ls.getDefaultQualifiedName("pyDetails"),OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:Ls.getDefaultQualifiedName("SubscriptView")},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:Ls.getDefaultQualifiedName("D_pyGetUserWorkListByUserId"),D__WORK_BASKET:Ls.getDefaultQualifiedName("D_WorkBasket"),D__PY_MY_WORK_LIST:Ls.getDefaultQualifiedName("D_pyMyWorkList")}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:Ls.getDefaultQualifiedName("pzCreateDetails"),PREVIEW_VIEW_NAME:Ls.getDefaultQualifiedName("pyCasePreview"),CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content",DATA_INFO_CONTEXT_KEY:"dataInfo.contextKey"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_COLLABORATORS:"caseInfo.collaborators",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_ENCRYPTED_CONTENT:"caseInfo.encryptedContent",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_INFO_CLASSNAME:"caseInfo.className",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pzInsKey"),CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyViewName"),ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyApprovalResult"),DUPLICATECASEFLAG:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseActions"),DUPLICATECASEID:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateID"),DUPLICATECASEINSKEY:Ls.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseReference.pzInsKey"),HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",IS_ASSIGNMENT:"caseInfo.isAssignment",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:Ls.getDefaultQualifiedName("D_pyAdditionalCaseActions")}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:Ls.getDefaultQualifiedName("pyTransferAssignment")},CONTENT:"content",MODAL:"modal",ACTIONAREA:"actionarea",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:Ls.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime"),SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:Ls.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime"),CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",INVALID_INPUTS:"Invalid inputs",VALIDATION_FAIL:"Validation fail",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",UI_DESIGNER:"uiDesigner",UI_DESIGNER_TOOLBAR_EXPANDED:"uiDesignerToolbarExpanded",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted",THEME_CHANGE:"themeChange",THEME_MODE_CHANGE:"themeModeChange",NAV_ORIENTATION_CHANGE:"navOrientationChange",CASE_VIEW_TEMPLATE_CHANGE:"caseViewTemplateChange"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_VIEW_OPENED_AFTER_CREATE:"caseViewOpenedAfterCreate",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete",CASE_LOAD:"caseLoad",CASE_UNLOAD:"caseUnload",CASE_EDIT_OPEN:"caseEditOpen",CASE_EDIT_CLOSE:"caseEditClose"},ASSIGNMENT_EVENTS:{ASSIGNMENT_LOAD:"assignmentLoad",ASSIGNMENT_UNLOAD:"assignmentUnload"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DISPLAY_CASE_SUBMITTED_TOASTER:"displayCaseSubmittedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_COMPLETE:"onRefreshComplete",EVENT_LOCALE_CHANGED:"localeChanged"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView",PORTAL_AGENT_SPLIT_VIEW_PATH:"presentation.templates.GenAICoach",PORTAL_AGENT_WIDTH_PATH:"presentation.templates.GenAICoach.agentPanelWidth"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:Ls.getDefaultQualifiedName("pyEmbedAssignment"),PY_DETAILS:Ls.getDefaultQualifiedName("pyDetails")},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"},FEED:{MESSAGE_VIEW_REFERENCE:Ls.getDefaultQualifiedName("messageViewReference"),PARENT_MESSAGE_ID:Ls.getDefaultQualifiedName("parentMessageID"),PX_RESULTS:Ls.getDefaultQualifiedName("pxResults"),NAME:Ls.getDefaultQualifiedName("name"),POSTED_BY_USER:Ls.getDefaultQualifiedName("postedByUser"),UPDATED_TIME:Ls.getDefaultQualifiedName("updatedTime"),POST_MESSAGE:Ls.getDefaultQualifiedName("PostMessage"),PZ_INS_KEY:Ls.getDefaultQualifiedName("pzInsKey"),PZ_PRIVATE_POST_DETAILS:Ls.getDefaultQualifiedName("pzPrivatePostDetails"),PY_SELECTED:Ls.getDefaultQualifiedName("pySelected"),PY_LABEL:Ls.getDefaultQualifiedName("pyLabel"),PY_RECIPIENTS:Ls.getDefaultQualifiedName("pyRecipients"),MENTIONS:Ls.getDefaultQualifiedName("mentions"),PY_IS_DELETE_ENABLED:Ls.getDefaultQualifiedName("pyIsDeleteEnabled"),TAGS:Ls.getDefaultQualifiedName("tags"),PZ_POST_DETAILS:Ls.getDefaultQualifiedName("pzPostDetails"),PY_FEED_SOURCE_REFERENCE:Ls.getDefaultQualifiedName("pyFeedSourceReference"),IS_EDITED:Ls.getDefaultQualifiedName("isEdited"),PY_LIKES:Ls.getDefaultQualifiedName("pyLikes"),PY_POST_TYPE:Ls.getDefaultQualifiedName("pyPostType"),POSTED_TIME:Ls.getDefaultQualifiedName("postedTime"),PY_MESSAGE_VIEW_REFERENCE:Ls.getDefaultQualifiedName("pyMessageViewReference"),ID:Ls.getDefaultQualifiedName("ID"),PY_COMMENT_CONTEXT:Ls.getDefaultQualifiedName("pyCommentContext"),PX_LIKE_COUNT:Ls.getDefaultQualifiedName("pxLikeCount"),MESSAGE:Ls.getDefaultQualifiedName("message")},CASE_VIEW_MODE:{PERFORM:"perform",REVIEW:"review",CONFIRM:"confirm"}},Vs={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",RULE_VIEW:"RuleView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",RULE_PREVIEW:"RulePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",OBJECTACTIONCONTAINER:"ObjectActionContainer",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",DOUBLE_UNDERSCORE_STRING:"__",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_DYNAMIC_WHENS:"summary_of_dynamic_whens__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",CUSTOM_ERROR:"custom error",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_ERROR:"onRefreshError",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",PARAGRAPH_ANNOTATION:"@PARAGRAPH",FORMAT_ANNOTATION:"@FORMAT",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ASSOCIATION_ANNOTATION:"@CA",FILTERED_LIST_ANNOTATION:"@FILTERED_LIST",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:Ls.getDefaultQualifiedName("pyDetails"),PY_CONFIRM:Ls.getDefaultQualifiedName("pyConfirm"),LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",APPLICATION_ID:"APPLICATION_ID",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3,PING:6500},...Fs,getProperty:e=>Us.map(e),getDefaultQualifiedName:e=>Ls.getDefaultQualifiedName(e)},js=Ls.getDefaultQualifiedName("pyRemoteCaseDetails");class ks{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>yC.getProperty(".RemoteSystemID",Vs.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const s=this.getRemoteHeaderByContext(n);s?e.RemoteSystemID=s:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===ks.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=Vy.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteAppPlatformVersion=e=>{if(!e)return;const t=Vy.environmentInfoObject?.pyRemoteAppPlatformVersion;if(t){return JSON.parse(t)[e]}};static isRemoteCaseVersionDifferent=e=>{if(!this.isRemoteCase(e))return!1;const t=this.getRemoteHeader(e);if(!t)return!1;const n=this.getRemoteAppPlatformVersion(t);return Boolean(n)};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{if(e)for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const Bs=ks,$s={},Gs=new Map,Ws=e=>{let t=Vs.EMPTY_STRING;return t=e&&e.includes(Vs.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},Hs=(e,t,n=!1)=>{let s=Vs.EMPTY_STRING;if(t&&e){let a=`${t}${Vs.FORWARD_SLASH_STRING}${e}`;const r=bE(a);if(r||t!==Vs.APP.APP&&t!==Vs.APP.ROOT)if(r){if(n&&$s[a])return s=`${a}${Vs.UNDERSCORE_STRING}${$s[a]}`,s;$s[a]?$s[a]+=1:$s[a]=1,s=`${a}${Vs.UNDERSCORE_STRING}${$s[a]}`}else s=Hs(e,Ws(t));else a=`${t}${Vs.FORWARD_SLASH_STRING}${Vs.PRIMARY}`,$s[a]?$s[a]+=1:$s[a]=1,s=`${a}${Vs.UNDERSCORE_STRING}${$s[a]}`}return s},qs=(e,t)=>{if(e&&t){const n=(Gs[t]?.[e]??0)+1;return Gs[t]||(Gs[t]={}),Gs[t][e]=n,`${t}${Vs.FORWARD_SLASH_STRING}${e}_${n}`}return""},zs=(e,t)=>{if(e&&t){const n=Gs[t]?.[e];return n?`${t}${Vs.FORWARD_SLASH_STRING}${e}_${n}`:qs(e,t)}return""},Ys=e=>{let t=Vs.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},Ks=(e,t)=>{if(null===e)return t;const[,n]=t.split(Vs.FORWARD_SLASH_STRING);return e+Vs.FORWARD_SLASH_STRING+n},Qs=e=>{const t=e.indexOf(Vs.FORWARD_SLASH_STRING),n=e.lastIndexOf(Vs.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},Js=e=>{const t=e.split(Vs.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+Vs.FORWARD_SLASH_STRING+t[2]},Xs="SET_PROPERTY",Zs="REPLACE_PROPERTY",ea="FIELD_CHANGE",ta="LOAD_VIEW",na="SHOW_PAGE",sa="SHOW_DATA",aa="SHOW_INSIGHT",ra="SHOW_DASHBOARD",oa="SET_LOADING",ia="RESET_LOADING",ca="APP_OFFLINE",la="APP_ONLINE",ua="SET_SHARED_PROPERTY",da="CREATE_WORK",pa="OPEN_WORK_BY_HANDLE",ga="UPDATE_DOCUMENT",ha="FINISH_ASSIGNMENT",fa="SAVE_AND_CLOSE",ma="CANCEL_ASSIGNMENT",Ia="OPEN_ASSIGNMENT",Ea="NAVIGATE_TO_STEP",ya="OPEN_LOCAL_ACTION",Aa="OPEN_PROCESS_ACTION",Ca="MERGE_DATA",Sa="REMOVE_ITEM",_a="GET_DATAOBJECT_ACTIONS",Na="SHOW_HISTORY",Ta="ERROR",Da="INIT_CONTAINERS",Pa="RESET_CONTAINERS",Oa="ADD_CONTAINER_ITEM",Ra="REMOVE_CONTAINER_ITEM",ba="ADD_TRANSIENT_ITEM",va="UPDATE_TRANSIENT_DATA",xa="REMOVE_TRANSIENT_ITEM",wa="REMOVE_ALL_TRANSIENT_ITEMS",Ma="CLEAR_TRANSIENT_DATA",La="PURGE_TRANSIENT_DATA",Ua="REPLACE_TRANSIENT_DATA",Fa="ACTIVATE_CONTAINER_ITEM",Va="UPDATE_CONTAINER_ITEM",ja="UPMERGE_AND_REMOVE_CONTAINER_ITEM",ka="REPLACE_CONTAINER_ITEM",Ba="ACTIVATE_MODAL_CONTAINER_ITEM",$a="REMOVE_CONTAINER",Ga="ADD_SUGGESTION_CONTEXT",Wa="showView",Ha="showData",qa="showInsight",za="showDashboard",Ya="openWorkByHandle",Ka="openAssignment",Qa="createNewWork",Ja="finishAssignment",Xa="SHOW_CANCEL_ALERT",Za="deleteCaseInCreateStage",er="openLocalAction",tr="openProcessAction",nr="caseWideActions",sr="executeCaseWideActions",ar="openBulkAction",rr="performBulkAction",or="launchAssignment",ir="ADD_MESSAGES",cr="CLEAR_MESSAGES",lr="RESET_STORE",ur="FETCH_DATAPAGE",dr="ADD_SHARED_DATA",pr="REMOVE_SHARED_DATA",gr="LIST_ACTION",hr="DELETE_CASE_SUMMARY",fr="ALTER_BLOCKING_ACTION_COUNT",mr="SET_APP_LOCALE",Ir="CREATE_DATA_OBJECT",Er="DELETE_DATA_OBJECT",yr="VIEW_DATA_OBJECT",Ar="UPDATE_DATA_OBJECT",Cr="OPEN_DATA_OBJECT_ACTION",Sr="SUBMIT_DATA_OBJECT_ACTION",_r="OPEN_EMBEDDED_DATA_MODAL",Nr="GET_EMBEDDED_DATA_VIEW",Tr="SUBMIT_EMBEDDED_DATA_MODAL",Dr="SUBMIT_SUBSCRIPT",Pr="FILL_FORM_WITH_AI",Or="createWork",Rr="openAssignment",br="openCase",vr="EXECUTE_OBJECT_WIDE_ACTION",xr="CREATE_EXTERNAL_CASE",wr="DELETE_WORK",Mr="createObject",Lr="getObject",Ur="getObjectWideAction",Fr="createExternalObject",Vr="retrieveActionViewForNewCase",jr=(e,t)=>{if(!e||!t)return null;let n,s=Vs.EMPTY_STRING;return t&&(s=`${t}${Vs.FORWARD_SLASH_STRING}${e}`,n=bE(s),n||t.includes("/")?n||(s=jr(e,Ws(t))):s=`${t}${Vs.FORWARD_SLASH_STRING}${e}`),s},kr=(e,t)=>{const n=jr(e,t);return n&&bE(n)?bE(n):{}},Br=(e,t)=>Uy.getSemanticURL(Wa,{page:e},t);class $r{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Jr[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser?._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes?.[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],s=Qr[e.tokenType];s&&s.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=Jr[this._state];this._subParser=new $r(this._grammar,e,t)}_endSubExpression(){Jr[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,$r._setParent(e,this._position)):this._tree=e,this._position=e}}const Gr=$r,Wr="identifier",Hr={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e&&t)},qr={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e||t)},zr=(e,t,n)=>{const s=""===e,a=""===t||null==t;if(s&&a)return n;if("boolean"==typeof t){const a=!!(!s&&"false"!==e&&"0"!==e)&&Boolean(e);return n?a===t:a!==t}return s!==a?!n:n?e===t:e!==t},Yr={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&zr(e,t,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>"object"==typeof e||"object"==typeof t||zr(e,t,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{const t="object"==typeof e?e.value:e;return"true"===t||"false"===t?"true"!==t:!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Hr,AND:Hr,and:Hr,"||":qr,OR:qr,or:qr,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).includes(String(t))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).includes(String(t))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).startsWith(String(t))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).startsWith(String(t))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).endsWith(String(t))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).endsWith(String(t))},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(t).split(",").includes(String(e))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(t).split(",").includes(String(e))}},Kr={BinaryExpression:function(e){const t=[],n=e.right,s=e.operator??"",a=e.left;if(!a)return!1;let r="boolean"==typeof a.value?"True-False":"";t[0]=this.evaluateAST(a),r||a.operationType!==Wr||(r=((e,t,n)=>{if("string"!=typeof e.value)return"";const s=e.value.substring(1),a=t?.getFieldMetadata(s)?.type??"";if(a)return a;const{pageReference:r,context:o}=n??{};if(!r||!o)return"";const i=yC.resolveClassID(e.value,r,o),c=IA(s,i);return c&&!Array.isArray(c)?c.type??"":""})(a,this._context,this._contextTreeNodeContext)),t[1]=n?this.evaluateAST(n,r):"";const o=this._grammar[s];return!!o?.evaluate&&o.evaluate(t[0],t[1])},identifier:function(e){const t="string"==typeof e.value?e.value:"";if(this._localDataObject)return fC.getIn(this._localDataObject,t?t.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return yC.getLitePropertyValue(this._contextTreeNodeContext,t)??"";if(!this._context)return"";const n=this._context.getFieldMetadata(t)?.type??"",s=this._context.getValue(t)??"";if("Decimal"===n&&"string"==typeof s){const e=parseFloat(s);return Number.isNaN(e)?"":e}return s},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value??"":"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;if(!t||!n)return!1;const s=this._grammar[t];return!!s?.evaluate&&s.evaluate(n)}},Qr={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){const t=String(e.value),{precedence:n}=this._grammar[t];let s=this._position._parent;const a=s?s.operator:null,r=a?this._grammar[a]:null,o=r?r.precedence:null;if(o&&n)for(;s?.operator&&o>=n;)this._position=s,s=s._parent;const i={operationType:"BinaryExpression",operator:t,left:this._position};Gr._setParent(this._position,i),s?(this._position=s,this.setPositionInAST(i)):(this._tree=i,this._position=i)},identifier:function(e){const t={operationType:Wr,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){var t;"object"==typeof(t=e)&&null!==t&&"operationType"in t&&this.setPositionInAST(e)}},Jr={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:Wr},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Qr.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Xr=["binaryOperator","unaryOperator","openParenthesis"],Zr=/^\s*$/,eo=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,to=/\\\\/,no=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],so=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],ao=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class ro{constructor(e){this._grammar=e}static _isNegative(e){return Xr.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Zr)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(eo)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(to,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>ro._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[no.join("|"),e.join("|"),so.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=ro._unquote(e):e.match(ao)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(eo)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let s=0;s<e.length;s+=1)ro._isWhitespace(e[s])?t.length&&(t[t.length-1].element+=e[s]):"-"===e[s]&&ro._isNegative(t)?n=!0:(n&&(e[s]=`-${e[s]}`,n=!1),t.push(this._createToken(e[s])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const oo=ro;const io=class{constructor(e,t){this._grammar={...Yr},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new oo(this._grammar).tokenize(this._expression),t=new Gr(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return go(e.operationType,Kr)&&Kr[e.operationType].call(this,e,t)}},co=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new io(n,t)},lo=e=>!e||e.buildAST(),uo=(e,t,n)=>!e||e.evaluate(t,n),po=(e,t,n)=>{const s=co(e,t),a=lo(s);return uo(a,n)},go=(e,t)=>e in t;const ho=class{static handleExpression(e,t,n,s){const a=this.getContext(e,s);rn({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:a}}).then((e=>e.json())).then((e=>{this.updateState(e,s)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:yC.getPropertyValue(`${n}.${Ls.getDefaultQualifiedName("pxObjClass")}`,null,t)||yC.getPropertyValue(`${n}.${Ls.getDefaultQualifiedName("pyClassName")}`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>XA({type:Xs,payload:{context:t,reference:n,value:e[n]}})))}},fo={},mo=(e,t)=>fo[t]&&Object.hasOwn(fo[t],e),Io=e=>{const{context:t}=e;mo(e.reference,t)&&ho.handleExpression(e.reference,e.value,fo[t][e.reference],t)},Eo=(e={})=>{fC.copy(e,fo)},yo=(e,t,n)=>po(e,t,n?.pConnect.getPConnect());const Ao=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const s=this.getContextObjectByName(e);if(s)if(Array.isArray(n))s[t]=n;else{const e=s[t];s[t]=[...new Set([...e,n])]}}else{const s={};Array.isArray(n)?s[t]=n:s[t]=[n],this.addContextName(e,s)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),s=new Set(n);return n.forEach((e=>{s.add(e)})),[...s]}};const Co=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){fC.copy(e,this.componentMap)}mergeOverrideMap(e={}){fC.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const So=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},_o=/^@\w+\s+(.+)$/s;const No=class{static handleAnnotation(e,t,n){const s=e.indexOf(" "),a=-1===s?e:e.substring(0,s),r=So.getHandler(a);if(!r)return e;const o=e.match(_o);return r((o?o[1]:"").trim(),t,n)}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),s=e.substring(t+1);return So.getHandler(n)?s:e}static handleComponentMapping(e,t,n){const s=Co.getComponent(t.type);if(!s?.mapping)return;const a=s.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:s}=t;if(!s)return;const r=n.getValue(s);if("function"==typeof t.advanced)t.advanced(e,r);else{const n=t.inputs_map;e[t.output_property]=[];const s=e[t.output_property];r.forEach((e=>{const t={};Object.keys(n).forEach((s=>{let a=n[s];a?.startsWith(".")?(a=a.substring(1),t[s]=e[a]):t[s]=a})),s.push(t)}))}}}static getPropertyName(e=""){if(e&&fC.isString(e)){const t=e.startsWith(Vs.PROPERTY_ANNOTATION)||e.startsWith(Vs.ATTACHMENT_ANNOTATION)||e.startsWith(Vs.ASSOCIATED_PROPERTY_ANNOTATION)||e.startsWith(Vs.CLASS_ASSOCIATION_ANNOTATION)||e.startsWith(Vs.FILTERED_LIST_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(fC.isString(e)&&!!e?.startsWith(Vs.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return fC.isString(e)&&!!e?.startsWith(Vs.PROPERTY_ANNOTATION)}};function To(e,t){return function(){return e.apply(t,arguments)}}const{toString:Do}=Object.prototype,{getPrototypeOf:Po}=Object,{iterator:Oo,toStringTag:Ro}=Symbol,bo=(vo=Object.create(null),e=>{const t=Do.call(e);return vo[t]||(vo[t]=t.slice(8,-1).toLowerCase())});var vo;const xo=e=>(e=e.toLowerCase(),t=>bo(t)===e),wo=e=>t=>typeof t===e,{isArray:Mo}=Array,Lo=wo("undefined");function Uo(e){return null!==e&&!Lo(e)&&null!==e.constructor&&!Lo(e.constructor)&&jo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fo=xo("ArrayBuffer");const Vo=wo("string"),jo=wo("function"),ko=wo("number"),Bo=e=>null!==e&&"object"==typeof e,$o=e=>{if("object"!==bo(e))return!1;const t=Po(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Ro in e||Oo in e)},Go=xo("Date"),Wo=xo("File"),Ho=xo("Blob"),qo=xo("FileList");const zo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Yo=void 0!==zo.FormData?zo.FormData:void 0,Ko=xo("URLSearchParams"),[Qo,Jo,Xo,Zo]=["ReadableStream","Request","Response","Headers"].map(xo);function ei(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let s,a;if("object"!=typeof e&&(e=[e]),Mo(e))for(s=0,a=e.length;s<a;s++)t.call(null,e[s],s,e);else{if(Uo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),r=a.length;let o;for(s=0;s<r;s++)o=a[s],t.call(null,e[o],o,e)}}function ti(e,t){if(Uo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s,a=n.length;for(;a-- >0;)if(s=n[a],t===s.toLowerCase())return s;return null}const ni="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,si=e=>!Lo(e)&&e!==ni;const ai=(ri="undefined"!=typeof Uint8Array&&Po(Uint8Array),e=>ri&&e instanceof ri);var ri;const oi=xo("HTMLFormElement"),ii=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ci=xo("RegExp"),li=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};ei(n,((n,a)=>{let r;!1!==(r=t(n,a,e))&&(s[a]=r||n)})),Object.defineProperties(e,s)};const ui=xo("AsyncFunction"),di=(pi="function"==typeof setImmediate,gi=jo(ni.postMessage),pi?setImmediate:gi?(hi=`axios@${Math.random()}`,fi=[],ni.addEventListener("message",(({source:e,data:t})=>{e===ni&&t===hi&&fi.length&&fi.shift()()}),!1),e=>{fi.push(e),ni.postMessage(hi,"*")}):e=>setTimeout(e));var pi,gi,hi,fi;const mi="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ni):"undefined"!=typeof process&&process.nextTick||di,Ii={isArray:Mo,isArrayBuffer:Fo,isBuffer:Uo,isFormData:e=>{if(!e)return!1;if(Yo&&e instanceof Yo)return!0;const t=Po(e);if(!t||t===Object.prototype)return!1;if(!jo(e.append))return!1;const n=bo(e);return"formdata"===n||"object"===n&&jo(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Fo(e.buffer),t},isString:Vo,isNumber:ko,isBoolean:e=>!0===e||!1===e,isObject:Bo,isPlainObject:$o,isEmptyObject:e=>{if(!Bo(e)||Uo(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Qo,isRequest:Jo,isResponse:Xo,isHeaders:Zo,isUndefined:Lo,isDate:Go,isFile:Wo,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Ho,isRegExp:ci,isFunction:jo,isStream:e=>Bo(e)&&jo(e.pipe),isURLSearchParams:Ko,isTypedArray:ai,isFileList:qo,forEach:ei,merge:function e(...t){const{caseless:n,skipUndefined:s}=si(this)&&this||{},a={},r=(t,r)=>{if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=n&&ti(a,r)||r,i=ii(a,o)?a[o]:void 0;$o(i)&&$o(t)?a[o]=e(i,t):$o(t)?a[o]=e({},t):Mo(t)?a[o]=t.slice():s&&Lo(t)||(a[o]=t)};for(let e=0,n=t.length;e<n;e++)t[e]&&ei(t[e],r);return a},extend:(e,t,n,{allOwnKeys:s}={})=>(ei(t,((t,s)=>{n&&jo(t)?Object.defineProperty(e,s,{__proto__:null,value:To(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,s)=>{let a,r,o;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),r=a.length;r-- >0;)o=a[r],s&&!s(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&Po(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:bo,kindOfTest:xo,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return-1!==s&&s===n},toArray:e=>{if(!e)return null;if(Mo(e))return e;let t=e.length;if(!ko(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Oo]).call(e);let s;for(;(s=n.next())&&!s.done;){const n=s.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const s=[];for(;null!==(n=e.exec(t));)s.push(n);return s},isHTMLForm:oi,hasOwnProperty:ii,hasOwnProp:ii,reduceDescriptors:li,freezeMethods:e=>{li(e,((t,n)=>{if(jo(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];jo(s)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},s=e=>{e.forEach((e=>{n[e]=!0}))};return Mo(e)?s(e):s(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ti,global:ni,isContextDefined:si,isSpecCompliantForm:function(e){return!!(e&&jo(e.append)&&"FormData"===e[Ro]&&e[Oo])},toJSONObject:e=>{const t=new Array(10),n=(e,s)=>{if(Bo(e)){if(t.indexOf(e)>=0)return;if(Uo(e))return e;if(!("toJSON"in e)){t[s]=e;const a=Mo(e)?[]:{};return ei(e,((e,t)=>{const r=n(e,s+1);!Lo(r)&&(a[t]=r)})),t[s]=void 0,a}}return e};return n(e,0)},isAsyncFn:ui,isThenable:e=>e&&(Bo(e)||jo(e))&&jo(e.then)&&jo(e.catch),setImmediate:di,asap:mi,isIterable:e=>null!=e&&jo(e[Oo])},Ei=Ii.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yi=Symbol("internals"),Ai=/[^\x09\x20-\x7E\x80-\xFF]/g;function Ci(e){return e&&String(e).trim().toLowerCase()}function Si(e){return!1===e||null==e?e:Ii.isArray(e)?e.map(Si):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(Ai,""))}function _i(e,t,n,s,a){return Ii.isFunction(s)?s.call(this,t,n):(a&&(t=n),Ii.isString(t)?Ii.isString(s)?-1!==t.indexOf(s):Ii.isRegExp(s)?s.test(t):void 0:void 0)}class Ni{constructor(e){e&&this.set(e)}set(e,t,n){const s=this;function a(e,t,n){const a=Ci(t);if(!a)throw new Error("header name must be a non-empty string");const r=Ii.findKey(s,a);(!r||void 0===s[r]||!0===n||void 0===n&&!1!==s[r])&&(s[r||t]=Si(e))}const r=(e,t)=>Ii.forEach(e,((e,n)=>a(e,n,t)));if(Ii.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(Ii.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))r((e=>{const t={};let n,s,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),s=e.substring(a+1).trim(),!n||t[n]&&Ei[n]||("set-cookie"===n?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)})),t})(e),t);else if(Ii.isObject(e)&&Ii.isIterable(e)){let n,s,a={};for(const t of e){if(!Ii.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[s=t[0]]=(n=a[s])?Ii.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}r(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=Ci(e)){const n=Ii.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}(e);if(Ii.isFunction(t))return t.call(this,e,n);if(Ii.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ci(e)){const n=Ii.findKey(this,e);return!(!n||void 0===this[n]||t&&!_i(0,this[n],n,t))}return!1}delete(e,t){const n=this;let s=!1;function a(e){if(e=Ci(e)){const a=Ii.findKey(n,e);!a||t&&!_i(0,n[a],a,t)||(delete n[a],s=!0)}}return Ii.isArray(e)?e.forEach(a):a(e),s}clear(e){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const a=t[n];e&&!_i(0,this[a],a,e,!0)||(delete this[a],s=!0)}return s}normalize(e){const t=this,n={};return Ii.forEach(this,((s,a)=>{const r=Ii.findKey(n,a);if(r)return t[r]=Si(s),void delete t[a];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();o!==a&&delete t[a],t[o]=Si(s),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ii.forEach(this,((n,s)=>{null!=n&&!1!==n&&(t[s]=e&&Ii.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[yi]=this[yi]={accessors:{}}).accessors,n=this.prototype;function s(e){const s=Ci(e);t[s]||(!function(e,t){const n=Ii.toCamelCase(" "+t);["get","set","has"].forEach((s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(e,n,a){return this[s].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[s]=!0)}return Ii.isArray(e)?e.forEach(s):s(e),this}}Ni.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ii.reduceDescriptors(Ni.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ii.freezeMethods(Ni);const Ti=Ni;function Di(e,t){const n=new Set(t.map((e=>String(e).toLowerCase()))),s=[],a=e=>{if(null===e||"object"!=typeof e)return e;if(Ii.isBuffer(e))return e;if(-1!==s.indexOf(e))return;let t;if(e instanceof Ti&&(e=e.toJSON()),s.push(e),Ii.isArray(e))t=[],e.forEach(((e,n)=>{const s=a(e);Ii.isUndefined(s)||(t[n]=s)}));else{if(!Ii.isPlainObject(e)&&function(e){if(Ii.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Ii.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return s.pop(),e;t=Object.create(null);for(const[s,r]of Object.entries(e)){const e=n.has(s.toLowerCase())?"[REDACTED ****]":a(r);Ii.isUndefined(e)||(t[s]=e)}}return s.pop(),t};return a(e)}class Pi extends Error{static from(e,t,n,s,a,r){const o=new Pi(e.message,t||e.code,n,s,a);return o.cause=e,o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),r&&Object.assign(o,r),o}constructor(e,t,n,s,a){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const e=this.config,t=e&&Ii.hasOwnProp(e,"redact")?e.redact:void 0,n=Ii.isArray(t)&&t.length>0?Di(e,t):Ii.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}Pi.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Pi.ERR_BAD_OPTION="ERR_BAD_OPTION",Pi.ECONNABORTED="ECONNABORTED",Pi.ETIMEDOUT="ETIMEDOUT",Pi.ECONNREFUSED="ECONNREFUSED",Pi.ERR_NETWORK="ERR_NETWORK",Pi.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Pi.ERR_DEPRECATED="ERR_DEPRECATED",Pi.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Pi.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Pi.ERR_CANCELED="ERR_CANCELED",Pi.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Pi.ERR_INVALID_URL="ERR_INVALID_URL",Pi.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Oi=Pi;function Ri(e){return Ii.isPlainObject(e)||Ii.isArray(e)}function bi(e){return Ii.endsWith(e,"[]")?e.slice(0,-2):e}function vi(e,t,n){return e?e.concat(t).map((function(e,t){return e=bi(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const xi=Ii.toFlatObject(Ii,{},null,(function(e){return/^is[A-Z]/.test(e)}));const wi=function(e,t,n){if(!Ii.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const s=(n=Ii.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ii.isUndefined(t[e])}))).metaTokens,a=n.visitor||d,r=n.dots,o=n.indexes,i=n.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===n.maxDepth?100:n.maxDepth,l=i&&Ii.isSpecCompliantForm(t);if(!Ii.isFunction(a))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(Ii.isDate(e))return e.toISOString();if(Ii.isBoolean(e))return e.toString();if(!l&&Ii.isBlob(e))throw new Oi("Blob is not supported. Use a Buffer instead.");return Ii.isArrayBuffer(e)||Ii.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,a){let i=e;if(Ii.isReactNative(t)&&Ii.isReactNativeBlob(e))return t.append(vi(a,n,r),u(e)),!1;if(e&&!a&&"object"==typeof e)if(Ii.endsWith(n,"{}"))n=s?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ii.isArray(e)&&function(e){return Ii.isArray(e)&&!e.some(Ri)}(e)||(Ii.isFileList(e)||Ii.endsWith(n,"[]"))&&(i=Ii.toArray(e)))return n=bi(n),i.forEach((function(e,s){!Ii.isUndefined(e)&&null!==e&&t.append(!0===o?vi([n],s,r):null===o?n:n+"[]",u(e))})),!1;return!!Ri(e)||(t.append(vi(a,n,r),u(e)),!1)}const p=[],g=Object.assign(xi,{defaultVisitor:d,convertValue:u,isVisitable:Ri});if(!Ii.isObject(e))throw new TypeError("data must be an object");return function e(n,s,r=0){if(!Ii.isUndefined(n)){if(r>c)throw new Oi("Object is too deeply nested ("+r+" levels). Max depth: "+c,Oi.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+s.join("."));p.push(n),Ii.forEach(n,(function(n,o){!0===(!(Ii.isUndefined(n)||null===n)&&a.call(t,n,Ii.isString(o)?o.trim():o,s,g))&&e(n,s?s.concat(o):[o],r+1)})),p.pop()}}(e),t};function Mi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,(function(e){return t[e]}))}function Li(e,t){this._pairs=[],e&&wi(e,this,t)}const Ui=Li.prototype;Ui.append=function(e,t){this._pairs.push([e,t])},Ui.toString=function(e){const t=e?function(t){return e.call(this,t,Mi)}:Mi;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Fi=Li;function Vi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ji(e,t,n){if(!t)return e;const s=n&&n.encode||Vi,a=Ii.isFunction(n)?{serialize:n}:n,r=a&&a.serialize;let o;if(o=r?r(t,a):Ii.isURLSearchParams(t)?t.toString():new Fi(t,a).toString(s),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ki=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ii.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Bi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$i={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Fi,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Gi="undefined"!=typeof window&&"undefined"!=typeof document,Wi="object"==typeof navigator&&navigator||void 0,Hi=Gi&&(!Wi||["ReactNative","NativeScript","NS"].indexOf(Wi.product)<0),qi="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,zi=Gi&&window.location.href||"http://localhost",Yi={...s,...$i};const Ki=function(e){function t(e,n,s,a){let r=e[a++];if("__proto__"===r)return!0;const o=Number.isFinite(+r),i=a>=e.length;if(r=!r&&Ii.isArray(s)?s.length:r,i)return Ii.hasOwnProp(s,r)?s[r]=Ii.isArray(s[r])?s[r].concat(n):[s[r],n]:s[r]=n,!o;s[r]&&Ii.isObject(s[r])||(s[r]=[]);return t(e,n,s[r],a)&&Ii.isArray(s[r])&&(s[r]=function(e){const t={},n=Object.keys(e);let s;const a=n.length;let r;for(s=0;s<a;s++)r=n[s],t[r]=e[r];return t}(s[r])),!o}if(Ii.isFormData(e)&&Ii.isFunction(e.entries)){const n={};return Ii.forEachEntry(e,((e,s)=>{t(function(e){return Ii.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),s,n,0)})),n}return null},Qi=(e,t)=>null!=e&&Ii.hasOwnProp(e,t)?e[t]:void 0;const Ji={transitional:Bi,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",s=n.indexOf("application/json")>-1,a=Ii.isObject(e);a&&Ii.isHTMLForm(e)&&(e=new FormData(e));if(Ii.isFormData(e))return s?JSON.stringify(Ki(e)):e;if(Ii.isArrayBuffer(e)||Ii.isBuffer(e)||Ii.isStream(e)||Ii.isFile(e)||Ii.isBlob(e)||Ii.isReadableStream(e))return e;if(Ii.isArrayBufferView(e))return e.buffer;if(Ii.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(a){const t=Qi(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return wi(e,new Yi.classes.URLSearchParams,{visitor:function(e,t,n,s){return Yi.isNode&&Ii.isBuffer(e)?(this.append(t,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((r=Ii.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Qi(this,"env"),s=n&&n.FormData;return wi(r?{"files[]":e}:e,s&&new s,t)}}return a||s?(t.setContentType("application/json",!1),function(e,t,n){if(Ii.isString(e))try{return(t||JSON.parse)(e),Ii.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Qi(this,"transitional")||Ji.transitional,n=t&&t.forcedJSONParsing,s=Qi(this,"responseType"),a="json"===s;if(Ii.isResponse(e)||Ii.isReadableStream(e))return e;if(e&&Ii.isString(e)&&(n&&!s||a)){const n=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e,Qi(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw Oi.from(e,Oi.ERR_BAD_RESPONSE,this,null,Qi(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yi.classes.FormData,Blob:Yi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ii.forEach(["delete","get","head","post","put","patch","query"],(e=>{Ji.headers[e]={}}));const Xi=Ji;function Zi(e,t){const n=this||Xi,s=t||n,a=Ti.from(s.headers);let r=s.data;return Ii.forEach(e,(function(e){r=e.call(n,r,a.normalize(),t?t.status:void 0)})),a.normalize(),r}function ec(e){return!(!e||!e.__CANCEL__)}const tc=class extends Oi{constructor(e,t,n){super(null==e?"canceled":e,Oi.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function nc(e,t,n){const s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(new Oi("Request failed with status code "+n.status,n.status>=400&&n.status<500?Oi.ERR_BAD_REQUEST:Oi.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const sc=function(e,t){e=e||10;const n=new Array(e),s=new Array(e);let a,r=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=s[o];a||(a=c),n[r]=i,s[r]=c;let u=o,d=0;for(;u!==r;)d+=n[u++],u%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),c-a<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const ac=function(e,t){let n,s,a=0,r=1e3/t;const o=(t,r=Date.now())=>{a=r,n=null,s&&(clearTimeout(s),s=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=r?o(e,t):(n=e,s||(s=setTimeout((()=>{s=null,o(n)}),r-i)))},()=>n&&o(n)]},rc=(e,t,n=3)=>{let s=0;const a=sc(50,250);return ac((n=>{const r=n.loaded,o=n.lengthComputable?n.total:void 0,i=null!=o?Math.min(r,o):r,c=Math.max(0,i-s),l=a(c);s=Math.max(s,i);e({loaded:i,total:o,progress:o?i/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-i)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},oc=(e,t)=>{const n=null!=e;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},ic=e=>(...t)=>Ii.asap((()=>e(...t))),cc=Yi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yi.origin),Yi.navigator&&/(msie|trident)/i.test(Yi.navigator.userAgent)):()=>!0,lc=Yi.hasStandardBrowserEnv?{write(e,t,n,s,a,r,o){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];Ii.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),Ii.isString(s)&&i.push(`path=${s}`),Ii.isString(a)&&i.push(`domain=${a}`),!0===r&&i.push("secure"),Ii.isString(o)&&i.push(`SameSite=${o}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const s=t[n].replace(/^\s+/,""),a=s.indexOf("=");if(-1!==a&&s.slice(0,a)===e)return decodeURIComponent(s.slice(a+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function uc(e,t,n){let s=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(s||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const dc=e=>e instanceof Ti?{...e}:e;function pc(e,t){t=t||{};const n=Object.create(null);function s(e,t,n,s){return Ii.isPlainObject(e)&&Ii.isPlainObject(t)?Ii.merge.call({caseless:s},e,t):Ii.isPlainObject(t)?Ii.merge({},t):Ii.isArray(t)?t.slice():t}function a(e,t,n,a){return Ii.isUndefined(t)?Ii.isUndefined(e)?void 0:s(void 0,e,0,a):s(e,t,0,a)}function r(e,t){if(!Ii.isUndefined(t))return s(void 0,t)}function o(e,t){return Ii.isUndefined(t)?Ii.isUndefined(e)?void 0:s(void 0,e):s(void 0,t)}function i(n,a,r){return Ii.hasOwnProp(t,r)?s(n,a):Ii.hasOwnProp(e,r)?s(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:i,headers:(e,t,n)=>a(dc(e),dc(t),0,!0)};return Ii.forEach(Object.keys({...e,...t}),(function(s){if("__proto__"===s||"constructor"===s||"prototype"===s)return;const r=Ii.hasOwnProp(c,s)?c[s]:a,o=r(Ii.hasOwnProp(e,s)?e[s]:void 0,Ii.hasOwnProp(t,s)?t[s]:void 0,s);Ii.isUndefined(o)&&r!==i||(n[s]=o)})),n}const gc=["content-type","content-length"];const hc=e=>{const t=pc({},e),n=e=>Ii.hasOwnProp(t,e)?t[e]:void 0,s=n("data");let a=n("withXSRFToken");const r=n("xsrfHeaderName"),o=n("xsrfCookieName");let i=n("headers");const c=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");var p;if(t.headers=i=Ti.from(i),t.url=ji(uc(l,d,u),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?(p=c.password,encodeURIComponent(p).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))):""))),Ii.isFormData(s)&&(Yi.hasStandardBrowserEnv||Yi.hasStandardBrowserWebWorkerEnv?i.setContentType(void 0):Ii.isFunction(s.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach((([t,n])=>{gc.includes(t.toLowerCase())&&e.set(t,n)})):e.set(t)}(i,s.getHeaders(),n("formDataHeaderPolicy"))),Yi.hasStandardBrowserEnv){Ii.isFunction(a)&&(a=a(t));if(!0===a||null==a&&cc(t.url)){const e=r&&o&&lc.read(o);e&&i.set(r,e)}}return t},fc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const s=hc(e);let a=s.data;const r=Ti.from(s.headers).normalize();let o,i,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:g}=s;function h(){l&&l(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(o),s.signal&&s.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const s=Ti.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());nc((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:s,config:e,request:f}),f=null}f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&f.responseURL.startsWith("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new Oi("Request aborted",Oi.ECONNABORTED,e,f)),h(),f=null)},f.onerror=function(t){const s=t&&t.message?t.message:"Network Error",a=new Oi(s,Oi.ERR_NETWORK,e,f);a.event=t||null,n(a),h(),f=null},f.ontimeout=function(){let t=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const a=s.transitional||Bi;s.timeoutErrorMessage&&(t=s.timeoutErrorMessage),n(new Oi(t,a.clarifyTimeoutError?Oi.ETIMEDOUT:Oi.ECONNABORTED,e,f)),h(),f=null},void 0===a&&r.setContentType(null),"setRequestHeader"in f&&Ii.forEach(r.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),Ii.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),d&&"json"!==d&&(f.responseType=s.responseType),g&&([c,u]=rc(g,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,l]=rc(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(s.cancelToken||s.signal)&&(o=t=>{f&&(n(!t||t.type?new tc(null,e,f):t),f.abort(),h(),f=null)},s.cancelToken&&s.cancelToken.subscribe(o),s.signal&&(s.signal.aborted?o():s.signal.addEventListener("abort",o)));const I=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(s.url);!I||Yi.protocols.includes(I)?f.send(a||null):n(new Oi("Unsupported protocol "+I+":",Oi.ERR_BAD_REQUEST,e))}))},mc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,s=new AbortController;const a=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;s.abort(t instanceof Oi?t:new tc(t instanceof Error?t.message:t))}};let r=t&&setTimeout((()=>{r=null,a(new Oi(`timeout of ${t}ms exceeded`,Oi.ETIMEDOUT))}),t);const o=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=s;return i.unsubscribe=()=>Ii.asap(o),i}},Ic=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let s,a=0;for(;a<n;)s=a+t,yield e.slice(a,s),a=s},Ec=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},yc=(e,t,n,s)=>{const a=async function*(e,t){for await(const n of Ec(e))yield*Ic(n,t)}(e,t);let r,o=0,i=e=>{r||(r=!0,s&&s(e))};return new ReadableStream({async pull(e){try{const{done:t,value:s}=await a.next();if(t)return i(),void e.close();let r=s.byteLength;if(n){let e=o+=r;n(e)}e.enqueue(new Uint8Array(s))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})};const Ac="1.16.0",{isFunction:Cc}=Ii,Sc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},_c=e=>{const t=Ii.global??globalThis,{ReadableStream:n,TextEncoder:s}=t;e=Ii.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:r,Response:o}=e,i=a?Cc(a):"function"==typeof fetch,c=Cc(r),l=Cc(o);if(!i)return!1;const u=i&&Cc(n),d=i&&("function"==typeof s?(p=new s,e=>p.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var p;const g=c&&u&&Sc((()=>{let e=!1;const t=new r(Yi.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),s=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!s})),h=l&&u&&Sc((()=>Ii.isReadableStream(new o("").body))),f={stream:h&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!f[e]&&(f[e]=(t,n)=>{let s=t&&t[e];if(s)return s.call(t);throw new Oi(`Response type '${e}' is not supported`,Oi.ERR_NOT_SUPPORT,n)})}));const m=async(e,t)=>{const n=Ii.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Ii.isBlob(e))return e.size;if(Ii.isSpecCompliantForm(e)){const t=new r(Yi.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ii.isArrayBufferView(e)||Ii.isArrayBuffer(e)?e.byteLength:(Ii.isURLSearchParams(e)&&(e+=""),Ii.isString(e)?(await d(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:i,signal:l,cancelToken:u,timeout:d,onDownloadProgress:p,onUploadProgress:I,responseType:E,headers:y,withCredentials:A="same-origin",fetchOptions:C,maxContentLength:S,maxBodyLength:_}=hc(e);const N=Ii.isNumber(S)&&S>-1,T=Ii.isNumber(_)&&_>-1;let D=a||fetch;E=E?(E+"").toLowerCase():"text";let P=mc([l,u&&u.toAbortSignal()],d),O=null;const R=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let b;try{if(N&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),s=e.slice(t+1);if(/;base64/i.test(n)){let e=s.length;const t=s.length;for(let n=0;n<t;n++)if(37===s.charCodeAt(n)&&n+2<t){const t=s.charCodeAt(n+1),a=s.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)&&(e-=2,n+=2)}let n=0,a=t-1;const r=e=>e>=2&&37===s.charCodeAt(e-2)&&51===s.charCodeAt(e-1)&&(68===s.charCodeAt(e)||100===s.charCodeAt(e));a>=0&&(61===s.charCodeAt(a)?(n++,a--):r(a)&&(n++,a-=3)),1===n&&a>=0&&(61===s.charCodeAt(a)||r(a))&&n++;const o=3*Math.floor(e/4)-(n||0);return o>0?o:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(s,"utf8");let a=0;for(let e=0,t=s.length;e<t;e++){const n=s.charCodeAt(e);if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=s.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a}(t);if(n>S)throw new Oi("maxContentLength size of "+S+" exceeded",Oi.ERR_BAD_RESPONSE,e,O)}if(T&&"get"!==n&&"head"!==n){const t=await m(y,i);if("number"==typeof t&&isFinite(t)&&t>_)throw new Oi("Request body larger than maxBodyLength limit",Oi.ERR_BAD_REQUEST,e,O)}if(I&&g&&"get"!==n&&"head"!==n&&0!==(b=await m(y,i))){let e,n=new r(t,{method:"POST",body:i,duplex:"half"});if(Ii.isFormData(i)&&(e=n.headers.get("content-type"))&&y.setContentType(e),n.body){const[e,t]=oc(b,rc(ic(I)));i=yc(n.body,65536,e,t)}}Ii.isString(A)||(A=A?"include":"omit");const a=c&&"credentials"in r.prototype;if(Ii.isFormData(i)){const e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete("content-type")}y.set("User-Agent","axios/"+Ac,!1);const l={...C,signal:P,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:i,duplex:"half",credentials:a?A:void 0};O=c&&new r(t,l);let u=await(c?D(O,C):D(t,l));if(N){const t=Ii.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>S)throw new Oi("maxContentLength size of "+S+" exceeded",Oi.ERR_BAD_RESPONSE,e,O)}const d=h&&("stream"===E||"response"===E);if(h&&u.body&&(p||N||d&&R)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=u[e]}));const n=Ii.toFiniteNumber(u.headers.get("content-length")),[s,a]=p&&oc(n,rc(ic(p),!0))||[];let r=0;const i=t=>{if(N&&(r=t,r>S))throw new Oi("maxContentLength size of "+S+" exceeded",Oi.ERR_BAD_RESPONSE,e,O);s&&s(t)};u=new o(yc(u.body,65536,i,(()=>{a&&a(),R&&R()})),t)}E=E||"text";let v=await f[Ii.findKey(f,E)||"text"](u,e);if(N&&!h&&!d){let t;if(null!=v&&("number"==typeof v.byteLength?t=v.byteLength:"number"==typeof v.size?t=v.size:"string"==typeof v&&(t="function"==typeof s?(new s).encode(v).byteLength:v.length)),"number"==typeof t&&t>S)throw new Oi("maxContentLength size of "+S+" exceeded",Oi.ERR_BAD_RESPONSE,e,O)}return!d&&R&&R(),await new Promise(((t,n)=>{nc(t,n,{data:v,headers:Ti.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})}))}catch(t){if(R&&R(),P&&P.aborted&&P.reason instanceof Oi){const n=P.reason;throw n.config=e,O&&(n.request=O),t!==n&&(n.cause=t),n}if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Oi("Network Error",Oi.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t});throw Oi.from(t,t&&t.code,e,O,t&&t.response)}}},Nc=new Map,Tc=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:a}=t,r=[s,a,n];let o,i,c=r.length,l=Nc;for(;c--;)o=r[c],i=l.get(o),void 0===i&&l.set(o,i=c?new Map:_c(t)),l=i;return i},Dc=(Tc(),{http:null,xhr:fc,fetch:{get:Tc}});Ii.forEach(Dc,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}}));const Pc=e=>`- ${e}`,Oc=e=>Ii.isFunction(e)||null===e||!1===e;const Rc={getAdapter:function(e,t){e=Ii.isArray(e)?e:[e];const{length:n}=e;let s,a;const r={};for(let o=0;o<n;o++){let n;if(s=e[o],a=s,!Oc(s)&&(a=Dc[(n=String(s)).toLowerCase()],void 0===a))throw new Oi(`Unknown adapter '${n}'`);if(a&&(Ii.isFunction(a)||(a=a.get(t))))break;r[n||"#"+o]=a}if(!a){const e=Object.entries(r).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(Pc).join("\n"):" "+Pc(e[0]):"as no adapter specified";throw new Oi("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:Dc};function bc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tc(null,e)}function vc(e){bc(e),e.headers=Ti.from(e.headers),e.data=Zi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Rc.getAdapter(e.adapter||Xi.adapter,e)(e).then((function(t){bc(e),e.response=t;try{t.data=Zi.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=Ti.from(t.headers),t}),(function(t){if(!ec(t)&&(bc(e),t&&t.response)){e.response=t.response;try{t.response.data=Zi.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=Ti.from(t.response.headers)}return Promise.reject(t)}))}const xc={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{xc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const wc={};xc.transitional=function(e,t,n){function s(e,t){return"[Axios v"+Ac+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,r)=>{if(!1===e)throw new Oi(s(a," has been removed"+(t?" in "+t:"")),Oi.ERR_DEPRECATED);return t&&!wc[a]&&(wc[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,r)}},xc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Mc={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Oi("options must be an object",Oi.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let a=s.length;for(;a-- >0;){const r=s[a],o=Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;if(o){const t=e[r],n=void 0===t||o(t,r,e);if(!0!==n)throw new Oi("option "+r+" must be "+n,Oi.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Oi("Unknown option "+r,Oi.ERR_BAD_OPTION)}},validators:xc},Lc=Mc.validators;class Uc{constructor(e){this.defaults=e||{},this.interceptors={request:new ki,response:new ki}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),s=-1===t?-1:n.indexOf("\n",t+1),a=-1===s?"":n.slice(s+1);String(e.stack).endsWith(a)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=pc(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:a}=t;void 0!==n&&Mc.assertOptions(n,{silentJSONParsing:Lc.transitional(Lc.boolean),forcedJSONParsing:Lc.transitional(Lc.boolean),clarifyTimeoutError:Lc.transitional(Lc.boolean),legacyInterceptorReqResOrdering:Lc.transitional(Lc.boolean)},!1),null!=s&&(Ii.isFunction(s)?t.paramsSerializer={serialize:s}:Mc.assertOptions(s,{encode:Lc.function,serialize:Lc.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mc.assertOptions(t,{baseUrl:Lc.spelling("baseURL"),withXsrfToken:Lc.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=a&&Ii.merge(a.common,a[t.method]);a&&Ii.forEach(["delete","get","head","post","put","patch","query","common"],(e=>{delete a[e]})),t.headers=Ti.concat(r,a);const o=[];let i=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const n=t.transitional||Bi;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[vc.bind(this),void 0];for(e.unshift(...o),e.push(...c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=o.length;let p=t;for(;d<u;){const e=o[d++],t=o[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=vc.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return ji(uc((e=pc(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Ii.forEach(["delete","get","head","options"],(function(e){Uc.prototype[e]=function(t,n){return this.request(pc(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ii.forEach(["post","put","patch","query"],(function(e){function t(t){return function(n,s,a){return this.request(pc(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}Uc.prototype[e]=t(),"query"!==e&&(Uc.prototype[e+"Form"]=t(!0))}));const Fc=Uc;class Vc{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const s=new Promise((e=>{n.subscribe(e),t=e})).then(e);return s.cancel=function(){n.unsubscribe(t)},s},e((function(e,s,a){n.reason||(n.reason=new tc(e,s,a),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Vc((function(t){e=t})),cancel:e}}}const jc=Vc;const kc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(kc).forEach((([e,t])=>{kc[t]=e}));const Bc=kc;const $c=function e(t){const n=new Fc(t),s=To(Fc.prototype.request,n);return Ii.extend(s,Fc.prototype,n,{allOwnKeys:!0}),Ii.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(pc(t,n))},s}(Xi);$c.Axios=Fc,$c.CanceledError=tc,$c.CancelToken=jc,$c.isCancel=ec,$c.VERSION=Ac,$c.toFormData=wi,$c.AxiosError=Oi,$c.Cancel=$c.CanceledError,$c.all=function(e){return Promise.all(e)},$c.spread=function(e){return function(t){return e.apply(null,t)}},$c.isAxiosError=function(e){return Ii.isObject(e)&&!0===e.isAxiosError},$c.mergeConfig=pc,$c.AxiosHeaders=Ti,$c.formToJSON=e=>Ki(Ii.isHTMLForm(e)?new FormData(e):e),$c.getAdapter=Rc.getAdapter,$c.HttpStatusCode=Bc,$c.default=$c;const Gc=$c;function Wc(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Hc=Wc((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var qc=function(e,t){return qc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qc(e,t)};function zc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}qc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Yc(e,t,n,s){return new(n||(n=Promise))((function(a,r){function o(e){try{c(s.next(e))}catch(e){r(e)}}function i(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))}function Kc(e,t){var n,s,a,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(r=0)),r;)try{if(n=1,s&&(a=2&i[0]?s.return:i[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,s=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=r.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(6===i[0]&&r.label<a[1]){r.label=a[1],a=i;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(i);break}a[2]&&r.ops.pop(),r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e],s=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Qc(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Jc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var s,a,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(e){a={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Xc(e,t,n){if(n||2===arguments.length)for(var s,a=0,r=t.length;a<r;a++)!s&&a in t||(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}function Zc(e){return this instanceof Zc?(this.v=e,this):new Zc(e)}function el(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,a=n.apply(e,t||[]),r=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),s[Symbol.asyncIterator]=function(){return this},s;function o(e,t){a[e]&&(s[e]=function(t){return new Promise((function(n,s){r.push([e,t,n,s])>1||i(e,t)}))},t&&(s[e]=t(s[e])))}function i(e,t){try{(n=a[e](t)).value instanceof Zc?Promise.resolve(n.value.v).then(c,l):u(r[0][2],n)}catch(e){u(r[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),r.shift(),r.length&&i(r[0][0],r[0][1])}}function tl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Qc(e),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,a){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,a,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var nl=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function sl(e){return"function"==typeof e}function al(e){return sl(null==e?void 0:e.then)}var rl=Wc((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function ol(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var il=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,s,a;if(!this.closed){this.closed=!0;var r=this._parentage;if(r)if(this._parentage=null,Array.isArray(r))try{for(var o=Qc(r),i=o.next();!i.done;i=o.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else r.remove(this);var c=this.initialTeardown;if(sl(c))try{c()}catch(e){a=e instanceof rl?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Qc(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{ul(p)}catch(e){a=null!=a?a:[],e instanceof rl?a=Xc(Xc([],Jc(a)),Jc(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(n)throw n.error}}}if(a)throw new rl(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ul(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ol(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ol(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),cl=il.EMPTY;function ll(e){return e instanceof il||e&&"closed"in e&&sl(e.remove)&&sl(e.add)&&sl(e.unsubscribe)}function ul(e){sl(e)?e():e.unsubscribe()}var dl={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},pl={setTimeout:function(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var a=pl.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,Xc([e,t],Jc(n))):setTimeout.apply(void 0,Xc([e,t],Jc(n)))},clearTimeout:function(e){var t=pl.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function gl(e){pl.setTimeout((function(){var t=dl.onUnhandledError;if(!t)throw e;t(e)}))}function hl(){}var fl=ml("C",void 0,void 0);function ml(e,t,n){return{kind:e,value:t,error:n}}var Il=null;function El(e){if(dl.useDeprecatedSynchronousErrorHandling){var t=!Il;if(t&&(Il={errorThrown:!1,error:null}),e(),t){var n=Il,s=n.errorThrown,a=n.error;if(Il=null,s)throw a}}else e()}var yl=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,ll(t)&&t.add(n)):n.destination=Dl,n}return zc(t,e),t.create=function(e,t,n){return new _l(e,t,n)},t.prototype.next=function(e){this.isStopped?Tl(function(e){return ml("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Tl(ml("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Tl(fl,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(il),Al=Function.prototype.bind;function Cl(e,t){return Al.call(e,t)}var Sl=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Nl(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Nl(e)}else Nl(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Nl(e)}},e}(),_l=function(e){function t(t,n,s){var a,r,o=e.call(this)||this;sl(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=s?s:void 0}:o&&dl.useDeprecatedNextContext?((r=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},a={next:t.next&&Cl(t.next,r),error:t.error&&Cl(t.error,r),complete:t.complete&&Cl(t.complete,r)}):a=t;return o.destination=new Sl(a),o}return zc(t,e),t}(yl);function Nl(e){var t;dl.useDeprecatedSynchronousErrorHandling?(t=e,dl.useDeprecatedSynchronousErrorHandling&&Il&&(Il.errorThrown=!0,Il.error=t)):gl(e)}function Tl(e,t){var n=dl.onStoppedNotification;n&&pl.setTimeout((function(){return n(e,t)}))}var Dl={closed:!0,next:hl,error:function(e){throw e},complete:hl},Pl="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ol(e){return e}function Rl(e){return 0===e.length?Ol:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var bl=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var s,a=this,r=(s=e)&&s instanceof yl||function(e){return e&&sl(e.next)&&sl(e.error)&&sl(e.complete)}(s)&&ll(s)?e:new _l(e,t,n);return El((function(){var e=a,t=e.operator,n=e.source;r.add(t?t.call(r,n):n?a._subscribe(r):a._trySubscribe(r))})),r},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=vl(t))((function(t,s){var a=new _l({next:function(t){try{e(t)}catch(e){s(e),a.unsubscribe()}},error:s,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Pl]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Rl(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=vl(e))((function(e,n){var s;t.subscribe((function(e){return s=e}),(function(e){return n(e)}),(function(){return e(s)}))}))},e.create=function(t){return new e(t)},e}();function vl(e){var t;return null!==(t=null!=e?e:dl.Promise)&&void 0!==t?t:Promise}function xl(e){return sl(e[Pl])}function wl(e){return Symbol.asyncIterator&&sl(null==e?void 0:e[Symbol.asyncIterator])}function Ml(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Ll="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ul(e){return sl(null==e?void 0:e[Ll])}function Fl(e){return el(this,arguments,(function(){var t,n,s;return Kc(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Zc(t.read())];case 3:return n=a.sent(),s=n.value,n.done?[4,Zc(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Zc(s)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Vl(e){return sl(null==e?void 0:e.getReader)}function jl(e){if(e instanceof bl)return e;if(null!=e){if(xl(e))return a=e,new bl((function(e){var t=a[Pl]();if(sl(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(nl(e))return s=e,new bl((function(e){for(var t=0;t<s.length&&!e.closed;t++)e.next(s[t]);e.complete()}));if(al(e))return n=e,new bl((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,gl)}));if(wl(e))return kl(e);if(Ul(e))return t=e,new bl((function(e){var n,s;try{for(var a=Qc(t),r=a.next();!r.done;r=a.next()){var o=r.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{r&&!r.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}e.complete()}));if(Vl(e))return kl(Fl(e))}var t,n,s,a;throw Ml(e)}function kl(e){return new bl((function(t){(function(e,t){var n,s,a,r;return Yc(this,void 0,void 0,(function(){var o,i;return Kc(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=tl(e),c.label=1;case 1:return[4,n.next()];case 2:if((s=c.sent()).done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),s&&!s.done&&(r=n.return)?[4,r.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Bl(e,t,n,s,a){void 0===s&&(s=0),void 0===a&&(a=!1);var r=t.schedule((function(){n(),a?e.add(this.schedule(null,s)):this.unsubscribe()}),s);if(e.add(r),!a)return r}function $l(e){return function(t){if(function(e){return sl(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function Gl(e,t,n,s,a){return new Wl(e,t,n,s,a)}var Wl=function(e){function t(t,n,s,a,r,o){var i=e.call(this,t)||this;return i.onFinalize=r,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=s?function(){try{s()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return zc(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(yl);function Hl(e,t){return void 0===t&&(t=0),$l((function(n,s){n.subscribe(Gl(s,(function(n){return Bl(s,e,(function(){return s.next(n)}),t)}),(function(){return Bl(s,e,(function(){return s.complete()}),t)}),(function(n){return Bl(s,e,(function(){return s.error(n)}),t)})))}))}function ql(e,t){return void 0===t&&(t=0),$l((function(n,s){s.add(e.schedule((function(){return n.subscribe(s)}),t))}))}function zl(e,t){if(!e)throw new Error("Iterable cannot be null");return new bl((function(n){Bl(n,t,(function(){var s=e[Symbol.asyncIterator]();Bl(n,t,(function(){s.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Yl(e,t){if(null!=e){if(xl(e))return function(e,t){return jl(e).pipe(ql(t),Hl(t))}(e,t);if(nl(e))return function(e,t){return new bl((function(n){var s=0;return t.schedule((function(){s===e.length?n.complete():(n.next(e[s++]),n.closed||this.schedule())}))}))}(e,t);if(al(e))return function(e,t){return jl(e).pipe(ql(t),Hl(t))}(e,t);if(wl(e))return zl(e,t);if(Ul(e))return function(e,t){return new bl((function(n){var s;return Bl(n,t,(function(){s=e[Ll](),Bl(n,t,(function(){var e,t,a;try{t=(e=s.next()).value,a=e.done}catch(e){return void n.error(e)}a?n.complete():n.next(t)}),0,!0)})),function(){return sl(null==s?void 0:s.return)&&s.return()}}))}(e,t);if(Vl(e))return function(e,t){return zl(Fl(e),t)}(e,t)}throw Ml(e)}function Kl(e,t){return t?Yl(e,t):jl(e)}function Ql(e){return $l((function(t,n){var s,a=null,r=!1;a=t.subscribe(Gl(n,void 0,void 0,(function(o){s=jl(e(o,Ql(e)(t))),a?(a.unsubscribe(),a=null,s.subscribe(n)):r=!0}))),r&&(a.unsubscribe(),a=null,s.subscribe(n))}))}class Jl{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((s=>s.type===e&&s.name===t&&s.props.index===n))}addNode(e,t,n={}){let s=this.getNode(e,t,n.index);return s?s.props=n:(s=new Jl(e,t,n),s.parent=this,this.children.push(s)),s}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const s=this.children[n];if(s.props.index===t&&s.name===e){this.children.splice(n,1);break}}}}const Xl=Jl;const Zl=class{constructor(e,t,n,s={}){this.type=Fs.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=s}},eu=/(([^.]+)\[\d+\])/g,tu=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(eu);if(!t)return[e];let n,s=t[t.length-1];return e=e?.split(s)[0],e=e?.substring(0,e.length-1),[s,n]=s.split("["),n=n?.split("]")[0],[e,s,n]},nu=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:su,WHEN:au,DECLARATIVE_TARGET:ru,PAGELIST:ou}=Vs.CONTEXT_TREE_NODE_TYPES;let iu;const cu=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[su,new Map],[au,new Map],[ru,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===ou){const n=this.references.get(su);n.set(e,t),this.references.set(su,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const s=nu(n.name,e);return-1!==s&&+s>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),s=t?.parent;s?.removeChildNode(e)}const s=this.references.get(su),a=this.references.get(ru);[...s.keys(),...a.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=tu(e);return+n>=t})).forEach((e=>{const t=s.get(e),n=t?.parent;n?.removeChildren(),s.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((s=>s.type===e&&s.name===t&&s.props.index===n))}addNode(e,t,n={}){let s=this.getNode(e,t,n.index);return s?s.props=n:(s=new Xl(e,t,n),s.parent=this,this.children.push(s)),s}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const s=this.references.get(t),a=s?.get(e);if(a?.props?.index===n){const n=a?.props?.context;s.delete(e),t===su&&n&&iu?.(n,e)}}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const s=this.children[n];if(s.props.index===t&&s.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,s,a){if(!(n&&s&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const r=`${e}.${n}.${s}`,o=new Zl(t,n,s,a),i=this.references.get("WHEN");i?.set(r,o)}},{VIEW:lu,FIELD:uu,CONTEXT:du,DECLARATIVE_TARGET:pu,WHEN:gu}=Fs.CONTEXT_TREE_NODE_TYPES;const hu=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new cu(du,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const s=this.addContextNode(e).addNode("PAGE",t);let a=s.getReference(n);return a||(a=s.addNode("VIEW",n),s.addReference(n,a)),a}pushChildPageNodeToParentView(e,t,n){const s=e.children;let a=!1;if(s)for(let e=0;e<s.length;e+=1)if(s[e].name===n){a=!0;break}a||s.push(t),t.parent=e}addViewNode(e,t,n,s,a={}){const r=this.addContextNode(e).addNode("PAGE",t);let o=null;if(s&&n!==s){o=this._addParentViewNode(e,t,s).addNode("VIEW",n,a)}else o=r.addNode("VIEW",n,a);r.addReference(n,o);const i=t.split(".");for(;i.length>0;){i.pop();const n=i.join("."),a=this.getContextNode(e)?.getNode("PAGE",n),o=a?.getReference(s);if(o){this.pushChildPageNodeToParentView(o,r,t);break}}return o}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,s,a){if(!s)return;s.startsWith(".")&&(s=s.substring(1));const r=this.addContextNode(e),o=r.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${s}`,a);return o&&r.addReference(`${t}.${s}`,o),o}updatePageListNode(e,t,n,s){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,s)}removeFieldNode(e,t,n,s,a){const r=this.getContextNode(e);r?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${s}`,a),r?.removeReference(`${t}${s}`,uu,a),r?.removeReference(`${t}${s}`,pu,a)}removeViewNode(e,t,n,s,a={}){const r=this.getContextNode(e),o=r?.getNode("PAGE",t),i=o?.getReference(n);if("visibility"in a&&i?.props&&"visibility"in i.props&&a.visibility!==i.props.visibility)return;this.removeChildViewNodes(e,t,n,s);const c=i?.parent?.children?.findIndex((e=>e.name===n))??-1;c>-1&&i?.parent?.children.splice(c,1)}removeChildViewNodes(e,t,n,s){const a=this.getContextNode(e),r=a?.getNode("PAGE",t),o=r?.getReference(n);o?.children.forEach((r=>{"PAGE"===r.type?this.removeViewNode(e,r.name,n,s):r.type===lu?this.removeChildViewNodes(e,t,r.name,s):(a.removeReference(r.name,uu,r.props.index),a.removeReference(r.name,pu,r.props.index),"PAGELIST"!==r.type&&"Address"!==r.props?.componentName||this.deleteAllListNodes(e,r.name))})),r?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const s=s=>{const a=this.getContextNode(e),r=a?.references?.get(s);if(r)for(const[e]of r)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&a?.references?.get(s)?.delete(e)};s(uu),s(pu)}deleteListNode(e,t,n){const s=s=>{const a=this.getContextNode(e),r=a?.references?.get(s);if(r)for(const[e]of r)e.includes(`${t.join(".")}[${n}]`)&&a?.references?.get(s)?.delete(e)};s(uu),s(pu)}getPageListNode(e,t,n,s){const a=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return a?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${s}`))}getFieldNode(e,t,n,s){return this.getViewNode(e,t,n)?.getNode(uu,s)}_findViewNode(e,t,n,s){let a=s.addNode("PAGE",t)?.getReference(n);if(a)return a;const r=t.split(".");for(;r.length>0;){r.pop();const e=r.join(".");if(a=s.addNode("PAGE",e)?.getReference(n),a)return a}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,s,a,r={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),c=this.createFieldNode(i,t,s,r);return c&&this.updateFieldNode(o,i,c,e,t,s,a),c}createFieldNode(e,t,n,s){const{isDeclarativeTarget:a}=s;return a?e.addNode(pu,`${t}${n}`,s):e.addNode(uu,`${t}${n}`,s)}updateFieldNode(e,t,n,s,a,r,o){const i=`${a}${r}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(s,n.name),e.addReference(i,n),n.value=o,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,s,a,r)}handleFieldInsideList(e,t,n,s,a){const r=iy(n),o=xE(r,n)||{},i=`${s}${a}`;let c=null;if(o?.subscriptFieldName||o?.isPageGroup)c=s.substring(0,s.lastIndexOf(`.${o?.index??""}`))||i.substring(0,i.lastIndexOf(`.${o?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=s.substring(0,s.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let s=e.getReference(n,uu);s||(s=t.addNode(uu,n,{}),e.addReference(n,s))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,s){this.getViewNode(e,t,n)?.addEventListener(s)}mutateField(e,t,n,s){const a=this.getContextNode(e),[r,o,i]=tu(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,r,o,{...s,rowIndex:i});const c=a?.getReference(`${t}.${n}`,uu);c&&c instanceof Xl&&c.triggerEvent(s)}onPageListMutate(e,t,n,s,a){this.getPageListNode(e,t,n,s)?.addEventListener(a)}mutatePageList(e,t,n,s,a=!1){const r=this.getContextNode(e),o=r?.getReference(`${t}.${n}`,uu);o&&o instanceof Xl&&o.triggerEvent(s,a)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(uu)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(uu)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(pu)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(uu)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(pu)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const s=this.getContextNode(e)?.references?.get(uu)?.get(t);s instanceof Xl&&s&&(s.previousValue=s.value,void 0===s.value&&(s.previousValue=n),s.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,uu),n=this.getContextReferencesByType(e,pu);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,uu)?.get(t)||!!this.getContextReferencesByType(e,pu)?.get(t)}addWhenNode(e,t,n,s,a,r){const o=this.getContextNode(e);o?.addWhen(t,n,s,a,r)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(pu)||new Map,s=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,a=t.pageReference??Fs.CASE_INFO.CASE_INFO_CONTENT;s.push({pageReference:a,name:n})})),s}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(gu)||new Map,s=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,a=e.name,r=e?.props?.pageReference??Fs.CASE_INFO.CASE_INFO_CONTENT;s.push({name:a,pageReference:r,referenceName:n,type:t})})),s}},fu={CONTENT_FIELDS_PATH:[Vs.CONTEXT_DATA,Vs.CASE_INFO.CASE_INFO,Vs.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[Vs.CONTEXT_DATA,Vs.DATA_INFO.DATA_INFO,Vs.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[Vs.CONTEXT_DATA,Vs.OBJECT_INFO.OBJECT_INFO,Vs.CONTENT],FIELD_MESSAGES_PATH:[Vs.CONTEXT_DATA,Vs.CASE_INFO.CASE_INFO,Vs.CONTENT,Vs.SUMMARY_OF_MESSAGES,Vs.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[Vs.CONTEXT_DATA,Vs.DATA_INFO.DATA_INFO,Vs.CONTENT,Vs.SUMMARY_OF_MESSAGES,Vs.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[Vs.CONTEXT_DATA,Vs.OBJECT_INFO.OBJECT_INFO,Vs.CONTENT,Vs.SUMMARY_OF_MESSAGES,Vs.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[Vs.CONTEXT_DATA,Vs.SUMMARY_OF_MESSAGES,Vs.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[Vs.CONTEXT_DATA,Vs.SUMMARY_OF_MESSAGES,Vs.HTTP_MESSAGES],CASE_MESSAGE_PATH:[Vs.CASEMESSAGES]},mu=(e="",t="",n,s)=>{let a=[],r=[];null!==e&&(r=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===Vs.PROPERTY&&e||e){a=[Vs.CONTEXT_DATA,...o.split(".")];for(let e=0;e<r.length-1;e+=1)a.push(r[e]);a.push(Vs.SUMMARY_OF_MESSAGES,Vs.PROPERTY_MESSAGES,r[r.length-1])}else n===Fs.PAGE?a=[...fu.PAGE_MESSAGES_PATH]:n===Vs.HTTP?a=[...fu.HTTP_MESSAGES_PATH]:n===Vs.CASEMESSAGES?a=[...fu.CASE_MESSAGE_PATH]:s&&(a=[Vs.CONTEXT_DATA,...o.split(".")]);return a.filter(Boolean)},Iu=(e,t,n)=>{const s={content:{}},a=`${t.split(".").slice(2).join(".")}[${n}]`,r=fC.getIn(e?.content,a.split("."));return r&&fC.setIn(s.content,a.split("."),{...r}),s},Eu=(e,t,n,s,a,r,o={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,s,a),c=s>a?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const s=parseInt(n.match(/\d+/)?.[0],10),a=`${r}[${s}]`;o[`${r}[${s+("up"===c?1:-1)}]`]=fC.getIn(e[t],[Vs.CONTEXT_DATA,...a.split(".")]),fC.deleteIn(e[t],[Vs.CONTEXT_DATA,...a.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{fC.setIn(e[t],[Vs.CONTEXT_DATA,...n.split(".")],o[n])}))},yu=(e,t,n,s,a)=>{const r=fC.deepClone(fC.getIn(e,[`${t}`])),o=fC.getIn(r,[Vs.CONTEXT_DATA,Vs.CASE_INFO.CASE_INFO]);if(!o)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),l=((e,t,n)=>{const s=fC.getIn(e,[Vs.CONTEXT_DATA,...n.split(".")],{});return Object.keys(s).filter((e=>e.includes(`${t}[`)))})(r,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const u=Iu(o,i,s).content;if(u&&Object.keys(u).length>0){const n={},o=`${i}[${s}]`,c=fC.getIn(r,[Vs.CONTEXT_DATA,...o.split(".")]);n[`${i}[${a}]`]=c,fC.deleteIn(e[t],[Vs.CONTEXT_DATA,...o.split(".")]),Eu(e,t,l,s,a,i,n)}else Eu(e,t,l,s,a,i)},Au=e=>{const{type:t,property:n,category:s,context:a,pageReference:r}=e;let o;n&&(o=n.slice(1));const i=ZA(a);let c=[];const l=fC.getIn(i,mu(o,r,s));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===Fs.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&hu.mutateField(a,r,n,{messages:[...c],type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},Cu=e=>{const{property:t,pageReference:n,category:s,context:a,type:r,subType:o,isListEntry:i,clearContextMessages:c,deletingIndex:l}=e,u={context:a,type:r,subType:o};t&&!i?(hu.mutateField(a,n,t,{type:cr,fieldName:t}),u.property=t,u.pageReference=n):i?(u.pageReference=n,u.isListEntry=i,u.deletingIndex=l):u.category=s,XA(c?{type:cr,payload:{stateObj:e.stateObj,context:a}}:{type:cr,payload:u})},Su=e=>{const{messages:t,property:n,pageReference:s,category:a,context:r}=e,o={messages:t,context:r};n?(o.property=n,o.pageReference=s):o.category=a,XA({type:ir,payload:o})},_u=(e,t,n)=>{for(const s of Object.keys(e)){if(t.push(s),s===Vs.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[s]&&_u(e[s],t,n)}t.pop()}return n},Nu=(e,t)=>{let n=Au({context:Vs.APP.ROOT,category:"HTTP"});if(Vy.getRenderingMode()===Vs.EMBED){const e=Au({context:Vs.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=Au({context:t,category:"HTTP"});n?e&&(n=n.concat(Au({context:t,category:"HTTP"}))):n=Au({context:t,category:"HTTP"})}return n},Tu=e=>{let t=null;t=KE(e)[0]?GE(KE(e)[0]):e,t&&Cu({context:t,stateObj:ZA(t),clearContextMessages:!0})},Du=e=>(fC.getIn(ZA(e),fu.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===Vs.CUSTOM_ERROR)),Pu={addMessages:Su,getValidationErrorMessages:(e,t)=>{const n=ZA(e),s=(e=>{let t=fu.CONTENT_FIELDS_PATH;e?.objectInfo?t=aI.isObjectCaseType(e?.objectInfo?.objectTypeID)?fu.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=fu.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),a=fC.getIn(n,[...s])||{},r=[];return _u(a,[],[]).forEach((e=>{const n=fC.getIn(a,[...e,Vs.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===Vs.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?r.push({label:`${e.fieldLabel}:`,description:n}):r.push(n)}}))}))})),r},getMessages:Au,clearMessages:Cu,getRootContainerHttpMessages:Nu,clearContextMessagesInActiveWorkArea:Tu,clearContextMessages:e=>{const{context:t}=e;XA({type:cr,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:Du},Ou=Pu;const Ru=class{constructor(e,t,n,s){this.eventType=e,this.callback=n,this.contextName=s,this.id=t}};const bu=new class{constructor(){this.subscribers={}}publish(e,t){(this.subscribers[e]||[]).slice().forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const s=this.subscribers[e]||[];let a=0,r=-1;s.forEach((e=>{e.id===t&&e.contextName===n&&(r=a),a+=1})),-1!==r&&s.splice(r,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,s,a){this.subscribers[e]=this.subscribers[e]||[];let r=!1;if(a&&this.subscribers[e].forEach((e=>{r=e.id===t&&e.contextName===s})),!r){const a=new Ru(e,t,n,s);this.subscribers[e].push(a)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],s=[];n.forEach((t=>{t.contextName!==e&&s.push(t)})),this.subscribers[t]=s}))}};const vu=class{static subscribe(e,t,n,s=!1,a="app"){bu.subscribe(e,n,t,a,s)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){bu.publish(e,t)}static unsubscribe(e,t,n="app"){bu.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){bu.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){bu.clearContext(e)}};const xu=new class{override=null;discoveredOffline=!1;subscribers=new Set;constructor(){"function"==typeof globalThis.addEventListener&&(globalThis.addEventListener("online",this.handleOnline),globalThis.addEventListener("offline",this.handleOffline))}isOnline(){return null!==this.override?this.override:!this.discoveredOffline&&("undefined"==typeof navigator||!("onLine"in navigator)||navigator.onLine)}setOnlineOverride(e){const t=this.isOnline();this.override=e;const n=this.isOnline();n!==t&&this.notifyAll(n)}onStatusChange(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}reportNetworkFailure(){null===this.override&&(this.discoveredOffline||(this.discoveredOffline=!0,this.notifyAll(!1)))}reportNetworkRecovery(){null===this.override&&this.discoveredOffline&&(this.discoveredOffline=!1,this.notifyAll(!0))}handleOnline=()=>{null===this.override&&(this.discoveredOffline=!1,this.notifyAll(!0))};handleOffline=()=>{null===this.override&&this.notifyAll(!1)};notifyAll(e){XA({type:e?la:ca,payload:{context:"app"}}),this.subscribers.forEach((t=>{t(e)}))}};const wu=new class{#e;#t;#n;#s;constructor(){this.#e="undefined"!=typeof localStorage&&"true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.#n=!1,this.#s=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}#a(){return this.#n&&this.#s}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="undefined"!=typeof localStorage?localStorage:null,t="true"===e?.getItem("inspectorFlag");!t&&this.#a()||(this.#e=!t,e?.setItem("inspectorFlag",this.#e.toString()),vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e))}disableInspectorIfEnabled(){if(!this.#e)return;this.#e=!1;const e="undefined"!=typeof localStorage?localStorage:null;e?.setItem("inspectorFlag",this.#e.toString()),vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}get uiDesignerEnabled(){return this.#n}setDesignerToolbarExpanded(e){this.#s=e,vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,e)}get uiDesignerToolbarExpanded(){return this.#s}toggleUIDesigner(){this.#n=!this.#n,this.#n||(this.#s=!1),vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER,this.#n),vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,this.#s)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class Mu{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Mu(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):pd(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=gd()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,s=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,r=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:Uy.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let l="";t?l=`&session_index=${t}`:`${c}`?l=`&UserIdentifier=${c}`:n&&(l=`&Password=${window.atob(n)}`);const u=new Uint8Array(64);window.crypto?.getRandomValues(u),this.config.codeVerifier=this.base64UrlSafeEncode(u),this.updateConfig(this.config,!1);const d=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${r}?client_id=${s}&response_type=code&redirect_uri=${a}&scope=openid${d}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";const t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,s=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,r=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),u=new URLSearchParams;return n&&u.append("client_id",n),s&&u.append("client_secret",s),u.append("grant_type","authorization_code"),u.append("code",l),a&&u.append("redirect_uri",a),o&&u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),rd(r,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:u.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?ud({pzCTkn:e?.csrf}):(dd({tokenInfo:e}),ud({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const Lu=Mu,Uu=async()=>new Promise((async(e,t)=>{const n=hd();if(!("tokenInfo"in n)||!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:s,refresh_token:a=null}=n.tokenInfo,r=n.endPoints?.revoke,{client_id:o="",client_secret:i="",secureCookie:c,serverType:l}=n,u="launchpad"===l,d={"content-type":"application/x-www-form-urlencoded"};i&&!u&&(d.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const p=new URLSearchParams;i?u&&(p.append("client_id",o),p.append("client_secret",i)):p.append("client_id",o),c&&p.append("send_token_as_cookie","true");const g=a?"refresh_token":"access_token",h="access_token"===g?s:a;!c&&h&&p.append("token",h),p.append("token_type_hint",g),r&&await rd(r,{method:"POST",headers:d,withCredentials:c,body:p.toString(),withoutDefaultHeaders:!0}),ud({Authorization:null}),dd({tokenInfo:null}),e()})),Fu=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Lu(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=an()+(sn()?`${sn()}`:"/?reAuth=true");return t},Vu=(e,t)=>{Fu(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};vu.publish(Fs.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},ju=e=>{let t="",n={},s={},a=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const r=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(a=!1),r.append("client_id",e.client_id),r.append("grant_type","refresh_token"),e.client_secret&&r.append("client_secret",e.client_secret),e.secureCookie&&r.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&r.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:r.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},s={success:t=>{const{data:n}=t,s={access_token:n?.access_token,refresh_token:n?.refresh_token};dd({tokenInfo:{...e.tokenInfo,...s}}),e.secureCookie?ud({pzCTkn:n?.csrf}):ud({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:a}=e;a&&"function"==typeof a&&a(n)},failure:t=>{if(e.popupReauth)return Vu(t,e);vu.publish(Fs.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${an()}/updateSession`,n={method:"GET",headers:{}},s={failure:Vu};return{url:t,config:n,callback:s,isRefreshTokenPresent:a}},ku=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Bu=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},$u=e=>{const{url:t,config:n,callback:s}=ju(e);return rd(t,n).then((e=>{s?.success?.(e),vu.publish("updateSession",{updateStatus:"success"}),vu.publish("OnUpdateSession",{})})).catch((e=>{throw e}))},Gu=(e,t,n)=>{const{config:s}=e,{url:a,config:r,callback:o,isRefreshTokenPresent:i}=ju(n),c=s?.headers&&s.headers.context;s?.data&&(s.body=s.data);const l=od(s.url,s,c,t);return i?rd(a,r).then((e=>new Promise(((n,a)=>{setTimeout((()=>{t.setUpdateSessionStatus(!1),t.latestUpdateSessionTimeStamp=Date.now(),o?.success?.(e,s),vu.publish("updateSession",{updateStatus:"success"}),vu.publish("OnUpdateSession",{}),l.then((e=>{n(e)})).catch((e=>{a(e)}))}),0)})))).catch((e=>e&&e.config&&ku(e.config.url,n)?(o?.failure?.(s.url,n),l):Promise.reject(e))):(o?.failure?.(s.url,n),l)},Wu=e=>"object"==typeof e&&null!==e,Hu=(e,t,n,s)=>{if(e.config&&ku(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&!t.getUpdateSessionStatus()&&e.config.fetchTimeStamp>t.latestUpdateSessionTimeStamp){if(vu.unsubscribeAllWithEventType(Ku),t.setUpdateSessionStatus(!0),"custom"===n?.authType){vu.publish(Fs.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:s,context:a}=Bu(e);return od(n,s,a,t)}return Gu(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&t.getUpdateSessionStatus()){const{url:t,config:n,context:s}=Bu(e);return rd(t,n,s)}const a=(e=>{if(e instanceof ArrayBuffer)try{const t=(new TextDecoder).decode(e),n=JSON.parse(t);return Wu(n)?n:{}}catch{return{}}return Wu(e)?e:{}})(e.response?.data);if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&(400!==e.response.status||a.errorClassification!==Fs.INVALID_INPUTS)&&e.config.headers.context&&e.response.data&&!s){const t=a.errorDetails&&a.errorDetails.map((t=>((e,t)=>t[Fs.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[Fs.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Su({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const qu=class{constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const zu=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||0===e.length)return;const t=new URLSearchParams(window.location.search),n=this.buildHeaderMapFromRequestContext(e,t);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,t){const n={};return e?.forEach((e=>{Array.isArray(e.IncludeInHeaders)&&e.IncludeInHeaders.forEach((s=>{const a=s.Value,r=t.get(e.Key);r&&(n[a]||(n[a]=[]),n[a].push(`${e.Key}=${r}`))}))})),n}registerHeadersFromMap(e){Object.entries(e).forEach((([e,t])=>{t.length>0&&this.registerHeader(e,t.join("; "))}))}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[Vs.COREHEADER_APP_DEBUG_ID]:e.debugId,[Vs.COREHEADER_APP_DEBUG_LEVELS]:wu.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=yC.getProperty(Vs.COREHEADERS,"",e);return t?{...t,debugInfo:wu.getPreviewMode()&&{...t.debugInfo,[Vs.COREHEADER_APP_DEBUG_LEVELS]:wu.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const s=this.getCoreHeadersFromContext(n);if(s){const t=Object.keys(e);if(t.includes(Vs.SKIPCOREHEADERS))return void delete e[Vs.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(s));Object.keys({...n}).forEach((s=>{t.includes(s)||(e[s]=n[s])}))}}injectCoreAdditionalHeaders(e,t,n,s){s?.includeRemoteSystemIdIfPresent&&Bs.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},Yu=zu;const Ku="updateSession",Qu={},Ju=new qu,Xu=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(vu.unsubscribe(Fs.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{vu.publish(Fs.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),vu.subscribe(Fs.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let Zu={},ed={},td={},nd="";const sd=e=>{Zu=e},ad=e=>{if("OAuth2.0"===e?.authType&&e.secureCookie||"custom"===e?.authType&&e.customCookies)return!0},rd=(e,t,n="root",s={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:r=n,includeRemoteSystemIdIfPresent:o=!0}=s;nd=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:d=!1,...p}=t,{Authorization:g,pzCTkn:h,...f}=t.headers||{};d||Yu.injectCoreAdditionalHeaders(f,t.body,n,{includeRemoteSystemIdIfPresent:o}),r&&Qu[r]>=0?Qu[r]+=1:r&&void 0===Qu[r]&&(Qu[r]=1);let m=d?{...f}:{...Yu.getDefaultHeaders(),...Yu.getRegisteredHeaders(),...f,context:n};if(p.isExternalUrl=(e=>!e?.startsWith(an()||""))(e||""),p.fetchTimeStamp=Date.now(),e&&ku(e,ed)&&Ju.getUpdateSessionStatus()||!Ju.getUpdateSessionStatus()||p.isExternalUrl){ku(e,ed)&&"OAuth2.0"===ed?.authType&&(m={...f});const{restApi:t}=Uy.doesRestApiExist("Logout")&&Uy.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&Xu.setTimerID(Xu.resetInactiveTimeout(Xu.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(s,a){var r,o=!1;e.subscribe({next:function(e){r=e,o=!0},error:a,complete:function(){o?s(r):n?s(t.defaultValue):a(new Hc)}})}))}(Kl(Gc({context:n,...p,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},responseType:l,adapter:u,headers:m,withCredentials:ad(ed)})).pipe((I=()=>{const e=Yu.getCoreHeadersFromContext(m.context);e&&(e=>{vu.publish(Vs.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})},(A=sl(I)||E||y?{next:I,error:E,complete:y}:I)?$l((function(e,t){var n;null===(n=A.subscribe)||void 0===n||n.call(A);var s=!0;e.subscribe(Gl(t,(function(e){var n;null===(n=A.next)||void 0===n||n.call(A,e),t.next(e)}),(function(){var e;s=!1,null===(e=A.complete)||void 0===e||e.call(A),t.complete()}),(function(e){var n;s=!1,null===(n=A.error)||void 0===n||n.call(A,e),t.error(e)}),(function(){var e,t;s&&(null===(e=A.unsubscribe)||void 0===e||e.call(A)),null===(t=A.finalize)||void 0===t||t.call(A)})))})):Ol),Ql((e=>{const t=m,n=!!t?.[Vs.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[Vs.COREHEADER_APP_DEBUG_ID]:t?.[Vs.COREHEADER_APP_DEBUG_ID],[Vs.COREHEADER_APP_DEBUG_LEVELS]:wu.getDebugLevels()}}:Yu.getCoreHeadersFromContext(m.context);throw n&&(e=>{vu.publish(Vs.PUB_SUB_EVENTS.FETCH_FAILURE,e)})({...n,error:e}),e}))))}var I,E,y,A;return od(e,t,n,Ju)},od=(e,t,n,s)=>new Promise(((a,r)=>{vu.subscribe(Ku,(o=>{s.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?rd(e,t,n).then((e=>a(e))).catch((e=>r(e))):r(o.updateStatus.error)}),Ku)})),id=e=>{Qu[e]>0&&(Qu[e]-=1,0===Qu[e]&&delete Qu[e])};Gc.interceptors.request.use((e=>xu.isOnline()?(Zu?.request&&(e=Zu.request(e)),e):(ZA(e.context)?.isLoading&&XA({type:ia,payload:{context:e.context}}),XA({type:ca,payload:{context:"app"}}),Promise.reject(new Error("Network Offline")))),(e=>Promise.reject(e))),Gc.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo&&"object"==typeof e.data.caseInfo&&"errorMessage"in e.data.caseInfo){const t=[{type:"error",message:String(e.data.caseInfo.errorMessage)}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Su({messages:t,category:"HTTP",context:n}),Promise.reject(e)}if(e.config.headers&&e.config.headers.context){if(!e.config.skipClearErrorMessages){Au({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&Cu({type:"error",category:"HTTP",context:e.config.headers.context}),Au({type:"error",category:e.config.headers.context===Vs.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&Cu({type:"error",category:"PAGE",context:e.config.headers.context});e.config.headers.context.slice(e.config.headers.context.lastIndexOf("/")+1).startsWith("primary")&&(Au({type:"error",category:"HTTP",context:Vs.APP.APP}).length>0&&Cu({type:"error",category:"HTTP",context:Vs.APP.APP}),Au({type:"error",category:"PAGE",context:Vs.APP.APP}).length>0&&Cu({type:"error",category:"PAGE",context:Vs.APP.APP}))}id(e.config.headers.context)}return Zu?.response&&(e=Zu.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&id(e.config.headers.context),"ERR_NETWORK"===e.code||"ECONNABORTED"===e.code||"Network Offline"===e.message||!0===e.isOffline?(ZA(e.config?.headers?.context)?.isLoading&&XA({type:ia,payload:{context:e.config?.headers?.context}}),xu.reportNetworkFailure(),Promise.reject(new Error("Network Offline"))):("Network Offline"!==e.message&&ZA(Vs.APP.APP)?.context_data?.isOffline&&xu.reportNetworkRecovery(),!e.response&&e.cause?.response&&(e.response=e.cause.response),!e.response||!e.response.status||401!==e.response.status||e.config.isExternalUrl||e.config&&ku(e.config.url,ed)||vu.subscribe(Ku,(e=>{Ju.setUpdateSessionStatus(!e.updateStatus)}),Ku),Hu(e,Ju,ed,e.response&&e.response.status&&e.response.status===Number(nd)?nd:null)))));const cd=()=>Gc.CancelToken.source(),ld=e=>Gc.isCancel(e),ud=e=>{Yu.setDefaultHeaders(e)},dd=e=>{ed={...ed,...e}},pd=e=>{td={...td,...e}},gd=()=>({...td}),hd=()=>({...ed});const fd=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),s=e.substring(t+1,n),a=Number(s)+1;return`${e.substring(0,t)}(${a})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),s=e.substring(t+1,n),a=Number(s);if(!Number.isNaN(a)){const s=a-1;return`${e.substring(0,t)}[${s}]${e.substring(n+1)}`}}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}};const md=class{static execute(e,t,n,s){const a=!Vy.isInfinityRuntime(),r={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{r[e]=n[e],delete n[e]})),delete n.nonFormProperties);const o={instruction:"string"==typeof t?"ADD":"INSERT",content:{...fC.unflatten(n)}},i=JSON.parse(JSON.stringify(o)),c=i.content.classID||i.content["@class"];delete i.content.classID;return{instruction:{target:fC.buildInstructionPageReference(s,e),content:{...a&&c?{"@class":c}:{},...i.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:o,displayPropertPayload:r}}};const Id=class{static execute(e,t,n,s,a,r,o,i){const c=!Vy.isInfinityRuntime(),l="string"==typeof n?`${t}(${n})`:`${t}[${n-1}]`,u=nC(".classID",`${a}${l}`,e)||nC(".@class",`${a}${l}`,e),d={instruction:"UPDATE",content:{...fC.unflatten(s)},isDefault:i},p={content:{...c&&u?{"@class":u}:{},...d.content},target:fC.buildInstructionPageReference(a,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return r||XA(sS({...d,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${a}${t}`,skipDirtyValidation:o})),p}};const Ed=class{static execute(e,t,n){return{target:fC.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const yd=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:fC.buildInstructionPageReference(e,t)}}static execute(e,t,n,s){s||XA(sS({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const Ad=class{static execute(e,t,n,s){return{target:fC.buildInstructionPageReference(s,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const Cd=class{static execute(e,t,n){const s=!Vy.isInfinityRuntime(),a={instruction:"REPLACE",content:{...fC.unflatten(t)}},r=a.content.classID||a.content["@class"];delete a.content.classID;return{instruction:{target:fC.buildInstructionPageReference(n,e),content:{...s&&r?{"@class":r}:{},...a.content},instruction:"REPLACE"},actionPayload:a}}};const Sd=class{static execute(e,t){return{target:fC.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const _d=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const Nd=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.hasEncryptedContent=!1,this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new _d(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}applyEncryptedContent(e){void 0!==e&&(this.current.instruction.encryptedContent=e)}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const s=e.getValue(this.target)||[];if(Array.isArray(s)){if(t)return void s.forEach(((e,s)=>{t.forEach((t=>{const a=Gm(t),r={};let o=!0;n&&(r[Gm(n)]=crypto.randomUUID(),o=!1);const i={[a]:fC.getIn(e,a),...r};this.update(i,s+1,o,{isDefault:!0,skipDirtyValidation:!0})}))}));s.forEach(((e,t)=>{if(n&&!e[Gm(n)]){const e={};e[Gm(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&s&&"object"==typeof s&&!Array.isArray(s)&&Object.keys(s).length>0&&this.processObjectRows(s,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((s=>{const a=e[s];t.forEach((e=>{const t=Gm(e),r={};let o=!0;n&&(r[Gm(n)]=crypto.randomUUID(),o=!1);const i={[`${t}`]:fC.getIn(a,t),...r};this.update(i,s,o,{isDefault:!0})}))}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,s){const{isDefault:a=!1,skipPageinstruction:r,skipDirtyValidation:o=!1,encryptedContent:i}=s,c=Id.execute(this.contextName,this.target,t,e,this.pageReference,n,o,a);if(!r){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=lC(fC.deepClone(n),e,s)}if(this.current?.automatic===a&&(this.current?.instruction?.groupIndex===t||this.current?.instruction?.listIndex===t)&&"UPDATE"===this.current?.instruction.instruction){const t=this.current.instruction.content;return this.current.instruction.content=lC(fC.deepClone(t),fC.unflatten(e),s),void this.applyEncryptedContent(i)}this.insertNode(c),this.applyEncryptedContent(i),a&&(this.current.automatic=!0)}}delete(e,t){const n=Ed.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||XA(sS({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,s){const{instruction:a,actionPayload:r={content:{}},displayPropertPayload:o={}}=md.execute(this.target,t,e,this.pageReference),{isDefault:i=!1,encryptedContent:c,skipDirtyValidation:l=!1}=s;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=lC(fC.deepClone(n),e,s)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=a:this.insertNode(a),this.applyEncryptedContent(c),n||(r.content={...r.content,...o},XA(sS({...r,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:s.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,skipDirtyValidation:l}))),i&&(this.current.automatic=!0)}replacePage(e,t,n,s,a){const r=s??this.pageReference,o=n??this.target,{instruction:i,actionPayload:c}=Cd.execute(o,e,r);this.insertNode(i),this.applyEncryptedContent(a),t||XA(sS({...c,context:this.contextName,referenceList:`${r}${fC.convertClipboardPageToPageRefNotation(o)}`}))}deletePage(e){const t=Sd.execute(this.target,this.pageReference);this.insertNode(t),e||XA(sS({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const s=Ad.execute(this.target,e,t,this.pageReference);this.insertNode(s),XA(sS({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=yd.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),yd.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){if(!this.current?.instruction||!e)return;const t=this.current.instruction.content||{};this.current.instruction.content=lC(fC.deepClone(t),e)}},Td={},Dd={},Pd={},Od=(e,t,n)=>{Td[e]||(Td[e]={}),Td[e][t]||(Td[e][t]={content:[]}),Dd[e]||(Dd[e]=[],Pd[e]=[]),Bm.isStateMachineExist(e,n,t)||Bm.setStateMachine(e,t,n,new Nd(t,n,e))},Rd=e=>fd.formatPageReference(e),bd=(e,t)=>{const n=Dd[e],s=Pd[e],a=Gm(t),r=a?.substring(0,a.indexOf("["));s?.indexOf(r)<0&&Pd[e].push(r),n?.indexOf(a)<0&&Dd[e].push(a)},vd=e=>{delete Dd[e]},xd=e=>Bm.buildPageInstructionsByContext(e),wd=e=>{Bm.clearStateMachines(e),delete Td[e]},Md=(e,t,n,s)=>{let[,a]=t.split(`${e}[${s}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(n).forEach((e=>{n[`${a}.${e}`]=n[e],delete n[e]})))},Ld=(e,t,n,s,a)=>{const{skipStateUpdate:r=!1,insertIfEmpty:o=!1,skipDirtyValidation:i=!1}=a||{},c=n.getContextName(),l=n.getReferenceList(),u=s||n.getPageReference(),d=Rd(l);Od(c,d,u),bd(c,`${l}[${t}]`),Md(l,u,e,t);const p={instruction:Vs.LIST_ACTIONS.INSERT,content:{...fC.unflatten(e)}};delete JSON.parse(JSON.stringify(p)).content.classID;const g=Bm.getStateMachine(c,u,d);o&&g?.root||g.insert(e,t+1,r,{c11nEnv:n,skipDirtyValidation:i})},Ud=(e,t,n=0,s={})=>{const{skipStateUpdate:a=!0,pageRef:r}=s,o=t.getContextName();let i=t.getReferenceList();const c=r||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(Fs.CONTENT)+Fs.CONTENT.length,s=e.lastIndexOf(`[${t}]`);return e.substring(n,s)})(c,n));const l=Rd(i);Od(o,l,c),bd(o,`${i}[${n}]`),Md(i,c,e,n);Bm.getStateMachine(o,c,l).update(e,n+1,a,s)},Fd=(e,t)=>{const[,n]=e.split("."),s=t?.split(".").pop();return n===s},Vd=e=>{const t=fC.getPropertyName(e),n=t.indexOf(".");return n>=0?t.slice(n+1):t},jd=(e,t,n)=>{const s={};return Object.values(e).forEach((e=>{if(Fd(e,n)){const n=Vd(e).split(".");if(n.length>1){let e=fC.getIn(t,n)??"";if(!e){const s=`!P!${n.join(":")}`;e=fC.getIn(t,s)??""}fC.setIn(s,n,e)}else{const e=fC.getIn(t,n)??"";s[n[n.length-1]]=e}}})),s},kd=(e,t,n,s,a)=>{const r=e.getValue(t)||{};n&&Object.keys(r).length>0&&e.clearErrorMessages({property:s?a:e.getStateProps().value})},Bd=(e,t,n)=>new Promise((s=>{const{skipPageInstructions:a=!1}=n,{selectionMode:r,selectionList:o,required:i}=t.getConfigProps(),c=r===Vs.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let u=t.getPageReference(),d=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,u,o);const p=t.getRawMetadata();let g=null;const h=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);h&&(d=p?.config?.dataRelationshipContext,g=u.concat(".").concat(d),u=g);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,s)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(s))(t,c,d,g),{datasource:{parameters:I={}}}=m,E={...I};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{e[Vd(t)]=t}))})(E,m,c),c){let n=o;n=Rd(n);const s=t.getValue(f)||[];Od(t.getContextName(),n,u);const r=[];let i=s.length;e.forEach((e=>{const t=jd(I,e,d),o={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=s.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!a){const s=Bm.getStateMachine(l,u,n);e.$selected?s.insert(t,p+1,!0,{}):s.delete(p+1,!0)}r.push({instruction:e.$selected?Vs.LIST_ACTIONS.SELECT:Vs.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),XA(sS({instruction:Vs.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:r}))}else{const n=jd(E,e[0],d),s=p?.config?.compositeKeys||[];if(t.getRawConfigProps().onlyAllowRefreshOnCompositeKeys&&s.length){const a=s?.reduce(((e,t)=>(e[Vd(t)]=t,e)),{})||{},r=jd(a,e[0],d);Object.keys(r).forEach((e=>{delete n[e],t.getActionsApi().updateFieldValue(`.${e}`,r[e],h?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,r[e])}));const o=(e=>e.length>1&&e.pop()||"")(u.split(/\[\d+\]/gm));t.getActionsApi().updateFieldValue(o,n,h?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(o,n)}else Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],h?{contextPageReference:u}:{}),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,n[e])}))}kd(t,f,i,c,d),s()})),$d=e=>{if(!e)return!1;const t=(n=e,Bm.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const Gd=(e,t,n={})=>{const{skipStateUpdate:s=!1}=n,a=e.getPageReference(),r=Rd(t);Od(e.getContextName(),t,a);Bm.getStateMachine(e.getContextName(),a,r).deleteAll(s);const o=Bm.getUnConnectedStateMachines(e.getContextName())||{};Object.keys(o).forEach((e=>{e.includes(`${a}${r}`)&&e!==`${a}${r}`&&(o[e]=null)}))},Wd=e=>({insert:(t,n,s,a)=>Ld(t,n,e,s,a),update:(t,n,s)=>Ud(t,e,n,s),updateProperty:(t,n,s)=>((e,t,n,s={})=>{const a=n.getPageReference(),{stateMachineTarget:r}=Bm.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),`${a}${e}`.endsWith("]"));if(!r){let e=a.substring(0,a.lastIndexOf("["));e||(e=a.substring(0,a.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&Od(n.getContextName(),t,e)}Bm.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,s)})(t,n,e,s),deleteEntry:(t,n,s)=>((e,t,n,s)=>{const{skipStateUpdate:a=!1}=s||{},r=t.getContextName(),o=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+o}[${e}]`,l=Rd(o);Cu({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:r,isListEntry:!0,deletingIndex:e}),Od(r,l,i),bd(r,`${o}[${e}]`);const u=Bm.getStateMachine(r,i,l);"string"==typeof e?u.delete(e,a):u.delete(e+1,a);const d=Bm.getUnConnectedStateMachines(r)||{};Object.keys(d).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(d[e]=null)}))})(t,e,n,s),reorder:(t,n)=>((e,t,n)=>{const s=n.getContextName(),a=n.getReferenceList(),r=n.getPageReference(),o=Rd(a);Od(s,o,r),hu.deleteAllListNodes(s,`${r}${o}`,!1),bd(s,`${a}[${t}]`),Bm.getStateMachine(s,r,o).move(e+1,t+1);const i=Bm.getUnConnectedStateMachines(s)||{};Object.keys(i)?.forEach((e=>{e.includes(`${r}${o}`)&&e!==`${r}${o}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Bd(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:s}=t.getConfigProps(),a=[];let r=t.getPageReference();const o=n===Vs.LIST_SELECTION_MODE.MULTI;let i=o?s.substring(1):r.substring(r.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=r.concat(".").concat(i),r=l);const u=o?`${r}${s}`:r;let d=t.getValue(u)||[];if(Array.isArray(d)||(d=[d]),e)return Promise.resolve(d);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return d.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const s=n.substring(n.lastIndexOf(".")+1);return Fd(n,i)&&e[s]?`${t}${e[s]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),s=e.getContextName(),a=e.getPageReference(),r=t,o=`${a}${t}`;return new Promise((t=>{let i=r;i=Rd(i),Od(s,i,a),Bm.getStateMachine(s,a,i).deleteAll(),kd(e,o,n,!0,r),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:s,selectionList:a,renderMode:r,referenceList:o}=e.getComponentConfig();let i;if(s===Vs.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===r&&o&&(i=e.getStateProps().referenceList),i){i=Rd(i);const s=Bm.getStateMachine(n,"",`${e.getPageReference()}${i}`);s&&(s.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,s)=>((e,t,n,s)=>{const a=e.getContextName(),r=e.getPageReference(),o=Rd(t);Od(a,o,r),Bm.getStateMachine(a,r,o).initPageInstructions(e,n,s)})(e,t,n,s),deleteAll:(t,n)=>Gd(e,t,n),replacePage:(t,n,s)=>((e,t,n,s)=>{const{skipStateUpdate:a=!1}=s||{},r=e.getPageReference(),o=e.getContextName();Od(o,t,r),bd(o,fC.buildInstructionPageReference(r,t)),Bm.getStateMachine(o,r,t).replacePage(n,a)})(e,t,n,s),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:s=!1}=n||{},a=e.getPageReference(),r=e.getContextName();Od(r,t,a),bd(r,fC.buildInstructionPageReference(a,t)),Bm.getStateMachine(r,a,t).deletePage(s)})(e,t,n)});const Hd=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?fC.mergeDeep(e,this.fieldDefaults):fC.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},qd="downloadAttachment",zd={};function Yd(e,t){const n=Ls.getDefaultQualifiedName(t);return n!==t&&n in e?e[n]:e[t]}const Kd=e=>{const t=cd();return zd[e]=t,t};function Qd(e){const t=new URL(e,window.location.origin),n=Vy.environmentInfoObject?.encCSRFToken;return n&&t.searchParams.set("pzencv1zzz",n),t.searchParams.set("mode","stream"),t.toString()}async function Jd(e){const t=function(){if("undefined"!=typeof window&&"showSaveFilePicker"in window)return window.showSaveFilePicker}();if(!t)return null;try{const n=await t({suggestedName:e}),s=await n.createWritable();return{fh:n,writable:s}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return null;throw e}}async function Xd(e,t,n){const s=await Jd(t);if(s)try{const t=await async function(e,t){let n;await rd(e,{method:"GET",adapter:async e=>(n=e,{data:null,status:204,statusText:"No Content",headers:{},config:e}),withoutDefaultHeaders:!1},t,{includeRemoteSystemIdIfPresent:!0});const s={};return Object.entries(n?.headers??{}).forEach((([e,t])=>{"string"==typeof t&&(s[e]=t)})),s}(e,n),a=await fetch(e,{method:"GET",headers:t});if(!a.ok)throw new Error(`Download failed: ${a.status}`);if(!a.body)throw new Error("Download response has no body");await a.body.pipeTo(s.writable)}catch(e){throw await s.writable.abort().catch((()=>{})),e}}const Zd=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),s=e=>e.some((e=>n.includes(e)));s(["excel","spreadsheet"])?t="document-xls":s(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},ep=e=>{const t=Yd(e,"pyCategoryLabel"),n=Yd(e,"pyCategoryName"),s=Yd(e,"Category"),a=Yd(e,"pxCreateOpName"),r=Yd(e,"pxCreateOperator"),o=e.CreateUser,i=Yd(e,"pyFileName"),c=Yd(e,"FileName"),l=Yd(e,"FileExtension"),u=Yd(e,"pyAttachName"),d=Yd(e,"pyMimeFileExtension"),p=Yd(e,"MimeType"),g=Yd(e,"pzInsKey"),h=Yd(e,"ID"),f=Yd(e,"pyAttachmentLink"),m=Yd(e,"AttachmentURL"),I=Yd(e,"pxAttachmentCreateTime"),E=Yd(e,"pxCreateDateTime"),y=Yd(e,"CreateDateTime"),A=Yd(e,"pxStorageType"),C=Yd(e,"pyFileSize"),S=Yd(e,"error"),_=Yd(e,"thumbnail"),N=Yd(e,"pyIsLargeAttachment"),T=Yd(e,"IsLargeAttachment");let D,P,O,R;return D=t?`${t},`:n?`${n},`:s,P=a||(r||o?.Name||""),O=i||(l&&""!==l&&c?.endsWith(l)?c.substring(0,c.lastIndexOf(l)-1):c),R=u&&i?u.startsWith(i)&&u.split(".").length-1===i.split(".").length?u.split(".").pop():"":l??"",{props:{meta:`${D} ${P}`,name:u??c??"",icon:Zd(d??p??""),error:S??null,thumbnail:_??null},responseProps:{fileName:u??c??"",name:O??"",category:n??s??"",extension:R,ID:g??h??"",mimeType:d??p??"",attachmentURL:f??m??"",createUser:P??"",createDateTime:I??E??y??"",responseType:e.responseType??(h?"binary":null),localAttachment:!!e.localAttachment,storageType:A??void 0,fileSize:C??void 0,isLargeAttachment:void 0!==N?"true"===N:T}}},tp=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,Ls.getDefaultQualifiedName("pyCount"))){n=!0;const s=Yd(e,"pxResults");t=Array.isArray(s)?s.filter((e=>!!Yd(e,"pzInsKey"))).map((e=>ep(e))):[]}else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>Yd(e,"ID")&&Yd(e,"FileName")||Yd(e,"pzInsKey"))).map(ep)}else t=[];const s=e?Yd(e,"pyCategoryName"):void 0;return{hasUploadedFiles:t.length>0,categoryName:("string"==typeof s?s:"")||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},np={uploadAttachment:(e,t,n,s,a,r)=>{const o=new FormData;o.append("appendUniqueIdToFileName","true"),o.append("file",e),a&&o.append("contextID",a),r&&o.append("category",r);const{restApi:i,reqType:c}=ES("uploadAttachment",{}),l={"Content-Type":"multipart/form-data"};return Boolean(Vy?.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)&&(l["x-pega-stream-support"]="repository-stream"),rd(i,{method:c,headers:l,body:o,onUploadProgress:t,signal:Kd(e.ID).token},s).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(ld,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete zd[e.ID]))},linkAttachmentsToCase:(e,t,n,s)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(a.signal=Kd(n).token)}const{restApi:r,reqType:o}=ES("linkCaseAttachment",{caseID:e});return rd(r,{...a,body:{attachments:t},method:o},s)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:s,reqType:a}=ES("getCaseAttachments",{caseID:e,includeThumbnail:n});return rd(s,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:s,reqType:a}=ES("getAttachmentCategories",{caseID:e,type:t});return rd(s,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n,s,a)=>{e=e.replace(/\//g,"_");const{restApi:r,reqType:o}=ES(qd,{attachmentID:e}),i=a&&r?(()=>{const e=new URL(r,window.location.origin);return e.searchParams.set("encoding",a),e.toString()})():r;return function(e){const t=Vy.environmentInfoObject;return!(!t?.pyFeatures?.pyEnableStreamingForRepositories||"repository"!==e?.toLowerCase()||"EMBED"===t?.renderingMode&&!Vy.isPegaMobile())}(s)&&r?async function(e){return await $u(hd()),{data:Qd(e)}}(r):rd(i,{method:o,..."binary"===n&&!a&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:s,reqType:a}=ES("editAttachment",{attachmentID:e});return rd(s,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:s}=ES("deleteAttachment",{attachmentID:e});return rd(n,{method:s},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:s}=ES("downloadDocument",{documentID:e});return rd(n,{method:s},t)},deleteDocument:(e,t,n)=>{const{restApi:s,reqType:a}=ES("deleteDocument",{caseID:e,documentID:t});return rd(s,{method:a},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||Ls.getDefaultQualifiedName("D_pxGetDocumentURL");return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{zd[e]&&(zd[e].cancel(),delete zd[e])},buildFilePropsFromResponse:ep,getAttachmentURL:e=>{const{restApi:t}=ES(qd,{attachmentID:e});return t},prepareAttachmentData:tp,validateAttachments:(e,t)=>{let n=e;if((e=>null!==e&&"object"==typeof e&&"hasUploadedFiles"in e&&"boolean"==typeof e.hasUploadedFiles)(t)){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=tp(t);0===e.length&&(n="")}return n},streamDownloadAttachment:async(e,t,n)=>{if(!Vy.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)return;e=e.replace(/\//g,"_");const{restApi:s}=ES(qd,{attachmentID:e});s&&(await $u(hd()),await Xd(Qd(s),t,n))}};let sp=!1;const ap=e=>{sp=e},rp=new Map,op=(e,t)=>{rp.set(e,t)},ip=e=>{rp.delete(e)};class cp{constructor(){this.validators={}}static messageDispatcher(e,t,n,s,a,r){if(s){const o=[];o.push({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:s,...r??{}}),Su({messages:o,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,s,a,r){const{required:o,value:i}=r;let c=null;if(!("true"!==o&&!0!==o)){let o=s;switch(e){case"radiobuttons":o=i;break;case"attachment":o=np.validateAttachments(s,i);break;case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),cp.messageDispatcher(t,n,a,c,fd.getFieldLabel(r),{subType:"required"})}return c}validateType(e,t,n,s,a,r){let o=null;const i={pageReference:n,context:a,property:t,...r};let c=Hd.getDefaultsforType(r?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(s,i),(""!==s||Hd.getDefaultsforType(r?.componentName||"")?.showErrorWhenEmpty)&&cp.messageDispatcher(t,n,a,o,r?.label));const l=r?.validationType;return c=l&&Hd.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(s,i),cp.messageDispatcher(t,n,a,o,r?.label)),o}validate(e,t,n,s={}){const{context:a,disabled:r,readOnly:o,pageReference:i,skipRequiredValidation:c}=s;let l=null;return r||o||(c||sp||(l=this.validateRequired(e,t,i,n,a,s)),l||(l=this.validateType(e,t,i,n,a,s))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const lp=new cp,up=e=>{e&&DA(e)},dp=(e,t)=>{e.DeclareExpressions&&t.context&&Eo({[t.context]:e.DeclareExpressions})},pp=(e,t,n=!1)=>{const s=fC.getIn(e,Vs.RESOURCES);s&&(up(s),dp(s,t)),n||DS({...e,options:t})};class gp{static createCase(e,t){const{caseInfo:n,startingFields:s,flowType:a,viewType:r=pm.PAGE,pageName:o,context:i=Vs.APP.APP,debugInfo:c,headers:l,theType:u,retrieveActionViewForNewObject:d=!1}=t;let p={};n&&n.content&&(p=n.content);const{content:g={},pageInstructions:h}=gp.getExternalCaseOrObjectContent(e,d,i);let f={[gp.getKeyBasedOnWorkType(e)]:e,content:{...p,...s,...g}};if(f={...f,...h&&{pageInstructions:h},...!aI.isObjectCaseType(e)&&{processID:a}},"CREATE_EXTERNAL_CASE"===u){const e=ZA(i)?.caseInfo?.content;if(e){const t=fC.pruneKeys(e,new Set(["pxObjClass",Ls.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",Ls.getDefaultQualifiedName("EmbedListUUID__")]),!1);f.content[Vs.getDefaultQualifiedName("pyAddCaseContextPage")]=t}}const m=gp.getObjectTypeViewPayload(d,e);return mp(aI.getRouteKeyForCreateWork(e,d),{body:f,queryPayload:{...m,...aI.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:r,params:{pageName:o}},headers:{...l,...c&&{...Yu.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:f,headers:hm(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?aI.shouldUseUnifiedHandling()?{casetypeID:t,actionID:Vs.getDefaultQualifiedName(Vs.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:t,actionID:Vs.getDefaultQualifiedName(Vs.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,t,n)=>{const s=aI.isExternalObject(e),a=aI.isExternalCaseType(e);if((a||s)&&!t){const e=fm(n,{isExternalObject:Boolean(!a&&s)}),{content:t,pageInstructions:r}=e.content;return{content:t,pageInstructions:r}}return{}};static getKeyBasedOnWorkType=e=>aI.shouldUseUnifiedHandling()?"caseTypeID":aI.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const hp=gp,fp=()=>({registerHeader:(...e)=>Yu.registerHeader(...e),unRegisterHeader:(...e)=>Yu.unRegisterHeader(...e),getRegisteredHeaders:()=>Yu.getRegisteredHeaders()}),mp=(e,{body:t={},queryPayload:n={},cancelTokenSource:s,headers:a={},responseType:r},o,i)=>{const{restApi:c,reqType:l}=ES(e,n),u={method:l,headers:a,body:t,...r&&{responseType:r}};s&&(u.signal=s.token);const d="createWork"===e?aI.appendExcludeQueryParamToUrl(c):c;return rd(d,u,o,i??{})},Ip=(e,{method:t="GET",body:n={},headers:s={},withoutDefaultHeaders:a=!1},r)=>{e.startsWith("http:")||e.startsWith("https:")||(e=an()+e);return rd(e,{method:t,headers:s,body:n,withoutDefaultHeaders:a},r)},Ep=e=>Uy.doesRestApiExist(e),yp=()=>cd(),Ap=e=>ld(e),Cp=e=>{sd(e)},Sp=()=>hp,_p=new Set;function Np(e){try{const t=new URL(e);"https:"!==t.protocol&&"http:"!==t.protocol||_p.add(t.origin)}catch{}}function Tp(e){let t,n;try{t=new URL(e,window.location.href).origin}catch{throw new Error("Blocked: malformed URL")}try{n=window.location.origin??new URL(window.location.href).origin}catch{n=""}if(t!==n&&!_p.has(t))throw new Error(`Blocked: untrusted script origin "${t}"`)}const Dp="getCustomComponent",Pp="text/javascript";function Op(e){return"localhost"===e||"127.0.0.1"===e}function Rp(e){let t;try{t=new URL(e).hostname}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if(Op(t)){if(!function(){try{return Op(new URL(window.location.href).hostname)}catch{return!1}}())throw new Error("Component fetch blocked: localhost dev server is only allowed from loopback pages")}else Tp(e)}const bp=new class{getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",s=0;return e.forEach((e=>{n+=`${0===s?"?":"&"}field${s}=${e.field}&value${s}=${e.value}`,s+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const s=Vy.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,s);let r=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(r=this.loadAndCustomerComponentsConfig(t,e));const o=[],i=Vy.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([a,r]),[n,s]=t,i=[];for(const t of s)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);o.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([a,r,e]).then((e=>{const t=this.mergeComponentList(e);o.push(...t)}))}if(n.alternateDesignSystemURL&&1===o.length){const s=await this.getSvcComponentsConfigADS(e,t,n);o[0].alternateDesignSystemConfig=s}return{data:{components:o}}}mergeComponentList=e=>{const[t=[],n=[],s=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,r=s.reduce(((e,s)=>(t===s.name&&n===s.type&&a===s.subtype&&(e=s),e)),{});return Object.keys(r).length>0?{...e,alternateDesignSystemConfig:{...r}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((s=>{let a=!0;e.forEach((e=>{Array.isArray(s[e.field])?s[e.field].includes(e.value)||(a=!1):s[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,s.allowedApplications)&&n.push(s)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const s=Vy.environmentInfoObject?.pyInfinityStaticService;if(s){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync(Ls.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(e)))}async getSvcComponentsConfigCombinedUrl(e,t,n){const s=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(s,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&a?.data?.components?.length>0&&(a.data.components=a.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===a?.data?.components?.length){const s=await this.getSvcComponentsConfigADS(e,t,n);a.data.components[0].alternateDesignSystemConfig=s}return a}getSvcComponentsConfigADS(e,t,n){const s=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(s,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){try{const t=Vy.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:s,callUrl:a}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[a]||(this.imageBlobUrlCache[a]=this.fetchImage(n,s,a,t)),this.imageBlobUrlCache[a]}catch(e){return Promise.resolve(null)}}buildImageRequest(e,t){let n,s="getBinaryFile",a=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,r=e.match(t);if(r){const e=r[1]?.trim();if(!e)throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id");s="getOperatorImage",n={user_ID:e.toLowerCase()}}else n={fileID:e};a=ES(s,n)?.restApi||a}return{callUrlKey:s,queryPayload:n,callUrl:a}}fetchImage(e,t,n,s){return s?mp(e,{queryPayload:t}).then((e=>{const n=this.decodeBase64ToByteArray(e.data),s=this.getMimeTypeFromKey(t?.fileID||t?.user_ID||""),a=new Blob([n],{type:s});return window.URL.createObjectURL(a)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,s=new Uint8Array(n);for(let e=0;e<n;e+=1)s[e]=t.charCodeAt(e);return s}getMimeTypeFromKey(e){const t={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"},n=e.toLowerCase().split("!").pop()||"";return t[n]?t[n]:"application/octet-stream"}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=Vy.environmentInfoObject?.pyInfinityStaticService;if(t){const t=Vy.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?fC.parsePegaDateTimeToTimestamp(t):null,s=`${e}${n?`?v=${n}`:""}`;return(await mp(Dp,{queryPayload:{componentName:s}})).data}const n=Vy.environmentInfoObject?.pyC11nDXCBDevURL;n&&Rp(n);const s=n?`${n}/index.js`:`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,a=await fetch(s,n?{}:{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!a.ok)throw new Error(a.statusText);return await a.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e,t){try{const n=Vy.environmentInfoObject?.pyInfinityStaticService,s=Vy.environmentInfoObject?.pyC11nDXCBDevURL;let a=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(s){const e=s.replace(/\/+$/,"");Rp(e),a=`${e}/index.js`}if(n&&!s){const n=Vy.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=fC.parsePegaDateTimeToTimestamp(n),a=fC.parsePegaDateTimeToTimestamp(t),r=[];s&&r.push(`v=${s}`),a&&r.push(`libV=${a}`);const o=r.length?`${e}?${r.join("&")}`:e,i=await mp(Dp,{queryPayload:{componentName:o}});return void this.appendCustomScriptToHead(i.data)}if(n||s){if("undefined"==typeof document)return;const e=document.createElement("script");return e.src=a,e.type="text/javascript",e.onerror=()=>console.error("Error while appending custom component map"),void document.head.appendChild(e)}const r=await fetch(a,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});r.ok||console.error("Error while fetching custom component map");const o=await r.text();this.setCCV2LibId(e),this.appendCustomScriptToHead(o)}catch(e){console.error("Exception while appending custom component map (or load blocked):",e)}}async appendCustomScriptToHead(e){if("undefined"!=typeof document)try{const t=document.createElement("script");t.src=window.URL.createObjectURL(new Blob([e],{type:Pp})),t.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(t)}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((s=>{if("undefined"==typeof document)return void n(e);const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([s],{type:Pp})),a.onload=()=>t(e),a.onerror=()=>n(e),document.head.appendChild(a)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,_p.clear(),e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Np(this.staticServerURL),Np(this.appStaticUrl)):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Np(this.staticServerURL)):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Np(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,s)=>{if("undefined"==typeof document)return void s(e);const a=document.createElement(t);if("script"===t){const t=a;t.onload=()=>{n(e)},t.onerror=()=>{s(e)},t.type=Pp,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=a;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(a)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const s=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=n?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(t.includes(".js")?s.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(s)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(a.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),s=JSON.parse(n),r=s?.tenant_id,{restApi:o,reqType:i}=IS("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},c=`${this.appStaticUrl}${o}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},vp="component-loader",xp={},wp=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=bp.getLoader(),s=t||bp.staticServerURL;if(bp.getLoader(vp))return bp.getLoader(vp)(e,s);const a=new Set(Object.keys(xp)),r=e.flatMap((e=>{if(a.has(e))return[];const t=Co.getComponent(e);if(!t){const t=`${bp.getConstellationServiceUrl()}/v860/${bp.getAppAlias()}/component/${e}.js`;return a.add(e),[n(t,bp.getTypes.SCRIPT)]}const r=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${s}${e}`,bp.getTypes.SCRIPT))),o=(t.styles||[]).map((e=>n(`${s}${e}`,bp.getTypes.STYLE)));return a.add(e),[...r,...o]}));return Promise.all(r.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))},Mp="component-state-lru-index";function Lp(e){return"object"==typeof e&&null!==e&&"key"in e&&"accessedAt"in e&&"string"==typeof e.key&&"number"==typeof e.accessedAt}function Up(){try{const e=sessionStorage.getItem(Mp);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Lp):[]}catch{return[]}}function Fp(e){try{sessionStorage.setItem(Mp,JSON.stringify(e))}catch{}}function Vp(e){const t=Up().filter((t=>t.key!==e));t.unshift({key:e,accessedAt:Date.now()}),Fp(t)}const jp=()=>"undefined"!=typeof sessionStorage?sessionStorage:null;const kp=new class{#r;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#r=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t,n)=>{jp()?n?.managed&&"FULL_PORTAL"!==Vy.getRenderingMode()||(jp()?.setItem(this.getNormalizedKey(e),JSON.stringify(t)),n?.managed&&(Vp(this.getNormalizedKey(e)),function(e){const t=Up();if(t.length<=100)return[];const n=[],s=t.slice(0,100),a=t.slice(100);for(const t of a){try{e(t.key)}catch{}n.push(t.key)}Fp(s)}((e=>{jp()?.removeItem(e)})))):console.error("Session Storage not found")};getComponentState=(e,t)=>{if(t?.managed&&"FULL_PORTAL"!==Vy.getRenderingMode())return;const n=jp()?.getItem(this.getNormalizedKey(e))??null,s=n?fC.isValidJson(n):void 0;return t?.managed&&null!=(s??n)&&Vp(this.getNormalizedKey(e)),s||n};removeComponentState=(e,t)=>{t?.managed&&"FULL_PORTAL"!==Vy.getRenderingMode()||(jp()?.removeItem(this.getNormalizedKey(e)),t?.managed&&function(e){const t=Up(),n=t.filter((t=>t.key!==e));n.length!==t.length&&Fp(n)}(this.getNormalizedKey(e)))};fetchUserSettings=async()=>{if(Ep("getUserSettings")){const{restApi:e,reqType:t}=ES("getUserSettings");rd(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{Vy.getUserSettings()?this.userSettings=Vy.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return fC.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let n;if(!Ep("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=ES("updateUserSettings");const{restApi:s,reqType:a}=n;return rd(s,{method:a,body:fC.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const s=n.clearOnCancelForContext;if(s&&(Object.hasOwn(this.contextMapToClearOnCancel,s)?this.contextMapToClearOnCancel[s].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[s]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#r){this.#r=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};vu.subscribe(Vs.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}getURLParam(e,t){let n=new URL(globalThis.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!Vy.shouldUseURLParams())return;const s=new URL(globalThis.location.href);if(t=n?btoa(t):t,s.searchParams.get(e)===t)return;s.searchParams.set(e,t);globalThis.history.pushState({type:"ui-navigation"},"",s)}setURLParams(e){const t=new URL(globalThis.location.href);Object.entries(e).forEach((([e,n])=>{t.searchParams.set(e,n)}));globalThis.history.pushState({type:"update-history"},"",t)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const Bp=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{xu.isOnline()&&t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&XA({type:oa,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>{setTimeout((()=>t(e)),this.pauseDuration)}));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&XA({type:ia,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}};const $p=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,s,a="unknown",r,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:s,actionPayload:r};return this.actionMgrActions[e]=i,o&&Bp.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,s;""===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,s=t}));if(!n||!s)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,a,n,s,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,n=!0){const s=this.actionMgrActions[e];let a=e;return s?(setTimeout((()=>{s.resolve(t)}),0),Bp.disableLoadingIndicator(s.actionPayload,n)):a=null,a}rejectActionByID(e,t=!0,n){const s=this.actionMgrActions[e];let a=e;return s?(s.reject(n),Bp.disableLoadingIndicator(s.actionPayload,t)):a=null,a}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=Bs.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=js,e.gadgetId=t.gadgetId??aI.getUniqueGadgetId(),e.name=t.name,e.isRemoteCase=!0,e.skipSemanticUrl=!0,na}};class Gp{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const Wp=Gp,Hp=(e,t,n,s)=>Uy.getResolvedSemanticURL(e,t,n,s),qp={getResolvedSemanticURL:Hp,getActions:()=>({ACTION_OPENWORKBYHANDLE:Ya,ACTION_SHOWDATA:Ha,ACTION_SHOWVIEW:Wa,ACTION_GETOBJECT:Lr,ACTION_SHOWINSIGHT:qa,ACTION_SHOWDASHBOARD:za}),updateSemanticURLAndDocumentTitle:(e,t)=>Uy.updateSemanticURLAndDocumentTitle(e,t),getSemanticURLForToaster:(e,t,n=!1,s)=>Hp(n?Lr:Ya,{caseClassName:e},{[n?"objectID":"workID"]:t},s)},zp={CASE_INFO:`${Vs.DATA}.${Vs.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${Vs.DATA}.${Vs.CASE_INFO.CASE_TYPE_ID}`,CASE_INFO_ID:`${Vs.DATA}.${Vs.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${Vs.DATA}.${Vs.CASE_INFO.BUSINESS_ID}`},Yp=e=>fC.getIn(e,Vs.getProperty(zp.CASE_CLASS_NAME),Vs.EMPTY_STRING),Kp=e=>fC.getIn(e,Vs.getProperty(zp.CASE_INFO_ID),Vs.EMPTY_STRING),Qp=(e,t)=>{const n=Kp(t);fC.setIn(e,"key",n)},Jp=e=>fC.getIn(e,Vs.getProperty(zp.CASE_INFO),{}),Xp=e=>{const t=JA();if(!e)return!1;const n=Ws(e),s=iy(n),a=iy(e);if(!s||!a)return!1;const r=xE(s,n),o=xE(a,e);if(!r||!o)return!1;const{key:i}=r;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},Zp=e=>{const t=Kp(e),n=fC.getIn(e,Vs.getProperty(zp.BUSINESS_ID),Vs.EMPTY_STRING),s=t.toLowerCase().includes(n.toLowerCase())?n:t,a=Yp(e);return{businessID:n,caseType:a,resolvedURL:qp.getSemanticURLForToaster(a,s,aI.isObjectCaseType(a))}};const eg=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const s=Xm(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:a}=lp.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,s);return a?{status:!1,message:a}:{status:!0}}validateEmail(e,t={}){const n=lp.getValidator("email");if(!n)return{status:"success"};const s=n(e,t);return s?{status:"failure",message:s}:{status:"success"}}},tg="OPEN_PROCESS_ACTION",ng="OPEN_ASSIGNMENT",sg="DELETE_CASE_IN_CREATE_STAGE",ag="SAVE_AND_CLOSE",rg=e=>({type:ag,payload:e}),og="DELETE_WORK",ig=e=>({type:og,payload:e});const cg=class{static getSavableDataPage(e){return jA(e)}static getLookUpDataPage(e){return BA(e)}static getLookUpDataPageInfo(e){return $A(e)}static getDataPageKeys(e){return kA(e)}};const lg=class{static getPropertyName(e){return No.getPropertyName(e)}static isProperty(e){return No.isProperty(e)}static getLeafPropertyName(e){return No.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class ug{static createContainerPConnect(e,t,n,s=!1){const{accessedOrder:a,items:r}=e;if(a&&r){const e=a[a.length-1];if(r[e]?.view&&Object.keys(r[e].view).length>0){const a=r[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=a,{viewName:l,viewContext:u}=this.processRootViewDetails(i,a,t);if(!l)return null;return xf({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:s||n===PE.WORKAREA||n===PE.MODAL||l===Vs.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:s,name:a}={}}=e,{context:r}=t;let o=a,i=s;const c=lg.isProperty(a),l=lg.isProperty(s);if(l){const e=lg.getPropertyName(s);i=nC(`.${e}`,e.startsWith(".")?n:"",r)}if(i||(i=n),c){const e=lg.getPropertyName(a);o=nC(`.${e}`,i,r)}return c&&l&&""!==o&&(o=a,i=s),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let s,a;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=GE(e),r=xE(e,t);r&&({key:s,flowName:a}=r)}t.addContainerItem({semanticURL:"",key:s,flowName:a,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(Vs.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(Vs.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(Vs.CASE_INFO.ACTIVE_ACTION_ID),s=t.find((e=>e.ID===n));return s?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(Vs.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(Vs.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(Vs.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(Vs.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:s})=>{const a=e.map((e=>({...e,caseName:t,caseTypeID:s})));n=n.concat(a)})),n};static hasAssignments=e=>{const t=e.getValue(Vs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=ug.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||ug.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return ug.hasNotificationMessages(t)||!ug.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:s}=t;return s&&(!ug.isCaseWideLocalAction(n)||ug.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(Vs.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(Vs.CASE_INFO.ASSIGNMENT_LABEL),s=e.getValue(Vs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],a=ug.getChildCaseAssignments(e)||[];let r=JSON.parse(JSON.stringify(a));r=r.map((e=>(e.isChild=!0,e)));const o=[...s,...r];let i=JSON.parse(JSON.stringify(o));return t&&!ug.showTodo(e)&&(i=i.map((t=>(t.name=ug.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const dg=ug;const pg=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=$p.getNextActionMgrId();let n,s;const a=new Promise(((e,t)=>{n=e,s=t}));if(!n||!s)throw new Error("resolveFn or rejectFn is not defined.");return $p.register(t,a,n,s,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=Da,n=this.c11nEnv,s={context:n.getContextName(),name:n.getContainerName(),type:Vs.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:r}=this.containerManagerPromise(t),o={...s,...e,actionMgrID:a};return XA(xC(o)),r}addContainerItem(e){const t=Oa,n=this.c11nEnv,s=n.getMetadata(),{children:a}=s||{};let r;Array.isArray(a)&&a.length>0&&([r]=a);const o=n.getContextName(),i=n.getContainerName(),c=Hs(i,o,e?.containerType===Vs.CONTAINER_TYPE.SINGLE),l=jr(i,o),u={root:{...r,config:{...r?.config,context:r?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[Vs.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),g={...u,...e,actionMgrID:d};return XA(MC(g)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=Va,n={context:qE(e.containerItemID),target:iy(e.containerItemID)},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),r={...n,...e,actionMgrID:s};return XA(kC(r)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Fa,n={target:iy(e.containerItemID)},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),r={...n,...e,actionMgrID:s};return XA(WC(r)),a}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Ra,n={context:qE(e.containerItemID),target:iy(e.containerItemID)},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),r={...n,...e,actionMgrID:s};return XA(qC(r)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Pa,n=ay(e),{actionMgrID:s,promise:a}=this.containerManagerPromise(t),r={...n,...e,actionMgrID:s};return XA(wC(r)),a}addTransientItem(e){const{id:t,data:n,sourceContainerItemId:s}=e,a=this.c11nEnv.getContextName(),r=zs(t,a),o=py(a);if(r&&o.includes(r))return r;let i=n;if(s){const e=ZA(s);if(!e)throw new Error(`addTransientItem: source container item "${s}" not found in store`);i=fC.deepClone(e)}return XA(LC({transientItemID:r,contextName:a,target:iy(a),data:i})),r}updateTransientData(e){const{transientItemID:t,data:n}=e,s=this.c11nEnv.getContextName();if(t){if(!py(s).includes(t))return;XA(UC({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:s,transientItemID:a}=e;if(a&&s){if(!py(t).includes(a))return;XA(YC({target:n,containerItemID:s,transientItemID:a}))}}createContainerPConnect(e,t,n,s=!1){dg.createContainerPConnect(e,t,n,s)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return ey(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return BE(e,t)}};function gg(e,t){return $l((function(n,s){var a=null,r=0,o=!1,i=function(){return o&&!a&&s.complete()};n.subscribe(Gl(s,(function(n){null==a||a.unsubscribe();var o=0,c=r++;jl(e(n,c)).subscribe(a=Gl(s,(function(e){return s.next(t?t(n,e,c,o++):e)}),(function(){a=null,i()})))}),(function(){o=!0,i()})))}))}function hg(e,t){return $l((function(n,s){var a=0;n.subscribe(Gl(s,(function(n){s.next(e.call(t,n,a++))})))}))}function fg(e,t,n){return void 0===n&&(n=1/0),sl(t)?fg((function(n,s){return hg((function(e,a){return t(n,e,s,a)}))(jl(e(n,s)))}),n):("number"==typeof t&&(n=t),$l((function(t,s){return function(e,t,n,s,a,r,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},g=function(e){return l<s?h(e):c.push(e)},h=function(e){r&&t.next(e),l++;var i=!1;jl(n(e,u++)).subscribe(Gl(t,(function(e){null==a||a(e),r?g(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?Bl(t,o,(function(){return h(e)})):h(e)};c.length&&l<s;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Gl(t,g,(function(){d=!0,p()}))),function(){null==i||i()}}(t,s,e,n)})))}function mg(e){return e&&sl(e.schedule)}function Ig(e){return e[e.length-1]}function Eg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return mg(Ig(e))?e.pop():void 0}(e);return Kl(e,n)}var yg=Wc((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ag=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return zc(t,e),t.prototype.lift=function(e){var t=new Cg(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new yg},t.prototype.next=function(e){var t=this;El((function(){var n,s;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=Qc(t.currentObservers),r=a.next();!r.done;r=a.next()){r.value.next(e)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;El((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;El((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,s=n.hasError,a=n.isStopped,r=n.observers;return s||a?cl:(this.currentObservers=null,r.push(e),new il((function(){t.currentObservers=null,ol(r,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,s=t.thrownError,a=t.isStopped;n?e.error(s):a&&e.complete()},t.prototype.asObservable=function(){var e=new bl;return e.source=this,e},t.create=function(e,t){return new Cg(e,t)},t}(bl),Cg=function(e){function t(t,n){var s=e.call(this)||this;return s.destination=t,s.source=n,s}return zc(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:cl},t}(Ag),Sg=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return zc(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,s=e._value;if(t)throw n;return this._throwIfClosed(),s},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Ag);function _g(e,t){return $l((function(n,s){var a=0;n.subscribe(Gl(s,(function(n){return e.call(t,n,a++)&&s.next(n)})))}))}class Ng extends Sg{constructor(e,t){super(t)}}const Tg=(...e)=>_g((t=>e.includes(t.type)));var Dg=new bl((function(e){return e.complete()}));function Pg(e){return e?function(e){return new bl((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Dg}const Og=(e,t,n)=>Ql((s=>("ERR_CANCELED"!==s?.code&&console.error(e,s),Eg(eS(e,s,t,null,n))))),Rg=(e,t)=>n=>new bl((s=>{let a={},r=0;return n.pipe(fg((n=>{const s=Date.now();let o;return o=t||Xt,o&&o(n,a)&&s-r<e?Pg():(a=n,r=s,Eg(n))}))).subscribe(s)})),bg=e=>{const{dataPageID:t,context:n,headers:s,containerItemID:a}=e,r={data_view_ID:t},{restApi:o,reqType:i}=ES("createDataObject",r),{content:c}=fm(a);return Kl(rd(o,{method:i,headers:s,body:{data:c.content,pageInstructions:c?.pageInstructions}},a)).pipe(hg((t=>({response:t.data,actionInPayload:e}))),Og("Error occurred during ajax call at createDataObject Epic",n))},vg=e=>{const{dataLookUp:t,context:n,headers:s,viewName:a,requestPayload:r}=e,o={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=ES("readDataObject",o);return Kl(rd(i,{method:c,headers:s,body:{dataViewParameters:r}},n)).pipe(hg((t=>({response:t.data,headers:hm(t.headers),actionInPayload:e}))),Og("Error occurred during ajax call at getDataObjectView Epic",n))},xg=e=>{const{dataPageID:t,context:n,headers:s,containerItemID:a,key:r}=e,o={data_view_ID:t},{restApi:i,reqType:c}=ES("updateDataObject",o),{content:l}=fm(a);return Kl(rd(i,{method:c,headers:{...s,"if-match":e?.etag},body:{data:{...l.content,...r},pageInstructions:l.pageInstructions||[]}},a)).pipe(hg((t=>({response:t.data,actionInPayload:e}))),Og("Error occurred during ajax call at updateDataObject Epic",n))},wg=e=>{const{lookupDatapage:t,context:n,headers:s,actionID:a,dataViewParameters:r}=e,o={data_view_ID:t,action_ID:a},{restApi:i,reqType:c}=ES("openDataObjectAction",o);return Kl(rd(i,{method:c,headers:s,body:{dataViewParameters:r}},n)).pipe(hg((t=>({response:t.data,headers:hm(t.headers),actionInPayload:e}))),Og("Error occurred during ajax call at getDataObjectView Epic",n))},Mg=e=>{const{savableDatapage:t,context:n,headers:s,actionID:a,keys:r,containerItemID:o,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:a};let{restApi:l}=ES("submitDataObjectAction",c);const{reqType:u}=ES("submitDataObjectAction",c),{content:d}=fm(o);return l=mI(i,l),Kl(rd(l,{method:u,headers:{...s,"if-match":e?.etag},body:{data:{...d?.content,...r},pageInstructions:d?.pageInstructions||[]}},n)).pipe(hg((t=>({response:t.data,actionInPayload:e}))),Og("Error occurred during ajax call at getDataObjectView Epic",n))};const Lg=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,s,a){const r={viewName:e,pageReference:n,contextName:s,isInProgress:!0,active:!0,caseKey:t};this.components[s]=this.components[s]||{},this.components[s][a]=r}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:s,pageReference:a}=n;CI(e,s,t,a,{})}}},Ug="postDataViewMetadata",Fg={getData:(e,t,n,s)=>((e,t,n,s={})=>{const a={dataViewName:e},{skipClearErrorMessages:r,signal:o,doNotMergeMessagesForStatusCode:i}=s,{restApi:c,reqType:l}=ES("getListData",a);return rd(c,{method:l,body:t,...o&&{signal:o},...r&&{skipClearErrorMessages:r}},n,i)})(e,t,n,s),getListCount:(e,t,n)=>{const s={dataViewName:e},{restApi:a,reqType:r}=ES("getListDataCount",s);return rd(a,{method:r,body:t},n)},getDataViewMetadata:(e,t,n,s)=>{const a=!!n,r=!!s,o=Uy.doesRestApiExist(Ug),i=(a||r)&&o?Ug:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=ES(i,c);if(o){if(a)return rd(l,{method:u,body:{associationFilter:n}},t);if(r)return rd(l,{method:u,body:{propertyFilter:s}},t)}return rd(l,{method:u},t)},getDataObjectView:(e,t,n,s,a={})=>{const{skipClearErrorMessages:r,signal:o,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=ES("readDataObject",c);return rd(u,{method:d,body:l,...o&&{signal:o},...r&&{skipClearErrorMessages:r}},s,i)},getCaseEditMetadata:(e,t)=>aI.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>aI.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,s)=>aI.updateCaseEditFieldsData(e,t,n,s),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:s,context:a,listClass:r,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=ES("moveListRecords",c);return rd(l,{method:u,body:{content:{sourceID:n,destinationID:s,context:a,listClass:r}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===Vs.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===Vs.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==KE("root").find((e=>e.includes("authoring-preview")))?`${Vs.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${bp.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=Vy.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}},Vg=/{(.*?)}/i,jg=/{(.*?)}/g,kg=e=>null!==e.match(Vg),Bg=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),$g=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},Gg=e=>e.replaceAll("+","%20"),Wg=["portal","noPortal","debug","activeTab","contextParam","lang"],Hg=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),s=new URLSearchParams(n),a=new Map;for(const[e,t]of s)Wg.includes(e)||a.set(e,t);const r=Gg(new URLSearchParams(Array.from(a.entries())).toString());return r?`${t}?${r}`:t}return e},qg=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),s=n.indexOf("assignments"),a=n.slice(s-2).join("/"),r=n[n.length-1],o=IS(Ka,{assignmentID:r});return{routeEndpoint:o?.restApi,requestType:o?.reqType,payload:{assignmentID:r},options:t,routeKey:or,urlPath:a}})(e,t):Uy.getEndPointInfo(e),zg=()=>{const e=Vy.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const Yg=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const Kg=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,s=this.users[n];s&&(s.state=t,Object.keys(s.subscribers).forEach((e=>{s.subscribers[e]?.callback({state:s.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const s=this._getAutoGenId(),a=this.users[e];if(a)return a.subscribers[s]={callback:t,contextName:n},s;this.users[e]={subscribers:{[s]:{callback:t,contextName:n}}};const r={matcher:"PRESENCE",criteria:{userId:e}};return fh.subscribe(r,this._handleUserPresence.bind(this)),s}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],fh.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};const Qg=function(e,t,n,s){for(var a=e.length,r=n+(s?1:-1);s?r--:++r<a;)if(t(e[r],r,e))return r;return-1};const Jg=function(e){return e!=e};const Xg=function(e,t,n){for(var s=n-1,a=e.length;++s<a;)if(e[s]===t)return s;return-1};const Zg=function(e,t,n){return t==t?Xg(e,t,n):Qg(e,Jg,n)};const eh=function(e,t){return!!(null==e?0:e.length)&&Zg(e,t,0)>-1};const th=function(e,t,n){for(var s=-1,a=null==e?0:e.length;++s<a;)if(n(t,e[s]))return!0;return!1};const nh=function(e,t,n,s){var a=-1,r=eh,o=!0,i=e.length,c=[],l=t.length;if(!i)return c;n&&(t=An(t,ut(n))),s?(r=th,o=!1):t.length>=200&&(r=ve,o=!1,t=new Re(t));e:for(;++a<i;){var u=e[a],d=null==n?u:n(u);if(u=s||0!==u?u:0,o&&d==d){for(var p=l;p--;)if(t[p]===d)continue e;c.push(u)}else r(t,d,s)||c.push(u)}return c};var sh=b?b.isConcatSpreadable:void 0;const ah=function(e){return ke(e)||Ze(e)||!!(sh&&e&&e[sh])};const rh=function e(t,n,s,a,r){var o=-1,i=t.length;for(s||(s=ah),r||(r=[]);++o<i;){var c=t[o];n>0&&s(c)?n>1?e(c,n-1,s,a,r):je(r,c):a||(r[r.length]=c)}return r};const oh=Rs((function(e,t){return rs(e)?nh(e,rh(t,1,rs,!0)):[]}));const ih=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=0,this.connected=!1,this.matcher=e,this.criteria=t,this.messagingServiceSubscriptionID=""}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t];if(!n)return;const s=Object.keys(n.criteria),a=Object.keys(e);0===oh(s,a).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){const n=this._getAutoGenId();if(!this.messagingServiceSubscriptionID){this.messagingServiceSubscriptionID=n;const e={matcher:this.matcher,criteria:this.criteria},t=fh.subscribe(e,this._handleAtomicMessage.bind(this),void 0,n);this.messagingServiceSubscriptionID=t||n,this.connected=!0}return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e],0===Object.keys(this.atomicSubscribers).length&&(this.connected=!1,this.messagingServiceSubscriptionID&&(fh.unsubscribe(this.messagingServiceSubscriptionID),this.messagingServiceSubscriptionID=""))}};const ch=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new ih("CASE",t)}return this.subscriptions[e]}};const lh=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static getContextPath(e){return e.includes("workarea")?e:zE(`${e}/workarea`)||""}static publishCaseValuesUpdate(e,t){const n=this.getContextPath(t.actionInContext);Object.entries(e.message).forEach((([e,t])=>{const s=this.transformReference(e),{pageReference:a,propertyName:r}=this.extractReferenceParts(s);e.match(/\.\w+\[\d+\]\.\w+/)&&Bm.executeStateMachine(n,s,t,!0,{skipStateUpdate:!0});XA([{type:Xs,payload:{reference:s,value:t,context:n}},{type:ea,payload:{reference:s,value:t,context:n,pageReference:a,propertyName:r}}])}))}},{RESOURCE_TYPES:uh}=Fs;const dh=class{static openCase(e,t,n,s={}){const a={insKey:e,acTargetName:n,actionMgrID:$p.getNextActionMgrId(),context:t,...s},r=pa;s&&s.channelName?a.headers={[Vs.X_ORIGIN_CHANNEL]:s.channelName}:Vy.isWSSPortal()&&(a.headers={[Vs.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=$p.actionManagerPromise(r,a.actionMgrID);return XA({type:r,payload:a}),o}static openAssignment(e,t,n,s={}){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:$p.getNextActionMgrId(),context:t,...s},r=Ia;s&&s.channelName?a.headers={[Vs.X_ORIGIN_CHANNEL]:s.channelName}:Vy.isWSSPortal()&&(a.headers={[Vs.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=$p.actionManagerPromise(r,a.actionMgrID);return XA({type:r,payload:{...a}}),o}static createCase(e,t,n,s={}){const a=da,r={class:e,acTargetName:n,actionMgrID:$p.getNextActionMgrId(),context:t,...s};s&&s.channelName?r.headers={[Vs.X_ORIGIN_CHANNEL]:s.channelName}:Vy.isWSSPortal()&&(r.headers={[Vs.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=$p.actionManagerPromise(a,r.actionMgrID);return XA({type:a,payload:{...r}}),o}static getNextWork(e,t,n={}){const s=Ia,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:$p.getNextActionMgrId(),context:e,...n},{promise:r}=$p.actionManagerPromise(s,a.actionMgrID);return XA({type:s,payload:{...a}}),r}static getOpenedCaseItems(e){const t=[],n=bE(e);if(n){const{items:s={}}=n,a=Object.keys(s),r=GE(e);a.forEach((n=>{if(s[n]&&(s[n].resourceType===uh.CASE||s[n].resourceType===uh.ASSIGNMENT||s[n].resourceType===uh.OBJECT)){const{key:a="",context:o}=s[n],i=s[n],c=a.substring(a.indexOf(" ")+1),l=nC(".caseTypeID",Vs.CASE_INFO.CASE_INFO,o),u=r===n;t.push({...i,key:a,workID:a,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:s,reqType:a}=ES(Ya,n),r={},o=Bs.getRemoteHeaderFromSourceClass(t??"");return o&&(r.RemoteSystemID=o),rd(s,{method:a,headers:r})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=ES("getBulkActions"),s=e.map((e=>({ID:e}))),a=s.length,r=a/5,o={},i=[];for(let e=0;e<a;e+=r)o.cases=s.slice(e,e+r),o.cases.length&&i.push(rd(t,{method:n,body:o}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0===e?l=c[e].data.availableActions:l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:s}=ES("getCaseBulkActions",t),a=await rd(n,{method:s});let r=[];return a.data?.availableActions?.length&&(r=a.data.availableActions),r};static getAssignmentBulkActions=async e=>{const{restApi:t,reqType:n}=ES("getAssignmentBulkActions"),s={assignments:e.map((e=>({ID:e})))},a=await rd(t,{method:n,body:s});return a.data?.availableActions??[]}};class ph{static CLOSE_CONTAINER_ITEM_EVENT=Fs.PUB_SUB_EVENTS.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM;static objectRedirectionSubIds={};static truncateNamespace(e){let t=e;return!Ls.isNamespaceEnabled()&&e&&e.includes("__")&&(t=e.substring(e.indexOf("__")+2)),t}static handleOpenObject(e){const{ObjectID:t}=e;let n;({ActionName:n}=e),n=this.truncateNamespace(n);const s=kp.getComponentCache("lastActionID")||"";if("string"==typeof s&&s?.toLowerCase()!==n?.toLowerCase())return;let a=!1;const r=GE("app/modal");r&&(a=xE("app/modal",r)?.isMinimizable??!1),!r||a?dh.openCase(t,Vs.APP.APP,Vs.PRIMARY,{isAutoRedirection:!0}):vu.subscribe(this.CLOSE_CONTAINER_ITEM_EVENT,(e=>{e?.containerItemID===r&&(vu.unsubscribe(this.CLOSE_CONTAINER_ITEM_EVENT,"closeContainerItemForRedirection"),dh.openCase(t,Vs.APP.APP,Vs.PRIMARY,{isAutoRedirection:!0}))}),"closeContainerItemForRedirection",!0)}static handleRefreshObject(e){dh.openCase(e,Vs.APP.APP,Vs.PRIMARY,{forceRefresh:!0})}static handleObjectRedirection(e,t){const{message:n,filter:s}=e,{caseId:a,currUserID:r}=t;if(s?.criteria?.CurrentObjectID!==a||s?.criteria?.UserID?.toLowerCase()!==r?.toLowerCase())return;const{RedirectionType:o}=n||{};switch(o){case"OpenObject":this.handleOpenObject(n);break;case"RefreshObject":this.handleRefreshObject(a)}}static subscribeToRedirection(e){const t=Vy.getOperatorIdentifier()||"",n={matcher:"REDIRECTION",criteria:{CurrentObjectID:e,UserID:t?.toLowerCase()}},s=fh.subscribe(n,(n=>{this.handleObjectRedirection(n,{caseId:e,currUserID:t})}));this.objectRedirectionSubIds[e]=s}static unsubscribeToRedirection(e){fh.unsubscribe(this.objectRedirectionSubIds[e]),delete this.objectRedirectionSubIds[e]}static subscribeToEvent(e,t){let n=null;if(e===Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?n=e=>{const{caseId:t}=e;this.objectRedirectionSubIds[t]||this.subscribeToRedirection(t)}:e===Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(n=e=>{const{caseId:t}=e;this.objectRedirectionSubIds[t]&&this.unsubscribeToRedirection(t)}),!n)throw new Error(`Unhandled eventKey: ${e}`);vu.subscribe(e,n,t)}static unsubscribeToEvent(e,t){vu.unsubscribe(e,t)}static subscribeToCaseEvents(){this.subscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.subscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}static unsubscribeToCaseEvents(){this.unsubscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.unsubscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}}const gh=ph;class hh{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new Kg;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static filterKeyToSubscriberIdMap=new Map;static get offlineEnabled(){return"undefined"!=typeof navigator&&(navigator.userAgent||"").includes("pxUsesOffline")}static isAuthenticated=!1;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=bp.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.webSocket.close(),this.cleanSocketListeners());const s=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${s}`);this.webSocket=e,this.boundHandleOnOpen=this.handleOnOpen.bind(this),this.boundHandleOnMessage=this.handleOnMessage.bind(this),this.boundHandleOnError=this.handleOnError.bind(this),this.boundHandleOnClose=this.handleOnClose.bind(this),e.addEventListener("open",this.boundHandleOnOpen),e.addEventListener("message",this.boundHandleOnMessage),e.addEventListener("error",this.boundHandleOnError),e.addEventListener("close",this.boundHandleOnClose)}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0,this.isAuthenticated=!1),console.error("web socket error - readyState:",this.webSocket?.readyState,"| isTrusted:",e?.isTrusted)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),this.isAuthenticated=!1,console.debug("web socket closed - code:",e?.code,"| wasClean:",e?.wasClean),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=bp.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){if(e.assignmentID){const t=hh.agentSubscribeIdMap.get(e.assignmentID);hh.unsubscribe(t??""),hh.agentSubscribeIdMap.delete(e.assignmentID)}}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=hh.subscribe(t,(t=>{lh.publishCaseValuesUpdate(t,e)}));hh.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(Vs.PRIORITY.PING),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket?.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,n.productionLevel&&delete n.productionLevel,this.dispatchToSubscribers(e,n,t)}else if(t?.tokenExpiryTime){vu.subscribe(Vs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,hh.subscribeAgentMessageCaseValues),vu.subscribe(Vs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,hh.unsubscribeAgentMessageCaseValues),this.isAuthenticated=!0,this.setTokenExpiryTime({tokenExpiryTime:t.tokenExpiryTime});const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e),this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{this.subscribeToSocket(e,t)})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[]}else console.error("filter missing from received data from messaging service",e.data)}}static dispatchToSubscribers(e,t,n){Object.keys(this.subscribers).forEach((s=>{const a=this.subscribers[s];a?.filter&&a.filter.matcher===e&&fC.isEqual(a.filter.criteria,t)&&a.messageHandler(n)}))}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.unsubscribe(e,!0)})),Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5500))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.boundHandleOnOpen),this.webSocket.removeEventListener("message",this.boundHandleOnMessage),this.webSocket.removeEventListener("error",this.boundHandleOnError),this.webSocket.removeEventListener("close",this.boundHandleOnClose))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static getFilterKey(e){return`${e.matcher}:${JSON.stringify(e.criteria)}`}static findExistingSubscriberId(e){return this.filterKeyToSubscriberIdMap.get(this.getFilterKey(e))}static subscribe(e,t,n,s){this.connectionsCount+=1;const a=s||`${Date.now()}_${this.connectionsCount}`;if("COACH_UPDATE"===e.matcher){const t=this.findExistingSubscriberId(e);if(t)return t}const r=new Yg(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState&&this.isAuthenticated?(this.subscribeToSocket(r,a),a):(this.inProgressSubscriptions.push({messageSubscriber:r,id:a}),e&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e),a),this.offlineEnabled&&(this.subscribers[a]=r),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e,e.filter&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e.filter),t);if(Object.keys(this.subscribers).filter((t=>this.subscribers[t]===e)).length>1)return;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e,t){if(this.subscribers[e]){if(!t){const t=this.subscribers[e].filter;t&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(t)),delete this.subscribers[e]}const n={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(n))}this.offlineEnabled&&!t&&this.removeFromInProgressSubscriptions(e)}static removeFromInProgressSubscriptions(e){const t=this.inProgressSubscriptions.findIndex((t=>t.id===e));if(-1!==t){const e=this.inProgressSubscriptions[t].messageSubscriber.filter;e&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(e)),this.inProgressSubscriptions.splice(t,1)}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static dispatchLocalMessage(e){const{matcher:t,criteria:n,message:s={}}=e,{environmentID:a,productionLevel:r,...o}=n,i={msgId:`local_${Date.now()}`,filter:{matcher:t,criteria:o},message:s};this.dispatchToSubscribers(t,o,i)}static getCaseSubscription=e=>ch.getOrCreateSubscription(e);static initObjectRedirectionSubscription=()=>gh.subscribeToCaseEvents();static refreshB2STokenReInit=async()=>{if(zg()){const e={body:{B2SToken:bp.b2sJWT}};mp("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(bp.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))}else if(!Ep("refreshB2S")){Ip("/uas/api/v1/isolations/token/websocket-ticket",{method:"GET",withoutDefaultHeaders:!1},"").then((e=>{const{token:t}=e.data;t&&(bp.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close())})).catch((e=>{console.error(`websocket-ticket: error occurred while fetching: ${e}`)}))}};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const fh=hh;const mh=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){const t=[],{pageNumber:n,pageSize:s}=e,a=n*s;let r=a-s;for(;r<a;r+=1){if(!this.records[r])return this.maxRecords===r?t:[];t.push(this.records[r])}return t}return this.records}mergeRecords(e,t){if(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:s}=t,a=n*s;let r=0;for(let t=a-s+1-1;t<a;t+=1)this.records[t]=e[r],r+=1;if(e.length<s){const t=(n-1)*s+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=lC(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const Ih=new class{SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Map}getDataViewParameters(e,t){if(!e||!t)return e;if(!t.parameters)return{};const n=Array.isArray(t.parameters)?t.parameters:[t.parameters],s=new Set(n.map((e=>e.name))),a={};return Object.keys(e).forEach((t=>{s.has(t)&&(a[t]=e[t])})),a}resolveParameterValue(e,t,n,s,a){return fC.resolveParameterValue(e,t,n,s,a)}formatParameterValue(e,t,n,s,a){return fC.formatParameterValue(e,t,n,s,a)}resolveAndFormatParameters(e,t,n,s,a){return fC.resolveAndFormatParameters(e,t,n,s,a)}getData(e,t,n,s){const a=this.generateHash(e,t,s);if(this.dataStore[e]&&this.dataStore[e][a]){const t=this.dataStore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},s,a,r={}){const o=bA(e),i=this.getDataViewParameters(n,o);r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e));const c={skipClearErrorMessages:!0,...r};if(!this.isCacheable(e,a)||r.invalidateCache){const n=await this.fetchData(e,i,s,a,t,c);return{...n.data,data:this.isCacheable(e,a)?this.mergeDataStore(e,i,s,a,n):n.data?.data??[],pageNumber:n?.data?.pageNumber,pageSize:n?.data?.pageSize,queryStats:n?.data?.queryStats,status:n?.status}}const l=this.getData(e,i,s,a);if(l.length>0)return Promise.resolve({data:l});const u=await this.fetchData(e,i,s,a,t,c);return{...u.data,data:this.mergeDataStore(e,i,s,a,u),pageNumber:u?.data?.pageNumber,pageSize:u?.data?.pageSize,queryStats:u?.data?.queryStats,status:u?.status}}async getPageDataAsync(e,t,n={},s={}){const a=this.generateHash(e,n,null);if(s.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][a]){if(!s?.invalidateCache)return Promise.resolve(this.dataStore[e][a]);delete this.dataStore[e][a],this._removeDataStoreMetaEntry(e,n,a)}const{restApi:r,reqType:o}=ES(Vs.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o,...s.skipClearErrorMessages&&{skipClearErrorMessages:s.skipClearErrorMessages}};if(s.enableStreaming){const e=s.streamOptions||{};Object.assign(i,{responseType:"stream",adapter:"fetch",headers:{Accept:"text/event-stream"},...e})}const c=r&&n&&0===Object.keys(n).length?r.split("?")[0]:r;return rd(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[a]:t.data},this._addDataStoreMetaEntry(e,n,a)),s.enableStreaming?t:t.data)))}subscribeToDataPageUpdates(e,t,n,s={}){if(!e||!t||!n)return!1;const a=this.generateHash(n,s,null);this.dataPageSubscribers[n]??={};const r=this.dataPageSubscribers[n];r[a]??={};const o=r[a];return this.subscribeToMessageService(n,e),!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const s=this.generateHash(t,n,null);delete this.dataPageSubscribers[t]?.[s]?.[e];const a=this.subscribedDataPageNames.get(t)??0;return a<=1?(this.subscribedDataPageNames.delete(t),e&&fh.unsubscribe(e)):this.subscribedDataPageNames.set(t,a-1),!0}unsubscribeToDatapageUpdates(e,t,n={}){return this.unsubscribeToDataPageUpdates(e,t??"",n)}_isDataPageCached(e,t){if(t&&fC.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t],s=Ls.getDefaultQualifiedName("pxResults");Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n][s])}else{const a=new mh;this.dataStore[t][n]=a,a.mergeRecords(e[t][n][s]||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const s=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const a=this.dataStoreMeta[e];a[s]??=[];const r=a[s];r.includes(n)||r.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const s=this.generateHash(e,t,null);this.dataStoreMeta[e][s]=this.dataStoreMeta[e][s].filter((e=>e!==n))}}mergeDataStore(e,t,n,s,a){const r=this.generateHash(e,t,s),o=a?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][r]||(this.dataStore[e][r]=new mh);const i=this.dataStore[e][r];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,r),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")||e.startsWith(Ls.getDefaultQualifiedName("D_"))||e.startsWith(Ls.getDefaultQualifiedName("Declare_"))}subscribeToUpdate(e,t,n,s,a,r){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},r&&!this.subscribers[e].callback?.[r]&&(this.subscribers[e].callback[r]=a),this.subscribeToCascadeUpdates(e,t,n,s,r)}unsubscribe(e,t,n,s,a){delete this.subscribers[e]?.callback?.[a],t&&t.length>0&&zA.unRegisterFields(n,s,t,a)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:s,parameters:a=""}=n,r=this.subscribers[s];this.markDataInstanceDirty(s,""===a?null:JSON.parse(a)),t&&this._executeDataPageSubscriptions(e),!t&&r?.callback&&Object.keys(r.callback).forEach((t=>{r.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,s;if((!t||(n=this.generateHash(e,t,null),s=this.dataStoreMeta[e]?.[n],s?.push(this.generateHash(e,null)),s))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!s||s.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:s}=t,a=s?JSON.parse(s):null;if(this.dataPageSubscribers[n])if(a){const t=[];t.push(this.generateHash(n,a,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const s=this.dataPageSubscribers[n]?.[t]??{};Object.keys(s).forEach((t=>{s[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const s=t[n];Object.keys(s).forEach((s=>{t[n][s](e.message)}))}))}}isPerInteraction(e){const t=bA(e);return!t||"reloadOncePerInteraction"===t.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const s=bA(e);let a=[];s||(a=Object.keys(t||{}).map((e=>({name:e}))));const r=s?.parameters||a;let o="",i=e;const c=[];return Array.isArray(r)&&r.forEach((e=>{t?.[e.name]?c.push(t[e.name]):c.push(e.defaultValue??Vs.NULL_STRING)})),n&&c.push(JSON.stringify(n)),c.join(Vs.HASH_DELIMITER)&&(o=fC.getHashedString(c.join(Vs.HASH_DELIMITER)),i=e+Vs.UNDERSCORE_STRING+o),i}async fetchData(e,t,n,s,a,r){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=r,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),o&&(l.useExtendedTimeout=!0),n&&(l.paging=n),s&&(l.query=s),Fg.getData(e,l,a,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,s,a){t&&t.length>0&&zA.registerFields(n,s,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}subscribeToMessageService(e,t){if(e&&this.subscribedDataPageNames.has(e)){const t=this.subscribedDataPageNames.get(e)??0;return void this.subscribedDataPageNames.set(e,t+1)}const n={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};fh.subscribe(n,this.handleMessage.bind(this),void 0,t),this.subscribedDataPageNames.set(e,1)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const Eh=class{constructor(e,t,n,s,a=100,r=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=s,this.maxtime=a,this.maxsize=r,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,s,a=this.findCombinableDataViewCall(e);return n=new Promise((e=>{s=e})),a&&!a.dataViewCallMap[t]?(this.combiner(a,e),a.dataViewCallMap[t]={promise:n,resolve:s}):a?n=a.dataViewCallMap[t].promise:(a={...e,dataViewCallMap:{[t]:{promise:n,resolve:s}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:s}}})),Object.keys(a.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(a):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const yh=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,s,a,r,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new Eh(t,n,a,s,r,o)),this.bufferedDataQueues[e]}},Ah=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,Ch=e=>e.map((e=>e.field)),Sh=(e,t)=>{const n=(e.query?.filter).filterConditions,s=(t.query?.filter).filterConditions;let a=(t.query?.filter).logic;const r=Object.keys(n).length;Ah(n,s)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs?.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),(n.F0.rhs?.values).push(s.F0.rhs?.value)):(Object.keys(s).forEach(((e,t)=>{const o=`F${r+t}`;n[o]=s[e],a=a.replace(e,o)})),(e.query?.filter).logic+=` OR ${a}`);const o=Ch(e.query?.select);Ch(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},_h=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!fC.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Nh=(e,t)=>{const{data:n}=t,{dataViewCallMap:s,filterDataOnClient:a}=e;Object.keys(s).forEach((e=>{s[e].resolve({data:a(e,n)})}))},Th=e=>({combiner:Sh,comparator:_h,separator:Nh,...e}),Dh=(e,t)=>{if("undefined"!=typeof window)try{window.sessionStorage.setItem(e,t)}catch(e){}},Ph=(e,t="",n="IS_NULL")=>({comparator:n,lhs:{field:e},...t&&{rhs:{value:t}}}),Oh=e=>null!=e&&"object"==typeof e&&!("then"in e);class Rh{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache=new Map,this.keyCache=new Map,this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,s)=>{const a=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(Vs.HASH_DELIMITER),r=fC.getHashedString(a),o=`${e.dataSource}_${r}`,i=`__dataviewmetadata__${e.dataSource}`,c=Fg.getAppCacheKey(i);if("undefined"!=typeof window&&window.sessionStorage.getItem(c)){const a=JSON.parse(`${window.sessionStorage.getItem(c)}`);if(t&&Rh.searchResultsCache?.[t]?.[o])n(Rh.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Rh.searchResultsCache?.persisted?.[o])n(Rh.searchResultsCache.persisted[o]);else{const r=new Rh(e,t);JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(r.dataSourceMetaData=a.dataSourceMetaData,r.isQueryable=a.isQueryable,r.isInitialised=a.isInitialised,r.associationFilter=a.associationFilter,Rh.initializeCache(t,e,o,r),n(r)):(r.associationFilter=e.associationFilter,r.propertyFilter=e.propertyFilter,r.fetchMetaData(t).then((s=>{Dh(c,JSON.stringify({isQueryable:s.data.isQueryable,dataSourceMetaData:s.data,isInitialised:!0,associationFilter:e.associationFilter})),r.isQueryable=s.data.isQueryable,r.dataSourceMetaData=s.data,r.isInitialised=!0,Rh.initializeCache(t,e,o,r),n(r)})).catch((e=>{r.isInitialised=!1,s(e)})))}}else if(e.deferDatasource&&bA(e.dataSource)){const s=new Rh(e,t),a=bA(e.dataSource);s.isQueryable=!!a?.isQueryable,s.isInitialised=!0,s.dataSourceMetaData=a,Dh(c,JSON.stringify({isQueryable:a?.isQueryable,dataSourceMetaData:a,isInitialised:!0})),s.context=t,Rh.initializeCache(t,e,o,s),n(s)}else{const a=new Rh(e,t);a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((s=>{Dh(c,JSON.stringify({isQueryable:s.data.isQueryable,dataSourceMetaData:s.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=s.data.isQueryable,a.dataSourceMetaData=s.data,a.isInitialised=!0,Rh.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,s(e)}))}}))}static bufferedDataView=new yh;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Th(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Rh.searchResultsCache[e]}static initializeCache(e,t,n,s){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Rh.searchResultsCache[e]&&(Rh.searchResultsCache[e]={}),Rh.searchResultsCache[e][n]=s):(void 0===Rh.searchResultsCache.persisted&&(Rh.searchResultsCache.persisted={}),Rh.searchResultsCache.persisted[n]=s)}fetchMetaData(e){return Fg.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Rh.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>Ih.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}buildQueryWithKeys=(e,t,n)=>{const s=this.buildSelect(n),a=((e=[],t={},n="")=>{if(!e.length||!Object.keys(t))return;const s={};return e.forEach(((e,n)=>{const a=t[e];let r;r=a?Ph(e,a,"EQ"):Ph(e),s[`T${n+1}`]=r})),{logic:Object.keys(s).join(` ${n} `),filterConditions:s}})(e,t,"AND");return{select:s,...a&&{filter:a},...Fg.isDistinctResultsOnly(s)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,t,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,t,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,t,n)=>this.memoizedGetRowDataByKeys(e,t,n);buildKeyCacheKey(e,t,n){const s=e.map((e=>[e,t[e]??""])),a=n?.columns?.map((e=>e.value));return JSON.stringify({filterEntries:s,columns:a,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,t,n){const s=this.buildKeyCacheKey(e,t,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(s);const a=this.keyCache.get(s);if(a)return a;const r=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,t,n):this.buildSchemaForNonQueryableDP(),o=Ih.getDataAsync(this.dataSource,this.context,r.dataViewParameters,this.isQueryable?r.paging:void 0,this.isQueryable?r.query:void 0,{...n}).catch((e=>(this.keyCache.delete(s),Promise.reject(e))));return this.keyCache.set(s,o),o}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Rh.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return Ih.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return Ih.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...t})}return this.fetchNonQueryableResults(e,t)}getCachedResult(e,t){if(this.enablePagination&&Oh(t)&&t.has(this.pageNumber))return t.get(this.pageNumber);const n=this.cache.get(e);return this.enablePagination||!n||Oh(n)?void 0:n}handleCacheError(e,t){if(this.enablePagination){const t=this.cache.get(e);t&&Oh(t)&&t.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(t)}storeCacheResult(e,t){if(this.enablePagination){let n=this.cache.get(e);n&&Oh(n)||(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,t)}else this.cache.set(e,t)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!gC(this.context))return!1;const t=e.toLowerCase(),n=this.cache.get(t);return!!n&&(!this.enablePagination||Oh(n)&&n.has(this.pageNumber))}memoizedGetData(e,t){const n=e?.toLowerCase(),s=this.cache.get(n);if(this.isResultCached(e)&&s){const e=this.getCachedResult(n,s);if(e)return e}const a=this.getData(e,t).catch((e=>this.handleCacheError(n,e)));return this.storeCacheResult(n,a),a}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!gC(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e??"",n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Ih.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,s)=>{this.fetchNQDataPromise?.then((s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>s(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const s=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,a)=>{const r=s?.some((t=>{const s=Rh.resolveEmbeddedPath(t),r=fC.getIn(a,s);return null!=r&&this.positionMatches(`${r}`,e,n)}));return r&&t.push({...a}),t}),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,t,n){const s=n?.ignoreCase??this.ignoreCase,a=s?e.toLowerCase():e,r=s?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return a.startsWith(r);case"contains":return a.includes(r);case"equals":return a===r;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const s={field:e.value};t.push(s)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,s=t?.ignoreCase??this.ignoreCase,a={};let r=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${r}`;r+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const u={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:s?"true":"false"},lhs:i,rhs:c,comparator:l};a[o]=u}}));const o=Object.keys(a).join(" OR ");return{filterConditions:a,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...Fg.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...Fg.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const bh=Rh;class vh{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,s,a){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:s,callback:a}]}registerForRefresh(e,t,n,s,a){n=fC.convertClipboardPageToPageRefNotation(n);const r=s.split("/").join(Vs.HASH_DELIMITER),o=fC.getHashedString(r);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[a]?.[n]){this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[a][n].push({uniqueHash:o,callback:t})}else vh.initializeRefreshCache(this.propChangeRefreshMap,a,n,o,t);else if(this.refreshMap?.[a]?.[`${e}-${n}`]){this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[a][`${e}-${n}`].push({uniqueHash:o,callback:t})}else vh.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,o,t)}triggerPropChangeRefresh(e,t){const n=this.propChangeRefreshMap?.[t];if(!n)return!1;const s=yC.getPropertyValue(Vs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,t),{interestPage:a=""}=s||{},r=e=>fC.convertPageRefToClipboardPageNotation(e).replace(`${Vs.CASE_INFO?.CASE_INFO_CONTENT}${a}`,"");if(n[e]){const t=r(e);return n[e].forEach((e=>e.callback(t))),!0}const o=hu.getContextReferences(t)?.get(e),i=o&&yC.resolveContextTreeNodeProps(o.props)||{},{contextPageRef:c}=i;if(c&&n[c]){const e=r(c);return n[c].forEach((t=>t.callback(e))),!0}for(const t of Object.keys(n)){let s;if(fC.segmentsMatch(t,e)?s=e:c&&fC.segmentsMatch(t,c)&&(s=c),s){const e=r(s);return n[t].forEach((t=>t.callback(e))),!0}}return!1}triggerRefreshForType(e,t,n){return"PROP_CHANGE"===e?this.triggerPropChangeRefresh(t,n):!!this.refreshMap?.[n]?.[`${e}-${t}`]&&(this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback())),!0)}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const xh=new vh;const wh=class{static cleanCaches(e){zA.purgeCascadeFields(e),Lg.removeContext(e),bh.clearContextedCache(e),vu.cleanContextSubscribers(e),Wm(e),hu.removeContextTreeNode(e),fh.clearContext(e),xh.deRegisterForRefresh(e)}},Mh="GET_DESCENDANTS",Lh={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData",REFRESH_EXTERNAL_CASE_DATA:"refreshExternalCaseData"};const Uh=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}},Fh=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Vh=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},jh=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)},kh=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,e)},Bh=e=>{vu.publish(Vs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,e)},$h=e=>{vu.publish(Vs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,e)};const Gh=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],s=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let r=t.context_data?.is_deferred_action_in_progress??!1;if(s<=0){if(r)n.push({type:Ca,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();r=!r,n.push({type:Ca,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:s,is_deferred_action_in_progress:r}}}}),t&&n.push(t)}}XA(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=ZA(e?.payload?.context);if(t){const n=[],s=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let r=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!r&&(s<=0?(n.push(e),r=!r):a.push(e),n.unshift({type:Ca,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:s,is_deferred_action_in_progress:r}}}}),XA(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=ZA(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(XA({type:Ca,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return ZA(e)?(XA({type:fr,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...ZA(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(XA({type:fr,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=ZA(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&fC.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),XA({type:Ca,payload:{context:e,data:{...n}}}),Bp.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=ZA(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},Wh=(e,t)=>{const n={},s=cg.getLookUpDataPage(e),a=cg.getDataPageKeys(s);if(a)for(const e of a)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:s,dataPageKeys:a}},Hh=(e,t)=>{const n=cg.getSavableDataPage(e),s=cg.getDataPageKeys(n);return s?.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:s}},qh=e=>{vu.publish(Fs.PUB_SUB_EVENTS.EVENT_CANCEL,e)},zh=(e,t,n)=>aI.shouldUseUnifiedHandling()||(e=>{if(e.includes(Vs.ACTIONAREA))return!0;const t=by(e),n=GE(`${t}/${Vs.ACTIONAREA}`);return Boolean(n?.includes(Vs.ACTIONAREA))})(e)?ha:hI(t,n??!1),Yh=(e,t,n)=>{const{callbacks:s}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?s?.cancel?.():s?.submit?.()}))},Kh=(e,t,n)=>n||t!==Vs.ACTION?e.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID):e.getValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID);const Qh=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1,n=!1)=>{const s=e,a=s&&s.includes(Vs.MODAL),r=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),i=this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID),c=this.c11nEnv.getContainerName(),l=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_TYPE_ID),u=t?void 0:Zm(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return SC.buildActionObject({context:s,containerItemID:e,assignmentID:o,actionID:i,caseID:r,containerName:c,caseType:l,isModalAction:a,isFormValid:u,isProcessAction:d,saveOnly:t,autosave:n},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let s,a,r="";r=t&&null!==t.actionMgrID?t.actionMgrID||"":$p.getNextActionMgrId();const o=new Promise(((e,t)=>{s=e,a=t}));if(!s||!a)throw new Error("resolveFn or rejectFn is not defined.");return $p.register(r,o,s,a,e,t,n),{actionMgrID:r,promise:o}};showDataObjectCreateView(e,t=Fs.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=SC.buildActionObject({viewName:t,className:e},this.c11nEnv),s=na,{promise:a}=this.actionsApiPromise(s,n);return XA({type:s,payload:{...n,containerName:Fs.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!yE(t)){return new pg(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=Xa,s=SC.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&t.includes(Vs.MODAL);XA({type:n,payload:{...s,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:r}=this.actionsApiPromise(n,s);return r.then((()=>{qh({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=JA()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(Vs.DATA_CLASS_NOT_FOUND));if(PA(Fs.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const s=cg.getSavableDataPage(n),a=Ir,r=!!e&&e.includes(Vs.MODAL),o=SC.buildActionObject({containerItemID:e,dataPageID:s},this.c11nEnv),{promise:i}=this.actionsApiPromise(a,o);return XA({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:r,isFormValid:Zm(e)}}),i}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=Er,s=cg.getSavableDataPage(e),a=cg.getDataPageKeys(s),r={};if(a)for(const e of a)r[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=SC.buildActionObject({dataViewName:s,dataViewParameters:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return XA({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const s=yr,{dataPageID:a,dataViewParameters:r}=Wh(e,t),o=SC.buildActionObject({dataLookUp:a,keyProperties:t,requestPayload:r,viewName:n.viewName||Fs.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:Vs.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return XA({type:"VIEW_DATA_OBJECT",payload:{...o}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=JA()?.getState()||{},s=n[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(Vs.DATA_CLASS_NOT_FOUND));const{dataPageID:a,keys:r}=Hh(s,t),o=Ar,i=e&&e.includes(Vs.MODAL),c=SC.buildActionObject({containerItemID:e,dataPageID:a,key:r},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:u}=this.actionsApiPromise(o,c);return XA({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:Zm(e),etag:l}}),u}openDataObjectAction(e,t,n,s){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!s)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const a=Cr,{dataViewParameters:r,dataPageID:o,dataPageKeys:i}=Wh(e,t),c=SC.buildActionObject({actionID:n,actionName:s,dataViewParameters:r,lookupDatapage:o,containerName:Vs.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return XA({type:a,payload:{...c}}),l}submitDataObjectAction(e,t,n,s){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:a}=JA()?.getState()||{},r=a[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(Vs.DATA_CLASS_NOT_FOUND));const o=s?.jsActionQueryParams,i=by(e),c=iy(i),l=xE(c,i)||{},{resourceType:u="",key:d=""}=l,p=Sr,{dataPageID:g,keys:h}=Hh(r,t),f=SC.buildActionObject({containerItemID:e,actionID:n,resourceType:u,key:d,keys:h,savableDatapage:g,containerName:Vs.MODAL,context:e,jsActionQueryParams:o},this.c11nEnv);f.context=e;const m=a[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(p,f);return XA({type:p,payload:{...f,isFormValid:Zm(e),etag:m}}),I}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(e=Bs.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,Ls.getDefaultQualifiedName("pyStartCase"),t);const{dockable:n=!1}=t?.modalOptions||{};let s=t.theType?t.theType:(e=>{const t=aI.shouldUseUnifiedHandling();return aI.isExternalCaseType(e)?xr:aI.isExternalObject(e)?t?xr:"CREATE_EXTERNAL_OBJECT":t?da:aI.isObjectCaseType(e)?"CREATE_OBJECT":da})(e);const a=SC.buildActionObject({class:e,flowType:Ls.getDefaultQualifiedName("pyStartCase"),containerName:Vs.PRIMARY,openCaseViewAfterCreate:!0,...t,theType:s,modalOptions:{isDockable:n}},this.c11nEnv),{promise:r}=this.actionsApiPromise(s,a);if(a.headers={...a.headers},t.channelName?a.headers[Vs.X_ORIGIN_CHANNEL]=t.channelName:Vy.isWSSPortal()&&(a.headers[Vs.X_ORIGIN_CHANNEL]="WSS"),s=this.handleRemoteCaseForCreateWork(e,a,s),wu.getPreviewMode()){a.debugInfo={debugId:fC.generateUniqueID()};const e=Yu.getCoreHeadersFromContext(a?.context||""),t=String(e?.debugInfo?.[Vs.COREHEADER_APP_DEBUG_ID]||"");t&&s!==da&&(a.debugInfo={debugId:t})}return XA({type:s,payload:{...a}}),r}handleRemoteCaseForCreateWork(e,t,n){if(Bs.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:s,name:a}=Bs.getRemoteCase(e);if(t.className=e,t.class=n,$p.setRemoteCaseHeaderByContext(t,s),Bs.isTraditionalRemoteCase(e)||Bs.isRemoteCaseVersionDifferent(e)){const s={className:e,name:a,action:Or,remoteClassName:n};return $p.setTraditionalRemoteCaseParams(t,s)}}return n}createCase(e,t={}){return this.createWork(e,{...t,theType:"CREATE_WORK"})}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=_a,s=SC.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,s);return XA({type:n,payload:{...s}}),a}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),s=SC.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:a}=this.actionsApiPromise("GET_DESCENDANTS",s),r=(o={...s,context:n},{type:Mh,payload:o});var o;return XA(r),a}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(t=Bs.getRemoteCaseClassBySourceClass(t)??t,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const s={insKey:e,acTargetName:n.targetContainer||Vs.PRIMARY,containerName:n.targetContainer||Vs.PRIMARY};let a=aI.shouldUseUnifiedHandling()||!aI.isObjectCaseType(t)?pa:"GET_OBJECT";const r=SC.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,r);return r.headers={...r.headers},n.channelName?r.headers[Vs.X_ORIGIN_CHANNEL]=n.channelName:Vy.isWSSPortal()&&(r.headers[Vs.X_ORIGIN_CHANNEL]="WSS"),r.className=t,Bs.isRemoteCase(t)&&(a=this.setRemoteCaseParamsForOpenCase(r,t,a,n.remoteCaseMeta)),wu.getPreviewMode()&&n.targetContainer!==Vs.WORKAREA&&(r.debugInfo={debugId:fC.generateUniqueID()}),XA({type:a,payload:{...n,...r}}),o}setRemoteCaseParamsForOpenCase(e,t,n,s={}){const{RemoteSystemID:a,RemoteClassName:r,name:o}=Bs.getRemoteCase(t);if($p.setRemoteCaseHeaderByContext(e,a),e.isRemoteCase=!0,e.remoteCaseClass=t,e.remoteCaseMeta=s,Bs.isTraditionalRemoteCase(t)||Bs.getRemoteAppPlatformVersion(a??"")){const n={className:t,name:o,action:br,remoteClassName:r};return $p.setTraditionalRemoteCaseParams(e,n)}return n}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(t=Bs.getRemoteCaseClassBySourceClass(t)??t,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const s={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...void 0!==n.renderInline&&{renderInline:n.renderInline},...void 0!==n.pageName&&{pageName:n.pageName}};n.isChild&&(s.containerName=Vs.PRIMARY,s.isChild=n.isChild);let a=ng;const r=SC.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,r);if(r.headers=r.headers||{},n.channelName?r.headers[Vs.X_ORIGIN_CHANNEL]=n.channelName:Vy.isWSSPortal()&&(r.headers[Vs.X_ORIGIN_CHANNEL]="WSS"),Bs.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:s,name:o}=Bs.getRemoteCase(t);if($p.setRemoteCaseHeaderByContext(r,s),r.remoteCaseMeta=n.remoteCaseMeta,Bs.isTraditionalRemoteCase(t)||Bs.getRemoteAppPlatformVersion(s??"")){const n={className:t,name:o,action:Rr,remoteClassName:e};a=$p.setTraditionalRemoteCaseParams(r,n)}}r.className=t,r.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),wu.getPreviewMode()&&![Vs.WORKAREA].includes(n.containerName)&&(r.debugInfo={debugId:fC.generateUniqueID()});const i={context:r.context||n.context,containerName:r.containerName||n.containerName,targetContainerName:r.containerName||n.containerName,viewType:r.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return XA({type:a,payload:{...r,...i}}),o}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));e.endsWith(Vs.ACTIONAREA)&&(e=GE(e)||e);const n=qE(e);let s=n;if(n?.includes(`/${Vs.WORKAREA}`)&&(s=n.substring(0,s?.lastIndexOf(`/${Vs.WORKAREA}`))),eI(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Su({messages:e,context:s,category:Fs.PAGE}),Promise.reject({type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=t?.isTriggeredFromDifferentContext,{caseID:r,assignments:o,localActionID:i,caseActions:c,caseInfo:l,businessID:u,caseTypeID:d,caseTypeName:p}=fI(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),g=oI(l);let h,f=!1;const m=c?.find((e=>e.ID===i));m?f="Case"===m?.type:h=ZA(n);let{assignmentID:I}=fI(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});h?.context_data?.actionType&&(f=h.context_data.actionType===Vs.CASE,I=I||h.context_data.assignmentID);const E=gI(o,I,i,l?.activeActionID),[y,A]=r.split(" "),C={class:y,actionID:E,assignmentID:I,caseID:r,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:f,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:u,caseTypeID:d,caseTypeName:p};e?.includes(Vs.MODAL)&&(C.containerName=Vs.MODAL,C.isModalAction=!0),C.outcome=t.outcomeID,C.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(C.viewType=pm.FORM);const S=zh(e,d,l?.isObjectWideAction),_=SC.buildActionObject(C,this.c11nEnv),{promise:N}=this.actionsApiPromise(S,_);return _.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||ZA(n).context_data.isProcessAction,_.headers??={},Vy.isWSSPortal()&&(_.headers[Vs.X_ORIGIN_CHANNEL]="WSS"),Gh.executeOrQueueDeferredAction({type:S,payload:{..._,context:n}}),N}getNextWork(){if("HYBRID"===Vy.getRenderingMode())return vu.publish(Fs.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:Vy.getOperatorIdentifier()}),Promise.resolve();const e=ng,t=SC.buildActionObject({containerName:Vs.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return XA({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=ng,n=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getCaseSummary().headers,a=SC.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:r}=this.actionsApiPromise(t,a),o={type:t,payload:{...a,caseID:n,headers:s}};return XA(o),r}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(Fs.CASE_INFO.CASES),s=this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID),a=this.c11nEnv.getValue(Fs.CASE_INFO.IS_ASSIGNMENT),r={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(Vs.MODAL)&&(r.containerName=Vs.MODAL,r.isModalAction=!0);const o=SC.buildActionObject(r,this.c11nEnv),{promise:i}=this.actionsApiPromise(t,o),c=qE(e);return XA({type:t,payload:{...o,context:c,cases:n,actionID:s,isAssignment:a,isFormValid:Zm(c),classID:this.c11nEnv.getCurrentClassID()}}),i}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue(Fs.CASE_INFO.CASES),s=this.c11nEnv.getValue(Fs.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:e.includes(Vs.MODAL)?Vs.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(Vs.MODAL)},r=SC.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,r),i=qE(e);return XA({type:t,payload:{...r,context:i,cases:n,actionID:s,isFormValid:Zm(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:s}=t,a=t.type,r={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:a,runningMode:s,...t},o="OPEN_BULK_ACTION",i=SC.buildActionObject(r,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return XA({type:o,payload:{...i}}),c}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));return new pg(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(XA({type:Xs,payload:{reference:Fs.CASE_INFO.APPROVALFLAG,value:Vs.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(XA({type:Xs,payload:{reference:Fs.CASE_INFO.APPROVALFLAG,value:Vs.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(Fs.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEFLAG,value:Vs.DUPLICATE,context:e}},s={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return XA([n,s]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEFLAG,value:Vs.IGNORE,context:e}},n={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEID,value:"",context:e}},s={type:Xs,payload:{reference:Fs.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return XA([t,n,s]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,Yh(window.pms.plugins.c11n.openLocalAction,e,t);const s=t.assignKey||this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),a=t.type,r={caseID:n,assignmentID:s,vcName:t.target,actionName:t?.name,assignKey:s,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},o=t.containerName===Vs.ACTIONAREA?ya:(e=>aI.shouldUseUnifiedHandling()||"Object"!==e.type&&!aI.isObjectCaseType(e?.caseClassName||"")&&!window.location.href.includes("/objects/")?ya:"OPEN_OBJECT_ACTION")(t),i=SC.buildActionObject(r,this.c11nEnv);t.containerName!==Vs.ACTIONAREA&&t.containerName!==Vs.WORKAREA||(i.skipMergeAssignmentsAndActions=!1);const{promise:c}=this.actionsApiPromise(o,i),l=this.c11nEnv.getContextName(),u=KE(l)[0];let d;if(d=GE(u),d?.includes("actionarea")&&o===ya)return XA({type:o,payload:{...i}}),c;if("Object"===t.type)return XA({type:o,payload:{...i}}),c;const p=GE(u),g=n!==this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID))&&p&&Bs.getRemoteHeaderByContext(p)||Bs.getRemoteHeaderByContext(l);if($p.setRemoteCaseHeaderByContext(i,g),!u)return d=l,XA({type:o,payload:{...i,contextName:l,continueExecution:!1}}),c;const{continueExecution:h,containerItemID:f}=vE(l,n,u);if(d=f,!h||d&&"review"===JA()?.getState()?.data[d]?.context_data?.caseViewMode)return XA({type:o,payload:{...i,contextName:l,continueExecution:h}}),c;const m=d,I=m&&m.includes(Vs.MODAL),E=t.assignKey||this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),y=ZA(d),A=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,C=this.c11nEnv.getContainerName(),S=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),N=SC.buildActionObject({context:m,containerItemID:d,assignmentID:E,actionID:A,caseID:n,containerName:C,caseType:S,isModalAction:I,isFormValid:!0,isProcessAction:_},this.c11nEnv);N.context=d;const T=qE(d),D=this.c11nEnv.getCaseSummary(),P=oI(D),O=SC.buildActionObject({caseID:n,containerItemID:d,cancelContext:T},this.c11nEnv);let R={};return I?(O.acTargetName=Vs.MODAL,O.isInCreateStage=P,O.isModalAction=I,R={...O}):R={...O,acName:jr(this.c11nEnv.getContainerName(),O.context)},XA({type:o,payload:{...i,contextName:l,saveActionPayload:N,cancelActionPayload:R,continueExecution:h}}),c}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,Yh(window.pms.plugins.c11n.openProcessAction,e,t);const s=this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,a=t.type,r={caseID:n,assignmentID:s,vcName:t.target,actionName:t?.name,assignKey:s,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},o=tg,i=SC.buildActionObject(r,this.c11nEnv),c=this.c11nEnv.getContextName(),l=KE(c)[0];let u=Bs.getRemoteHeaderByContext(c);if(!u&&l){const e=bE(l);e?.accessedOrder.forEach((s=>{(t.caseID||n)===e.items[s].key&&(u=Bs.getRemoteHeaderByContext(e.items[s].context))}))}$p.setRemoteCaseHeaderByContext(i,u);const{promise:d}=this.actionsApiPromise(o,i),{containerItemID:p}=vE(c,n,l);return XA({type:o,payload:{...i,saveContainerItemID:p}}),d}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=Ea,s=this.c11nEnv.getValue(Fs.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(Fs.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),a=oI(this.c11nEnv.getCaseSummary()),r=this.c11nEnv.getValue(Fs.CASE_INFO.CASE_INFO_ID),o={ID:s,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a,caseID:r};t&&t.includes(Vs.MODAL)&&(o.acTargetName=Vs.MODAL);const i=SC.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=qE(t);return XA({type:n,payload:{...i,containerItemID:t,context:l}}),c}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:n}=Fs,s=ma,a=qE(e),r=e&&e.includes(Vs.MODAL),o=this.c11nEnv.getCaseSummary(),i=oI(o),c=this.c11nEnv.getValue(Vs.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=SC.buildActionObject({caseID:c,containerItemID:e,context:a},this.c11nEnv);let d={};r?(u.acTargetName=Vs.MODAL,u.isInCreateStage=i,u.isModalAction=r,d={...u}):d={...u,acName:jr(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(s,u);return XA({type:s,payload:d}),p.then((()=>{t||qh({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=Fs,n=e,s=Xa,a=e&&e.includes(Vs.MODAL),r=this.c11nEnv.getValue(t.CASE_INFO_ID),o=SC.buildActionObject({caseID:r,containerItemID:e,context:n},this.c11nEnv);if(!yE(n)){return new pg(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{kh(r),qh({caseID:r,context:this.c11nEnv.getContextName()})}))}XA({type:s,payload:{...o,isModalAction:a}});const{promise:i}=this.actionsApiPromise(s,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=Fs,n=Xa,s=e,a=s&&s.includes(Vs.MODAL),r=this.c11nEnv.getCaseSummary(),o=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_TYPE_ID)),i=oI(r),c=this.c11nEnv.getValue(Vs.getProperty(t.CASE_INFO_ID)),l=SC.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv),u=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=Vy.isCoexistenceAppOfType(Vs.APP_TYPE.UIKIT);l.isProcessAction=u;const p=Vy.getRenderingMode();if(i&&(a||d||"EMBED"===p)&&!rI(r)){const t=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=yE(s);if(this.shouldDeleteCaseInCreateStage(c,t,d)){const t=!0===Boolean(aI.isExternalObject(o));return this.deleteCaseInCreateStage(e,t)}XA({type:n,payload:{...l,isModalAction:a,isChildCase:dI(r),isInCreateStage:i}})}const{promise:g}=this.actionsApiPromise(n,l);return g.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ag,n=this.getSaveActionPayload(e,!0),{promise:s}=this.actionsApiPromise(t,n);return Gh.executeOrQueueDeferredAction(rg(n)),s}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ag,n=this.getSaveActionPayload(e),{promise:s}=this.actionsApiPromise(t,n);return XA(rg(n)),s}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=sg,s=e,a=s&&s.includes(Vs.MODAL),r=this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_TYPE_ID)),i=SC.buildActionObject({caseID:r,caseType:o,containerItemID:e,context:s,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const u=`${Vs.APP.APP}/${PE.PRIMARY}`,d=_m(u,PE.PRIMARY);i.parentContext=d,a&&(i.targetName=Vs.MODAL,i.containerName=PE.MODAL,i.isModalAction=a),XA((e=>({type:sg,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{qh({caseID:r,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=Uy.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=an()+t;return rd(n,{method:"GET",headers:{}})}updateRecents(e,t,n,s){const{restApi:a}=Uy.getRestEndPoint("updateRecents")||{},r=`${an()}${a}`;return rd(r,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:s}})}logout(){const{restApi:e}=Uy.getRestEndPoint("Logout")||{},t=`${an()}${e}`;return rd(t,{method:"GET",headers:{}}).then((e=>(Object.keys(hu.rootNodes).forEach((e=>{wh.cleanCaches(e)})),hu.rootNodes={},sessionStorage.clear(),pC(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return rd(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,Ls.getDefaultQualifiedName("pyCasePreview"),{container:PE.PREVIEW,containerName:PE.PREVIEW,context:Fs.APP.APP,...t})}showDataPreview(e,t,n){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(Ls.getDefaultQualifiedName("pyDataPreview"),e,t,{container:PE.PREVIEW,containerName:PE.PREVIEW,context:Fs.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let s=SC.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:Bs.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),s={...s,...n}):s={...s,containerName:this.c11nEnv.getContainerName()};const a=ta,{promise:r}=this.actionsApiPromise(a,s,!1);return XA({type:a,payload:{...s}}),r}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const s=SC.buildActionObject({viewName:e,className:t},this.c11nEnv),a=na,{promise:r}=this.actionsApiPromise(a,s);return wu.getPreviewMode()&&(s.debugInfo={debugId:fC.generateUniqueID()}),XA({type:a,payload:{...s,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),r}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=SC.buildActionObject({},this.c11nEnv),s=aa,{promise:a}=this.actionsApiPromise(s,n);return XA({type:s,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=SC.buildActionObject({},this.c11nEnv),s=ra,{promise:a}=this.actionsApiPromise(s,n);return XA({type:s,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,n,s={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=SC.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:Bs.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),r=sa;s?.containerName||(s.containerName="HYBRID"===Vy.getRenderingMode()?Uh.getRuntimeParam(Vs.HYRBID_ROOT_CONTAINERNAME):Wp.getTargetViewContainerName(r));const{promise:o}=this.actionsApiPromise(r,a);return XA({type:r,payload:{...a,...s,skipSemanticUrl:Boolean(s.skipSemanticUrl)}}),o}changeHandler(e,t){SC.changeHandler(e,t)}eventHandler(e,t){SC.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,s={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){const a=this.c11nEnv.getContextName(),r=this.c11nEnv.getPageReference(),o=yC.getContextPath(r,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&!s.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,t,s);let i=this.c11nEnv.getValue(Vs.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=nC(`.${c.join(".")}.classID`,r,a)),e=fC.trimDotForProperty(e),XA({type:ea,payload:{reference:o,value:t,context:a,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:s=!1,isArrayDeepMerge:a=!0,contextPageReference:r="",isListEntry:o=!1,skipDirtyValidation:i=!1,associatedProperty:c,skipPageInstructionGeneration:l=!1}=n,u=this.c11nEnv.getContextName();let d=this.c11nEnv.getPageReference();const p=r?.startsWith(d)?r.replace(d,""):r;d=r||d;const g=yC.getContextPath(d,e);let h=!1;this.c11nEnv.isInsideList()&&!l&&this.c11nEnv.getListActions().updateProperty(p?`${p}${e}`:e,t,{isArrayDeepMerge:a,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),Cu({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:u,isListEntry:o}),XA({type:Xs,payload:{reference:g,value:t,context:u,isArrayDeepMerge:a,skipDirtyValidation:i,...h&&{isStrictTracking:h},...s&&{removePropertyFromChangedList:s},...c&&{associatedProperty:`${d}${c}`}}})}activateModalContainerItem(e){const t=Ba,{context:n}=e,s=n&&n.includes(Vs.MODAL),a=SC.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);s&&(a.containerName=Vs.MODAL,a.isModalAction=s),XA({type:t,payload:a});const{promise:r}=this.actionsApiPromise(t,a);return r}refreshCaseView(e,t,n,s={}){const{promise:a,actionMgrID:r}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d,isArrayDeepMerge:p}=s,g={actionMgrID:r,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:d};s.refreshFor&&(g.refreshFor=s?.refreshFor),s.resetForm&&(g.resetForm=s?.resetForm),s.skipPayloadGeneration&&(g.skipPayloadGeneration=s?.skipPayloadGeneration);const h=u||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference(),m=this.c11nEnv.getValue(Vs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:E}=m||{};if(o&&I&&E===Vs.ACTION){const t=this.c11nEnv.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),{actionID:n,interestPage:s,interestPageActionID:a,isLocalAction:r}=m;SI(e,t,n,h,s,a,r,I,E,g)}else!I&&o&&(uI(h,f)||cI(h,f))?RI(h,n,g):CI(e,t,h,n,g);return a}refreshEmbeddedDataWithAction(e,t,n,s,a,r,o,i,c={}){const{promise:l}=this.actionsApiPromise(Lh.REFRESH_DATA),u=this.c11nEnv.getContextName();return SI(e,t,n,u,s||this.c11nEnv.getPageReference(),a,r,o,i,c),l}openEmbeddedDataModal(e,t,n,s,a,r,o,i,c=!1,l=Fs.MODAL){const u=_r;let d=t.getCaseInfo().getKey();const p=t.getValue(Fs.CASE_INFO.IS_LOCAL_ACTION),g=t.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),h=Kh(t,o,p),f=t.getPageReference();let m="string"==typeof s?`${t.getPageReference().replace(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${s}`:`${t.getPageReference().replace(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${s}]`;f.startsWith(Fs.OBJECT_INFO.OBJECT_INFO)&&!d&&(d=t.getCaseInfo().getObjectKey(),m=`${t.getPageReference().replace(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${s}]`);const I=t.getMetadata(),E=Array.isArray(I?.config?.children)&&I.config.children[0]?.children||[],y={readOnly:c,targetProperty:n,index:s,viewID:e,ID:d,actionType:a,interestPage:fC.convertPageRefToClipboardPageNotation(m),heading:r,editType:o,interestPageActionID:o===Vs.ACTION?i:void 0,actionID:h,isLocalAction:p,operationFlag:Vs.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof s,assignmentID:p||o!==Vs.ACTION?void 0:g,columns:E},A=SC.buildActionObject(y,this.c11nEnv);if(o===Vs.ACTION){const e=fC.getETag(A.context);A.headers={"If-Match":e}}const{promise:C}=this.actionsApiPromise(u,A);return Vy.getFeatureMap().granularUIRefresh&&E.forEach((e=>{const n=No.trimAnnotation(e.config.value),s=IA(n.startsWith(".")?n.replace(".",""):n,e.config.classID);s&&!Array.isArray(s)&&s.isDeclarativeTarget&&hu.addFieldNode(t.getContextName(),f+m,t.viewName??"",n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:f+m})})),XA({type:u,payload:{...A,containerName:l,skipSemanticUrl:!0}}),C}getEmbeddedDataView(e,t,n,s,a,r="",o="",i=!1,c=""){const l=Nr;let u=t.getCaseInfo().getKey();const d=t.getValue(Fs.CASE_INFO.IS_LOCAL_ACTION),p=t.getValue(Fs.CASE_INFO.ASSIGNMENT_ID),g=Kh(t,r,d),h=t.getPageReference();let f="string"==typeof s?`${t.getPageReference().replace(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${s}`:`${t.getPageReference().replace(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${s}]`;h.startsWith(Fs.OBJECT_INFO.OBJECT_INFO)&&!u&&(u=t.getCaseInfo().getObjectKey(),f=`${t.getPageReference().replace(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${s}]`);const m={readOnly:i,targetProperty:n,index:s,viewID:e,ID:u,actionType:a,interestPage:fC.convertPageRefToClipboardPageNotation(f),editType:r,interestPageActionID:r===Vs.ACTION?o:void 0,actionID:g,isLocalAction:d,operationFlag:Vs.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof s,assignmentID:d||r!==Vs.ACTION?void 0:p,containerName:c},I=SC.buildActionObject(m,this.c11nEnv);if(r===Vs.ACTION){const e=fC.getETag(I.context);I.headers={"If-Match":e}}const{promise:E}=this.actionsApiPromise(l,I);return XA({type:l,payload:{...I,skipSemanticUrl:!0}}),E}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Tr;let n=this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID));const s=this.c11nEnv.getValue(Vs.getProperty(Fs.CASE_INFO.ASSIGNMENT_ID));let a=this.c11nEnv.getPageReference().replace(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),"");const r=qE(e),o=this.c11nEnv.getValue(Vs.getProperty(Vs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:u,viewName:d,parentContext:p}=o;a.startsWith(Fs.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(Fs.OBJECT_INFO.OBJECT_INFO_ID),a=this.c11nEnv.getPageReference().replace(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),Cu({context:r,stateObj:ZA(r),clearContextMessages:!0});const g={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:d,isFormValid:Zm(r),interestPage:fC.convertPageRefToClipboardPageNotation(a),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:u,operationFlag:Vs.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:s};e&&e.includes(Vs.MODAL)&&(g.containerName=Vs.MODAL,g.isModalAction=!0);const h=SC.buildActionObject(g,this.c11nEnv);if(c===Vs.ACTION){const e=fC.getETag(h.context);h.headers={"If-Match":e}}const{promise:f}=this.actionsApiPromise(t,h);if(yE(r)){const[e,t,n]=tu(this.c11nEnv.getPageReference());hu.mutatePageList(p,e,t,{type:cr,rowIndex:n}),XA({type:cr,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return Gh.executeOrQueueDeferredAction({type:t,payload:{...h,context:r}}),f}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=qE(e),n=this.c11nEnv.getPageReference(),{promise:s,actionMgrID:a}=this.actionsApiPromise(Pr);return RI(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),s}handleSubscript(e,t){if(!PA(Fs.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=Dr,s=SC.buildActionObject({containerItemID:e},t);XA({type:n,payload:{...s,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:Zm(e),context:e}});const{promise:a}=this.actionsApiPromise(n,s);return a}showSubscriptCreateView(e,t,n,s=Fs.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const a=SC.buildActionObject({viewName:s,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),r=na,{promise:o}=this.actionsApiPromise(r,a);return XA({type:r,payload:{...a,containerName:Fs.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),o}deleteWork(e,t,n){if(!e)return Promise.reject(new Error("workId is required parameter"));const s=wr,a=aI.isExternalCaseType(t),r=SC.buildActionObject({workId:e,caseTypeID:t,isExternalCase:a,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:o}=this.actionsApiPromise(s,r);return XA(ig({...r})),o}deleteDataRecord(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=wr,s=SC.buildActionObject({className:e,keys:t},this.c11nEnv),{promise:a}=this.actionsApiPromise(n,s);return XA(ig({...s})),a}};const Jh=class{constructor(e){this.c11nEnv=e}buildRemoteCaseHeaders(e,t){const n={};if(e){const s=Bs.getRemoteCaseClassBySourceClass(e)??e;Bs.injectRemoteCaseHeader(n,{caseTypeID:s},t)}return n}async getCaseStages(e,t,n){const s={caseID:e},{restApi:a,reqType:r}=ES("getCaseStages",s),{caseTypeID:o}=n||{},i=this.buildRemoteCaseHeaders(o,t);return(await rd(a,{method:r,headers:i},t)).data.stages}async getCaseActions(e,t,n){const s={caseID:e},{restApi:a,reqType:r}=ES("getActions",s),{caseTypeID:o}=n||{},i=this.buildRemoteCaseHeaders(o,t);return(await rd(a,{method:r,headers:i},t)).data}getCaseTypeName(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(Vs.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${Vs.CONTEXT_DATA}${Vs.CASE_VIEW_MODE_PROP}`)===Vs.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${Vs.CONTEXT_DATA}${Vs.CASE_VIEW_MODE_PROP}`)===Vs.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO));return oI(e)}isReviewAfterCreateStage(){if(!this.isReview())return!1;const e=this.c11nEnv.getContextName(),t=QE(e)[0];if(!t)return!1;const n=JA()?.getState().data[t]?.caseInfo?.stages;if(!Array.isArray(n))return!1;const s=[...n].reverse().find((e=>"object"==typeof e&&null!==e&&"visited_status"in e&&"transitionType"in e&&"completed"===e.visited_status));return"create"===s?.transitionType}isLocalAction(){const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO));return rI(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===Vs.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),s=xE(t,n),{config:a}=t&&n?s&&s.view:this.c11nEnv.getMetadata();e=a?.type===Vs.VIEW?a?.name:null}(e&&e.startsWith(Vs.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(Ls.getQualifiedNameForComplexRuleReferences(Vs.getProperty(Vs.CASE_INFO.VIEW_NAME))))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes(Ls.getDefaultQualifiedName("pyViewContext"))){const t=e.caseInfo?.content??{},s=t[Ls.getDefaultQualifiedName("pyViewContext")];if(!s)return n.caseInfo.content;if("string"==typeof s&&s.includes("(")&&s.includes(")")){const e=s.substring(1,s.indexOf("(")),n=parseInt(s.substring(s.indexOf("(")+1,s.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n]}}const s=t.split(/[.[\]]/).filter((e=>e));for(const e of s)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=xE(e,t),{config:s}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),a=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO)),r=s?.type===Vs.VIEW?s.context:null;if(r){const e=this.getValueByPath({caseInfo:a},r);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(Vs.getProperty(Vs.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(Vs.getProperty(Vs.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ACTIVE_ACTION_ID)),t=Ws(this.c11nEnv.getContextName());let n;t&&(n=ZA(t));const s=n?.caseInfo?.availableActions,a=ZA(this.c11nEnv.getContextName()),r=a?.caseInfo?.refreshConditions;if(e){if(s){const t=s.find((t=>t.ID===e));return t?t.refreshConditions:r}return r}return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_ACTIONS));if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],s=this.getChildAssignments()||[];let a=JSON.parse(JSON.stringify(s));a=a.map((e=>(e.isChild=!0,e)));const r=[...n,...a];let o=JSON.parse(JSON.stringify(r));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(Vs.getProperty(Vs.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(Vs.OBJECT_INFO.OBJECT_INFO);return rI(e)}getCaseCollaborators=(e=!0)=>{const t=this.c11nEnv.getValue(Vs.CASE_INFO.CASE_INFO_COLLABORATORS)||[];if(e){const e=Vy.getOperatorIdentifier();return t.filter((t=>t.ID!==e))}return t}};const Xh=class{constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(Vs.getProperty(Vs.DATA_INFO.DATA_INFO_CONTEXT_KEY))}};class Zh{constructor(e){Zh._instance=this,this.context=`${e}/${Vs.SUGGESTION}`,JA()?.getState().data?.[this.context]||XA({type:Ga,payload:{context:this.context,data:{}}})}getField(e){return nC(e,"",this.context)}setField(e,t){XA({type:Xs,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){XA({type:Sa,payload:{reference:e,context:this.context,...t}}),vu.publish(Vs.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){XA(DC({context:this.context,data:e,isArrayDeepMerge:!0}))}}const ef=Zh;const tf=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=eC();return n?fC.getIn(n,t):null}static setSharedState(e,t){e&&XA(rS({key:e,value:t}))}static updateState(e,t,n,s={}){const{isArrayDeepMerge:a=!0,pageReference:r,removePropertyFromChangedList:o=!1,skipDirtyValidation:i=!1}=s;if(!e||!t)return;XA(oS({context:e,reference:r?`${r}.${t}`:t,value:n,isArrayDeepMerge:a,removePropertyFromChangedList:o,skipDirtyValidation:i}))}static getSuggestionsContext(e){return new ef(e)}static triggerRefresh(e,t){bI({context:e,pageReference:t})}};class nf{static getParagraphStream(e,t,n){return((e,t,n)=>{if(!e)return e;const s=(new DOMParser).parseFromString(e,"text/html"),a=s.querySelectorAll("pega-reference");for(const e of a){const n=e.getAttribute("data-rule-id");if(n){const a=t.getValue(n),r=s.createTextNode(a??"");e.replaceWith(r),t.registerAdditionalProps({[n]:`@P ${n}`})}else e.replaceWith("")}let r;return r="simple"===n?s?.body?.textContent||"":s?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(r)?null:r})(e,t,n)}static isDecisionParagraph(e,t){const n=LA(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),s=LA(e,n);let a;if(s?.useDecision){const n=s.dynamicContents.length;for(let r=0;r<n-1;r+=1)if(yC.resolveWhen(s.dynamicContents[r].when,t)){a=s.dynamicContents[r],e=`${e}#${a.when}`;break}a||(a=s.dynamicContents.pop())}else a=s;const r=s?.definedOnClassID,o=Gy().getParagraphLocaleValue(r||n,e);return o?nf.getParagraphStream(o.content,t,o?.category):a?.content?nf.getParagraphStream(a.content,t,a?.category):null}static processBannerDecisionParagraph(e,t){const n=t.getCurrentClassID(),s=LA(e,n);let a;if(s?.useDecision){const n=s.dynamicContents.length;for(let r=0;r<n-1;r+=1)if(yC.resolveWhen(s.dynamicContents[r].when,t)){a=s.dynamicContents[r],e=`${e}#${a.when}`;break}a||(a=s.dynamicContents.pop())}else a=s;const r=s?.definedOnClassID,o=Gy().getParagraphLocaleValue(r||n,e);let i=null;return o?i=nf.getParagraphStream(o.content,t,o.category):a?.content&&(i=nf.getParagraphStream(a.content,t,a?.category)),{htmlContent:i,messageType:a?.messageType,dismissBanner:a?.dismissBanner,isBanner:a?.isBanner}}static getParagraphProperties(e,t){const n=t.getCurrentClassID(),s=LA(e,n);return{useDecision:s?.useDecision,isBanner:s?.isBanner,messageType:s?.messageType,dismissBanner:s?.dismissBanner}}static isADecisionParagraph(e,t){return this.getParagraphProperties(e,t).useDecision}static isBanner(e,t){return this.getParagraphProperties(e,t).isBanner}static getParagraphMessageType(e,t){return this.getParagraphProperties(e,t).messageType}static isDismissibleBanner(e,t){return this.getParagraphProperties(e,t).dismissBanner}static hasDecisionBannerContent(e,t){const n=t.getCurrentClassID(),s=LA(e,n);return!(!s?.useDecision||!s?.dynamicContents)&&s.dynamicContents.some((e=>e.isBanner))}}const sf=nf;class af{constructor(e){this.fieldType=e}applyFallback(e){const t=Hd.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class rf{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new af(e);default:return}}}const of="DATAPAGE",cf="VIEW",lf="FIELD",uf="CASE",df="PARAGRAPH",pf=(e,t,n,s)=>{const a=[cf,lf,df],r=[of,df].includes(e)&&s?`#${s}`:"",o=e===of?"@BASECLASS":n;return e===of||a.includes(e)?`${o}!${e}!${t}${r}`.toUpperCase():`${e}!${t}${r}`.toUpperCase()};class gf{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,gf.COMPONENT_FIELDS,gf.COMMON_LABELS],s=this.#o(e,n)||e;return(t?this.#i(s,t):s)||e}getLocalizedMessage(e,t){const n=this.#o(e,[gf.MESSAGES,gf.COMMON_LABELS])??e;return(t?this.#i(n,t):n)||e}getLocalizedDataPage(e,t,n,s){if(!t||!n||!e)return e;const a=[pf(of,t,void 0,n),gf.COMMON_LABELS,...this.lookupList],r=this.#o(e,a)??e;return(s?this.#i(r,s):r)||e}#i(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#o(e,t=this.lookupList){if(0===t.length)return;const n=EA(this.locale);for(const s of t){const t=this.#c(e,n.localeStore[s]);if(t)return t}}#c(e,t={}){const n=t[e];if("string"==typeof n)return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const hf=e=>Us.getNeedsMapping()||e?.info===Fs.OBJECT_INFO.OBJECT_INFO?Fs.OBJECT_INFO.OBJECT_INFO:Fs.CASE_INFO.CASE_INFO,ff=(e,t)=>{const n=hf(t);e.data=e.data??{};const{assignments:s,availableActions:a=[]}=e.data[n]??{};if(s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions)&&!t?.stopMergeActions){s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||a.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=a}},mf=(e,t)=>{const n=hf(t),s=rm();if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return void 0===s||s||ff(t),t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const a=e,{uiResources:{actionButtons:r,navigation:o,settings:i},nextAssignmentInfo:c}=a;if(r&&r.main&&(r.main=r.main.map((e=>"createWork"===e.jsAction?{...e,jsAction:"createCase"}:e))),a.data&&a.data[n]&&(r&&(a.data[n].actionButtons=r),o&&(a.data[n].navigation=o),i&&(a.data[n].settings=i),t&&t[Fs.ACTIONS.DELETEAVIALACTIONS]&&delete a.data[n].availableActions,void 0===s||s||ff(a,t),e.confirmationNote)){const{confirmationNote:e}=a,t=[e];a.data.caseMessages=t}return t&&t.isCreateDataObject&&(a.data=a.data??{},a.data.dataInfo={},a.data.dataInfo.content=a.data.pyPortal,a.uiResources.root.config.context="dataInfo.content",a.uiResources.context_data.dataInfo=a.uiResources.context_data.dataInfo??{},a.uiResources.context_data.dataInfo.content=a.uiResources.context_data.dataInfo.content??{},a.uiResources.context_data.dataInfo.content=a.uiResources.context_data?.pyPortal,delete a.data.pyPortal,delete a.key),c&&(a.data=a.data??{},a.data.nextAssignmentInfo=c),a},If=async e=>{const t=mf(e),n=fC.getIn(t,Vs.COMPONENTS);pp(t,{},!0),await wp(n)},Ef=(e,t,n)=>yC.resolveView(e,t,n),yf=(e,t,n,s)=>{const a=e[t];if(!a)return!1;const r=fC.getIn(a,Fs.CASE_INFO.CASE_INFO_CLASSID);return fC.getIn(a,Vs.CASE_INFO.VIEW_NAME)===n&&(!s||r===s)},Af=e=>{const{accessedOrder:t,items:n}=e;if(!t||!n)return null;const s=t[t.length-1];return s?n[s]?.context??null:null},Cf=(e,t="",n="")=>{let s=n||null;if(!s){const n=`${Fs.APP.APP}/primary`;s=((e,t)=>{const n=JA();if(!n)return null;const s=n.getState(),{data:a,containers:r}=s;if(!r||!a)return null;const o=`${Fs.APP.APP}/primary`;if(r[o]){const n=Af(r[o]);if(n&&yf(a,n,e,t))return n}for(const n of Object.keys(r)){if(n===o)continue;const s=Af(r[n]);if(s&&yf(a,s,e,t))return s}return null})(e,t),s||(s=zE(n))}if(!s)return Promise.reject(new Error(`Unable to find an active context for view "${e}".`));const a=ZA(s);if(!a)return Promise.reject(new Error(`No data found for context "${s}".`));const r=fC.getIn(a,Fs.CASE_INFO.CASE_INFO_ID)||"",o=xf({options:{context:s,pageReference:Fs.CASE_INFO.CASE_INFO_CONTENT}});return _A(),o.getPConnect().getActionsApi().refreshCaseView(r,e,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally((()=>{NA()}))};let Sf=function(e){return e.CURRENCY="Currency",e.PERCENTAGE="Percentage",e.DECIMAL="Decimal",e.INTEGER="Integer",e.TEXT_SINGLE_LINE="Text (single line)",e.TEXT_PARAGRAPH="Text (paragraph)",e.EMAIL="Email",e.URL="URL",e.PHONE="Phone",e.PICKLIST="Picklist",e.USER_REFERENCE="User Reference",e.BOOLEAN="Boolean",e.DATE_AND_TIME="Date & time",e.DATE_ONLY="Date only",e.TIME_ONLY="Time only",e.IDENTIFIER="Identifier",e.DOUBLE="Double",e.TEXT_ENCRYPTED="Text Encrypted",e.PASSWORD="Password",e}({});const _f=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=yC.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=yC.getContextPath(this.datasource,this.index);return this.index+=1,xf({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Nf{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.index,t=this.children[e];this.index+=1;const n=t?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return xf({meta:t,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}}const Tf=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new _f(e,e.context||"",t);if(n){const n=aC(`${t.context}.${Vs.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new _f(e.children[0],n||e.context,t)}return e?.children?new Nf(e.children,t):void 0};class Df{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:s}=e;if(t&&s){const e=t[t.length-1];s[e]&&s[e].view&&Object.keys(s[e].view).length>0&&n.push(s[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>lg.isProperty(e))).map((e=>lg.getPropertyName(e)))}}const Pf=new Df;let Of;Object.freeze(Pf);const Rf=(e,t,n)=>{e&&(Object.keys(e).forEach((s=>{if("children"!==s){const a=e[s],r=No.trimAnnotation(a);if("string"!=typeof r&&"string"!=typeof a||!(fC.isValidAnnotation(a)&&fC.isPropertyRef(r)||a.startsWith("@W ")||a.startsWith("@DW ")||a.startsWith("@E ")||a.startsWith("@ATTACHMENT "))){if(Array.isArray(r))r.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:s,isObjHasValue:!!t[s]};t[s]=t[s]||[],t[s][n]=Object.create({}),Rf(e,t[s][n],a)}));else if(r&&"object"==typeof r&&"exp"!==r.type){const e={parentStateObj:t,parentKey:s,isObjHasValue:!!t[s]};t[s]=t[s]||{},Rf(r,t[s],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[s]=r}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},bf=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...fC.deepClone(t.inheritedProps)]};class vf{constructor(e){const{meta:t,isRoot:n,options:s={},useCustomContext:a}=e;this.meta=t,this._isRoot=n,this.options=s,this.useCustomContext=a,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this._dataInfo=null,this.viewName=s.viewName,this.parentViewName=s.viewName??"",this._referenceList=s.referenceList||"",this._isInsideList=s.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=s.localeReference,this._containerTarget=s.target,this._readOnly=t?.config?.readOnly||s.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=s.categoryName||"",this._relativePath=s.relativePath??"",s.inheritedConfig&&(this._inheritedConfig=fC.deepClone(s.inheritedConfig)),t?.config?.inheritedProps&&bf(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=fd.formatePageReferenceToArrayIndex(this.meta.config.value)),Rf(this._rawConfig,this._stateProps),this._isState=!fC.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=fC.isExpressionExist(this._rawConfig.config),this._isWhenExist=fC.isWhenExist(this._rawConfig.config),this._isValidatorExist=lp.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=Fs.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let r=this.options.pageReference;this.options.pageReference&&(r=No.handleAnnotation(this.options.pageReference,this)),this._pageReference=yC.getContextPath(r||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const o="reference"===this._type&&fC.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=yC.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=No.trimAnnotation(e.localeReference)||s.localeReference,this._isExpressionExist=fC.isExpressionExist(e),this._isWhenExist=fC.isWhenExist(e),this._isValidatorExist=lp.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===Vs.VIEW&&this._rawConfig.name&&(this.viewName=No.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&PI(this)}(o||i||c)&&_I(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(Vs.PARAGRAPH_ANNOTATION)){const s=No.trimAnnotation(t);n=sf.isDecisionParagraph(s,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=No.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=No.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,contextPage:n,label:s,required:a,readOnly:r,disabled:o,visibility:i,validationType:c,caption:l,allowMultiple:u,useRFC822Validation:d}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const p="Address"===this._type&&this._rawConfig?.config?.associatedView?No.trimAnnotation(this._rawConfig.config.associatedView):"",g=s||l,h=this._rawConfig?.type,f={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:No.trimAnnotation(t),label:g?.startsWith("@")?No.handleAnnotation(g,this,void 0):g,required:a,readOnly:r,disabled:o,visibility:i||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:c,...n&&{contextPageRef:`${this._pageReference}${No.trimAnnotation(n)}`},componentName:h,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:u,isDeclarativeTarget:this.isDeclarativeTarget(),...this._type===Sf.EMAIL&&{useRFC822Validation:d}};hu.addFieldNode(this._contextName,this._pageReference,(p||this.categoryName||this.viewName)??"",e,this.getValue(e),f)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)hu.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",No.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)hu.removeViewNode(this._contextName,this._pageReference,No.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,t={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};hu.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,t)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===Vs.VIEW&&this._rawConfig.name&&this.viewName){const e={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};hu.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,e)}"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&hu.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&hu.addViewNode(this._contextName,this._pageReference,No.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&hu.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",t="";const n=fC.getWhenNames(this._rawConfig?.config),s=this.getRawConfigProps();if(s?.type&&s?.type?.toLowerCase()===Vs.VIEW)t=Vs.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=Vs.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=No.isProperty(n)?No.trimAnnotation(n):""}e&&n.forEach((n=>{hu.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==Vs.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,contextPage:s,readOnly:a,disabled:r,visibility:o,validationType:i,selectionMode:c,selectionList:l,selectionKey:u,referenceList:d,renderMode:p,caption:g,uniqueField:h}=this.getRawConfigProps(),f=t||g;let m=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(m=this.getSelfReferencingDatapageKeys()),hu.addPageListNode(this._contextName,this._pageReference,this.viewName??"",No.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:No.trimAnnotation(this.getPropertyName()),label:f?.startsWith("@")?No.handleAnnotation(f,this,void 0):f,required:n,readOnly:a,disabled:r,...s&&{contextPageRef:`${this._pageReference}${No.trimAnnotation(s)}`},visibility:o||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:i,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:c,selectionList:l,renderMode:p,referenceList:d,selectionKey:u,index:this.index,uniqueField:h,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?m:void 0});const I=this.getValue(No.trimAnnotation(this.getPropertyName()),this._pageReference)||[];hu.updatePageListNode(this._contextName,this._pageReference,No.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){fC.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=Ef(t,this,e);if(!n)return;const s=this.getRawMetadata()?.config?.referenceList;if(!s)return;let a={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(a=n.config.parameters);const r=fC.generateDataPageHashWithParameters(a,s,this),o=eC(),i=o?o[s]?.[r]:{};return Array.isArray(i?.[Ls.getDefaultQualifiedName("pxResults")])?i[Ls.getDefaultQualifiedName("pxResults")]:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new Jh(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new Xh(this)),this._dataInfo}getCaseLocaleReference(e){const t=this.getRawConfigProps(),n=e||this.getValue(Vs.getProperty(Vs.CASE_INFO.CASE_TYPE_ID))||this.getValue(Vs.CLASS_ID,Vs.getProperty(Vs.DATA_INFO.DATA_INFO_CONTENT))||t?.referenceClass||t?.className;return n?pf(uf,n):null}getListActions(){return Wd(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return yC.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[Vs.CONTAINERS.ROOT_CONTAINER,Vs.CONTAINERS.VIEW_CONTAINER,Vs.CONTAINERS.FLOW_CONTAINER,Vs.CONTAINERS.MODAL_VIEW_CONTAINER,Vs.CONTAINERS.PREVIEW_VIEW_CONTAINER,Vs.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=PE.PRIMARY,name:s,routingInfo:a}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===a)&&s?s:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=u?.getStore()?.getState()?.data[`${this.getContextName()}/${Vs.SUGGESTION}`],n=this.getStateProps()?.value,s=yC.getContextPath(this.getPageReference(),n),a=t?tf.getSuggestionsContext(this.getContextName()).getField(s):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Hd.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=rf.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),fC.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),s=Vy.getLocale()??"en-US",a=new gf(s,n),r=this.getCaseLocaleReference();return a.setLookupList(["APP!APPLICATION"]),r&&a.setLookupList([r]),a}getRawConfigProps(){const e={...Hd.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(yC.resolveProps(e,t,this),No.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Rf(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),s=this.getComponentConfig(),a=n===Vs.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===Vs.MODAL_VIEW_CONTAINER||n===Vs.CASE_CREATE_STAGE||n===Vs.OBJECTACTIONCONTAINER){const n=GE(`${Vs.APP.APP}/${this.getContainerName()}`),s=Au({context:n,category:Fs.PAGE});e.pageMessages=t(s),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||No.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=Au({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:Fs.MESSAGES.MESSAGES_TYPE_ERROR}),s=Au({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:Fs.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=Vs.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status;const s=n?.find((e=>"error"===e.type&&"required"===e.subType));s&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:t,subType:"required"})}s&&s[0]&&(e.infoMessage=s[0].message,e.status=Vs.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===Vs.ROOT_CONTAINER){const n=Nu(a,GE(`${Vs.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const s=tf.getSharedState("isLoggedOut");e.isLoggedOut=s,this._stateProps.isLoggedOut=s;const r=Au({context:Vs.APP.ROOT,category:"PAGE"});e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages}if(n===Vs.HYBRID_VIEW_CONTAINER){const n=Au({context:Vs.APP.APP,category:Vs.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===Vs.APP_SHELL&&e.portalDocMode===Vs.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=dh.getOpenedCaseItems(`${Fs.APP.APP}/${Vs.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===Vs.APP_SHELL){const n=Vs.APP.APP,s=GE(`${n}/${this.getContainerName()}`),a=[...Au({context:n,category:"PAGE"})||[],...Au({context:s,category:"PAGE"})||[]],r=a.length>0?a:void 0;e.pageMessages=r&&t(r),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===Vs.SCALARLIST&&(this._stateProps.value=e.value),n===Vs.APP_SHELL||n===Vs.MODAL_VIEW_CONTAINER||n===Vs.CASE_CREATE_STAGE||s.template===Vs.CASE_PREVIEW||s.template===Vs.RULE_PREVIEW){let t=Au({context:Vs.APP.APP,category:"HTTP"});const n="HYBRID"===Vy.getRenderingMode()?`${this.getContextName()}/${this.getContainerName()}`:`${Vs.APP.APP}/${this.getContainerName()}`,s=Au({context:GE(n),category:"HTTP"});t?s&&(t=t.concat(Au({context:GE(n),category:"HTTP"}))):t=Au({context:GE(n),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(e.message))):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(n===Vs.VIEW_CONTAINER||n===Vs.FLOW_CONTAINER||n===Vs.MODAL_VIEW_CONTAINER||n===Vs.PREVIEW_VIEW_CONTAINER||n===Vs.ROOT_CONTAINER||n===Vs.OBJECTACTIONCONTAINER){if(e.routingInfo=kr(this.getContainerName(),this._contextName),n===Vs.ROOT_CONTAINER&&(e.rootConfig=Df.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===Vs.FLOW_CONTAINER||n===Vs.OBJECTACTIONCONTAINER){const n=Au({context:this.getContextName(),category:Vs.CASEMESSAGES}),s=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const a=KE(s)[0];if(a){const n=GE(a),s=u?.getStore()?.getState()?.data;s&&n&&(e.lastUpdateTime=s[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=s[n]?.caseInfo?.lastUpdateTime);const r=Au({context:n,category:Fs.PAGE}),o=Au({context:n,category:"HTTP"});e.httpMessages=t(o),e.pageMessages=t(r),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,o?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=ZA(Vs.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===Vs.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else s.template===Vs.CASE_VIEW||s.template===Vs.RULE_VIEW||s.template===Vs.SELF_SERVICE_CASE_VIEW||s.template===Vs.CASE_PREVIEW||s.template===Vs.RULE_PREVIEW||s.template===Vs.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===Vs.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const r=this.getInheritedProps()?.shouldAutoRefresh;r&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:s}=this.getComponentConfig(),{propertyValue:a,propertyAnnotation:r}=this.getPropertyDetails(s,n,t);if(a&&"string"==typeof a&&(a.includes(r)||a.includes(Vs.ATTACHMENT_ANNOTATION))){const t=No.getPropertyName(a),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=GA(`${this._pageReference}.${t}`,this._contextName);if(e?.additionalInformation&&this.setStateProps({additionalInformation:n}),!Array.isArray(e)){e.additionalInformation=n;const{inputFormat:t}=e;if("string"==typeof t&&t.startsWith("@")){const n=No.handleAnnotation(t,this);"object"==typeof n&&null!==n&&"pattern"in n&&"string"==typeof n.pattern?e.inputFormat={pattern:n.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(Vs.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(IA(e,t),e)}const n=t.pop(),s=t.join(".")?".":"";let a=this.getValue(`${s}${t.join(".")}${Vs.CLASS_ID}`);return a||(a=fC.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(IA(n,a),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(IA(n,this.getValue(`${t.join(".")}${Vs.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(Vs.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[Vs.getProperty(Fs.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>cI(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[Fs.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[Fs.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new eg(this)}isEditable(){return!(!this._rawConfig||!this._rawConfig.config||this._inheritedConfig&&this._inheritedConfig.readOnly||!(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)||"string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST")||Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly)||Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?No.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||No.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||"string"==typeof this._readOnly&&!0===No.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const s=n.getConfigProps(),a={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=n._type&&a.includeTypes.includes(n._type)&&!a.excludeTemplates.includes(s.template);if(!!s.highlightedData&&s.highlightedData.length&&s.showHighlightedData&&(r=!1),!r)return!0;const o=n.getChildren();return!!o&&o.some((t=>t.getPConnect().getComputedVisibility(e)))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return ZA(e||this.getContextName())}getImagePath(e){return`${bp.getConstellationServiceUrl()}/v860/${bp.getAppAlias()}/image/${e}?org=${Uy.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=Tf(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null,relativePath:this._relativePath}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#l(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const s=n||this.getLocaleRuleName(),a=s&&t?`${s}#${t}`:s,r=this.getLocalizationService(a).getLocalizedText(e);return r===e?this.getLocalizationService().getLocalizedText(e):r}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?yC.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${Vs.SUGGESTION}`):yC.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:s,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),s&&(this._inheritedConfig.referenceType=s),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),bf(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),yC.resolveProps(t,e,this),e}setValue(e,t,n,s=!1,a={}){if(!fC.isValidPropertyReference(e))return;let r,o;const{isArrayDeepMerge:i}=a;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(r=!0,t||(o=!0)),XA({type:"SET_PROPERTY",payload:{reference:yC.getContextPath(this.getPageReference(),e),value:t,initialValue:n,isImplicit:s,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...r&&{isStrictTracking:r},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};EE(n)}getContextDataValue(e,t){return sC(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(Vs.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let s=Vs.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(s=n>0?this._pageReference.substring(n):this._pageReference),XA(DC({context:this._contextName,data:e,rootPageReference:s}))}replaceState(e,t,n={}){if(!fC.isValidPropertyReference(e))return;const{skipDirtyValidation:s=!1}=n;XA({type:"REPLACE_PROPERTY",payload:{reference:yC.getContextPath(this.getPageReference(),e),value:t,context:this.getContextName(),skipDirtyValidation:s}})}reportError(e,t,n){XA(eS(e,t||{},n,t?.formFields))}getComponent(){return Of({getPConnect:()=>this})}createComponent(e,t,n,s){let a=this._pageReference;if(t){const e=aC(`${this.getPageReference()}.${Vs.SUMMARY_OF_LISTS}`,t,this._contextName);a=yC.getContextPath(e||t,n)||t}else if(s&&s.pageReference){let e=s.pageReference;e=No.handleAnnotation(e,this),a=yC.getContextPath(this._pageReference,e)||""}return Of(xf({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:a,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName},useCustomContext:this.useCustomContext}),s)}getReferencedView(){if(this.meta)return yC.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(Vs.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,xf({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new pg(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new Qh(this)),this._actionsApi}getActionManager(){return $p}doesContextExist(e){return gC(e??this.getContextName())}getGoogleMapsAPIKey(){return cn()}getServerURL(){return an()}getLoadingStatus(e){let t=null;return e?(t=ZA(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?Cu({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?Cu({type:"error",...e}):(Cu({type:"error",...e,context:Vs.APP.APP}),Cu({type:"error",...e,context:GE(`${Vs.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return aC(`${this.getPageReference()}.${Vs.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.replaceState(t,e),n?((e,t,n)=>{const s=(e,t)=>{Object.entries(e).forEach((([e,a])=>{if(Array.isArray(a)){const s=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Gd(s,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<a.length;e+=1)Ld(a[e],e,s,void 0,{})}else"object"==typeof a&&s(a,`${t}.${e}`)}))};s(e,t)})(e,t,this):Hm(this.getContextName(),`${this.getPageReference()}${t}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=tf.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,s=yC.getContextPath(this.getPageReference(),n),a=t.getField(s);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(s,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=yC.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,tf.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const s=Ao.getDependencies(this._contextName,n);s?.forEach((e=>{tf.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:s={}}={}}=n||{};return Object.values(s).forEach((n=>{const[,s]=n.split("."),a=t?.split(".").pop();s===a&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(){const{value:e,datasource:t,listType:n}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:a}=this.getPropertyDetails(n,t,e);if(!s||"string"!=typeof s||!s.includes(a)&&!s.includes(Vs.ATTACHMENT_ANNOTATION))return!1;const r=No.getPropertyName(s),o=this.getFieldMetadata(r);if(!o)return!1;const i={...this.getComponentConfig(),fieldMetadata:o,template:this._rawConfig?.config?.template};return this.#u(i,r)}#u(e,t){const n=lg.isPropertyInternal(t),s=e.datasource,a=this.getComponentConfig().isSearchField,{isClassKey:r,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata??{},c="DataReference"===e.template||"ObjectReference"===this.meta?.type,l=e.listType!==Vs.ASSOCIATED;return!a&&!!(i||n||!s&&(r&&!c||o)&&l)}getPropertyDetails(e,t,n){return e===Vs.ASSOCIATED?{propertyValue:t,propertyAnnotation:Vs.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:Vs.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),t.inputFormat&&"string"!=typeof t.inputFormat&&(e.inputFormat=t.inputFormat),this.#u(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#l(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===Df.allowedComponetsForBulkProcessing[t]||!0===Df.allowedComponetsForBulkProcessing[t]?.[n])}}function xf(e){const t=new vf(e);return{getPConnect:()=>t}}function wf(e){Of=e}const Mf={CASE_INFO:`${Vs.DATA}.${Vs.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${Vs.DATA}.${Vs.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${Vs.DATA}.${Vs.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${Vs.DATA}.${Vs.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${Vs.DATA}.${Vs.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${Vs.DATA}.${Vs.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${Vs.DATA}.${Vs.CASE_INFO.ASSIGNMENT_ID}`},Lf=(e,t)=>{const{vcName:n,containerName:s}=t;return s||n||Wp.getTargetViewContainerName(e)},Uf=e=>{const t=e.lastIndexOf(Vs.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(Vs.UNDERSCORE_STRING);return e.substring(t,n)},Ff=e=>e===PE.WORKAREA,Vf=e=>e===PE.MODAL,jf=e=>e===Fa,kf=e=>e===Ta,Bf=e=>e&&e.find((e=>e.type===Ta)),$f=e=>fC.getIn(e,Mf.CASE_INFO,{}),Gf=e=>e?e.split(" ").pop():void 0,Wf=e=>fC.getIn(e,Mf.CASE_CLASS_NAME,Vs.EMPTY_STRING),Hf=(e,t=!1)=>{const n=t?Jp(e):$f(e);return oI(n)&&iI(Vy.getOperatorIdentifier(),n)},qf=e=>fC.getIn(e,Mf.CASE_INFO_ID,Vs.EMPTY_STRING),zf=e=>fC.getIn(e,Mf.CASE_FIRST_ASSIGNMENT_ID,Vs.EMPTY_STRING),Yf=(e,t)=>{const{removeActionPayload:n,target:s}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(ZC(qC,{containerItemID:t,context:a||qE(t),target:s}))}},Kf=e=>{const t=e.context;if(aI.shouldUseUnifiedHandling()){const e=iy(t),{accessedOrder:n=[],type:s}=bE(e),a=n.filter((e=>e!==t));XA(qC({containerItemID:t,context:t,target:e,containerInfo:{newAccessedOrder:a,containerType:s}}))}else cy(t,{skipDirtyCheck:!0})},Qf=e=>{const t=JA();if(!e)return!1;const n=Ws(e),s=iy(n),a=iy(e);if(!s||!a)return!1;const r=xE(s,n),o=xE(a,e);if(!r||!o)return!1;const{key:i}=r||{};let{key:c}=o||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},Jf=(e,t,n={})=>{const{skipFlowNameUpdate:s}=n,a=qf(t);fC.setIn(e,"key",a);const r=oI($f(t));if(!s&&(e=>{const t=fC.getIn(e,Mf.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=zf(t),[,s]=n.split("!");(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:r}),fC.setIn(e,"flowName",s)}},Xf=(e,t)=>{const{attachmentsExist:n}=t;n&&fC.setIn(e,Fs.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),fC.setIn(e,Fs.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Zf=(e,t,n)=>{let s=Vs.PROMISE_VALUE.RESOLVE;return Bf(e)?(s=Vs.PROMISE_VALUE.REJECT,n?$p.rejectActionByID(t,!0,n):$p.rejectActionByID(t)):$p.resolveActionByID(t),s},em=e=>{if(!e)return!1;const t=Vy.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},tm=()=>"true"===Vy?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,nm=(e,t,n,s)=>{const{containerItemID:a}=t;if(a){const{caseClassName:r,skipAssignmentsUpdate:o}=s,i=Ws(a),c=iy(i),l=c&&bE(c),u=c&&GE(c),d=Ys(i),p=n?.data?.caseInfo?.ID;u&&l?.items?.[u]?.key===t?.caseID&&e.push(ZC(OC,{containerItemID:i,context:i,container:d,containerName:d,caseId:p,viewName:Vs.getDefaultQualifiedName(Fs.CASESUMMARY_VIEW_NAME),updateData:!0,viewLoadingContainer:{context:i},caseClassName:r,...void 0!==o&&{skipAssignmentsUpdate:o}}))}},sm=async(e,t)=>{const{context:n,containerItemID:s,shouldUpdateCaseActionsInParentContext:a}=e,r=t?.data?.caseInfo?.ID?qf(t):void 0;if(!n||!r)return;const o=r?`${r}_actionsLoading`:"actionsLoading";try{const i=new vf({}),c=new Jh(i);kp.setComponentCache(o,!0);const l=t?.data?.caseInfo?.caseTypeID?Wf(t):void 0,u=await c.getCaseActions(r,n,{caseTypeID:l});ff(t);const d=fC.getIn(t.data,Vs.getProperty(Vs.CASE_INFO.CASE_INFO_ACTIONS)),p=Array.isArray(u.availableProcesses)&&u.availableProcesses.length>0?{availableProcesses:u.availableProcesses}:[],g=u?.availableActions,h=["pyUpdateCaseDetails"],f=Array.isArray(g)&&g.find((e=>h.includes(e.ID))),m={data:{caseInfo:{availableActions:[...u.availableActions,...void 0!==d?d:[]],...p,editActions:f?[f]:[]}}};kp.setComponentCache(o,!1),XA(ZC(DC,{context:n,...m})),!0===a&&s&&(async(e,t)=>{const{containerItemID:n,caseID:s}=t;if(n){const t=Ws(n),a=iy(t),r=a&&bE(a),o=a&&GE(a);o&&r?.items?.[o]?.key===s&&XA(ZC(DC,{context:t,...e}))}})(m,e)}catch(e){kp.setComponentCache(o,!1),console.error("Error fetching case actions:",e)}},am=(e,t)=>{const n=Wf(e?.response),s=$f(e?.response),{caseTypeID:a}=s,r=Vy.getFeatureMap();(r?.deferUpdateCaseSummaryView??!Object.hasOwn(r,Vs.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&nm(t,e?.actionInPayload,e?.response,{caseClassName:n,skipAssignmentsUpdate:!e?.actionInPayload?.context?.includes(Vs.PREVIEW)})},rm=()=>Vy.isOptimizedCaseLoadingEnabled(),om=(e,t)=>{rm()&&sm(t,e)},im=e=>ZA(e)?.context_data?.caseViewMode,cm=e=>!(!kp.getComponentCache("redirectionInProgress")||!e)&&(Zf([],e),!0);const lm=new class{confirmHandler=null;registerConfirmHandler(e){this.confirmHandler=e||null}confirm(e){return this.confirmHandler?this.confirmHandler(e):Promise.resolve(window.confirm(e))}},um=lm,{RESOURCE_TYPES:dm}=Fs,pm={PAGE:"page",FORM:"form"},gm={[dm.CASE]:[Qa,Ya,Ka],[dm.OBJECT]:[Mr,Lr,Fr],[dm.PAGE]:[Wa,qa],[dm.DATA]:[Ha],ASSIGNMENT:[or]},hm=(e,t,n={})=>{if(!e)return{};const s={etag:e.etag},{RemoteSystemID:a}=n;return e[Fs.REMOTE_SYSTEM_ID]||e[Fs.REMOTE_SYSTEM_ID.toLowerCase()]||a?s.RemoteSystemID=e[Fs.REMOTE_SYSTEM_ID]||e[Fs.REMOTE_SYSTEM_ID.toLowerCase()]||a:t&&Bs.isRemoteCase(t)&&(s.RemoteSystemID=Bs.getRemoteHeader(t)),s},fm=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:s=!1,skipUUID:a=!0,isTransientContext:r=!1,includeDisabledFields:o=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=Jm(e,{isTransientContext:r,includeDisabledFields:o,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,r&&(l={}));const u=dE(e,!1),d=ZA(e),p=Vn(d,Vs.CASE_INFO.CASE_INFO_ENCRYPTED_CONTENT),g=void 0!==p;!r&&s&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,s])=>{const a=ZA(t),r=Vn(a,Fs.CASE_INFO.CASE_INFO_CLASSID),o=IA(n,r);("True-False"===o?.type&&!s||""===s)&&delete e.caseInfo.content[n]}))})(l,e);const h=vs(u,l);let f={};({content:f}=((e,t,n=!1,s=!1)=>{let a={};const r=aI.shouldUseUnifiedHandling()||!n&&!s?t?.caseInfo:t?.objectInfo;return(e||r)&&(a=e?{...t}:{...r}),{content:a}})(r,h,i,c));const m=[...xd(e)];if(a){const e=Ls.getDefaultQualifiedName("EmbedListUUID__");m.forEach((t=>{delete t.content?.EmbedListUUID__,delete t.content?.[e]}))}f.pageInstructions=m;if((Dd[e]||[]).forEach((e=>{if(f?.content){const t=e?.replace(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_CONTENT),"");fC.deleteIn(f.content,(e=>{if(!e)return"";const t=e.split(".");let n,s="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return s+=`['${n.substring(0,n.lastIndexOf("["))}']`,s;s+=`['${n}']`}return s})(t))}})),g&&(f.encryptedContent=p),!r&&h?.dataInfo)return f={...h.dataInfo,pageInstructions:f.pageInstructions},{content:f};const I=nC(Ls.getQualifiedNameForComplexRuleReferences(".pzAdditionalPayload"),Vs.CASE_INFO.CASE_INFO_CONTENT,e);return f.content&&I&&(f.content[Ls.getDefaultQualifiedName("pzAdditionalPayload")]=I),{content:f}},mm=(e,t)=>{let n,s,a={};const r=fC.getIn(e,Vs.UI_RESOURCES),o=fC.getIn(e,"confirmationNote");r?(n=fC.getIn(e,Vs.UI_RESOURCES_CONTEXT_DATA),s=fC.getIn(e,Vs.ROOT),a=fC.getIn(e,Vs.ACTION_BUTTONS)):o&&!t.isActiveWorkAreaPrimaryAndWorkareaAbsent&&(s={});const{data:i={},Errors:c,flowName:l}=e;let{semanticURL:u,key:d}=e;const p=i?.objectInfo?.ID;p&&(d=d||p,u=u||`objects/${p}`);const g=fC.getIn(e,"nextAssignmentInfo",null),h=fC.getIn(e,"nextAssignmentInfo.context",""),f=fC.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:I,debugInfo:E,isExternalObjectCreationFlow:y,isExternalCaseCreationFlow:A}=t;return{data:{...i,key:d,flowName:l,coreHeaders:E&&{debugInfo:{[Vs.COREHEADER_APP_DEBUG_ID]:E.debugId}},[Vs.getProperty(Vs.CASE_INFO.CASE_INFO)]:{...i[Vs.getProperty(Vs.CASE_INFO.CASE_INFO)],actionButtons:a,headers:t.headers},[Vs.CONTEXT_DATA]:m?{...i[Vs.CONTEXT_DATA],...n,openCaseViewAfterCreate:I,errors:c,...y&&{isExternalObjectCreationFlow:y},...A&&{isExternalCaseCreationFlow:A}}:{...i[Vs.CONTEXT_DATA],...n,errors:c}},semanticURL:u,nextAssignmentInfo:g,assignmentContext:h,confirmationLinks:f,key:d,root:s,...t}},Im=async(e,t,n,s=!1,a=!1)=>{const r=fC.getIn(e,Vs.COMPONENTS);if(r)try{await wp(r)}catch(e){console.error(e)}const o={actionConfig:t,...n};s?DS({...e,options:o,directUrlUpdation:!0}):pp(e,o,a)},Em=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},ym=e=>{if(e){const[,t]=e.split("!");return{key:Em(e),flowName:t}}return{}},Am=(e,t,n,s)=>{switch(!0){case Boolean(e[Vs.ERROR_IN_PAGE_IDENTIFIER]&&e[Vs.ERROR_FIELD_IN_PAGE]):{const a=`${e[Vs.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),r=`${a}${e[Vs.ERROR_IN_PAGE_IDENTIFIER]}`,o=fC.deepClone(e);o[Vs.ERROR_FIELD_IN_PAGE]=a,t.includes(r.slice(1))||t.includes(r.substring(r.indexOf(".")+1,r.indexOf("[")))||t.includes(r.substring(r.indexOf(".")+1,r.indexOf("(")))?s.push(o):n.push(e);break}case Boolean(e[Vs.ERROR_IN_PAGE_IDENTIFIER]&&!e[Vs.ERROR_FIELD_IN_PAGE]):{const a=e[Vs.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?s.push(e):n.push(e);break}default:n.push(e)}},Cm=e=>{const{payload:t}=e,{err:n,context:s,actionMgrID:a}=t,r=n&&n.response?n.response.data:"",o=tI(s);return a&&$p.rejectActionByID(a,!0,n),ZC(eS,"Error action triggered",r,s,o)},Sm=(e,t)=>XE(e)&&ey(e)?ZC(KC,t):ZC(MC,t),_m=(e,t,n=Vs.APP.APP,s={})=>{let a=null;const{buildNew:r=!0}=s;return XE(e)?a=ey(e)?GE(e):Hs(t,n):ZE(e)&&(ey(e)&&!r?a=zE(e):ey(e)&&!r||(a=Hs(t,n))),a},Nm=e=>e&&e.type===Oa,Tm=e=>{let t=!1;const n=QE(e);for(let e=0;e<n.length;e+=1){const s=n[e];if(s&&yE(s)){t=!0;break}}return t},Dm=async(e,t={})=>{let n=!1,s=!1,a={},r=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1,loadingContext:d}=t,p=Gy();if(XE(e)){const t=GE(e);if(!t)return{continueExecution:r,removeActionPayload:a};const s=qE(t);yE(s)&&(n=!0),u||n||(n=Tm(t))}else if(ZE(e)&&sy(e)){let t=oy(e);t||(t=GE(e),s=!0),a.containerItemID=t,a.context=qE(t)}if(n){const t={context:d||e};Bp.disableLoadingIndicator(t);const n=l||lE;o=await um.confirm(p.getLocaleValue(n,"Messages")),Bp.enableLoadingIndicator(t)}if(!o&&n&&(a={},r=!1),s){const t={context:d||e};Bp.disableLoadingIndicator(t);const n=p.getLocaleValue(uE,"Messages");c?i=await um.confirm(n):(await um.confirm(n),r=!1),Bp.enableLoadingIndicator(t)}return!i&&s&&(a={},r=!1),{continueExecution:r,removeActionPayload:a}},Pm=(e,t)=>{let n=!1;const s=Vy.isCoexistenceAppOfType(Vs.APP_TYPE.UIKIT),{insKey:a,isParallelCall:r,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:Em(a),l=VE(e,c);let u={},d=!1;if(l&&!s&&((e,t)=>{const n=xE(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,u=xE(e,l),!o)){let e=u?.flowName;const t=Uf(l),s=YE(l);if(s.length){const n=((e,t)=>e?.includes(Vs.WORKAREA)?Vs.WORKAREA:t)(s[0],t),a=jr(n,s[0]);e=xE(a,s[0])?.flowName}else n=e===i;(e!==i||r)&&(d=!0)}return n=((e,t)=>!t&&e)(n,t.forceRefresh),{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:a}}},Om=(e,t,n)=>e===dm.PAGE?((e,t={})=>{let n=!1;const{semanticURL:s}=t,a=VE(e,s);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:s}}})(t,n):e===dm.ASSIGNMENT?Pm(t,{...n,type:e}):e===dm.CASE||e===dm.OBJECT?Pm(t,{...n,skipFlowNameCheck:!0,type:e}):{},Rm=e=>{if(e){const t=(e=>{const t=wE(e);if(!t)return null;for(const[e,n]of Object.entries(t))if(!n.key&&n.resourceType===Fs.PAGE)return e;return null})(e);if(t)return{activate:!0,activateContainerActionPayload:{target:e,containerItemID:t,semanticURL:""}}}return{activate:!1}},bm=(e,t,n)=>{const{semanticURL:s,isDefaultNavPage:a}=((e,t)=>{const n=mS(Wa,{page:e,pageClass:t}),s=JA()?.getState()?.data?.app?.pyPortal?.pyPrimaryNavPages,a=Array.isArray(s)?s[0]:void 0;return{semanticURL:n,isDefaultNavPage:!(a?.pyRuleName!==e||a?.pyClassName!==t)}})(e,t);if(n&&s&&!a){const e=Om(dm.PAGE,n,{semanticURL:s});if(e.activate)return{semanticURL:s,activate:!0,activateContainerActionPayload:e.activateContainerActionPayload}}if(a){const e=Rm(n);return e.activate?{semanticURL:s,...e}:{semanticURL:"",activate:!1}}return{semanticURL:s,activate:!1}},vm=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),xm=(e=[])=>{ey(`${Vs.APP.APP}/${Vs.PREVIEW}`)&&e.push(ZC(wC,ay({context:Fs.APP.APP,name:Vs.PREVIEW})))},wm=e=>{let t;for(const n of Object.keys(gm))if(gm[n].includes(e)){t=n;break}return t},Mm=(e,t,n="",s={})=>{const{data:a={},context:r,caseViewMode:o,skipMergeAssignmentsAndActions:i=!0}=e,c={data:{...a},caseViewMode:o,context:Ws(r)};fC.deleteIn(c.data,"shared"),fC.setIn(c.data,["context_data","caseViewMode"],o),t.push({type:hr,payload:{context:c.context,skipMergeAssignmentsAndActions:i}});const l=n&&![Fs.CASE_INFO.CASE_INFO_CONTENT,Fs.DATA_INFO.DATA_INFO_CONTENT].includes(n),{propertiesToReplace:u=[]}=s;t.push(ZC(DC,{...c,...l&&{uiRootReference:n}},...u.length>0?[{propertiesToReplace:u}]:[]))},Lm=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=fC.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const s=fC.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:fC.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:fC.getIn(t,["payload","context"]),context:fC.getIn(t,["payload","context"])},s={type:ma,payload:{...n}};e.push(s),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),XA(e),e=e.filter((e=>e.type!==ma))}const a=((e,t,n)=>({assignmentID:e,vcName:Vs.PRIMARY,targetContainerName:fC.getIn(t,["payload","target"]),context:fC.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(s,t,n);XE(a.targetContainerName)||t?.payload?.containerName!==Vs.WORKAREA||(a.isMultiDoc=!0,e=[]);const r={type:Ia,payload:{...a}};e.push(r),XA(e)}else XA(e)}},Um=(e,t)=>vs(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Fm=e=>{let t={},n=Oy(e);for(;n;){const e=fm(n);t=Um(e.content,t),n=Oy(n)}return t},Vm=e=>{e?.containerItemID&&tf.updateState(e.containerItemID,"traditionalGadgetId",aI.getUniqueGadgetId(),{skipDirtyValidation:!0})};class jm{static getChanges(e){return{...dE(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:s=!1,onlyChangedData:a=!1}=t||{},{content:r}=fm(e,{isTransientContext:n,includeDisabledFields:s,onlyChangedData:a});return r}static isStateModified(e){return yE(e)}static hasUnsavedChanges(e){return yE(e)||$d(e??null)}static resetComplexObjectDirtyStatus(e){return fE(e)}static isFormValid(e,t){return Zm(e,t)}static clearChangedProperties(e){return wd(e),vd(e),CE(e)}static getEditableFields(e){return nI(e)}static setCustomValidator(e,t){lp.register(e,t)}static isPropertyEditable(e,t){return jm.getEditableFields(e).some((e=>e.name===t))}}const km=jm;const Bm=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,s){const a=`${n}${t}`,{stateMachine:r}=this.getStateMachineObjByPath(a,e,!0,!0),o=(t,n,s=!1)=>{const a=s?this.states:this.unConnectedStates;a[e]||(a[e]={}),a[e][t]||(a[e][t]={}),a[e][t]=n};if(r&&r.targetPageReference!==s.targetPageReference)return r.addChild(s),void o(a,s);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(a)){const t=e.substring(0,a.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],s.addChild(n),o(t,n)})),this.states[e][a]=s):o(a,s,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},s=[];return Object.keys(n).sort().forEach((a=>{const r=hu.getContextReferences(e)?.get(a),o=r&&yC.resolveContextTreeNodeProps(r.props)||{},i=n[a];if(r&&!0!==o.readOnly){const e=i.buildSubmitPageInstructions(t);s.push(...e)}else if(i.hasEncryptedContent){const e=i.buildSubmitPageInstructions(t).filter((e=>void 0!==e.encryptedContent));s.push(...e)}else r||this.setStateMachineEmpty(e,a)})),s}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const s={};return Object.keys(t).forEach((e=>{const s=t[e].getChangeList();n={...n,...s}})),fC.flatten(n,"",s),s}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,"");n.root=null,n.current=null,n.hasEncryptedContent=!1;const s=this.getUnConnectedStateMachines(e)||{};Object.keys(s).forEach((e=>{e.includes(t)&&delete s[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const s=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&s&&Od(t,s,n)}getStateMachineObjByPath(e,t,n,s=!1){const a=/\[\d+\]$/gm,r=e;let o;for(;e&&!this.isStateMachineExist(t,"",e);){const i=iy(t),c=xE(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(o=null,n&&e.endsWith("]")){if(o=e.match(a),o=o?.[o.length-1]?.substring(1,o[o.length-1].length-1),[e]=e.split(a),!s&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(r,t);break}}else{if(c?.index&&e.includes(c.index)&&l){const t=e.split(".");o=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:o}:{}}executeStateMachine(e,t,n,s=!0,a={}){const{stateMachineTarget:r,index:o}=this.getStateMachineObjByPath(t,e,s);if(!r)return!1;const i=iy(e),c=xE(i,e)||{};let[,l]=t.split(r);if(!l)return!1;const u=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==o&&([,l]=u?l.split(/(?=\.\w+)/):l.split(/^\[\d+\]/gm));const d={[Gm(l)]:n},p=this.getStateMachine(e,"",r);if(null!==o)if(u){const t=xd(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},o,a.skipStateUpdate??!0,a)})),p?.update(d,o,a.skipStateUpdate??!0,a)}else p?.update(d,Number(o)+1,a.skipStateUpdate??!0,a);else p?.updatePage(fC.unflatten(d));return!0}setUniqueField(e,t,n){const s=hu.getContextReferences(e)?.get(n)?.props?.uniqueField;s&&(t.content||(t.content={}),t.content[Gm(s)]=crypto.randomUUID())}getBasePageReference(e){return nC(Fs.DATA_INFO.DATA_INFO_CONTENT,"",e)?Fs.DATA_INFO.DATA_INFO_CONTENT:Fs.CASE_INFO.CASE_INFO_CONTENT}mergeServerPageInstructions(e,t){t.forEach((t=>{if(t.target){const n=fC.convertClipboardPageToPageRefNotation(t.target),s=`${this.getBasePageReference(e)}${n}`;if(!this.isStateMachineExist(e,s,"")){const t=s.substring(s.lastIndexOf(".")),n=s.substring(0,s.lastIndexOf("."));Od(e,t,n)}const a=this.getStateMachine(e,s,"");"INSERT"===t.instruction&&this.setUniqueField(e,t,s),void 0!==t.encryptedContent&&a&&(a.hasEncryptedContent=!0),a?.insertNode(t)}}))}registerForServerChanges(){zA.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){zA.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const s="].";if(!t.includes(".classID")&&km.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(s)){const a=t.substring(0,t.lastIndexOf("[")),r=km.getEditableFields(e);if(["multiselect","checkbox"].includes(r.find((e=>e.name===a))?.type)){const r=hu.getContextReferences(e),o=r?.get(a),i=t.substring(t.lastIndexOf(s)+2);o?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){zA.unRegisterForListChanges()}},$m={},Gm=e=>e.startsWith(".")?e.substring(1):e,Wm=e=>{delete $m[e]},Hm=(e,t,n)=>{const s=Gm(t);$m[e]?$m[e].fieldOrder[s]=n:$m[e]={fieldOrder:{[s]:n}}},qm=(e,t={})=>{const{includeDisabledFields:n=!1}=t,s=yC.resolveContextTreeNodeProps(e),a=!0!==s.readOnly&&!1!==s.visibility&&(n||!0!==s.disabled),r="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),o=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||o)&&!r&&a},zm=(e,t,n,s,a)=>(Bm.executeStateMachine(e,s,yC.getLitePropertyValue(n,t))||a.push(s),a),Ym=(e,t,n)=>{const s=t.isInsideList,{ignoreFieldsInsideList:a=!0}=n;return(!s||s&&!a)&&!Array.isArray(yC.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},Km=(e,t={})=>{let n=[];const s=[],a=hu.getContextReferences(e);return a?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:s=!1}=n;let a=[];for(const[r,o]of e){const e=yC.resolveContextTreeNodeProps(o.props),i=e.propertyName;qm(o.props,{includeDisabledFields:s})&&Ym(r,e,n)&&(a=zm(t,i,e,r,a))}return{editableFormFieldsReferenceList:a}})(a,e,t)),$m[e]&&s.push(...Object.keys($m[e].fieldOrder??{})),{formInputs:n,formPageFields:s}):{formInputs:n,formPageFields:s}},Qm=e=>{let t=[];const n=hu.getContextReferences(e);if(n)for(const[e,s]of n){const n=s?.props;if(qm(n)&&"Attachment"===n?.componentName){const s="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:s,fullPath:e}]}}return t},Jm=(e,t={})=>{const n={},s=ZA(e),{ignoreFieldsInsideList:a=!0,isTransientContext:r=!1,includeDisabledFields:o=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>aI.shouldUseUnifiedHandling()||!e&&!t?n?.caseInfo:n?.objectInfo)(i,c,s);if(r||l){const{formInputs:t,formPageFields:i}=Km(e,{ignoreFieldsInsideList:a,includeDisabledFields:o});((e,t,n)=>{e.forEach((e=>{let s=fC.getIn(t,e);"object"==typeof s&&(s=fC.deepClone(s),delete s?.classID),fC.buildObject(e,n,s)}))})(i,s,n),t&&t.length>0?t.forEach((e=>{fC.buildObject(e,n,fC.getIn(s,e))})):r||fC.buildObject(Fs.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!r&&s?.dataInfo?.content){const{formInputs:t}=Km(e,{ignoreFieldsInsideList:a});t.forEach((e=>{fC.buildObject(e,n,fC.getIn(s,e))}))}return n},Xm=(e,t,n)=>{const s=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,a=hu.getContextReferences(e)?.get(`${t}${s}`)?.props;return a?yC.resolveContextTreeNodeProps(a):a},Zm=(e,t)=>{const n=hu.getContextReferences(e);let s=!0;if(!n)return s;for(const[e,a]of n){const n=yC.resolveContextTreeNodeProps(a.props);if(qm(a.props)&&(!t||e.includes(t))){const e=lp.validate(n.componentName?.toLowerCase(),n.propertyName,yC.getLitePropertyValue(n,n.propertyName),n);s&&(s=!e.message)}}return s},eI=e=>{const t=hu.getContextReferences(e);if(t)for(const[,e]of t){if(yC.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0}return!1},tI=(e,t=!1)=>{const n=hu.getContextReferences(e),s=[];if(n)for(const[e,a]of n){if(!1!==yC.resolveContextTreeNodeProps(a.props).visibility){const n=8,a=t?e:e.substring(e.indexOf("content")+n);s.push(a)}}return s},nI=e=>{const t=[],n=hu.getContextReferences(e);if(n)for(const[e,s]of n){const n=yC.resolveContextTreeNodeProps(s.props);qm(s.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class sI{static getCaseInlineEditAction(e){return e?Vy.getInlineEditActions(e):[]}static isCaseActive(e,t){if(!e||!t)return!1;const n=bE(t);if(n){const s=GE(t),{items:a={}}=n;return!(!s||!a[s]||a[s].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:Ls.getDefaultQualifiedName("pyEdit")},{restApi:s,reqType:a}=ES("loadView",n);return rd(s,{method:a},t)};static isExternalCaseType=e=>{let t;return this.shouldUseUnifiedHandling()?(t=Vy.getCaseTypeList()?.find((t=>t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e)),!!t):(t=Vy.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e)),!!t)};static getCaseEditLock=(e,t,n)=>{const s={caseID:e,actionID:this.getCaseInlineEditAction(n)[0]??Ls.getDefaultQualifiedName("pyUpdateCaseDetails")},{restApi:a,reqType:r}=ES(nr,s);return rd(`${a}?viewType=page`,{method:r},t)};static updateCaseEditFieldsData=(e,t,n,s,a)=>{const r=this.getCaseInlineEditAction(a),o=r.length?r:[Ls.getDefaultQualifiedName("pyUpdateCaseDetails")],i=t[e],c=(t,n)=>{const[a,...r]=t;return((t,n)=>{const a={caseID:e,actionID:t},{restApi:r}=ES(nr,a);return rd(`${r}?viewType=form`,{method:"PATCH",body:{content:{...i}},headers:{"if-match":n}},s)})(a,n).then((e=>r.length>0?c(r,e.headers.etag):e))};return c(o,n)};static getCaseMessages=e=>ZA(e)?.caseMessages;static getPropertiesToReplace=e=>(Qm(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(Qm(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>fC.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>Bs.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>Bs.isTraditionalRemoteCase(e);static isRemoteCase=e=>Bs.isRemoteCase(e);static isRemoteCaseVersionDifferent=e=>Bs.isRemoteCaseVersionDifferent(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=Vy.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=Vy.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e)),{DisplayMandatoryInputsForObject:n,objectType:s}=t?.[0]||{};return t&&t.length>0&&n&&"Object"===s};static getRouteKeyForCreateWork=(e,t=!1)=>this.isExternalCaseType(e)&&t?Vr:this.isExternalObject(e)&&t?this.shouldUseUnifiedHandling()?Vr:"retrieveActionViewForNewObject":this.shouldUseUnifiedHandling()?Or:this.isObjectCaseType(e)?Mr:Or;static shouldUseUnifiedHandling=()=>!0;static shouldAppendExcludeQueryParam=()=>Vy.isOptimizedCaseLoadingEnabled();static appendExcludeQueryParamToUrl=e=>{if(!e)return e;if(!this.shouldAppendExcludeQueryParam())return e;let t=e;if(t.includes("excludeAdditionalActions=true"))return t=t.replace("excludeAdditionalActions=true","exclude=availableActions,availableProcesses"),t;const n=t.includes("?")?"&":"?";return`${t}${n}exclude=availableActions,availableProcesses`};static setTraditionalGadgetId=e=>{e.traditionalGadgetId=sI.getUniqueGadgetId()}}const aI=sI,rI=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},oI=e=>{if(aI.shouldUseUnifiedHandling()&&aI.isObjectCaseType(String(e?.caseTypeID))&&!rI(e))return!0;if(aI.isObjectCaseType(String(e?.objectTypeID))&&!rI(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},iI=(e,t)=>{if(e&&t){const n=fC.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:s,type:a}=n;return"worklist"===a?.toLowerCase()&&s===e}return!1},cI=(e,t)=>{const n=yC.getPropertyValue(Fs.CASE_INFO.ACTIVE_ACTION_ID,t,e),s=yC.getPropertyValue(Fs.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(s&&n){const e=s.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===Fs.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!s){const t=ZA(e);a=t?.context_data?.actionType===Vs.CASE}return a},lI=e=>sC(null,Vs.CASE_VIEW_MODE_PROP,e)===Vs.PERFORM_MODE&&(e.includes(Vs.WORKAREA)||e.includes(Vs.MODAL)||e.includes(Vs.ACTIONAREA)),uI=(e,t)=>lI(e)&&!cI(e,t),dI=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},pI=(e,t,n)=>{let s;const a=e?.find((e=>e.ID===t))?.actions,r=a?.filter((e=>e.ID===Vs.FIX_BROKEN_ASSIGNMENTS))||[];return s=n&&r?.length>0?r[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),s},gI=(e,t,n,s)=>{let a;return a=e?pI(e,t,n):s||Ls.getDefaultQualifiedName("Create"),a},hI=(e,t)=>aI.shouldUseUnifiedHandling()?ha:aI.isObjectCaseType(e)||t?vr:ha,fI=(e,t,n)=>{let s,a,r,o,i,c,l,u,d;const p=ZA(e),g=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID,h=aI.shouldUseUnifiedHandling();return n?.isTriggeredFromDifferentContext||e.includes(Vs.ACTIONAREA)?(s=e.includes(Vs.ACTIONAREA)?void 0:p.caseInfo?.assignments?.[0]?.ID,a=p.caseInfo.ID,r=p.caseInfo.assignments,o=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,u=p.caseInfo.caseTypeID,d=p.caseInfo.caseTypeName):!h&&p?.objectInfo&&aI.isObjectCaseType(g)?(a=p.objectInfo.ID,o=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,l=p.objectInfo.businessID,u=p.objectInfo.objectTypeID,d=p.objectInfo.objectTypeName):(s=t.getValue(Vs.getProperty(Fs.CASE_INFO.ASSIGNMENT_ID)),a=t.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID)),r=t.getValue(Vs.getProperty(Fs.CASE_INFO.ASSIGNMENTS)),o=t.getValue(Vs.getProperty(Fs.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(Vs.getProperty(Fs.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO)),l=t.getValue(Vs.getProperty(Fs.CASE_INFO.BUSINESS_ID)),u=t.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_TYPE_ID)),d=t.getValue(Vs.getProperty(Fs.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:s,caseID:a,assignments:r,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}},mI=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),s=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{s.append(t,String(e[t]))})),n.search=s.toString(),n.toString()}return t},II=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],s=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===s){n.forEach((e=>{e.isErrorButton=!0}));const s=e.payload.context,a=ZA(s),r=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,a?.caseInfo?.actionButtons?.secondary||[]),o={data:{["dataObject"===t?Fs.DATA_INFO.DATA_INFO:Fs.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:r}}},target:iy(s),context:s};XA({type:Ca,payload:o})}},EI=e=>({type:Lh.REFRESH_DATA,payload:e}),yI={},AI=(e,t,n,s,a,r,o,i,c,l)=>{if(!(e&&s&&t))return;const u=l.actionMgrID||$p.getNextActionMgrId(),d={ID:e,actionID:t,objectTypeID:n,context:s,caseWideAction:a,isObjectType:r,isExternalObject:o,isExternalCase:i,casetypeID:c,options:{...l,actionMgrID:u}};l.isFillFormWithAI?XA((e=>({type:Pr,payload:e}))(d)):XA(EI(d))},CI=(e,t,n,s,a)=>{if(!(e&&n&&t))return;s&&(s=fC.convertPageRefToClipboardPageNotation(s));XA(EI({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:s}))},SI=(e,t,n,s,a,r,o,i,c,l={})=>{if(!((e||t)&&s&&n&&a))return;a&&(a=fC.convertPageRefToClipboardPageNotation(a));const u={ID:o||c!==Vs.ACTION?e:t,actionID:n,context:s,options:l,interestPage:a,interestPageActionID:r,isLocalAction:o,isMultiRecordData:i,editType:c};XA(EI(u))},_I=(e,t,n)=>{yI[t]||(yI[t]={}),e&&!yI[t][e]&&(yI[t][e]={pageReference:n})},NI=(e,t,n)=>{const s={pageName:(a=t.substring(t.lastIndexOf(" ")+1)).substring(0,a.lastIndexOf(".")),propertyName:a.substring(a.lastIndexOf(".")+1)};var a;const r=IA(s.propertyName,n||e.getValue(Vs.CLASS_ID,s.pageName));return!!r?.isDeclarativeTarget},TI=(e,t,n)=>{const s=n||e.getRawMetadata()?.config?.value;let a=!1;if(s){const n=No.trimAnnotation(s);let r;r=t?fC.resolvePageClass(n,t):yC.resolveClassID(s,e.getPageReference(),e.getContextName());const o=IA(No.getLeafPropertyName(s),r);if(a=!!o?.isDeclarativeTarget,!a&&o?.additionalInformation){const e=No.trimAnnotation(o?.additionalInformation);a=sf.isDecisionParagraph(e,o.classID)}!a&&o?.datasource?.parameters&&(a=((e,t,n)=>{let s=!1;if(Array.isArray(t)){const a=t=>{const a=t.value;return a.startsWith("@P")&&(s=NI(e,a,n)),s};t.some(a)}else if("object"==typeof t)for(const a of Object.keys(t))if(t[a].startsWith("@P")&&(s=NI(e,t[a],n),s))break;return s})(e,o?.datasource?.parameters,t)),a||(a=o?.datasource?.tableType===Vs.DECISION)}return a},DI=(e,t)=>{const n=n=>(e=>"string"==typeof e&&e.startsWith(Vs.PROPERTY_ANNOTATION))(n)&&TI(e,t,n),s=e=>!(!e||"object"!=typeof e)&&Object.values(e).some((e=>n(e)||s(e)));return s(e.getRawMetadata()?.config)},PI=e=>{(e.isWhenExist()||DI(e))&&_I(e.getCurrentView(),e.getContextName(),e.getPageReference())},OI=e=>{if(!e)return!1;const t=JA()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return aI.isObjectCaseType(n)},RI=(e,t,n)=>{const s=cI(e,t);let a,r,o="",i="";const c=n=>yC.getPropertyValue(n,t,e)||"",l=aI.shouldUseUnifiedHandling(),u=c(Fs.CASE_INFO.CASE_INFO_CLASSID)||c(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID)||n?.classID||"",d=aI.isObjectCaseType(u)||t.startsWith(Vs.OBJECT_INFO.OBJECT_INFO),p=aI.isExternalCaseType(c(Fs.CASE_INFO.CASE_INFO_CLASSID)),g=aI.isExternalObject(u),h=c(Vs.getProperty(Fs.CASE_INFO.BUSINESS_ID));if(d&&OI(e)&&!p)o=u,n.isObjectWideAction=!0,a=c(l?Fs.CASE_INFO.ACTIVE_ACTION_ID:Fs.OBJECT_INFO.ACTIVE_ACTION_ID),a||(a=Vs.getDefaultQualifiedName(Vs.VIEW_NAMES.OBJECT_CREATE_VIEW)),r=c(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID))||o;else if(p&&!h)a=Vs.getDefaultQualifiedName(Vs.VIEW_NAMES.OBJECT_CREATE_VIEW),r=c(Fs.CASE_INFO.CASE_INFO_CLASSID),i=c(Fs.CASE_INFO.CASE_TYPE_ID);else if(a=c(Fs.CASE_INFO.ACTIVE_ACTION_ID)||c(Fs.CASE_INFO.ASSIGNMENTACTION_ID),s)r=c(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID));else{r=c(Vs.getProperty(Fs.CASE_INFO.ASSIGNMENT_ID))||c(Vs.getProperty(Fs.CONTEXT_DATA_ASSIGNMENTID))}AI(r,a,o,e,s,d,g,p,i,n)},bI=e=>{const{context:t,pageReference:n}=e,s=(e=>yI[e]&&Object.keys(yI[e]).length>0&&lI(e))(t);if(!s)return;const a=yC.getPropertyValue(Vs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:r,editType:o}=a||{};if(r){const e=yC.getPropertyValue(Fs.CASE_INFO.CASE_INFO_ID,n,t),s=yC.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:u,viewName:d}=a;o===Vs.ACTION?SI(e,s,l,t,i,c,u,r,o):CI(e,d,t,i,{})}else RI(t,n,{})},vI=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},xI=(e,t)=>{const n=e.url===t.url,s=e.interestPage===t.interestPage;return n&&s},wI=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),s=t.url?.includes("/refresh?refreshFor="),a=e.url?.endsWith("/refresh")&&!n,r=t.url?.endsWith("/refresh")&&!s;if(a&&r)return xI(e,t);if(a&&s)return!0;if(n){if(r)return"CANCEL_REFRESH";if(s)return xI(e,t)}return!1},MI=e=>{const t=(e=>{const t=[];return hu.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const s=n.split(".");s.shift();let a=s.join(".");e&&a&&(a=fC.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a}))})),t})(e),n=(e=>{const t=[];return hu.getWhens(e).forEach((({name:e,type:n,pageReference:s})=>{const a=s.split(".");a.shift();let r=a.join(".");e&&r&&(r=fC.convertPageRefToClipboardPageNotation(r),t.push({name:e,context:r,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const LI=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},UI={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},FI='input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"], input:not([type])',VI=`${FI}, textarea, [contenteditable="true"]`,jI=new Map,kI=new Map,BI=new Set,$I=new Map,GI=new Map,WI=new Set,HI=(e,t)=>{$I.get(e)?.forEach((e=>e(t)))},qI=(e,t)=>{const n=kI.get(e);void 0!==n&&clearTimeout(n),kI.set(e,setTimeout((()=>{kI.delete(e),t()}),(()=>{const e=Number(Vy.getFeatureMap()?.pyAutoSaveDurationInMS);return e>0?e:5e3})()))},zI=e=>{const t=Ws(e),n=iy(t);return!n||!ZE(n)||GE(n)===t},YI=async e=>{if(BI.has(e))return;if(WI.has(e))return;const t=jI.get(e);if(!t)return;if(!zI(e))return;const n="undefined"!=typeof document?document.activeElement:null;if(n&&n===(e=>rp.get(e)??null)(e)&&n.matches(FI))return void qI(e,(()=>YI(e).catch((()=>{}))));(e=>{const t=GI.get(e);if(t&&0!==t.size){for(const[n,s]of t)Bm.executeStateMachine(e,n,s,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||XA(oS({reference:n,value:s,context:e,isImplicit:!1,skipDirtyValidation:!1}));GI.delete(e)}})(e);let s=!1;ap(!0);try{if(!km.hasUnsavedChanges(e))return;s=km.isFormValid(e)}finally{ap(!1)}if(s){BI.add(e),HI(e,UI.SAVING);try{await((e,t)=>{const n=e,s=n.includes(Vs.MODAL),a=nC(Fs.CASE_INFO.CASE_INFO_ID,null,n),r=nC(Fs.CASE_INFO.ASSIGNMENT_ID,null,n),o=nC(Fs.CASE_INFO.ACTIVE_ACTION_ID,null,n)||nC(Fs.CASE_INFO.ASSIGNMENTACTION_ID,null,n),i=nC(Fs.CASE_INFO.CASE_TYPE_ID,null,n),c=nC("isProcessAction","isProcessAction",n),l=$p.getNextActionMgrId(),u={context:n,containerItemID:e,assignmentID:r,actionID:o,caseID:a,containerName:t,caseType:i,isModalAction:s,isFormValid:void 0,isProcessAction:c,saveOnly:!0,autosave:!0,actionMgrID:l};let d,p;const g=new Promise(((e,t)=>{d=e,p=t}));if(!d||!p)throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return $p.register(l,g,d,p,ag,u,!0),Gh.executeOrQueueDeferredAction(rg(u)),g})(e,t.containerName),km.clearChangedProperties(e),HI(e,UI.IDLE)}catch{HI(e,UI.ERROR)}finally{BI.delete(e)}}else HI(e,UI.SKIPPED)},KI=()=>{if("undefined"==typeof document)return;const e=document.activeElement;if(e?.matches(VI))for(const e of jI.keys())kI.has(e)&&zI(e)&&qI(e,(()=>YI(e).catch((()=>{}))))},QI=KI,JI=e=>{"Tab"===e.key&&KI()},XI=e=>{const{target:t}=e;if("undefined"!=typeof Element&&t instanceof Element&&t.matches(FI))for(const e of jI.keys())kI.has(e)&&zI(e)&&(op(e,t),qI(e,(()=>YI(e).catch((()=>{})))))},ZI=e=>jI.has(e),eE=e=>{const t=kI.get(e);void 0!==t&&clearTimeout(t),kI.delete(e),BI.delete(e),jI.delete(e),WI.delete(e),GI.delete(e),ip(e),0===jI.size&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",QI),document.removeEventListener("keydown",JI),document.removeEventListener("input",XI,{capture:!0}))},tE=e=>{const t=`${e}/`;for(const e of[...jI.keys()])e.startsWith(t)&&eE(e)},nE=e=>{const t=kI.get(e);void 0!==t&&(clearTimeout(t),kI.delete(e))},sE=e=>{jI.has(e)&&(WI.has(e)||qI(e,(()=>YI(e).catch((()=>{})))))},aE=e=>{WI.delete(e),km.hasUnsavedChanges(e)&&sE(e)},{APP:rE}=Vs;let oE={},iE={},cE={};const lE="You will lose unsaved changes. Do you want to continue?",uE="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",dE=(e=rE.APP,t,n)=>{let s=[],a=[];t||(s=tI(e,!0)),n||(a=(e=>{const t=hu.getContextReferences(e),n=[];if(t)for(const[e,s]of t)!0===yC.resolveContextTreeNodeProps(s.props).readOnly&&n.push(e);return n})(e));const r={};((e,t,n)=>{const s=iE[t]||{};Object.keys(s).forEach((t=>{const a=s[t].associatedProperty;Object.hasOwn(s,t)&&(void 0===a||n.includes(a))&&fC.buildObject(t,e,s[t].value)}))})(r,e,s);const o=oE[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&s.includes(e)||t;Object.hasOwn(o,e)&&n&&!a.includes(e)&&fC.buildObject(e,r,o[e].value)})),r},pE=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete oE[t]?.[n],delete iE[t]?.[n]};var gE;gE=(e,t)=>{pE({context:e,reference:t})},iu=gE;const hE=e=>e&&cE[e],fE=e=>{e&&cE[e]&&(cE[e]=!1)},mE=(e,t)=>{const{context:n,initialValue:s="",isStrictTracking:a,associatedProperty:r}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=nC(t.reference,null,n):(e[o]={initialValue:s||nC(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,r&&(e[o].associatedProperty=r),a&&e[o].value===e[o].initialValue&&pE(t)},IE=e=>{const{payload:t}=e,{context:n}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;hu.isFieldExists(n,s)||(iE[n]=iE[n]||{},mE(iE[n],t)),oE[n]=oE[n]||{},mE(oE[n],t)},EE=({value:e,context:t,reference:n})=>{const s=iy(t),a=xE(s,t)||{};if(LI.isPageInstruction(n)||a?.subscriptFieldName)return;const r=n?.startsWith(".")?n?.substr(1):n;oE[t]=oE[t]||{};oE[t][r]||(oE[t][r]={initialValue:nC(r,null,t)}),oE[t][r].value=e},yE=e=>e&&oE[e]&&Object.keys(oE[e]).some((t=>oE[e][t].initialValue!==oE[e][t].value))||!!hE(e),AE=(e,t)=>{if(!e||!t)return!1;const n=oE[e]&&oE[e][t];return!!n&&n.previousValue!==n.value},CE=e=>{e&&oE[e]?(oE[e]={},iE[e]={}):"all"===e&&(oE={},iE={},cE={}),cE[e]&&(cE[e]=!1),ip(e)},SE=(e,t,n=new Set)=>{if(n.has(t))return;n.add(t);[...Ao.getDependencies(e,t),...zA.getResetDependencies(e,t)].forEach((t=>{const s=fC.getPropertyNameFromDependency(t);if("object"==typeof t&&"multiRecord"===t.mode){const t=s.split("."),n=`.${t.pop()}`,a=t.join(".");if(Bm.isStateMachineExist(e,a,n)){Bm.getStateMachine(e,a,n).deleteAll()}else if(ZI(e)){Bm.setStateMachine(e,n,a,new Nd(n,a,e));const t=Bm.getStateMachine(e,a,n);t?.deleteAll(!1)}}else LI.isPageInstruction(s)&&Bm.executeStateMachine(e,s,""),XA({type:Xs,payload:{reference:s,value:"",context:e,isArrayDeepMerge:!0,isImplicit:!0}});SE(e,s,n)}))},_E={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:s={}}=t||{};if(n===ea&&(Io(s),(e=>{const{context:t,pageReference:n,value:s,reference:a}=e;zA.triggerCascade(t,a,s);const r=Ao.getDependencies(t,a),o={context:t,datapages:{}};SE(t,a),r.forEach((s=>{let a=n;s.startsWith(n)||(a="");const r=s.replace(`${a}`,"").split(".").filter((e=>!!e));r.pop();const i=r.join("."),c=nC(`.${i}`,a,t)?.classID||e.classID,l=IA(s.split(".").pop(),c),{datasource:u}=l,d={},p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=lg.isProperty(e.value)?nC(`.${fC.getFullPropertyReference([i,fC.getPropertyName(e.value)])}`,a,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(Vs.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(Vs.NULL_STRING))}));const g=u.name.concat(Vs.UNDERSCORE_STRING,fC.getHashedString(p.join(Vs.HASH_DELIMITER))),{name:h}=u,f=bA(h);o.datapages[g]={mode:u.mode,propertyName:s,name:u.name,dataViewParameters:d,refreshStrategy:f?.refreshStrategy}})),r.length&&XA({type:ur,payload:o})})(s),Gh.registerBlockingAction(s.context).catch((()=>{})),setTimeout((()=>{(AE(s.context,s.reference)||$d(s.context))&&bI(s),xh.triggerRefreshForType("PROP_CHANGE",s.reference,s.context),Gh.deRegisterBlockingAction(s.context).catch((()=>{}))}),0)),n===gr&&!s?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:a,instruction:r,skipDirtyValidation:o=!1}=s;0===a&&"INSERT"===r&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const s of n){const n=xf({meta:s}).getPConnect();if(n.isWhenExist()||DI(n,t))return!0;if(s.children&&e(t,s.children))return!0}return!1}(n.contextClass,n.children??[])),t&&_I(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),setTimeout((()=>{xh.triggerRefreshForType("PROP_CHANGE",t,e)||bI({context:e,pageReference:t})}),0),o||(cE[`${e}`]=!0)}if(n===Xs||n===Zs){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:r=!1}=s;hu.updateFieldNodeValue(a,e,s.value),LI.isPageInstruction(e)||r?r||(cE[`${a}`]=!0):IE(t),(s.removePropertyFromChangedList||n)&&pE(s)}if(n===Ma||n===La){const{transientItemID:e,data:t}=s;fC.iterateLeafNodes(t,(t=>{pE({context:e,reference:t.join(".")})}))}if(n&&[Va,Ra,ka,wa].includes(n)){CE(s.context),zA.purgeResetDependencies(s.context),(e=>{e&&yI[e]&&delete yI[e]})(s.context);(s.childContainersContexts||[]).forEach((e=>{CE(e)}));(s.transientItems||[]).forEach((e=>{CE(e)}))}e(t)},getChanges:dE,recordChange:IE,isDirty:()=>Object.keys(oE).some((e=>yE(e))),isPropertyDirty:AE,isContextDirty:yE,resetChangedProperties:CE,deleteRecordedChange:pE,isComplexObjectMerged:hE,resetComplexObjectDirtyStatus:fE};const NE=new class{getCoreheaders(e){const t=`${Fs.APP.APP}${Vs.FORWARD_SLASH_STRING}${Vs.PRIMARY}`,n=GE(t),s=qE(n),a=yC.getProperty(Vs.COREHEADERS,"",s);if(a&&e in a)return a[e]}},TE={defaultLimit:16},DE={SINGLE:"single",MULTIPLE:"multiple"},PE={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},OE=()=>JA()?.getState()?.containers;function RE(e){return"string"==typeof e&&""!==e.trim()}const bE=e=>RE(e)?JA()?.getState().containers[e]:null,vE=(e,t,n)=>{if(!n)return{continueExecution:!1,containerItemID:e};const s=bE(n);let a=!1,r=e;return s?.accessedOrder.forEach((e=>{t===s.items[e].key&&(a=!0,r=s.items[e].context)})),{continueExecution:a,containerItemID:r}},xE=(e,t)=>{if(!RE(e)||!RE(t))return null;const n=OE(),s=n?.[e];return s&&s.items&&s.items[t]||null},wE=e=>RE(e)?JA()?.getState().containers[e]?.items:null,ME=e=>RE(e)&&JA()?.getState().containers[e]?.accessedOrder||[],LE=e=>RE(e)&&ME(e)?.length>0||!1,UE=(e,t,n)=>{if(!RE(e)||!RE(t))return!1;const s=OE(),a=s?.[e],r=a&&a.items||null,o=n||((e,t)=>e===t);if(t&&r)for(const e of Object.keys(r))if(o(t,r[e].key))return!0;return!1},FE=e=>{const{containers:t}=JA()?.getState()||{};return!(!t||!RE(e))&&Object.keys(t).some((n=>t[n]?.accessedOrder?.includes(e)))},VE=(e,t,n)=>{if(!RE(e)||!RE(t))return null;const s=OE(),a=s?.[e],r=a&&a.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&r)for(const e of Object.keys(r))if(o(t,r[e].key))return e;return null},jE=(e,t)=>{if(e&&t)for(const a of Object.keys(t))if(n=e,s=t[a].key,n?.toLowerCase()===s?.toLowerCase())return t[a];var n,s;return null},kE=e=>{if(!RE(e))return null;const t=OE()??{};for(const n of Object.keys(t))if(t[n]){const s=t[n].items??null,a=jE(e,s);if(a)return a}return null},BE=(e,t)=>{if(!RE(e)||!RE(t))return!1;const n=OE();return n&&Object.hasOwn(n,`${e}/${t}`)},$E=(e,t)=>{if(!RE(e)||!RE(t))return null;const n=OE(),s=n?.[`${e}/${t}`];return s&&s.type},GE=e=>{if(!RE(e))return null;let t=null;const n=OE();if(n&&n[e]){const s=n[e],{accessedOrder:a}=s;t=a&&a.length>0?a[a.length-1]:null}return t},WE=(e,t,n)=>{if(!RE(e)||!RE(t))return!1;const s=VE(e,t,n);return!!s&&s===GE(e)},HE=(e,t)=>{let n=null;const s=OE();if(!s)return null;for(const a of Object.keys(s))if(s[a].items){const r=s[a].items[e];if(n=r?r[t]:null,n)break}return n},qE=e=>RE(e)?HE(e,"context"):null,zE=e=>{if(!RE(e))return null;let t=null;const n=OE();if(n&&n[e]){const s=n[e],{accessedOrder:a}=s,r=a&&a.length>0?a[a.length-1]:null;t=qE(r)}return t},YE=e=>{if(!RE(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],s=!1;const a=OE();if(!a)return[];const r=n=>{const a=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&a.push(n),n===e&&(s=!0)})),a};for(const e of Object.keys(a))if(a[e].items){const t=r(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return s?n:[]},KE=e=>{if(!RE(e))return[];const t=[],n=OE();if(!n)return[];for(const s of Object.keys(n))s.startsWith(e)&&s!==e&&t.push(s);return t},QE=e=>{if(!RE(e))return[];const t=[],n=OE();if(!n)return[];for(const s of Object.keys(n))if(s.startsWith(e)&&s!==e){(ME(s)||[]).forEach((n=>{qE(n)!==e&&t.push(qE(n))}))}return t},JE=e=>{const t=[...QE(e),e],n=[],s=JA()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(s,`${e}/${Vs.SUGGESTION}`)&&n.push(`${e}/${Vs.SUGGESTION}`)})),n},XE=e=>RE(e)?e&&bE(e)&&bE(e).type===DE.SINGLE:null,ZE=e=>RE(e)?e&&bE(e)&&bE(e).type===DE.MULTIPLE:null,ey=e=>RE(e)&&bE(e)&&bE(e).items&&Object.keys(bE(e)?.items).length>0||!1,ty=e=>e&&TE[e]?TE[e]:TE.defaultLimit,ny=(e,t=TE.defaultLimit)=>{RE(e)&&(TE[e]=t)},sy=e=>{if(!RE(e))return!1;let t=!1;const n=bE(e),{items:s={}}=n,a=Object.keys(s),r=ty(e);return a&&a.length>0&&a.length>=r&&(t=!0),t},ay=e=>{if(!e||!RE(e.name)||!RE(e.context))return null;const t=e?.name,n=bE(`${e?.context}/${t}`),s=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=KE(`${Vs.APP.APP}/${Vs.PREVIEW}`),r=QE(`${Vs.APP.APP}/${Vs.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...s,...r],childContainers:a}},ry=e=>{if(!RE(e))return!1;const t=qE(e);return yE(t)||Tm(e)},oy=e=>{if(!RE(e))return null;let t;const n=bE(e),{accessedOrder:s=[]}=n;for(let e=0;e<s.length;e+=1){const n=s[e];if(!ry(n)){t=n;break}}return t},iy=e=>{if(!RE(e))return null;const{containers:t}=JA()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(Vs.UNDERSCORE_STRING);return e.slice(0,n)},cy=async(e,t={})=>{if(!RE(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=iy(e),s=qE(e),{skipDirtyCheck:a}=t;let r=!0,o=[];if(ry(e)&&!a&&(Bp.disableLoadingIndicator({context:s}),r=await um.confirm(Gy().getLocaleValue(lE,"Messages")),Bp.enableLoadingIndicator({context:s})),r){const{accessedOrder:a=[],items:r={},type:i}=bE(n);o=a.filter((t=>t!==e));const c=o[o.length-1],l=r[c]||{},{semanticURL:u=Vs.FORWARD_SLASH_STRING,context:d}=l;o.length>0&&u&&u!==Vs.FORWARD_SLASH_STRING?DS({directUrlUpdation:!0,semanticURL:u,options:{containerItemID:c,context:d}}):DS({directUrlUpdation:!0,semanticURL:Vs.FORWARD_SLASH_STRING,options:{}});XA(qC({containerItemID:e,context:s,target:n,containerInfo:{newAccessedOrder:o,containerType:i},...void 0!==t.eventName?{eventName:t.eventName}:{}}))}return{newAccessedOrder:o,removeItem:r}},ly=(e,t,n,s)=>{const a="root",r=Hs(t,a,!0),o=jr(t,a),i={data:n,context:s?"app":r},c=[MC({root:e,containerItemID:r,context:s?"app":r,target:o,containerName:t})];c.push(DC(i)),XA(c)},uy=(e,t,n)=>{let s=ME(e);s=s.filter((e=>e!==t));let a=!1;for(let e=0;e<s.length;e+=1){if(qE(s[e])===n){a=!0;break}}return a},dy=e=>{if(!RE(e))return!1;const t=OE(),n=qE(e),s=t?Object.keys(t):[];let a=!1;for(let t=0;t<s.length&&(a=uy(s[t],e,n),!a);t+=1);return a},py=e=>{Array.isArray(e)||(e=[e]);const t=OE()||{};return e.map((e=>{const n=iy(e);return fC.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},gy=e=>{const{transientItemID:t,data:n,options:s}=e,a=fC.deepClone(JA()?.getState().data[t]);s?.reset&&fC.iterateLeafNodes(a,(e=>{"classID"!==e[e.length-1]&&fC.setIn(a,e,"")})),XA(UC({transientItemID:t,data:fC.mergeDeep(n,a)}))},hy=e=>{const{transientItemID:t,data:n}=e;XA(VC({transientItemID:t,data:n}))},fy=e=>{const t=fC.deepClone(JA()?.getState().data[e]);fC.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&fC.setIn(t,e,"")})),XA(FC({transientItemID:e,data:t}))},my=e=>{const t=fC.deepClone(JA()?.getState().data[e]);fC.iterateLeafNodes(t,(e=>fC.setIn(t,e,""))),XA(jC({transientItemID:e,data:t}))},Iy=e=>{JA()?.getState().data[e]&&my(e);const t=e.lastIndexOf("/"),n=t>0?e.substring(0,t):e,s=iy(n);XA(YC({transientItemID:e,containerItemID:n,target:s}))};class Ey{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const yy=(e,t={})=>{if(!RE(e))return;const n=bE(e),s=Array.isArray(n?.accessedOrder)?n.accessedOrder:[];if(0===s.length)return;const{remove:a,keep:r}=t;let o;if(void 0!==r){const e=new Set(r);o=s.filter((t=>!e.has(t)))}else if(void 0!==a){const e=new Set(a);o=s.filter((t=>e.has(t)))}else o=[...s];for(const t of o){const n=qE(t),s=py(t);XA(qC({containerItemID:t,context:n,target:e,...s.length>0&&{transientItems:s}}))}},Ay=()=>Ey,Cy=e=>{const t={containerName:e};t.childContainers=KE(e),XA({type:$a,payload:t})},Sy=(e,t)=>{const n=YE(e),{key:s}=xE(iy(e),e),a=[];n.forEach((e=>{const{key:n}=xE(iy(e),e);if(n===s){const n={data:{caseInfo:{headers:{etag:t}}},target:iy(e),context:e};a.push({type:Ca,payload:n})}})),a.length&&XA(a)},_y=(e,t)=>{const n=[],s={data:{caseInfo:{headers:{etag:t}}},target:iy(e),context:e};n.push({type:Ca,payload:s}),n.length&&XA(n)},Ny=()=>Vy.isPortalLoaded?"app":"root",Ty=()=>NE,Dy=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:iy(e),context:e};XA({type:Ca,payload:n})},Py=(e,t)=>{const n=VE(e,t),s=VE(`${n}/workarea`,t);return qE(s)},Oy=e=>RE(e)?HE(e,"parentContext"):null,Ry=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},by=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},vy=()=>dg,xy=()=>"undefined"==typeof window?"":Bg(window.location.pathname),wy=()=>"undefined"==typeof window?"":Bg(window.location.pathname+window.location.search),My=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}};const Ly=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{kg(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>Bg(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Bg(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return(e=e.replace(n,"")).startsWith("/")&&zg()&&"PREVIEW"!==Vy.getRenderingMode()&&this.setDefaultClassName(""),Bg(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails=(e,t)=>{if(!t)return this.appRoutes[e];let n="",s={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach((t=>{const a=this.appRoutes[t];a&&a.payload&&a.payload.page===e&&(n=a.routeKey,s={...a.payload})})),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,s={...this.appRoutes[e].payload}),{routeKey:n,payload:s}};transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!Bs.isRemoteCase(t))return e;const{RemoteClassGroup:s,RemoteSystemID:a}=Bs.getRemoteCase(t??"");return{...e,caseID:n?.replace(t??"",s?.toUpperCase()),RemoteSystemID:a}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=zg();let n=this.processUrl(e,!0),s=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);s||(n=this.processUrl(this.defaultViewUrlPath,!t),s=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:a,payload:r}=this.getRouteDetails(s,t);if(!this.appRoutesMeta?.[a]?.restApi)return null;const{reqType:o,endPoint:i,params:c}=this.appRoutesMeta[a].restApi,l={routeKey:a,requestType:o,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(r)}};return this._resolveRoute(l,this.processUrl(e,!1),s)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={},s){const a=this.getSemanticURL(e,t,n);let r=a;if(kg(a)){const e=a.match(jg);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(r=r.replace(e,String(n[t])))}))}const o=TS(r,s),i=new URL(o);return this.isDefaultPortal()||!this.getPortalName()||i.searchParams.toString().includes("portal=")||i.searchParams.append("portal",this.getPortalName()),s&&!i.searchParams.has("lang")&&i.searchParams.append("lang",s),Gg(i.toString())}buildDocumentTitle(e,t,n){const s=n??"";return Vy.getCaseLabelFirstInTitle()?e&&t?`${e} (${t}) - ${s}`:s:e&&t?`${t}: ${e} - ${s}`:s}updateSemanticURLAndDocumentTitle(e,t){const{key:n,actionName:s,caseClassName:a,isRemoteCase:r,name:o}=e;if(r&&!a)return;const i=this.getSemanticURL(s,{caseClassName:a}).replace(/{.+?}/,String(Gf(n))),c=`${Fs.APP.APP}${Vs.FORWARD_SLASH_STRING}${Fs.PRIMARY}`,l={semanticURL:i,directUrlUpdation:!0,options:{acName:c,context:zE(c)}},u=xy();i&&!u.includes(i)&&NS(l,t);const d=n.substring(n.lastIndexOf(" ")+1),p=Vy.environmentInfoObject?.pxApplication?.pyLabel,g=this.buildDocumentTitle(o,d,p);MS(g)}buildSemanticURL(e,t,n){const{urlPattern:s}=this.appRoutesMeta?.[e]||{},a=s?.split("/").length,r=s?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const o=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return r?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const s=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const r=s.dataViewKeys||s.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===s[e]));return!!o&&(fC.isEmpty(r)||fC.isEmpty(a)?o:Object.keys(a).every((e=>Object.hasOwn(r,e))))}));return i?this._getQueryParamsResolvedURL(i,n):o.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,t,n=!1){const[s,a]=e.includes("?")?e.split("?"):[e];if(a&&t&&Object.keys(t).length>0){const e={};for(const[n,s]of Object.entries(t))e[n.toLowerCase()]=s;const r=new URLSearchParams(a),o={};for(const[s,a]of r.entries())if("string"==typeof a&&kg(a)){const r=this._getDynamicKeyName(a),i=r.toLowerCase(),c=n?e:t,l=n?t[r]??c[i]:c[r];null!=l&&(o[s]=l)}else"string"==typeof a&&(o[s]=a);const i=new URLSearchParams(Object.entries(o).map((([e,t])=>[e,String(t??"")])));return`${s}?${Gg(i.toString())}`}return s}_getQueryParamsObject(e){const t={};if(!e)return t;for(const n of e.split("&")){const e=n.indexOf("=");if(-1!==e){const s=n.slice(0,e),a=n.slice(e+1);try{t[decodeURIComponent(s)]=decodeURIComponent(a)}catch{t[s]=a}}}return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:s}=this.appRoutesMeta[e].restApi;let{endPoint:a}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const r=a.match(jg);if(r)for(let e=0;e<r.length;e+=1){const n=r[e].replace("{","").replace("}",""),s=new RegExp(r[e],"g");a=a.replace(s,t?.[n])}if(s){let e={};return Object.keys(s).forEach((n=>{if(t&&this._isSpecialInstruction(n)){const a=s[n];Array.isArray(a)&&a.every((e=>"string"==typeof e))&&(e={...e,...this._processInstruction(n,a,t)})}})),{restApi:a,reqType:n,body:e}}return{restApi:a,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const s={};return"@COPY"===e&&t.forEach((e=>{s[e]=n?.[e]})),s}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,t,n,s)=>{if(!e)return;const a=t.indexOf("?"),r=-1!==a?t.substring(a+1):void 0;if(r){const e=`${n.join("/")}?${r}`;return this._getQueryParamsResolvedURL(e,s,!0)}};_resolveRoute=(e,t,n)=>{const s=[],[a,r]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(s[e]=l[e],kg(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],s[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(r),g={};for(const[e,t]of Object.entries(p))g[e.toLowerCase()]=t;for(const e of Object.keys(d))kg(d[e])?u[e]=p[e]||g[e.toLowerCase()]:u[e]=d[e];const h=this._resolveMatchedRouteQueryParams(r,n,s,p),f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:h||s.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!kg(n))return e;const s={};if(s[t]=e,void 0!==e.payload){const t=n.match(jg);for(let a=0;a<t.length;a+=1){const r=t[a],o=this._getDynamicKeyName(r);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(r,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,s)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",s);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const s={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:s}};_resolvePayloadRecursive(e,t){if(Array.isArray(e))return e.map((e=>this._resolvePayloadRecursive(e,t))).flat();const n={};for(const s of Object.keys(e)){let a=e[s];if("string"==typeof a&&kg(a)){const e=a.match(jg)??[];for(const n of e){const e=this._getDynamicKeyName(n);void 0!==t[e]?a=a.replace(n,t[e]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${e}} in payload - {${e}} is missing in semantic url construct`)}n[s]=a}else n[s]=a&&"object"==typeof a?this._resolvePayloadRecursive(a,t):a}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let s=this._findMatchedRouteInStaticList(n,t);return void 0!==s?s:(s=this._findMatchedRouteInDynamicList(e),void 0!==s?s:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),s=t?.toLowerCase();if(zg()){const e=this._findMatchingRouteByClass(n,s);if(!e)return;const t=Object.values(e)[0],a=t?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,s])=>{if(!s)return!1;const a=s.payload?.page?.toLowerCase(),r=s.payload?.pageClass?.toLowerCase(),o=a===e||n.toLowerCase()===e;return t?o&&r===t:o}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],s=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],r=t.split("/");if(r.length!==s.length)return!1;let o=0;for(o=0;o<r.length;o+=1){const e=r[o].toLowerCase();if(!kg(e)&&e!==s[o]&&$g(e)!==s[o])return!1}if(a){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(a.toLowerCase()),s=new Set,r=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())s.add(t);for(const e of t.keys())r.add(e);if(r.size!==s.size)return!1;for(const n of s){if(!r.has(n))return!1;const s=t.get(n);if(e.get(n)!==s&&!o.test(s??""))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{My(e,t,"warning"),My("Error in Generated Routing Table",null,"error"),My("Back | Forward for this page may NOT work as intended",null,"warning"),My("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},Uy=Ly;const Fy=new class{constructor(){this.languagePacks=[]}getLocalizationBundles(e=Vy.getLocale()){return(this.languagePacks.find((t=>t.pyLangCode===e))?.pyBundles??this.languagePacks.find((e=>e.pyLangCode===Vs.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}async loadLocaleBundle(e){const t=e.map((e=>Ih.getPageDataAsync("D_pzBundlesForLocalization","",{locale:e,onlyApp:"false"},{invalidateCache:!0}))),n=(await Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value.pyLanguagePacks));this.setLanguagePack(n)}setLanguagePack(e){e.forEach((e=>{const t=this.languagePacks.findIndex((t=>t.pyLangCode===e.pyLangCode));-1!==t?this.languagePacks[t]=e:this.languagePacks.push(e)}))}};const Vy=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false",this.enablePriorityAndUrgencyImprovements=!1}setEnvironmentInfo(e){const t=e?.pxOperator?.pyUserName,n=t?fC.decodeHtmlEntities(t):void 0,s={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=s;const a=this.environmentInfoObject?.features||fC.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...a,granularUIRefresh:a.granularUIRefresh||a.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,Ls.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);const r=e.requestContext;if(Array.isArray(r)&&r.length>0){const e=r.filter((e=>e.IncludeInURL)).map((e=>e.Key));e.length>0&&LS(e)}Fy.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return Uy.getPortalName()}setCaseLabelFirstInTitle(e=!0){this.caseLabelFirstInTitle=e}getCaseLabelFirstInTitle(){return this.caseLabelFirstInTitle}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getApplicationID(){return this.environmentInfoObject?.pxApplication?.pyRuleId}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone?.trim()||void 0}getTheme(e){return"dark"===e?.type?this.darkThemeOverrides:this.themeOverrides}setTheme(e,t){return"dark"===t?.type?this.darkThemeOverrides=e:this.themeOverrides=e,vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),"dark"===t?.type?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.navOrientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.navOrientation=e,vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.navOrientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===Vs.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return"Infinity"===this.environmentInfoObject?.pyExecutionRuntimeName}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return"dark"===e?.type?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,t){return"dark"===t?.type?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(Vs.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}isPegaMobile(){return!!window.pms?.plugins?.c11n_spa||!!window.pms?.plugins?.c11n}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){wu.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}isOptimizedCaseLoadingEnabled(){return this.getFeatureMap().pyEnableOptimizedCaseLoading||this.getFeatureMap().optimizedCaseLoading||!1}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return Fy.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getEnablePriorityAndUrgencyImprovements(){return this.enablePriorityAndUrgencyImprovements}setEnablePriorityAndUrgencyImprovements(e){this.enablePriorityAndUrgencyImprovements=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter((t=>t.pyClassName===e)).map((e=>e.pyActionName))??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter((t=>t.pyClassName===e)).map((e=>e.pyViewName))??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),vu.publish(Vs.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}},jy=e=>"fulfilled"===e.status,ky=async(e=Vy.getLocale())=>{try{await(async e=>{const t=Vy.getAvailableLocalePacks(),n=Vy.getLocalizationBundles(e);let s;if(e&&t&&t.includes(e)?s=[mp("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(s=n.map((e=>mp("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!s||0===s.length)return;const a=200,r=201,o=await Promise.allSettled(s),i=EA(e??"en-US");o.filter(jy).forEach((({value:e})=>{if([a,r].includes(e.status)&&e.data){const t=e.data;Object.keys(t).forEach((e=>{i.setLocaleForRule(t[e],e)}))}}))})(e)}catch(e){console.warn(e)}};const By=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const s=e.indexOf("{@P ",t);if(-1===s){n+=e.substring(t,e.length);break}n+=e.substring(t,s);const a=e.indexOf("}",t),r=e.substring(s,a+1),[o,i]=this.getKeyAndValue(r);this.addKeyToMap(o,i),n+=`${r.split(":")[0]}}`,t=a+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const s=e.indexOf("{@P ",t);if(-1===s){n+=e.substring(t,e.length);break}n+=e.substring(t,s);const a=e.indexOf("}",t),r=e.substring(s,a+1);n+=this.keyMap[r],t=a+1}return n}};class $y{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent,s=t.toUpperCase();s.startsWith("@BASECLASS!DATAPAGE!")&&s.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${s}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===s?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,s)};updateLocaleStore=(e,t)=>{const n=e.fields||e,s=this.localeStore[t];s?fC.mergeDeep(n,s):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,s){const a=this.#d(n,t),r=this.#p(e);r&&(e=By.formatLocaleKey(e));const o=a?this.localeStore[a.toUpperCase()]??{}:{},i=s?this.localeStore[s.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:r?By.replaceWithValue(o[e]||i[e]||e):o[e]||i[e]||e}#d(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${Vs.PARAGRAPH}!${t}`,s=this.localeStore[n.toUpperCase()];return s?{category:s.category,content:decodeURIComponent(atob(s.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}:null}getPortalLocaleReference(e){return 2!==Vy.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${Vy.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=Vy.getUseLocale(),n=[],s=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!s[e]))).map((e=>e.toUpperCase()))).length>0){const s=e.map((e=>({localeRuleKey:e,promise:bp.getSvcLocale(t,`${e}.json`)}))),a=await Promise.allSettled(s.map((e=>e.promise)));await Promise.all(a.map((async(e,t)=>{if("fulfilled"===e.status){const a=s[t];let r;try{r=await e.value.json()}catch{r=null}r&&n.push({localeRuleKey:a.localeRuleKey,jsonData:r})}})))}return n}async loadLocaleResources(e){await Fy.loadLocaleBundle(e),await Promise.all(e.map((e=>ky(e))))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const s=[];for(let t=0;t<e.length;){const a=e[t];if(0!==a.length){const e=n.indexOf(a);if(-1===e)return null;if(t>0){const t=n.slice(0,e);s.push(t)}n=n.slice(e+a.length)}t+=1}return n&&s.push(n),s}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const s of Object.keys(e)){const a=s.split(/\{\d+\}/),r=this.matchPatternWithText(a,t);if(r){const t=e[s];if(n=this.replacePlaceHolders(r,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=Vy.getLocale();return this.availableLangPacks||(this.availableLangPacks=await bp.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#p(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const Gy=e=>{const t=e??Vy.getLocale()??"en-US";return EA(t)};So.registerHandler("@L",((e,t)=>t?t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e):e)),So.registerHandler("@P",((e,t,n)=>n?yC.getLitePropertyValue(n):t.getValue(e))),So.registerHandler("@E",((e,t,n)=>{try{const s=co(e),a=lo(s);return uo(a,t,n)}catch(e){}return!0})),So.registerHandler("@W",((e,t,n)=>{let s;if(n){const{pageReference:t,context:a}=n;s=sC(t,`.${Vs.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,a)}else s=t.getContextDataValue(`.${Vs.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===s||"true"===s})),So.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const s=[];let a="",r="";const o=t.getPageReference();if(e.startsWith(".")){a=`${o}.${e.substring(1)}`;const s=e.split(".").filter((e=>!!e));s.length>1&&(s.pop(),r=s.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===Vs.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&("object"==typeof u.datasourceMetadata&&null!==u.datasourceMetadata||(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata})),i===Vs.DATA_PAGE))return null;if(i===Vs.DECISION||i===Vs.RULE_REFERENCE)return function(e,t){const n=No.getPropertyName(e?.propertyForDisplayText??""),s=No.getPropertyName(e?.propertyForValue??""),a=t.getContextDataValue(`.${Vs.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return a?.map((e=>({key:e[s]||e[`.${s}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==Vs.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const d=No.getPropertyName(n?.datasource?.propertyForDisplayText),p=No.getPropertyName(n?.datasource?.propertyForValue),g=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],h=t.getContextName(),f=[];if(g.forEach((e=>{if(No.isProperty(e?.value)){let t=nC(`.${fC.getFullPropertyReference([r,No.getPropertyName(e.value)])}`,o,h);f.push(fC.getFullPropertyReference([o,r,No.getPropertyName(e?.value)])),null!=t&&""!==t||(t=Vs.NULL_STRING),s.push(t)}else s.push(e?.value||Vs.NULL_STRING)})),h){const e=Ao.getContextObjectByName(h)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),Ao.addContextName(h,e)}const m=function(e,t,n,s){let a="",r=n;if(t.join(Vs.HASH_DELIMITER)&&(a=fC.getHashedString(t.join(Vs.HASH_DELIMITER)),r=n+Vs.UNDERSCORE_STRING+a),s){const e=eC(),t=e?e[n]?.[r]:{};return Array.isArray(t?.[Ls.getDefaultQualifiedName("pxResults")])?t[Ls.getDefaultQualifiedName("pxResults")]:[]}const o=e.getDataObject(),i=o?.[n]||{},c=i?.[r]||{};return Array.isArray(c?.[Ls.getDefaultQualifiedName("pxResults")])?c[Ls.getDefaultQualifiedName("pxResults")]:[]}(t,s,l,c),I=t.getLocalizationService();return m.map((e=>{let t=e[d]||e[`.${d}`];var n;return"string"==typeof t&&(n=t,t=I.getLocalizedDataPage(n,l,d)),{key:e[p]||e[`.${p}`],value:t}}))})),So.registerHandler("@ROUTING_INFO",((e,t)=>kr(t.getContainerName(),t.getContextName()))),So.registerHandler("@ENV",((e,t)=>{switch(e){case Vs.ENV_INFO_KEYS.APPLICATION_NAME:return Vy.getApplicationName();case Vs.ENV_INFO_KEYS.ACCESS_GROUP:return Vy.getAccessGroup();case Vs.ENV_INFO_KEYS.APPLICATION_ID:return Vy.getApplicationID()||Vy.getApplicationName();case Vs.ENV_INFO_KEYS.USER_NAME:return Vy.getOperatorName();case Vs.ENV_INFO_KEYS.USER_ID:return Vy.getOperatorIdentifier();case Vs.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService().getLocalizedText(Vy.getApplicationLabel()||"");case Vs.ENV_INFO_KEYS.USER_IMAGE:return Vy.getOperatorImageInsKey();case Vs.ENV_INFO_KEYS.LOCALE:return Vy.getUseLocale();case Vs.ENV_INFO_KEYS.TIMEZONE:return Vy.getTimeZone();case Vs.ENV_INFO_KEYS.WORK_GROUP:return Vy.getOperatorWorkGroup();default:return e}})),So.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],s=t.getComponentConfig(),a=Object.keys(s).find((t=>s[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t,filterDownloadedFields:r}=s[a],o=[];return n.forEach((n=>{const s={};t||r?Object.keys(n).forEach((e=>{const t=No.getPropertyName(e);s[t]=n[t]})):Object.keys(e).forEach((t=>{const a=No.getPropertyName(e[t]);s[t]=n[a]})),o.push(s)})),o}return[]})),So.registerHandler("@FIELD_META",((e,t)=>{let n,s={};if(s=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),s&&s.datasource&&s.datasource.parameters){let a="";const r=e.split(".").filter((e=>!!e));if(r.length>1&&(r.pop(),a=`.${r.join(".")}`),Array.isArray(s.datasource.parameters)){const e=[];s.datasource.parameters.forEach((n=>{const s={},{name:r,value:o}=n;s.name=r,"string"==typeof o&&o.startsWith("@P")?s.value=`@P ${a}${o.substring(3)}`:s.value=o,e.push(t.resolveConfigProps(s))})),n=e}else n=t.resolveConfigProps(s.datasource.parameters);s={...s,datasource:{...s.datasource,parameters:n}}}return s})),So.registerHandler("@USER",((e,t,n)=>{const s=n?yC.getLitePropertyValue(n,e):t.getValue(e),a=n?yC.getReferencedUser(s,n):t.getReferencedUser(s);return{userId:s,userName:a?a.UserName:null}})),So.registerHandler("@ACTIVE_CASES",((e,t)=>dh.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),So.registerHandler("@LR",(e=>e)),So.registerHandler("@CASE",((e,t)=>e===Vs.ID?t.getCaseInfo().getKey():e)),So.registerHandler("@SHARED",(e=>tf.getSharedState(e))),So.registerHandler("@PARAGRAPH",((e,t)=>{const{useDecision:n,isBanner:s,messageType:a,dismissBanner:r}=sf.getParagraphProperties(e,t),o=sf.hasDecisionBannerContent(e,t);return n&&o?sf.processBannerDecisionParagraph(e,t):s?{htmlContent:sf.processParagraph(e,t),messageType:a,dismissBanner:r}:sf.processParagraph(e,t)})),So.registerHandler("@FORMAT",((e,t)=>{const n=t.getCurrentClassID(),s=UA(e,n);if(!s?.dynamicContents?.length)return null;const{dynamicContents:a}=s;for(let e=0;e<a.length-1;e+=1)if(yC.resolveWhen(a[e].when,t))return{pattern:a[e].content};return{pattern:a[a.length-1].content}})),So.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),s=e.substring(e.indexOf("]")+2),a=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:r}=t;let o;return fC.isEmpty(r)?o=t.getValue(`.${n}`):(o=r,o=fC.getIn(o,n)),o&&s.length>0?(a&&(o=o.filter((e=>po(a,e)))),o.map((e=>fC.getIn(e,s)))):null})),So.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.[Ls.getDefaultQualifiedName("pyCountry")];return n?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${n}`:PCore.getDefaultQualifiedName("pyAddressForm")})),So.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),So.registerHandler("@ATTACHMENT",((e,t,n)=>{let s;return s=n?yC.getLitePropertyValue(n):t.getValue(e),np.prepareAttachmentData(s)}));const Wy=e=>{const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)};function Hy(e,t){const n=e.authorContext;if("string"!=typeof n||!n)return!1;return(n.startsWith(".")?n.substring(1):n)===t}function qy(e,t){const n=e.config;if(!n?.name||"string"!=typeof n.name)return null;const s=t(n.name);return s?Array.isArray(s)?s.find((e=>e.classID===n.ruleClass))??null:s:null}function zy(e,t,n,s="root",a=[]){if(e.config&&function(e,t){const n="string"!=typeof(s=e.value)?null:s.startsWith("@")?s.replace(/^@\w+\s+\./,""):null;var s;return!!n&&n===t}(e.config,t)&&a.push({type:e?.type,config:e.config,path:s}),!e.children)return a;for(let r=0;r<e.children.length;r+=1){const o=e.children[r],i=`${s}.children[${r}]`,c="reference"===o.type?qy(o,n):o;c&&zy(c,t,n,i,a)}return a}So.registerHandler("@FL",((e,t)=>{const n=(e=>e.startsWith(".")?e.slice(1):e)(e),s=t.getFieldMetadata(n);return s&&s.label?t.getLocalizationService(s.localeReference).getLocalizedText(s.label):Wy(n)})),So.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),So.registerHandler("@GENAICOACH",((e,t)=>FA(e,t.getCurrentClassID()))),So.registerHandler("@AIAGENT",((e,t)=>{const n=VA(e,t.getCurrentClassID());if(n)return n;const s=t.getComponentConfig();if(s){const n=s?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const s={label:n.label};t.resolveConfigProps({label:n.label},s);const a=s.label;return{insName:Vy.getFeatureMap()?.isNamespaceEnabled&&e.includes(Vs.DOUBLE_UNDERSCORE_STRING)?e:`${n.ruleNamespace}${Vs.DOUBLE_UNDERSCORE_STRING}${e}`,label:t.getLocalizedValue(a),type:"agent"}}}return null})),So.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),s=t.getContextName(),a=t.getPageReference();xh.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",a,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${a.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${a}${e}`,`${s}/${a}`,s)})),So.registerHandler("@DW",((e,t,n)=>{let s;const a=`${Vs.CONTEXT_DATA}.${Vs.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(n){const{context:e}=n??{};s=nC(a,null,e)}else s=t.getValue(a);return!0===s||"true"===s})),So.registerHandler("@CA",((e,t,n)=>n?yC.getLitePropertyValue(n):t.getValue(e)));const Yy=new Set(["autocomplete","dropdown"]),Ky=["displayAs","hideLabel","linkReference","localeReference","matchPosition","referenceType","selectionMode"];function Qy(e,t,n){const s=t.config,a=function(e){const t=e.config??{},n={};return Ky.forEach((e=>{void 0!==t[e]&&(n[e]=t[e])})),void 0===t.contextClass&&void 0===t.targetObjectClass||(n.contextClass=t.contextClass??t.targetObjectClass),void 0!==t.referenceList&&(n.referenceList=t.referenceList),n.parameters=t.parameters,n}(e),r=function(e){const t=e.inheritedProps;return Array.isArray(t)?t.reduce(((e,t)=>("object"!=typeof t||null===t||Array.isArray(t)||"prop"in t&&"string"==typeof t.prop&&"value"in t&&(e[t.prop]=t.value),e)),{}):{}}(n),o={...s??{},...a,...r};return"AutoComplete"===t.type&&void 0!==a.referenceList&&(o.datasource=a.referenceList),o}function Jy(e,t,n,s){try{if(!e.name||"string"!=typeof e.name)return null;const t=s(e.name);let a;if(Array.isArray(t))a=t;else{if(!t)return null;a=[t]}const r=a.find((t=>t.classID===e.ruleClass));if(!r||!function(e){const t=e.config;return!!t&&"DataReference"===t.template&&"string"==typeof t.displayAs&&Yy.has(t.displayAs.toLowerCase())}(r))return null;const o=function(e){const t=e?.children;return Array.isArray(t)&&t.length>0?t[0]:null}(r);return o?{type:o.type,config:Qy(r,o,e),path:n}:null}catch{return null}}function Xy(e,t,n,s="root",a=[]){if(e.config&&Hy(e.config,t)){const t=Jy(e.config,e.type,s,n);t&&a.push(t)}if(!e.children)return a;for(let r=0;r<e.children.length;r+=1){const o=e.children[r],i=`${s}.children[${r}]`,c="reference"!==o.type||o.config&&Hy(o.config,t)?o:qy(o,n);c&&Xy(c,t,n,i,a)}return a}function Zy(e,t,n){const s=Vy.getInlineEditActionViews(t),a=function(e,t){if(!e||"object"!=typeof e)return null;if(Array.isArray(e))return e.find((e=>e.classID===t))??null;return e}(n(s&&s.length>0?s[0]:Ls.getDefaultQualifiedName("pyEdit")),t);if(!a)return[];const r=zy(a,e,n,"root");return r.length>0?r:Xy(a,e,n)}const eA={},tA={},nA={};let sA=0,aA=!1;const rA={},oA={},iA={},cA={},lA={},uA={},dA={},pA={},gA={},hA={},fA={},mA=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const s=e[n],a=t[n];a?((e,t,n,s)=>{const a=Array.isArray(n)?n:[n];(Array.isArray(s)?s:[s]).forEach((e=>{const t=a.findIndex((t=>t.classID===e.classID));if(-1===t)a.push(e);else{const n={isDeclarativeTarget:!1},s={...a[t],...n,...e};a[t]=s}})),t[e]=1===a.length?a[0]:a})(n,t,a,s):t[n]=s})):fC.copy(e,t)},IA=(e,t="")=>{if(!e)return null;const n=oA[e];if(!n)return null;if(!t)return fC.deepClone(n);let s;return s=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,s?fC.deepClone(s):null},EA=e=>(hA[e]||(hA[e]=new $y),hA[e]),yA=(e,t)=>(fA[e]||(fA[e]=t()),fA[e]),AA=(e,t,n,s=[])=>{if(!t||!e)return null;if(!e.includes(".")){let a;const r=IA(e,t);return s.length&&(a=s.join(".")),{...r,embeddedType:n,category:a}}const[a,...r]=e.split("."),o=IA(a,t);return o&&s.push(o.label),AA(r.join("."),o?.pageClass,o?.type,s)},CA=e=>{0!==Object.keys(e).length&&(mA(e,nA),aA&&(sA+=1))},SA=()=>sA,_A=()=>{aA=!0},NA=()=>{aA=!1},TA=e=>{mA(e,rA)},DA=e=>{(e=>{e.views&&Object.keys(e.views).length>0&&(mA(e.views,nA),aA&&(sA+=1)),e.navigations&&mA(e.navigations,rA),e.personalizations&&mA(e.personalizations,cA),e.insights&&mA(e.insights,lA),e.paragraphs&&mA(e.paragraphs,eA),e.formats&&mA(e.formats,tA),e.dataTypes&&mA(e.dataTypes,uA),e.datapages&&mA(e.datapages,dA),e.genAICoaches&&mA(e.genAICoaches,pA),e.AIAgents&&mA(e.AIAgents,gA)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const s=t[n];if(Array.isArray(s)){if(s.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const s=pf(lf,n,t.definedOnClassID??t.classID);t.localeReference=s})),1===s.length){const[e]=s;t[n]=e}}else e.datapages&&s?.datasource&&"DataPage"===s.datasource.tableType&&(s.datasource.mode=e.datapages[s.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{iA[e]=t[e]})),mA(e.fields,oA)},PA=e=>nA[e],OA=(e,t)=>{const n=nA[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},RA=e=>rA[e],bA=e=>e in iA?iA[e]:null,vA=e=>e in cA?cA[e]:null,xA=e=>e in lA?lA[e]:null,wA=e=>{const t={};return Object.keys(oA).forEach((n=>{const s=oA[n];let a;Array.isArray(s)?a=s.find((t=>e===t.classID)):e===s.classID&&(a=s),a&&(t[n]=fC.deepClone(a))})),t},MA=(e,t)=>{const n=IA(e,t),s=n?.datasource?.parameters;return s?fC.deepClone(s):null},LA=(e,t)=>{let n=null;const s=eA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?fC.deepClone(n):null},UA=(e,t)=>{let n=null;const s=tA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?fC.deepClone(n):null},FA=(e,t)=>{let n=null;const s=pA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?fC.deepClone(n):null},VA=(e,t)=>{let n=null;const s=gA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?fC.deepClone(n):null},jA=e=>{if(e in uA){const{savableDataPage:t}=uA[e];return t}return null},kA=e=>{const t=dA[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:s,parameters:a}=t;if(s)return a.map((e=>({keyName:e.name,isAlternateKeyStorage:s,linkedField:e.linkedField})));const r=uA[n];return r?r.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:s}))):[]},BA=e=>{if(e in uA){const{lookupDataPage:t}=uA[e];return t}return null},$A=e=>{if(Object.hasOwn(uA,e)){const{lookupDataPageInfo:t}=uA[e];return t}return null},GA=(e,t)=>{const n=e.split("."),s=n.pop(),a=new vf({options:{pageReference:`${n.join(".")}`,context:t}}),r=IA(s,a.getCurrentClassID())?.additionalInformation;if(!r?.includes("@PARAGRAPH"))return r;const o=No.trimAnnotation(r);return sf.processParagraph(o,a)},WA=(e,t)=>{const n=e.split("."),s=n.pop(),a=new vf({options:{pageReference:`${n.join(".")}`,context:t}}),r=IA(s,a.getCurrentClassID()),o={};return a._classID=a.getCurrentClassID(),a.resolveConfigProps(r,o),o},HA=(e,t)=>Zy(e,t,PA);class qA{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,s,a,r="singleRecord"){if(!e||!n||!s?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,a);s.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=fC.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:r})}else i[t]=[{propertyName:o,mode:r}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,s,a){if(!e||!n||!s?.length)return;const r=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);s.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=fC.getFullPropertyReference([i,t]),t in o){const e=o[t];fC.removeExistingDependentProperty(e,r)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,s,a){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const r=this.cascadeSubscribers[e][`${t}${n}`];if(!r[a]){r[a]=s;const o=nC(n,t,e);r.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,s,a){const r=qA._getFieldsForList(e,t,n);r.length>0&&(this.registerFields(e,t,r,s,a),Lg.enableCascade(e))}unRegisterListField(e,t,n,s){const a=qA._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,s)}static _getFieldsForList(e,t,n){const s=[],a=IA(n,nC("classID",t,e));return a&&!Array.isArray(a)&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(No.isProperty(e)){const t=No.trimAnnotation(e);s.push(t)}})),s}unRegisterFields(e,t,n,s){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const a=this.cascadeSubscribers[e][`${t}${n}`];a[s]&&delete a[s]}))}triggerCascade(e,t,n,s){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((r=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==r&&o.previousValue!==n&&(a=!0,s?s.add(o[r]):o[r](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const s=new Set;n.forEach((t=>{const n=nC(t,"",e);this.triggerCascade(e,t,n,s)})),s.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const s=nC(t,"",e);n(e,t,s)}))}))}_updateChangedProperties(e,t,n,s,a,r,o,i){const c=n&&i.some((e=>s.startsWith(e)));if(e!==t||c){const e=s.lastIndexOf("."),t=s.substring(0,e),i=s.substring(e),c=Ou.getMessages({type:"error",property:i,context:a,pageReference:t});if(c?.length>0&&o.push(s),!n)return;r.push(s)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&fC.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,s,a,r,o){if("object"!=typeof e){a.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=nC(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,s,r,o)}const i=Object.keys(e??{});for(let c=0,l=i.length;c<l;c+=1){const l=i[c],u=`${n}.${l}`;if(Array.isArray(e[l])){const n=nC(u,"",t);n&&n?.length===e[l].length||o.push(u.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[l],t,u,s,a,r,o)}}getServerProperties(e,t,n=Vs.CASE_INFO.CASE_INFO_CONTENT){const s=[],a=[],r=[],o=fC.getIn(e,n);return o&&t?(this._getServerProperties(o,t,n,s,r,a,[]),{changedListProperty:s,leafProperty:r,changedPropertyWithError:a}):{changedListProperty:s,leafProperty:r,changedPropertyWithError:a}}_handlePageReference(e,t,n){let s=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){s=`${e}${t.substring(0,t.lastIndexOf("."))}`}return s}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const zA=new qA;let YA=null;const KA=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),QA=e=>{YA=e},JA=()=>YA,XA=e=>{if(!e)return;let t=[],n=[],s=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:s}=zA.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),YA?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(s.length&&!e.payload.skipValidation){s.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{Ou.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const s=hu.getFieldReferenceForProperty(e.payload.context,`${n}${t}`);if(s){const e=yC.resolveContextTreeNodeProps(s.props);lp.validate(e.componentName?.toLowerCase(),e.propertyName,yC.getLitePropertyValue(e,e.propertyName),e)}}))}zA.handleServerChanges(e.payload.context,t,n)}},ZA=e=>JA()?.getState().data?.[e],eC=()=>JA()?.getState().data[Vs.SHARED],tC=(e,t,n)=>{if(!(s=e)||s.startsWith('"')||s.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var s;const a=e?.startsWith(".")?t+e:e,r=KA(a);return fC.getIn(n,r)},nC=(e,t,n)=>tC(e,t,ZA(n)),sC=(e,t,n)=>tC(t,e?`${Vs.CONTEXT_DATA}.${e}`:`${Vs.CONTEXT_DATA}`,ZA(n)),aC=(e,t,n)=>((e,t,n)=>{const s=KA(`${t}.${n}`);return fC.getIn(e,s)})(ZA(n),`${Vs.CONTEXT_DATA}.${e}`,t),rC=e=>{const{context:t}=e,n=JA()?.getState().data[t];if(n)return ga;const{action:s}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(s)?Oa:ga},oC=(e,t)=>{const n=KA(t);return fC.deleteIn(e,n)},iC=e=>!Array.isArray(e)&&"object"==typeof e,cC=(e,t=[],n=[])=>{Array.isArray(t)&&t.length>0&&t.forEach((t=>{t.allowMultiple?t.allowMultiple&&!n.includes(t.path)&&fC.setIn(e,t.path,[]):fC.setIn(e,t.path,{})})),n.length>0&&fC.rearrangeProperties(n,e)},lC=(e,t,n={})=>{const{isArrayDeepMerge:s,propertiesToReplace:a=[],propertiesToReArrange:r=[]}=n;Array.isArray(e)&&!t&&(t=[]),cC(e,a,r);const o=(e,t)=>{if(iC(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return Array.isArray(t)?t:vs(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(s)return vs(e,t,o);{const n=t.length;if(void 0===s&&n===e.length)return vs(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},uC=(e,t,n,s={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:a}=s,r=KA(t);if("object"==typeof n){const t=lC(fC.getIn(e,r),n,{isArrayDeepMerge:a});return fC.setIn(e,r,t)}return fC.setIn(e,r,n)},dC=(e,t,n)=>{const s=KA(t);return fC.setIn(e,s,n)},pC=()=>{const e=lr,{promise:t,actionMgrID:n}=$p.actionManagerPromise(e);return XA({type:e,payload:{actionMgrID:n}}),t},gC=e=>{const t=JA()?.getState();return!!t?.data?.[e]};class hC{static mergeDeep(e,t){return vs(t,e)}static hasIn(e,t){return Fn(e,t)}static getIn(e,t,n){return Vn(e,t,n)}static setIn(e,t,n){return Wn(e,t,n)}static deleteIn(e,t){return wn(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return ws(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let t=0;t<e.length;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isValidPropertyReference(e){return"string"==typeof e&&(""===e||""!==e.trim())}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const s of Object.keys(e)){const a=e[s];a&&"object"==typeof a&&!Array.isArray(a)?n=n||hC.isWhenExist(a):t.includes(s)&&"string"==typeof a&&a?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const s=new Set;if(e&&Object.keys(e).forEach((a=>{const r=e[a];t.includes(a)&&"string"==typeof r&&r.startsWith("@W ")&&(n=No.trimAnnotation(r),s.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=No.trimAnnotation(t[e]),s.add(n))}))}return[...s]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const s of Object.keys(e))t.includes(s)&&"string"==typeof e[s]&&e[s]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const s=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let s=t;t.startsWith(".")&&(s=t.substring(1)),n[s]=e[t]})),s}static buildObject=(e,t,n)=>{if(void 0===n)return;const s=e.split(".");let a=0;for(;a<s.length-1;a+=1){const e=s[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[s[a]]||(t[s[a]]=Array.isArray(n)?[]:{}),lC(t[s[a]],n,{isArrayDeepMerge:!0})):t[s[a]]=n};static getHashedString(e){return(0,ln.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return Xt(e,t)}static isContains(e,t){const n=Object.keys(e);for(let s=0;s<n.length;s+=1)if(e[n[s]]&&hC.isEqual(e[n[s]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):""}static iterateLeafNodes(e,t){const n=(e,s=[])=>{Object.entries(e).forEach((([a,r])=>{s.push(Array.isArray(e)?Number(a):a),Array.isArray(r)?r.forEach(((e,t)=>{s.push(t),n(e,s),s.pop()})):"object"==typeof r?n(r,s):t(s.slice(),r),s.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const s=e.split(".");let a;s.reduce(((e,t,r)=>(a=e[t]?e[t]:Number.isNaN(Number(s[r+1]))?s.length-1===r?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,s)=>{hC.flatten(e,`${t}[${s}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((s=>{const a=t?`${t}.${s}`:s;hC.flatten(e[s],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(Vs.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(Vs.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(Vs.CASE_INFO.CASE_INFO_CONTENT,"").replace(Vs.DATA_INFO.DATA_INFO_CONTENT,"");return fd.formatPageReference(n)}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static segmentsMatch=(e,t)=>{const n=e.split("."),s=t.split(".");return n.length===s.length&&n.every(((e,t)=>{if(e===s[t])return!0;if(e.endsWith("()")){const n=e.slice(0,-2),a=s[t];return a.startsWith(n)&&/^\[\d+\]$/.test(a.slice(n.length))}return!1}))};static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&$p.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),n=e.indexOf(" "),s=e.substring(0,n);return t.has(s)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const s=e[t];"string"==typeof s?n="true"===s||"false"!==s&&s:"object"==typeof s?(n=s,hC.convertObjectWithStringToBoolean(s)):n=s,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=hC.getIn(t,e);if(!n)return;const s=Object.hasOwn(n,Ls.getDefaultQualifiedName("pyCount"));if(s&&(n=n.pxResults),!n)return;const a=n.filter((e=>!e.error)),r=n.filter((e=>e.error));hC.setIn(t,s?`${e}.pxResults`:e,[...a,...r])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],s=["workarea","modal","actionarea"],a=n.findIndex((e=>s.some((t=>e.startsWith(t)))));return-1!==a&&(t=n.slice(0,a+1).join("/")),JA()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return hC.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const s=[];let a="";const r=n.getPageReference(),o=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let a=No.isProperty(n)?nC(`.${No.getPropertyName(n)}`,r,o):n;null!=a&&""!==a||(a=Vs.NULL_STRING),s.push(a)}));let i=t;const c=s.join(Vs.HASH_DELIMITER);return c&&(a=hC.getHashedString(c),i=t+Vs.UNDERSCORE_STRING+a),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}const[,n,s,a,r,o,i,c]=t.map(Number);return new Date(n,s-1,a,r,o,i,c).getTime()}static formatToUTCDate(e,t){if(!e)return e;const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const s=(e,t=2)=>String(e).padStart(t,"0"),a=n.getUTCFullYear(),r=s(n.getUTCMonth()+1),o=s(n.getUTCDate());if("Date"===t)return`${a}${r}${o}`;return`${a}${r}${o}T${s(n.getUTCHours())}${s(n.getUTCMinutes())}${s(n.getUTCSeconds())}.${s(n.getUTCMilliseconds(),3)} GMT`}static isLeafProperty(e){return Boolean(e)&&!e.includes(".")}static getMetadataType(e,t,n){const s=hC.isLeafProperty(e)?IA(e,t):n.getFieldMetadata(e);return Array.isArray(s)?s[0]?.type:s?.type}static toStringParameterValue(e){return"string"==typeof e?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,t,n,s,a){if(n&&Object.hasOwn(n,e))return n[e];if(!lg.isProperty(t))return t;const r=null!==a?lg.getPropertyName(t):lg.getLeafPropertyName(t);return s.getValue(`.${r}`)}static formatParameterValue(e,t,n,s,a){if(!lg.isProperty(t))return e;const r=null!==s?lg.getPropertyName(t):lg.getLeafPropertyName(t);if(!r)return e;const o=hC.getMetadataType(r,a,n);if(!o)return e;const i=hC.toStringParameterValue(e);return"Date"===o?i?i.includes("T")?hC.formatToUTCDate(i,"Date"):hC.formatToUTCDate(`${i}T00:00:00Z`,"Date"):e:"DateTime"===o&&i?hC.formatToUTCDate(i,"DateTime"):e}static resolveAndFormatParameters(e,t,n,s,a){const r={};for(const o of Object.keys(e)){const i=e[o];if("string"!=typeof i)r[o]=i;else{const e=hC.resolveParameterValue(o,i,a,t,n);r[o]=hC.formatParameterValue(e,i,t,n,s)}}return r}static normalizePropertyRef(e){const t=e.replace(/\[\d+\]/g,"");return t.startsWith(".")?t.substring(1):t}static resolvePageClass(e,t){if(!t)return;const n=(e=this.normalizePropertyRef(e)).split(".");let s;s=n.length>1?n.slice(0,-1):n;let a=t;for(const e of s){const t=IA(e,a);if(!t)return;if(Array.isArray(t)&&t[0]?.pageClass?a=t[0].pageClass:!Array.isArray(t)&&t.pageClass&&(a=t.pageClass),!a)return}return a}static isNestedObject(e){return ds(e)&&!Array.isArray(e)}static pruneKeys=(e,t,n=!1)=>{if(!k(e))return e;const s=t instanceof Set?t:new Set(t);return n?(hC.isNestedObject(e)?Object.keys(e).forEach((t=>{const n=e[t];if(s.has(t)){const n=Object.getOwnPropertyDescriptor(e,t);n&&n.configurable?delete e[t]:Reflect.set(e,t,void 0)}else n&&(ds(n)||Array.isArray(n))&&hC.pruneKeys(n,s,!0)})):Array.isArray(e)&&e.forEach((e=>{(ds(e)||Array.isArray(e))&&hC.pruneKeys(e,s,!0)})),e):Array.isArray(e)?e.map((e=>ds(e)||Array.isArray(e)?hC.pruneKeys(e,s,!1):e)):hC.isNestedObject(e)?Object.keys(e).reduce(((t,n)=>{if(!s.has(n)){const a=e[n];t[n]=ds(a)||Array.isArray(a)?hC.pruneKeys(a,s,!1):a}return t}),{}):e}}const fC=hC,mC=Vs.SUMMARY_OF_LISTS,IC=Vs.SUMMARY_OF_WHEN_CONDITIONS;class EC{static updateData(e){Object.keys(e).forEach((t=>{XA(DC({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{XA(DC({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${IC}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return RA("string"==typeof n?n:"")}static resolveView(e,t,n=""){const s=PA(this.resolveName(e,t));let a=[];if(Array.isArray(s)&&s.length>0){if(t&&s.length>1){if(n||(n=t.getValue(Vs.CLASS_ID)||""),!n)return;a=s.filter((e=>e[Vs.CLASSID]===n))}return 0===a.length?s[0]:a[0]}return s}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=No.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=No.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let s;if(t)s=t.startsWith(Vs.CLASS_ANNOTATION)?t.split(Vs.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName(),e.getValue(Vs.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){const e=["refer","copy"].includes(t.dataRetrievalType),n="Page List"===t.type;s=e&&n?t.pageClass:t.classID}s||(s=n.ruleClass)}return s}static resolveReference(e,t){const{type:n}=e;let s;if("reference"===n){const{config:n}=e,a=n?.type,{ref:r,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===a?s=this.resolveNavigation(r||o,t):"view"===a?s=this.resolveView(r||o,t,c||""):"widget"===a&&(s={type:"Widget",config:{name:o,ruleClass:c}}),s}return e}static resolvePropertyReference(e,t,n){return nC(t,e,n)}static getProperty(e,t,n){let s=this.resolvePropertyReference(t,e,n);if(null==s||0===s.length){const a=aC(`${t}.${mC}`,e,n);a&&(s=this.resolvePropertyReference(t,a,n))}return s}static getPropertyValue(e,t,n){return e=No.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=EC.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:s,hasSuggestions:a,pageReference:r,context:o}=e;let i=t||s||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):a&&i===s?EC.getPropertyValue(i,r,o?`${o}/${Vs.SUGGESTION}`:void 0):EC.getPropertyValue(i,r,o||void 0)}static _handlePropString(e,t,n,s,a){n.startsWith("@")?e[t]=No.handleAnnotation(n,s,a):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((s=>{const a=e[s];"string"==typeof a?this._handlePropString(e,s,a,t,n):Array.isArray(a)?a.forEach((s=>{this._resolveProps("object"==typeof s?s:e[s],t,n)})):"object"==typeof a&&this._resolveProps(e[s],t,n)}))}static resolveProps(e,t,n){return e&&t?(fC.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(fC.mergeDeep(e,t),this._resolveProps(t,void 0,e),fC.resolveStringBooleans(t)):t}static resolvePropertyPageClass(e,t){const n=fC.resolvePageClass(e,t),s=e.substring(e.lastIndexOf(".")+1),a=IA(s,n);let r;if(a)return r=Array.isArray(a)?a[0]?.pageClass:a.pageClass,r}static resolveClassID(e,t,n,s){const a=No.trimAnnotation(e);let r=a.startsWith(".")?`${t}${a}`:a;for(;r;){const e=nC(Vs.CLASS_ID,r,n);if(e)return e;if(s){const e=this.resolvePropertyPageClass(a,s);if(e)return e}const t=r.lastIndexOf(".");if(-1===t)break;r=r.substring(0,t)}return null}}const yC=EC;const AC=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},CC=AC;const SC=class{static#g=[];static#h=!1;static getActionHandlers=(e,t,n)=>{const s=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=CC.getHandler(e.action),{config:n}=e;s.push({handler:t,config:n})})),s};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#f=(e,t,n)=>{for(let s=0;s<e.length;s+=1){const a=e[s],r={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#g.push(r)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===Vy.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=$p.getNextActionMgrId(),n};static#m=e=>{const t=e.actionHandler,n=e.component,{config:s}=e,a={};yC.resolveProps(s,a,n),t&&(t(e.eventType,a,n),this.#I())};static#I=()=>{if(!this.#h){if(0===this.#g.length)return;const e=this.#g.shift();if(!e)return;this.#m(e),e.config&&"true"===e.config.parallel&&this.#g.length>0&&this.#I()}};static#E=()=>{this.#I()};static#y=(e,t,n)=>{this.#f(e,t,n),this.#E()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return yC.getContextPath(t,n)};static#A(e,t){const n=e.getComponentConfig().behaviours||[];for(let s=0;s<n.length;s+=1){const{behaviour:a,actions:r}=n[s];if(r){const n=this.getActionHandlers(r,a,t);n&&n.length>0&&this.#y(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,s=e.getContextName();Cu({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:s});if(!("Browser"===Vy.getRuntime()?"nativeEvent"in t&&t.nativeEvent instanceof Event||t instanceof Event:"nativeEvent"in t&&!!t.nativeEvent||t instanceof Event)&&"value"in t&&(null===t.value||"prop"in t&&void 0!==t.prop)){if("object"==typeof(a=t)&&null!==a){const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const r=a[e],o=t[e];XA({type:Xs,payload:{reference:yC.getContextPath(n,r),value:o,context:s}}),XA({type:ea,payload:{reference:yC.getContextPath(n,r),value:o,context:s}})}}}else{let n,{target:a}=t;null===a&&t&&"auxiliaryTarget"in t&&t.auxiliaryTarget&&(a=t.auxiliaryTarget),n=void 0===a?"value"in t?t.value:void 0:"value"in a?a.value:a.innerText;const r=this.getFullRef(e);XA({type:Xs,payload:{reference:r,value:n,context:s}}),void 0!==a&&this.isEditable(a)&&!this.isNonKeyInput(a)||XA({type:ea,payload:{reference:r,pageReference:e.getPageReference(),value:n,context:s,propertyName:e.getComponentConfig().value,classID:e.getValue(Vs.CLASS_ID)}})}var a};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:s,validationValue:a}=n,r=this.getFullRef(e),o=e.getContextName();n.clearMessages&&Cu({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:s),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,s),this.isNonKeyInput(n)||XA({type:ea,payload:{reference:r,pageReference:e.getPageReference(),value:s,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(Vs.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#A(e,n)};static pause=()=>{this.#h=!0};static resume=()=>{this.#h=!1,this.#I()};static isQueueEmpty=()=>0===this.#g.length;static clearQueue=()=>{this.#g=[]};static getActionsQueue=()=>this.#g;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},_C="CREATE_WORK",NC=e=>({type:_C,payload:e});const TC=(e,t,n,s,a="")=>{const r=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,s,a,r,o){const i=s.substring(0,s.indexOf("[")),c=s.substring(s.indexOf("[")+1,s.indexOf("]"));let l=t[i];const u=`${fC.trimDotForProperty(a)}.${i}`;o.includes(u)&&Object.hasOwn(l,Ls.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[s]),r.push(i),n.add(`${a}.${s}`))}(e,t,n,o,a,r,s):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),TC(e[o],t[o],n,s,`${a}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((s=>{(Array.isArray(e[s])&&!n.includes(s)||!Array.isArray(e[s])&&!Object.hasOwn(t,s))&&delete e[s]}))}(t,e,r)},DC=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:s=[],propertiesToReArrange:a=[]}=t,{context:r,data:o,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=dE(r,!0),u=ZA(r);let d={};if(u&&o){d=JSON.parse(JSON.stringify(u));const e=JSON.parse(JSON.stringify(o));a.length>0&&fC.rearrangeProperties(a,d);const t=new Set;TC(l,d,t,a),((e,t,n)=>{const s=new Set;e.forEach((e=>{e=fC.trimDotForProperty(e);const[a,r,o]=tu(e);if(a&&r&&o&&!s.has(`${a}.${r}`)){const e=fC.getIn(n,`${a}.${r}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+o&&fC.setIn(t,`${a}.${r}[${n}]`,e)})),s.add(`${a}.${r}`)}}))})(t,d,e)}!function(e,t){const n=fC.getIn(e,Vs.REFERENCED_USERS);let s;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return s=fC.getIn(t,Vs.REFERENCED_USERS,{}),void fC.setIn(e,Vs.REFERENCED_USERS,{...s,...n});s=fC.getIn(t,Vs.REFERENCED_USERS,[]);const a=new Map;for(const e of[...s,...n])if(a.has(e.UserID)){const t=a.get(e.UserID);a.set(e.UserID,{...t,...e})}else a.set(e.UserID,e);n.length=0;for(const e of a.values())n.push(e)}}(o,u);const p=fC.getIn(e?.data,Vs.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),g=aI.isExternalObject(p),h=g?{[Vs.OBJECT_INFO.OBJECT_INFO]:{[Vs.CONTENT]:{...d[Vs.OBJECT_INFO.OBJECT_INFO]?.[Vs.CONTENT]}}}:{[Vs.CASE_INFO.CASE_INFO]:{[Vs.CONTENT]:{...d[Vs.CASE_INFO.CASE_INFO]?.[Vs.CONTENT]}}},f=g?Vs.OBJECT_INFO.OBJECT_INFO_CONTENT:Vs.CASE_INFO.CASE_INFO_CONTENT;let m=o;return c?(n.forEach((e=>{const t=`${f}.${e}`;fC.deleteIn(h,t)})),m=lC(o,h,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=oE[e]||{};Object.keys(n).forEach((e=>{fC.hasIn(t,e)&&(n[e].value=fC.getIn(t,e))}))})(r,o),{type:Ca,payload:{...e,data:m,...s.length>0?{propertiesToReplace:s}:null,...a.length>0?{propertiesToReArrange:a}:null}}},PC=e=>({type:"SHOW_HARNESS",payload:e}),OC=e=>({type:ta,payload:e}),RC=e=>({type:na,payload:e}),bC=e=>({type:"ADD_WORK",payload:e}),vC=e=>({type:pa,payload:e}),xC=e=>({type:Da,payload:e}),wC=e=>({type:Pa,payload:e}),MC=e=>({type:Oa,payload:e}),LC=e=>({type:ba,payload:e}),UC=e=>({type:va,payload:e}),FC=e=>({type:Ma,payload:e}),VC=e=>({type:Ua,payload:e}),jC=e=>({type:La,payload:e}),kC=e=>{const{containerItemID:t}=e;e.suggestionContexts=JE(t);const n=e?.data?.caseInfo?.content,s=Object.keys(n||{}).length>0;return e.propertiesToReplace||(e.propertiesToReplace=s?aI.getPropertiesToReplace(t):[]),{type:Va,payload:e}},BC=e=>{const{context:t}=e;return{type:oa,payload:{context:t}}},$C=e=>{const{context:t}=e;return{type:ia,payload:{context:t}}},GC=e=>({type:ja,payload:e}),WC=e=>({type:Fa,payload:e}),HC=e=>({type:ir,payload:e}),qC=e=>{const{context:t,containerItemID:n}=e;let s=t;return s||(s=qE(n)),e.context=s,e.deleteContext=!dy(n),e.childContainers=KE(n),e.childContainersContexts=QE(n),e.transientItems=py([...e.childContainersContexts,n]),e.suggestionContexts=JE(n),n===t&&(e.caseID=nC(Vs.CASE_INFO.CASE_INFO_ID,"",t)||nC(Vs.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=nC(Vs.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Ra,payload:e}},zC=e=>{const{containerItemID:t}=e;return e.transientItems=py([...QE(t),t]),{type:wa,payload:e}},YC=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:xa,payload:e}},KC=e=>{const{context:t,containerItemID:n}=e;let s=t;if(s||(s=qE(n)),e.context=s,e.childContainers=KE(n),e.childContainersContexts=QE(n),e.transientItems=py([...e.childContainersContexts,n]),e.suggestionContexts=JE(n),n===t){e.caseID=nC(Vs.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=nC(Vs.CASE_INFO.REMOTESYSTEMID,"",t);const n=nC(Vs.CASE_INFO.CASE_INFO_CLASSNAME,"",t);Bs.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:ka,payload:e}},QC=e=>({type:ha,payload:e}),JC=e=>({type:Ia,payload:e}),XC=e=>({type:Na,payload:e}),ZC=(e,...t)=>(SC.resume(),e(...t)),eS=(e,t,n,s,a)=>({type:Ta,payload:{msg:e,err:t,context:n,formFields:s,actionMgrID:a}}),tS=e=>({type:dr,payload:e}),nS=e=>({type:pr,payload:e}),sS=e=>({type:gr,payload:e}),aS=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),rS=e=>({type:ua,payload:e}),oS=e=>({type:Xs,payload:e}),iS="add",cS="replace",lS=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"];let uS="",dS="Home",pS="",gS=!0;const hS=e=>(gS=e,gS),fS=()=>gS,mS=(e,t,n)=>Uy.getSemanticURL(e,t,n),IS=(e,t)=>Uy.getRestEndPoint(e,t),ES=(e,t)=>{let n=an();const s=IS(e,t);return s?(s.restApi?.startsWith("/")||(s.restApi=`/${s.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),s.restApi=n+s.restApi,s):{}},yS=(e,t,n)=>{const{root:s,resources:a}=e,{views:r}=a,{config:o}=s,i=iS;let c="";if(n)c=n;else{const e=r[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(jg);if(l){const e=fC.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},AS=(e,t)=>{const n=`${e}/${t}`;if(!("EMBED"===Vy.getRenderingMode()))return n;const s=Uy.getRoutingInfo()?.authServiceAlias;if(!s)return n;const a=encodeURIComponent(s);let r;try{r=new URL(n)}catch{return n}const o=r.pathname.split("/").filter(Boolean),i=o.findIndex((e=>"app"===e.toLowerCase()));if(i<0)return n;"prauth"!==o[i-1]?.toLowerCase()&&o.splice(i,0,"PRAuth");const c=o.findIndex((e=>"app"===e.toLowerCase()))+2;return c!==o.length&&o[c]===a||o.splice(c,0,a),r.pathname=`/${o.join("/")}`,r.toString().replace(/\/$/,"")},CS=(e,t,n,s)=>{let a,r;a=Bg(t)?AS(e,t):e;const o=Bg(n?.pxURLPath||"");o&&(a=`${a}/${o}`);try{r=new URL(a).searchParams,a=a.includes("?")?a.split("?")[0]:a}catch(e){return console.log("Invalid url",e),""}const i=a.split("/"),c=i[i.length-1],l=new URLSearchParams("undefined"==typeof window?"":window.location.search);if(zg()?(a=((e,t,n,s,a)=>{const r=Uy.getStaticRoutePage(),o=dS?.toLowerCase(),i=r?.toLowerCase(),c=s?.toLowerCase();return i!==o&&c!==o||a.has("noPortal")?e:AS(t,n)})(a,e,t,c,l),Uy.setStaticRoutePage("")):c.toLowerCase()!==dS.toLowerCase()||l.has("noPortal")||(a=AS(e,t)),!Uy.isDefaultPortal()){const e=Uy.getPortalName();l.has("portal")?l.set("portal",e):l.append("portal",e)}r=((e,t,n)=>{for(const[n,s]of t.entries())!e.has(n)&&lS.includes(n)&&e.append(n,s);n&&!e.has("lang")&&e.append("lang",n);const s=Uy.getRoutingInfo()?.embedQueryParams;if(s)for(const[t,n]of Object.entries(s))e.has(t)||e.append(t,String(n));return e})(r,l,s);const u=Gg(r.toString());return u&&(a+=`?${u}`),a},SS=(e,{urlPathObjParam:t,infoParam:n,optionsParam:s,queryParam:a},r=!1,o)=>{let i,c,l;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(r)i=t,c=n,l=s;else{const{uiResources:n,data:s}=e;({options:l}=e),i=t&&t.pxURLPath&&kg(t.pxURLPath)?yS(n,s,t.pxURLPath):t||yS(n,s),c=Uy.getEndPointInfo(i.pxURLPath),i.pxURLPath=c.urlPath}let u=CS(uS,Uy.getApplicationPath(),i,o);const{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:Uy.getApplicationName()),n===`${uS}/${t}/`)return{title:e};const s=new URL(n).pathname.replace(`${t}/`,""),a=s.split("/");return/\d/.test(s)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(pS,Uy.getApplicationPath(),u),p=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(c,{...l,title:d});i?.historyAction===iS?((e,t,n)=>{if("undefined"!=typeof window)try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(p,d,u):i?.historyAction===cS&&(a&&(u+=`?${a}`),((e,t,n)=>{if("undefined"!=typeof window)try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(p,d,u))},_S=(e,t)=>{let n=null;e.directUrlUpdation&&(n={historyAction:iS,pxURLPath:""},n.pxURLPath=e.semanticURL),SS(e,{urlPathObjParam:n,infoParam:null,optionsParam:null},!1,t)},NS=(e,t)=>{_S(e,t)},TS=(e,t)=>{const n={pxURLPath:e};return CS(uS,Uy.getApplicationPath(),n,t)},DS=e=>{const{uiResources:t}=e;fS()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:s}=n,a=t.config,r=a.type,o=a.name;if("VIEW"===r.toUpperCase()){const e=s[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&_S(e)},PS=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},OS=(e,t,n)=>{const{caseClassName:s,workID:a}=e.payload,{containerName:r,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=Bs.getRemoteCase(s),u={...e,headers:{RemoteSystemID:c},className:s,isTraditionalRemoteCase:Bs.isTraditionalRemoteCase(s),isRemoteCase:Bs.isRemoteCase(s),action:br,viewName:js,gadgetId:aI.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${a}`,containerName:r,name:l};XA(d.showPage(u))};let RS=!1;const bS=async e=>{if(RS)return void(RS=!1);const t=(e=>"ui-navigation"===e.state?.type?(vu.publish(Fs.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);if(t){const e=Ny(),n=GE(`${e}/primary`);if(n&&ry(n)){const e=Gy().getLocaleValue(lE,"Messages");if(!await um.confirm(e))return RS=!0,void window.history.go(1)}Bs.isRemoteCase(t.payload?.caseClassName)?OS({...t},t.options):XA(d.showHistory(PS(t)))}},vS=()=>Uy.getApplicationPath()!==xy(),xS=e=>{const{acName:t,context:n,defaultViewLabel:s,ruleName:a,className:r}=e,o=((e,t)=>{const n=Uy.getRoutingInfo();if(zg()&&Object.values(n?.routes??{}).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const s=e.split(" ").join(""),a=e.split(" ").join("-").toLowerCase(),r=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes?.[s]?s:n?.routes?.[a]?a:n?.routes?.[r]?r:e})(a||s,r);(e=>{dS=e})(o),Uy.setDefaultRoute(o),Uy.setDefaultClassName(r);const i=Hs(t,n),c=jr(t,n),l=(()=>{const e=Vy.getIsExtraCallRequiredForDefaultHome();return!0===e||"true"===e})(),u={historyAction:cS,pxURLPath:""};let p,g=null;const h={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&vS()){const t=Hg(wy());Vy.shouldUseURLParams()&&(g=t.includes("?")?t.split("?")[1]:null),p=qg(t,h),u.pxURLPath=p.urlPath,void 0!==p.payload?.pageClass&&(p.payload.pageClass=JA()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",s={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:h,routeKey:p.routeKey};Bs.isRemoteCase(p?.payload?.caseClassName)?OS(s,e,h.context):XA(d[n](PS(s)))}else p=Uy.getEndPointInfo(dS),u.pxURLPath="";SS(null,{urlPathObjParam:u,infoParam:p,optionsParam:h,queryParam:g},!0)},wS=(e,t=!1)=>{var n;uS=e.domain,!1===t&&fS()&&(n=bS,"undefined"!=typeof window&&window.addEventListener("popstate",(e=>n(e))),"undefined"!=typeof window&&(window.onbeforeunload=()=>null)),Uy.init(e,dS)},MS=e=>{(e=>{"undefined"!=typeof window&&(window.document.title=e)})(e)},LS=e=>{for(const t of e)lS.includes(t)||lS.push(t)};var US=Symbol.for("immer-nothing"),FS=Symbol.for("immer-draftable"),VS=Symbol.for("immer-state");function jS(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var kS=Object,BS=kS.getPrototypeOf,$S="constructor",GS="prototype",WS="configurable",HS="enumerable",qS="writable",zS="value",YS=e=>!!e&&!!e[VS];function KS(e){return!!e&&(XS(e)||a_(e)||!!e[FS]||!!e[$S]?.[FS]||r_(e)||o_(e))}var QS=kS[GS][$S].toString(),JS=new WeakMap;function XS(e){if(!e||!i_(e))return!1;const t=BS(e);if(null===t||t===kS[GS])return!0;const n=kS.hasOwnProperty.call(t,$S)&&t[$S];if(n===Object)return!0;if(!c_(n))return!1;let s=JS.get(n);return void 0===s&&(s=Function.toString.call(n),JS.set(n,s)),s===QS}function ZS(e,t,n=!0){if(0===e_(e)){(n?Reflect.ownKeys(e):kS.keys(e)).forEach((n=>{t(n,e[n],e)}))}else e.forEach(((n,s)=>t(s,n,e)))}function e_(e){const t=e[VS];return t?t.type_:a_(e)?1:r_(e)?2:o_(e)?3:0}var t_=(e,t,n=e_(e))=>2===n?e.has(t):kS[GS].hasOwnProperty.call(e,t),n_=(e,t,n=e_(e))=>2===n?e.get(t):e[t],s_=(e,t,n,s=e_(e))=>{2===s?e.set(t,n):3===s?e.add(n):e[t]=n};var a_=Array.isArray,r_=e=>e instanceof Map,o_=e=>e instanceof Set,i_=e=>"object"==typeof e,c_=e=>"function"==typeof e,l_=e=>"boolean"==typeof e;var u_=e=>e.copy_||e.base_,d_=e=>e.modified_?e.copy_:e.base_;function p_(e,t){if(r_(e))return new Map(e);if(o_(e))return new Set(e);if(a_(e))return Array[GS].slice.call(e);const n=XS(e);if(!0===t||"class_only"===t&&!n){const t=kS.getOwnPropertyDescriptors(e);delete t[VS];let n=Reflect.ownKeys(t);for(let s=0;s<n.length;s++){const a=n[s],r=t[a];!1===r[qS]&&(r[qS]=!0,r[WS]=!0),(r.get||r.set)&&(t[a]={[WS]:!0,[qS]:!0,[HS]:r[HS],[zS]:e[a]})}return kS.create(BS(e),t)}{const t=BS(e);if(null!==t&&n)return{...e};const s=kS.create(t);return kS.assign(s,e)}}function g_(e,t=!1){return f_(e)||YS(e)||!KS(e)||(e_(e)>1&&kS.defineProperties(e,{set:h_,add:h_,clear:h_,delete:h_}),kS.freeze(e),t&&ZS(e,((e,t)=>{g_(t,!0)}),!1)),e}var h_={[zS]:function(){jS(2)}};function f_(e){return null===e||!i_(e)||kS.isFrozen(e)}var m_="MapSet",I_="Patches",E_="ArrayMethods",y_={};function A_(e){const t=y_[e];return t||jS(0),t}var C_,S_=e=>!!y_[e];var __=()=>C_;function N_(e,t){t&&(e.patchPlugin_=A_(I_),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function T_(e){D_(e),e.drafts_.forEach(O_),e.drafts_=null}function D_(e){e===C_&&(C_=e.parent_)}var P_=e=>C_={drafts_:[],parent_:C_,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:S_(m_)?A_(m_):void 0,arrayMethodsPlugin_:S_(E_)?A_(E_):void 0};function O_(e){const t=e[VS];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function R_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[VS].modified_&&(T_(t),jS(4)),KS(e)&&(e=b_(t,e));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(n[VS].base_,e,t)}else e=b_(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&g_(t,n)}(t,e,!0),T_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==US?e:void 0}function b_(e,t){if(f_(t))return t;const n=t[VS];if(!n){return F_(t,e.handledSet_,e)}if(!x_(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}L_(n,e)}return n.copy_}function v_(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var x_=(e,t)=>e.scope_===t,w_=[];function M_(e,t,n,s){const a=u_(e),r=e.type_;if(void 0!==s){if(n_(a,s,r)===t)return void s_(a,s,n,r)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;ZS(a,((e,n)=>{if(YS(n)){const s=t.get(n)||[];s.push(e),t.set(n,s)}}))}const o=e.draftLocations_.get(t)??w_;for(const e of o)s_(a,e,n,r)}function L_(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const s=n.getPath(e);s&&n.generatePatches_(e,s,t)}v_(e)}}function U_(e,t,n){const{scope_:s}=e;if(YS(n)){const a=n[VS];x_(a,s)&&a.callbacks_.push((function(){G_(e);const s=d_(a);M_(e,n,s,t)}))}else KS(n)&&e.callbacks_.push((function(){const a=u_(e);3===e.type_?a.has(n)&&F_(n,s.handledSet_,s):n_(a,t,e.type_)===n&&s.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&F_(n_(e.copy_,t,e.type_),s.handledSet_,s)}))}function F_(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||YS(e)||t.has(e)||!KS(e)||f_(e)||(t.add(e),ZS(e,((s,a)=>{if(YS(a)){const t=a[VS];if(x_(t,n)){const n=d_(t);s_(e,s,n,e.type_),v_(t)}}else KS(a)&&F_(a,t,n)}))),e}var V_={get(e,t){if(t===VS)return e;let n=e.scope_.arrayMethodsPlugin_;const s=1===e.type_&&"string"==typeof t;if(s&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=u_(e);if(!t_(a,t,e.type_))return function(e,t,n){const s=B_(t,n);return s?zS in s?s[zS]:s.get?.call(e.draft_):void 0}(e,a,t);const r=a[t];if(e.finalized_||!KS(r))return r;if(s&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return r;if(r===k_(e.base_,t)){G_(e);const n=1===e.type_?+t:t,s=W_(e.scope_,r,e,n);return e.copy_[n]=s}return r},has:(e,t)=>t in u_(e),ownKeys:e=>Reflect.ownKeys(u_(e)),set(e,t,n){const s=B_(u_(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){const s=k_(u_(e),t),o=s?.[VS];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((a=n)===(r=s)?0!==a||1/a==1/r:a!=a&&r!=r)&&(void 0!==n||t_(e.base_,t,e.type_)))return!0;G_(e),$_(e)}var a,r;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),U_(e,t,n)),!0},deleteProperty:(e,t)=>(G_(e),void 0!==k_(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),$_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=u_(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s?{[qS]:!0,[WS]:1!==e.type_||"length"!==t,[HS]:s[HS],[zS]:n[t]}:s},defineProperty(){jS(11)},getPrototypeOf:e=>BS(e.base_),setPrototypeOf(){jS(12)}},j_={};for(let e in V_){let t=V_[e];j_[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function k_(e,t){const n=e[VS];return(n?u_(n):e)[t]}function B_(e,t){if(!(t in e))return;let n=BS(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=BS(n)}}function $_(e){e.modified_||(e.modified_=!0,e.parent_&&$_(e.parent_))}function G_(e){e.copy_||(e.assigned_=new Map,e.copy_=p_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}j_.deleteProperty=function(e,t){return j_.set.call(this,e,t,void 0)},j_.set=function(e,t,n){return V_.set.call(this,e[0],t,n,e[0])};function W_(e,t,n,s){const[a,r]=r_(t)?A_(m_).proxyMap_(t,n):o_(t)?A_(m_).proxySet_(t,n):function(e,t){const n=a_(e),s={type_:n?1:0,scope_:t?t.scope_:__(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=s,r=V_;n&&(a=[s],r=j_);const{revoke:o,proxy:i}=Proxy.revocable(a,r);return s.draft_=i,s.revoke_=o,[i,s]}(t,n);return(n?.scope_??__()).drafts_.push(a),r.callbacks_=n?.callbacks_??[],r.key_=s,n&&void 0!==s?function(e,t,n){e.callbacks_.push((function(s){const a=t;if(!a||!x_(a,s))return;s.mapSetPlugin_?.fixSetContents(a);const r=d_(a);M_(e,a.draft_??a,r,n),L_(a,s)}))}(n,r,s):r.callbacks_.push((function(e){e.mapSetPlugin_?.fixSetContents(r);const{patchPlugin_:t}=e;r.modified_&&t&&t.generatePatches_(r,[],e)})),a}function H_(e){if(!KS(e)||f_(e))return e;const t=e[VS];let n,s=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=p_(e,t.scope_.immer_.useStrictShallowCopy_),s=t.scope_.immer_.shouldUseStrictIteration()}else n=p_(e,!0);return ZS(n,((e,t)=>{s_(n,e,H_(t))}),s),t&&(t.finalized_=!1),n}var q_=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(c_(e)&&!c_(t)){const n=t;t=e;const s=this;return function(e=n,...a){return s.produce(e,(e=>t.call(this,e,...a)))}}let s;if(c_(t)||jS(6),void 0===n||c_(n)||jS(7),KS(e)){const a=P_(this),r=W_(a,e,void 0);let o=!0;try{s=t(r),o=!1}finally{o?T_(a):D_(a)}return N_(a,n),R_(s,a)}if(!e||!i_(e)){if(s=t(e),void 0===s&&(s=e),s===US&&(s=void 0),this.autoFreeze_&&g_(s,!0),n){const t=[],a=[];A_(I_).generateReplacementPatches_(e,s,{patches_:t,inversePatches_:a}),n(t,a)}return s}jS(1)},this.produceWithPatches=(e,t)=>{if(c_(e))return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,s;return[this.produce(e,t,((e,t)=>{n=e,s=t})),n,s]},l_(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),l_(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),l_(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){KS(e)||jS(8),YS(e)&&(e=function(e){YS(e)||jS(10);return H_(e)}(e));const t=P_(this),n=W_(t,e,void 0);return n[VS].isManual_=!0,D_(t),n}finishDraft(e,t){const n=e&&e[VS];n&&n.isManual_||jS(9);const{scope_:s}=n;return N_(s,t),R_(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(0===s.path.length&&"replace"===s.op){e=s.value;break}}n>-1&&(t=t.slice(n+1));const s=A_(I_).applyPatches_;return YS(e)?s(e,t):this.produce(e,(e=>s(e,t)))}},z_=q_.produce;function Y_(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var K_=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Q_=()=>Math.random().toString(36).substring(7).split("").join("."),J_={INIT:`@@redux/INIT${Q_()}`,REPLACE:`@@redux/REPLACE${Q_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Q_()}`};function X_(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Z_(e,t,n){if("function"!=typeof e)throw new Error(Y_(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Y_(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Y_(1));return n(Z_)(e,t)}let s=e,a=t,r=new Map,o=r,i=0,c=!1;function l(){o===r&&(o=new Map,r.forEach(((e,t)=>{o.set(t,e)})))}function u(){if(c)throw new Error(Y_(3));return a}function d(e){if("function"!=typeof e)throw new Error(Y_(4));if(c)throw new Error(Y_(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(Y_(6));t=!1,l(),o.delete(n),r=null}}}function p(e){if(!X_(e))throw new Error(Y_(7));if(void 0===e.type)throw new Error(Y_(8));if("string"!=typeof e.type)throw new Error(Y_(17));if(c)throw new Error(Y_(9));try{c=!0,a=s(a,e)}finally{c=!1}return(r=o).forEach((e=>{e()})),e}p({type:J_.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Y_(10));s=e,p({type:J_.REPLACE})},[K_]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Y_(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[K_](){return this}}}}}function eN(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const a=t[s];0,"function"==typeof e[a]&&(n[a]=e[a])}const s=Object.keys(n);let a;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:J_.INIT}))throw new Error(Y_(12));if(void 0===n(void 0,{type:J_.PROBE_UNKNOWN_ACTION()}))throw new Error(Y_(13))}))}(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let r=!1;const o={};for(let a=0;a<s.length;a++){const i=s[a],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(Y_(14))}o[i]=u,r=r||u!==l}return r=r||s.length!==Object.keys(e).length,r?o:e}}function tN(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function nN(e){return({dispatch:t,getState:n})=>s=>a=>"function"==typeof a?a(t,n,e):s(a)}var sN=nN(),aN=nN,rN="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?tN:tN.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function oN(e,t){function n(...n){if(t){let s=t(...n);if(!s)throw new Error(mN(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return X_(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var iN=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function cN(e){return KS(e)?z_(e,(()=>{})):e}var lN="RTK_autoBatch",uN=e=>t=>{setTimeout(t,e)},dN=(e={type:"raf"})=>t=>(...n)=>{const s=t(...n);let a=!0,r=!1,o=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?(l=window.requestAnimationFrame,u=100,e=>{let t=!1;const n=()=>{t||(t=!0,cancelAnimationFrame(s),clearTimeout(a),e())},s=l(n),a=setTimeout(n,u)}):uN(10):"callback"===e.type?e.queueNotification:uN(e.timeout);var l,u;const d=()=>{o=!1,r&&(r=!1,i.forEach((e=>e())))};return Object.assign({},s,{subscribe(e){const t=s.subscribe((()=>a&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return a=!e?.meta?.[lN],r=!a,r&&(o||(o=!0,c(d))),s.dispatch(e)}finally{a=!0}}})};function pN(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=e??{};let r=new iN;return t&&("boolean"==typeof t?r.push(sN):r.push(aN(t.extraArgument))),r},{reducer:n,middleware:s,devTools:a=!0,duplicateMiddlewareCheck:r=!0,preloadedState:o,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!X_(n))throw new Error(mN(1));c=eN(n)}l="function"==typeof s?s(t):t();let u=tN;a&&(u=rN({trace:!1,..."object"==typeof a&&a}));const d=function(...e){return t=>(n,s)=>{const a=t(n,s);let r=()=>{throw new Error(Y_(15))};const o={getState:a.getState,dispatch:(e,...t)=>r(e,...t)},i=e.map((e=>e(o)));return r=tN(...i)(a.dispatch),{...a,dispatch:r}}}(...l),p=(e=>function(t){const{autoBatch:n=!0}=t??{};let s=new iN(e);return n&&s.push(dN("object"==typeof n?n:void 0)),s})(d);return Z_(c,o,u(..."function"==typeof i?i(p):p()))}function gN(e){const t={},n=[];let s;const a={addCase(e,n){const s="string"==typeof e?e:e.type;if(!s)throw new Error(mN(28));if(s in t)throw new Error(mN(29));return t[s]=n,a},addAsyncThunk:(e,s)=>(s.pending&&(t[e.pending.type]=s.pending),s.rejected&&(t[e.rejected.type]=s.rejected),s.fulfilled&&(t[e.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:e.settled,reducer:s.settled}),a),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(s=e,a)};return e(a),[t,n,s]}function hN(e,t){let n,[s,a,r]=gN(t);if("function"==typeof e)n=()=>cN(e());else{const t=cN(e);n=()=>t}function o(e=n(),t){let o=[s[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===o.filter((e=>!!e)).length&&(o=[r]),o.reduce(((e,n)=>{if(n){if(YS(e)){const s=n(e,t);return void 0===s?e:s}if(KS(e))return z_(e,(e=>n(e,t)));{const s=n(e,t);if(void 0===s){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return s}}return e}),e)}return o.getInitialState=n,o}var{assign:fN}=Object;function mN(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const IN=e=>{let t=new Set,n=t;const s=()=>{t===n&&(t=new Set(t))},a=e=>{let n=!0;return s(),t.add(e),()=>{n&&(s(),t.delete(e),n=!1)}},r=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let s=!1,o=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{o?s=!0:r()})),{...n,dispatch:e=>{const t=o;t||(s=!1,o=!0);const n=i(e),a=s&&!t;return t||(s=!1,o=!1),a&&r(),n},subscribe:a}}},EN=(e,t)=>{const{data:{shared:n={}}={},context:s}=t;((e,t)=>{Ih.updateDataPageStore(t),Object.keys(t).forEach((n=>{fC.getIn(e,[Vs.SHARED,n])?Object.keys(t[n]).forEach((s=>{fC.setIn(e,[Vs.SHARED,n,s],t[n][s])})):fC.setIn(e,[Vs.SHARED,n],t[n])}))})(e,n),s&&fC.deleteIn(e,[s,"shared"])},yN=(e,t,n=!1)=>{const{context:s,caseViewMode:a=(n?void 0:Vs.PERFORM_MODE),containerName:r}=t;r!==PE.WORKAREA&&a&&fC.setIn(e,[s,"context_data","caseViewMode"],a)},AN=(e,t)=>{const{context:n}=t;fC.setIn(e,[n,"context_data","actionType"],t.actionType),fC.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},CN=e=>null!==e&&"object"==typeof e,SN=(e,t=[])=>{t.forEach((t=>fC.deleteIn(e,t)))},_N=(e,t=[])=>{t.forEach((t=>fC.deleteIn(e,t)))},NN=(e,t=[])=>{t.forEach((t=>{fC.deleteIn(e,t)}))},TN=(e,t,n={})=>{const{deleteAssignmentSpecificResources:s=!0,doDeleteConfirmationDetails:a=!0,skipMergeAssignmentsAndActions:r=!0}=n;fC.deleteIn(e,[t,"nextAssignmentInfo"]),r&&(fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"availableActions"]),fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"availableProcesses"]),fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"assignments"])),fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"activeActionID"]),fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"childCases"]),a&&(fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"confirmationLinks"]),fC.deleteIn(e,[t,"caseMessages"])),s&&(fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"actionButtons"]),fC.deleteIn(e,[t,Vs.CASE_INFO.CASE_INFO,"navigation"]))},DN=hN({},(e=>{e.addCase(Oa,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&TN(e,t.payload.context);const{target:n}=t.payload;n&&(n.includes(Vs.WORKAREA)||n.includes(Vs.MODAL))?e[t.payload.context]=t.payload.data:e[t.payload.containerItemID]=t.payload.data,yN(e,t.payload),AN(e,t.payload),EN(e,t.payload),((e,t)=>{const{context:n}=t;fC.deleteIn(e,[n,"context_data","blocking_action_counter"]),fC.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase(Va,((e,t)=>{t.payload.doDeleteCaseSummary&&TN(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:s=[]}=t.payload;if(n&&(n.includes(Vs.WORKAREA)||n.includes(Vs.MODAL))){const n=e[t.payload.context];CN(n)&&(e[t.payload.context]=lC(n,t.payload.data,{propertiesToReplace:[...s]}))}else{const n=e[t.payload.containerItemID];CN(n)&&(e[t.payload.containerItemID]=lC(n,t.payload.data,{propertiesToReplace:[...s]}))}(t.payload.actionType||t.payload.assignmentID)&&AN(e,t.payload),yN(e,t.payload),EN(e,t.payload),_N(e,t.payload.suggestionContexts)})).addCase(Ra,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:s,deleteContext:a}=t;a&&fC.deleteIn(e,[s]),fC.deleteIn(e,[n])})(e,t.payload),NN(e,n),SN(e,t.payload.transientItems),_N(e,t.payload.suggestionContexts)})).addCase(Pa,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{fC.deleteIn(e,[t])})):fC.deleteIn(e,[n])})).addCase(ja,((e,t)=>{const{context:n,contextToBeRemoved:s,data:a,childContainersContextsToBeRemoved:r}=t.payload;TN(e,t.payload.context),yN(e,t.payload);const o=e[n],i=e[s];if(!CN(o)||!CN(i))return;const c=lC(o,i);CN(c)&&(e[n]=lC(c,a),fC.deleteIn(e,[s]),NN(e,r),EN(e,t.payload))})).addCase(ka,((e,t)=>{const{context:n,pulseReplace:s=!0,childContainersContexts:a=[]}=t.payload;let{data:r}=t.payload;const o=fC.getIn(e[n],"pulse");let i=fC.getIn(e[n],"OperatorID"),c=fC.getIn(e[n],"pxRequestor");c&&r.pxRequestor&&(c=fC.mergeDeep(c,r.pxRequestor)),i&&r.OperatorID&&(i=fC.mergeDeep(i,r.OperatorID)),!s&&o&&(r=uC(r,"pulse",o),r=uC(r,"OperatorID",i),r=uC(r,"pxRequestor",c)),fC.setIn(e,n,r),yN(e,t.payload),EN(e,t.payload),NN(e,a),SN(e,t.payload.transientItems),_N(e,t.payload.suggestionContexts)})).addCase(hr,((e,t)=>{const{context:n,doDeleteConfirmationDetails:s=!0,skipMergeAssignmentsAndActions:a=!0}=t.payload;TN(e,n,{doDeleteConfirmationDetails:s,skipMergeAssignmentsAndActions:a})})).addCase(ba,((e,t)=>{const{transientItemID:n,data:s}=t.payload;fC.setIn(e,n,s)})).addCase(xa,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>fC.deleteIn(e,t)))})).addCase(wa,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>fC.deleteIn(e,t)))})).addCase(va,((e,t)=>{const{transientItemID:n,data:s}=t.payload;lC(fC.getIn(e,n),s)})).addCase(Ma,((e,t)=>{const{transientItemID:n,data:s}=t.payload;lC(fC.getIn(e,n),s)})).addCase(La,((e,t)=>{const{transientItemID:n,data:s}=t.payload;Object.keys(s??{}).forEach((t=>{fC.deleteIn(e,[n,t])}))})).addCase(Ua,((e,t)=>{const{transientItemID:n,data:s}=t.payload;fC.deleteIn(e,n),fC.setIn(e,n,s)})).addCase(ua,((e,t)=>{const{key:n,value:s}=t.payload;fC.setIn(e,`${Vs.SHARED}.${n}`,s)})).addCase(Ga,((e,t)=>{const{context:n,data:s}=t.payload;return fC.setIn(e,n,s)}))})),PN=DN;function ON(e){if("object"==typeof e&&null!==e&&"payload"in e&&"object"==typeof e.payload&&null!==e.payload){const t=e.payload.context;return"string"==typeof t?t:void 0}}const RN=oN(mr),bN=hN({},(e=>{e.addCase(Ca,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:s=[],uiRootReference:a="",interestPath:r}=t.payload,o=a&&"string"==typeof t.payload.context?`${t.payload.context}.${a}`:t.payload.context,i="string"==typeof o?KA(o):[],c={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...s]};if(a&&i.length)fC.setIn(e,i,lC(fC.getIn(e,i),fC.getIn(t.payload.data,KA(a)),c));else if(r){const a=fC.getIn(e[t.payload.context],r),o=fC.getIn(t.payload.data,r),i=lC(a,o,{isArrayDeepMerge:!0}),c=fC.getIn(t.payload.data.context_data,r);cC(e[t.payload.context],[...n],[...s]),fC.setIn(e[t.payload.context],r,i),e[t.payload.context]&&c&&fC.setIn(e[t.payload.context].context_data,r,lC(fC.getIn(e[t.payload.context].context_data,r),c,{isArrayDeepMerge:!0}))}else e[t.payload.context]=lC(e[t.payload.context],t.payload.data,c);yN(e,t.payload,!0),EN(e,t.payload)})).addCase(Xs,((e,t)=>{const{context:n,reference:s,value:a,isArrayDeepMerge:r}=t.payload;uC(e[n],s,a,{isArrayDeepMerge:r})})).addCase(Zs,((e,t)=>{const{context:n,reference:s,value:a}=t.payload;dC(e[n],s,a)})).addCase(Sa,((e,t)=>{oC(e[t.payload.context],t.payload.reference)})).addCase(oa,((e,t)=>{fC.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(ia,((e,t)=>{fC.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(ca,((e,t)=>{const n=ON(t);n&&(e[n]||(e[n]={}),fC.setIn(e[n],"context_data.isOffline",!0))})).addCase(la,((e,t)=>{const n=ON(t);n&&(e[n]||(e[n]={}),fC.setIn(e[n],"context_data.isOffline",!1))})).addCase(dr,((e,t)=>{const{data:n}=t.payload;EN(e,{data:{shared:n}})})).addCase(pr,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:s}=t;fC.deleteIn(e.shared,[n,s]);const a=fC.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&fC.deleteIn(e.shared,[n])}))})).addCase(fr,((e,t)=>{const n=fC.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?fC.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):fC.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)})).addCase(RN,((e,t)=>{e.locale=fC.getIn(t.payload,"locale","")}))})),vN=bN,xN=/\[(\d+)\]$/gi,wN=/(\d+)/gi,MN=/\[\d+\]$/,LN=(e,t,n,s=[Vs.CONTEXT_DATA,Vs.CASE_INFO.CASE_INFO,Vs.CONTENT])=>{const a=fC.getIn(t,s);if(a){const t=_u(a,[],[]);for(const a of t)fC.setIn(e[n],[...s,...a],{})}},UN=(e,t,n,s)=>{const{property:a,pageReference:r,category:o,type:i,subType:c}=s.payload,l=fC.getIn(e[t],n);if(l&&o===Vs.CASEMESSAGES)fC.setIn(e[t],mu(a,r,o),"");else if(l&&l.length>0&&Array.isArray(l)){let s;s=c?l.filter((e=>!(e.type===i&&e.subType===c))):l.filter((e=>e.type!==i)),n&&n.length>0&&fC.setIn(e[t],mu(a,r,o),s)}},FN=(e,t)=>{const{property:n,pageReference:s,category:a,isListEntry:r,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return LN(e,i,c),e;const l=mu(n,s,a,r);if(Number.isInteger(o)){fC.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=fC.getIn(e[c],t)||{};const s=(e=>[...e].sort(((e,t)=>{const n=e.match(xN),s=t.match(xN);if(!n&&!s)return e.localeCompare(t);if(!n&&s)return-1;if(n?.length&&s?.length){const e=n[0].match(wN),t=s[0].match(wN);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})))(Object.keys(n));n=s.map((e=>n[e])),n.forEach(((n,a)=>{const r=s[a].match(xN);if(r?.length){const i=parseInt(r[0].match(wN)[0],10);i>o&&(fC.deleteIn(e[c],t.concat(s[a])),fC.setIn(e[c],t.concat(s[a].replace(MN,`[${i-1}]`)),n))}}))}else fC.setIn(e[c],l,{});return e};function VN(e,t){const n=fC.getIn(e,t);return void 0!==n?.dataInfo?.content}const jN=(e,t)=>{const n=fC.getIn(e,t);return!0===aI.isObjectCaseType(n?.objectInfo?.objectTypeID)};function kN(e,t){let n=fu.FIELD_MESSAGES_PATH;return VN(e,t)?n=fu.DATA_OBJECT_FIELD_MESSAGES_PATH:jN(e,t)&&(n=fu.OBJECT_FIELD_MESSAGES_PATH),n}const BN=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const s=fC.getIn(n,Vs.ERROR_FIELD_IN_PAGE).slice(1),a=fC.getIn(n,Vs.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(a){let r="caseInfo.content";VN(e,t)?r="dataInfo.content":jN(e,t)&&(r="objectInfo.content");let o=s?`${r}.${s}`:r;o=o.replace(/\(/g,"[").replace(/\)/g,"]");const i=mu(a,o,Vs.PROPERTY),c=fC.getIn(e[t],`${o}.classID`),l=IA(a,c),u=Vy.getLocale()??"en-US",d=new gf(u,l?.localeReference),p={type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:d.getLocalizedText(l.label)}},g=fC.getIn(e[t],i,[]);if(fC.isContains(g,p))return;fC.setIn(e[t],i,[...g,p])}})(e,t,n)}))};function $N(e,t){const{err:n,formFields:s}=t.payload;let{context:a}=t.payload;const{fieldErrors:r,pageErrors:o}=((e,t)=>{const n=new Map(t.map(((e,t)=>[e,t]))),s=e=>n.get((e=>{const t=(e.erroneousInputOutputFieldInPage||"").replace(/^\./,""),n=(e.erroneousInputOutputIdentifier||"").replace(/^\./,"");return t?`${t}.${n}`:n})(e))??Number.MAX_SAFE_INTEGER,a=e.slice().sort(((e,t)=>s(e)-s(t))),r=[],o=[];for(const e of a)Am(e,t,r,o);return{fieldErrors:o,pageErrors:r}})(n.errorDetails,s),i=kN(e,a);if(fC.setIn(e,[a,...i],{}),fC.setIn(e,[a,...fu.PAGE_MESSAGES_PATH],[]),r.forEach((t=>{const n=fC.getIn(t,Vs.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(t);if(!n)return!1;const s=t.substring(t.lastIndexOf(".")+1),r=mu(s,n,Vs.PROPERTY);fC.setIn(e,[a,...r],[])}}})),r.length>0&&BN(e,a,r),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[a]||(a=Vs.APP.APP),fC.setIn(e,[a,...fu.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(PE.WORKAREA)&&(a=Ws(a)),fC.deleteIn(e,[a,...fu.PAGE_MESSAGES_PATH]);return e}const GN=hN({},(e=>{e.addCase(Ta,((e,t)=>t.payload.err.errorDetails&&(t.payload.err.errorClassification===Fs.VALIDATION_FAIL||t.payload.err.errorClassification===Fs.INVALID_INPUTS||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?$N(e,t):e)).addCase(Va,((e,t)=>{const{context:n}=t.payload,s=[n,...kN(e,n)],a=[n,...fu.PAGE_MESSAGES_PATH];if(fC.setIn(e,s,{}),fC.setIn(e,a,[]),n&&n.includes(PE.WORKAREA)){const t=[Qs(n),...fu.PAGE_MESSAGES_PATH];fC.setIn(e,t,[])}})).addCase(cr,((e,t)=>{const{isListEntry:n,clearAll:s,context:a}=t.payload;return s?(fC.deleteIn(e,[a,Vs.CONTEXT_DATA]),e):n?FN(e,t):((e,t)=>{const{property:n,pageReference:s,category:a,isListEntry:r,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return LN(e,o,i),e;const l=mu(n,s,a,r);return a===Vs.PAGE&&i?.includes(PE.WORKAREA)&&(c=Ws(i)),UN(e,c,l,t),UN(e,i,l,t),e})(e,t)})).addCase(ir,((e,t)=>{const{messages:n,property:s,pageReference:a,context:r,category:o}=t.payload,i=mu(s,a,o);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&fC.setIn(e[r],mu(s,a,o),n)}))})),WN=GN,HN=(e,t,n,s,a)=>{fC.setIn(e[t],[...n,s],a)},qN=hN({},(e=>{e.addCase(gr,((e,t)=>{const{instruction:n,actions:s,context:a,referenceList:r,listIndex:o,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,u=KA(r);switch(n){case Vs.LIST_ACTIONS.ADD:HN(e,a,u,i,l);break;case Vs.LIST_ACTIONS.INSERT:HN(e,a,u,o,l);break;case Vs.LIST_ACTIONS.UPDATE:((e,t,n,s,a)=>{const r=lC(fC.getIn(e[t],[...n,s],{}),a);fC.setIn(e[t],[...n,s],r)})(e,a,u,o??i,l);break;case Vs.LIST_ACTIONS.DELETE:((e,t,n,s,a)=>{const r=fC.getIn(e[t],n,[]);"string"==typeof s?delete r[s]:r.splice(s,1),fC.setIn(e[t],n,r),hu.deleteListNode(t,[a],r.length)})(e,a,u,o??i,r);break;case Vs.LIST_ACTIONS.MOVE:((e,t,n,s,a)=>{const r=fC.getIn(e[t],[...n,s],{}),o=fC.getIn(e[t],n,[]);o.splice(s,1),o.splice(a,0,r),fC.setIn(e[t],n,o),yu(e,t,n?.join("."),s,a)})(e,a,u,o,c);break;case Vs.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,s)=>{const a=fC.getIn(e[t],n)||[];s.forEach((e=>{const{instruction:s,content:r,listIndex:o}=e;if(s===Vs.LIST_ACTIONS.SELECT){a[o]=r;const e=n?.join(".");bd(t,e)}else delete a[o]})),fC.setIn(e[t],n,a.filter(Boolean))})(e,a,u,s);break;case Vs.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{fC.setIn(e[t],n,[])})(e,a,u);break;case Vs.LIST_ACTIONS.REPLACE:((e,t,n,s)=>{fC.setIn(e[t],n,s)})(e,a,u,l);break;case Vs.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{fC.setIn(e[t],n,{})})(e,a,u)}}))})),zN=[vN,PN,WN,qN],YN=(e,t)=>(e||(e=tT().data),t.type===lr?tT().data:(zN.forEach((n=>{e=n(e,t)})),e)),KN={},QN=(e,t=[])=>{t.forEach((t=>{fC.deleteIn(e,[t])}))},JN=(e,t)=>{const{type:n,payload:s}=t,a=n===Va,{target:r,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:g="",clearView:h=!1}=s;return c?fC.setIn(e,[r,"items",l,"view"],c):h&&fC.deleteIn(e,[r,"items",l,"view"]),o&&fC.setIn(e,[r,"items",l,"context"],o),d&&fC.setIn(e,[r,"items",l,"flowName"],d),(!a||a&&g)&&fC.setIn(e,[r,"items",l,"key"],g.trim()),((e,t,n,s)=>{""===e&&fC.deleteIn(t,[n,"items",s,"key"])})(g,e,r,l),(!a||a&&i)&&fC.setIn(e,[r,"items",l,"semanticURL"],i),(!a||a&&p)&&fC.setIn(e,[r,"items",l,"resourceType"],p),QN(e,u),e},XN=hN(KN,(e=>{e.addCase(lr,(()=>KN)).addCase(Da,((e,t)=>{const{context:n,name:s,type:a,actionMgrID:r}=t.payload,o=`${n}/${s}`;if($p.resolveActionByID(r,null,!1),e[o])return e;fC.setIn(e,[o],{type:a,accessedOrder:[],items:{}})})).addCase($a,((e,t)=>{const{containerName:n,childContainers:s=[]}=t.payload;fC.deleteIn(e,[n]),s.forEach((t=>{fC.deleteIn(e,[t])}))})).addCase(Pa,((e,t)=>{const{context:n,name:s,actionMgrID:a,childContainers:r}=t.payload,o=`${n}/${s}`;$p.resolveActionByID(a,null,!1),fC.setIn(e,[o,"accessedOrder"],[]),fC.setIn(e,[o,"items"],{}),Array.isArray(r)&&r.forEach((t=>{fC.deleteIn(e,[t])}))})).addCase(Oa,((e,t)=>{const{target:n,context:s,isInCreateStage:a,isBulkAction:r,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:g,isMinimizable:h,showProgress:f,progressMessage:m,modalOptions:I,resourceStatus:E,actionID:y,isMultiRecordData:A,acTertiary:C,parentContext:S,heading:_,isTraditionalRemoteCase:N,readOnly:T,referenceList:D,subscriptName:P,subscriptFieldName:O,pageGroupName:R,isPageGroup:b,index:v,isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:U,enableBackNavigation:F}=t.payload,V=e[n],j=V&&V.type,k=V&&V.accessedOrder||[],B=V&&V.items||{};if(e[n]&&"single"===j&&k.length>0)return JN(e,t);const $={accessedOrder:[...k,c],items:{...B,[c]:{view:i,semanticURL:o,key:u,flowName:d,readOnly:T,context:s,isInCreateStage:a,resourceType:p,actionName:g,isMinimizable:h,...r&&{isBulkAction:r},showProgress:f,progressMessage:m,modalOptions:I,isTraditionalRemoteCase:N,resourceStatus:E,referenceList:D,subscriptName:P,subscriptFieldName:O,pageGroupName:R,isPageGroup:b,index:v,...y&&{actionID:y},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},...S&&{parentContext:S},...x&&{isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:U,enableBackNavigation:F},heading:_}}};$p.resolveActionByID(l,null,!1),e[n]=vs(e[n],$)})).addCase(Va,((e,t)=>{const{actionMgrID:n,data:s}=t.payload;try{JN(e,t),$p.resolveActionByID(n,s,!1)}catch{$p.rejectActionByID(n,!1)}})).addCase(ka,((e,t)=>((e,t)=>{const{actionMgrID:n,data:s,target:a,containerItemID:r}=t.payload;let o=e;try{const i=e&&e[a]?.type;let c=e&&e[a]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,r]:c.includes(r)?c:[...c,r],fC.setIn(e,[a,"items",r,"transientItems"],[]),fC.setIn(e,[a,"accessedOrder"],c),o=JN(e,t),$p.resolveActionByID(n,s,!1)}catch{$p.rejectActionByID(n,!1)}return o})(e,t))).addCase(Fa,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:a}=t.payload;try{const t=fC.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));t.push(s),fC.setIn(e,[n,"accessedOrder"],t),$p.resolveActionByID(a,null,!1)}catch{$p.rejectActionByID(a,!1)}})).addCase(ja,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:a,childContainers:r}=t.payload;try{const t=fC.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));fC.setIn(e,[n,"accessedOrder"],t),fC.deleteIn(e,[n,"items",s]),QN(e,r),$p.resolveActionByID(a,null,!1)}catch{$p.rejectActionByID(a,!1)}})).addCase(Ra,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:a,childContainers:r}=t.payload;try{const t=fC.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));fC.setIn(e,[n,"accessedOrder"],t),fC.deleteIn(e,[n,"items",s]),QN(e,r),$p.resolveActionByID(a,null,!1)}catch{$p.rejectActionByID(a,!1)}})).addCase(ba,((e,t)=>{const{transientItemID:n,target:s,contextName:a}=t.payload,r=fC.getIn(e,[s,"items",a,"transientItems"])??[];fC.setIn(e,[s,"items",a,"transientItems"],[...r,n])})).addCase(wa,((e,t)=>{const{target:n,containerItemID:s}=t.payload;fC.deleteIn(e,[n,"items",s,"transientItems"])})).addCase(xa,((e,t)=>{const{target:n,transientItemID:s,containerItemID:a}=t.payload,r=(fC.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==s));fC.setIn(e,[n,"items",a,"transientItems"],r)}))})),ZN=XN;let eT={};const tT=()=>eT,nT=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,s=n[Vs.CONTEXT_DATA]||e[Vs.CONTEXT_DATA];eT={data:{locale:Vy.getLocale(),[Vs.APP.APP]:{...t,[Vs.CONTEXT_DATA]:s}},containers:{}}})(e),{data:YN,containers:ZN}),sT=(e,t=!1)=>e===Vs.ACTION?t?Lh.REFRESH_CASE_DATA:Lh.REFRESH_ASSIGNMENT_DATA:Lh.REFRESH_CASE_VIEW,aT=e=>{const{context:t}=e;let n={...fm(t).content,contextData:!1};const s=Fm(t);fC.isEmpty(s)||(n=Um(s,n));const a=sT(e.editType,e.isLocalAction),{restApi:r,reqType:o}=ES(a,{ID:e.isLocalAction||e.editType!==Vs.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=r;return e.editType===Vs.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,Kl(rd(i,{method:o,body:n,headers:e.headers},t)).pipe(hg((t=>({actionInPayload:e,response:t.data,headers:hm(t.headers)}))),Og(": Error occurred during ajax call : ",t))},rT={},{VIEW:oT,FIELD:iT}=Vs.CONTEXT_TREE_NODE_TYPES,cT=(e,t,n)=>{const s=t.value.data[n]?.objectInfo?.headers,a=t.value.data[n]?.caseInfo?.headers;return!aI.shouldUseUnifiedHandling()&&e&&s?s:a},lT=e=>(e=>Qu[e])(e)>0&&rT[e],uT=(e,t)=>{const{caseWideAction:n,caseViewAction:s,fieldsWithDeclarativeTargets:a,fieldsWithWhen:r,isViewsWithWhen:o,interestPage:i,options:c,isMultiRecordData:l,editType:u,isLocalAction:d,interestPageActionID:p}=e,{optionalPayload:g}=c;g&&(t.content={...g});let h={},f={...t},m=Lh.REFRESH;if(s||l&&u===Vs.ACTION){const t=sT(u,d);l&&u===Vs.ACTION&&(f.interestPageActionID=p),h=ES(t,e),f={...f,interestPage:i}}else o?h=((e,t)=>{const{isObjectType:n,isExternalObject:s,actionID:a,context:r,isExternalCase:o,casetypeID:i}=e,c=Vs.getDefaultQualifiedName(Vs.VIEW_NAMES.OBJECT_CREATE_VIEW);if(t||n&&OI(r)){let t=s&&a===c?Lh.REFRESH_EXTERNAL_OBJECT:Lh.REFRESH_CASE_DATA;const n=aI.shouldUseUnifiedHandling();return s&&a===c&&n&&(t=Lh.REFRESH_EXTERNAL_CASE_DATA),ES(t,e)}return ES(o&&i&&a===c?Lh.REFRESH_EXTERNAL_CASE_DATA:Lh.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(a.length>0||r.length>0)&&({restAPI:h,requestBody:f,requestType:m}=((e,t,n,s,a)=>(a={...a,calculations:{fields:t,whens:n}},{restAPI:ES(s?Lh.RECALCULATE_CASE_DATA:Lh.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:a,requestType:Lh.RECALCULATE}))(e,a,r,n,f));return{restAPI:h,requestBody:f,requestType:m}},dT=[(e,t)=>e.pipe(Tg(Lh.REFRESH_DATA,Pr),hg((e=>e.payload)),_g((e=>!cm(e?.options?.actionMgrID))),fg((e=>{const{context:n,contextData:s,options:a,isObjectType:r}=e,{propertyName:o="",classID:i="",isObjectWideAction:c,skipPayloadGeneration:l}=a,u=l?{content:{}}:fm(n,{skipUUID:!1,isObjectWideAction:c});let d=[],p=[],g=!1;Vy.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:d=[],whens:p=[]}=MI(n)),g=p.some((e=>e.type===oT))):g=!0;const h=p.filter((e=>e.type===iT)),f=fC.getPropertyName(o),m=f?f.split("."):[],I=m.pop(),E=m.join("."),y=[];E&&((e,t,n,s,a)=>{const r=IA(e,t);if(!r||"copy"!==r.dataRetrievalType)return;const o=fC.getIn(n,`content.content.${e}`);if(!o||"object"!=typeof o)return;const i=s?Object.keys(o).filter((e=>e!==s)):Object.keys(o);i.length>0&&(i.forEach((e=>delete o[e])),a.push(e))})(E,i,u,I,y),e.serverPrecedenceFields=y;let A={...u.content,contextData:s};const C=Fm(n);fC.isEmpty(C)||(A=Um(C,A));const S=uT({...e,fieldsWithDeclarativeTargets:d,fieldsWithWhen:h,isViewsWithWhen:g},A);Gh.registerBlockingAction(n).catch((()=>{}));const{restAPI:_,requestBody:N,requestType:T}=S;(e={...e,requestType:T}).requestType=T;const{reqType:D,restApi:P}=_,O={...cT(r,t,n)};O&&!O.etag&&e.isMultiRecordData&&e.editType===Vs.ACTION&&(O.etag=fC.getETag(e.context));return Kl(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const s=(e=>{const{ID:t,actionID:n,context:s}=e;return`${t}.${s}.${n}`})(t);if(t.interestPage&&(e.interestPage=t.interestPage),lT(s)){const t=[];for(let n=0;n<rT[s].length;){const a=rT[s][n],r=wI(a,e);if("CANCEL_REFRESH"===r){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===r&&(t.push(n),a.cancelConfig?.cancel()),n+=1}t.forEach((e=>{rT[s].splice(e,1)}))}const a=cd();return e.signal=a.token,e.cancelConfig=a,rT[s]?rT[s].push(e):rT[s]=[e],vu.publish(Fs.PUB_SUB_EVENTS.ON_REFRESH_START,{context:n}),rd(e.url,e,n,{cancelContext:s}).then((e=>(delete rT[s],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete rT[s],e}))})({reqHeaders:O,context:n,method:D,body:N,url:vI(e,P)},e)).pipe(hg((t=>{const s=((e,t,n)=>{const s=aI.shouldUseUnifiedHandling(),a=aI.isObjectCaseType(t)||n;if(s||!a)return e;const r=fC.getIn(e?.data,Fs.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return aI.isExternalObject(r)?e:Us.transformCaseData(e)})(t?.data,a?.classID,r);return a?.resetForm&&hu.removeContextTreeNode(n),{response:{...s},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:hm(t.headers)}})),Og(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),fg((async e=>{if(e&&e.type===Ta)return Gh.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),"ERR_CANCELED"===e.payload?.err?.code?[]:(vu.publish(Vs.ON_REFRESH_ERROR,{context:e.payload?.context}),Cm(e));const{actionConfig:t,response:n,actionMgrID:s}=e,{context:a,serverPrecedenceFields:r,requestType:o}=t,i=Wp.getTargetViewContainerName(Wa),c=jr(i,a),l={acName:c,context:a},u=mf(n,{[Fs.STOPMERGEACTIONS]:!0,[Fs.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Lh.REFRESH&&await Im(u,t,l);const d=mm(u,{target:c,context:a});t.interestPage&&(d.interestPath=`caseInfo.content${fC.convertClipboardPageToPageRefNotation(t.interestPage)}`),d.isArrayDeepMerge=t.options?.isArrayDeepMerge,d.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const p=aI.getPropertiesToReArrange(a),g=ZC(DC,d,{serverPrecedenceFields:r,propertiesToReArrange:p}),h=g.payload?.data?.pageInstructions;return h?.length>0&&(delete g.payload?.data?.pageInstructions,Bm.mergeServerPageInstructions(a,h)),XA(g),$p.resolveActionByID(s,d),vu.publish(Fs.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a}),Gh.deRegisterBlockingAction(a).catch((()=>{})),[]})))],pT=dT,gT=[e=>e.pipe(Tg(ur),fg((async e=>{const{context:t}=e.payload,n={},s={},a=Object.keys(e.payload.datapages).map((a=>{const r=e.payload.datapages[a];if(r.mode===Vs.READONLY&&r?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=r?.refreshStrategy||{},n=eC()[r.name];if(n&&a in n){const s=n[a],{loadTime:r}=s;if(!Fg.isTimeElapsed(r,e,t))return}}return Fg.getData(r.name,{dataViewParameters:r.dataViewParameters},t).then((e=>{const t=r.mode===Vs.READONLY?s:n;t[r.name]?t[r.name][a]={pxResults:e.data.data,parameters:r.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[r.name]={[a]:{pxResults:e.data.data,parameters:r.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const r=[];return Object.keys(n).length&&r.push(DC({context:t,data:n})),Object.keys(s).length&&r.push(tS({data:s,context:t})),XA(r),[]})))],hT=gT;class fT{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>a.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId())switch(e.data.action){case fT.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case fT.LOAD_PREVIEW:this.loadPreview(e);break;case fT.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case fT.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case fT.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case fT.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case fT.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case fT.CANCEL_CASE:this.handleCaseCancel();break;case fT.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(vu.publish(Vs.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=KE(Fs.APP.APP),t=e[e.length-1],n=GE(t),s=ZA(n)?.caseInfo?.ID;if(s&&n&&xf({}).getPConnect().getActionsApi().getDescendants(s,n),Qf(n)){const e=by(n);e&&xf({}).getPConnect().getActionsApi().getDescendants(s,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){xf({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=Ls.getDefaultQualifiedName("Data-Portal"),t=Ls.getDefaultQualifiedName("pyHome"),n=xf({isRoot:!0}),s=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let a;Array.isArray(s)&&s[0]&&(a=s[0]);const r=a?.pyClassName||e,o=a?.pyRuleName||t;n.getPConnect().getActionsApi().showPage(o,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:s,caseLabel:a,uniqueId:r}=e.data;if(r!==this.getUniqueId())return;let o=s;s===fT.OPEN_WORK_ITEM&&(o=fT.OPEN_WORK_BY_HANDLE),Uy.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:o,name:a});xf({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),a,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){xf({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:Fs.PRIMARY,context:Fs.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${Fs.APP.APP}${Vs.FORWARD_SLASH_STRING}${Fs.PRIMARY}`;xf({meta:{},options:{context:zE(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){const e=`${Fs.APP.APP}${Vs.FORWARD_SLASH_STRING}${Fs.PRIMARY}`;xf({meta:{},options:{context:zE(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:s,caseInitProperties:a}=e.data;if(n===this.getUniqueId()){const e=`${Fs.APP.APP}${Vs.FORWARD_SLASH_STRING}${Fs.PRIMARY}`,n=xf({meta:{},options:{context:zE(e)}}),r=new URLSearchParams((a+s).slice(1)),o=this.setStartingFields(r);n.getPConnect().getActionsApi().createWork(t,{startingFields:o})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),vu.subscribe(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),vu.subscribe(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{vu.unsubscribeAllWithEventType(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),vu.unsubscribeAllWithEventType(Fs.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:fT.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:fT.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:fT.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const mT=new fT,IT="nextAssignmentInfo",ET="nextAssignmentInfo.context",yT=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Vs.MODAL:t||Wp.getTargetViewContainerName(Qa)},AT=async(e,t)=>{if(XE(e))return{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1};return{...await Dm(e,t),dirtyCheckPerformed:!0}},CT=e=>{if(aI.shouldUseUnifiedHandling())return e?.uiResources?.root?.config?.name===Ls.getDefaultQualifiedName("pzCreateDetails")||!1;const t=fC.getIn(e,[Vs.DATA,Vs.CASE_INFO.CASE_INFO]);return oI(t)&&iI(Vy.getOperatorIdentifier(),t)},ST=(e,t)=>{const{class:n,context:s,viewType:a=pm.PAGE}=e,{removeActionPayload:r}=t;let o=e?.pageName?e?.pageName:Vy.getDefaultCasePage();return e.isTraditionalUICase&&(o=Ls.getDefaultQualifiedName("pyDetails")),Kl(hp.createCase(n,{...e,pageName:o,viewType:a,context:s})).pipe(hg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:r}))),Og("Error occurred during ajax call at createWork Epic : ",s))},_T=e=>{vu.publish(Vs.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},NT=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},TT=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,e)},DT=e=>{let t,n=0,s=[],a={},r=!1,o=!1;return e.pipe(Tg(_C),Rg(100),hg((e=>(({actionMgrID:n}=e.payload),e.payload))),fg((e=>{const{context:s}=e;if(t=e.class,o=!1,aI.isExternalCaseType(t)&&(Cu({context:s,stateObj:ZA(s),clearContextMessages:!0}),!Zm(s))){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,e),Pg()}const a=yT(e),i=jr(a,s);return r=em(t),Kl(AT(i,{loadingContext:s})).pipe(fg((({continueExecution:t,removeActionPayload:s,dirtyCheckPerformed:a})=>t?(o=a,e.isTraditionalUICase=r,ST(e,{removeActionPayload:s})):($p.rejectActionByID(n),Dg))))})),fg((async e=>{if(e?.type===Ta)return e.payload.context=((e,t)=>aI.isExternalCaseType(e)&&t?t:Ny())(t,e.payload.context),s.push(Cm(e)),s;const{actionInPayload:i,response:c,headers:l,removeActionPayload:u}=e,d=aI.isExternalCaseType(i.class);let p=CT(c);(i.renderInline||Vy.getDefaultCasePage()||r)&&(p=!1),fC.setIn(c.data,Fs.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const g=yT({...i,isInCreateStage:p}),h=jr(g,i.context),f=_m(h,g,i.context),{openCaseViewAfterCreate:m}=i;if(!o&&((e,t,n)=>!Vf(e)&&XE(t)&&(n??!0))(g,h,m)){const{continueExecution:e}=await Dm(h,{loadingContext:i.context});if(!e)return $p.rejectActionByID(n),s}const I=i?.openCaseViewAfterCreate??!0,E=mf(c);if(!I&&!p){const e=zf(c),{businessID:t,caseType:n,resolvedURL:r}=Zp(c);return a={id:t,label:n,href:r},_T(a),NT({caseId:t,assignmentId:e,caseType:n,ID:qf(E)}),d&&Kf(i),s}const y=String(Gf(qf(E)));let A=mS("createWork",{caseClassName:Wf(E)});A=A.replace(/{.+?}/,y),E.semanticURL=A,kp.setComponentCache(y,Yu.addDebugHeaders(i.debugInfo)),((e,t)=>{const n=CT(e),{skipBrowserSemanticUrlUpdate:s=!1,isTraditionalUICase:a}=t,r=a&&!tm();fC.setIn(e,["directUrlUpdation"],(!n||r)&&!s)})(E,i);const C={acName:h,context:f},S=im(f);await Im(E,i,C);const _={target:h,context:f,containerItemID:f,headers:l,semanticURL:A,isInCreateStage:p,isMinimizable:p,caseViewMode:E.confirmationNote?Vs.REVIEW_MODE:Vs.PERFORM_MODE,currentCaseViewMode:S,assignmentContext:fC.getIn(E,ET),nextAssignmentInfo:fC.getIn(E,IT),resourceType:Fs.CASE,openCaseViewAfterCreate:i.openCaseViewAfterCreate,modalOptions:i.modalOptions,debugInfo:i.debugInfo};Jf(_,E);const N=mm(E,_);r&&(N.data.caseInfo.content.coexistenceAction="openAssignment"),aI.setTraditionalGadgetId(N.data);const T=Sm(h,N);return Nm(T)&&Yf(s,{removeActionPayload:u,target:h}),d&&Kf(i),s.push(T),om(E,_),TT({caseId:y}),s})),hg((()=>{const e=tm(),t=oI(fC.getIn(s[0]?.payload,"data.caseInfo"));return r&&e&&t?mT.postCreateCaseMessage(s[0]?.payload?.nextAssignmentInfo?.ID,Lm,s):Lm(s),Zf(s,n),a={},s=[],s})))},{RESOURCE_TYPES:PT}=Fs,OT=(e,t)=>{const{containerItemID:n,context:s,actionMgrID:a,isInCreateStage:r,isModalAction:o}=t;if(r&&o){const t=Uf(n),r=jr(t,s);e.push(ZC(WC,{containerItemID:n,target:r,actionMgrID:a}))}},RT=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:s,isInCreateStage:a,isProcessAction:r}=t,o=qE(n),i=`${o?.includes("root")?Vs.APP.ROOT:Vs.APP.APP}/${PE.MODAL}`;e.push(ZC(qC,{containerItemID:n,context:o,target:i,skipReleaseLockRequest:s,isInCreateStage:a,isProcessAction:r}))},bT=e=>nC(".openCaseViewAfterCreate",Vs.CONTEXT_DATA,e)??!0,vT=async(e,{translatedDXAPIResponse:t,actionInPayload:n},s,a,r)=>{const{caseID:o}=n,i=(c=t,fC.getIn(c,Mf.NEXT_ASSIGNMENT_INFO_ID,Vs.EMPTY_STRING));var c;const l=a?Yp(t):Wf(t),{caseViewMode:u,headers:d,semanticURL:p,actionMgrID:g,directUrlUpdation:h,key:f,flowName:m,resourceType:I}=s,E=iy(n?.context),y=xE(E,n?.context)?.acTertiary;Object.assign(r,{caseId:o,assignmentId:i,caseType:l,isSubmitFromBlendedUI:y}),RT(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?Vs.APP.ROOT:Vs.APP.APP}/${PE.PRIMARY}`,C=_m(A,PE.PRIMARY),S=Yu.getCoreHeadersFromContext(n.context)||!1,_=mm(t,{target:A,context:C,containerItemID:C,caseViewMode:u,headers:d,semanticURL:p,key:f,flowName:m,resourceType:I,directUrlUpdation:h,debugInfo:S&&S.debugInfo&&{debugId:S.debugInfo[Vs.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(XE(A)){const t=ZA(C),a=qf({data:t}),[,r]=a?a.split(" "):[],o=`You will lose unsaved changes for ${r}. Do you want to continue?`;if(!bT(n.context))return e;{const{continueExecution:t}=await Dm(A,{dirtyMessage:o});if(!t)return s.directUrlUpdation=!1,$p.rejectActionByID(g),Pg();_.currentCaseViewMode=im(_?.context),e.push(ZC(KC,_)),n.__deferCaseActionsPayload=_}}else e.push(ZC(MC,_));return t.directUrlUpdation=h,t.semanticURL=p,await Im(t,{..._,acName:A},{acName:A,context:C}),e},xT=(e,{isModalAction:t,target:n,transientItemID:s})=>{if(t){const t=e.find((({type:e})=>e===ka));t?.payload&&(n=t.payload.target,s=t.payload.containerItemID)}const a=zC({target:n,containerItemID:s});a.payload.transientItems.length&&e.push(a)},wT=e=>/^app\/preview_[0-9]*/g.test(e),MT=(e,t)=>{const n=Ws(e);return!wT(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},LT=e=>{if(!bT(e.context)){let t;const n=e?.caseTypeID,s=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:s}}return{}},UT=(e,t,n,s)=>{const{data:a,caseViewMode:r}=t,o={data:a,caseViewMode:r,context:n};if(fC.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:hr,payload:{context:n}}),s){const t={data:Us.transformObjectToCase(a),caseViewMode:r,context:n};e.push(ZC(DC,t))}e.push(ZC(DC,o))},FT=async(e,t,n,s,a,r,o,i,c,l)=>{const{headers:u}=c,d=l?Vs.OBJECT_INFO.OBJECT_INFO:Vs.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=ZA(e),s=c?.response?.data?.caseInfo?.assignments??[],a=n?.caseInfo?.assignments??[],r=im(e)===Vs.PERFORM_MODE,o=s[0]?.ID!==a[0]?.ID,i=s.length>0&&a.length>0;r&&o&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(s,a[0]?.ID))}const p=XE(iy(e));let g=!1;const h=iy(n),f=bE(h),m=GE(h);m&&f?.items?.[m]?.key===c?.actionInPayload?.caseID&&(g=!0),RT(a,{...s,skipReleaseLockRequest:!0});const I=Uf(e),E={target:iy(e),containerItemID:e,context:e,containerName:I};t.doDeleteCaseSummary=s.doDeleteCaseSummary;const y=Qs(n),A=ZA(y),C=ZA(s.context),S=A[d]?.ID,_=C[d]?.ID,N=ZA(e)?.caseInfo?.ID;if(p&&S===_||!p&&(""===o||E.containerItemID.includes(Vs.WORKAREA)&&t.caseViewMode===Vs.REVIEW_MODE&&N===t.data?.caseInfo?.ID||!r&&t.root&&0===Object.keys(t.root).length&&N===t.data?.caseInfo?.ID))(void 0===t?.data[d]?.content||void 0!==t.data[d].content&&"object"==typeof t.data[d].content&&0===Object.keys(t.data[d].content).length)&&(t.root=void 0,delete t.data?.caseMessages),e.includes(Vs.WORKAREA)&&t.caseViewMode===Vs.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,s=t?.data?.caseInfo?.assignments??[],a=s[0]?.ID;return n!==a})(s,i)&&(t.flowName=" ",t.clearView=!0),e.includes(Vs.ACTIONAREA)?a.push(ZC(DC,{...t,key:o,resourceType:"",...E})):a.push(ZC(kC,{...t,key:o,resourceType:"",...E}));else if(r){const r=iy(e),i=VE(r,o);if(i)E.target=r,E.context=i,E.containerItemID=i,a.push(ZC(kC,{...t,key:o,resourceType:"",...E}));else{const e=KE(n)[0];if(s.target=e,s.context=_m(e,Vs.WORKAREA,n),s?.context){s.containerItemID=s.context,a.push(ZC(MC,{...s,...t}));const n=s.containerItemID;a.push(ZC(WC,{parentContainerTarget:e,containerItemID:n}))}}}if(s.target=iy(e),s.containerName=Uf(e),s.context=e,s.containerItemID=e,s.shouldUpdateCaseActionsInParentContext=!0,fC.setIn(t,"acName",E.target),await Im(i,t),s.__deferCaseActionsPayload=s,g&&(n.includes(Vs.WORKAREA)&&Qf(n)&&(n=Qs(n)),UT(a,t,n,l)),!r&&t.caseViewMode===Vs.PERFORM_MODE){const t=((e,t)=>{const n=iy(e);return VE(n,t)})(e,o),n={data:{[d]:{headers:u}},context:t};a.push(ZC(DC,n)),a.push(EI(((e,t=!1,n=!1)=>{const s=$p.getNextActionMgrId();return{ID:yC.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:yC.getPropertyValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:s}}})(t)))}}else{RT(a,s);let e=!1;const o=iy(n),i=bE(o),u=GE(o);if(u&&i?.items?.[u]?.key===c?.actionInPayload?.caseID&&(e=!0),r){const e=KE(n)[0];s.target=e,s.context=_m(e,Vs.WORKAREA,n),s.containerItemID=s.context,a.push(ZC(MC,{...s,...t}));const r=s.containerItemID;a.push(ZC(WC,{parentContainerTarget:e,containerItemID:r}))}e&&UT(a,t,n,l)}},VT=async(e,t,n,s,a,r,o)=>{const i=r?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(RT(n,{...t,skipReleaseLockRequest:!0}),e)){const s=`${t?.containerItemID.includes("root")?Vs.APP.ROOT:Vs.APP.APP}/${PE.PRIMARY}`,a=_m(s,PE.PRIMARY),r={insKey:e.ID,className:e.content.classID,context:a,acTargetName:Vs.PRIMARY,isChild:!0},o={type:pa,payload:{...r}};n.push(o)}})(e.data[i].parentCaseInfo,t,a);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=iy(t?.context),s=xE(n,t?.context)?.parentContext,a=iy(s);t?.isProcessAction&&UE(a,c)&&Dy(s,e?.data[i]?.lastUpdateTime)}n.resourceType=PT.CASE,n.directUrlUpdation=!0,t.isProcessAction||await vT(a,{translatedDXAPIResponse:s,actionInPayload:t},n,r,o)},jT=async(e,t,n,s,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===Vs.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:r}=t;XE(iy(r))||fC.setIn(e.data,["context_data","caseViewMode"],e.caseViewMode);const o=aI.getPropertiesToReplace(r);a.push(ZC(kC,{...e,...s,propertiesToReplace:o})),fC.setIn(e,"acName",s.target),await Im(n,e),((e,t,n)=>{const{containerItemID:s}=t,a=qE(s),{data:r,caseViewMode:o}=n;if(a&&Qf(s)){const n=Qs(a),i={data:r,caseViewMode:o,context:n};fC.setIn(i.data,["context_data","caseViewMode"],o),e.push({type:hr,payload:{context:n}});const c=aI.getPropertiesToReplace(s);e.push(ZC(DC,i,{propertiesToReplace:c})),t.shouldUpdateCaseActionsInParentContext=!0,t.__deferCaseActionsPayload=t}})(a,t,e)},kT=async(e,t,n,s,a,r,o,i,c,l={})=>{const{isCaseWideAction:u,isInCreateStage:d,containerItemID:p}=e,g=Ws(e.context),h=Hf(a,c),f=c?Yp(a):Wf(a),m=d&&!h&&!u,I=KE(g)[0],E=I?GE(I):g,y=Uf(p),A=qE(p),C=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:y});m&&!wT(e.context)?await VT(i,e,t,a,r,c,l):MT(e.context,E)?await FT(E,t,g,e,r,n,s,a,o,c):!u&&!c||MT(e.context,E)?await jT(t,e,a,C,r):(RT(r,e),((e,t,n)=>{const{containerItemID:s,caseID:a}=t;if(s&&/^app\/preview_[0-9]*/g.test(s)){const{caseClassName:t}=n,r=Ws(s),o=qE(r);e.push(ZC(OC,{containerItemID:r,context:o,container:PE.PREVIEW,containerName:PE.PREVIEW,caseId:a,viewName:Fs.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(r,e,{caseClassName:f}))},BT=(e,t,n)=>{const{isModalAction:s,isCaseWideAction:a,caseID:r}=t,o=MT(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;Fh({caseID:r,isModalAction:s,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:i,stageID:c})},$T=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[Vs.ERROR_FIELD_IN_PAGE]=e[Vs.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[Vs.ERROR_FIELD_IN_PAGE].slice(1),s=e[Vs.ERROR_IN_PAGE_IDENTIFIER],a=s.startsWith(".")?s.slice(1):s;if(a){let r=t?`caseInfo.content.${t}`:"caseInfo.content";r=Vs.getProperty(r.replace(/\(/g,"[").replace(/\)/g,"]"));const o=mu(a,r,Vs.PROPERTY),i={type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};hu.mutateField(n,r,o[o.length-1],{messages:[i],type:Fs.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:s})}}))},GT=e=>{const t=ZA("app")?.pyPortal?.pyPrimaryNavPages,n=Array.isArray(t)?t[0]:null;return n?(km.clearChangedProperties(e),[{type:na,payload:{className:n.pyClassName,containerName:Vs.PRIMARY,context:Vs.APP.APP,pageReference:"pyPortal",viewName:n.pyRuleName,skipSemanticUrl:""}}]):[]},WT=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Vs.MODAL:t||Wp.getTargetViewContainerName(Mr)},HT=e=>e?.uiResources?.root?.config?.name===Ls.getDefaultQualifiedName("pzCreateDetails")||!1,qT=(e,t)=>{const n=HT(e),{skipBrowserSemanticUrlUpdate:s=!1}=t;fC.setIn(e,["directUrlUpdation"],!n&&!s)},zT=e=>e.confirmationNote?Vs.REVIEW_MODE:Vs.PERFORM_MODE,YT=(e,t)=>{let n;return n=!e.renderInline&&!Vy.getDefaultCasePage()&&HT(t),n},KT=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Vs.MODAL:t||Wp.getTargetViewContainerName(Fr)},QT=(e,t)=>{const{class:n,context:s,viewType:a=pm.PAGE}=e,{removeActionPayload:r}=t,o=e?.pageName?e?.pageName:Vy.getDefaultCasePage();return Kl(hp.createCase(n,{...e,pageName:o,viewType:a,context:s,retrieveActionViewForNewObject:!0})).pipe(hg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:r}))),Og("Error occurred during ajax call at createObject Epic : ",s))},JT="CREATE_EXTERNAL_CASE",XT=e=>{let t=0,n=[],s=!1;return e.pipe(Tg(JT),Rg(100),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{context:n}=e,a=KT(e),r=jr(a,n);return s=!1,Kl(AT(r,{loadingContext:n})).pipe(fg((({continueExecution:n,removeActionPayload:a,dirtyCheckPerformed:r})=>n?(s=r,QT(e,{removeActionPayload:a})):($p.rejectActionByID(t),Dg))))})),fg((async e=>{if(e&&e.type===Ta)return e.payload.context=Ny(),n.push(Cm(e)),n;const{actionInPayload:a,response:r,headers:o,removeActionPayload:i}=e,c=YT(a,r);fC.setIn(r.data,Vs.getProperty(Vs.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=KT({...a,isInCreateStage:c}),u=jr(l,a.context),d=_m(u,l,a.context);if(!s&&!Vf(l)&&XE(u)){const{continueExecution:e}=await Dm(u,{loadingContext:a.context});if(!e)return $p.rejectActionByID(t),n}const p=mf(r);let g=mS(Or,{caseClassName:Wf(p)});g=g.replace(/{.+?}/,String(Gf(qf(p)))),p.semanticURL=g,qT(p,a);const h={acName:u,context:d};await Im(p,a,h);const f={target:u,context:d,headers:o,semanticURL:g,caseViewMode:zT(p),containerItemID:d,isInCreateStage:c,isMinimizable:c,assignmentContext:fC.getIn(p,ET),nextAssignmentInfo:fC.getIn(p,IT),resourceType:Fs.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo,isExternalCaseCreationFlow:!0};Jf(f,p);const m=mm(p,f),I=Sm(u,m);return Nm(I)&&Yf(n,{removeActionPayload:i,target:u}),n.push(I),xm(n),n})),hg((()=>(Lm(n),Zf(n,t),n=[],n))))},{RESOURCE_TYPES:ZT}=Fs,eD=(e,t={})=>{const{viewType:n,containerName:s,targetContainerName:a,isChild:r}=e,o=$f(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?pm.PAGE:n||(!Ff(s)&&!Ff(a)||r?pm.PAGE:pm.FORM)},tD=(e,t,n,s,a)=>{if(Yf(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=GE(t);let s=null;return n&&(s=xE(t,n)),s?.key===e&&ZE(t)})(s.key,n))s.context=zE(n),s.containerItemID=s.context,e.push(ZC(KC,s));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=iy(a.context);s.target=t,s.context=a.context,s.containerItemID=a.context,e.push(ZC(KC,s))}else{const t=iy(s.context),n=VE(t,s.key);n?(s.target=t,s.context=n,s.containerItemID=n,e.push(ZC(KC,s))):e.push(ZC(MC,s))}},nD=(e,t,n,s,a,r,o)=>{XE(t)&&ey(t)?((e,t,n,s,a)=>{eD(e,t)===pm.FORM?(n.caseViewMode=s||Vs.PERFORM_MODE,a.push(ZC(kC,n))):a.push(ZC(KC,n))})(s,a,e,r,n):tD(n,o,t,e,s)},sD=(e,t,n)=>{if(!(e&&t&&(e=>{const{inlineViewType:t,caseTypeID:n,RedirectURL:s}=e;if(t&&t.toLowerCase().includes("remote"))return!1;const a=Bs.getRemoteCaseClassBySourceClass(n)??n;return!Bs.isRemoteCase(a)&&!!s})(t)&&t.RedirectURL))return!1;try{const e=new URL(t.RedirectURL);if("https:"===e.protocol)return globalThis.open(e.href,"_blank","noopener,noreferrer"),$p.resolveActionByID(n),!0}catch{}return!1},aD=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:s,context:a,isGetNextWork:r,doNotMergeMessagesForStatusCode:o})=>{const i=aI.appendExcludeQueryParamToUrl(e);return rd(i,{method:t,headers:{"if-match":n&&n.etag,...n,...s&&{...Yu.addDebugHeaders(s)}}},a,{doNotMergeHttpMessagesForStatusCode:r?o:""})},rD=(e,t)=>{const n=eD(e),{headers:s,context:a,assignmentID:r,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e;let g,h;({restApi:g,reqType:h}=o?ES("getNextWork",{viewType:n}):c?ES("openStage",{caseID:u,stageID:l}):ES(Ka,{assignmentID:r,viewType:n}));const{removeActionPayload:f}=t,m=Vy.getDefaultCasePage();let I="",E=e.pageName;e.isTraditionalUICase&&(E=Ls.getDefaultQualifiedName("pyDetails")),I=m?`${g}?viewType=${n}&pageName=${m}`:E?`${g}?viewType=${n}&pageName=${E}`:`${g}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{I+=`&${e}=${d[e]}`}));const y=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=hm(t,e.remoteClassName)),t})(e);return Kl(aD({restUrl:I,reqType:h,requestHeaders:y,debugInfo:i,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"})).pipe(hg((e=>{if(Vy.isCoexistenceAppOfType(Vs.APP_TYPE.UIKIT)&&!p){return oI(e.data.data.caseInfo)?e:(I=E?I.replaceAll(E,Ls.getDefaultQualifiedName("pyDetails")):I,Vy.setDefaultCasePage(Ls.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I})}return e})),fg((e=>e?.isReloadWithDifferentViewTypeRequired?aD({restUrl:I,reqType:h,requestHeaders:y,debugInfo:i,context:a,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"}):Eg(e))),hg((t=>{const{key:a,flowName:o}=ym(r);return Us.analyseResponse(t),{response:{...t.data,key:a,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:hm({...s,...t.headers})}})),Og("Error occurred during ajax call at openAssignment Epic : ",a))},{RESOURCE_TYPES:oD}=Fs,iD=e=>{const t="Browser"===Vy.getRuntime();let n=0,s=[];const a=[];let r=!1,o=!1;return e.pipe(Tg(ng),hg((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),fg((e=>{r=e.isGetNextWork;const{context:t}=e;let s;s=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?pm.FORM:eD(e),e.viewType=s;const a=Lf(Ka,e),i=jr(a,t),{activate:c,activateContainerActionPayload:l}=Om(oD.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Eg({type:Fa,activateContainerActionPayload:l,actionInPayload:e});const u=GE(i);let d;return d=l?.isParallelAssignment?Promise.resolve({continueExecution:!0,removeActionPayload:{}}):u?Dm(i,{loadingContext:t}):Promise.resolve({continueExecution:!0,removeActionPayload:{}}),Kl(d).pipe(fg((({continueExecution:t,removeActionPayload:s})=>t?(o=em(e.className),e.isTraditionalUICase=o,Vy.isWSSPortal()&&(e.headers={...e.headers,[Vs.X_ORIGIN_CHANNEL]:"WSS"}),rD(e,{removeActionPayload:s})):($p.rejectActionByID(n),Dg))))})),fg((async e=>{if(e?.type===Ta){if(r){const{payload:t}=e,{err:n}=t,s=n.response.status;a.push({status:Number(s)})}return s.push(Cm(e)),s}const{type:t,actionInPayload:i,response:c,viewType:l,headers:u,removeActionPayload:d,activateContainerActionPayload:p}=e;if("openStage"===c?.redirectInfo?.jsAction){const e=c?.redirectInfo?.stageID,t=ng,n=c?.data?.caseInfo?.ID;i.isOpenStage=!0,i.stageID=e,i.jsActionQueryParams=c?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...i,caseID:n,headers:u}};return s.push(a),s}if(sD(r,c?.data?.caseInfo,n))return s;const{context:g,caseViewMode:h,debugInfo:f}=i,m=c?.data?.caseInfo?.assignments?.find((e=>e.ID===i.assignmentID));i.caseViewMode=((e,t)=>e&&"false"===String(e.canPerform)?Vs.REVIEW_MODE:t??Vs.PERFORM_MODE)(m,h);const I=c?.data?.caseInfo?.caseTypeID;o=em(I),i.isTraditionalUICase=o;let E=((e,t)=>{const n=$f(e);let s;s=!Vy.getDefaultCasePage()&&oI(n);const{isChild:a,containerName:r,isTraditionalUICase:o}=t,i=a&&s,c=s&&!t.isActionFromToDoList;return!i&&!c||o||t.renderInline?r||Lf(Ka,t):Vs.MODAL})(c,i);o&&(E=i.containerName??E);const y=jr(E,g);if(t===Fa)return await(async(e,t,n)=>{const{semanticURL:s,containerItemID:a,isParallelAssignment:r,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=qE(a);await Im({directUrlUpdation:!l,semanticURL:s},c,{acName:i,target:i,context:u}),e.push(ZC(WC,{containerItemID:a,target:i,isParallelAssignment:r,insKey:o,resourceType:ZT.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(s,p,{actionInPayload:i,target:y}),s;const A=c?.data?.caseInfo?.content,C=c?.data?.caseInfo?.ID,S=c?.uiResources?.root?.config?.name,_=c?.uiResources?.root?.config?.context;A&&!A[Ls.getDefaultQualifiedName("pyViewName")]&&S&&"page"!==i.viewType&&(fC.setIn(A,Ls.getDefaultQualifiedName("pyViewName"),S),fC.setIn(A,Ls.getDefaultQualifiedName("pyViewContext"),_));const N=mf(c);((e,t)=>{const n=$f(e),s=qf(e),a=oI(n),{skipBrowserSemanticUrlUpdate:r=!1,viewType:o,isTraditionalUICase:i}=t,c=i&&!tm(),l=o===pm.PAGE&&(!a||c)&&!r,{caseTypeID:u}=n;if(l){const t=mS(Ya,{caseClassName:u}).replace(/{.+?}/,String(Gf(s)));e.semanticURL=t,e.directUrlUpdation=!0}})(N,i);const T=_m(y,E,g),D={...i.debugInfo,debugId:i.debugInfo?.debugId??Yu.getCoreHeadersFromContext(g)?.debugInfo?.[Vs.COREHEADER_APP_DEBUG_ID]};D.debugId&&kp.setComponentCache(C,Yu.addDebugHeaders(D));const P={acName:y,target:y,context:T};await Im(N,i,P);const O={target:y,context:T,containerItemID:T,headers:u,parentContext:Ws(i?.context),isMinimizable:oI(fC.getIn(N,"data.caseInfo")),doDeleteCaseSummary:i.doDeleteCaseSummary,acTertiary:i.acTertiary,resourceType:Fs.ASSIGNMENT,debugInfo:f,shouldUpdateCaseActionsInParentContext:!0,caseID:C};Jf(O,N,{skipFlowNameUpdate:i?.caseViewMode===Vs.REVIEW_MODE});const R=mm(N,O);return i.isProcessAction&&(R.data.isProcessAction=i.isProcessAction),((e,t)=>{e&&(t.data.caseInfo.content.coexistenceAction="openAssignment")})(o,R),aI.setTraditionalGadgetId(R.data),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(i,R),R.caseViewMode=i.caseViewMode,nD(R,y,s,i,c,h,d),((e,t)=>{if(e=Bs.getRemoteCaseClassBySourceClass(e)??e,Bs.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:s,name:a}=Bs.getRemoteCase(e);if(t.headers?.RemoteSystemID||$p.setRemoteCaseHeaderByContext(t,s),Bs.isTraditionalRemoteCase(e)||Bs.getRemoteAppPlatformVersion(s)){t.assignmentID=t.assignments?.[0]?.ID;const s={className:e,name:a,action:Rr,remoteClassName:n};$p.setTraditionalRemoteCaseParams(t,s)}}})(I,R.data.caseInfo),l===pm.FORM&&Qf(R.containerItemID)&&(R.skipMergeAssignmentsAndActions=!1,Mm(R,s,_)),om(N,O),(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:g,assignmentID:i.assignmentID,caseKey:R.key}),s})),hg((()=>{const e=n,t=tm(),r=oI(fC.getIn(s[0]?.payload,"data.caseInfo"));return o&&t&&r?mT.postCreateCaseMessage(s[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,XA,s):XA(s),Zf(s,e,a),s[0]?.payload?.isParallelAssignment&&XA({type:ng,payload:{...s[0].payload,isParallelCall:!0}}),s=[],s})))};const cD=(e,t)=>{const{insKey:n,headers:s,context:a,debugInfo:r,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Vy.getDefaultCasePage(),l=ES(Ya,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),u=aI.appendExcludeQueryParamToUrl(u),Kl(rd(u,{method:d,headers:{...s,...r&&{...Yu.addDebugHeaders(r)}}},a)).pipe(hg((t=>(Us.analyseResponse(t),{response:t.data,actionInPayload:e,headers:hm({...s,...t.headers}),removeActionPayload:i}))),Og("Error occurred during ajax call at openWorkByHandle Epic : ",a))},lD="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:uD}=Fs,dD=async(e,t,n)=>{const s=t?.containerItemID||null,a=s&&KE(s)[0]?GE(KE(s)[0]):s,r=a||s,o=qE(r)||r,i=iy(o)||iy(r),c=o?im(o):void 0,l=a?ZA(a)?.caseInfo?.ID:void 0,u=e?.insKey;if(!(o&&r&&c===Vs.REVIEW_MODE&&a!==s&&l&&u&&l===u))return;let d;try{d=await function(e,t){var n="object"==typeof t;return new Promise((function(s,a){var r=new _l({next:function(e){s(e),r.unsubscribe()},error:a,complete:function(){n?s(t.defaultValue):a(new Hc)}});e.subscribe(r)}))}(cD({...e,context:o,viewType:"none"},{removeActionPayload:void 0}))}catch(e){return}if(!d||kf(d.type))return;const p=mf(d.response),g=[{path:Vs.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],h={...p?.data,caseInfo:{...p?.data?.caseInfo??{},assignments:p?.data?.caseInfo?.assignments??[]}};n.push(ZC(KC,{containerItemID:r,target:i,context:o,data:h,isArrayDeepMerge:!0,propertiesToReplace:g}))},pD=async(e,t,n)=>{const{actionInPayload:s,activateContainerActionPayload:a,type:r,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=s,p=Lf(Ya,s),g=jr(p,l);if(jf(r))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:s},actionInPayload:a,actionInPayload:{context:r,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Lf(Ya,a),l=jr(c,r),u=qE(s);await Im({directUrlUpdation:!o,semanticURL:n},a,{acName:l,containerName:c,target:l,context:u}),e.push(ZC(WC,{containerItemID:s,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:s}),await dD(s,a,t);else{const a=_m(g,p,l,{buildNew:!0}),r=mf(o),h=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:s}=t,a=qf(e),r=n?s:Wf(e);let o=mS(Ya,{caseClassName:r},{id:t?.insKey});return o=o?.replace("{workID}",String(Gf(a)))?.replace("{id}",t?.insKey),o})(r,s);r.semanticURL=h,r.directUrlUpdation=!u;const f={acName:g,context:a};await Im(r,s,f);const m=mm(r,{target:g,context:a,containerItemID:a,semanticURL:h,headers:c,debugInfo:d});m.caseViewMode=Vs.REVIEW_MODE,m.resourceType=uD.CASE,n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle",m.data.caseID=m.data.caseInfo.ID),aI.setTraditionalGadgetId(m.data),Jf(m,r,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=im(e?.actionInPayload?.context);const I=Sm(g,m);i.containerItemID&&Nm(I)&&t.push(ZC(qC,{containerItemID:i.containerItemID,target:g})),t.push(I),om(r,m)}const h=s.insKey;jh({caseKey:h,actionInContext:l})},gD=e=>{let t=0,n=[],s=!1;return e.pipe(Tg(lD),hg((e=>(({actionMgrID:t,isAutoRedirection:s=!1}=e.payload),e.payload))),fg((e=>{const{context:n,isChild:a,viewType:r}=e,o=Lf(Ya,e),i=jr(o,n);return Kl("none"!==r?Dm(i,{loadingContext:n}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0})).pipe(fg((({continueExecution:n,removeActionPayload:o})=>{if(!n)return $p.rejectActionByID(t),Dg;let{activate:c,activateContainerActionPayload:l}=Om(uD.CASE,i,e);const u=XE(i);if(!c&&!u&&e.insKey&&i){const t=((e,t)=>{const n=VE(e,t);if(!n)return null;const s=xE(e,n);if(s?.resourceType!==uD.ASSIGNMENT||"string"!=typeof s?.context||""===s.context)return null;const a="string"==typeof s.semanticURL?s.semanticURL.trim():"";return a?{target:e,containerItemID:n,semanticURL:a,insKey:t}:null})(i,e.insKey);t&&(c=!0,l=t)}return c&&!a&&"none"!==r?(Vm(l),Eg({type:Fa,activateContainerActionPayload:l,actionInPayload:e})):(s&&kp.setComponentCache("redirectionInProgress",!0),cD(e,{removeActionPayload:o}))})))})),fg((async e=>{if(e&&kf(e.type))return n.push(Cm(e)),n;const t=ZA(e?.actionInPayload?.context),s=em(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=mf(e?.response),a={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:hr,payload:{context:a.context,doDeleteConfirmationDetails:!1}}),s&&a.data.caseInfo?.content&&(a.data.caseInfo.content.coexistenceAction="openWorkByHandle",a.data.caseID=a.data.caseInfo.ID),aI.setTraditionalGadgetId(a.data),n.push(ZC(DC,a));const r=iy(e?.actionInPayload?.context),o=Uf(e?.actionInPayload?.context),i=Object.freeze({target:r,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(Qf(e?.actionInPayload?.context)){const t=mm(e?.response,{...i});Mm({...t,isArrayDeepMerge:!0},n)}e.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,e.actionInPayload.containerItemID=e?.actionInPayload?.context,e.actionInPayload.caseID=e?.actionInPayload?.insKey,om(t,e?.actionInPayload)}}else await pD(e,n,s);return n})),hg((()=>(s&&kp.setComponentCache("redirectionInProgress",!1),XA(n),Zf(n,t),n=[],n))))},hD="FINISH_ASSIGNMENT",fD=(e,t)=>{const{assignmentID:n,actionID:s,caseID:a,context:r,additionalHeaders:o={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:s,isCaseWideAction:a}=e;return t&&s&&!a?pm.PAGE:n||pm.FORM})(e),p=(e=>{const{isCaseWideAction:t,caseTypeID:n}=e;return aI.shouldUseUnifiedHandling()?t||aI.isObjectCaseType(n)?sr:Ja:t?sr:Ja})(e),g={assignmentID:n,actionID:s,caseID:a,viewType:d};let{restApi:h}=ES(p,g);const{reqType:f}=ES(p,g);d&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${d}`:`${h}?viewType=${d}`),i&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${i}`:`${h}?outcome=${i}`),h=mI(c,h),h=aI.appendExcludeQueryParamToUrl(h),e.viewType=d;const{content:m}=fm(r),I=u.value.data[r]?.caseInfo?.headers||{},{etag:E}=I,y={"if-match":E,...l,...o};return Kl(rd(h,{method:f,body:m,headers:y},r)).pipe(hg((t=>{const{data:n,headers:s}=t;return Us.analyseResponse(n),{response:n,actionInPayload:e,headers:hm({...y,...s})}})),Og("Error occurred during ajax call at finishAssignment Epic : ",r))},mD=e=>{vu.publish(Vs.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},ID=e=>{vu.publish(Vs.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:ED}=Fs,yD=e=>{const t=JA()?.getState()?.data,n=t?Object.keys(t).find((e=>e.includes(Vs.WORKAREA))):void 0;return/^app\/primary(_\d+)?$/.test(e)&&!n},AD=(e,t)=>{let n=0,s=[],a={},r="",o={},i=!1,c=!1;return e.pipe(Tg(hD),fg((e=>{let l,u;const d=Vy.isCoexistenceAppOfType(Vs.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),r=e.payload.context,Cu({context:r,stateObj:ZA(r),clearContextMessages:!0}),!Zm(r)||Du(r)){const t={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,t),Gh.handleDeferredActionCompletion(e.payload.context).then((()=>{ID({errorType:Fs.ERROR_TYPE.CLIENT})})),Eg([])}return Eg(e.payload).pipe(fg((e=>{kp.setComponentCache("lastActionID",e?.actionID),OT(s,e);const n={...e};return fD(n,{state$:t})})),fg((async e=>{if(e&&e.type===Ta){II(e);const t=Cm(e);return s.push(t),s}bh.clearContextedCache(r);const{headers:t,actionInPayload:p,response:g}=e,{containerItemID:h,context:f=qE(h),isModalAction:m,isInCreateStage:I}=p;i=p.isCaseWideAction,c=p.isProcessAction;const E=iy(h);p.target=E;const y=Uf(h),A=Object.freeze({target:p.target,containerItemID:h,context:f,containerName:y});fC.setIn(g.data,Vs.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),fC.setIn(g.data,Vs.CASE_INFO_IS_LOCAL_ACTION,!1),g?.uiResources?.root?.config?.name&&"page"!==p.viewType&&fC.setIn(g.data,Vs.CASE_INFO.VIEW_NAME,g?.uiResources?.root?.config?.name),mD({submitResponse:g});let C=mf(g,{[Fs.STOPMERGEACTIONS]:!g.nextAssignmentInfo});const S=Wf(C),_=Ws(p.context),N=KE(_)[0]?GE(KE(_)[0]):_,T=Hf(C),D=I&&!T;!m||I||MT(p.context,N)||(C=vm(C,ZA(h)));const P=mm(C,{headers:t,actionMgrID:n,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:yD(N||"")});Xf(P.data,p),P.caseClassName=S,P.resourceType=ED.ASSIGNMENT,P.headers=t;const O=C?.uiResources?.root;if("AutoClose"===O?.type){const e=JA()?.getState()?.data?.[A.context]?.caseInfo,{ID:t,name:n,content:a}=e;return s=await(async e=>{const{target:t,containerItemID:n,context:s}=e,a=zE("app/primary"),r=xE(t,n)?.parentContext,o=Boolean(t)&&ZE(t),i=ZE("app/primary");if(o&&r!==Vs.APP.APP){if(await cy(n,{skipDirtyCheck:!0}),0===ME(t).length)return GT(s)}else{if(!a||!i||r)return GT(s);await cy(a,{skipDirtyCheck:!0,eventName:"Dismiss case"})}return[]})(p),(e=>{vu.publish(Vs.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,e)})({ID:t,caseName:n,content:a,status:$f(C).status}),s}let R,b;const v=C?.data?.caseInfo?.assignments?.some((e=>e.ID===p.assignmentID)),x=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(C,p),w=((e,t,n,s,a)=>{let r;const o=iy(t);r=ZE(o)?VE(o,n.data?.caseInfo?.ID):GE(o);let i=!0;if(e&&r){const e=yC.getPropertyValue(Fs.CASE_INFO.ASSIGNMENTACTION_ID,"",r),t=yC.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,"",r);if(e){const s=n?.data?.caseInfo?.assignments?.find((e=>e.ID===t)),a=s?.actions;a&&!a.some((t=>t?.ID===e))&&(i=!1)}}return s&&e&&i&&sC(null,Vs.CASE_VIEW_MODE_PROP,r)===Vs.PERFORM_MODE&&a})(v,N,C,m,x),M=p?.actionID===Fs.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(C?.data?.nextAssignmentInfo&&!M)P.caseViewMode=Vs.PERFORM_MODE,R=qf(C),b=!0;else if(w&&!M)C?.confirmationNote&&C?.uiResources?.root?.config?.name===Vs.PY_CONFIRM?P.caseViewMode=Vs.REVIEW_MODE:P.caseViewMode=Vs.PERFORM_MODE,R=qf(C),P.flowName=" ",P.deleteAssignmentSpecificResources=!1,b=!1;else{P.caseViewMode=Vs.REVIEW_MODE;const e=XE(iy(N)),t=(e=>{if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1)if(n[e].ID===t)return"resolution"===n[e].transitionType}return!1})(C?.data?.caseInfo);R=!C?.confirmationNote||!t&&C?.uiResources?.root?.config?.name!==Vs.PY_CONFIRM||e?"":qf(C),b=!1}const L=qf(C);Jf(P,C,{skipFlowNameUpdate:P?.caseViewMode===Vs.REVIEW_MODE||w});const U=mS("createWork",{caseClassName:S}).replace(/{.+?}/,String(Gf(L)));if(C.semanticURL=U,P.semanticURL=U,m?(await kT(p,P,b,R,C,s,e,g,!1,o),D&&(a=LT(p))):I&&d&&!T?(Vy.setDefaultCasePage(Vs.PY_DETAILS),await(async(e,t,n)=>{const s={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:PE.PRIMARY,targetContainerName:PE.PRIMARY,viewType:pm.PAGE,isLastStepInCreateStage:!0,context:n},a={type:Ia,payload:{...s}};t.push(a)})(g,s,Ws(f))):await jT(P,p,C,A,s),N?.includes(Vs.ACTIONAREA)&&f===N){CE(f);const e=ZA(N);s=[{type:ya,payload:{actionID:e.caseInfo.activeActionID,context:N,containerItemID:h,target:iy(N),actionMgrID:$p.getNextActionMgrId(),containerName:Vs.ACTIONAREA,localActionType:Fs.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:e.caseInfo.ID}}]}if(am(e,s),Gh.handleDeferredActionCompletion(r).catch((()=>{})),BT(P,p,N),!C?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:s,actionID:a}=t;return{isCaseWideAction:n,caseID:qf(e),assignmentID:n?null:s,actionID:a||null}})(C,p);Vh({...e,containerItemID:h})}return xT(s,{transientItemID:h,target:E,isModalAction:m}),l=C,u=p,s})),hg((()=>{const t=s.find((e=>e.type===Ta));if(t?(Gh.handleDeferredActionCompletion(r).then((()=>{ID({errorType:Fs.ERROR_TYPE.SERVER})})).catch((()=>{})),$T(t),$p.rejectActionByID(n)):$p.resolveActionByID(n,a),o?.caseId&&(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})(o),Lm(s),rm()&&l&&u&&om(l,u.__deferCaseActionsPayload??u),!t&&(i||c)){const t=e.payload.caseID;kh(t),(e=>{vu.publish(Vs.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0})}return s=[],a={},o={},s})))})))},CD="CANCEL_ASSIGNMENT",SD=e=>{const t={},{routeKey:n,isModalAction:s,caseID:a,context:r,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=ES(i,{ID:a,caseID:a,viewType:pm.PAGE}),u=kp.getComponentCache(a),d=u&&"object"==typeof u?u:{},p=aI.appendExcludeQueryParamToUrl(c);return Kl(rd(p,{method:l,headers:{...t,...d}},r,{includeRemoteSystemIdIfPresent:!!o})).pipe(hg((t=>(kp.resetComponentCache(a),s?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:hm(t.headers)}))),Og(": Error occurred during ajax call at release lock request : ",r))},_D=(e,t)=>{const{isModalAction:n}=t;return SD({routeKey:"cancelAssignment",isModalAction:n,...e})},ND=e=>{let t=0,n=[];return e.pipe(Tg(CD),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{isModalAction:n}=e;e.context||(e.context=qE(e.containerItemID));const{context:s}=e,a=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?PE.MODAL:Uf(n)})(e),r=jr(a,s);return Kl(Dm(r,{loadingContext:s})).pipe(fg((({continueExecution:s})=>s?(e.RemoteSystemID=Bs.getRemoteHeaderByContext(e.context)??void 0,Kl(_D(e,{isModalAction:n}))):($p.rejectActionByID(t),Dg))))})),fg((e=>{if(e&&e.type===Ta)return n.push(Cm(e)),Kl([n]);const{actionInPayload:s,response:a}=e,{containerItemID:r,isModalAction:o,isInCreateStage:i}=s;a?.data.caseInfo&&(a.data.caseInfo.availableProcesses=a.data.caseInfo.availableProcesses??[]);const c=iy(r),l=qE(r),u={target:o?`${Vs.APP.APP}/${Vs.MODAL}`:c,containerItemID:r,caseViewMode:o?Vs.PERFORM_MODE:Vs.REVIEW_MODE,context:l,actionMgrID:t,key:qf(a),skipReleaseLockRequest:!1};return i&&n.push(ZC(kC,u)),!o&&Qf(r)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:s,referencedUsers:a,response:r}=t,o=Ws(n),i=qE(o);let c=!1;const l=r?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);const u={context:i,data:{...r.data,referencedUsers:a,context_data:{caseViewMode:s}}},d=[];c&&d.push({path:Vs.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),d.length>0?e.push(ZC(DC,u,{propertiesToReplace:d})):e.push(ZC(DC,u))})(n,{childContainerItemID:r,caseViewMode:Vs.REVIEW_MODE,referencedUsers:a?.data.referencedUsers,response:a}),u.skipReleaseLockRequest=!0,e.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,om(e?.response,e?.actionInPayload),n.push(ZC(qC,u)),Kl([n])})),hg((()=>(XA(n),Zf(n,t),n=[],n))))},TD="NAVIGATE_TO_STEP",DD=(e,t)=>{const{ID:n,stepID:s,containerItemID:a,context:r=qE(a),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:s,viewType:o?pm.PAGE:pm.FORM},{restApi:l,reqType:u}=ES("navigateToStep",c),{content:d}=fm(r),p=i.value.data[r].caseInfo.headers,g=aI.appendExcludeQueryParamToUrl(l);return Kl(rd(`${g}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},r)).pipe(hg((t=>({response:t.data,actionInPayload:e,headers:hm({...p,...t.headers})}))),Og("Error occurred during ajax call at navigateToStep Epic : ",r))},{RESOURCE_TYPES:PD}=Fs,OD=(e,t)=>{let n=0,s=[];return e.pipe(Tg(TD),gg((e=>{let a,r;return({actionMgrID:n}=e.payload),Eg(e.payload).pipe(fg((e=>(Tu(e.context),DD(e,{state$:t})))),fg((async e=>{if(e&&kf(e.type))return s.push(Cm(e)),s;const{actionInPayload:t,response:n,headers:o}=e,{containerItemID:i,context:c=qE(i),isModalAction:l}=t;bh.clearContextedCache(t.context);const u=iy(i),d=Uf(i),p=Object.freeze({target:u,containerItemID:i,context:c,containerName:d}),g=n?.data?.caseInfo?.content,h=n?.uiResources?.root?.config?.name,f=n?.uiResources?.root?.config?.context;g&&!g[Ls.getDefaultQualifiedName("pyViewName")]&&h&&"page"!==t.viewType&&(fC.setIn(g,Ls.getDefaultQualifiedName("pyViewName"),h),fC.setIn(g,Ls.getDefaultQualifiedName("pyViewContext"),f)),a=mf(n);const m={acName:u,...p};await Im(a,t,m),r=mm(a,{...p,headers:o}),n?.nextAssignmentInfo||(r.caseViewMode=Vs.REVIEW_MODE),am(e,s),r.doDeleteCaseSummary=t.doDeleteCaseSummary,r.resourceType=PD.ASSIGNMENT,r.caseID=qf(a),Jf(r,a),Xf(r.data,t);const I=a.data?.caseInfo?.stages,E=a.data?.caseInfo?.stageID;if(Fh({caseID:qf(a),isModalAction:l,stages:I,stageID:E}),Qf(i)){const e=aI.getPropertiesToReplace(i);Mm(r,s,"",{propertiesToReplace:e})}return s.push(ZC(kC,r)),r.shouldUpdateCaseActionsInParentContext=!0,s})),hg((()=>(XA(s),a&&r&&om(a,r),Zf(s,n),s=[],s))))})))},RD=e=>{const{caseID:t,context:n}=e,{restApi:s,reqType:a}=ES(Za,{ID:t});return Kl(rd(s,{method:a},n)).pipe(hg((t=>(Us.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:hm(t.headers)}))),Og(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},bD=e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},vD=(e,t)=>{let n,s=0,a=[];return e.pipe(Tg(sg),hg((e=>(({actionMgrID:s,caseType:n}=e.payload),e.payload))),fg((e=>e.ignoreCaseDeletion?Eg({actionInPayload:e}):RD(e))),fg((async e=>{if(e&&kf(e.type)){const{payload:t}=e,n=Cm({...e,...t,actionMgrID:s});return a.push(n),a}const{actionInPayload:n}=e,{context:r,isModalAction:o}=n,i=o?PE.MODAL:PE.PRIMARY,c=jr(i,r);if(!o&&c){const e={acName:c,target:c,context:r},s=t.value.containers[c],{semanticURL:a}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:s}=e;if(s)return e}return{semanticURL:""}})(s);await Im({directUrlUpdation:!0,semanticURL:a},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:Vs.PRIMARY,isChild:!0},t={type:pa,payload:{...e}};a.push(t)}const l={target:c,containerItemID:r,context:r,caseDeleted:!0};return a.push(ZC(qC,l)),a})),hg((()=>(XA(a),Zf(a,s)===Vs.PROMISE_VALUE.RESOLVE&&bD({caseType:n}),a=[],a))))};function xD(e,t){return sl(t)?fg(e,t,1):fg(e,1)}const wD=(e,t)=>{const{assignmentID:n,actionID:s,context:a}=e,{restApi:r,reqType:o}=ES("save",{assignmentID:n,actionID:s}),{content:i}=fm(a),c=t.value.data[a]?.caseInfo?.headers,l=aI.appendExcludeQueryParamToUrl(r);return Kl(rd(l,{method:o,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(hg((t=>({response:t.data,actionInPayload:e,headers:hm(t.headers)}))),Og(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))},MD=(e,t=!1)=>{const{action:n,state$:s,actionMgrID:a}=e,r=!0===n.payload.autosave;let o=[];return Eg(n.payload).pipe(fg((e=>wD(e,s))),xD((e=>{if(e&&kf(e.type))return Eg(e);const{containerItemID:t}=e&&e.actionInPayload,s=Ws(t),a=iy(s),i=bE(a),c=KE(s)[0];let l=c?GE(c):s;!XE(iy(l))&&({containerItemID:l}=vE(l,e.actionInPayload.caseID,c));const u=GE(a);n.payload.canUpdateAvailableActions&&ff(e.response);const d=Bs.getRemoteHeaderByContext(e.actionInPayload.context),p={...e.actionInPayload,RemoteSystemID:null===d?void 0:d};if(l&&o.push((t=>ZC(DC,{context:t,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}}))(l)),i?.items?.[u]?.key===e?.actionInPayload?.caseID){const n={context:s,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},a=aI.getPropertiesToReplace(t);o.push(ZC(DC,n,{propertiesToReplace:a}))}return r||o.push(ZC(kC,{context:t})),am(e,o),SD(p)})),fg((async n=>{if(n&&kf(n.type)){const{payload:t}=n,s=Cm({...n,...t,actionMgrID:a});o.push(s);const r=e.action.payload.modalLoadingContainer;if(r){const e=r.context,{context_data:t}=ZA(e)||{};t?.isLoading&&cy(e)}return o}const{actionInPayload:s,response:i}=n,{context:c,containerName:l}=s,u={target:jr(l,c),containerItemID:c,context:c};return s.shouldUpdateCaseActionsInParentContext=!0,om(i,s),t||r||o.push(ZC(qC,u)),o})),hg((()=>(XA(o),Zf(o,a),r||(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e)})({context:n.payload.context,assignmentID:n.payload.assignmentID}),t||(o=[]),Gh.isDeferredActionInProgress(n.payload.context)&&Gh.handleDeferredActionCompletion(n.payload.context),o))))},LD=(e,t)=>{let n,s=0;return e.pipe(Tg(ag),gg((e=>{const{saveOnly:a}=e.payload;({actionMgrID:s,caseType:n}=e.payload);return MD({action:e,state$:t,actionMgrID:s,caseType:n},a)})))},UD=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",vu.unsubscribe(Vs.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,s="expressLocalActionSubmit",vu.subscribe(Vs.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,s)}var n,s},{LOCAL_ACTION_TYPE:FD}=Vs,{RESOURCE_TYPES:VD}=Fs,jD=(e,t)=>{const{actionID:n,assignmentID:s,caseID:a,context:r,openActionType:o,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,u=l?tr:(e=>{const t=e.localActionType?.toLowerCase();return t===FD.CASE_WIDE||t===FD.EXPRESS||t&&e.isPromotedAction?nr:er})(e),d=pm.FORM,{reqType:p}=ES(u,{caseID:a,ID:s,actionID:n,viewType:d});let{restApi:g}=ES(u,{caseID:a,ID:s,actionID:n,viewType:d});e.actionType=u===nr?Vs.CASE:Vs.ASSIGNMENT,g&&!g.includes("viewType=")&&(g=g.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),g=aI.appendExcludeQueryParamToUrl(g);const h=i?.context??r;return Kl(rd(g,{method:p,headers:c},h)).pipe(hg((t=>({response:t.data,actionInPayload:e,headers:hm(t.headers,"",e.headers)}))),Og(`: Error occurred during ajax call at ${o} Epic : `,h))},kD=(e,t)=>{const{isProcessAction:n}=t,s=n?tr:er;e.openActionType=s;let a;if("modal"===Lf(s,e)){if(!xu.isOnline()||e.isAppOffline)return $p.rejectActionByID(e.actionMgrID),Promise.resolve();a=KE(e.contextName)[0]?KE(e.contextName)[0]:iy(e.contextName);const n=a?GE(a):e.contextName,s=qE(n),r=Lf(e.openActionType,e),o=jr(r,e.context),i=Ks(e.context,Hs(r,e.context));if(XA(MC({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:Vs.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:Vs.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),XA(BC({context:i})),e.modalLoadingContainer={target:o,context:i},!KE(e.contextName)[0])return jD(e,t);if(!e.continueExecution)return jD(e,t);if(!yE(s))return jD(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return Kl([rg(e.saveActionPayload)]).pipe(fg((e=>(e=>{let t,n=0;const s=[],a={value:JA()?.getState()};return Eg(e).pipe(Tg(ag),gg((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!r){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,e),Eg([])}return MD({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:s},!0)})))})(e))),fg((n=>1===n.length&&kf(n[0].type)?Kl(Dm(a,{loadingContext:e.context})).pipe(fg((({continueExecution:n})=>n?jD(e,t):($p.rejectActionByID(e.actionMgrID),Dg)))):jD(e,t))),hg((e=>e)))}return jD(e,t)},BD=async(e,t,{headers:n,actionInPayload:s})=>{const{context:a,actionName:r,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=s,u=mf(e),d=Lf(o,s),p=c?.target??jr(d,a);let g,h,f=!1;!ey(p)||ZE(p)&&!UE(p,e.data.caseInfo.ID)?(h=Hs(d,a),Vf(d)&&(h=Ks(a,h)),g=h,f=!0):(g=ZE(p)?VE(p,e.data.caseInfo.ID):GE(p),h=qE(g));const m={acName:p,target:p,containerName:d,context:h};await Im(u,s,m),(void 0===u?.data?.caseInfo?.content||void 0!==u.data.caseInfo.content&&"object"==typeof u.data.caseInfo.content&&0===Object.keys(u.data.caseInfo.content).length)&&delete u.data?.caseMessages;const I=u.uiResources?.root;let E;E=I?Vs.PERFORM_MODE:Vs.REVIEW_MODE;const y=mm(u,{target:p,context:h,containerItemID:g,caseViewMode:E,doDeleteCaseSummary:i,headers:n,actionName:r,isMinimizable:!1,isInCreateStage:Vf(d),resourceType:VD.ASSIGNMENT,isProcessAction:s.isProcessAction,showProgress:s.showProgress,progressMessage:s.progressMessage,assignmentID:s.assignmentID,actionType:s.actionType,skipMergeAssignmentsAndActions:l});let A;if(I&&Jf(y,u),Vf(d)&&delete y.doDeleteCaseSummary,s.openActionType===ar&&(y.isBulkAction=!0,y.data.caseInfo.actionButtons.main[0].jsAction="async"===s.runningMode?"submitBulkActionAsync":"submitBulkAction",y.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",y.data.caseInfo.cases=s.selectedList,y.data.caseInfo.isAssignment=s.isAssignment),A=f?MC:s.isProcessAction||(e=>e.containerItemID?.includes(Vs.ACTIONAREA)&&e.context?.includes(Vs.ACTIONAREA))(s)?KC:kC,y.data.context_data.isProcessAction=s.isProcessAction,t.push(ZC(A,y)),f||t.push(ZC($C,y)),f){const a=KE(s.contextName),r=VE(a,e.data.caseInfo.ID);if(r){const e={data:{caseInfo:{headers:n}},context:r};t.push(ZC(DC,e))}}g!==GE(p)&&t.push(ZC(WC,{target:p,containerItemID:g})),Qf(g)&&!c?.context&&Mm(y,t),s.isProcessAction&&!em(y.nextAssignmentInfo?.className)&&am({response:u,actionInPayload:{...s,containerItemID:g}},t),y.caseViewMode===Vs.REVIEW_MODE&&t.push(ZC(qC,y)),y.shouldUpdateCaseActionsInParentContext=!0;return fC.getIn(e.data,["caseInfo","isLocalAction"])||om(u,y),t},$D="OPEN_LOCAL_ACTION",GD=(e,t)=>kD(e,t),WD=e=>{let t=0,n=[];return e.pipe(Tg($D),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),_g((()=>!cm(t))),fg((e=>GD(e,{actionMgrID:t}))),fg((async e=>{if(!e)return Dg;if(kf(e.type)){const t=Cm(e);n.push(t);const{context_data:s}=ZA(e.payload.context)||{};return s?.isLoading&&n.push(ZC($C,e.payload)),n}const{actionInPayload:t,headers:s,response:a}=e,{actionID:r}=t;fC.setIn(a,"data.caseInfo.activeActionID",r);return(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,e)})(fC.getIn(a,"data.caseInfo.ID")),fC.setIn(a.data,Vs.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&fC.setIn(a.data,Vs.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await BD(a,n,{headers:s,actionInPayload:t}),UD(t),n})),hg((()=>(XA(n),Zf(n,t),n=[],n))))},HD=e=>{const{actionID:t,context:n,openActionType:s,caseTypeID:a,bulkContextID:r="",bulkContextType:o=""}=e,i=ar,{reqType:c,restApi:l}=ES(i,{caseTypeID:a,actionID:t,bulkContextID:r,bulkContextType:o});return Kl(rd(l,{method:c},n)).pipe(hg((t=>({response:t.data,actionInPayload:e,headers:hm(t.headers)}))),Og(`: Error occurred during ajax call at ${s} Epic : `,n))},qD=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",vu.unsubscribe(Vs.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,s="bulkActionSubmit",vu.subscribe(Vs.PUB_SUB_EVENTS.EVENT_BULKACTION,n,s)}var n,s},zD="OPEN_BULK_ACTION",YD=e=>{let t=0,n=[];return e.pipe(Tg(zD),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>((e,t)=>{const{context:n}=e,{actionMgrID:s}=t;e.openActionType=ar;const a=Lf(ar,e),r=jr(a,n);return Kl(Dm(r,{loadingContext:n})).pipe(fg((({continueExecution:t})=>t?HD(e):($p.rejectActionByID(s),Dg))))})(e,{actionMgrID:t}))),fg((async e=>{if(e&&kf(e.type??"")){const t=Cm(e);return n.push(t),n}const{actionInPayload:t,headers:s,response:a}=e,{actionID:r}=t;return fC.setIn(a,"data.caseInfo.activeActionID",r),await BD(a,n,{headers:s,actionInPayload:t}),qD(t),n})),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t),XA(n),n=[],n))))};var KD=Array.isArray,QD=Object.getPrototypeOf,JD=Object.prototype,XD=Object.keys;function ZD(e){if(1===e.length){var t=e[0];if(KD(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&QD(s)===JD){var n=XD(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var s;return{args:e,keys:null}}var eP=Array.isArray;function tP(e){return hg((function(t){return function(e,t){return eP(t)?e.apply(void 0,Xc([],Jc(t))):e(t)}(e,t)}))}function nP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return sl(Ig(e))?e.pop():void 0}(e),s=ZD(e),a=s.args,r=s.keys,o=new bl((function(e){var t=a.length;if(t)for(var n=new Array(t),s=t,o=t,i=function(t){var i=!1;jl(a[t]).subscribe(Gl(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return s--}),void 0,(function(){s&&i||(o||e.next(r?function(e,t){return e.reduce((function(e,n,s){return e[n]=t[s],e}),{})}(r,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(tP(n)):o}const sP=e=>{const{actionID:t,context:n,cases:s,classID:a,isAssignment:r}=e,{content:o}=fm(n,{nonEmptyAndChangedData:!0});let i=5;try{const e=tf.getSharedState(Ls.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"));e?.find((e=>e[Ls.getDefaultQualifiedName("pyClassName")]===a))?.pyList.split(",").includes(t)&&(i=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const c=s.map((e=>({ID:e}))),l=c.length/i,u=r?"performAssignmentBulkAction":rr,{reqType:d,restApi:p}=ES(u,{actionID:t}),g=[],h=c.length;for(let t=0;t<h;t+=l){const s=c.slice(t,t+l);r?o.assignments=s:o.cases=s,s.length&&g.push(Kl(rd(p,{method:d,body:o},n)).pipe(hg((t=>{const{data:n,headers:s}=t;return{response:n,actionInPayload:e,headers:hm({...s})}})),Og("Error occurred during ajax call at submitbulkaction Epic : ",n)))}return nP(g)},aP=e=>{vu.publish(Vs.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},rP="SUBMIT_BULK_ACTION",oP=e=>{let t,n=0,s=[],a="";return e.pipe(Tg(rP),gg((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:n}=e.payload),!r){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,e),Eg([])}return Eg(e.payload).pipe(fg((e=>(t=e,sP(t)))),fg((e=>{let n=0,r=0;const o=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),r+=Number(t.failureCount),r&&t.results.forEach((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),a=`${n} record(s) updated`,aP({submitResponse:e}),t.target="HYBRID"===Vy.getRenderingMode()?iy(i):`${Vs.APP.APP}/${PE.MODAL}`,s.push(ZC(qC,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),r&&s.push(ZC(HC,{messages:[{type:"error",message:1===r?"1 record failed to update":`${r} records failed to update`,errorDetails:o,showHeader:!1}],context:Ws(c)||c,category:"HTTP",showHeader:!1})),s})),hg((()=>($p.resolveActionByID(n,a),XA(s),s=[],s))))})))},iP=e=>{const{actionID:t,context:n,cases:s}=e,{content:a}=fm(n,{nonEmptyAndChangedData:!0});a.cases=s.map((e=>({ID:e})));const r=rr,{reqType:o,restApi:i}=ES(r,{actionID:t,runningMode:"async"});return Kl(rd(i,{method:o,body:a},n)).pipe(hg((t=>{const{data:n,headers:s}=t;return{response:n,actionInPayload:e,headers:hm({...s})}})),Og("Error occurred during ajax call at submitbulkactionasync Epic : ",n))},cP=e=>{vu.publish(Vs.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},lP="SUBMIT_BULK_ACTION_ASYNC",uP=e=>{let t,n=0,s=[],a={};return e.pipe(Tg(lP),gg((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:n}=e.payload),!r){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,e),Eg([])}return Eg(e.payload).pipe(gg((e=>(t=e,iP(t)))),hg((e=>{const{containerItemID:n,context:r}=t,{response:o}=e;return a={caseID:o.caseID,caseTypeID:"BackgroundJob"},cP({submitResponse:o}),t.target=`${Vs.APP.APP}/${PE.MODAL}`,s.push(ZC(qC,{containerItemID:n,context:r,target:t.target,skipReleaseLockRequest:!0})),s})),hg((()=>($p.resolveActionByID(n,a),XA(s),s=[],s))))})))},dP=(e,t)=>kD(e,t),pP=e=>{let t=0,n=[];return e.pipe(Tg(tg),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const n=Lf(tr,e),s=jr(n,e.context);return Kl(Dm(s,{loadingContext:e.context})).pipe(fg((({continueExecution:n})=>n?(Tu(e.context),dP(e,{actionMgrID:t,isProcessAction:!0})):($p.rejectActionByID(e.actionMgrID),Dg))))})),fg((async e=>{if(e&&kf(e.type)){const t=Cm(e);return n.push(t),n}const{actionInPayload:t,headers:s,response:a}=e;return await BD(a,n,{headers:s,actionInPayload:t}),n})),hg((()=>(Lm(n),Zf(n,t),n=[],n))))},gP=e=>{let t=0,n=[];return e.pipe(Tg(Ra,ka),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{containerItemID:t,caseID:n,context:s,caseDeleted:a,skipReleaseLockRequest:r,currentCaseViewMode:o,isProcessAction:i,isInCreateStage:c,deleteWork:l}=e,u=o===Vs.PERFORM_MODE,d=n&&u;return l?Eg([]):i&&c?SD(e):t!==s||a||r||!d?t?.includes(Vs.MODAL)&&im(by(t))===Vs.REVIEW_MODE?SD(e):Eg([]):SD(e)})),fg((e=>(e&&kf(e.type)&&n.push(Cm(e)),n))),hg((()=>(XA(n),Zf(n,t),n=[],n))))};var hP=function(e){function t(t,n){return e.call(this)||this}return zc(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(il),fP={setInterval:function(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var a=fP.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,Xc([e,t],Jc(n))):setInterval.apply(void 0,Xc([e,t],Jc(n)))},clearInterval:function(e){var t=fP.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},mP=function(e){function t(t,n){var s=e.call(this,t,n)||this;return s.scheduler=t,s.work=n,s.pending=!1,s}return zc(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var s=this.id,a=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(a,s,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),fP.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&fP.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,s=!1;try{this.work(e)}catch(e){s=!0,n=e||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,s=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ol(s,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(hP),IP={now:function(){return(IP.delegate||Date).now()},delegate:void 0},EP=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=IP.now,e}(),yP=new(function(e){function t(t,n){void 0===n&&(n=EP.now);var s=e.call(this,t,n)||this;return s.actions=[],s._active=!1,s}return zc(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(EP))(mP),AP=yP;function CP(e,t,n){void 0===e&&(e=0),void 0===n&&(n=AP);var s=-1;return null!=t&&(mg(t)?n=t:s=t),new bl((function(t){var a,r=(a=e)instanceof Date&&!isNaN(a)?+e-n.now():e;r<0&&(r=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=s?this.schedule(void 0,s):t.complete())}),r)}))}function SP(e,t){return void 0===e&&(e=0),void 0===t&&(t=yP),e<0&&(e=0),CP(e,e,t)}function _P(e){return $l((function(t,n){var s=!1,a=null,r=null,o=function(){if(null==r||r.unsubscribe(),r=null,s){s=!1;var e=a;a=null,n.next(e)}};t.subscribe(Gl(n,(function(t){null==r||r.unsubscribe(),s=!0,a=t,r=Gl(n,o,hl),jl(e(t)).subscribe(r)}),(function(){o(),n.complete()}),void 0,(function(){a=r=null})))}))}const NP=(e,t,n,s,a)=>{if(a!==Vs.RESOURCE_STATUS.CREATE)return;Bm.isStateMachineExist(e,t,n)||Bm.setStateMachine(e,n,t,new Nd(n,t,e));Bm.getStateMachine(e,t,n).insert({},"string"==typeof s?s:s+1,!0,{isDefault:!0})},TP=(e,t,n,s,a)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===s||"UPDATE"===s)&&(e.data.caseInfo.content[a][t][n]=t)},DP=e=>{const t=!e.isLocalAction&&e.editType===Vs.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},PP=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),OP=e=>{const t={};return Object.keys(e).forEach((n=>{const s=e[n];if(n===Vs.CLASSID)t[n]=s;else if(Array.isArray(s)){const e=s.filter(PP).map(OP);e.length>0&&(t[n]=e)}else if(PP(s)){const e=OP(s);Object.keys(e).length>0&&(t[n]=e)}})),t},RP=e=>{let t=0,n=[],s="";return e.pipe(Tg(_r),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>aT(e))),fg((async e=>{if(e&&e.type===Ta)return n.push(Cm(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a,headers:r}=e,o=t.containerName,i=jr(o,t.context);let c=_m(i,o,t.context);c=Ks(t.context,c);const{pageReference:l,targetProperty:u,index:d,subscriptFieldName:p,pageGroupName:g,actionType:h,isPageGroup:f}=t,m=l?.startsWith(Fs.OBJECT_INFO.OBJECT_INFO);let I=null;m?(I=Us.transformCaseData(a),I.uiResources.root.config.context=`${l}${u}[${d}]`):I=a;const E=mf(I);E.key=t.ID,E.data?.caseInfo?(E.data.caseInfo.ID=t.ID,TP(E,d,p,h,g)):E.data?.objectInfo&&(E.data.objectInfo.ID=t.ID);const{interestPageActionID:y,editType:A,isLocalAction:C,actionID:S}=t,_={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:y,editType:A,isLocalAction:C,actionID:S};E.uiResources.context_data.modalView=_;const N=ZA(t.context)?.context_data?.caseInfo,T=`${t.pageReference}${t.targetProperty}`,D=Iu(N,T,t.index);E.uiResources.context_data.caseInfo={...E.uiResources.context_data.caseInfo,content:fC.mergeDeep(E.uiResources.context_data.caseInfo?.content,D?.content)};const P=yC.getProperty(Vs.CASE_INFO.REMOTESYSTEMID,"",t.context),O={acName:i,context:c};await Im(E,t,O);const R={target:i,context:c,containerItemID:c,headers:r,index:d,subscriptFieldName:p,pageGroupName:g,isPageGroup:f};P&&(R.headers={...R.headers,RemoteSystemID:P});const b=fC.deepClone(E.data?.caseInfo?.content);if(E.data?.caseInfo&&A===Vs.ACTION){Wn(E.data,`${l}${u}`,new Array(d+1).fill({}));const e=fC.deepClone(nC(`${u}[${d}]`,l,t.context)??{});((e,t,n,s,a)=>{const r=t===Fs.CASE_INFO.CASE_INFO_CONTENT?`${n.replace(".","")}[${s}]`:`${(t.split(Fs.CASE_INFO.CASE_INFO_CONTENT)[1]??"").replace(".","")}${n}[${s}]`,o=fC.getIn(a,r);PP(o)&&fC.mergeDeep(OP(o),e)})(e,l,u,d,b),Wn(E.data,`${l}${u}[${d}]`,e)}const v=mm(E,R);E.data?.caseInfo&&(E.data.caseInfo.content=b);const x=mm(E,R);v.resourceStatus=t.actionType,v.isMultiRecordData=!0,v.readOnly=t.readOnly,v.parentContext=t.context,v.heading=t.heading,v.data.caseInfo&&A===Vs.ACTION&&(v.data.caseInfo={...v.data.caseInfo,...DP(t),isLocalAction:t.isLocalAction}),v.clearStateMachine=!1,x.skipValidation=!0,x.isArrayDeepMerge=!0;const w=Sm(i,v);s=c,n.push(w);const M=ZC(DC,x);return{actionsOut:n,actionInPayload:t,mergeAction:M}})),hg((({actionInPayload:e,mergeAction:a})=>{if(Bf(n)?$p.rejectActionByID(t):$p.resolveActionByID(t),e.skipPageInstructions||NP(s,e.pageReference,e.targetProperty,e.index,e.actionType),XA(n),n=[],e.editType===Vs.ACTION){Bm.registerForServerChanges(),XA(a),Bm.unRegisterForServerChanges();const t=Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT)+fC.convertClipboardPageToPageRefNotation(e.interestPage);e.columns.forEach((n=>{const a=No.trimAnnotation(n.config.value),r=nC(a,t,s),o=IA(a.startsWith(".")?a.split(".").pop():a,n.config.classID);hu.addFieldNode(s,t,e.viewID,a,r,{isDeclarativeTarget:!!o?.isDeclarativeTarget,context:s,propertyName:a,pageReference:t,value:n.config.value,isInsideList:/\[\d+\]/.test(t)||/\[\d+\]/.test(a)})}))}return n})))},bP=e=>{const{context:t}=e;let n={...fm(t).content,contextData:!1};const s=Fm(t);fC.isEmpty(s)||(n=Um(s,n));const a=((e,t=!1)=>e===Vs.ACTION?t?Lh.REFRESH_CASE_DATA:Lh.REFRESH_ASSIGNMENT_DATA:Lh.REFRESH_CASE_VIEW)(e.editType,e.isLocalAction),{restApi:r,reqType:o}=ES(a,{ID:e.isLocalAction||e.editType!==Vs.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=r;return e.editType===Vs.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,Kl(rd(i,{method:o,body:n,headers:e.headers},t)).pipe(hg((t=>({actionInPayload:e,response:t.data,headers:hm(t.headers)}))),Og(": Error occurred during getEmbeddedDataView request : ",t))},vP=(e,t,n)=>"string"==typeof n?`${e}${t}.${n}`:`${e}${t}[${n}]`,xP=(e,t,n,s,a)=>{const r=e.data?.caseInfo?.content;if(r){const e=((e,t,n)=>{const s=(e,t)=>{if((e=>"object"==typeof e&&null!==e)(e))return e[t]},a=t.replace(/^\./,"").split(".");let r=e;for(const e of a)r=s(r,e);return"string"==typeof n?s(r,n)??null:Array.isArray(r)?r[n]??null:null})(r,s,a);e&&XA(oS({context:t,reference:n,value:e}))}const o=e.uiResources?.context_data;o&&XA(oS({context:t,reference:Vs.CONTEXT_DATA,value:o}))},wP=e=>{let t=0,n=[];return e.pipe(Tg(Nr),hg((e=>{const{payload:n}=e;return({actionMgrID:t}=n),n})),fg((e=>bP(e))),xD((async e=>{const t={rootView:null,data:null,uiResources:null,containerContext:null};if(e?.type===Ta)return n.push(Cm(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0},responseData:t};const{actionInPayload:s,response:a,headers:r}=e,{pageReference:o,targetProperty:i,index:c,containerName:l}=s,u=o?.startsWith(Fs.OBJECT_INFO.OBJECT_INFO),{context:d,containerContext:p,target:g}=(e=>{const{containerName:t,context:n}=e;if(!t)return{context:n,containerContext:null,target:null};const s=jr(t,n),a=_m(s,t,n)||t,r=Ks(n,a);return{context:r,containerContext:r,target:s}})(s),h=((e,t,n,s,a)=>{if(a){const a=Us.transformCaseData(e);return a.uiResources.root.config.context=vP(t,n,s),a}return e})(a,o,i,c,u),f=mf(h);f.key=s.ID;const m=vP(o,i,c),I=l?{acName:g,context:d}:{context:d};if(await Im(f,s,I),l&&g){const e=mm(f,{target:g,context:d,containerItemID:d,headers:r,index:c});e.resourceStatus=s.actionType,e.isMultiRecordData=!0,e.readOnly=s.readOnly,e.parentContext=s.context,e.clearStateMachine=!1;const t=Sm(g,e);n.push(t)}else xP(f,d,m,i,c);const E=f.uiResources?.root||null;return E?.config&&(E.config.context=m),t.rootView=E,t.data=f.data,t.uiResources=f.uiResources,t.containerContext=p,{actionsOut:n,actionInPayload:s,responseData:t}})),hg((({actionsOut:e,responseData:s})=>{Bf(e)?$p.rejectActionByID(t):$p.resolveActionByID(t,s);return n=[],e})))},MP=e=>{let t,n="",s=[];return e.pipe(Tg(Tr),gg((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const t={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,t),Gh.handleDeferredActionCompletion(e.payload.context),Eg([])}return Eg(e.payload).pipe(fg((e=>(t=e,aT(t)))),fg((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==Ta){const{context:n,pageReference:s}=t,a={context:n},{response:r}=e,o=s?.startsWith(Fs.OBJECT_INFO.OBJECT_INFO);let i=null;o?(i=Us.transformCaseData(r),i.uiResources.root.config.context=s):i=r;const c=mf(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const l=mm(c,a);l.skipValidation=!0;const u=ZC(DC,l);Bm.registerForServerChangesSync(),XA(u),Bm.unRegisterForServerChanges()}return e})(e,t))),fg((async e=>{if(e&&e.type===Ta){const t=Cm(e);return s.push(t),s}const{containerItemID:n,context:a,pageReference:r,interestPage:o}=t,i=o?.replace(/\(\d+\)$/,"");return((e,t,n,s,a)=>{xd(e).forEach((e=>{const r=a&&"replace"===e.instruction.toLowerCase()?fC.convertClipboardPageToPageRefNotation(a):fC.convertClipboardPageToPageRefNotation(e.target);Bm.isStateMachineExist(t,n,r)||Bm.setStateMachine(t,r,n,new Nd(r,n,t));const o=Bm.getStateMachine(t,n,r);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,s,{encryptedContent:e.encryptedContent});break;case"update":o.update(e.content,e.listIndex??e.groupIndex,s,{encryptedContent:e.encryptedContent});break;case"delete":e.listIndex?o.delete(e.listIndex,s):e.groupIndex?o.delete(e.groupIndex,s):o.deletePage();break;case"replace":o.replacePage(e.content,s,a?e.target:void 0,a?n:void 0,e.encryptedContent);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"add":o.insert(e.content,e.groupIndex,s,{encryptedContent:e.encryptedContent});break;case"delete all":o.deleteAll()}}))})(a,t.parentContext,r.startsWith(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT)?Vs.getProperty(Fs.OBJECT_INFO.OBJECT_INFO_CONTENT):Vs.getProperty(Fs.CASE_INFO.CASE_INFO_CONTENT),!1,i),s.push(ZC(qC,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),s})),hg((()=>{if(Bf(s))$p.rejectActionByID(n),Gh.handleDeferredActionCompletion(t.context);else{$p.resolveActionByID(n),Gh.handleDeferredActionCompletion(t.context);const{pageReference:s}=e.payload,a=yC.getPropertyValue(Vs.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,t.parentContext);a?((e,t)=>{const{pageReference:n,isMultiRecordData:s}=t,a=yC.getPropertyValue(Vs.getProperty(Fs.CASE_INFO.CASE_INFO_ID),n,e.parentContext),r=yC.getPropertyValue(Vs.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,e.parentContext),o=yC.getPropertyValue(Fs.CASE_INFO.ASSIGNMENT_ID,n,e.parentContext),i=yC.getPropertyValue(Vs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,e.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:d}=i,p=e.pageReference.substring(0,e.pageReference?.lastIndexOf(".")).replace(Vs.getProperty(Vs.CASE_INFO.CASE_INFO_CONTENT),"");"action"===i.editType?SI(a,o,u,e.parentContext,c,l,d,s,i.editType):CI(a,r,e.parentContext,p,{})})(t,{isMultiRecordData:a,pageReference:s}):RI(t.parentContext,Vs.getProperty(Vs.CASE_INFO.CASE_INFO_CONTENT),{})}return XA(s),s=[],s})))})))},LP=e=>{const{caseID:t,headers:n,debugInfo:s,context:a}=e,r=ES("getDescendants",{caseID:t}),{restApi:o}=r,{reqType:i}=r;return Kl(rd(o,{method:i,headers:{...n,...s&&{...Yu.addDebugHeaders(s)}}},a)).pipe(hg((t=>({actionInPayload:e,response:t.data,headers:hm({...n,...t.headers})}))),Og("Error ocurred during ajax call at getDescendants Epic : ",a))},UP=e=>{let t=0,n=[];return e.pipe(Tg(Mh),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>LP(e))),fg((async e=>{if(e&&kf(e.type))return n.push(Cm(e)),n;const{actionInPayload:t,response:s}=e,a={};fC.setIn(a,"caseInfo.childCases",s?.childCases??[]);const r={data:a,context:t?.context};return n.push(ZC(DC,r)),n})),hg((()=>(XA(n),Zf(n,t),n=[],n))))},FP=e=>{let t,n="",s=[],a={};return e.pipe(Tg(Dr),gg((e=>{t=e.payload;const{isFormValid:r}=e.payload;return({actionMgrID:n}=e.payload),r?Eg(e.payload).pipe(fg((e=>(t=e,Eg({})))),fg((async()=>{const{containerItemID:e}=t,r=ZA(e),o=e,i=r?.dataInfo.content;delete i.classID;const c=Ws(o),l=KE(c).length,u=KE(c)[l-1]?GE(KE(c)[l-1]):c,d=iy(e),p=xE(d,e)||{},g=p?.referenceList?.replaceAll(".",""),h=p?.subscriptName,f=ZA(u),m={containerItemID:u,data:{...f,caseInfo:{content:{...i}}}};s.push(ZC(kC,m)),((e,t,n)=>{yE(t)&&e.push(ZC(qC,{containerItemID:n,skipReleaseLockRequest:!0}))})(s,o,e);const I=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:s,activeWorkArea:a,subscriptFieldName:r,actionMgrID:o,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[r],containerName:Fs.MODAL,pageReference:Fs.CASE_INFO.CASE_INFO_CONTENT,viewID:Fs.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:Fs.RESOURCE_STATUS.CREATE,interestPage:`.${s}.${n[r]??""}`,targetProperty:`.${s??""}`,pageGroupName:s,context:a??"",subscriptFieldName:r};return{type:_r,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:o,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:f,subscriptData:i,pageGroupName:g,activeWorkArea:u,subscriptFieldName:h,actionMgrID:n,containerItemID:e});return s.push(I),a=i,s})),hg((()=>($p.resolveActionByID(n,a),XA(s),s=[],s)))):(((e,t)=>{const n={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};$p.rejectActionByID(e,!0,n),Gh.handleDeferredActionCompletion(t)})(n,e.payload.context),Eg([]))})))},VP=[DT,XT,iD,gD,WD,YD,oP,uP,pP,AD,OD,ND,gP,LD,vD,e=>e.pipe(Tg(Xa),_P((()=>SP(100))),hg((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:s,isProcessAction:a,isDataObject:r,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:c,context:l}=e.payload;return $p.resolveActionByID(t),vu.publish(Vs.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:s,hideDelete:!a&&n,isDataObject:r,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:l||c}),[]}))),e=>e.pipe(Tg(Ba),_P((()=>SP(100))),hg((e=>{const{actionMgrID:t,context:n,containerName:s,containerItemID:a}=e.payload,r=jr(s,n);return $p.resolveActionByID(t),XA(ZC(WC,{containerItemID:a,target:r,doDeleteCaseSummary:!1})),[]}))),RP,wP,MP,UP,FP],jP=VP;function kP(){return $l((function(e,t){e.subscribe(Gl(t,hl))}))}const{RESOURCE_TYPES:BP}=Fs,$P="pyCasePreview",GP=(e,t)=>{const n=aI.isObjectCaseType(e.caseClassName);if(e.key&&!n){const n=iy(e?.context),s=VE(n,e.key),a=e?.context;(s||e.updateData||(e=>{const t=JA();if(!e)return!1;const n=Ws(e),s=iy(n),a=iy(e);if(!s||!a)return!1;const r=xE(s,n),o=xE(a,e);if(!r||!o)return!1;const{key:i}=r;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),!(!i||!c||i===c)})(a))&&t.actionsOut.push(ZC(DC,e))}else t.actionsOut.push(ZC(DC,e))},WP=[e=>e.pipe(Tg(ta),hg((e=>e.payload)),_g((e=>!cm(e.actionMgrID))),fg((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===PE.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=jr(PE.PREVIEW,e.context),n=_m(t,PE.PREVIEW,e.context,{buildNew:!0}),s=decodeURI(e.caseId);XA(MC({...e,context:n,target:t,containerItemID:n,key:s,caseViewMode:Vs.REVIEW_MODE,root:{type:"reference",config:{context:Vs.getProperty(Vs.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:s,caseInfo:{ID:s,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(Bs.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=Bs.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}const{restApi:s,reqType:a}=((e,t)=>{let n=ES("loadView",t);e.viewContext===BP.PAGE&&(n=ES(Wa,{page:e.viewName,pageClass:e.pageClass}));const s=Ls.getDefaultQualifiedName($P);return e.containerName===PE.PREVIEW&&Boolean(e.caseId)&&e.viewContext!==BP.PAGE&&(e.viewName===s||e.viewName===$P)&&(n=ES(Ya,{caseID:e.caseId,params:{pageName:s}})),n})(e,t);return Kl(rd(aI.appendExcludeQueryParamToUrl(s),{method:a,headers:n},e.context)).pipe(hg((t=>{const n=decodeURI(e.caseId);let s="";return"string"==typeof t.data?t.data?s=JSON.parse(t.data):(console.error("response data is empty!!"),s={}):s=t.data,{response:{...s,key:n},actionConfig:e,headers:hm(t.headers),rootView:fC.getIn(s,Vs.ROOT)}})),Og(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),fg((async e=>{const t={};if(e?.type===Ta){if(t.actionsOut=Cm(e),e?.payload?.context?.includes(PE.PREVIEW)){const n={...ZA(e.payload.context),caseInfo:{progress:!1,error:!0}},s=jr(PE.PREVIEW,e.payload.context);t.actionsOut=ZC(kC,{key:n.key,target:s,containerName:PE.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:s,headers:a}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete s?.data?.caseInfo?.assignments,delete s?.data?.caseInfo?.availableActions,delete s?.data?.caseInfo?.availableProcesses);const{containerItemID:r,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:s}=e,a=t||Wp.getTargetViewContainerName(Wa),r=s?.target??jr(a,e.context);return{target:r,context:s?.context??(t===PE.PREVIEW&&n?e.context:_m(r,a,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=mf(s),u.directUrlUpdation=!1,await Im(u,n,l);const d={...n,target:i,context:c,containerItemID:r||c,headers:a},p=mm(u,d);if(p.resourceType=BP.CASE,o&&!p.updateData){p.caseViewMode=Vs.REVIEW_MODE,fC.setIn(p.data,["context_data","caseViewMode"],p.caseViewMode);const e=iy(p?.context);((e,t,n,s,a)=>{e&&a===PE.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,om(n,n),s.actionsOut=ZC(kC,{...n,containerName:a})):e?(s.actionsOut=[],s.actionsOut.push(ZC(WC,{target:t,containerItemID:e}))):s.actionsOut=ZC(MC,{...n,containerName:a})})(VE(e,p.key),e,p,t,o)}else{p.preserveClientChanges=!0,t.actionsOut=[],o===PE.PREVIEW&&t.actionsOut.push({type:hr,payload:{context:c}});const{viewName:e}=n;e===Ls.getDefaultQualifiedName($P)&&om(p,p),GP(p,t)}}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:s,viewName:a}=e.actionConfig;return a===Ls.getDefaultQualifiedName($P)&&(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:s}),t})),hg((({rootView:e,actionsOut:t,actionMgrID:n=0})=>($p.resolveActionByID(n,e),Us.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(Tg(na),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{vu.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:s,viewName:a,className:r,skipSemanticUrl:o=!1,containerName:i=Wp.getTargetViewContainerName(Wa)}=e,c=n&&{...Yu.addDebugHeaders(n)},l=jr(i,s);let u="";if(!o){const{semanticURL:t,activate:n,activateContainerActionPayload:s}=bm(a,r,l);if(u=t,n)return Vm(s),Eg({type:Fa,activateContainerActionPayload:s,actionConfig:e})}return Kl(GE(l)?Dm(l,{loadingContext:s}):Promise.resolve({continueExecution:!0,removeActionPayload:{}})).pipe(fg((({continueExecution:n,removeActionPayload:i})=>{if(!n)return $p.rejectActionByID(t),Dg;const{restApi:l,reqType:d}=ES(Wa,{page:a,pageClass:r});return Kl(rd(l,{method:d,headers:c},s)).pipe(hg((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:hm(t.headers),removeActionPayload:i,skipSemanticUrl:o}})),Og(": Error ocurred during ajax call at showPage Epic : ",e.context))})))})),fg((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===Ta)return n.push(Cm(e)),t;let{type:s}=e;const{actionConfig:a,skipSemanticUrl:r}=e,o=a.containerName||Wp.getTargetViewContainerName(na),i=jr(o,a.context);vu.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,s)=>{let a={},r=e;if(n.isRemoteCase){a={...n};const e=VE(s,a.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},r=Fa)}return{remoteCasePayload:a,updatedType:r}})(s,e,a,i);if(s=l??s,a.isDeferLoaded){const{response:s,headers:o={}}=e,{isCreateDataObject:c,context:l}=a,u=mf(s,{isCreateDataObject:c});u.directUrlUpdation=!r;const d={acName:i,context:l};await Im(u,a,d);const p=mm(u,{containerItemID:l,target:i,headers:o,context:l});t.rootView=fC.getIn(u,Vs.ROOT),n.push(ZC(DC,p))}else if(s===Fa){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,r={acName:i,context:qE(s)};a.isTraditionalRemoteCase||await Im({directUrlUpdation:!0,semanticURL:t},a,r,!0),n.push(ZC(WC,{target:i,containerItemID:s}))}else{const t=_m(i,o,a.context),{response:s,headers:l={},removeActionPayload:u}=e,d=mf(s,{isCreateDataObject:a.isCreateDataObject});d.directUrlUpdation=!r;const p={acName:i,context:t},g=im(t);await Im(d,a,p);const h={target:i,context:t,containerItemID:t,headers:l,debugInfo:a.debugInfo,currentCaseViewMode:g,referenceList:a?.referenceListStr,subscriptName:a?.subscriptName},f=mm(d,h);f.resourceType=Fs.PAGE,a.isCreateDataObject&&(f.resourceType=Fs.RESOURCE_TYPES.DATA,f.resourceStatus=Fs.RESOURCE_STATUS.CREATE,delete f.data.caseInfo,f.referenceList=a.referenceListStr,f.subscriptName=a.subscriptName),((e,t,n)=>{e.isRemoteCase&&(n.resourceType=Fs.CASE,n.key=aI.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:Gf(aI.getRemoteCaseKey(t.assignmentID,t.insKey))}},n.isTraditionalRemoteCase=e.isTraditionalRemoteCase||!1,n.className=t.className)})(a,c,f),f.data??={},f.data.traditionalGadgetId=aI.getUniqueGadgetId();const m=Sm(i,f);u.containerItemID&&Nm(m)&&n.push(ZC(qC,{containerItemID:u.containerItemID,target:i})),n.push(m)}return vu.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),hg((({actionManagerID:e=0,rootView:t})=>{$p.resolveActionByID(e,t),XA(n),n=[]})),kP())}],HP=WP,qP=(e,t)=>{const{context:n,pageName:s,dataContext:a,dataContextParameters:r,semanticURL:o,skipSemanticUrl:i,RemoteSystemID:c}=e,{removeActionPayload:l}=t,{restApi:u,reqType:d,body:p}=ES(Ha,{pageName:s,dataContext:a,dataContextParameters:r}),g={};return g.RemoteSystemID=c,Kl(rd(u,{method:d,headers:g,body:p},n)).pipe(hg((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:hm(t.headers),removeActionPayload:l,skipSemanticUrl:i}))),Og("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:zP}=Fs,YP=e=>{let t,n=0,s=[];return e.pipe(Tg(sa),xD((e=>(({actionMgrID:n}=e.payload),Eg(e.payload).pipe(fg((e=>((e,t)=>{const{context:n,pageName:s,dataContext:a,dataContextParameters:r,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:d}=e,p=jr(u,n);let g="";const h={context:n,pageName:s,dataContext:a,dataContextParameters:r,semanticURL:g,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:d};if(!o){g=mS(Ha,{pageName:s,dataViewName:a},r),h.semanticURL=g;const{activate:o,activateContainerActionPayload:i}=Om(zP.PAGE,p,{semanticURL:g});return o?Eg({type:Fa,activateContainerActionPayload:i,actionConfig:e}):Kl(Dm(p,{loadingContext:n})).pipe(fg((({continueExecution:e,removeActionPayload:n})=>e?qP(h,{removeActionPayload:n}):($p.rejectActionByID(t),Dg))))}return qP(h,{removeActionPayload:{}})})(e,n))),fg((async e=>{if(e&&e.type===Ta)return s.push(Cm(e)),s;const{type:n,actionConfig:a,headers:r,response:o,skipSemanticUrl:i}=e;t=fC.getIn(o,Vs.ROOT);const{containerName:c,parentAction:l,resourceType:u}=a,d=jr(c,a.context);let p;const g=im(a?.context);if(a.isDeferLoaded){p=mf(o),p.directUrlUpdation=!i;const t={acName:d,context:a.context};await Im(p,a,t);const n={target:d,headers:r,context:a.context,containerItemID:e.containerItemID},c=mm(p,n);return s=ZC(DC,c),s}if(n===Fa){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,r={acName:d,context:qE(n)};await Im({directUrlUpdation:!0,semanticURL:t},a,r,!0),s.push(ZC(WC,{target:d,containerItemID:n,resourceType:zP.DATA}))}else if("DATA"===u&&l===Sr){const{context:e}=a,t=o?.data,n={context:e,data:t};s.push(ZC(DC,n))}else{const t=_m(d,c,a.context),{removeActionPayload:n}=e;p=mf(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await Im(p,a,l);const u=mm(p,{target:d,context:t,containerItemID:t,headers:r,currentCaseViewMode:g});u.resourceType=zP.DATA;const h=Sm(d,u);n.containerItemID&&Nm(h)&&s.push(ZC(qC,{containerItemID:n.containerItemID,target:d})),xm(s),s.push(h)}return s})),hg((()=>($p.resolveActionByID(n,t),XA(s),s=[],s))))))))},KP=e=>{const{dataViewName:t,context:n,dataViewParameters:s}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(s))},{restApi:r,reqType:o}=ES("deleteDataObject",a);return Kl(rd(r,{method:o},n)).pipe(hg((t=>({response:t.data,actionInPayload:e}))),Og("Error occurred during ajax call at deleteDataObject Epic",n))},QP=e=>{let t=0,n=[];return e.pipe(Tg(Er),Rg(100),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>KP(e))),fg((async e=>{if(e&&e.type===Ta){const{payload:s}=e,a=Cm({...e,...s,actionMgrID:t});return n.push(a),n}return[]})),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t),XA(n),n=[],n))))},JP=e=>{const{dataViewID:t,dataViewParameters:n,context:s}=e,a={data_view_ID:t},{restApi:r,reqType:o}=ES("getDataObjectActions",a);return Kl(rd(r,{method:o,body:{dataViewParameters:n}},s)).pipe(hg((e=>({...e.data}))),Og("Error occurred during ajax call at GET data object actions : ",e.context))},XP=e=>{let t=0,n=[];let s={};return e.pipe(Tg(_a),Rg(100),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>JP(e))),fg((async e=>e&&e.type===Ta?(n.push(Cm(e)),n):(s=e,[]))),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t,s),XA(n),n=[],n))))},ZP=[YP,e=>{let t=0,n=[];return e.pipe(Tg(Ir),Rg(100),gg((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:t}=e.payload),!s){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(t,!0,e),Eg([])}return Eg(e.payload).pipe(fg((e=>bg(e))),fg((async e=>{if(e&&e.type===Ta){const{payload:s}=e,a=Cm({...e,...s,actionMgrID:t});return n.push(a),{actionsOut:n,data:void 0}}const{actionInPayload:s}=e,{containerItemID:a,isModalAction:r}=s,o=r?PE.MODAL:PE.PRIMARY,i={target:jr(o,a),containerItemID:a,context:a};return n.push(ZC(qC,i)),{actionsOut:n,data:e?.response}})),hg((({data:e})=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t,e),XA(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Tg(yr),Rg(100),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>vg(e))),fg((async e=>{if(e&&e.type===Ta){const{payload:s}=e,a=Cm({...e,...s,actionMgrID:t});return n.push(a),n}const{actionInPayload:s,response:a,headers:r={}}=e,{containerName:o,readOnly:i,actionName:c}=s,l=jr(o,s.context),u=_m(l,o,s.context),d={acName:l,context:u};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=s.dataLookUp,e.dataContextParameters||=s.requestPayload}await Im(a,s,d);const p=mm(a,{target:l,context:u,containerItemID:u,headers:r});return p.resourceType=Fs.RESOURCE_TYPES.DATA,p.resourceStatus=Fs.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(s.requestPayload),n.push(ZC(MC,p)),n})),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t),XA(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Tg(Ar),Rg(100),gg((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:t}=e.payload),!s){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(t,!0,e),Eg([])}return Eg(e.payload).pipe(fg((e=>xg(e))),fg((async e=>{if(e&&e.type===Ta){const{payload:s}=e,a=Cm({...e,...s,actionMgrID:t});return n.push(a),n}const{actionInPayload:s}=e,{containerItemID:a,isModalAction:r}=s,o=r?PE.MODAL:PE.PRIMARY,i={target:jr(o,a),containerItemID:a,context:a};return n.push(ZC(qC,i)),n})),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t),XA(n),n=[],n))))})))},QP,XP,e=>{let t=0,n=[];return e.pipe(Tg(Cr),Rg(100),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>wg(e))),fg((async e=>{if(e&&e.type===Ta){const{payload:s}=e,a=Cm({...e,...s,actionMgrID:t});return n.push(a),n}const{actionInPayload:s,response:a,headers:r={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=s,u=jr(o,s.context);let d=Hs(o,c);d=Ks(c,d);const p={target:u,context:d,containerItemID:d,headers:r,resourceType:Fs.RESOURCE_TYPES.DATA,resourceStatus:Fs.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(s.dataViewParameters),actionID:i,actionName:l};if(a?.data?.dataInfo){const{dataInfo:e}=a.data;e.dataContext||=s.lookupDatapage,e.dataContextParameters||=s.dataViewParameters}const g={acName:u,context:c};await Im(a,s,g);const h=mm(a,p);return n.push(ZC(MC,h)),n})),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t),XA(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Tg(Sr),Rg(100),gg((e=>{const{isFormValid:s}=e.payload;({actionMgrID:t}=e.payload);const a=e.payload.context;if(!s){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(t,!0,e),Eg([])}return Cu({context:a,stateObj:ZA(a),clearContextMessages:!0}),Eg(e.payload).pipe(fg((e=>Mg(e))),fg((async e=>{if(e&&e.type===Ta){II(e,"dataObject");const{payload:s}=e,a=Cm({...e,...s,actionMgrID:t});return n.push(a),n}const{actionInPayload:s,response:a,headers:r={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=s,u=jr(o,s.context),d={acName:u,context:s.context};await Im(a,s,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:r,context:s.context};return n=((e,t,n,s)=>{const{resourceType:a,key:r,containerItemID:o}=s,i=mm(n,t);i.resourceType=a||Fs.RESOURCE_TYPES.DATA;const c=Qs(o);e.push(ZC(qC,i));const l=nC(".dataContext","dataInfo",c),u=nC(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:a,parentAction:Sr,dataContext:l,dataContextParameters:u},p=l&&u&&mS(Ha,{pageName:Vs.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(Vs.PREVIEW)){const t={type:sa,payload:{pageName:Vs.VIEW_NAMES.PY_DATA_PREVIEW,container:Vs.PREVIEW,containerName:Vs.PREVIEW,...d}};e.push(t)}else if(a!==Vs.PAGE&&r===p&&o?.includes(Vs.PRIMARY)){const t={type:sa,payload:{pageName:Vs.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,a,{key:l,resourceType:c,containerItemID:i}),n})),hg((()=>(1===n.length&&kf(n[0].type)?$p.rejectActionByID(t):$p.resolveActionByID(t),XA(n),n=[],n))))})))}],eO=ZP;function tO(e,t){return void 0===t&&(t=yP),$l((function(n,s){var a=null,r=null,o=null,i=function(){if(a){a.unsubscribe(),a=null;var e=r;r=null,s.next(e)}};function c(){var n=o+e,r=t.now();if(r<n)return a=this.schedule(void 0,n-r),void s.add(a);i()}n.subscribe(Gl(s,(function(n){r=n,o=t.now(),a||(a=t.schedule(c,e),s.add(a))}),(function(){i(),s.complete()}),void 0,(function(){r=a=null})))}))}const{RESOURCE_TYPES:{CASE:nO,DATA:sO,OBJECT:aO}}=Fs;let rO=[],oO=!1,iO=!1;const cO={},lO=[e=>e.pipe(Tg(Na),tO(200),hg((e=>e.payload)),fg((e=>{iO=!1,vu.subscribe(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{iO=!0}));const t=wu.getPreviewMode()&&Yu.addDebugHeaders({debugId:fC.generateUniqueID()});cO.dataContext=e.payload.dataViewName,cO.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:s,routeKey:a}=e;let{routeEndpoint:r}=e;r&&(r.indexOf("viewType={viewType}")>0?r=r.replace("{viewType}","page"):r.indexOf('viewType=""')>0&&(r=r.replace('viewType=""','viewType="page"'))),oO=a===Lr,oO&&Us.setNeedsMapping(!0);const o=an()+r,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if(Bs.isRemoteCase(u)){const{RemoteSystemID:e}=Bs.getRemoteCase(u);l.RemoteSystemID=e}if(Vy.isWSSPortal()&&(l[Vs.X_ORIGIN_CHANNEL]="WSS"),"POST"===s){c=e.payload,r.indexOf("viewType=")<0&&(r=`${r}?viewType=page`);let i;switch(wm(a)){case nO:case aO:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case sO:i=cO;break;default:i=c}return Kl(rd(o,{method:s,body:i,headers:{...l,...t}},n)).pipe(hg((t=>({response:{...t.data},payload:e,headers:hm(t.headers,"",l)}))),Og(": Error occurred during ajax call at historyEpic : ",e))}return Kl(rd(aI.appendExcludeQueryParamToUrl(o),{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(hg((n=>({response:n.data,payload:e,headers:{...hm(n.headers),...t}}))),Ql((s=>{if(a===or){const n={messages:[{type:"error",message:s.response.data.errorDetails[0].localizedValue}],category:"PAGE"};kp.setComponentCache("assignments-launchAssignment-Error",n);const a=Hg(wy()),r=Uy.getEndPointInfo(a.split("/assignments")[0]),o=an()+r.routeEndpoint;return e={...e,routeKey:Ya,resetSemanticURL:!0},Kl(rd(o,{method:r.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(hg((n=>({response:n.data,payload:e,headers:{...hm(n.headers),...t}}))))}return Eg(eS(": Error occurred during ajax call at historyEpic : ",s,n))})))})),fg((async e=>{if(iO)return rO;if(vu.subscribe(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{iO=!0})),e&&e.type===Ta)return Cm(e);const{headers:t={},response:n,payload:s}=e,a=mf(n,{[Fs.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),r=s.options.acName,o=XE(r)&&ey(r)?GE(r):e.payload.options.context,i=o;t.RemoteSystemID=s?.payload?.RemoteSystemID;const c={target:r,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[Vs.COREHEADER_APP_DEBUG_ID]}};let l=s?.payload?.pageClass;const u=s?.payload?.page,d=oO?Lr:Ya,p=oO?s.payload.objectID:s.payload.workID,g=oO?"{objectID}":"{workID}";let h=oO?`objects/${p}`:"";s?.payload?.caseName&&p&&(h=mS(d,{caseName:e.payload.payload.caseName}),h=h?.replace(g,p)||"",l=s?.payload?.caseClassName),(s?.routeKey===or||s?.resetSemanticURL)&&((e,t)=>{const n=qf(t);let s=mS(Ya,{caseClassName:Wf(t)},{id:n});s=s?.replace("{workID}",String(Gf(n))).replace("{id}",String(Gf(n))),DS({directUrlUpdation:!0,semanticURL:s,options:{}})})(0,a),((e,t)=>{const n=t?.data?.caseInfo;e===or&&n?.caseTypeID&&n?.content&&em(n.caseTypeID)&&(n.content.coexistenceAction=Ka)})(s?.routeKey,a),(e=>{const t=e?.data?.caseInfo;if(!t)return;const{ID:n,caseTypeID:s}=t;n&&s&&em(s)&&(e.data.caseID=n)})(a),vu.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});const f=fC.getIn(a,Vs.COMPONENTS);f&&await wp(f),pp(a,s.options.actionConfig,!0),vu.publish(Fs.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:r,pageName:u,pageClass:l});let m=mm(a,c);return m=((e,t,n)=>{if(e===dm.CASE||e===dm.OBJECT||e===dm.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:s}=ym(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=s}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===dm.ASSIGNMENT?(n.caseViewMode=Vs.PERFORM_MODE,n.resourceType=dm.CASE):n.caseViewMode=Vs.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(wm(e.payload.routeKey),{...n.data,semanticURL:h,caseViewMode:Vs.REVIEW_MODE},m),m.data.traditionalGadgetId=aI.getUniqueGadgetId(),rO.push(Sm(r,m)),om(a,c),((e,t)=>{let n=kp.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(ZC(HC,n)),kp.resetComponentCache("assignments-launchAssignment-Error"))})(o,rO),rO})),hg((()=>(iO||XA(rO),rO=[],oO=!1,iO=!1,rO))),Og("Error occurred"))],uO=lO,dO=[e=>{let t=0;return e.pipe(Tg(lr),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),hg((()=>{const e=JA()?.getState(),n=tT();return Xt(e,n)&&t>0?$p.resolveActionByID(t,{}):$p.rejectActionByID(t),[]})),kP())}],pO=[e=>{let t=0,n=[];return e.pipe(Tg(aa),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:s}=e;let a,r="";n||(r=mS(qa,{insightID:"{insightID}"}),r=r.replace("{insightID}",s),a=Uy.getEndPointInfo(r));const{restApi:o,reqType:i}=ES(qa,{...a?.payload||[],insightID:s});return Kl(rd(o,{method:i},t)).pipe(hg((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:r,semanticURL:r},actionConfig:e,skipSemanticUrl:n}})),Og(": Error occurred during ajax call at showPage Epic : ",e.context))})),fg((async e=>{if(e&&e.type===Ta)return n.push(Cm(e)),n;const{actionConfig:t,skipSemanticUrl:s}=e,a=Wp.getTargetViewContainerName(na),r=jr(a,t.context),o=_m(r,a,t.context),{response:i}=e,c=mf(i);c.directUrlUpdation=!s;const l={acName:r,context:o},u=!s,d=s;await Im(c,t,l,u,d);const p=mm(c,{target:r,context:o,containerItemID:o});p.resourceType=Fs.PAGE;const g=Sm(r,p);return n.push(g),n})),hg((()=>{$p.resolveActionByID(t),XA(n),n=[]})),kP())}],gO=pO,hO=[e=>{let t=0,n=[];return e.pipe(Tg(ra),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:s}=e;let a="";n||(a=mS(za,{dashboardID:s}),a=a.replace("{dashboardID}",s));const{restApi:r,reqType:o}=ES(za,{dashboardID:s});return Kl(rd(r,{method:o},t)).pipe(hg((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Og(": Error occurred during ajax call at showPage Epic : ",e.context))})),fg((async e=>{if(e&&e.type===Ta)return n.push(Cm(e)),n;const{actionConfig:t,skipSemanticUrl:s}=e,a=Wp.getTargetViewContainerName(na),r=jr(a,t.context),o=_m(r,a,t.context),{response:i}=e,c=mf(i);c.directUrlUpdation=!s;const l={acName:r,context:o},u=!s,d=s;await Im(c,t,l,u,d);const p=mm(c,{target:r,context:o,containerItemID:o});p.resourceType=Fs.PAGE;const g=Sm(r,p);return n.push(g)})),hg((()=>{$p.resolveActionByID(t),XA(n),n=[]})),kP())}],fO=hO,mO=(e,t)=>{const{class:n,context:s,viewType:a=pm.PAGE}=e,{removeActionPayload:r}=t,o=e?.pageName?e?.pageName:Vy.getDefaultCasePage();return Kl(hp.createCase(n,{...e,pageName:o,viewType:a,context:s})).pipe(hg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:r}))),Og("Error occurred during ajax call at createObject Epic : ",s))},IO="CREATE_OBJECT",EO=e=>{let t,n=0,s=[],a={};let r=!1;return e.pipe(Tg(IO),Rg(100),gg((e=>{if(({actionMgrID:n}=e.payload),aI.isExternalObject(e.payload.class)&&!Zm(e.payload.context)){const e={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,e),Eg([])}return Eg(e.payload).pipe(fg((e=>{const{context:s}=e;t=e.class;const a=WT(e),o=jr(a,s);return r=!1,Kl(AT(o,{loadingContext:s})).pipe(fg((({continueExecution:t,removeActionPayload:s,dirtyCheckPerformed:a})=>t?(r=a,mO(e,{removeActionPayload:s})):($p.rejectActionByID(n),Dg))))})),fg((async e=>{if(e&&e.type===Ta)return e.payload.context=((e,t)=>aI.isExternalObject(e)&&t?t:Ny())(t,e.payload.context),s.push(Cm(e)),s;const{actionInPayload:o,response:i,headers:c,removeActionPayload:l}=e,u=YT(o,i);fC.setIn(i.data,Vs.getProperty(Vs.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const d=WT({...o,isInCreateStage:u}),p=jr(d,o.context),g=_m(p,d,o.context);if(((e,t)=>{aI.isExternalObject(e.class)&&(e.containerItemID=e.context,RT(t,e))})(o,s),!r&&((e,t,n)=>!Vf(e)&&XE(t)&&!aI.isExternalObject(n))(d,p,t)){const{continueExecution:e}=await Dm(p,{loadingContext:o.context});if(!e)return $p.rejectActionByID(n),s}if(((e,t)=>!e&&!t)(o?.openCaseViewAfterCreate??!0,u)){const{businessID:e,caseType:t,resolvedURL:n}=Zp(i);return a={id:e,label:t,href:n},_T(a),NT({caseId:e,caseType:t}),s}(e=>{aI.isExternalObject(e.class)&&_T({content:Gy().getLocaleValue("Successfully submitted!","Assignment")})})(o);const h=mf(i),f=String(Gf(Kp(h)));let m=mS(Mr,{caseClassName:Yp(h)});m=m.replace(/{.+?}/,f),h.semanticURL=m,kp.setComponentCache(f,Yu.addDebugHeaders(o.debugInfo)),qT(h,o);const I={acName:p,context:g};await Im(h,o,I);const E={target:p,context:g,headers:c,semanticURL:m,caseViewMode:zT(h),containerItemID:g,isInCreateStage:u,isMinimizable:u,assignmentContext:fC.getIn(h,ET),nextAssignmentInfo:fC.getIn(h,IT),resourceType:Fs.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};Qp(E,h);const y=mm(h,E),A=Sm(p,y);return((e,t,n)=>{if(Nm(e)){const{removeActionPayload:e,target:s}=t;Yf(n,{removeActionPayload:e,target:s})}})(A,{removeActionPayload:l,target:p},s),s.push(A),s})),hg((()=>(Lm(s),Zf(s,n),setTimeout((()=>(e=>{aI.isExternalObject(e)&&Us.setNeedsMapping(!1)})(t))),a={},s=[],s))))})))},yO=(e,t)=>{const{assignmentID:n,actionID:s,caseID:a,context:r,additionalHeaders:o={},jsActionQueryParams:i}=e,{state$:c}=t,l=pm.PAGE,u="executeObjectWideAction",d={assignmentID:n,actionID:s,viewType:l,objectID:a};let{restApi:p}=ES(u,d);const{reqType:g}=ES(u,d);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=mI(i,p),e.viewType=l;const{content:h}=fm(r,{isObjectWideAction:!0}),f=c.value.data[r]?.objectInfo?.headers||{},{etag:m}=f,I={"if-match":m,...o};return Kl(rd(p,{method:g,body:h,headers:I},r)).pipe(hg((t=>{const{data:n,headers:s}=t;return Us.analyseResponse(t.data),{actionInPayload:e,response:n,headers:hm({...I,...s})}})),Og("Error occurred during ajax call at executeObjectWideAction Epic : ",r))},AO=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:Kp(e)}},{RESOURCE_TYPES:CO}=Fs,SO=(e,t)=>{let n=0,s=[],a={},r="";return e.pipe(Tg(vr),gg((e=>{if(({actionMgrID:n}=e.payload),r=e.payload.context,Cu({context:r,stateObj:ZA(r),clearContextMessages:!0}),!Zm(r)){const t={type:Fs.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $p.rejectActionByID(n,!0,t),Gh.handleDeferredActionCompletion(e.payload.context),Eg([])}return Eg(e.payload).pipe(fg((e=>{OT(s,e);const n={...e};return yO(n,{state$:t})})),fg((async e=>{if(e?.type===Ta){const t=Cm(e);return s.push(t),s}bh.clearContextedCache(r);const{headers:t,actionInPayload:o,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:u}=o,d=iy(c);o.target=d,fC.setIn(i.data,Vs.OBJECT_INFO_IS_LOCAL_ACTION,!1),mD({submitResponse:i});let p=mf(i,{[Fs.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const g=Yp(p),h=Ws(o.context),f=KE(h)[0]?GE(KE(h)[0]):h,m=(e=>{const t=Jp(e);return oI(t)&&iI(Vy.getOperatorIdentifier(),t)})(p),I=u&&!m;!l||u||MT(o.context,f)||(p=vm(p,ZA(c)));const E=mm(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&fC.setIn(e,Fs.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),fC.setIn(e,Fs.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(E.data,o),E.caseClassName=g,E.resourceType=CO.ASSIGNMENT,E.headers=t;const y=Kp(p);Qp(E,p);const A=mS(Mr,{caseClassName:g}).replace(/{.+?}/,String(Gf(y)));p.semanticURL=A,E.semanticURL=A,await kT(o,E,!1,y,p,s,e,i,!0),I&&(a=LT(o),NT({caseId:o.caseID,caseType:o.caseTypeID,assignmentId:o.assignmentID})),((e,t)=>{const n=Yp(e?.response),s=Jp(e?.response),{caseTypeID:a}=s,r=Vy.getFeatureMap();(r?.deferUpdateCaseSummaryView??!Object.hasOwn(r,Vs.DEFER_UPDATE_CASESUMMARY_VIEW))&&a&&OA(Vs.CASESUMMARY_VIEW_NAME,a)&&nm(t,e?.actionInPayload,e?.response,{caseClassName:n})})(e,s),Gh.handleDeferredActionCompletion(r),BT(E,o,f);const C=AO(p,o);return Vh({...C,containerItemID:c}),xT(s,{transientItemID:c,target:d,isModalAction:l}),s})),hg((()=>{const e=s.find((e=>e.type===Ta));return e?(Gh.handleDeferredActionCompletion(r),$T(e),$p.rejectActionByID(n)):$p.resolveActionByID(n,a),Lm(s),Us.setNeedsMapping(!1),s=[],a={},s})))})))},_O=(e,t)=>{const{insKey:n,headers:s,context:a,debugInfo:r,viewType:o}=e,{removeActionPayload:i}=t,c=e.pageName?e.pageName:Vs.VIEW_NAMES.PY_DETAILS,l=ES(Lr,{objectID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),Kl(rd(u,{method:d,headers:{...s,...r&&{...Yu.addDebugHeaders(r)}}},a)).pipe(hg((t=>(Us.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:hm({...s,...t.headers}),removeActionPayload:i}))),Og("Error occurred during ajax call at getObject Epic : ",a))},NO="GET_OBJECT",{RESOURCE_TYPES:TO}=Fs,DO=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:s,type:a,response:r,removeActionPayload:o,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,d=Lf(Lr,n),p=jr(d,c);if(jf(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:s},actionInPayload:a,actionInPayload:{context:r,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Lf(Lr,a),l=jr(c,r),u=qE(s);await Im({directUrlUpdation:!o,semanticURL:n},a,{acName:l,containerName:c,target:l,context:u}),e.push(ZC(WC,{containerItemID:s,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:n});else{const e=_m(p,d,c,{buildNew:!0}),s=mf(r),a=(e=>{const t=Kp(e),n=Yp(e);let s=mS(Lr,{objectClassName:n});return s=s?.replace("{objectID}",String(Gf(t))),s})(s);s.semanticURL=a,s.directUrlUpdation=!l;const g={acName:p,context:e};await Im(s,n,g);const h=mm(s,{target:p,context:e,containerItemID:e,semanticURL:a,headers:i,debugInfo:u});h.caseViewMode=Vs.REVIEW_MODE,h.resourceType=TO.OBJECT,Qp(h,s);const f=Sm(p,h);o.containerItemID&&Nm(f)&&t.push(ZC(qC,{containerItemID:o.containerItemID,target:p})),t.push(f)}const g=n.insKey;jh({caseKey:g,actionInContext:c})},PO=e=>{let t=0,n=[];return e.pipe(Tg(NO),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{context:n,isChild:s,viewType:a}=e,r=Lf(Lr,e),o=jr(r,n);return Kl("none"!==a?Dm(o,{loadingContext:n}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0})).pipe(fg((({continueExecution:n,removeActionPayload:r})=>{if(!n)return $p.rejectActionByID(t),Dg;const{activate:i,activateContainerActionPayload:c}=Om(TO.OBJECT,o,e);return i&&!s&&"none"!==a?Eg({type:Fa,activateContainerActionPayload:c,actionInPayload:e}):_O(e,{removeActionPayload:r})})))})),fg((async e=>{if(e&&kf(e.type))return n.push(Cm(e)),n;if("none"===e?.actionInPayload?.viewType){const t=ZA(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==Vs.PERFORM_MODE){const t=mf(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:hr,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),n.push(ZC(DC,s));const a=iy(e?.actionInPayload?.context),r=Uf(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:r});if(Xp(e?.actionInPayload?.context)){const t=mm(e?.response,{...o});Mm({...t,isArrayDeepMerge:!0},n)}}}else await DO(e,n);return n})),hg((()=>(XA(n),Zf(n,t),n=[],n))))},OO="OPEN_OBJECT_ACTION",RO=e=>{const{actionID:t,caseID:n,context:s,openActionType:a,modalLoadingContainer:r}=e,o=pm.FORM,i=ES(Ur,{objectID:n,actionID:t,viewType:o}),{reqType:c}=i;let{restApi:l}=i;e.actionType=Vs.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${o}`:`${l}?viewType=${o}`);const u=r?.context??s;return Kl(rd(l,{method:c,headers:{}},u)).pipe(hg((t=>(Us.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:hm(t.headers)}))),Og(`: Error occurred during ajax call at ${a} Epic : `,u))},bO=async(e,t,{headers:n,actionInPayload:s})=>{const{context:a,actionName:r,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=s,l=mf(e,{info:Fs.OBJECT_INFO.OBJECT_INFO}),u=Lf(o,s),d=c?.target??jr(u,a),{context:p,containerItemID:g,isNewContainerItem:h}=((e,t,n,s)=>{let a,r,o=!1;const i=ZE(e);return!ey(e)||i&&!UE(e,s)?(r=Hs(t,n),Vf(t)&&(r=Ks(n,r)),a=r,o=!0):(a=i?VE(e,s):GE(e),r=qE(a)),{context:r,containerItemID:a,isNewContainerItem:o}})(d,u,a,e.data.objectInfo.ID),f={acName:d,target:d,containerName:u,context:p};await Im(l,s,f);const m=l.uiResources?.root,I=(e=>e?Vs.PERFORM_MODE:Vs.REVIEW_MODE)(m),E=mm(l,{target:d,context:p,containerItemID:g,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:r,isMinimizable:!1,isInCreateStage:Vf(u),resourceType:Fs.RESOURCE_TYPES.OBJECT,isProcessAction:s.isProcessAction,showProgress:s.showProgress,progressMessage:s.progressMessage,actionType:s.actionType});if(m&&Qp(E,l),Vf(u)&&delete E.doDeleteCaseSummary,t.push(ZC((e=>e?MC:kC)(h),E)),h||t.push(ZC($C,E)),h){const a=KE(s.contextName),r=VE(a,e.data.objectInfo.ID);if(r){const e={data:{objectInfo:{headers:n}},context:r};t.push(ZC(DC,e))}}return g!==GE(d)&&t.push(ZC(WC,{target:d,containerItemID:g})),Xp(g)&&!c?.context&&Mm(E,t),t},vO=e=>{e.openActionType=Ur;if(Lf(e.openActionType,e)===Vs.MODAL){const t=Lf(e.openActionType,e),n=jr(t,e.context),s=Ks(e.context,Hs(t,e.context));return XA(MC({target:n,context:s,containerItemID:s,key:e.caseID,caseViewMode:Vs.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:Vs.getProperty(Vs.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),XA(BC({context:s})),e.modalLoadingContainer={target:n,context:s},RO(e)}return RO(e)},xO=e=>{let t=0,n=[];return e.pipe(Tg(OO),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>vO(e))),fg((async e=>{if(kf(e.type)){const t=Cm(e);n.push(t);const s=ZA(e.payload.context);return s?.context_data?.isLoading&&n.push(ZC($C,e.payload)),n}const{actionInPayload:t,headers:s,response:a}=e,{actionID:r}=t;return fC.setIn(a,"data.objectInfo.activeActionID",r),fC.setIn(a.data,Vs.getProperty(Vs.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&fC.setIn(a.data,Vs.getProperty(Vs.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await bO(a,n,{headers:s,actionInPayload:t}),UD(t),n})),hg((()=>(XA(n),Zf(n,t),n=[],n))))},wO=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Vs.MODAL:t||Wp.getTargetViewContainerName(Fr)},MO=(e,t)=>{const{class:n,context:s,viewType:a=pm.PAGE}=e,{removeActionPayload:r}=t,o=e?.pageName?e?.pageName:Vy.getDefaultCasePage();return Kl(hp.createCase(n,{...e,pageName:o,viewType:a,context:s,retrieveActionViewForNewObject:!0})).pipe(hg((({response:t,headers:n})=>(Us.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:r}))),Og("Error occurred during ajax call at createObject Epic : ",s))},LO="CREATE_EXTERNAL_OBJECT",UO=e=>{let t=0,n=[],s=!1;return e.pipe(Tg(LO),Rg(100),hg((e=>(({actionMgrID:t}=e.payload),e.payload))),fg((e=>{const{context:n}=e,a=wO(e),r=jr(a,n);return s=!1,Kl(AT(r,{loadingContext:n})).pipe(fg((({continueExecution:n,removeActionPayload:a,dirtyCheckPerformed:r})=>n?(s=r,MO(e,{removeActionPayload:a})):($p.rejectActionByID(t),Dg))))})),fg((async e=>{if(e&&e.type===Ta)return e.payload.context=Ny(),n.push(Cm(e)),n;const{actionInPayload:a,response:r,headers:o,removeActionPayload:i}=e,c=YT(a,r);fC.setIn(r.data,Vs.getProperty(Vs.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=wO({...a,isInCreateStage:c}),u=jr(l,a.context),d=_m(u,l,a.context);if(!s&&!Vf(l)&&XE(u)){const{continueExecution:e}=await Dm(u,{loadingContext:a.context});if(!e)return $p.rejectActionByID(t),n}const p=mf(r);let g=mS(Fr,{caseClassName:Yp(p)});g=g.replace(/{.+?}/,String(Gf(Kp(p)))),p.semanticURL=g,qT(p,a);const h={acName:u,context:d};await Im(p,a,h);const f={target:u,context:d,headers:o,semanticURL:g,caseViewMode:zT(p),containerItemID:d,isInCreateStage:c,isMinimizable:c,assignmentContext:fC.getIn(p,ET),nextAssignmentInfo:fC.getIn(p,IT),resourceType:Fs.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo,isExternalObjectCreationFlow:!0};Qp(f,p);const m=mm(p,f),I=Sm(u,m);return Nm(I)&&Yf(n,{removeActionPayload:i,target:u}),n.push(I),n})),hg((()=>(Lm(n),Zf(n,t),n=[],n))))},FO=e=>{const{workId:t,context:n,isExternalCase:s}=e,a=s?Za:"deleteWork",{restApi:r,reqType:o}=ES(a,{ID:t});return Kl(rd(r,{method:o},n)).pipe(hg((t=>({response:t.data,actionInPayload:e,headers:hm(t.headers)}))),Og("Error occurred during ajax call at deleteWork Epic : ",n))},VO=e=>{vu.publish(Vs.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},jO=e=>{let t,n=0,s=[];return e.pipe(Tg(og),hg((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),fg((e=>{if(!e.skipDeleteConfirmation&&!e.ignoreWorkDeletion){const s=PE.MODAL,a=jr(s,e.context),r=Ks(e.context,Hs(s,e.context));return XA([ZC(MC,{target:a,context:r,containerItemID:r,containerName:s,isDeleteConfirmation:!0,actionName:"Delete",workId:e.workId,caseTypeID:t,className:e.className,keys:e.keys,...e.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:t}}})]),$p.resolveActionByID(n),Dg}return e.ignoreWorkDeletion?Eg({actionInPayload:e}):FO(e)})),fg((async e=>{if(e&&kf(e.type)){const{payload:t}=e;return s.push(Cm({...e,...t,actionMgrID:n})),s}const{actionInPayload:t}=e,{context:a}=t;if(_T({content:Gy().getLocaleValue("Deleted successfully!","Messages")}),a?.includes(Vs.PREVIEW)&&s.push(ZC(wC,ay({context:Vs.APP.APP,name:Vs.PREVIEW}))),a?.includes(Vs.MODAL)){const e=PE.MODAL,t=jr(e,a),n=xE(t,a);n?.enableBackNavigation&&window?.history?.back()}return s})),hg((()=>(XA(s),Zf(s,n)===Vs.PROMISE_VALUE.RESOLVE&&VO({caseTypeID:t}),s=[],s))))},kO=((...e)=>(t,n)=>new bl((s=>{const a=e.map((e=>e(t,n).subscribe(s)));return()=>{a.forEach((e=>e.unsubscribe()))}})))(...pT,...jP,...HP,...uO,...eO,...hT,...dO,...gO,...fO,...[EO,PO,SO,xO,UO,jO]),BO=()=>e=>t=>{const{type:n="",payload:s={}}=t||{},{category:a,context:r,transientItemID:o}=s;"HTTP"!==a&&[Oa,Va,Ra,ka,va,Ua].includes(n)&&(Wm(r||o),hu.removeContextTreeNode(r||o),n!==Oa&&n!==Ra||-1===s?.target?.indexOf("modal")||vu.publish(Fs.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,n)),e(t)},$O={},GO=e=>{const t=fC.getIn($O,[Vs.CONTEXT,e],[]),n=[];t.forEach((t=>{const s=t.substr(0,t.lastIndexOf("_")),a=fC.getIn($O,[s,t],[]),r=a&&a.length>0&&a.indexOf(e);if(r>-1&&a.splice(r,1),!a||a&&0===a.length){fC.deleteIn($O,[s,t]);const e=fC.getIn($O,[s]);e&&0===Object.keys(e).length&&fC.deleteIn($O,[s]),n.push({dataPageName:s,dataPageNameWithHash:t})}})),fC.deleteIn($O,[Vs.CONTEXT,e]);const s=fC.getIn($O,[Vs.CONTEXT]);(!s||s&&0===Object.keys(s).length)&&fC.deleteIn($O,[Vs.CONTEXT]),n.length>0&&XA(nS({dataPagesToBeRemoved:n}))},WO=(e={},t)=>{Object.keys(e).forEach((n=>{const s=fC.getIn(e,[n],{});Object.keys(s).forEach((e=>{((e,t,n)=>{const s=fC.getIn($O,[Vs.CONTEXT,n]);if(fC.getIn($O,[e])){const s=fC.getIn($O,[e,t],[]);fC.setIn($O,[e,t],[...new Set([...s,n])])}else fC.setIn($O,[e,t],[n]);s?fC.setIn($O,[Vs.CONTEXT,n],[...new Set([...s,t])]):fC.setIn($O,[Vs.CONTEXT,n],[t])})(n,e,t)}))}))},HO=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:s=[]}={},type:a}=e;if(((e,t)=>{t&&t.length>0&&(e===ka||e===Ra)&&t.forEach((e=>{GO(e)}))})(a,s),a===Oa||a===Ca||a===dr){const e=a===dr?t:t.shared;WO(e,n)}else a===ka?(GO(n),WO(t.shared,n)):a===Ra&&GO(n)})),e(t)},{PUB_SUB_EVENTS:qO}=Fs,zO=e=>t=>n=>{const{type:s,payload:{target:a,containerItemID:r,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={newAccessedOrder:new Array,containerType:""},eventName:u}={}}=n;s===Ra&&((e,t,n,s,a,r)=>{const{resourceType:o,key:i,context:c}=fC.getIn(e.getState(),["containers",t,"items",n])||{},l={resourceType:o,key:i,context:c,containerItemID:n,...void 0!==s?{eventName:s}:{}};vu.publish(qO.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,l),t===`${Fs.APP.APP}/${Vs.PRIMARY}`&&r===Vs.CONTAINER_TYPE.MULTIPLE&&vu.publish(qO.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:i,newAccessedOrder:a})})(e,a,r,u,c,l),((e,t)=>{t&&t.length>0&&(e===ka||e===Ra)&&t.forEach((e=>{e&&wh.cleanCaches(e)}))})(s,i),s!==ka&&s!==Ra||!o||wh.cleanCaches(o),t(n)},YO=(e,t,n,s)=>{e&&t&&(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,e)})({caseId:e,caseClass:n,context:s||""})},KO=e=>{e&&(e=>{vu.publish(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,e)})({caseId:e})},QO=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t){const{type:e,payload:n}=t,{target:s,key:a,context:r,data:o}=n||{};if((e=>e===`${Vs.APP.APP}/${Vs.PRIMARY}`)(s)){const t=o?.caseInfo?.ID,n=r||"",s=nC(Vs.CASE_INFO.CASE_INFO_ID,"",n)||"",i=o?.caseInfo?.caseTypeID||"";e!==ka&&e!==Ra||KO(s),e!==Oa&&e!==ka||YO(a,!!t,i,n)}}e(t)},JO=()=>e=>t=>{const{payload:{context:n=null,transientItemID:s=null,clearStateMachine:a=!0}={},type:r}=t;n&&(r===Oa||r===Va||r===ka||r===Ra)&&a&&(wd(n),vd(n)),s&&r===Ma&&(wd(s),vd(s)),e(t)},XO=e=>fC.getIn(e,Vs.CASE_INFO.ASSIGNMENT_ID),ZO=e=>{Object.keys(fh.subscribers).forEach((t=>{"COACH_UPDATE"===fh.subscribers[t].filter.matcher&&fh.subscribers[t].filter.criteria?.caseId===e&&fh.unsubscribe(t)}))},eR=(e,t)=>{if(n=t.target,n?.toString().includes(Vs.MODAL))return;var n;const{context:s,data:a,resourceType:r,caseID:o}=t;e===Oa?((e,t,n)=>{if(n===Vs.RESOURCE_TYPES.ASSIGNMENT){const n=XO(t),s=fC.getIn(t,["caseInfo","ID"]);n&&s&&Bh({actionInContext:e,assignmentID:n,caseKey:s})}else if(n===Vs.RESOURCE_TYPES.CASE&&e?.includes("workarea")){const n=fC.getIn(t,["caseInfo","ID"]),s=XO(t);n&&s&&Bh({actionInContext:e,assignmentID:s,caseKey:n})}})(s,a,r):e===Va?((e,t,n)=>{if(n!==Vs.RESOURCE_TYPES.ASSIGNMENT)return;const s=XO(ZA(e)),a=XO(t),r=fC.getIn(t,["caseInfo","ID"]);s&&s!==a&&$h({actionInContext:e,assignmentID:s,caseKey:r}),a&&r&&Bh({actionInContext:e,assignmentID:a,caseKey:r})})(s,a,r):e===Ra&&o?((e,t)=>{if(e?.includes("workarea")){const n=XO(ZA(e));n&&$h({actionInContext:e,assignmentID:n,caseKey:t})}else ZO(t)})(s,o):e===ka&&o&&((e,t,n,s)=>{if(e?.includes("workarea")){const t=XO(ZA(e));t&&$h({actionInContext:e,assignmentID:t,caseKey:s})}else ZO(s);if(n===Vs.RESOURCE_TYPES.ASSIGNMENT){const n=XO(t);n&&Bh({actionInContext:e,assignmentID:n,caseKey:s})}})(s,a,r,o)},tR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t){const{type:e,payload:s}=t;"object"==typeof(n=s)&&null!==n&&eR(e,s)}var n;e(t)},nR=[ha,ma,Ea,"DELETE_CASE_IN_CREATE_STAGE",ya,Aa],sR=new Set([Oa,ka,Va,Ra,fa,_r,ea,gr,...nR]),aR=(e,t)=>{if(!(e=>{const t=e?.data?.caseInfo?.settings?.autoSave;if(null!=t)return Boolean(t);const n=e?.containerItemID??e?.context;if(n){const e=nC("caseInfo.settings.autoSave",null,n);if(null!=e)return Boolean(e)}return!1})(t))return!1;const n=t.containerItemID||e,s=t.target||iy(n),a=xE(s,n),r=t.resourceType||a?.resourceType,o=t.key||a?.key;return r===Vs.RESOURCE_TYPES.ASSIGNMENT&&Boolean(o)},rR=(e,t,n)=>{e===Oa||e===ka||e===Va&&t.data?(ZI(n)&&eE(n),e===ka&&tE(n),aR(n,t)&&((e,t)=>{0===jI.size&&"undefined"!=typeof document&&(document.addEventListener("pointerdown",QI,{passive:!0}),document.addEventListener("keydown",JI,{passive:!0}),document.addEventListener("input",XI,{capture:!0,passive:!0})),jI.set(e,t)})(n,{containerName:t.containerName??""})):e===Ra&&(ZI(n)&&eE(n),tE(n))},oR=(e,t)=>{if(e!==Ra||!t.includes(Vs.MODAL))return;const n=Qs(t),s=`${n}/`;for(const e of WI)(e===n||e.startsWith(s))&&aE(e)},iR=(e,t,n)=>{e!==fa?e!==_r?nR.includes(e)&&nE(n):(e=>{nE(e),WI.add(e)})(n):t.autosave||nE(n)},cR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t&&"string"==typeof t.type&&sR.has(t.type)&&("object"==typeof(n=t.payload)&&null!==n)){const{type:e,payload:n}=t,s=((e,t)=>e===ya?t.saveActionPayload?.containerItemID:e===Aa?t.saveContainerItemID??t.context:t.containerItemID??t.context)(e,n);s&&(oR(e,s),rR(e,n,s),ZI(s)&&(((e,t)=>{if(t.context)e===ea?(op(t.context,null),sE(t.context)):e!==gr||t?.isDefault||t?.skipDirtyValidation||sE(t.context)})(e,n),iR(e,n,s)))}var n;e(t)},lR=(()=>{const e=new Ag;let t=null,n=null;const s=s=>(n=s,t=new Ng(e.asObservable(),s.getState()),n=>a=>{const r=n(a);var o;return t?.next(s.getState()),"object"==typeof(o=a)&&null!==o&&"type"in o&&"string"==typeof o.type&&e.next(a),r});return s.run=s=>{if(!t||!n)throw new Error("Epic middleware must be added to the store before calling run().");return s(e.asObservable(),t).subscribe((e=>{n?.dispatch(e)}))},s})(),uR=e=>{if(null!==JA())return void pC();const t=[_E.propertyChangeMiddleware,BO,HO,JO,lR,tR,cR,QO,zO],n=pN({reducer:nT(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(IN).concat(IN)});lR.run(kO),QA(n)},dR=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],pR=e=>dR.includes(e.split("-")[0])?"rtl":"ltr";const gR=async function(e){if(!e)return;const t=Vy.getLocale();Vy.setLocale(e);const n=Vy.getLocale();if(n&&n!==t){if(LS(["lang"]),"undefined"!=typeof window){const e=new URL(window.location.href);e.searchParams.set("lang",n),window.history.replaceState(window.history.state,"",e.toString())}Vy.isInfinityRuntime()&&await Fy.loadLocaleBundle([n]),await ky(n),"undefined"!=typeof document&&(document.documentElement.lang=n,document.documentElement.dir=pR(n)),XA({type:mr,payload:{locale:n}}),vu.publish(Vs.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:n,previousLocale:t})}};class hR{static EDIT_OPEN="edit_open";static EDIT_CLOSE="edit_close";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static init(e){e&&(this.collabConfig=e)}static dispatchCollaboratorAction=(e,t,n,s,a)=>{XA({type:"LIST_ACTION",payload:{instruction:e,context:t,referenceList:s,listIndex:n,content:a,skipDirtyValidation:!0}})};static handleCaseCollaboratorsUpdate(e,t){const n=t?.message??{},[s,a]=Object.entries(n)[0];if(s===Vy.getOperatorIdentifier())return;const r={ID:s,state:a},o=nC(Vs.CASE_INFO.CASE_INFO_COLLABORATORS,"",e)||[],i=o.findIndex((e=>e.ID===s));if(-1!==i)"closed"===a?this.dispatchCollaboratorAction("DELETE",e,i,Vs.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",e,null,`${Vs.CASE_INFO.CASE_INFO_COLLABORATORS}[${i}]`,r);else{if("closed"===a)return;this.dispatchCollaboratorAction("INSERT",e,o.length,Vs.CASE_INFO.CASE_INFO_COLLABORATORS,r)}}static subscribeToCollaborators(e,t){const n=fh.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},(e=>this.handleCaseCollaboratorsUpdate(t,e)));this.caseCollabSubIds[e]=n}static unsubscribeToCollaborators(e){fh.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e]}static publishCaseEvent(e,t){fh.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:t}},message:e})}static subscribeToEvent(e,t,n){let s=null;if(e===Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN||e===Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE?s=e=>this.publishCaseEvent(t,e):e===Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?s=e=>{const{caseId:t,context:n}=e;this.caseCollabSubIds[t]||this.subscribeToCollaborators(t,n)}:e===Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(s=e=>{const{caseId:t}=e;this.caseCollabSubIds[t]&&this.unsubscribeToCollaborators(t)}),!s)throw new Error(`Unhandled eventKey: ${e}`);vu.subscribe(e,s,n)}static unsubscribeFromEvent(e,t){vu.unsubscribe(e,t)}static subscribeToCaseEvents(){hR.collabConfig?.appEnabled&&hR.collabConfig?.portalEnabled&&(this.subscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CLOSE,"case_edit_close"))}static unsubscribeToCaseEvents(){hR.collabConfig?.appEnabled&&hR.collabConfig?.portalEnabled&&(this.unsubscribeFromEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(Vs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"))}}const fR=hR;const mR=new class{#C(e,t,n,s,a){let r=!1;return e.IncludeInURL&&void 0!==t&&(s[e.Key]=t,"portal"===e.Key&&t!==n&&(r=!0)),Array.isArray(e.IncludeInHeaders)&&void 0!==t&&e.IncludeInHeaders.forEach((n=>{a[n.Value]||(a[n.Value]=[]),a[n.Value].push(`${e.Key}=${t}`)})),r}#S(e,t,n){const s={},a={};let r=!1;return Array.isArray(e)&&e.forEach((e=>{const o=t[e.Key];this.#C(e,o,n,s,a)&&(r=!0)})),{urlParams:s,headerMap:a,isPortalChanged:r}}#_(e){const t=kp.getComponentCache("lastActionID");return gh.truncateNamespace(e)===gh.truncateNamespace("string"==typeof t?t:(t??"").toString())}#N({message:e}){const{RequestContext:t,ActionName:n}=e;if(!this.#_(n))return;const s=JSON.parse(t),a=Vy.environmentInfoObject?.requestContext,r=new URL(window.location.href).searchParams.get("portal"),{urlParams:o,headerMap:i,isPortalChanged:c}=this.#S(a,s,r);kp.setURLParams(o),Object.entries(i).forEach((([e,t])=>{Yu.registerHeader(e,t.join("; "))})),kp.setComponentCache("lastActionID",""),c&&globalThis.location.reload()}subscribeToGlobalEvents(){const e=fC.generateUniqueID(),t={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:Vy.getOperatorIdentifier()||""}};fh.subscribe(t,this.#N.bind(this),void 0,e)}},IR={publishConstellationLoadedEvent:()=>{vu.publish(Vs.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const ER=new class{activateContainerItemOnSwitch(e){const t=`${Vs.APP.APP}/${Vs.PRIMARY}`,n={target:t,containerItemID:VE(t,e)};xf({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${Vs.APP.APP}/${Vs.PRIMARY}`,n={target:t,containerItemID:VE(t,e)};xf({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=xf({meta:{type:"PreviewViewContainer",config:{name:Vs.PREVIEW}},options:{context:Vs.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:Vs.PRIMARY,context:Vs.APP.APP}),BE(Vs.APP.APP,Vs.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:Vs.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){xf({}).getPConnect().getContainerManager().resetContainers({name:Vs.PREVIEW,context:Vs.APP.APP})}isFormDirty(e){const t=`${Vs.APP.APP}/${Vs.PRIMARY}`,n=Py(t,e);return km.isStateModified(n)}getEventUtils(){return IR}getBroadcastUtils(){return mT}isTraditionalUICase(e){return em(e)}};const yR=class{static openCase(e,t=Fs.APP.APP,n={}){return n.renderInline=!0,n.pageName?(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(n.pageName)),n.pageName=Ls.getDefaultQualifiedName(n.pageName)):(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),n.pageName=Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),n?.disableAssignmentHeader?Vy.disableAssignmentHeader(n.disableAssignmentHeader):Vy.disableAssignmentHeader(!1),dh.openCase(e,t,Vs.PRIMARY,n)}static createCase(e,t=Fs.APP.APP,n={}){return n.renderInline=!0,n.pageName?(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(n.pageName)),n.pageName=Ls.getDefaultQualifiedName(n.pageName)):(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),n.pageName=Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),n?.disableAssignmentHeader?Vy.disableAssignmentHeader(n.disableAssignmentHeader):Vy.disableAssignmentHeader(!1),dh.createCase(e,t,Vs.PRIMARY,n)}static getNextWork(e=Fs.APP.APP,t={}){return t.renderInline=!0,t.pageName?(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(t.pageName)),t.pageName=Ls.getDefaultQualifiedName(t.pageName)):(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),t.pageName=Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),t?.disableAssignmentHeader?Vy.disableAssignmentHeader(t.disableAssignmentHeader):Vy.disableAssignmentHeader(!1),dh.getNextWork(e,Vs.PRIMARY,t)}static openAssignment(e,t=Fs.APP.APP,n={}){return n.renderInline=!0,n.pageName?(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(n.pageName)),n.pageName=Ls.getDefaultQualifiedName(n.pageName)):(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),n.pageName=Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),n?.disableAssignmentHeader?Vy.disableAssignmentHeader(n.disableAssignmentHeader):Vy.disableAssignmentHeader(!1),dh.openAssignment(e,t,Vs.PRIMARY,n)}static openPage(e,t,n=Fs.APP.APP,s={}){const a=na;s?.defaultCasePage?(Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(s.defaultCasePage)),s.defaultCasePage=Ls.getDefaultQualifiedName(s.defaultCasePage)):Vy.setDefaultCasePage(Ls.getDefaultQualifiedName(Vs.PY_DETAILS)),s?.disableAssignmentHeader?Vy.disableAssignmentHeader(s.disableAssignmentHeader):Vy.disableAssignmentHeader(!1);const r={viewName:e,className:t,acTargetName:Vs.PRIMARY,actionMgrID:$p.getNextActionMgrId(),context:n},{promise:o}=$p.actionManagerPromise(a,r.actionMgrID);return XA({type:a,payload:{...r}}),o}static getCurrentContextAPI(e,t=Fs.APP.APP){return xf({meta:{config:{}},options:{context:t,pageReference:e,containerName:Vs.PRIMARY}}).getPConnect()}};function AR(e){if(!e||"*"===e||"null"===e)return"";try{const t=new URL(e);return"https:"!==t.protocol&&"http:"!==t.protocol||"null"===t.origin?"":t.origin}catch{return""}}function CR(e){if(e.contentRect)return{height:e.contentRect.height};const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize;return"blockSize"in t?{height:t.blockSize}:"height"in t&&"number"==typeof t.height?{height:t.height}:{height:0}}const SR=new class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if("undefined"==typeof window)return;const{resizing:t,parentOrigin:n}=e;this.gadgetName=window.name,this.resize="stretch"===t,this.parentOrigin="",n?this.parentOrigin=AR(n):document.referrer?this.parentOrigin=AR(document.referrer):this.parentOrigin=AR(function(){try{const{ancestorOrigins:e}=window.location;if(e&&e.length>0)return e[0]??""}catch{}return""}());const s=document.getElementsByTagName("app-root")[0];s.classList.add("mashup"),window.parent!==window&&this.resize&&this._registerResizeObserver(s)}send(e){const{action:t,message:n}=e,s=JSON.stringify({gadgetName:this.gadgetName,action:t,message:n});window.parent.postMessage(s,this.parentOrigin||window.location.origin)}_registerResizeObserver(e){new ResizeObserver((e=>{for(const t of e){const e=CR(t);this.send({action:"resize",message:e})}})).observe(e)}_updateUrl(e){window.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:Vs.APP.ROOT,acName:"primary"})}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin)return!1;if("string"!=typeof e.data)return!1;let t;try{t=JSON.parse(e.data)}catch{return!1}return"UpdateUrl"===t.action&&this._updateUrl(t.message.url),!0}getMessageHandler(){return this.boundOnMessage}};"undefined"!=typeof window&&window.addEventListener("message",SR.getMessageHandler(),!1);const _R={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},NR={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},TR="portal-less-styles";const DR=new class{createC11nEnv=e=>xf(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>Co;getStateManager=()=>u;getActionCreators=()=>d;getStreamObservable=()=>r;getActionProcessor=()=>SC;getActionHandler=()=>CC;renderApp=(e,t)=>{const n={context:Vs.APP.APP},s={...fC.getIn(e,Vs.ROOT),options:n};uR(e),pp(e,n,!0);const a=this.createC11nEnv({meta:s,isRoot:!0});vu.publish(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:s,uiResources:a={}}=e,{root:r}=a,o=fC.getIn(a,Vs.CONTEXT_DATA),i=mf(e);await Im(i,{},{},!1,!0);const c={...s,[Vs.CONTEXT_DATA]:o};ly(r,t,c,n)};fetchEndPointResource=(e,t,n)=>{rd(e,{method:"GET"},Vs.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await wp(n);const s=this.createC11nEnv({meta:e,isRoot:!0});JA()||uR({}),vu.publish(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{bp.initServer(e,t,n)};loadView=async(e,t,n=[])=>{nn();const s=mf(e),a=fC.getIn(s,Vs.VIEWS),r=fC.getIn(s,Vs.NAVIGATIONS),o=fC.getIn(s,Vs.COMPONENTS)||[];o.push(...n);const i=fC.getIn(s,Vs.STATIC_SERVER_URL),c=fC.getIn(s,Vs.APPLICATION_DATA);a&&CA(a),r&&TA(r),(e=>{e&&(pS=e.pyLabel)})(c),i&&bp.initServer(i),await wp(o,i),this.renderApp(s,t)};initAppShell=(e,t,n)=>{wS(e),Wp.buildActionTargetMap(t),nn(n)};initRoutingTable=(e,t)=>{wS(e,!0),nn(t)};setAppAlias=e=>{bp.setAppAlias(e)};getHomeRestApi=e=>{const t=an(),{restApi:n}=IS("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(vS()&&!t){const t=xy(),s=Uy.processUrl(t,!0),a=Uy._getMatchedRouteInRoutingTable(s)||"",r=Uy.getRoutingInfo(),o=Uy.processUrl(t,!1).split("/"),i=o[o.length-1],c=r?.routes?.[a]?.payload?.caseID?.replace("{workID}",i).replace("{id}",i);n=Uy.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=Uy.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return an()+n};loadRootComponent=async(e,t,n=[],s,a,r)=>{const{config:o}=t||{},i=o?.name;if(JA()||uR({}),r){const e=`${Vs.APP.ROOT}/${i}`;Cy(e),Ay().deleteContainerItem(e)}(Ay().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&pC(),XA(DC({data:{},context:Vs.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:Vs.APP.ROOT,pageReference:"",target:`${Vs.APP.ROOT}/${i}`}}),l=c.getPConnect(),u=`${l.getContextName()}/${l.getContainerName()}`;GE(u)||"noPortal"===o?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const d=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await wp(d),vu.publish(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:s,styleSheetTarget:a})};loadViewByName=(e,t,n,s)=>{let a=this.getViewRestApi(e,n);a===an()&&(a=this.getHomeRestApi(t)),this.fetchEndPointResource(a,s)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{xS(e)};checkIfSemanticURL=()=>vS();onPCoreReady=e=>{vu.subscribe(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{vu.subscribe(Fs.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Hd.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{on(e)};setFetchDefaultHeaders=e=>{ud(e)};setFetchAuthInfo=e=>{dd(e)};getCaseApi=()=>dh;getMashupApi=()=>yR;enableAppRouting=e=>{hS(e)};initStore=()=>uR({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};getBootstrapConfigViaSB=async(e,t,n)=>{const s=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"";return rd(`${e}/api/application/v2/data_views/D_pxBootstrapConfig${s}`,{method:"GET",headers:new Headers(t)}).then((e=>{if(e.data)return e.data;throw Error("D_pxBootstrapConfig load failed.",{cause:e.status})}))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=xf({meta:_R,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,t=!0)=>{if(t){const t=document.querySelector(e)??document.getElementsByTagName(e)[0],n=t?.parentNode;if(n&&!document.getElementById(TR)){const e=document.createElement("style");e.id=TR,e.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",n.appendChild(e)}}await this.loadRootComponent(e,_R,[Vs.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&SR.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,t,n=[],s,a)=>{const{customRendering:r=!1,onPCoreReadyCallback:o,staticContentServerUrl:i,dynamicSetCookie:c=!1,renderingMode:l,locale:u,envType:d,themeID:p,customCookies:g,enableRouting:h}=e;let{restServerUrl:f,authInfo:m,authorizationHeader:I,appAlias:E,theme:y={}}=e,A=e.additionalHeaders?{...e.additionalHeaders}:{},C=null;const S=!I&&m&&!m.authType;if(m||(e.authInfo={},m=e.authInfo),(I&&0===Object.keys(m).length||g)&&(S||(m.authType="custom"),m.customCookies=g),!I&&m.tokenInfo?.access_token){const{tokenInfo:e}=m;I=`${e.token_type} ${e.access_token}`}if(m.tokenInfo?.csrf&&(A={...A,pzCTkn:m.tokenInfo.csrf}),E&&-1===E.indexOf("/")&&(E=`app/${E}`),"LAUNCHPAD"===d){A={...A,"X-Constellation-App":"Pega"},f=f.endsWith("/dx")?f:`${f}/dx`;const e=p?`?themeID=${p}`:"";globalThis.PCore&&(C=await this.getLPConfig(`${f}/api/application/v2/environmentInfo${e}`,I,A,g)),0===Object.keys(y).length&&C?.theme?.definition&&(y=JSON.parse(C.theme.definition).Theme)}else C=S?await this.preInitBootstrapConfig(e,E,A,p):await this.getBootstrapConfigExtended(E?`${f}/${E}`:`${f}`,I,A,p,g,u);const _=C?.pyConfigJSON?JSON.parse(C.pyConfigJSON):{...C};"LAUNCHPAD"===d&&await this.applyEnvironmentInfoResponse(_),_.restServerConfig=f,_.dynamicSemanticUrl=!1,_.dynamicSetCookie=c,_.enableRouting=!1,_.serviceConfig?Object.assign(_.serviceConfig,{contextPath:"",appAlias:E}):_.serviceConfig={contextPath:"",appAlias:E,staticContentServer:i,appStaticContentServer:"no-appstatic"},_.additionalHeaders={Authorization:I,...A},_.envType=d,_.dynamicLoadComponents=!r,_.dynamicSemanticUrl=!r,_.noHistory=!0,_.theme=y??{};const N=p&&_?.themeObject?_.themeObject:null;_.theme=N||y,_.renderingMode=l??_.renderingMode,_.locale=u||_.locale,e.semanticUrlArgs&&(_.semanticUrlArgs=e.semanticUrlArgs);const T=i||_.serviceConfig.staticContentServer;if(_.isSdk?(_.enableRouting=h,_.dynamicSemanticUrl=_.enableRouting,bp.initServer(i,"no-appstatic")):(_.serviceConfig.staticContentServer=T,_.serviceConfig.appStaticContentServer=_.serviceConfig.appStaticContentServer||"no-appstatic",bp.initServer(T,T)),"EMBED"===_.renderingMode&&m?.authentication_service&&"pega"!==m.authentication_service&&(_.routingInfo||(_.routingInfo={}),_.routingInfo.authServiceAlias=m.authentication_service),await vR.initCoreConfig(_),o&&vu.subscribe(Fs.PUB_SUB_EVENTS.EVENT_RENDER_APP,o,"renderAppCallback"),"LAUNCHPAD"===_.envType&&"EMBED"===_.renderingMode&&Vy.setIsWebEmbed(!0),m&&["OAuth2.0","custom"].includes(m?.authType)&&this.setFetchAuthInfo(m),!r){const e=Vy.environmentInfoObject?.pyInfinityStaticService;let r=null;if(e){const e=await Ih.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(e.data)&&e.data.length>0&&(r=e.data)}const o=new Promise((async(e,t)=>{try{const t=async()=>{await this.importReactRoot(),e(!0)};vu.subscribe("component-map-loaded",t),"ReactRoot"in Co.getLazyMap()&&e(!0)}catch(e){t(e)}}));await o,vR.initCoreContainers(),await this.loadRootContainerWithHybrid(t,n,s,a),r&&await Promise.all(r.map((({pyComponentMap:e,pxUpdateDateTime:t})=>bp.importCustomComponentMap(e,t))))}};loadRootContainerWithHybrid=(e,t=[],n,s)=>(t.push(Vs.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",Vs.LOAD_VIEW_STRING),this.loadRootComponent(e,NR,t,n,s));getBootstrapConfigExtended=async(e,t,n,s,a,r)=>{const o={};s&&(o.themeID=s),r&&(o.locale=r);const i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${s||r?`?dataViewParameters=${encodeURIComponent(JSON.stringify(o))}`:""}`,c=t?{Authorization:t,...n}:n;return fetch(i,{method:"GET",headers:new Headers(c),credentials:t&&!a?"same-origin":"include"}).then((e=>{if(e.ok)return e.json();throw Error("D_pxBootstrapConfig load failed.",{cause:e.status})}))};getLPConfig=async(e,t,n,s)=>{const a=new Headers({...n,...t&&{Authorization:t}}),r=await fetch(e,{method:"GET",headers:a,credentials:t&&!s?"same-origin":"include"});if(!r.ok)throw new Error("environmentInfo load failed.",{cause:r.status});return r.json()};applyEnvironmentInfoResponse=async e=>{const{environmentInfo:t,pyCaseTypeList:n,theme:s,keyMapping:a}=e,{pxApplication:r,features:o,pxLocale:i}=t,c={simpleTable:{pageInstructionUUIDGeneration:!1},...o},l=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),u="ETC/UNKNOWN"===l?"America/New_York":l;e.environmentInfo={...t,pxApplication:{...r},features:c,pyCaseTypeList:n,pxLocale:{...i,pyTimeZone:u}},e.timezone=u;const d=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every((e=>d.includes(e))),theme:s,keyMapping:a,features:c}};importReactRoot=async()=>{const e=[];return Co.getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};preInitBootstrapConfig=async(e,t,n,s)=>{const{restServerUrl:a,customRendering:r=!1,staticContentServerUrl:o,dynamicSetCookie:i=!1,authInfo:c,renderingMode:l,locale:u,timezone:d="America/New_York",envType:p,theme:g={}}=e,h=s??null,f={restServerUrl:a,restServerConfig:a,dynamicSetCookie:i,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:t,staticContentServer:o,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:p,dynamicLoadComponents:!r,dynamicSemanticUrl:!r,noHistory:!0,themeIDObj:h,theme:h||g,renderingMode:l,locale:u,timezone:d,tokens:{C11NB2S:""}};return bp.initServer(o,"no-appstatic"),await vR.init(f),c&&["OAuth2.0","custom"].includes(c?.authType)&&this.setFetchAuthInfo(c),this.getBootstrapConfigViaSB(t?`${a}/${t}`:`${a}`,n,s)}};const PR=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer??null,this.contextPath=e.contextPath,this.messagingService=e.messagingService??null,this.reAuthUrl=e.reAuthUrl??null}};const OR=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.portalTemplate=e.portalTemplate,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=e.dynamicLoadComponents??!0,this.dynamicSemanticUrl=e.dynamicSemanticUrl??!0,this.enableRouting=e.enableRouting??!0,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode??"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping??{},this.envType=e.envType,this.serviceConfig=new PR(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.enablePriorityAndUrgencyImprovements=e.enablePriorityAndUrgencyImprovements??!1,this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1,this.collab=e.collab,this.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},RR="@P .viewConfig";let bR=0;const vR=new class{async init(e){const t=new OR(e);hS(t.enableRouting),uR({}),Hd.updateFieldDefaults(t.fieldDefaults),Hd.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),this.#T(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl});const{appAliasWithoutServlet:n,appAlias:s,googleMapKey:a,staticContentServer:r,appStaticContentServer:o}=t.serviceConfig;bp.setAppAlias(n||s),on(a),bp.initServer(r,o,t.tokens.C11NB2S),Bs.setRemoteCaseMapping(t.remoteCaseMapping),fR.init(t.collab),fR.subscribeToCaseEvents(),gh.subscribeToCaseEvents(),fh.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),t.initBroadcast&&ER.getBroadcastUtils().init(),Yu.setDefaultHeaders(t.additionalHeaders),Yu.setRequestContext(t.requestContext),"Infinity"===t.envType&&await this.loadEnvironmentInfoFromDataPage(t);const i={...t.environmentInfo,encCSRFToken:t.pzencv1zzz,renderingMode:t.renderingMode,...t.portalTemplate?{pyPortalTemplate:t.portalTemplate}:{}};if(i.pyCaseTypeList?.forEach((e=>{const t=e.pyWorkTypeImplementationClassName;t&&(e.localeReference=pf(uf,t))})),i.features?.isNamespaceEnabled&&(t.additionalHeaders.Prefer="namespaced",Yu.setDefaultHeaders(t.additionalHeaders)),t.theme){const e=t.theme,n=e.light,s=e.dark;void 0!==n&&void 0!==s?(this.#D(n),this.#D(s,{type:"dark"})):Vy.setTheme(e)}Vy.setCookieComplianceMethod(t.cookieComplianceMethod),Vy.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Vy.setEnablePriorityAndUrgencyImprovements(t.enablePriorityAndUrgencyImprovements),Vy.setEnvironmentInfo(i);const c=new URLSearchParams(window.location.search).get("lang")||t.locale||navigator.language||"en-US";Vy.setLocale(c),document.documentElement.lang=c,document.documentElement.dir=pR(c),Gy().setTimezone(t.timezone),kp.init(),"Infinity"!==t.envType&&mR.subscribeToGlobalEvents(),t.initBroadcast&&ER.getBroadcastUtils().init(),await ky()}getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`,s=`${e}/api/application/v2/data_views/${Ls.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(s,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=xf({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};importReactRoot=async()=>{const e=[];return DR.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{Tp(e)}catch(e){return void console.error("Design system load blocked: untrusted or malformed URL",e)}try{await((e,t="true")=>new Promise(((n,s)=>{if("undefined"==typeof document)return void s(new Error("document is not available in this environment"));const a=document.createElement("script");a.type="text/javascript",a.src=e,a.async="true"===t,a.onload=()=>n(void 0),a.onerror=()=>s(new Error("Failed to load resource from Design System")),document.body.appendChild(a)})))(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,s,a)=>{const r=new URLSearchParams(t),o="true"===n&&!!e,i=new URLSearchParams(window.location.search).get("lang");i&&!r.has("lang")&&r.set("lang",i);let c=null,l=null,u=null;if(e){const t=(e.startsWith("/")?e.substring(1):e).split("/");c=t[0]||null,l=t[1]||null,"assignments"===t[2]&&t[3]&&(u=t[3])}const d=[s];c&&d.push(c),l&&d.push(l),u&&d.push("assignments",u),o&&(r.has("noPortal")||r.append("noPortal","true"),l&&a&&r.append("view",a));const p=r.toString();return d.join("/")+(p?`?${p}`:"")};initCoreConfig=async e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:s,queryParams:a,noPortal:r,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:g,extras:h}=e,{appAlias:f,contextPath:m}=n,I=window.location,E=I.origin;let y=l??E;const A={};if(m&&(y+=m),f&&"LAUNCHPAD"!==g&&(y+=`/${f}`),e.restServerConfig=y,this.#P(),!0===d){const e=this.buildSemanticUrl(s,a,r,y,i);!o&&e&&"undefined"!=typeof window&&window.history.replaceState({},"home",e)}else if("HYBRID"!==p){const e=I.href,t=e.indexOf("?");t>0&&"undefined"!=typeof window&&window.history.pushState({},"home",e.substring(0,t)),A.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(A.dynamicLoadComponents=!1);let C=null;if(f){const e=f.indexOf("/app/");C=e>=0?f.substring(e+1):f}if((!1===A.dynamicSemanticUrl||!1===A.dynamicLoadComponents)&&PCore.setBehaviorOverrides(A),e.appAlias=C,c)if("object"==typeof c)e.theme=c;else try{e.theme=JSON.parse(c)}catch{e.theme={}}let S=I?`${I.protocol}//${I.host}`:t.domain;if("EMBED"===p)try{S=new URL(e.restServerConfig).origin}catch{}const _={...t,domain:S,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=_,e.initBroadcast="true"===Vy.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),h?.cspNonce&&(window.__webpack_nonce__=h.cspNonce),Vy.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,t,n,s,a,r,o,i,c=[])=>{bR+=1;const l=i||`mashup${bR}`,u={type:"RootContainer",config:{viewConfig:RR,renderingMode:"view",name:l}};await DR.loadRootComponent(e,u,a,r,o),await this.loadCustomComponentLibrariesIfEnabled(c),DR.loadViewByName(t,n,s,l)};launchView=(e,t,n=[],s,a,r,o)=>{let i;bR+=1,i="hybrid"===o?`hybrid_${bR}`:o||`mashup${bR}`;const c={type:"RootContainer",config:{viewConfig:RR,renderingMode:"portal",name:i}};o===Vs.HYBRID&&Uh.setRuntimeParam(Vs.HYRBID_ROOT_CONTAINERNAME,i),Uh.setRuntimeParams(s),DR.loadRootComponent(e,c,n,a,r).then((()=>DR.updateStoreWithUiRoot(t,i,!1)))};launchPortal=async(e,t,n=`portal${bR+=1}`,s=[],a=[])=>{const r="LoadingComponent",o={type:"RootContainer",config:{viewConfig:RR,renderingMode:"portal",skeleton:r,name:n}},i=[...s,r];Vy.isPortalLoaded=!0;try{return await DR.loadRootComponent(e,o,i),await this.loadCustomComponentLibrariesIfEnabled(a),DR.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0,n=[])=>{const s={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t&&!document.getElementById("portal-less-styles")){const t=document.getElementsByTagName(e),n=t[0]?.parentNode;if(n){const e=document.createElement("style");e.id="portal-less-styles",e.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",n.appendChild(e)}}if((async()=>{await DR.loadRootComponent(e,s,[Vs.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)})(),window.parent!==window){const e=bp.getStaticServerUrl();a(754)(`${e}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))}};loadEnvironmentInfoFromDataPage=async e=>{if("wss"===e.portalType&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){const t=e.environmentInfo.pyDataPages;setTimeout((()=>{this.loadDataPagesIntoEnvironmentInfo(t).catch((e=>{console.error("Error loading data pages into environment info:",e)}))}),Vs.PRIORITY.TRIVIAL)}};loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;const t=Vy.environmentInfoObject;if(!t)return;const n=e.filter((({pyName:e,pyPath:t})=>!(!e||!t)||(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1)));if(0===n.length)return;const s=await Promise.allSettled(n.map((async({pyName:e,pyPath:t})=>{try{return{pyPath:t,response:await Ih.getPageDataAsync(e,"",{})}}catch(t){return console.error(`Failed to load data page ${e}:`,t),null}}))),a=s.length;let r=!1;for(let e=0;e<a;e+=1){const n=s[e];if("fulfilled"===n.status&&n.value){const{pyPath:e,response:s}=n.value;this.setNestedProperty(t,e,s),r=!0}}r&&Vy.setEnvironmentInfo(t)};#O(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,t,n){const s=t.startsWith(".")?t.slice(1):t;if(!s)return void("object"==typeof n&&null!==n&&Object.assign(e,n));const a=s.split("."),r=a.length;let o=e;for(let e=0;e<r-1;e+=1){const t=a[e],n=o[t];if(this.#O(n))o=n;else{const e={};o[t]=e,o=e}}o[a[r-1]]=n}start=async(e,t)=>{const{serviceConfig:{appStaticContentServer:n},ccV2LibId:s,environmentId:a,isAlternateDesignSystemEnabled:r,alternateDesignSystemName:o}=e;await this.initCoreConfig(e);const i=Vy.environmentInfoObject?.pyC11nDXCBDevURL,c="true"===r&&"other"!==o,l=async()=>{await this.importReactRoot();const e=[];i?e.push(bp.importCustomComponentMap("")):s&&e.push(bp.importCustomComponentMap(s)),c&&e.push(this.importDesignSystemComponentMap(n,a,o)),e.length&&await Promise.all(e),t?.()},u=DR.getComponentsRegistry();if("ReactRoot"in u.getLazyMap())return!0;return u.getComponent("ReactRoot")?(await l(),!0):new Promise((e=>{vu.subscribeOnce("component-map-loaded",(async()=>{await l(),vu.unsubscribe("component-map-loaded","component-map-loaded-id"),e(!0)}),"component-map-loaded-id")}))};registerForDebugInfo=e=>{if(Vy.setPreviewMode(),!e)return;const t=({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];n&&e.postMessage({appDebugID:n})};vu.subscribe("fetchSuccess",t,"fetchSuccess"),vu.subscribe("fetchFailure",t,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",(e=>{const t=e?.data?.enableTracer;t?wu.enableTracer():wu.disableTracer()}))};loadEnvironmentInfo=async e=>{const t="Android"===window.pms?.device.systemName;if(e.theme&&!t)try{const t=JSON.parse(e.theme.definition),n=t.Branding,s=t.Theme;Vy.setBrandingInfo(n),Vy.setTheme(s)}catch{Vy.setBrandingInfo({}),Vy.setTheme({})}if(e.darkTheme&&!t){const t={type:"dark"};try{const n=JSON.parse(e.darkTheme.definition);Vy.setBrandingInfo(n.Branding,t),Vy.setTheme(n.Theme,t)}catch{Vy.setBrandingInfo({},t),Vy.setTheme(void 0,t)}}e.keyMapping&&Vy.setKeyMapping(e.keyMapping),Vy.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&Vy.environmentInfoObject?.pyInfinityStaticService&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){const t=e.map((e=>this.importSingleCustomComponent(e)));await Promise.all(t)}importSingleCustomComponent(e){return"object"==typeof e&&"pyComponentMap"in e?bp.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):bp.importCustomComponentMap(e)}#T(e,t,n){wS(e),Wp.buildActionTargetMap(t),nn(n)}#P(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach((e=>{e.setAttribute("href",e.href)}))}#D(e,t){if(null===e)return;if("object"==typeof e)return void Vy.setTheme(e,t);let n;try{n=JSON.parse(e)}catch{return void Vy.setTheme("dark"===t?.type?void 0:{},t)}Vy.setTheme(n,t)}},xR={createViewRule:(e,t)=>{const{restApi:n,reqType:s}=ES("createViewRuleByID");return rd(n,{method:s,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:s}=ES("getViewRuleByID",{ID:e});return rd(n,{method:s},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:s,reqType:a}=ES("updateViewRuleByID",{ID:e});return rd(s,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:s}=ES("deleteViewRuleByID",{ID:e});return rd(n,{method:s},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:s,reqType:a}=ES("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return rd(s,{method:a,body:{calculations:{fields:n}}}).then((e=>e.data))}},wR={"Content-Type":"application/json"},MR={addCaseFollower:(e,t,n)=>{const s={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return mp("addCaseFollower",{body:a,queryPayload:s,headers:wR},n)},deleteCaseFollower:(e,t,n)=>mp("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>mp("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},LR={addRelatedCases:(e,t,n)=>{const s={caseID:e},a=JSON.stringify({cases:t});return mp("addRelatedCases",{body:a,queryPayload:s},n)},removeRelatedCase:(e,t,n)=>mp("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>mp("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},UR="operatorDetails",FR={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=ES(UR,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return mp(UR,{queryPayload:t})}return t?mp("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):mp(UR,{body:{dataViewParameters:{ID:e}}})}},VR="postCustomFeedMessages",jR={"Content-Type":"application/json"};const kR=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,s,a,r,o)=>{const i=r.getLocalizationService();o||(this.mentions=[]);let c="";s&&Array.isArray(s)&&s?.length>0&&(s.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=r.getValue("pulse.pageLastEntry"));const u={filterForContext:"pyDataFeed"===t?encodeURIComponent(e):e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<a.length;e+=1)a[e].cancel();const d=yp();return a.push(d),mp("getFeedMessages",{queryPayload:u,cancelTokenSource:d},r.getContextName()).then((async t=>{if(200!==t.status||!t.data)return r.reportError(`getFeeds call failed ${t.status}`,t.data),{feedFilters:[],caseMentions:[]};{a.pop();const n=[],c={};let l=!1,u=[];if(t?.data){if(u=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(...e.mentions)})),l||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(l=!0)}))}if(l&&await If({uiResources:t.data.uiResources}),!s&&(s=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),s.push(t)}));const t=s.find((e=>"All"===e.id));t&&(t.on=n)}}}if(o&&r.getValue("pulse.messageIDs")){let e=r.getValue("pulse.messages");e={...e,...c},Object.values(e).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(...e.mentions)}))}))}if(FE(r.getContextName())){r.updateState({pulse:{messages:o&&r.getValue("pulse.messageIDs")?{...r.getValue("pulse.messages"),...c}:c,messageIDs:o&&r.getValue("pulse.messageIDs")?[...r.getValue("pulse.messageIDs"),...n]:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}});const a=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()].filter((e=>Object.hasOwn(e,"mentionsType"))).filter((e=>!e?.mentionsType?.toLowerCase().includes("user")));return{feedFilters:s,caseMentions:a}}}})).catch((e=>{Ap(e)||r.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n,s=[],a=!1,r=[])=>{const o={message:t,context:e,parentMessageId:a?e:"",attachments:s,pyRecipients:r.length?r:void 0},i=0===r.length?{body:JSON.stringify(o),headers:jR}:{body:JSON.stringify(o),queryPayload:{type:"PegaSocial-Post-Private"},headers:jR};return mp(r.length?VR:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const r=t?.data;if(a){r.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(r,a,n,s.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(r,a,n,s.length>0);return n.updateState({pulse:{messages:o,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>mp(VR,{body:t,queryPayload:{type:e},headers:jR},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const s=e.data.data,a={ID:s.ID,pzInsKey:s.ID,classID:s.classID,pyPostType:s.pyPostType,postedByUser:s.postedByUser,pyIsDeleteEnabled:s.pyIsDeleteEnabled,pyMessageViewReference:s.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:s.pyCommentContext,pyPostedOn:s.postedTime,pyFeedTitle:s.postedByUser.name,pyIconReference:s.postedByUser.ID},...s.PostMessage};Ef(s.messageViewReference,n,t.context)||await If({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[a.ID]:a,...n.getValue("pulse.messages")},messageIDs:[a.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:s,isReply:a=!1,recipients:r=[]})=>{const o=JSON.stringify({message:n,...r.length&&{pyRecipients:r}});return mp("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:jR},s.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:r}=this.buildMessageObject(n,a,s,!1);return s.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),r}const{messages:r,caseMentions:o}=this.buildMessageObject(n,a,s,!1);return s.updateState({pulse:{messages:r}}),o}return s.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw s.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,s=!1)=>{const a={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:s,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},r=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(r)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...a},e=n}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(a.ID)?{...r[a.ID],...a}:a,t={...r,[a.ID]:e};return{messages:t,messageIDs:o.includes(a.ID)?o:[a.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()].filter((e=>Object.hasOwn(e,"mentionsType"))).filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:s,pConnectObj:a})=>{const r=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});mp(r,{body:o,queryPayload:{pulseContext:e},headers:jR},a.getContextName()).then((r=>{if(200===r.status)if(s){const s=a.getValue(`pulse.messages.${n}`),r=s?.pxResults&&Array.isArray(s?.pxResults)&&s.pxResults?.length>0&&s.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,s=!1;const a=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=a-1,s=!1):(e=a+1,s=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:s}}return n}));a.updateState({pulse:{messages:{[n]:{pxResults:r}}}})}else{const s={...a.getValue(`pulse.messages.${n}`)},r=s.pyLikes?s.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=r-1,i=!1):(o=r+1,i=!0),s.pyLikes={pxLikeCount:o,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:s}}})}else a.reportError(`likeMessage call failed with status ${r.status}`,r)})).catch((e=>{a.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,s)=>{let a=e;t&&(a=n);mp("deleteFeedMessage",{queryPayload:{messageID:a}},s.getContextName()).then((a=>{if(200===a.status)if(t){const t=s.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));s.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=s.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...s.getValue("pulse.messages")};delete a[e],s.updateState({pulse:{messageIDs:n,messages:a}})}else s.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{s.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>mp("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:s,mentionsType:a,listSize:r=5}=e,o={pulseContext:n,searchFor:s,mentionsType:a,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=yp();return this.mentionsTagsCancelTokenSource.push(i),mp("getMentionSuggestions",{queryPayload:o,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Ap(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>mp("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t)=>mp("getViewRuleByMessageType",{queryPayload:{type:e}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:s=5}=e,a={searchFor:n,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const r=yp();return this.mentionsTagsCancelTokenSource.push(r),mp("getTagSuggestions",{queryPayload:a,cancelTokenSource:r},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Ap(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},BR={getTaggedCases:(e,t)=>{const n={caseID:e,viewID:Ls.getDefaultQualifiedName("pyTaggedCases")};return mp("loadView",{queryPayload:n},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)}))},getTags:(e,t)=>mp("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const s={caseID:e},a=JSON.stringify({tags:t});return mp("addTagsToCase",{body:a,queryPayload:s},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>mp("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>{const t=Ls.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return Ih.getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))}},$R=(e,t)=>{Sy(t.getContextName(),e.etag),_y(t.getContextName(),e.etag)},GR={getParticipants:(e,t)=>mp("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>mp("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>mp("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>mp("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,s,a)=>{const r={caseID:e},o={...n,participantRoleID:t},i={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{mp("createParticipant",{body:o,queryPayload:r,headers:i},s.getContextName()).then((t=>{$R(t.headers,s),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=tI(a||s.getContextName());s.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},updateParticipant:async(e,t,n,s,a)=>{const r={caseID:e,participantID:t},o={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{mp("updateParticipant",{body:n,queryPayload:r,headers:o},s.getContextName()).then((t=>{$R(t.headers,s),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=tI(a||s.getContextName());s.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},a),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const s={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{mp("deleteParticipant",{queryPayload:s,headers:a},n.getContextName()).then((t=>{$R(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function WR(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const HR="create",qR="update",zR="delete";function YR(e,t,n,s){const a=vA(t);if(a){switch(e){case HR:case qR:{const{markAsDefault:e,...t}=s;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case zR:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const KR={},QR=async e=>{const t=vA(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=WR(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:s}=ES("getUIListPersonalizations",{listID:e});return rd(n,{method:s,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:WR(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},JR=async(e,t,n)=>{const{restApi:s,reqType:a}=ES("createListPersonalization",{listID:e});return YR(HR,e,t,n),rd(s,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return KR[t]=n,e}))},XR=async(e,t,n)=>{const s=KR[t]||t;YR(qR,e,t,n);const{restApi:a,reqType:r}=ES("updateListPersonalization",{listID:e,personalizationID:s})||{};return rd(a,{method:r,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},ZR=async(e,t)=>{const n=KR[t]||t;YR(zR,e,t);const{restApi:s,reqType:a}=ES("deleteListPersonalization",{listID:e,personalizationID:n});return rd(s,{method:a,body:{}}).then((e=>(KR[t]&&delete KR[t],e)))};const eb=function(e){return e?{createPersonalization:JR.bind(null,e),updatePersonalization:XR.bind(null,e),deletePersonalization:ZR.bind(null,e),fetchPersonalizations:QR.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},tb="undefined"!=typeof window?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},nb="getDataObjects",sb="getInsightByID",ab=["LocalList","RemoteList","PromptList","DataPage"];let rb=null;const ob=[];const ib={},cb=e=>Fg.getAppCacheKey(`PrimaryFields-${e}`);function lb(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}function ub(e){return"object"==typeof e&&null!==e}function db(e){return{...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:lb(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID}}function pb({data:e}){const t=(e,t)=>pf("FIELD",e,t),n="string"==typeof e.classID?e.classID:"",s=pf("CASE",n);e.classNameLocaleReference=s;const a=Array.isArray(e.fields)?e.fields:[];for(let e=0;e<a.length;e+=1){const n=a[e];if(ub(n)){const e={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},a=n.definedOnClassIDs;if("string"==typeof a){const r=a.split(":").reverse(),o="string"==typeof n.fieldID?n.fieldID:"",i=o.split("!").pop()?.split(":").reverse()||[];r[0]&&i[0]&&(e.nameLocaleReference=t(i[0],r[0])),r[1]&&i[1]&&(e.categoryLocaleReference=t(i[1],r[1])),r[2]&&i[2]?e.parentCategoryLocaleReference=t(i[2],r[2]):n.parentCategory&&(e.parentCategoryLocaleReference=s)}Object.assign(n,e)}}return{data:e}}const gb={getDataObjects:function(){const e=Fg.getAppCacheKey(nb);if(tb.getItem(e))return Promise.resolve(JSON.parse(`${tb.getItem(e)}`));const{restApi:t,reqType:n}=ES(nb,{}),s=rd(t,{method:n});return s.then((t=>{tb.setItem(e,JSON.stringify(t))})),s},getDataPageObjects:function(e=!0){if(rb)return rb;const t=Fg.getAppCacheKey("getDataPageObjects");if(e&&tb.getItem(t))return Promise.resolve(JSON.parse(`${tb.getItem(t)}`));const{restApi:n,reqType:s}=ES("getDataPages",{datapageRequestType:"explorable"});return rb=rd(n,{method:s,datapageRequestType:"explorable"}),rb.then((e=>{rb=null,tb.setItem(t,JSON.stringify(e))})),rb},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=bA(e);if(t&&t.classID){let e=wA(t.classID);const n=t.rdFields,s=(n&&!Array.isArray(n)?n.fields:void 0)?.filter((e=>e.indexOf(".")>0));if(s&&!fC.isEmpty(s)){const n=s.reduce(((e,n)=>{const s=AA(n,t.classID);var a;return s&&"type"in(a=s)&&"classID"in a&&(e[n]=s),e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&ab.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={...t,fields:Object.entries(n).map(db)};if(ub(s=e)&&"string"==typeof s.classID&&Array.isArray(s.fields)){const t=pb({data:e});return Promise.resolve(t)}}}var s;const a={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return bh.init(a).then((({dataSourceMetaData:e})=>e?pb({data:e}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}}))},getDefaultColumns:function(e){const t=Fg.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(tb.getItem(t))return Promise.resolve(JSON.parse(`${tb.getItem(t)}`));const n={dataViewName:Ls.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:s,reqType:a}=ES("getListData",n),r=rd(s,{method:a,body:{dataViewParameters:e}});return r.then((e=>{tb.setItem(t,JSON.stringify(e))})),r},getFieldsForDataSource:function(e,t,n){if(!t){const t=bA(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const s=Fg.getAppCacheKey(`RDColumns-${e}`);if(tb.getItem(s))return Promise.resolve(JSON.parse(`${tb.getItem(s)}`));const a=Fg.getData(Ls.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:e}},n);return a.then((e=>{tb.setItem(s,JSON.stringify(e))})),a},getPrimaryFieldsForDataSource:function(e="",t=""){const n=Fg.getAppCacheKey(`PFColumns-${e}${t}`);if(tb.getItem(n))return Promise.resolve(JSON.parse(`${tb.getItem(n)}`));const s=Fg.getData(Ls.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:e,ClassName:t}});return s.then((e=>{tb.setItem(n,JSON.stringify(e))})),s},getPrimaryFieldsForInsights:async function(e,t,n,s){const{allClasses:a,promisesToAwait:r,classesToFetch:o,isTopLevelClassPresent:i,joinedClassesToFetch:c}=function(e,t){const n=[],s=[];let a=!1;const r=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=cb(t);if(tb.getItem(o))return;const i=ib[t];i?s.push(i):(n.push(t),t===e?a=!0:r.push(t))})),{allClasses:o,promisesToAwait:s,classesToFetch:n,isTopLevelClassPresent:a,joinedClassesToFetch:r}}(e,n);return o.length&&r.push((async(e,t,n,s,a)=>{const r=Fg.getData(Ls.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...t&&{topLevelClassID:t},...s&&{joinedClassIDs:s.join(",")},...n&&{topLevelDataPageID:n}}},a).then((t=>{const n=t.data?.data||[],s={};e.forEach((e=>{s[e]=[]})),n.forEach((e=>{const t=e.classID,n=e[Ls.getDefaultQualifiedName("pyFieldName")];s[t].push(n)})),Object.entries(s).forEach((([e,t])=>{const n=cb(e);tb.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete ib[e]}))}));return e.forEach((e=>{ib[e]=r})),r})(o,i?e:void 0,i?t:void 0,c.length>0?c:void 0,s)),Promise.allSettled(r).then((()=>{const e={};return a.forEach((t=>{const n=cb(t);if(tb.getItem(n))try{e[t]=JSON.parse(`${tb.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=ES("getInsightIDs");return rd(e,{method:t})},getInsightByID:function(e){const t=xA(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:s,reqType:a}=ES(sb,n);return rd(s,{method:a})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:s}=ES(sb,t);return rd(n,{method:s})},loadClassResources:async e=>{const t=e.filter((e=>!ob.includes(e)));if(0===t.length)return;const n={classIDs:e.join(",")},{restApi:s,reqType:a}=ES("getClassResources",n);return rd(s,{method:a}).then((e=>{e.data.resources&&(ob.push(...t),up(e.data.resources))}))},createInsight:function(e){const{restApi:t,reqType:n}=ES("createInsight");return rd(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:s,reqType:a}=ES("updateInsight",n);let r;return"UpdateDateTime"in t&&(r=t.UpdateDateTime),rd(s,{method:a,body:JSON.stringify(t),headers:{"if-match":r,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:s}=ES("deleteInsight",t);return rd(n,{method:s})},exportToExcel:function(e){const{restApi:t,reqType:n}=ES("exportToExcel");return rd(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=ES("exportToCSV");return rd(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:s,reqType:a}=ES("scheduleInsight",n);return rd(s,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const s={insightID:e,scheduleID:t},{restApi:a,reqType:r}=ES("updateScheduledInsight",s);return rd(a,{method:r,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:s,reqType:a}=ES("deleteScheduledInsight",n);return rd(s,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=ES("translateStrings");return rd(t,{method:n,body:JSON.stringify(e)})}};const hb=new class{addRoutes=e=>{return t=e,void Uy.addRoutes(t);var t}};const fb=class{static registerModule(e,t,n){n[e]=()=>t}};const mb=class{static getCaseEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(Fs.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)};const Ib=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},Eb={setTokens:e=>{dd({tokenInfo:e}),ud(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>vu.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Uu(),getAuthInstance:e=>Lu.init(e),setAuthorizationHeader:e=>{ud({Authorization:e}),setTimeout((()=>vu.publish("updateSession",{updateStatus:"success"})),0)}};const yb=new class{getDebouncedSubject(e){return(new Ag).pipe(tO(e))}},Ab=(()=>{const e="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",t="\\\\[\\x00-\\x7f]",n=`(?:${e}|${`"(?:[^\\r"\\\\\\x80-\\xff]|${t})*"`})`,s=`(?:${e}|${`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${t})*\\]`})`;return new RegExp(`^${`${n}(?:\\.${n})*`}@${`${s}(?:\\.${s})*`}$`)})();const Cb=(()=>{const e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+";return new RegExp(`^${`${`(?:${`${e}(?:\\.${e})*`}|"(?:[^\\x0d\\x22\\x5c]|\\\\[\\x00-\\x7f])+")`}@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}`}$`)})();lp.register("email",((e,{useRFC822Validation:t})=>{let n=null;const s=t?(a=e,Ab.test(a)):function(e){return Cb.test(e)}(e);var a;return e&&!s&&(n="Enter a valid email address"),n})),lp.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),lp.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),lp.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";a.e(667).then(a.bind(a,816)).then((({parsePhoneNumberFromString:t})=>{lp.register("phone",(n=>{let s=null;n&&!/^\+?\d+$/.test(n)&&(s=e);const a=n?.startsWith("+");if(n&&a){const a=t(n);a&&a.isPossible()&&n===a.number||(s=e)}return s}))}))}),Vs.PRIORITY.TRIVIAL);const Sb=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};lp.register("datetime",(e=>Sb("date and time",e))),lp.register("date",(e=>Sb("date",e))),lp.register("time",(e=>Sb("time",e)));const _b=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};lp.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=_b(e.pxResults):Array.isArray(e)?t=_b(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const Nb=()=>{const e={},t="undefined"!=typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;t&&(e["user-timezone"]=t);const n="undefined"!=typeof navigator?navigator.language:void 0;return n&&(e["user-locale"]=n),e},Tb="createConversation",Db="sendMessage",Pb="getConversations",Ob="getMessages",Rb="sendMessageForAgent",bb="getCoach",vb=(e,t,n,s,a,r,o)=>{for(const e of o)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=yp();return o.push(i),mp(e,{queryPayload:Pb===e?{assistantID:t,contextID:n,pageSize:s,pageIndex:a}:{agentID:t,contextID:n,pageSize:s,pageIndex:a},cancelTokenSource:i,headers:Nb()},r).then((e=>(o.pop(),e)))},xb=(e,t,n,s,a)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const r=yp();return a.push(r),mp(e,{queryPayload:Ob===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},cancelTokenSource:r,headers:Nb()},s).then((e=>(a.pop(),e)))},wb=(e,t,n,s,a,r)=>{for(const e of a)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const o=yp();return a.push(o),mp(e,{body:JSON.stringify({contextID:t,executeStarterQuestion:!1,...r&&r.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}}}),cancelTokenSource:o,queryPayload:e===Tb?{assistantID:n}:{agentID:n},headers:Nb()},s).then((e=>(a.pop(),e)))},Mb=(e,t,n,s,a,r,o)=>{const i={...s&&{request:s},...o&&o.additionalInstruction&&{additionalInstruction:o.additionalInstruction},...o&&o.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...o&&o.toolsReviewed&&o.toolsReviewed.length>0&&{toolsReviewed:o.toolsReviewed},...r&&r?.length>0&&{attachments:r}};return mp(e,{body:JSON.stringify(i),queryPayload:e===Db?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},headers:Nb()},a)},Lb=(e,t,n,s,a,r,o,i)=>{const c={...s&&{request:s},...o&&o.additionalInstruction&&{additionalInstruction:o.additionalInstruction},...r&&r.length>0&&{attachments:r},...o&&o.toolsReviewed&&o.toolsReviewed.length>0&&{toolsReviewed:o.toolsReviewed},capabilities:{stream:{isEnabled:!0},...o&&o.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...o&&o.questionnaire&&{questionnaire:o.questionnaire}},l=e===Db?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},{restApi:u,reqType:d}=ES(e,l),p={method:d,headers:{Accept:"text/event-stream",...Nb()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...i&&{signal:i.token}};return rd(u,p,a)},Ub=(e,t,n,s,a)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const r=yp();return s.push(r),mp(e,{queryPayload:e===bb?{assistantID:t,...a&&{contextID:a}}:{agentID:t,...a&&{contextID:a}},cancelTokenSource:r},n).then((e=>(s.pop(),e))).catch((e=>{throw s.pop(),e}))},Fb={createConversation:(e,t,n,s=[])=>wb(Tb,e,t,n,s),sendMessage:(e,t,n,s,a)=>a?.enableStreaming?Lb(Db,e,t,n,s,void 0,a):Mb(Db,e,t,n,s),createConversationForAgent:(e,t,n,s=[],a)=>wb("createConversationForAgent",e,t,n,s,a),sendMessageForAgent:(e,t,n,s,a,r)=>r?.enableStreaming?Lb(Rb,e,t,n,s,a,r,r.cancelTokenSource):Mb(Rb,e,t,n,s,a,r),getAgent:(e,t,n,s=[])=>Ub("getAgent",e,t,s,n),getCoach:(e,t,n,s=[])=>Ub(bb,e,t,s,n),likeAgentMessage:(e,t,n,s)=>{const a={queryPayload:{agentID:e,conversationID:t,messageID:n},headers:Nb()};return mp("likeAgentMessage",a,s)},unLikeAgentMessage:(e,t,n,s,a="")=>{const r={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:a}),headers:Nb()};return mp("dislikeAgentMessage",r,s)},getConversations:(e,t,n,s,a,r=[])=>vb(Pb,e,t,n,s,a,r),getConversationsForAgent:(e,t,n,s,a,r=[])=>vb("getConversationsForAgent",e,t,n,s,a,r),getMessages:(e,t,n,s=[])=>xb(Ob,e,t,n,s),getMessagesForAgent:(e,t,n,s=[])=>xb("getMessagesForAgent",e,t,n,s)};const Vb=new class{async rewriteText(e){const{originalText:t,rewriteAction:n,additionalInstructions:s,context:a}=e,r=Vy.isInfinityRuntime(),o=Vy.getRewriteGenAIDP()??Ls.getDefaultQualifiedName("D_RewriteWithAI"),i={OriginalText:t,RewriteAction:n,AdditionalInstructions:s||""};try{let e,t;if(r){const t=await Ih.getPageDataAsync(o,a,i),n=Object.fromEntries(Object.entries(t)).pyResponseData;e="string"==typeof n?n:void 0}else{const n=(await Ih.getDataAsync(o,a,i)).data[0],s=n[Ls.getDefaultQualifiedName("Content")];e="string"==typeof s?s:void 0;const r=n[Ls.getDefaultQualifiedName("ErrorMessage")];t="string"==typeof r?r:void 0}return e?{success:!0,rewrittenText:e}:{success:!1,errorMessage:t||"AI rewrite failed: No rewritten text returned"}}catch(e){return{success:!1,errorMessage:e instanceof Error?e.message:"An unexpected error occurred during AI rewrite"}}}};const jb=class{classAccessMap=new Map;constructor(){const e=Vy.getClassesAccessList();0!==e.length?this.classAccessMap=e.reduce(((e,t)=>(e.set(t.pyClassName,t.pyHasCreateAccess),e)),new Map):this.classAccessMap=Vy.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};const kb=class{static AUTOSAVE_SAVE_STATUS=UI;static isAutosaveEnabledForContext(e){return ZI(e)}static subscribeAutosaveStatus(e,t){return((e,t)=>{let n=$I.get(e);return n||(n=new Set,$I.set(e,n)),n.add(t),()=>{const n=$I.get(e);n&&(n.delete(t),0===n.size&&$I.delete(e))}})(e,t)}static notifyChange(e,t,n){ZI(e)&&(((e,t,n)=>{let s=GI.get(e);s||(s=new Map,GI.set(e,s)),s.set(t,n)})(e,t,n),sE(e))}};class Bb{static behaviorOverrides={};getPersonalizationUtils=eb;constructor(){Bb.behaviorOverrides={}}getPCoreVersion=()=>"26.1.0";onPCoreReady=e=>DR.onPCoreReady(e);onPCoreCleanup=e=>DR.onPCoreCleanup(e);getComponentsRegistry=()=>DR.getComponentsRegistry();checkIfSemanticURL=()=>DR.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(vS()){const e=Uy.processUrl(xy(),!0);return!!Uy._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>hb;getViewResources=()=>i;configureForBrowserBookmark=e=>DR.configureForBrowserBookmark(e);getStore=()=>JA();resetStore=()=>pC();getMessageManager=()=>Ou;getCoexistenceManager=()=>ER;getStoreValue=(e,t,n)=>nC(e,t,n);getContainerUtils=()=>c;getAnnotationUtils=()=>lg;getFieldUtils=()=>fd;getFieldDefaultUtils=()=>Hd;getAssetLoader=()=>bp;getAttachmentUtils=()=>np;getViewRuleApi=()=>xR;getFeedUtils=()=>kR;getTagUtils=()=>BR;getGenAIAssistantUtils=()=>Fb;getGenAIUtils=()=>Vb;getStakeholderUtils=()=>GR;getUserApi=()=>FR;getCaseFollowerApi=()=>MR;getCaseUtils=()=>aI;getStateUtils=()=>tf;getRelatedCasesApi=()=>LR;getDataApi=()=>bh;getDataApiUtils=()=>Fg;getAnalyticsUtils=()=>gb;getLocaleUtils=e=>{const t=e??Vy.getLocale()??"en-US";return EA(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{Bb.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{Bb.behaviorOverrides[e]=t};getBehaviorOverrides=()=>Bb.behaviorOverrides;getBehaviorOverride=e=>Bb.behaviorOverrides[e];getAsynchronousUtils=()=>yb;createPConnect=e=>xf(e);getPubSubUtils=()=>vu;registerComponentCreator=e=>{wf(e)};getConstants=()=>Object.freeze(Fs);getResolvedConstantValue=e=>Vs.getProperty(e);getEvents=()=>mb;getRestClient=()=>o;getMashupApi=()=>yR;getEnvironmentInfo=()=>Vy;switchLocale=e=>gR(e);getRuntimeParamsAPI=()=>Uh;getSemanticUrlUtils=()=>qp;getRemoteCaseUtils=()=>Bs;getNavigationUtils=()=>kp;registerModule=(e,t)=>fb.registerModule(e,t,this);getErrorHandler=()=>Ib;getFormUtils=()=>km;getAutosaveUtils=()=>kb;getMessagingServiceManager=()=>fh;getMetadataUtils=()=>l;getDataPageUtils=()=>Ih;getDataTypeUtils=()=>cg;getCascadeManager=()=>zA;isDeepEqual=(e,t)=>Xt(e,t);getAuthUtils=()=>Eb;getDebugger=()=>wu;getDeferLoadManager=()=>Lg;getExpressionEngine=()=>n;getActionsSequencer=()=>Gh;getRefreshManager=()=>xh;getInitialiser=()=>vR;getBootstrapUtils=()=>DR;getContextTreeManager=()=>hu;getAccessPrivilege=()=>jb.getInstance();getObjectTransformer=()=>Us;getAllStateMachines=(e,t,n)=>t&&n?Bm.getAllStateMachines(e,t,n):Bm.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>Ls.isNamespaceEnabled();getQualifiedName=(e,t)=>Ls.getQualifiedName(e,t);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>Ls;getNetworkUtils=()=>xu;getMashupBridge=()=>p;getConfirmDialogService=()=>um}const $b=new Bb;globalThis.PCore=$b})()})();
|
|
2
2
|
//# sourceMappingURL=constellation-core-web.js.map
|