@pega/constellation-corejs 10.0.0-build.13.0 → 10.0.0-build.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var HG=Object.defineProperty;var qt=(t,e)=>{for(var r in e)HG(t,r,{get:e[r],enumerable:!0})};function GG(){this.__data__=[],this.size=0}var hM=GG;function qG(t,e){return t===e||t!==t&&e!==e}var Vo=qG;function WG(t,e){for(var r=t.length;r--;)if(Vo(t[r][0],e))return r;return-1}var bs=WG;var KG=Array.prototype,JG=KG.splice;function YG(t){var e=this.__data__,r=bs(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():JG.call(e,r,1),--this.size,!0}var yM=YG;function ZG(t){var e=this.__data__,r=bs(e,t);return r<0?void 0:e[r][1]}var SM=ZG;function QG(t){return bs(this.__data__,t)>-1}var EM=QG;function XG(t,e){var r=this.__data__,n=bs(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var AM=XG;function Dl(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dl.prototype.clear=hM;Dl.prototype.delete=yM;Dl.prototype.get=SM;Dl.prototype.has=EM;Dl.prototype.set=AM;var Ts=Dl;function eq(){this.__data__=new Ts,this.size=0}var CM=eq;function tq(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var _M=tq;function rq(t){return this.__data__.get(t)}var IM=rq;function nq(t){return this.__data__.has(t)}var bM=nq;var oq=typeof global=="object"&&global&&global.Object===Object&&global,_y=oq;var iq=typeof self=="object"&&self&&self.Object===Object&&self,sq=_y||iq||Function("return this")(),Ir=sq;var aq=Ir.Symbol,un=aq;var TM=Object.prototype,cq=TM.hasOwnProperty,lq=TM.toString,rm=un?un.toStringTag:void 0;function uq(t){var e=cq.call(t,rm),r=t[rm];try{t[rm]=void 0;var n=!0}catch{}var o=lq.call(t);return n&&(e?t[rm]=r:delete t[rm]),o}var vM=uq;var dq=Object.prototype,pq=dq.toString;function mq(t){return pq.call(t)}var RM=mq;var fq="[object Null]",gq="[object Undefined]",PM=un?un.toStringTag:void 0;function hq(t){return t==null?t===void 0?gq:fq:PM&&PM in Object(t)?vM(t):RM(t)}var Gn=hq;function yq(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Rr=yq;var Sq="[object AsyncFunction]",Eq="[object Function]",Aq="[object GeneratorFunction]",Cq="[object Proxy]";function _q(t){if(!Rr(t))return!1;var e=Gn(t);return e==Eq||e==Aq||e==Sq||e==Cq}var wl=_q;var Iq=Ir["__core-js_shared__"],Iy=Iq;var NM=(function(){var t=/[^.]+$/.exec(Iy&&Iy.keys&&Iy.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function bq(t){return!!NM&&NM in t}var OM=bq;var Tq=Function.prototype,vq=Tq.toString;function Rq(t){if(t!=null){try{return vq.call(t)}catch{}try{return t+""}catch{}}return""}var Pi=Rq;var Pq=/[\\^$.*+?()[\]{}|]/g,Nq=/^\[object .+?Constructor\]$/,Oq=Function.prototype,xq=Object.prototype,Dq=Oq.toString,wq=xq.hasOwnProperty,$q=RegExp("^"+Dq.call(wq).replace(Pq,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mq(t){if(!Rr(t)||OM(t))return!1;var e=wl(t)?$q:Nq;return e.test(Pi(t))}var xM=Mq;function kq(t,e){return t?.[e]}var DM=kq;function Lq(t,e){var r=DM(t,e);return xM(r)?r:void 0}var bn=Lq;var Uq=bn(Ir,"Map"),vs=Uq;var jq=bn(Object,"create"),Ni=jq;function zq(){this.__data__=Ni?Ni(null):{},this.size=0}var wM=zq;function Fq(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var $M=Fq;var Vq="__lodash_hash_undefined__",Bq=Object.prototype,Hq=Bq.hasOwnProperty;function Gq(t){var e=this.__data__;if(Ni){var r=e[t];return r===Vq?void 0:r}return Hq.call(e,t)?e[t]:void 0}var MM=Gq;var qq=Object.prototype,Wq=qq.hasOwnProperty;function Kq(t){var e=this.__data__;return Ni?e[t]!==void 0:Wq.call(e,t)}var kM=Kq;var Jq="__lodash_hash_undefined__";function Yq(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ni&&e===void 0?Jq:e,this}var LM=Yq;function $l(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}$l.prototype.clear=wM;$l.prototype.delete=$M;$l.prototype.get=MM;$l.prototype.has=kM;$l.prototype.set=LM;var wI=$l;function Zq(){this.size=0,this.__data__={hash:new wI,map:new(vs||Ts),string:new wI}}var UM=Zq;function Qq(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var jM=Qq;function Xq(t,e){var r=t.__data__;return jM(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Rs=Xq;function e7(t){var e=Rs(this,t).delete(t);return this.size-=e?1:0,e}var zM=e7;function t7(t){return Rs(this,t).get(t)}var FM=t7;function r7(t){return Rs(this,t).has(t)}var VM=r7;function n7(t,e){var r=Rs(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var BM=n7;function Ml(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ml.prototype.clear=UM;Ml.prototype.delete=zM;Ml.prototype.get=FM;Ml.prototype.has=VM;Ml.prototype.set=BM;var rc=Ml;var o7=200;function i7(t,e){var r=this.__data__;if(r instanceof Ts){var n=r.__data__;if(!vs||n.length<o7-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new rc(n)}return r.set(t,e),this.size=r.size,this}var HM=i7;function kl(t){var e=this.__data__=new Ts(t);this.size=e.size}kl.prototype.clear=CM;kl.prototype.delete=_M;kl.prototype.get=IM;kl.prototype.has=bM;kl.prototype.set=HM;var Ll=kl;var s7="__lodash_hash_undefined__";function a7(t){return this.__data__.set(t,s7),this}var GM=a7;function c7(t){return this.__data__.has(t)}var qM=c7;function by(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new rc;++e<r;)this.add(t[e])}by.prototype.add=by.prototype.push=GM;by.prototype.has=qM;var Ty=by;function l7(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var WM=l7;function u7(t,e){return t.has(e)}var vy=u7;var d7=1,p7=2;function m7(t,e,r,n,o,i){var s=r&d7,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var l=i.get(t),u=i.get(e);if(l&&u)return l==e&&u==t;var p=-1,m=!0,f=r&p7?new Ty:void 0;for(i.set(t,e),i.set(e,t);++p<a;){var h=t[p],S=e[p];if(n)var A=s?n(S,h,p,e,t,i):n(h,S,p,t,e,i);if(A!==void 0){if(A)continue;m=!1;break}if(f){if(!WM(e,function(C,I){if(!vy(f,I)&&(h===C||o(h,C,r,n,i)))return f.push(I)})){m=!1;break}}else if(!(h===S||o(h,S,r,n,i))){m=!1;break}}return i.delete(t),i.delete(e),m}var Ry=m7;var f7=Ir.Uint8Array,Ul=f7;function g7(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}var KM=g7;function h7(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var JM=h7;var y7=1,S7=2,E7="[object Boolean]",A7="[object Date]",C7="[object Error]",_7="[object Map]",I7="[object Number]",b7="[object RegExp]",T7="[object Set]",v7="[object String]",R7="[object Symbol]",P7="[object ArrayBuffer]",N7="[object DataView]",YM=un?un.prototype:void 0,$I=YM?YM.valueOf:void 0;function O7(t,e,r,n,o,i,s){switch(r){case N7:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case P7:return!(t.byteLength!=e.byteLength||!i(new Ul(t),new Ul(e)));case E7:case A7:case I7:return Vo(+t,+e);case C7:return t.name==e.name&&t.message==e.message;case b7:case v7:return t==e+"";case _7:var a=KM;case T7:var c=n&y7;if(a||(a=JM),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=S7,s.set(t,e);var u=Ry(a(t),a(e),n,o,i,s);return s.delete(t),u;case R7:if($I)return $I.call(t)==$I.call(e)}return!1}var ZM=O7;function x7(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Py=x7;var D7=Array.isArray,cr=D7;function w7(t,e,r){var n=e(t);return cr(t)?n:Py(n,r(t))}var QM=w7;function $7(t,e){for(var r=-1,n=t==null?0:t.length,o=0,i=[];++r<n;){var s=t[r];e(s,r,t)&&(i[o++]=s)}return i}var XM=$7;function M7(){return[]}var e1=M7;var k7=Object.prototype,L7=k7.propertyIsEnumerable,t1=Object.getOwnPropertySymbols,U7=t1?function(t){return t==null?[]:(t=Object(t),XM(t1(t),function(e){return L7.call(t,e)}))}:e1,r1=U7;function j7(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var n1=j7;function z7(t){return t!=null&&typeof t=="object"}var dn=z7;var F7="[object Arguments]";function V7(t){return dn(t)&&Gn(t)==F7}var MI=V7;var o1=Object.prototype,B7=o1.hasOwnProperty,H7=o1.propertyIsEnumerable,G7=MI((function(){return arguments})())?MI:function(t){return dn(t)&&B7.call(t,"callee")&&!H7.call(t,"callee")},bo=G7;function q7(){return!1}var i1=q7;var c1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,s1=c1&&typeof module=="object"&&module&&!module.nodeType&&module,W7=s1&&s1.exports===c1,a1=W7?Ir.Buffer:void 0,K7=a1?a1.isBuffer:void 0,J7=K7||i1,Oi=J7;var Y7=9007199254740991,Z7=/^(?:0|[1-9]\d*)$/;function Q7(t,e){var r=typeof t;return e=e??Y7,!!e&&(r=="number"||r!="symbol"&&Z7.test(t))&&t>-1&&t%1==0&&t<e}var Ps=Q7;var X7=9007199254740991;function eW(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=X7}var jl=eW;var tW="[object Arguments]",rW="[object Array]",nW="[object Boolean]",oW="[object Date]",iW="[object Error]",sW="[object Function]",aW="[object Map]",cW="[object Number]",lW="[object Object]",uW="[object RegExp]",dW="[object Set]",pW="[object String]",mW="[object WeakMap]",fW="[object ArrayBuffer]",gW="[object DataView]",hW="[object Float32Array]",yW="[object Float64Array]",SW="[object Int8Array]",EW="[object Int16Array]",AW="[object Int32Array]",CW="[object Uint8Array]",_W="[object Uint8ClampedArray]",IW="[object Uint16Array]",bW="[object Uint32Array]",Wt={};Wt[hW]=Wt[yW]=Wt[SW]=Wt[EW]=Wt[AW]=Wt[CW]=Wt[_W]=Wt[IW]=Wt[bW]=!0;Wt[tW]=Wt[rW]=Wt[fW]=Wt[nW]=Wt[gW]=Wt[oW]=Wt[iW]=Wt[sW]=Wt[aW]=Wt[cW]=Wt[lW]=Wt[uW]=Wt[dW]=Wt[pW]=Wt[mW]=!1;function TW(t){return dn(t)&&jl(t.length)&&!!Wt[Gn(t)]}var l1=TW;function vW(t){return function(e){return t(e)}}var Ny=vW;var u1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nm=u1&&typeof module=="object"&&module&&!module.nodeType&&module,RW=nm&&nm.exports===u1,kI=RW&&_y.process,PW=(function(){try{var t=nm&&nm.require&&nm.require("util").types;return t||kI&&kI.binding&&kI.binding("util")}catch{}})(),LI=PW;var d1=LI&&LI.isTypedArray,NW=d1?Ny(d1):l1,Ns=NW;var OW=Object.prototype,xW=OW.hasOwnProperty;function DW(t,e){var r=cr(t),n=!r&&bo(t),o=!r&&!n&&Oi(t),i=!r&&!n&&!o&&Ns(t),s=r||n||o||i,a=s?n1(t.length,String):[],c=a.length;for(var l in t)(e||xW.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ps(l,c)))&&a.push(l);return a}var Oy=DW;var wW=Object.prototype;function $W(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||wW;return t===r}var Os=$W;function MW(t,e){return function(r){return t(e(r))}}var xy=MW;var kW=xy(Object.keys,Object),p1=kW;var LW=Object.prototype,UW=LW.hasOwnProperty;function jW(t){if(!Os(t))return p1(t);var e=[];for(var r in Object(t))UW.call(t,r)&&r!="constructor"&&e.push(r);return e}var Dy=jW;function zW(t){return t!=null&&jl(t.length)&&!wl(t)}var Bo=zW;function FW(t){return Bo(t)?Oy(t):Dy(t)}var m1=FW;function VW(t){return QM(t,m1,r1)}var UI=VW;var BW=1,HW=Object.prototype,GW=HW.hasOwnProperty;function qW(t,e,r,n,o,i){var s=r&BW,a=UI(t),c=a.length,l=UI(e),u=l.length;if(c!=u&&!s)return!1;for(var p=c;p--;){var m=a[p];if(!(s?m in e:GW.call(e,m)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var S=!0;i.set(t,e),i.set(e,t);for(var A=s;++p<c;){m=a[p];var C=t[m],I=e[m];if(n)var _=s?n(I,C,m,e,t,i):n(C,I,m,t,e,i);if(!(_===void 0?C===I||o(C,I,r,n,i):_)){S=!1;break}A||(A=m=="constructor")}if(S&&!A){var N=t.constructor,x=e.constructor;N!=x&&"constructor"in t&&"constructor"in e&&!(typeof N=="function"&&N instanceof N&&typeof x=="function"&&x instanceof x)&&(S=!1)}return i.delete(t),i.delete(e),S}var f1=qW;var WW=bn(Ir,"DataView"),wy=WW;var KW=bn(Ir,"Promise"),$y=KW;var JW=bn(Ir,"Set"),My=JW;var YW=bn(Ir,"WeakMap"),ky=YW;var g1="[object Map]",ZW="[object Object]",h1="[object Promise]",y1="[object Set]",S1="[object WeakMap]",E1="[object DataView]",QW=Pi(wy),XW=Pi(vs),eK=Pi($y),tK=Pi(My),rK=Pi(ky),nc=Gn;(wy&&nc(new wy(new ArrayBuffer(1)))!=E1||vs&&nc(new vs)!=g1||$y&&nc($y.resolve())!=h1||My&&nc(new My)!=y1||ky&&nc(new ky)!=S1)&&(nc=function(t){var e=Gn(t),r=e==ZW?t.constructor:void 0,n=r?Pi(r):"";if(n)switch(n){case QW:return E1;case XW:return g1;case eK:return h1;case tK:return y1;case rK:return S1}return e});var om=nc;var nK=1,A1="[object Arguments]",C1="[object Array]",Ly="[object Object]",oK=Object.prototype,_1=oK.hasOwnProperty;function iK(t,e,r,n,o,i){var s=cr(t),a=cr(e),c=s?C1:om(t),l=a?C1:om(e);c=c==A1?Ly:c,l=l==A1?Ly:l;var u=c==Ly,p=l==Ly,m=c==l;if(m&&Oi(t)){if(!Oi(e))return!1;s=!0,u=!1}if(m&&!u)return i||(i=new Ll),s||Ns(t)?Ry(t,e,r,n,o,i):ZM(t,e,c,r,n,o,i);if(!(r&nK)){var f=u&&_1.call(t,"__wrapped__"),h=p&&_1.call(e,"__wrapped__");if(f||h){var S=f?t.value():t,A=h?e.value():e;return i||(i=new Ll),o(S,A,r,n,i)}}return m?(i||(i=new Ll),f1(t,e,r,n,o,i)):!1}var I1=iK;function b1(t,e,r,n,o){return t===e?!0:t==null||e==null||!dn(t)&&!dn(e)?t!==t&&e!==e:I1(t,e,r,n,b1,o)}var T1=b1;function sK(t,e){return T1(t,e)}var lo=sK;var Ho,v1,R1,aK=t=>{t&&(t=t||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},Ho=t,Ho.BASEURL=t.server,Ho.ACTIONURL=t["action-end-point"],Ho.DATAURL=t["data-end-point"],R1=t.reAuthUrl)},cK=t=>`${Ho.BASEURL}${Ho[t]}`,lK=()=>`${Ho.BASEURL}${Ho.ACTIONURL}`,uK=()=>Ho.BASEURL,dK=()=>R1,pK=t=>Ho[t],mK=t=>fetch(lK(),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),fK=t=>{v1=t},gK=()=>v1,gt={init:aK,getAPIURL:cK,getReAuthURL:dK,getServerURL:uK,getRouteURL:pK,fetchData:mK,setGoogleMapsAPIKey:fK,getGoogleMapsAPIKey:gK};var rt={};qt(rt,{activateContainerItem:()=>rr,addContainerItem:()=>Pt,addMessages:()=>wm,addSharedData:()=>Mw,addTransientItem:()=>qx,addWork:()=>cce,clearTransientData:()=>YD,createWork:()=>K6,error:()=>Qi,finishAssignment:()=>dce,initContainers:()=>Gx,listAction:()=>Kn,loadView:()=>Pm,mergeData:()=>Re,openAssignment:()=>pce,openWorkByHandle:()=>lce,postProcess:()=>V,purgeTransientData:()=>QD,removeAllTransientItems:()=>$w,removeContainerItem:()=>Qe,removeSharedData:()=>kw,removeTransientItem:()=>Ih,replaceContainerItem:()=>kn,replaceTransientData:()=>ZD,resetContainers:()=>wc,resetLoading:()=>gs,setLoading:()=>Mh,setSharedProperty:()=>DT,setStateProperty:()=>sa,showCasePreview:()=>fce,showHarness:()=>sce,showHistory:()=>mce,showPage:()=>ace,upMergeAndRemoveContainerItem:()=>uce,updateContainerItem:()=>tr,updateTransientData:()=>_h});var hK="[object Symbol]";function yK(t){return typeof t=="symbol"||dn(t)&&Gn(t)==hK}var zl=yK;var SK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,EK=/^\w*$/;function AK(t,e){if(cr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||zl(t)?!0:EK.test(t)||!SK.test(t)||e!=null&&t in Object(e)}var P1=AK;var CK="Expected a function";function jI(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(CK);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(jI.Cache||rc),r}jI.Cache=rc;var N1=jI;var _K=500;function IK(t){var e=N1(t,function(n){return r.size===_K&&r.clear(),n}),r=e.cache;return e}var O1=IK;var bK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,TK=/\\(\\)?/g,vK=O1(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(bK,function(r,n,o,i){e.push(o?i.replace(TK,"$1"):n||r)}),e}),x1=vK;function RK(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Uy=RK;var PK=1/0,D1=un?un.prototype:void 0,w1=D1?D1.toString:void 0;function $1(t){if(typeof t=="string")return t;if(cr(t))return Uy(t,$1)+"";if(zl(t))return w1?w1.call(t):"";var e=t+"";return e=="0"&&1/t==-PK?"-0":e}var M1=$1;function NK(t){return t==null?"":M1(t)}var jy=NK;function OK(t,e){return cr(t)?t:P1(t,e)?[t]:x1(jy(t))}var xs=OK;function xK(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var k1=xK;var DK=1/0;function wK(t){if(typeof t=="string"||zl(t))return t;var e=t+"";return e=="0"&&1/t==-DK?"-0":e}var xi=wK;function $K(t,e){e=xs(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[xi(e[r++])];return r&&r==n?t:void 0}var zy=$K;function MK(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var L1=MK;function kK(t,e){return e.length<2?t:zy(t,L1(e,0,-1))}var U1=kK;var LK=Object.prototype,UK=LK.hasOwnProperty;function jK(t,e){e=xs(e,t);var r=-1,n=e.length;if(!n)return!0;for(;++r<n;){var o=xi(e[r]);if(o==="__proto__"&&!UK.call(t,"__proto__")||(o==="constructor"||o==="prototype")&&r<n-1)return!1}var i=U1(t,e);return i==null||delete i[xi(k1(e))]}var j1=jK;function zK(t,e){return t==null?!0:j1(t,e)}var z1=zK;var FK=Object.prototype,VK=FK.hasOwnProperty;function BK(t,e){return t!=null&&VK.call(t,e)}var F1=BK;function HK(t,e,r){e=xs(e,t);for(var n=-1,o=e.length,i=!1;++n<o;){var s=xi(e[n]);if(!(i=t!=null&&r(t,s)))break;t=t[s]}return i||++n!=o?i:(o=t==null?0:t.length,!!o&&jl(o)&&Ps(s,o)&&(cr(t)||bo(t)))}var V1=HK;function GK(t,e){return t!=null&&V1(t,e,F1)}var B1=GK;function qK(t,e,r){var n=t==null?void 0:zy(t,e);return n===void 0?r:n}var im=qK;var WK=(function(){try{var t=bn(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Fl=WK;function KK(t,e,r){e=="__proto__"&&Fl?Fl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Vl=KK;var JK=Object.prototype,YK=JK.hasOwnProperty;function ZK(t,e,r){var n=t[e];(!(YK.call(t,e)&&Vo(n,r))||r===void 0&&!(e in t))&&Vl(t,e,r)}var Fy=ZK;function QK(t,e,r,n){if(!Rr(t))return t;e=xs(e,t);for(var o=-1,i=e.length,s=i-1,a=t;a!=null&&++o<i;){var c=xi(e[o]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var u=a[c];l=n?n(u,c,a):void 0,l===void 0&&(l=Rr(u)?u:Ps(e[o+1])?[]:{})}Fy(a,c,l),a=a[c]}return t}var H1=QK;function XK(t,e,r){return t==null?t:H1(t,e,r)}var G1=XK;function eJ(t,e,r){(r!==void 0&&!Vo(t[e],r)||r===void 0&&!(e in t))&&Vl(t,e,r)}var sm=eJ;function tJ(t){return function(e,r,n){for(var o=-1,i=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++o];if(r(i[c],c,i)===!1)break}return e}}var q1=tJ;var rJ=q1(),W1=rJ;var Z1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,K1=Z1&&typeof module=="object"&&module&&!module.nodeType&&module,nJ=K1&&K1.exports===Z1,J1=nJ?Ir.Buffer:void 0,Y1=J1?J1.allocUnsafe:void 0;function oJ(t,e){if(e)return t.slice();var r=t.length,n=Y1?Y1(r):new t.constructor(r);return t.copy(n),n}var Q1=oJ;function iJ(t){var e=new t.constructor(t.byteLength);return new Ul(e).set(new Ul(t)),e}var X1=iJ;function sJ(t,e){var r=e?X1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var ek=sJ;function aJ(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var tk=aJ;var rk=Object.create,cJ=(function(){function t(){}return function(e){if(!Rr(e))return{};if(rk)return rk(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),nk=cJ;var lJ=xy(Object.getPrototypeOf,Object),Vy=lJ;function uJ(t){return typeof t.constructor=="function"&&!Os(t)?nk(Vy(t)):{}}var ok=uJ;function dJ(t){return dn(t)&&Bo(t)}var am=dJ;var pJ="[object Object]",mJ=Function.prototype,fJ=Object.prototype,ik=mJ.toString,gJ=fJ.hasOwnProperty,hJ=ik.call(Object);function yJ(t){if(!dn(t)||Gn(t)!=pJ)return!1;var e=Vy(t);if(e===null)return!0;var r=gJ.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ik.call(r)==hJ}var Ds=yJ;function SJ(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var cm=SJ;function EJ(t,e,r,n){var o=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;c===void 0&&(c=t[a]),o?Vl(r,a,c):Fy(r,a,c)}return r}var sk=EJ;function AJ(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ak=AJ;var CJ=Object.prototype,_J=CJ.hasOwnProperty;function IJ(t){if(!Rr(t))return ak(t);var e=Os(t),r=[];for(var n in t)n=="constructor"&&(e||!_J.call(t,n))||r.push(n);return r}var ck=IJ;function bJ(t){return Bo(t)?Oy(t,!0):ck(t)}var By=bJ;function TJ(t){return sk(t,By(t))}var lk=TJ;function vJ(t,e,r,n,o,i,s){var a=cm(t,r),c=cm(e,r),l=s.get(c);if(l){sm(t,r,l);return}var u=i?i(a,c,r+"",t,e,s):void 0,p=u===void 0;if(p){var m=cr(c),f=!m&&Oi(c),h=!m&&!f&&Ns(c);u=c,m||f||h?cr(a)?u=a:am(a)?u=tk(a):f?(p=!1,u=Q1(c,!0)):h?(p=!1,u=ek(c,!0)):u=[]:Ds(c)||bo(c)?(u=a,bo(a)?u=lk(a):(!Rr(a)||wl(a))&&(u=ok(c))):p=!1}p&&(s.set(c,u),o(u,c,n,i,s),s.delete(c)),sm(t,r,u)}var uk=vJ;function dk(t,e,r,n,o){t!==e&&W1(e,function(i,s){if(o||(o=new Ll),Rr(i))uk(t,e,s,r,dk,n,o);else{var a=n?n(cm(t,s),i,s+"",t,e,o):void 0;a===void 0&&(a=i),sm(t,s,a)}},By)}var pk=dk;function RJ(t){return t}var Hy=RJ;function PJ(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var mk=PJ;var fk=Math.max;function NJ(t,e,r){return e=fk(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=fk(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=r(s),mk(t,this,a)}}var gk=NJ;function OJ(t){return function(){return t}}var hk=OJ;var xJ=Fl?function(t,e){return Fl(t,"toString",{configurable:!0,enumerable:!1,value:hk(e),writable:!0})}:Hy,yk=xJ;var DJ=800,wJ=16,$J=Date.now;function MJ(t){var e=0,r=0;return function(){var n=$J(),o=wJ-(n-r);if(r=n,o>0){if(++e>=DJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Sk=MJ;var kJ=Sk(yk),Ek=kJ;function LJ(t,e){return Ek(gk(t,e,Hy),t+"")}var Gy=LJ;function UJ(t,e,r){if(!Rr(r))return!1;var n=typeof e;return(n=="number"?Bo(r)&&Ps(e,r.length):n=="string"&&e in r)?Vo(r[e],t):!1}var Ak=UJ;function jJ(t){return Gy(function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(o--,i):void 0,s&&Ak(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var a=r[n];a&&t(e,a,n,i)}return e})}var Ck=jJ;var zJ=Ck(function(t,e,r,n){pk(t,e,r,n)}),Di=zJ;var FJ="[object Map]",VJ="[object Set]",BJ=Object.prototype,HJ=BJ.hasOwnProperty;function GJ(t){if(t==null)return!0;if(Bo(t)&&(cr(t)||typeof t=="string"||typeof t.splice=="function"||Oi(t)||Ns(t)||bo(t)))return!t.length;var e=om(t);if(e==FJ||e==VJ)return!t.size;if(Os(t))return!Dy(t).length;for(var r in t)if(HJ.call(t,r))return!1;return!0}var _k=GJ;var Se={};qt(Se,{dispatch:()=>T,doesContextExist:()=>Ud,getActionType:()=>qae,getContextValue:()=>Wi,getDataObject:()=>W,getReferenceTokens:()=>oo,getSharedDataObject:()=>Mo,getStore:()=>De,getValue:()=>oe,isMergeable:()=>W6,lookupContextValue:()=>Da,mergeDeep:()=>xt,performReplaceAndRearrange:()=>v_,removeItem:()=>Tw,replaceValue:()=>Rw,resetStore:()=>ps,setStore:()=>bw,updateValue:()=>vw});var zI=class t{static namespaceEnabled;static setNamespaceSupport=(e=!1)=>{t.namespaceEnabled=e};static isNamespaceEnabled=()=>t.namespaceEnabled??!1;static getNamespaceList=()=>{let r=globalThis.PCore?.getEnvironmentInfo?.();if(!(!r||typeof r.getFeatureMap!="function"))return r.getFeatureMap()?.namespaceList};static getQualifiedName=(e,r)=>{if(!t.isNamespaceEnabled())return e;let n=t.getNamespaceList();return Array.isArray(n)&&n.some(i=>{let s=`${i}__`;return e.startsWith(s)})?e:`${r}__${e}`};static getDefaultQualifiedName=e=>t.getQualifiedName(e,"PegaPlatform");static namespacePrefixedRuleName(e,r){return r?t.getQualifiedName(e,r):t.getDefaultQualifiedName(e)}static getQualifiedNameForComplexRuleReferences(e,r){let{namespace:n,marker:o}=r??{},s=`${o??"caseInfo.content"}.`,a=e.lastIndexOf(s);if(a!==-1){let c=e.slice(0,a+s.length),u=e.slice(a+s.length).split(".").map(p=>t.namespacePrefixedRuleName(p,n));return c+u.join(".")}if(e.includes(".")){let c=e.startsWith("."),p=(c?e.slice(1):e).split(".").filter(Boolean).map(m=>t.namespacePrefixedRuleName(m,n)).join(".");return c?`.${p}`:p}return t.namespacePrefixedRuleName(e,n)}},P=zI;var FI=class{needsMapping;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 r,n=!1;try{let o=this.replaceToCase(JSON.stringify(e));r=JSON.parse(o)}catch(o){console.error("not a Valid JSON",o),n=!0}return n?e:r}transformCaseData(e){let r=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...r?.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")}},Ve=new FI;var bt="SET_PROPERTY",oc="REPLACE_PROPERTY",Tn="FIELD_CHANGE",Ik="SHOW_HARNESS";var Bl="LOAD_VIEW",Pr="SHOW_PAGE";var ic="SHOW_DATA",qy="SHOW_INSIGHT",Wy="SHOW_DASHBOARD";var ws="SET_LOADING",To="RESET_LOADING",$s="APP_OFFLINE",Hl="APP_ONLINE",Gl="SET_SHARED_PROPERTY",bk="ADD_WORK",ql="CREATE_WORK",Go="OPEN_WORK_BY_HANDLE";var VI="UPDATE_DOCUMENT";var vo="FINISH_ASSIGNMENT",BI="SAVE_AND_CLOSE",wi="CANCEL_ASSIGNMENT";var $i="OPEN_ASSIGNMENT",Tk="GET_DESCENDANTS",Ky="NAVIGATE_TO_STEP";var Mi="OPEN_LOCAL_ACTION",HI="OPEN_PROCESS_ACTION",Jy="SUBMIT_BULK_ACTION",Yy="SUBMIT_BULK_ACTION_ASYNC",vk="OPEN_BULK_ACTION",Rk="DELETE_CASE_IN_CREATE_STAGE";var Er="MERGE_DATA",Wl="REMOVE_ITEM",Zy="GET_DATAOBJECT_ACTIONS",Qy="SHOW_HISTORY";var Te="ERROR",Kl="INIT_CONTAINERS",qo="RESET_CONTAINERS",St="ADD_CONTAINER_ITEM",Ze="REMOVE_CONTAINER_ITEM",Ms="ADD_TRANSIENT_ITEM",ks="UPDATE_TRANSIENT_DATA",Wo="REMOVE_TRANSIENT_ITEM",Ko="REMOVE_ALL_TRANSIENT_ITEMS",uo="CLEAR_TRANSIENT_DATA",ki="PURGE_TRANSIENT_DATA",Ls="REPLACE_TRANSIENT_DATA",nr="ACTIVATE_CONTAINER_ITEM",kt="UPDATE_CONTAINER_ITEM",Us="UPMERGE_AND_REMOVE_CONTAINER_ITEM",et="REPLACE_CONTAINER_ITEM",Xy="ACTIVATE_MODAL_CONTAINER_ITEM",eS="REMOVE_CONTAINER",Jl="ADD_SUGGESTION_CONTEXT",vn="showView",Ro="showData",sc="showInsight",lm="showDashboard",Kt="openWorkByHandle",Pk="getDescendants",Nk="getCaseStages",Ok="getActions",qn="openAssignment",GI="openStage";var tS="createNewWork";var qI="finishAssignment";var xk="cancelAssignment",Yl="SHOW_CANCEL_ALERT";var Dk="save",wk="releaseAssignmentLock",rS="deleteCaseInCreateStage",$k="navigateToStep",nS="openLocalAction",Zl="openProcessAction",js="caseWideActions",WI="executeCaseWideActions",ac="openBulkAction",Mk="getBulkActions",kk="getAssignmentBulkActions",Lk="getCaseBulkActions",oS="performBulkAction",Uk="performAssignmentBulkAction",jk="createDataObject",zk="getDataObjectActions",Fk="deleteDataObject",Vk="readDataObject",Bk="updateDataObject",zs="launchAssignment",KI="getNextWork";var Fs="ADD_MESSAGES",Wn="CLEAR_MESSAGES",Vs="RESET_STORE",iS="FETCH_DATAPAGE",Jo="ADD_SHARED_DATA",Ql="REMOVE_SHARED_DATA",po="LIST_ACTION",Hk="SHOW_CASE_PREVIEW",pn="DELETE_CASE_SUMMARY",cc="ALTER_BLOCKING_ACTION_COUNT",Xl="SET_APP_LOCALE",eu="CREATE_DATA_OBJECT",sS="DELETE_DATA_OBJECT",aS="VIEW_DATA_OBJECT",tu="UPDATE_DATA_OBJECT",cS="OPEN_DATA_OBJECT_ACTION",Li="SUBMIT_DATA_OBJECT_ACTION",Ui="OPEN_EMBEDDED_DATA_MODAL",lS="GET_EMBEDDED_DATA_VIEW",uS="SUBMIT_EMBEDDED_DATA_MODAL",dS="SUBMIT_SUBSCRIPT",lc="FILL_FORM_WITH_AI",uc="createWork",pS="openAssignment",mS="openCase",Gk="CREATE_OBJECT",qk="GET_OBJECT",Wk="OPEN_OBJECT_ACTION",ru="EXECUTE_OBJECT_WIDE_ACTION",Kk="CREATE_EXTERNAL_OBJECT",JI="CREATE_EXTERNAL_CASE",YI="DELETE_WORK",Yo="createObject",Jr="getObject",fS="getObjectWideAction",Jk="executeObjectWideAction",Bs="createExternalObject",Yk="retrieveActionViewForNewObject",ZI="retrieveActionViewForNewCase",Zk="deleteWork";var E={ACTION_TYPES:{FINISH_ASSIGNMENT:vo,EXECUTE_OBJECT_WIDE_ACTION:ru,SUBMIT_BULK_ACTION:Jy,SUBMIT_BULK_ACTION_ASYNC:Yy,CREATE_DATA_OBJECT:eu,UPDATE_DATA_OBJECT:tu,SUBMIT_DATA_OBJECT_ACTION:Li},APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",SDK_RUNTIME:"SDK",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:P.getDefaultQualifiedName("pyCaseTab"),DATA_OBJECT_CREATE_VIEW:P.getDefaultQualifiedName("Create"),DATA_OBJECT_EDIT_VIEW:P.getDefaultQualifiedName("pyEdit"),PY_DATA_PREVIEW:P.getDefaultQualifiedName("pyDataPreview"),PY_DETAILS:P.getDefaultQualifiedName("pyDetails"),OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:P.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:P.getDefaultQualifiedName("D_pyGetUserWorkListByUserId"),D__WORK_BASKET:P.getDefaultQualifiedName("D_WorkBasket"),D__PY_MY_WORK_LIST:P.getDefaultQualifiedName("D_pyMyWorkList"),get D__PY_ASSIGNMENTS_DATA(){return P.getDefaultQualifiedName("D_pyAssignmentsData")}}},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:P.getDefaultQualifiedName("pzCreateDetails"),PREVIEW_VIEW_NAME:P.getDefaultQualifiedName("pyCasePreview"),CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",APPSHELL_DOCUMENT_TAB_ORDER:"appshell-document-tab-order",APPSHELL_OPEN_PAGES:"appshell-open-pages",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",LAUNCHPAD_APP_OVERVIEW:"PegaPlatform__ApplicationOverview",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:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pzInsKey"),CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:P.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:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyApprovalResult"),DUPLICATECASEFLAG:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseActions"),DUPLICATECASEID:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateID"),DUPLICATECASEINSKEY:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseReference.pzInsKey"),HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",PARENTCASES:"caseInfo.parentCases",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:P.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:P.getDefaultQualifiedName("pyTransferAssignment")},CONTENT:"content",MODAL:"modal",ACTIONAREA:"actionarea",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:P.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime"),SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:P.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_CLOSE_REAUTH_MODAL:"closeReAuthModal",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_FINISH_ASSIGNMENT_DONE:"finishAssignmentDone",EVENT_REQUEST_CONTEXT_CHANGED:"requestContextChanged",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_POST_ACTION:"postAction",EVENT_PREVIEW_DISMISS:"previewDismiss",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",NAV_ALIGNMENT_CHANGE:"navAlignmentChange",NAV_POSITION_CHANGE:"navPositionChange",CASE_VIEW_TEMPLATE_CHANGE:"caseViewTemplateChange",MULTI_STEP_NAV_DISPLAY_CHANGE:"multiStepNavDisplayChange",CASE_STAGE_DISPLAY_CHANGE:"caseStageDisplayChange"},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",CREATE_CASE_MODAL_OPEN:"createCaseModalOpen",CREATE_CASE_MODAL_CLOSE:"createCaseModalClose",CASE_FIELD_UPDATE_NOTIFICATION:"caseFieldUpdateNotification"},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",ON_REFRESH_ERROR:"onRefreshError",ON_FILL_FORM_WITH_AI_COMPLETE:"onFillFormWithAIComplete",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",PORTAL_AGENT_MODE_PATH:"presentation.templates.GenAICoach.agentMode"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:P.getDefaultQualifiedName("pyEmbedAssignment"),PY_DETAILS:P.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:P.getDefaultQualifiedName("messageViewReference"),PARENT_MESSAGE_ID:P.getDefaultQualifiedName("parentMessageID"),PX_RESULTS:P.getDefaultQualifiedName("pxResults"),NAME:P.getDefaultQualifiedName("name"),POSTED_BY_USER:P.getDefaultQualifiedName("postedByUser"),UPDATED_TIME:P.getDefaultQualifiedName("updatedTime"),POST_MESSAGE:P.getDefaultQualifiedName("PostMessage"),PZ_INS_KEY:P.getDefaultQualifiedName("pzInsKey"),PZ_PRIVATE_POST_DETAILS:P.getDefaultQualifiedName("pzPrivatePostDetails"),PY_SELECTED:P.getDefaultQualifiedName("pySelected"),PY_LABEL:P.getDefaultQualifiedName("pyLabel"),PY_RECIPIENTS:P.getDefaultQualifiedName("pyRecipients"),MENTIONS:P.getDefaultQualifiedName("mentions"),PY_IS_DELETE_ENABLED:P.getDefaultQualifiedName("pyIsDeleteEnabled"),TAGS:P.getDefaultQualifiedName("tags"),PZ_POST_DETAILS:P.getDefaultQualifiedName("pzPostDetails"),PY_FEED_SOURCE_REFERENCE:P.getDefaultQualifiedName("pyFeedSourceReference"),IS_EDITED:P.getDefaultQualifiedName("isEdited"),PY_LIKES:P.getDefaultQualifiedName("pyLikes"),PY_POST_TYPE:P.getDefaultQualifiedName("pyPostType"),POSTED_TIME:P.getDefaultQualifiedName("postedTime"),PY_MESSAGE_VIEW_REFERENCE:P.getDefaultQualifiedName("pyMessageViewReference"),ID:P.getDefaultQualifiedName("ID"),PY_COMMENT_CONTEXT:P.getDefaultQualifiedName("pyCommentContext"),PX_LIKE_COUNT:P.getDefaultQualifiedName("pxLikeCount"),MESSAGE:P.getDefaultQualifiedName("message")},CASE_VIEW_MODE:{PERFORM:"perform",REVIEW:"review",CONFIRM:"confirm"}},d={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:t=>`Table[${t}]`,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:P.getDefaultQualifiedName("pyDetails"),PY_CONFIRM:P.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},...E,getProperty:t=>Ve.map(t),getDefaultQualifiedName:t=>P.getDefaultQualifiedName(t)};var Zn={};qt(Zn,{beginDesignerRefresh:()=>mD,endDesignerRefresh:()=>fD,getAIAgent:()=>iw,getAdditionalInfo:()=>ED,getCascadingFieldsUtil:()=>zae,getDataPageKeys:()=>jx,getDataPageMetadata:()=>Ur,getDesignerViewStoreVersion:()=>$ae,getEditableFieldConfigUtil:()=>jae,getEmbeddedPropertyMetadata:()=>b_,getFieldParameters:()=>Lae,getFieldsByClassName:()=>Aw,getFormat:()=>nw,getGenAICoach:()=>ow,getInsight:()=>Ew,getLocaleUtilsForLanguage:()=>Ci,getLocalizationServiceFromStore:()=>wae,getLookUpDataPage:()=>zx,getLookUpDataPageInfo:()=>Fx,getParagraph:()=>Rc,getPersonalizationMetadata:()=>T_,getPropertyMetadata:()=>lt,getResolvedFieldMetadata:()=>Uae,getSavableDataPage:()=>Ux,isViewExists:()=>oT,mergeStore:()=>Fn,resolveNavigation:()=>Sw,resolveView:()=>Na,updateNavigationStore:()=>yw,updateStores:()=>bm,updateViewStore:()=>hw});var qJ=".RemoteSystemID",WJ="Traditional",gS=P.getDefaultQualifiedName("pyRemoteCaseDetails"),QI=class t{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=>J.getProperty(qJ,d.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,r,n)=>{if(e&&e.RemoteSystemID)return;let o=this.getRemoteHeaderByContext(n);o?e.RemoteSystemID=o:r&&this.isRemoteCase(r.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(r.caseTypeID))};static isTraditionalRemoteCase=(e="")=>t.getRemoteCase(e)?.RemoteApplicationType===WJ;static setAdditionalParameters=()=>{v.environmentInfoObject?.pyRemoteCaseTypeList?.forEach(r=>{let n=this.getRemoteCase(r.pyWorkTypeImplementationClassName);n&&(n.name=r.pyWorkTypeName)})};static getRemoteAppPlatformVersion=e=>{if(!e)return;let r=v.environmentInfoObject?.pyRemoteAppPlatformVersion;if(r)return JSON.parse(r)[e]};static isRemoteCaseVersionDifferent=e=>{if(!this.isRemoteCase(e))return!1;let r=this.getRemoteHeader(e);return r?!!this.getRemoteAppPlatformVersion(r):!1};static getRemoteHeaderFromSourceClass=e=>Object.values(this.remoteCaseMapping).find(n=>n.RemoteClassName===e)?.RemoteSystemID;static getRemoteCaseClassBySourceClass=e=>{if(e){for(let[r,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return r}}},ae=QI;var na={};qt(na,{CONTAINER_NAMES:()=>ge,CONTAINER_TYPES:()=>FD,addRootContainerItem:()=>BD,areContainerItemsPresent:()=>rae,cleanupTransientContainer:()=>pae,clearContainerItems:()=>mae,clearTransientData:()=>dae,closeContainerItem:()=>ta,getActiveContainerItemContext:()=>Ar,getActiveContainerItemIDFromRoutingInfo:()=>gae,getActiveContainerItemName:()=>se,getActiveContext:()=>fae,getChildContainerItemId:()=>jd,getChildContainerItems:()=>Au,getChildContainers:()=>Ke,getChildContainersContexts:()=>wo,getContainerAPI:()=>h_,getContainerAccessOrder:()=>Hd,getContainerData:()=>ut,getContainerItemByKey:()=>oae,getContainerItemData:()=>We,getContainerItemName:()=>wt,getContainerItems:()=>LT,getContainerLimit:()=>E6,getContainerParentContext:()=>uE,getContainerType:()=>iae,getContextByTargetAndKey:()=>JD,getDataContextName:()=>pe,getFlowContainer:()=>hae,getLeastRecentlyUsedNonDirtyContainerItemID:()=>jT,getParentContainerItem:()=>Oa,getRootContainerName:()=>zo,getSuggestionContexts:()=>Dh,getTargetFromContainerItemID:()=>te,getTransientItems:()=>Ei,hasContainerItems:()=>jr,isContainerDirty:()=>wh,isContainerInitialized:()=>Ch,isContainerItemActive:()=>sae,isContainerItemContextBeingUsedInOtherContainers:()=>HD,isContainerItemExists:()=>ll,isContainerItemExistsWithoutKey:()=>VD,isContainerLimitReached:()=>UT,isContainerMultipleMode:()=>mr,isContainerSingleMode:()=>It,purgeTransientData:()=>A6,removeContainer:()=>GD,replaceTransientData:()=>uae,resetContainersPayload:()=>Dc,setContainerLimit:()=>aae,updateCaseContextEtag:()=>WD,updateParentLastUpdateTime:()=>KD,updateRelatedContextEtag:()=>qD,updateTransientData:()=>lae});var nu={};qt(nu,{buildContextName:()=>lr,buildModalContext:()=>Yr,buildTransientContextName:()=>Qk,getContainerIdFromContext:()=>KJ,getParentContext:()=>Po,getParentContextName:()=>qe,getTargetFromContext:()=>tb,getTransientContext:()=>eb});var Zo={},XI=new Map,qe=t=>{let e=d.EMPTY_STRING;return t&&t.includes(d.FORWARD_SLASH_STRING)?e=t.substring(0,t.lastIndexOf("/")):e=t,e},lr=(t,e,r=!1)=>{let n=d.EMPTY_STRING;if(e&&t){let o=`${e}${d.FORWARD_SLASH_STRING}${t}`,i=ut(o);if(!i&&(e===d.APP.APP||e===d.APP.ROOT))o=`${e}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,Zo[o]?Zo[o]+=1:Zo[o]=1,n=`${o}${d.UNDERSCORE_STRING}${Zo[o]}`;else if(!i)n=lr(t,qe(e));else{if(r&&Zo[o])return n=`${o}${d.UNDERSCORE_STRING}${Zo[o]}`,n;Zo[o]?Zo[o]+=1:Zo[o]=1,n=`${o}${d.UNDERSCORE_STRING}${Zo[o]}`}}return n},Qk=(t,e)=>{if(t&&e){let r=XI.get(e)??{},n=(r[t]??0)+1;return r[t]=n,XI.set(e,r),`${e}${d.FORWARD_SLASH_STRING}${t}_${n}`}return""},eb=(t,e)=>{if(t&&e){let r=XI.get(e)?.[t];return r?`${e}${d.FORWARD_SLASH_STRING}${t}_${r}`:Qk(t,e)}return""},tb=t=>{let e=d.EMPTY_STRING;return t&&(e=t.substring(t.lastIndexOf("/")+1,t.lastIndexOf("_")).toLowerCase()),e},Yr=(t,e)=>{if(t===null)return e;let[,r]=e.split(d.FORWARD_SLASH_STRING);return t+d.FORWARD_SLASH_STRING+r},Po=t=>{let e=t.indexOf(d.FORWARD_SLASH_STRING),r=t.lastIndexOf(d.FORWARD_SLASH_STRING);return e===r?t:t.substring(0,r)},KJ=t=>{let e=t.split(d.FORWARD_SLASH_STRING);return e.length===2?t:e[0]+d.FORWARD_SLASH_STRING+e[2]};var Hs={};qt(Hs,{getResolvedTargetName:()=>Z,getRoutingInfo:()=>um,getSemanticURLFromRoutingInfo:()=>JJ});var Z=(t,e)=>{if(!t||!e)return null;let r=d.EMPTY_STRING,n;return e&&(r=`${e}${d.FORWARD_SLASH_STRING}${t}`,n=ut(r),!n&&!e.includes("/")?r=`${e}${d.FORWARD_SLASH_STRING}${t}`:n||(r=Z(t,qe(e)))),r},um=(t,e)=>{let r=Z(t,e);return r&&ut(r)?ut(r):{}},JJ=(t,e)=>_e.getSemanticURL(vn,{page:t},e);var wD={};qt(wD,{evaluate:()=>Hse,handleChange:()=>DD,hasDeclareExpression:()=>QV,updateDeclareExpressions:()=>Jb});var rb=class{customComponentLazyMap;componentMap;overrideMap;lazyMap;constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,r){this.componentMap[e]=r}registerLazyMap(e,r){this.lazyMap[e]=r}registerCustomComponentLazyMap(e,r){this.customComponentLazyMap[e]=r}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}},Gs=new rb;var nb=class{handlers;constructor(){this.handlers={}}registerHandler(e,r){this.handlers[e]=r}getHandler(e){return this.handlers[e]}},xe=new nb;var YJ=/^@\w+\s+(.+)$/s,ob=class{static handleAnnotation(e,r,n){let o=e.indexOf(" "),i=o===-1?e:e.substring(0,o),s=xe.getHandler(i);if(!s)return e;let a=e.match(YJ),c=a?a[1]:"";return s(c.trim(),r,n)}static trimAnnotation(e){if(typeof e!="string")return e;let r=e.indexOf(" "),n=e.substring(0,r),o=e.substring(r+1);return xe.getHandler(n)?o:e}static handleComponentMapping(e,r,n){let o=Gs.getComponent(r.type);if(!o?.mapping)return;let i=o.mapping(r.config);if(i&&i["@map"]){let s=i["@map"],{source:a}=s;if(!a)return;let c=n.getValue(a);if(typeof s.advanced=="function")s.advanced(e,c);else{let l=s.inputs_map;e[s.output_property]=[];let u=e[s.output_property];c.forEach(p=>{let m={};Object.keys(l).forEach(f=>{let h=l[f];h?.startsWith(".")?(h=h.substring(1),m[f]=p[h]):m[f]=h}),u.push(m)})}}}static getPropertyName(e=""){if(e&&g.isString(e)){let r=e.startsWith(d.PROPERTY_ANNOTATION)||e.startsWith(d.ATTACHMENT_ANNOTATION)||e.startsWith(d.ASSOCIATED_PROPERTY_ANNOTATION)||e.startsWith(d.CLASS_ASSOCIATION_ANNOTATION)||e.startsWith(d.FILTERED_LIST_ANNOTATION),n=e.indexOf(" ");if(!r||n===-1)return e;let o=e.substring(n+1).trim();return o.startsWith(".")?o.substring(1):o}return e}static getLeafPropertyName(e){if(g.isString(e)&&!!e?.startsWith(d.PROPERTY_ANNOTATION)){let n=this.getPropertyName(e),o=n.split(".");return o.length<2?n:o.pop()}return e}static isProperty(e){return g.isString(e)&&!!e?.startsWith(d.PROPERTY_ANNOTATION)}},fe=ob;var WC={};qt(WC,{doesRestApiExist:()=>Zs,getCancelTokenSource:()=>hi,getCaseApi:()=>kie,getHeaderProcessor:()=>$ie,invokeCustomRestApi:()=>AT,invokeRestApi:()=>ve,isRequestCanceled:()=>Sh,registerInterceptor:()=>Mie});var ib=function(t,e){return ib=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},ib(t,e)};function Zr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ib(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Xk(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function hS(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ji(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function No(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function Oo(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}function dc(t){return this instanceof dc?(this.v=t,this):new dc(t)}function eL(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(f){return function(h){return Promise.resolve(h).then(f,p)}}function a(f,h){n[f]&&(o[f]=function(S){return new Promise(function(A,C){i.push([f,S,A,C])>1||c(f,S)})},h&&(o[f]=h(o[f])))}function c(f,h){try{l(n[f](h))}catch(S){m(i[0][3],S)}}function l(f){f.value instanceof dc?Promise.resolve(f.value.v).then(u,p):m(i[0][2],f)}function u(f){c("next",f)}function p(f){c("throw",f)}function m(f,h){f(h),i.shift(),i.length&&c(i[0][0],i[0][1])}}function tL(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof ji=="function"?ji(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(s){return new Promise(function(a,c){s=t[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}function tt(t){return typeof t=="function"}function ou(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var yS=ou(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
1
+ var HG=Object.defineProperty;var qt=(t,e)=>{for(var r in e)HG(t,r,{get:e[r],enumerable:!0})};function GG(){this.__data__=[],this.size=0}var hM=GG;function qG(t,e){return t===e||t!==t&&e!==e}var Vo=qG;function WG(t,e){for(var r=t.length;r--;)if(Vo(t[r][0],e))return r;return-1}var bs=WG;var KG=Array.prototype,JG=KG.splice;function YG(t){var e=this.__data__,r=bs(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():JG.call(e,r,1),--this.size,!0}var yM=YG;function ZG(t){var e=this.__data__,r=bs(e,t);return r<0?void 0:e[r][1]}var SM=ZG;function QG(t){return bs(this.__data__,t)>-1}var EM=QG;function XG(t,e){var r=this.__data__,n=bs(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var AM=XG;function Dl(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dl.prototype.clear=hM;Dl.prototype.delete=yM;Dl.prototype.get=SM;Dl.prototype.has=EM;Dl.prototype.set=AM;var Ts=Dl;function eq(){this.__data__=new Ts,this.size=0}var CM=eq;function tq(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var _M=tq;function rq(t){return this.__data__.get(t)}var IM=rq;function nq(t){return this.__data__.has(t)}var bM=nq;var oq=typeof global=="object"&&global&&global.Object===Object&&global,_y=oq;var iq=typeof self=="object"&&self&&self.Object===Object&&self,sq=_y||iq||Function("return this")(),Ir=sq;var aq=Ir.Symbol,un=aq;var TM=Object.prototype,cq=TM.hasOwnProperty,lq=TM.toString,rm=un?un.toStringTag:void 0;function uq(t){var e=cq.call(t,rm),r=t[rm];try{t[rm]=void 0;var n=!0}catch{}var o=lq.call(t);return n&&(e?t[rm]=r:delete t[rm]),o}var vM=uq;var dq=Object.prototype,pq=dq.toString;function mq(t){return pq.call(t)}var RM=mq;var fq="[object Null]",gq="[object Undefined]",PM=un?un.toStringTag:void 0;function hq(t){return t==null?t===void 0?gq:fq:PM&&PM in Object(t)?vM(t):RM(t)}var Gn=hq;function yq(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Rr=yq;var Sq="[object AsyncFunction]",Eq="[object Function]",Aq="[object GeneratorFunction]",Cq="[object Proxy]";function _q(t){if(!Rr(t))return!1;var e=Gn(t);return e==Eq||e==Aq||e==Sq||e==Cq}var wl=_q;var Iq=Ir["__core-js_shared__"],Iy=Iq;var NM=(function(){var t=/[^.]+$/.exec(Iy&&Iy.keys&&Iy.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function bq(t){return!!NM&&NM in t}var OM=bq;var Tq=Function.prototype,vq=Tq.toString;function Rq(t){if(t!=null){try{return vq.call(t)}catch{}try{return t+""}catch{}}return""}var Pi=Rq;var Pq=/[\\^$.*+?()[\]{}|]/g,Nq=/^\[object .+?Constructor\]$/,Oq=Function.prototype,xq=Object.prototype,Dq=Oq.toString,wq=xq.hasOwnProperty,$q=RegExp("^"+Dq.call(wq).replace(Pq,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mq(t){if(!Rr(t)||OM(t))return!1;var e=wl(t)?$q:Nq;return e.test(Pi(t))}var xM=Mq;function kq(t,e){return t?.[e]}var DM=kq;function Lq(t,e){var r=DM(t,e);return xM(r)?r:void 0}var bn=Lq;var Uq=bn(Ir,"Map"),vs=Uq;var jq=bn(Object,"create"),Ni=jq;function zq(){this.__data__=Ni?Ni(null):{},this.size=0}var wM=zq;function Fq(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var $M=Fq;var Vq="__lodash_hash_undefined__",Bq=Object.prototype,Hq=Bq.hasOwnProperty;function Gq(t){var e=this.__data__;if(Ni){var r=e[t];return r===Vq?void 0:r}return Hq.call(e,t)?e[t]:void 0}var MM=Gq;var qq=Object.prototype,Wq=qq.hasOwnProperty;function Kq(t){var e=this.__data__;return Ni?e[t]!==void 0:Wq.call(e,t)}var kM=Kq;var Jq="__lodash_hash_undefined__";function Yq(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ni&&e===void 0?Jq:e,this}var LM=Yq;function $l(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}$l.prototype.clear=wM;$l.prototype.delete=$M;$l.prototype.get=MM;$l.prototype.has=kM;$l.prototype.set=LM;var wI=$l;function Zq(){this.size=0,this.__data__={hash:new wI,map:new(vs||Ts),string:new wI}}var UM=Zq;function Qq(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var jM=Qq;function Xq(t,e){var r=t.__data__;return jM(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Rs=Xq;function e7(t){var e=Rs(this,t).delete(t);return this.size-=e?1:0,e}var zM=e7;function t7(t){return Rs(this,t).get(t)}var FM=t7;function r7(t){return Rs(this,t).has(t)}var VM=r7;function n7(t,e){var r=Rs(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var BM=n7;function Ml(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ml.prototype.clear=UM;Ml.prototype.delete=zM;Ml.prototype.get=FM;Ml.prototype.has=VM;Ml.prototype.set=BM;var rc=Ml;var o7=200;function i7(t,e){var r=this.__data__;if(r instanceof Ts){var n=r.__data__;if(!vs||n.length<o7-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new rc(n)}return r.set(t,e),this.size=r.size,this}var HM=i7;function kl(t){var e=this.__data__=new Ts(t);this.size=e.size}kl.prototype.clear=CM;kl.prototype.delete=_M;kl.prototype.get=IM;kl.prototype.has=bM;kl.prototype.set=HM;var Ll=kl;var s7="__lodash_hash_undefined__";function a7(t){return this.__data__.set(t,s7),this}var GM=a7;function c7(t){return this.__data__.has(t)}var qM=c7;function by(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new rc;++e<r;)this.add(t[e])}by.prototype.add=by.prototype.push=GM;by.prototype.has=qM;var Ty=by;function l7(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var WM=l7;function u7(t,e){return t.has(e)}var vy=u7;var d7=1,p7=2;function m7(t,e,r,n,o,i){var s=r&d7,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var l=i.get(t),u=i.get(e);if(l&&u)return l==e&&u==t;var p=-1,m=!0,f=r&p7?new Ty:void 0;for(i.set(t,e),i.set(e,t);++p<a;){var h=t[p],S=e[p];if(n)var A=s?n(S,h,p,e,t,i):n(h,S,p,t,e,i);if(A!==void 0){if(A)continue;m=!1;break}if(f){if(!WM(e,function(C,I){if(!vy(f,I)&&(h===C||o(h,C,r,n,i)))return f.push(I)})){m=!1;break}}else if(!(h===S||o(h,S,r,n,i))){m=!1;break}}return i.delete(t),i.delete(e),m}var Ry=m7;var f7=Ir.Uint8Array,Ul=f7;function g7(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}var KM=g7;function h7(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var JM=h7;var y7=1,S7=2,E7="[object Boolean]",A7="[object Date]",C7="[object Error]",_7="[object Map]",I7="[object Number]",b7="[object RegExp]",T7="[object Set]",v7="[object String]",R7="[object Symbol]",P7="[object ArrayBuffer]",N7="[object DataView]",YM=un?un.prototype:void 0,$I=YM?YM.valueOf:void 0;function O7(t,e,r,n,o,i,s){switch(r){case N7:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case P7:return!(t.byteLength!=e.byteLength||!i(new Ul(t),new Ul(e)));case E7:case A7:case I7:return Vo(+t,+e);case C7:return t.name==e.name&&t.message==e.message;case b7:case v7:return t==e+"";case _7:var a=KM;case T7:var c=n&y7;if(a||(a=JM),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=S7,s.set(t,e);var u=Ry(a(t),a(e),n,o,i,s);return s.delete(t),u;case R7:if($I)return $I.call(t)==$I.call(e)}return!1}var ZM=O7;function x7(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Py=x7;var D7=Array.isArray,cr=D7;function w7(t,e,r){var n=e(t);return cr(t)?n:Py(n,r(t))}var QM=w7;function $7(t,e){for(var r=-1,n=t==null?0:t.length,o=0,i=[];++r<n;){var s=t[r];e(s,r,t)&&(i[o++]=s)}return i}var XM=$7;function M7(){return[]}var e1=M7;var k7=Object.prototype,L7=k7.propertyIsEnumerable,t1=Object.getOwnPropertySymbols,U7=t1?function(t){return t==null?[]:(t=Object(t),XM(t1(t),function(e){return L7.call(t,e)}))}:e1,r1=U7;function j7(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var n1=j7;function z7(t){return t!=null&&typeof t=="object"}var dn=z7;var F7="[object Arguments]";function V7(t){return dn(t)&&Gn(t)==F7}var MI=V7;var o1=Object.prototype,B7=o1.hasOwnProperty,H7=o1.propertyIsEnumerable,G7=MI((function(){return arguments})())?MI:function(t){return dn(t)&&B7.call(t,"callee")&&!H7.call(t,"callee")},bo=G7;function q7(){return!1}var i1=q7;var c1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,s1=c1&&typeof module=="object"&&module&&!module.nodeType&&module,W7=s1&&s1.exports===c1,a1=W7?Ir.Buffer:void 0,K7=a1?a1.isBuffer:void 0,J7=K7||i1,Oi=J7;var Y7=9007199254740991,Z7=/^(?:0|[1-9]\d*)$/;function Q7(t,e){var r=typeof t;return e=e??Y7,!!e&&(r=="number"||r!="symbol"&&Z7.test(t))&&t>-1&&t%1==0&&t<e}var Ps=Q7;var X7=9007199254740991;function eW(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=X7}var jl=eW;var tW="[object Arguments]",rW="[object Array]",nW="[object Boolean]",oW="[object Date]",iW="[object Error]",sW="[object Function]",aW="[object Map]",cW="[object Number]",lW="[object Object]",uW="[object RegExp]",dW="[object Set]",pW="[object String]",mW="[object WeakMap]",fW="[object ArrayBuffer]",gW="[object DataView]",hW="[object Float32Array]",yW="[object Float64Array]",SW="[object Int8Array]",EW="[object Int16Array]",AW="[object Int32Array]",CW="[object Uint8Array]",_W="[object Uint8ClampedArray]",IW="[object Uint16Array]",bW="[object Uint32Array]",Wt={};Wt[hW]=Wt[yW]=Wt[SW]=Wt[EW]=Wt[AW]=Wt[CW]=Wt[_W]=Wt[IW]=Wt[bW]=!0;Wt[tW]=Wt[rW]=Wt[fW]=Wt[nW]=Wt[gW]=Wt[oW]=Wt[iW]=Wt[sW]=Wt[aW]=Wt[cW]=Wt[lW]=Wt[uW]=Wt[dW]=Wt[pW]=Wt[mW]=!1;function TW(t){return dn(t)&&jl(t.length)&&!!Wt[Gn(t)]}var l1=TW;function vW(t){return function(e){return t(e)}}var Ny=vW;var u1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nm=u1&&typeof module=="object"&&module&&!module.nodeType&&module,RW=nm&&nm.exports===u1,kI=RW&&_y.process,PW=(function(){try{var t=nm&&nm.require&&nm.require("util").types;return t||kI&&kI.binding&&kI.binding("util")}catch{}})(),LI=PW;var d1=LI&&LI.isTypedArray,NW=d1?Ny(d1):l1,Ns=NW;var OW=Object.prototype,xW=OW.hasOwnProperty;function DW(t,e){var r=cr(t),n=!r&&bo(t),o=!r&&!n&&Oi(t),i=!r&&!n&&!o&&Ns(t),s=r||n||o||i,a=s?n1(t.length,String):[],c=a.length;for(var l in t)(e||xW.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ps(l,c)))&&a.push(l);return a}var Oy=DW;var wW=Object.prototype;function $W(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||wW;return t===r}var Os=$W;function MW(t,e){return function(r){return t(e(r))}}var xy=MW;var kW=xy(Object.keys,Object),p1=kW;var LW=Object.prototype,UW=LW.hasOwnProperty;function jW(t){if(!Os(t))return p1(t);var e=[];for(var r in Object(t))UW.call(t,r)&&r!="constructor"&&e.push(r);return e}var Dy=jW;function zW(t){return t!=null&&jl(t.length)&&!wl(t)}var Bo=zW;function FW(t){return Bo(t)?Oy(t):Dy(t)}var m1=FW;function VW(t){return QM(t,m1,r1)}var UI=VW;var BW=1,HW=Object.prototype,GW=HW.hasOwnProperty;function qW(t,e,r,n,o,i){var s=r&BW,a=UI(t),c=a.length,l=UI(e),u=l.length;if(c!=u&&!s)return!1;for(var p=c;p--;){var m=a[p];if(!(s?m in e:GW.call(e,m)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var S=!0;i.set(t,e),i.set(e,t);for(var A=s;++p<c;){m=a[p];var C=t[m],I=e[m];if(n)var _=s?n(I,C,m,e,t,i):n(C,I,m,t,e,i);if(!(_===void 0?C===I||o(C,I,r,n,i):_)){S=!1;break}A||(A=m=="constructor")}if(S&&!A){var N=t.constructor,x=e.constructor;N!=x&&"constructor"in t&&"constructor"in e&&!(typeof N=="function"&&N instanceof N&&typeof x=="function"&&x instanceof x)&&(S=!1)}return i.delete(t),i.delete(e),S}var f1=qW;var WW=bn(Ir,"DataView"),wy=WW;var KW=bn(Ir,"Promise"),$y=KW;var JW=bn(Ir,"Set"),My=JW;var YW=bn(Ir,"WeakMap"),ky=YW;var g1="[object Map]",ZW="[object Object]",h1="[object Promise]",y1="[object Set]",S1="[object WeakMap]",E1="[object DataView]",QW=Pi(wy),XW=Pi(vs),eK=Pi($y),tK=Pi(My),rK=Pi(ky),nc=Gn;(wy&&nc(new wy(new ArrayBuffer(1)))!=E1||vs&&nc(new vs)!=g1||$y&&nc($y.resolve())!=h1||My&&nc(new My)!=y1||ky&&nc(new ky)!=S1)&&(nc=function(t){var e=Gn(t),r=e==ZW?t.constructor:void 0,n=r?Pi(r):"";if(n)switch(n){case QW:return E1;case XW:return g1;case eK:return h1;case tK:return y1;case rK:return S1}return e});var om=nc;var nK=1,A1="[object Arguments]",C1="[object Array]",Ly="[object Object]",oK=Object.prototype,_1=oK.hasOwnProperty;function iK(t,e,r,n,o,i){var s=cr(t),a=cr(e),c=s?C1:om(t),l=a?C1:om(e);c=c==A1?Ly:c,l=l==A1?Ly:l;var u=c==Ly,p=l==Ly,m=c==l;if(m&&Oi(t)){if(!Oi(e))return!1;s=!0,u=!1}if(m&&!u)return i||(i=new Ll),s||Ns(t)?Ry(t,e,r,n,o,i):ZM(t,e,c,r,n,o,i);if(!(r&nK)){var f=u&&_1.call(t,"__wrapped__"),h=p&&_1.call(e,"__wrapped__");if(f||h){var S=f?t.value():t,A=h?e.value():e;return i||(i=new Ll),o(S,A,r,n,i)}}return m?(i||(i=new Ll),f1(t,e,r,n,o,i)):!1}var I1=iK;function b1(t,e,r,n,o){return t===e?!0:t==null||e==null||!dn(t)&&!dn(e)?t!==t&&e!==e:I1(t,e,r,n,b1,o)}var T1=b1;function sK(t,e){return T1(t,e)}var lo=sK;var Ho,v1,R1,aK=t=>{t&&(t=t||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},Ho=t,Ho.BASEURL=t.server,Ho.ACTIONURL=t["action-end-point"],Ho.DATAURL=t["data-end-point"],R1=t.reAuthUrl)},cK=t=>`${Ho.BASEURL}${Ho[t]}`,lK=()=>`${Ho.BASEURL}${Ho.ACTIONURL}`,uK=()=>Ho.BASEURL,dK=()=>R1,pK=t=>Ho[t],mK=t=>fetch(lK(),{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),fK=t=>{v1=t},gK=()=>v1,gt={init:aK,getAPIURL:cK,getReAuthURL:dK,getServerURL:uK,getRouteURL:pK,fetchData:mK,setGoogleMapsAPIKey:fK,getGoogleMapsAPIKey:gK};var rt={};qt(rt,{activateContainerItem:()=>rr,addContainerItem:()=>Pt,addMessages:()=>wm,addSharedData:()=>Mw,addTransientItem:()=>qx,addWork:()=>cce,clearTransientData:()=>YD,createWork:()=>K6,error:()=>Qi,finishAssignment:()=>dce,initContainers:()=>Gx,listAction:()=>Kn,loadView:()=>Pm,mergeData:()=>Re,openAssignment:()=>pce,openWorkByHandle:()=>lce,postProcess:()=>V,purgeTransientData:()=>QD,removeAllTransientItems:()=>$w,removeContainerItem:()=>Qe,removeSharedData:()=>kw,removeTransientItem:()=>Ih,replaceContainerItem:()=>kn,replaceTransientData:()=>ZD,resetContainers:()=>wc,resetLoading:()=>gs,setLoading:()=>Mh,setSharedProperty:()=>DT,setStateProperty:()=>sa,showCasePreview:()=>fce,showHarness:()=>sce,showHistory:()=>mce,showPage:()=>ace,upMergeAndRemoveContainerItem:()=>uce,updateContainerItem:()=>tr,updateTransientData:()=>_h});var hK="[object Symbol]";function yK(t){return typeof t=="symbol"||dn(t)&&Gn(t)==hK}var zl=yK;var SK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,EK=/^\w*$/;function AK(t,e){if(cr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||zl(t)?!0:EK.test(t)||!SK.test(t)||e!=null&&t in Object(e)}var P1=AK;var CK="Expected a function";function jI(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(CK);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(jI.Cache||rc),r}jI.Cache=rc;var N1=jI;var _K=500;function IK(t){var e=N1(t,function(n){return r.size===_K&&r.clear(),n}),r=e.cache;return e}var O1=IK;var bK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,TK=/\\(\\)?/g,vK=O1(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(bK,function(r,n,o,i){e.push(o?i.replace(TK,"$1"):n||r)}),e}),x1=vK;function RK(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Uy=RK;var PK=1/0,D1=un?un.prototype:void 0,w1=D1?D1.toString:void 0;function $1(t){if(typeof t=="string")return t;if(cr(t))return Uy(t,$1)+"";if(zl(t))return w1?w1.call(t):"";var e=t+"";return e=="0"&&1/t==-PK?"-0":e}var M1=$1;function NK(t){return t==null?"":M1(t)}var jy=NK;function OK(t,e){return cr(t)?t:P1(t,e)?[t]:x1(jy(t))}var xs=OK;function xK(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var k1=xK;var DK=1/0;function wK(t){if(typeof t=="string"||zl(t))return t;var e=t+"";return e=="0"&&1/t==-DK?"-0":e}var xi=wK;function $K(t,e){e=xs(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[xi(e[r++])];return r&&r==n?t:void 0}var zy=$K;function MK(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var L1=MK;function kK(t,e){return e.length<2?t:zy(t,L1(e,0,-1))}var U1=kK;var LK=Object.prototype,UK=LK.hasOwnProperty;function jK(t,e){e=xs(e,t);var r=-1,n=e.length;if(!n)return!0;for(;++r<n;){var o=xi(e[r]);if(o==="__proto__"&&!UK.call(t,"__proto__")||(o==="constructor"||o==="prototype")&&r<n-1)return!1}var i=U1(t,e);return i==null||delete i[xi(k1(e))]}var j1=jK;function zK(t,e){return t==null?!0:j1(t,e)}var z1=zK;var FK=Object.prototype,VK=FK.hasOwnProperty;function BK(t,e){return t!=null&&VK.call(t,e)}var F1=BK;function HK(t,e,r){e=xs(e,t);for(var n=-1,o=e.length,i=!1;++n<o;){var s=xi(e[n]);if(!(i=t!=null&&r(t,s)))break;t=t[s]}return i||++n!=o?i:(o=t==null?0:t.length,!!o&&jl(o)&&Ps(s,o)&&(cr(t)||bo(t)))}var V1=HK;function GK(t,e){return t!=null&&V1(t,e,F1)}var B1=GK;function qK(t,e,r){var n=t==null?void 0:zy(t,e);return n===void 0?r:n}var im=qK;var WK=(function(){try{var t=bn(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Fl=WK;function KK(t,e,r){e=="__proto__"&&Fl?Fl(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Vl=KK;var JK=Object.prototype,YK=JK.hasOwnProperty;function ZK(t,e,r){var n=t[e];(!(YK.call(t,e)&&Vo(n,r))||r===void 0&&!(e in t))&&Vl(t,e,r)}var Fy=ZK;function QK(t,e,r,n){if(!Rr(t))return t;e=xs(e,t);for(var o=-1,i=e.length,s=i-1,a=t;a!=null&&++o<i;){var c=xi(e[o]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var u=a[c];l=n?n(u,c,a):void 0,l===void 0&&(l=Rr(u)?u:Ps(e[o+1])?[]:{})}Fy(a,c,l),a=a[c]}return t}var H1=QK;function XK(t,e,r){return t==null?t:H1(t,e,r)}var G1=XK;function eJ(t,e,r){(r!==void 0&&!Vo(t[e],r)||r===void 0&&!(e in t))&&Vl(t,e,r)}var sm=eJ;function tJ(t){return function(e,r,n){for(var o=-1,i=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++o];if(r(i[c],c,i)===!1)break}return e}}var q1=tJ;var rJ=q1(),W1=rJ;var Z1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,K1=Z1&&typeof module=="object"&&module&&!module.nodeType&&module,nJ=K1&&K1.exports===Z1,J1=nJ?Ir.Buffer:void 0,Y1=J1?J1.allocUnsafe:void 0;function oJ(t,e){if(e)return t.slice();var r=t.length,n=Y1?Y1(r):new t.constructor(r);return t.copy(n),n}var Q1=oJ;function iJ(t){var e=new t.constructor(t.byteLength);return new Ul(e).set(new Ul(t)),e}var X1=iJ;function sJ(t,e){var r=e?X1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var ek=sJ;function aJ(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var tk=aJ;var rk=Object.create,cJ=(function(){function t(){}return function(e){if(!Rr(e))return{};if(rk)return rk(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),nk=cJ;var lJ=xy(Object.getPrototypeOf,Object),Vy=lJ;function uJ(t){return typeof t.constructor=="function"&&!Os(t)?nk(Vy(t)):{}}var ok=uJ;function dJ(t){return dn(t)&&Bo(t)}var am=dJ;var pJ="[object Object]",mJ=Function.prototype,fJ=Object.prototype,ik=mJ.toString,gJ=fJ.hasOwnProperty,hJ=ik.call(Object);function yJ(t){if(!dn(t)||Gn(t)!=pJ)return!1;var e=Vy(t);if(e===null)return!0;var r=gJ.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ik.call(r)==hJ}var Ds=yJ;function SJ(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var cm=SJ;function EJ(t,e,r,n){var o=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;c===void 0&&(c=t[a]),o?Vl(r,a,c):Fy(r,a,c)}return r}var sk=EJ;function AJ(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ak=AJ;var CJ=Object.prototype,_J=CJ.hasOwnProperty;function IJ(t){if(!Rr(t))return ak(t);var e=Os(t),r=[];for(var n in t)n=="constructor"&&(e||!_J.call(t,n))||r.push(n);return r}var ck=IJ;function bJ(t){return Bo(t)?Oy(t,!0):ck(t)}var By=bJ;function TJ(t){return sk(t,By(t))}var lk=TJ;function vJ(t,e,r,n,o,i,s){var a=cm(t,r),c=cm(e,r),l=s.get(c);if(l){sm(t,r,l);return}var u=i?i(a,c,r+"",t,e,s):void 0,p=u===void 0;if(p){var m=cr(c),f=!m&&Oi(c),h=!m&&!f&&Ns(c);u=c,m||f||h?cr(a)?u=a:am(a)?u=tk(a):f?(p=!1,u=Q1(c,!0)):h?(p=!1,u=ek(c,!0)):u=[]:Ds(c)||bo(c)?(u=a,bo(a)?u=lk(a):(!Rr(a)||wl(a))&&(u=ok(c))):p=!1}p&&(s.set(c,u),o(u,c,n,i,s),s.delete(c)),sm(t,r,u)}var uk=vJ;function dk(t,e,r,n,o){t!==e&&W1(e,function(i,s){if(o||(o=new Ll),Rr(i))uk(t,e,s,r,dk,n,o);else{var a=n?n(cm(t,s),i,s+"",t,e,o):void 0;a===void 0&&(a=i),sm(t,s,a)}},By)}var pk=dk;function RJ(t){return t}var Hy=RJ;function PJ(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var mk=PJ;var fk=Math.max;function NJ(t,e,r){return e=fk(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=fk(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=r(s),mk(t,this,a)}}var gk=NJ;function OJ(t){return function(){return t}}var hk=OJ;var xJ=Fl?function(t,e){return Fl(t,"toString",{configurable:!0,enumerable:!1,value:hk(e),writable:!0})}:Hy,yk=xJ;var DJ=800,wJ=16,$J=Date.now;function MJ(t){var e=0,r=0;return function(){var n=$J(),o=wJ-(n-r);if(r=n,o>0){if(++e>=DJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Sk=MJ;var kJ=Sk(yk),Ek=kJ;function LJ(t,e){return Ek(gk(t,e,Hy),t+"")}var Gy=LJ;function UJ(t,e,r){if(!Rr(r))return!1;var n=typeof e;return(n=="number"?Bo(r)&&Ps(e,r.length):n=="string"&&e in r)?Vo(r[e],t):!1}var Ak=UJ;function jJ(t){return Gy(function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(o--,i):void 0,s&&Ak(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var a=r[n];a&&t(e,a,n,i)}return e})}var Ck=jJ;var zJ=Ck(function(t,e,r,n){pk(t,e,r,n)}),Di=zJ;var FJ="[object Map]",VJ="[object Set]",BJ=Object.prototype,HJ=BJ.hasOwnProperty;function GJ(t){if(t==null)return!0;if(Bo(t)&&(cr(t)||typeof t=="string"||typeof t.splice=="function"||Oi(t)||Ns(t)||bo(t)))return!t.length;var e=om(t);if(e==FJ||e==VJ)return!t.size;if(Os(t))return!Dy(t).length;for(var r in t)if(HJ.call(t,r))return!1;return!0}var _k=GJ;var Se={};qt(Se,{dispatch:()=>T,doesContextExist:()=>Ud,getActionType:()=>qae,getContextValue:()=>Wi,getDataObject:()=>W,getReferenceTokens:()=>oo,getSharedDataObject:()=>Mo,getStore:()=>De,getValue:()=>oe,isMergeable:()=>W6,lookupContextValue:()=>Da,mergeDeep:()=>xt,performReplaceAndRearrange:()=>v_,removeItem:()=>Tw,replaceValue:()=>Rw,resetStore:()=>ps,setStore:()=>bw,updateValue:()=>vw});var zI=class t{static namespaceEnabled;static setNamespaceSupport=(e=!1)=>{t.namespaceEnabled=e};static isNamespaceEnabled=()=>t.namespaceEnabled??!1;static getNamespaceList=()=>{let r=globalThis.PCore?.getEnvironmentInfo?.();if(!(!r||typeof r.getFeatureMap!="function"))return r.getFeatureMap()?.namespaceList};static getQualifiedName=(e,r)=>{if(!t.isNamespaceEnabled())return e;let n=t.getNamespaceList();return Array.isArray(n)&&n.some(i=>{let s=`${i}__`;return e.startsWith(s)})?e:`${r}__${e}`};static getDefaultQualifiedName=e=>t.getQualifiedName(e,"PegaPlatform");static namespacePrefixedRuleName(e,r){return r?t.getQualifiedName(e,r):t.getDefaultQualifiedName(e)}static getQualifiedNameForComplexRuleReferences(e,r){let{namespace:n,marker:o}=r??{},s=`${o??"caseInfo.content"}.`,a=e.lastIndexOf(s);if(a!==-1){let c=e.slice(0,a+s.length),u=e.slice(a+s.length).split(".").map(p=>t.namespacePrefixedRuleName(p,n));return c+u.join(".")}if(e.includes(".")){let c=e.startsWith("."),p=(c?e.slice(1):e).split(".").filter(Boolean).map(m=>t.namespacePrefixedRuleName(m,n)).join(".");return c?`.${p}`:p}return t.namespacePrefixedRuleName(e,n)}},P=zI;var FI=class{needsMapping;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 r,n=!1;try{let o=this.replaceToCase(JSON.stringify(e));r=JSON.parse(o)}catch(o){console.error("not a Valid JSON",o),n=!0}return n?e:r}transformCaseData(e){let r=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...r?.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")}},Ve=new FI;var bt="SET_PROPERTY",oc="REPLACE_PROPERTY",Tn="FIELD_CHANGE",Ik="SHOW_HARNESS";var Bl="LOAD_VIEW",Pr="SHOW_PAGE";var ic="SHOW_DATA",qy="SHOW_INSIGHT",Wy="SHOW_DASHBOARD";var ws="SET_LOADING",To="RESET_LOADING",$s="APP_OFFLINE",Hl="APP_ONLINE",Gl="SET_SHARED_PROPERTY",bk="ADD_WORK",ql="CREATE_WORK",Go="OPEN_WORK_BY_HANDLE";var VI="UPDATE_DOCUMENT";var vo="FINISH_ASSIGNMENT",BI="SAVE_AND_CLOSE",wi="CANCEL_ASSIGNMENT";var $i="OPEN_ASSIGNMENT",Tk="GET_DESCENDANTS",Ky="NAVIGATE_TO_STEP";var Mi="OPEN_LOCAL_ACTION",HI="OPEN_PROCESS_ACTION",Jy="SUBMIT_BULK_ACTION",Yy="SUBMIT_BULK_ACTION_ASYNC",vk="OPEN_BULK_ACTION",Rk="DELETE_CASE_IN_CREATE_STAGE";var Er="MERGE_DATA",Wl="REMOVE_ITEM",Zy="GET_DATAOBJECT_ACTIONS",Qy="SHOW_HISTORY";var Te="ERROR",Kl="INIT_CONTAINERS",qo="RESET_CONTAINERS",St="ADD_CONTAINER_ITEM",Ze="REMOVE_CONTAINER_ITEM",Ms="ADD_TRANSIENT_ITEM",ks="UPDATE_TRANSIENT_DATA",Wo="REMOVE_TRANSIENT_ITEM",Ko="REMOVE_ALL_TRANSIENT_ITEMS",uo="CLEAR_TRANSIENT_DATA",ki="PURGE_TRANSIENT_DATA",Ls="REPLACE_TRANSIENT_DATA",nr="ACTIVATE_CONTAINER_ITEM",kt="UPDATE_CONTAINER_ITEM",Us="UPMERGE_AND_REMOVE_CONTAINER_ITEM",et="REPLACE_CONTAINER_ITEM",Xy="ACTIVATE_MODAL_CONTAINER_ITEM",eS="REMOVE_CONTAINER",Jl="ADD_SUGGESTION_CONTEXT",vn="showView",Ro="showData",sc="showInsight",lm="showDashboard",Kt="openWorkByHandle",Pk="getDescendants",Nk="getCaseStages",Ok="getActions",qn="openAssignment",GI="openStage";var tS="createNewWork";var qI="finishAssignment";var xk="cancelAssignment",Yl="SHOW_CANCEL_ALERT";var Dk="save",wk="releaseAssignmentLock",rS="deleteCaseInCreateStage",$k="navigateToStep",nS="openLocalAction",Zl="openProcessAction",js="caseWideActions",WI="executeCaseWideActions",ac="openBulkAction",Mk="getBulkActions",kk="getAssignmentBulkActions",Lk="getCaseBulkActions",oS="performBulkAction",Uk="performAssignmentBulkAction",jk="createDataObject",zk="getDataObjectActions",Fk="deleteDataObject",Vk="readDataObject",Bk="updateDataObject",zs="launchAssignment",KI="getNextWork";var Fs="ADD_MESSAGES",Wn="CLEAR_MESSAGES",Vs="RESET_STORE",iS="FETCH_DATAPAGE",Jo="ADD_SHARED_DATA",Ql="REMOVE_SHARED_DATA",po="LIST_ACTION",Hk="SHOW_CASE_PREVIEW",pn="DELETE_CASE_SUMMARY",cc="ALTER_BLOCKING_ACTION_COUNT",Xl="SET_APP_LOCALE",eu="CREATE_DATA_OBJECT",sS="DELETE_DATA_OBJECT",aS="VIEW_DATA_OBJECT",tu="UPDATE_DATA_OBJECT",cS="OPEN_DATA_OBJECT_ACTION",Li="SUBMIT_DATA_OBJECT_ACTION",Ui="OPEN_EMBEDDED_DATA_MODAL",lS="GET_EMBEDDED_DATA_VIEW",uS="SUBMIT_EMBEDDED_DATA_MODAL",dS="SUBMIT_SUBSCRIPT",lc="FILL_FORM_WITH_AI",uc="createWork",pS="openAssignment",mS="openCase",Gk="CREATE_OBJECT",qk="GET_OBJECT",Wk="OPEN_OBJECT_ACTION",ru="EXECUTE_OBJECT_WIDE_ACTION",Kk="CREATE_EXTERNAL_OBJECT",JI="CREATE_EXTERNAL_CASE",YI="DELETE_WORK",Yo="createObject",Jr="getObject",fS="getObjectWideAction",Jk="executeObjectWideAction",Bs="createExternalObject",Yk="retrieveActionViewForNewObject",ZI="retrieveActionViewForNewCase",Zk="deleteWork";var E={ACTION_TYPES:{FINISH_ASSIGNMENT:vo,EXECUTE_OBJECT_WIDE_ACTION:ru,SUBMIT_BULK_ACTION:Jy,SUBMIT_BULK_ACTION_ASYNC:Yy,CREATE_DATA_OBJECT:eu,UPDATE_DATA_OBJECT:tu,SUBMIT_DATA_OBJECT_ACTION:Li},APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",SDK_RUNTIME:"SDK",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:P.getDefaultQualifiedName("pyCaseTab"),DATA_OBJECT_CREATE_VIEW:P.getDefaultQualifiedName("Create"),DATA_OBJECT_EDIT_VIEW:P.getDefaultQualifiedName("pyEdit"),PY_DATA_PREVIEW:P.getDefaultQualifiedName("pyDataPreview"),PY_DETAILS:P.getDefaultQualifiedName("pyDetails"),OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:P.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:P.getDefaultQualifiedName("D_pyGetUserWorkListByUserId"),D__WORK_BASKET:P.getDefaultQualifiedName("D_WorkBasket"),D__PY_MY_WORK_LIST:P.getDefaultQualifiedName("D_pyMyWorkList"),get D__PY_ASSIGNMENTS_DATA(){return P.getDefaultQualifiedName("D_pyAssignmentsData")}}},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:P.getDefaultQualifiedName("pzCreateDetails"),PREVIEW_VIEW_NAME:P.getDefaultQualifiedName("pyCasePreview"),CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",APPSHELL_DOCUMENT_TAB_ORDER:"appshell-document-tab-order",APPSHELL_OPEN_PAGES:"appshell-open-pages",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",LAUNCHPAD_APP_OVERVIEW:"PegaPlatform__ApplicationOverview",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:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pzInsKey"),CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:P.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:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyApprovalResult"),DUPLICATECASEFLAG:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseActions"),DUPLICATECASEID:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateID"),DUPLICATECASEINSKEY:P.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseReference.pzInsKey"),HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",PARENTCASES:"caseInfo.parentCases",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:P.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:P.getDefaultQualifiedName("pyTransferAssignment")},CONTENT:"content",MODAL:"modal",ACTIONAREA:"actionarea",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:P.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime"),SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:P.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_CLOSE_REAUTH_MODAL:"closeReAuthModal",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_FINISH_ASSIGNMENT_DONE:"finishAssignmentDone",EVENT_REQUEST_CONTEXT_CHANGED:"requestContextChanged",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_POST_ACTION:"postAction",EVENT_PREVIEW_DISMISS:"previewDismiss",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",NAV_ALIGNMENT_CHANGE:"navAlignmentChange",NAV_POSITION_CHANGE:"navPositionChange",CASE_VIEW_TEMPLATE_CHANGE:"caseViewTemplateChange",MULTI_STEP_NAV_DISPLAY_CHANGE:"multiStepNavDisplayChange",CASE_STAGE_DISPLAY_CHANGE:"caseStageDisplayChange"},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",CREATE_CASE_MODAL_OPEN:"createCaseModalOpen",CREATE_CASE_MODAL_CLOSE:"createCaseModalClose",CASE_FIELD_UPDATE_NOTIFICATION:"caseFieldUpdateNotification"},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",ON_REFRESH_ERROR:"onRefreshError",ON_FILL_FORM_WITH_AI_COMPLETE:"onFillFormWithAIComplete",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",PORTAL_AGENT_MODE_PATH:"presentation.templates.GenAICoach.agentMode"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:P.getDefaultQualifiedName("pyEmbedAssignment"),PY_DETAILS:P.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:P.getDefaultQualifiedName("messageViewReference"),PARENT_MESSAGE_ID:P.getDefaultQualifiedName("parentMessageID"),PX_RESULTS:P.getDefaultQualifiedName("pxResults"),NAME:P.getDefaultQualifiedName("name"),POSTED_BY_USER:P.getDefaultQualifiedName("postedByUser"),UPDATED_TIME:P.getDefaultQualifiedName("updatedTime"),POST_MESSAGE:P.getDefaultQualifiedName("PostMessage"),PZ_INS_KEY:P.getDefaultQualifiedName("pzInsKey"),PZ_PRIVATE_POST_DETAILS:P.getDefaultQualifiedName("pzPrivatePostDetails"),PY_SELECTED:P.getDefaultQualifiedName("pySelected"),PY_LABEL:P.getDefaultQualifiedName("pyLabel"),PY_RECIPIENTS:P.getDefaultQualifiedName("pyRecipients"),MENTIONS:P.getDefaultQualifiedName("mentions"),PY_IS_DELETE_ENABLED:P.getDefaultQualifiedName("pyIsDeleteEnabled"),TAGS:P.getDefaultQualifiedName("tags"),PZ_POST_DETAILS:P.getDefaultQualifiedName("pzPostDetails"),PY_FEED_SOURCE_REFERENCE:P.getDefaultQualifiedName("pyFeedSourceReference"),IS_EDITED:P.getDefaultQualifiedName("isEdited"),PY_LIKES:P.getDefaultQualifiedName("pyLikes"),PY_POST_TYPE:P.getDefaultQualifiedName("pyPostType"),POSTED_TIME:P.getDefaultQualifiedName("postedTime"),PY_MESSAGE_VIEW_REFERENCE:P.getDefaultQualifiedName("pyMessageViewReference"),ID:P.getDefaultQualifiedName("ID"),PY_COMMENT_CONTEXT:P.getDefaultQualifiedName("pyCommentContext"),PX_LIKE_COUNT:P.getDefaultQualifiedName("pxLikeCount"),MESSAGE:P.getDefaultQualifiedName("message")},CASE_VIEW_MODE:{PERFORM:"perform",REVIEW:"review",CONFIRM:"confirm"}},d={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:t=>`Table[${t}]`,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",X_ORIGIN_CHANNEL_BROWSER:"browser",X_ORIGIN_CHANNEL_EMBEDDED_BROWSER:"embedded browser",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:P.getDefaultQualifiedName("pyDetails"),PY_CONFIRM:P.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},...E,getProperty:t=>Ve.map(t),getDefaultQualifiedName:t=>P.getDefaultQualifiedName(t)};var Zn={};qt(Zn,{beginDesignerRefresh:()=>mD,endDesignerRefresh:()=>fD,getAIAgent:()=>iw,getAdditionalInfo:()=>ED,getCascadingFieldsUtil:()=>zae,getDataPageKeys:()=>jx,getDataPageMetadata:()=>Ur,getDesignerViewStoreVersion:()=>$ae,getEditableFieldConfigUtil:()=>jae,getEmbeddedPropertyMetadata:()=>b_,getFieldParameters:()=>Lae,getFieldsByClassName:()=>Aw,getFormat:()=>nw,getGenAICoach:()=>ow,getInsight:()=>Ew,getLocaleUtilsForLanguage:()=>Ci,getLocalizationServiceFromStore:()=>wae,getLookUpDataPage:()=>zx,getLookUpDataPageInfo:()=>Fx,getParagraph:()=>Rc,getPersonalizationMetadata:()=>T_,getPropertyMetadata:()=>lt,getResolvedFieldMetadata:()=>Uae,getSavableDataPage:()=>Ux,isViewExists:()=>oT,mergeStore:()=>Fn,resolveNavigation:()=>Sw,resolveView:()=>Na,updateNavigationStore:()=>yw,updateStores:()=>bm,updateViewStore:()=>hw});var qJ=".RemoteSystemID",WJ="Traditional",gS=P.getDefaultQualifiedName("pyRemoteCaseDetails"),QI=class t{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=>J.getProperty(qJ,d.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,r,n)=>{if(e&&e.RemoteSystemID)return;let o=this.getRemoteHeaderByContext(n);o?e.RemoteSystemID=o:r&&this.isRemoteCase(r.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(r.caseTypeID))};static isTraditionalRemoteCase=(e="")=>t.getRemoteCase(e)?.RemoteApplicationType===WJ;static setAdditionalParameters=()=>{v.environmentInfoObject?.pyRemoteCaseTypeList?.forEach(r=>{let n=this.getRemoteCase(r.pyWorkTypeImplementationClassName);n&&(n.name=r.pyWorkTypeName)})};static getRemoteAppPlatformVersion=e=>{if(!e)return;let r=v.environmentInfoObject?.pyRemoteAppPlatformVersion;if(r)return JSON.parse(r)[e]};static isRemoteCaseVersionDifferent=e=>{if(!this.isRemoteCase(e))return!1;let r=this.getRemoteHeader(e);return r?!!this.getRemoteAppPlatformVersion(r):!1};static getRemoteHeaderFromSourceClass=e=>Object.values(this.remoteCaseMapping).find(n=>n.RemoteClassName===e)?.RemoteSystemID;static getRemoteCaseClassBySourceClass=e=>{if(e){for(let[r,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return r}}},ae=QI;var na={};qt(na,{CONTAINER_NAMES:()=>ge,CONTAINER_TYPES:()=>FD,addRootContainerItem:()=>BD,areContainerItemsPresent:()=>rae,cleanupTransientContainer:()=>pae,clearContainerItems:()=>mae,clearTransientData:()=>dae,closeContainerItem:()=>ta,getActiveContainerItemContext:()=>Ar,getActiveContainerItemIDFromRoutingInfo:()=>gae,getActiveContainerItemName:()=>se,getActiveContext:()=>fae,getChildContainerItemId:()=>jd,getChildContainerItems:()=>Au,getChildContainers:()=>Ke,getChildContainersContexts:()=>wo,getContainerAPI:()=>h_,getContainerAccessOrder:()=>Hd,getContainerData:()=>ut,getContainerItemByKey:()=>oae,getContainerItemData:()=>We,getContainerItemName:()=>wt,getContainerItems:()=>LT,getContainerLimit:()=>E6,getContainerParentContext:()=>uE,getContainerType:()=>iae,getContextByTargetAndKey:()=>JD,getDataContextName:()=>pe,getFlowContainer:()=>hae,getLeastRecentlyUsedNonDirtyContainerItemID:()=>jT,getParentContainerItem:()=>Oa,getRootContainerName:()=>zo,getSuggestionContexts:()=>Dh,getTargetFromContainerItemID:()=>te,getTransientItems:()=>Ei,hasContainerItems:()=>jr,isContainerDirty:()=>wh,isContainerInitialized:()=>Ch,isContainerItemActive:()=>sae,isContainerItemContextBeingUsedInOtherContainers:()=>HD,isContainerItemExists:()=>ll,isContainerItemExistsWithoutKey:()=>VD,isContainerLimitReached:()=>UT,isContainerMultipleMode:()=>mr,isContainerSingleMode:()=>It,purgeTransientData:()=>A6,removeContainer:()=>GD,replaceTransientData:()=>uae,resetContainersPayload:()=>Dc,setContainerLimit:()=>aae,updateCaseContextEtag:()=>WD,updateParentLastUpdateTime:()=>KD,updateRelatedContextEtag:()=>qD,updateTransientData:()=>lae});var nu={};qt(nu,{buildContextName:()=>lr,buildModalContext:()=>Yr,buildTransientContextName:()=>Qk,getContainerIdFromContext:()=>KJ,getParentContext:()=>Po,getParentContextName:()=>qe,getTargetFromContext:()=>tb,getTransientContext:()=>eb});var Zo={},XI=new Map,qe=t=>{let e=d.EMPTY_STRING;return t&&t.includes(d.FORWARD_SLASH_STRING)?e=t.substring(0,t.lastIndexOf("/")):e=t,e},lr=(t,e,r=!1)=>{let n=d.EMPTY_STRING;if(e&&t){let o=`${e}${d.FORWARD_SLASH_STRING}${t}`,i=ut(o);if(!i&&(e===d.APP.APP||e===d.APP.ROOT))o=`${e}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,Zo[o]?Zo[o]+=1:Zo[o]=1,n=`${o}${d.UNDERSCORE_STRING}${Zo[o]}`;else if(!i)n=lr(t,qe(e));else{if(r&&Zo[o])return n=`${o}${d.UNDERSCORE_STRING}${Zo[o]}`,n;Zo[o]?Zo[o]+=1:Zo[o]=1,n=`${o}${d.UNDERSCORE_STRING}${Zo[o]}`}}return n},Qk=(t,e)=>{if(t&&e){let r=XI.get(e)??{},n=(r[t]??0)+1;return r[t]=n,XI.set(e,r),`${e}${d.FORWARD_SLASH_STRING}${t}_${n}`}return""},eb=(t,e)=>{if(t&&e){let r=XI.get(e)?.[t];return r?`${e}${d.FORWARD_SLASH_STRING}${t}_${r}`:Qk(t,e)}return""},tb=t=>{let e=d.EMPTY_STRING;return t&&(e=t.substring(t.lastIndexOf("/")+1,t.lastIndexOf("_")).toLowerCase()),e},Yr=(t,e)=>{if(t===null)return e;let[,r]=e.split(d.FORWARD_SLASH_STRING);return t+d.FORWARD_SLASH_STRING+r},Po=t=>{let e=t.indexOf(d.FORWARD_SLASH_STRING),r=t.lastIndexOf(d.FORWARD_SLASH_STRING);return e===r?t:t.substring(0,r)},KJ=t=>{let e=t.split(d.FORWARD_SLASH_STRING);return e.length===2?t:e[0]+d.FORWARD_SLASH_STRING+e[2]};var Hs={};qt(Hs,{getResolvedTargetName:()=>Z,getRoutingInfo:()=>um,getSemanticURLFromRoutingInfo:()=>JJ});var Z=(t,e)=>{if(!t||!e)return null;let r=d.EMPTY_STRING,n;return e&&(r=`${e}${d.FORWARD_SLASH_STRING}${t}`,n=ut(r),!n&&!e.includes("/")?r=`${e}${d.FORWARD_SLASH_STRING}${t}`:n||(r=Z(t,qe(e)))),r},um=(t,e)=>{let r=Z(t,e);return r&&ut(r)?ut(r):{}},JJ=(t,e)=>_e.getSemanticURL(vn,{page:t},e);var wD={};qt(wD,{evaluate:()=>Hse,handleChange:()=>DD,hasDeclareExpression:()=>QV,updateDeclareExpressions:()=>Jb});var rb=class{customComponentLazyMap;componentMap;overrideMap;lazyMap;constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,r){this.componentMap[e]=r}registerLazyMap(e,r){this.lazyMap[e]=r}registerCustomComponentLazyMap(e,r){this.customComponentLazyMap[e]=r}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}},Gs=new rb;var nb=class{handlers;constructor(){this.handlers={}}registerHandler(e,r){this.handlers[e]=r}getHandler(e){return this.handlers[e]}},xe=new nb;var YJ=/^@\w+\s+(.+)$/s,ob=class{static handleAnnotation(e,r,n){let o=e.indexOf(" "),i=o===-1?e:e.substring(0,o),s=xe.getHandler(i);if(!s)return e;let a=e.match(YJ),c=a?a[1]:"";return s(c.trim(),r,n)}static trimAnnotation(e){if(typeof e!="string")return e;let r=e.indexOf(" "),n=e.substring(0,r),o=e.substring(r+1);return xe.getHandler(n)?o:e}static handleComponentMapping(e,r,n){let o=Gs.getComponent(r.type);if(!o?.mapping)return;let i=o.mapping(r.config);if(i&&i["@map"]){let s=i["@map"],{source:a}=s;if(!a)return;let c=n.getValue(a);if(typeof s.advanced=="function")s.advanced(e,c);else{let l=s.inputs_map;e[s.output_property]=[];let u=e[s.output_property];c.forEach(p=>{let m={};Object.keys(l).forEach(f=>{let h=l[f];h?.startsWith(".")?(h=h.substring(1),m[f]=p[h]):m[f]=h}),u.push(m)})}}}static getPropertyName(e=""){if(e&&g.isString(e)){let r=e.startsWith(d.PROPERTY_ANNOTATION)||e.startsWith(d.ATTACHMENT_ANNOTATION)||e.startsWith(d.ASSOCIATED_PROPERTY_ANNOTATION)||e.startsWith(d.CLASS_ASSOCIATION_ANNOTATION)||e.startsWith(d.FILTERED_LIST_ANNOTATION),n=e.indexOf(" ");if(!r||n===-1)return e;let o=e.substring(n+1).trim();return o.startsWith(".")?o.substring(1):o}return e}static getLeafPropertyName(e){if(g.isString(e)&&!!e?.startsWith(d.PROPERTY_ANNOTATION)){let n=this.getPropertyName(e),o=n.split(".");return o.length<2?n:o.pop()}return e}static isProperty(e){return g.isString(e)&&!!e?.startsWith(d.PROPERTY_ANNOTATION)}},fe=ob;var WC={};qt(WC,{doesRestApiExist:()=>Zs,getCancelTokenSource:()=>hi,getCaseApi:()=>kie,getHeaderProcessor:()=>$ie,invokeCustomRestApi:()=>AT,invokeRestApi:()=>ve,isRequestCanceled:()=>Sh,registerInterceptor:()=>Mie});var ib=function(t,e){return ib=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},ib(t,e)};function Zr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ib(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Xk(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function hS(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ji(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function No(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function Oo(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}function dc(t){return this instanceof dc?(this.v=t,this):new dc(t)}function eL(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(f){return function(h){return Promise.resolve(h).then(f,p)}}function a(f,h){n[f]&&(o[f]=function(S){return new Promise(function(A,C){i.push([f,S,A,C])>1||c(f,S)})},h&&(o[f]=h(o[f])))}function c(f,h){try{l(n[f](h))}catch(S){m(i[0][3],S)}}function l(f){f.value instanceof dc?Promise.resolve(f.value.v).then(u,p):m(i[0][2],f)}function u(f){c("next",f)}function p(f){c("throw",f)}function m(f,h){f(h),i.shift(),i.length&&c(i[0][0],i[0][1])}}function tL(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof ji=="function"?ji(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(s){return new Promise(function(a,c){s=t[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}function tt(t){return typeof t=="function"}function ou(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var yS=ou(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
2
2
  `+r.map(function(n,o){return o+1+") "+n.toString()}).join(`
3
3
  `):"",this.name="UnsubscriptionError",this.errors=r}});function pc(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var qs=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=ji(s),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(S){e={error:S}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}else s.remove(this);var u=this.initialTeardown;if(tt(u))try{u()}catch(S){i=S instanceof yS?S.errors:[S]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=ji(p),f=m.next();!f.done;f=m.next()){var h=f.value;try{rL(h)}catch(S){i=i??[],S instanceof yS?i=Oo(Oo([],No(i)),No(S.errors)):i.push(S)}}}catch(S){n={error:S}}finally{try{f&&!f.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}}if(i)throw new yS(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)rL(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&pc(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&pc(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})();var sb=qs.EMPTY;function SS(t){return t instanceof qs||t&&"closed"in t&&tt(t.remove)&&tt(t.add)&&tt(t.unsubscribe)}function rL(t){tt(t)?t():t.unsubscribe()}var xo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var iu={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=iu.delegate;return o?.setTimeout?o.setTimeout.apply(o,Oo([t,e],No(r))):setTimeout.apply(void 0,Oo([t,e],No(r)))},clearTimeout:function(t){var e=iu.delegate;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function ES(t){iu.setTimeout(function(){var e=xo.onUnhandledError;if(e)e(t);else throw t})}function mc(){}var nL=(function(){return ab("C",void 0,void 0)})();function oL(t){return ab("E",void 0,t)}function iL(t){return ab("N",t,void 0)}function ab(t,e,r){return{kind:t,value:e,error:r}}var fc=null;function su(t){if(xo.useDeprecatedSynchronousErrorHandling){var e=!fc;if(e&&(fc={errorThrown:!1,error:null}),t(),e){var r=fc,n=r.errorThrown,o=r.error;if(fc=null,n)throw o}}else t()}function sL(t){xo.useDeprecatedSynchronousErrorHandling&&fc&&(fc.errorThrown=!0,fc.error=t)}var dm=(function(t){Zr(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,SS(r)&&r.add(n)):n.destination=eY,n}return e.create=function(r,n,o){return new au(r,n,o)},e.prototype.next=function(r){this.isStopped?lb(iL(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?lb(oL(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?lb(nL,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(qs);var ZJ=Function.prototype.bind;function cb(t,e){return ZJ.call(t,e)}var QJ=(function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){AS(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){AS(n)}else AS(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){AS(r)}},t})(),au=(function(t){Zr(e,t);function e(r,n,o){var i=t.call(this)||this,s;if(tt(r)||!r)s={next:r??void 0,error:n??void 0,complete:o??void 0};else{var a;i&&xo.useDeprecatedNextContext?(a=Object.create(r),a.unsubscribe=function(){return i.unsubscribe()},s={next:r.next&&cb(r.next,a),error:r.error&&cb(r.error,a),complete:r.complete&&cb(r.complete,a)}):s=r}return i.destination=new QJ(s),i}return e})(dm);function AS(t){xo.useDeprecatedSynchronousErrorHandling?sL(t):ES(t)}function XJ(t){throw t}function lb(t,e){var r=xo.onStoppedNotification;r&&iu.setTimeout(function(){return r(t,e)})}var eY={closed:!0,next:mc,error:XJ,complete:mc};var cu=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function CS(t){return t}function aL(t){return t.length===0?CS:t.length===1?t[0]:function(r){return t.reduce(function(n,o){return o(n)},r)}}var Ot=(function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var o=this,i=rY(e)?e:new au(e,r,n);return su(function(){var s=o,a=s.operator,c=s.source;i.add(a?a.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=cL(r),new r(function(o,i){var s=new au({next:function(a){try{e(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});n.subscribe(s)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[cu]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return aL(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=cL(e),new e(function(n,o){var i;r.subscribe(function(s){return i=s},function(s){return o(s)},function(){return n(i)})})},t.create=function(e){return new t(e)},t})();function cL(t){var e;return(e=t??xo.Promise)!==null&&e!==void 0?e:Promise}function tY(t){return t&&tt(t.next)&&tt(t.error)&&tt(t.complete)}function rY(t){return t&&t instanceof dm||tY(t)&&SS(t)}function nY(t){return tt(t?.lift)}function ur(t){return function(e){if(nY(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Jt(t,e,r,n,o){return new oY(t,e,r,n,o)}var oY=(function(t){Zr(e,t);function e(r,n,o,i,s,a){var c=t.call(this,r)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=n?function(l){try{n(l)}catch(u){r.error(u)}}:t.prototype._next,c._error=i?function(l){try{i(l)}catch(u){r.error(u)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=o?function(){try{o()}catch(l){r.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e})(dm);var lL=ou(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}});var Ws=(function(t){Zr(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new uL(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new lL},e.prototype.next=function(r){var n=this;su(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=ji(n.currentObservers),a=s.next();!a.done;a=s.next()){var c=a.value;c.next(r)}}catch(l){o={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}}})},e.prototype.error=function(r){var n=this;su(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},e.prototype.complete=function(){var r=this;su(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,s=o.isStopped,a=o.observers;return i||s?sb:(this.currentObservers=null,a.push(r),new qs(function(){n.currentObservers=null,pc(a,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?r.error(i):s&&r.complete()},e.prototype.asObservable=function(){var r=new Ot;return r.source=this,r},e.create=function(r,n){return new uL(r,n)},e})(Ot);var uL=(function(t){Zr(e,t);function e(r,n){var o=t.call(this)||this;return o.destination=r,o.source=n,o}return e.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},e.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:sb},e})(Ws);var ub=(function(t){Zr(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,o=r.thrownError,i=r._value;if(n)throw o;return this._throwIfClosed(),i},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e})(Ws);var db={now:function(){return(db.delegate||Date).now()},delegate:void 0};var dL=(function(t){Zr(e,t);function e(r,n){return t.call(this)||this}return e.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},e})(qs);var pm={setInterval:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=pm.delegate;return o?.setInterval?o.setInterval.apply(o,Oo([t,e],No(r))):setInterval.apply(void 0,Oo([t,e],No(r)))},clearInterval:function(t){var e=pm.delegate;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};var pL=(function(t){Zr(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.pending=!1,o}return e.prototype.schedule=function(r,n){var o;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,n)),this.pending=!0,this.delay=n,this.id=(o=this.id)!==null&&o!==void 0?o:this.requestAsyncId(s,this.id,n),this},e.prototype.requestAsyncId=function(r,n,o){return o===void 0&&(o=0),pm.setInterval(r.flush.bind(r,this),o)},e.prototype.recycleAsyncId=function(r,n,o){if(o===void 0&&(o=0),o!=null&&this.delay===o&&this.pending===!1)return n;n!=null&&pm.clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var o=this._execute(r,n);if(o)return o;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var o=!1,i;try{this.work(r)}catch(s){o=!0,i=s||new Error("Scheduled action threw falsy error")}if(o)return this.unsubscribe(),i},e.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,o=r.scheduler,i=o.actions;this.work=this.state=this.scheduler=null,this.pending=!1,pc(i,this),n!=null&&(this.id=this.recycleAsyncId(o,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e})(dL);var pb=(function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=db.now,t})();var mL=(function(t){Zr(e,t);function e(r,n){n===void 0&&(n=pb.now);var o=t.call(this,r,n)||this;return o.actions=[],o._active=!1,o}return e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var o;this._active=!0;do if(o=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,o){for(;r=n.shift();)r.unsubscribe();throw o}},e})(pb);var mm=new mL(pL),fL=mm;var Et=new Ot(function(t){return t.complete()});function gc(t){return t?iY(t):Et}function iY(t){return new Ot(function(e){return t.schedule(function(){return e.complete()})})}function _S(t){return t&&tt(t.schedule)}function gL(t){return t[t.length-1]}function hL(t){return tt(gL(t))?t.pop():void 0}function yL(t){return _S(gL(t))?t.pop():void 0}var IS=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"});function bS(t){return tt(t?.then)}function TS(t){return tt(t[cu])}function vS(t){return Symbol.asyncIterator&&tt(t?.[Symbol.asyncIterator])}function RS(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function sY(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var PS=sY();function NS(t){return tt(t?.[PS])}function OS(t){return eL(this,arguments,function(){var r,n,o,i;return hS(this,function(s){switch(s.label){case 0:r=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,dc(r.read())];case 3:return n=s.sent(),o=n.value,i=n.done,i?[4,dc(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,dc(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function xS(t){return tt(t?.getReader)}function wr(t){if(t instanceof Ot)return t;if(t!=null){if(TS(t))return aY(t);if(IS(t))return cY(t);if(bS(t))return lY(t);if(vS(t))return SL(t);if(NS(t))return uY(t);if(xS(t))return dY(t)}throw RS(t)}function aY(t){return new Ot(function(e){var r=t[cu]();if(tt(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function cY(t){return new Ot(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function lY(t){return new Ot(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,ES)})}function uY(t){return new Ot(function(e){var r,n;try{for(var o=ji(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(e.next(s),e.closed)return}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}e.complete()})}function SL(t){return new Ot(function(e){pY(t,e).catch(function(r){return e.error(r)})})}function dY(t){return SL(OS(t))}function pY(t,e){var r,n,o,i;return Xk(this,void 0,void 0,function(){var s,a;return hS(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=tL(t),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(s=n.value,e.next(s),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function mo(t,e,r,n,o){n===void 0&&(n=0),o===void 0&&(o=!1);var i=e.schedule(function(){r(),o?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(i),!o)return i}function DS(t,e){return e===void 0&&(e=0),ur(function(r,n){r.subscribe(Jt(n,function(o){return mo(n,t,function(){return n.next(o)},e)},function(){return mo(n,t,function(){return n.complete()},e)},function(o){return mo(n,t,function(){return n.error(o)},e)}))})}function wS(t,e){return e===void 0&&(e=0),ur(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}function EL(t,e){return wr(t).pipe(wS(e),DS(e))}function AL(t,e){return wr(t).pipe(wS(e),DS(e))}function CL(t,e){return new Ot(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function _L(t,e){return new Ot(function(r){var n;return mo(r,e,function(){n=t[PS](),mo(r,e,function(){var o,i,s;try{o=n.next(),i=o.value,s=o.done}catch(a){r.error(a);return}s?r.complete():r.next(i)},0,!0)}),function(){return tt(n?.return)&&n.return()}})}function $S(t,e){if(!t)throw new Error("Iterable cannot be null");return new Ot(function(r){mo(r,e,function(){var n=t[Symbol.asyncIterator]();mo(r,e,function(){n.next().then(function(o){o.done?r.complete():r.next(o.value)})},0,!0)})})}function IL(t,e){return $S(OS(t),e)}function bL(t,e){if(t!=null){if(TS(t))return EL(t,e);if(IS(t))return CL(t,e);if(bS(t))return AL(t,e);if(vS(t))return $S(t,e);if(NS(t))return _L(t,e);if(xS(t))return IL(t,e)}throw RS(t)}function q(t,e){return e?bL(t,e):wr(t)}function ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=yL(t);return q(t,r)}var MS=ou(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function mb(t,e){var r=typeof e=="object";return new Promise(function(n,o){var i=!1,s;t.subscribe({next:function(a){s=a,i=!0},error:o,complete:function(){i?n(s):r?n(e.defaultValue):o(new MS)}})})}function fb(t,e){var r=typeof e=="object";return new Promise(function(n,o){var i=new au({next:function(s){n(s),i.unsubscribe()},error:o,complete:function(){r?n(e.defaultValue):o(new MS)}});t.subscribe(i)})}function TL(t){return t instanceof Date&&!isNaN(t)}function O(t,e){return ur(function(r,n){var o=0;r.subscribe(Jt(n,function(i){n.next(t.call(e,i,o++))}))})}var mY=Array.isArray;function fY(t,e){return mY(e)?t.apply(void 0,Oo([],No(e))):t(e)}function vL(t){return O(function(e){return fY(t,e)})}var gY=Array.isArray,hY=Object.getPrototypeOf,yY=Object.prototype,SY=Object.keys;function RL(t){if(t.length===1){var e=t[0];if(gY(e))return{args:e,keys:null};if(EY(e)){var r=SY(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}function EY(t){return t&&typeof t=="object"&&hY(t)===yY}function PL(t,e){return t.reduce(function(r,n,o){return r[n]=e[o],r},{})}function NL(t,e,r,n,o,i,s,a){var c=[],l=0,u=0,p=!1,m=function(){p&&!c.length&&!l&&e.complete()},f=function(S){return l<n?h(S):c.push(S)},h=function(S){i&&e.next(S),l++;var A=!1;wr(r(S,u++)).subscribe(Jt(e,function(C){o?.(C),i?f(C):e.next(C)},function(){A=!0},void 0,function(){if(A)try{l--;for(var C=function(){var I=c.shift();s?mo(e,s,function(){return h(I)}):h(I)};c.length&&l<n;)C();m()}catch(I){e.error(I)}}))};return t.subscribe(Jt(e,f,function(){p=!0,m()})),function(){a?.()}}function z(t,e,r){return r===void 0&&(r=1/0),tt(e)?z(function(n,o){return O(function(i,s){return e(n,i,o,s)})(wr(t(n,o)))},r):(typeof e=="number"&&(r=e),ur(function(n,o){return NL(n,o,t,r)}))}function gb(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=hL(t),n=RL(t),o=n.args,i=n.keys,s=new Ot(function(a){var c=o.length;if(!c){a.complete();return}for(var l=new Array(c),u=c,p=c,m=function(h){var S=!1;wr(o[h]).subscribe(Jt(a,function(A){S||(S=!0,p--),l[h]=A},function(){return u--},void 0,function(){(!u||!S)&&(p||a.next(i?PL(i,l):l),a.complete())}))},f=0;f<c;f++)m(f)});return r?s.pipe(vL(r)):s}function OL(t,e,r){t===void 0&&(t=0),r===void 0&&(r=fL);var n=-1;return e!=null&&(_S(e)?r=e:n=e),new Ot(function(o){var i=TL(t)?+t-r.now():t;i<0&&(i=0);var s=0;return r.schedule(function(){o.closed||(o.next(s++),0<=n?this.schedule(void 0,n):o.complete())},i)})}function kS(t,e){return t===void 0&&(t=0),e===void 0&&(e=mm),t<0&&(t=0),OL(t,t,e)}function Qo(t,e){return ur(function(r,n){var o=0;r.subscribe(Jt(n,function(i){return t.call(e,i,o++)&&n.next(i)}))})}function zi(t){return ur(function(e,r){var n=null,o=!1,i;n=e.subscribe(Jt(r,void 0,void 0,function(s){i=wr(t(s,zi(t)(e))),n?(n.unsubscribe(),n=null,i.subscribe(r)):o=!0})),o&&(n.unsubscribe(),n=null,i.subscribe(r))})}function hc(t,e){return tt(e)?z(t,e,1):z(t,1)}function LS(t){return ur(function(e,r){var n=!1,o=null,i=null,s=function(){if(i?.unsubscribe(),i=null,n){n=!1;var a=o;o=null,r.next(a)}};e.subscribe(Jt(r,function(a){i?.unsubscribe(),n=!0,o=a,i=Jt(r,s,mc),wr(t(a)).subscribe(i)},function(){s(),r.complete()},void 0,function(){o=i=null}))})}function fm(t,e){return e===void 0&&(e=mm),ur(function(r,n){var o=null,i=null,s=null,a=function(){if(o){o.unsubscribe(),o=null;var l=i;i=null,n.next(l)}};function c(){var l=s+t,u=e.now();if(u<l){o=this.schedule(void 0,l-u),n.add(o);return}a()}r.subscribe(Jt(n,function(l){i=l,s=e.now(),o||(o=e.schedule(c,t),n.add(o))},function(){a(),n.complete()},void 0,function(){i=o=null}))})}function Fi(){return ur(function(t,e){t.subscribe(Jt(e,mc))})}function Ft(t,e){return ur(function(r,n){var o=null,i=0,s=!1,a=function(){return s&&!o&&n.complete()};r.subscribe(Jt(n,function(c){o?.unsubscribe();var l=0,u=i++;wr(t(c,u)).subscribe(o=Jt(n,function(p){return n.next(e?e(c,p,u,l++):p)},function(){o=null,a()}))},function(){s=!0,a()}))})}function hb(t,e,r){var n=tt(t)||e||r?{next:t,error:e,complete:r}:t;return n?ur(function(o,i){var s;(s=n.subscribe)===null||s===void 0||s.call(n);var a=!0;o.subscribe(Jt(i,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),i.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),i.complete()},function(c){var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),i.error(c)},function(){var c,l;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):CS}var yb=class{type;subType;name;referenceName;props;constructor(e,r,n,o={}){this.type=E.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=r,this.name=n,this.props=o}},xL=yb;var AY=/(([^.]+)\[\d+\])/g,CY=t=>{if((t?.split(".")??[]).length<3)return[t];let n=t?.match(AY);if(!n)return[t];let o=n[n.length-1];t=t?.split(o)[0],t=t?.substring(0,t.length-1);let i;return[o,i]=o.split("["),i=i?.split("]")[0],[t,o,i]},_Y=(t,e)=>{if(!t.startsWith(e))return-1;let r=t.slice(e.length),n=/\[([0-9]+)\]/,o=r.match(n);return o?parseInt(o[1],10):-1},Vi={getPageListNameAndIndexFromPageName:CY,getPageListIndex:_Y};var{FIELD:gm,WHEN:IY,DECLARATIVE_TARGET:DL,PAGELIST:bY}=d.CONTEXT_TREE_NODE_TYPES,wL,$L=t=>{wL=t},Sb=class{type;name;children;eventSubscribers;references;props;constructor(e,r,n={}){this.type=e,this.name=r,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[gm,new Map],[IY,new Map],[DL,new Map]])}addReference(e,r){if(this.references.has(r.type)){let n=this.references.get(r.type);n.set(e,r),this.references.set(r.type,n)}else if(r.type===bY){let o=this.references.get(gm);o.set(e,r),this.references.set(gm,o)}}removePageListNodes(e,r){let n=this.children.filter(o=>o.name.startsWith(e)).filter(o=>{let i=Vi.getPageListIndex(o.name,e);return i!==-1?+i>=r:!1});n.length>0&&n.forEach(o=>{this.removeChildNode(o.name,r)})}removeChildNode(e,r){let n=this.children.findIndex(s=>s.name.startsWith(e));if(n!==-1){let[s]=this.children.splice(n,1);s?.parent?.removeChildNode(e)}let o=this.references.get(gm),i=this.references.get(DL);[...o.keys(),...i.keys()].filter(s=>s.startsWith(e)).filter(s=>{let[,,a]=Vi.getPageListNameAndIndexFromPageName(s);return+a>=r}).forEach(s=>{o.get(s)?.parent?.removeChildren(),o.delete(s)})}getReference(e,r){if(this.references.has(r))return this.references.get(r)?.get(e)}getNode(e,r,n){return this.children.find(o=>o.type===e&&o.name===r&&o.props.index===n)}addNode(e,r,n={}){let o=this.getNode(e,r,n.index);return o?o.props=n:(o=new Ks(e,r,n),o.parent=this,this.children.push(o)),o}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach(r=>{r(e)})}removeReference(e,r,n){let o=this.references.get(r),i=o?.get(e);if(i?.props?.index===n){let s=i?.props?.context;r===gm&&s&&wL?.(s,e),o.delete(e)}}removeNode(e,r){for(let n=this.children.length-1;n>=0;n-=1){let o=this.children[n];if(o.props.index===r&&o.name===e){this.children.splice(n,1);break}}}addWhen(e,r,n,o,i){if(!n||!o||!e||!r)return;n.startsWith(".")&&(n=n.substring(1));let s=`${e}.${n}.${o}`,a=new xL(r,n,o,i);this.references.get("WHEN")?.set(s,a)}},ML=Sb;var Eb=class t{type;name;value;previousValue;parent;eventParent;children;eventSubscribers;references;props;constructor(e,r,n={}){this.type=e,this.name=r,this.parent=null,this.eventParent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,r){this.references.set(e,r)}getReference(e){return e?this.references.get(e):void 0}getNode(e,r,n){let o=arguments.length<3;return this.children.find(i=>i.type===e&&i.name===r&&(o||i.props.index===n))}addNode(e,r,n={}){let o=this.getNode(e,r,n.index);return o?o.props=n:(o=new t(e,r,n),o.parent=this,this.children.push(o)),o}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,r=!1){this.eventSubscribers.forEach(o=>{o(e)});let n=this.eventParent??this.parent;!r&&n&&n.triggerEvent(e)}setPreviousDefaultValue(){this.previousValue==="|~#-old-#~|"&&(this.previousValue=this.value)}removeReference(e,r){this.references.get(e)?.props?.index===r&&this.references.delete(e)}removeChildNode(e){let r=this.children.findIndex(n=>n.name.startsWith(e));r!==-1&&this.children.splice(r,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,r){for(let n=this.children.length-1;n>=0;n-=1){let o=this.children[n];if(o.props.index===r&&o.name===e){this.children.splice(n,1);break}}}},Ks=Eb;var{VIEW:TY,FIELD:Qr,CONTEXT:vY,DECLARATIVE_TARGET:Xo,WHEN:RY,PAGELIST:kL}=E.CONTEXT_TREE_NODE_TYPES,Ab=class{rootNodes;constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){let r=new ML(vY,e);this.rootNodes[e]=r}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,r){return this.addContextNode(e).addNode("PAGE",r)}_addParentViewNode(e,r,n){let o=this.addContextNode(e).addNode("PAGE",r),i=o.getReference(n);return i||(i=o.addNode("VIEW",n),o.addReference(n,i)),i}pushChildPageNodeToParentView(e,r,n){let o=e.children,i=!1;if(o){for(let s=0;s<o.length;s+=1)if(o[s].name===n){i=!0;break}}i||o.push(r),r.parent=e}addViewNode(e,r,n,o,i={}){let s=this.addContextNode(e).addNode("PAGE",r),a=null;o&&n!==o?a=this._addParentViewNode(e,r,o).addNode("VIEW",n,i):a=s.addNode("VIEW",n,i),s.addReference(n,a);let c=r.split(".");for(;c.length>0;){c.pop();let l=c.join("."),p=this.getContextNode(e)?.getNode("PAGE",l)?.getReference(o);if(p){this.pushChildPageNodeToParentView(p,s,r);let m=s.getReference(o);m&&(m.eventParent=p);break}}return a}getViewNode(e,r,n){return this.getContextNode(e)?.getNode("PAGE",r)?.getReference(n)}addPageListNode(e,r,n,o,i){if(!o)return;o.startsWith(".")&&(o=o.substring(1));let s=this.addContextNode(e),a=s.addNode("PAGE",r)?.getReference(n)?.addNode("PAGELIST",`${r}.${o}`,i);return a&&s.addReference(`${r}.${o}`,a),a}updatePageListNode(e,r,n,o){if(!n)return;n.startsWith(".")&&(n=n.substring(1)),this.addContextNode(e).removePageListNodes(`${r}.${n}`,o)}removeFieldNode(e,r,n,o,i){let s=this.getContextNode(e);s?.getNode("PAGE",r)?.getReference(n)?.removeNode(`${r}${o}`,i),s?.removeReference(`${r}${o}`,Qr,i),s?.removeReference(`${r}${o}`,Xo,i)}removeViewNode(e,r,n,o,i={}){let c=this.getContextNode(e)?.getNode("PAGE",r)?.getReference(n);if("visibility"in i&&c?.props&&"visibility"in c.props&&i.visibility!==c.props.visibility)return;this.removeChildViewNodes(e,r,n,o);let l=c?.parent?.children?.findIndex(u=>u.name===n)??-1;l>-1&&c?.parent?.children.splice(l,1)}removeChildViewNodes(e,r,n,o){let i=this.getContextNode(e),s=i?.getNode("PAGE",r);s?.getReference(n)?.children.forEach(c=>{c.type==="PAGE"?this.removeViewNode(e,c.name,n,o):c.type===TY?this.removeChildViewNodes(e,r,c.name,o):(i.removeReference(c.name,Qr,c.props.index),i.removeReference(c.name,Xo,c.props.index),(c.type==="PAGELIST"||c.props?.componentName==="Address")&&this.deleteAllListNodes(e,c.name))}),s?.references.delete(n)}deleteAllListNodes(e,r,n=!0){let o=i=>{let s=this.getContextNode(e),a=s?.references?.get(i);if(a)for(let[c]of a)(n&&c===r||c.startsWith(`${r}.`)||c.startsWith(`${r}[`))&&s?.references?.get(i)?.delete(c)};o(Qr),o(Xo)}deleteListNode(e,r,n){let o=i=>{let s=this.getContextNode(e),a=s?.references?.get(i);if(a)for(let[c]of a)c.includes(`${r.join(".")}[${n}]`)&&s?.references?.get(i)?.delete(c)};o(Qr),o(Xo)}getPageListNode(e,r,n,o){return this.getContextNode(e)?.getNode("PAGE",r)?.getReference(n)?.children.find(s=>s.type==="PAGELIST"&&s.name===`${r}.${o}`)}getFieldNode(e,r,n,o){return this.getViewNode(e,r,n)?.getNode(Qr,`${r}${o}`)}_findViewNode(e,r,n,o){let i=o.addNode("PAGE",r)?.getReference(n);if(i)return i;let s=r.split(".");for(;s.length>0;){s.pop();let a=s.join(".");if(i=o.addNode("PAGE",a)?.getReference(n),i)return i}return this.addViewNode(e,r,n)}addFieldNode(e,r,n,o,i,s={}){let a=this.addContextNode(e),c=this._findViewNode(e,r,n,a),l=this.createFieldNode(c,r,o,s);return l&&this.updateFieldNode(a,c,l,e,r,o,i),l}createFieldNode(e,r,n,o){let{isDeclarativeTarget:i}=o;return i?e.addNode(Xo,`${r}${n}`,o):e.addNode(Qr,`${r}${n}`,o)}updateFieldNode(e,r,n,o,i,s,a){let c=`${i}${s}`;n.props?.componentName==="Address"&&this.deleteAllListNodes(o,n.name),e.addReference(c,n),n.value=a,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,r,o,i,s)}handleFieldInsideList(e,r,n,o,i){let s=te(n),a=We(s,n)||{},c=`${o}${i}`,l=null;if(a?.subscriptFieldName||a?.isPageGroup)l=o.substring(0,o.lastIndexOf(`.${a?.index??""}`))||c.substring(0,c.lastIndexOf(`.${a?.index}`)),this.createListNodeIfNotExist(e,r,l);else{let u=o.substring(0,o.lastIndexOf("["))||c.substring(0,c.lastIndexOf("["));this.createListNodeIfNotExist(e,r,u)}}createListNodeIfNotExist(e,r,n){let o=e.getReference(n,Qr);o||(o=r.addNode(Qr,n,{}),e.addReference(n,o))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,r,n,o){this.getViewNode(e,r,n)?.addEventListener(o)}mutateField(e,r,n,o){let i=this.getContextNode(e),[s,a,c]=Vi.getPageListNameAndIndexFromPageName(r);n.startsWith(".")&&(n=n.substring(1));let l=i?.getReference(`${r}.${n}`,Qr);if(a){let u={...o,rowIndex:c},p=l instanceof Ks?this._findPageListNodeForField(l,`${s}.${a}`):void 0;p?p.triggerEvent(u):this.mutatePageList(e,s,a,u)}l&&l instanceof Ks&&l.triggerEvent(o)}_findPageListNodeForField(e,r){let n=e.eventParent??e.parent;for(;n instanceof Ks;){let o=n.children.find(i=>i.type===kL&&i.name===r);if(o)return o;n=n.eventParent??n.parent}}onPageListMutate(e,r,n,o,i){this.getPageListNode(e,r,n,o)?.addEventListener(i)}mutatePageList(e,r,n,o,i=!1){let s=this.getContextNode(e),a=`${r}.${n}`,c=new Set;if(s?.getNode("PAGE",r??"")?.references.forEach(l=>{l.children.forEach(u=>{u.type===kL&&u.name===a&&c.add(u)})}),c.size===0){let l=s?.getReference(a,Qr);l instanceof Ks&&c.add(l)}c.forEach(l=>l.triggerEvent(o,i))}getFieldsList(e){return this.getContextNode(e)?.references.get(Qr)}getFieldReferenceForProperty(e,r){let n=this.getContextNode(e)?.references?.get(Qr)?.get(r);return n||(n=this.getContextNode(e)?.references?.get(Xo)?.get(r)),n}getFieldReferencePreviousValue(e,r){let n=this.getContextNode(e)?.references?.get(Qr)?.get(r);return n||(n=this.getContextNode(e)?.references?.get(Xo)?.get(r)),n?.value}updateFieldNodeValue(e,r,n){let o=this.getContextNode(e)?.references?.get(Qr)?.get(r);o instanceof Ks&&o&&(o.previousValue=o.value,o.value===void 0&&(o.previousValue=n),o.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;let r=this.getContextReferencesByType(e,Qr),n=this.getContextReferencesByType(e,Xo);return new Map([...r.entries(),...n.entries()])}getContextReferencesByType(e,r){return this.getContextNode(e)?.references.get(r)||new Map}isFieldExists(e,r){return!!this.getContextReferencesByType(e,Qr)?.get(r)||!!this.getContextReferencesByType(e,Xo)?.get(r)}addWhenNode(e,r,n,o,i,s){this.getContextNode(e)?.addWhen(r,n,o,i,s)}getDeclarativeTargets(e){let n=this.getContextNode(e)?.references?.get(Xo)||new Map,o=[];return n.forEach(i=>{let s=i?.props||{},{propertyName:a=""}=s,c=s.pageReference??E.CASE_INFO.CASE_INFO_CONTENT;o.push({pageReference:c,name:a})}),o}getWhens(e){let n=this.getContextNode(e)?.references?.get(RY)||new Map,o=[];return n.forEach(i=>{let s=i.subType,a=i.referenceName,c=i.name,l=i?.props?.pageReference??E.CASE_INFO.CASE_INFO_CONTENT;o.push({name:c,pageReference:l,referenceName:a,type:s})}),o}},Ie=new Ab;var Cb=class{static formatPageReference(e){return(e?.split(".").map(n=>{if(n.includes("[")){let o=n.indexOf("["),i=n.indexOf("]"),s=n.substring(o+1,i),c=Number(s)+1;return`${n.substring(0,o)}(${c})${n.substring(i+1)}`}return n})).join(".")}static formatePageReferenceToArrayIndex(e){return(e?.split(".").map(n=>{if(n.includes("(")){let o=n.indexOf("("),i=n.indexOf(")"),s=n.substring(o+1,i),a=Number(s);if(!Number.isNaN(a)){let c=a-1;return`${n.substring(0,o)}[${c}]${n.substring(i+1)}`}}return n})).join(".")}static getFieldLabel(e){let r=e?.label;if(!r&&e?.inheritedProps){let n=e?.inheritedProps;(n.showLabel??!0)&&(r=n.label)}return r}static resolveBooleanPropertyLabels(e,r){let n=e;n.startsWith("@P ")&&(n=n.substring(3)),n.startsWith(".")&&(n=n.substring(1));try{let o=PCore.getMetadataUtils(),i=n.includes(".")?o.getEmbeddedPropertyMetadata(n,r):o.getPropertyMetadata(n,r);return i?.pyFormatType==="truefalse"&&i.pyTrueLabel&&i.pyFalseLabel?[i.pyTrueLabel,i.pyFalseLabel]:null}catch{return null}}},ei=Cb;var _b=class{static execute(e,r,n,o){let i=!v.isInfinityRuntime(),s={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach(p=>{s[p]=n[p],delete n[p]}),delete n.nonFormProperties);let a={instruction:typeof r=="string"?"ADD":"INSERT",content:{...g.unflatten(n)}},c=JSON.parse(JSON.stringify(a)),l=c.content.classID||c.content["@class"];return delete c.content.classID,{instruction:{target:g.buildInstructionPageReference(o,e),content:{...i&&l?{"@class":l}:{},...c.content},[typeof r=="string"?"groupIndex":"listIndex"]:r,instruction:typeof r=="string"?"ADD":"INSERT"},actionPayload:a,displayPropertPayload:s}}},LL=_b;var Ib=class{static execute(e,r,n,o,i,s,a,c){let l=!v.isInfinityRuntime(),u=typeof n=="string"?`${r}(${n})`:`${r}[${n-1}]`,p=oe(".classID",`${i}${u}`,e)||oe(".@class",`${i}${u}`,e),m={instruction:"UPDATE",content:{...g.unflatten(o)},isDefault:c},f={content:{...l&&p?{"@class":p}:{},...m.content},target:g.buildInstructionPageReference(i,r),[typeof n=="string"?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return s||T(Kn({...m,[typeof n=="string"?"groupIndex":"listIndex"]:typeof n=="string"?n:n-1,context:e,referenceList:`${i}${r}`,skipDirtyValidation:a})),f}},UL=Ib;var bb=class{static execute(e,r,n){return{target:g.buildInstructionPageReference(n,e),[typeof r=="string"?"groupIndex":"listIndex"]:r,instruction:"DELETE"}}},jL=bb;var Tb=class{static getDeleteAllInstruction(e,r){return{instruction:"DELETE ALL",target:g.buildInstructionPageReference(e,r)}}static execute(e,r,n,o){o||T(Kn({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${r}`}))}},vb=Tb;var Rb=class{static execute(e,r,n,o){return{target:g.buildInstructionPageReference(o,e),listMoveToIndex:n,listIndex:r,instruction:"MOVE"}}},zL=Rb;var Pb=class{static execute(e,r,n){let o=!v.isInfinityRuntime(),i={instruction:"REPLACE",content:{...g.unflatten(r)}},s=i.content.classID||i.content["@class"];return delete i.content.classID,{instruction:{target:g.buildInstructionPageReference(n,e),content:{...o&&s?{"@class":s}:{},...i.content},instruction:"REPLACE"},actionPayload:i}}},FL=Pb;var Nb=class{static execute(e,r){return{target:g.buildInstructionPageReference(r,e),instruction:"DELETE"}}},VL=Nb;var Ob=class{next;automatic;instruction;previous;childrenStateMachines;constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}},BL=Ob;var xb=class{contextName;target;pageReference;changeList;hasEncryptedContent;targetPageReference;current;root;visibility;children;constructor(e,r,n){this.target=e,this.pageReference=r,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.hasEncryptedContent=!1,this.targetPageReference=r+e,this.children=[],this.visibility=!0}addChild(e){this.current===null&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){let r=new BL(e);this.root===null&&(this.root=r),this.current!==null&&(r.previous=this.current,this.current.next=r),this.current=r}applyEncryptedContent(e){e!==void 0&&(this.current.instruction.encryptedContent=e)}buildChildSumbitPageInstructions(e,r){let n=[];return e.childrenStateMachines.forEach(o=>{o.visibility&&(n=n.concat(o.buildSubmitPageInstructions(r)))}),n}buildSubmitPageInstructions(e=!1){let r=this.root,n=[];for(;r;)r.instruction.instruction&&!(e&&r.automatic)&&n.push(r.instruction),n=[...n,...this.buildChildSumbitPageInstructions(r,e)],r=r.next;return n}initPageInstructions(e,r,n){let o=e.getValue(this.target)||[];if(Array.isArray(o)){if(r){this.processArrayRows(o,r,n);return}this.initializeMissingUniqueFields(o,n)}r&&o&&typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0&&this.processObjectRows(o,r,n)}processArrayRows(e,r,n){e.forEach((o,i)=>{r.forEach(s=>{let a=Rn(s),c={},l=!0;n&&(c[Rn(n)]=globalThis.crypto?.randomUUID?.()??g.generateUniqueID(),l=!1);let u={[a]:g.getIn(o,a),...c};this.update(u,i+1,l,{isDefault:!0,skipDirtyValidation:!0})})})}initializeMissingUniqueFields(e,r){e.forEach((n,o)=>{if(r&&!n[Rn(r)]){let i={};i[Rn(r)]=globalThis.crypto?.randomUUID?.()??g.generateUniqueID(),this.update(i,o+1,!1,{isDefault:!0,skipDirtyValidation:!0})}})}processObjectRows(e,r,n){Object.keys(e).forEach(o=>{let i=e[o];r.forEach(s=>{let a=Rn(s),c={},l=!0;n&&(c[Rn(n)]=globalThis.crypto?.randomUUID?.()??g.generateUniqueID(),l=!1);let u={[`${a}`]:g.getIn(i,a),...c};this.update(u,o,l,{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,r,n,o){let{isDefault:i=!1,skipPageinstruction:s,skipDirtyValidation:a=!1,encryptedContent:c}=o,l=UL.execute(this.contextName,this.target,r,e,this.pageReference,n,a,i);if(!s){if(typeof r=="string"?this.initChangeList(r):this.initChangeList(r-1),!i){let u=this.changeList?.[this.targetPageReference]?.[typeof r=="string"?r:r-1].content;this.changeList[this.targetPageReference][typeof r=="string"?r:r-1]=xt(g.deepClone(u),e,o)}if(this.current?.automatic===i&&(this.current?.instruction?.groupIndex===r||this.current?.instruction?.listIndex===r)&&this.current?.instruction.instruction==="UPDATE"){let u=this.current.instruction.content;this.current.instruction.content=xt(g.deepClone(u),g.unflatten(e),o),this.applyEncryptedContent(c);return}this.insertNode(l),this.applyEncryptedContent(c),i&&(this.current.automatic=!0)}}delete(e,r){let n=jL.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),r||T(Kn({instruction:"DELETE",listIndex:typeof e=="string"?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,r,n,o){let{instruction:i,actionPayload:s={content:{}},displayPropertPayload:a={}}=LL.execute(this.target,r,e,this.pageReference),{isDefault:c=!1,encryptedContent:l,skipDirtyValidation:u=!1}=o;if(this.initChangeList(typeof r=="string"?r:r-1),!c){let p=this.changeList?.[this.targetPageReference]?.[typeof r=="string"?r:r-1].content;this.changeList[this.targetPageReference][typeof r=="string"?r:r-1]=xt(g.deepClone(p),e,o)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=i:this.insertNode(i),this.applyEncryptedContent(l),n||(s.content={...s.content,...a},T(Kn({...s,[typeof r=="string"?"groupIndex":"listIndex"]:typeof r=="string"?r:r-1,c11nEnv:o.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,skipDirtyValidation:u}))),c&&(this.current.automatic=!0)}replacePage(e,r,n,o,i){let s=o??this.pageReference,a=n??this.target,{instruction:c,actionPayload:l}=FL.execute(a,e,s);this.insertNode(c),this.applyEncryptedContent(i),r||T(Kn({...l,context:this.contextName,referenceList:`${s}${g.convertClipboardPageToPageRefNotation(a)}`}))}deletePage(e){let r=VL.execute(this.target,this.pageReference);this.insertNode(r),e||T(Kn({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,r){let n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(r-1,0,n[0]);let o=zL.execute(this.target,e,r,this.pageReference);this.insertNode(o),T(Kn({listIndex:e-1,listMoveToIndex:r-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){let r=vb.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(r),vb.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){if(!this.current?.instruction||!e)return;let r=this.current.instruction.content||{};this.current.instruction.content=xt(g.deepClone(r),e)}},yc=xb;var hm={},lu={},wb={},mn=(t,e,r)=>{hm[t]||(hm[t]={}),hm[t][e]||(hm[t][e]={content:[]}),lu[t]||(lu[t]=[],wb[t]=[]),ke.isStateMachineExist(t,r,e)||ke.setStateMachine(t,e,r,new yc(e,r,t))},Bi=t=>ei.formatPageReference(t),Js=(t,e)=>{let r=lu[t],n=wb[t],o=Rn(e),i=o?.substring(0,o.indexOf("["));n?.indexOf(i)<0&&wb[t].push(i),r?.indexOf(o)<0&&lu[t].push(o)},HL=t=>lu[t]||[],ym=t=>{delete lu[t]},PY=(t,e=!0)=>{let r=t.getContextName(),{selectionMode:n,selectionList:o,renderMode:i,referenceList:s}=t.getComponentConfig(),a;if(n===d.LIST_SELECTION_MODE.MULTI&&o?a=o:i==="Editable"&&s&&(a=t.getStateProps().referenceList),a){a=Bi(a);let c=ke.getStateMachine(r,"",`${t.getPageReference()}${a}`);c&&(c.visibility=e)}},Sm=t=>ke.buildPageInstructionsByContext(t),NY=t=>ke.buildPageInstructionsByContext(t,!0),Em=t=>{ke.clearStateMachines(t),delete hm[t]},GL=(t,e,r,n)=>{let[,o]=e.split(`${t}[${n}]`);o!==""&&o!==void 0&&(o=o.startsWith(".")?o.substring(1):o,Object.keys(r).forEach(i=>{r[`${o}.${i}`]=r[i],delete r[i]}))},qL=(t,e,r,n,o)=>{let{skipStateUpdate:i=!1,insertIfEmpty:s=!1,skipDirtyValidation:a=!1}=o||{},c=r.getContextName(),l=r.getReferenceList(),u=n||r.getPageReference(),p=Bi(l);mn(c,p,u),Js(c,`${l}[${e}]`),GL(l,u,t,e);let m={instruction:d.LIST_ACTIONS.INSERT,content:{...g.unflatten(t)}},f=JSON.parse(JSON.stringify(m));delete f.content.classID;let h=ke.getStateMachine(c,u,p);s&&h?.root||h.insert(t,e+1,i,{c11nEnv:r,skipDirtyValidation:a})},OY=(t,e)=>{let r=t.indexOf(E.CONTENT)+E.CONTENT.length,n=t.lastIndexOf(`[${e}]`);return t.substring(r,n)},xY=(t,e,r=0,n={})=>{let{skipStateUpdate:o=!0,pageRef:i}=n,s=e.getContextName(),a=e.getReferenceList(),c=i||e.getPageReference();a||(a=OY(c,r));let l=Bi(a);mn(s,l,c),Js(s,`${a}[${r}]`),GL(a,c,t,r),ke.getStateMachine(s,c,l).update(t,r+1,o,n)},DY=(t,e,r,n={})=>{let o=r.getPageReference(),{stateMachineTarget:i}=ke.getStateMachineObjByPath(`${o}${t}`,r.getContextName(),`${o}${t}`.endsWith("]"));if(!i){let s=o.substring(0,o.lastIndexOf("["));s||(s=o.substring(0,o.lastIndexOf(".")));let a=s.substring(s.lastIndexOf("."));s=s.substring(0,s.lastIndexOf(".")),s&&a&&mn(r.getContextName(),a,s)}ke.executeStateMachine(r.getContextName(),`${o}${t}`,e,!0,n)},wY=(t,e,r,n)=>{let{skipStateUpdate:o=!1}=n||{},i=e.getContextName(),s=e.getReferenceList(),a=r||e.getPageReference(),c=`${a+s}[${t}]`,l=Bi(s);dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:i,isListEntry:!0,deletingIndex:t}),mn(i,l,a),Js(i,`${s}[${t}]`);let u=ke.getStateMachine(i,a,l);typeof t=="string"?u.delete(t,o):u.delete(t+1,o);let p=ke.getUnConnectedStateMachines(i)||{};Object.keys(p).forEach(m=>{m.includes(`${a}${l}`)&&m!==`${a}${l}`&&(p[m]=null)})},$Y=(t,e,r)=>{let n=r.getContextName(),o=r.getReferenceList(),i=r.getPageReference(),s=Bi(o);mn(n,s,i),Ie.deleteAllListNodes(n,`${i}${s}`,!1),Js(n,`${o}[${e}]`),ke.getStateMachine(n,i,s).move(t+1,e+1);let c=ke.getUnConnectedStateMachines(n)||{};Object.keys(c)?.forEach(l=>{l.includes(`${i}${s}`)&&l!==`${i}${s}`&&delete c[l]})},WL=(t,e)=>{let[,r]=t.split("."),n=e?.split(".").pop();return r===n},$b=t=>{let e=g.getPropertyName(t),r=e.indexOf(".");return r>=0?e.slice(r+1):e},Db=(t,e,r)=>{let n={};return Object.values(t).forEach(o=>{if(WL(o,r)){let i=$b(o).split(".");if(i.length>1){let s=g.getIn(e,i)??"";if(!s){let a=`!P!${i.join(":")}`;s=g.getIn(e,a)??""}g.setIn(n,i,s)}else{let s=g.getIn(e,i)??"";n[i[i.length-1]]=s}}}),n},MY=(t,e,r)=>{e?.descriptors?.length&&!r&&e.descriptors.forEach(n=>{t[$b(n)]=n})},KL=(t,e,r,n,o)=>{let i=t.getValue(e)||{};r&&Object.keys(i).length>0&&t.clearErrorMessages({property:n?o:t.getStateProps().value})},kY=(t,e,r)=>t?r.substring(1):e.substring(e.lastIndexOf(".")+1),LY=(t,e,r)=>t?`${e}${r}`:e,UY=(t,e,r,n)=>e?t.getFieldMetadata(`${r}`):t.getCurrentPageFieldMetadata(n),jY=t=>t?.config?.dataRelationshipContext&&t.type==="SimpleTableSelect"&&t.config?.selectionMode==="single",zY=t=>t.length>1&&t.pop()||"",FY=(t,e)=>{let{selectionKey:r,renderMode:n,referenceList:o,value:i}=t.getRawConfigProps()??{},s=i;if(r?s=r:n==="Editable"&&(s=o),!s||typeof s!="string")return;let a=Rn(g.getPropertyName(s));if(a.trim())return a.startsWith(`${e}.`)?`.${a.substring(e.length+1)}`:`.${a}`},VY=(t,e,r)=>new Promise(n=>{let{skipPageInstructions:o=!1}=r,{selectionMode:i,selectionList:s,required:a}=e.getConfigProps(),c=i===d.LIST_SELECTION_MODE.MULTI,l=e.getContextName(),u=e.getPageReference(),p=kY(c,u,s),m=e.getRawMetadata(),f=null,h=jY(m);h&&(p=m?.config?.dataRelationshipContext,f=u.concat(".").concat(p),u=f);let A=m?.type==="SimpleTableSelect"&&i===d.LIST_SELECTION_MODE.SINGLE&&!m.config?.dataRelationshipContext&&e.getPageReference().endsWith(`.${p}`),C=LY(c,u,s),I=UY(e,c,p,f),{datasource:{parameters:_={}}}=I,N={..._};if(MY(N,I,c),c){let x=s;x=Bi(x);let H=e.getValue(C)||[];mn(e.getContextName(),x,u);let G=[],re=H.length;t.forEach(j=>{let ne=Db(_,j,p),be={};if(Object.hasOwn(j,"displayProperty")){let Fe=j.displayProperty;be[Fe]=j[Fe]}let he=Object.entries(ne),Me=H.findIndex(Fe=>he.every(([Ce,Ye])=>Fe[Ce]===Ye));if(Me===-1?(Me=re,j.$selected&&(re+=1)):re=re?re-1:0,!o){let Fe=ke.getStateMachine(l,u,x);j.$selected?Fe.insert(ne,Me+1,!0,{}):Fe.delete(Me+1,!0)}G.push({instruction:j.$selected?d.LIST_ACTIONS.SELECT:d.LIST_ACTIONS.DESELECT,listIndex:Me,content:{...ne,...be}})}),T(Kn({instruction:d.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${p}`,actions:G}))}else{let x=Db(N,t[0],p),H=FY(e,p),G={...h?{contextPageReference:u}:{},...H?{associatedProperty:H}:{}},re=m?.config?.compositeKeys||[];if(e.getRawConfigProps().onlyAllowRefreshOnCompositeKeys&&re.length){let j=re?.reduce((Me,Fe)=>(Me[$b(Fe)]=Fe,Me),{})||{},ne=Db(j,t[0],p);Object.keys(ne).forEach(Me=>{delete x[Me],e.getActionsApi().updateFieldValue(`.${Me}`,ne[Me],G);let Fe=A?`.${Me}`:`.${p}.${Me}`;e.getActionsApi().triggerFieldChange(Fe,ne[Me])});let be=u.split(/\[\d+\]/gm),he=zY(be);e.getActionsApi().updateFieldValue(he,x,G),e.getActionsApi().triggerFieldChange(he,x)}else Object.keys(x).forEach(j=>{e.getActionsApi().updateFieldValue(`.${j}`,x[j],G);let ne=A?`.${j}`:`.${p}.${j}`;e.getActionsApi().triggerFieldChange(ne,x[j])})}KL(e,C,a,c,p),n()}),BY=(t,e)=>{let{selectionMode:r,selectionList:n}=e.getConfigProps(),o=[],i=e.getPageReference(),s=r===d.LIST_SELECTION_MODE.MULTI,a=s?n.substring(1):i.substring(i.lastIndexOf(".")+1),c=e.getRawMetadata(),l=null;c?.config?.dataRelationshipContext&&c.type==="SimpleTableSelect"&&c.config?.selectionMode==="single"&&(a=c.config.dataRelationshipContext,l=i.concat(".").concat(a),i=l);let u=s?`${i}${n}`:i,p=e.getValue(u)||[];if(Array.isArray(p)||(p=[p]),t)return Promise.resolve(p);let{datasource:{parameters:m={}}={}}=s?e.getFieldMetadata(`${a}`):e.getCurrentPageFieldMetadata(l);return p.forEach(f=>{let h=Object.values(m).reduce((S,A)=>{let C=A.substring(A.lastIndexOf(".")+1);return WL(A,a)&&f[C]?`${S}${f[C]}`:S},"");h.trim()&&o.push(h.trim())}),Promise.resolve(o)},Am=t=>{if(!t)return!1;let e=NY(t);return Array.isArray(e)&&e.length>0};function HY(t){let{selectionList:e,required:r}=t.getConfigProps(),n=t.getContextName(),o=t.getPageReference(),i=e,s=`${o}${e}`;return new Promise(a=>{let c=i;c=Bi(c),mn(n,c,o),ke.getStateMachine(n,o,c).deleteAll(),KL(t,s,r,!0,i),a()})}var GY=(t,e,r,n)=>{let o=t.getContextName(),i=t.getPageReference(),s=Bi(e);mn(o,s,i),ke.getStateMachine(o,i,s).initPageInstructions(t,r,n)},JL=(t,e,r={})=>{let{skipStateUpdate:n=!1}=r,o=t.getPageReference(),i=Bi(e);mn(t.getContextName(),e,o),ke.getStateMachine(t.getContextName(),o,i).deleteAll(n);let a=ke.getUnConnectedStateMachines(t.getContextName())||{};Object.keys(a).forEach(c=>{c.includes(`${o}${i}`)&&c!==`${o}${i}`&&(a[c]=null)})},qY=(t,e,r,n)=>{let{skipStateUpdate:o=!1}=n||{},i=t.getPageReference(),s=t.getContextName();mn(s,e,i),Js(s,g.buildInstructionPageReference(i,e)),ke.getStateMachine(s,i,e).replacePage(r,o)},WY=(t,e,r)=>{let{skipStateUpdate:n=!1}=r||{},o=t.getPageReference(),i=t.getContextName();mn(i,e,o),Js(i,g.buildInstructionPageReference(o,e)),ke.getStateMachine(i,o,e).deletePage(n)},YL=(t,e,r)=>{let n=(o,i)=>{Object.entries(o).forEach(([s,a])=>{if(Array.isArray(a)){let c=PCore.createPConnect({options:{pageReference:r.getPageReference(),context:r.getContextName(),referenceList:`${i}.${s}`}}).getPConnect();JL(c,`${i}.${s}`,{skipStateUpdate:!0});for(let l=0;l<a.length;l+=1)qL(a[l],l,c,void 0,{})}else typeof a=="object"&&n(a,`${i}.${s}`)})};n(t,e)},KY=(t,e,r)=>{if(Ie.getContextReferences(t)?.get(`${e}${r}`))return;let n=/\[[^\]]*\]/g,o=n.exec(r);for(;o;){let i=r.substring(0,o.index);i&&mn(t,i,e),o=n.exec(r)}},ZL=(t,e,r,n,o)=>{Sm(t).forEach(s=>{let a=o&&s.instruction.toLowerCase()==="replace"?g.convertClipboardPageToPageRefNotation(o):g.convertClipboardPageToPageRefNotation(s.target);ke.isStateMachineExist(e,r,a)||(KY(e,r,a),ke.setStateMachine(e,a,r,new yc(a,r,e)));let c=ke.getStateMachine(e,r,a);switch(s.instruction.toLowerCase()){case"insert":c.insert(s.content,s.listIndex,n,{encryptedContent:s.encryptedContent});break;case"update":c.update(s.content,s.listIndex??s.groupIndex,n,{encryptedContent:s.encryptedContent});break;case"delete":s.listIndex?c.delete(s.listIndex,n):s.groupIndex?c.delete(s.groupIndex,n):c.deletePage();break;case"replace":c.replacePage(s.content,n,o?s.target:void 0,o?r:void 0,s.encryptedContent);break;case"move":c.move(s.listIndex,s.listMoveToIndex);break;case"add":c.insert(s.content,s.groupIndex,n,{encryptedContent:s.encryptedContent});break;case"delete all":{c.deleteAll();break}default:break}})},QL=t=>({insert:(e,r,n,o)=>qL(e,r,t,n,o),update:(e,r,n)=>xY(e,t,r,n),updateProperty:(e,r,n)=>DY(e,r,t,n),deleteEntry:(e,r,n)=>wY(e,t,r,n),reorder:(e,r)=>$Y(e,r,t),setSelectedRows:(e,r={skipPageInstructions:!1})=>VY(e,t,r),getSelectedRows:(e=!1)=>BY(e,t),clearSelectedRows:()=>HY(t),setVisibility:e=>PY(t,e),initDefaultPageInstructions:(e,r,n)=>GY(t,e,r,n),deleteAll:(e,r)=>JL(t,e,r),replacePage:(e,r,n)=>qY(t,e,r,n),deletePage:(e,r)=>WY(t,e,r)});var Mb=class{fieldDefaults;constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?g.mergeDeep(e,this.fieldDefaults):g.copy(e,this.fieldDefaults))}setFieldDefault(e,r,n){e&&r&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},typeof this.fieldDefaults[e]=="object"&&this.fieldDefaults[e]!==null&&(this.fieldDefaults[e][r]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},Xr=new Mb;var kb=class{eventType;callback;contextName;id;constructor(e,r,n,o){this.eventType=e,this.callback=n,this.contextName=o,this.id=r}},XL=kb;var Lb=class{subscribers;constructor(){this.subscribers={}}publish(e,r){(this.subscribers[e]||[]).slice().forEach(o=>{o.callback(r)})}unsubscribe(e,r,n){let o=this.subscribers[e]||[],i=0,s=-1;o.forEach(a=>{a.id===r&&a.contextName===n&&(s=i),i+=1}),s!==-1&&o.splice(s,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,r,n,o,i){this.subscribers[e]=this.subscribers[e]||[];let s=!1;if(i&&this.subscribers[e].forEach(a=>{s=a.id===r&&a.contextName===o}),!s){let a=new XL(e,r,n,o);this.subscribers[e].push(a)}}clearContext(e){let r=this.subscribers;Object.keys(r).forEach(n=>{let o=this.subscribers[n],i=[];o.forEach(s=>{s.contextName!==e&&i.push(s)}),this.subscribers[n]=i})}},uu=new Lb;var Ub=class{static subscribe(e,r,n,o=!1,i="app"){uu.subscribe(e,n,r,i,o)}static subscribeOnce(e,r,n){this.subscribe(e,r,n,!0)}static publish(e,r){uu.publish(e,r)}static unsubscribe(e,r,n="app"){uu.unsubscribe(e,r,n)}static unsubscribeAllWithEventType(e){uu.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){uu.clearContext(e)}},$=Ub;var jb=class{override=null;discoveredOffline=!1;subscribers=new Set;constructor(){typeof globalThis.addEventListener=="function"&&(globalThis.addEventListener("online",this.handleOnline),globalThis.addEventListener("offline",this.handleOffline))}isOnline(){return this.override!==null?this.override:this.discoveredOffline?!1:typeof navigator<"u"&&"onLine"in navigator?navigator.onLine:!0}setOnlineOverride(e){let r=this.isOnline();this.override=e;let n=this.isOnline();n!==r&&this.notifyAll(n)}onStatusChange(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}reportNetworkFailure(){this.override===null&&(this.discoveredOffline||(this.discoveredOffline=!0,this.notifyAll(!1)))}reportNetworkRecovery(){this.override===null&&this.discoveredOffline&&(this.discoveredOffline=!1,this.notifyAll(!0))}handleOnline=()=>{this.override===null&&(this.discoveredOffline=!1,this.notifyAll(!0))};handleOffline=()=>{this.override===null&&this.notifyAll(!1)};notifyAll(e){T({type:e?Hl:$s,payload:{context:"app"}}),this.subscribers.forEach(r=>{r(e)})}},Do=new jb;var eU=()=>Do.reportNetworkFailure(),tU=()=>Do.reportNetworkRecovery();var zb=class t{config;ssKeyConfig;constructor(e,r=!0){this.config=e,r?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,r=!0){return new t(e,r)}updateConfig(e,r=!0){r?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):rU(e)}reloadConfig(e=!0){if(e){let r=window.sessionStorage.getItem(this.ssKeyConfig);this.config=r?JSON.parse(r):null}else this.config=nU()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:r}=this.config,{password:n}=this.config,o=this.config.clientId?this.config.clientId:this.config.client_id,i=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,a=this.config.authService?this.config.authService:this.config.authentication_service||"pega",c=this.config.appAlias?this.config.appAlias:_e.getApplicationAlias(),l=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;r=r||this.config.tokenInfo?.session_index;let u="";r?u=`&session_index=${r}`:`${l}`?u=`&UserIdentifier=${l}`:n&&(u=`&Password=${window.atob(n)}`);let p=new Uint8Array(64);window.crypto?.getRandomValues(p),this.config.codeVerifier=this.base64UrlSafeEncode(p),this.updateConfig(this.config,!1);let m=c?`+app.alias.${c.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then(f=>`${s}?client_id=${o}&response_type=code&redirect_uri=${i}&scope=openid${m}&state=${e}&code_challenge=${f}&code_challenge_method=S256&authentication_service=${a}&enable_psyncId=true${u}`)?.catch(()=>null)}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then(()=>{}).catch(r=>{console.log(r)})};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin()||!e.data||!e.data.type||e.data.type!=="PegaAuth")return;let r=e.data.code.toString();this.getTokenAndFinish(r)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";let r=e.indexOf("//"),n=e.indexOf("/",r+2);return n!==-1?e.substring(0,n):e};getToken(e,r){this.reloadConfig(r);let n=this.config.clientId?this.config.clientId:this.config.client_id,o=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,i=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:a}=this.config,c=window.location.search,l=new URLSearchParams(c),u=e||l.get("code"),p=new URLSearchParams;return n&&p.append("client_id",n),o&&p.append("client_secret",o),p.append("grant_type","authorization_code"),p.append("code",u),i&&p.append("redirect_uri",i),a&&p.append("code_verifier",a),this.config?.secureCookie&&p.append("send_token_as_cookie","true"),k(s,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:p.toString()}).then(m=>m.data).then(m=>{m.eA=Date.now()+m.expires_in*1e3;let f=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,f=!0),m.session_index&&(this.config.session_index=m.session_index,f=!0),f){this.updateConfig(this.config,r),this.config?.secureCookie?Jn({pzCTkn:m?.csrf}):(Hi({tokenInfo:m}),Jn({Authorization:`${m?.token_type} ${m?.access_token}`}));let{onTokenRetrieval:h}=this.config;h&&typeof h=="function"&&h(m),window.postMessage("oAuthSuccess")}return m}).catch(()=>null)}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",new TextEncoder().encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce((r,n)=>r+String.fromCharCode(n),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then(r=>this.base64UrlSafeEncode(r)).catch(r=>{console.log(r)}).finally(()=>null)}},US=zb;var iU=t=>!t?.startsWith(gt.getServerURL()||""),sU=async()=>new Promise(async(t,e)=>{let r=Cm();if(!("tokenInfo"in r)||!r?.tokenInfo){e(new Error("Missing token information."));return}let{access_token:n,refresh_token:o=null}=r.tokenInfo,i=r.endPoints?.revoke,{client_id:s="",client_secret:a="",secureCookie:c,serverType:l}=r,u=l==="launchpad",p={"content-type":"application/x-www-form-urlencoded"};a&&!u&&(p.authorization=`Basic ${window.btoa(`${s}:${a}`)}`);let m=new URLSearchParams;a?u&&(m.append("client_id",s),m.append("client_secret",a)):m.append("client_id",s),c&&m.append("send_token_as_cookie","true");let f=o?"refresh_token":"access_token",h=f==="access_token"?n:o;!c&&h&&m.append("token",h),m.append("token_type_hint",f),i&&await k(i,{method:"POST",headers:p,withCredentials:c,body:m.toString(),withoutDefaultHeaders:!0}),Jn({Authorization:null}),Hi({tokenInfo:null}),t()}),JY=async t=>{let e={};if(t?.authType==="OAuth2.0"){let r=new US(t,!1);e.reauthUrl=await r.buildAuthorizeUrl(),e.redirectOrigin=r.getRedirectUriOrigin(),window.addEventListener("message",r.authMessageHandler,!1)}else e.reauthUrl=gt.getServerURL()+(gt.getReAuthURL()?`${gt.getReAuthURL()}`:"/?reAuth=true");return e},oU=(t,e)=>{JY(e).then(r=>{let n={openReauthMessageModal:!0,reAuthenticationURL:r.reauthUrl,url:t,redirectOrigin:r.redirectOrigin};$.publish(E.PUB_SUB_EVENTS.EVENT_REAUTH,n)})},jS=t=>{let e="",r={method:"GET"},n={},o=!0;if(t?.authType==="OAuth2.0"){e=t.endPoints.token;let i=new URLSearchParams;(!t.tokenInfo?.refresh_token||t.tokenInfo.refresh_token&&t.tokenInfo.refresh_token.length<=0)&&(o=!1),i.append("client_id",t.client_id),i.append("grant_type","refresh_token"),t.client_secret&&i.append("client_secret",t.client_secret),t.secureCookie&&i.append("send_token_as_cookie","true"),t.tokenInfo?.refresh_token&&i.append("refresh_token",t.tokenInfo.refresh_token),r={method:"POST",body:i.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},n={success:s=>{let{data:a}=s,c={access_token:a?.access_token,refresh_token:a?.refresh_token};t.tokenInfo&&Hi({tokenInfo:{...t.tokenInfo,...c}}),t.secureCookie?Jn({pzCTkn:a?.csrf}):Jn({Authorization:`${a?.token_type} ${a?.access_token}`});let{onTokenRetrieval:l}=t;l&&typeof l=="function"&&l(a)},failure:s=>{if(!t.popupReauth)$.publish(E.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,t);else return oU(s,t)}}}else e=`${gt.getServerURL()}/updateSession`,r={method:"GET",headers:{}},n={failure:oU};return{url:e,config:r,callback:n,isRefreshTokenPresent:o}},Ys=(t,e)=>e?.authType==="OAuth2.0"?t?.includes(e.endPoints.token):t?.includes("updateSession"),zS=(t,e)=>{let r=e??(_e.doesRestApiExist("Logout")?_e.getRestEndPoint("Logout")?.restApi:void 0);return!!(r&&t&&t.endsWith(r))},Fb=t=>{let{config:e}=t,r=e.headers&&e.headers.context;return e.data&&(e.body=e.data),{url:e.url,config:e,context:r}};var Vb=class{updateSessionInProgress;latestUpdateSessionTimeStamp;constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}},aU=Vb;var cU=()=>{},lU=t=>{cU=t},uU=(t,e)=>{cU(t,e)};var dU=()=>{$.publish("updateSession",{updateStatus:"success"}),$.publish("OnUpdateSession",{})},pU=(t,e,r)=>{r&&(r.setUpdateSessionStatus(!1),r.latestUpdateSessionTimeStamp=Date.now()),t?.success?.(e),dU()},mU=(t,e,r,n)=>{let o=t&&t.config&&Ys(t.config.url,e);return o&&r?.failure?.(n,e),o},Bb=t=>{let{url:e,config:r,callback:n}=jS(t);return k(e,r).then(o=>{n?.success?.(o),dU()}).catch(o=>{throw o})},fU=(t,e,r)=>{let{config:n}=t,{url:o,config:i,callback:s,isRefreshTokenPresent:a}=jS(r),c=n?.headers&&n.headers.context;n?.data&&(n.body=n.data);let l=_m(n.url,n,c,e);return a?k(o,i).then(u=>new Promise((p,m)=>{setTimeout(()=>{pU(s,u,e),l.then(f=>{p(f)}).catch(f=>{m(f)})},0)})).catch(u=>mU(u,r,s,n.url)?l:Promise.reject(u)):(s?.failure?.(n.url,r),l)},YY=(t,e)=>{if(e.getUpdateSessionStatus())return;let{url:r,config:n,callback:o,isRefreshTokenPresent:i}=jS(t);i&&(e.setUpdateSessionStatus(!0),k(r,n).then(s=>{setTimeout(()=>{pU(o,s,e)},0)}).catch(s=>{e.setUpdateSessionStatus(!1),mU(s,t,o,r)}))};lU(YY);var ZY="uploadAttachment",QY="linkCaseAttachment",XY="getCaseAttachments",Gb="downloadAttachment",eZ="editAttachment",tZ="deleteAttachment",rZ="getAttachmentCategories",nZ="downloadDocument",oZ="deleteDocument",Im={};function ht(t,e){let r=P.getDefaultQualifiedName(e);return r!==e&&r in t?t[r]:t[e]}var gU=t=>{let e=pu();return Im[t]=e,e},iZ=t=>{Im[t]&&(Im[t].cancel(),delete Im[t])},sZ=(t,e,r,n,o,i)=>{let s=new FormData;s.append("appendUniqueIdToFileName","true"),s.append("file",t),o&&s.append("contextID",o),i&&s.append("category",i);let{restApi:a,reqType:c}=U(ZY,{}),l=!!v?.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories,u={};return u["Content-Type"]="multipart/form-data",l&&(u["x-pega-stream-support"]="repository-stream"),k(a,{method:c,headers:u,body:s,onUploadProgress:e,signal:gU(t.ID).token},n).then(p=>({type:"File",category:t.category||"File",ID:p.data.ID,clientFileID:t.ID,filename:t.name})).catch(r?r(FS,t):p=>{throw p.isHandled=!1,p}).finally(()=>delete Im[t.ID])},aZ=(t,e,r,n)=>{let o={};if(r==="File"){let[a]=e,{clientFileID:c}=a;delete a.clientFileID,c&&(o.signal=gU(c).token)}let{restApi:i,reqType:s}=U(QY,{caseID:t});return k(i,{...o,body:{attachments:e},method:s},n)},cZ=(t,e,r=!1)=>{let{restApi:n,reqType:o}=U(XY,{caseID:t,includeThumbnail:r});return k(n,{method:o},e).then(i=>i.data.attachments)},lZ=(t,e,r)=>{let{restApi:n,reqType:o}=U(rZ,{caseID:t,type:e});return k(n,{method:o},r).then(i=>i.data)};function uZ(t){let e=v.environmentInfoObject;return!!(e?.pyFeatures?.pyEnableStreamingForRepositories&&t?.toLowerCase()==="repository"&&(e?.renderingMode!=="EMBED"||v.isPegaMobile()))}function hU(t){let e=new URL(t,window.location.origin),r=v.environmentInfoObject?.encCSRFToken;return r&&e.searchParams.set("pzencv1zzz",r),e.searchParams.set("mode","stream"),e.toString()}async function dZ(t){return await Bb(Cm()),{data:hU(t)}}var pZ=(t,e,r,n,o)=>{t=t.replace(/\//g,"_");let{restApi:i,reqType:s}=U(Gb,{attachmentID:t}),a=o&&i?(()=>{let c=new URL(i,window.location.origin);return c.searchParams.set("encoding",o),c.toString()})():i;return uZ(n)&&i?dZ(i):k(a,{method:s,...r==="binary"&&!o&&{responseType:"arraybuffer"}},e)};function mZ(t){return"showSaveFilePicker"in t}function fZ(){if(!(typeof window>"u"||!mZ(window)))return window.showSaveFilePicker}async function gZ(t){let e=fZ();if(!e)return null;try{let r=await e({suggestedName:t}),n=await r.createWritable();return{fh:r,writable:n}}catch(r){if(r instanceof DOMException&&r.name==="AbortError")return null;throw r}}async function hZ(t,e){let r;await k(t,{method:"GET",adapter:async i=>(r=i,{data:null,status:204,statusText:"No Content",headers:{},config:i}),withoutDefaultHeaders:!1},e,{includeRemoteSystemIdIfPresent:!0});let o={};return Object.entries(r?.headers??{}).forEach(([i,s])=>{typeof s=="string"&&(o[i]=s)}),o}async function yZ(t,e,r){let n=await gZ(e);if(n)try{let o=await hZ(t,r),i=await fetch(t,{method:"GET",headers:o});if(!i.ok)throw new Error(`Download failed: ${i.status}`);if(!i.body)throw new Error("Download response has no body");await i.body.pipeTo(n.writable)}catch(o){throw await n.writable.abort().catch(()=>{}),o}}var SZ=async(t,e,r)=>{if(!v.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)return;t=t.replace(/\//g,"_");let{restApi:n}=U(Gb,{attachmentID:t});n&&(await Bb(Cm()),await yZ(hU(n),e,r))},EZ=t=>{let{restApi:e}=U(Gb,{attachmentID:t});return e},AZ=(t,e,r)=>{let{restApi:n,reqType:o}=U(eZ,{attachmentID:t});return k(n,{method:o,body:{...e}},r)},CZ=(t,e)=>{let{restApi:r,reqType:n}=U(tZ,{attachmentID:t});return k(r,{method:n},e)},_Z=(t,e)=>{let{restApi:r,reqType:n}=U(nZ,{documentID:t});return k(r,{method:n},e)},IZ=(t,e,r)=>{let{restApi:n,reqType:o}=U(oZ,{caseID:t,documentID:e});return k(n,{method:o},r)},bZ=t=>{let e=PCore.getEnvironmentInfo().getDocumentUrlDP()||P.getDefaultQualifiedName("D_pxGetDocumentURL");return PCore.getDataPageUtils().getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(r=>{t.reportError(": Error occurred during ajax call getDocumentURL API : ",r.response)})},TZ=t=>{let e="document-doc";if(!t)return e;if(t.startsWith("audio"))e="audio";else if(t.startsWith("video"))e="video";else if(t.startsWith("image"))e="picture";else if(t.includes("pdf"))e="document-pdf";else{let[,r]=t.split("/"),n=o=>o.some(i=>r.includes(i));n(["excel","spreadsheet"])?e="document-xls":n(["zip","compressed","gzip","rar","tar"])&&(e="document-compress")}return e},Hb=t=>{let e=ht(t,"pyCategoryLabel"),r=ht(t,"pyCategoryName"),n=ht(t,"Category"),o=ht(t,"pxCreateOpName"),i=ht(t,"pxCreateOperator"),s=t.CreateUser,a=ht(t,"pyFileName"),c=ht(t,"FileName"),l=ht(t,"FileExtension"),u=ht(t,"pyAttachName"),p=ht(t,"pyMimeFileExtension"),m=ht(t,"MimeType"),f=ht(t,"pzInsKey"),h=ht(t,"ID"),S=ht(t,"pyAttachmentLink"),A=ht(t,"AttachmentURL"),C=ht(t,"pxAttachmentCreateTime"),I=ht(t,"pxCreateDateTime"),_=ht(t,"CreateDateTime"),N=ht(t,"pxStorageType"),x=ht(t,"pyFileSize"),H=ht(t,"error"),G=ht(t,"thumbnail"),re=ht(t,"pyIsLargeAttachment"),j=ht(t,"IsLargeAttachment"),ne=ht(t,"pyAltDescription")??ht(t,"description"),be;e?be=`${e},`:be=r?`${r},`:n;let he;o?he=o:he=i||s?.Name||"";let Me;a?Me=a:Me=l&&l!==""&&c?.endsWith(l)?c.substring(0,c.lastIndexOf(l)-1):c;let Fe;return u&&a?Fe=u.startsWith(a)&&u.split(".").length-1===a.split(".").length?u.split(".").pop():"":Fe=l??"",{props:{meta:`${be} ${he}`,name:u??c??"",icon:TZ(p??m??""),error:H??null,thumbnail:G??null},responseProps:{fileName:u??c??"",name:Me??"",category:r??n??"",extension:Fe,ID:f??h??"",mimeType:p??m??"",attachmentURL:S??A??"",createUser:he??"",createDateTime:C??I??_??"",responseType:t.responseType??(h?"binary":null),description:ne??void 0,localAttachment:!!t.localAttachment,storageType:N??void 0,fileSize:x??void 0,isLargeAttachment:re!==void 0?re==="true":j}}},vZ=t=>ht(t,"pxAttachmentKey")===""?[]:[t],yU=t=>{let e=[],r=!1;if(t&&Object.hasOwn(t,P.getDefaultQualifiedName("pyCount"))){r=!0;let o=ht(t,"pxResults");e=Array.isArray(o)?o.filter(i=>!!ht(i,"pzInsKey")).map(i=>Hb(i)):[]}else if(t&&typeof t=="object"){let o;Array.isArray(t)?o=t:o=vZ(t),e=o?.filter(i=>ht(i,"ID")&&ht(i,"FileName")||ht(i,"pzInsKey")).map(Hb)}else e=[];let n=t?ht(t,"pyCategoryName"):void 0;return{hasUploadedFiles:e.length>0,categoryName:(typeof n=="string"?n:"")||e?.[0]?.responseProps?.category||"",attachments:e,isOldAttachment:r}},RZ=t=>t!==null&&typeof t=="object"&&"hasUploadedFiles"in t&&typeof t.hasUploadedFiles=="boolean",PZ=(t,e)=>{let r=t;if(RZ(e)){let{attachments:n}=e;n.length===0&&(r="")}else{let{attachments:n}=yU(e);n.length===0&&(r="")}return r},du={uploadAttachment:sZ,linkAttachmentsToCase:aZ,getCaseAttachments:cZ,getAttachmentCategories:lZ,downloadAttachment:pZ,editAttachment:AZ,deleteAttachment:CZ,downloadDocument:_Z,deleteDocument:IZ,getDocumentURL:bZ,cancelRequest:iZ,buildFilePropsFromResponse:Hb,getAttachmentURL:EZ,prepareAttachmentData:yU,validateAttachments:PZ,streamDownloadAttachment:SZ};var SU=!1,EU=()=>SU,qb=t=>{SU=t},Wb=new Map,VS=(t,e)=>{Wb.set(t,e)},AU=t=>Wb.get(t)??null,BS=t=>{Wb.delete(t)};var Kb=class t{validators;constructor(){this.validators={}}static messageDispatcher(e,r,n,o,i,s){if(o){let a=[];a.push({type:E.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:i,message:o,...s??{}}),Pn({messages:a,property:e,pageReference:r,context:n})}}register(e,r){this.validators[e]=r}getValidator(e){return this.validators[e]}static normalizeBooleanRadio(e){return e==null||e===""?"":"false"}validateRequired(e,r,n,o,i,s){let{required:a,value:c}=s,l=null;if(a==="true"||a===!0){let p=o;switch(e){case"radiobuttons":p=c;break;case"attachment":{p=du.validateAttachments(o,c);break}case"checkbox":s.displayAs==="radiobuttons"?p=t.normalizeBooleanRadio(p):(!p||p==="false")&&(p="");break;default:typeof p=="string"&&(p=p.trim())}l=this.getValidator("required")(p),t.messageDispatcher(r,n,i,l,ei.getFieldLabel(s),{subType:"required"})}return l}validateType(e,r,n,o,i,s){let a=null,c={pageReference:n,context:i,property:r,...s},l=Xr.getDefaultsforType(s?.componentName||"")?.["client-validations"];l!==!1&&e&&this.getValidator(e)&&(a=this.getValidator(e)(o,c),(o!==""&&o!==null||Xr.getDefaultsforType(s?.componentName||"")?.showErrorWhenEmpty)&&t.messageDispatcher(r,n,i,a,s?.label));let u=s?.validationType;return l=u&&Xr.getDefaultsforType(u)?.["client-validations"],l!==!1&&u&&this.getValidator(u)&&(a=this.getValidator(u)(o,c),t.messageDispatcher(r,n,i,a,s?.label)),a}validate(e,r,n,o={}){let{context:i,disabled:s,readOnly:a,pageReference:c,skipRequiredValidation:l}=o,u=null;return!s&&!a&&(!l&&!EU()&&(u=this.validateRequired(e,r,c,n,i,o)),u||(u=this.validateType(e,r,c,n,i,o))),{message:u}}isValidatorExist(e){return!!e.validatetype}},NZ=new Kb,Dt=NZ;var GS={};qt(GS,{publishExpressions:()=>CU,publishMetadata:()=>HS,publishResponse:()=>Gi});var HS=t=>{t&&bm(t)},CU=(t,e)=>{t.DeclareExpressions&&e.context&&Jb({[e.context]:t.DeclareExpressions})},Gi=(t,e,r=!1)=>{let n=g.getIn(t,d.RESOURCES);n&&(HS(n),CU(n,e)),r||qi({...t,options:e})};var OZ="component",_U="component-loader",xZ={},DZ=t=>{if(_t())return Be.loadSvcComponent(t);let e=`${Be.getConstellationServiceUrl()}/v860/${Be.getAppAlias()}/${OZ}/${t}.js`;return Be.getLoader()(e,Be.getTypes.SCRIPT)},wZ=async(t,e)=>{if(!t?.length||globalThis.PCore?.getBehaviorOverride("dynamicLoadComponents")===!1)return Promise.resolve();let r=Be.getLoader(),n=e||Be.staticServerURL;if(Be.getLoader(_U))return Be.getLoader(_U)(t,n);let o=new Set(Object.keys(xZ)),i=t.flatMap(s=>{if(o.has(s))return[];let a=Gs.getComponent(s);if(!a)return o.add(s),[DZ(s)];let c=(a.scripts||[]).map(u=>r(u.startsWith("http")?u:`${n}${u}`,Be.getTypes.SCRIPT)),l=(a.styles||[]).map(u=>r(`${n}${u}`,Be.getTypes.STYLE));return o.add(s),[...c,...l]});return Promise.all(i.map(s=>s.catch(a=>console.error("Error loading asset:",a))))},fo=wZ;var IU="component-state-lru-index";function $Z(t){return typeof t=="object"&&t!==null&&"key"in t&&"accessedAt"in t&&typeof t.key=="string"&&typeof t.accessedAt=="number"}function qS(){try{let t=sessionStorage.getItem(IU);if(!t)return[];let e=JSON.parse(t);return Array.isArray(e)?e.filter($Z):[]}catch{return[]}}function WS(t){try{sessionStorage.setItem(IU,JSON.stringify(t))}catch{}}function Yb(t){let r=qS().filter(n=>n.key!==t);r.unshift({key:t,accessedAt:Date.now()}),WS(r)}function bU(t){let e=qS();if(e.length<=100)return[];let r=[],n=e.slice(0,100),o=e.slice(100);for(let i of o){try{t(i.key)}catch{}r.push(i.key)}return WS(n),r}function TU(t,e){let r=qS();if(r.length===0||t<=0)return[];let n=Math.min(t,r.length),o=r.slice(0,r.length-n),i=r.slice(r.length-n),s=[];for(let a of i){try{e(a.key)}catch{}s.push(a.key)}return WS(o),s}function vU(t){let e=qS(),r=e.filter(n=>n.key!==t);r.length!==e.length&&WS(r)}var Sc=()=>typeof sessionStorage<"u"?sessionStorage:null,Zb=class{userSettings;componentCache;contextMapToClearOnCancel;#e;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#e=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,r,n)=>{if(!Sc()){console.error("Session Storage not found");return}if(n?.managed&&v.getRenderingMode()!=="FULL_PORTAL")return;let o=this.getNormalizedKey(e),i=JSON.stringify(r);try{Sc()?.setItem(o,i)}catch(s){if(s instanceof DOMException&&s.name==="QuotaExceededError"){TU(5,a=>{Sc()?.removeItem(a)});try{Sc()?.setItem(o,i)}catch{return}}else return}n?.managed&&(Yb(o),bU(s=>{Sc()?.removeItem(s)}))};getComponentState=(e,r)=>{if(r?.managed&&v.getRenderingMode()!=="FULL_PORTAL")return;let n=Sc()?.getItem(this.getNormalizedKey(e))??null,o=n?g.isValidJson(n):void 0;return r?.managed&&(o??n)!==null&&(o??n)!==void 0&&Yb(this.getNormalizedKey(e)),o||n};removeComponentState=(e,r)=>{r?.managed&&v.getRenderingMode()!=="FULL_PORTAL"||(Sc()?.removeItem(this.getNormalizedKey(e)),r?.managed&&vU(this.getNormalizedKey(e)))};fetchUserSettings=async()=>{if(Zs("getUserSettings")){let{restApi:e,reqType:r}=U("getUserSettings");k(e,{method:r,headers:{}}).then(n=>{if(n.status===200&&n.data)this.userSettings=n.data;else throw new Error("something went wrong while fetching getUserSettings")}).catch(n=>console.error(n))}};init=()=>{v.getUserSettings()?this.userSettings=v.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if(typeof e!="string")throw new TypeError("path must be string");return g.getIn(this.userSettings,e,{})};setUserSettings=async(e,r)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("path must be string"));if(r==null||r==="")return Promise.reject(new Error("value is required parameter"));let n;if(Zs("updateUserSettings"))n=U("updateUserSettings");else return Promise.resolve("updateUserSettings route is not available");let{restApi:o,reqType:i}=n;return k(o,{method:i,body:g.setIn({},e,r)}).then(s=>{if(s.status===200&&s.data)this.userSettings=s.data;else throw new Error("something went wrong")}).catch(s=>{console.error(s)})};setComponentCache(e,r,n={}){if(typeof e!="string"||!e?.trim())return;let o=n.clearOnCancelForContext;if(o&&(Object.hasOwn(this.contextMapToClearOnCancel,o)?this.contextMapToClearOnCancel[o].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[o]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=r,!this.#e){this.#e=!0;let i=s=>{let{context:a}=s||{};(this.contextMapToClearOnCancel[a]||new Set).forEach(l=>{this.resetComponentCache(l)}),delete this.contextMapToClearOnCancel[a]};$.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,i,"RESET_COMPONENT_CACHE")}}getComponentCache(e){if(typeof e!="string"||!e?.trim())return null;if(Object.hasOwn(this.componentCache,this.getNormalizedKey(e)))return this.componentCache[this.getNormalizedKey(e)]}getURLParam(e,r){let n=globalThis.location?.href;if(typeof n!="string")return null;let i=new URL(n).searchParams.get(e);return i?(i=r&&typeof globalThis.atob=="function"?globalThis.atob(i):i,i):null}setURLParam(e,r,n){if(!v.shouldUseURLParams()||typeof globalThis.location>"u"||typeof globalThis.history>"u"||typeof globalThis.location.href!="string"||n&&typeof globalThis.btoa!="function")return;let o=new URL(globalThis.location.href);if(r=n?globalThis.btoa(r):r,o.searchParams.get(e)===r)return;o.searchParams.set(e,r);let i={type:"ui-navigation"};globalThis.history.pushState(i,"",o)}setURLParams(e){if(typeof globalThis.location>"u"||typeof globalThis.history>"u"||typeof globalThis.location.href!="string")return;let r=new URL(globalThis.location.href);Object.entries(e).forEach(([o,i])=>{r.searchParams.set(o,i)});let n={type:"update-history"};globalThis.history.pushState(n,"",r)}resetComponentCache(e){return typeof e!="string"||!e?.trim()?!1:Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?(delete this.componentCache[this.getNormalizedKey(e)],!0):!1}getURLType=e=>{let r="[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}",n=new RegExp(`/app/${r}`),o=new RegExp(`/preview/${r}`);return n.test(e)?"constellation":o.test(e)?"preview":"vanity"}},MZ=new Zb,pt=MZ;var Qb=class{waitingToPutUpIndicator;contextArray;pauseDuration;constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let r;return e&&({context:r}=e,r||(r=e.containerItemID),r||(r=e.contextName)),r??null}enableLoadingIndicator(e,r=!0){let n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then(o=>{Do.isOnline()&&r&&this.contextArray[o]!==void 0&&this.contextArray[o]>0&&T({type:ws,payload:{context:o}})})))}pauseBeforeShowing=e=>new Promise(r=>{setTimeout(()=>r(e),this.pauseDuration)});disableLoadingIndicator(e,r=!0){let n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),r&&this.contextArray[n]!==void 0&&this.contextArray[n]===0&&T({type:To,payload:{context:n}}))}addToContextArray=e=>{this.contextArray[e]===void 0&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{this.contextArray[e]!==void 0&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}},Nn=new Qb;var Xb=class{actionMgrActions;counterActionMgrId;constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,r,n,o,i="unknown",s,a=!0){if(this.actionMgrActions[e]!==void 0)return null;let c={actionType:i,promise:r,resolve:n,reject:o,actionPayload:s,isSettled:!1};return this.actionMgrActions[e]=c,a&&Nn.enableLoadingIndicator(c.actionPayload),e}actionManagerPromise=(e,r="")=>{r===""&&(r=this.getNextActionMgrId());let n,o,i=new Promise((s,a)=>{n=s,o=a});if(n&&o)this.register(r,i,n,o,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:i}};resolveActionByID(e,r,n=!0){let o=this.actionMgrActions[e],i=e;if(o){if(setTimeout(()=>{o.resolve(r)},0),!o.isSettled){o.isSettled=!0;let{context:s,isCaseWideAction:a,isProcessAction:c}=o.actionPayload??{},l={actionType:o.actionType,context:s,isCaseWideAction:a,isProcessAction:c};$.publish(E.PUB_SUB_EVENTS.EVENT_POST_ACTION,l)}Nn.disableLoadingIndicator(o.actionPayload,n)}else i=null;return i}rejectActionByID(e,r=!0,n){let o=this.actionMgrActions[e],i=e;return o?(o.isSettled=!0,o.reject(n),Nn.disableLoadingIndicator(o.actionPayload,r)):i=null,i}setRemoteCaseHeaderByContext(e,r){r&&(e.headers=e.headers||{},e.headers.RemoteSystemID=r)}setTraditionalRemoteCaseParams(e,r){return e.className=r.className,e.isTraditionalRemoteCase=ae.isTraditionalRemoteCase(r.className),e.remoteClassName=r.remoteClassName,e.action=r.action,e.viewName=gS,e.gadgetId=r.gadgetId??B.getUniqueGadgetId(),e.name=r.name,e.isRemoteCase=!0,e.skipSemanticUrl=!0,Pr}},w=new Xb;var eT=class{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){let r=e.toLowerCase(),n="primary";return this.actionsTargetMap.has(r)&&(n=this.actionsTargetMap.get(r)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach(r=>{let n=e[r];n&&n.actions&&n.actions.forEach(o=>{this.actionsTargetMap.set(o.toLowerCase(),r)})})}},Vt=eT;var Ec=t=>{let{activeActionID:e,availableActions:r}=t||{};return e&&r?!!r.find(o=>o.ID===e):!1},Yt=t=>{if(B.shouldUseUnifiedHandling()&&B.isObjectCaseType(String(t?.caseTypeID))&&!Ec(t)||B.isObjectCaseType(String(t?.objectTypeID))&&!Ec(t))return!0;if(t){let{stageID:e,stages:r=[]}=t,n=r.length;for(let o=0;o<n;o+=1)if(r[o].ID===e)return r[o].transitionType==="create"&&r[o].visited_status==="active"}return!1},RU=t=>{if(t){let{stageID:e,stages:r=[]}=t,n=r.length;for(let o=0;o<n;o+=1)if(r[o].ID===e)return r[o].transitionType==="manual"}return!1},PU=t=>{if(t){let{stageID:e,stages:r=[]}=t,n=r.length;for(let o=0;o<n;o+=1)if(r[o].ID===e)return r[o].transitionType==="resolution"}return!1},mu=(t,e)=>{if(t&&e){let r=g.getIn(e,["assignments","0","assigneeInfo"],{}),{ID:n,type:o}=r;return o?.toLowerCase()==="worklist"&&n===t}return!1},kZ=(t,e)=>{if(!Array.isArray(t)||!e)throw new Error("Invalid parameters passed to getAssignmentActionID API");return t.find(r=>r.ID===e)?.actions?.[0]?.ID},NU=t=>{let{accessedOrder:e,items:r}=t;if(e&&e.length>1){let n=e[e.length-2],o=r[n],{semanticURL:i}=o;if(i)return o}return{semanticURL:""}},Ac=(t,e)=>{let r=J.getPropertyValue(E.CASE_INFO.ACTIVE_ACTION_ID,e,t),n=J.getPropertyValue(E.CASE_INFO.AVAILABLEACTIONS,e,t),o=!1;if(n&&r){let i=n.find(s=>s.ID===r);i&&(o=i.type.toLowerCase()===E.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}return t&&!n&&(o=W(t)?.context_data?.actionType===d.CASE),o},tT=t=>Wi(null,d.CASE_VIEW_MODE_PROP,t)===d.PERFORM_MODE&&(t.includes(d.WORKAREA)||t.includes(d.MODAL)||t.includes(d.ACTIONAREA)),OU=(t,e)=>tT(t)&&!Ac(t,e),xU=t=>{let e=t?.parentCaseInfo?.ID;return!!(t&&e)},LZ=(t,e,r)=>{let n,i=t?.find(s=>s.ID===e)?.actions?.filter(s=>s.ID===d.FIX_BROKEN_ASSIGNMENTS)||[];return r&&i?.length>0?n=i[0].ID:r?n=r:n=kZ(t,e),n},DU=(t,e,r,n)=>{let o;return t?o=LZ(t,e,r):n?o=n:o=P.getDefaultQualifiedName("Create"),o},wU=(t,e)=>B.shouldUseUnifiedHandling()?vo:B.isObjectCaseType(t)||e?ru:vo,rT=(t,e,r)=>{let n,o,i,s,a,c,l,u,p,m=W(t),f=m?.caseInfo?.caseTypeID||m?.objectInfo?.objectTypeID,h=B.shouldUseUnifiedHandling();return r?.isTriggeredFromDifferentContext||t.includes(d.ACTIONAREA)?(n=t.includes(d.ACTIONAREA)?void 0:m.caseInfo?.assignments?.[0]?.ID,o=m.caseInfo.ID,i=m.caseInfo.assignments,s=m.caseInfo.activeActionID,a=m.caseInfo.availableActions,c=m.caseInfo,l=m.caseInfo.businessID,u=m.caseInfo.caseTypeID,p=m.caseInfo.caseTypeName):!h&&m?.objectInfo&&B.isObjectCaseType(f)?(o=m.objectInfo.ID,s=m.objectInfo.activeActionID,a=m.objectInfo.availableActions,c=m.objectInfo,l=m.objectInfo.businessID,u=m.objectInfo.objectTypeID,p=m.objectInfo.objectTypeName):(n=e.getValue(d.getProperty(E.CASE_INFO.ASSIGNMENT_ID)),o=e.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),i=e.getValue(d.getProperty(E.CASE_INFO.ASSIGNMENTS)),s=e.getValue(d.getProperty(E.CASE_INFO.ACTIVE_ACTION_ID)),a=e.getValue(d.getProperty(E.CASE_INFO.AVAILABLEACTIONS)),c=e.getValue(d.getProperty(E.CASE_INFO.CASE_INFO)),l=e.getValue(d.getProperty(E.CASE_INFO.BUSINESS_ID)),u=e.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),p=e.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:n,caseID:o,assignments:i,localActionID:s,caseActions:a,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:p}},fu=(t,e)=>{if(Object.keys(t??{}).length>0&&e?.startsWith("http")){let r=new URL(e),n=new URLSearchParams(r.search);return Object.keys(t).forEach(o=>{n.append(o,String(t[o]))}),r.search=n.toString(),r.toString()}return e},UZ=(t,e)=>(t.forEach(r=>{r.isErrorButton===!0&&!e.some(n=>n.actionID===r.actionID)&&(e=[...e,r])}),e),KS=(t,e="case")=>{let r=t?.payload?.err?.response?.data?.displayButtonsOnErrors||[],n=t?.payload?.err?.response?.status;if(Array.isArray(r)&&r.length>0&&n===424){r.forEach(p=>{p.isErrorButton=!0});let i=t.payload.context,a=W(i)?.caseInfo?.actionButtons?.secondary||[],c=UZ(r,a),u={data:{[e==="dataObject"?E.DATA_INFO.DATA_INFO:E.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:c}}},target:te(i),context:i};T({type:Er,payload:u})}};var MU=(t,e,r,n)=>_e.getResolvedSemanticURL(t,e,r,n),jZ=(t,e)=>_e.updateSemanticURLAndDocumentTitle(t,e),zZ=()=>({ACTION_OPENWORKBYHANDLE:Kt,ACTION_SHOWDATA:Ro,ACTION_SHOWVIEW:vn,ACTION_GETOBJECT:Jr,ACTION_SHOWINSIGHT:sc,ACTION_SHOWDASHBOARD:lm}),FZ=(t,e,r=!1,n,o)=>{let i={caseClassName:t},s={[r?"objectID":"workID"]:e,...o&&{id:o}};return MU(r?Jr:Kt,i,s,n)},gu={getResolvedSemanticURL:MU,getActions:zZ,updateSemanticURLAndDocumentTitle:jZ,getSemanticURLForToaster:FZ};var Tm={CASE_INFO:`${d.DATA}.${d.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${d.DATA}.${d.CASE_INFO.CASE_TYPE_ID}`,CASE_TYPE_NAME:`${d.DATA}.${d.CASE_INFO.CASE_TYPE_NAME}`,CASE_INFO_ID:`${d.DATA}.${d.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${d.DATA}.${d.CASE_INFO.BUSINESS_ID}`},Yn=t=>g.getIn(t,d.getProperty(Tm.CASE_CLASS_NAME),d.EMPTY_STRING),VZ=t=>g.getIn(t,d.getProperty(Tm.CASE_TYPE_NAME),d.EMPTY_STRING),go=t=>g.getIn(t,d.getProperty(Tm.CASE_INFO_ID),d.EMPTY_STRING),ti=(t,e)=>{let r=go(e);g.setIn(t,"key",r)},JS=t=>g.getIn(t,d.getProperty(Tm.CASE_INFO),{}),kU=t=>{let e=JS(t);return Yt(e)&&mu(v.getOperatorIdentifier(),e)},YS=t=>{let e=De();if(!t)return!1;let r=qe(t),n=te(r),o=te(t);if(!n||!o)return!1;let i=We(n,r),s=We(o,t);if(!i||!s)return!1;let{key:a}=i,{key:c}=s;return c||(c=e?.getState().data?.[t]?.objectInfo?.ID),a&&c&&a===c},LU=(t,e)=>{let{attachmentsExist:r}=e;r&&g.setIn(t,E.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,new Date().toLocaleString()),g.setIn(t,E.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,new Date().toLocaleString())},UU=(t,e)=>{let r=Yn(t?.response),n=JS(t?.response),{caseTypeID:o}=n,i=v.getFeatureMap();(i?.deferUpdateCaseSummaryView??!Object.hasOwn(i,d.DEFER_UPDATE_CASESUMMARY_VIEW))&&o&&oT(d.CASESUMMARY_VIEW_NAME,o)&&nT(e,t?.actionInPayload,t?.response,{caseClassName:r})},ZS=t=>{let e=go(t),r=g.getIn(t,d.getProperty(Tm.BUSINESS_ID),d.EMPTY_STRING),n=e.toLowerCase().includes(r.toLowerCase())?r:e,o=Yn(t),i=VZ(t);return{businessID:r,caseType:o,resolvedURL:gu.getSemanticURLForToaster(o,n,B.isObjectCaseType(o),void 0,e),caseTypeName:i}};var BZ=(t,e)=>{let r=[t];return e.data=e.data??{},e.data.caseMessages=r,e},jU=t=>Ve.getNeedsMapping()||t?.info===E.OBJECT_INFO.OBJECT_INFO?E.OBJECT_INFO.OBJECT_INFO:E.CASE_INFO.CASE_INFO,hu=(t,e)=>{let r=jU(e);t.data=t.data??{};let{assignments:n,availableActions:o=[]}=t.data[r]??{};n&&Array.isArray(n)&&n.length>0&&n[0].actions&&Array.isArray(n[0].actions)&&!e?.stopMergeActions&&(n[0].actions.forEach(s=>{(s.type==="Assignment"||s.type==="LocalAction")&&o.push(s)}),t.data[r]=t.data[r]??{},t.data[r].availableActions=o)},Le=(t,e)=>{let r=jU(e),n=vm();if(t.confirmationLinks&&(t.data=t.data??{},t.data[r]=t.data[r]??{},t.data[r].confirmationLinks=t.confirmationLinks),!t.uiResources&&t.confirmationNote){let l=t,{confirmationNote:u}=l;return n!==void 0&&!n&&hu(l),l=BZ(u,l),l}if(!t.uiResources||!t.data||!t?.uiResources?.root)return t;let o=t,{uiResources:{actionButtons:i,navigation:s,settings:a},nextAssignmentInfo:c}=o;if(i&&i.main&&(i.main=i.main.map(l=>l.jsAction==="createWork"?{...l,jsAction:"createCase"}:l)),o.data&&o.data[r]&&(i&&(o.data[r].actionButtons=i),s&&(o.data[r].navigation=s),a&&(o.data[r].settings=a),e&&e[E.ACTIONS.DELETEAVIALACTIONS]&&delete o.data[r].availableActions,n!==void 0&&!n&&hu(o,e),t.confirmationNote)){let{confirmationNote:l}=o,u=[l];o.data.caseMessages=u}return e&&e.isCreateDataObject&&(o.data=o.data??{},o.data.dataInfo={},o.data.dataInfo.content=o.data.pyPortal,o.uiResources.root.config.context="dataInfo.content",o.uiResources.context_data.dataInfo=o.uiResources.context_data.dataInfo??{},o.uiResources.context_data.dataInfo.content=o.uiResources.context_data.dataInfo.content??{},o.uiResources.context_data.dataInfo.content=o.uiResources.context_data?.pyPortal,delete o.data.pyPortal,delete o.key),c&&(o.data=o.data??{},o.data.nextAssignmentInfo=c),o};var iT=class{c11nEnv;constructor(e){this.c11nEnv=e}buildRemoteCaseHeaders(e,r){let n={};if(e){let o=ae.getRemoteCaseClassBySourceClass(e)??e;ae.injectRemoteCaseHeader(n,{caseTypeID:o},r)}return n}async getCaseStages(e,r,n){let o={caseID:e},{restApi:i,reqType:s}=U(Nk,o),{caseTypeID:a}=n||{},c=this.buildRemoteCaseHeaders(a,r);return(await k(i,{method:s,headers:c},r)).data.stages}async getCaseActions(e,r,n){let o={caseID:e},{restApi:i,reqType:s}=U(Ok,o),{caseTypeID:a}=n||{},c=this.buildRemoteCaseHeaders(a,r);return(await k(i,{method:s,headers:c},r)).data}getCaseTypeName(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(d.OBJECT_INFO.OBJECT_INFO_ID)}getID(){let e=this.getKey();if(e){let[,r]=e.split(" ");return r||e}}getAssignmentID(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.PARENTCASEINFO))}getParentCases(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.PARENTCASES))}isPerform(){return this.c11nEnv.getValue(`${d.CONTEXT_DATA}${d.CASE_VIEW_MODE_PROP}`)===d.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${d.CONTEXT_DATA}${d.CASE_VIEW_MODE_PROP}`)===d.REVIEW_MODE}isAssignmentInCreateStage(){let e=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO));return Yt(e)}isReviewAfterCreateStage(){if(!this.isReview())return!1;let e=this.c11nEnv.getContextName(),r=wo(e)[0];if(!r)return!1;let n=De()?.getState().data[r]?.caseInfo?.stages;return Array.isArray(n)?[...n].reverse().find(i=>typeof i!="object"||i===null||!("visited_status"in i)||!("transitionType"in i)?!1:i.visited_status==="completed")?.transitionType==="create":!1}isLocalAction(){let e=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO));return Ec(e)}getCurrentAssignmentViewName(){let e=this.c11nEnv.getValue("context_data.caseViewMode"),r=null,n=!1;if(e===d.PERFORM_MODE){if(this.isLocalAction())return r;if(this.isAssignmentInCreateStage())n=!0;else{let o=this.c11nEnv.getTarget(),i=this.c11nEnv.getContextName(),s=We(o,i),{config:a}=o&&i?s&&s.view:this.c11nEnv.getMetadata();r=a?.type===d.VIEW?a?.name:null}(r&&r.startsWith(d.PROPERTY_ANNOTATION)||n)&&(r=this.c11nEnv.getValue(P.getQualifiedNameForComplexRuleReferences(d.getProperty(d.CASE_INFO.VIEW_NAME))))}return r}getValueByPath(e,r){r=r.replace("@P ","").trim();let n=e;if(r.includes(P.getDefaultQualifiedName("pyViewContext"))){let i=e.caseInfo?.content??{},s=i[P.getDefaultQualifiedName("pyViewContext")];if(!s)return n.caseInfo.content;if(typeof s=="string"&&s.includes("(")&&s.includes(")")){let a=s.substring(1,s.indexOf("(")),c=parseInt(s.substring(s.indexOf("(")+1,s.indexOf(")")),10)-1;if(Array.isArray(i[a]))return i[a][c];let l=a.split(".").reduce((u,p)=>u?.[p],i);if(Array.isArray(l))return l[c]}}let o=r.split(/[.[\]]/).filter(i=>i);for(let i of o)if(typeof n=="object"&&n!==null&&i in n)n=n[i];else if(Array.isArray(n)&&!Number.isNaN(Number(i)))n=n[parseInt(i,10)-1];else return;return n}getCurrentAssignmentViewClassName(){let e=this.c11nEnv.getTarget(),r=this.c11nEnv.getContextName(),n=We(e,r),{config:o}=e&&r&&n?n.view:this.c11nEnv.getMetadata(),i=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO)),s=o?.type===d.VIEW?o.context:null;if(s){let a=this.getValueByPath({caseInfo:i},s);if(typeof a=="object"&&a!==null&&"classID"in a)return a.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(d.getProperty(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(d.getProperty(d.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));let r=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ACTIVE_ACTION_ID)),n=qe(this.c11nEnv.getContextName()),o;n&&(o=W(n));let i=o?.caseInfo?.availableActions,a=W(this.c11nEnv.getContextName())?.caseInfo?.refreshConditions;if(r){if(i){let c=i.find(l=>l.ID===r);return c?c.refreshConditions:a}return a}return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{let e=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ACTIVE_ACTION_ID)),r=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO_ACTIONS));return r&&e?r.find(o=>o.ID===e)?.type==="Case":!1};getAllAssignments(){let e=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO_ACTIONS)),r=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],o=this.getChildAssignments()||[],i=JSON.parse(JSON.stringify(o));i=i.map(c=>(c.isChild=!0,c));let s=[...n,...i],a=JSON.parse(JSON.stringify(s));return e&&!this.isPerform()&&(a=a.map(c=>(c.name=this.getActiveCaseActionName()||c?.name||r,c))),a}getActiveCaseActionName(){let e=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO_ACTIONS)),r=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.ACTIVE_ACTION_ID));return e.find(o=>o.ID===r)?.name||""}getFirstCaseActionName(){return this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_INFO_ACTIONS))[0]?.name||""}hasAssignments(){let e=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),r=this.getChildAssignments();return!!(e||r||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){let e=this.c11nEnv.getValue(d.OBJECT_INFO.OBJECT_INFO);return Ec(e)}getCaseCollaborators=(e=!0)=>{let r=this.c11nEnv.getValue(d.CASE_INFO.CASE_INFO_COLLABORATORS)||[];if(e){let n=v.getOperatorIdentifier();return r.filter(o=>o.ID!==n)}return r}},QS=iT;var XS=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,t)},eE=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,t)},tE=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,t),$.publish(d.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,t)},zU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,t)},FU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,t)},VU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,t)},BU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,t)},HU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,t)},Ki=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,t)},yu=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,t)},GU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_CASE_MODAL_OPEN,t)},qU=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_CASE_MODAL_CLOSE,t)},Rm=t=>{$.publish(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,t)},Su=t=>{$.publish(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,t)};var Cc={CASE_INFO:`${d.DATA}.${d.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${d.DATA}.${d.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${d.DATA}.${d.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${d.DATA}.${d.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${d.DATA}.${d.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${d.DATA}.${d.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${d.DATA}.${d.CASE_INFO.ASSIGNMENT_ID}`,BUSINESS_ID:`${d.DATA}.${d.CASE_INFO.BUSINESS_ID}`},Lt=(t,e)=>{let{vcName:r,containerName:n}=e;return n||r||Vt.getTargetViewContainerName(t)},Lr=t=>{let e=t.lastIndexOf(d.FORWARD_SLASH_STRING)+1,r=t.lastIndexOf(d.UNDERSCORE_STRING);return t.substring(e,r)},sT=t=>t===ge.WORKAREA,en=t=>t===ge.MODAL,rE=t=>t===nr,WU=t=>g.getIn(t,Cc.NEXT_ASSIGNMENT_INFO_ID,d.EMPTY_STRING),Je=t=>t===Te,_c=t=>t&&t.find(e=>e.type===Te),Ji=t=>g.getIn(t,Cc.CASE_INFO,{}),HZ=t=>{let e=g.getIn(t,Cc.ASSIGNMENTS,[]);return e&&e.length>0},er=t=>t?t.split(" ").pop():void 0,On=t=>g.getIn(t,Cc.CASE_CLASS_NAME,d.EMPTY_STRING),nE=(t,e=!1)=>{let r=e?JS(t):Ji(t);return Yt(r)&&mu(v.getOperatorIdentifier(),r)},Bt=t=>g.getIn(t,Cc.CASE_INFO_ID,d.EMPTY_STRING),KU=t=>g.getIn(t,Cc.BUSINESS_ID,d.EMPTY_STRING);var aT=t=>g.getIn(t,Cc.CASE_FIRST_ASSIGNMENT_ID,d.EMPTY_STRING),ri=(t,e)=>{let{removeActionPayload:r,target:n}=e;if(r&&r.containerItemID){let{containerItemID:o,context:i}=r;t.push(V(Qe,{containerItemID:o,context:i||pe(o),target:n}))}},cT=t=>{let e=t.context;if(B.shouldUseUnifiedHandling()){let n=te(e),{accessedOrder:o=[],type:i}=ut(n),a={newAccessedOrder:o.filter(c=>c!==e),containerType:i};T(Qe({containerItemID:e,context:e,target:n,containerInfo:a}))}else ta(e,{skipDirtyCheck:!0})},$r=t=>{let e=De();if(!t)return!1;let r=qe(t),n=te(r),o=te(t);if(!n||!o)return!1;let i=We(n,r),s=We(o,t);if(!i||!s)return!1;let{key:a}=i||{},{key:c}=s||{};return c||(c=e?.getState().data?.[t]?.caseInfo?.ID),a&&c&&a===c},JU=t=>{let e=De();if(!t)return!1;let r=qe(t),n=te(r),o=te(t);if(!n||!o)return!1;let i=We(n,r),s=We(o,t);if(!i||!s)return!1;let{key:a}=i,{key:c}=s;return c||(c=e?.getState().data?.[t]?.caseInfo?.ID),!!(a&&c&&a!==c)},xn=(t,e,r={})=>{let{skipFlowNameUpdate:n}=r,o=Bt(e);g.setIn(t,"key",o);let i=Yt(Ji(e));if(!n&&HZ(e)){let s=aT(e),[,a]=s.split("!");VU({assignmentID:s,isInCreateStage:i}),g.setIn(t,"flowName",a)}},oE=(t,e)=>{let{attachmentsExist:r}=e;r&&g.setIn(t,E.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,new Date().toLocaleString()),g.setIn(t,E.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,new Date().toLocaleString())},mt=(t,e,r)=>{let n=d.PROMISE_VALUE.RESOLVE;return _c(t)?(n=d.PROMISE_VALUE.REJECT,r?w.rejectActionByID(e,!0,r):w.rejectActionByID(e)):w.resolveActionByID(e),n},Dn=t=>t?v.getCaseTypeList().filter(r=>r.pyWorkTypeImplementationClassName===t)?.[0]?.pyIsTraditionalUICase==="true":!1,Qs=()=>v?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal==="true",nT=(t,e,r,n)=>{let{containerItemID:o,context:i,isCaseWideAction:s}=e;if(o){let{caseClassName:a,skipAssignmentsUpdate:c}=n,l=qe(o),u=te(l),p=u&&ut(u),m=u&&se(u),f=tb(l),h=r?.data?.caseInfo?.ID,S=m&&p?.items?.[m]?.key===e?.caseID,C=(i??o).includes(ge.MODAL)&&l?.includes(ge.MODAL)&&s;S&&!C&&t.push(V(Pm,{containerItemID:l,context:l,container:f,containerName:f,caseId:h,viewName:d.getDefaultQualifiedName(E.CASESUMMARY_VIEW_NAME),updateData:!0,viewLoadingContainer:{context:l},caseClassName:a,...c!==void 0&&{skipAssignmentsUpdate:c}}))}},GZ=async(t,e)=>{let{containerItemID:r,caseID:n}=e;if(r){let o=qe(r),i=te(o),s=i&&ut(i),a=i&&se(i);a&&s?.items?.[a]?.key===n&&T(V(Re,{context:o,...t}))}},qZ=async(t,e)=>{let{context:r,containerItemID:n,shouldUpdateCaseActionsInParentContext:o}=t,i=e?.data?.caseInfo?.ID?Bt(e):void 0;if(!r||!i)return;let s=i?`${i}_actionsLoading`:"actionsLoading";try{let a=new ea({}),c=new QS(a);pt.setComponentCache(s,!0);let l=e?.data?.caseInfo?.caseTypeID?On(e):void 0,u=await c.getCaseActions(i,r,{caseTypeID:l});hu(e);let p=g.getIn(e.data,d.getProperty(d.CASE_INFO.CASE_INFO_ACTIONS)),m=Array.isArray(u?.availableProcesses)&&u.availableProcesses.length>0?{availableProcesses:u.availableProcesses}:[],f=Array.isArray(u?.availableActions)?u.availableActions:[],h=["pyUpdateCaseDetails"],S=f.find(C=>h.includes(C.ID)),A={data:{caseInfo:{availableActions:[...f,...p!==void 0?p:[]],...m,editActions:S?[S]:[]}}};pt.setComponentCache(s,!1),T(V(Re,{context:r,...A})),o===!0&&n&&GZ(A,t)}catch(a){pt.setComponentCache(s,!1),console.error("Error fetching case actions:",a)}},Xs=(t,e)=>{let r=On(t?.response),n=Ji(t?.response),{caseTypeID:o}=n,i=v.getFeatureMap();(i?.deferUpdateCaseSummaryView??!Object.hasOwn(i,d.DEFER_UPDATE_CASESUMMARY_VIEW))&&o&&nT(e,t?.actionInPayload,t?.response,{caseClassName:r,skipAssignmentsUpdate:!t?.actionInPayload?.context?.includes(d.PREVIEW)})},vm=()=>v.isOptimizedCaseLoadingEnabled(),dr=(t,e)=>{vm()&&qZ(e,t)};var wn=t=>W(t)?.context_data?.caseViewMode,YU=(t,e)=>{let r=Bt(e),n=At(Kt,{caseClassName:On(e)},{id:r});n=n?.replace("{workID}",String(er(r))).replace("{id}",String(er(r))),qi({directUrlUpdation:!0,semanticURL:n,options:{}})},Eu=t=>pt.getComponentCache("redirectionInProgress")?(t&&mt([],t),!0):!1;var lT=class t{context;static _instance;constructor(e){t._instance=this,this.context=`${e}/${d.SUGGESTION}`,De()?.getState().data?.[this.context]||T({type:Jl,payload:{context:this.context,data:{}}})}getField(e){return oe(e,"",this.context)}setField(e,r){T({type:bt,payload:{reference:e,value:r,context:this.context}})}removeField(e,r={}){T({type:Wl,payload:{reference:e,context:this.context,...r}}),$.publish(d.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...r})}setState(e){T(Re({context:this.context,data:e,isArrayDeepMerge:!0}))}},ZU=lT;var WZ="getListData",KZ="getData",QU="getDataViewMetadata",XU="getListDataCount",e2="postDataViewMetadata",t2="moveListRecords",r2="readDataObject",JZ=(t,e,r,n={})=>{let o={dataViewName:t},{skipClearErrorMessages:i,signal:s,doNotMergeMessagesForStatusCode:a}=n;if(_t())return pr(KZ,{queryPayload:o,body:e,headers:ra({body:e},r)},s);let{restApi:c,reqType:l}=U(WZ,o);return k(c,{method:l,body:e,...s&&{signal:s},...i&&{skipClearErrorMessages:i}},r,a)},YZ=(t,e,r,n,o={})=>{let{skipClearErrorMessages:i,signal:s,doNotMergeMessagesForStatusCode:a}=o,c={data_view_ID:t,view_ID:e},l={dataViewParameters:r};if(_t())return pr(r2,{queryPayload:c,body:l,headers:ra({body:l},n)},s);let{restApi:u,reqType:p}=U(r2,c);return k(u,{method:p,body:l,...s&&{signal:s},...i&&{skipClearErrorMessages:i}},n,a)},ZZ=(t,e,r)=>{let n={dataViewName:t};if(_t())return pr(XU,{queryPayload:n,body:e,headers:ra({body:e},r)});let{restApi:o,reqType:i}=U(XU,n);return k(o,{method:i,body:e},r)},QZ=(t,e,r,n)=>JZ(t,e,r,n),XZ=(t,e,r,n)=>{let o=!!r,i=!!n,s=_e.doesRestApiExist(e2),a=(o||i)&&s?e2:QU,c={dataViewName:t};if(_t()){let p=r||n?{associationFilter:r,propertyFilter:n}:void 0;return pr(QU,{queryPayload:c,body:p,headers:ra({body:p},e)})}let{restApi:l,reqType:u}=U(a,c);if(s){if(o)return k(l,{method:u,body:{associationFilter:r}},e);if(i)return k(l,{method:u,body:{propertyFilter:n}},e)}return k(l,{method:u},e)},eQ=(t,e)=>B.getCaseEditMetadata(t,e),tQ=(t,e)=>B.getCaseEditLock(t,e),rQ=(t,e,r,n)=>B.updateCaseEditFieldsData(t,e,r,n),nQ=(t,e)=>{let{sourceID:r,destinationID:n,context:o,listClass:i,viewName:s,viewClassName:a}=t,c={viewName:s,viewClassName:a},l={content:{sourceID:r,destinationID:n,context:o,listClass:i}};if(_t())return pr(t2,{queryPayload:c,body:l,headers:ra({body:l},e)});let{restApi:u,reqType:p}=U(t2,c);return k(u,{method:p,body:l},e)},oQ=(t,e,r="")=>{if(e){if(t&&r===d.RELOAD_IF_OLDER_THAN)return new Date(t).setSeconds(e)<Date.now();if(t&&r===d.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},iQ=t=>Ke("root").find(r=>r.includes("authoring-preview"))!==void 0?`${d.AUTHORING_PREVIEW_CONTAINER}-${t}`:`${Be.getAppAlias()}-${t}`,sQ=t=>{let e=v.getKeyMapping(P.getDefaultQualifiedName("pyGUID"));return!t.some(r=>r.field===e)},or={getData:QZ,getListCount:ZZ,getDataViewMetadata:XZ,getDataObjectView:YZ,getCaseEditMetadata:eQ,getCaseEditLock:tQ,updateCaseEditFieldsData:rQ,moveListRecords:nQ,isTimeElapsed:oQ,getAppCacheKey:iQ,isDistinctResultsOnly:sQ};var aQ=/{(.*?)}/i,Ic=/{(.*?)}/g,$o=t=>t.match(aQ)!==null,ni=t=>(t&&(t.startsWith("/")&&(t=t.substring(1,t.length)),t.endsWith("/")&&(t=t.substring(0,t.length-1))),t),n2=t=>{let e=t[t.length-1],r=t[t.length-2];if(e.toLowerCase()!=="y")return`${t}s`;switch(r.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${t}s`;default:return t=t.substring(0,t.length-1),`${t}ies`}},o2=t=>/\d/.test(t),i2=t=>{let e=t.split(" ");return e=e.map(r=>r.charAt(0).toUpperCase()+r.slice(1)),e.join(" ")},s2=t=>t.toString().includes("portal="),bc=t=>t.replaceAll("+","%20"),a2=t=>{let e=/(?=[A-Z][a-z])/g,r=t.replace(e,"-").toLowerCase();return r.startsWith("-")?r.substring(1):r};var cQ=["portal","noPortal","debug","activeTab","contextParam","lang"],iE=t=>{if(t.indexOf("?")>0){let[e,r]=t.split("?"),n=new URLSearchParams(r),o=new Map;for(let[s,a]of n)cQ.includes(s)||o.set(s,a);let i=bc(new URLSearchParams(Array.from(o.entries())).toString());return i?`${e}?${i}`:e}return t},lQ=(t,e)=>{let r=t.split("/"),n=r.indexOf("assignments"),o=r.slice(n-2).join("/"),i=r[r.length-1],s=Tc(qn,{assignmentID:i});return{routeEndpoint:s?.restApi,requestType:s?.reqType,payload:{assignmentID:i},options:e,routeKey:zs,urlPath:o}},c2=(t,e)=>t.includes("/assignments")?lQ(t,e):_e.getEndPointInfo(t),Yi=()=>v.environmentInfoObject?.pyExecutionRuntimeName==="Infinity";var uT=class{filter;messageHandler;contextName;constructor(e,r,n){this.filter=e,this.messageHandler=r,this.contextName=n}},l2=uT;var dT=class{users;connected;connectionsCount;constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){let{state:r,updateById:n}=e,o=this.users[n];o&&(o.state=r,Object.keys(o.subscribers).forEach(i=>{o.subscribers[i]?.callback({state:o.state})}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,r,n){let o=this._getAutoGenId(),i=this.users[e];if(i)return i.subscribers[o]={callback:r,contextName:n},o;this.users[e]={subscribers:{[o]:{callback:r,contextName:n}}};let s={matcher:"PRESENCE",criteria:{userId:e}};return Tt.subscribe(s,this._handleUserPresence.bind(this)),o}unsubscribe(e,r){let n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[r],Object.keys(this.users[e].subscribers).length===0&&(delete this.users[e],Tt.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach(r=>{Object.keys(this.users[r].subscribers).forEach(n=>{this.users[r].subscribers[n].contextName===e&&this.unsubscribe(r,n)})})}},u2=dT;function uQ(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}var d2=uQ;function dQ(t){return t!==t}var p2=dQ;function pQ(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}var m2=pQ;function mQ(t,e,r){return e===e?m2(t,e,r):d2(t,p2,r)}var f2=mQ;function fQ(t,e){var r=t==null?0:t.length;return!!r&&f2(t,e,0)>-1}var g2=fQ;function gQ(t,e,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}var h2=gQ;var hQ=200;function yQ(t,e,r,n){var o=-1,i=g2,s=!0,a=t.length,c=[],l=e.length;if(!a)return c;r&&(e=Uy(e,Ny(r))),n?(i=h2,s=!1):e.length>=hQ&&(i=vy,s=!1,e=new Ty(e));e:for(;++o<a;){var u=t[o],p=r==null?u:r(u);if(u=n||u!==0?u:0,s&&p===p){for(var m=l;m--;)if(e[m]===p)continue e;c.push(u)}else i(e,p,n)||c.push(u)}return c}var y2=yQ;var S2=un?un.isConcatSpreadable:void 0;function SQ(t){return cr(t)||bo(t)||!!(S2&&t&&t[S2])}var E2=SQ;function A2(t,e,r,n,o){var i=-1,s=t.length;for(r||(r=E2),o||(o=[]);++i<s;){var a=t[i];e>0&&r(a)?e>1?A2(a,e-1,r,n,o):Py(o,a):n||(o[o.length]=a)}return o}var C2=A2;var EQ=Gy(function(t,e){return am(t)?y2(t,C2(e,1,am,!0)):[]}),_2=EQ;var pT=class{atomicSubscribers;connectionsCount;connected;matcher;criteria;messagingServiceSubscriptionID;constructor(e,r){this.atomicSubscribers={},this.connectionsCount=0,this.connected=!1,this.matcher=e,this.criteria=r,this.messagingServiceSubscriptionID=""}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach(r=>{let n=this.atomicSubscribers[r];if(!n)return;let o=Object.keys(n.criteria),i=Object.keys(e);_2(o,i).length===0&&n.callback(e)})}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,r){let n=this._getAutoGenId();if(!this.messagingServiceSubscriptionID){this.messagingServiceSubscriptionID=n;let o={matcher:this.matcher,criteria:this.criteria},i=Tt.subscribe(o,this._handleAtomicMessage.bind(this),void 0,n);this.messagingServiceSubscriptionID=i||n,this.connected=!0}return this.atomicSubscribers[n]={criteria:e,callback:r},n}unsubscribe(e){delete this.atomicSubscribers[e],Object.keys(this.atomicSubscribers).length===0&&(this.connected=!1,this.messagingServiceSubscriptionID&&(Tt.unsubscribe(this.messagingServiceSubscriptionID),this.messagingServiceSubscriptionID=""))}},I2=pT;var mT=class{subscriptions;constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){let r={caseId:e};this.subscriptions[e]=new I2("CASE",r)}return this.subscriptions[e]}},b2=new mT;var fT=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){let r=e.split("."),n=r.pop()||"";return{pageReference:r.join("."),propertyName:n}}static getContextPath(e){return e.includes("workarea")?e:Ar(`${e}/workarea`)||""}static publishCaseValuesUpdate(e,r){let n=this.getContextPath(r.actionInContext);Object.entries(e.message).forEach(([o,i])=>{let s=this.transformReference(o),{pageReference:a,propertyName:c}=this.extractReferenceParts(s);o.match(/\.\w+\[\d+\]\.\w+/)&&ke.executeStateMachine(n,s,i,!0,{skipStateUpdate:!0}),T([{type:bt,payload:{reference:s,value:i,context:n}},{type:Tn,payload:{reference:s,value:i,context:n,pageReference:a,propertyName:c}}])})}},T2=fT;var{RESOURCE_TYPES:gT}=E,hT=class{static openCase(e,r,n,o={}){let i={insKey:e,acTargetName:n,actionMgrID:w.getNextActionMgrId(),context:r,...o},s=Go;o&&o.channelName?i.headers={[d.X_ORIGIN_CHANNEL]:o.channelName}:v.isWSSPortal()&&(i.headers={[d.X_ORIGIN_CHANNEL]:"WSS"});let{promise:a}=w.actionManagerPromise(s,i.actionMgrID);return T({type:s,payload:i}),a}static openAssignment(e,r,n,o={}){let i={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:w.getNextActionMgrId(),context:r,...o},s=$i;o&&o.channelName?i.headers={[d.X_ORIGIN_CHANNEL]:o.channelName}:v.isWSSPortal()&&(i.headers={[d.X_ORIGIN_CHANNEL]:"WSS"});let{promise:a}=w.actionManagerPromise(s,i.actionMgrID);return T({type:s,payload:{...i}}),a}static createCase(e,r,n,o={}){let i=ql,s={class:e,acTargetName:n,actionMgrID:w.getNextActionMgrId(),context:r,...o};o&&o.channelName?s.headers={[d.X_ORIGIN_CHANNEL]:o.channelName}:v.isWSSPortal()&&(s.headers={[d.X_ORIGIN_CHANNEL]:"WSS"});let{promise:a}=w.actionManagerPromise(i,s.actionMgrID);return T({type:i,payload:{...s}}),a}static getNextWork(e,r,n={}){let o=$i,i={isGetNextWork:!0,vcName:r,doDeleteCaseSummary:!0,actionMgrID:w.getNextActionMgrId(),context:e,...n},{promise:s}=w.actionManagerPromise(o,i.actionMgrID);return T({type:o,payload:{...i}}),s}static getOpenedCaseItems(e){let r=[],n=ut(e);if(n){let{items:o={}}=n,i=Object.keys(o),s=se(e);i.forEach(a=>{if(o[a]&&(o[a].resourceType===gT.CASE||o[a].resourceType===gT.ASSIGNMENT||o[a].resourceType===gT.OBJECT)){let{key:c="",context:l}=o[a],u=o[a],p=c.substring(c.indexOf(" ")+1),m=oe(".caseTypeID",d.CASE_INFO.CASE_INFO,l),f=s===a;r.push({...u,key:c,workID:c,caseID:p,className:m,context:l,containerItemID:a,target:e,active:f})}})}return r}static getCaseDetails=(e,r,n)=>{if(!e)return Promise.reject(new Error("Case ID is required"));let o={caseID:e,viewType:n?.viewType},{restApi:i,reqType:s}=U(Kt,o),a={},c=ae.getRemoteHeaderFromSourceClass(r??"");return c&&(a.RemoteSystemID=c),k(i,{method:s,headers:a})};static getCaseBulkActions=async e=>{let{restApi:r,reqType:n}=U(Mk),o=e.map(p=>({ID:p})),i=o.length,s=i/5,a={},c=[];for(let p=0;p<i;p+=s)a.cases=o.slice(p,p+s),a.cases.length&&c.push(k(r,{method:n,body:a}));let l=await Promise.all(c),u=[];for(let p=0;p<l.length;p+=1)p===0?u=l[p].data.availableActions:u.length&&(u=u.filter(m=>l[p].data.availableActions.some(f=>m.ID===f.ID)));return u};static getCaseBulkActionsByCaseTypeID=async e=>{let r={casetypeID:e},{restApi:n,reqType:o}=U(Lk,r),i=await k(n,{method:o}),s=[];return i.data?.availableActions?.length&&(s=i.data.availableActions),s};static getAssignmentBulkActions=async e=>{let{restApi:r,reqType:n}=U(kk),o={assignments:e.map(s=>({ID:s}))};return(await k(r,{method:n,body:o})).data?.availableActions??[]}},fn=hT;var yT=class{static CLOSE_CONTAINER_ITEM_EVENT=E.PUB_SUB_EVENTS.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM;static objectRedirectionSubIds={};static truncateNamespace(e){let r=e;return!P.isNamespaceEnabled()&&e&&e.includes("__")&&(r=e.substring(e.indexOf("__")+2)),r}static handleOpenObject(e){let{ObjectID:r}=e,n;({ActionName:n}=e),n=this.truncateNamespace(n);let o=pt.getComponentCache("lastActionID")||"";if(typeof o=="string"&&o?.toLowerCase()!==n?.toLowerCase())return;let i=!1,s=se("app/modal");s&&(i=We("app/modal",s)?.isMinimizable??!1),!s||i?fn.openCase(r,d.APP.APP,d.PRIMARY,{isAutoRedirection:!0}):$.subscribe(this.CLOSE_CONTAINER_ITEM_EVENT,a=>{a?.containerItemID===s&&($.unsubscribe(this.CLOSE_CONTAINER_ITEM_EVENT,"closeContainerItemForRedirection"),fn.openCase(r,d.APP.APP,d.PRIMARY,{isAutoRedirection:!0}))},"closeContainerItemForRedirection",!0)}static handleRefreshObject(e){fn.openCase(e,d.APP.APP,d.PRIMARY,{forceRefresh:!0})}static handleObjectRedirection(e,r){let{message:n,filter:o}=e,{caseId:i,currUserID:s}=r;if(o?.criteria?.CurrentObjectID!==i||o?.criteria?.UserID?.toLowerCase()!==s?.toLowerCase())return;let{RedirectionType:a}=n||{};switch(a){case"OpenObject":this.handleOpenObject(n);break;case"RefreshObject":this.handleRefreshObject(i);break;default:break}}static subscribeToRedirection(e){let r=v.getOperatorIdentifier()||"",n={matcher:"REDIRECTION",criteria:{CurrentObjectID:e,UserID:r?.toLowerCase()}},o=Tt.subscribe(n,i=>{this.handleObjectRedirection(i,{caseId:e,currUserID:r})});this.objectRedirectionSubIds[e]=o}static unsubscribeToRedirection(e){Tt.unsubscribe(this.objectRedirectionSubIds[e]),delete this.objectRedirectionSubIds[e]}static subscribeToEvent(e,r){let n=null;if(e===d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?n=o=>{let{caseId:i}=o;this.objectRedirectionSubIds[i]||this.subscribeToRedirection(i)}:e===d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(n=o=>{let{caseId:i}=o;this.objectRedirectionSubIds[i]&&this.unsubscribeToRedirection(i)}),n)$.subscribe(e,n,r);else throw new Error(`Unhandled eventKey: ${e}`)}static unsubscribeToEvent(e,r){$.unsubscribe(e,r)}static subscribeToCaseEvents(){this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}static unsubscribeToCaseEvents(){this.unsubscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.unsubscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}},vc=yT;var v2=100,AQ=3e3,R2=20,P2=t=>{if(typeof t=="number")return Number.isFinite(t)?t:void 0;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:void 0}},CQ=()=>{let t=v.getFeatureMap()?.pyMessageSequencingDelayInMS;if(typeof t!="number"&&typeof t!="string")return v2;let e=Number(t);return Number.isFinite(e)&&e>0&&e<=AQ?e:v2},ST=class t{streams=new Map;arrivalCounter=0;enqueue(e,r,n){let{sequenceStreamId:o}=e,i={sequenceNumber:P2(e.sequenceNumber),timestamp:P2(e.timestamp),arrival:this.arrivalCounter,data:r};this.arrivalCounter+=1;let s=this.streams.get(o);if(s){s.entries.push(i),s.entries.length>=R2&&(console.warn(`SequencingBuffer: stream "${o}" reached ${R2} held messages; delivering now, later messages may arrive out of order`),this.flushStream(o));return}this.streams.set(o,{entries:[i],dispatch:n,timer:setTimeout(()=>this.flushStream(o),CQ())})}flushAll(){Array.from(this.streams.keys()).forEach(e=>this.flushStream(e))}flushStream(e){let r=this.streams.get(e);r&&(clearTimeout(r.timer),this.streams.delete(e),t.sortEntries(e,r.entries),r.entries.forEach(n=>{try{r.dispatch(n.data)}catch(o){console.error(`SequencingBuffer: delivering a message of stream "${e}" failed`,o)}}))}static sortEntries(e,r){if(r.every(n=>n.sequenceNumber!==void 0)){r.sort(t.compareBySequenceNumber);return}if(r.every(n=>n.timestamp!==void 0)){r.sort(t.compareByTimestamp);return}console.warn(`SequencingBuffer: stream "${e}" delivered in receiving order because ${t.describeViolation(r)}`)}static describeViolation(e){return e.some(n=>n.sequenceNumber===void 0&&n.timestamp===void 0)?"a message has no ordering key":"messages mix sequenceNumber-only and timestamp-only ordering keys"}static compareBySequenceNumber(e,r){return e.sequenceNumber!==r.sequenceNumber?(e.sequenceNumber??0)-(r.sequenceNumber??0):e.timestamp!==r.timestamp?e.timestamp===void 0?1:r.timestamp===void 0?-1:e.timestamp-r.timestamp:e.arrival-r.arrival}static compareByTimestamp(e,r){return e.timestamp!==r.timestamp?(e.timestamp??0)-(r.timestamp??0):e.arrival-r.arrival}},Nm=new ST;var _Q=t=>!!t?.filter;function xm(t){return typeof t=="object"&&t!==null}var N2="case_load_for_realtime_update",O2="case_unload_for_realtime_update";function IQ(t,e){return t==="CASE"&&e.message?.subfilter?.toLowerCase()==="fieldupdate"}function Om(t){return typeof t=="string"&&t!==""}function bQ(t){let r=(Array.isArray(t)?t:[]).map(n=>xm(n)?n.Id:void 0);return new Set(r.filter(n=>typeof n=="string"))}function sE(t){return xm(t)&&!Array.isArray(t)}function x2(t){return Array.isArray(t)?"array":sE(t)?"object":"value"}function TQ(t){if(!xm(t))return{};let{fields:e}=t;return sE(e)?e:{}}function D2(t){return`.${t.join(".")}`}function vQ(t,e,r,n){let o=t.exists&&typeof t.value==typeof e&&Object.is(t.value,e);return n.has(D2(r))&&!o}function w2(t,e,r,n=[]){let o={},i=new Set;return Object.entries(e).forEach(([s,a])=>{let c=[...n,s];if(!sE(t)||!Object.prototype.hasOwnProperty.call(t,s))return;let l={exists:!0,value:t[s]};if(!(Array.isArray(a)||x2(l.value)!==x2(a))){if(sE(a)){let u=w2(l.value,a,r,c);Object.keys(u.fields).length>0&&(o[s]=u.fields,u.changedPaths.forEach(p=>i.add(p)));return}vQ(l,a,c,r)&&(o[s]=a,i.add(D2(c)))}}),{fields:o,changedPaths:i}}var ET=class t{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new u2;static refreshB2SOffset=10;static tokenExpiryTime;static socketUUID=null;static reInitInterval;static agentSubscribeIdMap=new Map;static filterKeyToSubscriberIdMap=new Map;static caseEntriesByFilterKey=new Map;static get offlineEnabled(){return typeof navigator<"u"&&(navigator.userAgent||"").includes("pxUsesOffline")}static isAuthenticated=!1;static boundHandleOnOpen;static boundHandleOnMessage;static boundHandleOnError;static boundHandleOnClose;static initConnection(e){if(!e)return;let{messagingService:r}=e;if(!r||r&&r.length<=6)return;let n=Be.b2sJWT;if(!n||n.length<4||typeof globalThis.WebSocket!="function")return;this.webSocket&&(Nm.flushAll(),this.webSocket.close(),this.cleanSocketListeners());let o=r.endsWith("/")?r+"ws":r+"/ws";try{let i=new globalThis.WebSocket(`${o}`);this.webSocket=i,this.boundHandleOnOpen=this.handleOnOpen.bind(this),this.boundHandleOnMessage=this.handleOnMessage.bind(this),this.boundHandleOnError=this.handleOnError.bind(this),this.boundHandleOnClose=this.handleOnClose.bind(this),i.addEventListener("open",this.boundHandleOnOpen),i.addEventListener("message",this.boundHandleOnMessage),i.addEventListener("error",this.boundHandleOnError),i.addEventListener("close",this.boundHandleOnClose)}catch(i){console.log(i)}}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){Nm.flushAll(),this.serviceAliveHandler!==null&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),this.isAuthenticated=!1,console.debug("web socket closed - code:",e?.code,"| wasClean:",e?.wasClean),!(e&&e.code===4001)&&(this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization())}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,this.webSocket!==null&&this.webSocket.readyState===1){let e=Be.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){if(e.assignmentID){let r=t.agentSubscribeIdMap.get(e.assignmentID);t.unsubscribe(r??""),t.agentSubscribeIdMap.delete(e.assignmentID)}}static subscribeAgentMessageCaseValues(e){let r={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=t.subscribe(r,o=>{T2.publishCaseValuesUpdate(o,e)});t.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(e!==null&&e.data==="ALIVE")this.isServiceAlive===null&&this.checkLiveliness(d.PRIORITY.PING),this.isServiceAlive=!0;else{let r=null;try{r=JSON.parse(e.data)}catch{console.error("Invalid data received from messaging service",e.data)}if(r&&r.msgId&&this.webSocket?.send(`{"ack":"${r.msgId}"}`),_Q(r))typeof r.sequencing?.sequenceStreamId=="string"&&r.sequencing.sequenceStreamId!==""?Nm.enqueue(r.sequencing,r,n=>this.dispatchMessage(n,!0)):(r.sequencing&&console.warn("Message has a sequencing block without a usable sequenceStreamId; delivering it without ordering"),this.dispatchMessage(r));else if(r?.tokenExpiryTime){this.setSocketUUID(r?.socketUuId??null),this.resubscribeCaseEntries(),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,t.subscribeAgentMessageCaseValues),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,t.unsubscribeAgentMessageCaseValues),this.isAuthenticated=!0,this.setTokenExpiryTime({tokenExpiryTime:r.tokenExpiryTime});let n=(this.getTokenExpiryTime()-this.refreshB2SOffset)*1e3;setTimeout(()=>this.refreshB2STokenReInit(),n),this.inProgressSubscriptions.forEach(({messageSubscriber:o,id:i})=>{this.subscribeToSocket(o,i)}),this.inProgressSubscriptions=[],this.inProgressMessages.forEach(o=>{this.publishMessage(o)}),this.inProgressMessages=[]}else console.error("filter missing from received data from messaging service",e.data)}}static dispatchMessage(e,r=!1){let{matcher:n,criteria:o}=e.filter;delete o.environmentID,o.productionLevel&&delete o.productionLevel,this.handleFilteredMessage(n,o,e,r)}static handleFilteredMessage(e,r,n,o=!1){let i=this.getFilterKey({matcher:e,criteria:r});if(e==="CASE"&&typeof n.status=="string"&&n.status.toLowerCase()==="subscribed"){this.handleSubscribedMessage(i,n);return}if(!IQ(e,n)){this.dispatchToSubscribers(e,r,n,o);return}let s=this.caseEntriesByFilterKey.get(i);if(!s?.subscriptionId){console.warn("FieldUpdate received for a case without a confirmed subscription; ignoring it",i);return}let a=new Set;this.getMergeTargets(s.primaryContext).forEach(l=>{let u;if(o)try{u=this.mergeFieldUpdate(l,n,s.subscribedPaths)}catch(p){console.error(`Field update merge for "${l}" failed while handling a sequenced message`,p);return}else u=this.mergeFieldUpdate(l,n,s.subscribedPaths);u?.changedPaths.forEach(p=>a.add(p))});let c=a.size;c>0&&$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_FIELD_UPDATE_NOTIFICATION,{caseTypeID:r.caseTypeID,caseID:r.caseID,updatedCount:c})}static getMergeTargets(e){let r=Au(e).map(n=>pe(n));return[...new Set([e,...r])].filter(Om)}static mergeFieldUpdate(e,r,n){let o=TQ(r.message?.data);if(Object.keys(o).length===0)return;let i=W(e);if(!i)return;let s=this.getContentPath(i),a=g.getIn(i,s),{fields:c,changedPaths:l}=w2(a,o,n);if(Object.keys(c).length>0){let u={};g.setIn(u,s,c),T(V(Re,{context:e,data:u}))}return{kind:"fieldUpdate",contextName:e,changedPaths:l}}static handleSubscribedMessage(e,r){let n=r.subscribe?.id;if(typeof n!="string"||n===""){console.warn("Subscribed message without a subscription id; ignoring it",e);return}let o=this.caseEntriesByFilterKey.get(e);if(o?.requestId!==n){this.sendSocketUnsubscribe(n);return}o.subscriptionId=n,o.subscribedPaths=bQ(r.subscribedProps)}static sendSocketUnsubscribe(e){this.webSocket!==null&&this.webSocket.readyState===1&&this.webSocket.send(JSON.stringify({unsubscribe:{id:e}}))}static sendCaseSubscribe(e){let r=this.getSocketUUID();if(!r)return;let n=`${Date.now()}_${this.connectionsCount+=1}`;e.requestId=n,ve("subscribeRealTimeUpdate",{body:{payload:JSON.stringify({filter:e.filter,subscribe:{socketId:r,id:n}})}},e.primaryContext).catch(o=>{console.error("subscribeRealTimeUpdate error:",o)})}static resubscribeCaseEntries(){this.caseEntriesByFilterKey.forEach(e=>{e.subscriptionId=void 0,this.sendCaseSubscribe(e)})}static handleCaseLoad(e){if(!xm(e))return;let{caseId:r,caseClass:n,context:o}=e;if(!Om(r)||!Om(n)||!Om(o))return;let i={matcher:"CASE",criteria:{caseTypeID:n.toUpperCase(),caseID:r}},s=this.getFilterKey(i);if(this.caseEntriesByFilterKey.has(s))return;let a={filter:i,primaryContext:o,subscribedPaths:new Set};this.caseEntriesByFilterKey.set(s,a),this.sendCaseSubscribe(a)}static handleCaseUnload(e){let r=xm(e)?e.caseId:void 0;Om(r)&&this.caseEntriesByFilterKey.forEach((n,o)=>{n.filter.criteria?.caseID===r&&(this.caseEntriesByFilterKey.delete(o),n.subscriptionId&&this.sendSocketUnsubscribe(n.subscriptionId))})}static subscribeToCaseEvents(){let{CASE_LOAD:e,CASE_UNLOAD:r}=d.PUB_SUB_EVENTS.CASE_EVENTS;$.unsubscribe(e,N2),$.unsubscribe(r,O2),$.subscribe(e,n=>t.handleCaseLoad(n),N2),$.subscribe(r,n=>t.handleCaseUnload(n),O2)}static dispatchToSubscribers(e,r,n,o=!1){Object.keys(this.subscribers).forEach(i=>{let s=this.subscribers[i];if(s?.filter&&s.filter.matcher===e&&g.isEqual(s.filter.criteria,r)){if(!o){s.messageHandler(n);return}try{s.messageHandler(n)}catch(a){console.error(`Subscriber "${i}" failed while handling a sequenced message`,a)}}})}static reInitialization(e){this.setSocketUUID(null),!this.reInitInterval&&(Object.keys(this.subscribers).forEach(r=>{this.unsubscribe(r,!0)}),Object.keys(this.subscribers).forEach(r=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[r],id:r})}),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval(()=>{this.initConnection(this.connectionConfig)},5500))}static checkLiveliness(e){this.isServiceAlive===!1?this.reInitialization(!0):this.isServiceAlive=!1,this.serviceAliveHandler!==null&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout(()=>{this.checkLiveliness(e)},e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){this.webSocket!==null&&(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(){this.webSocket!==null&&(this.cleanSocketListeners(),Nm.flushAll(),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 getContentPath(e){return B.isExternalObject(g.getIn(e,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID))?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT}static subscribe(e,r,n,o){this.connectionsCount+=1;let i=o||`${Date.now()}_${this.connectionsCount}`;if(e.matcher==="COACH_UPDATE"){let a=this.findExistingSubscriberId(e);if(a)return a}let s=new l2(e,r,n);return this.webSocket!==null&&this.webSocket.readyState===1&&this.isAuthenticated?(this.subscribeToSocket(s,i),i):(this.inProgressSubscriptions.push({messageSubscriber:s,id:i}),e&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e),i),this.offlineEnabled&&(this.subscribers[i]=s),this.webSocket===null&&this.initConnection(this.connectionConfig),i)}static subscribeToSocket(e,r){if(this.subscribers[r]=e,e.filter&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e.filter),r),Object.keys(this.subscribers).filter(i=>this.subscribers[i]===e).length>1)return;let o={filter:e.filter,subscribe:{id:r}};this.webSocket?.send(JSON.stringify(o))}static unsubscribe(e,r){if(this.subscribers[e]){if(!r){let o=this.subscribers[e].filter;o&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(o)),delete this.subscribers[e]}let n={unsubscribe:{id:e}};this.webSocket!==null&&this.webSocket.readyState===1&&this.webSocket.send(JSON.stringify(n))}this.offlineEnabled&&!r&&this.removeFromInProgressSubscriptions(e)}static removeFromInProgressSubscriptions(e){let r=this.inProgressSubscriptions.findIndex(n=>n.id===e);if(r!==-1){let n=this.inProgressSubscriptions[r].messageSubscriber.filter;n&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(n)),this.inProgressSubscriptions.splice(r,1)}}static publishMessage(e){if(this.webSocket===null){console.error("Web socket not initialized.");return}if(this.webSocket!==null&&this.webSocket.readyState===1){this.webSocket.send(JSON.stringify(e));return}this.inProgressMessages.push(e)}static getUserPresence=()=>this.userPresence;static dispatchLocalMessage(e){let{matcher:r,criteria:n,message:o={}}=e,{environmentID:i,productionLevel:s,...a}=n,l={msgId:`local_${Date.now()}`,filter:{matcher:r,criteria:a},message:o};this.dispatchToSubscribers(r,a,l)}static getCaseSubscription=e=>b2.getOrCreateSubscription(e);static initObjectRedirectionSubscription=()=>vc.subscribeToCaseEvents();static refreshB2STokenReInit=async()=>{if(Yi()){let e={body:{B2SToken:Be.b2sJWT}};ve("refreshB2S",e).then(r=>{let{newB2SToken:n}=r.data;n&&n.length>30?(Be.b2sJWT=n,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")}).catch(r=>{console.log(`refreshB2S: error occurred while fetching: ${r}`)})}else Zs("refreshB2S")||AT("/uas/api/v1/isolations/token/websocket-ticket",{method:"GET",withoutDefaultHeaders:!1},"").then(r=>{let{token:n}=r.data;n&&(Be.b2sJWT=n,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close())}).catch(r=>{console.error(`websocket-ticket: error occurred while fetching: ${r}`)})};static getTokenExpiryTime=()=>{let e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static getSocketUUID=()=>this.socketUUID;static setSocketUUID=e=>{this.socketUUID=e};static clearContext(e){Object.keys(this.subscribers).forEach(r=>{this.subscribers[r].contextName===e&&this.unsubscribe(r)}),this.userPresence.clearContext(e)}},Tt=ET;var CT=class{isDirty;records;maxRecords;constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){let r=[],{pageNumber:n,pageSize:o}=e,i=n*o,s=i-o;for(;s<i;s+=1){if(!this.records[s])return this.maxRecords===s?r:[];r.push(this.records[s])}return r}return this.records}mergeRecords(e,r){if(Number.isInteger(r?.pageNumber)&&Number.isInteger(r?.pageSize)){let{pageNumber:n,pageSize:o}=r,i=n*o,s=i-o+1,a=0;for(let c=s-1;c<i;c+=1)this.records[c]=e[a],a+=1;if(e.length<o){let c=(n-1)*o+e.length;this.setMaxRecordsCount(c)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=xt(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}},_T=CT;var IT=class{isCacheEnabled;subscribers;dataPageSubscribers;dataStore;dataStoreMeta;subscribedDataPageNames;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,r){if(!e||!r)return e;if(!r.parameters)return{};let n=Array.isArray(r.parameters)?r.parameters:[r.parameters],o=new Set(n.map(s=>s.name)),i={};return Object.keys(e).forEach(s=>{o.has(s)&&(i[s]=e[s])}),i}resolveParameterValue(e,r,n,o,i){return g.resolveParameterValue(e,r,n,o,i)}formatParameterValue(e,r,n,o,i){return g.formatParameterValue(e,r,n,o,i)}resolveAndFormatParameters(e,r,n,o,i){return g.resolveAndFormatParameters(e,r,n,o,i)}getData(e,r,n,o){let i=this.generateHash(e,r,o);if(this.dataStore[e]&&this.dataStore[e][i]){let s=this.dataStore[e][i];return s.isDirty?[]:s.getRecords(n)}return[]}async getDataAsync(e,r,n={},o,i,s={}){let a=Ur(e),c=this.getDataViewParameters(n,a);s.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e));let l={skipClearErrorMessages:!0,...s};if(!this.isCacheable(e,i)||s.invalidateCache){let m=await this.fetchData(e,c,o,i,r,l);return{...m.data,data:this.isCacheable(e,i)?this.mergeDataStore(e,c,o,i,m):m.data?.data??[],pageNumber:m?.data?.pageNumber,pageSize:m?.data?.pageSize,queryStats:m?.data?.queryStats,status:m?.status}}let u=this.getData(e,c,o,i);if(u.length>0)return Promise.resolve({data:u});let p=await this.fetchData(e,c,o,i,r,l);return{...p.data,data:this.mergeDataStore(e,c,o,i,p),pageNumber:p?.data?.pageNumber,pageSize:p?.data?.pageSize,queryStats:p?.data?.queryStats,status:p?.status}}async getPageDataAsync(e,r,n={},o={}){let i=this.generateHash(e,n,null);if(o.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][i])if(o?.invalidateCache)delete this.dataStore[e][i],this._removeDataStoreMetaEntry(e,n,i);else return Promise.resolve(this.dataStore[e][i]);let{restApi:s,reqType:a}=U(d.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),c={method:a,...o.skipClearErrorMessages&&{skipClearErrorMessages:o.skipClearErrorMessages}};if(o.enableStreaming){let u=o.streamOptions||{};Object.assign(c,{responseType:"stream",adapter:"fetch",headers:{Accept:"text/event-stream"},...u})}let l=s&&n&&Object.keys(n).length===0?s.split("?")[0]:s;return k(l,c,r).then(u=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[i]:u.data},this._addDataStoreMetaEntry(e,n,i)),o.enableStreaming?u:u.data))}subscribeToDataPageUpdates(e,r,n,o={}){if(!e||!r||!n)return!1;let i=this.generateHash(n,o,null);this.dataPageSubscribers[n]??={};let s=this.dataPageSubscribers[n];s[i]??={};let a=s[i];return this.subscribeToMessageService(n,e),a[e]?!1:(a[e]??=r,!0)}unsubscribeToDataPageUpdates(e,r,n={}){if(!e||!r)return!1;let o=this.generateHash(r,n,null);delete this.dataPageSubscribers[r]?.[o]?.[e];let i=this.subscribedDataPageNames.get(r)??0;return i<=1?(this.subscribedDataPageNames.delete(r),e&&Tt.unsubscribe(e)):this.subscribedDataPageNames.set(r,i-1),!0}unsubscribeToDatapageUpdates(e,r,n={}){return this.unsubscribeToDataPageUpdates(e,r??"",n)}_isDataPageCached(e,r){if(r&&g.isObjectEmpty(r))return!!this.dataStore[e];let n=this.generateHash(e,r,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach(r=>{this.dataStore[r]||(this.dataStore[r]={});let n=e[r],o=P.getDefaultQualifiedName("pxResults");Object.keys(n).forEach(i=>{if(this.dataStore[r][i])this.dataStore[r][i].mergeRecords(e[r][i][o]);else{let s=new _T;this.dataStore[r][i]=s,s.mergeRecords(e[r][i][o]||[])}})})}_addDataStoreMetaEntry(e,r,n){let o=this.generateHash(e,r,null);this.dataStoreMeta[e]??={};let i=this.dataStoreMeta[e];i[o]??=[];let s=i[o];s.includes(n)||s.push(n)}_removeDataStoreMetaEntry(e,r,n){if(e&&!r&&!n&&(this.dataStoreMeta[e]={}),e&&r&&n){let o=this.generateHash(e,r,null);this.dataStoreMeta[e][o]=this.dataStoreMeta[e][o].filter(i=>i!==n)}}mergeDataStore(e,r,n,o,i){let s=this.generateHash(e,r,o),a=i?.data?.data;if(!a||a.length===0)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][s]||(this.dataStore[e][s]=new _T);let c=this.dataStore[e][s];return c.mergeRecords(a,n),c.isDirty=!1,this._addDataStoreMetaEntry(e,r,s),c.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")||e.startsWith(P.getDefaultQualifiedName("D_"))||e.startsWith(P.getDefaultQualifiedName("Declare_"))}subscribeToUpdate(e,r,n,o,i,s){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},s&&!this.subscribers[e].callback?.[s]&&(this.subscribers[e].callback[s]=i),this.subscribeToCascadeUpdates(e,r,n,o,s)}unsubscribe(e,r,n,o,i){delete this.subscribers[e]?.callback?.[i],r&&r.length>0&&Cr.unRegisterFields(n,o,r,i)}handleMessage(e){let{msgId:r,message:n}=e,{datapage:o,parameters:i=""}=n,s=this.subscribers[o];this.markDataInstanceDirty(o,i===""?null:JSON.parse(i)),r&&this._executeDataPageSubscriptions(e),!r&&s?.callback&&Object.keys(s.callback).forEach(a=>{s.callback?.[a](e.message)})}markDataInstanceDirty(e,r){let n,o;r&&(n=this.generateHash(e,r,null),o=this.dataStoreMeta[e]?.[n],o?.push(this.generateHash(e,null)),!o)||this.dataStore[e]&&Object.keys(this.dataStore[e]).filter(s=>r&&o?o.includes(s):!0).forEach(s=>{this.dataStore[e][s].isDirty=!0})}_executeDataPageSubscriptions(e){let{message:r}=e,{datapage:n,parameters:o}=r,i=o?JSON.parse(o):null;if(this.dataPageSubscribers[n])if(i){let s=[];s.push(this.generateHash(n,i,null)),s.push(this.generateHash(n,null,null)),s.forEach(a=>{let c=this.dataPageSubscribers[n]?.[a]??{};Object.keys(c).forEach(l=>{c[l](e.message)})})}else{let s=this.dataPageSubscribers[n];Object.keys(s).forEach(a=>{let c=s[a];Object.keys(c).forEach(l=>{s[a][l](e.message)})})}}isPerInteraction(e){let r=Ur(e);return!r||r.refreshStrategy?.type==="reloadOncePerInteraction"}disableCache(e){this.isCacheEnabled=!e}generateHash(e,r,n){let o=Ur(e),i=[];o||(i=Object.keys(r||{}).map(u=>({name:u})));let s=o?.parameters||i,a="",c=e,l=[];return Array.isArray(s)&&s.forEach(u=>{r?.[u.name]?l.push(r[u.name]):l.push(u.defaultValue??d.NULL_STRING)}),n&&l.push(JSON.stringify(n)),l.join(d.HASH_DELIMITER)&&(a=g.getHashedString(l.join(d.HASH_DELIMITER)),c=e+d.UNDERSCORE_STRING+a),c}async fetchData(e,r,n,o,i,s){let{additionalApiParams:{useExtendedTimeout:a=!1,includeTotalCount:c=!1}={},...l}=s,u={dataViewParameters:r};return c&&(u.includeTotalCount=!0),a&&(u.useExtendedTimeout=!0),n&&(u.paging=n),o&&(u.query=o),or.getData(e,u,i,l)}handleCascadeUpdate(){let{dataPageName:e,scope:r}=this;r.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,r,n,o,i){r&&r.length>0&&Cr.registerFields(n,o,r,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),i)}subscribeToMessageService(e,r){if(e&&this.subscribedDataPageNames.has(e)){let o=this.subscribedDataPageNames.get(e)??0;this.subscribedDataPageNames.set(e,o+1);return}let n={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};Tt.subscribe(n,this.handleMessage.bind(this),void 0,r),this.subscribedDataPageNames.set(e,1)}isCacheable(e,r){return this.isPerInteraction(e)||!this.isCacheEnabled?!1:!(r&&Object.keys(r).length>1)}},Zt=new IT;var $2={[d.ENV_INFO_KEYS.APPLICATION_NAME]:()=>v.getApplicationName(),[d.ENV_INFO_KEYS.ACCESS_GROUP]:()=>v.getAccessGroup(),[d.ENV_INFO_KEYS.APPLICATION_ID]:()=>v.getApplicationID()||v.getApplicationName(),[d.ENV_INFO_KEYS.USER_NAME]:()=>v.getOperatorName(),[d.ENV_INFO_KEYS.USER_ID]:()=>v.getOperatorIdentifier(),[d.ENV_INFO_KEYS.APPLICATION_DESC]:t=>t.getLocalizationService().getLocalizedText(v.getApplicationLabel()||""),[d.ENV_INFO_KEYS.USER_IMAGE]:()=>v.getOperatorImageInsKey(),[d.ENV_INFO_KEYS.LOCALE]:()=>v.getUseLocale(),[d.ENV_INFO_KEYS.TIMEZONE]:()=>v.getTimeZone(),[d.ENV_INFO_KEYS.WORK_GROUP]:()=>v.getOperatorWorkGroup()},aE=t=>Object.hasOwn($2,t)?$2[t]:void 0;var M2="@P ",k2="@ENV ",RQ=new Set([d.ENV_INFO_KEYS.APPLICATION_DESC]),bT=t=>t==null?"":typeof t=="object"?JSON.stringify(t):String(t),PQ=t=>t==null||t.trim()==="",L2=t=>{if(!t)return null;let e;try{e=JSON.parse(t)}catch(o){return console.warn(`Ignoring data-dp-params: invalid JSON ${JSON.stringify(t)}`,o),null}if(typeof e!="object"||e===null||Array.isArray(e))return console.warn(`Ignoring data-dp-params: expected a JSON object but got ${JSON.stringify(t)}`),null;let r=Object.entries(e);if(r.length===0)return console.warn("Ignoring data-dp-params: the bindings object is empty"),null;let n={};for(let[o,i]of r){if(typeof i!="string")return console.warn(`Ignoring data-dp-params: every binding must be a string in ${JSON.stringify(t)}`),null;n[o]=i}return n},U2=(t,e)=>{let r=Ur(t)?.parameters;return r?(Array.isArray(r)?r:[r]).flatMap(o=>{let i=o?.name;return i?[Object.hasOwn(e,i)?bT(e[i]):""]:[]}):[]},j2=(t,e)=>{if(e.length===0)return t;let r=e.map(n=>PQ(n)?d.NULL_STRING:n).join(d.HASH_DELIMITER);return`${t}${d.UNDERSCORE_STRING}${g.getHashedString(r)}`},TT=t=>t.startsWith(M2)&&t.substring(M2.length).trim()||null,z2=(t,e)=>{let r=TT(t);if(r)return bT(e.getValue(r));if(t.startsWith(k2)){let n=t.substring(k2.length).trim(),o=RQ.has(n)?void 0:aE(n);return o?bT(o(e)):t}return t},F2=(t,e)=>JSON.stringify([t,Object.entries(e).sort(([r],[n])=>r<n?-1:+(r>n))]);var V2=t=>{let e={};return Object.values(t).forEach(r=>{let n=TT(r);n&&(e[n]=`${d.PROPERTY_ANNOTATION} ${n}`)}),e},cE=class{constructor(e){this.env=e}env;lastResolved=new Map;resolve(e,r){let n=F2(e,r);try{let o=this.lookup(e,r);if(o!==void 0)return this.lastResolved.set(n,o),o}catch(o){console.error(`Failed to resolve ${e} from a parameterized data page`,o)}return this.lastResolved.get(n)??""}lookup(e,r){let n=e.indexOf(".");if(n<=0||n===e.length-1)return;let o=e.substring(0,n),i=e.substring(n+1),s=Ur(o);if(!s)return;let a={};Object.entries(r).forEach(([p,m])=>{a[p]=z2(m,this.env)});let c=j2(o,U2(o,a)),u=(s.mode===d.READONLY?Mo()?.[o]:this.env.getDataObject()?.[o])?.[c];if(u)return i.split(".").reduce((p,m)=>p?.[m],u)??""}};var NQ=/(?:<|&lt;)pega-reference\b([\s\S]*?)(?:>|&gt;)[\s\S]*?(?:<\/pega-reference>|&lt;\/pega-reference&gt;)/gi,OQ=/href="((?:<|&lt;)pega-reference\b[\s\S]*?(?:<\/pega-reference>|&lt;\/pega-reference&gt;))"/gi,vT={"&quot;":'"',"&#34;":'"',"&#39;":"'","&apos;":"'","&lt;":"<","&gt;":">","&amp;":"&"},xQ=vT,DQ=t=>t.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("'","&#39;").replaceAll("<","&lt;").replaceAll(">","&gt;"),wQ=new RegExp(Object.keys(vT).join("|"),"g"),B2=/data-dp-params\s*=\s*(?:"([^"]*)"|'([^']*)')/i,H2=t=>t.replace(wQ,e=>xQ[e]??e),G2=t=>{let e=B2.exec(t)??B2.exec(H2(t)),r=e?.[1]??e?.[2];return r===void 0?null:H2(r)},q2=t=>{let e=t;for(let[n,o]of Object.entries(vT))e=e.replaceAll(n,o);let r=/data-rule-id\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+))/i.exec(e);return r?.[1]||r?.[2]||r?.[3]||null},$Q=t=>Zt.isDataPage(t)&&t.indexOf(".")>0,MQ=new Set(["http","https","mailto","tel"]),kQ=t=>{let e=/^([a-z][\d+.a-z-]*):/i.exec(t.replaceAll(/[\s\p{Cc}]/gu,""))?.[1];return!e||MQ.has(e.toLowerCase())},W2=t=>kQ(t)?t:(console.warn("Ignoring a parameterized data page value in href: the URL scheme is not allowed"),""),RT=(t,e,r,n)=>{if(n?.supportsDatapageParams!==!0||!$Q(t))return null;let o=L2(e());if(!o)return null;let i=V2(o);return Object.keys(i).length>0&&r.registerAdditionalProps(i),{value:r.getParameterizedDataPageFieldValue(t,o)}},LQ=(t,e,r)=>{if(!t.includes("pega-reference"))return t;let n=!1,o=t.replaceAll(NQ,(i,s)=>{let a=q2(s);if(!a)return"";let c=RT(a,()=>G2(i),e,r);if(c)return n=!0,String(c.value??"");let l=e.getValue(a)??"";return e.registerAdditionalProps({[a]:`@P ${a}`}),l});return n?W2(o):o},UQ=(t,e,r)=>{let n=q2(t);if(!n)return"";let o=RT(n,()=>G2(t),e,r);if(o)return W2(String(o.value??""));let i=e.getValue(n)??"";return e.registerAdditionalProps({[n]:`@P ${n}`}),i},jQ=(t,e,r)=>!t.includes("pega-reference")||!t.includes('href="')?t:t.replaceAll(OQ,(n,o)=>{let i=UQ(o,e,r);return`href="${DQ(i)}"`}),zQ=(t,e,r)=>{let n=t.querySelectorAll("pega-reference");for(let o of n){let i=o.getAttribute("data-rule-id");if(i){let s=RT(i,()=>o.getAttribute("data-dp-params"),e,r);if(s)o.replaceWith(t.createTextNode(String(s.value??"")));else{let a=e.getValue(i),c=t.createTextNode(a??"");o.replaceWith(c),e.registerAdditionalProps({[i]:`@P ${i}`})}}else o.replaceWith("")}},FQ=(t,e,r)=>{let n=t.querySelectorAll("[href]");for(let o of n){let i=o.getAttribute("href");if(i){let s=LQ(i,e,r);s!==i&&o.setAttribute("href",s)}}},K2=(t,e,r,n)=>{if(!t)return t;let o=jQ(t,e,n);if(typeof globalThis.DOMParser!="function")return o;let i=new DOMParser().parseFromString(o,"text/html");zQ(i,e,n),FQ(i,e,n);let s;return r==="simple"?s=g.decodeHtmlEntities(i?.body?.textContent||""):s=i?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(s)?null:s};var J2=t=>({supportsDatapageParams:t?.supportsDatapageParams===!0}),PT=class t{static getParagraphStream(e,r,n,o){return K2(e,r,n,o)}static isDecisionParagraph(e,r){return!!Rc(e,r)?.useDecision}static processParagraph(e,r){let n=r.getCurrentClassID(),o=Rc(e,n),i;if(o?.useDecision){let l=o.dynamicContents.length;for(let u=0;u<l-1;u+=1)if(J.resolveWhen(o.dynamicContents[u].when,r)){i=o.dynamicContents[u],e=`${e}#${i.when}`;break}i||(i=o.dynamicContents.pop())}else i=o;let s=o?.definedOnClassID,a=Nr().getParagraphLocaleValue(s||n,e),c=J2(o);return a?t.getParagraphStream(a.content,r,a?.category||i?.category||o?.category,c):i?.content?t.getParagraphStream(i.content,r,i?.category||o?.category,c):null}static processBannerDecisionParagraph(e,r){let n=r.getCurrentClassID(),o=Rc(e,n),i;if(o?.useDecision){let u=o.dynamicContents.length;for(let p=0;p<u-1;p+=1)if(J.resolveWhen(o.dynamicContents[p].when,r)){i=o.dynamicContents[p],e=`${e}#${i.when}`;break}i||(i=o.dynamicContents.pop())}else i=o;let s=o?.definedOnClassID,a=Nr().getParagraphLocaleValue(s||n,e),c=J2(o),l=null;return a?l=t.getParagraphStream(a.content,r,a.category||i?.category||o?.category,c):i?.content&&(l=t.getParagraphStream(i.content,r,i?.category||o?.category,c)),{htmlContent:l,messageType:i?.messageType,dismissBanner:i?.dismissBanner,isBanner:i?.isBanner}}static getParagraphProperties(e,r){let n=r.getCurrentClassID(),o=Rc(e,n);return{useDecision:o?.useDecision,isBanner:o?.isBanner,messageType:o?.messageType,dismissBanner:o?.dismissBanner}}static isADecisionParagraph(e,r){return this.getParagraphProperties(e,r).useDecision}static isBanner(e,r){return this.getParagraphProperties(e,r).isBanner}static getParagraphMessageType(e,r){return this.getParagraphProperties(e,r).messageType}static isDismissibleBanner(e,r){return this.getParagraphProperties(e,r).dismissBanner}static hasDecisionBannerContent(e,r){let n=r.getCurrentClassID(),o=Rc(e,n);return!o?.useDecision||!o?.dynamicContents?!1:o.dynamicContents.some(i=>i.isBanner)}},ho=PT;var VQ={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"},Ut=VQ;var oa=t=>({type:Ut.REFRESH_DATA,payload:t}),Y2=t=>({type:lc,payload:t});var ia={},X2=t=>{t&&ia[t]&&delete ia[t]},BQ=(t,e,r,n,o,i,s,a,c,l)=>{if(!(t&&n&&e))return;let u=l.actionMgrID||w.getNextActionMgrId(),p={ID:t,actionID:e,objectTypeID:r,context:n,caseWideAction:o,isObjectType:i,isExternalObject:s,isExternalCase:a,casetypeID:c,options:{...l,actionMgrID:u}};l.isFillFormWithAI?T(Y2(p)):T(oa(p))},Pc=(t,e,r,n,o)=>{if(!(t&&r&&e))return;n&&(n=g.convertPageRefToClipboardPageNotation(n)),T(oa({ID:t,viewID:e,context:r,options:o,caseViewAction:!0,interestPage:n}))},Cu=(t,e,r,n,o,i,s,a,c,l={})=>{if(!((t||e)&&n&&r&&o))return;o&&(o=g.convertPageRefToClipboardPageNotation(o));let u={ID:!s&&c===d.ACTION?e:t,actionID:r,context:n,options:l,interestPage:o,interestPageActionID:i,isLocalAction:s,isMultiRecordData:a,editType:c};T(oa(u))},lE=(t,e,r)=>{ia[e]||(ia[e]={}),t&&!ia[e][t]&&(ia[e][t]={pageReference:r})},HQ=t=>ia[t]&&Object.keys(ia[t]).length>0&&tT(t),GQ=t=>{let e=t.substring(0,t.lastIndexOf(".")),r=t.substring(t.lastIndexOf(".")+1);return{pageName:e,propertyName:r}},Z2=(t,e,r)=>{let n=GQ(e.substring(e.lastIndexOf(" ")+1));return!!lt(n.propertyName,r||t.getValue(d.CLASS_ID,n.pageName))?.isDeclarativeTarget},qQ=(t,e,r)=>{let n=!1;if(Array.isArray(e)){let o=i=>{let s=i.value;return s.startsWith("@P")&&(n=Z2(t,s,r)),n};e.some(o)}else if(typeof e=="object"){for(let o of Object.keys(e))if(e[o].startsWith("@P")&&(n=Z2(t,e[o],r),n))break}return n},WQ=(t,e,r)=>{let n=r||t.getRawMetadata()?.config?.value,o=!1;if(n){let i=fe.trimAnnotation(n),s;e?s=g.resolvePageClass(i,e):s=J.resolveClassID(n,t.getPageReference(),t.getContextName());let a=lt(fe.getLeafPropertyName(n),s);if(o=!!a?.isDeclarativeTarget,!o&&a?.additionalInformation){let c=fe.trimAnnotation(a?.additionalInformation);o=ho.isDecisionParagraph(c,a.classID)}!o&&a?.datasource?.parameters&&(o=qQ(t,a?.datasource?.parameters,e)),o||(o=a?.datasource?.tableType===d.DECISION)}return o},ej=(t,e)=>{let r=i=>typeof i=="string"&&i.startsWith(d.PROPERTY_ANNOTATION),n=i=>r(i)&&WQ(t,e,i),o=i=>!i||typeof i!="object"?!1:Object.values(i).some(s=>n(s)||o(s));return o(t.getRawMetadata()?.config)},tj=t=>{(t.isWhenExist()||ej(t))&&lE(t.getCurrentView(),t.getContextName(),t.getPageReference())},rj=t=>{function e(o,i){for(let s of i){let a=ct({meta:s}).getPConnect();if(a.isWhenExist()||ej(a,o)||s.children&&e(o,s.children))return!0}return!1}let r=!1,n=t?.getRawMetadata()?.config;n?.type&&n.type==="multirecordlist"&&n?.contextClass&&(r=e(n.contextClass,n.children??[])),r&&lE(t.getCurrentView(),t.getContextName(),t.getPageReference())},NT=t=>{if(!t)return!1;let e=De()?.getState()?.data?.[t],r=e?.caseInfo?.caseTypeID||e?.objectInfo?.objectTypeID;return B.isObjectCaseType(r)},_u=(t,e,r)=>{let n=Ac(t,e),o,i,s="",a="",c=S=>J.getPropertyValue(S,e,t)||"",l=B.shouldUseUnifiedHandling(),u=c(E.CASE_INFO.CASE_INFO_CLASSID)||c(E.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID)||r?.classID||"",p=B.isObjectCaseType(u)||e.startsWith(d.OBJECT_INFO.OBJECT_INFO),m=B.isExternalCaseType(c(E.CASE_INFO.CASE_INFO_CLASSID)),f=B.isExternalObject(u),h=c(d.getProperty(E.CASE_INFO.BUSINESS_ID));p&&NT(t)&&!m?(s=u,r.isObjectWideAction=!0,o=c(l?E.CASE_INFO.ACTIVE_ACTION_ID:E.OBJECT_INFO.ACTIVE_ACTION_ID),o||(o=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)),i=c(d.getProperty(E.CASE_INFO.CASE_INFO_ID))||s):m&&!h?(o=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW),i=c(E.CASE_INFO.CASE_INFO_CLASSID),a=c(E.CASE_INFO.CASE_TYPE_ID)):(o=c(E.CASE_INFO.ACTIVE_ACTION_ID)||c(E.CASE_INFO.ASSIGNMENTACTION_ID),n?i=c(d.getProperty(E.CASE_INFO.CASE_INFO_ID)):i=c(d.getProperty(E.CASE_INFO.ASSIGNMENT_ID))||c(d.getProperty(E.CONTEXT_DATA_ASSIGNMENTID))),BQ(i,o,s,t,n,p,f,m,a,r)},Iu=t=>{let{context:e,pageReference:r}=t;if(!HQ(e))return;let o=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,r,e),{isMultiRecordData:i,editType:s}=o||{};if(i){let a=J.getPropertyValue(E.CASE_INFO.CASE_INFO_ID,r,e),c=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,r,e),{interestPage:l,interestPageActionID:u,actionID:p,isLocalAction:m,viewName:f}=o;s===d.ACTION?Cu(a,c,p,e,l,u,m,i,s):Pc(a,f,e,l,{})}else _u(e,r,{})},nj=t=>t.replace(/\[(\d+)\]/g,(e,r)=>`(${parseInt(r,10)+1})`),oj=(t,e)=>{let{requestType:r}=t;return t?.options?.refreshFor&&r==="refresh"&&(e+=`?refreshFor=${nj(t.options.refreshFor)}`),t?.options?.isFillFormWithAI&&r==="refresh"&&(e+="?fillFormWithAI=true"),e},ij=t=>{let e={};return Object.entries(t).forEach(([r,n])=>{["string","number","boolean"].includes(typeof n)&&(e[r]=n)}),t?.options?.refreshFor&&t.requestType==="refresh"&&(e.refreshFor=nj(t.options.refreshFor)),t?.options?.isFillFormWithAI&&t.requestType==="refresh"&&(e.fillFormWithAI=!0),e},OT="CANCEL_REFRESH",Q2=(t,e)=>{let r=t.url===e.url,n=t.interestPage===e.interestPage;return r&&n},Dm=()=>v.getFeatureMap()?.pzAllowBatchingOfRefreshes===!0,sj=(t,e)=>{let r=t.url?.includes("/refresh?refreshFor="),n=e.url?.includes("/refresh?refreshFor="),o=t.url?.endsWith("/refresh")&&!r,i=e.url?.endsWith("/refresh")&&!n;return o&&i||r&&n?Q2(t,e):o&&n?!0:r&&i&&!Dm()?OT:!1},aj=(t,e,r)=>{let n=B.shouldUseUnifiedHandling(),o=B.isObjectCaseType(e)||r;if(n||!o)return t;let i=g.getIn(t?.data,E.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return B.isExternalObject(i)?t:Ve.transformCaseData(t)},KQ=t=>{let e=[];return Ie.getDeclarativeTargets(t).forEach(({name:n,pageReference:o})=>{let i=o.split(".");i.shift();let s=i.join(".");n&&s&&(s=g.convertPageRefToClipboardPageNotation(s),e.push({name:n,context:s}))}),e},JQ=t=>{let e=[];return Ie.getWhens(t).forEach(({name:n,type:o,pageReference:i})=>{let s=i.split(".");s.shift();let a=s.join(".");n&&a&&(a=g.convertPageRefToClipboardPageNotation(a),e.push({name:n,context:a,type:o}))}),e},cj=t=>{let e=KQ(t),r=JQ(t);return{fieldsWithDeclarativeTargets:e,whens:r}};var xT=class{static getSharedState(e){let r=e.startsWith(".")?e.substring(1):e,n=Mo();return n?g.getIn(n,r):null}static setSharedState(e,r){e&&T(DT({key:e,value:r}))}static updateState(e,r,n,o={}){let{isArrayDeepMerge:i=!0,pageReference:s,removePropertyFromChangedList:a=!1,skipDirtyValidation:c=!1}=o;if(!e||!r)return;let l=s?`${s}.${r}`:r;T(sa({context:e,reference:l,value:n,isArrayDeepMerge:i,removePropertyFromChangedList:a,skipDirtyValidation:c}))}static getSuggestionsContext(e){return new ZU(e)}static triggerRefresh(e,r){Iu({context:e,pageReference:r})}},$n=xT;var wT=class{confirmHandler=null;registerConfirmHandler(e){this.confirmHandler=e||null}confirm(e){return this.confirmHandler?this.confirmHandler(e):typeof globalThis.confirm!="function"?Promise.resolve(!1):Promise.resolve(globalThis.confirm(e))}},ZQ=new wT,oi=ZQ;var{RESOURCE_TYPES:Mn}=E,it={PAGE:"page",FORM:"form"},lj={[Mn.CASE]:[tS,Kt,qn],[Mn.OBJECT]:[Yo,Jr,Bs],[Mn.PAGE]:[vn,sc],[Mn.DATA]:[Ro],ASSIGNMENT:[zs]},we=(t,e,r={})=>{if(!t)return{};let n={etag:t.etag},{RemoteSystemID:o}=r;return t[E.REMOTE_SYSTEM_ID]||t[E.REMOTE_SYSTEM_ID.toLowerCase()]||o?n.RemoteSystemID=t[E.REMOTE_SYSTEM_ID]||t[E.REMOTE_SYSTEM_ID.toLowerCase()]||o:e&&ae.isRemoteCase(e)&&(n.RemoteSystemID=ae.getRemoteHeader(e)),n},QQ=t=>{if(!t)return"";let e=t.split("."),r="",n;for(n of e)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r},XQ=(t,e,r=!1,n=!1)=>{let o={},s=!B.shouldUseUnifiedHandling()&&(r||n)?e?.objectInfo:e?.caseInfo;return(t||s)&&(o=t?{...e}:{...s}),{content:o}},eX=(t,e)=>{Object.entries(t?.caseInfo?.content).forEach(([r,n])=>{let o=W(e),i=im(o,E.CASE_INFO.CASE_INFO_CLASSID);(lt(r,i)?.type==="True-False"&&!n||n==="")&&delete t.caseInfo.content[r]})},Rt=(t,e={})=>{let{onlyChangedData:r=!1,nonEmptyAndChangedData:n=!1,skipUUID:o=!0,isTransientContext:i=!1,includeDisabledFields:s=!1,isObjectWideAction:a,isExternalObject:c}=e,l={};l=Cj(t,{isTransientContext:i,includeDisabledFields:s,isObjectWideAction:a,isExternalObject:c}),r&&(delete l?.caseInfo?.content,i&&(l={}));let u=xc(t,!1),p=W(t),m=im(p,d.CASE_INFO.CASE_INFO_ENCRYPTED_CONTENT),f=m!==void 0;!i&&n&&eX(l,t);let h=Di(u,l),S={};({content:S}=XQ(i,h,a,c));let C=[...Sm(t)];if(o){let N=P.getDefaultQualifiedName("EmbedListUUID__");C.forEach(x=>{delete x.content?.EmbedListUUID__,delete x.content?.[N]})}if(S.pageInstructions=C,HL(t).forEach(N=>{if(S?.content){let x=N?.replace(d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),"");g.deleteIn(S.content,QQ(x))}}),f&&(S.encryptedContent=m),!i&&h?.dataInfo)return S={...h.dataInfo,pageInstructions:S.pageInstructions},{content:S};let _=oe(P.getQualifiedNameForComplexRuleReferences(".pzAdditionalPayload"),d.CASE_INFO.CASE_INFO_CONTENT,t);return S.content&&_&&(S.content[P.getDefaultQualifiedName("pzAdditionalPayload")]=_),{content:S}},$e=(t,e)=>{let r,n,o={},i=g.getIn(t,d.UI_RESOURCES),s=g.getIn(t,"confirmationNote");i?(r=g.getIn(t,d.UI_RESOURCES_CONTEXT_DATA),n=g.getIn(t,d.ROOT),o=g.getIn(t,d.ACTION_BUTTONS)):s&&!e.isActiveWorkAreaPrimaryAndWorkareaAbsent&&(n={});let{data:a={},Errors:c,flowName:l}=t,{semanticURL:u,key:p}=t,m=a?.objectInfo?.ID;m&&(p=p||m,u=u||`objects/${m}`);let f=g.getIn(t,"nextAssignmentInfo",null),h=g.getIn(t,"nextAssignmentInfo.context",""),S=g.getIn(t,"confirmationLinks",null),{isInCreateStage:A,openCaseViewAfterCreate:C,initiatingContext:I,debugInfo:_,isExternalObjectCreationFlow:N,isExternalCaseCreationFlow:x}=e;return{data:{...a,key:p,flowName:l,coreHeaders:_&&{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:_.debugId}},[d.getProperty(d.CASE_INFO.CASE_INFO)]:{...a[d.getProperty(d.CASE_INFO.CASE_INFO)],actionButtons:o,headers:e.headers},[d.CONTEXT_DATA]:A?{...a[d.CONTEXT_DATA],...r,openCaseViewAfterCreate:C,...I&&{initiatingContext:I},errors:c,...N&&{isExternalObjectCreationFlow:N},...x&&{isExternalCaseCreationFlow:x}}:{...a[d.CONTEXT_DATA],...r,errors:c}},semanticURL:u,nextAssignmentInfo:f,assignmentContext:h,confirmationLinks:S,key:p,root:n,...e}},Pe=async(t,e,r,n=!1,o=!1)=>{let i=g.getIn(t,d.COMPONENTS);if(i)try{await fo(i)}catch(a){console.error(a)}let s={actionConfig:e,...r};n?qi({...t,options:s,directUrlUpdation:!0}):Gi(t,s,o)};var dj=(t="")=>{let e=t.indexOf(" "),r=t.indexOf("!");return t.substring(e+1,r)},$T=t=>{if(t){let[,e]=t.split("!");return{key:dj(t),flowName:e}}return{}},pj=(t,e)=>{let r=se(e),n=null;return r&&(n=We(e,r)),n?.key===t&&mr(e)},tX=(t,e,r,n)=>{switch(!0){case!!(t[d.ERROR_IN_PAGE_IDENTIFIER]&&t[d.ERROR_FIELD_IN_PAGE]):{let o=`${t[d.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`),i=`${o}${t[d.ERROR_IN_PAGE_IDENTIFIER]}`,s=g.deepClone(t);s[d.ERROR_FIELD_IN_PAGE]=o,e.has(i.slice(1))||e.has(i.substring(i.indexOf(".")+1,i.indexOf("[")))||e.has(i.substring(i.indexOf(".")+1,i.indexOf("(")))?n.push(s):r.push(t);break}case!!(t[d.ERROR_IN_PAGE_IDENTIFIER]&&!t[d.ERROR_FIELD_IN_PAGE]):{let o=t[d.ERROR_IN_PAGE_IDENTIFIER].slice(1);e.has(o)?n.push(t):r.push(t);break}default:r.push(t);break}},mj=(t,e)=>{let r=new Map(e.map((l,u)=>[l,u])),n=l=>{let u=(l.erroneousInputOutputFieldInPage||"").replace(/^\./,""),p=(l.erroneousInputOutputIdentifier||"").replace(/^\./,"");return u?`${u}.${p}`:p},o=l=>r.get(n(l))??Number.MAX_SAFE_INTEGER,i=t.slice().sort((l,u)=>o(l)-o(u)),s=[],a=[],c=new Set(e);for(let l of i)tX(l,c,s,a);return{fieldErrors:a,pageErrors:s}},ue=t=>{let{payload:e}=t,{err:r,context:n,actionMgrID:o}=e,i=r&&r.response?r.response.data:"",s=Oc(n);return o&&w.rejectActionByID(o,!0,r),V(Qi,"Error action triggered",i,n,s)},Ht=(t,e)=>It(t)&&jr(t)?V(kn,e):V(Pt,e),st=(t,e,r=d.APP.APP,n={})=>{let o=null,{buildNew:i=!0}=n;return It(t)?jr(t)?o=se(t):o=lr(e,r):mr(t)&&(jr(t)&&!i?o=Ar(t):(!jr(t)||i)&&(o=lr(e,r))),o},tn=t=>t&&t.type===St,MT=t=>{let e=!1,r=wo(t);for(let n=0;n<r.length;n+=1){let o=r[n];if(o&&Or(o)){e=!0;break}}return e},vt=async(t,e={})=>{let r=!1,n=!1,o={},i=!0,s=!1,a=!1,{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1,loadingContext:p}=e,m=Nr();if(It(t)){let f=se(t);if(!f)return{continueExecution:i,removeActionPayload:o};let h=pe(f);Or(h)&&(r=!0),!u&&!r&&(r=MT(f))}else if(mr(t)&&UT(t)){let f=jT(t);f||(f=se(t),n=!0),o.containerItemID=f,o.context=pe(f)}if(r){let f={context:p||t};Nn.disableLoadingIndicator(f);let h=l||Tu;s=await oi.confirm(m.getLocaleValue(h,"Messages")),Nn.enableLoadingIndicator(f)}if(!s&&r&&(o={},i=!1),n){let f={context:p||t};Nn.disableLoadingIndicator(f);let h=m.getLocaleValue(_j,"Messages");c?a=await oi.confirm(h):(await oi.confirm(h),i=!1),Nn.enableLoadingIndicator(f)}return!a&&n&&(o={},i=!1),{continueExecution:i,removeActionPayload:o}},rX=(t,e)=>We(t,e)?.resourceType,nX=(t,e)=>t?.includes(d.WORKAREA)?d.WORKAREA:e,oX=(t,e)=>e?!1:t,uj=(t,e)=>{let r=!1,n=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT),{insKey:o,isParallelCall:i,skipFlowNameCheck:s}=e;if(!o)return{};let[,a]=o.split("!")||"",c=s?o:dj(o),l=wt(t,c),u={},p=!1;if(l&&!n&&rX(t,l)===e?.type&&(r=!0,u=We(t,l),!s)){let m=u?.flowName,f=Lr(l),h=Au(l);if(h.length){let S=nX(h[0],f),A=Z(S,h[0]);m=We(A,h[0])?.flowName}else r=m===a;(m!==a||i)&&(p=!0)}return r=oX(r,e.forceRefresh),{activate:r,activateContainerActionPayload:{target:t,isParallelAssignment:p,containerItemID:l,semanticURL:u.semanticURL,insKey:o}}},iX=(t,e={})=>{let r=!1,{semanticURL:n}=e,o=wt(t,n);return o&&(r=!0),{activate:r,activateContainerActionPayload:{target:t,containerItemID:o,semanticURL:n}}},Zi=(t,e,r)=>t===Mn.PAGE?iX(e,r):t===Mn.ASSIGNMENT?uj(e,{...r,type:t}):t===Mn.CASE||t===Mn.OBJECT?uj(e,{...r,skipFlowNameCheck:!0,type:t}):{},sX=(t,e)=>{let r=At(vn,{page:t,pageClass:e}),n=De()?.getState()?.data?.app?.pyPortal?.pyPrimaryNavPages,o=Array.isArray(n)?n[0]:void 0,i=o?.pyRuleName===t&&o?.pyClassName===e;return{semanticURL:r,isDefaultNavPage:i}},aX=(t,e)=>{let r=LT(t);if(!r)return null;for(let[n,o]of Object.entries(r))if(!o.key&&o.resourceType===E.PAGE&&(!o.pageName||o.pageName===e))return n;return null},cX=(t,e)=>{if(!!v.environmentInfoObject&&!v.isInfinityRuntime()&&e===E.LAUNCHPAD_APP_OVERVIEW)return{activate:!1};if(t){let o=aX(t,e);if(o)return{activate:!0,activateContainerActionPayload:{target:t,containerItemID:o,semanticURL:""}}}return{activate:!1}},fj=(t,e,r)=>{let{semanticURL:n,isDefaultNavPage:o}=sX(t,e);if(r&&n&&!o){let i=Zi(Mn.PAGE,r,{semanticURL:n});if(i.activate)return{semanticURL:n,activate:!0,activateContainerActionPayload:i.activateContainerActionPayload}}if(o){let i=cX(r,t);return i.activate?{semanticURL:n,...i}:{semanticURL:"",activate:!1}}return{semanticURL:n,activate:!1}},lX=()=>V(wc,Dc({context:E.APP.APP,name:d.PREVIEW})),dE=(t,e)=>(t?.data?.caseInfo&&e?.caseInfo?.content&&(t.data.caseInfo.content=e?.caseInfo?.content),t),pE=(t=[])=>{jr(`${d.APP.APP}/${d.PREVIEW}`)&&t.push(lX())},kT=t=>{let e;for(let r of Object.keys(lj))if(lj[r].includes(t)){e=r;break}return e},yo=(t,e,r="",n={})=>{let{data:o={},context:i,caseViewMode:s,skipMergeAssignmentsAndActions:a=!0}=t,c=qe(i),l={data:{...o},caseViewMode:s,context:c};g.deleteIn(l.data,"shared"),g.setIn(l.data,["context_data","caseViewMode"],s),e.push({type:pn,payload:{context:l.context,skipMergeAssignmentsAndActions:a}});let u=r&&![E.CASE_INFO.CASE_INFO_CONTENT,E.DATA_INFO.DATA_INFO_CONTENT].includes(r),{propertiesToReplace:p=[]}=n;e.push(V(Re,{...l,...u&&{uiRootReference:r}},...p.length>0?[{propertiesToReplace:p}]:[]))},uX=(t,e,r)=>({assignmentID:t,vcName:d.PRIMARY,targetContainerName:g.getIn(e,["payload","target"]),context:g.getIn(e,["payload","context"]),...r==="other"&&{isChild:!0},isProcessAction:e?.payload?.isProcessAction,...r==="remote"&&{isRemote:!0},...r==="remote"&&{remoteClassName:e.payload.nextAssignmentInfo.className}}),dX=t=>{let e=t[0];for(let r of t)if(r?.payload?.nextAssignmentInfo?.context==="other"||r?.payload?.nextAssignmentInfo?.context==="remote")return r;return e},gn=t=>{if(Array.isArray(t)&&t.length>0){let e=dX(t),r=g.getIn(e,["payload","assignmentContext"]);if(r==="other"||r==="remote"){let n=g.getIn(e,["payload","nextAssignmentInfo","ID"]);if(e?.payload?.isProcessAction){let a={acName:g.getIn(e,["payload","target"]),caseID:e.payload.data.caseInfo.ID,containerItemID:g.getIn(e,["payload","context"]),context:g.getIn(e,["payload","context"])},c={type:wi,payload:{...a}};t.push(c),t=t.filter(l=>delete l?.payload?.data?.caseMessages),T(t),t=t.filter(l=>l.type!==wi)}let o=uX(n,e,r);!It(o.targetContainerName)&&e?.payload?.containerName===d.WORKAREA&&(o.isMultiDoc=!0,t=[]);let s={type:$i,payload:{...o}};t.push(s),T(t)}else T(t)}},gj=(t,e,r)=>{if(t===Mn.CASE||t===Mn.OBJECT||t===Mn.ASSIGNMENT){if(e?.caseInfo?.assignments&&e?.caseInfo?.assignments.length>0){let{key:n,flowName:o}=$T(e.caseInfo.assignments[0].ID);r.key=n||e.caseInfo.ID,r.flowName=o}else r.flowName="",r.key=e?.caseInfo?.ID||e?.objectInfo?.ID||e.semanticURL;r.resourceType=t,r.semanticURL=e.semanticURL,t===Mn.ASSIGNMENT?(r.caseViewMode=d.PERFORM_MODE,r.resourceType=Mn.CASE):r.caseViewMode=d.REVIEW_MODE}else r.resourceType=t,r.semanticURL=e.semanticURL;return r},Nc=(t,e)=>{function r(n,o){if(Array.isArray(n))return n.concat(o)}return Di(t,e,r)},bu=t=>{let e={},r=uE(t);for(;r;){let n=Rt(r,{skipUUID:!1});e=Nc(n.content,e),r=uE(r)}return e},hj=(t,e,r,n)=>{let o={},i=t;if(r.isRemoteCase){o={...r};let s=wt(n,o.insKey);s&&(e.activateContainerActionPayload={containerItemID:s},i=nr)}return{remoteCasePayload:o,updatedType:i}},yj=(t,e,r)=>{t.isRemoteCase&&(r.resourceType=E.CASE,r.key=B.getRemoteCaseKey(e.assignmentID,e.insKey),r.data.caseInfo={...r.data.caseInfo,...e,classID:e.className,target:r.target,containerItemID:r.containerItemID,caseTypeID:e.className,content:{pyLabel:e.name,pyID:er(B.getRemoteCaseKey(e.assignmentID,e.insKey))}},r.isTraditionalRemoteCase=t.isTraditionalRemoteCase||!1,r.className=e.className)},Sj=(t,e)=>{let r=pt.getComponentCache("assignments-launchAssignment-Error")||{};r&&typeof r=="object"&&Object.keys(r).length>0&&(r={...r,context:t},e.push(V(wm,r)),pt.resetComponentCache("assignments-launchAssignment-Error"))},Ej=(t,e)=>{let r=e?.data?.caseInfo;t===zs&&r?.caseTypeID&&r?.content&&Dn(r.caseTypeID)&&(r.content.coexistenceAction=qn)},mE=t=>{t?.containerItemID&&$n.updateState(t.containerItemID,"traditionalGadgetId",B.getUniqueGadgetId(),{skipDirtyValidation:!0})},Aj=t=>{let e=t?.data?.caseInfo;if(!e)return;let{ID:r,caseTypeID:n}=e;r&&n&&Dn(n)&&(t.data.caseID=r)};var zT=class t{static getChanges(e){return{...xc(e)}}static getSubmitData(e,r){let{isTransientContext:n=!1,includeDisabledFields:o=!1,onlyChangedData:i=!1}=r||{},{content:s}=Rt(e,{isTransientContext:n,includeDisabledFields:o,onlyChangedData:i});return s}static isStateModified(e){return Or(e)}static hasUnsavedChanges(e){return Or(e)||Am(e??null)}static resetComplexObjectDirtyStatus(e){return FT(e)}static isFormValid(e,r){return xr(e,r)}static clearChangedProperties(e){return Em(e),ym(e),vu(e)}static getEditableFields(e){return Ij(e)}static setCustomValidator(e,r){Dt.register(e,r)}static isPropertyEditable(e,r){return t.getEditableFields(e).some(o=>o.name===r)}},rn=zT;var{INSERT:pX,ADD:mX,DELETE:fX,DELETE_ALL:gX,MOVE:hX,REPLACE:yX}=d.LIST_ACTIONS,SX=[pX,mX,fX,gX,hX,yX],VT=class{states;unConnectedStates;constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,r,n){return this.states?.[e]?.[`${r}${n}`]||this.unConnectedStates?.[e]?.[`${r}${n}`]}getAllStateMachines(e,r,n){return{states:this.states?.[e]?.[`${r}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${r}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}isStateMachineExist(e,r,n){return!!this.states?.[e]?.[`${r}${n}`]||!!this.unConnectedStates?.[e]?.[`${r}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,r,n,o){let i=`${n}${r}`,{stateMachine:s}=this.getStateMachineObjByPath(i,e,!0,!0),a=(l,u,p=!1)=>{let m=p?this.states:this.unConnectedStates;m[e]||(m[e]={}),m[e][l]||(m[e][l]={}),m[e][l]=u};if(s&&s.targetPageReference!==o.targetPageReference){s.addChild(o),a(i,o);return}let c=Object.entries(this.states[e]||{}).filter(([l])=>{if(l.includes(i)){let u=l.substring(0,i.length).length;return l.substring(u).startsWith("[")||l.substring(u).startsWith(".")}return!1}).reduce((l,[u,p])=>({...l,[u]:p}),{});Object.keys(c)?.length?(Object.entries(c).forEach(([l,u])=>{delete this.states[e][l],o.addChild(u),a(l,u)}),this.states[e][i]=o):a(i,o,!0)}buildPageInstructionsByContext(e,r){let n=this.getStateMachinesByContext(e)||{},o=[];return Object.keys(n).sort().forEach(i=>{let s=Ie.getContextReferences(e)?.get(i),a=s&&J.resolveContextTreeNodeProps(s.props)||{},c=n[i];if(s&&a.readOnly!==!0){let l=c.buildSubmitPageInstructions(r);o.push(...l)}else if(c.hasEncryptedContent){let u=c.buildSubmitPageInstructions(r).filter(p=>p.encryptedContent!==void 0);o.push(...u)}else s||this.setStateMachineEmpty(e,i)}),o}buildClientChangeList(e){let r=this.getStateMachinesByContext(e)||{},n={},o={};return Object.keys(r).forEach(i=>{let a=r[i].getChangeList();n={...n,...a}}),g.flatten(n,"",o),o}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,r){let n=this.getStateMachine(e,r,"");n.root=null,n.current=null,n.hasEncryptedContent=!1;let o=this.getUnConnectedStateMachines(e)||{};Object.keys(o).forEach(i=>{i.includes(r)&&delete o[i]})}removeStateMachine(e,r){delete this.states[e]?.[r]}invalidateNestedStateMachines(e,r){let n=this.getUnConnectedStateMachines(e)||{};Object.keys(n).forEach(o=>{o.startsWith(r)&&["[","(","."].includes(o.charAt(r.length))&&delete n[o]})}createStateMachine(e,r){let n=e.substring(0,e.lastIndexOf("[")),o=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&o&&mn(r,o,n)}getStateMachineObjByPath(e,r,n,o=!1){let i=/\[\d+\]$/gm,s=e,a;for(;e&&!this.isStateMachineExist(r,"",e);){let c=te(r),l=We(c,r)||{},u=l?.isPageGroup||l?.subscriptFieldName||typeof l?.index=="string";if(a=null,n&&e.endsWith("]")){if(a=e.match(i),a=a?.[a.length-1]?.substring(1,a[a.length-1].length-1),[e]=e.split(i),!o&&!this.isStateMachineExist(r,"",e)){this.createStateMachine(s,r);break}}else if(l?.index&&e.includes(l.index)&&u){let p=e.split(".");a=p[3],e=p.slice(0,3).join(".");break}else e=e.substring(0,e.lastIndexOf("."))}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(r,"",e),index:a}:{}}executeStateMachine(e,r,n,o=!0,i={}){let{stateMachineTarget:s,index:a}=this.getStateMachineObjByPath(r,e,o);if(!s)return!1;let c=te(e),l=We(c,e)||{},[,u]=r.split(s);if(!u)return!1;let p=l?.subscriptFieldName&&r.includes(l?.index)||l?.isPageGroup;a!==null&&(p?[,u]=u.split(/(?=\.\w+)/):[,u]=u.split(/^\[\d+\]/gm));let m={[Rn(u)]:n},f=this.getStateMachine(e,"",s);if(a!==null)if(p){let h=Sm(e);l?.resourceStatus==="CREATE"&&h.forEach(S=>{S.instruction==="UPDATE"&&S.groupIndex===l.index&&!S.content[l.subscriptFieldName]&&f.update({[l.subscriptFieldName]:l.index},a,i.skipStateUpdate??!0,i)}),f?.update(m,a,i.skipStateUpdate??!0,i)}else f?.update(m,Number(a)+1,i.skipStateUpdate??!0,i);else f?.updatePage(g.unflatten(m));return!0}setUniqueField(e,r,n){let o=Ie.getContextReferences(e)?.get(n)?.props?.uniqueField;o&&(r.content||(r.content={}),r.content[Rn(o)]=globalThis.crypto?.randomUUID?.()??g.generateUniqueID())}getBasePageReference(e){return oe(E.DATA_INFO.DATA_INFO_CONTENT,"",e)?E.DATA_INFO.DATA_INFO_CONTENT:E.CASE_INFO.CASE_INFO_CONTENT}mergeServerPageInstructions(e,r){r.forEach(n=>{if(n.target){let o=g.convertClipboardPageToPageRefNotation(n.target),s=`${this.getBasePageReference(e)}${o}`;if(!this.isStateMachineExist(e,s,"")){let c=s.substring(s.lastIndexOf(".")),l=s.substring(0,s.lastIndexOf("."));mn(e,c,l)}let a=this.getStateMachine(e,s,"");n.instruction==="INSERT"&&this.setUniqueField(e,n,s),n.encryptedContent!==void 0&&a&&(a.hasEncryptedContent=!0),a?.insertNode(n),n.instruction&&SX.includes(n.instruction)&&this.invalidateNestedStateMachines(e,s)}})}registerForServerChanges(){Cr.registerForListChanges((e,r,n)=>{setTimeout(()=>{this.generatePageInstructions(e,r,n)},0)})}registerForServerChangesSync(){Cr.registerForListChanges((e,r,n)=>{this.generatePageInstructions(e,r,n)})}generatePageInstructions(e,r,n){if(!r.includes(".classID")&&rn.isPropertyEditable(e,r)&&this.executeStateMachine(e,r,n),!r.includes(".classID")&&r.includes("].")){let i=r.substring(0,r.lastIndexOf("[")),a=rn.getEditableFields(e).find(c=>c.name===i);if(a?.type&&["multiselect","checkbox"].includes(a.type)){let l=Ie.getContextReferences(e)?.get(i),u=r.substring(r.lastIndexOf("].")+2);l?.props.selfReferencingDatapageKeys?.includes(u)&&this.executeStateMachine(e,r,n)}}}unRegisterForServerChanges(){Cr.unRegisterForListChanges()}},ke=new VT;var Ru={},Rn=t=>t.startsWith(".")?t.substring(1):t,fE=t=>{delete Ru[t]},Tj=(t,e,r)=>{let n=Rn(e);Ru[t]?Ru[t].fieldOrder[n]=r:Ru[t]={fieldOrder:{[n]:r}}},EX=t=>t.selectionList||t.selectionKey||t.renderMode==="Editable"&&t.referenceList,gE=(t,e={})=>{let{includeDisabledFields:r=!1}=e,n=J.resolveContextTreeNodeProps(t),o=n.readOnly!==!0&&n.visibility!==!1&&(r||n.disabled!==!0),i=typeof t?.value=="string"&&t?.value.includes("@FILTERED_LIST"),s=EX(t);return(t?.value||s)&&!i&&o},AX=(t,e,r,n,o)=>(ke.executeStateMachine(t,n,J.getLitePropertyValue(r,e))||o.push(n),o),vj=["Attachment","Signature"],Rj=t=>!!t&&vj.includes(t),CX=(t,e,r)=>{let n=["Address",...vj],o=e.isInsideList,{ignoreFieldsInsideList:i=!0}=r;return(!o||o&&!i)&&!Array.isArray(J.getLitePropertyValue(e,t))&&!(e.componentName&&n.includes(e.componentName))},_X=(t,e,r)=>{let{includeDisabledFields:n=!1}=r,o=[];for(let[i,s]of t){let a=J.resolveContextTreeNodeProps(s.props),c=typeof a.propertyName=="string"?a.propertyName:void 0;gE(s.props,{includeDisabledFields:n})&&CX(i,a,r)&&(o=AX(e,c,a,i,o))}return{editableFormFieldsReferenceList:o}},bj=(t,e={})=>{let r=[],n=[],o=Ie.getContextReferences(t);return o?({editableFormFieldsReferenceList:r}=_X(o,t,e),Ru[t]&&n.push(...Object.keys(Ru[t].fieldOrder??{})),{formInputs:r,formPageFields:n}):{formInputs:r,formPageFields:n}},BT=t=>{let e=[],r=Ie.getContextReferences(t);if(r)for(let[n,o]of r){let i=o?.props;if(gE(i)&&Rj(i?.componentName)){let s=i?.allowMultiple==="true";e=[...e,{type:"File",allowMultiple:s,fullPath:n}]}}return e},IX=(t,e,r)=>{t.forEach(n=>{let o=g.getIn(e,n);typeof o=="object"&&(o=g.deepClone(o),delete o?.classID),g.buildObject(n,r,o)})},bX=(t,e,r)=>!B.shouldUseUnifiedHandling()&&(t||e)?r?.objectInfo:r?.caseInfo,Cj=(t,e={})=>{let r={},n=W(t),{ignoreFieldsInsideList:o=!0,isTransientContext:i=!1,includeDisabledFields:s=!1,isObjectWideAction:a=!1,isExternalObject:c=!1}=e,l=bX(a,c,n);if(i||l){let{formInputs:u,formPageFields:p}=bj(t,{ignoreFieldsInsideList:o,includeDisabledFields:s});IX(p,n,r),u&&u.length>0?u.forEach(m=>{g.buildObject(m,r,g.getIn(n,m))}):i||g.buildObject(E.CASE_INFO.CASE_INFO_CONTENT,r,{})}if(!i&&n?.dataInfo?.content){let{formInputs:u}=bj(t,{ignoreFieldsInsideList:o});u.forEach(p=>{g.buildObject(p,r,g.getIn(n,p))})}return r},Pj=(t,e,r)=>{let n=e===""&&r?.startsWith(".")?r.substring(1,r.length):r,o=Ie.getContextReferences(t)?.get(`${e}${n}`)?.props;return o&&J.resolveContextTreeNodeProps(o)},xr=(t,e)=>{let r=Ie.getContextReferences(t),n=!0;if(!r)return n;for(let[o,i]of r){let s=J.resolveContextTreeNodeProps(i.props);if(gE(i.props)&&!(e&&!o.includes(e))){let a=Dt.validate(s.componentName?.toLowerCase(),s.propertyName,J.getLitePropertyValue(s,s.propertyName),s);n&&(n=!a.message)}}return n},Nj=t=>{let e=Ie.getContextReferences(t);if(e){for(let[,r]of e)if(J.resolveContextTreeNodeProps(r.props).hasSuggestions)return!0}return!1},Oc=(t,e=!1)=>{let r=Ie.getContextReferences(t),n=[];if(r){for(let[o,i]of r)if(J.resolveContextTreeNodeProps(i.props).visibility!==!1){let c=e?o:o.substring(o.indexOf("content")+8);n.push(c)}}return n},Oj=t=>{let e=Ie.getContextReferences(t),r=[];if(e)for(let[n,o]of e)J.resolveContextTreeNodeProps(o.props).readOnly===!0&&r.push(n);return r},Ij=t=>{let e=[],r=Ie.getContextReferences(t);if(r)for(let[n,o]of r){let i=J.resolveContextTreeNodeProps(o.props);gE(o.props)&&!Rj(i.componentName)&&i.type!=="multirecordlist"&&e.push({name:n,label:i.label,type:i.componentName?.toLowerCase()})}return e};var hE={},yE={},HT=(t,e)=>{e?(hE[t]=!0,delete yE[t]):(yE[t]=!0,delete hE[t])},xj=t=>{delete hE[t],delete yE[t]};var Pu=t=>hE[t]===!0,SE=t=>Pu(t)||yE[t]===!0;var GT=class t{static isAssignmentStale=e=>Pu(e);static isContextStale=e=>SE(e);static getCaseInlineEditAction(e){return e?v.getInlineEditActions(e):[]}static isCaseActive(e,r){if(!e||!r)return!1;let n=ut(r);if(n){let o=se(r),{items:i={}}=n;return!!(o&&i[o]&&i[o].key===e)}return!1}static getCaseEditMetadata=(e,r)=>{let n={caseID:e,viewID:P.getDefaultQualifiedName("pyEdit")},{restApi:o,reqType:i}=U("loadView",n);return k(o,{method:i},r)};static getCaseView=(e,r,n,o={})=>{let{signal:i}=o,s={caseID:e,viewID:r},{restApi:a,reqType:c}=U("loadView",s);return k(a,{method:c,...i&&{signal:i}},n)};static isExternalCaseType=e=>{let r;return this.shouldUseUnifiedHandling()?(r=v.getCaseTypeList()?.find(n=>n.DisplayMandatoryInputsForObject&&n.pyWorkTypeImplementationClassName===e),!!r):(r=v.getCaseTypeList()?.find(n=>n.objectType==="Case"&&n.DisplayMandatoryInputsForObject&&n.pyWorkTypeImplementationClassName===e),!!r)};static getCaseEditLock=(e,r,n)=>{let i=this.getCaseInlineEditAction(n)[0]??P.getDefaultQualifiedName("pyUpdateCaseDetails"),s={caseID:e,actionID:i},{restApi:a,reqType:c}=U(js,s);return k(`${a}?viewType=page`,{method:c},r)};static updateCaseEditFieldsData=(e,r,n,o,i)=>{let s=this.getCaseInlineEditAction(i),a=s.length?s:[P.getDefaultQualifiedName("pyUpdateCaseDetails")],c=r[e],l=(p,m)=>{let f={caseID:e,actionID:p},{restApi:h}=U(js,f);return k(`${h}?viewType=form`,{method:"PATCH",body:{content:{...c}},headers:{"if-match":m}},o)},u=(p,m)=>{let[f,...h]=p;return l(f,m).then(S=>h.length>0?u(h,S.headers.etag):S)};return u(a,n)};static getRuleActionData=(e,r,n)=>{let o={caseID:e,actionID:r},{restApi:i,reqType:s}=U(js,o);return k(`${i}?viewType=form`,{method:s},n)};static updateRuleFieldsWithAction=async(e,r,n,o)=>{let i={caseID:e,actionID:r},{restApi:s,reqType:a}=U(js,i),c=`${s}?viewType=form`,u=(await k(c,{method:a},o)).headers?.etag;return k(c,{method:"PATCH",body:{content:n},headers:{"if-match":u}},o)};static getCaseMessages=e=>W(e)?.caseMessages;static getPropertiesToReplace=e=>(BT(e)||[]).map(n=>({path:n.fullPath,allowMultiple:n.allowMultiple}));static getPropertiesToReArrange=e=>(BT(e)||[]).filter(n=>n.allowMultiple).map(n=>n.fullPath);static getUniqueGadgetId=()=>g.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>ae.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>ae.isTraditionalRemoteCase(e);static isRemoteCase=e=>ae.isRemoteCase(e);static isRemoteCaseVersionDifferent=e=>ae.isRemoteCaseVersionDifferent(e);static getRemoteCaseKey=(e,r)=>{let n=r;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{let r=v.getCaseTypeList()?.filter(n=>n.pyWorkTypeImplementationClassName===e);return r&&r.length>0&&r[0].objectType==="Object"};static isExternalObject=e=>{let r=v.getCaseTypeList()?.filter(i=>i.pyWorkTypeImplementationClassName===e),{DisplayMandatoryInputsForObject:n,objectType:o}=r?.[0]||{};return r&&r.length>0&&n&&o==="Object"};static getRouteKeyForCreateWork=(e,r=!1)=>this.isExternalCaseType(e)&&r?ZI:this.isExternalObject(e)&&r?this.shouldUseUnifiedHandling()?ZI:Yk:this.shouldUseUnifiedHandling()?uc:this.isObjectCaseType(e)?Yo:uc;static shouldUseUnifiedHandling=()=>!0;static shouldAppendExcludeQueryParam=()=>v.isOptimizedCaseLoadingEnabled();static appendExcludeQueryParamToUrl=e=>{if(!e||!this.shouldAppendExcludeQueryParam())return e;let r=e;if(r.includes("excludeAdditionalActions=true"))return r=r.replace("excludeAdditionalActions=true","exclude=availableActions,availableProcesses,assignments"),r;let n=r.includes("?")?"&":"?";return`${r}${n}exclude=availableActions,availableProcesses`};static setTraditionalGadgetId=e=>{e.traditionalGadgetId=t.getUniqueGadgetId()}},B=GT;var zr={CONTENT_FIELDS_PATH:[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[d.CONTEXT_DATA,d.DATA_INFO.DATA_INFO,d.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[d.CONTEXT_DATA,d.OBJECT_INFO.OBJECT_INFO,d.CONTENT],FIELD_MESSAGES_PATH:[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT,d.SUMMARY_OF_MESSAGES,d.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[d.CONTEXT_DATA,d.DATA_INFO.DATA_INFO,d.CONTENT,d.SUMMARY_OF_MESSAGES,d.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[d.CONTEXT_DATA,d.OBJECT_INFO.OBJECT_INFO,d.CONTENT,d.SUMMARY_OF_MESSAGES,d.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[d.CONTEXT_DATA,d.SUMMARY_OF_MESSAGES,d.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[d.CONTEXT_DATA,d.SUMMARY_OF_MESSAGES,d.HTTP_MESSAGES],CASE_MESSAGE_PATH:[d.CASEMESSAGES]},TX=t=>t?.startsWith(".")?t.substring(1).split("."):t.split("."),Qn=(t="",e="",r,n)=>{let o=[],i=[];t!==null&&(i=TX(t));let s=e&&e.startsWith(".")?e.substr(1):e;if(r===d.PROPERTY&&t||t){o=[d.CONTEXT_DATA,...s.split(".")];for(let a=0;a<i.length-1;a+=1)o.push(i[a]);o.push(d.SUMMARY_OF_MESSAGES,d.PROPERTY_MESSAGES,i[i.length-1])}else r===E.PAGE?o=[...zr.PAGE_MESSAGES_PATH]:r===d.HTTP?o=[...zr.HTTP_MESSAGES_PATH]:r===d.CASEMESSAGES?o=[...zr.CASE_MESSAGE_PATH]:n&&(o=[d.CONTEXT_DATA,...s.split(".")]);return o.filter(Boolean)},qT=(t,e,r)=>{let n={content:{}},i=`${e.split(".").slice(2).join(".")}[${r}]`,s=g.getIn(t?.content,i.split("."));return s&&g.setIn(n.content,i.split("."),{...s}),n},vX=(t,e,r)=>{let n=g.getIn(t,[d.CONTEXT_DATA,...r.split(".")],{});return Object.keys(n).filter(o=>o.includes(`${e}[`))},RX=(t,e,r)=>e<r?t.filter(n=>parseInt(n.match(/\d+/)?.[0],10)>e&&parseInt(n.match(/\d+/)?.[0],10)<=r):t.filter(n=>parseInt(n.match(/\d+/)?.[0],10)<e&&parseInt(n.match(/\d+/)?.[0],10)>=r),Dj=(t,e,r,n,o,i,s={})=>{let a=RX(r,n,o),c=n>o?"up":"down";a&&a?.length>0&&a?.forEach(u=>{let p=parseInt(u.match(/\d+/)?.[0],10),m=`${i}[${p}]`,f=c==="up"?1:-1;s[`${i}[${p+f}]`]=g.getIn(t[e],[d.CONTEXT_DATA,...m.split(".")]),g.deleteIn(t[e],[d.CONTEXT_DATA,...m.split(".")])});let l=Object.keys(s);l.length>0&&l.forEach(u=>{g.setIn(t[e],[d.CONTEXT_DATA,...u.split(".")],s[u])})},PX=t=>{let e=[],r=0;for(;r<t.length;)r+1<t.length&&!Number.isNaN(parseInt(t[r+1],10))?(e.push(`${t[r]}[${t[r+1]}]`),r+=2):(e.push(t[r]),r+=1);return e.join(".")},wj=(t,e,r,n,o)=>{let i=g.deepClone(g.getIn(t,[`${e}`])),s=g.getIn(i,[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO]);if(!s)return;let a=PX(r.split(".")),c=a.substring(0,a.lastIndexOf(".")),l=a.substring(a.lastIndexOf(".")+1),u=vX(i,l,c);if(u.length===0)return;let p=qT(s,a,n).content;if(p&&Object.keys(p).length>0){let m={},f=`${a}[${n}]`,h=g.getIn(i,[d.CONTEXT_DATA,...f.split(".")]);m[`${a}[${o}]`]=h,g.deleteIn(t[e],[d.CONTEXT_DATA,...f.split(".")]),Dj(t,e,u,n,o,a,m)}else Dj(t,e,u,n,o,a)},Gt=t=>{let{type:e,property:r,category:n,context:o,pageReference:i}=t,s;r&&(s=r.slice(1));let a=W(o),c=[],l=g.getIn(a,Qn(s,i,n));return!e||e==="all"?l:(l&&Array.isArray(l)&&l.length>0&&(c=l.filter(u=>u.type===e)),e===E.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&r&&Ie.mutateField(o,i,r,{messages:[...c],type:E.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:r}),c)},$m=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),NX=t=>{let e=t[d.SUMMARY_OF_MESSAGES];if(!$m(e))return;let r=e[d.PROPERTY_MESSAGES];if($m(r))return r},OX=/\[\d+\]$/,xX=new Set([d.SUMMARY_OF_MESSAGES,d.SUMMARY_OF_LISTS,d.SUMMARY_OF_GROUPS,d.SUMMARY_OF_FIELD_VALUES,d.SUMMARY_OF_WHEN_CONDITIONS,d.SUMMARY_OF_DYNAMIC_WHENS,d.SUMMARY_OF_EXPRESSIONS,d.SUMMARY_OF_ASSOCIATED_LISTS]),DX=(t,e)=>t?`.${t}.${e}`:`.${e}`,wX=(t,e,r)=>e?`${t}.${e}.${r}`:`${t}.${r}`,$X=(t,e,r,n)=>{let o=Object.keys(r);for(let i=0;i<o.length;i+=1){let s=o[i],a=DX(n,s);Ie.mutateField(t,e,a,{type:Wn,fieldName:a})}},EE=(t,e,r,n="")=>{let o=NX(r);o&&$X(t,e,o,n);let i=Object.keys(r);for(let s=0;s<i.length;s+=1){let a=i[s],c=r[a];!xX.has(a)&&$m(c)&&(OX.test(a)?EE(t,wX(e,n,a),c,""):EE(t,e,c,n?`${n}.${a}`:a))}},dt=t=>{let{property:e,pageReference:r,category:n,context:o,type:i,subType:s,isListEntry:a,clearContextMessages:c,deletingIndex:l}=t,u={context:o,type:i,subType:s};if(e&&!a)Ie.mutateField(o,r,e,{type:Wn,fieldName:e}),u.property=e,u.pageReference=r;else if(a){if(o&&r){let p=W(o),m=Qn(void 0,r,void 0,!0),f=g.getIn(p,m);$m(f)&&EE(o,r,f)}u.pageReference=r,u.isListEntry=a,u.deletingIndex=l}else u.category=n;if(c){let p=g.getIn(t.stateObj,zr.CONTENT_FIELDS_PATH);o&&$m(p)&&EE(o,E.CASE_INFO.CASE_INFO_CONTENT,p),T({type:Wn,payload:{stateObj:t.stateObj,context:o}})}else T({type:Wn,payload:u})},Pn=t=>{let{messages:e,property:r,pageReference:n,category:o,context:i}=t,s={messages:e,context:i};r?(s.property=r,s.pageReference=n):s.category=o,T({type:Fs,payload:s})},AE=(t,e,r)=>{for(let n of Object.keys(t))e.push(n),n===d.SUMMARY_OF_MESSAGES?r.push([...e]):typeof t[n]==="object"&&AE(t[n],e,r),e.pop();return r},MX=t=>{let e=zr.CONTENT_FIELDS_PATH;return t?.objectInfo?e=B.isObjectCaseType(t?.objectInfo?.objectTypeID)?zr.OBJECT_CONTENT_FIELDS_PATH:e:t?.dataInfo?.content&&(e=zr.DATA_OBJECT_CONTENT_FIELDS_PATH),e},kX=(t,e)=>{let r=W(t),n=MX(r),o=g.getIn(r,[...n])||{},i=[];return AE(o,[],[]).forEach(a=>{let c=g.getIn(o,[...a,d.PROPERTY_MESSAGES]);c&&Object.keys(c).forEach(l=>{c[l].forEach(u=>{if(u.type===d.MESSAGES.MESSAGES_TYPE_ERROR){let p=e?.getLocalizedMessage(u.message)??u.message;u.fieldLabel?i.push({label:`${u.fieldLabel}:`,description:p}):i.push(p)}})})}),i},WT=(t,e)=>{let r=Gt({context:d.APP.ROOT,category:"HTTP"});if(v.getRenderingMode()===d.EMBED){let n=Gt({context:d.APP.APP,category:"HTTP"});n&&(r=r?r.concat(n):n)}if(t){let n=Gt({context:e,category:"HTTP"});r?n&&(r=r.concat(Gt({context:e,category:"HTTP"}))):r=Gt({context:e,category:"HTTP"})}return r},Mm=t=>{let e=null;Ke(t)[0]?e=se(Ke(t)[0]):e=t,e&&dt({context:e,stateObj:W(e),clearContextMessages:!0})},KT=t=>(g.getIn(W(t),zr.PAGE_MESSAGES_PATH)??[]).some(r=>r.subType===d.CUSTOM_ERROR),LX=t=>{let{context:e}=t;T({type:Wn,payload:{clearAll:!0,context:e}})},UX={addMessages:Pn,getValidationErrorMessages:kX,getMessages:Gt,clearMessages:dt,getRootContainerHttpMessages:WT,clearContextMessagesInActiveWorkArea:Mm,clearContextMessages:LX,isCustomPageErrorExist:KT},Nu=UX;var JT=class{#e;#t;#r;#n;isPreview;debugLevels;constructor(){this.#e=typeof localStorage<"u"&&localStorage.getItem("inspectorFlag")==="true",this.#t=!1,this.#r=!1,this.#n=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}#o(){return this.#r&&this.#n}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(){let e=typeof localStorage<"u"?localStorage:null,r=e?.getItem("inspectorFlag")==="true";!r&&this.#o()||(this.#e=!r,e?.setItem("inspectorFlag",this.#e.toString()),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e))}disableInspectorIfEnabled(){if(!this.#e)return;this.#e=!1,(typeof localStorage<"u"?localStorage:null)?.setItem("inspectorFlag",this.#e.toString()),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}get uiDesignerEnabled(){return this.#r}setDesignerToolbarExpanded(e){this.#n=e,$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,e)}get uiDesignerToolbarExpanded(){return this.#n}toggleUIDesigner(){this.#r=!this.#r,this.#r||(this.#n=!1),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER,this.#r),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,this.#n)}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},zX=new JT,br=zX;var FX=Object.create,CE=Object.defineProperty,VX=Object.getOwnPropertyDescriptor,BX=Object.getOwnPropertyNames,HX=Object.getPrototypeOf,GX=Object.prototype.hasOwnProperty,$j=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Mj=(t,e)=>{let r={};for(var n in t)CE(r,n,{get:t[n],enumerable:!0});return e&&CE(r,Symbol.toStringTag,{value:"Module"}),r},qX=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var o=BX(e),i=0,s=o.length,a;i<s;i++)a=o[i],!GX.call(t,a)&&a!==r&&CE(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(n=VX(e,a))||n.enumerable});return t},kj=(t,e,r)=>(r=t!=null?FX(HX(t)):{},qX(e||!t||!t.__esModule?CE(r,"default",{value:t,enumerable:!0}):r,t));var WX=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]);function Lj(t){return typeof t=="string"&&WX.has(t.replace(/#$/,""))}var b={};qt(b,{$brand:()=>_E,$input:()=>gP,$output:()=>fP,NEVER:()=>Lm,TimePrecision:()=>EP,ZodAny:()=>iO,ZodArray:()=>lO,ZodBase64:()=>GA,ZodBase64URL:()=>qA,ZodBigInt:()=>id,ZodBigIntFormat:()=>JA,ZodBoolean:()=>od,ZodCIDRv4:()=>BA,ZodCIDRv6:()=>HA,ZodCUID:()=>kA,ZodCUID2:()=>LA,ZodCatch:()=>RO,ZodCodec:()=>rC,ZodCustom:()=>gf,ZodCustomStringFormat:()=>rd,ZodDate:()=>df,ZodDefault:()=>CO,ZodDiscriminatedUnion:()=>dO,ZodE164:()=>WA,ZodEmail:()=>DA,ZodEmoji:()=>$A,ZodEnum:()=>Xu,ZodError:()=>vre,ZodFile:()=>SO,ZodFirstPartyTypeKind:()=>UO,ZodFunction:()=>MO,ZodGUID:()=>af,ZodIPv4:()=>FA,ZodIPv6:()=>VA,ZodISODate:()=>RA,ZodISODateTime:()=>vA,ZodISODuration:()=>NA,ZodISOTime:()=>PA,ZodIntersection:()=>pO,ZodIssueCode:()=>jO,ZodJWT:()=>KA,ZodKSUID:()=>zA,ZodLazy:()=>wO,ZodLiteral:()=>yO,ZodMAC:()=>tO,ZodMap:()=>gO,ZodNaN:()=>NO,ZodNanoID:()=>MA,ZodNever:()=>aO,ZodNonOptional:()=>eC,ZodNull:()=>oO,ZodNullable:()=>AO,ZodNumber:()=>nd,ZodNumberFormat:()=>Fc,ZodObject:()=>pf,ZodOptional:()=>XA,ZodPipe:()=>tC,ZodPrefault:()=>IO,ZodPromise:()=>$O,ZodReadonly:()=>OO,ZodRealError:()=>jn,ZodRecord:()=>ff,ZodSet:()=>hO,ZodString:()=>ed,ZodStringFormat:()=>Mt,ZodSuccess:()=>vO,ZodSymbol:()=>rO,ZodTemplateLiteral:()=>DO,ZodTransform:()=>EO,ZodTuple:()=>mO,ZodType:()=>Xe,ZodULID:()=>UA,ZodURL:()=>uf,ZodUUID:()=>ai,ZodUndefined:()=>nO,ZodUnion:()=>mf,ZodUnknown:()=>sO,ZodVoid:()=>cO,ZodXID:()=>jA,ZodXor:()=>uO,_ZodString:()=>xA,_default:()=>_O,_function:()=>s3,any:()=>YA,array:()=>M,base64:()=>vF,base64url:()=>RF,bigint:()=>UF,boolean:()=>ce,catch:()=>PO,check:()=>a3,cidrv4:()=>bF,cidrv6:()=>TF,clone:()=>hn,codec:()=>n3,coerce:()=>hf,config:()=>fr,core:()=>es,cuid:()=>hF,cuid2:()=>yF,custom:()=>c3,date:()=>HF,decode:()=>KN,decodeAsync:()=>YN,describe:()=>l3,discriminatedUnion:()=>Sa,e164:()=>PF,email:()=>wA,emoji:()=>fF,encode:()=>WN,encodeAsync:()=>JN,endsWith:()=>Hu,enum:()=>je,file:()=>XF,flattenError:()=>Gm,float32:()=>$F,float64:()=>MF,formatError:()=>qm,fromJSONSchema:()=>g3,function:()=>s3,getErrorMap:()=>Nre,globalRegistry:()=>yn,gt:()=>si,gte:()=>Sn,guid:()=>cF,hash:()=>wF,hex:()=>DF,hostname:()=>xF,httpUrl:()=>mF,includes:()=>Vu,instanceof:()=>d3,int:()=>OA,int32:()=>kF,int64:()=>jF,intersection:()=>Uo,ipv4:()=>CF,ipv6:()=>IF,iso:()=>to,json:()=>m3,jwt:()=>NF,keyof:()=>GF,ksuid:()=>AF,lazy:()=>Ea,length:()=>jc,literal:()=>L,locales:()=>tf,looseObject:()=>Ne,looseRecord:()=>JF,lowercase:()=>zu,lt:()=>ii,lte:()=>eo,mac:()=>_F,map:()=>YF,maxLength:()=>Uc,maxSize:()=>Lc,meta:()=>u3,mime:()=>Gu,minLength:()=>Xi,minSize:()=>fa,multipleOf:()=>ma,nan:()=>r3,nanoid:()=>gF,nativeEnum:()=>QF,negative:()=>SA,never:()=>ZA,nonnegative:()=>AA,nonoptional:()=>TO,nonpositive:()=>EA,normalize:()=>qu,null:()=>ci,nullable:()=>cf,nullish:()=>e3,number:()=>K,object:()=>R,optional:()=>Ae,overwrite:()=>Lo,parse:()=>HN,parseAsync:()=>GN,partialRecord:()=>KF,pipe:()=>lf,positive:()=>yA,prefault:()=>bO,preprocess:()=>ts,prettifyError:()=>av,promise:()=>i3,property:()=>CA,readonly:()=>xO,record:()=>ie,refine:()=>kO,regex:()=>ju,regexes:()=>Eo,registry:()=>YE,safeDecode:()=>QN,safeDecodeAsync:()=>eO,safeEncode:()=>ZN,safeEncodeAsync:()=>XN,safeParse:()=>sf,safeParseAsync:()=>qN,set:()=>ZF,setErrorMap:()=>Pre,size:()=>Uu,slugify:()=>Yu,startsWith:()=>Bu,strictObject:()=>qF,string:()=>y,stringFormat:()=>OF,stringbool:()=>p3,success:()=>t3,superRefine:()=>LO,symbol:()=>FF,templateLiteral:()=>o3,toJSONSchema:()=>zc,toLowerCase:()=>Ku,toUpperCase:()=>Ju,transform:()=>QA,treeifyError:()=>sv,trim:()=>Wu,tuple:()=>fO,uint32:()=>LF,uint64:()=>zF,ulid:()=>SF,undefined:()=>VF,union:()=>de,unknown:()=>Ee,uppercase:()=>Fu,url:()=>td,util:()=>Q,uuid:()=>lF,uuidv4:()=>uF,uuidv6:()=>dF,uuidv7:()=>pF,void:()=>BF,xid:()=>EF,xor:()=>WF});var es={};qt(es,{$ZodAny:()=>kR,$ZodArray:()=>FR,$ZodAsyncError:()=>ko,$ZodBase64:()=>vR,$ZodBase64URL:()=>RR,$ZodBigInt:()=>HE,$ZodBigIntFormat:()=>DR,$ZodBoolean:()=>Ym,$ZodCIDRv4:()=>IR,$ZodCIDRv6:()=>bR,$ZodCUID:()=>dR,$ZodCUID2:()=>pR,$ZodCatch:()=>iP,$ZodCheck:()=>jt,$ZodCheckBigIntFormat:()=>Fv,$ZodCheckEndsWith:()=>Xv,$ZodCheckGreaterThan:()=>LE,$ZodCheckIncludes:()=>Zv,$ZodCheckLengthEquals:()=>Wv,$ZodCheckLessThan:()=>kE,$ZodCheckLowerCase:()=>Jv,$ZodCheckMaxLength:()=>Gv,$ZodCheckMaxSize:()=>Vv,$ZodCheckMimeType:()=>tR,$ZodCheckMinLength:()=>qv,$ZodCheckMinSize:()=>Bv,$ZodCheckMultipleOf:()=>jv,$ZodCheckNumberFormat:()=>zv,$ZodCheckOverwrite:()=>rR,$ZodCheckProperty:()=>eR,$ZodCheckRegex:()=>Kv,$ZodCheckSizeEquals:()=>Hv,$ZodCheckStartsWith:()=>Qv,$ZodCheckStringFormat:()=>Lu,$ZodCheckUpperCase:()=>Yv,$ZodCodec:()=>Qm,$ZodCustom:()=>mP,$ZodCustomStringFormat:()=>OR,$ZodDate:()=>zR,$ZodDefault:()=>tP,$ZodDiscriminatedUnion:()=>HR,$ZodE164:()=>PR,$ZodEmail:()=>aR,$ZodEmoji:()=>lR,$ZodEncodeError:()=>aa,$ZodEnum:()=>JR,$ZodError:()=>Hm,$ZodFile:()=>ZR,$ZodFunction:()=>uP,$ZodGUID:()=>iR,$ZodIPv4:()=>AR,$ZodIPv6:()=>CR,$ZodISODate:()=>yR,$ZodISODateTime:()=>hR,$ZodISODuration:()=>ER,$ZodISOTime:()=>SR,$ZodIntersection:()=>GR,$ZodJWT:()=>NR,$ZodKSUID:()=>gR,$ZodLazy:()=>pP,$ZodLiteral:()=>YR,$ZodMAC:()=>_R,$ZodMap:()=>WR,$ZodNaN:()=>sP,$ZodNanoID:()=>uR,$ZodNever:()=>UR,$ZodNonOptional:()=>nP,$ZodNull:()=>MR,$ZodNullable:()=>eP,$ZodNumber:()=>BE,$ZodNumberFormat:()=>xR,$ZodObject:()=>uz,$ZodObjectJIT:()=>VR,$ZodOptional:()=>XR,$ZodPipe:()=>aP,$ZodPrefault:()=>rP,$ZodPromise:()=>dP,$ZodReadonly:()=>cP,$ZodRealError:()=>Un,$ZodRecord:()=>qR,$ZodRegistry:()=>JE,$ZodSet:()=>KR,$ZodString:()=>kc,$ZodStringFormat:()=>$t,$ZodSuccess:()=>oP,$ZodSymbol:()=>wR,$ZodTemplateLiteral:()=>lP,$ZodTransform:()=>QR,$ZodTuple:()=>GE,$ZodType:()=>He,$ZodULID:()=>mR,$ZodURL:()=>cR,$ZodUUID:()=>sR,$ZodUndefined:()=>$R,$ZodUnion:()=>Zm,$ZodUnknown:()=>LR,$ZodVoid:()=>jR,$ZodXID:()=>fR,$ZodXor:()=>BR,$brand:()=>_E,$constructor:()=>D,$input:()=>gP,$output:()=>fP,Doc:()=>Jm,JSONSchema:()=>sF,JSONSchemaGenerator:()=>bA,NEVER:()=>Lm,TimePrecision:()=>EP,_any:()=>zP,_array:()=>WP,_base64:()=>mA,_base64url:()=>fA,_bigint:()=>wP,_boolean:()=>xP,_catch:()=>Sre,_check:()=>iF,_cidrv4:()=>dA,_cidrv6:()=>pA,_coercedBigint:()=>$P,_coercedBoolean:()=>DP,_coercedDate:()=>GP,_coercedNumber:()=>TP,_coercedString:()=>yP,_cuid:()=>oA,_cuid2:()=>iA,_custom:()=>JP,_date:()=>HP,_decode:()=>PE,_decodeAsync:()=>OE,_default:()=>gre,_discriminatedUnion:()=>nre,_e164:()=>gA,_email:()=>ZE,_emoji:()=>rA,_encode:()=>RE,_encodeAsync:()=>NE,_endsWith:()=>Hu,_enum:()=>lre,_file:()=>KP,_float32:()=>RP,_float64:()=>PP,_gt:()=>si,_gte:()=>Sn,_guid:()=>rf,_includes:()=>Vu,_int:()=>vP,_int32:()=>NP,_int64:()=>MP,_intersection:()=>ore,_ipv4:()=>lA,_ipv6:()=>uA,_isoDate:()=>CP,_isoDateTime:()=>AP,_isoDuration:()=>IP,_isoTime:()=>_P,_jwt:()=>hA,_ksuid:()=>cA,_lazy:()=>_re,_length:()=>jc,_literal:()=>dre,_lowercase:()=>zu,_lt:()=>ii,_lte:()=>eo,_mac:()=>SP,_map:()=>are,_max:()=>eo,_maxLength:()=>Uc,_maxSize:()=>Lc,_mime:()=>Gu,_min:()=>Sn,_minLength:()=>Xi,_minSize:()=>fa,_multipleOf:()=>ma,_nan:()=>qP,_nanoid:()=>nA,_nativeEnum:()=>ure,_negative:()=>SA,_never:()=>VP,_nonnegative:()=>AA,_nonoptional:()=>hre,_nonpositive:()=>EA,_normalize:()=>qu,_null:()=>jP,_nullable:()=>fre,_number:()=>bP,_optional:()=>mre,_overwrite:()=>Lo,_parse:()=>wu,_parseAsync:()=>$u,_pipe:()=>Ere,_positive:()=>yA,_promise:()=>Ire,_property:()=>CA,_readonly:()=>Are,_record:()=>sre,_refine:()=>YP,_regex:()=>ju,_safeDecode:()=>DE,_safeDecodeAsync:()=>$E,_safeEncode:()=>xE,_safeEncodeAsync:()=>wE,_safeParse:()=>Mu,_safeParseAsync:()=>ku,_set:()=>cre,_size:()=>Uu,_slugify:()=>Yu,_startsWith:()=>Bu,_string:()=>hP,_stringFormat:()=>Zu,_stringbool:()=>eN,_success:()=>yre,_superRefine:()=>ZP,_symbol:()=>LP,_templateLiteral:()=>Cre,_toLowerCase:()=>Ku,_toUpperCase:()=>Ju,_transform:()=>pre,_trim:()=>Wu,_tuple:()=>ire,_uint32:()=>OP,_uint64:()=>kP,_ulid:()=>sA,_undefined:()=>UP,_union:()=>tre,_unknown:()=>FP,_uppercase:()=>Fu,_url:()=>nf,_uuid:()=>QE,_uuidv4:()=>XE,_uuidv6:()=>eA,_uuidv7:()=>tA,_void:()=>BP,_xid:()=>aA,_xor:()=>rre,clone:()=>hn,config:()=>fr,createStandardJSONSchemaMethod:()=>Qu,createToJSONSchemaMethod:()=>tN,decode:()=>Cee,decodeAsync:()=>Iee,describe:()=>QP,encode:()=>Aee,encodeAsync:()=>_ee,extractDefs:()=>ha,finalize:()=>ya,flattenError:()=>Gm,formatError:()=>qm,globalConfig:()=>km,globalRegistry:()=>yn,initializeContext:()=>ga,isValidBase64:()=>TR,isValidBase64URL:()=>sz,isValidJWT:()=>az,locales:()=>tf,meta:()=>XP,parse:()=>TE,parseAsync:()=>vE,prettifyError:()=>av,process:()=>Nt,regexes:()=>Eo,registry:()=>YE,safeDecode:()=>Tee,safeDecodeAsync:()=>Ree,safeEncode:()=>bee,safeEncodeAsync:()=>vee,safeParse:()=>cv,safeParseAsync:()=>lv,toDotPath:()=>Vj,toJSONSchema:()=>zc,treeifyError:()=>sv,util:()=>Q,version:()=>nR});var Lm=Object.freeze({status:"aborted"});function D(t,e,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let l=s.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){let m=u[p];m in a||(a[m]=l[m].bind(a))}}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:t});function s(a){var c;let l=r?.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}var _E=Symbol("zod_brand"),ko=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},aa=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},km={};function fr(t){return t&&Object.assign(km,t),km}var Q={};qt(Q,{BIGINT_FORMAT_RANGES:()=>iv,Class:()=>ZT,NUMBER_FORMAT_RANGES:()=>ov,aborted:()=>pa,allowsEval:()=>ev,assert:()=>QX,assertEqual:()=>KX,assertIs:()=>YX,assertNever:()=>ZX,assertNotEqual:()=>JX,assignProp:()=>la,base64ToUint8Array:()=>jj,base64urlToUint8Array:()=>gee,cached:()=>xu,captureStackTrace:()=>bE,cleanEnum:()=>fee,cleanRegex:()=>zm,clone:()=>hn,cloneDef:()=>eee,createTransparentProxy:()=>see,defineLazy:()=>at,esc:()=>IE,escapeRegex:()=>So,extend:()=>lee,finalizeIssue:()=>Ln,floatSafeRemainder:()=>QT,getElementAtPath:()=>tee,getEnumValues:()=>jm,getLengthableOrigin:()=>Bm,getParsedType:()=>iee,getSizableOrigin:()=>Vm,hexToUint8Array:()=>yee,isObject:()=>$c,isPlainObject:()=>da,issue:()=>Du,joinValues:()=>F,jsonStringifyReplacer:()=>Ou,merge:()=>dee,mergeDefs:()=>ua,normalizeParams:()=>X,nullish:()=>ca,numKeys:()=>oee,objectClone:()=>XX,omit:()=>cee,optionalKeys:()=>nv,partial:()=>pee,pick:()=>aee,prefixIssues:()=>Xn,primitiveTypes:()=>rv,promiseAllObject:()=>ree,propertyKeyTypes:()=>Fm,randomString:()=>nee,required:()=>mee,safeExtend:()=>uee,shallowClone:()=>tv,slugify:()=>XT,stringifyPrimitive:()=>Y,uint8ArrayToBase64:()=>zj,uint8ArrayToBase64url:()=>hee,uint8ArrayToHex:()=>See,unwrapMessage:()=>Um});function KX(t){return t}function JX(t){return t}function YX(t){}function ZX(t){throw new Error("Unexpected value in exhaustive check")}function QX(t){}function jm(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}function F(t,e="|"){return t.map(r=>Y(r)).join(e)}function Ou(t,e){return typeof e=="bigint"?e.toString():e}function xu(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ca(t){return t==null}function zm(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function QT(t,e){let r=(t.toString().split(".")[1]||"").length,n=e.toString(),o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}let i=r>o?r:o,s=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return s%a/10**i}var Uj=Symbol("evaluating");function at(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Uj)return n===void 0&&(n=Uj,n=r()),n},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function XX(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function la(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ua(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function eee(t){return ua(t._zod.def)}function tee(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function ree(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=n[i];return o})}function nee(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function IE(t){return JSON.stringify(t)}function XT(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var bE="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function $c(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var ev=xu(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function da(t){if($c(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!($c(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function tv(t){return da(t)?{...t}:Array.isArray(t)?[...t]:t}function oee(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var iee=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Fm=new Set(["string","number","symbol"]),rv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function So(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hn(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function X(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function see(t){let e;return new Proxy({},{get(r,n,o){return e??(e=t()),Reflect.get(e,n,o)},set(r,n,o,i){return e??(e=t()),Reflect.set(e,n,o,i)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,o){return e??(e=t()),Reflect.defineProperty(e,n,o)}})}function Y(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function nv(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var ov={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},iv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function aee(t,e){let r=t._zod.def,n=ua(t._zod.def,{get shape(){let o={};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(o[i]=r.shape[i])}return la(this,"shape",o),o},checks:[]});return hn(t,n)}function cee(t,e){let r=t._zod.def,n=ua(t._zod.def,{get shape(){let o={...t._zod.def.shape};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete o[i]}return la(this,"shape",o),o},checks:[]});return hn(t,n)}function lee(t,e){if(!da(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let o=ua(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return la(this,"shape",i),i},checks:[]});return hn(t,o)}function uee(t,e){if(!da(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return la(this,"shape",n),n},checks:t._zod.def.checks};return hn(t,r)}function dee(t,e){let r=ua(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return la(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return hn(t,r)}function pee(t,e,r){let n=ua(e._zod.def,{get shape(){let o=e._zod.def.shape,i={...o};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=t?new t({type:"optional",innerType:o[s]}):o[s])}else for(let s in o)i[s]=t?new t({type:"optional",innerType:o[s]}):o[s];return la(this,"shape",i),i},checks:[]});return hn(e,n)}function mee(t,e,r){let n=ua(e._zod.def,{get shape(){let o=e._zod.def.shape,i={...o};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new t({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new t({type:"nonoptional",innerType:o[s]});return la(this,"shape",i),i},checks:[]});return hn(e,n)}function pa(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Xn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Um(t){return typeof t=="string"?t:t?.message}function Ln(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let o=Um(t.inst?._zod.def?.error?.(t))??Um(e?.error?.(t))??Um(r.customError?.(t))??Um(r.localeError?.(t))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Vm(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Bm(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Du(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function fee(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function jj(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function zj(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function gee(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return jj(e+r)}function hee(t){return zj(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function yee(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function See(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var ZT=class{constructor(...e){}};var Fj=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Ou,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Hm=D("$ZodError",Fj),Un=D("$ZodError",Fj,{Parent:Error});function Gm(t,e=r=>r.message){let r={},n=[];for(let o of t.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}function qm(t,e=r=>r.message){let r={_errors:[]},n=o=>{for(let i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>n({issues:s}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(e(i));else{let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(e(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return n(t),r}function sv(t,e=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var s,a;for(let c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{let l=[...i,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,p=0;for(;p<l.length;){let m=l[p],f=p===l.length-1;typeof m=="string"?(u.properties??(u.properties={}),(s=u.properties)[m]??(s[m]={errors:[]}),u=u.properties[m]):(u.items??(u.items=[]),(a=u.items)[m]??(a[m]={errors:[]}),u=u.items[m]),f&&u.errors.push(e(c)),p++}}};return n(t),r}function Vj(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function av(t){let e=[],r=[...t.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)e.push(`✖ ${n.message}`),n.path?.length&&e.push(` → at ${Vj(n.path)}`);return e.join(`
4
4
  `)}var wu=t=>(e,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ko;if(s.issues.length){let a=new(o?.Err??t)(s.issues.map(c=>Ln(c,i,fr())));throw bE(a,o?.callee),a}return s.value},TE=wu(Un),$u=t=>async(e,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(o?.Err??t)(s.issues.map(c=>Ln(c,i,fr())));throw bE(a,o?.callee),a}return s.value},vE=$u(Un),Mu=t=>(e,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=e._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new ko;return i.issues.length?{success:!1,error:new(t??Hm)(i.issues.map(s=>Ln(s,o,fr())))}:{success:!0,data:i.value}},cv=Mu(Un),ku=t=>async(e,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=e._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>Ln(s,o,fr())))}:{success:!0,data:i.value}},lv=ku(Un),RE=t=>(e,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return wu(t)(e,r,o)},Aee=RE(Un),PE=t=>(e,r,n)=>wu(t)(e,r,n),Cee=PE(Un),NE=t=>async(e,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return $u(t)(e,r,o)},_ee=NE(Un),OE=t=>async(e,r,n)=>$u(t)(e,r,n),Iee=OE(Un),xE=t=>(e,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Mu(t)(e,r,o)},bee=xE(Un),DE=t=>(e,r,n)=>Mu(t)(e,r,n),Tee=DE(Un),wE=t=>async(e,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ku(t)(e,r,o)},vee=wE(Un),$E=t=>async(e,r,n)=>ku(t)(e,r,n),Ree=$E(Un);var Eo={};qt(Eo,{base64:()=>Tv,base64url:()=>ME,bigint:()=>xv,boolean:()=>$v,browserEmail:()=>Mee,cidrv4:()=>Iv,cidrv6:()=>bv,cuid:()=>uv,cuid2:()=>dv,date:()=>Rv,datetime:()=>Nv,domain:()=>Uee,duration:()=>hv,e164:()=>vv,email:()=>Sv,emoji:()=>Ev,extendedDuration:()=>Pee,guid:()=>yv,hex:()=>jee,hostname:()=>Lee,html5Email:()=>Dee,idnEmail:()=>$ee,integer:()=>Dv,ipv4:()=>Av,ipv6:()=>Cv,ksuid:()=>fv,lowercase:()=>Lv,mac:()=>_v,md5_base64:()=>Fee,md5_base64url:()=>Vee,md5_hex:()=>zee,nanoid:()=>gv,null:()=>Mv,number:()=>wv,rfc5322Email:()=>wee,sha1_base64:()=>Hee,sha1_base64url:()=>Gee,sha1_hex:()=>Bee,sha256_base64:()=>Wee,sha256_base64url:()=>Kee,sha256_hex:()=>qee,sha384_base64:()=>Yee,sha384_base64url:()=>Zee,sha384_hex:()=>Jee,sha512_base64:()=>Xee,sha512_base64url:()=>ete,sha512_hex:()=>Qee,string:()=>Ov,time:()=>Pv,ulid:()=>pv,undefined:()=>kv,unicodeEmail:()=>Bj,uppercase:()=>Uv,uuid:()=>Mc,uuid4:()=>Nee,uuid6:()=>Oee,uuid7:()=>xee,xid:()=>mv});var uv=/^[cC][^\s-]{8,}$/,dv=/^[0-9a-z]+$/,pv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mv=/^[0-9a-vA-V]{20}$/,fv=/^[A-Za-z0-9]{27}$/,gv=/^[a-zA-Z0-9_-]{21}$/,hv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pee=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yv=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Mc=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Nee=Mc(4),Oee=Mc(6),xee=Mc(7),Sv=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dee=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wee=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Bj=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,$ee=Bj,Mee=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kee="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ev(){return new RegExp(kee,"u")}var Av=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_v=t=>{let e=So(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},Iv=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tv=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ME=/^[A-Za-z0-9_-]*$/,Lee=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Uee=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,vv=/^\+(?:[0-9]){6,14}[0-9]$/,Hj="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Rv=new RegExp(`^${Hj}$`);function Gj(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Pv(t){return new RegExp(`^${Gj(t)}$`)}function Nv(t){let e=Gj({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Hj}T(?:${n})$`)}var Ov=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},xv=/^-?\d+n?$/,Dv=/^-?\d+$/,wv=/^-?\d+(?:\.\d+)?/,$v=/^(?:true|false)$/i,Mv=/^null$/i;var kv=/^undefined$/i;var Lv=/^[^A-Z]*$/,Uv=/^[^a-z]*$/,jee=/^[0-9a-fA-F]*$/;function Wm(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Km(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var zee=/^[0-9a-fA-F]{32}$/,Fee=Wm(22,"=="),Vee=Km(22),Bee=/^[0-9a-fA-F]{40}$/,Hee=Wm(27,"="),Gee=Km(27),qee=/^[0-9a-fA-F]{64}$/,Wee=Wm(43,"="),Kee=Km(43),Jee=/^[0-9a-fA-F]{96}$/,Yee=Wm(64,""),Zee=Km(64),Qee=/^[0-9a-fA-F]{128}$/,Xee=Wm(86,"=="),ete=Km(86);var jt=D("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Wj={number:"number",bigint:"bigint",object:"date"},kE=D("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let r=Wj[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),LE=D("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let r=Wj[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),jv=D("$ZodCheckMultipleOf",(t,e)=>{jt.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):QT(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),zv=D("$ZodCheckNumberFormat",(t,e)=>{jt.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[o,i]=ov[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=o,a.maximum=i,r&&(a.pattern=Dv)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:t})}}),Fv=D("$ZodCheckBigIntFormat",(t,e)=>{jt.init(t,e);let[r,n]=iv[e.format];t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,i.minimum=r,i.maximum=n}),t._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inst:t})}}),Vv=D("$ZodCheckMaxSize",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ca(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let o=n.value;o.size<=e.maximum||n.issues.push({origin:Vm(o),code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),Bv=D("$ZodCheckMinSize",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ca(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;o.size>=e.minimum||n.issues.push({origin:Vm(o),code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),Hv=D("$ZodCheckSizeEquals",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ca(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.size,o.maximum=e.size,o.size=e.size}),t._zod.check=n=>{let o=n.value,i=o.size;if(i===e.size)return;let s=i>e.size;n.issues.push({origin:Vm(o),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Gv=D("$ZodCheckMaxLength",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ca(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let o=n.value;if(o.length<=e.maximum)return;let s=Bm(o);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),qv=D("$ZodCheckMinLength",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ca(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;if(o.length>=e.minimum)return;let s=Bm(o);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),Wv=D("$ZodCheckLengthEquals",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!ca(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=n=>{let o=n.value,i=o.length;if(i===e.length)return;let s=Bm(o),a=i>e.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Lu=D("$ZodCheckStringFormat",(t,e)=>{var r,n;jt.init(t,e),t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Kv=D("$ZodCheckRegex",(t,e)=>{Lu.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Jv=D("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Lv),Lu.init(t,e)}),Yv=D("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Uv),Lu.init(t,e)}),Zv=D("$ZodCheckIncludes",(t,e)=>{jt.init(t,e);let r=So(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),Qv=D("$ZodCheckStartsWith",(t,e)=>{jt.init(t,e);let r=new RegExp(`^${So(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),Xv=D("$ZodCheckEndsWith",(t,e)=>{jt.init(t,e);let r=new RegExp(`.*${So(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function qj(t,e,r){t.issues.length&&e.issues.push(...Xn(r,t.issues))}var eR=D("$ZodCheckProperty",(t,e)=>{jt.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>qj(o,r,e.property));qj(n,r,e.property)}}),tR=D("$ZodCheckMimeType",(t,e)=>{jt.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),rR=D("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Jm=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
@@ -60,7 +60,7 @@ Boolean requesting whether a visible border and background is provided by the ho
60
60
  - omitted: host decides border`)}),fze=b.object({method:b.literal("ui/request-display-mode"),params:b.object({mode:dh.describe("The display mode being requested.")})}),Boe=b.object({mode:dh.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Hoe=b.union([b.literal("model"),b.literal("app")]).describe("Tool visibility scope - who can access the tool."),gze=b.object({resourceUri:b.string().optional(),visibility:b.array(Hoe).optional().describe(`Who can access this tool. Default: ["model", "app"]
61
61
  - "model": Tool visible to and callable by the agent
62
62
  - "app": Tool callable by the app from this server only`),csp:b.never().optional(),permissions:b.never().optional()}),hze=b.object({mimeTypes:b.array(b.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),yze=b.object({method:b.literal("ui/download-file"),params:b.object({contents:b.array(b.union([Qc,Xc])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Sze=b.object({method:b.literal("ui/message"),params:b.object({role:b.literal("user").describe('Message role, currently only "user" is supported.'),content:b.array(pi).describe("Message content blocks (text, image, etc.).")})}),Eze=b.object({method:b.literal("ui/notifications/sandbox-resource-ready"),params:b.object({html:b.string().describe("HTML content to load into the inner iframe."),sandbox:b.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ux.optional().describe("CSP configuration from resource metadata."),permissions:dx.optional().describe("Sandbox permissions from resource metadata.")})}),Goe=b.object({method:b.literal("ui/notifications/tool-result"),params:Ta.describe("Standard MCP tool execution result.")}),A4=b.object({toolInfo:b.object({id:jo.optional().describe("JSON-RPC id of the tools/call request."),tool:ba.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Poe.optional().describe("Current color theme preference."),styles:Uoe.optional().describe("Style configuration for theming the app."),displayMode:dh.optional().describe("How the UI is currently displayed."),availableDisplayModes:b.array(dh).optional().describe("Display modes the host supports."),containerDimensions:b.union([b.object({height:b.number().describe("Fixed container height in pixels.")}),b.object({maxHeight:b.union([b.number(),b.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(b.union([b.object({width:b.number().describe("Fixed container width in pixels.")}),b.object({maxWidth:b.union([b.number(),b.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
63
- container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:b.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:b.string().optional().describe("User's timezone in IANA format."),userAgent:b.string().optional().describe("Host application identifier."),platform:b.union([b.literal("web"),b.literal("desktop"),b.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:b.object({touch:b.boolean().optional().describe("Whether the device supports touch input."),hover:b.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:b.object({top:b.number().describe("Top safe area inset in pixels."),right:b.number().describe("Right safe area inset in pixels."),bottom:b.number().describe("Bottom safe area inset in pixels."),left:b.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),qoe=b.object({method:b.literal("ui/notifications/host-context-changed"),params:A4.describe("Partial context update containing only changed fields.")}),Aze=b.object({method:b.literal("ui/update-model-context"),params:b.object({content:b.array(pi).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b.record(b.string(),b.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Cze=b.object({method:b.literal("ui/initialize"),params:b.object({appInfo:ui.describe("App identification (name and version)."),appCapabilities:Voe.describe("Features and capabilities this app provides."),protocolVersion:b.string().describe("Protocol version this app supports.")})}),Woe=b.object({protocolVersion:b.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:ui.describe("Host application identification and version."),hostCapabilities:Foe.describe("Features and capabilities provided by the host."),hostContext:A4.describe("Rich context about the host environment.")}).passthrough(),Koe={target:"draft-2020-12"};async function S4(t,e){let r=t["~standard"];if(r.jsonSchema)return r.jsonSchema[e](Koe);throw Error(`Schema (vendor: ${r.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function E4(t,e,r=""){let n=await t["~standard"].validate(e);if(n.issues){let o=n.issues.map(i=>{let s=i.path?.map(a=>typeof a=="object"?a.key:a).join(".");return s?`${s}: ${i.message}`:i.message}).join("; ");throw Error(r+o)}return n.value}function Joe(t,e){let r={...t,...e};return e.experimental!==void 0&&(r.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(r.tools={...t.tools,...e.tools}),r}var kC=class t extends ax{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new cx;_methods=new lx;setRequestHandler=(...e)=>{let[r,...n]=h4("request",e)??e;this._methods.claim(r,"setRequestHandler"),super.setRequestHandler.call(this,r,...n)};setNotificationHandler=(...e)=>{let[r,...n]=h4("notification",e)??e;this._methods.claim(r,"setNotificationHandler"),super.setNotificationHandler.call(this,r,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...r)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...r)};_assertInitialized(e){if(this._initializedSent)return;let r=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(r);console.warn(`${r}. This will throw in a future release.`)}eventSchemas={toolinput:$oe,toolinputpartial:Moe,toolresult:Goe,toolcancelled:koe,hostcontextchanged:qoe};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!t.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e)||(this._everHadListener.add(e),!this._initializedSent))return;let r=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(r);console.warn(r)}setEventHandler(e,r){r&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,r)}addEventListener(e,r){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,r)}removeEventListener(e,r){this._events.removeEventListener(e,r)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let r=this.eventSchemas[e];if(!r)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(r.shape.method.value,{params:r.shape.params},n=>{let o=n;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...o}),this._events.dispatch(e,o)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,r,n){r&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,r={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=r,this.options=n,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!n.allowUnsafeEval&&b.config({jitless:!0}),this.replaceRequestHandler("ping",o=>(console.log("Received ping:",o.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=Joe(this._appCapabilities,e)}registerTool(e,r,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,i=()=>{o._initializedSent&&o._appCapabilities.tools?.listChanged&&o.sendToolListChanged()},s=r.inputSchema!==void 0,a={title:r.title,description:r.description,inputSchema:r.inputSchema,outputSchema:r.outputSchema,annotations:r.annotations,_meta:r._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(c){Object.assign(this,c),i()},remove(){o._registeredTools[e]===a&&(delete o._registeredTools[e],i())},handler:async(c,l)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let u;if(s){let p=a.inputSchema,m=p?await E4(p,c??{},`Invalid input for tool ${e}: `):c??{};u=await n(m,l)}else u=await n(l);return a.outputSchema&&!u.isError&&(u.structuredContent=await E4(a.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `)),u}};return this._registeredTools[e]=a,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,r)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,r)},this.onlisttools=async(e,r)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([n,o])=>o.enabled).map(async([n,o])=>{let i={name:n,title:o.title,description:o.description,inputSchema:o.inputSchema?await S4(o.inputSchema,"input"):{type:"object",properties:{}}};return o.outputSchema&&(i.outputSchema=await S4(o.outputSchema,"output")),o.annotations&&(i.annotations=o.annotations),o._meta&&(i._meta=o._meta),i}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler("ui/resource-teardown",{params:joe.shape.params,result:zoe},(r,n)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(r,n)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(r,n)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(r.params,n)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(r,n)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(r.params,n)})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,r){if(this._assertInitialized("callServerTool"),typeof e=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...r})}async readServerResource(e,r){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},r)}async listServerResources(e,r){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},r)}async createSamplingMessage(e,r){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},r)}sendMessage(e,r){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},woe,r)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,r){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Ia,r)}openLink(e,r){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},xoe,r)}sendOpenLink=this.openLink;downloadFile(e,r){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},Doe,r)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,r){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Boe,r)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,r=0,n=0,o=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let s=document.documentElement,a=s.style.height;s.style.height="max-content";let c=Math.ceil(s.getBoundingClientRect().height);s.style.height=a;let l=Math.ceil(window.innerWidth);(l!==r||c!==n)&&(r=l,n=c,this.sendSizeChanged({width:l,height:c}))}))};o();let i=new ResizeObserver(o);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new uh(window.parent,window.parent),r){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:voe}},Woe,r);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(n){throw this.close(),n}}};var _4="pxC11nAction",ls,cs,LC=Promise.resolve(),wd=0,I4,px=!1,mx,b4=!1,UC=(...t)=>{b4&&console.log("[MCP]",...t)},T4=t=>{I4=t},v4=_4,R4=()=>v4,C4=()=>new DOMException("MCP initialization was superseded by a newer initialize or disconnect call","AbortError"),ph=()=>{if(!ls)throw new Error("MCP client is not initialized");return ls},Yoe=(t,e)=>{ls!==t&&cs!==t||(px=!0,mx=e,UC("host tool result",e),I4?.(e))},Zoe={async initialize(t){wd+=1;let e=wd;px=!1,mx=void 0,v4=t.c11nToolName||_4;let r=new Set([ls,cs].filter(i=>i!==void 0));ls=void 0,cs=void 0;let n=Promise.all(Array.from(r,i=>i.close())),o=LC.catch(()=>{}).then(async()=>{if(await n,e!==wd)throw C4();let i=t.eventTarget;if(!i)try{i=window.parent}catch(c){throw new Error("MCP client cannot access window.parent",{cause:c})}let s=t.eventSource??i,a=new kC({name:t.name,version:t.version},{},{autoResize:t.autoResize??!1,strict:t.strict??!0});cs=a,a.ontoolresult=c=>Yoe(a,c);try{await a.connect(new uh(i,s))}catch(c){throw cs===a&&(cs=void 0),e===wd&&await a.close(),c}if(e!==wd)throw C4();cs=void 0,ls=a});LC=o.catch(()=>{}),await o},callTool(t,e){return UC("tool call",t.name,t.arguments),ph().callServerTool(t,e).then(r=>(UC("tool result",t.name,r),r),r=>{throw UC("tool call failed",t.name,r),r})},listResources(t,e){return ph().listServerResources(t,e)},readResource(t,e){return ph().readServerResource(t,e)},listPrompts(t,e){return ph().request({method:"prompts/list",params:t},e)},getPrompt(t,e){return ph().request({method:"prompts/get",params:t},e)},async disconnect(){wd+=1;let t=new Set([ls,cs].filter(r=>r!==void 0));ls=void 0,cs=void 0;let e=Promise.all(Array.from(t,r=>r.close()));LC=LC.catch(()=>{}).then(()=>e).then(()=>{}),await e},isConnected(){return ls!==void 0},hasReceivedToolResult(){return px},getToolResult(){return mx},setDebug(t){b4=t}},mh=Zoe;var Qoe=(t,e)=>e[E.TRACE_ID]?{type:"error",message:t.localizedValue||t.message,correlationID:e[E.TRACE_ID]}:{type:"error",message:t.localizedValue||t.message},Xoe=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),eie=t=>t?Xoe.has(t.toLowerCase()):!1,tie=(t,e)=>{if(!eie(e))return t;if(t&&t.includes("/workarea")&&!t.includes("/modal")){let r=t.lastIndexOf("/workarea");if(r!==-1)return t.slice(0,r)}return t},P4=t=>typeof t=="object"&&t!==null,rie=t=>{if(t instanceof ArrayBuffer)try{let r=new TextDecoder().decode(t),n=JSON.parse(r);return P4(n)?n:{}}catch{return{}}return P4(t)?t:{}},nie=(t,e,r,n)=>{if(t.config&&Ys(t.config.url,r))return Promise.reject(t);if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&!e.getUpdateSessionStatus()&&t.config.fetchTimeStamp>e.latestUpdateSessionTimeStamp){if($.unsubscribeAllWithEventType($d),e.setUpdateSessionStatus(!0),r?.authType==="custom"){$.publish(E.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);let{url:i,config:s,context:a}=Fb(t);return _m(i,s,a,e)}return fU(t,e,r)}if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&e.getUpdateSessionStatus()&&!zS(t.config.url)){let{url:i,config:s,context:a}=Fb(t);return k(i,s,a)}let o=rie(t.response?.data);if(t.response&&t.response.status&&t.response.status!==422&&t.response.status!==424&&!(t.response.status===400&&o.errorClassification===E.INVALID_INPUTS)&&t.config.headers.context&&t.response.data&&!n){let i=o.errorDetails&&o.errorDetails.map(a=>Qoe(a,t.response.headers)),s=tie(t.config.headers.context,o.errorClassification);return Pn({messages:i,category:"HTTP",context:s}),Promise.reject(t)}return Promise.reject(t)},N4=nie;var fx=class{languagePacks;constructor(){this.languagePacks=[]}getLocalizationBundles(e=v.getLocale()){return(this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles??this.languagePacks.find(n=>n.pyLangCode===d.DEFAULT.toUpperCase())?.pyBundles??[]).sort((n,o)=>n.pyOrder-o.pyOrder)}hasLocalizationBundles(e=v.getLocale()){let r=this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles;return!!r&&r.length>0}async loadLocaleBundle(e){let r=e.map(i=>Zt.getPageDataAsync("D_pzBundlesForLocalization","",{locale:i,onlyApp:"false"},{invalidateCache:!0})),o=(await Promise.allSettled(r)).filter(i=>i.status==="fulfilled").flatMap(i=>i.value.pyLanguagePacks);this.setLanguagePack(o)}setLanguagePack(e){e.forEach(r=>{let n=this.languagePacks.findIndex(o=>o.pyLangCode===r.pyLangCode);n!==-1?this.languagePacks[n]=r:this.languagePacks.push(r)})}},us=new fx;var gx="Accept-Language",O4=(t,e)=>Object.keys(t).some(r=>r.toLowerCase()===e.toLowerCase()),hx=class{externalHeaders;defaultHeaders;SPECIAL_CHARS;constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,r){return this.defaultHeaders[e]?!1:(this.externalHeaders[e]=r,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return{...this.getLocaleHeaders(),...this.externalHeaders}}getLocaleHeaders(){let e=v.getLocale()??v.getUseLocale();return!e||!us.hasLocalizationBundles(e)||O4(this.defaultHeaders,gx)||O4(this.externalHeaders,gx)?{}:{[gx]:e.replaceAll("_","-")}}setDefaultHeaders(e){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||e.length===0)return;let r=new URLSearchParams(globalThis.location?.search??""),n=this.buildHeaderMapFromRequestContext(e,r);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,r){let n={};return e?.forEach(o=>{Array.isArray(o.IncludeInHeaders)&&o.IncludeInHeaders.forEach(i=>{let s=i.Value,a=r.get(o.Key)??i.defaultValue;a&&(n[s]||(n[s]=[]),n[s].push(`${o.Key}=${a}`))})}),n}registerHeadersFromMap(e){Object.entries(e).forEach(([r,n])=>{n.length>0&&this.registerHeader(r,n.join("; "))})}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[d.COREHEADER_APP_DEBUG_ID]:e.debugId,[d.COREHEADER_APP_DEBUG_LEVELS]:br.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;let r=J.getProperty(d.COREHEADERS,"",e);return r?{...r,debugInfo:br.getPreviewMode()&&{...r.debugInfo,[d.COREHEADER_APP_DEBUG_LEVELS]:br.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,r,n){let o=this.getCoreHeadersFromContext(n);if(o){let i=Object.keys(e);if(i.includes(d.SKIPCOREHEADERS)){delete e[d.SKIPCOREHEADERS];return}let s=Object.assign({},...Object.values(o));Object.keys({...s}).forEach(a=>{i.includes(a)||(e[a]=s[a])})}}injectCoreAdditionalHeaders(e,r,n,o){if(o?.includeRemoteSystemIdIfPresent){let i=r?.caseTypeID?{caseTypeID:r.caseTypeID}:void 0;ae.injectRemoteCaseHeader(e,i,n)}this.processCoreHeaders(e,r,n)}},oie=new hx,Ge=oie;var fh=class{timerID;expiryBuffer;timeoutWarned;onWarnedReset;constructor(e){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1,this.onWarnedReset=e}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{let r=globalThis.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&($.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.RESET_TIMER),this.timeoutWarned=!1,this.onWarnedReset?.()),!!r)return e&&clearTimeout(e),this.startInactivityTimeout(r>60?r:60)};startInactivityTimeout=e=>{let r=setTimeout(()=>{$.publish(E.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(r),$.subscribe(E.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0},(e-this.expiryBuffer)*1e3);return this.setTimerID(r),r}};var yx=class{handlers=[];use(e,r){return this.handlers.push({fulfilled:e,rejected:r}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){for(let r of this.handlers)r!==null&&e(r)}get size(){return this.handlers.filter(e=>e!==null).length}},Sx=yx;var no={ERR_NETWORK:"ERR_NETWORK",ECONNABORTED:"ECONNABORTED",ERR_CANCELED:"ERR_CANCELED",ERR_BAD_REQUEST:"ERR_BAD_REQUEST",ERR_BAD_RESPONSE:"ERR_BAD_RESPONSE"},jC="GET",zC="content-type",Ex="accept";var iie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},sie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},x4=async(t,e)=>{switch(e){case"json":return iie(t);case"text":return t.text();case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"stream":return t.body;default:return sie(t)}},D4=t=>{let e={};return t.forEach((r,n)=>{e[n]=r}),e};var FC=()=>{let t=new AbortController;return{token:t.signal,cancel(e){t.abort(e)}}},VC=t=>t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"?!0:!!(t&&typeof t=="object"&&"code"in t&&t.code===no.ERR_CANCELED),w4=(t,e)=>{let r=t!==void 0,n=e!==void 0&&e>0;if(!r&&!n)return;if(!n&&r)return t;let o=n?e:void 0;if(o===void 0)return t;let i=AbortSignal.timeout(o);if(!r)return i;if(typeof AbortSignal.any=="function")return AbortSignal.any([t,i]);let s=new AbortController,a=()=>{s.abort(t.reason??i.reason)};return t.aborted||i.aborted?(s.abort(t.aborted?t.reason:i.reason),s.signal):(t.addEventListener("abort",a,{once:!0}),i.addEventListener("abort",a,{once:!0}),s.signal)},$4=t=>t?.reason==="TimeoutError"||t?.reason instanceof DOMException&&t.reason.name==="TimeoutError"?no.ECONNABORTED:no.ERR_CANCELED;var va=(t,e,r,n)=>{let o=new Error(t);return o.name="HttpError",o.config=e,o.code=r,o.response=n,o.isAxiosError=!0,o},Ax=(t,e)=>typeof t=="object"&&t!==null&&"name"in t&&t.name===e,Cx=t=>typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string",M4=t=>t.timeout?`timeout of ${t.timeout}ms exceeded`:"timeout exceeded",gh=(t={})=>{let e=va("canceled",t,no.ERR_CANCELED);return e.name="AbortError",e},Ra=(t,e)=>{if(e.signal?.aborted){let r=$4(e.signal),n=va(r===no.ECONNABORTED?M4(e):"canceled",e,r);return n.name=r===no.ECONNABORTED?"TimeoutError":"AbortError",n}if(Ax(t,"TimeoutError")){let r=va(M4(e),e,no.ECONNABORTED);return r.name="TimeoutError",r}if(Ax(t,"AbortError"))return gh(e);if(Ax(t,"TypeError")&&Cx(t)){let r=va(t.message||"Network Error",e,no.ERR_NETWORK);return r.isOffline=!navigator.onLine,r}if(Cx(t)&&t.message==="Network Offline"){let r=va("Network Offline",e,no.ERR_NETWORK);return r.isOffline=!0,r}if(Cx(t)){let r=va(t.message,e);return r.cause=t.cause,r}return va(String(t),e)},k4=(t,e)=>{let r;t.status>=400&&t.status<500?r=no.ERR_BAD_REQUEST:t.status>=500&&t.status<600&&(r=no.ERR_BAD_RESPONSE);let n=va(`Request failed with status code ${t.status}`,e,r,t);return n.status=t.status,n};var aie="application/json, text/plain, */*",cie="application/x-www-form-urlencoded",lie=["POST","PUT","PATCH"],uie=/[^\t\x20-\x7e\x80-\xff]+/g,L4=t=>t===" "||t===" ",die=t=>{let e=t.replace(uie,""),r=0,n=e.length;for(;r<n&&L4(e[r]);)r+=1;for(;n>r&&L4(e[n-1]);)n-=1;return e.slice(r,n)},pie=t=>{let e={};if(!t)return e;let r=new Map;for(let[n,o]of Object.entries(t))if(o!=null){let i=n.toLowerCase(),s=r.get(i)??n;r.set(i,s),e[s]=die(String(o))}return e},j4=t=>(typeof t[Symbol.iterator]!="function"&&Object.defineProperty(t,Symbol.iterator,{value(){return Object.entries(this)[Symbol.iterator]()},enumerable:!1,configurable:!0}),t),z4=t=>t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||typeof ReadableStream<"u"&&t instanceof ReadableStream,F4=t=>typeof t=="object"&&t!==null&&!z4(t),U4=(t,e)=>Object.keys(t).find(r=>r.toLowerCase()===e),_x=(t,e)=>{let r=pie(t.headers),{body:n}=t;U4(r,Ex)||(r[Ex]=aie);let o=U4(r,zC);return n===void 0||n instanceof FormData?o&&delete r[o]:!o&&!(n instanceof URLSearchParams)&&(F4(n)?r[zC]="application/json":lie.includes(e)&&(r[zC]=cie)),r},V4=t=>z4(t)||typeof t=="string"?t:JSON.stringify(t),mie=t=>{let e=(t.method??jC).toUpperCase(),r={method:e,headers:_x(t,e),credentials:t.credentials};t.body!==void 0&&t.body!==null&&e!=="GET"&&e!=="HEAD"&&(r.body=V4(t.body));let n=w4(t.signal,t.timeout);return n&&(r.signal=n),r},B4=async t=>{let e=t.url??"",r=mie(t),n;try{n=await globalThis.fetch(e,r)}catch(s){throw Ra(s,t)}let o=D4(n.headers),i;try{i=await x4(n,t.responseType)}catch(s){throw Ra(s,t)}return t.headers&&j4(t.headers),{data:i,status:n.status,statusText:n.statusText,headers:o,config:t}},fie=t=>{let e={};if(!t)return e;let r=t.trim().split(/[\r\n]+/);for(let n of r){let o=n.indexOf(":");if(o>0){let i=n.substring(0,o).trim().toLowerCase(),s=n.substring(o+1).trim();e[i]=s}}return e},H4=t=>new Promise((e,r)=>{let n=new XMLHttpRequest,o=t.url??"",i=(t.method??jC).toUpperCase();if(n.open(i,o,!0),Object.entries(_x(t,i)).forEach(([a,c])=>{n.setRequestHeader(a,c)}),t.credentials==="include"&&(n.withCredentials=!0),t.responseType==="arraybuffer"?n.responseType="arraybuffer":t.responseType==="blob"?n.responseType="blob":n.responseType="text",t.onUploadProgress&&n.upload&&n.upload.addEventListener("progress",t.onUploadProgress),t.onDownloadProgress&&n.addEventListener("progress",t.onDownloadProgress),t.signal){if(t.signal.aborted){n.abort(),r(Ra(new DOMException("The operation was aborted.","AbortError"),t));return}t.signal.addEventListener("abort",()=>{n.abort(),r(Ra(new DOMException("The operation was aborted.","AbortError"),t))},{once:!0})}t.timeout&&t.timeout>0&&(n.timeout=t.timeout),n.ontimeout=()=>{r(Ra(new DOMException("The operation timed out.","TimeoutError"),t))},n.onload=()=>{t.headers&&j4(t.headers);let a=fie(n.getAllResponseHeaders()),c;if(n.responseType==="arraybuffer"||n.responseType==="blob")c=n.response;else{let u=n.responseText;try{c=JSON.parse(u)}catch{c=u}}let l={data:c,status:n.status,statusText:n.statusText,headers:a,config:t};e(l)},n.onerror=()=>{r(Ra(new TypeError("Network Error"),t))},n.onabort=()=>{r(Ra(new DOMException("The operation was aborted.","AbortError"),t))};let s=t.body!==void 0&&t.body!==null?V4(t.body):null;n.send(s)}),G4=t=>{let e=(t.method??jC).toUpperCase(),r=_x(t,e),{body:n}=t,o=t.headers??{},i=Object.keys(o).map(s=>s.toLowerCase());Object.entries(r).forEach(([s,a])=>{i.includes(s.toLowerCase())||(o[s]=a)}),t.headers=o,F4(n)?t.data=JSON.stringify(n):n instanceof URLSearchParams&&(t.data=n.toString())};var Ix=t=>(Object.defineProperty(t,"data",{get:()=>t.body,set:e=>{t.body=e},enumerable:!1,configurable:!0}),t),q4=t=>{let e=Object.getOwnPropertyDescriptor(t,"data");return e&&"value"in e&&e.value!==void 0&&e.value!==t.body&&(t.body=e.value),Ix(t)};var gie=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},bx=t=>{if(Array.isArray(t))return t.map(bx);if(gie(t)){let e={};return Object.keys(t).forEach(r=>{e[r]=bx(t[r])}),e}return t},Tx=class{interceptors;constructor(){this.interceptors={request:new Sx,response:new Sx}}async request(e){let r=Ix({...e,...e.body!==void 0&&{body:bx(e.body)}}),n=[s=>this.dispatchRequest(s),void 0];this.interceptors.request.forEach(s=>{n=[s.fulfilled,s.rejected,...n]}),this.interceptors.response.forEach(s=>{n=[...n,s.fulfilled,s.rejected]});let o=Promise.resolve(r),i=0;for(;i<n.length;)o=o.then(n[i],n[i+1]),i+=2;return await o}async dispatchRequest(e){let r=q4(e);if(typeof r.adapter=="function")return G4(r),r.adapter(r);let n;if(r.onUploadProgress||r.onDownloadProgress?n=await H4(r):n=await B4(r),n.status>=200&&n.status<300)return n;throw k4(n,r)}get(e,r){return this.request({...r,url:e,method:"GET"})}post(e,r,n){return this.request({...n,url:e,method:"POST",body:r})}put(e,r,n){return this.request({...n,url:e,method:"PUT",body:r})}patch(e,r,n){return this.request({...n,url:e,method:"PATCH",body:r})}delete(e,r){return this.request({...r,url:e,method:"DELETE"})}static createCancelSource(){return FC()}static isCanceled(e){return VC(e)}},hie=new Tx,BC=hie;var $d="updateSession",yie=t=>typeof t!="object"||t===null||!("caseTypeID"in t)?!1:typeof t.caseTypeID=="string",yh=t=>typeof t=="object"&&t!==null,K4=t=>yie(t)?{caseTypeID:t.caseTypeID}:void 0,Sie=t=>{if(!yh(t))return!1;let{caseInfo:e}=t;return yh(e)?"errorMessage"in e:!1},ds={},Md=new aU,il={},fi={},Rx={},Px="",vx=new fh(()=>uU(fi,Md)),J4=t=>{il=t},Eie=t=>!t||typeof t!="object"?!1:"continueWithDefaultErrorHandler"in t||"error"in t,Y4=t=>{let{context:e}=t??{};if(typeof e=="string")return e},Aie=t=>yh(t)&&"config"in t,Cie=t=>yh(t),_ie=t=>t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.message==="Network Offline"||t.isOffline===!0,Iie=t=>t.message!=="Network Offline"&&!!W(d.APP.APP)?.context_data?.isOffline,bie=t=>!!(t.response&&t.response.status===401&&!t.config?.isExternalUrl&&(!t.config||!Ys(t.config.url,fi))),Tie=t=>t.response&&t.response.status&&t.response.status===Number(Px)?Px:null,HC=t=>{let e=Y4(t.config?.headers);return _ie(t)?(W(e)?.isLoading&&T({type:To,payload:{context:e}}),eU(),Promise.reject(new Error("Network Offline"))):(Iie(t)&&tU(),!t.response&&t.cause?.response&&(t.response=t.cause.response),bie(t)&&$.subscribe($d,r=>{Md.setUpdateSessionStatus(!r.updateStatus)},$d),N4(t,Md,fi,Tie(t)))},vie=(t,e)=>{if(typeof e=="boolean")return e?HC(t):Promise.reject(t);if(Eie(e)){let r=e.error??t;return e.continueWithDefaultErrorHandler??!0?HC(Aie(r)?r:t):Promise.reject(r)}return HC(t)},Rie=t=>typeof t=="function",Pie=t=>typeof t=="function",Nie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_SUCCESS,t)},Oie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_FAILURE,t)},xie=t=>{if(t?.authType==="OAuth2.0"&&t.secureCookie||t.customCookies)return!0},_t=()=>v.environmentInfoObject?.["protocol-jsonrpc"]===!0,hh=t=>typeof t=="object"&&t!==null,Nx=t=>{let e=t.content?.find(c=>c.type==="text")?.text;if(t.isError)throw new Error(e||"MCP tool call failed");let r;if(e)try{r=JSON.parse(e)}catch(c){if(!(c instanceof SyntaxError))throw c;r=e}let n=hh(r)&&"Response"in r?r.Response:r,o=hh(n)&&hh(n.outputs)?n.outputs:void 0,i=[o?.eTag,o?.etag].find(c=>typeof c=="string"),s=hh(n)?n.ViewResponse:void 0;return{data:[o?.ViewResponse,o?.ShowPageResponse,o?.PageResponse,o?.Component,o?.responseData,s].find(c=>hh(c)||typeof c=="string")??n,etag:i}},Die=(t,e)=>{let r=()=>e.abort();return t.aborted?(r(),()=>{}):(t.addEventListener("abort",r),()=>t.removeEventListener("abort",r))},pr=async(t,e,r,n)=>{let o=new AbortController,i=r?Die(r,o):void 0;try{if(o.signal.aborted)throw gh();let s={name:R4(),arguments:{ActionName:t,Payload:JSON.stringify(e)}},a={...r&&{signal:o.signal},...n!==void 0&&{timeout:n}},c=await(Object.keys(a).length>0?mh.callTool(s,a):mh.callTool(s)),{data:l,etag:u}=Nx(c);return{data:l,status:200,statusText:"OK",headers:u?{etag:u}:{},config:{url:t}}}catch(s){throw o.signal.aborted?gh():s}finally{i?.()}},wie=t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e!==Object.prototype&&e!==null},GC=({body:t,responseType:e,adapter:r})=>(e===void 0||e==="json")&&r===void 0&&!wie(t),qC=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}},ra=(t,e="root",r={})=>{let{Authorization:n,pzCTkn:o,...i}=t.headers||{};if(t.withoutDefaultHeaders)return i;Ge.injectCoreAdditionalHeaders(i,K4(t.body),e,{includeRemoteSystemIdIfPresent:r.includeRemoteSystemIdIfPresent??!0});let s={...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...i,context:e};return delete s.Authorization,delete s.pzCTkn,s},k=(t,e,r="root",n={})=>{let{doNotMergeHttpMessagesForStatusCode:o=null,cancelContext:i=r,includeRemoteSystemIdIfPresent:s=!0}=n;Px=o,t===null&&console.error("Error: url passed to Service Broker fetch is null (or) undefined");let{body:a,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:p=!1,...m}=e,{Authorization:f,pzCTkn:h,...S}=e.headers||{};if(!p){let _=K4(e.body);Ge.injectCoreAdditionalHeaders(S,_,r,{includeRemoteSystemIdIfPresent:s})}i&&ds[i]>=0?ds[i]+=1:i&&ds[i]===void 0&&(ds[i]=1);let A=p?{...S}:{...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...S,context:r};m.isExternalUrl=iU(t||""),m.fetchTimeStamp=Date.now();let C=_e.doesRestApiExist("Logout")?_e.getRestEndPoint("Logout")?.restApi:void 0,I=zS(t,C);return t&&Ys(t,fi)&&Md.getUpdateSessionStatus()||!Md.getUpdateSessionStatus()||m.isExternalUrl||I?(Ys(t,fi)&&fi?.authType==="OAuth2.0"&&(A={...S}),(!C||t&&!I)&&vx.setTimerID(vx.resetInactiveTimeout(vx.getTimerID())),mb(q(BC.request({context:r,...m,url:t??void 0,body:a,...c&&{signal:c},responseType:l,adapter:u,headers:A,credentials:xie(fi)?"include":void 0})).pipe(hb(()=>{let _=Ge.getCoreHeadersFromContext(A.context);_&&Nie({..._})}),zi(_=>{let N=A,H=!!N?.[d.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:N?.[d.COREHEADER_APP_DEBUG_ID],[d.COREHEADER_APP_DEBUG_LEVELS]:br.getDebugLevels()}}:Ge.getCoreHeadersFromContext(A.context);throw H&&Oie({...H,error:_}),_})))):_m(t,e,r,Md)},_m=(t,e,r,n)=>new Promise((o,i)=>{$.subscribe($d,s=>{if(n.setUpdateSessionStatus(!s.updateStatus),s.updateStatus==="success")k(t,e,r).then(o).catch(i);else{let{updateStatus:a}=s;i(yh(a)?a.error:void 0)}},$d)}),W4=t=>{ds[t]>0&&(ds[t]-=1,ds[t]===0&&delete ds[t])};BC.interceptors.request.use(t=>{if(!Do.isOnline())return W(t.context)?.isLoading&&T({type:To,payload:{context:t.context}}),T({type:$s,payload:{context:"app"}}),Promise.reject(new Error("Network Offline"));if(il?.request){let e=il.request;Rie(e)&&(t=e(t))}return t},t=>Promise.reject(t));BC.interceptors.response.use(t=>{if(t.status===202&&t.config.headers?.context&&Sie(t.data)){let e=[{type:"error",message:String(t.data.caseInfo.errorMessage)}],r=t.config.headers.context;return r&&r.includes("/workarea")&&(r=r.substring(0,r.lastIndexOf("/workarea"))),Pn({messages:e,category:"HTTP",context:r}),Promise.reject(t)}if(t.config.headers&&t.config.headers.context){let e=t.config.headers.context;t.config.skipClearErrorMessages||(Gt({type:"error",category:"HTTP",context:e}).length>0&&dt({type:"error",category:"HTTP",context:e}),Gt({type:"error",category:e===d.APP.APP?"PAGE":"",context:e}).length>0&&dt({type:"error",category:"PAGE",context:e}),e.slice(e.lastIndexOf("/")+1).startsWith("primary")&&(Gt({type:"error",category:"HTTP",context:d.APP.APP}).length>0&&dt({type:"error",category:"HTTP",context:d.APP.APP}),Gt({type:"error",category:"PAGE",context:d.APP.APP}).length>0&&dt({type:"error",category:"PAGE",context:d.APP.APP}))),W4(e)}if(il?.response){let e=il.response;Pie(e)&&(t=e(t))}return t},t=>{if(!Cie(t))return Promise.reject(t);let e=Y4(t.config?.headers);return e&&W4(e),il?.error?Promise.resolve(il.error(t)).then(r=>vie(t,r)):HC(t)});var Z4=t=>ds[t],pu=()=>FC(),FS=t=>VC(t),Jn=t=>{Ge.setDefaultHeaders(t)},Hi=t=>{fi={...fi,...t}},rU=t=>{Rx={...Rx,...t}},nU=()=>({...Rx}),Cm=()=>({...fi});var Ox=class t{static createCase(e,r){let{caseInfo:n,startingFields:o,flowType:i,viewType:s=it.PAGE,pageName:a,context:c=d.APP.APP,debugInfo:l,headers:u,theType:p,retrieveActionViewForNewObject:m=!1,scope:f}=r,h={};n&&n.content&&(h=n.content);let{content:S={},pageInstructions:A}=t.getExternalCaseOrObjectContent(e,m,c),C={[t.getKeyBasedOnWorkType(e)]:e,content:{...h,...o,...S}};if(C={...C,...A&&{pageInstructions:A},...!B.isObjectCaseType(e)&&{processID:i}},p==="CREATE_EXTERNAL_CASE"){let _=W(c)?.caseInfo?.content;if(_&&Object.keys(_).length>0){let N=f?.Namespace&&f?.RuleResolutionID?{..._,[d.getDefaultQualifiedName("Scope")]:{[d.getDefaultQualifiedName("Namespace")]:f.Namespace,[d.getDefaultQualifiedName("RuleResolutionID")]:f.RuleResolutionID}}:_,x=g.pruneKeys(N,new Set(["pxObjClass",P.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",P.getDefaultQualifiedName("EmbedListUUID__")]),!1);C.content[d.getDefaultQualifiedName("pyAddCaseContextPage")]=x}}let I=t.getObjectTypeViewPayload(m,e);return ve(B.getRouteKeyForCreateWork(e,m),{body:C,queryPayload:{...I,...B.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:s,params:{pageName:a}},headers:{...u,...l&&{...Ge.addDebugHeaders(l)}}},c).then(_=>({response:_.data,requestPayload:C,headers:we(_.headers,e,u)}))}static getObjectTypeViewPayload=(e,r)=>e?B.shouldUseUnifiedHandling()?{casetypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,r,n)=>{let o=B.isExternalObject(e),i=B.isExternalCaseType(e);if((i||o)&&!r){let s=Rt(n,{isExternalObject:!!(!i&&o)}),{content:a,pageInstructions:c}=s.content;return{content:a,pageInstructions:c}}return{}};static getKeyBasedOnWorkType=e=>B.shouldUseUnifiedHandling()?"caseTypeID":B.isObjectCaseType(e)?"objectTypeID":"caseTypeID"},gi=Ox;var $ie=()=>({registerHeader:(...t)=>Ge.registerHeader(...t),unRegisterHeader:(...t)=>Ge.unRegisterHeader(...t),getRegisteredHeaders:()=>Ge.getRegisteredHeaders()}),ve=(t,{body:e={},queryPayload:r={},cancelTokenSource:n,headers:o={},responseType:i},s,a)=>{if(_t()&&GC({body:e,responseType:i}))return pr(t,{queryPayload:r,body:qC(e),headers:o},n?.token);let{restApi:c,reqType:l}=U(t,r),u={method:l,headers:o,body:e,...i&&{responseType:i}};n&&(u.signal=n.token);let p=t==="createWork"?B.appendExcludeQueryParamToUrl(c):c;return k(p,u,s,a??{})},AT=(t,{method:e="GET",body:r={},headers:n={},withoutDefaultHeaders:o=!1,responseType:i,adapter:s,signal:a},c)=>{t.startsWith("http:")||t.startsWith("https:")||(t=gt.getServerURL()+t);let l={method:e,headers:n,body:r,withoutDefaultHeaders:o,...i&&{responseType:i},...s&&{adapter:s},...a&&{signal:a}};return k(t,l,c)},Zs=t=>_e.doesRestApiExist(t),hi=()=>pu(),Sh=t=>FS(t),Mie=t=>{J4(t)},kie=()=>gi;var xx=new Set;function Q4(){xx.clear()}function Eh(t){try{let e=new URL(t);(e.protocol==="https:"||e.protocol==="http:")&&xx.add(e.origin)}catch{}}function X4(t){let e;try{let n=globalThis.location;e=n?new URL(t,n.href).origin:new URL(t).origin}catch{throw new Error("Blocked: malformed URL")}let r;try{let n=globalThis.location;r=n?.origin??(n?new URL(n.href).origin:"")}catch{r=""}if(e!==r&&!xx.has(e))throw new Error(`Blocked: untrusted script origin "${e}"`)}var eV="getCustomComponent",Lie="getBinaryFile",Uie="getOperatorImage",KC="text/javascript",jie=100,tV=3e4,rV=t=>{let e=document.createElement("script");e.type=KC,e.textContent=t,document.head.appendChild(e)},aV=t=>{let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=1)r[n]=e.charCodeAt(n);return r},zie=t=>{if(typeof t!="string")throw new TypeError(`Custom component response must be a string, received: ${JSON.stringify(t)?.slice(0,300)}`);return new TextDecoder().decode(aV(t))},Fie=12e4,nV=Promise.resolve(),Vie=t=>{let e=nV.then(t);return nV=e.catch(()=>{}),e},oV=async(t,e)=>{let r=Object.entries(e).filter(([,i])=>i);if(_t()){let i=await Vie(()=>pr(eV,{queryPayload:{componentName:t,...Object.fromEntries(r)},body:{},headers:{}},void 0,Fie));return zie(i.data)}let n=r.map(([i,s])=>`${i}=${s}`).join("&");return(await ve(eV,{queryPayload:{componentName:n?`${t}?${n}`:t}})).data},cV=new Set(["jpg","jpeg","png","gif","webp","bmp","tif","tiff","svg","ico","heic","heif","avif"]),Bie=/^DATA-CONTENT-IMAGE\s+[^!]+!([^!]+)!\/OPERATORIMAGES\/$/i,iV=/url\(\s*(?:(['"])([^'"\r\n]+)\1|([^'"\s)][^'"\r\n]*?))\s*\)/gi;function lV(t){return t.toLowerCase().split("!").pop()||""}function Dx(t){return t.includes("?")||t.includes("#")?!1:cV.has(lV(t))}function Hie(t){let e=t.match(Bie);return e?cV.has(e[1].toLowerCase()):Dx(t)}function sV(t){let e;try{e=new URL(t).protocol}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if(e!=="http:"&&e!=="https:")throw new Error(`Component fetch blocked: unsupported dev server URL scheme "${e}"`)}var wx=class{loaderObj;staticServerURL;appStaticUrl;pegaOnlyUrl;loadedAssets;componentsConfig;appAlias;b2sJWT;ccV2LibId;isolationID;imageBlobUrlCache;isolationAssetBlobCache;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.isolationID=null,this.imageBlobUrlCache={},this.isolationAssetBlobCache=new Map}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){let e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then(r=>r.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,r={}){let n="",o=0;return e.forEach(i=>{n+=`${o===0?"?":"&"}field${o}=${i.field}&value${o}=${i.value}`,o+=1}),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,r):this.getSvcComponentsConfigCombinedUrl(e,n,r)}async getSvcComponentsConfigSeparatedUrls(e,r,n){let o=v.getBuiltOnAppNames(),i=this.loadAndFilterPegaComponentsConfig(e,o),s=Promise.resolve([]);n.skipLoadCustomerComponents!==!0&&(s=this.loadAndCustomerComponentsConfig(r,e));let a=[];if(v.environmentInfoObject?.pyInfinityStaticService){let l=[],u=await Promise.all([i,s]),[p,m]=u,f=[];for(let S of m)S.isSdkOverridden===!0?l.push(S.componentDefinition):f.push(S.componentDefinition);let h=this.mergeComponentList([p,f,l]);a.push(...h)}else{let l=this.fetchSDKComponent(r);await Promise.all([i,s,l]).then(u=>{let p=this.mergeComponentList(u);a.push(...p)})}if(n.alternateDesignSystemURL&&a.length===1){let l=await this.getSvcComponentsConfigADS(e,r,n);a[0].alternateDesignSystemConfig=l}return{data:{components:a}}}mergeComponentList=e=>{let[r=[],n=[],o=[]]=e,i="alternateDesignSystemConfig",s=[...r,...n];return this.appStaticUrl?s.map(a=>{let{name:c,type:l,subtype:u}=a,p=o.reduce((m,f)=>(c===f.name&&l===f.type&&u===f.subtype&&(m=f),m),{});return Object.keys(p).length>0?{...a,[i]:{...p}}:a}):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let r=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.json()).then(n=>n.components).catch(()=>[])}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,r){return this.loadPegaComponentsConfig().then(()=>{let n=[];return this.componentsConfig&&this.componentsConfig.forEach(o=>{let i=!0;e.forEach(s=>{Array.isArray(o[s.field])?o[s.field].includes(s.value)||(i=!1):o[s.field]!==s.value&&(i=!1)}),i&&this.checkForBuiltOnSupport(r,o.allowedApplications)&&n.push(o)}),n})}async loadPegaComponentsConfig(){let e=null;if(this.componentsConfig===null){let r=`${this.staticServerURL}components/componentsconfig.json?v=${new Date().getTime()}`;e=fetch(r,{method:"GET"}).then(n=>n.json()).then(async n=>{this.componentsConfig=n,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then(o=>{o&&o.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(o))}).catch(o=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${o}`)})}).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let r=null;return r=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>{if(!n.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(n.statusText);return n}).then(n=>n.json()).then(n=>Promise.resolve(n)).catch(n=>(console.error(`Exception while fetching custom component config from library ${e} : ${n}`),{error:n.message})),r}async loadAndCustomerComponentsConfig(e,r){let n=null;if(v.environmentInfoObject?.pyInfinityStaticService){let i={};r.forEach((s,a)=>{i[`field${a}`]=s.field,i[`value${a}`]=s.value}),n=PCore.getDataPageUtils().getDataAsync(P.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",i).then(s=>s.data.map(a=>{let c=JSON.parse(a.pxComponentDefinition),l=a.pyIsSDKOverridden!==void 0?a.pyIsSDKOverridden:!1;return{componentDefinition:c,isSdkOverridden:l}}))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let i=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(i,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>s.components).catch(()=>[])}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,r){if(!e||!r||e.length===0||r.length===0)return!0;let n=e.split(",");return n.length===0?!0:n.some(o=>r.includes(o))}async getSvcComponentsConfigCombinedUrl(e,r,n){let o=`${this.staticServerURL}v102/${this.appAlias}/componentslist${r}`,i=await fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>({data:s}));if(n.skipLoadCustomerComponents===!0&&i?.data?.components?.length>0&&(i.data.components=i.data.components.filter(s=>s.componentKey===void 0)),n.alternateDesignSystemURL&&i?.data?.components?.length===1){let s=await this.getSvcComponentsConfigADS(e,r,n);i.data.components[0].alternateDesignSystemConfig=s}return i}getSvcComponentsConfigADS(e,r,n){let o=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(o,{method:"GET"}).then(i=>{if(i.ok)return i.json();throw new Error(i.statusText)}).catch(i=>({error:i.message}))}getSvcImage(e){let r=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.blob()).catch()}getSvcImageUrl(e){try{let r=v.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:o,callUrl:i}=this.buildImageRequest(e,r);return Hie(e)?(this.imageBlobUrlCache[i]||(this.imageBlobUrlCache[i]=this.fetchImage(n,o,i,r)),this.imageBlobUrlCache[i]):Promise.resolve("")}catch{return Promise.resolve(null)}}buildImageRequest(e,r){let n=Lie,o,i=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(r){let s=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(s);if(a){let c=a[1]?.trim();if(c)n=Uie,o={user_ID:c.toLowerCase()};else throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id")}else o={fileID:e};i=U(n,o)?.restApi||i}return{callUrlKey:n,queryPayload:o,callUrl:i}}fetchImage(e,r,n,o){return o?ve(e,{queryPayload:r}).then(i=>{let s=this.decodeBase64ToByteArray(i.data),a=this.getMimeTypeFromKey(r?.fileID||r?.user_ID||""),c=new Blob([s],{type:a});return window.URL.createObjectURL(c)}).catch(i=>{throw console.error("Error fetching image:",i),i}):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(i=>i.blob()).then(i=>window.URL.createObjectURL(i)).catch()}decodeBase64ToByteArray(e){return aV(e)}getMimeTypeFromKey(e){let r={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",ico:"image/vnd.microsoft.icon",heic:"image/heic",heif:"image/heif",avif:"image/avif"},n=lV(e);return r[n]?r[n]:"application/octet-stream"}isStaticContentReference(e){let r=e.trim();return!r||/^[a-z][a-z\d+.-]*:/i.test(r)||r.startsWith("//")?!1:g.isWebFilePath(r)}async resolveImageSource(e){if(!this.isStaticContentReference(e))return typeof e=="string"?e:"";let r=g.normalizeStaticContentKey(e);if(!Dx(r))return"";let n=await this.getSvcImageUrl(r);return typeof n=="string"&&n?n:""}async resolveBackgroundImage(e){let r=await Promise.all([...e.matchAll(iV)].map(async([n,,o,i])=>{let s=o??i;if(!s||!this.isStaticContentReference(s))return n;if(!Dx(g.normalizeStaticContentKey(s)))return"none";let a=await this.resolveImageSource(s);return a?n.replace(s,a):"none"}));return e.replace(iV,n=>r.shift()??n)}async resolveThemeBackgroundImages(e){if(!this.themeHasBackgroundImage(e))return e;if(Array.isArray(e))return Promise.all(e.map(r=>this.resolveThemeBackgroundImages(r)));if(e&&typeof e=="object"){let r=await Promise.all(Object.entries(e).map(async([n,o])=>[n,await this.resolveThemeBackgroundImages(o)]));return Object.fromEntries(r)}return typeof e=="string"&&e.includes("url(")?this.resolveBackgroundImage(e):e}themeHasBackgroundImage(e){return Array.isArray(e)?e.some(r=>this.themeHasBackgroundImage(r)):e&&typeof e=="object"?Object.values(e).some(r=>this.themeHasBackgroundImage(r)):typeof e=="string"&&e.includes("url(")}getSvcLocale(e,r){let n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${r}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){let e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(r=>r.json()).catch(()=>[])}async getSvcComponent(e){try{let r=v.environmentInfoObject?.pyC11nDXCBDevURL;if(r){let i=r.replace(/\/+$/,"");sV(i);let s=await fetch(`${i}/index.js`);if(!s.ok)throw new Error(s.statusText);return await s.text()}if(v.environmentInfoObject?.pyInfinityStaticService||_t()){let i=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=i?g.parsePegaDateTimeToTimestamp(i):null;return await oV(e,{v:s})}let o=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!o.ok)throw new Error(o.statusText);return await o.text()}catch(r){throw console.error("Error fetching service component:",r),r}}async importCustomComponentMap(e,r){try{let n=v.environmentInfoObject?.pyInfinityStaticService||_t(),o=v.environmentInfoObject?.pyC11nDXCBDevURL,i=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(o&&(sV(o),i=`${o.replace(/\/+$/,"")}/index.js`),n&&!o){let c=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,l=await oV(e,{v:g.parsePegaDateTimeToTimestamp(c),libV:g.parsePegaDateTimeToTimestamp(r)});await this.appendCustomScriptToHead(l);return}if(n||o){if(typeof document>"u")return;await new Promise((c,l)=>{let u=document.createElement("script");u.src=i,u.type="text/javascript";let p=setTimeout(()=>{l(new Error(`Timed out waiting for custom component script to load: ${i}`))},tV);u.onload=()=>{clearTimeout(p),c()},u.onerror=()=>{clearTimeout(p),l(new Error("Error while appending custom component map"))},document.head.appendChild(u)});return}let s=await fetch(i,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});s.ok||console.error("Error while fetching custom component map");let a=await s.text();this.setCCV2LibId(e),await this.appendCustomScriptToHead(a)}catch(n){console.error("Exception while appending custom component map (or load blocked):",n)}}async appendCustomScriptToHead(e){if(!(typeof document>"u"))try{if(_t()){rV(e);return}await new Promise((r,n)=>{let o=document.createElement("script");o.src=window.URL.createObjectURL(new Blob([e],{type:KC}));let i=setTimeout(()=>{n(new Error("Timed out waiting for custom component script to load"))},tV);o.onload=()=>{clearTimeout(i),r()},o.onerror=()=>{clearTimeout(i),n(new Error("Error while appending custom component map"))},document.head.appendChild(o)})}catch(r){console.error("Exception appendCustomScriptToHead:",r)}}loadSvcComponent(e){return new Promise((r,n)=>{this.getSvcComponent(e).then(o=>{if(typeof document>"u"){n(e);return}if(_t()){rV(o),r(e);return}let i=document.createElement("script");i.src=window.URL.createObjectURL(new Blob([o],{type:KC})),i.onload=()=>r(e),i.onerror=()=>n(e),document.head.appendChild(i)}).catch(o=>{console.error(`Failed to load service component ${e}:`,o),n(e)})})}initServer(e,r,n){console.log(`asset-loader.initServer(${e}, ${r})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,this.isolationID=null,this.isolationAssetBlobCache=new Map,Q4(),e&&r&&r!=="no-appstatic"&&r!=="no-cdn"?(this.appStaticUrl=r.endsWith("/")?r:`${r}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Eh(this.staticServerURL),Eh(this.appStaticUrl)):e&&r&&r==="no-appstatic"?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Eh(this.staticServerURL)):e&&r&&r==="no-cdn"&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Eh(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,r){this.loaderObj[e]=r}getLoader(e){let r;return e?r=this.loaderObj[e]:r=(o,i)=>new Promise((s,a)=>{if(typeof document>"u"){a(o);return}let c=document.createElement(i);if(i==="script"){let l=c;l.onload=()=>{s(o)},l.onerror=()=>{a(o)},l.type=KC,l.charset="UTF-8",l.async=!1,l.src=o}else{let l=c;l.type="text/css",l.rel="stylesheet",l.href=o}document.head.appendChild(c)}).catch(s=>{console.log(s)}),r}loadAssets(e,r){let{isDevServerMode:n}=r;if(!e)return Promise.resolve();let o=[];return e.forEach(i=>{let s=Object.keys(i)[0],a=n?Object.values(i)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,!this.loadedAssets[s]&&(s.includes(".js")?o.push(this.getLoader()(a+s,this.getTypes.SCRIPT)):s.includes(".css")&&this.getLoader()(a+s,this.getTypes.STYLE),this.loadedAssets[s]=!0)}),Promise.all(o)}getAssetsFromIsolations(e){let r=this.getIsolationID(),{restApi:n,reqType:o}=Tc("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},i=`${this.appStaticUrl}${n}`,s=this.isolationAssetBlobCache.get(i);if(s)return this.isolationAssetBlobCache.delete(i),this.isolationAssetBlobCache.set(i,s),s;let a=fetch(i,{method:o,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(c=>{if(!c.ok)throw new Error(`Failed to fetch isolation asset: ${c.status} ${c.statusText}`.trim());return c.blob()}).catch(c=>{throw this.isolationAssetBlobCache.delete(i),c});return this.isolationAssetBlobCache.set(i,a),this.evictIsolationAssetBlobCacheOverflow(),a}evictIsolationAssetBlobCacheOverflow(){for(;this.isolationAssetBlobCache.size>jie;){let e=this.isolationAssetBlobCache.keys().next().value;if(!e)return;this.isolationAssetBlobCache.delete(e)}}getIsolationID(){if(this.isolationID===null){let e=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",r=decodeURIComponent(globalThis.atob(e).split("").map(o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),n=JSON.parse(r);this.isolationID=n?.tenant_id}return this.isolationID}},Be=new wx;var $x=class{c11nEnv;constructor(e){this.c11nEnv=e}validate(e,r){let{value:n}=this.c11nEnv.getStateProps();if(!r&&(r=n,!r)){let s=this.c11nEnv.getComponentConfig(),a=this.c11nEnv.getStateProps();s.selectionMode==="multi"?r=a.selectionList:s.renderMode==="Editable"?r=a.referenceList:s.selectionMode==="single"?r=a.selectionKey:r=a.value}let o=Pj(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),r),{message:i}=Dt.validate(this.c11nEnv.getComponentName()?.toLowerCase(),r,e,o);return i?{status:!1,message:i}:{status:!0}}validateEmail(e,r={}){let n=Dt.getValidator("email");if(!n)return{status:"success"};let o=n(e,r);return o?{status:"failure",message:o}:{status:"success"}}},uV=$x;var dV=(t,e,r,n,o)=>{if(o!==d.RESOURCE_STATUS.CREATE)return;ke.isStateMachineExist(t,e,r)||ke.setStateMachine(t,r,e,new yc(r,e,t)),ke.getStateMachine(t,e,r).insert({},typeof n=="string"?n:n+1,!0,{isDefault:!0})},pV=(t,e,r,n,o)=>{typeof e=="string"&&t.data?.caseInfo?.content&&r&&(n==="CREATE"||n==="UPDATE")&&(t.data.caseInfo.content[o][e][r]=e)},mV=t=>{let e=!t.isLocalAction&&t.editType===d.ACTION;return{...e?{}:{activeActionID:t.actionID},assignments:[{ID:t.assignmentID,...e?{actions:[{ID:t.actionID}]}:{}}]}},fV=t=>{let{CASE_INFO:e}=E,r=(o,i)=>J.getPropertyValue(o,"",i),n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,t);for(;n;){let o=r(e.ASSIGNMENT_ID,n),i=r(e.ACTIVE_ACTION_ID,n),s=r(e.ASSIGNMENTACTION_ID,n);if(o||i||s)return{assignmentID:o,activeActionID:i,assignmentActionID:s,isLocalAction:r(e.IS_LOCAL_ACTION,n)};n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,n)}};var JC="OPEN_PROCESS_ACTION";var Pa="OPEN_ASSIGNMENT";var Ah="DELETE_CASE_IN_CREATE_STAGE",gV=t=>({type:Ah,payload:t});var yi="SAVE_AND_CLOSE",sl=t=>({type:yi,payload:t});var Gie="DELETE_DATA_OBJECT",hV=t=>({type:Gie,payload:t});var Mx="DELETE_WORK",kx=t=>({type:Mx,payload:t});var Lx=class{static getSavableDataPage(e){return Ux(e)}static getLookUpDataPage(e){return zx(e)}static getLookUpDataPageInfo(e){return Fx(e)}static getDataPageKeys(e){return jx(e)}},Si=Lx;var Vx=class{static getPropertyName(e){return fe.getPropertyName(e)}static isProperty(e){return fe.isProperty(e)}static getLeafPropertyName(e){return fe.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},_r=Vx;var Bx=class t{static createContainerPConnect(e,r,n,o=!1){let{accessedOrder:i,items:s}=e;if(i&&s){let a=i[i.length-1];if(s[a]?.view&&Object.keys(s[a].view).length>0){let c=s[a],l=a.substring(0,a.lastIndexOf("_")),{view:u,context:p}=c,{viewName:m,viewContext:f}=this.processRootViewDetails(u,c,r);if(!m)return null;let h={meta:u,options:{context:p,pageReference:f||r,containerName:n,containerItemID:a,parentPageReference:r,hasForm:o||n===ge.WORKAREA||n===ge.MODAL||m===d.CREATE_DETAILS_VIEW_NAME,target:l}};return ct(h).getPConnect}}return null}static processRootViewDetails(e,r,n){let{config:{context:o,name:i}={}}=e,{context:s}=r,a=i,c=o,l=_r.isProperty(i),u=_r.isProperty(o);if(u){let p=_r.getPropertyName(o);c=oe(`.${p}`,p.startsWith(".")?n:"",s)}if(c||(c=n),l){let p=_r.getPropertyName(i);a=oe(`.${p}`,c,s)}return l&&u&&a!==""&&(a=i,c=o),{viewName:a,viewContext:c}}static addFlowContainerItem(e){let r=e.getContainerManager(),n=e.getContextName(),o=e.getValue("context_data.caseViewMode"),i,s;if(o!=="review"){let a=n.substring(0,n.lastIndexOf("_")),c=se(a),l=We(a,c);l&&({key:i,flowName:s}=l)}r.addContainerItem({semanticURL:"",key:i,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{let r=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${r}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(d.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID);return r.find(i=>i.ID===n)?.name||""};static getFirstCaseActionName=e=>e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||"";static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{let r=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1};static getChildCaseAssignments=e=>{let r=e.getValue(d.CASE_INFO.CHILD_ASSIGNMENTS),n=[];return r&&r.length>0&&r.forEach(({assignments:o=[],Name:i,caseTypeID:s})=>{let a=o.map(c=>({...c,caseName:i,caseTypeID:s}));n=n.concat(a)}),n};static hasAssignments=e=>{let r=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=t.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0||t.isCaseWideLocalAction(e))};static showBanner=e=>{let r=e();return t.hasNotificationMessages(r)||!t.hasAssignments(r)};static showTodo=e=>e.getValue("context_data.caseViewMode")!=="perform";static isRenderWithToDoWrapper=(e,r)=>{let n=e(),{showWithToDo:o}=r;return o&&(!t.isCaseWideLocalAction(n)||t.showTodo(n))};static getToDoAssignments=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ASSIGNMENT_LABEL),o=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],i=t.getChildCaseAssignments(e)||[],s=JSON.parse(JSON.stringify(i));s=s.map(l=>(l.isChild=!0,l));let a=[...o,...s],c=JSON.parse(JSON.stringify(a));return r&&!t.showTodo(e)&&(c=c.map(l=>(l.name=t.getActiveCaseActionName(e)||l?.name||n,l))),c}},YC=Bx;var Hx=class{c11nEnv;constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{let r=w.getNextActionMgrId(),n,o,i=new Promise((s,a)=>{n=s,o=a});if(n&&o)w.register(r,i,n,o,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:i}};initializeContainers(e){let r=Kl,n=this.c11nEnv,o=n.getContextName(),i=n.getContainerName(),s={context:o,name:i,type:d.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:c}=this.containerManagerPromise(r),l={...s,...e,actionMgrID:a};return T(Gx(l)),c}addContainerItem(e){let r=St,n=this.c11nEnv,o=n.getMetadata(),{children:i}=o||{},s;Array.isArray(i)&&i.length>0&&([s]=i);let a=n.getContextName(),c=n.getContainerName(),l=lr(c,a,e?.containerType===d.CONTAINER_TYPE.SINGLE),u=Z(c,a),p={root:{...s,config:{...s?.config,context:s?.config?.context||n.getPageReference?.()}},containerItemID:l,context:l,target:u,containerName:c};e=JSON.parse(JSON.stringify(e)),[d.WORKAREA].includes(c)&&delete e.data?.coreHeaders;let{actionMgrID:m,promise:f}=this.containerManagerPromise(r),h={...p,...e,actionMgrID:m};return T(Pt(h)),f}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));let r=kt,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(tr(c)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));let r=nr,o={target:te(e.containerItemID)},{actionMgrID:i,promise:s}=this.containerManagerPromise(r),a={...o,...e,actionMgrID:i};return T(rr(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));let r=Ze,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(Qe(c)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));let r=qo,n=Dc(e),{actionMgrID:o,promise:i}=this.containerManagerPromise(r),s={...n,...e,actionMgrID:o};return T(wc(s)),i}addTransientItem(e){let{id:r,data:n,sourceContainerItemId:o}=e,i=this.c11nEnv.getContextName(),s=eb(r,i),a=Ei(i);if(s&&a.includes(s))return s;let c=n;if(o){let l=W(o);if(!l)throw new Error(`addTransientItem: source container item "${o}" not found in store`);c=g.deepClone(l)}return T(qx({transientItemID:s,contextName:i,target:te(i),data:c})),s}updateTransientData(e){let{transientItemID:r,data:n}=e,o=this.c11nEnv.getContextName();if(r){if(!Ei(o).includes(r))return}else return;T(_h({transientItemID:r,data:n}))}removeTransientItem(e){let r=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:o,transientItemID:i}=e;if(i&&o){if(!Ei(r).includes(i))return}else return;T(Ih({target:n,containerItemID:o,transientItemID:i}))}createContainerPConnect(e,r,n,o=!1){YC.createContainerPConnect(e,r,n,o)}hasContainerItems(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return jr(`${e}/${r}`)}isContainerInitialized(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return Ch(e,r)}},kd=Hx;var Wx=class extends ub{constructor(e,r){super(r)}},ee=(...t)=>Qo(e=>t.includes(e.type)),yV=(...t)=>(e,r)=>new Ot(n=>{let o=t.map(i=>i(e,r).subscribe(n));return()=>{o.forEach(i=>i.unsubscribe())}}),qie=t=>typeof t!="object"||t===null||!("type"in t)?!1:typeof t.type=="string",SV=()=>{let t=new Ws,e=null,r=null,n=o=>(r=o,e=new Wx(t.asObservable(),o.getState()),i=>s=>{let a=i(s);return e?.next(o.getState()),qie(s)&&t.next(s),a});return n.run=o=>{if(!e||!r)throw new Error("Epic middleware must be added to the store before calling run().");return o(t.asObservable(),e).subscribe(i=>{r?.dispatch(i)})},n};var me=(t,e,r)=>zi(n=>(n?.code!=="ERR_CANCELED"&&console.error(t,n),ye(Qi(t,n,e,null,r))));var gr=(t,e)=>r=>new Ot(n=>{let o={},i=0;return r.pipe(z(s=>{let a=Date.now(),c;return e?c=e:c=lo,c&&c(s,o)&&a-i<t?gc():(o=s,i=a,ye(s))})).subscribe(n)});var Wie="Error occurred during ajax call at createDataObject Epic",Kie=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o}=t,i={data_view_ID:e},{restApi:s,reqType:a}=U(jk,i),{content:c}=Rt(o);return q(k(s,{method:a,headers:n,body:{data:c.content,pageInstructions:c?.pageInstructions}},o)).pipe(O(l=>({response:l.data,actionInPayload:t})),me(Wie,r))},EV=Kie;var Jie="CREATE_DATA_OBJECT",ZC=t=>({type:Jie,payload:t});var Kx=t=>{let e=0,r=[];return t.pipe(ee(eu),gr(100),Ft(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),ye([])}return ye(n.payload).pipe(z(i=>EV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),{actionsOut:r,data:void 0}}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),{actionsOut:r,data:i?.response}}),O(({data:i})=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,i),T(r),r=[],r)))}))};var Yie="Error occurred during ajax call at getDataObjectView Epic",Zie=t=>{let{dataLookUp:e,context:r,headers:n,viewName:o,requestPayload:i}=t,s={data_view_ID:e,view_ID:o},{restApi:a,reqType:c}=U(Vk,s);return q(k(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:we(l.headers),actionInPayload:t})),me(Yie,r))},AV=Zie;var Qie="VIEW_DATA_OBJECT",QC=t=>({type:Qie,payload:t});var Jx=t=>{let e=0,r=[];return t.pipe(ee(aS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>AV(n)),z(async n=>{if(n&&n.type===Te){let{payload:S}=n,A=ue({...n,...S,actionMgrID:e});return r.push(A),r}let{actionInPayload:o,response:i,headers:s={}}=n,{containerName:a,readOnly:c,actionName:l}=o,u=Z(a,o.context),p=st(u,a,o.context),m={acName:u,context:p};if(i?.data?.dataInfo){let{dataInfo:S}=i.data;S.dataContext||=o.dataLookUp,S.dataContextParameters||=o.requestPayload}await Pe(i,o,m);let h=$e(i,{target:u,context:p,containerItemID:p,headers:s});return h.resourceType=E.RESOURCE_TYPES.DATA,h.resourceStatus=E.RESOURCE_STATUS.UPDATE,h.readOnly=c,h.actionName=l,h.key=JSON.stringify(o.requestPayload),r.push(V(Pt,h)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var Xie="Error occurred during ajax call at updateDataObject Epic",ese=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o,key:i}=t,s={data_view_ID:e},{restApi:a,reqType:c}=U(Bk,s),{content:l}=Rt(o);return q(k(a,{method:c,headers:{...n,"if-match":t?.etag},body:{data:{...l.content,...i},pageInstructions:l.pageInstructions||[]}},o)).pipe(O(u=>({response:u.data,actionInPayload:t})),me(Xie,r))},CV=ese;var tse="UPDATE_DATA_OBJECT",XC=t=>({type:tse,payload:t});var Yx=t=>{let e=0,r=[];return t.pipe(ee(tu),gr(100),Ft(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),ye([])}return ye(n.payload).pipe(z(i=>CV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),r}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var rse="Error occurred during ajax call at getDataObjectView Epic",nse=t=>{let{lookupDatapage:e,context:r,headers:n,actionID:o,dataViewParameters:i}=t,s={data_view_ID:e,action_ID:o},{restApi:a,reqType:c}=U("openDataObjectAction",s);return q(k(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:we(l.headers),actionInPayload:t})),me(rse,r))},_V=nse;var Zx=t=>{let e=0,r=[];return t.pipe(ee(cS),gr(100),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>_V(o)),z(async o=>{if(o&&o.type===Te){let{payload:C}=o,I=ue({...o,...C,actionMgrID:e});return r.push(I),r}let{actionInPayload:i,response:s,headers:a={}}=o,{containerName:c,actionID:l,context:u,actionName:p}=i,m=Z(c,i.context),f=lr(c,u);f=Yr(u,f);let h={target:m,context:f,containerItemID:f,headers:a,resourceType:E.RESOURCE_TYPES.DATA,resourceStatus:E.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(i.dataViewParameters),actionID:l,actionName:p,hideDefaultActionButtons:s?.uiResources?.hideDefaultActionButtons===!0};if(s?.data?.dataInfo){let{dataInfo:C}=s.data;C.dataContext||=i.lookupDatapage,C.dataContextParameters||=i.dataViewParameters}await Pe(s,i,{acName:m,context:u});let A=$e(s,h);return r.push(V(Pt,A)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var ose="Error occurred during ajax call at getDataObjectView Epic",ise=t=>{let{savableDatapage:e,context:r,headers:n,actionID:o,keys:i,containerItemID:s,jsActionQueryParams:a}=t,c={data_view_ID:e,action_ID:o},{restApi:l}=U("submitDataObjectAction",c),{reqType:u}=U("submitDataObjectAction",c),{content:p}=Rt(s);return l=fu(a,l),q(k(l,{method:u,headers:{...n,"if-match":t?.etag},body:{data:{...p?.content,...i},pageInstructions:p?.pageInstructions||[]}},r)).pipe(O(m=>({response:m.data,actionInPayload:t})),me(ose,r))},IV=ise;var sse=(t,e,r,n)=>{let{resourceType:o,key:i,containerItemID:s}=n,a=$e(r,e);a.resourceType=o||E.RESOURCE_TYPES.DATA;let c=Po(s);t.push(V(Qe,a));let l=oe(".dataContext","dataInfo",c),u=oe(".dataContextParameters","dataInfo",c),p={context:c,skipSemanticUrl:!0,resourceType:o,parentAction:Li,dataContext:l,dataContextParameters:u},m=l&&u&&At(Ro,{pageName:d.PY_DETAILS,dataViewName:l},u)||"";if(s?.includes(d.PREVIEW)){let f={type:ic,payload:{pageName:d.VIEW_NAMES.PY_DATA_PREVIEW,container:d.PREVIEW,containerName:d.PREVIEW,...p}};t.push(f)}else if(o!==d.PAGE&&i===m&&s?.includes(d.PRIMARY)){let f={type:ic,payload:{pageName:d.VIEW_NAMES.PY_DETAILS,containerName:"",...p}};t.push(f)}return t},Qx=t=>{let e=0,r=[];return t.pipe(ee(Li),gr(100),Ft(o=>{let{isFormValid:i}=o.payload;({actionMgrID:e}=o.payload);let s=o.payload.context;if(!i){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),ye([])}return dt({context:s,stateObj:W(s),clearContextMessages:!0}),ye(o.payload).pipe(z(a=>IV(a)),z(async a=>{if(a&&a.type===Te){KS(a,"dataObject");let{payload:I}=a,_=ue({...a,...I,actionMgrID:e});return r.push(_),r}let{actionInPayload:c,response:l,headers:u={}}=a,{containerName:p,containerItemID:m,resourceType:f,key:h}=c,S=Z(p,c.context),A={acName:S,context:c.context};await Pe(l,c,A);let C={key:h,target:S,resourceType:f,containerItemID:m,headers:u,context:c.context};return r=sse(r,C,l,{key:h,resourceType:f,containerItemID:m}),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var Xx=class{components;constructor(){this.components={}}_checkComponent(e,r){return!!this.components[r]?.[e]}start(e,r,n,o,i){let s={viewName:e,pageReference:n,contextName:o,isInProgress:!0,active:!0,caseKey:r};this.components[o]=this.components[o]||{},this.components[o][i]=s}stop(e,r){this._checkComponent(e,r)&&(this.components[r][e].isInProgress=!1)}remove(e,r){this._checkComponent(e,r)&&delete this.components[r][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach(r=>{r.isInProgress&&(r.cascade=!0)})}activate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!0)}deactivate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach(r=>{this.refreshComponent(r,e)})}refreshComponent(e,r){if(!this._checkComponent(e,r))return;let n=this.components[r][e];if(n.active&&n.cascade){let{caseKey:o,viewName:i,pageReference:s}=n;Pc(o,i,r,s,{})}}},Ld=new Xx;var eD=class{constructor(e,r,n,o,i=100,s=500){this.finalDataViewCall=e;this.combiner=r;this.comparator=n;this.separator=o;this.maxtime=i;this.maxsize=s;this.groupedDataViewArray=[]}finalDataViewCall;combiner;comparator;separator;maxtime;maxsize;groupedDataViewArray;timeoutId;findCombinableDataViewCall(e){return this.groupedDataViewArray.find(r=>this.comparator(r,e))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){let e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then(r=>{this.separator(e,r)})}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){let r=this.groupedDataViewArray.findIndex(n=>this.comparator(n,e));this.groupedDataViewArray[r]&&(this.groupedDataViewArray.splice(r,1),this.finalDataViewCall(e).then(n=>{this.separator(e,n)}))}queueDataViewCall(e,r){let n=this.findCombinableDataViewCall(e),o,i;return o=new Promise(s=>{i=s}),n&&!n.dataViewCallMap[r]?(this.combiner(n,e),n.dataViewCallMap[r]={promise:o,resolve:i}):n?o=n.dataViewCallMap[r].promise:(n={...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}})),Object.keys(n.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(n):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.dequeueAllDataViewCalls(),this.maxtime)),o}},bV=eD;var tD=class{bufferedDataQueues;constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,r,n,o,i,s,a){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new bV(r,n,i,o,s,a)),this.bufferedDataQueues[e]}},TV=tD;var ase=t=>{let e=t?.F0.rhs?.value;t.F0.rhs={values:[e]},t.F0.comparator="IN"},cse=(t,e)=>Object.keys(t).length===1&&Object.keys(t).length===Object.keys(e).length,lse=(t,e)=>e.F0.comparator==="EQ"&&(t.F0.comparator===e.F0.comparator||t.F0.comparator==="IN"),use=(t,e)=>cse(t,e)&&lse(t,e)&&t.F0.ignoreCase===e.F0.ignoreCase,vV=t=>t.map(e=>e.field),dse=(t,e)=>{let r=(t.query?.filter).filterConditions,n=(e.query?.filter).filterConditions,o=(e.query?.filter).logic,i=Object.keys(r).length;use(r,n)?(r.F0.comparator==="EQ"&&ase(r),(r.F0.rhs?.values).push(n.F0.rhs?.value)):(Object.keys(n).forEach((c,l)=>{let u=`F${i+l}`;r[u]=n[c],o=o.replace(c,u)}),(t.query?.filter).logic+=` OR ${o}`);let s=vV(t.query?.select);vV(e.query?.select).forEach(c=>{s.includes(c)||(t.query?.select).push({field:c})})},pse=(t,e)=>t.dataViewParameters&&e.dataViewParameters&&Object.keys(e.dataViewParameters).length===Object.keys(t.dataViewParameters).length&&!Object.keys(t.dataViewParameters).some(r=>typeof e.dataViewParameters?.[r]=="string"?t.dataViewParameters?.[r]!==e.dataViewParameters?.[r]:!g.isEqual(t.dataViewParameters?.[r],e.dataViewParameters?.[r])),mse=(t,e)=>!t.dataViewParameters&&!e.dataViewParameters,fse=(t,e)=>Object.keys(t.filterConditions).length%Object.keys(e.filterConditions).length===0?!Object.keys(e.filterConditions).some(r=>t.filterConditions[r].lhs.field!==e.filterConditions[r]?.lhs.field):!1,gse=(t,e)=>fse(t.query?.filter,e.query?.filter)&&(pse(t,e)||mse(t,e)),hse=(t,e)=>{let{data:r}=e,{dataViewCallMap:n,filterDataOnClient:o}=t;Object.keys(n).forEach(i=>{n[i].resolve({data:o(i,r)})})},yse=t=>({combiner:dse,comparator:gse,separator:hse,...t}),RV=yse;var rD=(t,e)=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(t,e)}catch{}},PV=(t,e="",r="IS_NULL")=>({comparator:r,lhs:{field:t},...e&&{rhs:{value:e}}}),bh=t=>t!=null&&typeof t=="object"&&!("then"in t),Sse=(t=[],e={},r="")=>{if(!(t.length&&Object.keys(e)))return;let n={};return t.forEach((i,s)=>{let a=e[i],c;a?c=PV(i,a,"EQ"):c=PV(i);let l=`T${s+1}`;n[l]=c}),{logic:Object.keys(n).join(` ${r} `),filterConditions:n}},nD=class t{isInitialised;isQueryable;nonQueryableData;fetchedNQData;previousSearchText;totalRecordCount;fetchedRecordCount;pageNumber;parameters;enablePagination;columns;pageSize;maxResultsDisplay;matchPosition;ignoreCase;cache;keyCache;dataSourceMetaData;isNQDataFetchInProgress;fetchNQDataPromise;dataSource;context;associationFilter;propertyFilter;listType;bufferInitialized;constructor(e,r){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=e.ignoreCase!==!1,this.dataSourceMetaData=e.dataSourceMetaData,this.context=r)}static searchResultsCache={};static init(e,r){return new Promise((n,o)=>{let i=e.columns.map(m=>m.value),s=Object.entries(e.parameters).map(([m,f])=>`${m}+${f}`),a=[...i,...s,e.matchPosition,e.maxResultsDisplay].join(d.HASH_DELIMITER),c=g.getHashedString(a),l=`${e.dataSource}_${c}`,u=`__dataviewmetadata__${e.dataSource}`,p=or.getAppCacheKey(u);if(typeof window<"u"&&window.sessionStorage.getItem(p)){let m=JSON.parse(`${window.sessionStorage.getItem(p)}`);if(r&&t.searchResultsCache?.[r]?.[l])n(t.searchResultsCache[r][l]);else if(e.cacheLifeSpan!=="form"&&t.searchResultsCache?.persisted?.[l])n(t.searchResultsCache.persisted[l]);else{let f=new t(e,r);JSON.stringify(m.associationFilter)===JSON.stringify(e.associationFilter)?(f.dataSourceMetaData=m.dataSourceMetaData,f.isQueryable=m.isQueryable,f.isInitialised=m.isInitialised,f.associationFilter=m.associationFilter,t.initializeCache(r,e,l,f),n(f)):(f.associationFilter=e.associationFilter,f.propertyFilter=e.propertyFilter,f.fetchMetaData(r).then(h=>{rD(p,JSON.stringify({isQueryable:h.data.isQueryable,dataSourceMetaData:h.data,isInitialised:!0,associationFilter:e.associationFilter})),f.isQueryable=h.data.isQueryable,f.dataSourceMetaData=h.data,f.isInitialised=!0,t.initializeCache(r,e,l,f),n(f)}).catch(h=>{f.isInitialised=!1,o(h)}))}}else if(e.deferDatasource&&Ur(e.dataSource)){let m=new t(e,r),f=Ur(e.dataSource);m.isQueryable=!!f?.isQueryable,m.isInitialised=!0,m.dataSourceMetaData=f,rD(p,JSON.stringify({isQueryable:f?.isQueryable,dataSourceMetaData:f,isInitialised:!0})),m.context=r,t.initializeCache(r,e,l,m),n(m)}else{let m=new t(e,r);m.associationFilter=e.associationFilter,m.propertyFilter=e.propertyFilter,m.fetchMetaData(r).then(f=>{rD(p,JSON.stringify({isQueryable:f.data.isQueryable,dataSourceMetaData:f.data,isInitialised:!0,associationFilter:e.associationFilter})),m.isQueryable=f.data.isQueryable,m.dataSourceMetaData=f.data,m.isInitialised=!0,t.initializeCache(r,e,l,m),n(m)}).catch(f=>{m.isInitialised=!1,o(f)})}})}static bufferedDataView=new TV;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(RV(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete t.searchResultsCache[e]}static initializeCache(e,r,n,o){e&&r.cacheLifeSpan?.toLowerCase()==="form"?(t.searchResultsCache[e]===void 0&&(t.searchResultsCache[e]={}),t.searchResultsCache[e][n]=o):(t.searchResultsCache.persisted===void 0&&(t.searchResultsCache.persisted={}),t.searchResultsCache.persisted[n]=o)}fetchMetaData(e){return or.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){let r=n=>Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query);t.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,r,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,r,n)=>{let o=this.buildSelect(n),i=Sse(e,r,"AND");return{select:o,...i&&{filter:i},...or.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,r,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,r,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,r,n)=>this.memoizedGetRowDataByKeys(e,r,n);buildKeyCacheKey(e,r,n){let o=e.map(s=>[s,r[s]??""]),i=n?.columns?.map(s=>s.value);return JSON.stringify({filterEntries:o,columns:i,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,r,n){let o=this.buildKeyCacheKey(e,r,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(o);let i=this.keyCache.get(o);if(i)return i;let s=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,r,n):this.buildSchemaForNonQueryableDP(),c=Zt.getDataAsync(this.dataSource,this.context,s.dataViewParameters,this.isQueryable?s.paging:void 0,this.isQueryable?s.query:void 0,{...n}).catch(l=>(this.keyCache.delete(o),Promise.reject(l)));return this.keyCache.set(o,c),c}getData(e,r){if(this.isQueryable){if(this.bufferInitialized)try{let o=this.buildSchemaForQueryableBufferDP(e);return t.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(o,e)}catch{let o=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query)}let n=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...r})}return this.fetchNonQueryableResults(e,r)}getCachedResult(e,r){if(this.enablePagination&&bh(r)&&r.has(this.pageNumber))return r.get(this.pageNumber);let n=this.cache.get(e);if(!this.enablePagination&&n&&!bh(n))return n}handleCacheError(e,r){if(this.enablePagination){let n=this.cache.get(e);n&&bh(n)&&n.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(r)}storeCacheResult(e,r){if(this.enablePagination){let n=this.cache.get(e);(!n||!bh(n))&&(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,r)}else this.cache.set(e,r)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!Ud(this.context))return!1;let r=e.toLowerCase(),n=this.cache.get(r);return n?this.enablePagination?bh(n)&&n.has(this.pageNumber):!0:!1}memoizedGetData(e,r){let n=e?.toLowerCase(),o=this.cache.get(n);if(this.isResultCached(e)&&o){let c=this.getCachedResult(n,o);if(c)return c}let a=this.getData(e,r).catch(c=>this.handleCacheError(n,c));return this.storeCacheResult(n,a),a}fetchData(e,r=!1,n){return this.isValidDatasource()?this.context&&!Ud(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=r?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,r){if(e===void 0)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,r)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then(()=>({data:this.filterDataOnClient(e,this.nonQueryableData,r)})).catch(n=>Promise.reject(n));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&this.dataSourceMetaData.structure?.toLowerCase()==="list"){let n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,r),this.isNQDataFetchInProgress=!0,new Promise((o,i)=>{this.fetchNQDataPromise?.then(s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,o({data:this.filterDataOnClient(e,this.nonQueryableData,r)}))).catch(s=>i(s)).finally(()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null})})}return Promise.resolve(null)}filterDataOnClient(e,r,n){let o=(n?.columns??this.columns)?.filter(i=>i.useForSearch).map(i=>i.value);return r.reduce((i,s)=>(o?.some(c=>{let l=t.resolveEmbeddedPath(c),u=g.getIn(s,l);return u!=null&&this.positionMatches(`${u}`,e,n)})&&i.push({...s}),i),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,r,n){let o=n?.ignoreCase??this.ignoreCase,i=o?e.toLowerCase():e,s=o?r.toLowerCase():r;switch(n?.matchPosition??this.matchPosition){case"start":return i.startsWith(s);case"contains":return i.includes(s);case"equals":return i===s;default:return!1}}buildSelect(e){let r=[],n=[];return(e?.columns??this.columns)?.forEach(o=>{if(!n.includes(o.value)){n.push(o.value);let i={field:o.value};r.push(i)}}),r}buildFilters(e,r){let n=r?.matchPosition??this.matchPosition,o=r?.ignoreCase??this.ignoreCase,i={},s=0;(r?.columns??this.columns)?.forEach(c=>{if(c.useForSearch){let l=`F${s}`;s+=1;let u={field:c.value},p={value:e},m="CONTAINS";n==="start"?m="STARTS_WITH":n==="equals"&&(m="EQ");let f={...`${parseFloat(e)}`!==e&&{ignoreCase:o?"true":"false"},lhs:u,rhs:p,comparator:m};i[l]=f}});let a=Object.keys(i).join(" OR ");return{filterConditions:i,logic:a}}buildQuery(e,r){let n=this.buildSelect(r);return e?{select:n,filter:this.buildFilters(e,r),...or.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...or.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,r){return{dataViewParameters:this.parameters,query:this.buildQuery(e,r),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}},Ao=nD;var oD=class t{refreshMap;propChangeRefreshMap;constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,r,n,o,i){typeof e[r]>"u"&&(e[r]={}),e[r][n]=[{uniqueHash:o,callback:i}]}registerForRefresh(e,r,n,o,i){n=g.convertClipboardPageToPageRefNotation(n);let s=o.split("/").join(d.HASH_DELIMITER),a=g.getHashedString(s);e==="PROP_CHANGE"?this.propChangeRefreshMap?.[i]?.[n]?this.propChangeRefreshMap[i][n].some(l=>l.uniqueHash===a)||this.propChangeRefreshMap[i][n].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.propChangeRefreshMap,i,n,a,r):this.refreshMap?.[i]?.[`${e}-${n}`]?this.refreshMap[i][`${e}-${n}`].some(l=>l.uniqueHash===a)||this.refreshMap[i][`${e}-${n}`].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.refreshMap,i,`${e}-${n}`,a,r)}triggerPropChangeRefresh(e,r){let n=this.propChangeRefreshMap?.[r];if(!n)return!1;let o=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,r),{interestPage:i=""}=o||{},s=u=>g.convertPageRefToClipboardPageNotation(u).replace(`${d.CASE_INFO?.CASE_INFO_CONTENT}${i}`,"");if(n[e]){let u=s(e);return n[e].forEach(p=>p.callback(u)),!0}let a=Ie.getContextReferences(r)?.get(e),c=a&&J.resolveContextTreeNodeProps(a.props)||{},{contextPageRef:l}=c;if(l&&n[l]){let u=s(l);return n[l].forEach(p=>p.callback(u)),!0}for(let u of Object.keys(n)){let p;if(g.segmentsMatch(u,e)?p=e:l&&g.segmentsMatch(u,l)&&(p=l),p){let m=s(p);return n[u].forEach(f=>f.callback(m)),!0}}return!1}triggerRefreshForType(e,r,n){return e==="PROP_CHANGE"?this.triggerPropChangeRefresh(r,n):this.refreshMap?.[n]?.[`${e}-${r}`]?(this.refreshMap[n][`${e}-${r}`].forEach(o=>o.callback()),!0):!1}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}},Ai=new oD;var iD=class{static cleanCaches(e){Cr.purgeCascadeFields(e),Ld.removeContext(e),Ao.clearContextedCache(e),$.cleanContextSubscribers(e),fE(e),Ie.removeContextTreeNode(e),Tt.clearContext(e),Ai.deRegisterForRefresh(e)}},Th=iD;var sD="GET_DESCENDANTS",NV=t=>({type:sD,payload:t});var aD=class{runtimeParams;runtimeParamsMap;constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,r){this.runtimeParamsMap[e]=r}getRuntimeParam(e){return this.runtimeParamsMap[e]}},al=new aD;var cD=class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;if(o<=0){if(s)n.push({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else if(i.length>0){let a=i.shift();s=!s,n.push({type:Er,payload:{context:e,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),a&&n.push(a)}else return;T(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));let r=W(e?.payload?.context);if(r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;return i.length<=0&&!s&&(o<=0?(n.push(e),s=!s):i.push(e),n.unshift({type:Er,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),T(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));let r=W(e);return r&&r.context_data?.is_deferred_action_in_progress===!0?(T({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?W(e)?(T({type:cc,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS)):Promise.reject(new Error(this.MISSING_CONTEXT_PARAM))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r={...W(e)};return r.context_data={...r.context_data},r&&r.context_data?.blocking_action_counter>0?(T({type:cc,payload:{context:e,isInitiateBlockingAction:!1}}),r.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;let r=W(e);if(r){let n={...r};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),T({type:Er,payload:{context:e,data:{...n}}}),Nn.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r=W(e);return!!(r&&r.context_data?.is_deferred_action_in_progress===!0)}},Ese=new cD,Ct=Ese;var OV=(t,e)=>{let r={},n=Si.getLookUpDataPage(t),o=Si.getDataPageKeys(n);if(o)for(let i of o)r[i.keyName]=i.isAlternateKeyStorage?e[i.linkedField]:e[i.keyName];return{dataViewParameters:r,dataPageID:n,dataPageKeys:o}},xV=(t,e)=>{let r=Si.getSavableDataPage(t),n=Si.getDataPageKeys(r);return n?.forEach(o=>{o.isAlternateKeyStorage&&(o.keyName===o.linkedField||Object.keys(e).includes(o.linkedField))?o.keyName=e[o.linkedField]:o.isAlternateKeyStorage&&Object.keys(e).includes(o.keyName)&&o.keyName!==o.linkedField?(e[o.linkedField]=e[o.keyName],delete e[o.keyName]):o.keyName=e[o.keyName]}),{keys:e,dataPageID:r,dataPageKeys:n}},e_=t=>{$.publish(E.PUB_SUB_EVENTS.EVENT_CANCEL,t)},Ase=t=>{if(t.includes(d.ACTIONAREA))return!0;let e=Oa(t);return!!se(`${e}/${d.ACTIONAREA}`)?.includes(d.ACTIONAREA)},Cse=(t,e,r)=>B.shouldUseUnifiedHandling()||Ase(t)?vo:wU(e,r??!1),DV=(t,e,r)=>{let{callbacks:n}=r;return r.callbacks=null,t(e,r).then(o=>{o==="cancel"?n?.cancel?.():n?.submit?.()})},_se=t=>{let e=B.shouldUseUnifiedHandling();return B.isExternalCaseType(t)?JI:B.isExternalObject(t)?e?JI:Kk:e?ql:B.isObjectCaseType(t)?Gk:ql},Ise=t=>!B.shouldUseUnifiedHandling()&&(t.type==="Object"||B.isObjectCaseType(t?.caseClassName||"")||globalThis.location?.href?.includes("/objects/"))?Wk:Mi,wV=(t,e,r)=>!r&&e===d.ACTION?t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID):t.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),bse=(t,e)=>{let r=t.getValue(E.CASE_INFO.IS_LOCAL_ACTION),n=t.getValue(E.CASE_INFO.ASSIGNMENT_ID),o=wV(t,e,r);if(e===d.ACTION&&(!o||!r&&!n)){let i=fV(t.getContextName());i&&(!n&&!o&&(r=i.isLocalAction),n=n||i.assignmentID,o=o||(r?i.activeActionID:i.assignmentActionID))}return{localAction:r,assignmentID:n,actionID:o}},lD=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";c11nEnv;constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,r,n)=>!e&&r||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,r=!1,n=!1)=>{let o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),c=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID),l=this.c11nEnv.getContainerName(),u=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),p=r?void 0:xr(this.c11nEnv.getContextName()),m=this.c11nEnv.getValue("isProcessAction","isProcessAction");return ze.buildActionObject({context:o,containerItemID:e,assignmentID:a,actionID:c,caseID:s,containerName:l,caseType:u,isModalAction:i,isFormValid:p,isProcessAction:m,saveOnly:r,autosave:n},this.c11nEnv)};actionsApiPromise=(e,r,n=!0)=>{let o="";r&&r.actionMgrID!==null?o=r.actionMgrID||"":o=w.getNextActionMgrId();let i,s,a=new Promise((c,l)=>{i=c,s=l});if(i&&s)w.register(o,a,i,s,e,r,n);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:o,promise:a}};showDataObjectCreateView(e,r=E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){let n=ze.buildActionObject({viewName:r,className:e},this.c11nEnv),o=Pr,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:E.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),i}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=e,n=Or(r),o=oe(d.CASE_INFO.CASE_INFO_ID,"",r),i=oe(d.CASE_INFO.ASSIGNMENT_ID,"",r);if(!n)return new kd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});let s=Yl,a=ze.buildActionObject({containerItemID:e,context:r},this.c11nEnv),c=r&&r.includes(d.MODAL);T({type:s,payload:{...a,isModalAction:c,isDataObject:!0,skipReleaseLockRequest:!0}});let{promise:l}=this.actionsApiPromise(s,a);return l.then(()=>{e_({caseID:o,assignmentID:i,context:r})})}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));let{data:r}=De()?.getState()||{},n=r[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));if(Na(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){let u=this.handleSubscript.call(this,e,this.c11nEnv);if(u)return u}let i=Si.getSavableDataPage(n),s=eu,a=!!e&&e.includes(d.MODAL),c=ze.buildActionObject({containerItemID:e,dataPageID:i},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return T(ZC({...c,isModalAction:a,isFormValid:xr(e)})),l}deleteDataObject(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=sS,o=Si.getSavableDataPage(e),i=Si.getDataPageKeys(o),s={};if(i)for(let l of i)s[l.keyName]=l.isAlternateKeyStorage?r[l.linkedField]:r[l.keyName];let a=ze.buildActionObject({dataViewName:o,dataViewParameters:s},this.c11nEnv),{promise:c}=this.actionsApiPromise(n,a);return T(hV({...a})),c}getDataObjectView(e,r,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));let o=aS,{dataPageID:i,dataViewParameters:s}=OV(e,r),a=ze.buildActionObject({dataLookUp:i,keyProperties:r,requestPayload:s,viewName:n.viewName||E.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:d.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:c}=this.actionsApiPromise(o,a);return T(QC({...a})),c}updateDataObject(e,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!r)return Promise.reject(new Error("keys is required parameter"));let{data:n}=De()?.getState()||{},o=n[e]?.dataInfo?.content?.classID;if(!o)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let{dataPageID:i,keys:s}=xV(o,r),a=tu,c=e&&e.includes(d.MODAL),l=ze.buildActionObject({containerItemID:e,dataPageID:i,key:s},this.c11nEnv),u=n[e]?.caseInfo?.headers?.etag,{promise:p}=this.actionsApiPromise(a,l);return T(XC({...l,isModalAction:c,isFormValid:xr(e),etag:u})),p}openDataObjectAction(e,r,n,o){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!o)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));let i=cS,{dataViewParameters:s,dataPageID:a,dataPageKeys:c}=OV(e,r),l=ze.buildActionObject({actionID:n,actionName:o,dataViewParameters:s,lookupDatapage:a,containerName:d.MODAL,dataViewPayload:c,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:u}=this.actionsApiPromise(i,l);return T({type:i,payload:{...l}}),u}submitDataObjectAction(e,r,n,o){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!r)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));let{data:i}=De()?.getState()||{},s=i[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let a=o?.jsActionQueryParams,c=Oa(e),l=te(c),u=We(l,c)||{},{resourceType:p="",key:m=""}=u,f=Li,{dataPageID:h,keys:S}=xV(s,r),A=ze.buildActionObject({containerItemID:e,actionID:n,resourceType:p,key:m,keys:S,savableDatapage:h,containerName:d.MODAL,context:e,jsActionQueryParams:a},this.c11nEnv);A.context=e;let C=i[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(f,A);return T({type:f,payload:{...A,isFormValid:xr(e),etag:C}}),I}createWork(e,r={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(e=ae.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,P.getDefaultQualifiedName("pyStartCase"),r);let{dockable:n=!1}=r?.modalOptions||{},o=r.theType?r.theType:_se(e),i=ze.buildActionObject({class:e,flowType:P.getDefaultQualifiedName("pyStartCase"),containerName:d.PRIMARY,openCaseViewAfterCreate:!0,...r,theType:o,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i);if(i.headers={...i.headers},r.channelName?i.headers[d.X_ORIGIN_CHANNEL]=r.channelName:v.isWSSPortal()&&(i.headers[d.X_ORIGIN_CHANNEL]="WSS"),o=this.handleRemoteCaseForCreateWork(e,i,o),br.getPreviewMode()){i.debugInfo={debugId:g.generateUniqueID()};let a=Ge.getCoreHeadersFromContext(i?.context||""),c=String(a?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]||"");c&&o!==ql&&(i.debugInfo={debugId:c})}return T({type:o,payload:{...i}}),s}handleRemoteCaseForCreateWork(e,r,n){if(ae.isRemoteCase(e)){let{RemoteClassName:o,RemoteSystemID:i,name:s}=ae.getRemoteCase(e);if(r.className=e,r.class=o,w.setRemoteCaseHeaderByContext(r,i),ae.isTraditionalRemoteCase(e)||ae.isRemoteCaseVersionDifferent(e)){let a={className:e,name:s,action:uc,remoteClassName:o};return w.setTraditionalRemoteCaseParams(r,a)}}return n}createCase(e,r={}){return this.createWork(e,{...r,theType:"CREATE_WORK"})}getDataObjectActions(e,r){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));let n=Zy,o=ze.buildActionObject({dataViewID:e,dataViewParameters:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T({type:n,payload:{...o}}),i}getDescendants(e,r){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));let n=r||this.c11nEnv.getContextName(),o=Tk,i=ze.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i),a=NV({...i,context:n});return T(a),s}openWorkByHandle(e,r,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("workID must be a string"));if(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,r);let o={insKey:e,acTargetName:n.targetContainer||d.PRIMARY,containerName:n.targetContainer||d.PRIMARY},i=B.shouldUseUnifiedHandling()||!B.isObjectCaseType(r)?Go:qk,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);return s.headers={...s.headers},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),s.className=r,ae.isRemoteCase(r)&&(i=this.setRemoteCaseParamsForOpenCase(s,r,i,n.remoteCaseMeta)),br.getPreviewMode()&&n.targetContainer!==d.WORKAREA&&(s.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...n,...s}}),a}setRemoteCaseParamsForOpenCase(e,r,n,o={}){let{RemoteSystemID:i,RemoteClassName:s,name:a}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(e,i),e.isRemoteCase=!0,e.remoteCaseClass=r,e.remoteCaseMeta=o,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(i??"")){let c={className:r,name:a,action:mS,remoteClassName:s};return w.setTraditionalRemoteCaseParams(e,c)}return n}openAssignment(e,r,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("assignmentID must be a string"));if(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,r);let o={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...n.renderInline!==void 0&&{renderInline:n.renderInline},...n.pageName!==void 0&&{pageName:n.pageName}};n.isChild&&(o.containerName=d.PRIMARY,o.isChild=n.isChild);let i=Pa,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);if(s.headers=s.headers||{},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),ae.isRemoteCase(r)){let{RemoteClassName:l,RemoteSystemID:u,name:p}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(s,u),s.remoteCaseMeta=n.remoteCaseMeta,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(u??"")){let m={className:r,name:p,action:pS,remoteClassName:l};i=w.setTraditionalRemoteCaseParams(s,m)}}s.className=r,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),br.getPreviewMode()&&![d.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:g.generateUniqueID()});let c={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return T({type:i,payload:{...s,...c}}),a}finishAssignment(e,r={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));e.endsWith(d.ACTIONAREA)&&(e=se(e)||e);let n=pe(e),o=n;if(n?.includes(`/${d.WORKAREA}`)&&(o=n.substring(0,o?.lastIndexOf(`/${d.WORKAREA}`))),Nj(n)){let ne=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Pn({messages:ne,context:o,category:E.PAGE}),Promise.reject({type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}let i=r?.isTriggeredFromDifferentContext,{caseID:s,assignments:a,localActionID:c,caseActions:l,caseInfo:u,businessID:p,caseTypeID:m,caseTypeName:f}=rT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),h=Yt(u),S=!1,A,C=l?.find(ne=>ne.ID===c);C?S=C?.type==="Case":A=W(n);let{assignmentID:I}=rT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});A?.context_data?.actionType&&(S=A.context_data.actionType===d.CASE,I=I||A.context_data.assignmentID);let _=DU(a,I,c,u?.activeActionID),[N,x]=s.split(" "),H={class:N,actionID:_,assignmentID:I,caseID:s,workID:x,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:S,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:p,caseTypeID:m,caseTypeName:f};e?.includes(d.MODAL)&&(H.containerName=d.MODAL,H.isModalAction=!0),H.outcome=r.outcomeID,H.jsActionQueryParams=r.jsActionQueryParams,u?.isLocalAction&&(H.viewType=it.FORM);let G=Cse(e,m,u?.isObjectWideAction),re=ze.buildActionObject(H,this.c11nEnv);re.context=n;let{promise:j}=this.actionsApiPromise(G,re);return re.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||W(n).context_data.isProcessAction,re.headers??={},v.isWSSPortal()&&(re.headers[d.X_ORIGIN_CHANNEL]="WSS"),Ct.executeOrQueueDeferredAction({type:G,payload:{...re,context:n}}),j}getNextWork(e={}){if(v.getRenderingMode()==="HYBRID")return $.publish(E.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:v.getOperatorIdentifier()}),Promise.resolve();let r=Pa,n=ze.buildActionObject({...e,containerName:d.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,n);return T({type:r,payload:{...n}}),o}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));let r=Pa,n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getCaseSummary().headers,i=ze.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i),a={type:r,payload:{...i,caseID:n,headers:o}};return T(a),s}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=Jy,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),i=this.c11nEnv.getValue(E.CASE_INFO.IS_ASSIGNMENT),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(d.MODAL)&&(s.containerName=d.MODAL,s.isModalAction=!0);let a=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isAssignment:i,isFormValid:xr(c),classID:this.c11nEnv.getCurrentClassID()}}),l}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=Yy,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(d.MODAL)?d.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(d.MODAL)},a=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isFormValid:xr(c),classID:this.c11nEnv.getCurrentClassID()}}),l}openBulkAction(e,r){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if(typeof e!="string")return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){let{callbacks:u}=r;return r.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,r).then(p=>{p==="cancel"?u?.cancel?.():u?.submit?.()})}let{selectedList:n,runningMode:o}=r,i=r.type,s={selectedList:n,vcName:r.target,actionName:r?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:i,runningMode:o,...r},a=vk,c=ze.buildActionObject(s,this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return T({type:a,payload:{...c}}),l}cancelBulkAction(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):new kd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0}):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}approveCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(T({type:bt,payload:{reference:E.CASE_INFO.APPROVALFLAG,value:d.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(T({type:bt,payload:{reference:E.CASE_INFO.APPROVALFLAG,value:d.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(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let[,r]=this.c11nEnv.getValue(E.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.DUPLICATE,context:e}},o={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:r,context:e}};return T([n,o]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.IGNORE,context:e}},n={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:"",context:e}},o={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return T([r,n,o]),this.finishAssignment(e)}openLocalAction(e,r){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let n=this.getCaseID(r);if(window.pms?.plugins?.c11n?.openLocalAction)return r.caseID=n,DV(window.pms.plugins.c11n.openLocalAction,e,r);let o=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,localActionType:i,...r},a=r.containerName===d.ACTIONAREA?Mi:Ise(r),c=ze.buildActionObject(s,this.c11nEnv);(r.containerName===d.ACTIONAREA||r.containerName===d.WORKAREA)&&(c.skipMergeAssignmentsAndActions=!1);let{promise:l}=this.actionsApiPromise(a,c),u=this.c11nEnv.getContextName(),p=Ke(u)[0],m;if(m=se(p),m?.includes("actionarea")&&a===Mi)return T({type:a,payload:{...c}}),l;if(r.type==="Object")return T({type:a,payload:{...c}}),l;let f=se(p),h=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),A=n!==h&&f?ae.getRemoteHeaderByContext(f)||ae.getRemoteHeaderByContext(u):ae.getRemoteHeaderByContext(u);if(w.setRemoteCaseHeaderByContext(c,A),!p)return m=u,T({type:a,payload:{...c,contextName:u,continueExecution:!1}}),l;let{continueExecution:C,containerItemID:I}=jd(u,n,p);if(m=I,!C||m&&De()?.getState()?.data[m]?.context_data?.caseViewMode==="review")return T({type:a,payload:{...c,contextName:u,continueExecution:C}}),l;let _=m,N=_&&_.includes(d.MODAL),x=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),H=W(m),G=H?.caseInfo?.assignments?H.caseInfo.assignments[0]?.actions[0]?.ID:void 0,re=n,j=se(p),ne=mr(te(j)),be=W(j),he=ne&&be;he&&(re=be?.caseInfo?.ID,x=be?.caseInfo?.assignments[0]?.ID,G=be?.caseInfo?.assignments[0]?.actions[0]?.ID);let Me=this.c11nEnv.getContainerName(),Fe=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),Ce=!0,Ye=this.c11nEnv.getValue("isProcessAction","isProcessAction"),Oe=ze.buildActionObject({context:_,containerItemID:he?j:m,assignmentID:x,actionID:G,caseID:he?re:n,containerName:Me,caseType:Fe,isModalAction:N,isFormValid:Ce,isProcessAction:Ye},this.c11nEnv);Oe.context=he?j:m;let ft=pe(m),Qt=this.c11nEnv.getCaseSummary(),yr=Yt(Qt),Xt=ze.buildActionObject({caseID:n,containerItemID:m,cancelContext:ft},this.c11nEnv),ln={};return N?(Xt.acTargetName=d.MODAL,Xt.isInCreateStage=yr,Xt.isModalAction=N,ln={...Xt}):ln={...Xt,acName:Z(this.c11nEnv.getContainerName(),Xt.context)},T({type:a,payload:{...c,contextName:u,saveActionPayload:Oe,cancelActionPayload:ln,continueExecution:C}}),l}openProcessAction(e,r){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID)||r.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return r.caseID=n,DV(window.pms.plugins.c11n.openProcessAction,e,r);let o=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID)||r.assignKey,i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,processActionType:i,isProcessAction:!0,...r},a=JC,c=ze.buildActionObject(s,this.c11nEnv),l=this.c11nEnv.getContextName(),u=Ke(l)[0],p=ae.getRemoteHeaderByContext(l);if(!p&&u){let h=ut(u);h?.accessedOrder.forEach(S=>{(r.caseID||n)===h.items[S].key&&(p=ae.getRemoteHeaderByContext(h.items[S].context))})}w.setRemoteCaseHeaderByContext(c,p);let{promise:m}=this.actionsApiPromise(a,c),{containerItemID:f}=jd(l,n,u);return T({type:a,payload:{...c,saveContainerItemID:f}}),m}navigateToStep(e,r){if(!e)return Promise.reject(new Error("stepID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("stepID must be a string"));if(!r)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=Ky,o=this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=Yt(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a={ID:o,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:r,doDeleteCaseSummary:!0,isInCreateStage:i,caseID:s};r&&r.includes(d.MODAL)&&(a.acTargetName=d.MODAL);let c=ze.buildActionObject(a,this.c11nEnv),{promise:l}=this.actionsApiPromise(n,c),u=pe(r);return T({type:n,payload:{...c,containerItemID:r,context:u}}),l}cancelAssignment(e,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:n}=E,o=wi,i=pe(e),s=e&&e.includes(d.MODAL),a=this.c11nEnv.getCaseSummary(),c=Yt(a),l=this.c11nEnv.getValue(d.getProperty(n.CASE_INFO_ID)),u=this.c11nEnv.getValue(n.ASSIGNMENT_ID),p=ze.buildActionObject({caseID:l,containerItemID:e,context:i},this.c11nEnv),m={};s?(p.acTargetName=d.MODAL,p.isInCreateStage=c,p.isModalAction=s,m={...p}):m={...p,acName:Z(this.c11nEnv.getContainerName(),p.context)};let{promise:f}=this.actionsApiPromise(o,p);return T({type:o,payload:m}),f.then(()=>{r||e_({caseID:l,assignmentID:u,context:i||e})})}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:r}=E,n=e,o=Yl,i=e&&e.includes(d.MODAL),s=this.c11nEnv.getValue(r.CASE_INFO_ID),a=ze.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!Or(n))return new kd(this.c11nEnv).removeContainerItem({containerItemID:e}).then(()=>{yu(s),e_({caseID:s,context:this.c11nEnv.getContextName()})});T({type:o,payload:{...a,isModalAction:i}});let{promise:l}=this.actionsApiPromise(o,a);return l}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:r}=E,n=Yl,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getCaseSummary(),a=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID)),c=Yt(s),l=this.c11nEnv.getValue(d.getProperty(r.CASE_INFO_ID)),u=ze.buildActionObject({caseID:l,containerItemID:e,context:o},this.c11nEnv),p=this.c11nEnv.getValue("isProcessAction","isProcessAction"),m=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);u.isProcessAction=p;let f=v.getRenderingMode();if(c&&(i||m||f==="EMBED")&&!Ec(s)){let S=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT)),A=Or(o);if(this.shouldDeleteCaseInCreateStage(A,S,m)){let C=!!B.isExternalObject(a);return this.deleteCaseInCreateStage(e,C)}T({type:n,payload:{...u,isModalAction:i,isChildCase:xU(s),isInCreateStage:c}})}let{promise:h}=this.actionsApiPromise(n,u);return h.then(()=>{})}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=yi,n=this.getSaveActionPayload(e,!0),{promise:o}=this.actionsApiPromise(r,n);return Ct.executeOrQueueDeferredAction(sl(n)),o}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=yi,n=this.getSaveActionPayload(e),{promise:o}=this.actionsApiPromise(r,n);return T(sl(n)),o}deleteCaseInCreateStage(e,r=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=Ah,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),a=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),c=ze.buildActionObject({caseID:s,caseType:a,containerItemID:e,context:o,ignoreCaseDeletion:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.PARENTCASEINFO));c.isProcessAction=l,c.parentCaseInfo=u;let p=`${d.APP.APP}/${ge.PRIMARY}`,m=st(p,ge.PRIMARY);c.parentContext=m,i&&(c.targetName=d.MODAL,c.containerName=ge.MODAL,c.isModalAction=i),T(gV(c));let{promise:f}=this.actionsApiPromise(n,c);return f.then(()=>{e_({caseID:s,context:this.c11nEnv.getContextName()})})}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if(typeof e!="number")return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:r}=_e.getRestEndPoint("getRecents")||{};r=`${r}?maxResultsToFetch=${e}`;let n=gt.getServerURL()+r;return k(n,{method:"GET",headers:{}})}updateRecents(e,r,n,o){let{restApi:i}=_e.getRestEndPoint("updateRecents")||{},s=`${gt.getServerURL()}${i}`;return k(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:r,classID:e,ID:o}})}logout(){let{restApi:e}=_e.getRestEndPoint("Logout")||{},r=`${gt.getServerURL()}${e}`;return k(r,{method:"GET",headers:{}}).then(n=>(Object.keys(Ie.rootNodes).forEach(o=>{Th.cleanCaches(o)}),Ie.rootNodes={},sessionStorage.clear(),ps(),Promise.resolve(n)))}invoke(e,r={}){let n={method:r.method||"GET",body:r.body};return k(e,n,this.c11nEnv.getContextName())}showCasePreview(e,r={}){this.loadView(e,P.getDefaultQualifiedName("pyCasePreview"),{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...r})}showDataPreview(e,r,n){return e?typeof e!="string"?Promise.reject(new TypeError("dataContext must be string")):r?typeof r!="object"?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(P.getDefaultQualifiedName("pyDataPreview"),e,r,{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,r,n){let o=ze.buildActionObject({caseId:e,viewName:r,caseClassName:this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&typeof n=="object"?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),o={...o,...n}):o={...o,containerName:this.c11nEnv.getContainerName()};let i=Bl,{promise:s}=this.actionsApiPromise(i,o,!1);return T({type:i,payload:{...o}}),s}showPage(e,r,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,r,n);let o=ze.buildActionObject({viewName:e,className:r},this.c11nEnv),i=Pr,{promise:s}=this.actionsApiPromise(i,o);return br.getPreviewMode()&&(o.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...o,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=qy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,insightID:e}}),i}showDashboard(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=Wy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,dashboardID:e}}),i}showData(e,r,n,o={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!r)return Promise.reject(new Error("dataContext is required parameter"));if(typeof r!="string")return Promise.reject(new TypeError("dataContext must be string"));let i=ze.buildActionObject({pageName:e,dataContext:r,dataContextParameters:n,RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=ic;o?.containerName||(o.containerName=v.getRenderingMode()==="HYBRID"?al.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):Vt.getTargetViewContainerName(s));let{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,...o,skipSemanticUrl:!!o.skipSemanticUrl}}),a}changeHandler(e,r){ze.changeHandler(e,r)}eventHandler(e,r){ze.eventHandler(e,r)}triggerFieldChange(e,r,n=!1,o={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){let i=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=J.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(r),this.c11nEnv.isInsideList()&&!o.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,r,o);let c=this.c11nEnv.getValue(d.CLASS_ID),l=e?e.split(".").filter(u=>!!u):[];l.length>1&&(l.pop(),c=oe(`.${l.join(".")}.classID`,s,i)),e=g.trimDotForProperty(e),T({type:Tn,payload:{reference:a,value:r,context:i,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,r,n={}){let{removePropertyFromChangedList:o=!1,isArrayDeepMerge:i=!0,contextPageReference:s="",isListEntry:a=!1,skipDirtyValidation:c=!1,associatedProperty:l,skipPageInstructionGeneration:u=!1}=n,p=this.c11nEnv.getContextName(),m=this.c11nEnv.getPageReference(),f=s?.startsWith(m)?s.replace(m,""):s;m=s||m;let h=J.getContextPath(m,e),S=!1;this.c11nEnv.isInsideList()&&!u&&this.c11nEnv.getListActions().updateProperty(f?`${f}${e}`:e,r,{isArrayDeepMerge:i,skipDirtyValidation:c}),this.c11nEnv.isBulkAction()&&(S=!0),e||(e=this.c11nEnv.getStateProps().value),dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:m,context:p,isListEntry:a}),T({type:bt,payload:{reference:h,value:r,context:p,isArrayDeepMerge:i,skipDirtyValidation:c,...S&&{isStrictTracking:S},...o&&{removePropertyFromChangedList:o},...l&&{associatedProperty:`${m}${l}`}}})}activateModalContainerItem(e){let r=Xy,{context:n}=e,o=n&&n.includes(d.MODAL),i=ze.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);o&&(i.containerName=d.MODAL,i.isModalAction=o),T({type:r,payload:i});let{promise:s}=this.actionsApiPromise(r,i);return s}refreshCaseView(e,r,n,o={}){let{promise:i,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:a,propertyName:c,preserveClientChanges:l,classID:u,context:p,optionalPayload:m,isArrayDeepMerge:f}=o,h={actionMgrID:s,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,isArrayDeepMerge:f,optionalPayload:m};o.refreshFor&&(h.refreshFor=o?.refreshFor),o.resetForm&&(h.resetForm=o?.resetForm),o.skipPayloadGeneration&&(h.skipPayloadGeneration=o?.skipPayloadGeneration);let S=p||this.c11nEnv.getContextName(),A=this.c11nEnv.getPageReference(),C=this.c11nEnv.getValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:_}=C||{};if(a&&I&&_===d.ACTION){let N=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),{actionID:x,interestPage:H,interestPageActionID:G,isLocalAction:re}=C;Cu(e,N,x,S,H,G,re,I,_,h)}else!I&&a&&(OU(S,A)||Ac(S,A))?_u(S,n,h):Pc(e,r,S,n,h);return i}refreshEmbeddedDataWithAction(e,r,n,o,i,s,a,c,l={}){let{promise:u}=this.actionsApiPromise(Ut.REFRESH_DATA),p=this.c11nEnv.getContextName();return Cu(e,r,n,p,o||this.c11nEnv.getPageReference(),i,s,a,c,l),u}openEmbeddedDataModal(e,r,n,o,i,s,a,c,l=!1,u=E.MODAL){let p=Ui,m=r.getCaseInfo().getKey(),{localAction:f,assignmentID:h,actionID:S}=bse(r,a),A=r.getPageReference(),C=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;A.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!m&&(m=r.getCaseInfo().getObjectKey(),C=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let I=r.getMetadata(),_=Array.isArray(I?.config?.children)?I.config.children[0]?.children||[]:[],N={readOnly:l,targetProperty:n,index:o,viewID:e,ID:m,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(C),heading:s,editType:a,interestPageActionID:a===d.ACTION?c:void 0,actionID:S,isLocalAction:f,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!f&&a===d.ACTION?h:void 0,columns:_},x=ze.buildActionObject(N,this.c11nEnv);if(a===d.ACTION){let re=g.getETag(x.context);x.headers={"If-Match":re}}let{promise:H}=this.actionsApiPromise(p,x);return v.getFeatureMap().granularUIRefresh&&_.forEach(re=>{let j=fe.trimAnnotation(re.config.value),ne=lt(j.startsWith(".")?j.replace(".",""):j,re.config.classID);ne&&!Array.isArray(ne)&&ne.isDeclarativeTarget&&Ie.addFieldNode(r.getContextName(),A+C,r.viewName??"",j,"",{isDeclarativeTarget:!0,propertyName:j,pageReference:A+C})}),T({type:p,payload:{...x,containerName:u,skipSemanticUrl:!0}}),H}getEmbeddedDataView(e,r,n,o,i,s="",a="",c=!1,l=""){let u=lS,p=r.getCaseInfo().getKey(),m=r.getValue(E.CASE_INFO.IS_LOCAL_ACTION),f=r.getValue(E.CASE_INFO.ASSIGNMENT_ID),h=wV(r,s,m),S=r.getPageReference(),A=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;S.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!p&&(p=r.getCaseInfo().getObjectKey(),A=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let C={readOnly:c,targetProperty:n,index:o,viewID:e,ID:p,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(A),editType:s,interestPageActionID:s===d.ACTION?a:void 0,actionID:h,isLocalAction:m,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!m&&s===d.ACTION?f:void 0,containerName:l},I=ze.buildActionObject(C,this.c11nEnv);if(s===d.ACTION){let N=g.getETag(I.context);I.headers={"If-Match":N}}let{promise:_}=this.actionsApiPromise(u,I);return T({type:u,payload:{...I,skipSemanticUrl:!0}}),_}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=uS,n=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.ASSIGNMENT_ID)),i=this.c11nEnv.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),""),s=pe(e),a=this.c11nEnv.getValue(d.getProperty(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:c,editType:l,isLocalAction:u,actionID:p,viewName:m,parentContext:f}=a;i.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(E.OBJECT_INFO.OBJECT_INFO_ID),i=this.c11nEnv.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),dt({context:s,stateObj:W(s),clearContextMessages:!0});let h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:m,isFormValid:xr(s),interestPage:g.convertPageRefToClipboardPageNotation(i),parentContext:f,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:l,actionID:p,operationFlag:d.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:c,isLocalAction:u,assignmentID:o};e&&e.includes(d.MODAL)&&(h.containerName=d.MODAL,h.isModalAction=!0);let S=ze.buildActionObject(h,this.c11nEnv);if(l===d.ACTION){let C=g.getETag(S.context);S.headers={"If-Match":C}}let{promise:A}=this.actionsApiPromise(r,S);if(Or(s)){let[C,I,_]=Vi.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());Ie.mutatePageList(f,C,I,{type:Wn,rowIndex:_}),T({type:Wn,payload:{pageReference:this.c11nEnv.getPageReference(),context:f,isListEntry:!0}})}return Ct.executeOrQueueDeferredAction({type:r,payload:{...S,context:s}}),A}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=pe(e),n=this.c11nEnv.getPageReference(),{promise:o,actionMgrID:i}=this.actionsApiPromise(lc);return _u(r,n,{actionMgrID:i,isFillFormWithAI:!0,preserveClientChanges:!1}),o}handleSubscript(e,r){if(!Na(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));let o=dS,i=ze.buildActionObject({containerItemID:e},r);T({type:o,payload:{...i,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:xr(e),context:e}});let{promise:s}=this.actionsApiPromise(o,i);return s}showSubscriptCreateView(e,r,n,o=E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){let i=ze.buildActionObject({viewName:o,className:e,referenceListStr:r,subscriptName:n},this.c11nEnv),s=Pr,{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,containerName:E.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}deleteWork(e,r,n){if(!e)return Promise.reject(new Error("workId is required parameter"));let o=YI,i=B.isExternalCaseType(r),s=ze.buildActionObject({workId:e,caseTypeID:r,isExternalCase:i,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:a}=this.actionsApiPromise(o,s);return T(kx({...s})),a}deleteDataRecord(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=YI,o=ze.buildActionObject({className:e,keys:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T(kx({...o})),i}},$V=lD;var uD=class{c11nEnv;constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(d.getProperty(d.DATA_INFO.DATA_INFO_CONTEXT_KEY))}},MV=uD;var t_=class{fieldType;constructor(e){this.fieldType=e}applyFallback(e){let r=Xr.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||r?.currencyISOCode||"USD"}};var r_=class{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new t_(e);default:return}}};var An={DATAPAGE:"DATAPAGE",VIEW:"VIEW",FIELD:"FIELD",CASE:"CASE",PARAGRAPH:"PARAGRAPH",PORTAL:"PORTAL"};var kV=/[\\^$.*+?()[\]{}|]/g,Tse=RegExp(kV.source);function vse(t){return t=jy(t),t&&Tse.test(t)?t.replace(kV,"\\$&"):t}var LV=vse;var Rse=/\{(\d+)\}/,Pse=t=>{let e=t.split(Rse),r=[],n=new Map,o="",i=0;return e.forEach((s,a)=>{if(a%2===0){o+=LV(s),i+=s.length;return}let c=Number(s),l=n.get(c);if(l!==void 0){o+=`\\${l}`;return}r.push(c),n.set(c,r.length),o+="(.+?)"}),{key:t,pattern:new RegExp(`^${o}$`),groupToPlaceholder:r,literalLength:i}},UV=(t,e)=>{if(!t)return;let r;for(let s of Object.keys(e)){let a=Pse(s),c=a.pattern.exec(t);c&&(!r||a.literalLength>r.template.literalLength)&&(r={template:a,captures:c.slice(1)})}if(!r)return;let{template:n,captures:o}=r,i=[];return n.groupToPlaceholder.forEach((s,a)=>{i[s]=o[a]}),{message:e[n.key],args:i}};var _i=(t,e,r,n)=>{let o=[An.VIEW,An.FIELD,An.PARAGRAPH],s=[An.DATAPAGE,An.PARAGRAPH].includes(t)&&n?`#${n}`:"",a=t===An.DATAPAGE?"@BASECLASS":r;return t===An.DATAPAGE||o.includes(t)?`${a}!${t}!${e}${s}`.toUpperCase():`${t}!${e}${s}`.toUpperCase()},zd=class t{locale;localeReference;static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";static CASE_HISTORY="CASEHISTORY";lookupList=[];constructor(e,r){this.localeReference=r,this.locale=e}getLocalizedText(e,r){let n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,t.COMPONENT_FIELDS,t.COMMON_LABELS],o=this.#t(e,n)||e;return(r?this.#e(o,r):o)||e}getLocalizedMessage(e,r){let n=this.#t(e,[t.MESSAGES,t.COMMON_LABELS])??e;return(r?this.#e(n,r):n)||e}getLocalizedDataPage(e,r,n,o){if(!r||!n||!e)return e;let s=[_i(An.DATAPAGE,r,void 0,n),t.COMMON_LABELS,...this.lookupList],a=this.#t(e,s)??e;return(o?this.#e(a,o):a)||e}getLocalizedCaseHistory(e){if(!e)return e;let r=Ci(this.locale).localeStore[t.CASE_HISTORY];if(!r||Object.keys(r).length===0)return e;let n=UV(e,r);if(!n?.message)return e;let o=n.args.map(i=>this.getLocalizedText(i));return this.#e(n.message,o,!0)}#e(e,r,n=!1){if(r.length===0)return e;let o=n?0:1;return e.replace(/\{(\d+)\}/g,(i,s)=>r[`${Number(s)-o}`]??i)}#t(e,r=this.lookupList){if(r.length===0)return;let n=Ci(this.locale);for(let o of r){let i=this.#r(e,n.localeStore[o]);if(i)return i}}#r(e,r={}){let n=r[e];if(typeof n=="string")return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}};var dD=class{_dataSourceMap;constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,r){r&&Object.keys(r).length>0?this._dataSourceMap[e]=r: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,r,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);if(o)if(Array.isArray(n))o[r]=n;else{let i=o[r];o[r]=[...new Set([...i,n])]}}else{let o={};Array.isArray(n)?o[r]=n:o[r]=[n],this.addContextName(e,o)}}deletePropertyInContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);n&&r in n&&delete n[r]}}getPropertyFromContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);if(n&&r in n)return n[r]}return[]}getDependencies(e,r){let n=this.getPropertyFromContext(e,r),o=new Set(n);return n.forEach(i=>{o.add(i)}),[...o]}},xa=new dD;var pD={};qt(pD,{fetchViewResources:()=>vh,refreshViewByName:()=>Ose,updateViewResources:()=>n_});var n_=async t=>{let e=Le(t),r=g.getIn(e,d.COMPONENTS);Gi(e,{},!0),await fo(r)},vh=(t,e,r)=>J.resolveView(t,e,r),jV=(t,e,r,n)=>{let o=t[e];if(!o)return!1;let i=g.getIn(o,E.CASE_INFO.CASE_INFO_CLASSID);return g.getIn(o,d.CASE_INFO.VIEW_NAME)===r&&(!n||i===n)},zV=t=>{let{accessedOrder:e,items:r}=t;if(!e||!r)return null;let n=e[e.length-1];return n?r[n]?.context??null:null},Nse=(t,e)=>{let r=De();if(!r)return null;let n=r.getState(),{data:o,containers:i}=n;if(!i||!o)return null;let s=`${E.APP.APP}/primary`;if(i[s]){let a=zV(i[s]);if(a&&jV(o,a,t,e))return a}for(let a of Object.keys(i)){if(a===s)continue;let c=zV(i[a]);if(c&&jV(o,c,t,e))return c}return null},Ose=(t,e="",r="")=>{let n=r||null;if(!n){let a=`${E.APP.APP}/primary`;n=Nse(t,e),n||(n=Ar(a))}if(!n)return Promise.reject(new Error(`Unable to find an active context for view "${t}".`));let o=W(n);if(!o)return Promise.reject(new Error(`No data found for context "${n}".`));let i=g.getIn(o,E.CASE_INFO.CASE_INFO_ID)||"",s=ct({options:{context:n,pageReference:E.CASE_INFO.CASE_INFO_CONTENT}});return mD(),s.getPConnect().getActionsApi().refreshCaseView(i,t,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally(()=>{fD()})};var gD=class{meta;datasource;options;index;datasourceObj;constructor(e,r,n){this.meta=e,this.datasource=r,this.index=0,this.options=n,this.datasourceObj=J.getPropertyValue(r,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");let e=J.getContextPath(this.datasource,this.index);return this.index+=1,ct({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}},hD=gD;var yD=class{children;options;index;constructor(e,r){this.children=e,this.index=0,this.options=r}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");let e=this.index,r=this.children[e];this.index+=1;let n=r?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return ct({meta:r,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}},xse=(t,e)=>{let r=!!t?.repeat;if(!!t?.["repeat-self"])return new hD(t,t.context||"",e);if(r){let o=Da(`${e.context}.${d.SUMMARY_OF_LISTS}`,t.pageReference,e.context);return new hD(t.children[0],o||t.context,e)}if(t?.children)return new yD(t.children,e)},FV=xse;var cl=class{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,r){let n=[];if(e&&["portal","view"].includes(r)){let{accessedOrder:o,items:i}=e;if(o&&i){let s=o[o.length-1];i[s]&&i[s].view&&Object.keys(i[s].view).length>0&&n.push(i[s])}}return n}static getDependentProperties=e=>{let r=[];return e._rawConfig?.config?.parameters?r=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(r=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map(n=>n?.value)),r.filter(n=>_r.isProperty(n)).map(n=>_r.getPropertyName(n))}},Dse=new cl;Object.freeze(Dse);var SD,o_=(t,e,r)=>{t&&(Object.keys(t).forEach(n=>{if(n!=="children"){let o=t[n],i=fe.trimAnnotation(o);if((typeof i=="string"||typeof o=="string")&&(g.isValidAnnotation(o)&&g.isPropertyRef(i)||o.startsWith("@W ")||o.startsWith("@DW ")||o.startsWith("@E ")||o.startsWith("@PARAGRAPH ")||o.startsWith("@ATTACHMENT ")))r&&r.parentKey&&(r.isObjHasValue=!0),o.startsWith("@PARAGRAPH ")?e[n]=o:e[n]=i;else if(Array.isArray(i))i.forEach((s,a)=>{let c={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||[],e[n][a]=Object.create({}),o_(s,e[n][a],c)});else if(i&&typeof i=="object"&&i.type!=="exp"){let s={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||{},o_(i,e[n],s)}}}),r&&!r.isObjHasValue&&delete r.parentStateObj[r.parentKey])},VV=(t,e)=>{t._inheritedProps=t._inheritedProps||[],t.inheritedProps=[...t._inheritedProps,...g.deepClone(e.inheritedProps)]},ea=class{useCustomContext;_rawConfig;_classID;index;_ruleClass;viewName;meta;_isRoot;options;_isExpressionExist;_isWhenExist;_isValidatorExist;_pageReference;_referenceContext;_contextName;_stateProps;_actions;_children;_additionalRegisteredProps;_caseInfo;_dataInfo;parentViewName;_referenceList;_isInsideList;_inheritedConfig;_localeRuleName;_containerTarget;_readOnly;_hasSuggestions;_isState;_type;_actionsApi;categoryName;_relativePath;_dpResolver;constructor(e){let{meta:r,isRoot:n,options:o={},useCustomContext:i}=e;this.meta=r,this._isRoot=n,this.options=o,this.useCustomContext=i,this._rawConfig=r?.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=o.viewName,this.parentViewName=o.viewName??"",this._referenceList=o.referenceList||"",this._isInsideList=o.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=o.localeReference,this._containerTarget=o.target,this._readOnly=r?.config?.readOnly||o.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=o.categoryName||"",this._relativePath=o.relativePath??"",o.inheritedConfig&&Object.keys(o.inheritedConfig).length>0&&(this._inheritedConfig=g.deepClone(o.inheritedConfig)),r?.config?.inheritedProps&&VV(this._inheritedConfig,r?.config),this.meta?.config?.value&&typeof this.meta?.config?.value=="string"&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=ei.formatePageReferenceToArrayIndex(this.meta.config.value)),o_(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=Dt.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=E.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let s=this.options.pageReference;this.options.pageReference&&(s=fe.handleAnnotation(this.options.pageReference,this)),this._pageReference=J.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),this._type==="reference"&&(this._rawConfig=r);let a=this._type==="reference"&&g.isWhenExist({visibility:this.meta?.config?.visibility}),c=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions),l=!1;if(this._type!=="reference"&&r&&(this._rawConfig=J.resolveReference(r,this)),this._rawConfig){let u=this.getRawConfigProps();u&&(this._localeRuleName=fe.trimAnnotation(u.localeReference)||o.localeReference,this._isExpressionExist=g.isExpressionExist(u),this._isWhenExist=g.isWhenExist(u),this._isValidatorExist=Dt.isValidatorExist(u),l=this._checkAndSetDecisionParagraph("label",u?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&(this.viewName=fe.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&tj(this)}(a||c||l)&&lE(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,r,n){let o=!1;if(r&&r.startsWith(d.PARAGRAPH_ANNOTATION)){let i=fe.trimAnnotation(r);o=ho.isDecisionParagraph(i,n??this.getCurrentClassID()),o&&this.setStateProps({[e]:r})}return o}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||this._pageReference===""){let r=fe.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(r)?.isDeclarativeTarget||!1}return e}_getPropertyName(){let e=fe.trimAnnotation(this.getPropertyName());return this._pageReference===""&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){let e=this._getPropertyName(),{value:r,contextPage:n,label:o,required:i,readOnly:s,disabled:a,visibility:c,validationType:l,caption:u,allowMultiple:p,useRFC822Validation:m,displayAs:f}=this.getRawConfigProps();if(this.getValue(this._pageReference)||this._pageReference===""){let h=this._type==="Address"&&this._rawConfig?.config?.associatedView?fe.trimAnnotation(this._rawConfig.config.associatedView):"",S=o||u,A=this._rawConfig?.type,C={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(r),label:S?.startsWith("@")?fe.handleAnnotation(S,this,void 0):S,required:i,readOnly:s,disabled:a,visibility:c||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:r,validationType:l,...n&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(n)}`},componentName:A,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:p,isDeclarativeTarget:this.isDeclarativeTarget(),...f&&{displayAs:f},...this._type==="Email"&&{useRFC822Validation:m}};Ie.addFieldNode(this._contextName,this._pageReference,(h||this.categoryName||this.viewName)??"",e,this.getValue(e),C)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&this._type!=="Address")Ie.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",fe.trimAnnotation(this.getPropertyName()),this.index);else if(this._type==="Address"&&this._rawConfig?.config?.associatedView)Ie.removeViewNode(this._contextName,this._pageReference,fe.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{let e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,n={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};Ie.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,n)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&this.viewName){let r={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};Ie.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,r)}this._rawConfig?.type==="Group"&&this._rawConfig?.config?.id&&Ie.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),this._rawConfig?.type==="Address"&&this._rawConfig?.config?.associatedView&&Ie.addViewNode(this._contextName,this._pageReference,fe.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),this._rawConfig?.type?.toLowerCase()==="deferload"&&this._rawConfig.config?.name&&Ie.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",r="",n=g.getWhenNames(this._rawConfig?.config),o=this.getRawConfigProps();if(o?.type&&o?.type?.toLowerCase()===d.VIEW)r=d.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{r=d.CONTEXT_TREE_NODE_TYPES.FIELD;let i=this.getPropertyName();e=fe.isProperty(i)?fe.trimAnnotation(i):""}e&&n.forEach(i=>{Ie.addWhenNode(this.getContextName(),this.getPageReference(),r,e,i,{pageReference:this.getPageReference(),context:this.getContextName()})})}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this._inheritedConfig.displayMode!=="DISPLAY_ONLY"&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY"&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==d.VIEW||this._rawConfig.config?.renderMode==="Editable")&&this._rawConfig?.config?.referenceList&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY")){let{value:e,label:r,required:n,contextPage:o,readOnly:i,disabled:s,visibility:a,validationType:c,selectionMode:l,selectionList:u,selectionKey:p,referenceList:m,renderMode:f,caption:h,uniqueField:S}=this.getRawConfigProps(),A=r||h,C=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(C=this.getSelfReferencingDatapageKeys()),Ie.addPageListNode(this._contextName,this._pageReference,this.viewName??"",fe.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(this.getPropertyName()),label:A?.startsWith("@")?fe.handleAnnotation(A,this,void 0):A,required:n,readOnly:i,disabled:s,...o&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(o)}`},visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:c,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:l,selectionList:u,renderMode:f,referenceList:m,selectionKey:p,index:this.index,uniqueField:S,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?C:void 0});let I=this.getValue(fe.trimAnnotation(this.getPropertyName()),this._pageReference)||[];Ie.updatePageListNode(this._contextName,this._pageReference,fe.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){g.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){let e=this.getCaseInfo().getClassName(),r=this.getCurrentView();if(!r||!e)return;let n=vh(r,this,e);if(!n)return;let o=this.getRawMetadata()?.config?.referenceList;if(!o)return;let i={};typeof n.config?.parameters=="object"&&n.config.parameters!==null&&(i=n.config.parameters);let s=g.generateDataPageHashWithParameters(i,o,this),a=Mo(),c=a?a[o]?.[s]:{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:void 0}getParameterizedDataPageFieldValue(e,r){return this._dpResolver??=new cE(this),this._dpResolver.resolve(e,r)}getCaseInfo(){return this._caseInfo||(this._caseInfo=new QS(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new MV(this)),this._dataInfo}getCaseLocaleReference(e){let r=this.getRawConfigProps(),n=e||this.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))||this.getValue(d.CLASS_ID,d.getProperty(d.DATA_INFO.DATA_INFO_CONTENT))||r?.referenceClass||r?.className;return n?_i(An.CASE,n):null}getListActions(){return QL(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(){let e=this.getComponentConfig(),r;return e.selectionMode==="multi"?r="selectionList":e.selectionMode==="single"&&e.selectionKey?r="selectionKey":e.renderMode==="Editable"?r="referenceList":this._type==="Address"?r="addressProp":r="value",this.getComponentConfig()[r]}getFullReference(){let e=this.getPageReference(),r=this.getPropertyName();return J.getContextPath(e,r)}getContextName(){return this._contextName}getContainerName(){let{type:e}=this.getMetadata()||{},r=[d.CONTAINERS.ROOT_CONTAINER,d.CONTAINERS.VIEW_CONTAINER,d.CONTAINERS.FLOW_CONTAINER,d.CONTAINERS.MODAL_VIEW_CONTAINER,d.CONTAINERS.PREVIEW_VIEW_CONTAINER,d.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=ge.PRIMARY,name:o,routingInfo:i}=this.getComponentConfig();return(e&&r.includes(e)||i==="@ROUTING_INFO")&&o?o: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){let r=Se?.getStore()?.getState()?.data[`${this.getContextName()}/${d.SUGGESTION}`],n=this.getStateProps()?.value,o=J.getContextPath(this.getPageReference(),n),i=r?$n.getSuggestionsContext(this.getContextName()).getField(o):void 0;this._hasSuggestions=!!i,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){let r={...Xr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return r_.getStrategy(this._type)?.applyFallback(r),this.populateSuggestionProps(r),this.resolveConfigProps(r,e),g.resolveStringBooleans(e)}getLocalizationService(e){let r=this.getComponentName(),n=e||(r==="View"?this._rawConfig?.config?.template:r),o=v.getLocale()??"en-US",i=new zd(o,n),s=this.getCaseLocaleReference();return i.setLookupList(["APP!APPLICATION"]),s&&i.setLookupList([s]),i}getRawConfigProps(){let{_deepProps:e,...r}={...Xr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(r),r}resolveConfigProps(e,r={}){return e&&(J.resolveProps(e,r,this),fe.handleComponentMapping(r,{type:this.getComponentName()||"",config:e},this)),r}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),o_(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach(r=>{delete this._additionalRegisteredProps[r]}),!0}populateAdditionalProps(e){let r=a=>a?.map(c=>({...c,message:this.getLocalizationService()?.getLocalizedMessage(c.message)??c.message})),n=this.getComponentName(),o=this.getComponentConfig(),i=n===d.ROOT_CONTAINER&&e.renderingMode!=="portal";if(n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||n===d.OBJECTACTIONCONTAINER){let a=se(`${d.APP.APP}/${this.getContainerName()}`),c=Gt({context:a,category:E.PAGE});e.pageMessages=r(c),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:a}=this.getStateProps();a===void 0&&this.getComponentConfig()?.selectionMode==="multi"?a=this.getStateProps().selectionList||fe.trimAnnotation(this.getRawConfigProps().selectionList):!a&&this.getComponentConfig()?.renderMode==="Editable"&&this.getStateProps().referenceList&&(a=this.getStateProps().referenceList);let c=Gt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.MESSAGES.MESSAGES_TYPE_ERROR}),l=Gt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.MESSAGES.MESSAGES_TYPE_INFO});c&&c[0]&&(e.validatemessage=c.map(p=>this.getLocalizationService().getLocalizedMessage(p.message).replace(/\.$/,"")).join(". ")+(c[c.length-1].message.endsWith(".")?".":""),e.status=d.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status,c?.find(p=>p.type==="error"&&p.subType==="required")&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:a,subType:"required"})),l&&l[0]&&(e.infoMessage=l[0].message,e.status=d.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===d.ROOT_CONTAINER){let a=WT(i,se(`${d.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(a)?r(a):a,this._stateProps.httpMessages=e.httpMessages;let c=$n.getSharedState("isLoggedOut");e.isLoggedOut=c,this._stateProps.isLoggedOut=c;let l=Gt({context:d.APP.ROOT,category:"PAGE"});e.pageMessages=r(l),this._stateProps.pageMessages=e.pageMessages}if(n===d.HYBRID_VIEW_CONTAINER){let a=Gt({context:d.APP.APP,category:d.HTTP});e.httpMessages=r(a),this._stateProps.httpMessages=a}if(n===d.APP_SHELL&&e.portalDocMode===d.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=fn.getOpenedCaseItems(`${E.APP.APP}/${d.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===d.APP_SHELL){let a=d.APP.APP,c=se(`${a}/${this.getContainerName()}`),l=[...Gt({context:a,category:"PAGE"})||[],...Gt({context:c,category:"PAGE"})||[]],u=l.length>0?l:void 0;e.pageMessages=u&&r(u),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===d.SCALARLIST&&(this._stateProps.value=e.value),n===d.APP_SHELL||n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW){let a=Gt({context:d.APP.APP,category:"HTTP"}),c=v.getRenderingMode()==="HYBRID"?`${this.getContextName()}/${this.getContainerName()}`:`${d.APP.APP}/${this.getContainerName()}`,l=Gt({context:se(c),category:"HTTP"});a?l&&(a=a.concat(Gt({context:se(c),category:"HTTP"}))):a=Gt({context:se(c),category:"HTTP"}),e.httpMessages=a&&a.map(u=>this.getLocalizationService().getLocalizedMessage(u.message)),this._stateProps.httpMessages=e.httpMessages,a?.forEach(u=>{u.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...u.errorDetails):u.errorDetails,this._stateProps.errorDetails=e.errorDetails),u.correlationID&&(e.correlationID=u.correlationID)})}if(n===d.VIEW_CONTAINER||n===d.FLOW_CONTAINER||n===d.MODAL_VIEW_CONTAINER||n===d.PREVIEW_VIEW_CONTAINER||n===d.ROOT_CONTAINER||n===d.OBJECTACTIONCONTAINER){if(e.routingInfo=um(this.getContainerName(),this._contextName),n===d.ROOT_CONTAINER&&(e.rootConfig=cl.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===d.FLOW_CONTAINER||n===d.OBJECTACTIONCONTAINER){let a=Gt({context:this.getContextName(),category:d.CASEMESSAGES}),c=this.getContextName();e.caseMessages=a,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;let l=Ke(c)[0];if(l){let u=se(l),p=Se?.getStore()?.getState()?.data;p&&u&&(e.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime);let m=Gt({context:u,category:E.PAGE}),f=Gt({context:u,category:"HTTP"});e.httpMessages=r(f),e.pageMessages=r(m),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,f?.forEach(h=>{h.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...h.errorDetails):h.errorDetails,this._stateProps.errorDetails=e.errorDetails),h.correlationID&&(e.correlationID=h.correlationID)})}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=W(d.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map(a=>a.name),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map(a=>a.name),n===d.MODAL_VIEW_CONTAINER){let a=e.routingInfo?.accessedOrder||[],c=a[a.length-1];c&&(e.loadingInfo=this.getLoadingStatus(c))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else o.template===d.CASE_VIEW||o.template===d.RULE_VIEW||o.template===d.SELF_SERVICE_CASE_VIEW||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW||o.template===d.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===d.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.getInheritedProps()?.shouldAutoRefresh&&this.meta?.config?.value?.includes("@P")&&this.meta.config._autoRefresh_===void 0&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.doesContextExist()&&this.updateContextTree()}populateFieldMetadata(e){let{value:r,datasource:n,listType:o}=this.getComponentConfig(),{propertyValue:i,propertyAnnotation:s}=this.getPropertyDetails(o,n,r);if(i&&typeof i=="string"&&(i.includes(s)||i.includes(d.ATTACHMENT_ANNOTATION))){let a=fe.getPropertyName(i),c=this.getFieldMetadata(a);c&&this.updateConfigData(e,c,a)}}resolvePropertyMetadata(e,r){if(!e)return e;let n=ED(`${this._pageReference}.${r}`,this._contextName);if(!Array.isArray(e)){let{additionalInformation:o,classID:i}=e;this._checkAndSetDecisionParagraph("additionalInformation",o??void 0,i)?this._additionalRegisteredProps.additionalInformation=o:o&&this.setStateProps({additionalInformation:n}),e.additionalInformation=n;let{inputFormat:a}=e;if(typeof a=="string"&&a.startsWith("@")){let c=fe.handleAnnotation(a,this);typeof c=="object"&&c!==null&&"pattern"in c&&typeof c.pattern=="string"?e.inputFormat={pattern:c.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;let r=e.split(".");if(r.length<2){let s=this.getValue(d.CLASS_ID);return!s&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(s=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(lt(e,s),e)}let n=r.pop(),o=r.join(".")?".":"",i=this.getValue(`${o}${r.join(".")}${d.CLASS_ID}`);return i||(i=g.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(lt(n,i),e)}getCurrentPageFieldMetadata(e=null){let r=this.getPageReference().split(".");e!==null&&(r=e.split("."));let n=r.pop();return this.resolvePropertyMetadata(lt(n,this.getValue(`${r.join(".")}${d.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(d.CLASS_ID)}getCaseSummary(){let e={...this.getDataObject()[d.getProperty(E.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Ac(this.getContextName(),this.getPageReference())}}getReferencedUser(e){let r=this.getValue("referencedUsers");if(Array.isArray(r)){let n=r.find(o=>o.UserID===e);if(n)return{userId:n.UserID,UserName:n.UserName}}return r&&r[e]?r[e]:null}getCaseStages(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){let{value:r}=this.getStateProps();r&&(e.error=this.getContextDataValue(`${this.getPageReference()+r}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+r}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new uV(this)}isEditable(){return!!(this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||this._rawConfig.config.renderMode==="Editable"&&this._rawConfig.config.referenceList)&&!(typeof this._rawConfig.config?.value=="string"&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&(this._rawConfig.config.readOnly==="true"||this._rawConfig.config.readOnly===!0))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&this._rawConfig.config.disabled===!0))}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&typeof this._rawConfig?.config?.visibility=="string"?fe.handleAnnotation(this._rawConfig?.config?.visibility,this):typeof this.options?.visibility=="string"?fe.handleAnnotation(this.options?.visibility,this):!0}isReadOnly(){return this._readOnly===void 0?!1:this._readOnly==="true"||this._readOnly===!0?!0:typeof this._readOnly=="string"?fe.handleAnnotation(this._readOnly,this)===!0:!1}hasChildren(){return!!this._children}getComputedVisibility(e=[]){let r=this._type==="reference"&&!!this.getReferencedView(),n=r?this.getReferencedViewPConnect().getPConnect():this,o=e;if(r){let u=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(u))return!1;o=[...e,u]}if(this.getConfigProps().visibility===!1)return!1;if(n.getConfigProps().requiresVisibleChildren===!1||this.getConfigProps().requiresVisibleChildren===!1)return!0;let i=n.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]},a=n._type&&s.includeTypes.includes(n._type)&&!s.excludeTemplates.includes(i.template);if(i.highlightedData&&i.highlightedData.length&&i.showHighlightedData&&(a=!1),!a)return!0;let l=n.getChildren();return l?l.some(u=>u.getPConnect().getComputedVisibility(o)):!1}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,r){this._actions[e]=r}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!!(this._rawConfig&&this._rawConfig.isRefreshable)}getDataObject(e){return W(e||this.getContextName())}getImagePath(e){return`${Be.getConstellationServiceUrl()}/v860/${Be.getAppAlias()}/image/${e}?org=${_e.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){let e=this.options?.inheritedProps?.find(o=>o?.prop==="shouldAutoRefresh");e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);let r=FV(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:this._type==="Group"?this._rawConfig?.config?.id:null,relativePath:this._relativePath}),n=[];for(;r?.hasNext();){let o=r.next();(!this.isBulkAction()||!this.#r(o))&&n.push(o)}return r?.resetIndex(),n}return[]}setInheritedProp(e,r,n=!1){this._inheritedConfig[e]=r;let o=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(n||o)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:r})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){let e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#e(e){let r=this.getDeepInheritedConfig();return r?{...e,inheritedConfig:{...e.inheritedConfig,...r}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,r,n){let o=n||this.getLocaleRuleName(),i=o&&r?`${o}#${r}`:o,s=this.getLocalizationService(i).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocaleRuleNameFromKeys(e,r,n){return`${e}!${r}!${n}`}getValue(e,r){if(e=e?.replace(/\((\d+)\)/g,(i,s)=>`[${parseInt(s,10)-1}]`),this.useCustomContext)return e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce((i,s)=>i?.[s]??void 0,this.useCustomContext);let n=r||this.getPageReference(),o=e?.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(o){let i=o[1].split(".").length,s=o[2]||"",a=n?.split(".")||[];n=a.slice(0,Math.max(a.length-i,0)).join("."),s?e=`.${s}`:(e=n,n="")}return this._hasSuggestions&&this.getStateProps()?.value===e?J.getPropertyValue(e,n,`${this._contextName}/${d.SUGGESTION}`):J.getPropertyValue(e,n,this._contextName)}setInheritedConfig(e){if(!e)return;let{readOnly:r,displayMode:n,referenceType:o,hideLabel:i}=e;i&&(this._inheritedConfig.hideLabel=i),o&&(this._inheritedConfig.referenceType=o),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||r)&&(this._inheritedConfig.readOnly=r),e.inheritedProps&&(e.inheritedProps?.forEach(s=>{s.prop==="required"&&(this._inheritedConfig[s.prop]=s.value)}),VV(this._inheritedConfig,e))}getInheritedProps(){let e={},r={};return this._inheritedConfig.inheritedProps?.forEach(n=>{r[n.prop]=n.value}),J.resolveProps(r,e,this),e}setValue(e,r,n,o=!1,i={}){if(!g.isValidPropertyReference(e))return;let s,a,{isArrayDeepMerge:c}=i;this.isInsideList()&&this.getListActions().updateProperty(e,r),this.isBulkAction()&&(s=!0,r||(a=!0)),T({type:"SET_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,initialValue:n,isImplicit:o,context:this.getContextName(),...c!==void 0&&{isArrayDeepMerge:c},...s&&{isStrictTracking:s},...a&&{removePropertyFromChangedList:a}}})}updateDirtyCheckChangeList(e,r){let n={reference:`${this.getPageReference()}${e}`,value:r,context:this.getContextName()};HV(n)}getContextDataValue(e,r){return Wi(r||this.getPageReference(),e,this._contextName)}updateState(e){let r=this._pageReference.indexOf(d.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf("."),o=d.CASE_INFO.CASE_INFO_CONTENT;r!==0&&(o=n>0?this._pageReference.substring(n):this._pageReference),T(Re({context:this._contextName,data:e,rootPageReference:o}))}replaceState(e,r,n={}){if(!g.isValidPropertyReference(e))return;let{skipDirtyValidation:o=!1}=n;T({type:"REPLACE_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,context:this.getContextName(),skipDirtyValidation:o}})}reportError(e,r,n){T(Qi(e,r||{},n,r?.formFields))}getComponent(){return SD({getPConnect:()=>this})}createComponent(e,r,n,o){let i=this._pageReference;if(r){let s=Da(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,r,this._contextName);i=J.getContextPath(s||r,n)||r}else if(o&&o.pageReference){let s=o.pageReference;s=fe.handleAnnotation(s,this),i=J.getContextPath(this._pageReference,s)||""}return SD(ct({meta:e,index:this.index,options:this.#e({containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:i,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}),useCustomContext:this.useCustomContext}),o)}getReferencedView(){if(this.meta)return J.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(d.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){let r={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find(o=>o.prop==="shouldAutoRefresh");return n&&!r?.inheritedProps?.some(o=>o.prop==="shouldAutoRefresh")&&r?.inheritedProps?.push(n),delete r?.name,delete r?.type,ct({meta:this.getReferencedView(),options:this.#e({...e?this.options:void 0,...r,context:this.getContextName(),pageReference:r.context?this._resolvePageRef(r.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new kd(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new $V(this)),this._actionsApi}getActionManager(){return w}doesContextExist(e){return Ud(e??this.getContextName())}getGoogleMapsAPIKey(){return gt.getGoogleMapsAPIKey()}getServerURL(){return gt.getServerURL()}getLoadingStatus(e){let r=null;return e?(r=W(e),r=r?r.context_data:null):r=this.getDataObject().context_data,r&&r.isLoading?r.isLoading:!1}clearErrorMessages(e){e?.property?dt({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?dt({type:"error",...e}):(dt({type:"error",...e,context:d.APP.APP}),dt({type:"error",...e,context:se(`${d.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Da(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,r,n){delete e?.classID,this.replaceState(r,e),n?YL(e,r,this):Tj(this.getContextName(),`${this.getPageReference()}${r}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=$n.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,o=J.getContextPath(this.getPageReference(),n),i=r.getField(o);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,i),this.getActionsApi().triggerFieldChange(n,i),r.removeField(o,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=this.getStateProps()?.value||e,n=J.getContextPath(this.getPageReference(),r);this._hasSuggestions=!1,$n.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"}),xa.getDependencies(this._contextName,n)?.forEach(i=>{$n.getSuggestionsContext(this.getContextName()).removeField(i,{actionPerformed:"ignored"})})}}getSelfReferencingDatapageKeys(){let e=[],r=this.getPropertyName(),n=this.getFieldMetadata(r),{datasource:{parameters:o={}}={}}=n||{};return Object.values(o).forEach(i=>{let[,s]=i.split("."),a=r?.split(".").pop();s===a&&e.push(i.substring(i.lastIndexOf(".")+1))}),e}isReadOnlyField(){let{value:e,datasource:r,listType:n}=this.getComponentConfig(),{propertyValue:o,propertyAnnotation:i}=this.getPropertyDetails(n,r,e);if(!o||typeof o!="string"||!(o.includes(i)||o.includes(d.ATTACHMENT_ANNOTATION)))return!1;let s=fe.getPropertyName(o),a=this.getFieldMetadata(s);if(!a)return!1;let c={...this.getComponentConfig(),fieldMetadata:a,template:this._rawConfig?.config?.template};return this.#t(c,s)}#t(e,r){let n=_r.isPropertyInternal(r),o=e.datasource,i=this.getComponentConfig().isSearchField,{isClassKey:s,isSpecial:a,isDeclarativeTarget:c}=e.fieldMetadata??{},l=e.template==="DataReference"||this.meta?.type==="ObjectReference",u=e.listType!==d.ASSOCIATED;return i?!1:!!(c||n||!o&&(s&&!l||a)&&u)}getPropertyDetails(e,r,n){return e===d.ASSOCIATED?{propertyValue:r,propertyAnnotation:d.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:d.PROPERTY_ANNOTATION}}updateConfigData(e,r,n){e.fieldMetadata=r,r.additionalInformation&&(e.additionalInformation=r?.additionalInformation),r.inputFormat&&typeof r.inputFormat!="string"&&(e.inputFormat=r.inputFormat),this.#t(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}))}#r(e){let r=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(cl.allowedComponetsForBulkProcessing[r]===!0||cl.allowedComponetsForBulkProcessing[r]?.[n]===!0)}};function ct(t){let e=new ea(t);return{getPConnect:()=>e}}function BV(t){SD=t}var AD=class t{_grammar;_state;_tree;_exprStr;_endState;_subParser;_position;constructor(e,r,n){this._grammar=e,this._state="expectOperand",this._exprStr=r||"",this._endState=n||{},this._subParser=null}static _setParent(e,r){Object.defineProperty(e,"_parent",{value:r,writable:!0})}_addToken(e){let r=i_[this._state],n=this._exprStr;if(this._exprStr+=e.element,r.subHandler){this._subParser||this._startSubExpression(n);let o=this._subParser?._addToken(e);o&&(this._endSubExpression(),this._state=o)}else if(r.operatorTypes?.[e.tokenType]){let o=r.operatorTypes[e.tokenType],i=CD[e.tokenType];i&&i.call(this,e),o.toState&&(this._state=o.toState)}else{if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}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){let{endStates:r}=i_[this._state];this._subParser=new t(this._grammar,e,r)}_endSubExpression(){i_[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,t._setParent(e,this._position)):this._tree=e,this._position=e}},s_=AD;var wse="literal",bD="identifier",$se=t=>typeof t=="object"&&t!==null&&"operationType"in t,_D={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t&&e},ID={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t||e},GV=(t,e,r)=>{let n=t==="",o=e===""||e===null||e===void 0;if(n&&o)return r;if(typeof e=="boolean"){let s=!n&&t!=="false"&&t!=="0"?!!t:!1;return r?s===e:s!==e}return n!==o?!r:r?t===e:t!==e},qV={">":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>e},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>=e},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<e},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<=e},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:GV(t,e,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!0:GV(t,e,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:t=>{let e=typeof t=="object"?t.value:t;return e==="true"||e==="false"?e!=="true":!e}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":_D,AND:_D,and:_D,"||":ID,OR:ID,or:ID,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).includes(String(e))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).includes(String(e))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).startsWith(String(e))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).startsWith(String(e))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).endsWith(String(e))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).endsWith(String(e))},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!t},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!!t},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(e).split(",").includes(String(t))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(e).split(",").includes(String(t))}},Mse=(t,e,r)=>{if(typeof t.value!="string")return"";let n=t.value.substring(1),o=e?.getFieldMetadata(n)?.type??"";if(o)return o;let{pageReference:i,context:s}=r??{};if(!i||!s)return"";let a=J.resolveClassID(t.value,i,s),c=lt(n,a);return c&&!Array.isArray(c)?c.type??"":""},TD={BinaryExpression:function(e){let r=[],n=e.right,o=e.operator??"",i=e.left;if(!i)return!1;let s=typeof i.value=="boolean"?"True-False":"";r[0]=this.evaluateAST(i),!s&&i.operationType===bD&&(s=Mse(i,this._context,this._contextTreeNodeContext)),r[1]=n?this.evaluateAST(n,s):"";let a=this._grammar[o];return a?.evaluate?a.evaluate(r[0],r[1]):!1},identifier:function(e){let r=typeof e.value=="string"?e.value:"";if(this._localDataObject)return g.getIn(this._localDataObject,r?r.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return J.getLitePropertyValue(this._contextTreeNodeContext,r)??"";if(!this._context)return"";let n=this._context.getFieldMetadata(r)?.type??"",o=this._context.getValue(r)??"";if(n==="Decimal"&&typeof o=="string"){let i=parseFloat(o);return Number.isNaN(i)?"":i}return o},literal:function(e,r){return(r===void 0||r===""||r==="True-False")&&(e.value==="true"||e.value==="false")?e.value==="true":e.value??""},UnaryExpression:function(e){let r=e.operator,n=e.right;if(!r||!n)return!1;let o=this._grammar[r];return o?.evaluate?o.evaluate(n):!1}},CD={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){let r=String(e.value),{precedence:n}=this._grammar[r],o=this._position._parent,i=o?o.operator:null,s=i?this._grammar[i]:null,a=s?s.precedence:null;if(a&&n)for(;o?.operator&&a>=n;)this._position=o,o=o._parent;let c={operationType:"BinaryExpression",operator:r,left:this._position};s_._setParent(this._position,c),o?(this._position=o,this.setPositionInAST(c)):(this._tree=c,this._position=c)},identifier:function(e){let r={operationType:bD,value:e.value};this.setPositionInAST(r)},literal:function(e){this.setPositionInAST({operationType:wse,value:e.value})},subExpression:function(e){$se(e)&&this.setPositionInAST(e)}},i_={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:bD},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:CD.subExpression,endStates:{closeParenthesis:"expectBinOp"}}};var kse=["binaryOperator","unaryOperator","openParenthesis"],Lse=/^\s*$/,WV=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Use="literal",jse="identifier",zse=/\\\\/,Fse=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Vse=["[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]+)"],Bse=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,vD=class t{_grammar;_splitRegex;constructor(e){this._grammar=e}static _isNegative(e){return kse.some(r=>r===e[e.length-1].tokenType)}static _isWhitespace(e){return!!e.match(Lse)}static _createWordboundary(e){return e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.match(WV)&&(e=`\\b${e}\\b`),e}static _unquote(e){let[r]=e,n=new RegExp(`\\\\${r}`,"g");return e.substr(1,e.length-2).replace(n,r).replace(zse,"\\")}_getSplitRegex(){if(!this._splitRegex){let e=Object.keys(this._grammar).sort((r,n)=>n.length-r.length).map(r=>t._createWordboundary(r),this);this._splitRegex=new RegExp(`(${[Fse.join("|"),e.join("|"),Vse.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){let r=this._getSplitRegex();return e.split(r).filter(n=>n.trim())}_createToken(e){let r={tokenType:Use,value:e,element:e};return e.startsWith('"')||e.startsWith("'")?r.value=t._unquote(e):e.match(Bse)?r.value=parseFloat(e):e==="true"||e==="false"?r.value=e==="true":this._grammar[e]?r.tokenType=this._grammar[e].operatorType:e.match(WV)&&(r.tokenType=jse),r}_getTokens(e){let r=[],n=!1;for(let o=0;o<e.length;o+=1)t._isWhitespace(e[o])?r.length&&(r[r.length-1].element+=e[o]):e[o]==="-"&&t._isNegative(r)?n=!0:(n&&(e[o]=`-${e[o]}`,n=!1),r.push(this._createToken(e[o])));return r}tokenize(e){let r=this._splitExpression(e);return this._getTokens(r)}},KV=vD;var RD=class{_grammar;_expression;_ast;_context;_contextTreeNodeContext;_localDataObject;constructor(e,r){this._grammar={...qV},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=r}buildAST(){let r=new KV(this._grammar).tokenize(this._expression),n=new s_(this._grammar);return n.addTokens(r),this._ast=n.buildAst(),this}evaluate(e,r){return this._context=e,this._contextTreeNodeContext=r,this.evaluateAST(this._ast)}evaluateAST(e,r){return YV(e.operationType,TD)&&TD[e.operationType].call(this,e,r)}},JV=RD;var PD=(t,e)=>{let r=/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,n=t.replace(r,o=>o.replace("=","=="));return new JV(n,e)},ND=t=>t?t.buildAST():!0,OD=(t,e,r)=>t?t.evaluate(e,r):!0,a_=(t,e,r)=>{let n=PD(t,e),o=ND(n);return OD(o,r)},YV=(t,e)=>t in e;var xD=class{static handleExpression(e,r,n,o){let i=this.getContext(e,o),a={actionObject:{action:"decexp",params:{source:e,value:r,targets:n},context:i}};gt.fetchData(a).then(c=>c.json()).then(c=>{this.updateState(c,o)}).catch(c=>console.log(c))}static getContext(e,r){let n=e.substring(0,e.indexOf(".")),o=J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pxObjClass")}`,null,r)||J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pyClassName")}`,null,r);return{name:n,class:o}}static updateState(e,r){Object.keys(e).forEach(n=>T({type:bt,payload:{context:r,reference:n,value:e[n]}}))}},ZV=xD;var c_={},QV=(t,e)=>c_[e]&&Object.hasOwn(c_[e],t),DD=t=>{let{context:e}=t;QV(t.reference,e)&&ZV.handleExpression(t.reference,t.value,c_[e][t.reference],e)},Jb=(t={})=>{g.copy(t,c_)},Hse=(t,e,r)=>a_(t,e,r?.pConnect.getPConnect());var $D=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},l_=$D;var Fd={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},Gse=5e3,qse=()=>{let t=Number(v.getFeatureMap()?.pyAutoSaveDurationInMS);return t>0?t:Gse},MD='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])',Wse=`${MD}, textarea, [contenteditable="true"]`,Ii=new Map,ms=new Map,d_=new Set,Rh=new Map,Ph=new Map,Vd=new Set,u_=(t,e)=>{Rh.get(t)?.forEach(r=>r(e))},Kse=t=>{let e=Ph.get(t);if(!(!e||e.size===0)){for(let[r,n]of e)ke.executeStateMachine(t,r,n,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||T(sa({reference:r,value:n,context:t,isImplicit:!1,skipDirtyValidation:!1}));Ph.delete(t)}},Jse=(t,e)=>{let r=t,n=r.includes(d.MODAL),o=oe(E.CASE_INFO.CASE_INFO_ID,null,r),i=oe(E.CASE_INFO.ASSIGNMENT_ID,null,r),a=oe(E.CASE_INFO.ACTIVE_ACTION_ID,null,r)||oe(E.CASE_INFO.ASSIGNMENTACTION_ID,null,r),c=oe(E.CASE_INFO.CASE_TYPE_ID,null,r),l=oe("isProcessAction","isProcessAction",r),u=w.getNextActionMgrId(),p={context:r,containerItemID:t,assignmentID:i,actionID:a,caseID:o,containerName:e,caseType:c,isModalAction:n,isFormValid:void 0,isProcessAction:l,saveOnly:!0,autosave:!0,actionMgrID:u},m,f,h=new Promise((S,A)=>{m=S,f=A});if(m&&f)w.register(u,h,m,f,yi,p,!0);else throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return Ct.executeOrQueueDeferredAction(sl(p)),h},p_=(t,e)=>{let r=ms.get(t);r!==void 0&&clearTimeout(r),ms.set(t,setTimeout(()=>{ms.delete(t),e()},qse()))},kD=t=>{let e=qe(t),r=te(e);return!r||!mr(r)?!0:se(r)===e},m_=async t=>{if(d_.has(t)||Vd.has(t))return;let e=Ii.get(t);if(!e||!kD(t))return;let r=typeof document<"u"?document.activeElement:null;if(r&&r===AU(t)&&r.matches(MD)){p_(t,()=>m_(t).catch(()=>{}));return}Kse(t);let n=!1;qb(!0);try{if(!rn.hasUnsavedChanges(t))return;n=rn.isFormValid(t)}finally{qb(!1)}if(!n){u_(t,Fd.SKIPPED);return}d_.add(t),u_(t,Fd.SAVING);try{await Jse(t,e.containerName),rn.clearChangedProperties(t),u_(t,Fd.IDLE)}catch{u_(t,Fd.ERROR)}finally{d_.delete(t)}},XV=()=>{if(!(typeof document>"u"||!document.activeElement?.matches(Wse)))for(let e of Ii.keys())ms.has(e)&&kD(e)&&p_(e,()=>m_(e).catch(()=>{}))},e6=XV,t6=t=>{t.key==="Tab"&&XV()},r6=t=>{let{target:e}=t;if(!(typeof Element>"u"||!(e instanceof Element)||!e.matches(MD)))for(let r of Ii.keys())ms.has(r)&&kD(r)&&(VS(r,e),p_(r,()=>m_(r).catch(()=>{})))},n6=t=>{let e=t?.data?.caseInfo?.settings?.autoSave;if(e!=null)return!!e;let r=t?.containerItemID??t?.context;if(r){let n=oe("caseInfo.settings.autoSave",null,r);if(n!=null)return!!n}return!1},fs=t=>Ii.has(t),o6=(t,e,r)=>{let n=Ph.get(t);n||(n=new Map,Ph.set(t,n)),n.set(e,r)},i6=(t,e)=>{Ii.size===0&&typeof document<"u"&&(document.addEventListener("pointerdown",e6,{passive:!0}),document.addEventListener("keydown",t6,{passive:!0}),document.addEventListener("input",r6,{capture:!0,passive:!0})),Ii.set(t,e)},f_=t=>{let e=ms.get(t);e!==void 0&&clearTimeout(e),ms.delete(t),d_.delete(t),Ii.delete(t),Vd.delete(t),Ph.delete(t),BS(t),Ii.size===0&&typeof document<"u"&&(document.removeEventListener("pointerdown",e6),document.removeEventListener("keydown",t6),document.removeEventListener("input",r6,{capture:!0}))},LD=t=>{let e=`${t}/`;for(let r of[...Ii.keys()])r.startsWith(e)&&f_(r)},s6=(t,e)=>{let r=Rh.get(t);return r||(r=new Set,Rh.set(t,r)),r.add(e),()=>{let n=Rh.get(t);n&&(n.delete(e),n.size===0&&Rh.delete(t))}},g_=t=>{let e=ms.get(t);e!==void 0&&(clearTimeout(e),ms.delete(t))},Bd=t=>{Ii.has(t)&&(Vd.has(t)||p_(t,()=>m_(t).catch(()=>{})))},a6=()=>Vd,c6=t=>{g_(t),Vd.add(t)},l6=t=>{Vd.delete(t),rn.hasUnsavedChanges(t)&&Bd(t)};var{APP:Yse}=d,hr={},wa={},$a={},d6=new Set([kt,Ze,et,Ko]),Zse=new Set([Tn,po,bt,oc,uo,ki,...d6]),Tu="You will lose unsaved changes. Do you want to continue?",_j="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Qse=(t,e,r)=>{let n=wa[e]||{};return Object.keys(n).forEach(o=>{let i=n[o].associatedProperty;Object.hasOwn(n,o)&&(i===void 0||r.has(i))&&g.buildObject(o,t,n[o].value)}),t},xc=(t=Yse.APP,e,r)=>{let n=hr[t]||{},o=wa[t]||{};if(Object.keys(n).length===0&&Object.keys(o).length===0)return{};let i=[],s=null;e||(i=Oc(t,!0)),r||(s=new Set(Oj(t)));let a=new Set(i),c={};return Qse(c,t,a),Object.keys(n).forEach(l=>{let u=!e&&a.has(l)||e;Object.hasOwn(n,l)&&u&&!s?.has(l)&&g.buildObject(l,c,n[l].value)}),c};var Nh=t=>{let{context:e}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;delete hr[e]?.[r],delete wa[e]?.[r]};$L((t,e)=>{Nh({context:t,reference:e});let r=e.lastIndexOf(".");r<1||r===e.length-1||dt({type:d.MESSAGES.MESSAGES_TYPE_ERROR,context:t,pageReference:e.slice(0,r),property:e.slice(r)})});var p6=t=>t&&$a[t],FT=t=>{t&&$a[t]&&($a[t]=!1)},u6=(t,e)=>{let{context:r,initialValue:n="",isStrictTracking:o,associatedProperty:i}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;t[s]?t[s].previousValue=oe(e.reference,null,r):(t[s]={initialValue:n||oe(e.reference,null,r)},t[s].previousValue=t[s].initialValue),t[s].value=e.value,i&&(t[s].associatedProperty=i),o&&t[s].value===t[s].initialValue&&Nh(e)},m6=t=>{let{payload:e}=t,{context:r}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;Ie.isFieldExists(r,n)||(wa[r]=wa[r]||{},u6(wa[r],e)),hr[r]=hr[r]||{},u6(hr[r],e)},f6=(t,e,r)=>{let n=hr[t]||{},o;r instanceof Set?o=r:r&&r.length>0&&(o=new Set(r)),Object.keys(n).forEach(i=>{o?.has(i)||g.hasIn(e,i)&&(n[i].value=g.getIn(e,i))})},Oh=t=>{let e=hr[t];if(!e)return{};let r={};return Object.keys(e).forEach(n=>{r[n]=e[n].value}),r},HV=({value:t,context:e,reference:r})=>{let n=te(e),o=We(n,e)||{};if(l_.isPageInstruction(r)||o?.subscriptFieldName)return;let i=r?.startsWith(".")?r?.substr(1):r;hr[e]=hr[e]||{},hr[e][i]||(hr[e][i]={initialValue:oe(i,null,e)}),hr[e][i].value=t},Or=t=>t&&hr[t]&&Object.keys(hr[t]).some(e=>hr[t][e].initialValue!==hr[t][e].value)||!!p6(t),UD=(t,e)=>{if(!(t&&e))return!1;let r=hr[t]&&hr[t][e];return r?r.previousValue!==r.value:!1},Xse=()=>Object.keys(hr).some(t=>Or(t)),vu=t=>{t&&hr[t]?(hr[t]={},wa[t]={}):t==="all"&&(hr={},wa={},$a={}),$a[t]&&($a[t]=!1),BS(t)},g6=(t,e,r=new Set)=>{if(r.has(e))return;r.add(e);let n=xa.getDependencies(t,e),o=Cr.getResetDependencies(t,e);[...n,...o].forEach(i=>{let s=g.getPropertyNameFromDependency(i);if(typeof i=="object"&&i.mode==="multiRecord"){let a=s.split("."),c=`.${a.pop()}`,l=a.join(".");ke.isStateMachineExist(t,l,c)?ke.getStateMachine(t,l,c).deleteAll():fs(t)&&(ke.setStateMachine(t,c,l,new yc(c,l,t)),ke.getStateMachine(t,l,c)?.deleteAll(!1))}else l_.isPageInstruction(s)&&ke.executeStateMachine(t,s,""),T({type:bt,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}});g6(t,s,r)})},eae=t=>{let{context:e,pageReference:r,value:n,reference:o}=t;Cr.triggerCascade(e,o,n);let i=xa.getDependencies(e,o),s={context:e,datapages:{}};g6(e,o),i.forEach(a=>{let c=r;a.startsWith(r)||(c="");let l=a.replace(`${c}`,"").split(".").filter(_=>!!_);l.pop();let u=l.join("."),p=oe(`.${u}`,c,e)?.classID||t.classID,m=lt(a.split(".").pop(),p),{datasource:f}=m,h={},S=[];f.parameters.forEach(_=>{_?.value?(h[_.name]=_r.isProperty(_.value)?oe(`.${g.getFullPropertyReference([u,g.getPropertyName(_.value)])}`,c,e):_.value,h[_.name]===void 0||h[_.name]===null||h[_.name]===""?(h[_.name]="",S.push(d.NULL_STRING)):S.push(h[_.name])):(h[_.name]="",S.push(d.NULL_STRING))});let A=f.name.concat(d.UNDERSCORE_STRING,g.getHashedString(S.join(d.HASH_DELIMITER))),{name:C}=f,I=Ur(C);s.datapages[A]={mode:f.mode,propertyName:a,name:f.name,dataViewParameters:h,refreshStrategy:I?.refreshStrategy}}),i.length&&T({type:iS,payload:s})},tae=()=>t=>e=>{let{type:r,payload:n={}}=e||{};if(!r||!Zse.has(r)){t(e);return}if(r===Tn&&(DD(n),eae(n),Ct.registerBlockingAction(n.context).catch(()=>{}),setTimeout(()=>{Dm()?!Ai.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)&&(UD(n.context,n.reference)||Am(n.context))&&Iu(n):((UD(n.context,n.reference)||Am(n.context))&&Iu(n),Ai.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)),Ct.deRegisterBlockingAction(n.context).catch(()=>{})},0)),r===po&&!n?.isDefault){let{context:o,referenceList:i,c11nEnv:s,listIndex:a,instruction:c,skipDirtyValidation:l=!1,skipRefresh:u=!1}=n;a===0&&c==="INSERT"&&s&&rj(s),u||setTimeout(()=>{Ai.triggerRefreshForType("PROP_CHANGE",i,o)||Iu({context:o,pageReference:i})},0),l||($a[`${o}`]=!0)}if(r===bt||r===oc){let{reference:o,isImplicit:i,context:s,skipDirtyValidation:a=!1}=n;Ie.updateFieldNodeValue(s,o,n.value),!l_.isPageInstruction(o)&&!a?m6(e):a||($a[`${s}`]=!0),(n.removePropertyFromChangedList||i)&&Nh(n)}if(r===uo||r===ki){let{transientItemID:o,data:i}=n;g.iterateLeafNodes(i,s=>{Nh({context:o,reference:s.join(".")})})}r&&d6.has(r)&&(vu(n.context),Cr.purgeResetDependencies(n.context),X2(n.context),(n.childContainersContexts||[]).forEach(s=>{vu(s)}),(n.transientItems||[]).forEach(s=>{vu(s)})),t(e)},h6={propertyChangeMiddleware:tae,getChanges:xc,recordChange:m6,isDirty:Xse,isPropertyDirty:UD,isContextDirty:Or,resetChangedProperties:vu,deleteRecordedChange:Nh,isComplexObjectMerged:p6,resetComplexObjectDirtyStatus:FT};var jD=class{getCoreheaders(e){let r=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,n=se(r),o=pe(n),i=J.getProperty(d.COREHEADERS,"",o);if(i&&e in i)return i[e]}},y6=new jD;var xh={defaultLimit:16},FD={SINGLE:"single",MULTIPLE:"multiple"},ge={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},zn=()=>De()?.getState()?.containers;function ot(t){return typeof t=="string"&&t.trim()!==""}var ut=t=>ot(t)?De()?.getState().containers[t]:null,jd=(t,e,r)=>{if(!r)return{continueExecution:!1,containerItemID:t};let n=ut(r),o=!1,i=t;return n?.accessedOrder.forEach(s=>{e===n.items[s].key&&(o=!0,i=n.items[s].context)}),{continueExecution:o,containerItemID:i}},We=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[t];return n&&n.items&&n.items[e]||null},LT=t=>ot(t)?De()?.getState().containers[t]?.items:null,Hd=t=>ot(t)?De()?.getState().containers[t]?.accessedOrder||[]:[],rae=t=>ot(t)&&Hd(t)?.length>0||!1,ll=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let o=zn()?.[t],i=o&&o.items||null,s=r||((a,c)=>a===c);if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return!0}return!1},VD=t=>{let{containers:e}=De()?.getState()||{};return!e||!ot(t)?!1:Object.keys(e).some(r=>e[r]?.accessedOrder?.includes(t))},wt=(t,e,r)=>{if(!ot(t)||!ot(e))return null;let o=zn()?.[t],i=o&&o.items||null,s=r||((a,c)=>a?.toLowerCase()===c?.toLowerCase());if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return a}return null},nae=(t,e)=>{let r=(n,o)=>n?.toLowerCase()===o?.toLowerCase();if(t&&e){for(let n of Object.keys(e))if(r(t,e[n].key))return e[n]}return null},oae=t=>{if(!ot(t))return null;let e=zn()??{};for(let r of Object.keys(e))if(e[r]){let o=e[r].items??null,i=nae(t,o);if(i)return i}return null},Ch=(t,e)=>{if(!ot(t)||!ot(e))return!1;let r=zn();return r&&Object.hasOwn(r,`${t}/${e}`)},iae=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[`${t}/${e}`];return n&&n.type},se=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n;e=o&&o.length>0?o[o.length-1]:null}return e},sae=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let n=wt(t,e,r);return n?n===se(t):!1},S6=(t,e)=>{let r=null,n=zn();if(!n)return null;for(let o of Object.keys(n))if(n[o].items){let i=n[o].items[t];if(i?r=i[e]:r=null,r)break}return r},pe=t=>ot(t)?S6(t,"context"):null,Ar=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n,i=o&&o.length>0?o[o.length-1]:null;e=pe(i)}return e},Au=t=>{if(!ot(t))return[];let e=t.endsWith("/")?t:`${t}/`,r=[],n=!1,o=zn();if(!o)return[];let i=s=>{let a=[];return Object.keys(s).forEach(l=>{l.startsWith(e)&&l!==e&&a.push(l),l===t&&(n=!0)}),a};for(let s of Object.keys(o))if(o[s].items){let a=i(o[s].items);a&&a.length>0&&(r=r.concat(a)),r=r.sort()}return n?r:[]},Ke=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&e.push(o);return e},wo=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&(Hd(o)||[]).forEach(s=>{pe(s)!==t&&e.push(pe(s))});return e},Dh=t=>{let e=[...wo(t),t],r=[],n=De()?.getState().data||{};return e.forEach(o=>{Object.hasOwn(n,`${o}/${d.SUGGESTION}`)&&r.push(`${o}/${d.SUGGESTION}`)}),r},It=t=>ot(t)?t&&ut(t)&&ut(t).type===FD.SINGLE:null,mr=t=>ot(t)?t&&ut(t)&&ut(t).type===FD.MULTIPLE:null,jr=t=>ot(t)&&ut(t)&&ut(t).items&&Object.keys(ut(t)?.items).length>0||!1,E6=t=>t&&xh[t]?xh[t]:xh.defaultLimit,aae=(t,e=xh.defaultLimit)=>{ot(t)&&(xh[t]=e)},UT=t=>{if(!ot(t))return!1;let e=!1,r=ut(t),{items:n={}}=r,o=Object.keys(n),i=E6(t);return o&&o.length>0&&o.length>=i&&(e=!0),e},Dc=t=>{if(!t||!ot(t.name)||!ot(t.context))return null;let e=t?.name,r=`${t?.context}/${e}`,n=ut(r),o=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map(a=>n?.items[`${a}`]?.context)||[],i=Ke(`${d.APP.APP}/${d.PREVIEW}`),s=wo(`${d.APP.APP}/${d.PREVIEW}`);return{context:t?.context,name:e,containerItems:[...o,...s],childContainers:i}},wh=t=>{if(!ot(t))return!1;let e=pe(t);return Or(e)||MT(t)},jT=t=>{if(!ot(t))return null;let e,r=ut(t),{accessedOrder:n=[]}=r;for(let o=0;o<n.length;o+=1){let i=n[o];if(!wh(i)){e=i;break}}return e},te=t=>{if(!ot(t))return null;let{containers:e}=De()?.getState()||{};if(e){for(let n of Object.keys(e))if(e[n]?.accessedOrder?.includes(t))return n}let r=t.lastIndexOf(d.UNDERSCORE_STRING);return t.slice(0,r)},ta=async(t,e={})=>{if(!ot(t))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));let r=te(t),n=pe(t),{skipDirtyCheck:o}=e,i=!0,s=[];if(wh(t)&&!o&&(Nn.disableLoadingIndicator({context:n}),i=await oi.confirm(Nr().getLocaleValue(Tu,"Messages")),Nn.enableLoadingIndicator({context:n})),i){let{accessedOrder:a=[],items:c={},type:l}=ut(r);s=a.filter(S=>S!==t);let u=s[s.length-1],p=c[u]||{},{semanticURL:m=d.FORWARD_SLASH_STRING,context:f}=p;r?.includes(ge.MODAL)||(s.length>0&&m&&m!==d.FORWARD_SLASH_STRING?qi({directUrlUpdation:!0,semanticURL:m,options:{containerItemID:u,context:f}}):qi({directUrlUpdation:!0,semanticURL:d.FORWARD_SLASH_STRING,options:{}})),T(Qe({containerItemID:t,context:n,target:r,containerInfo:{newAccessedOrder:s,containerType:l},...e.eventName!==void 0?{eventName:e.eventName}:{}}))}return{newAccessedOrder:s,removeItem:i}},BD=(t,e,r,n)=>{let o="root",i=lr(e,o,!0),s=Z(e,o),a={root:t,containerItemID:i,context:n?"app":i,target:s,containerName:e},c={data:r,context:n?"app":i},l=[Pt(a)];l.push(Re(c)),T(l)},cae=(t,e,r)=>{let n=Hd(t);n=n.filter(i=>i!==e);let o=!1;for(let i=0;i<n.length;i+=1)if(pe(n[i])===r){o=!0;break}return o},HD=t=>{if(!ot(t))return!1;let e=zn(),r=pe(t),n=e?Object.keys(e):[],o=!1;for(let i=0;i<n.length&&(o=cae(n[i],t,r),!o);i+=1);return o},Ei=t=>{Array.isArray(t)||(t=[t]);let e=zn()||{};return t.map(r=>{let n=te(r);return g.getIn(e,[n,"items",r,"transientItems"])||[]}).flat()},lae=t=>{let{transientItemID:e,data:r,options:n}=t,o=g.deepClone(De()?.getState().data[e]);n?.reset&&g.iterateLeafNodes(o,i=>{i[i.length-1]!=="classID"&&g.setIn(o,i,"")}),T(_h({transientItemID:e,data:g.mergeDeep(r,o)}))},uae=t=>{let{transientItemID:e,data:r}=t;T(ZD({transientItemID:e,data:r}))},dae=t=>{let e=g.deepClone(De()?.getState().data[t]);g.iterateLeafNodes(e,r=>{r[r.length-1]!=="classID"&&g.setIn(e,r,"")}),T(YD({transientItemID:t,data:e}))},A6=t=>{let e=g.deepClone(De()?.getState().data[t]);g.iterateLeafNodes(e,r=>g.setIn(e,r,"")),T(QD({transientItemID:t,data:e}))},pae=t=>{De()?.getState().data[t]&&A6(t);let e=t.lastIndexOf("/"),r=e>0?t.substring(0,e):t,n=te(r);T(Ih({transientItemID:t,containerItemID:r,target:n}))},zD=class{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){let r=this?.items?.indexOf(e);r!==void 0&&r!==-1&&this.items.splice(r,1)}},mae=(t,e={})=>{if(!ot(t))return;let r=ut(t),n=Array.isArray(r?.accessedOrder)?r.accessedOrder:[];if(n.length===0)return;let{remove:o,keep:i}=e,s;if(i!==void 0){let a=new Set(i);s=n.filter(c=>!a.has(c))}else if(o!==void 0){let a=new Set(o);s=n.filter(c=>a.has(c))}else s=[...n];for(let a of s){let c=pe(a),l=Ei(a);T(Qe({containerItemID:a,context:c,target:t,...l.length>0&&{transientItems:l}}))}},h_=()=>zD,GD=t=>{let e={containerName:t};e.childContainers=Ke(t),T({type:eS,payload:e})},qD=(t,e)=>{let r=Au(t),{key:n}=We(te(t),t),o=[];r.forEach(i=>{let{key:s}=We(te(i),i);if(s===n){let a={data:{caseInfo:{headers:{etag:e}}},target:te(i),context:i};o.push({type:Er,payload:a})}}),o.length&&T(o)},WD=(t,e)=>{let r=[],n={data:{caseInfo:{headers:{etag:e}}},target:te(t),context:t};r.push({type:Er,payload:n}),r.length&&T(r)},zo=()=>v.isPortalLoaded?"app":"root",fae=()=>y6,KD=(t,e)=>{let r={data:{caseInfo:{lastUpdateTime:e}},target:te(t),context:t};T({type:Er,payload:r})},JD=(t,e)=>{let r=wt(t,e),n=wt(`${r}/workarea`,e);return pe(n)},uE=t=>ot(t)?S6(t,"parentContext"):null,gae=t=>{let{accessedOrder:e}=t;return e&&e.length>0?e[e.length-1]:""},Oa=t=>{if(t&&typeof t=="string"){let e=t.split("/");return e.pop(),e.join("/")}return null},hae=()=>YC;var C6=t=>{typeof window>"u"||(window.document.title=t)},_6=(t,e)=>(t!==void 0&&(t.options=e),{stateObj:t}),I6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.pushState(t,e,r),window.scrollTo(0,0)}catch{throw new Error("Error- Unable to Add to Browser History")}},b6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.replaceState(t,e,r)}catch{throw new Error("Error- Unable to Replace Browser History")}},T6=t=>t.state?.type==="ui-navigation"?($.publish(E.PUB_SUB_EVENTS.URL_NAVIGATION,t.state),null):t.state?t.state.stateObj:null,v6=t=>{typeof window>"u"||window.addEventListener("popstate",e=>t(e))},R6=()=>{typeof window>"u"||(window.onbeforeunload=()=>null)},Gd=()=>typeof window>"u"?"":ni(window.location.pathname),y_=()=>typeof window>"u"?"":ni(window.location.pathname+window.location.search);var P6=()=>typeof window>"u"?"":window.location.search,$h=(t,e,r)=>{switch(r){case"warning":e?console.warn(t,e):console.warn(t);break;case"error":e?console.error(t,e):console.error(t);break;default:e?console.log(t,e):console.error(t)}};var XD=class{routingInfo;appRoutes;appRoutesMeta;appName;appAlias;orgName;reqContextName;reqServletPath;defaultViewUrlPath;staticRoutePage;defaultClassName;staticRoutesList=[];dynamicRoutesList;appDelimeter;reqServletNameReal;bDefaultPortal;portalName;ignoreFromEndPoint;constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,r)=>{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=r,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(n=>{$o(n)?this.dynamicRoutesList?.push(n):this.staticRoutesList?.push({[n]:e[n]})})};_getDynamicKeyName=e=>{let r=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(r,n)};isDefaultPortal=()=>`${this.bDefaultPortal}`!="false";getPortalName=()=>this.portalName;getApplicationPath=()=>ni(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>ni(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,r)=>{r&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));let n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),e.startsWith("/")&&Yi()&&v.getRenderingMode()!=="PREVIEW"&&this.setDefaultClassName(""),ni(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach(r=>{e.includes(r)&&(e=e.substring(0,e.indexOf(r)))}),e}getRouteDetails=(e,r)=>{if(!r)return this.appRoutes[e];let n="",o={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach(i=>{let s=this.appRoutes[i];s&&s.payload&&s.payload.page===e&&(n=s.routeKey,o={...s.payload})}),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,o={...this.appRoutes[e].payload}),{routeKey:n,payload:o}};transformRemoteCasePayload(e){let{caseClassName:r,caseID:n}=e;if(!ae.isRemoteCase(r))return e;let{RemoteClassGroup:o,RemoteSystemID:i}=ae.getRemoteCase(r??"");return{...e,caseID:n?.replace(r??"",o?.toUpperCase()),RemoteSystemID:i}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);let r=Yi(),n=this.processUrl(e,!0),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0);o||(n=this.processUrl(this.defaultViewUrlPath,!r),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0)||"");let{routeKey:i,payload:s}=this.getRouteDetails(o,r);if(!this.appRoutesMeta?.[i]?.restApi)return null;let{reqType:a,endPoint:c,params:l}=this.appRoutesMeta[i].restApi,u=this.transformRemoteCasePayload(s),p={routeKey:i,requestType:a,routeEndpoint:c,payload:{...l,...u}};return this._resolveRoute(p,this.processUrl(e,!1),o)};getSemanticURL(e,r,n){return this.buildSemanticURL(e,r,n)}getResolvedSemanticURL(e,r,n={},o){let i=this.getSemanticURL(e,r,n),s=i;$o(i)&&i.match(Ic)?.forEach(u=>{let p=this._getDynamicKeyName(u);n[p]&&(s=s.replace(u,String(n[p])))});let a=x6(s,o),c=new URL(a);return!this.isDefaultPortal()&&this.getPortalName()&&!s2(c.searchParams)&&c.searchParams.append("portal",this.getPortalName()),o&&!c.searchParams.has("lang")&&c.searchParams.append("lang",o),bc(c.toString())}buildDocumentTitle(e,r,n){let o=n??"";return v.getCaseLabelFirstInTitle()?e&&r?`${e} (${r}) - ${o}`:o:e&&r?`${r}: ${e} - ${o}`:o}updateSemanticURLAndDocumentTitle(e,r){let n=/{.+?}/,{key:o,actionName:i,caseClassName:s,isRemoteCase:a,name:c}=e;if(a&&!s)return;let l=this.getSemanticURL(i,{caseClassName:s}).replace(n,String(er(o))),u=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:Ar(u)}},m=Gd();l&&!m.includes(l)&&O6(p,r);let f=o.substring(o.lastIndexOf(" ")+1),h=v.environmentInfoObject?.pxApplication?.pyLabel,S=this.buildDocumentTitle(c,f,h);D6(S)}buildSemanticURL(e,r,n){let{urlPattern:o}=this.appRoutesMeta?.[e]||{},i=o?.split("/").length,s=o?.split("/");this.setDefaultClassName(r?.pageClass||this.defaultClassName);let a=Object.keys(this.appRoutes).filter(l=>i===l.split("/").length).filter(l=>{let u=l.split("?")[0].split("/");return s?.every((p,m)=>p.startsWith("{")||p===u[m])});if(a.length===1)return this._getQueryParamsResolvedURL(a[0],n);if(Object.keys(r).length===0)return"";let c=a.find(l=>{let u=this.appRoutes[l].payload,p={...n};delete p.dataViewName,delete p.dataContext;let m=u.dataViewKeys||u.dataContextParameters||{},f=Object.keys(r).every(h=>r[h]===u[h]);return f?!g.isEmpty(m)&&!g.isEmpty(p)?Object.keys(p).every(h=>Object.hasOwn(m,h)):f:!1});return c?this._getQueryParamsResolvedURL(c,n):a.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,r,n=!1){let[o,i]=e.includes("?")?e.split("?"):[e];if(i&&r&&Object.keys(r).length>0){let s={};for(let[u,p]of Object.entries(r))s[u.toLowerCase()]=p;let a=new URLSearchParams(i),c={};for(let[u,p]of a.entries())if(typeof p=="string"&&$o(p)){let m=this._getDynamicKeyName(p),f=m.toLowerCase(),h=n?s:r,S=n?r[m]??h[f]:h[m];S!=null&&(c[u]=S)}else typeof p=="string"&&(c[u]=p);let l=new URLSearchParams(Object.entries(c).map(([u,p])=>[u,String(p??"")]));return`${o}?${bc(l.toString())}`}return o}_getQueryParamsObject(e){let r={};if(!e)return r;for(let n of e.split("&")){let o=n.indexOf("=");if(o!==-1){let i=n.slice(0,o),s=n.slice(o+1);try{r[decodeURIComponent(i)]=decodeURIComponent(s)}catch{r[i]=s}}}return r}getRestEndPoint(e,r){try{return this._buildRestApi(e,r)}catch(n){return console.error(n),null}}_buildRestApi(e,r){if(e&&this.appRoutesMeta?.[e]){let{reqType:n,body:o,params:i}=this.appRoutesMeta[e].restApi,{endPoint:s}=this.appRoutesMeta[e].restApi;r?.params&&r.params.pageName&&(s=`${s}&pageName=${r.params.pageName}`);let a=s.match(Ic);if(a)for(let c=0;c<a.length;c+=1){let l=a[c].replace("{","").replace("}",""),u=new RegExp(a[c],"g");s=s.replace(u,()=>r?.[l]??i?.[l])}if(o){let c={};return Object.keys(o).forEach(u=>{if(r&&this._isSpecialInstruction(u)){let p=o[u];Array.isArray(p)&&p.every(m=>typeof m=="string")&&(c={...c,...this._processInstruction(u,p,r)})}}),{restApi:s,reqType:n,body:c}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,r,n){let o={};return e==="@COPY"&&r.forEach(i=>{o[i]=n?.[i]}),o}doesRestApiExist(e){return!!(this.appRoutesMeta&&this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,r,n,o)=>{if(!e)return;let i=r.indexOf("?"),s=i!==-1?r.substring(i+1):void 0;if(s){let a=`${n.join("/")}?${s}`;return this._getQueryParamsResolvedURL(a,o,!0)}};_resolveRoute=(e,r,n)=>{let o=[],[i,s]=r.includes("?")?r.split("?"):[r],[a,c]=n.includes("?")?n.split("?"):[n],l=i.split("/"),u=a.split("/"),p={};for(let C=0;C<u.length;C+=1)if(o[C]=u[C],$o(u[C])){let I=this._getDynamicKeyName(u[C]);p[I]=l[C],o[C]=l[C]}let m=this._getQueryParamsObject(c),f=this._getQueryParamsObject(s),h={};for(let[C,I]of Object.entries(f))h[C.toLowerCase()]=I;for(let C of Object.keys(m))$o(m[C])?p[C]=f[C]||h[C.toLowerCase()]:p[C]=m[C];let S=this._resolveMatchedRouteQueryParams(s,n,o,f),A=this._resolvePayload(e,p,n);return{...this._resolveRouteEndPoint(A,n),urlPath:S||o.join("/")}};_resolveRouteEndPoint=(e,r)=>{let{routeEndpoint:n}=e;if(!$o(n))return e;let o={};if(o[r]=e,e.payload!==void 0){let i=n.match(Ic);for(let s=0;s<i.length;s+=1){let a=i[s],c=this._getDynamicKeyName(a);if(e.payload[c]!==void 0){let l=e.payload[c];n=n.replace(a,l)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in routeEndpoint- ${c} is missing in payload`,o)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",o);return{...e,routeEndpoint:n}};_resolvePayload=(e,r,n)=>{if(typeof e.payload>"u")return e;let o={};o[n]=e;let i={...e.payload,...this._resolvePayloadRecursive(e.payload,r)};return{...e,payload:i}};_resolvePayloadRecursive(e,r){if(Array.isArray(e))return e.map(o=>this._resolvePayloadRecursive(o,r)).flat();let n={};for(let o of Object.keys(e)){let i=e[o];if(typeof i=="string"&&$o(i)){let s=i.match(Ic)??[];for(let a of s){let c=this._getDynamicKeyName(a);r[c]!==void 0?i=i.replace(a,r[c]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in payload - {${c}} is missing in semantic url construct`)}n[o]=i}else i&&typeof i=="object"?n[o]=this._resolvePayloadRecursive(i,r):n[o]=i}return n}_getMatchedRouteInRoutingTable=(e,r)=>{let[n]=e.includes("?")?e.split("?"):[e],o=this._findMatchedRouteInStaticList(n,r);if(o!==void 0||(o=this._findMatchedRouteInDynamicList(e),o!==void 0))return o};_findMatchedRouteInStaticList=(e,r)=>{if(!this.staticRoutesList||!e)return;let n=e.toLowerCase(),o=r?.toLowerCase();if(Yi()){let i=this._findMatchingRouteByClass(n,o);if(!i)return;let a=Object.values(i)[0]?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(i)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,r)=>{if(this.staticRoutesList)return this.staticRoutesList.find(n=>Object.entries(n).some(([o,i])=>{if(!i)return!1;let s=i.payload?.page?.toLowerCase(),a=i.payload?.pageClass?.toLowerCase(),c=s===e||o.toLowerCase()===e;return r?c&&a===r:c}))};_findInStaticList=e=>{if(!this.staticRoutesList)return;let r=this.staticRoutesList.find(n=>Object.keys(n)[0].toLowerCase()===e);return r?Object.keys(r)[0]:void 0};_findMatchedRouteInDynamicList=e=>{let[r,n]=e.includes("?")?e.split("?"):[e],o=r.split("/");return this.dynamicRoutesList?.find(i=>{let[s,a]=i.includes("?")?i.split("?"):[i],c=s.split("/");if(c.length!==o.length)return!1;let l=0;for(l=0;l<c.length;l+=1){let u=c[l].toLowerCase();if(!$o(u)&&u!==o[l]&&n2(u)!==o[l])return!1}if(a){let u=new URLSearchParams(n.toLowerCase()),p=new URLSearchParams(a.toLowerCase()),m=new Set,f=new Set,h=/\{[a-zA-Z]+\}/;for(let S of u.keys())m.add(S);for(let S of p.keys())f.add(S);if(f.size!==m.size)return!1;for(let S of m){if(!f.has(S))return!1;let A=p.get(S);if(u.get(S)!==A&&!h.test(A??""))return!1}}return!0})};_sendWarningAndErrorMessages=(e,r)=>{$h(e,r,"warning"),$h("Error in Generated Routing Table",null,"error"),$h("Back | Forward for this page may NOT work as intended",null,"warning"),$h("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},yae=new XD,_e=yae;var ew=class{environmentInfoObject;isPortalLoaded;pageName;KeyMapping;isAssignmentHeaderHidden;coexistenceMeta;brandingInfo;brandingInfoDark;themeOverrides;darkThemeOverrides;locale;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;isWebEmbed;caseLabelFirstInTitle;nav;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){let r=e?.pxOperator?.pyUserName,n=r?g.decodeHtmlEntities(r):void 0,o={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=o;let i=this.environmentInfoObject?.features||g.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...i,granularUIRefresh:i.granularUIRefresh||i.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,P.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);let s=e.requestContext;if(Array.isArray(s)&&s.length>0){let a=s.filter(c=>c.IncludeInURL).map(c=>c.Key);a.length>0&&S_(a)}us.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}isAnonymousUser(){return this.environmentInfoObject?.isAnonymousUser===!0}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 _e.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 e?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}setTheme(e,r){return r?.type==="dark"?this.darkThemeOverrides=e:this.themeOverrides=e,$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),r?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.nav?.orientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.nav={...this.nav,orientation:e},$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.nav.orientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===d.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="Infinity"}isSdkRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="SDK"}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return e?.type==="dark"?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,r){return r?.type==="dark"?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){let n=e.replaceAll("-","_").split("_").slice(0,2);this.locale=n.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(d.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(){let e=Reflect.get(globalThis,"pms");if(typeof e!="object"||e===null)return!1;let r=Reflect.get(e,"plugins");return typeof r=="object"&&r!==null&&(!!Reflect.get(r,"c11n_spa")||!!Reflect.get(r,"c11n"))}isOfflineEnabled(){return typeof navigator<"u"&&(navigator.userAgent||"").includes("pxUsesOffline")}shouldUseURLParams(){return this.environmentInfoObject?.renderingMode==="FULL_PORTAL"&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){br.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){let r=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...r,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}getFeature(...e){if(e.length!==0)return g.getIn(this.getFeatureMap(),e)}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){let r=this.KeyMapping[e];return r!==void 0?r: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}isOpenCasePageAfterCreateInMultiDocEnabled(){return this.getFeatureMap().pyOpenCasePageAfterCreateInMultiDoc||!1}getCaseTypeList(){return this.environmentInfoObject?this.environmentInfoObject?.pyCaseTypeList||[]:[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){let e=this.getFeatureMap().pyLocalizationVersion,r=this.getFeatureMap().localizationVersion;return r!==void 0?r:e!==void 0?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return us.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(){let e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e&&Number(e)}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return typeof window<"u"&&window.document?"Browser":"Native"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(r=>r.pyClassName===e).map(r=>r.pyActionName)??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(r=>r.pyClassName===e).map(r=>r.pyViewName)??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}setNavAlignment(e){return this.nav?.alignment===e||(this.nav={...this.nav,alignment:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavAlignment=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ALIGNMENT_CHANGE,e)),e}getNavAlignment(){return this.nav?.alignment??this.environmentInfoObject?.pyNavAlignment}setNavPosition(e){return this.nav?.position===e||(this.nav={...this.nav,position:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavPosition=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_POSITION_CHANGE,e)),e}getNavPosition(){return this.nav?.position??this.environmentInfoObject?.pyNavPosition}getMultiStepNavDisplay(){return this.environmentInfoObject?.pyMultiStepNavDisplay??void 0}setMultiStepNavDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyMultiStepNavDisplay=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.MULTI_STEP_NAV_DISPLAY_CHANGE,e)}getCaseStageDisplay(){return this.environmentInfoObject?.pyCaseStageDisplay??void 0}setCaseStageDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyCaseStageDisplay=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_STAGE_DISPLAY_CHANGE,e)}},v=new ew;var Sae=t=>t.status==="fulfilled",Eae=async t=>{let e=v.getAvailableLocalePacks(),r=v.getLocalizationBundles(t),n;if(t&&e&&e.includes(t)?n=[ve("getLocalizationPack",{queryPayload:{locale:t}})]:r.length>0&&(n=r.map(c=>ve("getLocalizationPack",{queryPayload:{version:c.pyBundleVersion,bundle:c.pyBundleName}}))),!n||n.length===0)return;let o=200,i=201,s=await Promise.allSettled(n),a=Ci(t??"en-US");s.filter(Sae).forEach(({value:c})=>{if([o,i].includes(c.status)&&c.data){let l=c.data;Object.keys(l).forEach(u=>{a.setLocaleForRule(l[u],u)})}})},Aae=async(t=v.getLocale())=>{try{await Eae(t)}catch(e){console.warn(e)}},qd=Aae;var tw=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1),[a,c]=this.getKeyAndValue(s);this.addKeyToMap(a,c),n+=`${s.split(":")[0]}}`,r=i+1}return n}static getKeyAndValue(e){let r=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,r)}}`,e.substring(r+1,n)]}static addKeyToMap(e,r){this.keyMap[e]=r}static replaceWithValue(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1);n+=this.keyMap[s],r=i+1}return n}},rw=tw;var E_=class{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";localeStore;timezone;availableLangPacks;constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,r)=>{let n=e.LocaleContent,o=r.toUpperCase();o.startsWith("@BASECLASS!DATAPAGE!")&&o.split(/[!#]/).length<4?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&"fields"in s&&this.updateLocaleStore(s,`${o}#${i}`.toUpperCase())}):o==="GENERIC!GENERICFIELDS"?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&this.sanitizeLocaleField(s,i.toUpperCase())}):this.sanitizeLocaleField(n,o)};updateLocaleStore=(e,r)=>{let n=e.fields||e,o=this.localeStore[r];o?g.mergeDeep(n,o):n&&typeof n=="object"&&(this.localeStore[r]=n)};sanitizeLocaleField=(e,r)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(r.toUpperCase())&&Object.entries(e).forEach(([,o])=>{o!==null&&typeof o=="object"&&"fields"in o&&this.updateLocaleStore(o,r)}),this.updateLocaleStore(e,r)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,r,n,o){let i=this.#e(n,r),s=this.#t(e);s&&(e=rw.formatLocaleKey(e));let a=i?this.localeStore[i.toUpperCase()]??{}:{},c=o?this.localeStore[o.toUpperCase()]??{}:{};return n?.toUpperCase()==="MESSAGES"&&typeof e=="string"?this.getLocalizedErrorMessage(a,e)||e:s?rw.replaceWithValue(a[e]||c[e]||e):a[e]||c[e]||e}#e(e,r){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?r?`${e}#${r}`:e:e||r}getParagraphLocaleValue(e,r){let n=`${e}!${d.PARAGRAPH}!${r}`,o=this.localeStore[n.toUpperCase()];if(o){let i=typeof globalThis.atob=="function"?decodeURIComponent(globalThis.atob(o.content).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")):o.content;return{category:o.category,content:i}}return null}getPortalLocaleReference(e){return v.getLocalizationVersion()!==2?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${v.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];let r=v.getUseLocale(),n=[],o=PCore.getLocaleUtils().localeStore;if(e=e.filter(i=>!o[i]),e=e.map(i=>i.toUpperCase()),e.length>0){let i=e.map(a=>({localeRuleKey:a,promise:Be.getSvcLocale(r,`${a}.json`)})),s=await Promise.allSettled(i.map(a=>a.promise));await Promise.all(s.map(async(a,c)=>{if(a.status==="fulfilled"){let l=i[c],u;try{u=await a.value.json()}catch{u=null}u&&n.push({localeRuleKey:l.localeRuleKey,jsonData:u})}}))}return n}async loadLocaleResources(e){await us.loadLocaleBundle(e),await Promise.all(e.map(r=>qd(r)))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,r){let n=r,o=[];for(let i=0;i<e.length;){let s=e[i];if(s.length!==0){let a=n.indexOf(s);if(a===-1)return null;if(i>0){let c=n.slice(0,a);o.push(c)}n=n.slice(a+s.length)}i+=1}return n&&o.push(n),o}getLocalizedErrorMessage(e,r){let n="";if(e[r])return e[r];for(let o of Object.keys(e)){let i=o.split(/\{\d+\}/),s=this.matchPatternWithText(i,r);if(s){let a=e[o];if(n=this.replacePlaceHolders(s,a),n)return n}}return n}replacePlaceHolders(e,r){for(let n=0;n<e.length;){if(!r.includes(`{${n+1}}`))return"";r=r.replace(`{${n+1}}`,e[n]),n+=1}return r}async isCurrentLocalePackAvailable(){let e=v.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Be.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#t(e){let r=!1;return e&&typeof e=="string"&&(r=e.includes("@P ")),r}},Nr=t=>{let e=t??v.getLocale()??"en-US";return Ci(e)};xe.registerHandler("@L",(t,e)=>e?e.getLocalizationService(e.getLocaleRuleName()).getLocalizedText(t):t);xe.registerHandler("@P",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));xe.registerHandler("@E",(t,e,r)=>{try{let n=PD(t),o=ND(n);return OD(o,e,r)}catch{}return!0});xe.registerHandler("@W",(t,e,r)=>{let n;if(r){let{pageReference:o,context:i}=r;n=Wi(o,`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`,i)}else n=e.getContextDataValue(`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`);return n===!0||n==="true"});function Cae(t,e,r,n){let o="",i=r;if(e.join(d.HASH_DELIMITER)&&(o=g.getHashedString(e.join(d.HASH_DELIMITER)),i=r+d.UNDERSCORE_STRING+o),n){let l=Mo(),u=l?l[r]?.[i]:{};return Array.isArray(u?.[P.getDefaultQualifiedName("pxResults")])?u[P.getDefaultQualifiedName("pxResults")]:[]}let c=(t.getDataObject()?.[r]||{})?.[i]||{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:[]}function _ae(t,e,r){let n=fe.getPropertyName(t?.propertyForDisplayText??""),o=fe.getPropertyName(t?.propertyForValue??""),i=r?.lastIndexOf(".")??-1,s=i>0?r?.substring(0,i):"",a=r?.substring(i+1),c=s?`${e.getPageReference()}.${s}`:void 0,l=`.${d.SUMMARY_OF_EXPRESSIONS}.${t?.name}`,u=e.getContextDataValue(l,c)??e.getContextDataValue(l)??[];if(Array.isArray(u)&&u.some(p=>Object.hasOwn(p,"field"))){let p=u.find(m=>m.field===a);u=Array.isArray(p?.results)?p.results:[]}return u.map(p=>({key:p[o]||p[`.${o}`],value:p[n]||p[`.${n}`]}))}xe.registerHandler("@ASSOCIATED",(t,e)=>{let r={},n=[],o="",i="",s=e.getPageReference();if(t.startsWith(".")){o=`${s}.${t.substring(1)}`;let _=t.split(".").filter(N=>!!N);_.length>1&&(_.pop(),i=_.join(".")),r=e.getFieldMetadata(t.substring(1))}else r=e.getFieldMetadata(t),o=t;let a=r?.datasource?.tableType,c=r?.datasource?.mode===d.READONLY,l=r?.datasource?.name||"",u=e.getComponentConfig();if(u&&u.deferDatasource&&((typeof u.datasourceMetadata!="object"||u.datasourceMetadata===null)&&(u.datasourceMetadata=`@FIELD_META ${t}`,e.setStateProps({datasourceMetadata:u.datasourceMetadata})),a===d.DATA_PAGE))return null;if(a===d.DECISION||a===d.RULE_REFERENCE)return _ae(r?.datasource,e,t.substring(1));if(a!==d.DATA_PAGE){let _=e.getLocalizationService(r?.localeReference);return r?.datasource?.records?.map(N=>({key:N.key,value:_.getLocalizedText(N.value)}))}let p=fe.getPropertyName(r?.datasource?.propertyForDisplayText),m=fe.getPropertyName(r?.datasource?.propertyForValue),f=Array.isArray(r?.datasource?.parameters)?r?.datasource?.parameters:[],h=e.getContextName(),S=[];if(f.forEach(_=>{if(fe.isProperty(_?.value)){let N=oe(`.${g.getFullPropertyReference([i,fe.getPropertyName(_.value)])}`,s,h);S.push(g.getFullPropertyReference([s,i,fe.getPropertyName(_?.value)])),(N==null||N==="")&&(N=d.NULL_STRING),n.push(N)}else n.push(_?.value||d.NULL_STRING)}),h){let _=xa.getContextObjectByName(h)||{};S.forEach(N=>{if(N in _){let x=_[N];_[N]=[...new Set([...x,o])]}else _[N]=[o]}),xa.addContextName(h,_)}let A=Cae(e,n,l,c),C=e.getLocalizationService(),I=_=>C.getLocalizedDataPage(_,l,p);return A.map(_=>{let N=_[p]||_[`.${p}`];return typeof N=="string"&&(N=I(N)),{key:_[m]||_[`.${m}`],value:N}})});xe.registerHandler("@ROUTING_INFO",(t,e)=>um(e.getContainerName(),e.getContextName()));xe.registerHandler("@ENV",(t,e)=>{let r=aE(t);return r?r(e):t});xe.registerHandler("@DATASOURCE",(t,e)=>{let r=e.getSharedDataPageForReferenceList()||e.getValue(t)||[],n=e.getComponentConfig(),o=Object.keys(n).find(i=>n[i]?.source?.includes(t));if(o){let{fields:i,copyAll:s,filterDownloadedFields:a}=n[o],c=[];return r.forEach(l=>{let u={};s||a?Object.keys(l).forEach(p=>{let m=fe.getPropertyName(p);u[m]=l[m]}):Object.keys(i).forEach(p=>{let m=fe.getPropertyName(i[p]);u[p]=l[m]}),c.push(u)}),c}return[]});xe.registerHandler("@FIELD_META",(t,e)=>{let r={};t.startsWith(".")?r=e.getFieldMetadata(t.substring(1)):r=e.getFieldMetadata(t);let n;if(r&&r.datasource&&r.datasource.parameters){let o="",i=t.split(".").filter(s=>!!s);if(i.length>1&&(i.pop(),o=`.${i.join(".")}`),Array.isArray(r.datasource.parameters)){let s=[];r.datasource.parameters.forEach(a=>{let c={},{name:l,value:u}=a;c.name=l,typeof u=="string"&&u.startsWith("@P")?c.value=`@P ${o}${u.substring(3)}`:c.value=u,s.push(e.resolveConfigProps(c))}),n=s}else n=e.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r});xe.registerHandler("@USER",(t,e,r)=>{let n=r?J.getLitePropertyValue(r,t):e.getValue(t),o=r?J.getReferencedUser(n,r):e.getReferencedUser(n);return{userId:n,userName:o?o.UserName:null}});xe.registerHandler("@ACTIVE_CASES",(t,e)=>fn.getOpenedCaseItems(`${e.getContextName()}/${e.getContainerName()}`));xe.registerHandler("@LR",t=>t);xe.registerHandler("@CASE",(t,e)=>t===d.ID?e.getCaseInfo().getKey():t);xe.registerHandler("@SHARED",t=>$n.getSharedState(t));xe.registerHandler("@PARAGRAPH",(t,e)=>{let{useDecision:r,isBanner:n,messageType:o,dismissBanner:i}=ho.getParagraphProperties(t,e),s=ho.hasDecisionBannerContent(t,e);return r&&s?ho.processBannerDecisionParagraph(t,e):n?{htmlContent:ho.processParagraph(t,e),messageType:o,dismissBanner:i}:ho.processParagraph(t,e)});xe.registerHandler("@FORMAT",(t,e)=>{let r=e.getCurrentClassID(),n=nw(t,r);if(!n?.dynamicContents?.length)return null;let{dynamicContents:o}=n;for(let i=0;i<o.length-1;i+=1)if(J.resolveWhen(o[i].when,e))return{pattern:o[i].content};return{pattern:o[o.length-1].content}});xe.registerHandler("@FILTERED_LIST",(t,e)=>{let r=t.substring(1,t.indexOf("[")),n=t.substring(t.indexOf("]")+2),o=t.substring(t.indexOf("[")+1,t.indexOf("]"));if(!e)return null;let{useCustomContext:i}=e,s;return g.isEmpty(i)?s=e.getValue(`.${r}`):(s=i,s=g.getIn(s,r)),s&&n.length>0?(o&&(s=s.filter(a=>a_(o,a))),s.map(a=>g.getIn(a,n))):null});xe.registerHandler("@ADDRESS",(t,e)=>{let r=e.getValue(t)?.[P.getDefaultQualifiedName("pyCountry")];return r?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${r}`:PCore.getDefaultQualifiedName("pyAddressForm")});xe.registerHandler("@DATATYPE",(t,e)=>e.getValue(t));xe.registerHandler("@ATTACHMENT",(t,e,r)=>{let n;return r?n=J.getLitePropertyValue(r):n=e.getValue(t),du.prepareAttachmentData(n)});var Iae=t=>t.startsWith(".")?t.slice(1):t,w6=t=>{let e=t.lastIndexOf(".");return e<0?t:t.slice(e+1)};xe.registerHandler("@FL",(t,e)=>{let r=Iae(t),n=e.getFieldMetadata(r);return!n||!n.label?w6(r):e.getLocalizationService(n.localeReference).getLocalizedText(n.label)});xe.registerHandler("@DEFERRED",(t,e)=>e.getFieldMetadata(t)?.isDeclarativeTarget?{isDeferred:!0,propertyName:t}:e.getValue(t));xe.registerHandler("@GENAICOACH",(t,e)=>ow(t,e.getCurrentClassID()));xe.registerHandler("@AIAGENT",(t,e)=>{let r=iw(t,e.getCurrentClassID());if(r)return r;let n=e.getComponentConfig();if(n){let o=n?.coaches?.find(i=>i?.config?.coach?.substring(9)===t&&i?.config?.ruleNamespace)?.config;if(o?.label){let i={label:o.label};e.resolveConfigProps({label:o.label},i);let s=i.label;return{insName:v.getFeatureMap()?.isNamespaceEnabled&&t.includes(d.DOUBLE_UNDERSCORE_STRING)?t:`${o.ruleNamespace}${d.DOUBLE_UNDERSCORE_STRING}${t}`,label:e.getLocalizedValue(s),type:"agent"}}}return null});xe.registerHandler("@REFRESH",(t,e)=>{let r=e.getCaseInfo().getKey(),n=e.getContextName(),o=e.getPageReference(),i={autoDetectRefresh:!0,preserveClientChanges:!1};Ai.registerForRefresh("PROP_CHANGE",e.getActionsApi().refreshCaseView.bind(e.getActionsApi(),r,"",o,{...i,refreshFor:`${o.replace("caseInfo.content","")}${t}`,resetForm:!0}),`${o}${t}`,`${n}/${o}`,n)});xe.registerHandler("@DW",(t,e,r)=>{let n,o=`${d.CONTEXT_DATA}.${d.SUMMARY_OF_DYNAMIC_WHENS}.${t}`;if(r){let{context:i}=r??{};n=oe(o,null,i)}else n=e.getValue(o);return n===!0||n==="true"});xe.registerHandler("@CA",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));function A_(t){return t&&t.startsWith("@")?t.replace(/^@\w+\s+\./,""):t}function bae(t,e){let r=t.value&&typeof t.value=="string"&&A_(t.value);return r?r===e:!1}function $6(t,e){let r=t.authorContext;return typeof r!="string"||!r?!1:(r.startsWith(".")?r.substring(1):r)===e}function aw(t,e,r){let n=t.config;if(!n?.name||typeof n.name!="string")return null;let o=e(n.name);return o?Array.isArray(o)?o.length===1?o[0]:o.find(i=>i.classID===n.ruleClass)??o.find(i=>i.classID===r)??null:o:null}function k6(t,e,r,n,o=[]){if(t.config&&bae(t.config,e)&&o.push({type:t?.type,config:t.config}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i],a=s.type==="reference"?aw(s,r,n):s;a&&k6(a,e,r,n,o)}return o}var Tae=new Set(["autocomplete","dropdown","combobox"]);function L6(t){let e=t.config;return e?e.template==="DataReference"&&typeof e.displayAs=="string"&&Tae.has(e.displayAs.toLowerCase())&&e.selectionMode!=="multi":!1}function vae(t){let e=t?.children;return Array.isArray(e)&&e.length>0?e[0]:null}function Rae(t){let e=t.config??{},r={};return(e.contextClass!==void 0||e.targetObjectClass!==void 0)&&(r.contextClass=e.contextClass??e.targetObjectClass),e.referenceList!==void 0&&(r.referenceList=e.referenceList),r.parameters=e.parameters,r.name=e.name,r}function Pae(t){let r=(Array.isArray(t?.inheritedProps)?t.inheritedProps:[]).reduce((o,i)=>(typeof i!="object"||i===null||Array.isArray(i)||"prop"in i&&typeof i.prop=="string"&&"value"in i&&(o[i.prop]=i.value),o),{}),n={};return n.referenceType=t.referenceType,n.ruleClass=t.ruleClass,n.authorContext=t.authorContext,t.visibility!==void 0&&(n.visibility=t.visibility),t.readOnly!==void 0&&(n.readOnly=t.readOnly),t.disabled!==void 0&&(n.disabled=t.disabled),t.required!==void 0&&(n.required=t.required),t.isManyToMany!==void 0&&(n.isManyToMany=t.isManyToMany),{...n,...r}}function U6(t,e,r){let n=Rae(t),o=vae(t),i=Pae(e),s={...o?.config,...n,...i};return Array.isArray(r)&&r.length>0&&(s.descriptors=r),s.dataRelationshipContext=s.contextClass&&s.name?s.name:null,{type:o?.type,config:s}}function Nae(t,e,r,n,o){try{if(!t.name||typeof t.name!="string")return null;let i=e(t.name),s;if(Array.isArray(i))s=i;else if(i)s=[i];else return null;let a=s.find(l=>l.classID===t.ruleClass);if(!a||!L6(a))return null;let c=[];if(o){let l=typeof t.ruleClass=="string"&&t.ruleClass?t.ruleClass:n,u=o(r,l);u&&typeof u=="object"&&"descriptors"in u&&u.descriptors&&Array.isArray(u.descriptors)&&u.descriptors.length>0&&(c=u.descriptors)}return U6(a,t,c)}catch{return null}}function j6(t,e,r,n=[],o="",i){if(t.config&&$6(t.config,e)){let s=Nae(t.config,r,e,o,i);s&&n.push(s)}if(!t.children)return n;for(let s=0;s<t.children.length;s+=1){let a=t.children[s],c=a.type==="reference"&&!(a.config&&$6(a.config,e))?aw(a,r,o):a;c&&j6(c,e,r,n,o,i)}return n}function Oae(t,e){return!t||typeof t!="object"?null:Array.isArray(t)?t.find(n=>n.classID===e)??null:t}function xae(t){let e=v.getInlineEditActionViews(t);return e&&e.length>0?e[0]:P.getDefaultQualifiedName("pyEdit")}function z6(t,e){let r=xae(t),n=e(r);return Oae(n,t)}function cw(t,e,r,n){let o=z6(e,r);if(!o)return[];let i=k6(o,t,r,e);return i.length>0?i:j6(o,t,r,[],e,n)}function M6(t,e){let r=t.parameters;return!r||typeof r!="object"||Array.isArray(r)?!1:Object.values(r).some(n=>{let o=A_(n);return e.some(i=>o===i||o.startsWith(`${i}.`))})}function sw(t,e,r,n,o=[]){if(t.config&&M6(t.config,e)&&t.type!=="View"&&o.push({type:t.type,config:t.config,children:t.children}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i];if(s&&s.type==="reference"&&s.config){let a=aw(s,r,n);a&&a.config&&(L6(a)&&M6(a.config,e)?o.push(U6(a,s.config)):sw(a,e,r,n,o))}else sw(s,e,r,n,o)}return o}function F6(t,e,r,n){let o=z6(e,r);if(!o)return[];let i=cw(t,e,r);if(!i||i.length===0)return[];let s=[],a=A_(i[0].config.value);if(a&&s.push(a),n){let c=n(t,e);c&&!Array.isArray(c)&&(c?.descriptors||[]).forEach(u=>{let p=A_(u);p&&!s.includes(p)&&s.push(p)})}return sw(o,s,r,e)}var V6={},B6={},__={},fw=0,I_=!1,gw={},C_={},dw={},pw={},mw={},Ma={},H6={},G6={},q6={},lw={},uw={},Dae=(t,e,r,n)=>{let o=Array.isArray(r)?r:[r];(Array.isArray(n)?n:[n]).forEach(s=>{let a=o.findIndex(c=>c.classID===s.classID);if(a===-1)o.push(s);else{let c={isDeclarativeTarget:!1},l={...o[a],...c,...s};o[a]=l}}),e[t]=o.length===1?o[0]:o},Fn=(t={},e={})=>{if(Object.keys(e).length===0){g.copy(t,e);return}Object.keys(t).forEach(r=>{let n=t[r],o=e[r];o?Dae(r,e,o,n):e[r]=n})},lt=(t,e="")=>{if(!t)return null;let r=C_[t];if(!r)return null;if(!e)return g.deepClone(r);let n;return Array.isArray(r)?n=r.find(o=>o.classID.toLowerCase()===e.toLowerCase()||o.associationClassID?.toLowerCase()===e.toLowerCase())||null:n=r.classID.toLowerCase()===e.toLowerCase()||r.associationClassID?.toLowerCase()===e.toLowerCase()||(r.type==="Page"||r.type==="Page List")&&r?.pageClass?.toLowerCase()===e.toLowerCase()?r:null,n?g.deepClone(n):null},Ci=t=>(lw[t]||(lw[t]=new E_),lw[t]),wae=(t,e)=>(uw[t]||(uw[t]=e()),uw[t]),b_=(t,e,r,n=[])=>{if(!e||!t)return null;if(!t.includes(".")){let a,c=lt(t,e);return n.length&&(a=n.join(".")),{...c,embeddedType:r,category:a}}let[o,...i]=t.split("."),s=lt(o,e);return s&&n.push(s.label),b_(i.join("."),s?.pageClass,s?.type,n)},hw=t=>{Object.keys(t).length!==0&&(Fn(t,__),I_&&(fw+=1))},$ae=()=>fw,mD=()=>{I_=!0},fD=()=>{I_=!1},yw=t=>{Fn(t,gw)},Mae=t=>{t.views&&Object.keys(t.views).length>0&&(Fn(t.views,__),I_&&(fw+=1)),t.navigations&&Fn(t.navigations,gw),t.personalizations&&Fn(t.personalizations,pw),t.insights&&Fn(t.insights,mw),t.paragraphs&&Fn(t.paragraphs,V6),t.formats&&Fn(t.formats,B6),t.dataTypes&&Fn(t.dataTypes,Ma),t.datapages&&Fn(t.datapages,H6),t.genAICoaches&&Fn(t.genAICoaches,G6),t.AIAgents&&Fn(t.AIAgents,q6)},kae=t=>{let e=t.fields||{};Object.keys(e).forEach(r=>{let n=e[r];if(Array.isArray(n)){if(n.forEach(o=>{t.datapages&&o.datasource&&o.datasource.tableType==="DataPage"&&(o.datasource.mode=t.datapages?.[o.datasource.name].mode);let i=_i(An.FIELD,r,o.definedOnClassID??o.classID);o.localeReference=i}),n.length===1){let[o]=n;e[r]=o}}else t.datapages&&n?.datasource&&n.datasource.tableType==="DataPage"&&(n.datasource.mode=t.datapages[n.datasource.name].mode)})},bm=t=>{Mae(t),kae(t);let{datapages:e={}}=t;Object.keys(e).forEach(r=>{dw[r]=e[r]}),Fn(t.fields,C_)},Na=t=>__[t],oT=(t,e)=>{let r=__[t];return Array.isArray(r)?r.some(n=>n.classID===e):r?.classID===e},Sw=t=>gw[t],Ur=t=>t in dw?dw[t]:null,T_=t=>t in pw?pw[t]:null,Ew=t=>t in mw?mw[t]:null,Aw=t=>{let e={};return Object.keys(C_).forEach(r=>{let n=C_[r],o;Array.isArray(n)?o=n.find(i=>t===i.classID):t===n.classID&&(o=n),o&&(e[r]=g.deepClone(o))}),e},Lae=(t,e)=>{let n=lt(t,e)?.datasource?.parameters;return n?g.deepClone(n):null},Rc=(t,e)=>{let r=null,n=V6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},nw=(t,e)=>{let r=null,n=B6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},ow=(t,e)=>{let r=null,n=G6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},iw=(t,e)=>{let r=null,n=q6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},Ux=t=>{if(t in Ma){let{savableDataPage:e}=Ma[t];return e}return null},jx=t=>{let e=H6[t];if(!e)return null;let{classID:r,isAlternateKeyStorage:n,parameters:o}=e;if(n)return o.map(s=>({keyName:s.name,isAlternateKeyStorage:n,linkedField:s.linkedField}));let i=Ma[r];return i?i.classKeys.map(s=>({keyName:s,isAlternateKeyStorage:n})):[]},zx=t=>{if(t in Ma){let{lookupDataPage:e}=Ma[t];return e}return null},Fx=t=>{if(Object.hasOwn(Ma,t)){let{lookupDataPageInfo:e}=Ma[t];return e}return null},ED=(t,e)=>{let r=t.split("."),n=r.pop(),o=new ea({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID())?.additionalInformation;if(!i?.includes("@PARAGRAPH"))return i;let s=fe.trimAnnotation(i);return ho.processParagraph(s,o)},Uae=(t,e)=>{let r=t.split("."),n=r.pop(),o=new ea({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID()),s={};return o._classID=o.getCurrentClassID(),o.resolveConfigProps(i,s),s},jae=(t,e)=>cw(t,e,Na,lt),zae=(t,e)=>F6(t,e,Na,lt);var Cw=class t{name;cascadeSubscribers;cascadeResetSubscribers;listChangeSubscribers;constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,r,n,o,i,s="singleRecord"){if(!e||!n||!o?.length)return;let a=n.startsWith(".")?`${r}.${n.substring(1)}`:n,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(r,n,i);o.forEach(u=>{if(!u)return;let p=u.startsWith(".")?u.substring(1):u;if(p=this._resolveDependentPropertyReference(l,p),p in c){let m=c[p];m.find(h=>h.propertyName===a)||m.push({propertyName:a,mode:s})}else c[p]=[{propertyName:a,mode:s}]}),Object.keys(c).length>0&&(this.cascadeResetSubscribers[e]=c)}deregisterResetDependencies(e,r,n,o,i){if(!e||!n||!o?.length)return;let s=n.startsWith(".")?`${r}.${n.substring(1)}`:n,a=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(r,n,i);o.forEach(l=>{if(l){let u=l.startsWith(".")?l.substring(1):l;if(u=this._resolveDependentPropertyReference(c,u),u in a){let p=a[u];g.removeExistingDependentProperty(p,s)}}}),Object.keys(a).length>0&&(this.cascadeResetSubscribers[e]=a)}getResetDependencies(e,r){return this.cascadeResetSubscribers[e]?.[r]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,r,n,o,i){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach(s=>{this.cascadeSubscribers[e][`${r}${s}`]=this.cascadeSubscribers[e][`${r}${s}`]||{};let a=this.cascadeSubscribers[e][`${r}${s}`];if(!a[i]){a[i]=o;let c=oe(s,r,e);a.previousValue=typeof c=="object"?null:c}})}registerListField(e,r,n,o,i){let s=t._getFieldsForList(e,r,n);s.length>0&&(this.registerFields(e,r,s,o,i),Ld.enableCascade(e))}unRegisterListField(e,r,n,o){let i=t._getFieldsForList(e,r,n);i.length>0&&this.unRegisterFields(e,r,i,o)}static _getFieldsForList(e,r,n){let o=[],i=lt(n,oe("classID",r,e));return i&&!Array.isArray(i)&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach(s=>{if(fe.isProperty(s)){let a=fe.trimAnnotation(s);o.push(a)}}),o}unRegisterFields(e,r,n,o){this.cascadeSubscribers[e]&&n?.forEach(i=>{if(!this.cascadeSubscribers[e][`${r}${i}`])return;let s=this.cascadeSubscribers[e][`${r}${i}`];s[o]&&delete s[o]})}triggerCascade(e,r,n,o){let i=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][r]&&(Object.keys(this.cascadeSubscribers[e][r]).forEach(s=>{let a=this.cascadeSubscribers[e][r];s!=="previousValue"&&a.previousValue!==n&&(i=!0,o?o.add(a[s]):a[s](r,n))}),i&&(this.cascadeSubscribers[e][r].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,r=[],n=[]){if(!e)return;let o=new Set;n.forEach(i=>{let s=oe(i,"",e);this.triggerCascade(e,i,s,o)}),o.forEach(i=>{i()}),!(this.listChangeSubscribers.length===0||r.length===0)&&r.forEach(i=>{this.listChangeSubscribers.forEach(s=>{let a=oe(i,"",e);s(e,i,a)})})}_updateChangedProperties(e,r,n,o,i,s,a,c){let l=n&&c.some(u=>o.startsWith(u));if(e!==r||l){let u=o.lastIndexOf("."),p=o.substring(0,u),m=o.substring(u);if(Nu.getMessages({type:"error",property:m,context:i,pageReference:p})?.length>0&&a.push(o),!n)return;s.push(o)}}isChangedListPropertyExist(e){let r=!0;return(this.listChangeSubscribers.length===0||!g.isValidPageListProperty(e))&&(r=!1),r}_getServerProperties(e,r,n,o,i,s,a){if(typeof e!="object"){i.push(n.replace(/\.(\d+)/g,"[$1]"));let l=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");let u=oe(n,"",r);if(u===void 0&&!e&&e!==0)return;this._updateChangedProperties(u,e,l,n,r,o,s,a);return}let c=Object.keys(e??{});for(let l=0,u=c.length;l<u;l+=1){let p=c[l],m=`${n}.${p}`;if(Array.isArray(e[p])){let f=oe(m,"",r);(!f||f?.length!==e[p].length)&&a.push(m.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[p],r,m,o,i,s,a)}}getServerProperties(e,r,n=d.CASE_INFO.CASE_INFO_CONTENT){let o=[],i=[],s=[],a=[],c=g.getIn(e,n);return!c||!r?{changedListProperty:o,leafProperty:s,changedPropertyWithError:i}:(this._getServerProperties(c,r,n,o,s,i,a),{changedListProperty:o,leafProperty:s,changedPropertyWithError:i})}_handlePageReference(e,r,n){let o=e;if(n==="Page"&&r.startsWith(".")&&r.slice(1).includes(".")){let i=r.substring(0,r.lastIndexOf("."));o=`${e}${i}`}return o}_resolveDependentPropertyReference(e,r){let n=r.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(!n)return g.getFullPropertyReference([e,r]);let o=n[1].split(".").length,i=n[2]||"",s=e.split("."),a=s.slice(0,Math.max(s.length-o,0)).join(".");return i?a?`${a}.${i}`:i:a}registerForListChanges(e=()=>{}){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}},Cr=new Cw;var Fae=/\.(?![^[]+\])|\[|\]/g,Vae=new Set(["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"]),Iw=null,oo=t=>t?.split(Fae).filter(Boolean),bw=t=>{Iw=t},De=()=>Iw,T=t=>{if(!t)return;let e=[],r=[],n=[];!Array.isArray(t)&&t.type==="MERGE_DATA"&&({changedListProperty:e,leafProperty:r,changedPropertyWithError:n}=Cr.getServerProperties(t.payload.data,t.payload.context,t.payload.rootPageReference)),Iw?.dispatch(t),!Array.isArray(t)&&t.type==="MERGE_DATA"&&(n.length&&!t.payload.skipValidation&&n.map(i=>{let s=i.lastIndexOf(".");return{property:i.substring(s),pageReference:i.substring(0,s)}}).forEach(({property:i,pageReference:s})=>{Nu.clearMessages({type:"error",property:i,pageReference:s,context:t.payload.context});let a=Ie.getFieldReferenceForProperty(t.payload.context,`${s}${i}`);if(a){let c=J.resolveContextTreeNodeProps(a.props);Dt.validate(c.componentName?.toLowerCase(),c.propertyName,J.getLitePropertyValue(c,c.propertyName),c)}}),Cr.handleServerChanges(t.payload.context,e,r))},W=t=>De()?.getState().data?.[t],Mo=()=>De()?.getState().data[d.SHARED],Bae=t=>!!(t&&!t.startsWith('"')&&!t.startsWith("'")),Hae=t=>t&&t.trim().substring(1,t.length-1),_w=(t,e,r)=>{if(!Bae(t))return Hae(t);let n=t?.startsWith(".")?e+t:t,o=oo(n);return g.getIn(r,o)},oe=(t,e,r)=>_w(t,e,W(r)),Wi=(t,e,r)=>t?_w(e,`${d.CONTEXT_DATA}.${t}`,W(r)):_w(e,`${d.CONTEXT_DATA}`,W(r)),Gae=(t,e,r)=>{let n=oo(`${e}.${r}`);return g.getIn(t,n)},Da=(t,e,r)=>Gae(W(r),`${d.CONTEXT_DATA}.${t}`,e),qae=t=>{let{context:e}=t;if(De()?.getState().data[e])return VI;let{action:n}=t;return Vae.has(n)?St:VI},Tw=(t,e)=>{let r=oo(e);return g.deleteIn(t,r)},W6=t=>!Array.isArray(t)&&typeof t=="object",v_=(t,e=[],r=[])=>{let n=new Set(r);Array.isArray(e)&&e.length>0&&e.forEach(o=>{o.allowMultiple?o.allowMultiple&&!n.has(o.path)&&g.setIn(t,o.path,[]):g.setIn(t,o.path,{})}),r.length>0&&g.rearrangeProperties(r,t)},xt=(t,e,r={})=>{let{isArrayDeepMerge:n,propertiesToReplace:o=[],propertiesToReArrange:i=[]}=r;Array.isArray(t)&&!e&&(e=[]),(o.length>0||i.length>0)&&v_(t,o,i);let s=(a,c)=>{if(W6(a)&&c!==null&&typeof c!="string"&&typeof c!="number"&&typeof c!="boolean")return Array.isArray(c)?c:Di(a,c,s);if(Array.isArray(a)&&c!==null&&Array.isArray(c)){if(n)return Di(a,c,s);{let l=c.length;if(typeof n>"u"&&l===a.length)return Di(a,c,s)}}return c===""&&a&&typeof a=="object"?a:c};return s(t,e)},vw=(t,e,r,n={isArrayDeepMerge:!0})=>{let{isArrayDeepMerge:o}=n,i=oo(e),s=g.getIn(t,i);if(typeof r=="object"&&r!==null){if(s===r)return t;let a=xt(s,r,{isArrayDeepMerge:o});return g.setIn(t,i,a)}return g.setIn(t,i,r)},Rw=(t,e,r)=>{let n=oo(e);return g.setIn(t,n,r)},ps=()=>{let t=Vs,{promise:e,actionMgrID:r}=w.actionManagerPromise(t);return T({type:t,payload:{actionMgrID:r}}),e},Ud=t=>!!De()?.getState()?.data?.[t];var Wae=" @#$%=!<>/\\",Kae=/^[^/]+\/[^/]+\.[^/.]+$/,Jae=typeof structuredClone=="function",Pw=class t{static mergeDeep(e,r){return Di(r,e)}static hasIn(e,r){return B1(e,r)}static getIn(e,r,n){return im(e,r,n)}static setIn(e,r,n){return G1(e,r,n)}static deleteIn(e,r){return z1(e,r)}static isObjectEmpty(e){return!e||Object.entries(e).length===0}static isEmpty(e){return _k(e)}static deepClone(e={}){if(e===null||typeof e!="object")return e;if(Jae)try{return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))}static copy(e,r){Object.keys(e).forEach(n=>{r[n]=e[n]})}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let r=0;r<e.length;r+=1)if(Wae.includes(e[r]))return!1;return!0}static isValidPropertyReference(e){return typeof e!="string"?!1:e===""||e.trim()!==""}static isWhenExist(e){let r=["visibility","disabled","readOnly","required"],n=!1;for(let o of Object.keys(e)){let i=e[o];i&&typeof i=="object"&&!Array.isArray(i)?n=n||t.isWhenExist(i):r.includes(o)&&typeof i=="string"&&i?.startsWith("@W ")&&(n=!0)}return!n&&e?.type==="multirecordlist"&&e?.renderMode==="Editable"&&(n=Object.keys(e?.allowActions??{}).some(o=>typeof e?.allowActions?.[o]=="string"&&e.allowActions[o]?.startsWith("@W "))),n}static getWhenNames(e){let r=["visibility","disabled","readOnly","required"],n="",o=new Set;if(e&&Object.keys(e).forEach(i=>{let s=e[i];r.includes(i)&&typeof s=="string"&&s.startsWith("@W ")&&(n=fe.trimAnnotation(s),o.add(n))}),e?.type==="multirecordlist"&&e?.renderMode==="Editable"){let i=e?.allowActions??{};Object.keys(i).forEach(s=>{typeof i[s]=="string"&&i[s]?.startsWith("@W ")&&(n=fe.trimAnnotation(i[s]),o.add(n))})}return[...o]}static isExpressionExist(e){let r=["disabled","visibility","readOnly","required"],n=!1;for(let o of Object.keys(e))r.includes(o)&&typeof e[o]=="string"&&e[o]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,r){let n={},o=n;return r.indexOf(".")>0?r.split(".").forEach(s=>{if(s.includes("[")){let[a]=s.split("[");n[a]=[],n=n[a],s=s.substring(s.indexOf("[")+1,s.lastIndexOf("]"))}n[s]={},n=n[s]}):(n[r]={},n=n[r]),Object.keys(e).forEach(i=>{let s=i;i.startsWith(".")&&(s=i.substring(1)),n[s]=e[i]}),o}static buildObject=(e,r,n)=>{if(n===void 0)return;let o=e.split("."),i=0;for(;i<o.length-1;i+=1){let s=o[i];s?.toString().length&&!r[s]&&(r[s]={}),r[s]&&(r=r[s])}typeof n=="object"?(r[o[i]]||(r[o[i]]=Array.isArray(n)?[]:{}),xt(r[o[i]],n,{isArrayDeepMerge:!0})):r[o[i]]=n};static crc32(e){let r=-1,n=t.getUtf8Bytes(e);for(let o of n)r=r>>>8^t.CRC32_TABLE[(r^o)&255];return(r^-1)>>>0}static getUtf8Bytes(e){if(t.utf8Encoder===null&&typeof globalThis.TextEncoder=="function"&&(t.utf8Encoder=new globalThis.TextEncoder),t.utf8Encoder)return Array.from(t.utf8Encoder.encode(e));let r=[];for(let n=0;n<e.length;n+=1){let o=t.getCodePoint(e,n);r.push(...t.encodeCodePoint(o.value)),n=o.nextIndex}return r}static getCodePoint(e,r){let n=e.charCodeAt(r),o=e.charCodeAt(r+1);return n>=55296&&n<=56319&&o>=56320&&o<=57343?{value:65536+(n-55296<<10)+(o-56320),nextIndex:r+1}:n>=55296&&n<=57343?{value:65533,nextIndex:r}:{value:n,nextIndex:r}}static encodeCodePoint(e){return e<=127?[e]:e<=2047?[192|e>>>6,128|e&63]:e<=65535?[224|e>>>12,128|e>>>6&63,128|e&63]:[240|e>>>18,128|e>>>12&63,128|e>>>6&63,128|e&63]}static CRC32_TABLE=(()=>{let e=[];for(let r=0;r<256;r+=1){let n=r;for(let o=0;o<8;o+=1)n=n&1?3988292384^n>>>1:n>>>1;e[r]=n>>>0}return e})();static utf8Encoder=null;static getHashedString(e){return t.crc32(e).toString(16)}static getPropertyName(e){if(e){let r=e.startsWith("@P"),n=r?e.indexOf(" "):-1;return r?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return typeof e=="string"?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(r){return console.error("not a Valid JSON",r),!1}}static isEqual(e,r){return lo(e,r)}static isContains(e,r){let n=Object.keys(e);for(let o=0;o<n.length;o+=1)if(e[n[o]]&&t.isEqual(e[n[o]],r))return!0;return!1}static removeExistingDependentProperty(e,r){let n=e.findIndex(o=>o.propertyName===r);n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter(r=>!!r).join("."):""}static iterateLeafNodes(e,r){let n=(o,i=[])=>{Object.entries(o).forEach(([s,a])=>{i.push(Array.isArray(o)?Number(s):s),Array.isArray(a)?a.forEach((c,l)=>{i.push(l),n(c,i),i.pop()}):a!==null&&typeof a=="object"?n(a,i):r(i.slice(),a),i.pop()})};n(e)}static resolveStringBooleans(e){let r=["required","readOnly","visibility"],n=o=>o==="true";return Object.keys(e).forEach(o=>{r.includes(o)&&typeof e[o]=="string"&&(e[o]=n(e[o]))}),e}static generateUniqueID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=typeof performance<"u"&&typeof performance.now=="function"?performance.now().toString(36).replace(".",""):Math.random().toString(36).slice(2);return`${Date.now().toString(36)}${e}`}static unflatten(e){let r={};return Object.entries(e).forEach(([n,o])=>{let i=n.split("."),s;i.reduce((a,c,l)=>(a[c]?s=a[c]:Number.isNaN(Number(i[l+1]))?i.length-1===l?s=o:s={}:s=[],a[c]=s,a[c]),r)}),r}static flatten(e,r,n){r||(r=""),Array.isArray(e)?e.forEach((o,i)=>{t.flatten(o,`${r}[${i}]`,n)}):typeof e=="object"&&e!==null?Object.keys(e).forEach(o=>{let i=r?`${r}.${o}`:o;t.flatten(e[o],i,n)}):n[r]=e}static buildInstructionPageReference(e,r){let o=e.startsWith(d.OBJECT_INFO.OBJECT_INFO)?`${e}${r}`.replace(d.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${r}`.replace(d.CASE_INFO.CASE_INFO_CONTENT,"").replace(d.DATA_INFO.DATA_INFO_CONTENT,"");return ei.formatPageReference(o)}static convertPageRefToClipboardPageNotation(e){let r=/\[\d+\]/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)+1}`).replace("[","(").replace("]",")"))}static convertClipboardPageToPageRefNotation(e){let r=/\(\d+\)/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)-1}`).replace("(","[").replace(")","]"))}static segmentsMatch=(e,r)=>{let n=e.split("."),o=r.split(".");return n.length!==o.length?!1:n.every((i,s)=>{if(i===o[s])return!0;if(i.endsWith("()")){let a=i.slice(0,-2),c=o[s];return c.startsWith(a)&&/^\[\d+\]$/.test(c.slice(a.length))}return!1})};static isString(e){return typeof e=="string"}static rejectPendingActions(e){return e.forEach(r=>r.payload.actionMgrID&&w.rejectActionByID(r.payload.actionMgrID)),!0}static isValidAnnotation(e){let r=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),n=e.indexOf(" "),o=e.substring(0,n);return r.has(o)}static trimDotForProperty(e){return typeof e=="string"&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if(typeof document<"u"){let o=document.createElement("textarea");return o.innerHTML=e,o.value}let r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#x27;":"'","&#x2F;":"/","&#47;":"/"},n=e;return Object.entries(r).forEach(([o,i])=>{n=n.split(o).join(i)}),n=n.replace(/&#(\d+);/g,(o,i)=>String.fromCharCode(parseInt(i,10))),n=n.replace(/&#x([a-f\d]+);/gi,(o,i)=>String.fromCharCode(parseInt(i,16))),n}static convertObjectWithStringToBoolean(e){if(e&&!(Array.isArray(e)||typeof e!="object"))return Object.keys(e).forEach(r=>{let n,o=e[r];typeof o=="string"?o==="true"?n=!0:o==="false"?n=!1:n=o:typeof o=="object"?(n=o,t.convertObjectWithStringToBoolean(o)):n=o,e[r]=n}),e}static rearrangeProperties(e,r){e.forEach(n=>{let o=t.getIn(r,n);if(!o)return;let i=Object.hasOwn(o,P.getDefaultQualifiedName("pyCount"));if(i&&(o=o.pxResults),!o)return;let s=o.filter(c=>!c.error),a=o.filter(c=>c.error);t.setIn(r,i?`${n}.pxResults`:n,[...s,...a])})}static getETag(e){if(!e)return;let r=e,n=r?.split("/")||[],o=["workarea","modal","actionarea"],i=n.findIndex(s=>o.some(a=>s.startsWith(a)));return i!==-1&&(r=n.slice(0,i+1).join("/")),De()?.getState()?.data[r]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return t.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,r,n){let o=[],i="",s=n.getPageReference(),a=n.getContextName();Object.keys(e).forEach(u=>{let p=e[u],m=fe.isProperty(p)?oe(`.${fe.getPropertyName(p)}`,s,a):p;(m==null||m==="")&&(m=d.NULL_STRING),o.push(m)});let c=r,l=o.join(d.HASH_DELIMITER);return l&&(i=t.getHashedString(l),c=r+d.UNDERSCORE_STRING+i),c}static parsePegaDateTimeToTimestamp(e){if(!e)return null;let r=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!r){let p=new Date(e).getTime();return Number.isNaN(p)?null:p}let[,n,o,i,s,a,c,l]=r.map(Number);return new Date(n,o-1,i,s,a,c,l).getTime()}static formatToUTCDate(e,r){if(!e)return e;let n=new Date(e);if(Number.isNaN(n.getTime()))return e;let o=(m,f=2)=>String(m).padStart(f,"0"),i=n.getUTCFullYear(),s=o(n.getUTCMonth()+1),a=o(n.getUTCDate());if(r==="Date")return`${i}${s}${a}`;let c=o(n.getUTCHours()),l=o(n.getUTCMinutes()),u=o(n.getUTCSeconds()),p=o(n.getUTCMilliseconds(),3);return`${i}${s}${a}T${c}${l}${u}.${p} GMT`}static isLeafProperty(e){return!!e&&!e.includes(".")}static getMetadataType(e,r,n){let o=t.isLeafProperty(e)?lt(e,r):n.getFieldMetadata(e);return Array.isArray(o)?o[0]?.type:o?.type}static toStringParameterValue(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,r,n,o,i){if(n&&Object.hasOwn(n,e))return n[e];if(!_r.isProperty(r))return r;let a=i!==null?_r.getPropertyName(r):_r.getLeafPropertyName(r);return o.getValue(`.${a}`)}static formatParameterValue(e,r,n,o,i){if(!_r.isProperty(r))return e;let a=o!==null?_r.getPropertyName(r):_r.getLeafPropertyName(r);if(!a)return e;let c=t.getMetadataType(a,i,n);if(!c)return e;let l=t.toStringParameterValue(e);return c==="Date"?l?l.includes("T")?t.formatToUTCDate(l,"Date"):t.formatToUTCDate(`${l}T00:00:00Z`,"Date"):e:c==="DateTime"&&l?t.formatToUTCDate(l,"DateTime"):e}static resolveAndFormatParameters(e,r,n,o,i){let s={};for(let a of Object.keys(e)){let c=e[a];if(typeof c!="string")s[a]=c;else{let l=t.resolveParameterValue(a,c,i,r,n);s[a]=t.formatParameterValue(l,c,r,n,o)}}return s}static normalizePropertyRef(e){let r=e.replace(/\[\d+\]/g,"");return r.startsWith(".")?r.substring(1):r}static resolvePageClass(e,r){if(!r)return;e=this.normalizePropertyRef(e);let n=e.split("."),o;n.length>1?o=n.slice(0,-1):o=n;let i=r;for(let s of o){let a=lt(s,i);if(!a||(Array.isArray(a)&&a[0]?.pageClass?i=a[0].pageClass:!Array.isArray(a)&&a.pageClass&&(i=a.pageClass),!i))return}return i}static isNestedObject(e){return Ds(e)&&!Array.isArray(e)}static pruneKeys=(e,r,n=!1)=>{if(!Rr(e))return e;let o=r instanceof Set?r:new Set(r);return n?(t.isNestedObject(e)?Object.keys(e).forEach(i=>{let s=e[i];if(o.has(i)){let a=Object.getOwnPropertyDescriptor(e,i);a&&a.configurable?delete e[i]:Reflect.set(e,i,void 0)}else s&&(Ds(s)||Array.isArray(s))&&t.pruneKeys(s,o,!0)}):Array.isArray(e)&&e.forEach(i=>{(Ds(i)||Array.isArray(i))&&t.pruneKeys(i,o,!0)}),e):Array.isArray(e)?e.map(i=>Ds(i)||Array.isArray(i)?t.pruneKeys(i,o,!1):i):t.isNestedObject(e)?Object.keys(e).reduce((i,s)=>{if(!o.has(s)){let a=e[s];i[s]=Ds(a)||Array.isArray(a)?t.pruneKeys(a,o,!1):a}return i},{}):e};static normalizeStaticContentKey(e){let r=this.getWebFilePath(e);if(!r)return e.trim();let n=r.decodedFileName.lastIndexOf(".");if(n<1||n===r.decodedFileName.length-1)return e.trim();let o=r.decodedFileName.slice(0,n),i=r.decodedFileName.slice(n+1);return`${r.marker.toUpperCase()}!${o.toUpperCase()}!${i.toUpperCase()}`}static isWebFilePath(e){return this.getWebFilePath(e)!==void 0}static getWebFilePath(e){let r=e.trim();if(!Kae.test(r))return;let n=r.indexOf("/"),o=r.slice(0,n),s=r.slice(n+1).split(/[?#]/)[0];try{let a=decodeURIComponent(s);return a.includes("/")||a.includes("\\")?void 0:{marker:o,decodedFileName:a}}catch{return}}},g=Pw;var Yae=d.SUMMARY_OF_LISTS,Zae=d.SUMMARY_OF_WHEN_CONDITIONS,Nw=class t{static updateData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static updateContextData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static resolveWhen(e,r){return!!r.getContextDataValue(`.${Zae}.${e}`)}static resolveFieldValue(e,r){return r.getLocalizedValue(e)}static resolveNavigation(e,r){let n=this.resolveName(e,r);return Sw(typeof n=="string"?n:"")}static resolveView(e,r,n=""){let o=Na(this.resolveName(e,r)),i=[];if(Array.isArray(o)&&o.length>0){if(r&&o.length>1){if(n||(n=r.getValue(d.CLASS_ID)||""),!n)return;i=o.filter(s=>s[d.CLASSID]===n)}return i.length===0?o[0]:i[0]}return o}static resolveName(e,r){return e&&typeof e=="string"&&e.startsWith("param.")?(e=e.substring(6),r.getContextDataValue(`.$parameters.${e}`)):(e&&typeof e=="string"&&e.startsWith("@")&&(e=fe.handleAnnotation(e,r)),e)}static getContextPath(e,r){return typeof r!="number"&&!r?e:(r=fe.trimAnnotation(r),typeof r=="number"||typeof r=="string"?typeof r=="number"&&Number.isInteger(r)?`${e}[${r}]`:typeof r=="string"&&r.startsWith(".")?e+r:r:e)}static getRuleClass(e,r,n){let o;if(r)o=r.startsWith(d.CLASS_ANNOTATION)?r.split(d.CLASS_ANNOTATION)[1].trim():this.resolveClassID(r,e.getPageReference(),e.getContextName(),e.getValue(d.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){let i=e.getFieldMetadata(n.authorContext);if(i){let s=["refer","copy"].includes(i.dataRetrievalType),a=i.type==="Page List";o=s&&a?i.pageClass:i.classID}o||(o=n.ruleClass)}return o}static resolveReference(e,r){let{type:n}=e,o;if(n==="reference"){let{config:i}=e,s=i?.type,{ref:a,name:c,context:l}=i||{},u=this.getRuleClass(r,l,i);return r&&(r._ruleClass=u),s==="navigation"?o=this.resolveNavigation(a||c,r):s==="view"?o=this.resolveView(a||c,r,u||""):s==="widget"&&(o={type:"Widget",config:{name:c,ruleClass:u}}),o}return e}static resolvePropertyReference(e,r,n){return oe(r,e,n)}static getProperty(e,r,n){let o=this.resolvePropertyReference(r,e,n);if(o==null||o.length===0){let i=Da(`${r}.${Yae}`,e,n);i&&(o=this.resolvePropertyReference(r,i,n))}return o}static getPropertyValue(e,r,n){return e=fe.trimAnnotation(e),this.getProperty(e,r,n)}static getReferencedUser(e,r){let n=t.getLitePropertyValue(r,"referencedUsers");if(Array.isArray(n)){let o=n.find(i=>i.UserID===e);if(o)return{userId:o.UserID,UserName:o.UserName}}return n?.[e]}static getLitePropertyValue(e,r){if(!e)return;let{useCustomContext:n,propertyName:o,hasSuggestions:i,pageReference:s,context:a}=e,c=r||o||"";return n?(c=c.startsWith(".")?c.substring(1):c,c.split(".").reduce((l,u)=>l?.[u]??void 0,n)):i&&c===o?t.getPropertyValue(c,s,a?`${a}/${d.SUGGESTION}`:void 0):t.getPropertyValue(c,s,a||void 0)}static _handlePropString(e,r,n,o,i){n.startsWith("@")?e[r]=fe.handleAnnotation(n,o,i):e[r]=n}static _resolveProps(e,r,n){e&&Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?this._handlePropString(e,o,i,r,n):Array.isArray(i)?i.forEach(s=>{this._resolveProps(typeof s=="object"?s:e[s],r,n)}):typeof i=="object"&&this._resolveProps(e[o],r,n)})}static resolveProps(e,r,n){return!e||!r||(g.mergeDeep(e,r),this._resolveProps(r,n,void 0)),r}static resolveContextTreeNodeProps(e){let r={};return e?(g.mergeDeep(e,r),this._resolveProps(r,void 0,e),g.resolveStringBooleans(r)):r}static resolvePropertyPageClass(e,r){let n=g.resolvePageClass(e,r),o=e.substring(e.lastIndexOf(".")+1),i=lt(o,n),s;if(i)return Array.isArray(i)?s=i[0]?.pageClass:s=i.pageClass,s}static resolveClassID(e,r,n,o){let i=fe.trimAnnotation(e),s=i.startsWith(".")?`${r}${i}`:i;for(;s;){let a=oe(d.CLASS_ID,s,n);if(a)return a;if(o){let l=this.resolvePropertyPageClass(i,o);if(l)return l}let c=s.lastIndexOf(".");if(c===-1)break;s=s.substring(0,c)}return null}},J=Nw;var Ow=class{actionHandlers;constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,r){this.actionHandlers[e]=r}},Qae=new Ow,R_=Qae;function Xae(t){return typeof t=="object"&&t!==null}var xw=class{static#e=[];static#t=!1;static getActionHandlers=(e,r,n)=>{let o=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==r||e.forEach(s=>{let a=R_.getHandler(s.action),{config:c}=s;o.push({handler:a,config:c})}),o};static isEditable=e=>{let{tagName:r}=e;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||r==="DATETIME"};static isNonKeyInput=e=>{let{tagName:r,type:n}=e;return r==="SELECT"||n==="checkbox"||n==="radio"};static#r=(e,r,n)=>{for(let o=0;o<e.length;o+=1){let i=e[o],s={actionHandler:i.handler,component:r,eventType:n,config:i.config};this.#e.push(s)}};static buildActionObject=(e,r)=>{let n={...e};return n.context=v.getRuntime()==="Browser"?r.getContextName():n.context,n.pageReference=r.getPageReference(),n.actionMgrID=w.getNextActionMgrId(),n};static#n=e=>{let r=e.actionHandler,n=e.component,{config:o}=e,i={};J.resolveProps(o,i,n),r&&(r(e.eventType,i,n),this.#o())};static#o=()=>{if(!this.#t){if(this.#e.length===0)return;let e=this.#e.shift();if(!e)return;this.#n(e),e.config&&e.config.parallel==="true"&&this.#e.length>0&&this.#o()}};static#i=()=>{this.#o()};static#s=(e,r,n)=>{this.#r(e,r,n),this.#i()};static getFullRef=e=>{let r=e.getPageReference(),n=e.getComponentConfig().value;return J.getContextPath(r,n)};static#a(e,r){let o=e.getComponentConfig().behaviours||[];for(let i=0;i<o.length;i+=1){let{behaviour:s,actions:a}=o[i];if(a){let c=this.getActionHandlers(a,s,r);c&&c.length>0&&this.#s(c,e,r)}}}static changeHandler=(e,r)=>{let n=e.getStateProps().value,o=e.getContextName();if(dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:o}),(v.getRuntime()==="Browser"?"nativeEvent"in r&&r.nativeEvent instanceof Event||r instanceof Event:"nativeEvent"in r&&!!r.nativeEvent||r instanceof Event)||!("value"in r)||r.value!==null&&(!("prop"in r)||r.prop===void 0)){let{target:s}=r;s===null&&r&&"auxiliaryTarget"in r&&r.auxiliaryTarget&&(s=r.auxiliaryTarget);let a;s===void 0?a="value"in r?r.value:void 0:"value"in s?a=s.value:a=s.innerText;let c=this.getFullRef(e);T({type:bt,payload:{reference:c,value:a,context:o}}),(s===void 0||!this.isEditable(s)||this.isNonKeyInput(s))&&T({type:Tn,payload:{reference:c,pageReference:e.getPageReference(),value:a,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}})}else if(Xae(r)){let s=e.getPageReference(),a=e.getStateProps();for(let c of Object.keys(r)){let l=a[c],u=r[c];T({type:bt,payload:{reference:J.getContextPath(s,l),value:u,context:o}}),T({type:Tn,payload:{reference:J.getContextPath(s,l),value:u,context:o}})}}};static blurHandler=(e,r)=>{let{target:n}=r;n===null&&r&&"auxiliaryTarget"in r&&(n=r.auxiliaryTarget);let{value:o,validationValue:i}=n,s=this.getFullRef(e),a=e.getContextName();n.clearMessages&&dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:a}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?i:o),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,o),this.isNonKeyInput(n)||T({type:Tn,payload:{reference:s,pageReference:e.getPageReference(),value:o,context:a,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}}))};static eventHandler=(e,r)=>{let{type:n}=r;switch(n){case"change":this.changeHandler(e,r);break;case"blur":this.blurHandler(e,r);break;default:break}n&&this.#a(e,n)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#o()};static isQueueEmpty=()=>this.#e.length===0;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},ze=xw;var Dw="CREATE_WORK",K6=t=>({type:Dw,payload:t});var ww=(t,e)=>{let r=e.UserID;if(r==null)return;let n=String(r);if(t.has(n)){let o=t.get(n);t.set(n,{...o,...e})}else t.set(n,e)},ece=t=>{if(t.length<2)return;let e=new Map;for(let r of t)ww(e,r);t.length=0;for(let r of e.values())t.push(r)};function tce(t,e,r){let n;if(!Array.isArray(t)&&typeof t=="object"){n=g.getIn(r,d.REFERENCED_USERS,{}),g.setIn(e,d.REFERENCED_USERS,{...n,...t});return}if(n=g.getIn(r,d.REFERENCED_USERS,[]),n.length===0){ece(t);return}let o=new Map;for(let i of n)ww(o,i);for(let i of t)ww(o,i);t.length=0;for(let i of o.values())t.push(i)}function rce(t,e,r,n,o,i,s){let a=n.substring(0,n.indexOf("[")),c=n.substring(n.indexOf("[")+1,n.indexOf("]")),l=e[a],u=`${g.trimDotForProperty(o)}.${a}`;s.includes(u)&&Object.hasOwn(l,P.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,t[n]),i.push(a),r.add(`${o}.${n}`))}function nce(t,e,r){let n=new Set(r);Object.keys(t).forEach(o=>{(Array.isArray(t[o])&&!n.has(o)||!Array.isArray(t[o])&&!Object.hasOwn(e,o))&&delete t[o]})}var J6=(t,e,r,n,o="")=>{let i=[];Object.keys(t).forEach(s=>{typeof t[s]=="object"&&s.includes("[")?rce(t,e,r,s,o,i,n):t[s]&&typeof t[s]=="object"?(e[s]||(e[s]=Array.isArray(t[s])?[]:{}),J6(t[s],e[s],r,n,`${o}.${s}`)):e[s]=t[s]}),nce(e,t,i)},oce=(t,e,r)=>{let n=new Set;t.forEach(o=>{o=g.trimDotForProperty(o);let[i,s,a]=Vi.getPageListNameAndIndexFromPageName(o);if(i&&s&&a&&!n.has(`${i}.${s}`)){let c=g.getIn(r,`${i}.${s}`)||[];Array.isArray(c)&&c.forEach((l,u)=>{u!==+a&&g.setIn(e,`${i}.${s}[${u}]`,l)}),n.add(`${i}.${s}`)}})},ice=(t,e,r)=>{if(!r||r.length===0)return e;let n=Oh(t),o={},i=!1;return r.forEach(s=>{Object.hasOwn(n,s)&&g.hasIn(e,oo(s).slice(0,-1))&&(g.setIn(o,s,n[s]),i=!0)}),i?xt(e,o,{isArrayDeepMerge:!0}):e},Re=(t,e={})=>{let{serverPrecedenceFields:r=[],propertiesToReplace:n=[],propertiesToReArrange:o=[],preserveFields:i}=e,{context:s,data:a,isArrayDeepMerge:c,preserveClientChanges:l=!1}=t,u=xc(s,!0),p=W(s),m={};if(l&&p&&a){m=g.deepClone(p);let S=g.deepClone(a);o.length>0&&g.rearrangeProperties(o,m);let A=new Set;J6(u,m,A,o),oce(A,m,S)}let f=a?g.getIn(a,d.REFERENCED_USERS):void 0;f!==void 0&&tce(f,a,p);let h=a;if(l){let S=g.getIn(t?.data,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),A=B.isExternalObject(S),C=A?{[d.OBJECT_INFO.OBJECT_INFO]:{[d.CONTENT]:{...m[d.OBJECT_INFO.OBJECT_INFO]?.[d.CONTENT]}}}:{[d.CASE_INFO.CASE_INFO]:{[d.CONTENT]:{...m[d.CASE_INFO.CASE_INFO]?.[d.CONTENT]}}},I=A?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT;r.forEach(_=>{let N=`${I}.${_}`;g.deleteIn(C,N)}),h=xt(a,C,{isArrayDeepMerge:c??!0})}else f6(s,a,i),h=ice(s,a,i);return{type:Er,payload:{...t,data:h,...n.length>0?{propertiesToReplace:n}:null,...o.length>0?{propertiesToReArrange:o}:null}}},sce=t=>({type:Ik,payload:t}),Pm=t=>({type:Bl,payload:t}),ace=t=>({type:Pr,payload:t}),cce=t=>({type:bk,payload:t}),lce=t=>({type:Go,payload:t}),Gx=t=>({type:Kl,payload:t}),wc=t=>({type:qo,payload:t}),Pt=t=>({type:St,payload:t}),qx=t=>({type:Ms,payload:t}),_h=t=>({type:ks,payload:t}),YD=t=>({type:uo,payload:t}),ZD=t=>({type:Ls,payload:t}),QD=t=>({type:ki,payload:t}),tr=t=>{let{containerItemID:e}=t;t.suggestionContexts=Dh(e);let r=t?.data?.caseInfo?.content,n=Object.keys(r||{}).length>0;return t.propertiesToReplace||(t.propertiesToReplace=n?B.getPropertiesToReplace(e):[]),{type:kt,payload:t}},Mh=t=>{let{context:e}=t;return{type:ws,payload:{context:e}}},gs=t=>{let{context:e}=t;return{type:To,payload:{context:e}}},uce=t=>({type:Us,payload:t}),rr=t=>({type:nr,payload:t}),wm=t=>({type:Fs,payload:t}),Qe=t=>{let{context:e,containerItemID:r}=t,n=e;return n||(n=pe(r)),t.context=n,t.deleteContext=!HD(r),t.childContainers=Ke(r),t.childContainersContexts=wo(r),t.transientItems=Ei([...t.childContainersContexts,r]),t.suggestionContexts=Dh(r),r===e&&(t.caseID=oe(d.CASE_INFO.CASE_INFO_ID,"",e)||oe(d.OBJECT_INFO.OBJECT_INFO_ID,"",e),t.RemoteSystemID=oe(d.CASE_INFO.REMOTESYSTEMID,"",e)),{type:Ze,payload:t}},$w=t=>{let{containerItemID:e}=t;return t.transientItems=Ei([...wo(e),e]),{type:Ko,payload:t}},Ih=t=>{let{transientItemID:e}=t;return t.transientItems=[e],{type:Wo,payload:t}},kn=t=>{let{context:e,containerItemID:r}=t,n=e;if(n||(n=pe(r)),t.context=n,t.childContainers=Ke(r),t.childContainersContexts=wo(r),t.transientItems=Ei([...t.childContainersContexts,r]),t.suggestionContexts=Dh(r),r===e){t.caseID=oe(d.CASE_INFO.CASE_INFO_ID,"",e),t.RemoteSystemID=oe(d.CASE_INFO.REMOTESYSTEMID,"",e);let o=oe(d.CASE_INFO.CASE_INFO_CLASSNAME,"",e);ae.isTraditionalRemoteCase(o)&&(t.skipReleaseLockRequest=!0)}return{type:et,payload:t}},dce=t=>({type:vo,payload:t}),pce=t=>({type:$i,payload:t}),mce=t=>({type:Qy,payload:t}),V=(t,...e)=>(ze.resume(),t(...e)),Qi=(t,e,r,n,o)=>({type:Te,payload:{msg:t,err:e,context:r,formFields:n,actionMgrID:o}}),Mw=t=>({type:Jo,payload:t}),kw=t=>({type:Ql,payload:t}),Kn=t=>({type:po,payload:t}),fce=t=>({type:Hk,payload:t}),DT=t=>({type:Gl,payload:t}),sa=t=>({type:bt,payload:t});var gce="VIEW",hce="PAGE",Fw="add",Z6="replace",Uw=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"],P_="",kh="Home",Q6="",jw=!0,N_=t=>(jw=t,jw),X6=()=>jw,At=(t,e,r)=>_e.getSemanticURL(t,e,r),Tc=(t,e)=>_e.getRestEndPoint(t,e),U=(t,e)=>{let r=gt.getServerURL(),n=Tc(t,e);return n?(n.restApi?.startsWith("/")||(n.restApi=`/${n.restApi}`),r?.endsWith("/")&&(r=r.substring(0,r.length-1)),n.restApi=r+n.restApi,n):{}},yce=t=>{if(t&&t.root){let{root:e}=t,{resources:r}=t,{views:n}=r,i=e.config,s=i.type,a=i.name;if(s.toUpperCase()===gce){let c=n[a],l=c;Array.isArray(c)&&c.length>0&&([l]=c);let u=l.config;if(u.type){let p=u.type;return!!(u.urlPath&&p.toUpperCase()===hce)}}return!1}return!1},Y6=(t,e,r)=>{let{root:n,resources:o}=t,{views:i}=o,{config:s}=n,a=Fw,c="";if(r)c=r;else{let u=i[s.name],p=u;Array.isArray(u)&&u.length>0&&([p]=u),c=p.config.urlPath}let l=c.match(Ic);if(l){let u=g.getIn(e,s.context);c=c.replace(l[0],u.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:a}},Sce=(t,e,r)=>{for(let[o,i]of e.entries())!t.has(o)&&Uw.includes(o)&&t.append(o,i);r&&!t.has("lang")&&t.append("lang",r);let n=_e.getRoutingInfo()?.embedQueryParams;if(n)for(let[o,i]of Object.entries(n))t.has(o)||t.append(o,String(i));return t},zw=(t,e)=>{let r=`${t}/${e}`;if(!(v.getRenderingMode()==="EMBED"))return r;let o=_e.getRoutingInfo()?.authServiceAlias;if(!o)return r;let i=encodeURIComponent(o),s;try{s=new URL(r)}catch{return r}let a=s.pathname.split("/").filter(Boolean),c=a.findIndex(p=>p.toLowerCase()==="app");if(c<0)return r;a[c-1]?.toLowerCase()!=="prauth"&&a.splice(c,0,"PRAuth");let u=a.findIndex(p=>p.toLowerCase()==="app")+2;return(u===a.length||a[u]!==i)&&a.splice(u,0,i),s.pathname=`/${a.join("/")}`,s.toString().replace(/\/$/,"")},Ece=(t,e,r,n,o)=>{let i=_e.getStaticRoutePage(),s=kh?.toLowerCase();return(i?.toLowerCase()===s||n.toLowerCase()===s)&&!o.has("noPortal")?zw(e,r):t},e9=(t,e,r,n)=>{let o,i;ni(e)?o=zw(t,e):o=t;let s=ni(r?.pxURLPath||"");s&&(o=`${o}/${s}`);try{i=new URL(o).searchParams,o=o.includes("?")?o.split("?")[0]:o}catch(l){return console.log("Invalid url",l),""}let a=new URLSearchParams(P6());if(Yi()?(o=Ece(o,t,e,s,a),_e.setStaticRoutePage("")):s.toLowerCase()===kh.toLowerCase()&&!a.has("noPortal")&&(o=zw(t,e)),!_e.isDefaultPortal()){let l=_e.getPortalName();a.has("portal")?a.set("portal",l):a.append("portal",l)}i=Sce(i,a,n);let c=bc(i.toString());return c&&(o+=`?${c}`),o},Ace=(t,e,r)=>{if(t=t&&t!==""?t:_e.getApplicationName(),t=i2(t),r===`${P_}/${e}/`)return{title:t};let o=new URL(r).pathname.replace(`${e}/`,""),i=o.split("/");return o2(o)?{title:`${t} - ${i[i.length-1]}`}:{title:`${t} - ${i[0]}`}},t9=(t,{urlPathObjParam:e,infoParam:r,optionsParam:n,queryParam:o},i=!1,s)=>{let a,c,l;if(window.PCore.getBehaviorOverride("dynamicSemanticUrl")===!1)return;if(i)a=e,c=r,l=n;else{let{uiResources:f,data:h}=t;({options:l}=t),e&&e.pxURLPath&&$o(e.pxURLPath)?a=Y6(f,h,e.pxURLPath):a=e||Y6(f,h),c=_e.getEndPointInfo(a.pxURLPath),a.pxURLPath=c.urlPath}let u=e9(P_,_e.getApplicationPath(),a,s),{title:p}=Ace(Q6,_e.getApplicationPath(),u),m=_6(c,{...l,title:p});a?.historyAction===Fw?I6(m,p,u):a?.historyAction===Z6&&(o&&(u+=`?${o}`),b6(m,p,u))},r9=(t,e)=>{let r=null;t.directUrlUpdation&&(r={historyAction:Fw,pxURLPath:""},r.pxURLPath=t.semanticURL),t9(t,{urlPathObjParam:r,infoParam:null,optionsParam:null},!1,e)},O6=(t,e)=>{r9(t,e)},x6=(t,e)=>{let r={pxURLPath:t};return e9(P_,_e.getApplicationPath(),r,e)},qi=t=>{let{uiResources:e}=t;X6()&&(t.directUrlUpdation||yce(e))&&r9(t)},n9=t=>{let e={routeEndpoint:t.routeEndpoint,requestType:t.requestType,payload:t.payload,routeKey:t.routeKey,options:null};return t.options&&(e.options=t.options),e},Cce=t=>t?ae.isRemoteCase(t)&&(ae.isTraditionalRemoteCase(t)||ae.isRemoteCaseVersionDifferent(t)):!1,o9=(t,e,r)=>{let{caseClassName:n,workID:o}=t.payload,{containerName:i,context:s}=e,{RemoteClassGroup:a,RemoteSystemID:c,name:l}=ae.getRemoteCase(n),u={...t,headers:{RemoteSystemID:c},className:n,isTraditionalRemoteCase:ae.isTraditionalRemoteCase(n),isRemoteCase:ae.isRemoteCase(n),action:mS,viewName:gS,gadgetId:B.getUniqueGadgetId(),context:r??s,skipSemanticUrl:!0,insKey:`${a?.toUpperCase()} ${o}`,containerName:i,name:l};T(rt["showPage"](u))},Lw=!1,_ce=async t=>{if(Lw){Lw=!1;return}let e="showHistory",r=T6(t);if(r){let n=zo(),o=se(`${n}/primary`);if(o&&wh(o)){let i=Nr().getLocaleValue(Tu,"Messages");if(!await oi.confirm(i)){Lw=!0,window.history.go(1);return}}ae.isRemoteCase(r.payload?.caseClassName)?o9({...r},r.options):T(rt[e](n9(r)))}},Lh=()=>{let t=_e.getApplicationPath(),e=Gd();return t!==e},i9=(t,e)=>{let r={restApi:""};try{if(Lh()&&!e){let n=Gd(),o=_e.processUrl(n,!0),i=_e._getMatchedRouteInRoutingTable(o)||"",s=_e.getRoutingInfo(),a=_e.processUrl(n,!1).split("/"),c=a[a.length-1],l=s?.routes?.[i]?.payload?.caseID?.replace("{workID}",c).replace("{id}",c);r=_e.getRestEndPoint("loadView",{caseID:l,viewID:t})||{}}else r=_e.getRestEndPoint("showView",{page:t,pageClass:e})||{}}catch{}return r},s9=()=>{if(Lh()){let t=_e.processUrl(Gd(),!0);return!!_e._getMatchedRouteInRoutingTable(t)}return!1},Ice=(t,e)=>{let r=_e.getRoutingInfo();if(Yi()&&Object.values(r?.routes??{}).find(c=>c?.payload?.pageClass===e&&c?.payload?.page===t))return t;let n=t.split(" ").join(""),o=t.split(" ").join("-").toLowerCase(),i=a2(t);return r?.routes?.[n]?n:r?.routes?.[o]?o:r?.routes?.[i]?i:t},bce=t=>{kh=t};var Tce=()=>{let t=v.getIsExtraCallRequiredForDefaultHome();return t===!0||t==="true"},a9=t=>{let{acName:e,context:r,defaultViewLabel:n,ruleName:o,className:i}=t,s=Ice(o||n,i);bce(s),_e.setDefaultRoute(s),_e.setDefaultClassName(i);let a=lr(e,r),c=Z(e,r),l=Tce(),u={historyAction:Z6,pxURLPath:""},p,m=null,f={acName:c,context:a,actionConfig:{context:a}};if(l||!l&&Lh()){let h=iE(y_());v.shouldUseURLParams()&&(m=h.includes("?")?h.split("?")[1]:null),p=c2(h,f),u.pxURLPath=p.urlPath,typeof p.payload?.pageClass<"u"&&(p.payload.pageClass=De()?.getState()?.data?.app?.pyPortal?.classID);let S="showHistory",A={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:f,routeKey:p.routeKey};Cce(p?.payload?.caseClassName)?o9(A,t,f.context):T(rt[S](n9(A)))}else p=_e.getEndPointInfo(kh),u.pxURLPath="";t9(null,{urlPathObjParam:u,infoParam:p,optionsParam:f,queryParam:m},!0)},Uh=(t,e=!1)=>{P_=t.domain,e===!1&&X6()&&(v6(_ce),R6()),_e.init(t,kh)},c9=t=>{_e.addRoutes(t)},l9=t=>{t&&(Q6=t.pyLabel)},D6=t=>{C6(t)},S_=t=>{for(let e of t)Uw.includes(e)||Uw.push(e)};function Hr(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Rce=typeof Symbol=="function"&&Symbol.observable||"@@observable",u9=Rce,Vw=()=>Math.random().toString(36).substring(7).split("").join("."),Pce={INIT:`@@redux/INIT${Vw()}`,REPLACE:`@@redux/REPLACE${Vw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vw()}`},O_=Pce;function x_(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Bw(t,e,r){if(typeof t!="function")throw new Error(Hr(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Hr(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(Bw)(t,e)}let n=t,o=e,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((A,C)=>{s.set(C,A)}))}function u(){if(c)throw new Error(Hr(3));return o}function p(A){if(typeof A!="function")throw new Error(Hr(4));if(c)throw new Error(Hr(5));let C=!0;l();let I=a++;return s.set(I,A),function(){if(C){if(c)throw new Error(Hr(6));C=!1,l(),s.delete(I),i=null}}}function m(A){if(!x_(A))throw new Error(Hr(7));if(typeof A.type>"u")throw new Error(Hr(8));if(typeof A.type!="string")throw new Error(Hr(17));if(c)throw new Error(Hr(9));try{c=!0,o=n(o,A)}finally{c=!1}return(i=s).forEach(I=>{I()}),A}function f(A){if(typeof A!="function")throw new Error(Hr(10));n=A,m({type:O_.REPLACE})}function h(){let A=p;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Hr(11));function I(){let N=C;N.next&&N.next(u())}return I(),{unsubscribe:A(I)}},[u9](){return this}}}return m({type:O_.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:f,[u9]:h}}function Nce(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:O_.INIT})>"u")throw new Error(Hr(12));if(typeof r(void 0,{type:O_.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function d9(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let n=Object.keys(r),o,i;try{Nce(r)}catch(s){i=s}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<n.length;p++){let m=n[p],f=r[m],h=a[m],S=f(h,c);if(typeof S>"u"){let A=c&&c.type;throw new Error(Hr(14))}u[m]=S,l=l||S!==h}return l=l||n.length!==Object.keys(a).length,l?u:a}}function jh(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function p9(...t){return e=>(r,n)=>{let o=e(r,n),i=()=>{throw new Error(Hr(15))},s={getState:o.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(s));return i=jh(...a)(o.dispatch),{...o,dispatch:i}}}function m9(t){return x_(t)&&"type"in t&&typeof t.type=="string"}var _9=Symbol.for("immer-nothing"),f9=Symbol.for("immer-draftable"),sn=Symbol.for("immer-state");function Fo(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var io=Object,Kd=io.getPrototypeOf,M_="constructor",F_="prototype",Ww="configurable",k_="enumerable",w_="writable",zh="value",bi=t=>!!t&&!!t[sn];function so(t){return t?I9(t)||B_(t)||!!t[f9]||!!t[M_]?.[f9]||H_(t)||G_(t):!1}var Oce=io[F_][M_].toString(),g9=new WeakMap;function I9(t){if(!t||!t0(t))return!1;let e=Kd(t);if(e===null||e===io[F_])return!0;let r=io.hasOwnProperty.call(e,M_)&&e[M_];if(r===Object)return!0;if(!Wd(r))return!1;let n=g9.get(r);return n===void 0&&(n=Function.toString.call(r),g9.set(r,n)),n===Oce}function V_(t,e,r=!0){Bh(t)===0?(r?Reflect.ownKeys(t):io.keys(t)).forEach(o=>{e(o,t[o],t)}):t.forEach((n,o)=>e(o,n,t))}function Bh(t){let e=t[sn];return e?e.type_:B_(t)?1:H_(t)?2:G_(t)?3:0}var Hw=(t,e,r=Bh(t))=>r===2?t.has(e):io[F_].hasOwnProperty.call(t,e),Kw=(t,e,r=Bh(t))=>r===2?t.get(e):t[e],L_=(t,e,r,n=Bh(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function xce(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var B_=Array.isArray,H_=t=>t instanceof Map,G_=t=>t instanceof Set,t0=t=>typeof t=="object",Wd=t=>typeof t=="function",Gw=t=>typeof t=="boolean";function Dce(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var hs=t=>t.copy_||t.base_;var r0=t=>t.modified_?t.copy_:t.base_;function Jw(t,e){if(H_(t))return new Map(t);if(G_(t))return new Set(t);if(B_(t))return Array[F_].slice.call(t);let r=I9(t);if(e===!0||e==="class_only"&&!r){let n=io.getOwnPropertyDescriptors(t);delete n[sn];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],a=n[s];a[w_]===!1&&(a[w_]=!0,a[Ww]=!0),(a.get||a.set)&&(n[s]={[Ww]:!0,[w_]:!0,[k_]:a[k_],[zh]:t[s]})}return io.create(Kd(t),n)}else{let n=Kd(t);if(n!==null&&r)return{...t};let o=io.create(n);return io.assign(o,t)}}function n0(t,e=!1){return q_(t)||bi(t)||!so(t)||(Bh(t)>1&&io.defineProperties(t,{set:D_,add:D_,clear:D_,delete:D_}),io.freeze(t),e&&V_(t,(r,n)=>{n0(n,!0)},!1)),t}function wce(){Fo(2)}var D_={[zh]:wce};function q_(t){return t===null||!t0(t)?!0:io.isFrozen(t)}var U_="MapSet",Yw="Patches",h9="ArrayMethods",b9={};function ul(t){let e=b9[t];return e||Fo(0,t),e}var y9=t=>!!b9[t];var Fh,T9=()=>Fh,$ce=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:y9(U_)?ul(U_):void 0,arrayMethodsPlugin_:y9(h9)?ul(h9):void 0});function S9(t,e){e&&(t.patchPlugin_=ul(Yw),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Zw(t){Qw(t),t.drafts_.forEach(Mce),t.drafts_=null}function Qw(t){t===Fh&&(Fh=t.parent_)}var E9=t=>Fh=$ce(Fh,t);function Mce(t){let e=t[sn];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function A9(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[sn].modified_&&(Zw(e),Fo(4)),so(t)&&(t=C9(e,t));let{patchPlugin_:o}=e;o&&o.generateReplacementPatches_(r[sn].base_,t,e)}else t=C9(e,r);return kce(e,t,!0),Zw(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==_9?t:void 0}function C9(t,e){if(q_(e))return e;let r=e[sn];if(!r)return j_(e,t.handledSet_,t);if(!W_(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);P9(r,t)}return r.copy_}function kce(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&n0(e,r)}function v9(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var W_=(t,e)=>t.scope_===e,Lce=[];function R9(t,e,r,n){let o=hs(t),i=t.type_;if(n!==void 0&&Kw(o,n,i)===e){L_(o,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;V_(o,(c,l)=>{if(bi(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let s=t.draftLocations_.get(e)??Lce;for(let a of s)L_(o,a,r,i)}function Uce(t,e,r){t.callbacks_.push(function(o){let i=e;if(!i||!W_(i,o))return;o.mapSetPlugin_?.fixSetContents(i);let s=r0(i);R9(t,i.draft_??i,s,r),P9(i,o)})}function P9(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let o=n.getPath(t);o&&n.generatePatches_(t,o,e)}v9(t)}}function jce(t,e,r){let{scope_:n}=t;if(bi(r)){let o=r[sn];W_(o,n)&&o.callbacks_.push(function(){$_(t);let s=r0(o);R9(t,r,s,e)})}else so(r)&&t.callbacks_.push(function(){let i=hs(t);t.type_===3?i.has(r)&&j_(r,n.handledSet_,n):Kw(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&j_(Kw(t.copy_,e,t.type_),n.handledSet_,n)})}function j_(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||bi(t)||e.has(t)||!so(t)||q_(t)||(e.add(t),V_(t,(n,o)=>{if(bi(o)){let i=o[sn];if(W_(i,r)){let s=r0(i);L_(t,n,s,t.type_),v9(i)}}else so(o)&&j_(o,e,r)})),t}function zce(t,e){let r=B_(t),n={type_:r?1:0,scope_:e?e.scope_:T9(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,i=z_;r&&(o=[n],i=Vh);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,[a,n]}var z_={get(t,e){if(e===sn)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let o=hs(t);if(!Hw(o,e,t.type_))return Vce(t,o,e);let i=o[e];if(t.finalized_||!so(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&Dce(e))return i;if(i===qw(t.base_,e)||Fce(t,e,i)){$_(t);let s=t.type_===1?+e:e,a=e0(t.scope_,i,t,s);return t.copy_[s]=a}return i},has(t,e){return e in hs(t)},ownKeys(t){return Reflect.ownKeys(hs(t))},set(t,e,r){let n=N9(hs(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let o=qw(hs(t),e),i=o?.[sn];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(xce(r,o)&&(r!==void 0||Hw(t.base_,e,t.type_)))return!0;$_(t),Xw(t)}return t.copy_[e]===r&&(r!==void 0||Hw(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),jce(t,e,r)),!0},deleteProperty(t,e){return $_(t),qw(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Xw(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=hs(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[w_]:!0,[Ww]:t.type_!==1||e!=="length",[k_]:n[k_],[zh]:r[e]}},defineProperty(){Fo(11)},getPrototypeOf(t){return Kd(t.base_)},setPrototypeOf(){Fo(12)}},Vh={};for(let t in z_){let e=z_[t];Vh[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Vh.deleteProperty=function(t,e){return Vh.set.call(this,t,e,void 0)};Vh.set=function(t,e,r){return z_.set.call(this,t[0],e,r,t[0])};function qw(t,e){let r=t[sn];return(r?hs(r):t)[e]}function Fce(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!so(r)||r[sn]?!1:t.baseRefs_.has(r)}function Vce(t,e,r){let n=N9(e,r);return n?zh in n?n[zh]:n.get?.call(t.draft_):void 0}function N9(t,e){if(!(e in t))return;let r=Kd(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Kd(r)}}function Xw(t){t.modified_||(t.modified_=!0,t.parent_&&Xw(t.parent_))}function $_(t){t.copy_||(t.assigned_=new Map,t.copy_=Jw(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Bce=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(Wd(e)&&!Wd(r)){let i=r;r=e;let s=this;return function(c=i,...l){return s.produce(c,u=>r.call(this,u,...l))}}Wd(r)||Fo(6),n!==void 0&&!Wd(n)&&Fo(7);let o;if(so(e)){let i=E9(this),s=e0(i,e,void 0),a=!0;try{o=r(s),a=!1}finally{a?Zw(i):Qw(i)}return S9(i,n),A9(o,i)}else if(!e||!t0(e)){if(o=r(e),o===void 0&&(o=e),o===_9&&(o=void 0),this.autoFreeze_&&n0(o,!0),n){let i=[],s=[];ul(Yw).generateReplacementPatches_(e,o,{patches_:i,inversePatches_:s}),n(i,s)}return o}else Fo(1,e)},this.produceWithPatches=(e,r)=>{if(Wd(e))return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let n,o;return[this.produce(e,r,(s,a)=>{n=s,o=a}),n,o]},Gw(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Gw(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Gw(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){so(t)||Fo(8),bi(t)&&(t=O9(t));let e=E9(this),r=e0(e,t,void 0);return r[sn].isManual_=!0,Qw(e),r}finishDraft(t,e){let r=t&&t[sn];(!r||!r.isManual_)&&Fo(9);let{scope_:n}=r;return S9(n,e),A9(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));let n=ul(Yw).applyPatches_;return bi(t)?n(t,e):this.produce(t,o=>n(o,e))}};function e0(t,e,r,n){let[o,i]=H_(e)?ul(U_).proxyMap_(e,r):G_(e)?ul(U_).proxySet_(e,r):zce(e,r);return(r?.scope_??T9()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Uce(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),o}function O9(t){return bi(t)||Fo(10,t),x9(t)}function x9(t){if(!so(t)||q_(t))return t;let e=t[sn],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Jw(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=Jw(t,!0);return V_(r,(o,i)=>{L_(r,o,x9(i))},n),e&&(e.finalized_=!1),r}var Hce=new Bce,o0=Hce.produce;function D9(t){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,t):o(i)}var w9=D9(),$9=D9;var Gce=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jh:jh.apply(null,arguments)},_We=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},qce=t=>t&&typeof t.match=="function";function ka(t,e){function r(...n){if(e){let o=e(...n);if(!o)throw new Error(K_(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>m9(n)&&n.type===t,r}var j9=class Hh extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Hh.prototype)}static get[Symbol.species](){return Hh}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Hh(...e[0].concat(this)):new Hh(...e.concat(this))}};function M9(t){return so(t)?o0(t,()=>{}):t}function Wce(t){return typeof t=="boolean"}var Kce=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=e??{},s=new j9;return r&&(Wce(r)?s.push(w9):s.push($9(r.extraArgument))),s},Jce="RTK_autoBatch";var k9=t=>e=>{setTimeout(e,t)},Yce=(t,e)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())},i=t(o),s=setTimeout(o,e)},Zce=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),o=!0,i=!1,s=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Yce(window.requestAnimationFrame,100):k9(10):t.type==="callback"?t.queueNotification:k9(t.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let p=()=>o&&u(),m=n.subscribe(p);return a.add(u),()=>{m(),a.delete(u)}},dispatch(u){try{return o=!u?.meta?.[Jce],i=!o,i&&(s||(s=!0,c(l))),n.dispatch(u)}finally{o=!0}}})},Qce=t=>function(r){let{autoBatch:n=!0}=r??{},o=new j9(t);return n&&o.push(Zce(typeof n=="object"?n:void 0)),o};function z9(t){let e=Kce(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(x_(r))c=d9(r);else throw new Error(K_(1));let l;typeof n=="function"?l=n(e):l=e();let u=jh;o&&(u=Gce({trace:!1,...typeof o=="object"&&o}));let p=p9(...l),m=Qce(p),f=typeof a=="function"?a(m):m(),h=u(...f);return Bw(c,s,h)}function Xce(t){let e={},r=[],n,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(K_(28));if(a in e)throw new Error(K_(29));return e[a]=s,o},addAsyncThunk(i,s){return s.pending&&(e[i.pending.type]=s.pending),s.rejected&&(e[i.rejected.type]=s.rejected),s.fulfilled&&(e[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return t(o),[e,r,n]}function ele(t){return typeof t=="function"}function Ti(t,e){let[r,n,o]=Xce(e),i;if(ele(t))i=()=>M9(t());else{let a=M9(t);i=()=>a}function s(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,p)=>{if(p)if(bi(u)){let f=p(u,c);return f===void 0?u:f}else{if(so(u))return o0(u,m=>p(m,c));{let m=p(u,c);if(m===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return u},a)}return s.getInitialState=i,s}var tle=(t,e)=>qce(t)?t.match(e):t(e);function rle(...t){return e=>t.some(r=>tle(r,e))}var nle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ole=(t=21)=>{let e="",r=t;for(;r--;)e+=nle[Math.random()*64|0];return e},ile=["name","message","stack","code"],i0=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},L9=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},sle=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of ile)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},U9="External signal was aborted",ale=(()=>{function t(e,r,n){let o=ka(e+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ka(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),s=ka(e+"/rejected",(c,l,u,p,m)=>({payload:p,error:(n&&n.serializeError||sle)(c||"Rejected"),meta:{...m||{},arg:u,requestId:l,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,p,m)=>{let f=n?.idGenerator?n.idGenerator(c):ole(),h=new AbortController,S,A;function C(_){A=_,h.abort()}l&&(l.aborted?C(U9):l.addEventListener("abort",()=>C(U9),{once:!0}));let I=(async function(){let _;try{let x=n?.condition?.(c,{getState:p,extra:m});if(lle(x)&&(x=await x),x===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let H=new Promise((G,re)=>{S=()=>{re({name:"AbortError",message:A||"Aborted"})},h.signal.addEventListener("abort",S,{once:!0})});u(i(f,c,n?.getPendingMeta?.({requestId:f,arg:c},{getState:p,extra:m}))),_=await Promise.race([H,Promise.resolve(r(c,{dispatch:u,getState:p,extra:m,requestId:f,signal:h.signal,abort:C,rejectWithValue:((G,re)=>new i0(G,re)),fulfillWithValue:((G,re)=>new L9(G,re))})).then(G=>{if(G instanceof i0)throw G;return G instanceof L9?o(G.payload,f,c,G.meta):o(G,f,c)})])}catch(x){_=x instanceof i0?s(null,f,c,x.payload,x.meta):s(x,f,c)}finally{S&&h.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&s.match(_)&&_.meta.condition||u(_),_})();return Object.assign(I,{abort:C,requestId:f,arg:c,unwrap(){return I.then(cle)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:rle(s,o),typePrefix:e})}return t.withTypes=()=>t,t})();function cle(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function lle(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ule=Symbol.for("rtk-slice-createasyncthunk"),bWe={[ule]:ale};var F9="listener",V9="completed",B9="cancelled",TWe=`task-${B9}`,vWe=`task-${V9}`,RWe=`${F9}-${B9}`,PWe=`${F9}-${V9}`;var{assign:H9}=Object;var s0="listenerMiddleware";var dle=H9(ka(`${s0}/add`),{withTypes:()=>dle}),NWe=ka(`${s0}/removeAll`),ple=H9(ka(`${s0}/remove`),{withTypes:()=>ple});function K_(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var a0=(t=>{let e=new Set,r=e,n=()=>{e===r&&(e=new Set(e))},o=s=>{let a=!0;return n(),e.add(s),()=>{a&&(n(),e.delete(s),a=!1)}},i=()=>{let s=Array.from(e);r=e,s.forEach(a=>a())};return(...s)=>{let a=t(...s),c=!1,l=!1,u=m=>Array.isArray(m)?m.map(u):a.dispatch(m),p=m=>{let f=l;f||(c=!1,l=!0);let h=u(m),S=c&&!f;return f||(c=!1,l=!1),S&&i(),h};return a.subscribe(()=>{l?c=!0:i()}),{...a,dispatch:p,subscribe:o}}});var G9=t=>!!t&&typeof t=="object"&&!Array.isArray(t),mle=(t,e)=>{if(Object.keys(e).length===0)return;Zt.updateDataPageStore(e),t[d.SHARED]||(t[d.SHARED]={});let r=t[d.SHARED];Object.entries(e).forEach(([n,o])=>{let i=r[n];G9(i)&&G9(o)?r[n]={...i,...o}:r[n]=o})},La=(t,e)=>{let{data:{shared:r={}}={},context:n}=e;if(Object.keys(r).length===0){n&&g.deleteIn(t,[n,"shared"]);return}mle(t,r),n&&g.deleteIn(t,[n,"shared"])},dl=(t,e,r=!1)=>{let{context:n,caseViewMode:o=r?void 0:d.PERFORM_MODE,containerName:i}=e;i!==ge.WORKAREA&&o&&g.setIn(t,[n,"context_data","caseViewMode"],o)},c0=(t,e)=>{let{context:r}=e;g.setIn(t,[r,"context_data","actionType"],e.actionType),g.setIn(t,[r,"context_data","assignmentID"],e.assignmentID)},q9=(t,e)=>{let{context:r}=e;g.deleteIn(t,[r,"context_data","blocking_action_counter"]),g.deleteIn(t,[r,"context_data","deferred_action_queue"])};var Gh=t=>t!==null&&typeof t=="object",W9=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},l0=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},u0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,r)})},J_=(t,e,r={})=>{let{deleteAssignmentSpecificResources:n=!0,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r;g.deleteIn(t,[e,"nextAssignmentInfo"]),i&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableActions"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableProcesses"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"assignments"])),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"activeActionID"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"childCases"]),o&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"confirmationLinks"]),g.deleteIn(t,[e,"caseMessages"])),n&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"actionButtons"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"navigation"]))},fle=(t,e)=>{let{containerItemID:r,context:n,deleteContext:o}=e;o&&g.deleteIn(t,[n]),g.deleteIn(t,[r])},gle={},hle=Ti(gle,t=>{t.addCase(St,(e,r)=>{if(!r.payload.data||e[r.payload.context])return;r.payload.doDeleteCaseSummary&&J_(e,r.payload.context);let{target:n}=r.payload;n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))?e[r.payload.context]=r.payload.data:e[r.payload.containerItemID]=r.payload.data,dl(e,r.payload),c0(e,r.payload),La(e,r.payload),q9(e,r.payload)}).addCase(kt,(e,r)=>{r.payload.doDeleteCaseSummary&&J_(e,r.payload.context,{deleteAssignmentSpecificResources:r.payload.deleteAssignmentSpecificResources});let{target:n,propertiesToReplace:o=[]}=r.payload;if(n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))){let i=e[r.payload.context];Gh(i)&&(e[r.payload.context]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}else{let i=e[r.payload.containerItemID];Gh(i)&&(e[r.payload.containerItemID]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}(r.payload.actionType||r.payload.assignmentID)&&c0(e,r.payload),dl(e,r.payload),La(e,r.payload),l0(e,r.payload.suggestionContexts)}).addCase(Ze,(e,r)=>{let{childContainersContexts:n=[]}=r.payload;fle(e,r.payload),u0(e,n),W9(e,r.payload.transientItems),l0(e,r.payload.suggestionContexts)}).addCase(qo,(e,r)=>{let{containerItems:n}=r.payload;Array.isArray(n)?n.forEach(o=>{g.deleteIn(e,[o])}):g.deleteIn(e,[n])}).addCase(Us,(e,r)=>{let{context:n,contextToBeRemoved:o,data:i,childContainersContextsToBeRemoved:s}=r.payload;J_(e,r.payload.context),dl(e,r.payload);let a=e[n],c=e[o];if(!Gh(a)||!Gh(c))return;let l=xt(a,c);Gh(l)&&(e[n]=xt(l,i),g.deleteIn(e,[o]),u0(e,s),La(e,r.payload))}).addCase(et,(e,r)=>{let{context:n,pulseReplace:o=!0,childContainersContexts:i=[]}=r.payload,{data:s}=r.payload,a=g.getIn(e[n],"pulse"),c=g.getIn(e[n],"OperatorID"),l=g.getIn(e[n],"pxRequestor");g.setIn(e,n,s),l&&g.setIn(e,[n,"pxRequestor"],s.pxRequestor?g.mergeDeep(l,s.pxRequestor):l),c&&g.setIn(e,[n,"OperatorID"],s.OperatorID?g.mergeDeep(c,s.OperatorID):c),!o&&a&&g.setIn(e,[n,"pulse"],a),dl(e,r.payload),La(e,r.payload),u0(e,i),W9(e,r.payload.transientItems),l0(e,r.payload.suggestionContexts)}).addCase(pn,(e,r)=>{let{context:n,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r.payload;J_(e,n,{doDeleteConfirmationDetails:o,skipMergeAssignmentsAndActions:i})}).addCase(Ms,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.setIn(e,n,o)}).addCase(Wo,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(Ko,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(ks,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(uo,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(ki,(e,r)=>{let{transientItemID:n,data:o}=r.payload;Object.keys(o??{}).forEach(i=>{g.deleteIn(e,[n,i])})}).addCase(Ls,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.deleteIn(e,n),g.setIn(e,n,o)}).addCase(Gl,(e,r)=>{let{key:n,value:o}=r.payload;g.setIn(e,`${d.SHARED}.${n}`,o)}).addCase(Jl,(e,r)=>{let{context:n,data:o}=r.payload;return g.setIn(e,n,o)})}),d0=hle;function K9(t){if(typeof t=="object"&&t!==null&&"payload"in t&&typeof t.payload=="object"&&t.payload!==null){let e=t.payload.context;return typeof e=="string"?e:void 0}}var yle=ka(Xl),Sle=Ti({},t=>{t.addCase(Er,(e,r)=>{let{propertiesToReplace:n=[],propertiesToReArrange:o=[],uiRootReference:i="",interestPath:s}=r.payload,a=i&&typeof r.payload.context=="string"?`${r.payload.context}.${i}`:r.payload.context,c=typeof a=="string"?oo(a):[],l={isArrayDeepMerge:r.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...o]};if(i&&c.length)g.setIn(e,c,xt(g.getIn(e,c),g.getIn(r.payload.data,oo(i)),l));else if(s){let u=g.getIn(e[r.payload.context],s),p=g.getIn(r.payload.data,s),m=xt(u,p,{isArrayDeepMerge:!0}),f=g.getIn(r.payload.data.context_data,s);v_(e[r.payload.context],[...n],[...o]),g.setIn(e[r.payload.context],s,m),e[r.payload.context]&&f&&g.setIn(e[r.payload.context].context_data,s,xt(g.getIn(e[r.payload.context].context_data,s),f,{isArrayDeepMerge:!0}))}else e[r.payload.context]=xt(e[r.payload.context],r.payload.data,l);dl(e,r.payload,!0),La(e,r.payload)}).addCase(bt,(e,r)=>{let{context:n,reference:o,value:i,isArrayDeepMerge:s}=r.payload;vw(e[n],o,i,{isArrayDeepMerge:s})}).addCase(oc,(e,r)=>{let{context:n,reference:o,value:i}=r.payload;Rw(e[n],o,i)}).addCase(Wl,(e,r)=>{Tw(e[r.payload.context],r.payload.reference)}).addCase(ws,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!0)}).addCase(To,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!1)}).addCase($s,(e,r)=>{let n=K9(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!0))}).addCase(Hl,(e,r)=>{let n=K9(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!1))}).addCase(Jo,(e,r)=>{let{data:n}=r.payload;La(e,{data:{shared:n}})}).addCase(Ql,(e,r)=>{let{dataPagesToBeRemoved:n=[]}=r.payload;if(!e.shared||n.length===0)return;let o=new Map;n.forEach(i=>{let{dataPageName:s,dataPageNameWithHash:a}=i,c=o.get(s);c?c.push(a):o.set(s,[a])}),o.forEach((i,s)=>{i.forEach(c=>{g.deleteIn(e.shared,[s,c])});let a=g.getIn(e.shared,[s]);a&&Object.keys(a).length===0&&g.deleteIn(e.shared,[s])})}).addCase(cc,(e,r)=>{let n=g.getIn(e[r.payload.context].context_data,"blocking_action_counter",0);r.payload.isInitiateBlockingAction?g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n+1):g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n-1)}).addCase(yle,(e,r)=>{e.locale=g.getIn(r.payload,"locale","")})}),J9=Sle;var Z9=/\[(\d+)\]$/gi,Q9=/(\d+)/gi,Ele=/\[\d+\]$/,X9=(t,e,r,n=[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT])=>{let o=g.getIn(e,n);if(o){let s=AE(o,[],[]);for(let a of s)g.setIn(t[r],[...n,...a],{})}},Y9=(t,e,r,n)=>{let{property:o,pageReference:i,category:s,type:a,subType:c}=n.payload,l=g.getIn(t[e],r);if(l&&s===d.CASEMESSAGES)g.setIn(t[e],Qn(o,i,s),"");else if(l&&l.length>0&&Array.isArray(l)){let u;c?u=l.filter(p=>!(p.type===a&&p.subType===c)):u=l.filter(p=>p.type!==a),r&&r.length>0&&g.setIn(t[e],Qn(o,i,s),u)}},Ale=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,stateObj:s}=e.payload,{context:a}=e.payload,c=a;if(s)return X9(t,s,a),t;let l=Qn(r,n,o,i);return o===d.PAGE&&a?.includes(ge.WORKAREA)&&(c=qe(a)),Y9(t,c,l,e),Y9(t,a,l,e),t},Cle=t=>{let e=t.map(r=>{let n=r.match(Z9),o=null;if(n?.length){let i=n[0].match(Q9);i?.length&&(o=parseInt(i[0],10))}return{key:r,hasIndex:!!n,numericIndex:o}});return e.sort((r,n)=>!r.hasIndex&&!n.hasIndex?r.key.localeCompare(n.key):!r.hasIndex&&n.hasIndex?-1:r.numericIndex!==null&&n.numericIndex!==null?r.numericIndex-n.numericIndex:1),e.map(r=>r.key)},_le=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,deletingIndex:s,stateObj:a}=e.payload,{context:c}=e.payload;if(a)return X9(t,a,c),t;let l=Qn(r,n,o,i);if(Number.isInteger(s)){g.deleteIn(t[c],l);let u=l.slice(0,l.length-1),p=g.getIn(t[c],u)||{},m=Cle(Object.keys(p));p=m.map(f=>p[f]),p.forEach((f,h)=>{let S=m[h].match(Z9);if(S?.length){let A=parseInt(S[0].match(Q9)[0],10);A>s&&(g.deleteIn(t[c],u.concat(m[h])),g.setIn(t[c],u.concat(m[h].replace(Ele,`[${A-1}]`)),f))}})}else g.setIn(t[c],l,{});return t};function Ile(t){let e=null,r=t.lastIndexOf(".");return r<0?null:(e=t.substring(0,r),e&&`caseInfo.content.${e}`.replace(/\(/g,"[").replace(/\)/g,"]"))}function eB(t,e){return g.getIn(t,e)?.dataInfo?.content!==void 0}var tB=(t,e)=>{let r=g.getIn(t,e);return B.isObjectCaseType(r?.objectInfo?.objectTypeID)===!0};function rB(t,e){let r=zr.FIELD_MESSAGES_PATH;return eB(t,e)?r=zr.DATA_OBJECT_FIELD_MESSAGES_PATH:tB(t,e)&&(r=zr.OBJECT_FIELD_MESSAGES_PATH),r}var ble=(t,e,r)=>{let n=g.getIn(r,d.ERROR_FIELD_IN_PAGE).slice(1),o=g.getIn(r,d.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(o){let i="caseInfo.content";eB(t,e)?i="dataInfo.content":tB(t,e)&&(i="objectInfo.content");let s=n?`${i}.${n}`:i;s=s.replace(/\(/g,"[").replace(/\)/g,"]");let a=Qn(o,s,d.PROPERTY),c=g.getIn(t[e],`${s}.classID`),l=lt(o,c),u=v.getLocale()??"en-US",p=new zd(u,l?.localeReference),m={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...l?.label&&{fieldLabel:p.getLocalizedText(l.label)}},f=g.getIn(t[e],a,[]);if(g.isContains(f,m))return;g.setIn(t[e],a,[...f,m])}},Tle=(t,e,r)=>{r.forEach(n=>{ble(t,e,n)})},vle=t=>{let e=[];return t.forEach(r=>{let n=r.erroneousInputOutputFieldInPage?.replace(/^\./,"");e.push({type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...n&&{fieldInPage:n}})}),e};function Rle(t,e){let{err:r,formFields:n}=e.payload,{context:o}=e.payload,{fieldErrors:i,pageErrors:s}=mj(r.errorDetails,n),a=rB(t,o);if(g.setIn(t,[o,...a],{}),g.setIn(t,[o,...zr.PAGE_MESSAGES_PATH],[]),i.forEach(c=>{let l=g.getIn(c,d.ERROR_FIELD_IN_PAGE);if(l){let u=l.slice(1);if(u){let p=Ile(u);if(!p)return!1;let m=u.substring(u.lastIndexOf(".")+1),f=Qn(m,p,d.PROPERTY);g.setIn(t,[o,...f],[])}}}),i.length>0&&Tle(t,o,i),s.length>0){let c=vle(s);t[o]||(o=d.APP.APP),g.setIn(t,[o,...zr.PAGE_MESSAGES_PATH],c)}else o.includes&&o.includes(ge.WORKAREA)&&(o=qe(o)),g.deleteIn(t,[o,...zr.PAGE_MESSAGES_PATH]);return t}var Ple=Ti({},t=>{t.addCase(Te,(e,r)=>r.payload.err.errorDetails&&(r.payload.err.errorClassification===E.VALIDATION_FAIL||r.payload.err.errorClassification===E.INVALID_INPUTS||(r.payload.err?.displayButtonsOnErrors?.length??0)>0)?Rle(e,r):e).addCase(kt,(e,r)=>{let{context:n}=r.payload,o=[n,...rB(e,n)],i=[n,...zr.PAGE_MESSAGES_PATH];if(g.setIn(e,o,{}),g.setIn(e,i,[]),n&&n.includes(ge.WORKAREA)){let a=[Po(n),...zr.PAGE_MESSAGES_PATH];g.setIn(e,a,[])}}).addCase(Wn,(e,r)=>{let{isListEntry:n,clearAll:o,context:i}=r.payload;return o?(g.deleteIn(e,[i,d.CONTEXT_DATA]),e):n?_le(e,r):Ale(e,r)}).addCase(Fs,(e,r)=>{let{messages:n,property:o,pageReference:i,context:s,category:a}=r.payload,c=Qn(o,i,a);n&&n.length>0&&Array.isArray(n)&&c&&c.length>0&&g.setIn(e[s],Qn(o,i,a),n)})}),p0=Ple;var nB=(t,e,r,n,o)=>{g.setIn(t[e],[...r,n],o)},Nle=(t,e,r,n,o)=>{let i=xt(g.getIn(t[e],[...r,n],{}),o);g.setIn(t[e],[...r,n],i)},Ole=(t,e,r,n,o)=>{let i=g.getIn(t[e],r,[]);typeof n=="string"?delete i[n]:i.splice(n,1),g.setIn(t[e],r,i),Ie.deleteListNode(e,[o],i.length)},xle=(t,e,r,n,o)=>{if(n===o)return;let i=g.getIn(t[e],[...r,n],{}),s=g.getIn(t[e],r,[]);s.splice(n,1),s.splice(o,0,i),g.setIn(t[e],r,s),wj(t,e,r?.join("."),n,o)},Dle=(t,e,r,n)=>{let o=g.getIn(t[e],r)||[],i=!1;n.forEach(s=>{let{instruction:a,content:c,listIndex:l}=s;a===d.LIST_ACTIONS.SELECT?(o[l]=c,i=!0):delete o[l]}),i&&Js(e,r?.join(".")),g.setIn(t[e],r,o.filter(Boolean))},wle=(t,e,r)=>{g.setIn(t[e],r,[])},$le=(t,e,r,n)=>{g.setIn(t[e],r,n)},Mle=(t,e,r)=>{g.setIn(t[e],r,{})},kle=Ti({},t=>{t.addCase(po,(e,r)=>{let{instruction:n,actions:o,context:i,referenceList:s,listIndex:a,groupIndex:c,listMoveToIndex:l,content:u={}}=r.payload,p=oo(s);switch(n){case d.LIST_ACTIONS.ADD:nB(e,i,p,c,u);break;case d.LIST_ACTIONS.INSERT:nB(e,i,p,a,u);break;case d.LIST_ACTIONS.UPDATE:Nle(e,i,p,a??c,u);break;case d.LIST_ACTIONS.DELETE:Ole(e,i,p,a??c,s);break;case d.LIST_ACTIONS.MOVE:xle(e,i,p,a,l);break;case d.LIST_ACTIONS_TYPE.SELECT_DESELECT:Dle(e,i,p,o);break;case d.LIST_ACTIONS_TYPE.DESELECT_ALL:wle(e,i,p);break;case d.LIST_ACTIONS.REPLACE:$le(e,i,p,u);break;case d.LIST_ACTIONS.DELETEPAGE:Mle(e,i,p);break;default:break}})}),oB=kle;var iB=(t,e)=>{if(t||(t=qh().data),e.type===Vs)return qh().data;switch(e.type){case Er:case bt:case oc:case Wl:case ws:case To:case $s:case Hl:case Jo:case Ql:case cc:case Xl:return J9(t,e);case Te:case Wn:case Fs:return p0(t,e);case kt:return p0(d0(t,e),e);case St:case Ze:case qo:case Us:case et:case pn:case Ms:case Wo:case Ko:case ks:case uo:case ki:case Ls:case Gl:case Jl:return d0(t,e);case po:return oB(t,e);default:return t}};var sB={},m0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,[r])})},Lle=(t,e,r,n)=>{t===""&&g.deleteIn(e,[r,"items",n,"key"])},Ule=(t,e,r,n,o)=>{n||(o?g.setIn(t,[e,"items",r,"pageName"],o):g.deleteIn(t,[e,"items",r,"pageName"]))},f0=(t,e)=>{let{type:r,payload:n}=e,o=r===kt,{target:i,context:s,semanticURL:a="",root:c,containerItemID:l,childContainers:u,flowName:p,resourceType:m="",key:f="",clearView:h=!1,pageName:S}=n;return c?g.setIn(t,[i,"items",l,"view"],c):h&&g.deleteIn(t,[i,"items",l,"view"]),s&&g.setIn(t,[i,"items",l,"context"],s),p&&g.setIn(t,[i,"items",l,"flowName"],p),(!o||o&&f)&&g.setIn(t,[i,"items",l,"key"],f.trim()),Lle(f,t,i,l),(!o||o&&a)&&g.setIn(t,[i,"items",l,"semanticURL"],a),(!o||o&&m)&&g.setIn(t,[i,"items",l,"resourceType"],m),Ule(t,i,l,o,S),m0(t,u),t},jle=({prevItems:t,prevAccessedOrder:e,containerItemID:r,root:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,isBulkAction:f,showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:I,hideDefaultActionButtons:_,referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:re,index:j,actionID:ne,acTertiary:be,isMultiRecordData:he,parentContext:Me,isDeleteConfirmation:Fe,workId:Ce,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt,heading:yr,pageName:Xt})=>({accessedOrder:[...e,r],items:{...t,[r]:{view:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,...f&&{isBulkAction:f},showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:I,..._&&{hideDefaultActionButtons:_},referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:re,index:j,...ne&&{actionID:ne},...be&&{acTertiary:be},...he&&{isMultiRecordData:he},...Me&&{parentContext:Me},...Xt&&{pageName:Xt},...Fe&&{isDeleteConfirmation:Fe,workId:Ce,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt},heading:yr}}}),zle=(t,e)=>{let{target:r,context:n,isInCreateStage:o,isBulkAction:i,semanticURL:s,root:a,containerItemID:c,actionMgrID:l,key:u,flowName:p,resourceType:m,actionName:f,isMinimizable:h,showProgress:S,progressMessage:A,modalOptions:C,resourceStatus:I,hideDefaultActionButtons:_,actionID:N,isMultiRecordData:x,acTertiary:H,parentContext:G,heading:re,isTraditionalRemoteCase:j,readOnly:ne,referenceList:be,subscriptName:he,subscriptFieldName:Me,pageGroupName:Fe,isPageGroup:Ce,index:Ye,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:ln,pageName:_o}=e.payload,vr=t[r],Vn=vr&&vr.type,qr=vr&&vr.accessedOrder||[],zt=vr&&vr.items||{};if(t[r]&&Vn==="single"&&qr.length>0){f0(t,e);return}let ao=jle({prevItems:zt,prevAccessedOrder:qr,containerItemID:c,root:a,semanticURL:s,key:u,flowName:p,readOnly:ne,context:n,isInCreateStage:o,resourceType:m,actionName:f,isMinimizable:h,isBulkAction:i,showProgress:S,progressMessage:A,modalOptions:C,isTraditionalRemoteCase:j,resourceStatus:I,hideDefaultActionButtons:_,referenceList:be,subscriptName:he,subscriptFieldName:Me,pageGroupName:Fe,isPageGroup:Ce,index:Ye,actionID:N,acTertiary:H,isMultiRecordData:x,parentContext:G,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:ln,heading:re,pageName:_o});w.resolveActionByID(l,null,!1),t[r]||(t[r]={accessedOrder:[],items:{}},Vn!==void 0&&(t[r].type=Vn)),g.setIn(t,[r,"accessedOrder"],ao.accessedOrder),g.setIn(t,[r,"items",c],ao.items[c])},Fle=(t,e,r)=>{let n=t&&t[e]?.type,o=t&&t[e]?.accessedOrder||[];return n==="single"?o.length>0?o:[...o,r]:o.includes(r)?o:[...o,r]},Vle=(t,e)=>{let{actionMgrID:r,data:n,target:o,containerItemID:i}=e.payload,s=t;try{let a=Fle(t,o,i);g.setIn(t,[o,"items",i,"transientItems"],[]),g.setIn(t,[o,"accessedOrder"],a),s=f0(t,e),w.resolveActionByID(r,n,!1)}catch{w.rejectActionByID(r,!1)}return s},Ble=Ti(sB,t=>{t.addCase(Vs,()=>sB).addCase(Kl,(e,r)=>{let{context:n,name:o,type:i,actionMgrID:s}=r.payload,a=`${n}/${o}`;if(w.resolveActionByID(s,null,!1),e[a])return e;g.setIn(e,[a],{type:i,accessedOrder:[],items:{}})}).addCase(eS,(e,r)=>{let{containerName:n,childContainers:o=[]}=r.payload;g.deleteIn(e,[n]),o.forEach(i=>{g.deleteIn(e,[i])})}).addCase(qo,(e,r)=>{let{context:n,name:o,actionMgrID:i,childContainers:s}=r.payload,a=`${n}/${o}`;w.resolveActionByID(i,null,!1),g.setIn(e,[a,"accessedOrder"],[]),g.setIn(e,[a,"items"],{}),Array.isArray(s)&&s.forEach(c=>{g.deleteIn(e,[c])})}).addCase(St,(e,r)=>{zle(e,r)}).addCase(kt,(e,r)=>{let{actionMgrID:n,data:o}=r.payload;try{f0(e,r),w.resolveActionByID(n,o,!1)}catch{w.rejectActionByID(n,!1)}}).addCase(et,(e,r)=>Vle(e,r)).addCase(nr,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i}=r.payload;try{let s=g.getIn(e,[n,"accessedOrder"]).filter(a=>a!==o);s.push(o),g.setIn(e,[n,"accessedOrder"],s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Us,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),m0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Ze,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),m0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Ms,(e,r)=>{let{transientItemID:n,target:o,contextName:i}=r.payload,s=g.getIn(e,[o,"items",i,"transientItems"])??[];g.setIn(e,[o,"items",i,"transientItems"],[...s,n])}).addCase(Ko,(e,r)=>{let{target:n,containerItemID:o}=r.payload;g.deleteIn(e,[n,"items",o,"transientItems"])}).addCase(Wo,(e,r)=>{let{target:n,transientItemID:o,containerItemID:i}=r.payload,a=(g.getIn(e,[n,"items",i,"transientItems"])??[]).filter(c=>c!==o);g.setIn(e,[n,"items",i,"transientItems"],a)})}),aB=Ble;var cB={},qh=()=>cB,Hle=t=>{let e=t.Data||t.data,{uiResources:r={}}=t,n=r[d.CONTEXT_DATA]||t[d.CONTEXT_DATA];cB={data:{locale:v.getLocale(),[d.APP.APP]:{...e,[d.CONTEXT_DATA]:n}},containers:{}}},lB=t=>(Hle(t),{data:iB,containers:aB});var g0=(t,e=!1)=>t===d.ACTION?e?Ut.REFRESH_CASE_DATA:Ut.REFRESH_ASSIGNMENT_DATA:Ut.REFRESH_CASE_VIEW,h0=(t,e,r)=>{let n=[];e&&r&&n.push({page:e,actionID:r});let o=t;for(;o;){let i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",o);if(!i?.isMultiRecordData||i.editType!==d.ACTION||!i.interestPage||!i.interestPageActionID)break;i.interestPage!==e&&n.unshift({page:i.interestPage,actionID:i.interestPageActionID}),o=i.parentContext}return n},Y_=t=>{let{context:e}=t,n={...Rt(e,{skipUUID:!1}).content,contextData:!1},o=bu(e);g.isEmpty(o)||(n=Nc(o,n));let i=g0(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,n.interestPageActionID=t.interestPageActionID,v.isInfinityRuntime()&&(n.actionIdArrayToBeProcessed=h0(e,t.interestPage,t.interestPageActionID))),n.interestPage=t.interestPage,q(k(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:we(l.headers)})),me(": Error occurred during ajax call : ",e))};var Z_=[d.CASE_INFO.CASE_INFO_CONTENT,d.OBJECT_INFO.OBJECT_INFO_CONTENT],Gle=(t,e)=>`${Z_.find(n=>g.hasIn(t,n))??d.CASE_INFO.CASE_INFO_CONTENT}${g.convertClipboardPageToPageRefNotation(e)}`,y0=async(t,e)=>{let{context:r,serverPrecedenceFields:n,requestType:o}=e,i=Vt.getTargetViewContainerName(vn),s=Z(i,r),a={acName:s,context:r},c=Le(t,{[E.STOPMERGEACTIONS]:!0,[E.ACTIONS.DELETEAVIALACTIONS]:!0});c.directUrlUpdation=!1,o===Ut.REFRESH&&await Pe(c,e,a);let u=$e(c,{target:s,context:r});e.interestPage&&(u.interestPath=Gle(u.data,e.interestPage)),u.isArrayDeepMerge=e.options?.isArrayDeepMerge,u.preserveClientChanges=e.options?.preserveClientChanges!==void 0?e.options.preserveClientChanges:!0;let p=B.getPropertiesToReArrange(r);return{payload:u,mergeOptions:{serverPrecedenceFields:n,propertiesToReArrange:p}}},uB=async(t,e)=>{let{context:r}=e,{payload:n,mergeOptions:o}=await y0(t,e),i=V(Re,n,o),s=i.payload?.data?.pageInstructions;return s?.length>0&&(delete i.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(r,s)),T(i),n};var qle=()=>{let t=`${d.APP.APP}/${d.PRIMARY}`,e=se(t);return(e?Ar(`${e}/${d.WORKAREA}`):null)??Ar(t)},dB=async t=>{let e=qle();if(!e)return;let{data:r}=Nx(t);typeof r!="object"||r===null||await uB(r,{context:e,serverPrecedenceFields:[],requestType:Ut.REFRESH})};var E0=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),pB=t=>E0(t)||t===void 0||t===null,mB=t=>E0(t)?t:void 0,S0=(t,e)=>t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`),fB=(t,e,r,n,o=[])=>{let i={stalePaths:[],conflictPaths:[]},s=(c,l,u,p)=>{o.some(m=>S0(p,m)||S0(m,p))||lo(u,l)||(lo(c,l)?i.stalePaths.push(p):lo(c,u)||i.conflictPaths.push(p))},a=(c,l,u,p)=>{if(!(l===u||o.some(m=>S0(p,m)))){if(E0(c)&&pB(l)&&pB(u)){Object.keys(c).forEach(m=>{a(c[m],mB(l)?.[m],mB(u)?.[m],`${p}.${m}`)});return}Array.isArray(c)||Array.isArray(l)||Array.isArray(u)||s(c,l,u,p)}};return a(t,e,r,n),i};var ys={},{VIEW:Wle,FIELD:Kle}=d.CONTEXT_TREE_NODE_TYPES,Jle=["refreshFor","propertyName","optionalPayload","resetForm","skipPayloadGeneration","isFillFormWithAI"],X_={},eI={},tI={},C0={},rI={},nI={},_0=new Set,gB=0,Yle=(t,e)=>{let r=[];return Object.keys(t).forEach(n=>{(!Object.hasOwn(e,n)||e[n]!==t[n])&&r.push(n)}),r},hB=t=>{let e=Oh(t.context);return{changedPropertyValues:e,preserveFields:t.preRequestSnapshot?Yle(e,t.preRequestSnapshot):[]}},Zle=t=>{if(!t)return;let e=rI[t];return delete rI[t],e},Qle=t=>{if(!t)return;let e=nI[t];return delete nI[t],e},Xle=(t,e)=>{let r=t.mergePayload?.preserveClientChanges===!1?e.preserveFields:Object.keys(e.changedPropertyValues),{serverPrecedenceFields:n}=t.mergeOptions,o=(n??[]).flatMap(i=>Z_.map(s=>`${s}.${i}`));return[...r,...o]},eue=t=>typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t,tue=(t,e)=>{let r=t.mergePayload?.data;if(t.preRequestData===void 0||!r)return!1;let n=W(t.context),o=t.mergePayload.interestPath?[t.mergePayload.interestPath]:Z_,i=Xle(t,e),s=!1;return o.forEach(a=>{let c=g.getIn(r,a);if(c===void 0)return;let{stalePaths:l,conflictPaths:u}=fB(c,g.getIn(t.preRequestData,a),g.getIn(n,a),a,i);l.forEach(p=>{let m=g.getIn(n,p);m===void 0?g.deleteIn(r,p):g.setIn(r,p,eue(m))}),(l.length>0||u.length>0)&&(s=!0)}),s},rue=t=>{let e=w.getNextActionMgrId(),r={...t.options,actionMgrID:e};Jle.forEach(n=>{delete r[n]}),_0.add(e),T(oa({...t,options:r}))},nue=t=>t.some(r=>r.isReconciliation)?void 0:[...t].reverse().find(r=>{let n={...r.actionConfig?.options};return r.actionConfig&&!n.isFillFormWithAI})?.actionConfig,yB=t=>t.actionConfig?.actionType===lc,oue=t=>{let e=0,r=()=>{},n=new Promise(o=>{r=o});return $.publish(E.PUB_SUB_EVENTS.ON_FILL_FORM_WITH_AI_COMPLETE,{context:t,registerField:()=>{e+=1},deregisterField:()=>{e-=1,e===0&&r()}}),e===0&&r(),n},SB=async t=>{yB(t)&&(await oue(t.context),t.actionMgrID&&w.resolveActionByID(t.actionMgrID,t.mergePayload)),Ct.deRegisterBlockingAction(t.context).catch(()=>{})},EB=(t,e,r)=>{let n=e&&tue(t,r),{preserveFields:o}=r,i=o.length>0?{...t.mergeOptions,preserveFields:o}:t.mergeOptions,s=V(Re,t.mergePayload,i),a=g.getIn(s,"payload.data.pageInstructions");return a&&a.length>0&&(delete s.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(t.context,a)),T(s),t.actionMgrID&&!yB(t)&&w.resolveActionByID(t.actionMgrID,t.mergePayload),n},iue=t=>{delete eI[t];let e=X_[t];if(delete X_[t],!e||e.length===0)return;e.sort((a,c)=>a.seq-c.seq);let r=e.length>1,n=!1,o=new Set;e.map(a=>({item:a,changeState:hB(a)})).forEach(({item:a,changeState:c})=>{n=EB(a,r,c)||n,o.add(a.context)}),o.forEach(a=>{$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a})});let s=n?nue(e):void 0;s&&rue(s),e.forEach(SB)},sue=(t,e,r)=>{if(!t)return;tI[t]=e,gB+=1,C0[t]=gB,rI[t]=Oh(r),nI[t]=W(r),(eI[e]??(eI[e]=new Set)).add(t)},aue=t=>t?C0[t]??0:0,A0=t=>{if(!t)return;let e=tI[t];if(!e)return;delete tI[t],delete C0[t],delete rI[t],delete nI[t],_0.delete(t);let r=eI[e];r&&(r.delete(t),r.size===0&&iue(e))},cue=t=>(EB(t,!1,hB(t)),$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:t.context}),SB(t)),lue=t=>{let{ID:e,actionID:r,context:n}=t;return`${e}.${n}.${r}`},uue=(t,e,r)=>{let n=e.value.data[r]?.objectInfo?.headers,o=e.value.data[r]?.caseInfo?.headers;return!B.shouldUseUnifiedHandling()&&t&&n?n:o},due=t=>{let{reqHeaders:e}=t;e&&(t.headers=t.headers||{},e.etag&&(t.headers["if-match"]=e.etag))},pue=t=>(_t()||Z4(t)>0)&&ys[t],mue=(t,e,r)=>{let{mcpAction:n,body:o}=t;return n&&_t()&&GC({body:o,responseType:t.responseType})?pr(n.actionName,{queryPayload:n.queryPayload,body:qC(o),headers:ra({headers:t.headers,body:o},e)},t.cancelConfig?.token):k(t.url,t,e,{cancelContext:r})},fue=(t,e)=>{let r=[];for(let n=0;n<ys[t].length;){let o=ys[t][n],i=sj(o,e);if(i===OT)return!1;i===!0&&(r.push(n),o.cancelConfig?.cancel()),n+=1}for(let n=r.length-1;n>=0;n-=1)ys[t].splice(r[n],1);return!0},gue=(t,e)=>{let{context:r}=t;due(t);let n=lue(e);if(e.interestPage&&(t.interestPage=e.interestPage),pue(n)&&!fue(n,t)){let i=Object.assign(new Error,{code:"ERR_CANCELED"});return Promise.reject(i)}let o=pu();return t.signal=o.token,t.cancelConfig=o,ys[n]?ys[n].push(t):ys[n]=[t],$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_START,{context:r}),Dm()&&sue(e.options?.actionMgrID,n,r),mue(t,r,n).then(i=>(delete ys[n],i)).catch(i=>{throw i&&i.code!=="ERR_CANCELED"&&delete ys[n],i})},Q_=(t,e)=>({routeKey:t,restAPI:U(t,e)}),hue=(t,e)=>{let{isObjectType:r,isExternalObject:n,actionID:o,context:i,isExternalCase:s,casetypeID:a}=t,c=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW);if(e||r&&NT(i)){let l=n&&o===c?Ut.REFRESH_EXTERNAL_OBJECT:Ut.REFRESH_CASE_DATA,u=B.shouldUseUnifiedHandling();return n&&o===c&&u&&(l=Ut.REFRESH_EXTERNAL_CASE_DATA),Q_(l,t)}return Q_(s&&a&&o===c?Ut.REFRESH_EXTERNAL_CASE_DATA:Ut.REFRESH_ASSIGNMENT_DATA,t)},yue=(t,e,r,n,o)=>{o={...o,calculations:{fields:e,whens:r}};let{routeKey:i,restAPI:s}=Q_(n?Ut.RECALCULATE_CASE_DATA:Ut.RECALCULATE_ASSIGNMENT_DATA,t),a=Ut.RECALCULATE;return{routeKey:i,restAPI:s,requestBody:o,requestType:a}},Sue=(t,e)=>{let{caseWideAction:r,caseViewAction:n,fieldsWithDeclarativeTargets:o,fieldsWithWhen:i,isViewsWithWhen:s,interestPage:a,options:c,isMultiRecordData:l,editType:u,isLocalAction:p,interestPageActionID:m,context:f}=t,{optionalPayload:h}=c;h&&(e.content={...h});let S,A={},C={...e},I=Ut.REFRESH;return n||l&&u===d.ACTION?(S=g0(u,p),l&&u===d.ACTION&&(C.interestPageActionID=m,v.isInfinityRuntime()&&(C.actionIdArrayToBeProcessed=h0(f))),A=U(S,t),C={...C,interestPage:a}):s||c.refreshFor?{routeKey:S,restAPI:A}=hue(t,r):(o.length>0||i.length>0)&&({routeKey:S,restAPI:A,requestBody:C,requestType:I}=yue(t,o,i,r,C)),{routeKey:S,restAPI:A,requestBody:C,requestType:I}},Eue=(t,e,r,n,o)=>{let i=lt(t,e);if(!i||i.dataRetrievalType!=="copy")return;let s=g.getIn(r,`content.content.${t}`);if(!s||typeof s!="object")return;(n?Object.keys(s).filter(c=>c!==n):Object.keys(s)).length>0&&o.push(t)},Aue=(t,e)=>t.pipe(ee(Ut.REFRESH_DATA,lc),O(r=>{let n=r.payload;return n.actionType=r.type,n}),Qo(r=>!Eu(r?.options?.actionMgrID)),z(r=>{let{context:n,contextData:o,options:i,isObjectType:s}=r,{propertyName:a="",classID:c="",isObjectWideAction:l,skipPayloadGeneration:u}=i,p=u?{content:{}}:Rt(n,{skipUUID:!1,isObjectWideAction:l}),m=[],f=[],h=!1;v.getFeatureMap().granularUIRefresh?({fieldsWithDeclarativeTargets:m=[],whens:f=[]}=cj(n),h=f.some(Oe=>Oe.type===Wle)):h=!0;let A=f.filter(Oe=>Oe.type===Kle),C=g.getPropertyName(a),I=C?C.split("."):[],_=I.pop(),N=I.join("."),x=[];N&&Eue(N,c,p,_,x),r.serverPrecedenceFields=x;let H={...p.content,contextData:o},G=bu(n);g.isEmpty(G)||(H=Nc(G,H));let re=Sue({...r,fieldsWithDeclarativeTargets:m,fieldsWithWhen:A,isViewsWithWhen:h},H);Ct.registerBlockingAction(n).catch(()=>{});let{routeKey:j,restAPI:ne,requestBody:be,requestType:he}=re;r={...r,requestType:he},r.requestType=he;let{reqType:Me,restApi:Fe}=ne,Ce={...uue(s,e,n)};Ce&&!Ce.etag&&r.isMultiRecordData&&r.editType===d.ACTION&&(Ce.etag=g.getETag(r.context));let Ye={reqHeaders:Ce,context:n,method:Me,body:be,url:oj(r,Fe),...j&&{mcpAction:{actionName:j,queryPayload:ij(r)}}};return q(gue(Ye,r)).pipe(O(Oe=>{let ft=aj(Oe?.data,i?.classID,s);return i?.resetForm&&Ie.removeContextTreeNode(n),{response:{...ft},actionConfig:r,actionMgrID:r.options.actionMgrID,headers:we(Oe.headers)}}),me(": Error occurred during fetch call at refreshData Epic : ",r.context,r?.options?.actionMgrID))}),z(async r=>{if(r&&r.type===Te)return Ct.deRegisterBlockingAction(r.payload?.context).catch(()=>{}),r.payload?.err?.code==="ERR_CANCELED"?(A0(r.payload?.actionMgrID),[]):($.publish(d.ON_REFRESH_ERROR,{context:r.payload?.context}),A0(r.payload?.actionMgrID),ue(r));let{actionConfig:n,response:o,actionMgrID:i}=r,{context:s}=n,{payload:a,mergeOptions:c}=await y0(o,n),l=i?tI[i]:void 0,u={seq:aue(i),actionMgrID:i,context:s,mergePayload:a,mergeOptions:c,preRequestSnapshot:Zle(i),preRequestData:Qle(i),actionConfig:n,isReconciliation:_0.has(i)};return l?(X_[l]??(X_[l]=[])).push(u):await cue(u),A0(i),[]}));T4(t=>{dB(t).catch(e=>{console.error("Failed to merge MCP tool result into the store",e)})});var Cue=[Aue],AB=Cue;var _ue=t=>t.pipe(ee(iS),z(async e=>{let{context:r}=e.payload,n={},o={},i=Object.keys(e.payload.datapages).map(a=>{let c=e.payload.datapages[a];if(c.mode===d.READONLY&&c?.refreshStrategy){let{timeoutSecs:l="",type:u=""}=c?.refreshStrategy||{},p=Mo()[c.name];if(p&&a in p){let m=p[a],{loadTime:f}=m;if(!or.isTimeElapsed(f,l,u))return}}return or.getData(c.name,{dataViewParameters:c.dataViewParameters},r).then(l=>{let u=c.mode===d.READONLY?o:n,p=P.getDefaultQualifiedName("pxResults");u[c.name]?u[c.name][a]={[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}:u[c.name]={[a]:{[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}}}).catch(()=>{})});await Promise.allSettled(i);let s=[];return Object.keys(n).length&&s.push(Re({context:r,data:n})),Object.keys(o).length&&s.push(Mw({data:o,context:r})),T(s),[]})),Iue=[_ue],CB=Iue;var bue=t=>typeof t=="object"&&t!==null&&"ID"in t&&typeof t.ID=="string"&&"state"in t&&typeof t.state=="string",I0=class t{static EDIT_OPEN="edit_open";static EDIT_SAVE="edit_save";static EDIT_SUBMIT="edit_submit";static EDIT_CANCEL="edit_cancel";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static openCaseViewByCaseId=new Set;static collabConfig;static EDITING_STATE="editing";static PAGE_CATEGORY=d.PAGE;static WARNING_TYPE="warning";static INFO_TYPE="info";static ERROR_TYPE="error";static LOCALE_CATEGORY="Messages";static STALE_DATA_TYPE="error";static STALE_ASSIGNMENT_TYPE="error";static EDIT_WARNING_MESSAGE="Changes may be lost: Others are editing – only the first save or submit is kept.";static STALE_DATA_MESSAGE="The case was updated by another user. Please refresh to view the latest information.";static STALE_ASSIGNMENT_MESSAGE="This assignment is no longer available because it was completed or updated by another user.";static NO_EDITORS_INFO_MESSAGE="Changes can now be saved: No more editors active.";static NO_EDITORS_INFO_SUBTYPE="collaboration-no-editors";static caseContextById={};static collaborationBannerByContext={};static assignmentIdByContext={};static DEPARTURE_STATES=new Set(["closed"]);static ACTION_STATE_MESSAGES={saved:"Changes may be lost: Other user has saved this assignment.",submitted:"Changes may be lost: Other user has submitted this assignment."};static ASSIGNMENT_AWARE_STATES=new Set(["saved","submitted","stage_changed"]);static INTERACTION_STATE_BY_EVENT={edit_open:"editing",edit_save:"saved",edit_submit:"submitted",edit_cancel:"viewing",view_open:"viewing",view_close:"closed"};static normalizeInteractionState(e){return this.INTERACTION_STATE_BY_EVENT[e]??e}static getLocalizedMessage(e){return Nr().getLocaleValue(e,this.LOCALE_CATEGORY)}static assignmentContextsByCaseId={};static caseIdByAssignmentContext={};static editorStateByCaseId={};static localInteractionStateByCaseId={};static respondedToViewOpenByCaseId={};static pendingActionStateByCaseId={};static suppressEditingWarningOnNextAssignmentLoadByCaseId={};static pendingSaveCaseIds=new Set;static cancelTransitionCaseIds=new Set;static getCollaborationState(e){let r=Object.entries(e?.message??{})[0];if(!r)return null;let[n,o]=r;if(typeof o=="string")return{userID:n,state:this.normalizeInteractionState(o),eventType:o};if(typeof o!="object"||o===null||!("state"in o)||typeof o.state!="string")return null;let i=this.normalizeInteractionState(o.state),s="assignmentId"in o&&typeof o.assignmentId=="string"&&o.assignmentId||("assignmentID"in o&&typeof o.assignmentID=="string"?o.assignmentID:void 0);return{userID:n,state:i,eventType:o.state,assignmentId:s}}static init(e){e&&(this.collabConfig=e)}static isCollaborationEnabled(){return!!(t.collabConfig?.appEnabled&&t.collabConfig?.portalEnabled)}static isLaunchpadRuntime(){return!v.isInfinityRuntime()}static dispatchCollaboratorAction=(e,r,n,o,i)=>{T({type:"LIST_ACTION",payload:{instruction:e,context:r,referenceList:o,listIndex:n,content:i,skipDirtyValidation:!0,skipRefresh:!0}})};static handleCaseCollaboratorsUpdate(e,r,n){let o=this.getCollaborationState(n);if(!o)return;let{userID:i,state:s,eventType:a,assignmentId:c}=o;if(i===v.getOperatorIdentifier())return;this.respondToCollaboratorViewOpen(e,i,a,s);let l=this.DEPARTURE_STATES.has(s),u=this.editorStateByCaseId[e]??(this.editorStateByCaseId[e]={});l?delete u[i]:u[i]=s;let p={ID:i,state:s},m=[r,this.caseContextById[e],...this.getAssignmentContextsForCase(e)].filter(h=>!!h);new Set([...m,...m.map(h=>qe(h))]).forEach(h=>{let S=oe(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",h)||[],A=S.findIndex(C=>C.ID===i);A!==-1?l?this.dispatchCollaboratorAction("DELETE",h,A,d.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",h,null,`${d.CASE_INFO.CASE_INFO_COLLABORATORS}[${A}]`,p):l||this.dispatchCollaboratorAction("INSERT",h,S.length,d.CASE_INFO.CASE_INFO_COLLABORATORS,p)}),this.isLaunchpadRuntime()&&this.updateLaunchpadCollaborationState(e,s,c)}static updateLaunchpadCollaborationState(e,r,n){let o=this.getAssignmentContextsForCase(e);this.ASSIGNMENT_AWARE_STATES.has(r)&&((r==="saved"||r==="submitted")&&(this.pendingActionStateByCaseId[e]={state:r,assignmentId:n}),o.forEach(a=>this.updateStaleState(a,r,n)));let i=this.getRemoteEditorCount(e),s=this.pendingActionStateByCaseId[e];o.forEach(a=>{this.refreshCollaborationBanner(a,i,s)})}static getCaseIdFromContext(e){let r=oe(d.CASE_INFO.CASE_INFO_ID,"",e);return typeof r=="string"&&r?r:void 0}static resolveCaseIdForAssignmentContext(e,r){if(r){let n=this.getCaseIdFromContext(r);if(n)return n;let o=this.caseIdByAssignmentContext[r];if(o)return o}return e}static getAssignmentContextsForCase(e){let r=this.assignmentContextsByCaseId[e]??[];if(r.length>0)return r;let n=[];return Object.entries(this.caseIdByAssignmentContext).forEach(([o,i])=>{(i===e||this.getCaseIdFromContext(o)===e)&&n.push(o)}),n}static getMessageTypeForBanner(e){return e.endsWith("-error")||e==="stale-assignment"?this.ERROR_TYPE:e==="stale-data"?this.STALE_DATA_TYPE:e}static clearCurrentBanner(e,r){dt({category:this.PAGE_CATEGORY,context:e,type:this.getMessageTypeForBanner(r)})}static getStaleBannerDetails(e){return e?{bannerType:"stale-assignment",messageType:this.STALE_ASSIGNMENT_TYPE,message:this.getLocalizedMessage(this.STALE_ASSIGNMENT_MESSAGE)}:{bannerType:"stale-data",messageType:this.STALE_DATA_TYPE,message:this.getLocalizedMessage(this.STALE_DATA_MESSAGE)}}static isLocalActionContext(e){return e.includes(d.MODAL)||oe(d.CASE_INFO.IS_LOCAL_ACTION,"",e)===!0}static isAssignmentContext(e){return e.includes(d.WORKAREA)||e.includes(d.MODAL)}static restoreCollaboratorsFromContext(e,r){if(this.editorStateByCaseId[e])return;let n=[r,qe(r)],o;for(let a of n)if(o=oe(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",a),Array.isArray(o))break;if(!Array.isArray(o))return;let i=v.getOperatorIdentifier(),s={};o.forEach(a=>{if(!bue(a)||a.ID===i)return;let c=this.normalizeInteractionState(a.state);this.DEPARTURE_STATES.has(c)?delete s[a.ID]:s[a.ID]=c}),this.editorStateByCaseId[e]=s}static respondToCollaboratorViewOpen(e,r,n,o){if(this.DEPARTURE_STATES.has(o)){this.respondedToViewOpenByCaseId[e]?.delete(r);return}if(n!==this.VIEW_OPEN&&o!=="viewing")return;let i=this.respondedToViewOpenByCaseId[e]??new Set;if(this.respondedToViewOpenByCaseId[e]=i,i.has(r))return;let s=this.localInteractionStateByCaseId[e];if(!s)return;i.add(r);let a=s===this.EDITING_STATE?this.EDIT_OPEN:this.VIEW_OPEN;this.publishCaseEvent(a,e)}static updateStaleState(e,r,n){if(!this.isLaunchpadRuntime())return;let o=n?this.assignmentIdByContext[e]===n:!1,i=!this.isLocalActionContext(e)&&o&&(r==="submitted"||r==="stage_changed");if(Pu(e)&&!i)return;let{bannerType:s,messageType:a,message:c}=this.getStaleBannerDetails(i),l=this.collaborationBannerByContext[e];l!==s&&(l&&this.clearCurrentBanner(e,l),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:a,message:c}]}),this.collaborationBannerByContext[e]=s,i?(HT(e,!0),this.hideAssignmentActions(e)):HT(e,!1))}static hideAssignmentActions(e){if(!this.isLaunchpadRuntime()||!W(e))return;let r=oe(d.CASE_INFO.ACTION_BUTTONS,"",e),n=Array.isArray(r?.main)?r.main:[],o=Array.isArray(r?.secondary)?r.secondary:[],i=s=>{if(!s)return!1;let a=typeof s.actionID=="string"?s.actionID.toLowerCase():"",c=typeof s.jsAction=="string"?s.jsAction.toLowerCase():"";return a==="cancel"||c==="cancelassignment"};T({type:bt,payload:{context:e,reference:d.CASE_INFO.ACTION_BUTTONS,value:{main:n.filter(s=>i(s)),secondary:o.filter(s=>i(s))}}})}static isAssignmentStale(e){return Pu(e)}static isContextStale(e){return SE(e)}static getMatchingPendingAction(e,r){let n=typeof r=="string"?{state:r}:r,o=this.assignmentIdByContext[e];if(n&&(!n.assignmentId||n.assignmentId===o))return n}static refreshCollaborationBanner(e,r,n){if(!this.isLaunchpadRuntime())return;let o=this.getMatchingPendingAction(e,n);if(o){let i=this.collaborationBannerByContext[e];if(i==="stale-data"||i==="stale-assignment")return;let s=o.state==="submitted"?"submitted-error":"saved-error";if(this.collaborationBannerByContext[e]!==s){let a=this.ACTION_STATE_MESSAGES[o.state];a&&this.showActionBanner(e,this.getLocalizedMessage(a),o.state)}return}this.updateCollaborationBanner(e,r)}static getRemoteEditorCount(e){let r=this.editorStateByCaseId[e]??{};return Object.values(r).filter(n=>n===this.EDITING_STATE).length}static clearPendingActionStates(e){delete this.pendingActionStateByCaseId[e]}static isCaseStillLoaded(e){let r=this.caseContextById[e];return r?oe(d.CASE_INFO.CASE_INFO_ID,"",r)===e:!1}static updateCollaborationBanner(e,r){let n=this.collaborationBannerByContext[e];this.isAssignmentStale(e)||n==="stale-data"||(r>0?((n==="saved-error"||n==="submitted-error")&&dt({category:this.PAGE_CATEGORY,context:e,type:this.ERROR_TYPE}),n===this.INFO_TYPE&&dt({category:this.PAGE_CATEGORY,context:e,type:this.INFO_TYPE}),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.WARNING_TYPE,message:this.getLocalizedMessage(this.EDIT_WARNING_MESSAGE)}]}),this.collaborationBannerByContext[e]=this.WARNING_TYPE):(n===this.WARNING_TYPE||n==="saved-error"||n==="submitted-error")&&(dt({category:this.PAGE_CATEGORY,context:e,type:n===this.WARNING_TYPE?this.WARNING_TYPE:this.ERROR_TYPE}),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.INFO_TYPE,message:this.getLocalizedMessage(this.NO_EDITORS_INFO_MESSAGE),subType:this.NO_EDITORS_INFO_SUBTYPE,dismissible:!0,context:e}]}),this.collaborationBannerByContext[e]=this.INFO_TYPE))}static clearCollaborationBanner(e){let r=this.collaborationBannerByContext[e];r&&(this.clearCurrentBanner(e,r),xj(e),delete this.collaborationBannerByContext[e])}static showActionBanner(e,r,n){let o=this.collaborationBannerByContext[e];o&&this.clearCurrentBanner(e,o),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.ERROR_TYPE,message:r}]}),this.collaborationBannerByContext[e]=n==="submitted"?"submitted-error":"saved-error"}static handleLocalSubmit=e=>{let r=e?.caseID;if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentId||(e.context?oe(d.CASE_INFO.ASSIGNMENT_ID,"",e.context):void 0),o=e.isModalAction===!0&&e.isModalLaunchedFromPrimaryValue===!0,i=e.isLocalAction===!0||o;i||(this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r]=!0),this.publishCaseEvent(i?this.EDIT_SAVE:this.EDIT_SUBMIT,r,n)};static handleLocalSave=e=>{let r=e?.caseID||(e?.context?oe(d.CASE_INFO.CASE_INFO_ID,"",e.context):"");if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentID;this.publishCaseEvent(this.EDIT_SAVE,r,n)};static handleLocalCancel=e=>{e?.caseID&&(this.localInteractionStateByCaseId[e.caseID]="viewing",this.pendingSaveCaseIds.add(e.caseID),this.clearPendingActionStates(e.caseID),this.publishCancelTransition(e.caseID))};static publishCancelTransition(e){if(this.cancelTransitionCaseIds.has(e)){this.cancelTransitionCaseIds.delete(e);return}this.cancelTransitionCaseIds.add(e),setTimeout(()=>this.cancelTransitionCaseIds.delete(e),0),this.publishCaseEvent(this.EDIT_CANCEL,e)}static handleCaseEditClose=e=>{e&&(this.localInteractionStateByCaseId[e]="viewing",this.pendingSaveCaseIds.add(e),this.publishCancelTransition(e))};static handleAssignmentLoad=e=>{let{caseKey:r,actionInContext:n}=e??{};if(!n||!this.isAssignmentContext(n))return;let o=this.resolveCaseIdForAssignmentContext(r,n);if(!o)return;this.caseCollabSubIds[o]||this.subscribeToCollaborators(o,n),this.pendingSaveCaseIds.delete(o),this.restoreCollaboratorsFromContext(o,n);let i=this.getRemoteEditorCount(o);this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o]&&(delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o],i=0);let s=this.assignmentContextsByCaseId[o]??(this.assignmentContextsByCaseId[o]=[]);s.includes(n)||s.push(n),this.caseIdByAssignmentContext[n]=o;let a=e.assignmentID;a&&(this.assignmentIdByContext[n]=a),this.clearCollaborationBanner(n),this.refreshCollaborationBanner(n,i,this.pendingActionStateByCaseId[o])};static closeAssignmentContext(e){this.clearCollaborationBanner(e);let r=this.caseIdByAssignmentContext[e];if(delete this.caseIdByAssignmentContext[e],delete this.assignmentIdByContext[e],!r)return;let n=this.assignmentContextsByCaseId[r];if(!n)return;let o=n.indexOf(e);o!==-1&&n.splice(o,1),n.length===0&&delete this.assignmentContextsByCaseId[r]}static handleAssignmentUnload=e=>{let r=e?.actionInContext;r&&this.closeAssignmentContext(r)};static subscribeToCollaborators(e,r){let n=Tt.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},o=>this.handleCaseCollaboratorsUpdate(e,r,o));this.caseCollabSubIds[e]=n,this.caseContextById[e]=r}static unsubscribeToCollaborators(e){Tt.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e];let r=this.caseContextById[e];r&&(this.clearCollaborationBanner(r),delete this.caseContextById[e]);let n=this.assignmentContextsByCaseId[e];n&&n.slice().forEach(o=>this.closeAssignmentContext(o)),delete this.editorStateByCaseId[e],delete this.localInteractionStateByCaseId[e],delete this.respondedToViewOpenByCaseId[e],delete this.pendingActionStateByCaseId[e],this.pendingSaveCaseIds.delete(e),this.cancelTransitionCaseIds.delete(e),delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[e]}static publishCaseEvent(e,r,n){Tt.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:r}},message:n?{state:e,assignmentId:n}:e})}static handleCaseLoadEvent(e){let{caseId:r,context:n}=e,o=!this.openCaseViewByCaseId.has(r);this.openCaseViewByCaseId.add(r);let i=this.caseCollabSubIds[r];o&&i&&Tt.unsubscribe(i),(!i||o)&&this.subscribeToCollaborators(r,n),this.restoreCollaboratorsFromContext(r,n),this.localInteractionStateByCaseId[r]??="viewing",this.publishCaseEvent(this.VIEW_OPEN,r)}static shouldKeepCaseSubscriptionOnUnload(e){return this.pendingSaveCaseIds.has(e)||(this.assignmentContextsByCaseId[e]??[]).length>0||this.isCaseStillLoaded(e)}static handleCaseUnloadEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),!this.shouldKeepCaseSubscriptionOnUnload(r)&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static handleCaseClosedEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),r&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static getCaseEventCallback(e,r){switch(e){case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN:return n=>{this.cancelTransitionCaseIds.delete(n),this.localInteractionStateByCaseId[n]=this.EDITING_STATE,this.publishCaseEvent(r,n)};case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD:return n=>this.handleCaseLoadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD:return n=>this.handleCaseUnloadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED:return n=>this.handleCaseClosedEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE:return n=>this.handleCaseEditClose(n);default:throw new Error(`Unhandled eventKey: ${e}`)}}static subscribeToEvent(e,r,n){let o=this.getCaseEventCallback(e,r);$.subscribe(e,o,n)}static unsubscribeFromEvent(e,r){$.unsubscribe(e,r)}static subscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,this.VIEW_CLOSE,"case_view_closed"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CANCEL,"case_edit_close"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,this.handleLocalSubmit,"case_collab_submit"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,this.handleLocalSave,"case_collab_save"),$.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,this.handleLocalCancel,"case_collab_cancel"),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,this.handleAssignmentLoad,"case_collab_assignment_load"),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,this.handleAssignmentUnload,"case_collab_assignment_unload"))}static unsubscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,"case_view_closed"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,"case_collab_submit"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,"case_collab_save"),$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,"case_collab_cancel"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,"case_collab_assignment_load"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,"case_collab_assignment_unload"))}},Ss=I0;var b0=class t{broadcastChannel;callback;isReverseCoexistenceCase;broadcastEventToIframe;isDirtyDialogActive;onCreateCallback;openAssignmentParams;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}getUniqueId=()=>{let e=Reflect.get(globalThis,"uniqueId");return typeof e=="number"?e:void 0};setUniqueId=()=>{Reflect.set(globalThis,"uniqueId",new Date().getTime())};initBroadcastChannel=()=>{typeof globalThis.BroadcastChannel=="function"&&(this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{let{uniqueId:r}=e.data;if(r===this.getUniqueId())switch(e.data.action){case t.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case t.LOAD_PREVIEW:{this.loadPreview(e);break}case t.UPDATE_COEXISTENCE_DRILLDOWN_CASE:{this.updateCoexistenceDrilldownCase(e);break}case t.OPEN_ASSIGNMENT_ACTION:{this.openAssignment(e);break}case t.GET_NEXT_WORK_ACTION:{this.getNextWork(e);break}case t.OPEN_WORK_BY_HANDLE:{this.openWorkByHandle(e);break}case t.CLOSE_CONTAINER_ACTION:{this.closeContainer(e);break}case t.CANCEL_CASE:{this.handleCaseCancel();break}case t.CREATE_WORK:{this.createWork(e);break}default:break}})};displayDirtyPopup=e=>{if(this.broadcastEventToIframe=e.data.fromInfinity??!1,!this.isDirtyDialogActive)if(e.data.isFormDirty){if(this.shouldBypassDirtyPopupForStaleAssignment()){this.callback?.call(this);return}$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0}else this.callback?.call(this)};shouldBypassDirtyPopupForStaleAssignment=()=>{let e=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,r=Ar(e),n=r?se(r):"";if(!n)return!1;let o=pe(n);return[n,o].filter(s=>typeof s=="string"&&s.length>0).some(s=>Ss.isAssignmentStale(s))};handleCaseCancel=()=>{let e=Ke(E.APP.APP),r=e[e.length-1],n=se(r),o=W(n)?.caseInfo?.ID;if(o&&n&&ct({}).getPConnect().getActionsApi().getDescendants(o,n),$r(n)){let i=Oa(n);i&&ct({}).getPConnect().getActionsApi().getDescendants(o,i)}};loadPreview=e=>{let{pyID:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&ct({}).getPConnect().getActionsApi().showCasePreview(r,{caseClassName:n})};navigateToDefaultPage=()=>{let e=P.getDefaultQualifiedName("Data-Portal"),r=P.getDefaultQualifiedName("pyHome"),n=ct({isRoot:!0}),o=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages,i;Array.isArray(o)&&o[0]&&(i=o[0]);let s=i?.pyClassName||e,a=i?.pyRuleName||r;n.getPConnect().getActionsApi().showPage(a,s)};closeContainer=e=>{let{uniqueId:r}=e.data;r===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{let{key:r,caseClassName:n,actionApi:o,caseLabel:i,uniqueId:s}=e.data;if(s!==this.getUniqueId())return;let a=o;o===t.OPEN_WORK_ITEM&&(a=t.OPEN_WORK_BY_HANDLE),_e.updateSemanticURLAndDocumentTitle({key:r,caseClassName:n,actionName:a,name:i}),ct({}).getPConnect().getActionsApi().updateRecents(n,r.substring(r.lastIndexOf(" ")+1),i,r)};openAssignment=e=>{let{pzInsKey:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(r&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=r:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),r&&n&&ct({}).getPConnect().getActionsApi().openAssignment(r,n,{containerName:E.PRIMARY,context:E.APP.APP})),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{let{uniqueId:r}=e.data;if(r===this.getUniqueId()){let n=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(n)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{let{key:r,caseClassName:n,uniqueId:o}=e.data;if(o===this.getUniqueId()){let i=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(i)}}).getPConnect().getActionsApi().openWorkByHandle(r,n)}};createWork=e=>{let{strClassName:r,uniqueId:n,strFlowParams:o,caseInitProperties:i}=e.data;if(n===this.getUniqueId()){let s=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,a=ct({meta:{},options:{context:Ar(s)}}),c=i+o,l=new URLSearchParams(c.slice(1)),u=this.setStartingFields(l);a.getPConnect().getActionsApi().createWork(r,{startingFields:u})}};setStartingFields=e=>{let r={};return e.forEach((n,o)=>{o&&(r[o]=n)}),r};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{$.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),$.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{this.broadcastChannel===null&&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:t.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:t.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,r,n)=>{this.broadcastChannel===null&&this.init(!1),this.broadcastChannel?.postMessage({action:t.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=r,this.openAssignmentParams=n}},Jd=new b0;var Co={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},T0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(tS)},oI=t=>t.initiatingContext||t.context,Ua=async(t,e)=>It(t)?{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1}:{...await vt(t,e),dirtyCheckPerformed:!0},v0=t=>{if(B.shouldUseUnifiedHandling())return t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1;let e=g.getIn(t,[d.DATA,d.CASE_INFO.CASE_INFO]);return Yt(e)&&mu(v.getOperatorIdentifier(),e)},_B=(t,e)=>{let r=v0(t),{skipBrowserSemanticUrlUpdate:n=!1,isTraditionalUICase:o}=e,i=o&&!Qs();g.setIn(t,["directUrlUpdation"],(!r||i)&&!n)},IB=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,bB=(t,e,r)=>!en(t)&&It(e)&&(r??!0),TB=t=>mr(t)&&v.isOpenCasePageAfterCreateInMultiDocEnabled();var Tue="Error occurred during ajax call at createWork Epic : ",vB=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return(t.isTraditionalUICase||!s&&t.renderInline===!0&&o!==it.FORM)&&(s=P.getDefaultQualifiedName("pyDetails")),q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(Tue,n))};var ja=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,t)},Yd=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},RB=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,t)};var vue=(t,e)=>B.isExternalCaseType(t)&&e?e:zo(),Rue=t=>{let e=0,r=[],n={},o,i=!1,s=!1,a="",c="";return t.pipe(ee(Dw),gr(100),O(l=>({actionMgrID:e}=l.payload,l.payload)),z(l=>{let{context:u}=l;if(o=l.class,s=!1,a="",c="",B.isExternalCaseType(o)&&(dt({context:u,stateObj:W(u),clearContextMessages:!0}),!xr(u))){let f={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,f),gc()}let p=T0(l),m=Z(p,u);return i=Dn(o),q(Ua(m,{loadingContext:u})).pipe(z(({continueExecution:f,removeActionPayload:h,dirtyCheckPerformed:S})=>f?(s=S,l.isTraditionalUICase=i,vB(l,{removeActionPayload:h})):(w.rejectActionByID(e),Et)))}),z(async l=>{if(l?.type===Te)return l.payload.context=vue(o,l.payload.context),r.push(ue(l)),r;let{actionInPayload:u,response:p,headers:m,removeActionPayload:f}=l,h=oI(u),S=B.isExternalCaseType(u.class),A=v0(p);(u.renderInline||v.getDefaultCasePage()||i)&&(A=!1),g.setIn(p.data,E.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);let C=T0({...u,isInCreateStage:A}),I=Z(C,u.context),_=st(I,C,u.context),{openCaseViewAfterCreate:N}=u;if(!s&&bB(C,I,N)){let{continueExecution:Ce}=await vt(I,{loadingContext:u.context});if(!Ce)return w.rejectActionByID(e),r}let x=u?.openCaseViewAfterCreate??!0,H=Le(p);if(!x&&!A&&!TB(I)){let Ce=aT(p),{businessID:Ye,caseType:Oe,resolvedURL:ft,caseTypeName:Qt}=ZS(p);return n={caseId:Ye,label:Qt,href:ft},ja(n),Yd({caseId:Ye,assignmentId:Ce,caseType:Oe,ID:Bt(H),initiatingContext:h}),S&&cT(u),r}let G=String(er(Bt(H))),re=At("createWork",{caseClassName:On(H)});re=re.replace(/{.+?}/,G),H.semanticURL=re,pt.setComponentCache(G,Ge.addDebugHeaders(u.debugInfo)),_B(H,u);let j={acName:I,context:_},ne=wn(_);await Pe(H,u,j);let be=IB(H),he={target:I,context:_,initiatingContext:h,containerItemID:_,headers:m,semanticURL:re,isInCreateStage:A,isMinimizable:A,caseViewMode:be,currentCaseViewMode:ne,assignmentContext:g.getIn(H,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(H,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.CASE,openCaseViewAfterCreate:u.openCaseViewAfterCreate,modalOptions:u.modalOptions,debugInfo:u.debugInfo};xn(he,H);let Me=$e(H,he);i&&(Me.data.caseInfo.content.coexistenceAction="openAssignment"),B.setTraditionalGadgetId(Me.data);let Fe=Ht(I,Me);return tn(Fe)&&ri(r,{removeActionPayload:f,target:I}),S&&cT(u),r.push(Fe),dr(H,he),RB({caseId:G}),a=be,c=Bt(H),r}),O(()=>{let l=Qs(),u=Yt(g.getIn(r[0]?.payload,"data.caseInfo"));return i&&l&&u?Jd.postCreateCaseMessage(r[0]?.payload?.nextAssignmentInfo?.ID,gn,r):gn(r),a===E.CASE_VIEW_MODE.PERFORM&&Ki(c),mt(r,e),n={},r=[],a="",c="",r}))},PB=Rue;var{RESOURCE_TYPES:xB}=E,DB=t=>{let{isModalAction:e,viewType:r,isInCreateStage:n,isCaseWideAction:o}=t;return e&&n&&!o?it.PAGE:r||it.FORM},wB=t=>{let{isCaseWideAction:e,caseTypeID:r}=t;return B.shouldUseUnifiedHandling()?e||B.isObjectCaseType(r)?WI:qI:e?WI:qI},iI=(t,e)=>{let{containerItemID:r,context:n,actionMgrID:o,isInCreateStage:i,isModalAction:s}=e;if(i&&s){let a=Lr(r),c=Z(a,n);t.push(V(rr,{containerItemID:r,target:c,actionMgrID:o}))}},za=(t,e)=>{let{containerItemID:r,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}=e,s=pe(r),a=`${s?.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.MODAL}`;t.push(V(Qe,{containerItemID:r,context:s,target:a,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}))},Pue=(t,e)=>{let r=t?.assignmentID,o=(e?.data?.caseInfo?.assignments??[])[0]?.ID;return r!==o},R0=t=>oe(".openCaseViewAfterCreate",d.CONTEXT_DATA,t)??!0,Nue=(t,e)=>mr(t)&&(R0(e)||v.isOpenCasePageAfterCreateInMultiDocEnabled()),Oue=t=>t.initiatingContext||oe(".initiatingContext",d.CONTEXT_DATA,t?.context),xue=async(t,{translatedDXAPIResponse:e,actionInPayload:r},n,o,i)=>{let{caseID:s}=r,a=WU(e),c=o?Yn(e):On(e),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:m,directUrlUpdation:f,key:h,flowName:S,resourceType:A}=n,C=te(r?.context),I=We(C,r?.context)?.acTertiary,_=Oue(r);Object.assign(i,{caseId:s,assignmentId:a,caseType:c,isSubmitFromBlendedUI:I,..._&&{initiatingContext:_}}),za(t,{...r,skipReleaseLockRequest:!0});let N=`${r?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,x=st(N,ge.PRIMARY),H=Ge.getCoreHeadersFromContext(r.context)||!1,G=$e(e,{target:N,context:x,containerItemID:x,caseViewMode:l,headers:u,semanticURL:p,key:h,flowName:S,resourceType:A,directUrlUpdation:f,debugInfo:H&&H.debugInfo&&{debugId:H.debugInfo[d.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(It(N)){let re=W(x),ne=`You will lose unsaved changes for ${KU({data:re})}. Do you want to continue?`;if(R0(r.context)){let{continueExecution:be}=await vt(N,{dirtyMessage:ne});if(!be)return n.directUrlUpdation=!1,w.rejectActionByID(m),gc();G.currentCaseViewMode=wn(G?.context),t.push(V(kn,G)),r.__deferCaseActionsPayload=G}else return t}else if(Nue(N,r.context))t.push(V(Pt,G));else return t;return e.directUrlUpdation=f,e.semanticURL=p,await Pe(e,{...G,acName:N},{acName:N,context:x}),t},Due=(t,e,r)=>{let n=/^app\/preview_[0-9]*/g,{containerItemID:o,caseID:i}=e;if(o&&n.test(o)&&$r(o)){let{caseClassName:s}=r,a=qe(o),c=pe(a);t.push(V(Pm,{containerItemID:a,context:c,container:ge.PREVIEW,containerName:ge.PREVIEW,caseId:i,viewName:E.PREVIEW_VIEW_NAME,caseClassName:s,updateData:!0}))}},wue=(t,e,r)=>{let{containerItemID:n}=e,o=pe(n),{data:i,caseViewMode:s}=r;if(o&&$r(n)){let a=Po(o),c={data:i,caseViewMode:s,context:a};g.setIn(c.data,["context_data","caseViewMode"],s),t.push({type:pn,payload:{context:a}});let l=B.getPropertiesToReplace(n);t.push(V(Re,c,{propertiesToReplace:l})),e.shouldUpdateCaseActionsInParentContext=!0,e.__deferCaseActionsPayload=e}},$B=(t,e)=>{let{isCaseWideAction:r,assignmentID:n,actionID:o}=e;return{isCaseWideAction:r,caseID:Bt(t),assignmentID:r?null:n,actionID:o||null}},sI=(t,{isModalAction:e,target:r,transientItemID:n})=>{if(e){let i=t.find(({type:s})=>s===et);i?.payload&&(r=i.payload.target,n=i.payload.containerItemID)}let o=$w({target:r,containerItemID:n});o.payload.transientItems.length&&t.push(o)},$ue=(t,e,r)=>{if(e.isProcessAction&&(za(r,{...e,skipReleaseLockRequest:!0}),t)){let n=`${e?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,o=st(n,ge.PRIMARY),i={insKey:t.ID,className:t.content.classID,context:o,acTargetName:d.PRIMARY,isChild:!0},s={type:Go,payload:{...i}};r.push(s)}},MB=t=>/^app\/preview_[0-9]*/g.test(t),pl=(t,e)=>{let r=/^app\/primary_[0-9]*/g,n=qe(t);return MB(t)?!1:n===e?!0:r.test(n)},aI=t=>{if(!R0(t.context)){let e,r=t?.caseTypeID,n=t?.caseTypeName;return t.businessID?e=t.businessID:e=t.workID,{caseID:e,caseTypeID:r,caseTypeName:n}}return{}},Mue=(t,e)=>{let r=te(t);return wt(r,e)},kue=(t,e=!1,r=!1)=>{let o=w.getNextActionMgrId(),i=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",t),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",t);return{ID:i,actionID:s,context:t,caseWideAction:e,contextData:r,options:{actionMgrID:o}}},NB=(t,e,r,n)=>{let{data:o,caseViewMode:i}=e,s={data:o,caseViewMode:i,context:r};if(g.setIn(s.data,["context_data","caseViewMode"],i),t.push({type:pn,payload:{context:r}}),n){let c={data:Ve.transformObjectToCase(o),caseViewMode:i,context:r};t.push(V(Re,c))}t.push(V(Re,s))},Lue=t=>{if(!t?.isCaseWideAction)return!1;let e=t.context;return!!((e?qe(e):void 0)?.includes(ge.MODAL)&&e?.includes(ge.MODAL))},Uue=async(t,e,r,n,o,i,s,a,c,l)=>{let{headers:u}=c,p=l?d.OBJECT_INFO.OBJECT_INFO:d.CASE_INFO.CASE_INFO,m=Lue(n);if(t)if(m){za(o,{...n,skipReleaseLockRequest:!0}),e.doDeleteCaseSummary=n.doDeleteCaseSummary,e.deleteAssignmentSpecificResources=!1;let f=e?.data?.[p]?.content;(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(e.root=void 0,delete e.data?.caseMessages);let{data:h,caseViewMode:S}=e,A={data:h,caseViewMode:S,context:r};A?.data&&g.setIn(A.data,["context_data","caseViewMode"],S),o.push(V(Re,A))}else{if(typeof c?.response?.uiResources?.root!="object"){let ne=(Oe,ft)=>{let Qt=Oe.findIndex(yr=>yr.ID===ft);if(Qt!==-1){let[yr]=Oe.splice(Qt,1);Oe.unshift(yr)}return Oe},be=W(t),he=c?.response?.data?.caseInfo?.assignments??[],Me=be?.caseInfo?.assignments??[],Fe=wn(t)===d.PERFORM_MODE,Ce=he[0]?.ID!==Me[0]?.ID,Ye=he.length>0&&Me.length>0;Fe&&Ce&&Ye&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=ne(he,Me[0]?.ID))}let f=It(te(t)),h=!1,S=te(r),A=ut(S),C=se(S);C&&A?.items?.[C]?.key===c?.actionInPayload?.caseID&&(h=!0),za(o,{...n,skipReleaseLockRequest:!0});let I=Lr(t),_={target:te(t),containerItemID:t,context:t,containerName:I};e.doDeleteCaseSummary=n.doDeleteCaseSummary;let N=Po(r),x=W(N),H=W(n.context),G=x[p]?.ID,re=H[p]?.ID,j=W(t)?.caseInfo?.ID;if(f&&G===re||!f&&(s===""||_.containerItemID.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&j===e.data?.caseInfo?.ID||!i&&e.root&&Object.keys(e.root).length===0&&j===e.data?.caseInfo?.ID))(e?.data[p]?.content===void 0||e.data[p].content!==void 0&&typeof e.data[p].content=="object"&&Object.keys(e.data[p].content).length===0)&&(e.root=void 0,delete e.data?.caseMessages),t.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&Pue(n,a)&&(e.flowName=" ",e.clearView=!0,e.root?.config?.name!==d.PY_CONFIRM&&(e.root=void 0)),t.includes(d.ACTIONAREA)?o.push(V(Re,{...e,key:s,resourceType:"",..._})):We(_.target,_.containerItemID)?.resourceType!==xB.PAGE&&j===e.data?.caseInfo?.ID&&o.push(V(tr,{...e,key:s,resourceType:"",..._}));else if(i){let ne=te(t),be=wt(ne,s);if(be)_.target=ne,_.context=be,_.containerItemID=be,o.push(V(tr,{...e,key:s,resourceType:"",..._}));else{let he=Ke(r)[0];if(n.target=he,n.context=st(he,d.WORKAREA,r),n?.context){n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let Me=n.containerItemID;o.push(V(rr,{parentContainerTarget:he,containerItemID:Me}))}}}if(n.target=te(t),n.containerName=Lr(t),n.context=t,n.containerItemID=t,n.shouldUpdateCaseActionsInParentContext=!0,g.setIn(e,"acName",_.target),await Pe(a,e),n.__deferCaseActionsPayload=n,h&&(r.includes(d.WORKAREA)&&$r(r)&&(r=Po(r)),NB(o,e,r,l)),!i&&e.caseViewMode===d.PERFORM_MODE){let ne=Mue(t,s),be={data:{[p]:{headers:u}},context:ne};o.push(V(Re,be)),o.push(oa(kue(ne)))}}else{za(o,n);let f=!1,h=te(r),S=ut(h),A=se(h);if(A&&S?.items?.[A]?.key===c?.actionInPayload?.caseID&&(f=!0),i){let C=Ke(r)[0];n.target=C,n.context=st(C,d.WORKAREA,r),n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let I=n.containerItemID;o.push(V(rr,{parentContainerTarget:C,containerItemID:I}))}f&&NB(o,e,r,l)}},kB=(t,e,r,n,o)=>{let i,s=te(e);mr(s)?i=wt(s,r.data?.caseInfo?.ID):i=se(s);let a=!0;if(t&&i){let c=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",i),l=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",i);if(c){let p=r?.data?.caseInfo?.assignments?.find(m=>m.ID===l)?.actions;p&&!p.some(m=>m?.ID===c)&&(a=!1)}}return n&&t&&a&&Wi(null,d.CASE_VIEW_MODE_PROP,i)===d.PERFORM_MODE&&o},jue=async(t,e,r,n,o,i,s)=>{let a=i?"objectInfo":"caseInfo";$ue(t.data[a].parentCaseInfo,e,o);let c=t?.data[a]?.parentCaseInfo?.ID;if(c){let l=te(e?.context),u=We(l,e?.context)?.parentContext,p=te(u);e?.isProcessAction&&ll(p,c)&&KD(u,t?.data[a]?.lastUpdateTime)}r.resourceType=xB.CASE,r.directUrlUpdation=!0,e.isProcessAction||await xue(o,{translatedDXAPIResponse:n,actionInPayload:e},r,i,s)},LB=async(t,e,r)=>{let n={assignmentID:t?.data?.caseInfo?.assignments[0]?.ID,className:t?.data?.caseInfo?.content?.classID,containerName:ge.PRIMARY,targetContainerName:ge.PRIMARY,viewType:it.PAGE,isLastStepInCreateStage:!0,context:r},o={type:$i,payload:{...n}};e.push(o)},P0=async(t,e,r,n,o)=>{t.doDeleteCaseSummary=e.doDeleteCaseSummary,t.caseViewMode===d.REVIEW_MODE&&(t.flowName=" ",t.clearView=!0);let{containerItemID:i}=e;It(te(i))||g.setIn(t.data,["context_data","caseViewMode"],t.caseViewMode);let s=B.getPropertiesToReplace(i);o.push(V(tr,{...t,...n,propertiesToReplace:s})),g.setIn(t,"acName",n.target),await Pe(r,t),wue(o,e,t)},cI=async(t,e,r,n,o,i,s,a,c,l={})=>{let{isCaseWideAction:u,isInCreateStage:p,containerItemID:m}=t,f=qe(t.context),h=nE(o,c),S=c?Yn(o):On(o),A=p&&!h&&!u,C=Ke(f)[0],I=C?se(C):f,_=Lr(m),N=pe(m),x=Object.freeze({target:t.target,containerItemID:m,context:N,containerName:_});A&&!MB(t.context)?await jue(a,t,e,o,i,c,l):pl(t.context,I)?await Uue(I,e,f,t,i,r,n,o,s,c):(u||c)&&!pl(t.context,I)?(za(i,t),Due(i,t,{caseClassName:S})):await P0(e,t,o,x,i)},lI=(t,e,r)=>{let{isModalAction:n,isCaseWideAction:o,caseID:i,assignmentID:s,isLocalAction:a}=e,c=pl(e.context,r),l=t?.data?.caseInfo?.stages,u=t?.data?.caseInfo?.stageID;XS({caseID:i,context:e.context,assignmentId:s,isLocalAction:!!a,isModalAction:n,isModalLaunchedFromPrimaryValue:c,isCaseWideAction:o,stages:l,stageID:u})},UB=(t,e)=>{let{assignmentID:r}=e;return t?.data?.caseInfo?.assignments?.some(n=>n.ID===r&&n?.canPerform==="true")},uI=t=>{let e=t?.payload?.err?.errorDetails,r=t?.payload?.context;e?.forEach(n=>{n[d.ERROR_FIELD_IN_PAGE]=n[d.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`);let o=n[d.ERROR_FIELD_IN_PAGE].slice(1),i=n[d.ERROR_IN_PAGE_IDENTIFIER],s=i.startsWith(".")?i.slice(1):i;if(s){let a=o?`caseInfo.content.${o}`:"caseInfo.content";a=d.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));let c=Qn(s,a,d.PROPERTY),l={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue};Ie.mutateField(r,a,c[c.length-1],{messages:[l],type:E.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:i})}})},OB=t=>{let e=W("app")?.pyPortal?.pyPrimaryNavPages,r=Array.isArray(e)?e[0]:null;return r?(rn.clearChangedProperties(t),[{type:Pr,payload:{className:r.pyClassName,containerName:d.PRIMARY,context:d.APP.APP,pageReference:"pyPortal",viewName:r.pyRuleName,skipSemanticUrl:""}}]):[]},jB=async t=>{let{target:e,containerItemID:r,context:n}=t,o=Ar("app/primary"),i=We(e,r)?.parentContext,s=!!e&&mr(e),a=mr("app/primary");if(s&&i!==d.APP.APP){if(await ta(r,{skipDirtyCheck:!0}),Hd(e).length===0)return OB(n)}else if(o&&a&&!i)await ta(o,{skipDirtyCheck:!0,eventName:"Dismiss case"});else return OB(n);return[]};var N0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(Yo)},zB=t=>t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1,Zd=(t,e)=>{let r=zB(t),{skipBrowserSemanticUrlUpdate:n=!1}=e;g.setIn(t,["directUrlUpdation"],!r&&!n)},Qd=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,Xd=(t,e)=>{let r;return t.renderInline||v.getDefaultCasePage()?r=!1:r=zB(e),r},FB=(t,e)=>{B.isExternalObject(t.class)&&(t.containerItemID=t.context,za(e,t))},VB=(t,e)=>!t&&!e,BB=(t,e,r)=>!en(t)&&It(e)&&!B.isExternalObject(r),HB=(t,e,r)=>{if(tn(t)){let{removeActionPayload:n,target:o}=e;ri(r,{removeActionPayload:n,target:o})}},GB=t=>{B.isExternalObject(t.class)&&ja({content:Nr().getLocaleValue("Successfully submitted!","Assignment")})},qB=t=>{B.isExternalObject(t)&&Ve.setNeedsMapping(!1)};var O0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(Bs)};var zue="Error occurred during ajax call at createObject Epic : ",WB=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(zue,n))};var KB="CREATE_EXTERNAL_CASE";var Fue=t=>{let e=0,r=[],n=!1;return t.pipe(ee(KB),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=O0(i),c=Z(a,s);return n=!1,q(Ua(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,WB(i,{removeActionPayload:u})):(w.rejectActionByID(e),Et)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=zo(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=oI(s),p=Xd(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let m=O0({...s,isInCreateStage:p}),f=Z(m,s.context),h=st(f,m,s.context);if(!n&&!en(m)&&It(f)){let{continueExecution:H}=await vt(f,{loadingContext:s.context});if(!H)return w.rejectActionByID(e),r}let S=Le(a),A=At(uc,{caseClassName:On(S)});A=A.replace(/{.+?}/,String(er(Bt(S)))),S.semanticURL=A,Zd(S,s),await Pe(S,s,{acName:f,context:h});let I=Qd(S),_={target:f,context:h,initiatingContext:u,headers:c,semanticURL:A,caseViewMode:I,containerItemID:h,isInCreateStage:p,isMinimizable:p,assignmentContext:g.getIn(S,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(S,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalCaseCreationFlow:!0};xn(_,S);let N=$e(S,_),x=Ht(f,N);return tn(x)&&ri(r,{removeActionPayload:l,target:f}),r.push(x),pE(r),r}),O(()=>(gn(r),mt(r,e),r=[],r)))},JB=Fue;var{RESOURCE_TYPES:Vue}=E,Wh=(t,e={})=>{let{viewType:r,containerName:n,targetContainerName:o,isChild:i}=t,s=Ji(e);return RU(s)&&t?.stageID===s.stageID?it.PAGE:r||((sT(n)||sT(o))&&!i?it.FORM:it.PAGE)},YB=(t,e)=>{let r=Ji(t),n;v.getDefaultCasePage()?n=!1:n=Yt(r);let{isChild:o,containerName:i,isTraditionalUICase:s}=e,a=o&&n,c=n&&!e.isActionFromToDoList;return(a||c)&&!s&&!e.renderInline?d.MODAL:i||Lt(qn,e)},ZB=async(t,e,r)=>{let{semanticURL:n,containerItemID:o,isParallelAssignment:i,insKey:s}=e,{target:a,actionInPayload:c}=r,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=pe(o);await Pe({directUrlUpdation:!l,semanticURL:n},c,{acName:a,target:a,context:u}),t.push(V(rr,{containerItemID:o,target:a,isParallelAssignment:i,insKey:s,resourceType:Vue.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))},QB=(t,e)=>{let r=Ji(t),n=Bt(t),o=Yt(r),{skipBrowserSemanticUrlUpdate:i=!1,viewType:s,isTraditionalUICase:a}=e,c=a&&!Qs(),l=s===it.PAGE&&(!o||c)&&!i,{caseTypeID:u}=r;if(l){let p=At(Kt,{caseClassName:u}).replace(/{.+?}/,String(er(n)));t.semanticURL=p,t.directUrlUpdation=!0}},XB=t=>{let e=t?.headers??{};return t?.isRemote&&(e=we(e,t.remoteClassName)),e},Bue=(t,e,r,n,o)=>{Wh(t,e)===it.FORM?(r.caseViewMode=n||d.PERFORM_MODE,o.push(V(tr,r))):o.push(V(kn,r))},Hue=(t,e,r,n,o)=>{if(ri(t,{removeActionPayload:e,target:r}),pj(n.key,r))n.context=Ar(r),n.containerItemID=n.context,t.push(V(kn,n));else if((o?.isChild||o?.isRemote)&&o?.isMultiDoc){let i=te(o.context);n.target=i,n.context=o.context,n.containerItemID=o.context,t.push(V(kn,n))}else{let i=te(n.context),s=wt(i,n.key);s?(n.target=i,n.context=s,n.containerItemID=s,t.push(V(kn,n))):t.push(V(Pt,n))}},e8=(t,e,r,n,o,i,s)=>{It(e)&&jr(e)?Bue(n,o,t,i,r):Hue(r,s,e,t,n)},t8=(t,e)=>{t.acTertiary&&(e.data.caseInfo.isFirstAssignment=t.acTertiary)},r8=(t,e)=>{if(t=ae.getRemoteCaseClassBySourceClass(t)??t,ae.isRemoteCase(t)){let{RemoteClassName:r,RemoteSystemID:n,name:o}=ae.getRemoteCase(t);if(e.headers?.RemoteSystemID||w.setRemoteCaseHeaderByContext(e,n),ae.isTraditionalRemoteCase(t)||ae.getRemoteAppPlatformVersion(n)){e.assignmentID=e.assignments?.[0]?.ID;let i={className:t,name:o,action:pS,remoteClassName:r};w.setTraditionalRemoteCaseParams(e,i)}}},Gue=t=>{let{inlineViewType:e,caseTypeID:r,RedirectURL:n}=t;if(e&&e.toLowerCase().includes("remote"))return!1;let o=ae.getRemoteCaseClassBySourceClass(r)??r;return!ae.isRemoteCase(o)&&!!n},n8=(t,e,r)=>{if(!t||!e||!Gue(e)||!e.RedirectURL)return!1;try{let n=new URL(e.RedirectURL);if(n.protocol==="https:")return globalThis.open(n.href,"_blank","noopener,noreferrer"),w.resolveActionByID(r),!0}catch{}return!1},o8=(t,e,r,n)=>{if(It(t)&&$r(e)){let o=r?.data?.caseInfo?.assignments;if(Array.isArray(o)&&o.length>0){let i=qe(e);n.push(V(Re,{context:i,data:{caseInfo:{assignments:o}}},{propertiesToReplace:[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}]}))}}},i8=(t,e)=>{t&&(e.data.caseInfo.content.coexistenceAction="openAssignment")};var que="Error occurred during ajax call at openAssignment Epic : ",s8=({restUrl:t,reqType:e,requestHeaders:r,debugInfo:n,context:o,isGetNextWork:i,doNotMergeMessagesForStatusCode:s,mcpAction:a})=>{if(_t())return pr(a.actionName,{...a.payload,headers:r});let c=B.appendExcludeQueryParamToUrl(t);return k(c,{method:e,headers:{"if-match":r&&r.etag,...r,...n&&{...Ge.addDebugHeaders(n)}}},o,{doNotMergeHttpMessagesForStatusCode:i?s:""})},a8=(t,e)=>{let r=Wh(t),{headers:n,context:o,assignmentID:i,isGetNextWork:s,debugInfo:a,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:p,isLastStepInCreateStage:m}=t,f="404",h,S;s?{restApi:h,reqType:S}=U(KI,{viewType:r}):c?{restApi:h,reqType:S}=U(GI,{caseID:u,stageID:l}):{restApi:h,reqType:S}=U(qn,{assignmentID:i,viewType:r});let{removeActionPayload:A}=e,C=v.getDefaultCasePage(),I="",_=t.pageName;t.isTraditionalUICase&&(_=P.getDefaultQualifiedName("pyDetails")),C?I=`${h}?viewType=${r}&pageName=${C}`:_?I=`${h}?viewType=${r}&pageName=${_}`:I=`${h}?viewType=${r}`,p&&Object.keys(p).forEach(G=>{I+=`&${G}=${p[G]}`});let N=XB(t),x=qn;s?x=KI:c&&(x=GI);let H=G=>({actionName:x,payload:{queryPayload:{...p,assignmentID:i,caseID:u,stageID:l,viewType:r,params:{pageName:G}}}});return q(s8({restUrl:I,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(C||_)})).pipe(O(G=>v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT)&&!m?Yt(G.data.data.caseInfo)?G:(I=_?I.replaceAll(_,P.getDefaultQualifiedName("pyDetails")):I,v.setDefaultCasePage(P.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I}):G),z(G=>G?.isReloadWithDifferentViewTypeRequired?s8({restUrl:I,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(P.getDefaultQualifiedName("pyDetails"))}):ye(G)),O(G=>{let{key:re,flowName:j}=$T(i);return Ve.analyseResponse(G),{response:{...G.data,key:re,flowName:j},actionInPayload:t,viewType:r,removeActionPayload:A,headers:we({...n,...G.headers})}}),me(que,o))};var{RESOURCE_TYPES:Wue}=E,Kue=(t,e)=>{e!==void 0&&t.push({status:Number(e)})},Jue=(t,e)=>t&&String(t.canPerform)==="false"?d.REVIEW_MODE:e??d.PERFORM_MODE,c8=t=>{let e=v.getRuntime()==="Browser",r=0,n=[],o=[],i=!1,s=!1;return t.pipe(ee(Pa),O(a=>({actionMgrID:r}=a.payload,{...a.payload,...e?{insKey:a.payload.assignmentID}:{assignmentID:a.payload.assignmentID}})),z(a=>{i=a.isGetNextWork;let{context:c}=a,l;(a?.isChild||a?.isRemote)&&a?.isMultiDoc?l=it.FORM:l=Wh(a),a.viewType=l;let u=Lt(qn,a),p=Z(u,c),{activate:m,activateContainerActionPayload:f}=Zi(Wue.ASSIGNMENT,p,a);if(m&&!a.isParallelCall)return ye({type:nr,activateContainerActionPayload:f,actionInPayload:a});let h=se(p),S;return f?.isParallelAssignment?S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}):h?S=vt(p,{loadingContext:c}):S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}),q(S).pipe(z(({continueExecution:A,removeActionPayload:C})=>A?(s=Dn(a.className),a.isTraditionalUICase=s,v.isWSSPortal()&&(a.headers={...a.headers,[d.X_ORIGIN_CHANNEL]:"WSS"}),a8(a,{removeActionPayload:C})):(w.rejectActionByID(r),Et)))}),z(async a=>{if(a?.type===Te){if(i){let{payload:Ye}=a,{err:Oe}=Ye;Kue(o,Oe?.response?.status)}return n.push(ue(a)),n}let{type:c,actionInPayload:l,response:u,viewType:p,headers:m,removeActionPayload:f,activateContainerActionPayload:h}=a;if(u?.redirectInfo?.jsAction==="openStage"){let Ye=u?.redirectInfo?.stageID,Oe=Pa,ft=u?.data?.caseInfo?.ID;l.isOpenStage=!0,l.stageID=Ye,l.jsActionQueryParams=u?.redirectInfo?.jsActionQueryParams;let Qt={type:Oe,payload:{...l,caseID:ft,headers:m}};return n.push(Qt),n}if(n8(i,u?.data?.caseInfo,r))return n;let{context:S,caseViewMode:A,debugInfo:C}=l,I=u?.data?.caseInfo?.assignments?.find(Ye=>Ye.ID===l.assignmentID);l.caseViewMode=Jue(I,A);let _=u?.data?.caseInfo?.caseTypeID;s=Dn(_),l.isTraditionalUICase=s;let N=YB(u,l);s&&(N=l.containerName??N);let x=Z(N,S);if(c===nr)return await ZB(n,h,{actionInPayload:l,target:x}),n;let H=u?.data?.caseInfo?.content,G=u?.data?.caseInfo?.ID,re=u?.uiResources?.root?.config?.name,j=u?.uiResources?.root?.config?.context;H&&!H[P.getDefaultQualifiedName("pyViewName")]&&re&&l.viewType!=="page"&&(g.setIn(H,P.getDefaultQualifiedName("pyViewName"),re),g.setIn(H,P.getDefaultQualifiedName("pyViewContext"),j));let ne=Le(u);QB(ne,l);let be=st(x,N,S),he={...l.debugInfo,debugId:l.debugInfo?.debugId??Ge.getCoreHeadersFromContext(S)?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]};he.debugId&&pt.setComponentCache(G,Ge.addDebugHeaders(he)),await Pe(ne,l,{acName:x,target:x,context:be});let Fe={target:x,context:be,containerItemID:be,headers:m,parentContext:qe(l?.context),isMinimizable:Yt(g.getIn(ne,"data.caseInfo")),doDeleteCaseSummary:l.doDeleteCaseSummary,acTertiary:l.acTertiary,resourceType:E.ASSIGNMENT,debugInfo:C,shouldUpdateCaseActionsInParentContext:!0,caseID:G};xn(Fe,ne,{skipFlowNameUpdate:l?.caseViewMode===d.REVIEW_MODE});let Ce=$e(ne,Fe);return l.isProcessAction&&(Ce.data.isProcessAction=l.isProcessAction),i8(s,Ce),B.setTraditionalGadgetId(Ce.data),t8(l,Ce),Ce.caseViewMode=l.caseViewMode,e8(Ce,x,n,l,u,A,f),r8(_,Ce.data.caseInfo),o8(x,Ce.containerItemID,ne,n),p===it.FORM&&$r(Ce.containerItemID)&&(Ce.skipMergeAssignmentsAndActions=!1,yo(Ce,n,j)),dr(ne,Fe),zU({actionInContext:S,assignmentID:l.assignmentID,caseKey:Ce.key,target:x}),Ki(Ce.key),n}),O(()=>{let a=r,c=Qs(),l=Yt(g.getIn(n[0]?.payload,"data.caseInfo"));return s&&c&&l?Jd.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,T,n):T(n),mt(n,a,o),n[0]?.payload?.isParallelAssignment&&T({type:Pa,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n}))};var Yue="Error occurred during ajax call at openWorkByHandle Epic : ",x0=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t?.pageName?t?.pageName:v.getDefaultCasePage(),l=U(Kt,{caseID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),u=B.appendExcludeQueryParamToUrl(u),q(_t()?pr(Kt,{queryPayload:{caseID:r,params:{viewType:s==="none"?"none":"page",pageName:c}}}):k(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m),{response:m.data,actionInPayload:t,headers:we({...n,...m.headers}),removeActionPayload:a})),me(Yue,o,t.actionMgrID))};var l8=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Lt(Kt,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u},!1,!!s),t.push(V(rr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},u8=(t,e)=>{let{isRemoteCase:r,remoteCaseClass:n}=e,o=Bt(t),i=r?n:On(t),s={id:e?.insKey},a=At(Kt,{caseClassName:i},s);return a=a?.replace("{workID}",String(er(o)))?.replace("{id}",e?.insKey),a};var d8="OPEN_WORK_BY_HANDLE";var{RESOURCE_TYPES:D0}=E,Zue=(t,e)=>{let r=wt(t,e);if(!r)return null;let n=We(t,r);if(!(n?.resourceType===D0.ASSIGNMENT&&typeof n?.context=="string"&&n.context!==""))return null;let i=typeof n.semanticURL=="string"?n.semanticURL.trim():"";return i?{target:t,containerItemID:r,semanticURL:i,insKey:e}:null},Que=async(t,e,r)=>{let n=e?.containerItemID||null,o=n&&Ke(n)[0]?se(Ke(n)[0]):n,i=o||n,s=pe(i)||i,a=te(s)||te(i),c=s?wn(s):void 0,l=o?W(o)?.caseInfo?.ID:void 0,u=t?.insKey;if(!s||!i||c!==d.REVIEW_MODE||o===n||!l||!u||l!==u)return;let p;try{p=await fb(x0({...t,context:s,viewType:"none"},{removeActionPayload:void 0}))}catch{return}if(!p||Je(p.type))return;let m=Le(p.response),f=[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],h={...m?.data,caseInfo:{...m?.data?.caseInfo??{},assignments:m?.data?.caseInfo?.assignments??[]}};r.push(V(kn,{containerItemID:i,target:a,context:s,data:h,caseViewMode:d.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:f}))},Xue=async(t,e,r)=>{let{actionInPayload:n,activateContainerActionPayload:o,type:i,response:s,removeActionPayload:a,headers:c}=t,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:p}=n,m=Lt(Kt,n),f=Z(m,l);if(rE(i))await l8(e,{activateContainerActionPayload:o,actionInPayload:n}),await Que(n,o,e);else{let A=st(f,m,l,{buildNew:!0}),C=Le(s),I=u8(C,n);C.semanticURL=I,C.directUrlUpdation=!u,await Pe(C,n,{acName:f,context:A},!1,!!u);let N=$e(C,{target:f,context:A,containerItemID:A,semanticURL:I,headers:c,debugInfo:p});N.caseViewMode=d.REVIEW_MODE,N.resourceType=D0.CASE,r&&(N.data.caseInfo.content.coexistenceAction="openWorkByHandle",N.data.caseID=N.data.caseInfo.ID),B.setTraditionalGadgetId(N.data),xn(N,C,{skipFlowNameUpdate:!0}),N.currentCaseViewMode=wn(t?.actionInPayload?.context);let x=Ht(f,N);a.containerItemID&&tn(x)&&e.push(V(Qe,{containerItemID:a.containerItemID,target:f})),e.push(x),dr(C,N)}let h=n.insKey;tE({caseKey:h,actionInContext:l,target:f});let S=s?.data?.caseInfo?.assignments?.[0]?.ID;S&&h&&Rm({actionInContext:l,assignmentID:S,caseKey:h})},p8=t=>{let e=0,r=[],n=!1;return t.pipe(ee(d8),O(o=>({actionMgrID:e,isAutoRedirection:n=!1}=o.payload,o.payload)),z(o=>{let{context:i,isChild:s,viewType:a}=o,c=Lt(Kt,o),l=Z(c,i),{activate:u,activateContainerActionPayload:p}=Zi(D0.CASE,l,o),m=It(l);if(!u&&!m&&o.insKey&&l){let S=Zue(l,o.insKey);S&&(u=!0,p=S)}let f=u&&!s&&a!=="none",h=a!=="none"&&!f?vt(l,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return n&&pt.setComponentCache("redirectionInProgress",!0),q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?f?(mE(p),ye({type:nr,activateContainerActionPayload:p,actionInPayload:o})):x0(o,{removeActionPayload:A}):(n&&pt.setComponentCache("redirectionInProgress",!1),w.rejectActionByID(e),Et)))}),z(async o=>{if(o&&Je(o.type))return r.push(ue(o)),r;let i=W(o?.actionInPayload?.context),s=Dn(o?.actionInPayload.className);if(o?.actionInPayload?.viewType==="none"){if(i?.context_data?.caseViewMode!=="perform"){let a=Le(o?.response),c={data:{...a?.data},context:o?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:pn,payload:{context:c.context,doDeleteConfirmationDetails:!1}}),s&&c.data.caseInfo?.content&&(c.data.caseInfo.content.coexistenceAction="openWorkByHandle",c.data.caseID=c.data.caseInfo.ID),B.setTraditionalGadgetId(c.data),r.push(V(Re,c));let l=te(o?.actionInPayload?.context),u=Lr(o?.actionInPayload?.context),p=Object.freeze({target:l,containerItemID:o?.actionInPayload?.context,context:o?.actionInPayload?.context,containerName:u});if($r(o?.actionInPayload?.context)){let m=$e(o?.response,{...p});yo({...m,isArrayDeepMerge:!0},r)}o.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,o.actionInPayload.containerItemID=o?.actionInPayload?.context,o.actionInPayload.caseID=o?.actionInPayload?.insKey,dr(a,o?.actionInPayload)}}else await Xue(o,r,s);return r}),O(()=>(n&&pt.setComponentCache("redirectionInProgress",!1),T(r),mt(r,e),r=[],r)))};var m8="FINISH_ASSIGNMENT";var ede="Error occurred during ajax call at finishAssignment Epic : ",f8=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},outcome:a,jsActionQueryParams:c,headers:l}=t,{state$:u}=e,p=DB(t),m=wB(t),f={assignmentID:r,actionID:n,caseID:o,viewType:p},{restApi:h}=U(m,f),{reqType:S}=U(m,f);p&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${p}`:`${h}?viewType=${p}`),a&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${a}`:`${h}?outcome=${a}`),h=fu(c,h),h=B.appendExcludeQueryParamToUrl(h),t.viewType=p;let{content:A}=Rt(i),C=u.value.data[i]?.caseInfo?.headers||{},{etag:I}=C,_={"if-match":I,...l,...s};return q(_t()?pr(m,{queryPayload:{...c,...f,outcome:a},body:A,headers:_}):k(h,{method:S,body:A,headers:_},i)).pipe(O(N=>{let{data:x,headers:H}=N;return Ve.analyseResponse(x),{response:x,actionInPayload:t,headers:we({..._,...H})}}),me(ede,i))};var g8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},dI=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},w0=t=>{$.publish(d.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,t)},h8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,t)},y8=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,t)},S8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,t)};var{RESOURCE_TYPES:tde}=E,rde=t=>{let e=De()?.getState()?.data,r=e?Object.keys(e).find(o=>o.includes(d.WORKAREA)):void 0;return/^app\/primary(_\d+)?$/.test(t)&&!r},E8=(t,e)=>{let r=0,n=[],o={},i="",s={},a=!1,c=!1;return t.pipe(ee(m8),z(l=>{let u,p,m,f=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);if({actionMgrID:r}=l.payload,i=l.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!xr(i)||KT(i)){let h={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,h),Ct.handleDeferredActionCompletion(l.payload.context).then(()=>{w0({errorType:E.ERROR_TYPE.CLIENT})}),ye([])}return ye(l.payload).pipe(z(h=>{pt.setComponentCache("lastActionID",h?.actionID),iI(n,h);let S={...h};return f8(S,{state$:e})}),z(async h=>{if(h&&h.type===Te){KS(h);let zt=ue(h);return n.push(zt),n}Ao.clearContextedCache(i);let{headers:S,actionInPayload:A,response:C}=h,{containerItemID:I,context:_=pe(I),isModalAction:N,isInCreateStage:x}=A;a=A.isCaseWideAction,c=A.isProcessAction;let H=te(I);A.target=H;let G=Lr(I),re=Object.freeze({target:A.target,containerItemID:I,context:_,containerName:G});g.setIn(C.data,d.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),g.setIn(C.data,d.CASE_INFO_IS_LOCAL_ACTION,!1),C?.uiResources?.root?.config?.name&&A.viewType!=="page"&&g.setIn(C.data,d.CASE_INFO.VIEW_NAME,C?.uiResources?.root?.config?.name),dI({submitResponse:C});let j=Le(C,{[E.STOPMERGEACTIONS]:!C.nextAssignmentInfo}),ne=On(j),be=qe(A.context),he=Ke(be)[0]?se(Ke(be)[0]):be,Me=nE(j),Fe=x&&!Me;N&&!x&&!pl(A.context,he)&&(j=dE(j,W(I)));let Ce=$e(j,{headers:S,actionMgrID:r,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:rde(he||"")});if(oE(Ce.data,A),Ce.caseClassName=ne,Ce.resourceType=tde.ASSIGNMENT,Ce.headers=S,j?.uiResources?.root?.type==="AutoClose"){let zt=De()?.getState()?.data?.[re.context]?.caseInfo,{ID:ao,name:Ha,content:Ga}=zt;return n=await jB(A),y8({ID:ao,caseName:Ha,content:Ga,status:Ji(j).status}),n}let Oe,ft,Qt=j?.data?.caseInfo?.assignments?.some(zt=>zt.ID===A.assignmentID),yr=UB(j,A),Xt=kB(Qt,he,j,N,yr),ln=A?.actionID===E.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT,_o=It(te(he));if(j?.data?.nextAssignmentInfo&&!ln)Ce.caseViewMode=d.PERFORM_MODE,Oe=Bt(j),ft=!0;else if(Xt&&!ln)j?.confirmationNote&&j?.uiResources?.root?.config?.name===d.PY_CONFIRM?Ce.caseViewMode=d.REVIEW_MODE:Ce.caseViewMode=d.PERFORM_MODE,Oe=Bt(j),_o&&(Ce.flowName=" "),Ce.deleteAssignmentSpecificResources=!1,ft=!1;else{Ce.caseViewMode=d.REVIEW_MODE,g.setIn(Ce.data,"context_data.caseViewMode",d.REVIEW_MODE);let zt=PU(j?.data?.caseInfo);j?.confirmationNote&&(zt||j?.uiResources?.root?.config?.name===d.PY_CONFIRM)&&!_o?Oe=Bt(j):Oe="",ft=!1}let vr=Bt(j),Vn=!1;xn(Ce,j,{skipFlowNameUpdate:Ce?.caseViewMode===d.REVIEW_MODE||Xt});let qr=At("createWork",{caseClassName:ne}).replace(/{.+?}/,String(er(vr)));if(j.semanticURL=qr,Ce.semanticURL=qr,N?(await cI(A,Ce,ft,Oe,j,n,h,C,!1,s),Fe&&(o=aI(A),Ce.caseViewMode===d.PERFORM_MODE&&Ki(vr))):x&&f&&!Me?(v.setDefaultCasePage(d.PY_DETAILS),await LB(C,n,qe(_))):(await P0(Ce,A,j,re,n),Vn=ft&&Ce.caseViewMode===d.PERFORM_MODE&&!a&&!c),he?.includes(d.ACTIONAREA)&&_===he){rn.clearChangedProperties(_);let zt=W(he);n=[{type:Mi,payload:{actionID:zt.caseInfo.activeActionID,context:he,containerItemID:I,target:te(he),actionMgrID:w.getNextActionMgrId(),containerName:d.ACTIONAREA,localActionType:E.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:zt.caseInfo.ID}}]}if(Xs(h,n),Ct.handleDeferredActionCompletion(i).catch(()=>{}),lI(Ce,A,he),Vn&&Ki(vr),!j?.data?.nextAssignmentInfo){let zt=$B(j,A);yu(vr),eE({...zt,containerItemID:I})}return sI(n,{transientItemID:I,target:H,isModalAction:N}),p=j,m=A,u=A,n}),O(()=>{let h=n.find(S=>S.type===Te);return h?(Ct.handleDeferredActionCompletion(i).then(()=>{w0({errorType:E.ERROR_TYPE.SERVER})}).catch(()=>{}),uI(h),w.rejectActionByID(r)):w.resolveActionByID(r,o),s?.caseId&&g8(s),gn(n),vm()&&p&&m&&dr(p,m.__deferCaseActionsPayload??m),!h&&(a||c)&&h8({updateState:!0}),!h&&u&&S8(u),n=[],o={},s={},n}))}))};var A8="CANCEL_ASSIGNMENT";var Fa=t=>{let e={},{routeKey:r,isModalAction:n,caseID:o,context:i,RemoteSystemID:s}=t;s&&(e.RemoteSystemID=s);let a=r||wk,{restApi:c,reqType:l}=U(a,{ID:o,caseID:o,viewType:it.PAGE}),u=pt.getComponentCache(o),p=u&&typeof u=="object"?u:{},m=B.appendExcludeQueryParamToUrl(c);return q(k(m,{method:l,headers:{...e,...p}},i,{includeRemoteSystemIdIfPresent:!!s})).pipe(O(f=>(pt.resetComponentCache(o),n?{actionInPayload:t}:{response:f.data,actionInPayload:t,headers:we(f.headers)})),me(": Error occurred during ajax call at release lock request : ",i))};var $0=(t,e)=>{let{isModalAction:r}=e;return Fa({routeKey:xk,isModalAction:r,...t})};var C8=t=>{let{isModalAction:e,containerItemID:r}=t;return e?ge.MODAL:Lr(r)},_8=async(t,e)=>{let{childContainerItemID:r,caseViewMode:n,referencedUsers:o,response:i}=e,s=qe(r),a=pe(s),c=!1,l=i?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);let u={context:a,data:{...i.data,referencedUsers:o,context_data:{caseViewMode:n}}},p=[];c&&p.push({path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),p.length>0?t.push(V(Re,u,{propertiesToReplace:p})):t.push(V(Re,u))};var nde=(t,e)=>{let r=pe(e);return(r&&r!==t?[t,r]:[t]).some(o=>Ss.isContextStale(o))},I8=t=>{let e=0,r=[];return t.pipe(ee(A8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{isModalAction:o}=n;n.context||(n.context=pe(n.containerItemID));let{context:i}=n,s=C8(n),a=Z(s,i);return nde(i,n.containerItemID)?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q($0(n,{isModalAction:o}))):q(vt(a,{loadingContext:i})).pipe(z(({continueExecution:c})=>c?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q($0(n,{isModalAction:o}))):(w.rejectActionByID(e),Et)))}),z(n=>{if(n&&n.type===Te)return r.push(ue(n)),q([r]);let{actionInPayload:o,response:i}=n,{containerItemID:s,isModalAction:a,isInCreateStage:c}=o,l=o.caseID??Bt(i);i?.data.caseInfo&&(i.data.caseInfo.availableProcesses=i.data.caseInfo.availableProcesses??[]);let u=te(s),p=pe(s),m={target:a?`${d.APP.APP}/${d.MODAL}`:u,containerItemID:s,caseViewMode:a?d.PERFORM_MODE:d.REVIEW_MODE,context:p,actionMgrID:e,key:Bt(i),skipReleaseLockRequest:!1};return c&&r.push(V(tr,m)),!a&&$r(s)&&_8(r,{childContainerItemID:s,caseViewMode:d.REVIEW_MODE,referencedUsers:i?.data.referencedUsers,response:i}),l&&yu(l),m.skipReleaseLockRequest=!0,n.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,dr(n?.response,n?.actionInPayload),r.push(V(Qe,m)),q([r])}),O(()=>(T(r),mt(r,e),r=[],r)))};var b8="NAVIGATE_TO_STEP";var ode="Error occurred during ajax call at navigateToStep Epic : ",T8=(t,e)=>{let{ID:r,stepID:n,containerItemID:o,context:i=pe(o),isInCreateStage:s}=t,{state$:a}=e,c=s?it.PAGE:it.FORM,l={ID:r,stepID:n,viewType:c},{restApi:u,reqType:p}=U($k,l),{content:m}=Rt(i),f=a.value.data[i].caseInfo.headers,h=B.appendExcludeQueryParamToUrl(u);return q(k(`${h}`,{method:p,body:m,headers:{"if-match":f&&f.etag}},i)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:we({...f,...S.headers})})),me(ode,i))};var{RESOURCE_TYPES:ide}=E,v8=(t,e)=>{let r=0,n=[];return t.pipe(ee(b8),Ft(o=>{({actionMgrID:r}=o.payload);let i,s;return ye(o.payload).pipe(z(a=>(Mm(a.context),T8(a,{state$:e}))),z(async a=>{if(a&&Je(a.type))return n.push(ue(a)),n;let{actionInPayload:c,response:l,headers:u}=a,{containerItemID:p,context:m=pe(p),isModalAction:f}=c;Ao.clearContextedCache(c.context);let h=te(p),S=Lr(p),A=Object.freeze({target:h,containerItemID:p,context:m,containerName:S}),C=l?.data?.caseInfo?.content,I=l?.uiResources?.root?.config?.name,_=l?.uiResources?.root?.config?.context;C&&!C[P.getDefaultQualifiedName("pyViewName")]&&I&&c.viewType!=="page"&&(g.setIn(C,P.getDefaultQualifiedName("pyViewName"),I),g.setIn(C,P.getDefaultQualifiedName("pyViewContext"),_)),i=Le(l);let N={acName:h,...A};await Pe(i,c,N),s=$e(i,{...A,headers:u}),l?.nextAssignmentInfo||(s.caseViewMode=d.REVIEW_MODE),Xs(a,n),s.doDeleteCaseSummary=c.doDeleteCaseSummary,s.resourceType=ide.ASSIGNMENT,s.caseID=Bt(i),xn(s,i),oE(s.data,c);let x=i.data?.caseInfo?.stages,H=i.data?.caseInfo?.stageID;if(XS({caseID:Bt(i),context:c.context,assignmentId:c.assignmentID,isLocalAction:!!c.isLocalAction,isModalAction:f,stages:x,stageID:H}),$r(p)){let G=B.getPropertiesToReplace(p);yo(s,n,"",{propertiesToReplace:G})}return n.push(V(tr,s)),s.shouldUpdateCaseActionsInParentContext=!0,n}),O(()=>(T(n),i&&s&&dr(i,s),mt(n,r),n=[],n)))}))};var R8=t=>{let{caseID:e,context:r}=t,{restApi:n,reqType:o}=U(rS,{ID:e});return q(k(n,{method:o},r)).pipe(O(i=>(Ve.analyseResponse(i.data),{response:i.data,actionInPayload:t,headers:we(i.headers)})),me(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",r))};var P8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,t)};var sde=(t,e)=>{let r=0,n,o=[];return t.pipe(ee(Ah),O(i=>({actionMgrID:r,caseType:n}=i.payload,i.payload)),z(i=>i.ignoreCaseDeletion?ye({actionInPayload:i}):R8(i)),z(async i=>{if(i&&Je(i.type)){let{payload:m}=i,f=ue({...i,...m,actionMgrID:r});return o.push(f),o}let{actionInPayload:s}=i,{context:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,u=Z(l,a);if(!c&&u){let m={acName:u,target:u,context:a},f=e.value.containers[u],{semanticURL:h}=NU(f);await Pe({directUrlUpdation:!0,semanticURL:h},s,m)}if(s.isProcessAction&&s.parentCaseInfo){let m={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:d.PRIMARY,isChild:!0},f={type:Go,payload:{...m}};o.push(f)}let p={target:u,containerItemID:a,context:a,caseDeleted:!0};return o.push(V(Qe,p)),o}),O(()=>(T(o),mt(o,r)===d.PROMISE_VALUE.RESOLVE&&P8({caseType:n}),o=[],o)))},N8=sde;var O8=(t,e)=>{let{assignmentID:r,actionID:n,context:o}=t,{restApi:i,reqType:s}=U(Dk,{assignmentID:r,actionID:n}),{content:a}=Rt(o),c=e.value.data[o]?.caseInfo?.headers,l=B.appendExcludeQueryParamToUrl(i);return q(k(l,{method:s,body:a,headers:{"if-match":c&&c.etag}},o)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:we(u.headers)})),me(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",o))};var x8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,t)};var M0=(t,e=!1)=>{let{action:r,state$:n,actionMgrID:o}=t,i=r.payload.autosave===!0,s,a=[];return ye(r.payload).pipe(z(c=>(s=oe("caseInfo.ID","",c.context)||void 0,O8(c,n))),hc(c=>{if(c&&Je(c.type))return ye(c);let{containerItemID:l}=c&&c.actionInPayload,u=qe(l),p=te(u),m=ut(p),f=Ke(u)[0],h=f?se(f):u;!It(te(h))&&({containerItemID:h}=jd(h,c.actionInPayload.caseID,f));let A=se(p);r.payload.canUpdateAvailableActions&&hu(c.response);let C=ae.getRemoteHeaderByContext(c.actionInPayload.context),I={...c.actionInPayload,RemoteSystemID:C===null?void 0:C},_=N=>V(Re,{context:N,data:{caseInfo:{...c.response.data?.caseInfo||{},headers:c.headers}}});if(h&&a.push(_(h)),m?.items?.[A]?.key===c?.actionInPayload?.caseID){let N={context:u,data:{...c.response.data,caseInfo:{...c.response.data?.caseInfo||{},headers:c.headers}}},x=B.getPropertiesToReplace(l);a.push(V(Re,N,{propertiesToReplace:x}))}return i||a.push(V(tr,{context:l})),Xs(c,a),Fa(I)}),z(async c=>{if(c&&Je(c.type)){let{payload:S}=c,A=ue({...c,...S,actionMgrID:o});a.push(A);let C=t.action.payload.modalLoadingContainer;if(C){let I=C.context,{context_data:_}=W(I)||{};_?.isLoading&&ta(I)}return a}let{actionInPayload:l,response:u}=c,{context:p,containerName:m}=l,h={target:Z(m,p),containerItemID:p,context:p};return l.shouldUpdateCaseActionsInParentContext=!0,dr(u,l),!e&&!i&&a.push(V(Qe,h)),a}),O(()=>(T(a),mt(a,o),i||x8({context:r.payload.context,caseID:s,assignmentID:r.payload.assignmentID}),e||(a=[]),Ct.isDeferredActionInProgress(r.payload.context)&&Ct.handleDeferredActionCompletion(r.payload.context),a)))},ade=(t,e)=>{let r=0,n;return t.pipe(ee(yi),Ft(o=>{let{saveOnly:i}=o.payload;return{actionMgrID:r,caseType:n}=o.payload,M0({action:o,state$:e,actionMgrID:r,caseType:n},i)}))},D8=ade;var w8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},$8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t,e)};var pI=t=>{let{callbacks:e}=t;e?.submit&&$8(n=>{e.submit(n),w8("expressLocalActionSubmit")},"expressLocalActionSubmit")},M8=t=>{let e=0,r,n=[],o={value:De()?.getState()};return ye(t).pipe(ee(yi),Ft(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e,caseType:r}=i.payload,!s){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),ye([])}return M0({action:i,state$:o,actionMgrID:e,caseType:r,actionsOut:n},!0)}))};var{LOCAL_ACTION_TYPE:k8}=d,{RESOURCE_TYPES:cde}=E,lde=t=>{let e=t.localActionType?.toLowerCase();return e===k8.CASE_WIDE||e===k8.EXPRESS||e&&t.isPromotedAction?js:nS},ep=(t,e)=>{let{actionID:r,assignmentID:n,caseID:o,context:i,openActionType:s,modalLoadingContainer:a,headers:c}=t,{isProcessAction:l}=e,u=l?Zl:lde(t),p=it.FORM,{reqType:m}=U(u,{caseID:o,ID:n,actionID:r,viewType:p}),{restApi:f}=U(u,{caseID:o,ID:n,actionID:r,viewType:p});t.actionType=u===js?d.CASE:d.ASSIGNMENT,f&&!f.includes("viewType=")&&(f=f.includes("?")?`${f}&viewType=${p}`:`${f}?viewType=${p}`),f=B.appendExcludeQueryParamToUrl(f);let h=a?.context??i;return q(k(f,{method:m,headers:c},h)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:we(S.headers,"",t.headers)})),me(`: Error occurred during ajax call at ${s} Epic : `,h))},mI=(t,e)=>{let{isProcessAction:r}=e,n=r?Zl:nS;t.openActionType=n;let o=Lt(n,t),i;if(o==="modal"){if(!Do.isOnline()||t.isAppOffline)return w.rejectActionByID(t.actionMgrID),Promise.resolve();i=Ke(t.contextName)[0]?Ke(t.contextName)[0]:te(t.contextName);let s=i?se(i):t.contextName,a=pe(s),c=Lt(t.openActionType,t),l=Z(c,t.context),u=Yr(t.context,lr(c,t.context));if(T(Pt({target:l,context:u,containerItemID:u,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:t.caseID,caseInfo:{ID:t.caseID}},headers:{...t.headers}})),T(Mh({context:u})),t.modalLoadingContainer={target:l,context:u},!Ke(t.contextName)[0]||!t.continueExecution||!Or(a))return ep(t,e);t.saveActionPayload.modalLoadingContainer=t.modalLoadingContainer,t.saveActionPayload.canUpdateAvailableActions=!t.saveActionPayload.isModalAction;let p=sl(t.saveActionPayload);return q([p]).pipe(z(m=>M8(m)),z(m=>m.length===1&&Je(m[0].type)?q(vt(i,{loadingContext:t.context})).pipe(z(({continueExecution:f})=>f?ep(t,e):(w.rejectActionByID(t.actionMgrID),Et))):ep(t,e)),O(m=>m))}return ep(t,e)},ude=t=>t==="async"?"submitBulkActionAsync":"submitBulkAction",dde=t=>t.containerItemID?.includes(d.ACTIONAREA)&&t.context?.includes(d.ACTIONAREA),tp=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=n,u=Le(t),p=Lt(s,n),m=c?.target??Z(p,o),f,h,S=!1;!jr(m)||mr(m)&&!ll(m,t.data.caseInfo.ID)?(h=lr(p,o),en(p)&&(h=Yr(o,h)),f=h,S=!0):(mr(m)?f=wt(m,t.data.caseInfo.ID):f=se(m),h=pe(f)),await Pe(u,n,{acName:m,target:m,containerName:p,context:h}),(u?.data?.caseInfo?.content===void 0||u.data.caseInfo.content!==void 0&&typeof u.data.caseInfo.content=="object"&&Object.keys(u.data.caseInfo.content).length===0)&&delete u.data?.caseMessages;let C=u.uiResources?.root,I;C?I=d.PERFORM_MODE:I=d.REVIEW_MODE;let _=$e(u,{target:m,context:h,containerItemID:f,caseViewMode:I,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:en(p),resourceType:cde.ASSIGNMENT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,assignmentID:n.assignmentID,actionType:n.actionType,skipMergeAssignmentsAndActions:l});C&&xn(_,u),en(p)&&delete _.doDeleteCaseSummary,n.openActionType===ac&&(_.isBulkAction=!0,_.data.caseInfo.actionButtons.main[0].jsAction=ude(n.runningMode),_.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",_.data.caseInfo.cases=n.selectedList,_.data.caseInfo.isAssignment=n.isAssignment);let N;if(S?N=Pt:n.isProcessAction||dde(n)?N=kn:N=tr,_.data.context_data.isProcessAction=n.isProcessAction,e.push(V(N,_)),S||e.push(V(gs,_)),S){let G=Ke(n.contextName),re=wt(G,t.data.caseInfo.ID);if(re){let j={data:{caseInfo:{headers:r}},context:re};e.push(V(Re,j))}}f!==se(m)&&e.push(V(rr,{target:m,containerItemID:f})),$r(f)&&!c?.context&&yo(_,e);let x=_.nextAssignmentInfo?.context==="other";return n.isProcessAction&&!Dn(_.nextAssignmentInfo?.className)&&!x&&Xs({response:u,actionInPayload:{...n,containerItemID:f}},e),_.caseViewMode===d.REVIEW_MODE&&e.push(V(Qe,_)),_.shouldUpdateCaseActionsInParentContext=!0,g.getIn(t.data,["caseInfo","isLocalAction"])||dr(u,_),e};var L8="OPEN_LOCAL_ACTION";var U8=(t,e)=>mI(t,e);var pde=t=>{let e=0,r=[];return t.pipe(ee(L8),O(n=>({actionMgrID:e}=n.payload,n.payload)),Qo(()=>!Eu(e)),z(n=>U8(n,{actionMgrID:e})),z(async n=>{if(!n)return Et;if(Je(n.type)){let l=ue(n);r.push(l);let{context_data:u}=W(n.payload.context)||{};return u?.isLoading&&r.push(V(gs,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;g.setIn(s,"data.caseInfo.activeActionID",a);let c=g.getIn(s,"data.caseInfo.ID");return Ki(c),g.setIn(s.data,d.CASE_INFO_IS_LOCAL_ACTION,!0),o.refreshConditions&&g.setIn(s.data,d.CASE_INFO_REFRESH_CONDITIONS,o.refreshConditions),await tp(s,r,{headers:i,actionInPayload:o}),pI(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},j8=pde;var z8=t=>{let{actionID:e,context:r,openActionType:n,caseTypeID:o,bulkContextID:i="",bulkContextType:s=""}=t,a=ac,{reqType:c,restApi:l}=U(a,{caseTypeID:o,actionID:e,bulkContextID:i,bulkContextType:s});return q(k(l,{method:c},r)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:we(u.headers)})),me(`: Error occurred during ajax call at ${n} Epic : `,r))};var F8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)},V8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t,e)};var B8=(t,e)=>{let{context:r}=t,{actionMgrID:n}=e;t.openActionType=ac;let o=Lt(ac,t),i=Z(o,r);return q(vt(i,{loadingContext:r})).pipe(z(({continueExecution:s})=>s?z8(t):(w.rejectActionByID(n),Et)))},H8=t=>{let{callbacks:e}=t;e?.submit&&V8(n=>{e.submit(n),F8("bulkActionSubmit")},"bulkActionSubmit")};var G8="OPEN_BULK_ACTION";var mde=t=>{let e=0,r=[];return t.pipe(ee(G8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>B8(n,{actionMgrID:e})),z(async n=>{if(n&&Je(n.type??"")){let c=ue(n);return r.push(c),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.caseInfo.activeActionID",a),await tp(s,r,{headers:i,actionInPayload:o}),H8(o),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},q8=mde;var W8=t=>{let{actionID:e,context:r,cases:n,classID:o,isAssignment:i}=t,{content:s}=Rt(r,{nonEmptyAndChangedData:!0}),a=5;try{$n.getSharedState(P.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"))?.find(A=>A[P.getDefaultQualifiedName("pyClassName")]===o)?.pyList.split(",").includes(e)&&(a=1)}catch(S){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',S)}let c=n.map(S=>({ID:S})),l=c.length/a,u=i?Uk:oS,{reqType:p,restApi:m}=U(u,{actionID:e}),f=[],h=c.length;for(let S=0;S<h;S+=l){let A=c.slice(S,S+l);i?s.assignments=A:s.cases=A,A.length&&f.push(q(k(m,{method:p,body:s},r)).pipe(O(C=>{let{data:I,headers:_}=C;return{response:I,actionInPayload:t,headers:we({..._})}}),me("Error occurred during ajax call at submitbulkaction Epic : ",r)))}return gb(f)};var K8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var J8="SUBMIT_BULK_ACTION";var Y8=t=>{let e=0,r=[],n,o="";return t.pipe(ee(J8),Ft(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(z(a=>(n=a,W8(n))),z(a=>{let c=0,l=0,u=[],{containerItemID:p,context:m}=n;return a.forEach(f=>{let{response:h}=f;c+=Number(h.successCount),l+=Number(h.failureCount),l&&h.results.forEach(S=>{S.status!=="200"&&S.error&&S.error.errorDetails&&S.error.errorDetails.forEach(A=>{u.push({ID:S.BusinessID,message:A.localizedValue})})})}),o=`${c} record(s) updated`,K8({submitResponse:a}),n.target=v.getRenderingMode()==="HYBRID"?te(p):`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:p,context:m,target:n.target,skipReleaseLockRequest:!0})),l&&r.push(V(wm,{messages:[{type:"error",message:l===1?"1 record failed to update":`${l} records failed to update`,errorDetails:u,showHeader:!1}],context:qe(m)||m,category:"HTTP",showHeader:!1})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var Z8=t=>{let{actionID:e,context:r,cases:n}=t,{content:o}=Rt(r,{nonEmptyAndChangedData:!0});o.cases=n.map(c=>({ID:c}));let i=oS,{reqType:s,restApi:a}=U(i,{actionID:e,runningMode:"async"});return q(k(a,{method:s,body:o},r)).pipe(O(c=>{let{data:l,headers:u}=c;return{response:l,actionInPayload:t,headers:we({...u})}}),me("Error occurred during ajax call at submitbulkactionasync Epic : ",r))};var Q8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var X8="SUBMIT_BULK_ACTION_ASYNC";var e5=t=>{let e=0,r=[],n,o={};return t.pipe(ee(X8),Ft(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(Ft(a=>(n=a,Z8(n))),O(a=>{let{containerItemID:c,context:l}=n,{response:u}=a;return o={caseID:u.caseID,caseTypeID:"BackgroundJob"},Q8({submitResponse:u}),n.target=`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:c,context:l,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var t5=(t,e)=>mI(t,e);var fde=t=>{let e=0,r=[];return t.pipe(ee(JC),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let i=Lt(Zl,n),s=Z(i,n.context);return q(vt(s,{loadingContext:n.context})).pipe(z(({continueExecution:a})=>a?(Mm(n.context),t5(n,{actionMgrID:e,isProcessAction:!0})):(w.rejectActionByID(n.actionMgrID),Et)))}),z(async n=>{if(n&&Je(n.type)){let a=ue(n);return r.push(a),r}let{actionInPayload:o,headers:i,response:s}=n;return await tp(s,r,{headers:i,actionInPayload:o}),r}),O(()=>(gn(r),mt(r,e),r=[],r)))},r5=fde;var n5=t=>{let e=0,r=[];return t.pipe(ee(Ze,et),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{containerItemID:o,caseID:i,context:s,caseDeleted:a,skipReleaseLockRequest:c,currentCaseViewMode:l,isProcessAction:u,isInCreateStage:p,deleteWork:m}=n,f=l===d.PERFORM_MODE,h=i&&f;return m?ye([]):u&&p?Fa(n):o===s&&!a&&!c&&h?Fa(n):o?.includes(d.MODAL)&&wn(Oa(o))===d.REVIEW_MODE?Fa(n):ye([])}),z(n=>(n&&Je(n.type)&&r.push(ue(n)),r)),O(()=>(T(r),mt(r,e),r=[],r)))};var gde=t=>{let{context:e,containerItemID:r}=t.payload;if(typeof r!="string"||!r)return!1;let n=pe(r);return(n&&n!==e?[e,n]:[e||r]).some(i=>typeof i=="string"&&!!i&&Ss.isAssignmentStale(i))},o5=t=>t.pipe(ee(Yl),LS(()=>kS(100)),O(e=>{if(gde(e))return T({type:wi,payload:e.payload}),[];let{actionMgrID:r,isChildCase:n,isModalAction:o,isProcessAction:i,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:l,context:u}=e.payload;return w.resolveActionByID(r),$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:o,hideDelete:i?!1:n,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:u||l}),[]})),i5=t=>t.pipe(ee(Xy),LS(()=>kS(100)),O(e=>{let{actionMgrID:r,context:n,containerName:o,containerItemID:i}=e.payload,s=Z(o,n);return w.resolveActionByID(r),T(V(rr,{containerItemID:i,target:s,doDeleteCaseSummary:!1})),[]}));var s5=t=>{let e=0,r=[],n="";return t.pipe(ee(Ui),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>Y_(o)),z(async o=>{if(o&&o.type===Te)return r.push(ue(o)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0}};let{actionInPayload:i,response:s,headers:a}=o,c=i.containerName,l=Z(c,i.context),u=st(l,c,i.context);u=Yr(i.context,u);let{pageReference:p,targetProperty:m,index:f,subscriptFieldName:h,pageGroupName:S,actionType:A,isPageGroup:C}=i,I=p?.startsWith(E.OBJECT_INFO.OBJECT_INFO),_=null;I?(_=Ve.transformCaseData(s),_.uiResources.root.config.context=`${p}${m}[${f}]`):_=s;let N=_?.uiResources?.root?.config?.name??i.interestPageActionID,x=Le(_);x.key=i.ID,x.data?.caseInfo?(x.data.caseInfo.ID=i.ID,pV(x,f,h,A,S)):x.data?.objectInfo&&(x.data.objectInfo.ID=i.ID);let{interestPageActionID:H,editType:G,isLocalAction:re,actionID:j}=i,ne={isMultiRecordData:!0,viewName:i.viewID,parentContext:i.context,interestPage:i.interestPage,interestPageActionID:H,editType:G,isLocalAction:re,actionID:j};x.uiResources.context_data.modalView=ne;let be=W(i.context)?.context_data?.caseInfo,he=`${i.pageReference}${i.targetProperty}`,Me=qT(be,he,i.index);x.uiResources.context_data.caseInfo={...x.uiResources.context_data.caseInfo,content:g.mergeDeep(x.uiResources.context_data.caseInfo?.content,Me?.content)};let Fe=J.getProperty(d.CASE_INFO.REMOTESYSTEMID,"",i.context);await Pe(x,i,{acName:l,context:u});let Ye={target:l,context:u,containerItemID:u,headers:a,index:f,subscriptFieldName:h,pageGroupName:S,isPageGroup:C};Fe&&(Ye.headers={...Ye.headers,RemoteSystemID:Fe});let Oe=$e(x,Ye);Oe.resourceStatus=i.actionType,Oe.isMultiRecordData=!0,Oe.readOnly=i.readOnly,Oe.parentContext=i.context,Oe.heading=i.heading,Oe.data.caseInfo&&G===d.ACTION&&(Oe.data.caseInfo={...Oe.data.caseInfo,...mV(i),isLocalAction:i.isLocalAction}),Oe.clearStateMachine=!1,i.viewName=N;let ft=Ht(l,Oe);n=u,r.push(ft);let Qt={changedListProperty:[],leafProperty:[]};return G===d.ACTION&&(ke.registerForServerChanges(),Qt=Cr.getServerProperties(Oe.data,u)),{actionsOut:r,actionInPayload:i,serverProps:Qt}}),O(({actionInPayload:o,serverProps:i={changedListProperty:[],leafProperty:[]}})=>{if(_c(r)?w.rejectActionByID(e):w.resolveActionByID(e),o.skipPageInstructions||dV(n,o.pageReference,o.targetProperty,o.index,o.actionType),T(r),r=[],o.editType===d.ACTION){Cr.handleServerChanges(n,i.changedListProperty,i.leafProperty),ke.unRegisterForServerChanges();let s=d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),a=g.convertClipboardPageToPageRefNotation(o.interestPage),c=s+a;o.columns.forEach(l=>{let u=fe.trimAnnotation(l.config.value),p=oe(u,c,n),m=lt(u.startsWith(".")?u.split(".").pop():u,l.config.classID);Ie.getFieldNode(n,c,o.viewName,u)||Ie.addFieldNode(n,c,o.viewName,u,p,{isDeclarativeTarget:!!m?.isDeclarativeTarget,context:n,propertyName:u,pageReference:c,value:l.config.value,isInsideList:/\[\d+\]/.test(c)||/\[\d+\]/.test(u)})})}return r}))};var hde=(t,e=!1)=>t===d.ACTION?e?Ut.REFRESH_CASE_DATA:Ut.REFRESH_ASSIGNMENT_DATA:Ut.REFRESH_CASE_VIEW,a5=t=>{let{context:e}=t,n={...Rt(e).content,contextData:!1},o=bu(e);g.isEmpty(o)||(n=Nc(o,n));let i=hde(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,n.interestPageActionID=t.interestPageActionID),n.interestPage=t.interestPage,q(k(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:we(l.headers)})),me(": Error occurred during getEmbeddedDataView request : ",e))};var yde=()=>({rootView:null,data:null,uiResources:null,containerContext:null}),c5=(t,e,r)=>typeof r=="string"?`${t}${e}.${r}`:`${t}${e}[${r}]`,Sde=t=>{let{containerName:e,context:r}=t;if(!e)return{context:r,containerContext:null,target:null};let n=Z(e,r),o=st(n,e,r)||e,i=Yr(r,o);return{context:i,containerContext:i,target:n}},Ede=(t,e,r,n,o)=>{if(o){let i=Ve.transformCaseData(t);return i.uiResources.root.config.context=c5(e,r,n),i}return t},Ade=(t,e,r)=>{let n=c=>typeof c=="object"&&c!==null,o=(c,l)=>{if(n(c))return c[l]},s=e.replace(/^\./,"").split("."),a=t;for(let c of s)a=o(a,c);return typeof r=="string"?o(a,r)??null:Array.isArray(a)?a[r]??null:null},Cde=(t,e,r,n,o)=>{let i=t.data?.caseInfo?.content;if(i){let a=Ade(i,n,o);a&&T(sa({context:e,reference:r,value:a}))}let s=t.uiResources?.context_data;s&&T(sa({context:e,reference:d.CONTEXT_DATA,value:s}))},l5=t=>{let e=0,r=[];return t.pipe(ee(lS),O(n=>{let{payload:o}=n;return{actionMgrID:e}=o,o}),z(n=>a5(n)),hc(async n=>{let o=yde();if(n?.type===Te)return r.push(ue(n)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0},responseData:o};let{actionInPayload:i,response:s,headers:a}=n,{pageReference:c,targetProperty:l,index:u,containerName:p}=i,m=c?.startsWith(E.OBJECT_INFO.OBJECT_INFO),{context:f,containerContext:h,target:S}=Sde(i),A=Ede(s,c,l,u,m),C=Le(A);C.key=i.ID;let I=c5(c,l,u);if(await Pe(C,i,p?{acName:S,context:f}:{context:f}),p&&S){let H=$e(C,{target:S,context:f,containerItemID:f,headers:a,index:u});H.resourceStatus=i.actionType,H.isMultiRecordData=!0,H.readOnly=i.readOnly,H.parentContext=i.context,H.clearStateMachine=!1;let G=Ht(S,H);r.push(G)}else Cde(C,f,I,l,u);let N=C.uiResources?.root||null;return N?.config&&(N.config.context=I),o.rootView=N,o.data=C.data,o.uiResources=C.uiResources,o.containerContext=h,{actionsOut:r,actionInPayload:i,responseData:o}}),O(({actionsOut:n,responseData:o})=>{_c(n)?w.rejectActionByID(e):w.resolveActionByID(e,o);let i=n;return r=[],i}))};var u5=(t,e)=>{let{pageReference:r,isMultiRecordData:n}=e,o=J.getPropertyValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID),r,t.parentContext),i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,r,t.parentContext),a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,r,t.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:p}=a,f=t.pageReference.substring(0,t.pageReference?.lastIndexOf(".")).replace(d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),"");a.editType==="action"?Cu(o,s,u,t.parentContext,c,l,p,n,a.editType):Pc(o,i,t.parentContext,f,{})};var _de=(t,e)=>{if(t&&e.editType==="action"&&t.type!==Te){let{context:r,pageReference:n}=e,o={context:r},{response:i}=t,s=n?.startsWith(E.OBJECT_INFO.OBJECT_INFO),a=null;s?(a=Ve.transformCaseData(i),a.uiResources.root.config.context=n):a=i;let c=Le(a);c.key=e.ID,c.data?.caseInfo?c.data.caseInfo.ID=e.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=e.ID);let l=$e(c,o);l.skipValidation=!0;let u=V(Re,l);ke.registerForServerChangesSync(),T(u),ke.unRegisterForServerChanges()}return t},d5=t=>{let e="",r=[],n;return t.pipe(ee(uS),Ft(o=>{n=o.payload;let{isFormValid:i}=o.payload;if({actionMgrID:e}=o.payload,!i){let s={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,s),Ct.handleDeferredActionCompletion(o.payload.context),ye([])}return ye(o.payload).pipe(z(s=>(n=s,Y_(n))),z(async s=>_de(s,n)),z(async s=>{if(s&&s.type===Te){let m=ue(s);return r.push(m),r}let{containerItemID:a,context:c,pageReference:l,interestPage:u}=n,p=u?.replace(/\(\d+\)$/,"");return ZL(c,n.parentContext,l.startsWith(E.OBJECT_INFO.OBJECT_INFO_CONTENT)?d.getProperty(E.OBJECT_INFO.OBJECT_INFO_CONTENT):d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),!1,p),r.push(V(Qe,{containerItemID:a,context:c,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>{if(_c(r))w.rejectActionByID(e),Ct.handleDeferredActionCompletion(n.context);else{w.resolveActionByID(e),Ct.handleDeferredActionCompletion(n.context);let{pageReference:s}=o.payload,a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,n.parentContext);a?u5(n,{isMultiRecordData:a,pageReference:s}):_u(n.parentContext,d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),{})}return T(r),r=[],r}))}))};var Ide="Error ocurred during ajax call at getDescendants Epic : ",p5=t=>{let{caseID:e,headers:r,debugInfo:n,context:o}=t,i=U(Pk,{caseID:e}),{restApi:s}=i,{reqType:a}=i;return q(k(s,{method:a,headers:{...r,...n&&{...Ge.addDebugHeaders(n)}}},o)).pipe(O(c=>({actionInPayload:t,response:c.data,headers:we({...r,...c.headers})})),me(Ide,o))};var m5=t=>{let e=0,r=[];return t.pipe(ee(sD),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>p5(n)),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;let{actionInPayload:o,response:i}=n,s={};if(g.setIn(s,"caseInfo.childCases",i?.childCases??[]),i?.uiResources?.resources&&bm(i.uiResources.resources),i?.uiResources?.components)try{await fo(i.uiResources.components)}catch(c){return r.push(ue({payload:{...o,err:c}})),r}i?.uiResources?.localeReferences&&g.setIn(s,"localeReferences",i.uiResources.localeReferences),i?.uiResources?.childCases_context_data&&g.setIn(s,"childCases_context_data",i.uiResources.childCases_context_data);let a={data:s,context:o?.context};return r.push(V(Re,a)),r}),O(()=>(T(r),mt(r,e),r=[],r)))};var f5=(t,e)=>{let r={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};w.rejectActionByID(t,!0,r),Ct.handleDeferredActionCompletion(e)},g5=(t,e,r)=>{Or(e)&&t.push(V(Qe,{containerItemID:r,skipReleaseLockRequest:!0}))},h5=({itemData:t,workareaContainerData:e,subscriptData:r,pageGroupName:n,activeWorkArea:o,subscriptFieldName:i,actionMgrID:s,containerItemID:a})=>{let c={referenceList:t?.referenceList,ID:e?.caseInfo?.ID,index:r[i],containerName:E.MODAL,pageReference:E.CASE_INFO.CASE_INFO_CONTENT,viewID:E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:E.RESOURCE_STATUS.CREATE,interestPage:`.${n}.${r[i]??""}`,targetProperty:`.${n??""}`,pageGroupName:n,context:o??"",subscriptFieldName:i};return{type:Ui,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:a,doDeleteCaseSummary:!1,isFormValid:!0}}};var y5=t=>{let e="",r=[],n,o={};return t.pipe(ee(dS),Ft(i=>{n=i.payload;let{isFormValid:s}=i.payload;return{actionMgrID:e}=i.payload,s?ye(i.payload).pipe(z(a=>(n=a,ye({}))),z(async()=>{let{containerItemID:a}=n,c=W(a),l=a,u=c?.dataInfo.content;delete u.classID;let p=qe(l),m=Ke(p).length,f=Ke(p)[m-1]?se(Ke(p)[m-1]):p,h=te(a),S=We(h,a)||{},A=S?.referenceList?.replaceAll(".",""),C=S?.subscriptName,I=W(f),_={...I,caseInfo:{content:{...u}}},N={containerItemID:f,data:_};r.push(V(tr,N)),g5(r,l,a);let x=h5({itemData:S,workareaContainerData:I,subscriptData:u,pageGroupName:A,activeWorkArea:f,subscriptFieldName:C,actionMgrID:e,containerItemID:a});return r.push(x),o=u,r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r))):(f5(e,i.payload.context),ye([]))}))};var bde=[PB,JB,c8,p8,j8,q8,Y8,e5,r5,E8,v8,I8,n5,D8,N8,o5,i5,s5,l5,d5,m5,y5],S5=bde;var{RESOURCE_TYPES:k0}=E,fI="pyCasePreview",Tde=(t,e,r,n,o)=>{t&&o===ge.PREVIEW?(r.data.caseInfo.progress=!1,delete r.root,dr(r,r),n.actionsOut=V(tr,{...r,containerName:o})):t?(n.actionsOut=[],n.actionsOut.push(V(rr,{target:e,containerItemID:t}))):n.actionsOut=V(Pt,{...r,containerName:o})},vde=(t,e)=>{let r=B.isObjectCaseType(t.caseClassName);if(t.key&&!r){let n=te(t?.context),o=wt(n,t.key),i=t?.context;(o||t.updateData||JU(i))&&e.actionsOut.push(V(Re,t))}else e.actionsOut.push(V(Re,t))},Rde=t=>{let{containerName:e,updateData:r,viewLoadingContainer:n}=t,o=e||Vt.getTargetViewContainerName(vn),i=n?.target??Z(o,t.context),s=n?.context??(e===ge.PREVIEW&&r?t.context:st(i,o,t.context,{buildNew:!!e}));return{target:i,context:s}},Pde=(t,e)=>{let r=U("loadView",e);t.viewContext===k0.PAGE&&(r=U(vn,{page:t.viewName,pageClass:t.pageClass}));let n=P.getDefaultQualifiedName(fI);return t.containerName===ge.PREVIEW&&t.caseId&&t.viewContext!==k0.PAGE&&(t.viewName===n||t.viewName===fI)&&(r=U(Kt,{caseID:t.caseId,params:{pageName:n}})),r},Nde=t=>t.pipe(ee(Bl),O(e=>e.payload),Qo(e=>!Eu(e.actionMgrID)),z(e=>{let r={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===ge.PREVIEW&&e.context&&e.caseId&&!e.updateData){let s=Z(ge.PREVIEW,e.context),a=st(s,ge.PREVIEW,e.context,{buildNew:!0}),c=decodeURI(e.caseId);T(Pt({...e,context:a,target:s,containerItemID:a,key:c,caseViewMode:d.REVIEW_MODE,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:c,caseInfo:{ID:c,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:s,context:a}}let n={};if(r.RemoteSystemID)n.RemoteSystemID=r.RemoteSystemID;else if(ae.isRemoteCase(r.caseClassName)){let{RemoteSystemID:s}=ae.getRemoteCase(r.caseClassName);n.RemoteSystemID=s}let{restApi:o,reqType:i}=Pde(e,r);return q(k(B.appendExcludeQueryParamToUrl(o),{method:i,headers:n},e.context)).pipe(O(s=>{let a=decodeURI(e.caseId),c="";return typeof s.data=="string"?s.data?c=JSON.parse(s.data):(console.error("response data is empty!!"),c={}):c=s.data,{response:{...c,key:a},actionConfig:e,headers:we(s.headers),rootView:g.getIn(c,d.ROOT)}}),me(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))}),z(async e=>{let r={};if(e?.type===Te){if(r.actionsOut=ue(e),e?.payload?.context?.includes(ge.PREVIEW)){let a={...W(e.payload.context),caseInfo:{progress:!1,error:!0}},c=Z(ge.PREVIEW,e.payload.context);r.actionsOut=V(tr,{key:a.key,target:c,containerName:ge.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:a})}return r}try{r.actionMgrID=e?.actionConfig?.actionMgrID,r.rootView=e?.rootView;let{actionConfig:s,response:a,headers:c}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete a?.data?.caseInfo?.assignments,delete a?.data?.caseInfo?.availableActions,delete a?.data?.caseInfo?.availableProcesses);let{containerItemID:l,containerName:u}=s,{target:p,context:m}=Rde(s);s.context=m;let f={acName:p,context:m},h={};h=Le(a),h.directUrlUpdation=!1,await Pe(h,s,f);let S={...s,target:p,context:m,containerItemID:l||m,headers:c},A=$e(h,S);if(A.resourceType=k0.CASE,s.viewName===d.PY_CONFIRM&&(A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],d.REVIEW_MODE)),u&&!A.updateData){A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],A.caseViewMode);let C=te(A?.context),I=wt(C,A.key);Tde(I,C,A,r,u)}else{A.preserveClientChanges=!0,r.actionsOut=[],u===ge.PREVIEW&&r.actionsOut.push({type:pn,payload:{context:m,skipMergeAssignmentsAndActions:!1}});let{viewName:C}=s;C===P.getDefaultQualifiedName(fI)&&dr(A,A),vde(A,r)}}catch(s){console.error(s),r.rootView={type:"error",payload:s}}let{caseId:n,context:o,viewName:i}=e.actionConfig;return i===P.getDefaultQualifiedName(fI)&&FU({caseId:n,context:o}),r}),O(({rootView:e,actionsOut:r,actionMgrID:n=0})=>(w.resolveActionByID(n,e),Ve.setNeedsMapping(!1),r))),Ode=t=>{let e=0,r=[];return t.pipe(ee(Pr),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);let{debugInfo:o,context:i,viewName:s,className:a,skipSemanticUrl:c=!1,containerName:l=Vt.getTargetViewContainerName(vn)}=n,u=o&&{...Ge.addDebugHeaders(o)},p=Z(l,i),m="";if(!c){let{semanticURL:S,activate:A,activateContainerActionPayload:C}=fj(s,a,p);if(m=S,A)return mE(C),ye({type:nr,activateContainerActionPayload:C,actionConfig:n})}let h=se(p)?vt(p,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:{}});return q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?q((()=>{if(_t())return pr("openPage",{pageName:s,pageClass:a,headers:u});let{restApi:I,reqType:_}=U(vn,{page:s,pageClass:a});return k(I,{method:_,headers:u},i)})()).pipe(O(I=>{let _={};return typeof I.data=="string"?_=JSON.parse(I.data):_=I.data,{response:{..._,key:m,semanticURL:m},actionConfig:n,headers:we(I.headers),removeActionPayload:A,skipSemanticUrl:c}}),me(": Error ocurred during ajax call at showPage Epic : ",n.context)):(w.rejectActionByID(e),Et)))}),z(async n=>{let o={};if(o.actionManagerID=n?.actionConfig?.actionMgrID,n&&n.type===Te)return r.push(ue(n)),o;let{type:i}=n,{actionConfig:s,skipSemanticUrl:a}=n,c=s.containerName||Vt.getTargetViewContainerName(Pr),l=Z(c,s.context);$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className});let{remoteCasePayload:u,updatedType:p}=hj(i,n,s,l);if(i=p??i,s.isDeferLoaded){let{response:m,headers:f={}}=n,{isCreateDataObject:h,context:S}=s,A=Le(m,{isCreateDataObject:h});A.directUrlUpdation=!a,await Pe(A,s,{acName:l,context:S});let _=$e(A,{containerItemID:S,target:l,headers:f,context:S});o.rootView=g.getIn(A,d.ROOT),r.push(V(Re,_))}else if(i===nr){let{activateContainerActionPayload:{semanticURL:m,containerItemID:f}}=n,h=pe(f),S={acName:l,context:h};s.isTraditionalRemoteCase||await Pe({directUrlUpdation:!0,semanticURL:m},s,S,!0),r.push(V(rr,{target:l,containerItemID:f}))}else{let m=st(l,c,s.context),{response:f,headers:h={},removeActionPayload:S}=n,A=Le(f,{isCreateDataObject:s.isCreateDataObject});A.directUrlUpdation=!a;let C={acName:l,context:m},I=wn(m);await Pe(A,s,C);let _={target:l,context:m,containerItemID:m,headers:h,debugInfo:s.debugInfo,currentCaseViewMode:I,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName,pageName:s.viewName},N=$e(A,_);N.resourceType=E.PAGE,s.isCreateDataObject&&(N.resourceType=E.RESOURCE_TYPES.DATA,N.resourceStatus=E.RESOURCE_STATUS.CREATE,delete N.data.caseInfo,N.referenceList=s.referenceListStr,N.subscriptName=s.subscriptName),yj(s,u,N),N.data??={},N.data.traditionalGadgetId=B.getUniqueGadgetId();let x=Ht(l,N);S.containerItemID&&tn(x)&&r.push(V(Qe,{containerItemID:S.containerItemID,target:l})),r.push(x)}return $.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:l,pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),o}),O(({actionManagerID:n=0,rootView:o})=>{w.resolveActionByID(n,o),T(r),r=[]}),Fi())},xde=[Nde,Ode],E5=xde;var Dde="Error occurred during ajax call at showData Epic : ",wde=(t,e,r)=>{let{context:n,pageName:o,dataContext:i,dataContextParameters:s,semanticURL:a,skipSemanticUrl:c,RemoteSystemID:l}=t,{removeActionPayload:u}=e,p={};return p.RemoteSystemID=l,q((()=>{if(_t())return pr(Ro,{queryPayload:{pageName:o},body:{dataContext:i,dataContextParameters:s}});let{restApi:f,reqType:h,body:S}=U(Ro,{pageName:o,dataContext:i,dataContextParameters:s});return k(f,{method:h,headers:p,body:S},n)})()).pipe(O(f=>({response:{...f.data,key:a,semanticURL:a},actionConfig:t,headers:we(f.headers),removeActionPayload:u,skipSemanticUrl:c})),me(Dde,t.context,String(r)))},L0=wde;var{RESOURCE_TYPES:U0}=E,$de=(t,e)=>{let{context:r,pageName:n,dataContext:o,dataContextParameters:i,skipSemanticUrl:s=!1,isDeferLoaded:a=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:p}=t,m=Z(u,r),f="",h={context:r,pageName:n,dataContext:o,dataContextParameters:i,semanticURL:f,skipSemanticUrl:s,containerName:u,isDeferLoaded:a,parentAction:c,resourceType:l,RemoteSystemID:p};if(!s){f=At(Ro,{pageName:n,dataViewName:o},i),h.semanticURL=f;let{activate:S,activateContainerActionPayload:A}=Zi(U0.PAGE,m,{semanticURL:f});return S?ye({type:nr,activateContainerActionPayload:A,actionConfig:t}):q(vt(m,{loadingContext:r})).pipe(z(({continueExecution:C,removeActionPayload:I})=>C?L0(h,{removeActionPayload:I},e):(w.rejectActionByID(e),Et)))}return L0(h,{removeActionPayload:{}},e)},Mde=t=>{let e=0,r=[],n;return t.pipe(ee(ic),hc(o=>({actionMgrID:e}=o.payload,ye(o.payload).pipe(z(i=>$de(i,e)),z(async i=>{if(i&&i.type===Te)return r.push(ue(i)),r;let{type:s,actionConfig:a,headers:c,response:l,skipSemanticUrl:u}=i;n=g.getIn(l,d.ROOT);let{containerName:p,parentAction:m,resourceType:f}=a,h=Z(p,a.context),S,A=wn(a?.context);if(a.isDeferLoaded){S=Le(l),S.directUrlUpdation=!u;let C={acName:h,context:a.context};await Pe(S,a,C);let I={target:h,headers:c,context:a.context,containerItemID:i.containerItemID},_=$e(S,I);return r=V(Re,_),r}if(s===nr){let{activateContainerActionPayload:{semanticURL:C,containerItemID:I}}=i,_=pe(I);await Pe({directUrlUpdation:!0,semanticURL:C},a,{acName:h,context:_},!0),r.push(V(rr,{target:h,containerItemID:I,resourceType:U0.DATA}))}else if(f==="DATA"&&m===Li){let{context:C}=a,I=l?.data,_={context:C,data:I};r.push(V(Re,_))}else{let C=st(h,p,a.context),{removeActionPayload:I}=i;S=Le(l),S.directUrlUpdation=!u,await Pe(S,a,{acName:h,context:C});let x=$e(S,{target:h,context:C,containerItemID:C,headers:c,currentCaseViewMode:A});x.resourceType=U0.DATA;let H=Ht(h,x);I.containerItemID&&tn(H)&&r.push(V(Qe,{containerItemID:I.containerItemID,target:h})),pE(r),r.push(H)}return r}),O(()=>(w.resolveActionByID(e,n),T(r),r=[],r))))))},A5=Mde;var kde="Error occurred during ajax call at deleteDataObject Epic",Lde=t=>{let{dataViewName:e,context:r,dataViewParameters:n}=t,o={data_view_ID:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))},{restApi:i,reqType:s}=U(Fk,o);return q(k(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t})),me(kde,r))},C5=Lde;var Ude=t=>{let e=0,r=[];return t.pipe(ee(sS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>C5(n)),z(async n=>{if(n&&n.type===Te){let{payload:o}=n,i=ue({...n,...o,actionMgrID:e});return r.push(i),r}return[]}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},_5=Ude;var jde="Error occurred during ajax call at GET data object actions : ",zde=t=>{let{dataViewID:e,dataViewParameters:r,context:n}=t,o={data_view_ID:e},{restApi:i,reqType:s}=U(zk,o);return q(k(i,{method:s,body:{dataViewParameters:r}},n)).pipe(O(a=>({...a.data})),me(jde,t.context))},I5=zde;var Fde=t=>{let e=0,r=[],n=100,o={};return t.pipe(ee(Zy),gr(n),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>I5(i)),z(async i=>i&&i.type===Te?(r.push(ue(i)),r):(o=i,[])),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,o),T(r),r=[],r)))},b5=Fde;var Vde=[A5,Kx,Jx,Yx,_5,b5,Zx,Qx],T5=Vde;var{RESOURCE_TYPES:{CASE:Bde,DATA:Hde,OBJECT:Gde,PAGE:qde}}=E,Wde=(t,e,r)=>{e===qde&&r&&(t.pageName=r)},ml=[],fl=!1,rp=!1,gI=null,Kh=null,j0={},Kde=t=>t.pipe(ee(Qy),fm(200),O(e=>e.payload),z(e=>{rp=!1,$.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rp=!0});let r=br.getPreviewMode()&&Ge.addDebugHeaders({debugId:g.generateUniqueID()});j0.dataContext=e.payload.dataViewName,j0.dataContextParameters=e.payload.dataViewKeys;let{context:n,requestType:o,routeKey:i}=e,{routeEndpoint:s}=e;s&&(s.indexOf("viewType={viewType}")>0?s=s.replace("{viewType}","page"):s.indexOf('viewType=""')>0&&(s=s.replace('viewType=""','viewType="page"'))),fl=i===Jr,fl&&Ve.setNeedsMapping(!0);let a=gt.getServerURL()+s,c=e.options.context,l,u={},p=e?.payload?.caseClassName;if(ae.isRemoteCase(p)){let{RemoteSystemID:m}=ae.getRemoteCase(p);u.RemoteSystemID=m}if(v.isWSSPortal()&&(u[d.X_ORIGIN_CHANNEL]="WSS"),o==="POST"){l=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let m=kT(i),f;switch(m){case Bde:case Gde:f={caseTypeID:l.caseTypeID,processID:l.processID,content:{}};break;case Hde:f=j0;break;default:f=l}return q(k(a,{method:o,body:f,headers:{...u,...r}},n)).pipe(O(h=>({response:{...h.data},payload:e,headers:we(h.headers,"",u)})),me(": Error occurred during ajax call at historyEpic : ",e))}return q(k(B.appendExcludeQueryParamToUrl(a),{method:"GET",headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(m=>({response:m.data,payload:e,headers:{...we(m.headers),...r}})),zi(m=>{if(i===zs){let f={messages:[{type:"error",message:m.response.data.errorDetails[0].localizedValue}],category:"PAGE"};pt.setComponentCache("assignments-launchAssignment-Error",f);let h=iE(y_()),S=_e.getEndPointInfo(h.split("/assignments")[0]),A=gt.getServerURL()+S.routeEndpoint;return e={...e,routeKey:Kt,resetSemanticURL:!0},q(k(A,{method:S.reqType,headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(C=>({response:C.data,payload:e,headers:{...we(C.headers),...r}})))}return ye(Qi(": Error occurred during ajax call at historyEpic : ",m,n))}))}),z(async e=>{if(rp)return ml;if($.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rp=!0}),e&&e.type===Te)return ue(e);let{headers:r={},response:n,payload:o}=e,i=Le(n,{[E.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=o.options.acName,a=It(s)&&jr(s)?se(s):e.payload.options.context,c=a;r.RemoteSystemID=o?.payload?.RemoteSystemID,Kh={target:s,context:a,containerItemID:c,headers:r,debugInfo:{debugId:r[d.COREHEADER_APP_DEBUG_ID]}};let l=o?.payload?.pageClass,u=o?.payload?.page,p=fl?Jr:Kt,m=fl?o.payload.objectID:o.payload.workID,f=fl?"{objectID}":"{workID}",h=fl?`objects/${m}`:"";o?.payload?.caseName&&m&&(h=At(p,{caseName:e.payload.payload.caseName}),h=h?.replace(f,m)||"",l=o?.payload?.caseClassName),(o?.routeKey===zs||o?.resetSemanticURL)&&YU(c,i),Ej(o?.routeKey,i),Aj(i),$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:u,pageClass:l}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});let S=g.getIn(i,d.COMPONENTS);S&&await fo(S),Gi(i,o.options.actionConfig,!0),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:u,pageClass:l});let A=$e(i,Kh),C=kT(e.payload.routeKey);return A=gj(C,{...n.data,semanticURL:h,caseViewMode:d.REVIEW_MODE},A),A.data.traditionalGadgetId=B.getUniqueGadgetId(),Wde(A,C,u),ml.push(Ht(s,A)),gI=i,Sj(a,ml),ml}),O(()=>(rp||T(ml),gI&&Kh&&dr(gI,Kh),ml=[],fl=!1,rp=!1,Kh=null,gI=null,ml)),me("Error occurred")),Jde=[Kde],v5=Jde;var Yde=t=>{let e=0;return t.pipe(ee(Vs),O(r=>({actionMgrID:e}=r.payload,r.payload)),O(()=>{let r=De()?.getState(),n=qh();return lo(r,n)&&e>0?w.resolveActionByID(e,{}):w.rejectActionByID(e),[]}),Fi())},Zde=[Yde],R5=Zde;var Qde=t=>{let e=0,r=[];return t.pipe(ee(qy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,insightID:s}=n,a="",c;i||(a=At(sc,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),c=_e.getEndPointInfo(a));let{restApi:l,reqType:u}=U(sc,{...c?.payload||[],insightID:s});return q(k(l,{method:u},o)).pipe(O(p=>{let m={};return typeof p.data=="string"?m=JSON.parse(p.data):m=p.data,{response:{...m,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Vt.getTargetViewContainerName(Pr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=$e(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Ht(a,S);return r.push(A),r}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),Fi())},Xde=[Qde],P5=Xde;var epe=t=>{let e=0,r=[];return t.pipe(ee(Wy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,dashboardID:s}=n,a="";i||(a=At(lm,{dashboardID:s}),a=a.replace("{dashboardID}",s));let{restApi:c,reqType:l}=U(lm,{dashboardID:s});return q(k(c,{method:l},o)).pipe(O(u=>{let p={};return typeof u.data=="string"?p=JSON.parse(u.data):p=u.data,{response:{...p,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Vt.getTargetViewContainerName(Pr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=$e(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Ht(a,S);return r.push(A)}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),Fi())},tpe=[epe],N5=tpe;var rpe="Error occurred during ajax call at createObject Epic : ",O5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(rpe,n))};var x5="CREATE_OBJECT";var npe=(t,e)=>B.isExternalObject(t)&&e?e:zo(),ope=t=>{let e=0,r=[],n={},o,i=100,s=!1;return t.pipe(ee(x5),gr(i),Ft(a=>{if({actionMgrID:e}=a.payload,B.isExternalObject(a.payload.class)&&!xr(a.payload.context)){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),ye([])}return ye(a.payload).pipe(z(c=>{let{context:l}=c;o=c.class;let u=N0(c),p=Z(u,l);return s=!1,q(Ua(p,{loadingContext:l})).pipe(z(({continueExecution:m,removeActionPayload:f,dirtyCheckPerformed:h})=>m?(s=h,O5(c,{removeActionPayload:f})):(w.rejectActionByID(e),Et)))}),z(async c=>{if(c&&c.type===Te)return c.payload.context=npe(o,c.payload.context),r.push(ue(c)),r;let{actionInPayload:l,response:u,headers:p,removeActionPayload:m}=c,f=Xd(l,u);g.setIn(u.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let h=N0({...l,isInCreateStage:f}),S=Z(h,l.context),A=st(S,h,l.context);if(FB(l,r),!s&&BB(h,S,o)){let{continueExecution:ne}=await vt(S,{loadingContext:l.context});if(!ne)return w.rejectActionByID(e),r}let C=l?.openCaseViewAfterCreate??!0;if(VB(C,f)){let{businessID:ne,caseType:be,resolvedURL:he}=ZS(u);return n={id:ne,label:be,href:he},ja(n),Yd({caseId:ne,caseType:be}),r}GB(l);let I=Le(u),_=String(er(go(I))),N=At(Yo,{caseClassName:Yn(I)});N=N.replace(/{.+?}/,_),I.semanticURL=N,pt.setComponentCache(_,Ge.addDebugHeaders(l.debugInfo)),Zd(I,l),await Pe(I,l,{acName:S,context:A});let H=Qd(I),G={target:S,context:A,headers:p,semanticURL:N,caseViewMode:H,containerItemID:A,isInCreateStage:f,isMinimizable:f,assignmentContext:g.getIn(I,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(I,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:l.openCaseViewAfterCreate,modalOptions:l.modalOptions,debugInfo:l.debugInfo};ti(G,I);let re=$e(I,G),j=Ht(S,re);return HB(j,{removeActionPayload:m,target:S},r),r.push(j),r}),O(()=>(gn(r),mt(r,e),setTimeout(()=>qB(o)),n={},r=[],r)))}))},D5=ope;var ipe="Error occurred during ajax call at executeObjectWideAction Epic : ",w5=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},jsActionQueryParams:a}=t,{state$:c}=e,l=it.PAGE,u=Jk,p={assignmentID:r,actionID:n,viewType:l,objectID:o},{restApi:m}=U(u,p),{reqType:f}=U(u,p);l&&!m?.includes("viewType=")&&(m=m?.includes("?")?`${m}&viewType=${l}`:`${m}?viewType=${l}`),m=fu(a,m),t.viewType=l;let{content:h}=Rt(i,{isObjectWideAction:!0}),S=c.value.data[i]?.objectInfo?.headers||{},{etag:A}=S,C={"if-match":A,...s};return q(k(m,{method:f,body:h,headers:C},i)).pipe(O(I=>{let{data:_,headers:N}=I;return Ve.analyseResponse(I.data),{actionInPayload:t,response:_,headers:we({...C,...N})}}),me(ipe,i))};var spe=(t,e)=>{let{isCaseWideAction:r}=e;return{isCaseWideAction:r,caseID:go(t)}},$5=spe;var{RESOURCE_TYPES:ape}=E,cpe=(t,e)=>{let r=0,n=[],o={},i="";return t.pipe(ee(ru),Ft(s=>{if({actionMgrID:r}=s.payload,i=s.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!xr(i)){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,a),Ct.handleDeferredActionCompletion(s.payload.context),ye([])}return ye(s.payload).pipe(z(a=>{iI(n,a);let c={...a};return w5(c,{state$:e})}),z(async a=>{if(a?.type===Te){let ne=ue(a);return n.push(ne),n}Ao.clearContextedCache(i);let{headers:c,actionInPayload:l,response:u}=a,{containerItemID:p,isModalAction:m,isInCreateStage:f}=l,h=te(p);l.target=h,g.setIn(u.data,d.OBJECT_INFO_IS_LOCAL_ACTION,!1),dI({submitResponse:u});let S=Le(u,{[E.STOPMERGEACTIONS]:!u.nextAssignmentInfo}),A=Yn(S),C=qe(l.context),I=Ke(C)[0]?se(Ke(C)[0]):C,_=kU(S),N=f&&!_;m&&!f&&!pl(l.context,I)&&(S=dE(S,W(p)));let x=$e(S,{headers:c,actionMgrID:r,directUrlUpdation:!1});LU(x.data,l),x.caseClassName=A,x.resourceType=ape.ASSIGNMENT,x.headers=c;let H=!1,G=go(S);ti(x,S);let re=At(Yo,{caseClassName:A}).replace(/{.+?}/,String(er(G)));S.semanticURL=re,x.semanticURL=re,await cI(l,x,H,G,S,n,a,u,!0),N&&(o=aI(l),Yd({caseId:l.caseID,caseType:l.caseTypeID,assignmentId:l.assignmentID})),UU(a,n),Ct.handleDeferredActionCompletion(i),lI(x,l,I);let j=$5(S,l);return eE({...j,containerItemID:p}),sI(n,{transientItemID:p,target:h,isModalAction:m}),n}),O(()=>{let a=n.find(c=>c.type===Te);return a?(Ct.handleDeferredActionCompletion(i),uI(a),w.rejectActionByID(r)):w.resolveActionByID(r,o),gn(n),Ve.setNeedsMapping(!1),n=[],o={},n}))}))},M5=cpe;var lpe="Error occurred during ajax call at getObject Epic : ",k5=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t.pageName?t.pageName:d.VIEW_NAMES.PY_DETAILS,l=U(Jr,{objectID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),q(k(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m.data),{response:m.data,actionInPayload:t,headers:we({...n,...m.headers}),removeActionPayload:a})),me(lpe,o))};var L5=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Lt(Jr,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u}),t.push(V(rr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},U5=t=>{let e=go(t),r=Yn(t),n=At(Jr,{objectClassName:r});return n=n?.replace("{objectID}",String(er(e))),n};var j5="GET_OBJECT";var{RESOURCE_TYPES:z5}=E,upe=async(t,e)=>{let{actionInPayload:r,activateContainerActionPayload:n,type:o,response:i,removeActionPayload:s,headers:a}=t,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=Lt(Jr,r),m=Z(p,c);if(rE(o))await L5(e,{activateContainerActionPayload:n,actionInPayload:r});else{let h=st(m,p,c,{buildNew:!0}),S=Le(i),A=U5(S);S.semanticURL=A,S.directUrlUpdation=!l,await Pe(S,r,{acName:m,context:h});let I=$e(S,{target:m,context:h,containerItemID:h,semanticURL:A,headers:a,debugInfo:u});I.caseViewMode=d.REVIEW_MODE,I.resourceType=z5.OBJECT,ti(I,S);let _=Ht(m,I);s.containerItemID&&tn(_)&&e.push(V(Qe,{containerItemID:s.containerItemID,target:m})),e.push(_)}let f=r.insKey;tE({caseKey:f,actionInContext:c})},dpe=t=>{let e=0,r=[];return t.pipe(ee(j5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,isChild:i,viewType:s}=n,a=Lt(Jr,n),c=Z(a,o),l=s!=="none"?vt(c,{loadingContext:o}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return q(l).pipe(z(({continueExecution:u,removeActionPayload:p})=>{if(!u)return w.rejectActionByID(e),Et;let{activate:m,activateContainerActionPayload:f}=Zi(z5.OBJECT,c,n);return m&&!i&&s!=="none"?ye({type:nr,activateContainerActionPayload:f,actionInPayload:n}):k5(n,{removeActionPayload:p})}))}),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;if(n?.actionInPayload?.viewType==="none"){if(W(n?.actionInPayload?.context)?.context_data?.caseViewMode!==d.PERFORM_MODE){let s={data:{...Le(n?.response)?.data},context:n?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:pn,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r.push(V(Re,s));let a=te(n?.actionInPayload?.context),c=Lr(n?.actionInPayload?.context),l=Object.freeze({target:a,containerItemID:n?.actionInPayload?.context,context:n?.actionInPayload?.context,containerName:c});if(YS(n?.actionInPayload?.context)){let u=$e(n?.response,{...l});yo({...u,isArrayDeepMerge:!0},r)}}}else await upe(n,r);return r}),O(()=>(T(r),mt(r,e),r=[],r)))},F5=dpe;var V5="OPEN_OBJECT_ACTION";var ppe=(t,e,r,n)=>{let o,i,s=!1,a=mr(t);return!jr(t)||a&&!ll(t,n)?(i=lr(e,r),en(e)&&(i=Yr(r,i)),o=i,s=!0):(o=a?wt(t,n):se(t),i=pe(o)),{context:i,containerItemID:o,isNewContainerItem:s}},mpe=t=>t?d.PERFORM_MODE:d.REVIEW_MODE,fpe=t=>t?Pt:tr,z0=t=>{let{actionID:e,caseID:r,context:n,openActionType:o,modalLoadingContainer:i}=t,s=it.FORM,a=U(fS,{objectID:r,actionID:e,viewType:s}),{reqType:c}=a,{restApi:l}=a;t.actionType=d.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${s}`:`${l}?viewType=${s}`);let u=i?.context??n;return q(k(l,{method:c,headers:{}},u)).pipe(O(p=>(Ve.analyseResponse(p.data),{response:p.data,actionInPayload:t,headers:we(p.headers)})),me(`: Error occurred during ajax call at ${o} Epic : `,u))},B5=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c}=n,l=Le(t,{info:E.OBJECT_INFO.OBJECT_INFO}),u=Lt(s,n),p=c?.target??Z(u,o),{context:m,containerItemID:f,isNewContainerItem:h}=ppe(p,u,o,t.data.objectInfo.ID);await Pe(l,n,{acName:p,target:p,containerName:u,context:m});let A=l.uiResources?.root,C=mpe(A),I=$e(l,{target:p,context:m,containerItemID:f,caseViewMode:C,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:en(u),resourceType:E.RESOURCE_TYPES.OBJECT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,actionType:n.actionType});if(A&&ti(I,l),en(u)&&delete I.doDeleteCaseSummary,e.push(V(fpe(h),I)),h||e.push(V(gs,I)),h){let _=Ke(n.contextName),N=wt(_,t.data.objectInfo.ID);if(N){let x={data:{objectInfo:{headers:r}},context:N};e.push(V(Re,x))}}return f!==se(p)&&e.push(V(rr,{target:p,containerItemID:f})),YS(f)&&!c?.context&&yo(I,e),e};var gpe=t=>{if(t.openActionType=fS,Lt(t.openActionType,t)===d.MODAL){let r=Lt(t.openActionType,t),n=Z(r,t.context),o=Yr(t.context,lr(r,t.context));return T(Pt({target:n,context:o,containerItemID:o,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:t.caseID,objectInfo:{ID:t.caseID}}})),T(Mh({context:o})),t.modalLoadingContainer={target:n,context:o},z0(t)}return z0(t)},H5=gpe;var hpe=t=>{let e=0,r=[];return t.pipe(ee(V5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>H5(n)),z(async n=>{if(Je(n.type)){let c=ue(n);return r.push(c),W(n.payload.context)?.context_data?.isLoading&&r.push(V(gs,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.objectInfo.activeActionID",a),g.setIn(s.data,d.getProperty(d.OBJECT_INFO_IS_LOCAL_ACTION),!0),o.refreshConditions&&g.setIn(s.data,d.getProperty(d.CASE_INFO_REFRESH_CONDITIONS),o.refreshConditions),await B5(s,r,{headers:i,actionInPayload:o}),pI(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},G5=hpe;var F0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(Bs)};var ype="Error occurred during ajax call at createObject Epic : ",q5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(ype,n))};var W5="CREATE_EXTERNAL_OBJECT";var Spe=t=>{let e=0,r=[],n=!1;return t.pipe(ee(W5),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=F0(i),c=Z(a,s);return n=!1,q(Ua(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,q5(i,{removeActionPayload:u})):(w.rejectActionByID(e),Et)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=zo(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=Xd(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let p=F0({...s,isInCreateStage:u}),m=Z(p,s.context),f=st(m,p,s.context);if(!n&&!en(p)&&It(m)){let{continueExecution:x}=await vt(m,{loadingContext:s.context});if(!x)return w.rejectActionByID(e),r}let h=Le(a),S=At(Bs,{caseClassName:Yn(h)});S=S.replace(/{.+?}/,String(er(go(h)))),h.semanticURL=S,Zd(h,s),await Pe(h,s,{acName:m,context:f});let C=Qd(h),I={target:m,context:f,headers:c,semanticURL:S,caseViewMode:C,containerItemID:f,isInCreateStage:u,isMinimizable:u,assignmentContext:g.getIn(h,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(h,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalObjectCreationFlow:!0};ti(I,h);let _=$e(h,I),N=Ht(m,_);return tn(N)&&ri(r,{removeActionPayload:l,target:m}),r.push(N),r}),O(()=>(gn(r),mt(r,e),r=[],r)))},K5=Spe;var J5=t=>{let{workId:e,context:r,isExternalCase:n}=t,o=n?rS:Zk,{restApi:i,reqType:s}=U(o,{ID:e});return q(k(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t,headers:we(a.headers)})),me("Error occurred during ajax call at deleteWork Epic : ",r))};var Y5=t=>{$.publish(d.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,t)};var Epe=t=>{let e=0,r,n=[];return t.pipe(ee(Mx),O(o=>({actionMgrID:e,caseTypeID:r}=o.payload,o.payload)),z(o=>{if(!o.skipDeleteConfirmation&&!o.ignoreWorkDeletion){let i=ge.MODAL,s=Z(i,o.context),a=Yr(o.context,lr(i,o.context));return T([V(Pt,{target:s,context:a,containerItemID:a,containerName:i,isDeleteConfirmation:!0,actionName:"Delete",workId:o.workId,caseTypeID:r,className:o.className,keys:o.keys,...o.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:r}}})]),w.resolveActionByID(e),Et}return o.ignoreWorkDeletion?ye({actionInPayload:o}):J5(o)}),z(async o=>{if(o&&Je(o.type)){let{payload:a}=o;return n.push(ue({...o,...a,actionMgrID:e})),n}let{actionInPayload:i}=o,{context:s}=i;if(ja({content:Nr().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(d.PREVIEW)&&n.push(V(wc,Dc({context:d.APP.APP,name:d.PREVIEW}))),s?.includes(d.MODAL)){let a=ge.MODAL,c=Z(a,s);We(c,s)?.enableBackNavigation&&window?.history?.back()}return n}),O(()=>(T(n),mt(n,e)===d.PROMISE_VALUE.RESOLVE&&Y5({caseTypeID:r}),n=[],n)))},Z5=Epe;var Ape=[D5,F5,M5,G5,K5,Z5],Q5=Ape;var X5=yV(...AB,...S5,...E5,...v5,...T5,...CB,...R5,...P5,...N5,...Q5);var Cpe=new Set([St,kt,Ze,et,ks,Ls,Wo]),_pe=()=>t=>e=>{let{type:r="",payload:n={}}=e||{},{category:o,context:i,transientItemID:s}=n;if(o==="HTTP"||!Cpe.has(r)){t(e);return}fE(i||s),Ie.removeContextTreeNode(i||s),(r===St||r===Ze)&&n?.target?.indexOf("modal")!==-1&&$.publish(E.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,r),t(e)},eH=_pe;var gl={},Ipe=new Set([St,Er,Jo,et,Ze]),tH=t=>(gl[t]||(gl[t]={}),gl[t]),bpe=(t,e,r)=>{let n=tH(t),o=tH(d.CONTEXT),i=n[e]??[];n[e]=[...new Set([...i,r])];let s=o[r]??[];o[r]=[...new Set([...s,e])]},Tpe=(t,e)=>{let r=e.lastIndexOf("_"),n=r>-1?e.slice(0,r):e,o=gl[n],i=o?.[e];if(i){let s=i.indexOf(t);s>-1&&i.splice(s,1)}return i&&i.length>0?null:(o&&(delete o[e],Object.keys(o).length===0&&delete gl[n]),{dataPageName:n,dataPageNameWithHash:e})},V0=t=>{if(!t)return;let e=gl[d.CONTEXT],n=(e?.[t]??[]).map(o=>Tpe(t,o)).filter(o=>!!o);e&&(delete e[t],Object.keys(e).length===0&&delete gl[d.CONTEXT]),n.length>0&&T(kw({dataPagesToBeRemoved:n}))},rH=(t={},e)=>{e&&Object.keys(t).forEach(r=>{let n=t[r];Object.keys(n??{}).forEach(o=>{bpe(r,o,e)})})};var vpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{V0(r)})},Rpe=(t,e)=>{let{data:r={},context:n=null,childContainersContexts:o=[]}=e??{};if(vpe(t,o),t===St||t===Er||t===Jo){let i=t===Jo?r:r.shared;rH(i,n);return}if(t===et){V0(n),rH(r.shared,n);return}t===Ze&&V0(n)},Ppe=()=>t=>e=>{(Array.isArray(e)?e:[e]).forEach(n=>{let o=n?.type;Ipe.has(o)&&Rpe(o,n?.payload)}),t(e)},nH=Ppe;var{PUB_SUB_EVENTS:oH}=E,Npe=new Set([Ze,et]),Ope=(t,e,r,n,o,i)=>{let s=t.getState(),{resourceType:a,key:c,context:l}=g.getIn(s,["containers",e,"items",r])||{},u=g.getIn(s,["data",l,d.CONTEXT_DATA,"initiatingContext"]),p={resourceType:a,key:c,context:l,containerItemID:r,...u&&{initiatingContext:u},...n!==void 0?{eventName:n}:{}};$.publish(oH.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,p),e===`${E.APP.APP}/${d.PRIMARY}`&&i===d.CONTAINER_TYPE.MULTIPLE&&$.publish(oH.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:c,newAccessedOrder:o})},xpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{r&&Th.cleanCaches(r)})},Dpe=t=>e=>r=>{let n=o=>{if(!Npe.has(o.type))return;let{type:i,payload:{target:s,containerItemID:a,context:c,deleteContext:l,childContainersContexts:u=[],containerInfo:{newAccessedOrder:p,containerType:m}={newAccessedOrder:new Array,containerType:""},eventName:f}={}}=o;i===Ze&&Ope(t,s,a,f,p,m),xpe(i,u),c&&(i===et||i===Ze&&l)&&Th.cleanCaches(c)};Array.isArray(r)?r.forEach(n):n(r),e(r)},iH=Dpe;var wpe=t=>t===`${d.APP.APP}/${d.PRIMARY}`,$pe=new Set([St,et,Ze]),B0=t=>t===`${d.APP.APP}/${d.MODAL}`,Mpe=(t,e,r,n,o)=>{t&&e&&(B0(o)?GU({caseId:t,caseClass:r,context:n||""}):BU({caseId:t,caseClass:r,context:n||""}))},kpe=(t,e)=>{t&&(B0(e)?qU({caseId:t,caseClass:"",context:""}):HU({caseId:t}))},Lpe=()=>t=>e=>{if(!e||typeof e!="object"||!("type"in e)||typeof e.type!="string"||!$pe.has(e.type)){t(e);return}let{type:r}=e,{payload:n}=e,{target:o,key:i,context:s,data:a}=n||{};if(wpe(o)||B0(o)){let c=a?.caseInfo?.ID,l=s||"",u=oe(d.CASE_INFO.CASE_INFO_ID,"",l)||"",p=a?.caseInfo?.caseTypeID||"";if((r===et||r===Ze)&&kpe(u,o),r===St||r===et){t(e),Mpe(i,!!c,p,l,o);return}}t(e)},sH=Lpe;var Upe=new Set([St,kt,et,Ze,uo]),jpe=()=>t=>e=>{if(!e||!Upe.has(e.type)){t(e);return}let{payload:{context:r=null,transientItemID:n=null,clearStateMachine:o=!0}={},type:i}=e;r&&(i===St||i===kt||i===et||i===Ze)&&o&&(Em(r),ym(r)),n&&i===uo&&(Em(n),ym(n)),t(e)},aH=jpe;var zpe=new Set([St,et,Ze,kt]),np=t=>typeof t=="object"&&t!==null,Fpe=t=>np(t)&&typeof t.context=="string",Vpe=t=>({context:t.context,data:np(t.data)?t.data:{},resourceType:typeof t.resourceType=="string"?t.resourceType:"",caseID:typeof t.caseID=="string"?t.caseID:void 0}),Bpe=t=>np(t)&&typeof t.type=="string",lH=t=>t?.toString().includes(d.MODAL)??!1,vi=t=>g.getIn(t,d.CASE_INFO.ASSIGNMENT_ID),Jh=t=>g.getIn(t,["caseInfo","ID"]),cH=t=>{if(!t)return;let e=W(t);return np(e)?e:void 0},Hpe=(t,e,r,n)=>{let o=Jh(e),i=vi(e);!o||!i||o===r&&i===n||Su({actionInContext:t,assignmentID:i,caseKey:o})},Gpe=(t,e,r,n)=>{if(t===Ze){Su(n);return}(t===kt||t===et)&&Hpe(e,r,n.caseKey,n.assignmentID),Rm(n)},uH=t=>{let e=Object.keys(Tt.subscribers);for(let r=0;r<e.length;r+=1){let n=e[r],o=Tt.subscribers[n],{matcher:i,criteria:s}=o.filter;i==="COACH_UPDATE"&&s?.caseId===t&&Tt.unsubscribe(n)}},qpe=(t,e,r)=>{if(r===d.RESOURCE_TYPES.ASSIGNMENT){let n=vi(e),o=g.getIn(e,["caseInfo","ID"]);if(n&&o)return{actionInContext:t,assignmentID:n,caseKey:o}}else if(r===d.RESOURCE_TYPES.CASE&&t?.includes("workarea")){let n=g.getIn(e,["caseInfo","ID"]),o=vi(e);if(n&&o)return{actionInContext:t,assignmentID:o,caseKey:n}}},Wpe=(t,e,r)=>{if(r!==d.RESOURCE_TYPES.ASSIGNMENT)return;let n=W(t),o=vi(n),i=vi(e),s=Jh(e)??Jh(n);if(o&&o!==i&&s&&Su({actionInContext:t,assignmentID:o,caseKey:s}),i&&s)return{actionInContext:t,assignmentID:i,caseKey:s}},Kpe=(t,e)=>{if(t?.includes("workarea")){let r=vi(W(t));r&&Su({actionInContext:t,assignmentID:r,caseKey:e})}else uH(e)},Jpe=(t,e,r,n)=>{if(t?.includes("workarea")){let o=vi(W(t));o&&Su({actionInContext:t,assignmentID:o,caseKey:n})}else uH(n);if(r===d.RESOURCE_TYPES.ASSIGNMENT){let o=vi(e);if(o)return{actionInContext:t,assignmentID:o,caseKey:n}}},Ype=(t,e)=>{let r=np(t.payload)?t.payload:void 0;if(!r||!lH(r.target))return!1;let n=typeof r.context=="string"?r.context:void 0,o=np(r.data)?r.data:void 0,i=typeof r.caseID=="string"?r.caseID:void 0,s=typeof r.assignmentID=="string"?r.assignmentID:void 0,a=cH(n);e(t);let c=t.type===Ze?a:cH(n),l=i??Jh(o)??Jh(c),u=s??vi(o)??vi(c);if(!n||!l||!u)return!0;let p={actionInContext:n,assignmentID:u,caseKey:l};return Gpe(t.type,n,a,p),!0},Zpe=(t,e)=>{if(lH(e.target))return;let{context:r,data:n,resourceType:o,caseID:i}=e;if(t===St)return qpe(r,n,o);if(t===kt)return Wpe(r,n,o);if(t===Ze&&i){Kpe(r,i);return}if(t===et&&i)return Jpe(r,n,o,i)},Qpe=()=>t=>e=>{if(!Bpe(e)||!zpe.has(e.type)){t(e);return}let{type:r,payload:n}=e;if(Ype(e,t))return;let o;Fpe(n)&&(o=Zpe(r,Vpe(n))),t(e),o&&Rm(o)},dH=Qpe;var pH=new Set([vo,wi,Ky,Rk,Mi,HI]),Xpe=new Set([St,et,kt,Ze,BI,Ui,Tn,po,...pH]),eme=(t,e)=>t===Mi?e.saveActionPayload?.containerItemID:t===HI?e.saveContainerItemID??e.context:e.containerItemID??e.context,tme=(t,e)=>{if(!n6(e))return!1;let r=e.containerItemID||t,n=e.target||te(r),o=We(n,r),i=e.resourceType||o?.resourceType,s=e.key||o?.key;return i===d.RESOURCE_TYPES.ASSIGNMENT&&!!s},rme=(t,e,r)=>{t===St||t===et||t===kt&&e.data?(fs(r)&&f_(r),t===et&&LD(r),tme(r,e)&&i6(r,{containerName:e.containerName??""})):t===Ze&&(fs(r)&&f_(r),LD(r))},nme=(t,e)=>{if(t!==Ze||!e.includes(d.MODAL))return;let r=Po(e),n=`${r}/`;for(let o of a6())(o===r||o.startsWith(n))&&l6(o)},ome=(t,e)=>{if(e.context){if(t===Tn){VS(e.context,null),Bd(e.context);return}t===po&&!e?.isDefault&&!e?.skipDirtyValidation&&Bd(e.context)}},ime=(t,e,r)=>{if(t===BI){e.autosave||g_(r);return}if(t===Ui){c6(r);return}pH.has(t)&&g_(r)},sme=t=>typeof t=="object"&&t!==null,ame=()=>t=>e=>{if(e&&typeof e=="object"&&"type"in e&&"payload"in e&&typeof e.type=="string"&&Xpe.has(e.type)&&sme(e.payload)){let{type:r,payload:n}=e,o=eme(r,n);o&&(nme(r,o),rme(r,n,o),fs(o)&&(ome(r,n),ime(r,n,o)))}t(e)},mH=ame;var fH=SV(),cme=t=>{if(De()!==null){ps();return}let e=[h6.propertyChangeMiddleware,eH,nH,aH,fH,dH,mH,sH,iH],r=z9({reducer:lB(t),middleware:n=>n({serializableCheck:!1,thunk:!1}).concat(e),enhancers:n=>n().prepend(a0).concat(a0)});fH.run(X5),bw(r)},hl=cme;var lme=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],H0=t=>lme.includes(t.split("-")[0])?"rtl":"ltr";async function ume(t){if(!t)return;let e=v.getLocale();v.setLocale(t);let r=v.getLocale();if(!(!r||r===e)){if(S_(["lang"]),typeof window<"u"){let n=new URL(window.location.href);n.searchParams.set("lang",r),window.history.replaceState(window.history.state,"",n.toString())}v.isInfinityRuntime()&&await us.loadLocaleBundle([r]),await qd(r),typeof document<"u"&&(document.documentElement.lang=r,document.documentElement.dir=H0(r)),T({type:Xl,payload:{locale:r}}),$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:r,previousLocale:e})}}var gH=ume;var dme=t=>typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(e=>typeof e=="string"),G0=class{#e(e,r,n,o,i){let s=!1;return e.IncludeInURL&&r!==void 0&&(o[e.Key]=r,e.Key==="portal"&&r!==n&&(s=!0)),Array.isArray(e.IncludeInHeaders)&&r!==void 0&&e.IncludeInHeaders.forEach(a=>{i[a.Value]||(i[a.Value]=[]),i[a.Value].push(`${e.Key}=${r}`)}),s}#t(e,r,n){let o={},i={},s=!1;return Array.isArray(e)&&e.forEach(a=>{let c=r[a.Key];this.#e(a,c,n,o,i)&&(s=!0)}),{urlParams:o,headerMap:i,isPortalChanged:s}}#r(e){let r=pt.getComponentCache("lastActionID"),n=vc.truncateNamespace(e),o=vc.truncateNamespace(typeof r=="string"?r:(r??"").toString());return n===o}#n({message:e}){let{RequestContext:r,ActionName:n}=e;if(!this.#r(n))return;let o=JSON.parse(r);if(!dme(o))throw new TypeError("RequestContext must be a JSON object with string values.");let i=o,s=v.environmentInfoObject?.requestContext,c=(typeof globalThis.location?.href=="string"?new URL(globalThis.location.href):null)?.searchParams.get("portal")??null,{urlParams:l,headerMap:u,isPortalChanged:p}=this.#t(s,i,c);pt.setURLParams(l),$.publish(d.PUB_SUB_EVENTS.EVENT_REQUEST_CONTEXT_CHANGED,i),Object.entries(u).forEach(([m,f])=>{let S=Ge.getRegisteredHeaders()[m]?.split(";").map(C=>C.trim())||[],A=new Map;[...S,...f].forEach(C=>{let I=C.indexOf("=");I!==-1&&A.set(C.slice(0,I),C)}),Ge.registerHeader(m,[...A.values()].join("; "))}),pt.setComponentCache("lastActionID",""),p&&globalThis.location&&globalThis.location.reload()}subscribeToGlobalEvents(){let e=g.generateUniqueID(),n={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:v.getOperatorIdentifier()||""}};Tt.subscribe(n,this.#n.bind(this),void 0,e)}},hH=new G0;var yH="displaySaveAssignmentBrowserNotification",q0=!1,SH=t=>{q0||($.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e=>{t("Save Assignment",e)},yH),q0=!0)},EH=()=>{$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,yH),q0=!1};var Yh=()=>{if(!(typeof globalThis>"u"))return globalThis.Notification},W0=()=>{let t=v?.environmentInfoObject;return t?.features?.pyEnableBrowserNotifications===!0||t?.pyFeatures?.pyEnableBrowserNotifications===!0},pme=()=>typeof document>"u"?"visible":document.visibilityState,hI=()=>typeof window<"u"&&typeof document<"u",AH=t=>{if(!t||typeof window>"u")return!1;try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}},K0=!1,Es={initialize(){!hI()||K0||!W0()||(SH(Es.notifyFromEvent),K0=!0,Yh()?.permission==="default"&&Es.requestPermission().catch(()=>{}))},destroy(){EH(),K0=!1},async requestPermission(){if(!hI()||!W0())return"denied";let t=Yh();if(!t)return"denied";if(t.permission!=="default")return t.permission;let e=t.requestPermission(),r=await Promise.resolve(e);try{Object.defineProperty(t,"permission",{configurable:!0,value:r})}catch{}return r},canShowNativeNotifications(){if(!hI()||!W0())return!1;let t=Yh();return!!(t&&t.permission==="granted")},notify(t){if(!hI()||!Es.canShowNativeNotifications()||t.notifyWhenVisible===!1&&pme()==="visible")return null;let e=Yh();if(!e)return null;let r=t.href??(t.caseTypeID&&(t.caseId||t.caseID)?gu.getSemanticURLForToaster(t.caseTypeID,t.caseId??t.caseID??""):void 0),n=AH(r)?r:void 0,o=t.title??t.label??t.caseTypeName??"Notification",i=t.body??t.caseId??t.caseID??t.caseTypeName??"",s=t.tag??t.caseId??t.caseID??t.caseTypeID??o,a=new e(o,{body:i,tag:s,icon:t.icon,silent:t.silent,requireInteraction:t.requireInteraction,data:{...t.data,href:n}});return a.addEventListener("click",()=>{Es.openNotificationTarget(n),a.close()}),a},async showNotification(t){let e=Yh();return e?.permission==="granted"?Es.notify(t):e?.permission==="denied"||await Es.requestPermission()!=="granted"?null:Es.notify(t)},openNotificationTarget(t){AH(t)&&(window.focus(),window.location.assign(t))},notifyFromEvent(t,e){let r={...e,title:e.title??t,body:e.assignmentID?`Assignment ${e.assignmentID} has been saved.`:e.body};Es.showNotification(r).catch(()=>{})}},yI=Es;var mme=()=>{$.publish(d.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},CH={publishConstellationLoadedEvent:mme};var J0=class{activateContainerItemOnSwitch(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().activateContainerItem(o)}removeContainerItemOnClose(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().removeContainerItem(o)}showCasePreview(e,r){let o=ct({meta:{type:"PreviewViewContainer",config:{name:d.PREVIEW}},options:{context:d.APP.APP,target:"root/hybrid_preview"}});o.getPConnect().getContainerManager().resetContainers({name:d.PRIMARY,context:d.APP.APP}),Ch(d.APP.APP,d.PREVIEW)||o.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:d.PREVIEW}),o.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:r})}closeCasePreview(){ct({}).getPConnect().getContainerManager().resetContainers({name:d.PREVIEW,context:d.APP.APP})}isFormDirty(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=JD(r,e);return rn.isStateModified(n)}getEventUtils(){return CH}getBroadcastUtils(){return Jd}isTraditionalUICase(e){return Dn(e)}},Zh=new J0;var Y0=class{static openCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.openCase(e,r,d.PRIMARY,n)}static createCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.createCase(e,r,d.PRIMARY,n)}static getNextWork(e=E.APP.APP,r={}){return r.renderInline=!0,r.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(r.pageName)),r.pageName=P.getDefaultQualifiedName(r.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),r.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),r?.disableAssignmentHeader?v.disableAssignmentHeader(r.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.getNextWork(e,d.PRIMARY,r)}static openAssignment(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.openAssignment(e,r,d.PRIMARY,n)}static openPage(e,r,n=E.APP.APP,o={}){let i=Pr;o?.defaultCasePage?(v.setDefaultCasePage(P.getDefaultQualifiedName(o.defaultCasePage)),o.defaultCasePage=P.getDefaultQualifiedName(o.defaultCasePage)):v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?v.disableAssignmentHeader(o.disableAssignmentHeader):v.disableAssignmentHeader(!1);let s={viewName:e,className:r,acTargetName:d.PRIMARY,actionMgrID:w.getNextActionMgrId(),context:n},{promise:a}=w.actionManagerPromise(i,s.actionMgrID);return T({type:i,payload:{...s}}),a}static getCurrentContextAPI(e,r=E.APP.APP){let n={meta:{config:{}},options:{context:r,pageReference:e,containerName:d.PRIMARY}};return ct(n).getPConnect()}},SI=Y0;var AI={};qt(AI,{buildResizeMessage:()=>_H,mashup:()=>EI});function fme(){try{let{ancestorOrigins:t}=globalThis.location;if(t&&t.length>0)return t[0]??""}catch{}return""}function Z0(t){if(!t||t==="*"||t==="null")return"";try{let e=new URL(t);return e.protocol!=="https:"&&e.protocol!=="http:"||e.origin==="null"?"":e.origin}catch{return""}}function _H(t){if(t.contentRect)return{height:t.contentRect.height};let e=Array.isArray(t.contentBoxSize)?t.contentBoxSize[0]:t.contentBoxSize;return"blockSize"in e?{height:e.blockSize}:"height"in e&&typeof e.height=="number"?{height:e.height}:{height:0}}var Q0=class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if(typeof globalThis.location>"u"||typeof globalThis.document>"u")return;let{resizing:r,parentOrigin:n}=e;this.gadgetName=globalThis.window.name,this.resize=r==="stretch",this.parentOrigin="",n?this.parentOrigin=Z0(n):globalThis.document.referrer?this.parentOrigin=Z0(globalThis.document.referrer):this.parentOrigin=Z0(fme());let o=globalThis.document.getElementsByTagName("app-root")[0];o&&(o.classList.add("mashup"),globalThis.window.parent!==globalThis.window&&this.resize&&this._registerResizeObserver(o))}send(e){if(typeof globalThis.window>"u"||typeof globalThis.location>"u")return;let{action:r,message:n}=e,o=JSON.stringify({gadgetName:this.gadgetName,action:r,message:n});globalThis.window.parent.postMessage(o,this.parentOrigin||globalThis.location.origin)}_registerResizeObserver(e){if(typeof globalThis.ResizeObserver!="function")return;new globalThis.ResizeObserver(n=>{for(let o of n){let i=_H(o);this.send({action:"resize",message:i})}}).observe(e)}_updateUrl(e){typeof globalThis.history>"u"||(globalThis.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:d.APP.ROOT,acName:"primary"}))}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin||typeof e.data!="string")return!1;let r;try{r=JSON.parse(e.data)}catch{return!1}return r.action==="UpdateUrl"&&this._updateUrl(r.message.url),!0}getMessageHandler(){return this.boundOnMessage}},EI=new Q0;typeof window<"u"&&window.addEventListener("message",EI.getMessageHandler(),!1);var IH={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},gme={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},hme="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",bH="portal-less-styles",X0=class{createC11nEnv=e=>ct(e);getContextUtils=()=>nu;getRoutingManager=()=>Hs;getComponentsRegistry=()=>Gs;getStateManager=()=>Se;getActionCreators=()=>rt;getStreamObservable=()=>GS;getActionProcessor=()=>ze;getActionHandler=()=>R_;renderApp=(e,r)=>{let n={context:d.APP.APP},i={...g.getIn(e,d.ROOT),options:n};hl(e),Gi(e,n,!0);let s=this.createC11nEnv({meta:i,isRoot:!0});$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:r})};updateStoreWithUiRoot=async(e,r,n)=>{let{data:o,uiResources:i={}}=e,{root:s}=i,a=g.getIn(i,d.CONTEXT_DATA),c=Le(e);await Pe(c,{},{},!1,!0);let l={...o,[d.CONTEXT_DATA]:a};BD(s,r,l,n)};fetchEndPointResource=(e,r,n)=>{k(e,{method:"GET"},d.APP.ROOT).then(o=>{o.status===200&&this.updateStoreWithUiRoot(o.data,r,n)})};loadComponent=async(e,r,n)=>{await fo(n);let o=this.createC11nEnv({meta:e,isRoot:!0});De()||hl({}),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:o,domContainerID:r})};setStaticServerUrl=(e,r,n)=>{Be.initServer(e,r,n)};loadView=async(e,r,n=[])=>{gt.init();let o=Le(e),i=g.getIn(o,d.VIEWS),s=g.getIn(o,d.NAVIGATIONS),a=g.getIn(o,d.COMPONENTS)||[];a.push(...n);let c=g.getIn(o,d.STATIC_SERVER_URL),l=g.getIn(o,d.APPLICATION_DATA);i&&hw(i),s&&yw(s),l9(l),c&&Be.initServer(c),await fo(a,c),this.renderApp(o,r)};initAppShell=(e,r,n)=>{Uh(e),Vt.buildActionTargetMap(r),gt.init(n)};initRoutingTable=(e,r)=>{Uh(e,!0),gt.init(r)};setAppAlias=e=>{Be.setAppAlias(e)};getHomeRestApi=e=>{let r=gt.getServerURL(),{restApi:n}=Tc("home",{portalName:e});return`${r}${n}`};getViewRestApi=(e,r)=>{let{restApi:n}=i9(e,r);return gt.getServerURL()+n};loadRootComponent=async(e,r,n=[],o,i,s)=>{let{config:a}=r||{},c=a?.name;if(De()||hl({}),s){let h=`${d.APP.ROOT}/${c}`;GD(h),h_().deleteContainerItem(h)}(h_().getContainerItems()||[]).length>1&&!c?.startsWith("hybrid_")&&c!=="authoring-preview"&&ps(),T(Re({data:{},context:d.APP.ROOT}));let u=this.createC11nEnv({meta:r,options:{context:d.APP.ROOT,pageReference:"",target:`${d.APP.ROOT}/${c}`}}),p=u.getPConnect(),m=`${p.getContextName()}/${p.getContainerName()}`;!se(m)&&a?.renderingMode!=="noPortal"&&p.getContainerManager().initializeContainers({type:"single"});let f=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await fo(f),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:u,domContainerID:e,componentName:"RootContainer",portalTarget:o,styleSheetTarget:i})};loadViewByName=(e,r,n,o)=>{let i=this.getViewRestApi(e,n);i===gt.getServerURL()&&(i=this.getHomeRestApi(r)),this.fetchEndPointResource(i,o)};loadPortalView=(e,r)=>{let o=this.getHomeRestApi(e);this.fetchEndPointResource(o,r,!0)};configureForBrowserBookmark=e=>{a9(e)};checkIfSemanticURL=()=>Lh();onPCoreReady=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Xr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{gt.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{Jn(e)};setFetchAuthInfo=e=>{Hi(e)};getCaseApi=()=>fn;getMashupApi=()=>SI;enableAppRouting=e=>{N_(e)};initStore=()=>hl({});getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then(o=>o.json())};getBootstrapConfigViaSB=async(e,r,n)=>{let o=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"",i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${o}`;return k(i,{method:"GET",headers:new Headers(r)}).then(s=>{if(s.data)return s.data;throw Error("D_pxBootstrapConfig load failed.",{cause:s.status})})};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,n=ct({meta:IH,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,r=!0)=>{if(r){let o=(document.querySelector(e)??document.getElementsByTagName(e)[0])?.parentNode;if(o&&!document.getElementById(bH)){let i=document.createElement("style");i.id=bH,i.textContent=hme,o.appendChild(i)}}await this.loadRootComponent(e,IH,[d.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&EI.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,r,n=[],o,i)=>{let{customRendering:s=!1,onPCoreReadyCallback:a,staticContentServerUrl:c,dynamicSetCookie:l=!1,renderingMode:u,locale:p,envType:m,themeID:f,customCookies:h=!1,enableRouting:S}=e,{restServerUrl:A,authInfo:C,authorizationHeader:I,appAlias:_,theme:N={}}=e,x=e.additionalHeaders?{...e.additionalHeaders}:{},H=e.extras?.defaultPortalName;H&&(x={...x,"X-Pega-Portal-Name":H});let G=null,re=!I&&C&&!C.authType;if(C||(e.authInfo={},C=e.authInfo),(I&&Object.keys(C).length===0||h&&!re&&!C.authType)&&(C.authType="custom"),C.customCookies=h,!I&&C.tokenInfo?.access_token){let{tokenInfo:he}=C;I=`${he.token_type} ${he.access_token}`}if(C.tokenInfo?.csrf&&(x={...x,pzCTkn:C.tokenInfo.csrf}),_&&_.indexOf("/")===-1&&(_=`app/${_}`),m==="LAUNCHPAD"){x={...x,"X-Constellation-App":"Pega"},A=A.endsWith("/dx")?A:`${A}/dx`;let he=f?`?themeID=${f}`:"";globalThis.PCore&&(G=await this.getLPConfig(`${A}/api/application/v2/environmentInfo${he}`,I,x,h)),Object.keys(N).length===0&&G?.theme?.definition&&(N=JSON.parse(G.theme.definition).Theme)}else re?G=await this.preInitBootstrapConfig(e,_,x,f):G=await this.getBootstrapConfigExtended(_?`${A}/${_}`:`${A}`,I,x,f,h,p);let j=G?.pyConfigJSON?JSON.parse(G.pyConfigJSON):{...G};m==="LAUNCHPAD"&&await this.applyEnvironmentInfoResponse(j),j.restServerConfig=A,j.dynamicSemanticUrl=!1,j.dynamicSetCookie=l,j.enableRouting=!1,j.serviceConfig?Object.assign(j.serviceConfig,{contextPath:"",appAlias:_}):j.serviceConfig={contextPath:"",appAlias:_,staticContentServer:c,appStaticContentServer:"no-appstatic"},j.additionalHeaders={Authorization:I,...x},j.envType=m,j.dynamicLoadComponents=!s,j.dynamicSemanticUrl=!s,j.noHistory=!0,j.theme=N??{};let ne=f&&j?.themeObject?j.themeObject:null;j.theme=ne||N,j.renderingMode=u??j.renderingMode,j.locale=p||j.locale,e.semanticUrlArgs&&(j.semanticUrlArgs=e.semanticUrlArgs);let be=c||j.serviceConfig.staticContentServer;if(j.isSdk?(j.enableRouting=S,j.dynamicSemanticUrl=j.enableRouting,j.environmentInfo||(j.environmentInfo={}),j.environmentInfo.pyExecutionRuntimeName=E.APP.SDK_RUNTIME,Be.initServer(c,"no-appstatic")):(j.serviceConfig.staticContentServer=be,j.serviceConfig.appStaticContentServer=j.serviceConfig.appStaticContentServer||"no-appstatic",Be.initServer(be,be)),j.renderingMode==="EMBED"&&C?.authentication_service&&C.authentication_service!=="pega"&&(j.routingInfo||(j.routingInfo={}),j.routingInfo.authServiceAlias=C.authentication_service),await op.initCoreConfig(j),a&&$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,a,"renderAppCallback"),j.envType==="LAUNCHPAD"&&j.renderingMode==="EMBED"&&v.setIsWebEmbed(!0),C&&["OAuth2.0","custom"].includes(C?.authType)&&this.setFetchAuthInfo(C),!s){let he=v.environmentInfoObject?.pyInfinityStaticService,Me=null;if(he){let Ye=await Zt.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(Ye.data)&&Ye.data.length>0&&(Me=Ye.data)}let Fe=async(Ye,Oe)=>{try{let ft=async()=>{await this.importReactRoot(),Ye(!0)};$.subscribe("component-map-loaded",ft),"ReactRoot"in Gs.getLazyMap()&&Ye(!0)}catch(ft){Oe(ft)}};await new Promise(Fe),op.initCoreContainers(),await this.loadRootContainerWithHybrid(r,n,o,i),Me&&await Promise.all(Me.map(({pyComponentMap:Ye,pxUpdateDateTime:Oe})=>Be.importCustomComponentMap(Ye,Oe)))}};loadRootContainerWithHybrid=(e,r=[],n,o)=>(r.push(d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING),this.loadRootComponent(e,gme,r,n,o));getBootstrapConfigExtended=async(e,r,n,o,i,s)=>{let a={};o&&(a.themeID=o),s&&(a.locale=s);let c=o||s?`?dataViewParameters=${encodeURIComponent(JSON.stringify(a))}`:"",l=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${c}`,u=r?{Authorization:r,...n}:n;return fetch(l,{method:"GET",headers:new Headers(u),credentials:r&&!i?"same-origin":"include"}).then(p=>{if(p.ok)return p.json();throw Error("D_pxBootstrapConfig load failed.",{cause:p.status})})};getLPConfig=async(e,r,n,o)=>{let i=new Headers({...n,...r&&{Authorization:r}}),s=await fetch(e,{method:"GET",headers:i,credentials:r&&!o?"same-origin":"include"});if(!s.ok)throw new Error("environmentInfo load failed.",{cause:s.status});return s.json()};applyEnvironmentInfoResponse=async e=>{let{environmentInfo:r,pyCaseTypeList:n,theme:o,keyMapping:i}=e,{pxApplication:s,features:a,pxLocale:c}=r,l={simpleTable:{pageInstructionUUIDGeneration:!1},...a},u=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),p=u==="ETC/UNKNOWN"?"America/New_York":u;e.environmentInfo={...r,pxApplication:{...s},features:l,pyCaseTypeList:n,pxLocale:{...c,pyTimeZone:p}},e.timezone=p;let m=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every(S=>m.includes(S)),theme:o,keyMapping:i,features:l}};importReactRoot=async()=>{let e=[];return Gs.getComponent("ReactRoot").modules.forEach(r=>{e.push(r())}),Promise.allSettled(e)};preInitBootstrapConfig=async(e,r,n,o)=>{let{restServerUrl:i,customRendering:s=!1,staticContentServerUrl:a,dynamicSetCookie:c=!1,authInfo:l,renderingMode:u,locale:p,timezone:m="America/New_York",envType:f,theme:h={}}=e,S=o??null,A={restServerUrl:i,restServerConfig:i,dynamicSetCookie:c,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:r,staticContentServer:a,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:f,dynamicLoadComponents:!s,dynamicSemanticUrl:!s,noHistory:!0,themeIDObj:S,theme:S||h,renderingMode:u,locale:p,timezone:m,tokens:{C11NB2S:""}};return Be.initServer(a,"no-appstatic"),await op.init(A),l&&["OAuth2.0","custom"].includes(l?.authType)&&this.setFetchAuthInfo(l),this.getBootstrapConfigViaSB(r?`${i}/${r}`:`${i}`,n,o)}},Gr=new X0;var e$=class{appAlias;appAliasWithoutServlet;googleMapKey;staticContentServer;appStaticContentServer;contextPath;messagingService;reAuthUrl;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}},TH=e$;var t$=class{routingInfo;actionModel;additionalHeaders;tokens;semanticUrl;queryParams;noPortal;portalTemplate;timezone;noHistory;viewName;fieldDefaults;theme;restServerConfig;dynamicLoadComponents;dynamicSemanticUrl;enableRouting;locale;environmentInfo;isAnonymousUser;renderingMode;remoteCaseMapping;envType;serviceConfig;behaviorOverrides;initBroadcast;storePercentageAsDecimal;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;portalType;collab;requestContext;pzencv1zzz;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.isAnonymousUser=e.isAnonymousUser??!1,this.renderingMode=e.renderingMode??"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping??{},this.envType=e.envType,this.serviceConfig=new TH(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}},vH=t$;var r$="@P .viewConfig",yme="@ROUTING_INFO",ip=0,n$=class{async init(e){let r=new vH(e);N_(r.enableRouting),hl({}),Xr.updateFieldDefaults(r.fieldDefaults),Xr.setFieldDefault("Percentage","storePercentageAsDecimal",r.storePercentageAsDecimal),this.#t(r.routingInfo,r.actionModel,{server:r.restServerConfig,reAuthUrl:r.serviceConfig.reAuthUrl});let{appAliasWithoutServlet:n,appAlias:o,googleMapKey:i,staticContentServer:s,appStaticContentServer:a}=r.serviceConfig;Be.setAppAlias(n||o),gt.setGoogleMapsAPIKey(i),Be.initServer(s,a,r.tokens.C11NB2S),ae.setRemoteCaseMapping(r.remoteCaseMapping),Ss.init(r.collab),Ss.subscribeToCaseEvents(),vc.subscribeToCaseEvents(),Tt.subscribeToCaseEvents(),Tt.setConnectionConfig({messagingService:r.serviceConfig.messagingService}),r.initBroadcast&&Zh.getBroadcastUtils().init(),Ge.setDefaultHeaders(r.additionalHeaders),Ge.setRequestContext(r.requestContext),r.envType==="Infinity"&&await this.loadEnvironmentInfoFromDataPage(r);let c={...r.environmentInfo,isAnonymousUser:r.isAnonymousUser===!0,encCSRFToken:r.pzencv1zzz,renderingMode:r.renderingMode,...r.portalTemplate?{pyPortalTemplate:r.portalTemplate}:{}};c.pyCaseTypeList?.forEach(p=>{let m=p.pyWorkTypeImplementationClassName;m&&(p.localeReference=_i(An.CASE,m))}),c.features?.isNamespaceEnabled&&(r.additionalHeaders.Prefer="namespaced",Ge.setDefaultHeaders(r.additionalHeaders)),this.configureTheme(r.theme),v.setCookieComplianceMethod(r.cookieComplianceMethod),v.setIsExtraCallRequiredForDefaultHome(r.isExtraCallRequiredForDefaultHome),v.setEnablePriorityAndUrgencyImprovements(r.enablePriorityAndUrgencyImprovements),v.setEnvironmentInfo(c);let u=new URLSearchParams(globalThis.location?.search??"").get("lang")||r.locale||globalThis.navigator?.language||"en-US";v.setLocale(u),typeof document<"u"&&(document.documentElement.lang=u,document.documentElement.dir=H0(u)),Nr().setTimezone(r.timezone),pt.init(),r.envType!=="Infinity"&&hH.subscribeToGlobalEvents(),yI.initialize(),r.initBroadcast&&Zh.getBroadcastUtils().init(),await qd()}configureTheme=e=>{if(e){let r=e.light,n=e.dark;r!==void 0&&n!==void 0?(this.#n(r),this.#n(n,{type:"dark"})):v.setTheme(e)}};getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`,o=`${e}/api/application/v2/data_views/${P.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(o,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,o=ct({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return o.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:o.getPConnect}}};importReactRoot=async()=>{let e=[];return Gr.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach(r=>{e.push(r())}),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,r,n)=>{try{X4(e)}catch(i){console.error("Design system load blocked: untrusted or malformed URL",i);return}let o=(i,s="true")=>new Promise((a,c)=>{if(typeof document>"u"){c(new Error("document is not available in this environment"));return}let l=document.createElement("script");l.type="text/javascript",l.src=i,l.async=s==="true",l.onload=()=>a(void 0),l.onerror=()=>c(new Error("Failed to load resource from Design System")),document.body.appendChild(l)});try{await o(`${e}component/project/${r}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(i){console.log(i)}};buildSemanticUrl=(e,r,n,o,i)=>{let s=new URLSearchParams(r),a=n==="true"&&!!e,c=new URLSearchParams(globalThis.location?.search??"").get("lang");c&&!s.has("lang")&&s.set("lang",c);let l=null,u=null,p=null;if(e){let S=(e.startsWith("/")?e.substring(1):e).split("/");l=S[0]||null,u=S[1]||null,S[2]==="assignments"&&S[3]&&(p=S[3])}let m=[o];l&&m.push(l),u&&m.push(u),p&&m.push("assignments",p),a&&(s.has("noPortal")||s.append("noPortal","true"),u&&i&&s.append("view",i));let f=s.toString();return m.join("/")+(f?`?${f}`:"")};initCoreConfig=async e=>{let{routingInfo:r,serviceConfig:n,semanticUrl:o,queryParams:i,noPortal:s,noHistory:a,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:p=!0,dynamicSemanticUrl:m=!0,renderingMode:f="FULL_PORTAL",envType:h,extras:S}=e,{appAlias:A,contextPath:C}=n,I=globalThis.location,_=I?.origin??"",N=u??_,x={};if(C&&(N+=C),A&&h!=="LAUNCHPAD"&&(N+=`/${A}`),e.restServerConfig=N,this.#r(),m===!0){let ne=this.buildSemanticUrl(o,i,s,N,c);!a&&ne&&typeof globalThis.history<"u"&&globalThis.history.replaceState({},"home",ne)}else if(f!=="HYBRID"){let ne=I?.href??"",be=ne.indexOf("?");be>0&&typeof globalThis.history<"u"&&globalThis.history.pushState({},"home",ne.substring(0,be)),x.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);p!==!0&&(x.dynamicLoadComponents=!1);let H=null;if(A){let ne=A.indexOf("/app/");H=ne>=0?A.substring(ne+1):A}if((x.dynamicSemanticUrl===!1||x.dynamicLoadComponents===!1)&&PCore.setBehaviorOverrides(x),e.appAlias=H,l)if(typeof l=="object")e.theme=l;else try{e.theme=JSON.parse(l)}catch{e.theme={}}let re=I?`${I.protocol}//${I.host}`:r.domain;if(f==="EMBED")try{re=new URL(e.restServerConfig).origin}catch{}let j={...r,domain:re,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=j,e.initBroadcast=v.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence==="true",e.noPortal&&(e.noPortal==="true"||e.noPortal===!0)&&(e.renderingMode="EMBED"),S?.cspNonce&&Reflect.set(globalThis,"__webpack_nonce__",S.cspNonce),v.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,r,n,o,i,s,a,c,l=[])=>{ip+=1;let u=c||`mashup${ip}`,p={type:"RootContainer",config:{viewConfig:r$,renderingMode:"view",name:u}};await Gr.loadRootComponent(e,p,i,s,a),await this.loadCustomComponentLibrariesIfEnabled(l),Gr.loadViewByName(r,n,o,u)};launchView=(e,r,n=[],o,i,s,a)=>{ip+=1;let c;a==="hybrid"?c=`hybrid_${ip}`:a?c=a:c=`mashup${ip}`;let l={type:"RootContainer",config:{viewConfig:r$,renderingMode:"portal",name:c}};a===d.HYBRID&&al.setRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME,c),al.setRuntimeParams(o),Gr.loadRootComponent(e,l,n,i,s).then(()=>Gr.updateStoreWithUiRoot(r,c,!1))};launchPortal=async(e,r,n=`portal${ip+=1}`,o=[],i=[])=>{let s="LoadingComponent",a={type:"RootContainer",config:{viewConfig:r$,renderingMode:"portal",skeleton:s,name:n}},c=[...o,s];v.isPortalLoaded=!0;try{return await Gr.loadRootComponent(e,a,c),await this.loadCustomComponentLibrariesIfEnabled(i),Gr.loadPortalView(r,n)}catch(l){throw console.error(`Failed to launch portal ${r}:`,l),l}};launchMashup=(e,r=!0,n=[])=>{let o={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:yme,name:"primary"}}]};if(r&&!document.getElementById("portal-less-styles")){let l=document.getElementsByTagName(e)[0]?.parentNode;if(l){let u=document.createElement("style");u.id="portal-less-styles",u.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",l.appendChild(u)}}(async()=>(await Gr.loadRootComponent(e,o,[d.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)))();let s=Reflect.get(globalThis,"parent"),a=Reflect.get(globalThis,"window");s&&s!==a&&import(`${Be.getStaticServerUrl()}constellation-mashup-bridge.js`).then(l=>{l.mashup.init({resizing:"stretch"})})};loadEnvironmentInfoFromDataPage=async e=>{if(e.portalType==="wss"&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){let r=e.environmentInfo.pyDataPages;setTimeout(()=>{this.loadDataPagesIntoEnvironmentInfo(r).catch(n=>{console.error("Error loading data pages into environment info:",n)})},d.PRIORITY.TRIVIAL)}};loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;let r=v.environmentInfoObject;if(!r)return;let n=e.filter(({pyName:a,pyPath:c})=>!a||!c?(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1):!0);if(n.length===0)return;let o=await Promise.allSettled(n.map(async({pyName:a,pyPath:c})=>{try{let l=await Zt.getPageDataAsync(a,"",{});return{pyPath:c,response:l}}catch(l){return console.error(`Failed to load data page ${a}:`,l),null}})),i=o.length,s=!1;for(let a=0;a<i;a+=1){let c=o[a];if(c.status==="fulfilled"&&c.value){let{pyPath:l,response:u}=c.value;this.setNestedProperty(r,l,u),s=!0}}s&&v.setEnvironmentInfo(r)};#e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,r,n){let o=r.startsWith(".")?r.slice(1):r;if(!o){typeof n=="object"&&n!==null&&Object.assign(e,n);return}let i=o.split("."),s=i.length,a=e;for(let c=0;c<s-1;c+=1){let l=i[c],u=a[l];if(this.#e(u))a=u;else{let p={};a[l]=p,a=p}}a[i[s-1]]=n}start=async(e,r)=>{let n=e.extras?.defaultPortalName;n&&(e.additionalHeaders={...e.additionalHeaders||{},"X-Pega-Portal-Name":n});let{serviceConfig:{appStaticContentServer:o},ccV2LibId:i,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:c}=e;await this.initCoreConfig(e);let l=v.environmentInfoObject?.pyC11nDXCBDevURL,u=a==="true"&&c!=="other",p=async()=>{await this.importReactRoot();let S=[];l?S.push(Be.importCustomComponentMap("")):i&&S.push(Be.importCustomComponentMap(i)),u&&S.push(this.importDesignSystemComponentMap(o,s,c)),S.length&&await Promise.all(S),r?.()},m=Gr.getComponentsRegistry();return"ReactRoot"in m.getLazyMap()?!0:m.getComponent("ReactRoot")?(await p(),!0):new Promise(S=>{let A=async()=>{await p(),$.unsubscribe("component-map-loaded","component-map-loaded-id"),S(!0)};$.subscribeOnce("component-map-loaded",A,"component-map-loaded-id")})};registerForDebugInfo=e=>{if(v.setPreviewMode(),!e)return;let r=({debugInfo:n})=>{let o=n?.["X-Pega-App-Debug-ID"];o&&e.postMessage({appDebugID:o})};$.subscribe("fetchSuccess",r,"fetchSuccess"),$.subscribe("fetchFailure",r,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",r=>{r?.data?.enableTracer?br.enableTracer():br.disableTracer()})};loadEnvironmentInfo=async e=>{let r=Reflect.get(globalThis,"pms"),n=typeof r=="object"&&r!==null?Reflect.get(r,"device"):void 0,o=typeof n=="object"&&n!==null&&Reflect.get(n,"systemName")==="Android";if(e.theme&&!o)try{let i=JSON.parse(e.theme.definition),s=i.Branding,a=i.Theme;v.setBrandingInfo(s),v.setTheme(a)}catch{v.setBrandingInfo({}),v.setTheme({})}if(e.darkTheme&&!o){let i={type:"dark"};try{let s=JSON.parse(e.darkTheme.definition);v.setBrandingInfo(s.Branding,i),v.setTheme(s.Theme,i)}catch{v.setBrandingInfo({},i),v.setTheme(void 0,i)}}e.keyMapping&&v.setKeyMapping(e.keyMapping),v.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&(v.environmentInfoObject?.pyInfinityStaticService||_t())&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){let r=e.map(n=>this.importSingleCustomComponent(n));await Promise.all(r)}importSingleCustomComponent(e){return typeof e=="object"&&"pyComponentMap"in e?Be.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):Be.importCustomComponentMap(e)}#t(e,r,n){Uh(e),Vt.buildActionTargetMap(r),gt.init(n)}#r(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach(r=>{r.setAttribute("href",r.href)})}#n(e,r){if(e===null)return;if(typeof e=="object"){v.setTheme(e,r);return}let n;try{n=JSON.parse(e)}catch{v.setTheme(r?.type==="dark"?void 0:{},r);return}v.setTheme(n,r)}},Sme=new n$,op=Sme;var Eme="createViewRuleByID",Ame="getViewRuleByID",Cme="updateViewRuleByID",_me="deleteViewRuleByID",Ime="getCalculatedFieldsInViewByID",bme=(t,e)=>{let{restApi:r,reqType:n}=U(Eme);return k(r,{method:n,body:t},e).then(o=>o.data)},Tme=(t,e)=>{let{restApi:r,reqType:n}=U(Ame,{ID:t});return k(r,{method:n},e).then(o=>o.data)},vme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Cme,{ID:t});return k(n,{method:o,body:e},r).then(i=>i.data)},Rme=(t,e)=>{let{restApi:r,reqType:n}=U(_me,{ID:t});return k(r,{method:n},e).then(o=>o.data)},Pme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Ime,{caseID:t,viewID:e});return k(n,{method:o,body:{calculations:{fields:r}}}).then(i=>i.data)},RH={createViewRule:bme,getViewRule:Tme,updateViewRule:vme,deleteViewRule:Rme,getCalculatedFields:Pme};var Nme="addCaseFollower",Ome="deleteCaseFollower",xme="getCaseFollowers",Dme={"Content-Type":"application/json"},wme=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({users:e.map(i=>({ID:i}))});return ve(Nme,{body:o,queryPayload:n,headers:Dme},r)},$me=(t,e,r)=>ve(Ome,{queryPayload:{caseID:t,followerID:e}},r),Mme=(t,e)=>ve(xme,{queryPayload:{caseID:t}},e).then(n=>n.data.followers),PH={addCaseFollower:wme,deleteCaseFollower:$me,getCaseFollowers:Mme};var kme="addRelatedCases",Lme="removeRelatedCase",Ume="getRelatedCases",jme=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({cases:e});return ve(kme,{body:o,queryPayload:n},r)},zme=(t,e,r)=>ve(Lme,{queryPayload:{caseID:t,relatedCaseID:e}},r),Fme=(t,e)=>ve(Ume,{queryPayload:{caseID:t}},e).then(n=>n.data.relatedCases),NH={addRelatedCases:jme,removeRelatedCase:zme,getRelatedCases:Fme};var o$="operatorDetails",Vme="operatorDetailsByBusinessID",Bme=(t,e=!1)=>{let{reqType:r}=U(o$,{});if(r==="GET"){let n={encodedOperatorId:encodeURIComponent(`{"opname":"${t}"}`)};return ve(o$,{queryPayload:n})}return e?ve(Vme,{body:{dataViewParameters:{BusinessID:t}}}):ve(o$,{body:{dataViewParameters:{ID:t}}})},OH={getOperatorDetails:Bme};var xH="postCustomFeedMessages",Hme="postFeedMessages",Gme="deleteFeedMessage",qme="getFeedMessages",Wme="likeFeedMessages",Kme="unlikeFeedMessages",Jme="getMentionSuggestions",Yme="getTagSuggestions",Zme="getFeedMessageLikes",Qme="editFeedMessage",Xme="getMentionTypes",efe="getViewRuleByMessageType",tfe="refreshCustomPostTypeView",sp={"Content-Type":"application/json"},i$=class{mentionsTagsCancelTokenSource;mentions;constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,r,n,o,i,s,a)=>{let c=s.getLocalizationService();a||(this.mentions=[]);let l="";o&&Array.isArray(o)&&o?.length>0&&(o.forEach(f=>{f.on&&(l=`${l}${f.id},`)}),l===""&&(l="ClearFilters"));let u="";a&&(u=s.getValue("pulse.pageLastEntry"));let p={filterForContext:r==="pyDataFeed"?encodeURIComponent(e):e,feedID:r,feedClass:n,filterBy:l,pageSize:10,olderThan:u};for(let f=0;f<i.length;f+=1)i[f].cancel();let m=hi();return i.push(m),ve(qme,{queryPayload:p,cancelTokenSource:m},s.getContextName()).then(async f=>{if(f.status===200&&f.data){i.pop();let h=[],S={},A=!1,C=[];if(f?.data){if(C=Array.isArray(f.data.data.MessageTypes)&&f.data.data.MessageTypes.length?f.data.data.MessageTypes:[],f?.data?.data?.FeedList){let I=f.data.data.FeedList?.pxResults;Array.isArray(I)&&I?.length>0&&I.forEach((_,N)=>{_.ID=_.pzInsKey!==""?_.pzInsKey:`message${N}`,h.push(_.ID),S[_.ID]=_,_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(x=>{x?.mentions&&Array.isArray(x?.mentions)&&x.mentions?.length>0&&this.mentions.push(...x.mentions)}),!A&&!["pzPostDetails","pzPrivatePostDetails"].includes(_.pyMessageViewReference)&&(A=!0)})}if(A&&await n_({uiResources:f.data.uiResources}),!o&&(o=[{id:"All",label:c.getLocalizedText("All"),on:!0,disabled:!1}],f?.data?.data?.FeedFilters)){let I=f.data.data.FeedFilters?.pxResults,_=!0;if(I&&Array.isArray(I)&&I?.length>0){I.forEach(x=>{let H={id:x.pyFeedSourceReference,label:c.getLocalizedText(x.pyLabel),disabled:!1,on:x.pySelected==="true"};H.on||(_=!1),o.push(H)});let N=o.find(x=>x.id==="All");N&&(N.on=_)}}}if(a&&s.getValue("pulse.messageIDs")){let I=s.getValue("pulse.messages");I={...I,...S},Object.values(I).forEach(_=>{_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(N=>{N?.mentions&&Array.isArray(N?.mentions)&&N.mentions?.length>0&&this.mentions.push(...N.mentions)})})}if(VD(s.getContextName())){s.updateState({pulse:{messages:a&&s.getValue("pulse.messageIDs")?{...s.getValue("pulse.messages"),...S}:S,messageIDs:a&&s.getValue("pulse.messageIDs")?[...s.getValue("pulse.messageIDs"),...h]:h,nextPageFirstEntry:f?.data?.nextPageFirstEntry||"",pageLastEntry:f?.data?.pageLastEntry||"",postTypes:C,pulseContext:e}});let I=[...new Map(this.mentions.flat()?.map(_=>[_.mentionsID,_])).values()].filter(_=>Object.hasOwn(_,"mentionsType")).filter(_=>!_?.mentionsType?.toLowerCase().includes("user"));return{feedFilters:o,caseMentions:I}}}else return s.reportError(`getFeeds call failed ${f.status}`,f.data),f}).catch(f=>{if(!Sh(f))return s.reportError(": Error occurred during ajax call at getFeeds API : ",f.response),f.response})};postMessage=(e,r,n,o=[],i=!1,s=[])=>{let a={message:r,context:e,parentMessageId:i?e:"",attachments:o,pyRecipients:s.length?s:void 0},c=s.length===0?{body:JSON.stringify(a),headers:sp}:{body:JSON.stringify(a),queryPayload:{type:"PegaSocial-Post-Private"},headers:sp};return ve(s.length?xH:Hme,c,n.getContextName()).then(l=>{if((l.status===201||l.status===200)&&l.data){let u=l?.data;if(i){u.parentMessageID=e;let{pxResults:h,caseMentions:S}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:h}}}}),S}let{messages:p,messageIDs:m,caseMentions:f}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:p,messageIDs:m}}),f}return n.reportError(`postMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",l.response),l.response})};postCustomMessage=(e,r,n)=>ve(xH,{body:r,queryPayload:{type:e},headers:sp},n.getContextName()).then(async i=>{if(i.status===201&&i.data){let s=i.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};vh(s.messageViewReference,n,r.context)||await n_({uiResources:i.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 ${i.status}`,i),""}).catch(i=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",i.response),i.response});editMessage=({messageID:e,parentMessageID:r,message:n,pConnectObj:o,isReply:i=!1,recipients:s=[]})=>{let a=JSON.stringify({message:n,...s.length&&{pyRecipients:s}});return ve(Qme,{queryPayload:{messageID:e},body:a,headers:sp},o.getContextName()).then(l=>{if(l?.status===200&&l?.data){let u=l?.data;if(i){u.parentMessageID=r;let{pxResults:f,caseMentions:h}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:{[r]:{pxResults:f}}}}),h}let{messages:p,caseMentions:m}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:p}}),m}return o.reportError(`editMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw o.reportError(": Error occurred during ajax call at editMessage API : ",l.response),l.response})};buildMessageObject=(e,r,n,o=!1)=>{let i={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:o,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:typeof e?.isEdited=="string"?e?.isEdited==="true":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},s=n.getValue("pulse.messages");if(r){let{pxResults:c=[]}=Object.values(s)?.find(u=>u?.ID===i?.parentMessageID)||{},l=c?.findIndex(u=>u?.pzInsKey===i?.ID);if(l!==-1){let u=[...c];u[l]={...u[l],...i},c=u}else c=[...c,i];return{pxResults:c,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(c)}}let a=n.getValue("pulse.messageIDs");if(a){let c=a.includes(i.ID)?{...s[i.ID],...i}:i,l={...s,[i.ID]:c},u=a.includes(i.ID)?a:[i.ID,...a];return{messages:l,messageIDs:u,caseMentions:this.getCaseMentions(Object.values(l))}}};getCaseMentions=e=>{let r=e?.filter(n=>n?.mentions&&Array.isArray(n?.mentions)&&n.mentions?.length>0)?.map(n=>n.mentions)?.concat(this.mentions);return[...new Map(r.flat()?.map(n=>[n.mentionsID,n])).values()].filter(n=>Object.hasOwn(n,"mentionsType")).filter(n=>!n?.mentionsType?.toLowerCase().includes("user"))};likeMessage=({pulseContext:e,likedBy:r,messageID:n,isReply:o,pConnectObj:i})=>{let s=r?Kme:Wme,a=JSON.stringify({ContextClass:e});ve(s,{body:a,queryPayload:{pulseContext:e},headers:sp},i.getContextName()).then(l=>{if(l.status===200)if(o){let u=i.getValue(`pulse.messages.${n}`),p=u?.pxResults&&Array.isArray(u?.pxResults)&&u.pxResults?.length>0&&u.pxResults?.map(m=>{if(m={...m},m.pzInsKey===e){let f=0,h=!1,S=m.pyLikes?m?.pyLikes?.pxLikeCount:0;r?(f=S-1,h=!1):(f=S+1,h=!0),m.pyLikes={pxLikeCount:f,pxIsLiked:h}}return m});i.updateState({pulse:{messages:{[n]:{pxResults:p}}}})}else{let u={...i.getValue(`pulse.messages.${n}`)},p=u.pyLikes?u.pyLikes.pxLikeCount:0,m=0,f=!1;r?(m=p-1,f=!1):(m=p+1,f=!0),u.pyLikes={pxLikeCount:m,pxIsLiked:f},i.updateState({pulse:{messages:{[e]:u}}})}else i.reportError(`likeMessage call failed with status ${l.status}`,l)}).catch(l=>{i.reportError(": Error occurred during ajax call at likeMessage API : ",l.response.data)})};deleteMessage=(e,r,n,o)=>{let i=e;r&&(i=n),ve(Gme,{queryPayload:{messageID:i}},o.getContextName()).then(a=>{if(a.status===200)if(r){let c=o.getValue(`pulse.messages.${e}`),l=c?.pxResults&&Array.isArray(c?.pxResults)&&c.pxResults?.length>0&&c.pxResults?.filter(u=>u.pzInsKey!==n);o.updateState({pulse:{messages:{[e]:{pxResults:l}}}})}else{let c=o.getValue("pulse.messageIDs"),l=c&&Array.isArray(c)&&c?.length>0&&c?.filter(p=>p!==e),u={...o.getValue("pulse.messages")};delete u[e],o.updateState({pulse:{messageIDs:l,messages:u}})}else o.reportError(`deleteMessage call failed with status ${a.status}`,a)}).catch(a=>{o.reportError(": Error occurred during ajax call at deleteMessage API : ",a.response)})};getLikedUsers=(e,r)=>ve(Zme,{queryPayload:{messageID:e}},r.getContextName());getMentionSuggestions=(e,r)=>{let{pulseContext:n,searchFor:o,mentionsType:i,listSize:s=5}=e,a={pulseContext:n,searchFor:o,mentionsType:i,listSize:s};for(let l=0;l<this.mentionsTagsCancelTokenSource.length;l+=1)this.mentionsTagsCancelTokenSource[l].cancel();let c=hi();return this.mentionsTagsCancelTokenSource.push(c),ve(Jme,{queryPayload:a,cancelTokenSource:c},r.getContextName()).then(l=>(this.mentionsTagsCancelTokenSource=[],l.status===200&&l.data?l?.data:(r.reportError(`Get mention suggestions call failed ${l.status}`,l.data),[]))).catch(l=>{Sh(l)||r.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",l.response.data)})};getMentionTypes=e=>ve(Xme,{},e.getContextName());getPostTypeView=(e,r,n)=>ve(efe,{queryPayload:{type:e,contextID:n??""}},r.getContextName());refreshCustomPostTypeView=(e,r,n,o)=>ve(tfe,{body:r,queryPayload:{type:e,contextID:o??""},headers:sp},n.getContextName());getTagSuggestions=(e,r)=>{let{searchFor:n,listSize:o=5}=e,i={searchFor:n,listSize:o};for(let a=0;a<this.mentionsTagsCancelTokenSource.length;a+=1)this.mentionsTagsCancelTokenSource[a].cancel();let s=hi();return this.mentionsTagsCancelTokenSource.push(s),ve(Yme,{queryPayload:i,cancelTokenSource:s},r.getContextName()).then(a=>{this.mentionsTagsCancelTokenSource=[];let c=[];return a.status===200&&a?.data?c=a?.data?.tags&&Array.isArray(a?.data?.tags)&&a.data.tags.length>0&&a.data.tags?.map(l=>`#${l}`):r.reportError(`Get tag suggestions call failed ${a.status}`,a.data),c}).catch(a=>{Sh(a)||r.reportError(": Error occurred during ajax call at getTagSuggestions API : ",a.response.data)})}},DH=new i$;var rfe="addTagsToCase",nfe="deleteCaseTag",ofe="getCaseTags",ife=(t,e)=>{let r={caseID:t,viewID:P.getDefaultQualifiedName("pyTaggedCases")};return ve("loadView",{queryPayload:r},e.getContextName()).then(n=>n?.data).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",n.response)})},sfe=(t,e)=>ve(ofe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.tagsList).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTags API : ",n.response)}),afe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({tags:e});return ve(rfe,{body:o,queryPayload:n},r.getContextName()).then(i=>i?.data?.results).catch(i=>{r.reportError(": Error occurred during ajax call at postTags API : ",i.response)})},cfe=(t,e,r)=>ve(nfe,{queryPayload:{caseID:t,tagID:e}},r.getContextName()).catch(o=>{r.reportError(": Error occurred during ajax call at removeTag API : ",o.response)}),lfe=t=>{let e=P.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return Zt.getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(r=>{t.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",r.response)})},wH={getTaggedCases:ife,getTags:sfe,postTags:afe,removeTag:cfe,getTagsLandingPageURL:lfe};var CI=(t,e)=>{qD(e.getContextName(),t.etag),WD(e.getContextName(),t.etag)};var ufe="getAllParticipants",dfe="getParticipantRoles",pfe="getParticipantRoleView",mfe="getParticipant",ffe="createParticipant",gfe="updateParticipant",hfe="deleteParticipant",yfe=(t,e)=>ve(ufe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.data.content.pyParticipants).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipants API : ",n.response)}),Sfe=(t,e)=>ve(dfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.participant_roles).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipantRoles API : ",n.response)}),Efe=(t,e,r)=>ve(mfe,{queryPayload:{caseID:t,participantID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at getParticipant API : ",o.response)}),Afe=async(t,e,r,n,o)=>{let i={caseID:t},s={...r,participantRoleID:e},a={"if-match":n.getCaseSummary().headers.etag};return new Promise((c,l)=>{ve(ffe,{body:s,queryPayload:i,headers:a},n.getContextName()).then(u=>{CI(u.headers,n),c()}).catch(u=>{u.response.data.errorDetails?.forEach(m=>{m.erroneousInputOutputFieldInPage=m.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let p=Oc(o||n.getContextName());n.reportError(": Error occurred during ajax call at createParticipant API : ",{...u.response.data,formFields:p},o),l(u.response)})})},Cfe=async(t,e,r,n,o)=>{let i={caseID:t,participantID:e},s={"if-match":n.getCaseSummary().headers.etag};return new Promise((a,c)=>{ve(gfe,{body:r,queryPayload:i,headers:s},n.getContextName()).then(l=>{CI(l.headers,n),a()}).catch(l=>{l.response.data.errorDetails?.forEach(p=>{p.erroneousInputOutputFieldInPage=p.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let u=Oc(o||n.getContextName());n.reportError(": Error occurred during ajax call at updateParticipant API : ",{...l.response.data,formFields:u},o),c(l.response)})})},_fe=(t,e,r)=>{let n={caseID:t,participantID:e},o={"if-match":r.getCaseSummary().headers.etag};return new Promise((i,s)=>{ve(hfe,{queryPayload:n,headers:o},r.getContextName()).then(a=>{CI(a.headers,r),i()}).catch(a=>{r.reportError(": Error occurred during ajax call at deleteParticipant API : ",a.response),s(a.response)})})},Ife=(t,e,r)=>ve(pfe,{queryPayload:{caseID:t,participant_roleID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",o.response)}),$H={getParticipants:yfe,getRoleView:Ife,getParticipantRoles:Sfe,getParticipant:Efe,createParticipant:Afe,updateParticipant:Cfe,deleteParticipant:_fe};var bfe="createListPersonalization",Tfe="deleteListPersonalization",vfe="updateListPersonalization",Rfe="getUIListPersonalizations",_I=()=>Zs("getDataFromSRS");function s$(t=[]){return t.reduce((e,r)=>(e[r.personalizationID]={name:r.name,personalizationState:JSON.parse(r.personalizationState||"{}")},e),{})}var a$="create",c$="update",kH="delete";function Qh(t,e,r,n){let o=T_(e);if(o){switch(t){case a$:case c$:{let{markAsDefault:i,...s}=n;Object.entries(s).length>0&&(o.allPersonalizations[r]=s),i&&(o.defaultPersonalization=r);break}case kH:{delete o.allPersonalizations[r],o.defaultPersonalization===r&&(o.defaultPersonalization="");break}default:return null}return o}return null}function MH(t){return typeof t=="object"&&t!==null}function Pfe(t){if(!MH(t))return null;let e=t[P.getDefaultQualifiedName("ID")];if(typeof e!="string"||!e)return null;let r=t[P.getDefaultQualifiedName("PersonalizationState")],n=typeof r=="string"?r:JSON.stringify(r);try{let i=JSON.parse(n);if(!MH(i)||Array.isArray(i))return null}catch{return null}let o=t[P.getDefaultQualifiedName("Name")];return{personalization:{personalizationID:e,name:typeof o=="string"?o:"",personalizationState:n},isDefault:!!t[P.getDefaultQualifiedName("MarkAsDefault")]}}async function LH(t){let e=v.getOperatorIdentifier(),n=(await Zt.getDataAsync(P.getDefaultQualifiedName("InsightPersonalizationListByOperatorAndInsight"),void 0,{InsightID:t,UserID:e})).data;return(Array.isArray(n)?n:[]).reduce((i,s)=>{let a=Pfe(s);return a&&i.push(a),i},[])}async function Nfe(t){let e=await LH(t),r="",n=[];for(let o of e)o.isDefault&&(r=o.personalization.personalizationID),n.push(o.personalization);return{defaultPersonalization:r,allPersonalizations:n}}var Va={};async function Ofe(t,e,r){let n=P.getDefaultQualifiedName("InsightPersonalization"),i=(await ve("createWork",{body:{caseTypeID:n,content:{[P.getDefaultQualifiedName("InsightID")]:t,[P.getDefaultQualifiedName("Name")]:r.name??"",[P.getDefaultQualifiedName("MarkAsDefault")]:r.markAsDefault??!1,[P.getDefaultQualifiedName("PersonalizationState")]:JSON.stringify(r.personalizationState)},processID:P.getDefaultQualifiedName("pyStartCase")},queryPayload:{viewType:"none",caseClassName:n}})).data?.ID??e;return Va[e]=i,i}async function UH(t,e){let r=P.getDefaultQualifiedName("Edit"),{restApi:n,reqType:o}=U("caseWideActions",{caseID:t,actionID:r}),s=(await k(`${n}?viewType=form`,{method:o}))?.headers?.etag;if(!s)throw new Error(`Missing etag for personalization case ${t}`);let a={};e.markAsDefault!==void 0&&(a[P.getDefaultQualifiedName("MarkAsDefault")]=e.markAsDefault),e.name!==void 0&&(a[P.getDefaultQualifiedName("Name")]=e.name),e.personalizationState!==void 0&&(a[P.getDefaultQualifiedName("PersonalizationState")]=JSON.stringify(e.personalizationState));let{restApi:c,reqType:l}=U("executeCaseWideActions",{caseID:t,actionID:r});await k(`${c}?viewType=form`,{method:l,headers:{"if-match":s},body:{content:a,pageInstructions:[]}})}async function jH(t,e){await(await LH(t)).filter(({isDefault:o,personalization:i})=>o&&i.personalizationID!==e).reduce((o,{personalization:i})=>o.then(()=>UH(i.personalizationID,{markAsDefault:!1})),Promise.resolve())}async function xfe(t){let e=P.getDefaultQualifiedName("MarkAsInactive"),{restApi:r,reqType:n}=U("caseWideActions",{caseID:t,actionID:e}),i=(await k(`${r}?viewType=form`,{method:n}))?.headers?.etag;if(!i)throw new Error(`Missing etag for personalization case ${t}`);let{restApi:s,reqType:a}=U("executeCaseWideActions",{caseID:t,actionID:e});await k(`${s}?viewType=form`,{method:a,headers:{"if-match":i},body:{content:{[P.getDefaultQualifiedName("ReasonForStatusUpdate")]:Nr().getLocaleValue("Insight Personalization delete")},pageInstructions:[]}})}var Dfe=async t=>{if(_I()){let o=await Nfe(t);return Array.isArray(o.allPersonalizations)&&(o.allPersonalizations=s$(o.allPersonalizations)),o}let e=T_(t);if(e)return Array.isArray(e.allPersonalizations)&&(e.allPersonalizations=s$(e.allPersonalizations)),Promise.resolve(e);let{restApi:r,reqType:n}=U(Rfe,{listID:t});return k(r,{method:n,body:{}}).then(o=>{let{data:i}=o;return{allPersonalizations:s$(i.allPersonalizations),defaultPersonalization:i.defaultPersonalization}})},wfe=async(t,e,r)=>{if(_I()){let i=await Ofe(t,e,r);return Qh(a$,t,e,r),r.markAsDefault&&await jH(t,i),{data:i}}let{restApi:n,reqType:o}=U(bfe,{listID:t});return Qh(a$,t,e,r),k(n,{method:o,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}}).then(i=>{let s=i.data;return Va[e]=s,i})},$fe=async(t,e,r)=>{let n=Va[e]||e;if(_I()){await UH(n,r),Qh(c$,t,e,r),r.markAsDefault&&await jH(t,n);return}Qh(c$,t,e,r);let{restApi:o,reqType:i}=U(vfe,{listID:t,personalizationID:n})||{};return k(o,{method:i,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}})},Mfe=async(t,e)=>{let r=Va[e]||e;if(Qh(kH,t,e),_I()){await xfe(r),Va[e]&&delete Va[e];return}let{restApi:n,reqType:o}=U(Tfe,{listID:t,personalizationID:r});return k(n,{method:o,body:{}}).then(i=>(Va[e]&&delete Va[e],i))};function kfe(t){return t?{createPersonalization:wfe.bind(null,t),updatePersonalization:$fe.bind(null,t),deletePersonalization:Mfe.bind(null,t),fetchPersonalizations:Dfe.bind(null,t)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}var zH=kfe;var Dr=typeof window<"u"?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},FH="getDataObjects",Lfe="getDataPageObjects",Ufe="getDataPages",jfe="getListData",zfe="getInsightIDs",HH="getInsightByID",Ffe="getClassResources",Vfe="createInsight",Bfe="deleteInsight",Hfe="exportToExcel",Gfe="exportToCSV",qfe="scheduleInsight",Wfe="updateScheduledInsight",Kfe="deleteScheduledInsight",Jfe="translateStrings",Yfe="updateInsight",Zfe=["LocalList","RemoteList","PromptList","DataPage"],ap=null;function Qfe(t=!0){if(ap)return ap;let e=or.getAppCacheKey(Lfe);if(t&&Dr.getItem(e))return Promise.resolve(JSON.parse(`${Dr.getItem(e)}`));let r={datapageRequestType:"explorable"},{restApi:n,reqType:o}=U(Ufe,r);return ap=k(n,{method:o,datapageRequestType:"explorable"}),ap.then(i=>{ap=null,Dr.setItem(e,JSON.stringify(i))}),ap}function Xfe(){let t=or.getAppCacheKey(FH);if(Dr.getItem(t))return Promise.resolve(JSON.parse(`${Dr.getItem(t)}`));let{restApi:e,reqType:r}=U(FH,{}),n=k(e,{method:r});return n.then(o=>{Dr.setItem(t,JSON.stringify(o))}),n}var VH=[],ege=async t=>{let e=t.filter(i=>!VH.includes(i));if(e.length===0)return;let r={classIDs:t.join(",")},{restApi:n,reqType:o}=U(Ffe,r);return k(n,{method:o}).then(i=>{i.data.resources&&(VH.push(...e),HS(i.data.resources))})};function tge(t){let e=or.getAppCacheKey(`DefaultColumns_${Object.values(t).join("_")}`);if(Dr.getItem(e))return Promise.resolve(JSON.parse(`${Dr.getItem(e)}`));let r={dataViewName:P.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:n,reqType:o}=U(jfe,r),i=k(n,{method:o,body:{dataViewParameters:t}});return i.then(s=>{Dr.setItem(e,JSON.stringify(s))}),i}function rge(t){return"type"in t&&"classID"in t}function nge(t){let e=Ur(t);if(e&&e.classID){let r=Aw(e.classID),n=e.rdFields,o=(n&&!Array.isArray(n)?n.fields:void 0)?.filter(i=>i.indexOf(".")>0);if(o&&!g.isEmpty(o)){let i=o.reduce((s,a)=>{let c=b_(a,e.classID);return c&&rge(c)&&(s[a]=c),s},{});r={...r,...i}}if(r&&Object.keys(r).length>0){for(let i of Object.keys(r))r[i].type.startsWith("Page")?delete r[i]:r[i]?.datasource&&Zfe.includes(r[i].datasource.tableType)&&(r[i].fieldType="Picklist");return{sourceFields:r,sourceMetadata:e}}}return{}}function oge(t,e,r){if(!e){let i=Ur(t),s=Array.isArray(i?.rdFields)?i?.rdFields:i?.rdFields?.fields;return s?Promise.resolve({data:{data:s.map(a=>({pyFieldName:a}))}}):Promise.resolve({data:{data:[]}})}let n=or.getAppCacheKey(`RDColumns-${t}`);if(Dr.getItem(n))return Promise.resolve(JSON.parse(`${Dr.getItem(n)}`));let o=or.getData(P.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:t}},r);return o.then(i=>{Dr.setItem(n,JSON.stringify(i))}),o}function ige(t="",e=""){let r=or.getAppCacheKey(`PFColumns-${t}${e}`);if(Dr.getItem(r))return Promise.resolve(JSON.parse(`${Dr.getItem(r)}`));let n=or.getData(P.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:t,ClassName:e}});return n.then(o=>{Dr.setItem(r,JSON.stringify(o))}),n}var l$={},u$=t=>or.getAppCacheKey(`PrimaryFields-${t}`),sge=async(t,e,r,n,o)=>{let i=or.getData(P.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...e&&{topLevelClassID:e},...n&&{joinedClassIDs:n.join(",")},...r&&{topLevelDataPageID:r}}},o).then(s=>{let a=s.data?.data||[],c={};t.forEach(l=>{c[l]=[]}),a.forEach(l=>{let u=l.classID,p=l[P.getDefaultQualifiedName("pyFieldName")];c[u].push(p)}),Object.entries(c).forEach(([l,u])=>{let p=u$(l);Dr.setItem(p,JSON.stringify(u))})}).finally(()=>{t.forEach(s=>{delete l$[s]})});return t.forEach(s=>{l$[s]=i}),i};function age(t,e){let r=[],n=[],o=!1,i=[],s=[];return t&&s.push(t),e&&e.length>0&&s.push(...e),s.forEach(a=>{let c=u$(a);if(Dr.getItem(c))return;let l=l$[a];if(l){n.push(l);return}r.push(a),a===t?o=!0:i.push(a)}),{allClasses:s,promisesToAwait:n,classesToFetch:r,isTopLevelClassPresent:o,joinedClassesToFetch:i}}async function cge(t,e,r,n){let{allClasses:o,promisesToAwait:i,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:c}=age(t,r);return s.length&&i.push(sge(s,a?t:void 0,a?e:void 0,c.length>0?c:void 0,n)),Promise.allSettled(i).then(()=>{let l={};return o.forEach(u=>{let p=u$(u);if(Dr.getItem(p))try{l[u]=JSON.parse(`${Dr.getItem(p)}`)}catch{}}),{data:l}})}function lge(t){let e;return t[1].category?e=t[1].category:t[0].indexOf(":")>0&&(e=t[0].substring(0,t[0].indexOf(":"))),e}function GH(t){return typeof t=="object"&&t!==null}function uge(t){return GH(t)&&typeof t.classID=="string"&&Array.isArray(t.fields)}function dge(t){return{...t[1],fieldID:t[0],fieldType:t[1].fieldType||(t[1].isUserReference?"User reference":void 0),category:lge(t),classID:t[1].associationClassID?t[1].associationClassID:t[1].classID}}function BH({data:t}){let e=(i,s)=>_i("FIELD",i,s),r=typeof t.classID=="string"?t.classID:"",n=_i("CASE",r);t.classNameLocaleReference=n;let o=Array.isArray(t.fields)?t.fields:[];for(let i=0;i<o.length;i+=1){let s=o[i];if(GH(s)){let a={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},c=s.definedOnClassIDs;if(typeof c=="string"){let l=c.split(":").reverse(),p=(typeof s.fieldID=="string"?s.fieldID:"").split("!").pop()?.split(":").reverse()||[];l[0]&&p[0]&&(a.nameLocaleReference=e(p[0],l[0])),l[1]&&p[1]&&(a.categoryLocaleReference=e(p[1],l[1])),l[2]&&p[2]?a.parentCategoryLocaleReference=e(p[2],l[2]):s.parentCategory&&(a.parentCategoryLocaleReference=n)}Object.assign(s,a)}}return{data:t}}function pge(t,e,r){if(!e){let{sourceMetadata:o,sourceFields:i}=nge(t);if(o&&i&&Object.keys(i).length>0){let s={...o,fields:Object.entries(i).map(dge)};if(uge(s)){let a=BH({data:s});return Promise.resolve(a)}}}let n={dataSource:t,columns:[],parameters:{},associationFilter:r,matchPosition:"",ignoreCase:!1};return Ao.init(n).then(({dataSourceMetaData:o})=>o?BH({data:o}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}})}function mge(){let{restApi:t,reqType:e}=U(zfe);return k(t,{method:e})}function fge(t){let e=Ew(t);if(e)return Promise.resolve({data:{pyInsights:[e]}});let r={insightID:t},{restApi:n,reqType:o}=U(HH,r);return k(n,{method:o})}function gge(t){let e={insightID:t.join(",")},{restApi:r,reqType:n}=U(HH,e);return k(r,{method:n})}function hge(t){let{restApi:e,reqType:r}=U(Vfe);return k(e,{method:r,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function yge(t,e){let r={insightID:t},{restApi:n,reqType:o}=U(Yfe,r),i;return"UpdateDateTime"in e&&(i=e.UpdateDateTime),k(n,{method:o,body:JSON.stringify(e),headers:{"if-match":i,"Content-Type":"application/json"}})}function Sge(t){let e={insightID:t},{restApi:r,reqType:n}=U(Bfe,e);return k(r,{method:n})}function Ege(t){let{restApi:e,reqType:r}=U(Hfe);return k(e,{method:r,body:JSON.stringify(t)})}function Age(t){let{restApi:e,reqType:r}=U(Gfe);return k(e,{method:r,body:JSON.stringify(t)})}var Cge=(t,e)=>{let r={insightID:t},{restApi:n,reqType:o}=U(qfe,r);return k(n,{method:o,body:JSON.stringify(e)})},_ge=(t,e,r)=>{let n={insightID:t,scheduleID:e},{restApi:o,reqType:i}=U(Wfe,n);return k(o,{method:i,body:JSON.stringify(r)})},Ige=(t,e)=>{let r={insightID:t,scheduleID:e},{restApi:n,reqType:o}=U(Kfe,r);return k(n,{method:o})};function bge(t){let{restApi:e,reqType:r}=U(Jfe);return k(e,{method:r,body:JSON.stringify(t)})}var qH={getDataObjects:Xfe,getDataPageObjects:Qfe,getDataViewMetadata:pge,getDefaultColumns:tge,getFieldsForDataSource:oge,getPrimaryFieldsForDataSource:ige,getPrimaryFieldsForInsights:cge,getInsightIDs:mge,getInsightByID:fge,getInsightsByID:gge,loadClassResources:ege,createInsight:hge,updateInsight:yge,deleteInsight:Sge,exportToExcel:Ege,exportToCSV:Age,scheduleInsight:Cge,updateScheduledInsight:_ge,deleteScheduledInsight:Ige,translateStrings:bge};var d$=class{addRoutes=e=>c9(e)},WH=new d$;var p$=class{static registerModule(e,r,n){Object.assign(n,{[e]:()=>r})}},KH=p$;var m$=class{static getPostActionEvent=()=>E.PUB_SUB_EVENTS.EVENT_POST_ACTION;static getCaseEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)},JH=m$;var f$=class{genericFailedMessage;constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},YH=new f$;var Tge=t=>{Hi({tokenInfo:t}),t?.csrf&&!t?.access_token?Jn({pzCTkn:t?.csrf}):Jn({Authorization:`${t?.token_type} ${t?.access_token}`}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},vge=t=>US.init(t),Rge=async()=>sU(),Pge=t=>{Jn({Authorization:t}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},ZH={setTokens:Tge,revokeTokens:Rge,getAuthInstance:vge,setAuthorizationHeader:Pge};var b$={};qt(b$,{SDK_VERSION:()=>I$,compareSdkPCoreVersions:()=>uhe,createCustomEvent:()=>vhe,dateFormatInfoDefault:()=>iG,filterForFieldValueList:()=>She,getAllFields:()=>yhe,getAutoFlexClass:()=>Ihe,getBooleanValue:()=>ihe,getCurrentTimezone:()=>ahe,getDateFormatInfo:()=>che,getFilteredStages:()=>Che,getInitials:()=>she,getInstructions:()=>Ehe,getIsAssignmentView:()=>aG,getLocale:()=>sG,getOptionList:()=>ghe,getReferenceList:()=>lhe,getSDKAssignmentUtils:()=>Rhe,getSDKCaseUtils:()=>Phe,getSDKContainerUtils:()=>Nhe,getSDKDashboardUtils:()=>Ohe,getSdkVersion:()=>dhe,getUniqueControlID:()=>nhe,getVBodyClass:()=>_he,handleEvent:()=>hhe,initPConnectField:()=>Ahe,isLastStep:()=>bhe,resetControlID:()=>ohe,resolveContext:()=>The,setVisibilityForList:()=>_$});var g$={};qt(g$,{findCurrentIndices:()=>XH,flattenSteps:()=>QH,getAssignmentValidationMessages:()=>wge,getRefreshProps:()=>eG,handleAssignmentButtonPress:()=>$ge,handleSaveActionSuccess:()=>tG,hasNavigation:()=>Nge,isVerticalNavigation:()=>Oge,parseActionButtons:()=>Dge,registerRefresh:()=>xge});function QH(t,e=[]){for(let r of t)r.steps?QH(r.steps,e):e.push(r);return e}function XH(t,e,r){let n=0;for(let o of t)o.visited_status==="current"?(e[r]=n,o.step_status=""):o.visited_status==="success"?(n+=1,o.step_status="completed"):(n+=1,o.step_status=""),o.steps&&XH(o.steps,e,r+1);return e}function Nge(t){if(!t)return!1;let e=t.template?.toLowerCase()==="standard",r=t.steps?.length===1;return!e&&!r}function Oge(t){return t?.template?.toLowerCase()==="vertical"}function eG(t){return t?t.filter(e=>e.event==="Changes"&&e.field).map(e=>[e.field,e.field?.substring(1)??""]):[]}function xge(t){let e=t.getCaseInfo().getActionRefreshConditions?.(),r=t.getContextName(),n=t.getPageReference();PCore.getRefreshManager().deRegisterForRefresh(r);let o=eG(e);if(o.length===0)return;let i=t.getCaseInfo().getKey(),s={autoDetectRefresh:!0,preserveClientChanges:!1},a=PCore.getRefreshManager();for(let c of o)a.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),i,"",n,{...s,refreshFor:c[0]}),`${n}.${c[1]}`,`${r}/${n}`,r)}function Dge(t){return{main:t?.main??[],secondary:t?.secondary??[]}}function wge(t,e){try{return PCore.getMessageManager().getValidationErrorMessages(t,e)??[]}catch{return[]}}function tG(t,e,r){t.cancelAssignment(e,!1).then(()=>{PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,r)})}function $ge(t){let{sAction:e,sButtonType:r,itemKey:n,isInModal:o,getPConnect:i,actionsApi:s,localizedVal:a,localeCategory:c,showToast:l}=t;if(r==="secondary")switch(e){case"navigateToStep":{s.navigateToStep("previous",n).then(()=>{}).catch(()=>{l(a("Navigation failed!",c))});break}case"saveAssignment":{let u=i(),p=u.getCaseInfo().getKey(),m=u.getCaseInfo().getAssignmentID();s.saveAssignment?.(n)?.then(()=>{let f=u.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);tG(s,n,{caseType:f,caseID:p,assignmentID:m})})?.catch(()=>{l(a("Save failed",c))});break}case"cancelAssignment":{let{PUB_SUB_EVENTS:u}=PCore.getConstants(),{publish:p}=PCore.getPubSubUtils(),m=i(),f=m.getCaseInfo().isAssignmentInCreateStage(),h=m.getCaseInfo().isLocalAction()||!!(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION&&m.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));f&&o&&!h?s.cancelCreateStageAssignment(n).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))}):s.cancelAssignment(n,!1).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))});break}case"rejectCase":{s.rejectCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Rejection failed!",c))});break}default:break}else if(r==="primary")switch(e){case"finishAssignment":{s.finishAssignment(n).then(()=>{}).catch(()=>{l(a("Submit failed!",c))});break}case"approveCase":{s.approveCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Approve failed!",c))});break}default:break}}var h$={};qt(h$,{extractTabsInfo:()=>Lge,filterSummaryFields:()=>Mge,getChildRegionByName:()=>kge,openCaseEditAction:()=>jge,resolveCaseTypeIcon:()=>Uge});function Mge(t){let e=t().getRawMetadata(),r=e.children?.[0],n=e.children?.[1],o=r?.children??[],i=n?.children??[],s=o.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent"),a=i.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent");return[s,a]}function kge(t,e){for(let r of t){let n=r.props?.getPConnect?.();if(n){let o=n.getRawMetadata?.();if(o?.type?.toLowerCase()==="region"&&o?.name?.toLowerCase()===e.toLowerCase())return r}}return null}function Lge(t){let e=[],r=[],n=t?.props?.getPConnect?.()?.getChildren?.();return n?(n.forEach((o,i)=>{let s=o.getPConnect().getConfigProps(),{label:a}=s,{inheritedProps:c,visibility:l}=s;if(!a&&c){let u=c.find(p=>p.prop==="label");u&&(a=u.value)}(l===void 0||l===!0)&&(e.push({name:a??"",id:i}),r.push({type:"DeferLoad",config:s}))}),{vertTabInfo:e,deferLoadInfo:r}):{vertTabInfo:e,deferLoadInfo:r}}function Uge(t,e){let r=t?t.replace("pi pi-",""):e;return!r||r.includes(".")?"polaris-solid":r}function jge(t,e){let r=t.getActionsApi();r.openLocalAction.bind(r)(e.ID,{...e,containerName:"modal",type:"express"})}var E$={};qt(E$,{addContainerItem:()=>Vge,addFlowContainerItem:()=>Hge,configureBrowserBookmark:()=>Bge,getActiveCaseActionName:()=>rG,getFirstCaseActionName:()=>Yge,getToDoAssignments:()=>Jge,getTodoVisibility:()=>S$,hasContainerItems:()=>Gge,isCaseWideLocalAction:()=>y$,isContainerInitialized:()=>zge,isRenderWithToDoWrapper:()=>Zge,setContainerLimit:()=>Fge,showBanner:()=>Kge});function zge(t){let e=t.getContextName(),r=t.getContainerName();return PCore.getContainerUtils().isContainerInitialized(e,r)??!1}function Fge(t,e,r,n){let{CONTAINER_TYPE:o}=PCore.getConstants();if(r===o.MULTIPLE&&n){let i=t.getContextName();PCore.getContainerUtils().setContainerLimit(`${i}/${e}`,n)}}function Vge(t){let e=t.getContainerManager(),r=t.getContextName();e.addContainerItem({context:r,semanticURL:""})}function Bge(t){let e=p=>p,r=t.getContextName(),n=t.getContainerName(),o=PCore.getEnvironmentInfo(),{APP:i}=PCore.getConstants(),s=t.getValue(`pyPortal.${e("pyPrimaryNavPages")}`),a="",c="",l="",u=o?.environmentInfoObject?.pyExecutionRuntimeName===i.INFINITY_RUNTIME;if(Array.isArray(s)&&s.length>0){let p=s[0],m=p.NavigationPages?.[0];u?m?.[e("pyRuleName")]?(a=m[e("pyRuleName")],c=m[e("pyClassName")]??""):p?.[e("pyRuleName")]?(a=p[e("pyRuleName")],c=p[e("pyClassName")]??""):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")]):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")])}try{PCore.configureForBrowserBookmark({context:r,containerName:n,acName:n,semanticURL:"",defaultViewLabel:l,ruleName:a,className:c})}catch{}}function Hge(t){let e=t.getContainerManager(),r=t.getContextName(),n=t.getValue("context_data.caseViewMode"),o,i;if(n!=="review"){let s=r.substring(0,r.lastIndexOf("_")),a=PCore.getContainerUtils().getActiveContainerItemName(s),c=PCore.getContainerUtils().getContainerItemData(s,a);c&&({key:o,flowName:i}=c)}e.addContainerItem({semanticURL:"",key:o,flowName:i,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:t.getDataObject(r)})}function Gge(t){let e=t.getContextName(),r=t.getContainerName();return!!PCore.getContainerUtils().hasContainerItems(`${e}/${r}`)}function cp(){return PCore.getConstants().CASE_INFO}function rG(t){let e=cp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ACTIVE_ACTION_ID);return r?.find(i=>i.ID===n)?.name??""}function y$(t){let e=cp(),r=t.getValue(e.ACTIVE_ACTION_ID),n=t.getValue(e.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1}function nG(t){let e=cp(),r=t.getValue(e.CHILD_ASSIGNMENTS),n=[];if(r&&r.length>0){for(let{assignments:o,Name:i}of r)if(o)for(let s of o)n.push({...s,caseName:i})}return n}function qge(t){return!!t.getValue("caseMessages")}function Wge(t){let e=cp(),r=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS),n=nG(t);return!!(r||n.length>0||y$(t))}function Kge(t){let e=t();return qge(e)||!Wge(e)}function S$(t){return t.getValue("context_data.caseViewMode")!=="perform"}function Jge(t){let e=cp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ASSIGNMENT_LABEL),o=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS)??[],s=nG(t).map(c=>({...c,isChild:!0})),a=[...o,...s];if(r&&!S$(t)){let c=rG(t);return a.map(l=>({...l,name:c||n}))}return a}function Yge(t){let e=cp();return t.getValue(e.CASE_INFO_ACTIONS)?.[0]?.name??""}function Zge(t,e){let r=t(),{showWithToDo:n}=e;return!!(n&&(!y$(r)||S$(r)))}var A$={};qt(A$,{combineFilters:()=>Qge,convertDateToGMT:()=>Xge,createFilter:()=>oG,getFilterExpression:()=>the,getFormattedDate:()=>ehe,getLayoutDataFromRegion:()=>rhe});function oG(t,e,r="EQ"){return{condition:{lhs:{field:e},comparator:r,rhs:{value:t}}}}function Qge(t,e){return t&&t.length?e?{AND:[e,...t]}:t.length>1?{AND:[...t]}:t[0]:e}function Xge(t){let{valueAsISOString:e}=t;return e?e.substring(0,e.indexOf("T")):void 0}function ehe(t){if(t)return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}function the(t,e,r){if(t==="")return null;let n="EQ";return r.type==="TextInput"&&!r.isNumber&&(n="CONTAINS"),r.config.filterType==="RelativeDates"?"":oG(t,e,n)}function rhe(t){let e={width:"full",fillAvailable:!0,minWidth:[300,"px"]};return t.props?.getPConnect()?.getChildren()?.map((r,n)=>{let o=r?.getPConnect();return{id:o?.getComponentName()?`${o.getComponentName()}--${n}`:`item--${n}`,content:o?.getComponent(),layoutConfig:{...e,...o?.getConfigProps().layoutConfig}}})}var I$="0.1.0",iG={dateFormatString:"MM/DD/YYYY",dateFormatStringLong:"MMM DD, YYYY",dateFormatStringLC:"mm/dd/yyyy",dateFormatMask:"__/__/____"},C$=0;function nhe(){return C$+=1,`control-${C$}`}function ohe(){C$=0}function ihe(t){if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="on"||e===""}return!!t}function she(t){if(!t)return"";let e=t.charAt(0),r=t.lastIndexOf(" "),n=t.lastIndexOf(".");return r>0?e+=t.substring(r+1).charAt(0):n>0&&(e+=t.substring(n+1).charAt(0)),e.toUpperCase()}function sG(t=""){if(t)return t;let e=PCore.getEnvironmentInfo().getLocale?.();return e||(typeof document<"u"&&document.documentElement?.lang?document.documentElement.lang:Intl.DateTimeFormat().resolvedOptions().locale)}function ahe(t){if(t)return t;let e=PCore.getLocaleUtils().getTimeZoneInUse?.();return e||Intl.DateTimeFormat().resolvedOptions().timeZone}function che(){let t=PCore.getLocaleUtils(),e={...iG},r=sG(),n=new Date(Date.parse("30 November 2023 12:00:00 GMT")),o=new Intl.DateTimeFormat(r).format(n),i=o.indexOf("11"),s=o.indexOf("30"),a=o.indexOf("2023"),c=t.getLocaleValue("month_placeholder","CosmosFields")!=="month_placeholder"||t.getLocaleValue("day_placeholder","CosmosFields")!=="day_placeholder"||t.getLocaleValue("year_placeholder","CosmosFields")!=="year_placeholder",l=[{loc:i,format:"MM",longFormat:"MMM",placeholder:c?t.getLocaleValue("month_placeholder","CosmosFields"):"mm",mask:"__",separator:o[i+2]},{loc:s,format:"DD",longFormat:"DD",placeholder:c?t.getLocaleValue("day_placeholder","CosmosFields"):"dd",mask:"__",separator:o[s+2]},{loc:a,format:"YYYY",longFormat:"YYYY",placeholder:c?t.getLocaleValue("year_placeholder","CosmosFields"):"yyyy",mask:"____",separator:o[a+4]}];return l.sort((u,p)=>u.loc-p.loc),e.dateFormatString=`${l[0].format}${l[0].separator}${l[1].format}${l[1].separator}${l[2].format}`,e.dateFormatStringLong=`${l[0].longFormat} ${l[1].longFormat}, ${l[2].longFormat}`,e.dateFormatStringLC=`${l[0].placeholder}${l[0].separator}${l[1].placeholder}${l[1].separator}${l[2].placeholder}`,e.dateFormatMask=`${l[0].mask}${l[0].separator}${l[1].mask}${l[1].separator}${l[2].mask}`,e}function lhe(t){let e=t.getComponentConfig(),r=String(e.referenceList??"").replace("@P ","");if(r.includes("D_")){let n=t.resolveDatasourceReference?.(r);n!=null&&(typeof n=="object"&&"pxResults"in n?r=n.pxResults:typeof n=="string"&&n.startsWith("D_")&&!n.endsWith(".pxResults")&&(r=`${n}.pxResults`))}return r}function uhe(){console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. SDK version: ${I$}. Ensure the Constellation version matches your Infinity server.`)}function dhe(){return I$}function phe(t){if(typeof t=="string")return t;if(t)return String(t)}function mhe(t){return typeof t.datasource=="object"&&Array.isArray(t.datasource)?t.datasource:[]}function fhe(t,e){let r=t.datasource;if(typeof r=="string"&&e[r])return[];let n=t.listOutput;if(typeof r=="object"&&!Array.isArray(n)){let o=r.source;n=Array.isArray(o)?o:[]}return(n??[]).forEach(o=>{o.value=o.text??o.value}),n??[]}function ghe(t,e={}){let r=t.listType;return r?r.toLowerCase()==="associated"?mhe(t):r.toLowerCase()==="datapage"?fhe(t,e):[]:[]}function hhe(t,e,r,n){switch(e){case"change":t.updateFieldValue(r,n);break;case"blur":t.triggerFieldChange(r,n);break;case"changeNblur":t.updateFieldValue(r,n),t.triggerFieldChange(r,n);break;default:break}}function yhe(t){let e=t.getRawMetadata()?.children;return Array.isArray(e)?e.map(r=>(Array.isArray(r.children)?r.children:[]).map(o=>o.config??{})):[]}function She(t){return t.filter(({visibility:e})=>e!==!1).map(({value:e,label:r})=>({id:(r??"").toLowerCase(),name:r??"",value:e}))}function aG(t){let e=String(t.getValue(E.CASE_INFO.CASE_INFO_CLASSID)??""),n=`${String(t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID)??"")}!${e}`,o=`${t.getCurrentView()}!${t.getCurrentClassID()}`;return n===o}function Ehe(t,e="casestep"){let r=phe(t.getValue(E.CASE_INFO.INSTRUCTIONS)),n=aG(t);switch(e){case"casestep":return n&&r?.length?r:void 0;case"none":return;default:return e.startsWith("@PARAGRAPH")?void 0:e}}function _$(t,e){let{selectionMode:r,selectionList:n,renderMode:o,referenceList:i}=t.getComponentConfig(),s=E.LIST_SELECTION_MODE;(r===s.MULTI&&n||o==="Editable"&&i)&&t.getListActions()?.setVisibility(e)}function Ahe(t){if(t.isEditable()){let e=t.getActionsApi();e&&(t.setAction?.("onChange",r=>{e.changeHandler?.(t,r)}),t.setAction?.("onBlur",r=>{e.eventHandler?.(t,r)}))}return t.addFormField(),_$(t,!0),()=>{t.removeFormField?.(),_$(t,!1),t.removeNode()}}function Che(t){return Array.isArray(t)?t.filter(e=>e.type!=="Alternate"||e.type==="Alternate"&&e.visited_status==="active"):[]}function _he(t,e){let r="psdk-vertical-step-body";return t<e-1?`${r} psdk-vertical-step-line`:r}function Ihe(t,e){let r=e.length,n=e[r-1],o=e.findIndex(a=>a.ID===t?.ID),i=t.visited_status==="current",s=o===r-2&&n?.visited_status==="current";return i||s?"flex-auto":""}function bhe(t,e){return t===e-1}function The(t){return t?t.replace(/\((\d+)\)/g,(e,r)=>`[${parseInt(r,10)-1}]`):null}function vhe(t,e){return typeof window<"u"?new CustomEvent(t,{detail:{additionalData:e}}):null}function Rhe(){return g$}function Phe(){return h$}function Nhe(){return E$}function Ohe(){return A$}var T$=class{getDebouncedSubject(e){return new Ws().pipe(fm(e))}},cG=new T$;var xhe=(()=>{let t="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",e="\\\\[\\x00-\\x7f]",r=`"(?:[^\\r"\\\\\\x80-\\xff]|${e})*"`,n=`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${e})*\\]`,o=`(?:${t}|${r})`,i=`(?:${t}|${n})`,s=`${o}(?:\\.${o})*`,a=`${i}(?:\\.${i})*`;return new RegExp(`^${s}@${a}$`)})();function Dhe(t){return xhe.test(t)}var whe=(()=>{let e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+",u=`${`(?:${`${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}`;return new RegExp(`^${u}$`)})();function $he(t){return whe.test(t)}Dt.register("email",(t,{useRFC822Validation:e})=>{let r=null,n=e?Dhe(t):$he(t);return t&&!n&&(r="Enter a valid email address"),r});Dt.register("integer",t=>{let e=null;return t&&!/^(-)?\d+$/.test(t)&&(e="Invalid number"),e});Dt.register("required",t=>Array.isArray(t)&&t.length===0||t==null||t===""?"Cannot be blank":null);function Mhe(t){if(Be.isStaticContentReference(t))return!0;try{let e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"||e.protocol==="ftp:"}catch{return!1}}Dt.register("url",t=>{let e=null;return t&&!Mhe(t)&&(e="Enter a valid url"),e});var II={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[2-467])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","(?:400|[5-9]\\d\\d)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-37-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[013]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[0-79]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:472[2-47-9]|983[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}",[7,8,9,10],[["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function v$(t,e,r){var n=Array.prototype.slice.call(e);n.push(II);var o=t.apply(this,n);return r&&o&&Object.setPrototypeOf(o,r),o}function R$(t,e){t=t.split("-"),e=e.split("-");for(var r=t[0].split("."),n=e[0].split("."),o=0;o<3;o++){var i=Number(r[o]),s=Number(n[o]);if(i>s)return 1;if(s>i)return-1;if(!isNaN(i)&&isNaN(s))return 1;if(isNaN(i)&&!isNaN(s))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var khe={}.constructor;function Ri(t){return t!=null&&t.constructor===khe}var Lhe=/^\d+$/;function P$(t){return Lhe.test(t)}var Uhe="1.2.0",jhe="1.7.35",lG=" ext. ",yt=class{constructor(e){x$(e),this.metadata=e,pG.call(this,e)}getCountries(){return Object.keys(this.metadata.countries).filter(e=>e!=="001")}getCountryMetadata(e){return this.metadata.countries[e]}nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}hasCountry(e){return this.getCountryMetadata(e)!==void 0}hasCallingCode(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{let r=this.countryCallingCodes()[e];if(r&&r.length===1&&r[0]==="001")return!0}}isNonGeographicCallingCode(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}country(e){return this.selectNumberingPlan(e)}selectNumberingPlan(e,r){let n,o;if(e&&(P$(e)?o=e:n=e),r&&(o=r),n&&n!=="001"){let i=this.getCountryMetadata(n);if(!i)throw new Error(`Unknown country: ${n}`);this.numberingPlan=new bI(i,this)}else if(o){if(!this.hasCallingCode(o))throw new Error(`Unknown calling code: ${o}`);this.numberingPlan=new bI(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}getCountryCodesForCallingCode(e){let r=this.countryCallingCodes()[e];if(r)return r.length===1&&r[0].length===3?void 0:r}getCountryCodeForCallingCode(e){let r=this.getCountryCodesForCallingCode(e);if(r)return r[0]}getNumberingPlanMetadata(e){let r=this.getCountryCodeForCallingCode(e);if(r)return this.getCountryMetadata(r);if(this.nonGeographic()){let n=this.nonGeographic()[e];if(n)return n}else{let n=this.countryCallingCodes()[e];if(n&&n.length===1&&n[0]==="001")return this.metadata.countries["001"]}}countryCallingCode(){return this.numberingPlan.callingCode()}IDDPrefix(){return this.numberingPlan.IDDPrefix()}defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}possibleLengths(){return this.numberingPlan.possibleLengths()}formats(){return this.numberingPlan.formats()}nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}leadingDigits(){return this.numberingPlan.leadingDigits()}hasTypes(){return this.numberingPlan.hasTypes()}type(e){return this.numberingPlan.type(e)}ext(){return this.numberingPlan.ext()}countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}chooseCountryByCountryCallingCode(e){return this.selectNumberingPlan(e)}hasSelectedNumberingPlan(){return this.numberingPlan!==void 0}},bI=class{constructor(e,r){this.globalMetadataObject=r,this.metadata=e,pG.call(this,r.metadata)}callingCode(){return this.metadata[0]}_getDefaultCountryMetadataForThisCallingCode(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}getDefaultCountryMetadataForRegion(){return this._getDefaultCountryMetadataForThisCallingCode()}IDDPrefix(){if(!(this.v1||this.v2))return this.metadata[1]}defaultIDDPrefix(){if(!(this.v1||this.v2))return this.metadata[12]}nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}_getFormats(e){return e[this.v1?2:this.v2?3:4]}formats(){return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map(r=>new N$(r,this))}nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}_getNationalPrefixFormattingRule(e){return e[this.v1?4:this.v2?5:6]}nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}_nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}_getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}types(){return this.metadata[this.v1?9:this.v2?10:11]}hasTypes(){return this.types()&&this.types().length===0?!1:!!this.types()}type(e){if(this.hasTypes()&&uG(this.types(),e))return new O$(uG(this.types(),e),this)}ext(){return this.v1||this.v2?lG:this.metadata[13]||lG}},N$=class{constructor(e,r){this._format=e,this.metadata=r}pattern(){return this._format[0]}format(){return this._format[1]}leadingDigitsPatterns(){return this._format[2]||[]}nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}usesNationalPrefix(){return!!(this.nationalPrefixFormattingRule()&&!zhe.test(this.nationalPrefixFormattingRule()))}internationalFormat(){return this._format[5]||this.format()}},zhe=/^\(?\$1\)?$/,O$=class{constructor(e,r){this.type=e,this.metadata=r}pattern(){return this.metadata.v1?this.type:this.type[0]}possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}};function uG(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function x$(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Ri(t)||!Ri(t.countries))throw new Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${Ri(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+Fhe(t)+": "+t}.`)}var Fhe=t=>typeof t;function Xh(t,e){let r=new yt(e);if(r.hasCountry(t))return r.selectNumberingPlan(t).countryCallingCode();throw new Error(`Unknown country: ${t}`)}function dG(t,e){return e.countries.hasOwnProperty(t)}function pG(t){let{version:e}=t;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?R$(e,Uhe)===-1?this.v2=!0:R$(e,jhe)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function D$(t,e){let r=t.slice();for(let n of e)t.indexOf(n)<0&&r.push(n);return r.sort((n,o)=>n-o)}function yl(t,e,r){return mG(t,void 0,e,r)}function mG(t,e,r,n){r&&(n=new yt(n.metadata),n.selectNumberingPlan(r));let o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return mG(t,"MOBILE",r,n);let c=n.type("MOBILE");c&&(i=D$(i,c.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";let s=t.length,a=i[0];return a===s?"IS_POSSIBLE":a>s?"TOO_SHORT":i[i.length-1]<s?"TOO_LONG":i.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function w$(t,e,r){e===void 0&&(e={});let n=new yt(r);if(e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.country||t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);n.selectNumberingPlan(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return $$(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function $$(t,e){return yl(t,void 0,e)==="IS_POSSIBLE"}function an(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var Vhe=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Sl(t,e,r){if(e=e||{},!t.country&&!t.countryCallingCode)return;let n=new yt(r);n.selectNumberingPlan(t.country||t.countryCallingCode);let o=e.v2?t.nationalNumber:t.phone;if(an(o,n.nationalNumberPattern())){if(M$(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||M$(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(let i of Vhe)if(M$(o,i,n))return i}}function M$(t,e,r){let n=r.type(e);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(t.length)<0?!1:an(t,n.pattern())}function k$(t,e,r){e=e||{};let n=new yt(r);if(n.selectNumberingPlan(t.country||t.countryCallingCode),n.hasTypes())return Sl(t,e,n.metadata)!==void 0;let o=e.v2?t.nationalNumber:t.phone;return an(o,n.nationalNumberPattern())}var Bhe=/^[A-Z]{2}$/;function L$(t){return Bhe.test(t)}var Hhe=!1;function U$(t,e){let r,n,o=new yt(e);return L$(t)?(r=t,o.selectNumberingPlan(r),n=o.countryCallingCode()):(n=t,Hhe&&o.isNonGeographicCallingCode(n)&&(r="001")),{country:r,callingCode:n}}function j$(t,e,r){let o=new yt(r).getCountryCodesForCallingCode(t);return o?o.filter(i=>Ghe(e,i,r)):[]}function Ghe(t,e,r){let n=new yt(r);return n.selectNumberingPlan(e),n.numberingPlan.possibleLengths().indexOf(t.length)>=0}var cn="0-90-9٠-٩۰-۹",qhe="-‐-―−ー-";var Whe="  ­​⁠ ",Khe="()()[]\\[\\]",Jhe="~⁓∼~",lp=`${qhe}//..${Whe}${Khe}${Jhe}`,ey="++";var Yhe=new RegExp("(["+cn+"])");function z$(t,e,r,n){if(!e)return;let o=new yt(n);o.selectNumberingPlan(e||r);let i=new RegExp(o.IDDPrefix());if(t.search(i)!==0)return;t=t.slice(t.match(i)[0].length);let s=t.match(Yhe);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}function F$(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){let r=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(t);if(n){let o,i,s=n.length-1,a=s>0&&n[s];if(e.nationalPrefixTransformRule()&&a)o=t.replace(r,e.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{let l=n[0];o=t.slice(l.length),a&&(i=n[1])}let c;if(a){let l=t.indexOf(n[1]);t.slice(0,l)===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=n[0];return{nationalNumber:o,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:t}}function V$(t,e,r){let n=new yt(r);for(let o of e)if(n.selectNumberingPlan(o),n.leadingDigits()){if(t&&t.search(n.leadingDigits())===0)return o}else if(Sl({phone:t,country:o},void 0,n.metadata))return o}var Zhe=!1;function ty(t,{nationalNumber:e,metadata:r}){if(Zhe&&r.isNonGeographicCallingCode(t))return"001";let n=r.getCountryCodesForCallingCode(t);if(n)return n.length===1?n[0]:V$(e,n,r.metadata)}function up(t,e,r){let{carrierCode:n,nationalNumber:o}=F$(t,r);if(o!==t){if(!Qhe(t,o,r))return{nationalNumber:t};if(r.numberingPlan.possibleLengths()&&(e||(e=ty(r.numberingPlan.callingCode(),{nationalNumber:o,metadata:r})),!Xhe(o,e,r)))return{nationalNumber:t}}return{nationalNumber:o,carrierCode:n}}function Qhe(t,e,r){return!(an(t,r.nationalNumberPattern())&&!an(e,r.nationalNumberPattern()))}function Xhe(t,e,r){switch(yl(t,e,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function B$(t,e,r,n,o){if(!(e||r||n))return{number:t};let i=e||r?Xh(e||r,o):n;if(t.indexOf(i)===0){let s=new yt(o);s.selectNumberingPlan(e||r||n);let a=t.slice(i.length),{nationalNumber:c}=up(a,void 0,s),{nationalNumber:l}=up(t,void 0,s);if(!an(l,s.nationalNumberPattern())&&an(c,s.nationalNumberPattern())||yl(l,void 0,s)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function ry(t,e,r,n,o){if(!t)return{};let i;if(t[0]!=="+"){let c=z$(t,e||r,n,o);if(c&&c!==t)i=!0,t="+"+c;else{if(e||r||n){let{countryCallingCode:l,number:u}=B$(t,e,r,n,o);if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:t}}}if(t[1]==="0")return{};let s=new yt(o),a=2;for(;a-1<=3&&a<=t.length;){let c=t.slice(1,a);if(s.hasCallingCode(c))return s.selectNumberingPlan(c),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:t.slice(a)};a++}return{}}function H$(t){return t.replace(new RegExp(`[${lp}]+`,"g")," ").trim()}var eye=/(\$\d)/;function G$(t,e,{useInternationalFormat:r,withNationalPrefix:n,carrierCode:o,metadata:i}){let s=t.replace(new RegExp(e.pattern()),r?e.internationalFormat():n&&e.nationalPrefixFormattingRule()?e.format().replace(eye,e.nationalPrefixFormattingRule()):e.format());return r?H$(s):s}var tye=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function q$(t,e,r){let n=new yt(r);if(n.selectNumberingPlan(t||e),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(tye.test(n.IDDPrefix()))return n.IDDPrefix()}var rye=";ext=",dp=t=>`([${cn}]{1,${t}})`;function ny(t){var e="20",r="15",n="9",o="6",i="[  \\t,]*",s="[:\\..]?[  \\t,-]*",a="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",l="(?:[xx##~~]|int|int)",u="[- ]+",p="[  \\t]*",m="(?:,{2}|;)",f=rye+dp(e),h=i+c+s+dp(e)+a,S=i+l+s+dp(n)+a,A=u+dp(o)+"#",C=p+m+s+dp(r)+a,I=p+"(?:,)+"+s+dp(n)+a;return f+"|"+h+"|"+S+"|"+A+"|"+C+"|"+I}var nye="["+cn+"]{"+2+"}",oye="["+ey+"]{0,1}(?:["+lp+"]*["+cn+"]){3,}["+lp+cn+"]*",iye=new RegExp("^["+ey+"]{0,1}(?:["+lp+"]*["+cn+"]){1,2}$","i"),sye=oye+"(?:"+ny()+")?",aye=new RegExp("^"+nye+"$|^"+sye+"$","i");function W$(t){return t.length>=2&&aye.test(t)}function fG(t){return iye.test(t)}function gG({number:t,ext:e}){if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${e?";ext="+e:""}`}var hG={formatExtension:(t,e,r)=>`${t}${r.ext()}${e}`};function J$(t,e,r,n){r?r=uye({},hG,r):r=hG;let o=new yt(n);if(t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);o.selectNumberingPlan(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";let i=o.countryCallingCode(),s=r.v2?t.nationalNumber:t.phone,a;switch(e){case"NATIONAL":return s?(a=vI(s,t.carrierCode,"NATIONAL",o,r),K$(a,t.ext,o,r.formatExtension)):"";case"INTERNATIONAL":return s?(a=vI(s,null,"INTERNATIONAL",o,r),a=`+${i} ${a}`,K$(a,t.ext,o,r.formatExtension)):`+${i}`;case"E.164":return`+${i}${s}`;case"RFC3966":return gG({number:`+${i}${s}`,ext:t.ext});case"IDD":if(!r.fromCountry)return;let c=lye(s,t.carrierCode,i,r.fromCountry,o);return c?K$(c,t.ext,o,r.formatExtension):void 0;default:throw new Error(`Unknown "format" argument passed to "formatNumber()": "${e}"`)}}function vI(t,e,r,n,o){let i=cye(n.formats(),t);return i?G$(t,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:e,metadata:n}):t}function cye(t,e){return dye(t,r=>{if(r.leadingDigitsPatterns().length>0){let n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(e.search(n)!==0)return!1}return an(e,r.pattern())})}function K$(t,e,r,n){return e?n(t,e,r):t}function lye(t,e,r,n,o){if(Xh(n,o.metadata)===r){let a=vI(t,e,"NATIONAL",o);return r==="1"?r+" "+a:a}let s=q$(n,void 0,o.metadata);if(s)return`${s} ${r} ${vI(t,null,"INTERNATIONAL",o)}`}function uye(...t){let e=1;for(;e<t.length;){if(t[e])for(let r in t[e])t[0][r]=t[e][r];e++}return t[0]}function dye(t,e){let r=0;for(;r<t.length;){if(e(t[r]))return t[r];r++}}function Y$(){return Y$=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y$.apply(null,arguments)}var Ba=class{constructor(e,r,n){if(!e)throw new TypeError("First argument is required");if(typeof e!="string")throw new TypeError("First argument must be a string");if(e[0]==="+"&&!r)throw new TypeError("`metadata` argument not passed");if(Ri(r)&&Ri(r.countries)){n=r;let s=e;if(!pye.test(s))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');let{countryCallingCode:a,number:c}=ry(s,void 0,void 0,void 0,n);if(r=c,e=a,!r)throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if(typeof r!="string")throw new TypeError("`nationalNumber` argument must be a string");x$(n);let{country:o,callingCode:i}=U$(e,n);this.country=o,this.countryCallingCode=i,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=()=>n}setExt(e){this.ext=e}getPossibleCountries(){return this.country?[this.country]:j$(this.countryCallingCode,this.nationalNumber,this.getMetadata())}isPossible(){return w$(this,{v2:!0},this.getMetadata())}isValid(){return k$(this,{v2:!0},this.getMetadata())}isNonGeographic(){return new yt(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}isEqual(e){return this.number===e.number&&this.ext===e.ext}getType(){return Sl(this,{v2:!0},this.getMetadata())}format(e,r){return J$(this,e,r?Y$({},r,{v2:!0}):{v2:!0},this.getMetadata())}formatNational(e){return this.format("NATIONAL",e)}formatInternational(e){return this.format("INTERNATIONAL",e)}getURI(e){return this.format("RFC3966",e)}},pye=/^\+\d+$/;var Cn=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype),this.name=this.constructor.name}};var yG=new RegExp("(?:"+ny()+")$","i");function Z$(t){let e=t.search(yG);if(e<0)return{};let r=t.slice(0,e),n=t.match(yG),o=1;for(;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}var mye={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function SG(t){return mye[t]}function RI(t){let e="";for(let r of t.split(""))e+=fye(r,e)||"";return e}function fye(t,e,r){if(t==="+"){if(e){typeof r=="function"&&r("end");return}return"+"}return SG(t)}var X$="+",gye="[\\-\\.\\(\\)]?",EG="(["+cn+"]|"+gye+")",hye="^\\"+X$+EG+"*["+cn+"]"+EG+"*$",yye=new RegExp(hye,"g"),Q$=cn,Sye="["+Q$+"]+((\\-)*["+Q$+"])*",Eye="a-zA-Z",Aye="["+Eye+"]+((\\-)*["+Q$+"])*",Cye="^("+Sye+"\\.)*"+Aye+"\\.?$",_ye=new RegExp(Cye,"g"),eM="tel:",PI=";phone-context=",AG=";isub=";function tM(t){let e=t.indexOf(PI);if(e<0)return null;let r=e+PI.length;if(r>=t.length)return"";let n=t.indexOf(";",r);return n>=0?t.substring(r,n):t.substring(r)}function CG(t){return t===null?!0:t.length===0?!1:yye.test(t)||_ye.test(t)}function rM(t,{extractFormattedPhoneNumber:e}){let r=tM(t);if(!CG(r))throw new Cn("NOT_A_NUMBER");let n;if(r===null)n=e(t)||"";else{n="",r.charAt(0)===X$&&(n+=r);let i=t.indexOf(eM),s;i>=0?s=i+eM.length:s=0;let a=t.indexOf(PI);n+=t.substring(s,a)}let o=n.indexOf(AG);if(o>0&&(n=n.substring(0,o)),n!=="")return n}var bye=250,Tye=new RegExp("["+ey+cn+"]"),vye=new RegExp("[^"+cn+"#]+$"),Rye=!1;function nM(t,e,r){e=e||{};let n=new yt(r);if(e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new Cn("INVALID_COUNTRY"):new Error(`Unknown country: ${e.defaultCountry}`);let{number:o,ext:i,error:s}=Nye(t,e.v2,e.extract);if(!o){if(e.v2)throw s==="TOO_SHORT"?new Cn("TOO_SHORT"):new Cn("NOT_A_NUMBER");return{}}let{country:a,nationalNumber:c,countryCallingCode:l,countryCallingCodeSource:u,carrierCode:p}=xye(o,e.defaultCountry,e.defaultCallingCode,n);if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new Cn("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(e.v2)throw new Cn("TOO_SHORT");return{}}if(c.length>17){if(e.v2)throw new Cn("TOO_LONG");return{}}if(e.v2){let f=new Ba(l,c,n.metadata);return a&&(f.country=a),p&&(f.carrierCode=p),i&&(f.ext=i),f.__countryCallingCodeSource=u,f}let m=(e.extended?n.hasSelectedNumberingPlan():a)?an(c,n.nationalNumberPattern()):!1;return e.extended?{country:a,countryCallingCode:l,carrierCode:p,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&$$(c,n)),phone:c,ext:i}:m?Oye(a,c,i):{}}function Pye(t,e,r){if(!t)return;if(t.length>bye){if(r)throw new Cn("TOO_LONG");return}if(e===!1)return t;let n=t.search(Tye);if(!(n<0))return t.slice(n).replace(vye,"")}function Nye(t,e,r){let n=rM(t,{extractFormattedPhoneNumber:i=>Pye(i,r,e)});if(!n)return{};if(!W$(n))return fG(n)?{error:"TOO_SHORT"}:{};let o=Z$(n);return o.ext?o:{number:n}}function Oye(t,e,r){let n={country:t,phone:e};return r&&(n.ext=r),n}function xye(t,e,r,n){let{countryCallingCodeSource:o,countryCallingCode:i,number:s}=ry(RI(t),void 0,e,r,n.metadata),a;if(i)n.selectNumberingPlan(i);else if(s&&(e||r))e?(a=e,n.selectNumberingPlan(e),i=n.numberingPlan.callingCode()):(n.selectNumberingPlan(r),i=r,Rye&&n.isNonGeographicCallingCode(i)&&(a="001"));else return{};if(!s)return{countryCallingCodeSource:o,countryCallingCode:i};let{nationalNumber:c,carrierCode:l}=up(RI(s),void 0,n),u=ty(i,{nationalNumber:c,metadata:n});return u&&(a=u,u==="001"||n.selectNumberingPlan(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:c,carrierCode:l}}function oM(){return oM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},oM.apply(null,arguments)}function iM(t,e,r){return nM(t,oM({},e,{v2:!0}),r)}function sM(){return sM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sM.apply(null,arguments)}function aM(t){let[e,r,n,o]=Array.prototype.slice.call(t),i,s,a;if(typeof e=="string")i=e;else throw new TypeError("A text for parsing must be a string.");if(!r||typeof r=="string")o?(s=n,a=o):(s=void 0,a=n),r&&(s=sM({defaultCountry:r},s));else if(Ri(r))n?(s=r,a=n):a=r;else throw new Error(`Invalid second argument: ${r}`);return{text:i,options:s,metadata:a}}function cM(){return cM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cM.apply(null,arguments)}function lM(t,e,r){e&&e.defaultCountry&&!dG(e.defaultCountry,r)&&(e=cM({},e,{defaultCountry:void 0}));try{return iM(t,e,r)}catch(n){if(!(n instanceof Cn))throw n}}function oy(){let{text:t,options:e,metadata:r}=aM(arguments);return lM(t,e,r)}var NI=class extends Ba{constructor(e){super(e,II)}};function OI(){return v$(oy,arguments,NI.prototype)}var _G="Enter a valid phone number";Dt.register("phone",t=>{let e=null;t&&!/^\+?\d+$/.test(t)&&(e=_G);let n=t?.startsWith("+");if(t&&n){let o=OI(t);(!o||!o.isPossible()||t!==o.number)&&(e=_G)}return e});var IG="​",bG="‌",Dye=t=>{if(t&&t.startsWith(IG)&&t.endsWith(IG))return"invalid";if(t&&t.startsWith(bG)&&t.endsWith(bG))return"incomplete"},uM=(t,e)=>{switch(Dye(e)??e){case"invalid":return`Incorrect ${t}`;case"incomplete":return`Incomplete ${t}`;default:return null}};Dt.register("datetime",t=>uM("date and time",t));Dt.register("date",t=>uM("date",t));Dt.register("time",t=>uM("time",t));var TG=t=>{let e="Error with one or more files";for(let r of t)if(r?.error)return e;return null};Dt.register("attachment",t=>{let e=null,r="Error with one or more files";return t&&("pyCount"in t&&Array.isArray(t.pxResults)?e=TG(t.pxResults):Array.isArray(t)?e=TG(t):"error"in t&&t.error&&(e=r)),e});var El=()=>{let t={},e=typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;e&&(t["user-timezone"]=e);let r=typeof navigator<"u"?navigator.language:void 0;return r&&(t["user-locale"]=r),t},RG="createConversation",xI="sendMessage",PG="getConversations",NG="getMessages",OG="createConversationForAgent",vG="sendMessageForAgent",wye="getConversationsForAgent",$ye="getMessagesForAgent",Mye="likeAgentMessage",kye="dislikeAgentMessage",Lye="getAgent",xG="getCoach",DG=(t,e,r,n,o,i,s)=>{for(let c of s)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=hi();return s.push(a),ve(t,{queryPayload:PG===t?{assistantID:e,contextID:r,pageSize:n,pageIndex:o}:{agentID:e,contextID:r,pageSize:n,pageIndex:o},cancelTokenSource:a,headers:El()},i).finally(()=>{let c=s.indexOf(a);c!==-1&&s.splice(c,1)})},wG=(t,e,r,n,o)=>{for(let s of o)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=hi();return o.push(i),ve(t,{queryPayload:NG===t?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},cancelTokenSource:i,headers:El()},n).then(s=>(o.pop(),s))},$G=(t,e,r,n,o,i,s=!1)=>{for(let c of o)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=hi();return o.push(a),ve(t,{body:JSON.stringify({contextID:e,executeStarterQuestion:!1,...i&&i.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...t===OG&&s&&{showAgentRecommendations:s}}),cancelTokenSource:a,queryPayload:t===RG?{assistantID:r}:{agentID:r},headers:El()},n).then(c=>(o.pop(),c))},MG=(t,e,r,n,o,i,s)=>{let a={...n&&{request:n},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...s&&s.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},...i&&i?.length>0&&{attachments:i}};return ve(t,{body:JSON.stringify(a),queryPayload:t===xI?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},headers:El()},o)},kG=(t,e,r,n,o,i,s,a)=>{let c={...n&&{request:n},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...i&&i.length>0&&{attachments:i},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},capabilities:{stream:{isEnabled:!0},...s&&s.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...s&&s.questionnaire&&{questionnaire:s.questionnaire}},l=t===xI?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},{restApi:u,reqType:p}=U(t,l),m={method:p,headers:{Accept:"text/event-stream",...El()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...a&&{signal:a.token}};return k(u,m,o)},LG=(t,e,r,n,o)=>{for(let s of n)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=hi();return n.push(i),ve(t,{queryPayload:t===xG?{assistantID:e,...o&&{contextID:o}}:{agentID:e,...o&&{contextID:o}},cancelTokenSource:i},r).then(s=>(n.pop(),s)).catch(s=>{throw n.pop(),s})},Uye=(t,e,r,n,o,i=[])=>DG(PG,t,e,r,n,o,i),jye=(t,e,r,n,o,i=[])=>DG(wye,t,e,r,n,o,i),zye=(t,e,r,n=[])=>wG(NG,t,e,r,n),Fye=(t,e,r,n=[])=>wG($ye,t,e,r,n),Vye=(t,e,r,n=[])=>$G(RG,t,e,r,n),Bye=(t,e,r,n=[],o,i)=>$G(OG,t,e,r,n,o,i),Hye=(t,e,r,n,o)=>o?.enableStreaming?kG(xI,t,e,r,n,void 0,o):MG(xI,t,e,r,n),Gye=(t,e,r,n,o,i)=>i?.enableStreaming?kG(vG,t,e,r,n,o,i,i.cancelTokenSource):MG(vG,t,e,r,n,o,i),qye=(t,e,r,n=[])=>LG(Lye,t,e,n,r),Wye=(t,e,r,n=[])=>LG(xG,t,e,n,r),Kye=(t,e,r,n)=>{let o={queryPayload:{agentID:t,conversationID:e,messageID:r},headers:El()};return ve(Mye,o,n)},Jye=(t,e,r,n,o="")=>{let i={queryPayload:{agentID:t,conversationID:e,messageID:r},body:JSON.stringify({feedbackText:o}),headers:El()};return ve(kye,i,n)},UG={createConversation:Vye,sendMessage:Hye,createConversationForAgent:Bye,sendMessageForAgent:Gye,getAgent:qye,getCoach:Wye,likeAgentMessage:Kye,unLikeAgentMessage:Jye,getConversations:Uye,getConversationsForAgent:jye,getMessages:zye,getMessagesForAgent:Fye};var dM=class{async rewriteText(e){let{originalText:r,rewriteAction:n,additionalInstructions:o,context:i}=e,s=v.isInfinityRuntime(),a=v.getRewriteGenAIDP()??P.getDefaultQualifiedName("D_RewriteWithAI"),c={OriginalText:r,RewriteAction:n,AdditionalInstructions:o||""};try{let l,u;if(s){let p=await Zt.getPageDataAsync(a,i,c),f=Object.fromEntries(Object.entries(p)).pyResponseData;l=typeof f=="string"?f:void 0}else{let m=(await Zt.getDataAsync(a,i,c)).data[0],f=m[P.getDefaultQualifiedName("Content")];l=typeof f=="string"?f:void 0;let h=m[P.getDefaultQualifiedName("ErrorMessage")];u=typeof h=="string"?h:void 0}return l?{success:!0,rewrittenText:l}:{success:!1,errorMessage:u||"AI rewrite failed: No rewritten text returned"}}catch(l){return{success:!1,errorMessage:l instanceof Error?l.message:"An unexpected error occurred during AI rewrite"}}}},jG=new dM;var pM=class{classAccessMap=new Map;static instance;constructor(){let e=v.getClassesAccessList();e.length!==0?this.classAccessMap=e.reduce((r,n)=>(r.set(n.pyClassName,n.pyHasCreateAccess),r),new Map):this.classAccessMap=v.getCaseTypeList().reduce((r,n)=>(r.set(n.pyWorkTypeImplementationClassName,n.hasCreateAccess??!0),r),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}},zG=pM;var mM=class{static AUTOSAVE_SAVE_STATUS=Fd;static isAutosaveEnabledForContext(e){return fs(e)}static subscribeAutosaveStatus(e,r){return s6(e,r)}static notifyChange(e,r,n){fs(e)&&(o6(e,r,n),Bd(e))}},FG=mM;var fM=class t{static behaviorOverrides={};getPersonalizationUtils=zH;constructor(){t.behaviorOverrides={}}getPCoreVersion=()=>"27.1.0";onPCoreReady=e=>Gr.onPCoreReady(e);onPCoreCleanup=e=>Gr.onPCoreCleanup(e);getComponentsRegistry=()=>Gr.getComponentsRegistry();checkIfSemanticURL=()=>Gr.checkIfSemanticURL();isValidSemanticURL=()=>s9();getRoutingUtils=()=>WH;getViewResources=()=>pD;configureForBrowserBookmark=e=>Gr.configureForBrowserBookmark(e);getStore=()=>De();resetStore=()=>ps();getMessageManager=()=>Nu;getCoexistenceManager=()=>Zh;getStoreValue=(e,r,n)=>oe(e,r,n);getContainerUtils=()=>na;getAnnotationUtils=()=>_r;getFieldUtils=()=>ei;getFieldDefaultUtils=()=>Xr;getAssetLoader=()=>Be;getAttachmentUtils=()=>du;getViewRuleApi=()=>RH;getFeedUtils=()=>DH;getTagUtils=()=>wH;getGenAIAssistantUtils=()=>UG;getGenAIUtils=()=>jG;getStakeholderUtils=()=>$H;getUserApi=()=>OH;getCaseFollowerApi=()=>PH;getCaseUtils=()=>B;getStateUtils=()=>$n;getRelatedCasesApi=()=>NH;getDataApi=()=>Ao;getDataApiUtils=()=>or;getAnalyticsUtils=()=>qH;getLocaleUtils=e=>{let r=e??v.getLocale()??"en-US";return Ci(r)};registerLocaleManager=e=>{let r=this.getLocaleUtils();Object.keys(e).forEach(n=>{r[n]=e[n]})};setBehaviorOverrides=e=>{t.behaviorOverrides=e};setBehaviorOverride=(e,r)=>{t.behaviorOverrides[e]=r};getBehaviorOverrides=()=>t.behaviorOverrides;getBehaviorOverride=e=>t.behaviorOverrides[e];getAsynchronousUtils=()=>cG;createPConnect=e=>ct(e);getPubSubUtils=()=>$;registerComponentCreator=e=>{BV(e)};getConstants=()=>Object.freeze(E);getResolvedConstantValue=e=>d.getProperty(e);getEvents=()=>JH;getRestClient=()=>WC;getMashupApi=()=>SI;getEnvironmentInfo=()=>v;switchLocale=e=>gH(e);getRuntimeParamsAPI=()=>al;getSemanticUrlUtils=()=>gu;getRemoteCaseUtils=()=>ae;getNavigationUtils=()=>pt;getSDKUtils=()=>b$;registerModule=(e,r)=>KH.registerModule(e,r,this);getErrorHandler=()=>YH;getFormUtils=()=>rn;getAutosaveUtils=()=>FG;getMessagingServiceManager=()=>Tt;getMetadataUtils=()=>Zn;getDataPageUtils=()=>Zt;getDataTypeUtils=()=>Si;getCascadeManager=()=>Cr;isDeepEqual=(e,r)=>lo(e,r);getAuthUtils=()=>ZH;getDebugger=()=>br;getDeferLoadManager=()=>Ld;getExpressionEngine=()=>wD;getActionsSequencer=()=>Ct;getRefreshManager=()=>Ai;getInitialiser=()=>op;getBootstrapUtils=()=>Gr;getContextTreeManager=()=>Ie;getAccessPrivilege=()=>zG.getInstance();getObjectTransformer=()=>Ve;getAllStateMachines=(e,r,n)=>!r||!n?ke.getAllStateMachinesByContext(e):ke.getAllStateMachines(e,r,n);isNamespaceEnabled=()=>P.isNamespaceEnabled();getQualifiedName=(e,r)=>P.getQualifiedName(e,r);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>P;getNetworkUtils=()=>Do;getMashupBridge=()=>AI;getConfirmDialogService=()=>oi;getBrowserNotificationService=()=>yI;getMCPClient=()=>mh},VG=new fM;globalThis.PCore=VG;var dbt=VG;export{dbt as default};
63
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:b.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:b.string().optional().describe("User's timezone in IANA format."),userAgent:b.string().optional().describe("Host application identifier."),platform:b.union([b.literal("web"),b.literal("desktop"),b.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:b.object({touch:b.boolean().optional().describe("Whether the device supports touch input."),hover:b.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:b.object({top:b.number().describe("Top safe area inset in pixels."),right:b.number().describe("Right safe area inset in pixels."),bottom:b.number().describe("Bottom safe area inset in pixels."),left:b.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),qoe=b.object({method:b.literal("ui/notifications/host-context-changed"),params:A4.describe("Partial context update containing only changed fields.")}),Aze=b.object({method:b.literal("ui/update-model-context"),params:b.object({content:b.array(pi).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b.record(b.string(),b.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Cze=b.object({method:b.literal("ui/initialize"),params:b.object({appInfo:ui.describe("App identification (name and version)."),appCapabilities:Voe.describe("Features and capabilities this app provides."),protocolVersion:b.string().describe("Protocol version this app supports.")})}),Woe=b.object({protocolVersion:b.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:ui.describe("Host application identification and version."),hostCapabilities:Foe.describe("Features and capabilities provided by the host."),hostContext:A4.describe("Rich context about the host environment.")}).passthrough(),Koe={target:"draft-2020-12"};async function S4(t,e){let r=t["~standard"];if(r.jsonSchema)return r.jsonSchema[e](Koe);throw Error(`Schema (vendor: ${r.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function E4(t,e,r=""){let n=await t["~standard"].validate(e);if(n.issues){let o=n.issues.map(i=>{let s=i.path?.map(a=>typeof a=="object"?a.key:a).join(".");return s?`${s}: ${i.message}`:i.message}).join("; ");throw Error(r+o)}return n.value}function Joe(t,e){let r={...t,...e};return e.experimental!==void 0&&(r.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(r.tools={...t.tools,...e.tools}),r}var kC=class t extends ax{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new cx;_methods=new lx;setRequestHandler=(...e)=>{let[r,...n]=h4("request",e)??e;this._methods.claim(r,"setRequestHandler"),super.setRequestHandler.call(this,r,...n)};setNotificationHandler=(...e)=>{let[r,...n]=h4("notification",e)??e;this._methods.claim(r,"setNotificationHandler"),super.setNotificationHandler.call(this,r,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...r)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...r)};_assertInitialized(e){if(this._initializedSent)return;let r=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(r);console.warn(`${r}. This will throw in a future release.`)}eventSchemas={toolinput:$oe,toolinputpartial:Moe,toolresult:Goe,toolcancelled:koe,hostcontextchanged:qoe};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!t.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e)||(this._everHadListener.add(e),!this._initializedSent))return;let r=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(r);console.warn(r)}setEventHandler(e,r){r&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,r)}addEventListener(e,r){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,r)}removeEventListener(e,r){this._events.removeEventListener(e,r)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let r=this.eventSchemas[e];if(!r)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(r.shape.method.value,{params:r.shape.params},n=>{let o=n;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...o}),this._events.dispatch(e,o)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,r,n){r&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,r={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=r,this.options=n,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!n.allowUnsafeEval&&b.config({jitless:!0}),this.replaceRequestHandler("ping",o=>(console.log("Received ping:",o.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=Joe(this._appCapabilities,e)}registerTool(e,r,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,i=()=>{o._initializedSent&&o._appCapabilities.tools?.listChanged&&o.sendToolListChanged()},s=r.inputSchema!==void 0,a={title:r.title,description:r.description,inputSchema:r.inputSchema,outputSchema:r.outputSchema,annotations:r.annotations,_meta:r._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(c){Object.assign(this,c),i()},remove(){o._registeredTools[e]===a&&(delete o._registeredTools[e],i())},handler:async(c,l)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let u;if(s){let p=a.inputSchema,m=p?await E4(p,c??{},`Invalid input for tool ${e}: `):c??{};u=await n(m,l)}else u=await n(l);return a.outputSchema&&!u.isError&&(u.structuredContent=await E4(a.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `)),u}};return this._registeredTools[e]=a,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,r)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,r)},this.onlisttools=async(e,r)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([n,o])=>o.enabled).map(async([n,o])=>{let i={name:n,title:o.title,description:o.description,inputSchema:o.inputSchema?await S4(o.inputSchema,"input"):{type:"object",properties:{}}};return o.outputSchema&&(i.outputSchema=await S4(o.outputSchema,"output")),o.annotations&&(i.annotations=o.annotations),o._meta&&(i._meta=o._meta),i}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler("ui/resource-teardown",{params:joe.shape.params,result:zoe},(r,n)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(r,n)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(r,n)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(r.params,n)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(r,n)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(r.params,n)})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,r){if(this._assertInitialized("callServerTool"),typeof e=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...r})}async readServerResource(e,r){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},r)}async listServerResources(e,r){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},r)}async createSamplingMessage(e,r){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},r)}sendMessage(e,r){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},woe,r)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,r){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Ia,r)}openLink(e,r){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},xoe,r)}sendOpenLink=this.openLink;downloadFile(e,r){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},Doe,r)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,r){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Boe,r)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,r=0,n=0,o=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let s=document.documentElement,a=s.style.height;s.style.height="max-content";let c=Math.ceil(s.getBoundingClientRect().height);s.style.height=a;let l=Math.ceil(window.innerWidth);(l!==r||c!==n)&&(r=l,n=c,this.sendSizeChanged({width:l,height:c}))}))};o();let i=new ResizeObserver(o);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new uh(window.parent,window.parent),r){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:voe}},Woe,r);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(n){throw this.close(),n}}};var _4="pxC11nAction",ls,cs,LC=Promise.resolve(),wd=0,I4,px=!1,mx,b4=!1,UC=(...t)=>{b4&&console.log("[MCP]",...t)},T4=t=>{I4=t},v4=_4,R4=()=>v4,C4=()=>new DOMException("MCP initialization was superseded by a newer initialize or disconnect call","AbortError"),ph=()=>{if(!ls)throw new Error("MCP client is not initialized");return ls},Yoe=(t,e)=>{ls!==t&&cs!==t||(px=!0,mx=e,UC("host tool result",e),I4?.(e))},Zoe={async initialize(t){wd+=1;let e=wd;px=!1,mx=void 0,v4=t.c11nToolName||_4;let r=new Set([ls,cs].filter(i=>i!==void 0));ls=void 0,cs=void 0;let n=Promise.all(Array.from(r,i=>i.close())),o=LC.catch(()=>{}).then(async()=>{if(await n,e!==wd)throw C4();let i=t.eventTarget;if(!i)try{i=window.parent}catch(c){throw new Error("MCP client cannot access window.parent",{cause:c})}let s=t.eventSource??i,a=new kC({name:t.name,version:t.version},{},{autoResize:t.autoResize??!1,strict:t.strict??!0});cs=a,a.ontoolresult=c=>Yoe(a,c);try{await a.connect(new uh(i,s))}catch(c){throw cs===a&&(cs=void 0),e===wd&&await a.close(),c}if(e!==wd)throw C4();cs=void 0,ls=a});LC=o.catch(()=>{}),await o},callTool(t,e){return UC("tool call",t.name,t.arguments),ph().callServerTool(t,e).then(r=>(UC("tool result",t.name,r),r),r=>{throw UC("tool call failed",t.name,r),r})},listResources(t,e){return ph().listServerResources(t,e)},readResource(t,e){return ph().readServerResource(t,e)},listPrompts(t,e){return ph().request({method:"prompts/list",params:t},e)},getPrompt(t,e){return ph().request({method:"prompts/get",params:t},e)},async disconnect(){wd+=1;let t=new Set([ls,cs].filter(r=>r!==void 0));ls=void 0,cs=void 0;let e=Promise.all(Array.from(t,r=>r.close()));LC=LC.catch(()=>{}).then(()=>e).then(()=>{}),await e},isConnected(){return ls!==void 0},hasReceivedToolResult(){return px},getToolResult(){return mx},setDebug(t){b4=t}},mh=Zoe;var Qoe=(t,e)=>e[E.TRACE_ID]?{type:"error",message:t.localizedValue||t.message,correlationID:e[E.TRACE_ID]}:{type:"error",message:t.localizedValue||t.message},Xoe=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),eie=t=>t?Xoe.has(t.toLowerCase()):!1,tie=(t,e)=>{if(!eie(e))return t;if(t&&t.includes("/workarea")&&!t.includes("/modal")){let r=t.lastIndexOf("/workarea");if(r!==-1)return t.slice(0,r)}return t},P4=t=>typeof t=="object"&&t!==null,rie=t=>{if(t instanceof ArrayBuffer)try{let r=new TextDecoder().decode(t),n=JSON.parse(r);return P4(n)?n:{}}catch{return{}}return P4(t)?t:{}},nie=(t,e,r,n)=>{if(t.config&&Ys(t.config.url,r))return Promise.reject(t);if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&!e.getUpdateSessionStatus()&&t.config.fetchTimeStamp>e.latestUpdateSessionTimeStamp){if($.unsubscribeAllWithEventType($d),e.setUpdateSessionStatus(!0),r?.authType==="custom"){$.publish(E.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);let{url:i,config:s,context:a}=Fb(t);return _m(i,s,a,e)}return fU(t,e,r)}if(t.response&&t.response.status&&t.response.status===401&&!t.config.isExternalUrl&&e.getUpdateSessionStatus()&&!zS(t.config.url)){let{url:i,config:s,context:a}=Fb(t);return k(i,s,a)}let o=rie(t.response?.data);if(t.response&&t.response.status&&t.response.status!==422&&t.response.status!==424&&!(t.response.status===400&&o.errorClassification===E.INVALID_INPUTS)&&t.config.headers.context&&t.response.data&&!n){let i=o.errorDetails&&o.errorDetails.map(a=>Qoe(a,t.response.headers)),s=tie(t.config.headers.context,o.errorClassification);return Pn({messages:i,category:"HTTP",context:s}),Promise.reject(t)}return Promise.reject(t)},N4=nie;var fx=class{languagePacks;constructor(){this.languagePacks=[]}getLocalizationBundles(e=v.getLocale()){return(this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles??this.languagePacks.find(n=>n.pyLangCode===d.DEFAULT.toUpperCase())?.pyBundles??[]).sort((n,o)=>n.pyOrder-o.pyOrder)}hasLocalizationBundles(e=v.getLocale()){let r=this.languagePacks.find(n=>n.pyLangCode===e)?.pyBundles;return!!r&&r.length>0}async loadLocaleBundle(e){let r=e.map(i=>Zt.getPageDataAsync("D_pzBundlesForLocalization","",{locale:i,onlyApp:"false"},{invalidateCache:!0})),o=(await Promise.allSettled(r)).filter(i=>i.status==="fulfilled").flatMap(i=>i.value.pyLanguagePacks);this.setLanguagePack(o)}setLanguagePack(e){e.forEach(r=>{let n=this.languagePacks.findIndex(o=>o.pyLangCode===r.pyLangCode);n!==-1?this.languagePacks[n]=r:this.languagePacks.push(r)})}},us=new fx;var gx="Accept-Language",O4=(t,e)=>Object.keys(t).some(r=>r.toLowerCase()===e.toLowerCase()),hx=class{externalHeaders;defaultHeaders;SPECIAL_CHARS;constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,r){return this.defaultHeaders[e]?!1:(this.externalHeaders[e]=r,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return{...this.getLocaleHeaders(),...this.externalHeaders}}getLocaleHeaders(){let e=v.getLocale()??v.getUseLocale();return!e||!us.hasLocalizationBundles(e)||O4(this.defaultHeaders,gx)||O4(this.externalHeaders,gx)?{}:{[gx]:e.replaceAll("_","-")}}setDefaultHeaders(e){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||e.length===0)return;let r=new URLSearchParams(globalThis.location?.search??""),n=this.buildHeaderMapFromRequestContext(e,r);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,r){let n={};return e?.forEach(o=>{Array.isArray(o.IncludeInHeaders)&&o.IncludeInHeaders.forEach(i=>{let s=i.Value,a=r.get(o.Key)??i.defaultValue;a&&(n[s]||(n[s]=[]),n[s].push(`${o.Key}=${a}`))})}),n}registerHeadersFromMap(e){Object.entries(e).forEach(([r,n])=>{n.length>0&&this.registerHeader(r,n.join("; "))})}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[d.COREHEADER_APP_DEBUG_ID]:e.debugId,[d.COREHEADER_APP_DEBUG_LEVELS]:br.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;let r=J.getProperty(d.COREHEADERS,"",e);return r?{...r,debugInfo:br.getPreviewMode()&&{...r.debugInfo,[d.COREHEADER_APP_DEBUG_LEVELS]:br.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,r,n){let o=this.getCoreHeadersFromContext(n);if(o){let i=Object.keys(e);if(i.includes(d.SKIPCOREHEADERS)){delete e[d.SKIPCOREHEADERS];return}let s=Object.assign({},...Object.values(o));Object.keys({...s}).forEach(a=>{i.includes(a)||(e[a]=s[a])})}}injectCoreAdditionalHeaders(e,r,n,o){if(o?.includeRemoteSystemIdIfPresent){let i=r?.caseTypeID?{caseTypeID:r.caseTypeID}:void 0;ae.injectRemoteCaseHeader(e,i,n)}this.processCoreHeaders(e,r,n)}},oie=new hx,Ge=oie;var fh=class{timerID;expiryBuffer;timeoutWarned;onWarnedReset;constructor(e){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1,this.onWarnedReset=e}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{let r=globalThis.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&($.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.RESET_TIMER),this.timeoutWarned=!1,this.onWarnedReset?.()),!!r)return e&&clearTimeout(e),this.startInactivityTimeout(r>60?r:60)};startInactivityTimeout=e=>{let r=setTimeout(()=>{$.publish(E.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(r),$.subscribe(E.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0},(e-this.expiryBuffer)*1e3);return this.setTimerID(r),r}};var yx=class{handlers=[];use(e,r){return this.handlers.push({fulfilled:e,rejected:r}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){for(let r of this.handlers)r!==null&&e(r)}get size(){return this.handlers.filter(e=>e!==null).length}},Sx=yx;var no={ERR_NETWORK:"ERR_NETWORK",ECONNABORTED:"ECONNABORTED",ERR_CANCELED:"ERR_CANCELED",ERR_BAD_REQUEST:"ERR_BAD_REQUEST",ERR_BAD_RESPONSE:"ERR_BAD_RESPONSE"},jC="GET",zC="content-type",Ex="accept";var iie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},sie=async t=>{let e=await t.text();if(!e||e.trim().length===0)return e;try{return JSON.parse(e)}catch{return e}},x4=async(t,e)=>{switch(e){case"json":return iie(t);case"text":return t.text();case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"stream":return t.body;default:return sie(t)}},D4=t=>{let e={};return t.forEach((r,n)=>{e[n]=r}),e};var FC=()=>{let t=new AbortController;return{token:t.signal,cancel(e){t.abort(e)}}},VC=t=>t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"?!0:!!(t&&typeof t=="object"&&"code"in t&&t.code===no.ERR_CANCELED),w4=(t,e)=>{let r=t!==void 0,n=e!==void 0&&e>0;if(!r&&!n)return;if(!n&&r)return t;let o=n?e:void 0;if(o===void 0)return t;let i=AbortSignal.timeout(o);if(!r)return i;if(typeof AbortSignal.any=="function")return AbortSignal.any([t,i]);let s=new AbortController,a=()=>{s.abort(t.reason??i.reason)};return t.aborted||i.aborted?(s.abort(t.aborted?t.reason:i.reason),s.signal):(t.addEventListener("abort",a,{once:!0}),i.addEventListener("abort",a,{once:!0}),s.signal)},$4=t=>t?.reason==="TimeoutError"||t?.reason instanceof DOMException&&t.reason.name==="TimeoutError"?no.ECONNABORTED:no.ERR_CANCELED;var va=(t,e,r,n)=>{let o=new Error(t);return o.name="HttpError",o.config=e,o.code=r,o.response=n,o.isAxiosError=!0,o},Ax=(t,e)=>typeof t=="object"&&t!==null&&"name"in t&&t.name===e,Cx=t=>typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string",M4=t=>t.timeout?`timeout of ${t.timeout}ms exceeded`:"timeout exceeded",gh=(t={})=>{let e=va("canceled",t,no.ERR_CANCELED);return e.name="AbortError",e},Ra=(t,e)=>{if(e.signal?.aborted){let r=$4(e.signal),n=va(r===no.ECONNABORTED?M4(e):"canceled",e,r);return n.name=r===no.ECONNABORTED?"TimeoutError":"AbortError",n}if(Ax(t,"TimeoutError")){let r=va(M4(e),e,no.ECONNABORTED);return r.name="TimeoutError",r}if(Ax(t,"AbortError"))return gh(e);if(Ax(t,"TypeError")&&Cx(t)){let r=va(t.message||"Network Error",e,no.ERR_NETWORK);return r.isOffline=!navigator.onLine,r}if(Cx(t)&&t.message==="Network Offline"){let r=va("Network Offline",e,no.ERR_NETWORK);return r.isOffline=!0,r}if(Cx(t)){let r=va(t.message,e);return r.cause=t.cause,r}return va(String(t),e)},k4=(t,e)=>{let r;t.status>=400&&t.status<500?r=no.ERR_BAD_REQUEST:t.status>=500&&t.status<600&&(r=no.ERR_BAD_RESPONSE);let n=va(`Request failed with status code ${t.status}`,e,r,t);return n.status=t.status,n};var aie="application/json, text/plain, */*",cie="application/x-www-form-urlencoded",lie=["POST","PUT","PATCH"],uie=/[^\t\x20-\x7e\x80-\xff]+/g,L4=t=>t===" "||t===" ",die=t=>{let e=t.replace(uie,""),r=0,n=e.length;for(;r<n&&L4(e[r]);)r+=1;for(;n>r&&L4(e[n-1]);)n-=1;return e.slice(r,n)},pie=t=>{let e={};if(!t)return e;let r=new Map;for(let[n,o]of Object.entries(t))if(o!=null){let i=n.toLowerCase(),s=r.get(i)??n;r.set(i,s),e[s]=die(String(o))}return e},j4=t=>(typeof t[Symbol.iterator]!="function"&&Object.defineProperty(t,Symbol.iterator,{value(){return Object.entries(this)[Symbol.iterator]()},enumerable:!1,configurable:!0}),t),z4=t=>t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||typeof ReadableStream<"u"&&t instanceof ReadableStream,F4=t=>typeof t=="object"&&t!==null&&!z4(t),U4=(t,e)=>Object.keys(t).find(r=>r.toLowerCase()===e),_x=(t,e)=>{let r=pie(t.headers),{body:n}=t;U4(r,Ex)||(r[Ex]=aie);let o=U4(r,zC);return n===void 0||n instanceof FormData?o&&delete r[o]:!o&&!(n instanceof URLSearchParams)&&(F4(n)?r[zC]="application/json":lie.includes(e)&&(r[zC]=cie)),r},V4=t=>z4(t)||typeof t=="string"?t:JSON.stringify(t),mie=t=>{let e=(t.method??jC).toUpperCase(),r={method:e,headers:_x(t,e),credentials:t.credentials};t.body!==void 0&&t.body!==null&&e!=="GET"&&e!=="HEAD"&&(r.body=V4(t.body));let n=w4(t.signal,t.timeout);return n&&(r.signal=n),r},B4=async t=>{let e=t.url??"",r=mie(t),n;try{n=await globalThis.fetch(e,r)}catch(s){throw Ra(s,t)}let o=D4(n.headers),i;try{i=await x4(n,t.responseType)}catch(s){throw Ra(s,t)}return t.headers&&j4(t.headers),{data:i,status:n.status,statusText:n.statusText,headers:o,config:t}},fie=t=>{let e={};if(!t)return e;let r=t.trim().split(/[\r\n]+/);for(let n of r){let o=n.indexOf(":");if(o>0){let i=n.substring(0,o).trim().toLowerCase(),s=n.substring(o+1).trim();e[i]=s}}return e},H4=t=>new Promise((e,r)=>{let n=new XMLHttpRequest,o=t.url??"",i=(t.method??jC).toUpperCase();if(n.open(i,o,!0),Object.entries(_x(t,i)).forEach(([a,c])=>{n.setRequestHeader(a,c)}),t.credentials==="include"&&(n.withCredentials=!0),t.responseType==="arraybuffer"?n.responseType="arraybuffer":t.responseType==="blob"?n.responseType="blob":n.responseType="text",t.onUploadProgress&&n.upload&&n.upload.addEventListener("progress",t.onUploadProgress),t.onDownloadProgress&&n.addEventListener("progress",t.onDownloadProgress),t.signal){if(t.signal.aborted){n.abort(),r(Ra(new DOMException("The operation was aborted.","AbortError"),t));return}t.signal.addEventListener("abort",()=>{n.abort(),r(Ra(new DOMException("The operation was aborted.","AbortError"),t))},{once:!0})}t.timeout&&t.timeout>0&&(n.timeout=t.timeout),n.ontimeout=()=>{r(Ra(new DOMException("The operation timed out.","TimeoutError"),t))},n.onload=()=>{t.headers&&j4(t.headers);let a=fie(n.getAllResponseHeaders()),c;if(n.responseType==="arraybuffer"||n.responseType==="blob")c=n.response;else{let u=n.responseText;try{c=JSON.parse(u)}catch{c=u}}let l={data:c,status:n.status,statusText:n.statusText,headers:a,config:t};e(l)},n.onerror=()=>{r(Ra(new TypeError("Network Error"),t))},n.onabort=()=>{r(Ra(new DOMException("The operation was aborted.","AbortError"),t))};let s=t.body!==void 0&&t.body!==null?V4(t.body):null;n.send(s)}),G4=t=>{let e=(t.method??jC).toUpperCase(),r=_x(t,e),{body:n}=t,o=t.headers??{},i=Object.keys(o).map(s=>s.toLowerCase());Object.entries(r).forEach(([s,a])=>{i.includes(s.toLowerCase())||(o[s]=a)}),t.headers=o,F4(n)?t.data=JSON.stringify(n):n instanceof URLSearchParams&&(t.data=n.toString())};var Ix=t=>(Object.defineProperty(t,"data",{get:()=>t.body,set:e=>{t.body=e},enumerable:!1,configurable:!0}),t),q4=t=>{let e=Object.getOwnPropertyDescriptor(t,"data");return e&&"value"in e&&e.value!==void 0&&e.value!==t.body&&(t.body=e.value),Ix(t)};var gie=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},bx=t=>{if(Array.isArray(t))return t.map(bx);if(gie(t)){let e={};return Object.keys(t).forEach(r=>{e[r]=bx(t[r])}),e}return t},Tx=class{interceptors;constructor(){this.interceptors={request:new Sx,response:new Sx}}async request(e){let r=Ix({...e,...e.body!==void 0&&{body:bx(e.body)}}),n=[s=>this.dispatchRequest(s),void 0];this.interceptors.request.forEach(s=>{n=[s.fulfilled,s.rejected,...n]}),this.interceptors.response.forEach(s=>{n=[...n,s.fulfilled,s.rejected]});let o=Promise.resolve(r),i=0;for(;i<n.length;)o=o.then(n[i],n[i+1]),i+=2;return await o}async dispatchRequest(e){let r=q4(e);if(typeof r.adapter=="function")return G4(r),r.adapter(r);let n;if(r.onUploadProgress||r.onDownloadProgress?n=await H4(r):n=await B4(r),n.status>=200&&n.status<300)return n;throw k4(n,r)}get(e,r){return this.request({...r,url:e,method:"GET"})}post(e,r,n){return this.request({...n,url:e,method:"POST",body:r})}put(e,r,n){return this.request({...n,url:e,method:"PUT",body:r})}patch(e,r,n){return this.request({...n,url:e,method:"PATCH",body:r})}delete(e,r){return this.request({...r,url:e,method:"DELETE"})}static createCancelSource(){return FC()}static isCanceled(e){return VC(e)}},hie=new Tx,BC=hie;var $d="updateSession",yie=t=>typeof t!="object"||t===null||!("caseTypeID"in t)?!1:typeof t.caseTypeID=="string",yh=t=>typeof t=="object"&&t!==null,K4=t=>yie(t)?{caseTypeID:t.caseTypeID}:void 0,Sie=t=>{if(!yh(t))return!1;let{caseInfo:e}=t;return yh(e)?"errorMessage"in e:!1},ds={},Md=new aU,il={},fi={},Rx={},Px="",vx=new fh(()=>uU(fi,Md)),J4=t=>{il=t},Eie=t=>!t||typeof t!="object"?!1:"continueWithDefaultErrorHandler"in t||"error"in t,Y4=t=>{let{context:e}=t??{};if(typeof e=="string")return e},Aie=t=>yh(t)&&"config"in t,Cie=t=>yh(t),_ie=t=>t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.message==="Network Offline"||t.isOffline===!0,Iie=t=>t.message!=="Network Offline"&&!!W(d.APP.APP)?.context_data?.isOffline,bie=t=>!!(t.response&&t.response.status===401&&!t.config?.isExternalUrl&&(!t.config||!Ys(t.config.url,fi))),Tie=t=>t.response&&t.response.status&&t.response.status===Number(Px)?Px:null,HC=t=>{let e=Y4(t.config?.headers);return _ie(t)?(W(e)?.isLoading&&T({type:To,payload:{context:e}}),eU(),Promise.reject(new Error("Network Offline"))):(Iie(t)&&tU(),!t.response&&t.cause?.response&&(t.response=t.cause.response),bie(t)&&$.subscribe($d,r=>{Md.setUpdateSessionStatus(!r.updateStatus)},$d),N4(t,Md,fi,Tie(t)))},vie=(t,e)=>{if(typeof e=="boolean")return e?HC(t):Promise.reject(t);if(Eie(e)){let r=e.error??t;return e.continueWithDefaultErrorHandler??!0?HC(Aie(r)?r:t):Promise.reject(r)}return HC(t)},Rie=t=>typeof t=="function",Pie=t=>typeof t=="function",Nie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_SUCCESS,t)},Oie=t=>{$.publish(d.PUB_SUB_EVENTS.FETCH_FAILURE,t)},xie=t=>{if(t?.authType==="OAuth2.0"&&t.secureCookie||t.customCookies)return!0},_t=()=>v.environmentInfoObject?.["protocol-jsonrpc"]===!0,hh=t=>typeof t=="object"&&t!==null,Nx=t=>{let e=t.content?.find(c=>c.type==="text")?.text;if(t.isError)throw new Error(e||"MCP tool call failed");let r;if(e)try{r=JSON.parse(e)}catch(c){if(!(c instanceof SyntaxError))throw c;r=e}let n=hh(r)&&"Response"in r?r.Response:r,o=hh(n)&&hh(n.outputs)?n.outputs:void 0,i=[o?.eTag,o?.etag].find(c=>typeof c=="string"),s=hh(n)?n.ViewResponse:void 0;return{data:[o?.ViewResponse,o?.ShowPageResponse,o?.PageResponse,o?.Component,o?.responseData,s].find(c=>hh(c)||typeof c=="string")??n,etag:i}},Die=(t,e)=>{let r=()=>e.abort();return t.aborted?(r(),()=>{}):(t.addEventListener("abort",r),()=>t.removeEventListener("abort",r))},pr=async(t,e,r,n)=>{let o=new AbortController,i=r?Die(r,o):void 0;try{if(o.signal.aborted)throw gh();let s={name:R4(),arguments:{ActionName:t,Payload:JSON.stringify(e)}},a={...r&&{signal:o.signal},...n!==void 0&&{timeout:n}},c=await(Object.keys(a).length>0?mh.callTool(s,a):mh.callTool(s)),{data:l,etag:u}=Nx(c);return{data:l,status:200,statusText:"OK",headers:u?{etag:u}:{},config:{url:t}}}catch(s){throw o.signal.aborted?gh():s}finally{i?.()}},wie=t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e!==Object.prototype&&e!==null},GC=({body:t,responseType:e,adapter:r})=>(e===void 0||e==="json")&&r===void 0&&!wie(t),qC=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}},ra=(t,e="root",r={})=>{let{Authorization:n,pzCTkn:o,...i}=t.headers||{};if(t.withoutDefaultHeaders)return i;Ge.injectCoreAdditionalHeaders(i,K4(t.body),e,{includeRemoteSystemIdIfPresent:r.includeRemoteSystemIdIfPresent??!0});let s={...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...i,context:e};return delete s.Authorization,delete s.pzCTkn,s},k=(t,e,r="root",n={})=>{let{doNotMergeHttpMessagesForStatusCode:o=null,cancelContext:i=r,includeRemoteSystemIdIfPresent:s=!0}=n;Px=o,t===null&&console.error("Error: url passed to Service Broker fetch is null (or) undefined");let{body:a,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:p=!1,...m}=e,{Authorization:f,pzCTkn:h,...S}=e.headers||{};if(!p){let _=K4(e.body);Ge.injectCoreAdditionalHeaders(S,_,r,{includeRemoteSystemIdIfPresent:s})}i&&ds[i]>=0?ds[i]+=1:i&&ds[i]===void 0&&(ds[i]=1);let A=p?{...S}:{...Ge.getDefaultHeaders(),...Ge.getRegisteredHeaders(),...S,context:r};m.isExternalUrl=iU(t||""),m.fetchTimeStamp=Date.now();let C=_e.doesRestApiExist("Logout")?_e.getRestEndPoint("Logout")?.restApi:void 0,I=zS(t,C);return t&&Ys(t,fi)&&Md.getUpdateSessionStatus()||!Md.getUpdateSessionStatus()||m.isExternalUrl||I?(Ys(t,fi)&&fi?.authType==="OAuth2.0"&&(A={...S}),(!C||t&&!I)&&vx.setTimerID(vx.resetInactiveTimeout(vx.getTimerID())),mb(q(BC.request({context:r,...m,url:t??void 0,body:a,...c&&{signal:c},responseType:l,adapter:u,headers:A,credentials:xie(fi)?"include":void 0})).pipe(hb(()=>{let _=Ge.getCoreHeadersFromContext(A.context);_&&Nie({..._})}),zi(_=>{let N=A,H=!!N?.[d.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[d.COREHEADER_APP_DEBUG_ID]:N?.[d.COREHEADER_APP_DEBUG_ID],[d.COREHEADER_APP_DEBUG_LEVELS]:br.getDebugLevels()}}:Ge.getCoreHeadersFromContext(A.context);throw H&&Oie({...H,error:_}),_})))):_m(t,e,r,Md)},_m=(t,e,r,n)=>new Promise((o,i)=>{$.subscribe($d,s=>{if(n.setUpdateSessionStatus(!s.updateStatus),s.updateStatus==="success")k(t,e,r).then(o).catch(i);else{let{updateStatus:a}=s;i(yh(a)?a.error:void 0)}},$d)}),W4=t=>{ds[t]>0&&(ds[t]-=1,ds[t]===0&&delete ds[t])};BC.interceptors.request.use(t=>{if(!Do.isOnline())return W(t.context)?.isLoading&&T({type:To,payload:{context:t.context}}),T({type:$s,payload:{context:"app"}}),Promise.reject(new Error("Network Offline"));if(il?.request){let e=il.request;Rie(e)&&(t=e(t))}return t},t=>Promise.reject(t));BC.interceptors.response.use(t=>{if(t.status===202&&t.config.headers?.context&&Sie(t.data)){let e=[{type:"error",message:String(t.data.caseInfo.errorMessage)}],r=t.config.headers.context;return r&&r.includes("/workarea")&&(r=r.substring(0,r.lastIndexOf("/workarea"))),Pn({messages:e,category:"HTTP",context:r}),Promise.reject(t)}if(t.config.headers&&t.config.headers.context){let e=t.config.headers.context;t.config.skipClearErrorMessages||(Gt({type:"error",category:"HTTP",context:e}).length>0&&dt({type:"error",category:"HTTP",context:e}),Gt({type:"error",category:e===d.APP.APP?"PAGE":"",context:e}).length>0&&dt({type:"error",category:"PAGE",context:e}),e.slice(e.lastIndexOf("/")+1).startsWith("primary")&&(Gt({type:"error",category:"HTTP",context:d.APP.APP}).length>0&&dt({type:"error",category:"HTTP",context:d.APP.APP}),Gt({type:"error",category:"PAGE",context:d.APP.APP}).length>0&&dt({type:"error",category:"PAGE",context:d.APP.APP}))),W4(e)}if(il?.response){let e=il.response;Pie(e)&&(t=e(t))}return t},t=>{if(!Cie(t))return Promise.reject(t);let e=Y4(t.config?.headers);return e&&W4(e),il?.error?Promise.resolve(il.error(t)).then(r=>vie(t,r)):HC(t)});var Z4=t=>ds[t],pu=()=>FC(),FS=t=>VC(t),Jn=t=>{Ge.setDefaultHeaders(t)},Hi=t=>{fi={...fi,...t}},rU=t=>{Rx={...Rx,...t}},nU=()=>({...Rx}),Cm=()=>({...fi});var Ox=class t{static createCase(e,r){let{caseInfo:n,startingFields:o,flowType:i,viewType:s=it.PAGE,pageName:a,context:c=d.APP.APP,debugInfo:l,headers:u,theType:p,retrieveActionViewForNewObject:m=!1,scope:f}=r,h={};n&&n.content&&(h=n.content);let{content:S={},pageInstructions:A}=t.getExternalCaseOrObjectContent(e,m,c),C={[t.getKeyBasedOnWorkType(e)]:e,content:{...h,...o,...S}};if(C={...C,...A&&{pageInstructions:A},...!B.isObjectCaseType(e)&&{processID:i}},p==="CREATE_EXTERNAL_CASE"){let _=W(c)?.caseInfo?.content;if(_&&Object.keys(_).length>0){let N=f?.Namespace&&f?.RuleResolutionID?{..._,[d.getDefaultQualifiedName("Scope")]:{[d.getDefaultQualifiedName("Namespace")]:f.Namespace,[d.getDefaultQualifiedName("RuleResolutionID")]:f.RuleResolutionID}}:_,x=g.pruneKeys(N,new Set(["pxObjClass",P.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",P.getDefaultQualifiedName("EmbedListUUID__")]),!1);C.content[d.getDefaultQualifiedName("pyAddCaseContextPage")]=x}}let I=t.getObjectTypeViewPayload(m,e);return ve(B.getRouteKeyForCreateWork(e,m),{body:C,queryPayload:{...I,...B.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:s,params:{pageName:a}},headers:{...u,...l&&{...Ge.addDebugHeaders(l)}}},c).then(_=>({response:_.data,requestPayload:C,headers:we(_.headers,e,u)}))}static getObjectTypeViewPayload=(e,r)=>e?B.shouldUseUnifiedHandling()?{casetypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:r,actionID:d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,r,n)=>{let o=B.isExternalObject(e),i=B.isExternalCaseType(e);if((i||o)&&!r){let s=Rt(n,{isExternalObject:!!(!i&&o)}),{content:a,pageInstructions:c}=s.content;return{content:a,pageInstructions:c}}return{}};static getKeyBasedOnWorkType=e=>B.shouldUseUnifiedHandling()?"caseTypeID":B.isObjectCaseType(e)?"objectTypeID":"caseTypeID"},gi=Ox;var $ie=()=>({registerHeader:(...t)=>Ge.registerHeader(...t),unRegisterHeader:(...t)=>Ge.unRegisterHeader(...t),getRegisteredHeaders:()=>Ge.getRegisteredHeaders()}),ve=(t,{body:e={},queryPayload:r={},cancelTokenSource:n,headers:o={},responseType:i},s,a)=>{if(_t()&&GC({body:e,responseType:i}))return pr(t,{queryPayload:r,body:qC(e),headers:o},n?.token);let{restApi:c,reqType:l}=U(t,r),u={method:l,headers:o,body:e,...i&&{responseType:i}};n&&(u.signal=n.token);let p=t==="createWork"?B.appendExcludeQueryParamToUrl(c):c;return k(p,u,s,a??{})},AT=(t,{method:e="GET",body:r={},headers:n={},withoutDefaultHeaders:o=!1,responseType:i,adapter:s,signal:a},c)=>{t.startsWith("http:")||t.startsWith("https:")||(t=gt.getServerURL()+t);let l={method:e,headers:n,body:r,withoutDefaultHeaders:o,...i&&{responseType:i},...s&&{adapter:s},...a&&{signal:a}};return k(t,l,c)},Zs=t=>_e.doesRestApiExist(t),hi=()=>pu(),Sh=t=>FS(t),Mie=t=>{J4(t)},kie=()=>gi;var xx=new Set;function Q4(){xx.clear()}function Eh(t){try{let e=new URL(t);(e.protocol==="https:"||e.protocol==="http:")&&xx.add(e.origin)}catch{}}function X4(t){let e;try{let n=globalThis.location;e=n?new URL(t,n.href).origin:new URL(t).origin}catch{throw new Error("Blocked: malformed URL")}let r;try{let n=globalThis.location;r=n?.origin??(n?new URL(n.href).origin:"")}catch{r=""}if(e!==r&&!xx.has(e))throw new Error(`Blocked: untrusted script origin "${e}"`)}var eV="getCustomComponent",Lie="getBinaryFile",Uie="getOperatorImage",KC="text/javascript",jie=100,tV=3e4,rV=t=>{let e=document.createElement("script");e.type=KC,e.textContent=t,document.head.appendChild(e)},aV=t=>{let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=1)r[n]=e.charCodeAt(n);return r},zie=t=>{if(typeof t!="string")throw new TypeError(`Custom component response must be a string, received: ${JSON.stringify(t)?.slice(0,300)}`);return new TextDecoder().decode(aV(t))},Fie=12e4,nV=Promise.resolve(),Vie=t=>{let e=nV.then(t);return nV=e.catch(()=>{}),e},oV=async(t,e)=>{let r=Object.entries(e).filter(([,i])=>i);if(_t()){let i=await Vie(()=>pr(eV,{queryPayload:{componentName:t,...Object.fromEntries(r)},body:{},headers:{}},void 0,Fie));return zie(i.data)}let n=r.map(([i,s])=>`${i}=${s}`).join("&");return(await ve(eV,{queryPayload:{componentName:n?`${t}?${n}`:t}})).data},cV=new Set(["jpg","jpeg","png","gif","webp","bmp","tif","tiff","svg","ico","heic","heif","avif"]),Bie=/^DATA-CONTENT-IMAGE\s+[^!]+!([^!]+)!\/OPERATORIMAGES\/$/i,iV=/url\(\s*(?:(['"])([^'"\r\n]+)\1|([^'"\s)][^'"\r\n]*?))\s*\)/gi;function lV(t){return t.toLowerCase().split("!").pop()||""}function Dx(t){return t.includes("?")||t.includes("#")?!1:cV.has(lV(t))}function Hie(t){let e=t.match(Bie);return e?cV.has(e[1].toLowerCase()):Dx(t)}function sV(t){let e;try{e=new URL(t).protocol}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if(e!=="http:"&&e!=="https:")throw new Error(`Component fetch blocked: unsupported dev server URL scheme "${e}"`)}var wx=class{loaderObj;staticServerURL;appStaticUrl;pegaOnlyUrl;loadedAssets;componentsConfig;appAlias;b2sJWT;ccV2LibId;isolationID;imageBlobUrlCache;isolationAssetBlobCache;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.isolationID=null,this.imageBlobUrlCache={},this.isolationAssetBlobCache=new Map}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){let e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then(r=>r.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,r={}){let n="",o=0;return e.forEach(i=>{n+=`${o===0?"?":"&"}field${o}=${i.field}&value${o}=${i.value}`,o+=1}),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,r):this.getSvcComponentsConfigCombinedUrl(e,n,r)}async getSvcComponentsConfigSeparatedUrls(e,r,n){let o=v.getBuiltOnAppNames(),i=this.loadAndFilterPegaComponentsConfig(e,o),s=Promise.resolve([]);n.skipLoadCustomerComponents!==!0&&(s=this.loadAndCustomerComponentsConfig(r,e));let a=[];if(v.environmentInfoObject?.pyInfinityStaticService){let l=[],u=await Promise.all([i,s]),[p,m]=u,f=[];for(let S of m)S.isSdkOverridden===!0?l.push(S.componentDefinition):f.push(S.componentDefinition);let h=this.mergeComponentList([p,f,l]);a.push(...h)}else{let l=this.fetchSDKComponent(r);await Promise.all([i,s,l]).then(u=>{let p=this.mergeComponentList(u);a.push(...p)})}if(n.alternateDesignSystemURL&&a.length===1){let l=await this.getSvcComponentsConfigADS(e,r,n);a[0].alternateDesignSystemConfig=l}return{data:{components:a}}}mergeComponentList=e=>{let[r=[],n=[],o=[]]=e,i="alternateDesignSystemConfig",s=[...r,...n];return this.appStaticUrl?s.map(a=>{let{name:c,type:l,subtype:u}=a,p=o.reduce((m,f)=>(c===f.name&&l===f.type&&u===f.subtype&&(m=f),m),{});return Object.keys(p).length>0?{...a,[i]:{...p}}:a}):s};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let r=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.json()).then(n=>n.components).catch(()=>[])}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,r){return this.loadPegaComponentsConfig().then(()=>{let n=[];return this.componentsConfig&&this.componentsConfig.forEach(o=>{let i=!0;e.forEach(s=>{Array.isArray(o[s.field])?o[s.field].includes(s.value)||(i=!1):o[s.field]!==s.value&&(i=!1)}),i&&this.checkForBuiltOnSupport(r,o.allowedApplications)&&n.push(o)}),n})}async loadPegaComponentsConfig(){let e=null;if(this.componentsConfig===null){let r=`${this.staticServerURL}components/componentsconfig.json?v=${new Date().getTime()}`;e=fetch(r,{method:"GET"}).then(n=>n.json()).then(async n=>{this.componentsConfig=n,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then(o=>{o&&o.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(o))}).catch(o=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${o}`)})}).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let r=null;return r=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>{if(!n.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(n.statusText);return n}).then(n=>n.json()).then(n=>Promise.resolve(n)).catch(n=>(console.error(`Exception while fetching custom component config from library ${e} : ${n}`),{error:n.message})),r}async loadAndCustomerComponentsConfig(e,r){let n=null;if(v.environmentInfoObject?.pyInfinityStaticService){let i={};r.forEach((s,a)=>{i[`field${a}`]=s.field,i[`value${a}`]=s.value}),n=PCore.getDataPageUtils().getDataAsync(P.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",i).then(s=>s.data.map(a=>{let c=JSON.parse(a.pxComponentDefinition),l=a.pyIsSDKOverridden!==void 0?a.pyIsSDKOverridden:!1;return{componentDefinition:c,isSdkOverridden:l}}))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){let i=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(i,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>s.components).catch(()=>[])}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,r){if(!e||!r||e.length===0||r.length===0)return!0;let n=e.split(",");return n.length===0?!0:n.some(o=>r.includes(o))}async getSvcComponentsConfigCombinedUrl(e,r,n){let o=`${this.staticServerURL}v102/${this.appAlias}/componentslist${r}`,i=await fetch(o,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(s=>s.json()).then(s=>({data:s}));if(n.skipLoadCustomerComponents===!0&&i?.data?.components?.length>0&&(i.data.components=i.data.components.filter(s=>s.componentKey===void 0)),n.alternateDesignSystemURL&&i?.data?.components?.length===1){let s=await this.getSvcComponentsConfigADS(e,r,n);i.data.components[0].alternateDesignSystemConfig=s}return i}getSvcComponentsConfigADS(e,r,n){let o=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(o,{method:"GET"}).then(i=>{if(i.ok)return i.json();throw new Error(i.statusText)}).catch(i=>({error:i.message}))}getSvcImage(e){let r=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(n=>n.blob()).catch()}getSvcImageUrl(e){try{let r=v.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:o,callUrl:i}=this.buildImageRequest(e,r);return Hie(e)?(this.imageBlobUrlCache[i]||(this.imageBlobUrlCache[i]=this.fetchImage(n,o,i,r)),this.imageBlobUrlCache[i]):Promise.resolve("")}catch{return Promise.resolve(null)}}buildImageRequest(e,r){let n=Lie,o,i=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(r){let s=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(s);if(a){let c=a[1]?.trim();if(c)n=Uie,o={user_ID:c.toLowerCase()};else throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id")}else o={fileID:e};i=U(n,o)?.restApi||i}return{callUrlKey:n,queryPayload:o,callUrl:i}}fetchImage(e,r,n,o){return o?ve(e,{queryPayload:r}).then(i=>{let s=this.decodeBase64ToByteArray(i.data),a=this.getMimeTypeFromKey(r?.fileID||r?.user_ID||""),c=new Blob([s],{type:a});return window.URL.createObjectURL(c)}).catch(i=>{throw console.error("Error fetching image:",i),i}):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(i=>i.blob()).then(i=>window.URL.createObjectURL(i)).catch()}decodeBase64ToByteArray(e){return aV(e)}getMimeTypeFromKey(e){let r={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",ico:"image/vnd.microsoft.icon",heic:"image/heic",heif:"image/heif",avif:"image/avif"},n=lV(e);return r[n]?r[n]:"application/octet-stream"}isStaticContentReference(e){let r=e.trim();return!r||/^[a-z][a-z\d+.-]*:/i.test(r)||r.startsWith("//")?!1:g.isWebFilePath(r)}async resolveImageSource(e){if(!this.isStaticContentReference(e))return typeof e=="string"?e:"";let r=g.normalizeStaticContentKey(e);if(!Dx(r))return"";let n=await this.getSvcImageUrl(r);return typeof n=="string"&&n?n:""}async resolveBackgroundImage(e){let r=await Promise.all([...e.matchAll(iV)].map(async([n,,o,i])=>{let s=o??i;if(!s||!this.isStaticContentReference(s))return n;if(!Dx(g.normalizeStaticContentKey(s)))return"none";let a=await this.resolveImageSource(s);return a?n.replace(s,a):"none"}));return e.replace(iV,n=>r.shift()??n)}async resolveThemeBackgroundImages(e){if(!this.themeHasBackgroundImage(e))return e;if(Array.isArray(e))return Promise.all(e.map(r=>this.resolveThemeBackgroundImages(r)));if(e&&typeof e=="object"){let r=await Promise.all(Object.entries(e).map(async([n,o])=>[n,await this.resolveThemeBackgroundImages(o)]));return Object.fromEntries(r)}return typeof e=="string"&&e.includes("url(")?this.resolveBackgroundImage(e):e}themeHasBackgroundImage(e){return Array.isArray(e)?e.some(r=>this.themeHasBackgroundImage(r)):e&&typeof e=="object"?Object.values(e).some(r=>this.themeHasBackgroundImage(r)):typeof e=="string"&&e.includes("url(")}getSvcLocale(e,r){let n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${r}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){let e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(r=>r.json()).catch(()=>[])}async getSvcComponent(e){try{let r=v.environmentInfoObject?.pyC11nDXCBDevURL;if(r){let i=r.replace(/\/+$/,"");sV(i);let s=await fetch(`${i}/index.js`);if(!s.ok)throw new Error(s.statusText);return await s.text()}if(v.environmentInfoObject?.pyInfinityStaticService||_t()){let i=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=i?g.parsePegaDateTimeToTimestamp(i):null;return await oV(e,{v:s})}let o=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!o.ok)throw new Error(o.statusText);return await o.text()}catch(r){throw console.error("Error fetching service component:",r),r}}async importCustomComponentMap(e,r){try{let n=v.environmentInfoObject?.pyInfinityStaticService||_t(),o=v.environmentInfoObject?.pyC11nDXCBDevURL,i=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(o&&(sV(o),i=`${o.replace(/\/+$/,"")}/index.js`),n&&!o){let c=v.environmentInfoObject?.pxApplication?.pxUpdateDateTime,l=await oV(e,{v:g.parsePegaDateTimeToTimestamp(c),libV:g.parsePegaDateTimeToTimestamp(r)});await this.appendCustomScriptToHead(l);return}if(n||o){if(typeof document>"u")return;await new Promise((c,l)=>{let u=document.createElement("script");u.src=i,u.type="text/javascript";let p=setTimeout(()=>{l(new Error(`Timed out waiting for custom component script to load: ${i}`))},tV);u.onload=()=>{clearTimeout(p),c()},u.onerror=()=>{clearTimeout(p),l(new Error("Error while appending custom component map"))},document.head.appendChild(u)});return}let s=await fetch(i,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});s.ok||console.error("Error while fetching custom component map");let a=await s.text();this.setCCV2LibId(e),await this.appendCustomScriptToHead(a)}catch(n){console.error("Exception while appending custom component map (or load blocked):",n)}}async appendCustomScriptToHead(e){if(!(typeof document>"u"))try{if(_t()){rV(e);return}await new Promise((r,n)=>{let o=document.createElement("script");o.src=window.URL.createObjectURL(new Blob([e],{type:KC}));let i=setTimeout(()=>{n(new Error("Timed out waiting for custom component script to load"))},tV);o.onload=()=>{clearTimeout(i),r()},o.onerror=()=>{clearTimeout(i),n(new Error("Error while appending custom component map"))},document.head.appendChild(o)})}catch(r){console.error("Exception appendCustomScriptToHead:",r)}}loadSvcComponent(e){return new Promise((r,n)=>{this.getSvcComponent(e).then(o=>{if(typeof document>"u"){n(e);return}if(_t()){rV(o),r(e);return}let i=document.createElement("script");i.src=window.URL.createObjectURL(new Blob([o],{type:KC})),i.onload=()=>r(e),i.onerror=()=>n(e),document.head.appendChild(i)}).catch(o=>{console.error(`Failed to load service component ${e}:`,o),n(e)})})}initServer(e,r,n){console.log(`asset-loader.initServer(${e}, ${r})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,this.isolationID=null,this.isolationAssetBlobCache=new Map,Q4(),e&&r&&r!=="no-appstatic"&&r!=="no-cdn"?(this.appStaticUrl=r.endsWith("/")?r:`${r}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,Eh(this.staticServerURL),Eh(this.appStaticUrl)):e&&r&&r==="no-appstatic"?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,Eh(this.staticServerURL)):e&&r&&r==="no-cdn"&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,Eh(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,r){this.loaderObj[e]=r}getLoader(e){let r;return e?r=this.loaderObj[e]:r=(o,i)=>new Promise((s,a)=>{if(typeof document>"u"){a(o);return}let c=document.createElement(i);if(i==="script"){let l=c;l.onload=()=>{s(o)},l.onerror=()=>{a(o)},l.type=KC,l.charset="UTF-8",l.async=!1,l.src=o}else{let l=c;l.type="text/css",l.rel="stylesheet",l.href=o}document.head.appendChild(c)}).catch(s=>{console.log(s)}),r}loadAssets(e,r){let{isDevServerMode:n}=r;if(!e)return Promise.resolve();let o=[];return e.forEach(i=>{let s=Object.keys(i)[0],a=n?Object.values(i)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,!this.loadedAssets[s]&&(s.includes(".js")?o.push(this.getLoader()(a+s,this.getTypes.SCRIPT)):s.includes(".css")&&this.getLoader()(a+s,this.getTypes.STYLE),this.loadedAssets[s]=!0)}),Promise.all(o)}getAssetsFromIsolations(e){let r=this.getIsolationID(),{restApi:n,reqType:o}=Tc("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},i=`${this.appStaticUrl}${n}`,s=this.isolationAssetBlobCache.get(i);if(s)return this.isolationAssetBlobCache.delete(i),this.isolationAssetBlobCache.set(i,s),s;let a=fetch(i,{method:o,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then(c=>{if(!c.ok)throw new Error(`Failed to fetch isolation asset: ${c.status} ${c.statusText}`.trim());return c.blob()}).catch(c=>{throw this.isolationAssetBlobCache.delete(i),c});return this.isolationAssetBlobCache.set(i,a),this.evictIsolationAssetBlobCacheOverflow(),a}evictIsolationAssetBlobCacheOverflow(){for(;this.isolationAssetBlobCache.size>jie;){let e=this.isolationAssetBlobCache.keys().next().value;if(!e)return;this.isolationAssetBlobCache.delete(e)}}getIsolationID(){if(this.isolationID===null){let e=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",r=decodeURIComponent(globalThis.atob(e).split("").map(o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),n=JSON.parse(r);this.isolationID=n?.tenant_id}return this.isolationID}},Be=new wx;var $x=class{c11nEnv;constructor(e){this.c11nEnv=e}validate(e,r){let{value:n}=this.c11nEnv.getStateProps();if(!r&&(r=n,!r)){let s=this.c11nEnv.getComponentConfig(),a=this.c11nEnv.getStateProps();s.selectionMode==="multi"?r=a.selectionList:s.renderMode==="Editable"?r=a.referenceList:s.selectionMode==="single"?r=a.selectionKey:r=a.value}let o=Pj(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),r),{message:i}=Dt.validate(this.c11nEnv.getComponentName()?.toLowerCase(),r,e,o);return i?{status:!1,message:i}:{status:!0}}validateEmail(e,r={}){let n=Dt.getValidator("email");if(!n)return{status:"success"};let o=n(e,r);return o?{status:"failure",message:o}:{status:"success"}}},uV=$x;var dV=(t,e,r,n,o)=>{if(o!==d.RESOURCE_STATUS.CREATE)return;ke.isStateMachineExist(t,e,r)||ke.setStateMachine(t,r,e,new yc(r,e,t)),ke.getStateMachine(t,e,r).insert({},typeof n=="string"?n:n+1,!0,{isDefault:!0})},pV=(t,e,r,n,o)=>{typeof e=="string"&&t.data?.caseInfo?.content&&r&&(n==="CREATE"||n==="UPDATE")&&(t.data.caseInfo.content[o][e][r]=e)},mV=t=>{let e=!t.isLocalAction&&t.editType===d.ACTION;return{...e?{}:{activeActionID:t.actionID},assignments:[{ID:t.assignmentID,...e?{actions:[{ID:t.actionID}]}:{}}]}},fV=t=>{let{CASE_INFO:e}=E,r=(o,i)=>J.getPropertyValue(o,"",i),n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,t);for(;n;){let o=r(e.ASSIGNMENT_ID,n),i=r(e.ACTIVE_ACTION_ID,n),s=r(e.ASSIGNMENTACTION_ID,n);if(o||i||s)return{assignmentID:o,activeActionID:i,assignmentActionID:s,isLocalAction:r(e.IS_LOCAL_ACTION,n)};n=r(d.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT,n)}};var JC="OPEN_PROCESS_ACTION";var Pa="OPEN_ASSIGNMENT";var Ah="DELETE_CASE_IN_CREATE_STAGE",gV=t=>({type:Ah,payload:t});var yi="SAVE_AND_CLOSE",sl=t=>({type:yi,payload:t});var Gie="DELETE_DATA_OBJECT",hV=t=>({type:Gie,payload:t});var Mx="DELETE_WORK",kx=t=>({type:Mx,payload:t});var Lx=class{static getSavableDataPage(e){return Ux(e)}static getLookUpDataPage(e){return zx(e)}static getLookUpDataPageInfo(e){return Fx(e)}static getDataPageKeys(e){return jx(e)}},Si=Lx;var Vx=class{static getPropertyName(e){return fe.getPropertyName(e)}static isProperty(e){return fe.isProperty(e)}static getLeafPropertyName(e){return fe.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},_r=Vx;var Bx=class t{static createContainerPConnect(e,r,n,o=!1){let{accessedOrder:i,items:s}=e;if(i&&s){let a=i[i.length-1];if(s[a]?.view&&Object.keys(s[a].view).length>0){let c=s[a],l=a.substring(0,a.lastIndexOf("_")),{view:u,context:p}=c,{viewName:m,viewContext:f}=this.processRootViewDetails(u,c,r);if(!m)return null;let h={meta:u,options:{context:p,pageReference:f||r,containerName:n,containerItemID:a,parentPageReference:r,hasForm:o||n===ge.WORKAREA||n===ge.MODAL||m===d.CREATE_DETAILS_VIEW_NAME,target:l}};return ct(h).getPConnect}}return null}static processRootViewDetails(e,r,n){let{config:{context:o,name:i}={}}=e,{context:s}=r,a=i,c=o,l=_r.isProperty(i),u=_r.isProperty(o);if(u){let p=_r.getPropertyName(o);c=oe(`.${p}`,p.startsWith(".")?n:"",s)}if(c||(c=n),l){let p=_r.getPropertyName(i);a=oe(`.${p}`,c,s)}return l&&u&&a!==""&&(a=i,c=o),{viewName:a,viewContext:c}}static addFlowContainerItem(e){let r=e.getContainerManager(),n=e.getContextName(),o=e.getValue("context_data.caseViewMode"),i,s;if(o!=="review"){let a=n.substring(0,n.lastIndexOf("_")),c=se(a),l=We(a,c);l&&({key:i,flowName:s}=l)}r.addContainerItem({semanticURL:"",key:i,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{let r=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${r}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(d.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID);return r.find(i=>i.ID===n)?.name||""};static getFirstCaseActionName=e=>e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS)[0]?.name||"";static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{let r=e.getValue(d.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1};static getChildCaseAssignments=e=>{let r=e.getValue(d.CASE_INFO.CHILD_ASSIGNMENTS),n=[];return r&&r.length>0&&r.forEach(({assignments:o=[],Name:i,caseTypeID:s})=>{let a=o.map(c=>({...c,caseName:i,caseTypeID:s}));n=n.concat(a)}),n};static hasAssignments=e=>{let r=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=t.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0||t.isCaseWideLocalAction(e))};static showBanner=e=>{let r=e();return t.hasNotificationMessages(r)||!t.hasAssignments(r)};static showTodo=e=>e.getValue("context_data.caseViewMode")!=="perform";static isRenderWithToDoWrapper=(e,r)=>{let n=e(),{showWithToDo:o}=r;return o&&(!t.isCaseWideLocalAction(n)||t.showTodo(n))};static getToDoAssignments=e=>{let r=e.getValue(d.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(d.CASE_INFO.ASSIGNMENT_LABEL),o=e.getValue(d.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],i=t.getChildCaseAssignments(e)||[],s=JSON.parse(JSON.stringify(i));s=s.map(l=>(l.isChild=!0,l));let a=[...o,...s],c=JSON.parse(JSON.stringify(a));return r&&!t.showTodo(e)&&(c=c.map(l=>(l.name=t.getActiveCaseActionName(e)||l?.name||n,l))),c}},YC=Bx;var Hx=class{c11nEnv;constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{let r=w.getNextActionMgrId(),n,o,i=new Promise((s,a)=>{n=s,o=a});if(n&&o)w.register(r,i,n,o,e);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:r,promise:i}};initializeContainers(e){let r=Kl,n=this.c11nEnv,o=n.getContextName(),i=n.getContainerName(),s={context:o,name:i,type:d.CONTAINER_TYPE.SINGLE},{actionMgrID:a,promise:c}=this.containerManagerPromise(r),l={...s,...e,actionMgrID:a};return T(Gx(l)),c}addContainerItem(e){let r=St,n=this.c11nEnv,o=n.getMetadata(),{children:i}=o||{},s;Array.isArray(i)&&i.length>0&&([s]=i);let a=n.getContextName(),c=n.getContainerName(),l=lr(c,a,e?.containerType===d.CONTAINER_TYPE.SINGLE),u=Z(c,a),p={root:{...s,config:{...s?.config,context:s?.config?.context||n.getPageReference?.()}},containerItemID:l,context:l,target:u,containerName:c};e=JSON.parse(JSON.stringify(e)),[d.WORKAREA].includes(c)&&delete e.data?.coreHeaders;let{actionMgrID:m,promise:f}=this.containerManagerPromise(r),h={...p,...e,actionMgrID:m};return T(Pt(h)),f}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));let r=kt,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(tr(c)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));let r=nr,o={target:te(e.containerItemID)},{actionMgrID:i,promise:s}=this.containerManagerPromise(r),a={...o,...e,actionMgrID:i};return T(rr(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));let r=Ze,n=pe(e.containerItemID),o=te(e.containerItemID),i={context:n,target:o},{actionMgrID:s,promise:a}=this.containerManagerPromise(r),c={...i,...e,actionMgrID:s};return T(Qe(c)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));let r=qo,n=Dc(e),{actionMgrID:o,promise:i}=this.containerManagerPromise(r),s={...n,...e,actionMgrID:o};return T(wc(s)),i}addTransientItem(e){let{id:r,data:n,sourceContainerItemId:o}=e,i=this.c11nEnv.getContextName(),s=eb(r,i),a=Ei(i);if(s&&a.includes(s))return s;let c=n;if(o){let l=W(o);if(!l)throw new Error(`addTransientItem: source container item "${o}" not found in store`);c=g.deepClone(l)}return T(qx({transientItemID:s,contextName:i,target:te(i),data:c})),s}updateTransientData(e){let{transientItemID:r,data:n}=e,o=this.c11nEnv.getContextName();if(r){if(!Ei(o).includes(r))return}else return;T(_h({transientItemID:r,data:n}))}removeTransientItem(e){let r=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:o,transientItemID:i}=e;if(i&&o){if(!Ei(r).includes(i))return}else return;T(Ih({target:n,containerItemID:o,transientItemID:i}))}createContainerPConnect(e,r,n,o=!1){YC.createContainerPConnect(e,r,n,o)}hasContainerItems(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return jr(`${e}/${r}`)}isContainerInitialized(){let e=this.c11nEnv.getContextName(),r=this.c11nEnv.getContainerName();return Ch(e,r)}},kd=Hx;var Wx=class extends ub{constructor(e,r){super(r)}},ee=(...t)=>Qo(e=>t.includes(e.type)),yV=(...t)=>(e,r)=>new Ot(n=>{let o=t.map(i=>i(e,r).subscribe(n));return()=>{o.forEach(i=>i.unsubscribe())}}),qie=t=>typeof t!="object"||t===null||!("type"in t)?!1:typeof t.type=="string",SV=()=>{let t=new Ws,e=null,r=null,n=o=>(r=o,e=new Wx(t.asObservable(),o.getState()),i=>s=>{let a=i(s);return e?.next(o.getState()),qie(s)&&t.next(s),a});return n.run=o=>{if(!e||!r)throw new Error("Epic middleware must be added to the store before calling run().");return o(t.asObservable(),e).subscribe(i=>{r?.dispatch(i)})},n};var me=(t,e,r)=>zi(n=>(n?.code!=="ERR_CANCELED"&&console.error(t,n),ye(Qi(t,n,e,null,r))));var gr=(t,e)=>r=>new Ot(n=>{let o={},i=0;return r.pipe(z(s=>{let a=Date.now(),c;return e?c=e:c=lo,c&&c(s,o)&&a-i<t?gc():(o=s,i=a,ye(s))})).subscribe(n)});var Wie="Error occurred during ajax call at createDataObject Epic",Kie=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o}=t,i={data_view_ID:e},{restApi:s,reqType:a}=U(jk,i),{content:c}=Rt(o);return q(k(s,{method:a,headers:n,body:{data:c.content,pageInstructions:c?.pageInstructions}},o)).pipe(O(l=>({response:l.data,actionInPayload:t})),me(Wie,r))},EV=Kie;var Jie="CREATE_DATA_OBJECT",ZC=t=>({type:Jie,payload:t});var Kx=t=>{let e=0,r=[];return t.pipe(ee(eu),gr(100),Ft(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),ye([])}return ye(n.payload).pipe(z(i=>EV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),{actionsOut:r,data:void 0}}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),{actionsOut:r,data:i?.response}}),O(({data:i})=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,i),T(r),r=[],r)))}))};var Yie="Error occurred during ajax call at getDataObjectView Epic",Zie=t=>{let{dataLookUp:e,context:r,headers:n,viewName:o,requestPayload:i}=t,s={data_view_ID:e,view_ID:o},{restApi:a,reqType:c}=U(Vk,s);return q(k(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:we(l.headers),actionInPayload:t})),me(Yie,r))},AV=Zie;var Qie="VIEW_DATA_OBJECT",QC=t=>({type:Qie,payload:t});var Jx=t=>{let e=0,r=[];return t.pipe(ee(aS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>AV(n)),z(async n=>{if(n&&n.type===Te){let{payload:S}=n,A=ue({...n,...S,actionMgrID:e});return r.push(A),r}let{actionInPayload:o,response:i,headers:s={}}=n,{containerName:a,readOnly:c,actionName:l}=o,u=Z(a,o.context),p=st(u,a,o.context),m={acName:u,context:p};if(i?.data?.dataInfo){let{dataInfo:S}=i.data;S.dataContext||=o.dataLookUp,S.dataContextParameters||=o.requestPayload}await Pe(i,o,m);let h=$e(i,{target:u,context:p,containerItemID:p,headers:s});return h.resourceType=E.RESOURCE_TYPES.DATA,h.resourceStatus=E.RESOURCE_STATUS.UPDATE,h.readOnly=c,h.actionName=l,h.key=JSON.stringify(o.requestPayload),r.push(V(Pt,h)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var Xie="Error occurred during ajax call at updateDataObject Epic",ese=t=>{let{dataPageID:e,context:r,headers:n,containerItemID:o,key:i}=t,s={data_view_ID:e},{restApi:a,reqType:c}=U(Bk,s),{content:l}=Rt(o);return q(k(a,{method:c,headers:{...n,"if-match":t?.etag},body:{data:{...l.content,...i},pageInstructions:l.pageInstructions||[]}},o)).pipe(O(u=>({response:u.data,actionInPayload:t})),me(Xie,r))},CV=ese;var tse="UPDATE_DATA_OBJECT",XC=t=>({type:tse,payload:t});var Yx=t=>{let e=0,r=[];return t.pipe(ee(tu),gr(100),Ft(n=>{let{isFormValid:o}=n.payload;if({actionMgrID:e}=n.payload,!o){let i={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,i),ye([])}return ye(n.payload).pipe(z(i=>CV(i)),z(async i=>{if(i&&i.type===Te){let{payload:m}=i,f=ue({...i,...m,actionMgrID:e});return r.push(f),r}let{actionInPayload:s}=i,{containerItemID:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,p={target:Z(l,a),containerItemID:a,context:a};return r.push(V(Qe,p)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var rse="Error occurred during ajax call at getDataObjectView Epic",nse=t=>{let{lookupDatapage:e,context:r,headers:n,actionID:o,dataViewParameters:i}=t,s={data_view_ID:e,action_ID:o},{restApi:a,reqType:c}=U("openDataObjectAction",s);return q(k(a,{method:c,headers:n,body:{dataViewParameters:i}},r)).pipe(O(l=>({response:l.data,headers:we(l.headers),actionInPayload:t})),me(rse,r))},_V=nse;var Zx=t=>{let e=0,r=[];return t.pipe(ee(cS),gr(100),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>_V(o)),z(async o=>{if(o&&o.type===Te){let{payload:C}=o,I=ue({...o,...C,actionMgrID:e});return r.push(I),r}let{actionInPayload:i,response:s,headers:a={}}=o,{containerName:c,actionID:l,context:u,actionName:p}=i,m=Z(c,i.context),f=lr(c,u);f=Yr(u,f);let h={target:m,context:f,containerItemID:f,headers:a,resourceType:E.RESOURCE_TYPES.DATA,resourceStatus:E.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(i.dataViewParameters),actionID:l,actionName:p,hideDefaultActionButtons:s?.uiResources?.hideDefaultActionButtons===!0};if(s?.data?.dataInfo){let{dataInfo:C}=s.data;C.dataContext||=i.lookupDatapage,C.dataContextParameters||=i.dataViewParameters}await Pe(s,i,{acName:m,context:u});let A=$e(s,h);return r.push(V(Pt,A)),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))};var ose="Error occurred during ajax call at getDataObjectView Epic",ise=t=>{let{savableDatapage:e,context:r,headers:n,actionID:o,keys:i,containerItemID:s,jsActionQueryParams:a}=t,c={data_view_ID:e,action_ID:o},{restApi:l}=U("submitDataObjectAction",c),{reqType:u}=U("submitDataObjectAction",c),{content:p}=Rt(s);return l=fu(a,l),q(k(l,{method:u,headers:{...n,"if-match":t?.etag},body:{data:{...p?.content,...i},pageInstructions:p?.pageInstructions||[]}},r)).pipe(O(m=>({response:m.data,actionInPayload:t})),me(ose,r))},IV=ise;var sse=(t,e,r,n)=>{let{resourceType:o,key:i,containerItemID:s}=n,a=$e(r,e);a.resourceType=o||E.RESOURCE_TYPES.DATA;let c=Po(s);t.push(V(Qe,a));let l=oe(".dataContext","dataInfo",c),u=oe(".dataContextParameters","dataInfo",c),p={context:c,skipSemanticUrl:!0,resourceType:o,parentAction:Li,dataContext:l,dataContextParameters:u},m=l&&u&&At(Ro,{pageName:d.PY_DETAILS,dataViewName:l},u)||"";if(s?.includes(d.PREVIEW)){let f={type:ic,payload:{pageName:d.VIEW_NAMES.PY_DATA_PREVIEW,container:d.PREVIEW,containerName:d.PREVIEW,...p}};t.push(f)}else if(o!==d.PAGE&&i===m&&s?.includes(d.PRIMARY)){let f={type:ic,payload:{pageName:d.VIEW_NAMES.PY_DETAILS,containerName:"",...p}};t.push(f)}return t},Qx=t=>{let e=0,r=[];return t.pipe(ee(Li),gr(100),Ft(o=>{let{isFormValid:i}=o.payload;({actionMgrID:e}=o.payload);let s=o.payload.context;if(!i){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),ye([])}return dt({context:s,stateObj:W(s),clearContextMessages:!0}),ye(o.payload).pipe(z(a=>IV(a)),z(async a=>{if(a&&a.type===Te){KS(a,"dataObject");let{payload:I}=a,_=ue({...a,...I,actionMgrID:e});return r.push(_),r}let{actionInPayload:c,response:l,headers:u={}}=a,{containerName:p,containerItemID:m,resourceType:f,key:h}=c,S=Z(p,c.context),A={acName:S,context:c.context};await Pe(l,c,A);let C={key:h,target:S,resourceType:f,containerItemID:m,headers:u,context:c.context};return r=sse(r,C,l,{key:h,resourceType:f,containerItemID:m}),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))}))};var Xx=class{components;constructor(){this.components={}}_checkComponent(e,r){return!!this.components[r]?.[e]}start(e,r,n,o,i){let s={viewName:e,pageReference:n,contextName:o,isInProgress:!0,active:!0,caseKey:r};this.components[o]=this.components[o]||{},this.components[o][i]=s}stop(e,r){this._checkComponent(e,r)&&(this.components[r][e].isInProgress=!1)}remove(e,r){this._checkComponent(e,r)&&delete this.components[r][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach(r=>{r.isInProgress&&(r.cascade=!0)})}activate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!0)}deactivate(e,r){this._checkComponent(e,r)&&(this.components[r][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach(r=>{this.refreshComponent(r,e)})}refreshComponent(e,r){if(!this._checkComponent(e,r))return;let n=this.components[r][e];if(n.active&&n.cascade){let{caseKey:o,viewName:i,pageReference:s}=n;Pc(o,i,r,s,{})}}},Ld=new Xx;var eD=class{constructor(e,r,n,o,i=100,s=500){this.finalDataViewCall=e;this.combiner=r;this.comparator=n;this.separator=o;this.maxtime=i;this.maxsize=s;this.groupedDataViewArray=[]}finalDataViewCall;combiner;comparator;separator;maxtime;maxsize;groupedDataViewArray;timeoutId;findCombinableDataViewCall(e){return this.groupedDataViewArray.find(r=>this.comparator(r,e))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){let e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then(r=>{this.separator(e,r)})}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){let r=this.groupedDataViewArray.findIndex(n=>this.comparator(n,e));this.groupedDataViewArray[r]&&(this.groupedDataViewArray.splice(r,1),this.finalDataViewCall(e).then(n=>{this.separator(e,n)}))}queueDataViewCall(e,r){let n=this.findCombinableDataViewCall(e),o,i;return o=new Promise(s=>{i=s}),n&&!n.dataViewCallMap[r]?(this.combiner(n,e),n.dataViewCallMap[r]={promise:o,resolve:i}):n?o=n.dataViewCallMap[r].promise:(n={...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[r]:{promise:o,resolve:i}}})),Object.keys(n.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(n):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.dequeueAllDataViewCalls(),this.maxtime)),o}},bV=eD;var tD=class{bufferedDataQueues;constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,r,n,o,i,s,a){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new bV(r,n,i,o,s,a)),this.bufferedDataQueues[e]}},TV=tD;var ase=t=>{let e=t?.F0.rhs?.value;t.F0.rhs={values:[e]},t.F0.comparator="IN"},cse=(t,e)=>Object.keys(t).length===1&&Object.keys(t).length===Object.keys(e).length,lse=(t,e)=>e.F0.comparator==="EQ"&&(t.F0.comparator===e.F0.comparator||t.F0.comparator==="IN"),use=(t,e)=>cse(t,e)&&lse(t,e)&&t.F0.ignoreCase===e.F0.ignoreCase,vV=t=>t.map(e=>e.field),dse=(t,e)=>{let r=(t.query?.filter).filterConditions,n=(e.query?.filter).filterConditions,o=(e.query?.filter).logic,i=Object.keys(r).length;use(r,n)?(r.F0.comparator==="EQ"&&ase(r),(r.F0.rhs?.values).push(n.F0.rhs?.value)):(Object.keys(n).forEach((c,l)=>{let u=`F${i+l}`;r[u]=n[c],o=o.replace(c,u)}),(t.query?.filter).logic+=` OR ${o}`);let s=vV(t.query?.select);vV(e.query?.select).forEach(c=>{s.includes(c)||(t.query?.select).push({field:c})})},pse=(t,e)=>t.dataViewParameters&&e.dataViewParameters&&Object.keys(e.dataViewParameters).length===Object.keys(t.dataViewParameters).length&&!Object.keys(t.dataViewParameters).some(r=>typeof e.dataViewParameters?.[r]=="string"?t.dataViewParameters?.[r]!==e.dataViewParameters?.[r]:!g.isEqual(t.dataViewParameters?.[r],e.dataViewParameters?.[r])),mse=(t,e)=>!t.dataViewParameters&&!e.dataViewParameters,fse=(t,e)=>Object.keys(t.filterConditions).length%Object.keys(e.filterConditions).length===0?!Object.keys(e.filterConditions).some(r=>t.filterConditions[r].lhs.field!==e.filterConditions[r]?.lhs.field):!1,gse=(t,e)=>fse(t.query?.filter,e.query?.filter)&&(pse(t,e)||mse(t,e)),hse=(t,e)=>{let{data:r}=e,{dataViewCallMap:n,filterDataOnClient:o}=t;Object.keys(n).forEach(i=>{n[i].resolve({data:o(i,r)})})},yse=t=>({combiner:dse,comparator:gse,separator:hse,...t}),RV=yse;var rD=(t,e)=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(t,e)}catch{}},PV=(t,e="",r="IS_NULL")=>({comparator:r,lhs:{field:t},...e&&{rhs:{value:e}}}),bh=t=>t!=null&&typeof t=="object"&&!("then"in t),Sse=(t=[],e={},r="")=>{if(!(t.length&&Object.keys(e)))return;let n={};return t.forEach((i,s)=>{let a=e[i],c;a?c=PV(i,a,"EQ"):c=PV(i);let l=`T${s+1}`;n[l]=c}),{logic:Object.keys(n).join(` ${r} `),filterConditions:n}},nD=class t{isInitialised;isQueryable;nonQueryableData;fetchedNQData;previousSearchText;totalRecordCount;fetchedRecordCount;pageNumber;parameters;enablePagination;columns;pageSize;maxResultsDisplay;matchPosition;ignoreCase;cache;keyCache;dataSourceMetaData;isNQDataFetchInProgress;fetchNQDataPromise;dataSource;context;associationFilter;propertyFilter;listType;bufferInitialized;constructor(e,r){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=e.ignoreCase!==!1,this.dataSourceMetaData=e.dataSourceMetaData,this.context=r)}static searchResultsCache={};static init(e,r){return new Promise((n,o)=>{let i=e.columns.map(m=>m.value),s=Object.entries(e.parameters).map(([m,f])=>`${m}+${f}`),a=[...i,...s,e.matchPosition,e.maxResultsDisplay].join(d.HASH_DELIMITER),c=g.getHashedString(a),l=`${e.dataSource}_${c}`,u=`__dataviewmetadata__${e.dataSource}`,p=or.getAppCacheKey(u);if(typeof window<"u"&&window.sessionStorage.getItem(p)){let m=JSON.parse(`${window.sessionStorage.getItem(p)}`);if(r&&t.searchResultsCache?.[r]?.[l])n(t.searchResultsCache[r][l]);else if(e.cacheLifeSpan!=="form"&&t.searchResultsCache?.persisted?.[l])n(t.searchResultsCache.persisted[l]);else{let f=new t(e,r);JSON.stringify(m.associationFilter)===JSON.stringify(e.associationFilter)?(f.dataSourceMetaData=m.dataSourceMetaData,f.isQueryable=m.isQueryable,f.isInitialised=m.isInitialised,f.associationFilter=m.associationFilter,t.initializeCache(r,e,l,f),n(f)):(f.associationFilter=e.associationFilter,f.propertyFilter=e.propertyFilter,f.fetchMetaData(r).then(h=>{rD(p,JSON.stringify({isQueryable:h.data.isQueryable,dataSourceMetaData:h.data,isInitialised:!0,associationFilter:e.associationFilter})),f.isQueryable=h.data.isQueryable,f.dataSourceMetaData=h.data,f.isInitialised=!0,t.initializeCache(r,e,l,f),n(f)}).catch(h=>{f.isInitialised=!1,o(h)}))}}else if(e.deferDatasource&&Ur(e.dataSource)){let m=new t(e,r),f=Ur(e.dataSource);m.isQueryable=!!f?.isQueryable,m.isInitialised=!0,m.dataSourceMetaData=f,rD(p,JSON.stringify({isQueryable:f?.isQueryable,dataSourceMetaData:f,isInitialised:!0})),m.context=r,t.initializeCache(r,e,l,m),n(m)}else{let m=new t(e,r);m.associationFilter=e.associationFilter,m.propertyFilter=e.propertyFilter,m.fetchMetaData(r).then(f=>{rD(p,JSON.stringify({isQueryable:f.data.isQueryable,dataSourceMetaData:f.data,isInitialised:!0,associationFilter:e.associationFilter})),m.isQueryable=f.data.isQueryable,m.dataSourceMetaData=f.data,m.isInitialised=!0,t.initializeCache(r,e,l,m),n(m)}).catch(f=>{m.isInitialised=!1,o(f)})}})}static bufferedDataView=new TV;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(RV(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete t.searchResultsCache[e]}static initializeCache(e,r,n,o){e&&r.cacheLifeSpan?.toLowerCase()==="form"?(t.searchResultsCache[e]===void 0&&(t.searchResultsCache[e]={}),t.searchResultsCache[e][n]=o):(t.searchResultsCache.persisted===void 0&&(t.searchResultsCache.persisted={}),t.searchResultsCache.persisted[n]=o)}fetchMetaData(e){return or.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){let r=n=>Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query);t.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,r,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,r,n)=>{let o=this.buildSelect(n),i=Sse(e,r,"AND");return{select:o,...i&&{filter:i},...or.isDistinctResultsOnly(o)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,r,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,r,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,r,n)=>this.memoizedGetRowDataByKeys(e,r,n);buildKeyCacheKey(e,r,n){let o=e.map(s=>[s,r[s]??""]),i=n?.columns?.map(s=>s.value);return JSON.stringify({filterEntries:o,columns:i,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,r,n){let o=this.buildKeyCacheKey(e,r,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(o);let i=this.keyCache.get(o);if(i)return i;let s=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,r,n):this.buildSchemaForNonQueryableDP(),c=Zt.getDataAsync(this.dataSource,this.context,s.dataViewParameters,this.isQueryable?s.paging:void 0,this.isQueryable?s.query:void 0,{...n}).catch(l=>(this.keyCache.delete(o),Promise.reject(l)));return this.keyCache.set(o,c),c}getData(e,r){if(this.isQueryable){if(this.bufferInitialized)try{let o=this.buildSchemaForQueryableBufferDP(e);return t.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(o,e)}catch{let o=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,o.dataViewParameters,o.paging,o.query)}let n=this.buildSchemaForQueryableDP(e,r);return Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...r})}return this.fetchNonQueryableResults(e,r)}getCachedResult(e,r){if(this.enablePagination&&bh(r)&&r.has(this.pageNumber))return r.get(this.pageNumber);let n=this.cache.get(e);if(!this.enablePagination&&n&&!bh(n))return n}handleCacheError(e,r){if(this.enablePagination){let n=this.cache.get(e);n&&bh(n)&&n.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(r)}storeCacheResult(e,r){if(this.enablePagination){let n=this.cache.get(e);(!n||!bh(n))&&(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,r)}else this.cache.set(e,r)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!Ud(this.context))return!1;let r=e.toLowerCase(),n=this.cache.get(r);return n?this.enablePagination?bh(n)&&n.has(this.pageNumber):!0:!1}memoizedGetData(e,r){let n=e?.toLowerCase(),o=this.cache.get(n);if(this.isResultCached(e)&&o){let c=this.getCachedResult(n,o);if(c)return c}let a=this.getData(e,r).catch(c=>this.handleCacheError(n,c));return this.storeCacheResult(n,a),a}fetchData(e,r=!1,n){return this.isValidDatasource()?this.context&&!Ud(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=r?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,r){if(e===void 0)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,r)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then(()=>({data:this.filterDataOnClient(e,this.nonQueryableData,r)})).catch(n=>Promise.reject(n));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&this.dataSourceMetaData.structure?.toLowerCase()==="list"){let n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=Zt.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,r),this.isNQDataFetchInProgress=!0,new Promise((o,i)=>{this.fetchNQDataPromise?.then(s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,o({data:this.filterDataOnClient(e,this.nonQueryableData,r)}))).catch(s=>i(s)).finally(()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null})})}return Promise.resolve(null)}filterDataOnClient(e,r,n){let o=(n?.columns??this.columns)?.filter(i=>i.useForSearch).map(i=>i.value);return r.reduce((i,s)=>(o?.some(c=>{let l=t.resolveEmbeddedPath(c),u=g.getIn(s,l);return u!=null&&this.positionMatches(`${u}`,e,n)})&&i.push({...s}),i),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,r,n){let o=n?.ignoreCase??this.ignoreCase,i=o?e.toLowerCase():e,s=o?r.toLowerCase():r;switch(n?.matchPosition??this.matchPosition){case"start":return i.startsWith(s);case"contains":return i.includes(s);case"equals":return i===s;default:return!1}}buildSelect(e){let r=[],n=[];return(e?.columns??this.columns)?.forEach(o=>{if(!n.includes(o.value)){n.push(o.value);let i={field:o.value};r.push(i)}}),r}buildFilters(e,r){let n=r?.matchPosition??this.matchPosition,o=r?.ignoreCase??this.ignoreCase,i={},s=0;(r?.columns??this.columns)?.forEach(c=>{if(c.useForSearch){let l=`F${s}`;s+=1;let u={field:c.value},p={value:e},m="CONTAINS";n==="start"?m="STARTS_WITH":n==="equals"&&(m="EQ");let f={...`${parseFloat(e)}`!==e&&{ignoreCase:o?"true":"false"},lhs:u,rhs:p,comparator:m};i[l]=f}});let a=Object.keys(i).join(" OR ");return{filterConditions:i,logic:a}}buildQuery(e,r){let n=this.buildSelect(r);return e?{select:n,filter:this.buildFilters(e,r),...or.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...or.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,r){return{dataViewParameters:this.parameters,query:this.buildQuery(e,r),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}},Ao=nD;var oD=class t{refreshMap;propChangeRefreshMap;constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,r,n,o,i){typeof e[r]>"u"&&(e[r]={}),e[r][n]=[{uniqueHash:o,callback:i}]}registerForRefresh(e,r,n,o,i){n=g.convertClipboardPageToPageRefNotation(n);let s=o.split("/").join(d.HASH_DELIMITER),a=g.getHashedString(s);e==="PROP_CHANGE"?this.propChangeRefreshMap?.[i]?.[n]?this.propChangeRefreshMap[i][n].some(l=>l.uniqueHash===a)||this.propChangeRefreshMap[i][n].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.propChangeRefreshMap,i,n,a,r):this.refreshMap?.[i]?.[`${e}-${n}`]?this.refreshMap[i][`${e}-${n}`].some(l=>l.uniqueHash===a)||this.refreshMap[i][`${e}-${n}`].push({uniqueHash:a,callback:r}):t.initializeRefreshCache(this.refreshMap,i,`${e}-${n}`,a,r)}triggerPropChangeRefresh(e,r){let n=this.propChangeRefreshMap?.[r];if(!n)return!1;let o=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,r),{interestPage:i=""}=o||{},s=u=>g.convertPageRefToClipboardPageNotation(u).replace(`${d.CASE_INFO?.CASE_INFO_CONTENT}${i}`,"");if(n[e]){let u=s(e);return n[e].forEach(p=>p.callback(u)),!0}let a=Ie.getContextReferences(r)?.get(e),c=a&&J.resolveContextTreeNodeProps(a.props)||{},{contextPageRef:l}=c;if(l&&n[l]){let u=s(l);return n[l].forEach(p=>p.callback(u)),!0}for(let u of Object.keys(n)){let p;if(g.segmentsMatch(u,e)?p=e:l&&g.segmentsMatch(u,l)&&(p=l),p){let m=s(p);return n[u].forEach(f=>f.callback(m)),!0}}return!1}triggerRefreshForType(e,r,n){return e==="PROP_CHANGE"?this.triggerPropChangeRefresh(r,n):this.refreshMap?.[n]?.[`${e}-${r}`]?(this.refreshMap[n][`${e}-${r}`].forEach(o=>o.callback()),!0):!1}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}},Ai=new oD;var iD=class{static cleanCaches(e){Cr.purgeCascadeFields(e),Ld.removeContext(e),Ao.clearContextedCache(e),$.cleanContextSubscribers(e),fE(e),Ie.removeContextTreeNode(e),Tt.clearContext(e),Ai.deRegisterForRefresh(e)}},Th=iD;var sD="GET_DESCENDANTS",NV=t=>({type:sD,payload:t});var aD=class{runtimeParams;runtimeParamsMap;constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,r){this.runtimeParamsMap[e]=r}getRuntimeParam(e){return this.runtimeParamsMap[e]}},al=new aD;var cD=class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;if(o<=0){if(s)n.push({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else if(i.length>0){let a=i.shift();s=!s,n.push({type:Er,payload:{context:e,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),a&&n.push(a)}else return;T(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));let r=W(e?.payload?.context);if(r){let n=[],o=r.context_data?.blocking_action_counter??0,i=r.context_data?.deferred_action_queue?[...r.context_data.deferred_action_queue]:[],s=r.context_data?.is_deferred_action_in_progress??!1;return i.length<=0&&!s&&(o<=0?(n.push(e),s=!s):i.push(e),n.unshift({type:Er,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:i,blocking_action_counter:o,is_deferred_action_in_progress:s}}}}),T(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));let r=W(e);return r&&r.context_data?.is_deferred_action_in_progress===!0?(T({type:Er,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?W(e)?(T({type:cc,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS)):Promise.reject(new Error(this.MISSING_CONTEXT_PARAM))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r={...W(e)};return r.context_data={...r.context_data},r&&r.context_data?.blocking_action_counter>0?(T({type:cc,payload:{context:e,isInitiateBlockingAction:!1}}),r.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,r),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;let r=W(e);if(r){let n={...r};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),T({type:Er,payload:{context:e,data:{...n}}}),Nn.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));let r=W(e);return!!(r&&r.context_data?.is_deferred_action_in_progress===!0)}},Ese=new cD,Ct=Ese;var OV=(t,e)=>{let r={},n=Si.getLookUpDataPage(t),o=Si.getDataPageKeys(n);if(o)for(let i of o)r[i.keyName]=i.isAlternateKeyStorage?e[i.linkedField]:e[i.keyName];return{dataViewParameters:r,dataPageID:n,dataPageKeys:o}},xV=(t,e)=>{let r=Si.getSavableDataPage(t),n=Si.getDataPageKeys(r);return n?.forEach(o=>{o.isAlternateKeyStorage&&(o.keyName===o.linkedField||Object.keys(e).includes(o.linkedField))?o.keyName=e[o.linkedField]:o.isAlternateKeyStorage&&Object.keys(e).includes(o.keyName)&&o.keyName!==o.linkedField?(e[o.linkedField]=e[o.keyName],delete e[o.keyName]):o.keyName=e[o.keyName]}),{keys:e,dataPageID:r,dataPageKeys:n}},e_=t=>{$.publish(E.PUB_SUB_EVENTS.EVENT_CANCEL,t)},Ase=t=>{if(t.includes(d.ACTIONAREA))return!0;let e=Oa(t);return!!se(`${e}/${d.ACTIONAREA}`)?.includes(d.ACTIONAREA)},Cse=(t,e,r)=>B.shouldUseUnifiedHandling()||Ase(t)?vo:wU(e,r??!1),DV=(t,e,r)=>{let{callbacks:n}=r;return r.callbacks=null,t(e,r).then(o=>{o==="cancel"?n?.cancel?.():n?.submit?.()})},_se=t=>{let e=B.shouldUseUnifiedHandling();return B.isExternalCaseType(t)?JI:B.isExternalObject(t)?e?JI:Kk:e?ql:B.isObjectCaseType(t)?Gk:ql},Ise=t=>!B.shouldUseUnifiedHandling()&&(t.type==="Object"||B.isObjectCaseType(t?.caseClassName||"")||globalThis.location?.href?.includes("/objects/"))?Wk:Mi,wV=(t,e,r)=>!r&&e===d.ACTION?t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID):t.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),bse=(t,e)=>{let r=t.getValue(E.CASE_INFO.IS_LOCAL_ACTION),n=t.getValue(E.CASE_INFO.ASSIGNMENT_ID),o=wV(t,e,r);if(e===d.ACTION&&(!o||!r&&!n)){let i=fV(t.getContextName());i&&(!n&&!o&&(r=i.isLocalAction),n=n||i.assignmentID,o=o||(r?i.activeActionID:i.assignmentActionID))}return{localAction:r,assignmentID:n,actionID:o}},lD=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";c11nEnv;constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,r,n)=>!e&&r||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,r=!1,n=!1)=>{let o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),c=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID),l=this.c11nEnv.getContainerName(),u=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),p=r?void 0:xr(this.c11nEnv.getContextName()),m=this.c11nEnv.getValue("isProcessAction","isProcessAction");return ze.buildActionObject({context:o,containerItemID:e,assignmentID:a,actionID:c,caseID:s,containerName:l,caseType:u,isModalAction:i,isFormValid:p,isProcessAction:m,saveOnly:r,autosave:n},this.c11nEnv)};actionsApiPromise=(e,r,n=!0)=>{let o="";r&&r.actionMgrID!==null?o=r.actionMgrID||"":o=w.getNextActionMgrId();let i,s,a=new Promise((c,l)=>{i=c,s=l});if(i&&s)w.register(o,a,i,s,e,r,n);else throw new Error("resolveFn or rejectFn is not defined.");return{actionMgrID:o,promise:a}};showDataObjectCreateView(e,r=E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){let n=ze.buildActionObject({viewName:r,className:e},this.c11nEnv),o=Pr,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:E.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),i}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=e,n=Or(r),o=oe(d.CASE_INFO.CASE_INFO_ID,"",r),i=oe(d.CASE_INFO.ASSIGNMENT_ID,"",r);if(!n)return new kd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});let s=Yl,a=ze.buildActionObject({containerItemID:e,context:r},this.c11nEnv),c=r&&r.includes(d.MODAL);T({type:s,payload:{...a,isModalAction:c,isDataObject:!0,skipReleaseLockRequest:!0}});let{promise:l}=this.actionsApiPromise(s,a);return l.then(()=>{e_({caseID:o,assignmentID:i,context:r})})}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));let{data:r}=De()?.getState()||{},n=r[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));if(Na(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){let u=this.handleSubscript.call(this,e,this.c11nEnv);if(u)return u}let i=Si.getSavableDataPage(n),s=eu,a=!!e&&e.includes(d.MODAL),c=ze.buildActionObject({containerItemID:e,dataPageID:i},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return T(ZC({...c,isModalAction:a,isFormValid:xr(e)})),l}deleteDataObject(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=sS,o=Si.getSavableDataPage(e),i=Si.getDataPageKeys(o),s={};if(i)for(let l of i)s[l.keyName]=l.isAlternateKeyStorage?r[l.linkedField]:r[l.keyName];let a=ze.buildActionObject({dataViewName:o,dataViewParameters:s},this.c11nEnv),{promise:c}=this.actionsApiPromise(n,a);return T(hV({...a})),c}getDataObjectView(e,r,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));let o=aS,{dataPageID:i,dataViewParameters:s}=OV(e,r),a=ze.buildActionObject({dataLookUp:i,keyProperties:r,requestPayload:s,viewName:n.viewName||E.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:d.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:c}=this.actionsApiPromise(o,a);return T(QC({...a})),c}updateDataObject(e,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!r)return Promise.reject(new Error("keys is required parameter"));let{data:n}=De()?.getState()||{},o=n[e]?.dataInfo?.content?.classID;if(!o)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let{dataPageID:i,keys:s}=xV(o,r),a=tu,c=e&&e.includes(d.MODAL),l=ze.buildActionObject({containerItemID:e,dataPageID:i,key:s},this.c11nEnv),u=n[e]?.caseInfo?.headers?.etag,{promise:p}=this.actionsApiPromise(a,l);return T(XC({...l,isModalAction:c,isFormValid:xr(e),etag:u})),p}openDataObjectAction(e,r,n,o){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!r)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if(typeof r!="object")return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!o)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));let i=cS,{dataViewParameters:s,dataPageID:a,dataPageKeys:c}=OV(e,r),l=ze.buildActionObject({actionID:n,actionName:o,dataViewParameters:s,lookupDatapage:a,containerName:d.MODAL,dataViewPayload:c,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:u}=this.actionsApiPromise(i,l);return T({type:i,payload:{...l}}),u}submitDataObjectAction(e,r,n,o){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!r)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));let{data:i}=De()?.getState()||{},s=i[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(d.DATA_CLASS_NOT_FOUND));let a=o?.jsActionQueryParams,c=Oa(e),l=te(c),u=We(l,c)||{},{resourceType:p="",key:m=""}=u,f=Li,{dataPageID:h,keys:S}=xV(s,r),A=ze.buildActionObject({containerItemID:e,actionID:n,resourceType:p,key:m,keys:S,savableDatapage:h,containerName:d.MODAL,context:e,jsActionQueryParams:a},this.c11nEnv);A.context=e;let C=i[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(f,A);return T({type:f,payload:{...A,isFormValid:xr(e),etag:C}}),I}createWork(e,r={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(e=ae.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,P.getDefaultQualifiedName("pyStartCase"),r);let{dockable:n=!1}=r?.modalOptions||{},o=r.theType?r.theType:_se(e),i=ze.buildActionObject({class:e,flowType:P.getDefaultQualifiedName("pyStartCase"),containerName:d.PRIMARY,openCaseViewAfterCreate:!0,...r,theType:o,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i);if(i.headers={...i.headers},r.channelName?i.headers[d.X_ORIGIN_CHANNEL]=r.channelName:v.isWSSPortal()&&(i.headers[d.X_ORIGIN_CHANNEL]="WSS"),o=this.handleRemoteCaseForCreateWork(e,i,o),br.getPreviewMode()){i.debugInfo={debugId:g.generateUniqueID()};let a=Ge.getCoreHeadersFromContext(i?.context||""),c=String(a?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]||"");c&&o!==ql&&(i.debugInfo={debugId:c})}return T({type:o,payload:{...i}}),s}handleRemoteCaseForCreateWork(e,r,n){if(ae.isRemoteCase(e)){let{RemoteClassName:o,RemoteSystemID:i,name:s}=ae.getRemoteCase(e);if(r.className=e,r.class=o,w.setRemoteCaseHeaderByContext(r,i),ae.isTraditionalRemoteCase(e)||ae.isRemoteCaseVersionDifferent(e)){let a={className:e,name:s,action:uc,remoteClassName:o};return w.setTraditionalRemoteCaseParams(r,a)}}return n}createCase(e,r={}){return this.createWork(e,{...r,theType:"CREATE_WORK"})}getDataObjectActions(e,r){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));let n=Zy,o=ze.buildActionObject({dataViewID:e,dataViewParameters:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T({type:n,payload:{...o}}),i}getDescendants(e,r){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));let n=r||this.c11nEnv.getContextName(),o=Tk,i=ze.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise(o,i),a=NV({...i,context:n});return T(a),s}openWorkByHandle(e,r,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("workID must be a string"));if(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,r);let o={insKey:e,acTargetName:n.targetContainer||d.PRIMARY,containerName:n.targetContainer||d.PRIMARY},i=B.shouldUseUnifiedHandling()||!B.isObjectCaseType(r)?Go:qk,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);return s.headers={...s.headers},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),s.className=r,ae.isRemoteCase(r)&&(i=this.setRemoteCaseParamsForOpenCase(s,r,i,n.remoteCaseMeta)),br.getPreviewMode()&&n.targetContainer!==d.WORKAREA&&(s.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...n,...s}}),a}setRemoteCaseParamsForOpenCase(e,r,n,o={}){let{RemoteSystemID:i,RemoteClassName:s,name:a}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(e,i),e.isRemoteCase=!0,e.remoteCaseClass=r,e.remoteCaseMeta=o,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(i??"")){let c={className:r,name:a,action:mS,remoteClassName:s};return w.setTraditionalRemoteCaseParams(e,c)}return n}openAssignment(e,r,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("assignmentID must be a string"));if(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(r=ae.getRemoteCaseClassBySourceClass(r)??r,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,r);let o={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...n.renderInline!==void 0&&{renderInline:n.renderInline},...n.pageName!==void 0&&{pageName:n.pageName}};n.isChild&&(o.containerName=d.PRIMARY,o.isChild=n.isChild);let i=Pa,s=ze.buildActionObject(o,this.c11nEnv),{promise:a}=this.actionsApiPromise(i,s);if(s.headers=s.headers||{},n.channelName?s.headers[d.X_ORIGIN_CHANNEL]=n.channelName:v.isWSSPortal()&&(s.headers[d.X_ORIGIN_CHANNEL]="WSS"),ae.isRemoteCase(r)){let{RemoteClassName:l,RemoteSystemID:u,name:p}=ae.getRemoteCase(r);if(w.setRemoteCaseHeaderByContext(s,u),s.remoteCaseMeta=n.remoteCaseMeta,ae.isTraditionalRemoteCase(r)||ae.getRemoteAppPlatformVersion(u??"")){let m={className:r,name:p,action:pS,remoteClassName:l};i=w.setTraditionalRemoteCaseParams(s,m)}}s.className=r,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),br.getPreviewMode()&&![d.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:g.generateUniqueID()});let c={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return T({type:i,payload:{...s,...c}}),a}finishAssignment(e,r={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));e.endsWith(d.ACTIONAREA)&&(e=se(e)||e);let n=pe(e),o=n;if(n?.includes(`/${d.WORKAREA}`)&&(o=n.substring(0,o?.lastIndexOf(`/${d.WORKAREA}`))),Nj(n)){let ne=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return Pn({messages:ne,context:o,category:E.PAGE}),Promise.reject({type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}let i=r?.isTriggeredFromDifferentContext,{caseID:s,assignments:a,localActionID:c,caseActions:l,caseInfo:u,businessID:p,caseTypeID:m,caseTypeName:f}=rT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i}),h=Yt(u),S=!1,A,C=l?.find(ne=>ne.ID===c);C?S=C?.type==="Case":A=W(n);let{assignmentID:I}=rT(e,this.c11nEnv,{isTriggeredFromDifferentContext:i});A?.context_data?.actionType&&(S=A.context_data.actionType===d.CASE,I=I||A.context_data.assignmentID);let _=DU(a,I,c,u?.activeActionID),[N,x]=s.split(" "),H={class:N,actionID:_,assignmentID:I,caseID:s,workID:x,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:S,doDeleteCaseSummary:!0,isInCreateStage:h,businessID:p,caseTypeID:m,caseTypeName:f};e?.includes(d.MODAL)&&(H.containerName=d.MODAL,H.isModalAction=!0),H.outcome=r.outcomeID,H.jsActionQueryParams=r.jsActionQueryParams,u?.isLocalAction&&(H.viewType=it.FORM);let G=Cse(e,m,u?.isObjectWideAction),re=ze.buildActionObject(H,this.c11nEnv);re.context=n;let{promise:j}=this.actionsApiPromise(G,re);return re.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||W(n).context_data.isProcessAction,re.headers??={},v.isWSSPortal()&&(re.headers[d.X_ORIGIN_CHANNEL]="WSS"),Ct.executeOrQueueDeferredAction({type:G,payload:{...re,context:n}}),j}getNextWork(e={}){if(v.getRenderingMode()==="HYBRID")return $.publish(E.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:v.getOperatorIdentifier()}),Promise.resolve();let r=Pa,n=ze.buildActionObject({...e,containerName:d.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:o}=this.actionsApiPromise(r,n);return T({type:r,payload:{...n}}),o}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));let r=Pa,n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getCaseSummary().headers,i=ze.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,i),a={type:r,payload:{...i,caseID:n,headers:o}};return T(a),s}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=Jy,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),i=this.c11nEnv.getValue(E.CASE_INFO.IS_ASSIGNMENT),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(d.MODAL)&&(s.containerName=d.MODAL,s.isModalAction=!0);let a=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isAssignment:i,isFormValid:xr(c),classID:this.c11nEnv.getCurrentClassID()}}),l}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=Yy,n=this.c11nEnv.getValue(E.CASE_INFO.CASES),o=this.c11nEnv.getValue(E.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(d.MODAL)?d.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(d.MODAL)},a=ze.buildActionObject(s,this.c11nEnv),c=pe(e);a.context=c;let{promise:l}=this.actionsApiPromise(r,a);return T({type:r,payload:{...a,context:c,cases:n,actionID:o,isFormValid:xr(c),classID:this.c11nEnv.getCurrentClassID()}}),l}openBulkAction(e,r){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if(typeof e!="string")return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){let{callbacks:u}=r;return r.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,r).then(p=>{p==="cancel"?u?.cancel?.():u?.submit?.()})}let{selectedList:n,runningMode:o}=r,i=r.type,s={selectedList:n,vcName:r.target,actionName:r?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:i,runningMode:o,...r},a=vk,c=ze.buildActionObject(s,this.c11nEnv),{promise:l}=this.actionsApiPromise(a,c);return T({type:a,payload:{...c}}),l}cancelBulkAction(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):new kd(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0}):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}approveCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(T({type:bt,payload:{reference:E.CASE_INFO.APPROVALFLAG,value:d.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?typeof e!="string"?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(T({type:bt,payload:{reference:E.CASE_INFO.APPROVALFLAG,value:d.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(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let[,r]=this.c11nEnv.getValue(E.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.DUPLICATE,context:e}},o={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:r,context:e}};return T([n,o]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEFLAG,value:d.IGNORE,context:e}},n={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEID,value:"",context:e}},o={type:bt,payload:{reference:E.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return T([r,n,o]),this.finishAssignment(e)}openLocalAction(e,r){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let n=this.getCaseID(r);if(window.pms?.plugins?.c11n?.openLocalAction)return r.caseID=n,DV(window.pms.plugins.c11n.openLocalAction,e,r);let o=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,localActionType:i,...r},a=r.containerName===d.ACTIONAREA?Mi:Ise(r),c=ze.buildActionObject(s,this.c11nEnv);(r.containerName===d.ACTIONAREA||r.containerName===d.WORKAREA)&&(c.skipMergeAssignmentsAndActions=!1);let{promise:l}=this.actionsApiPromise(a,c),u=this.c11nEnv.getContextName(),p=Ke(u)[0],m;if(m=se(p),m?.includes("actionarea")&&a===Mi)return T({type:a,payload:{...c}}),l;if(r.type==="Object")return T({type:a,payload:{...c}}),l;let f=se(p),h=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),A=n!==h&&f?ae.getRemoteHeaderByContext(f)||ae.getRemoteHeaderByContext(u):ae.getRemoteHeaderByContext(u);if(w.setRemoteCaseHeaderByContext(c,A),!p)return m=u,T({type:a,payload:{...c,contextName:u,continueExecution:!1}}),l;let{continueExecution:C,containerItemID:I}=jd(u,n,p);if(m=I,!C||m&&De()?.getState()?.data[m]?.context_data?.caseViewMode==="review")return T({type:a,payload:{...c,contextName:u,continueExecution:C}}),l;let _=m,N=_&&_.includes(d.MODAL),x=r.assignKey||this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),H=W(m),G=H?.caseInfo?.assignments?H.caseInfo.assignments[0]?.actions[0]?.ID:void 0,re=n,j=se(p),ne=mr(te(j)),be=W(j),he=ne&&be;he&&(re=be?.caseInfo?.ID,x=be?.caseInfo?.assignments[0]?.ID,G=be?.caseInfo?.assignments[0]?.actions[0]?.ID);let Me=this.c11nEnv.getContainerName(),Fe=this.c11nEnv.getValue(E.CASE_INFO.CASE_TYPE_ID),Ce=!0,Ye=this.c11nEnv.getValue("isProcessAction","isProcessAction"),Oe=ze.buildActionObject({context:_,containerItemID:he?j:m,assignmentID:x,actionID:G,caseID:he?re:n,containerName:Me,caseType:Fe,isModalAction:N,isFormValid:Ce,isProcessAction:Ye},this.c11nEnv);Oe.context=he?j:m;let ft=pe(m),Qt=this.c11nEnv.getCaseSummary(),yr=Yt(Qt),Xt=ze.buildActionObject({caseID:n,containerItemID:m,cancelContext:ft},this.c11nEnv),ln={};return N?(Xt.acTargetName=d.MODAL,Xt.isInCreateStage=yr,Xt.isModalAction=N,ln={...Xt}):ln={...Xt,acName:Z(this.c11nEnv.getContainerName(),Xt.context)},T({type:a,payload:{...c,contextName:u,saveActionPayload:Oe,cancelActionPayload:ln,continueExecution:C}}),l}openProcessAction(e,r){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));let n=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID)||r.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return r.caseID=n,DV(window.pms.plugins.c11n.openProcessAction,e,r);let o=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID)||r.assignKey,i=r.type,s={caseID:n,assignmentID:o,vcName:r.target,actionName:r?.name,assignKey:o,actionID:e,doDeleteCaseSummary:!0,processActionType:i,isProcessAction:!0,...r},a=JC,c=ze.buildActionObject(s,this.c11nEnv),l=this.c11nEnv.getContextName(),u=Ke(l)[0],p=ae.getRemoteHeaderByContext(l);if(!p&&u){let h=ut(u);h?.accessedOrder.forEach(S=>{(r.caseID||n)===h.items[S].key&&(p=ae.getRemoteHeaderByContext(h.items[S].context))})}w.setRemoteCaseHeaderByContext(c,p);let{promise:m}=this.actionsApiPromise(a,c),{containerItemID:f}=jd(l,n,u);return T({type:a,payload:{...c,saveContainerItemID:f}}),m}navigateToStep(e,r){if(!e)return Promise.reject(new Error("stepID is required parameter"));if(typeof e!="string")return Promise.reject(new TypeError("stepID must be a string"));if(!r)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=Ky,o=this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(E.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),i=Yt(this.c11nEnv.getCaseSummary()),s=this.c11nEnv.getValue(E.CASE_INFO.CASE_INFO_ID),a={ID:o,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:r,doDeleteCaseSummary:!0,isInCreateStage:i,caseID:s};r&&r.includes(d.MODAL)&&(a.acTargetName=d.MODAL);let c=ze.buildActionObject(a,this.c11nEnv),{promise:l}=this.actionsApiPromise(n,c),u=pe(r);return T({type:n,payload:{...c,containerItemID:r,context:u}}),l}cancelAssignment(e,r){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:n}=E,o=wi,i=pe(e),s=e&&e.includes(d.MODAL),a=this.c11nEnv.getCaseSummary(),c=Yt(a),l=this.c11nEnv.getValue(d.getProperty(n.CASE_INFO_ID)),u=this.c11nEnv.getValue(n.ASSIGNMENT_ID),p=ze.buildActionObject({caseID:l,containerItemID:e,context:i},this.c11nEnv),m={};s?(p.acTargetName=d.MODAL,p.isInCreateStage=c,p.isModalAction=s,m={...p}):m={...p,acName:Z(this.c11nEnv.getContainerName(),p.context)};let{promise:f}=this.actionsApiPromise(o,p);return T({type:o,payload:m}),f.then(()=>{r||e_({caseID:l,assignmentID:u,context:i||e})})}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:r}=E,n=e,o=Yl,i=e&&e.includes(d.MODAL),s=this.c11nEnv.getValue(r.CASE_INFO_ID),a=ze.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!Or(n))return new kd(this.c11nEnv).removeContainerItem({containerItemID:e}).then(()=>{yu(s),e_({caseID:s,context:this.c11nEnv.getContextName()})});T({type:o,payload:{...a,isModalAction:i}});let{promise:l}=this.actionsApiPromise(o,a);return l}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let{CASE_INFO:r}=E,n=Yl,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getCaseSummary(),a=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID)),c=Yt(s),l=this.c11nEnv.getValue(d.getProperty(r.CASE_INFO_ID)),u=ze.buildActionObject({caseID:l,containerItemID:e,context:o},this.c11nEnv),p=this.c11nEnv.getValue("isProcessAction","isProcessAction"),m=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);u.isProcessAction=p;let f=v.getRenderingMode();if(c&&(i||m||f==="EMBED")&&!Ec(s)){let S=this.c11nEnv.getValue(d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT)),A=Or(o);if(this.shouldDeleteCaseInCreateStage(A,S,m)){let C=!!B.isExternalObject(a);return this.deleteCaseInCreateStage(e,C)}T({type:n,payload:{...u,isModalAction:i,isChildCase:xU(s),isInCreateStage:c}})}let{promise:h}=this.actionsApiPromise(n,u);return h.then(()=>{})}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=yi,n=this.getSaveActionPayload(e,!0),{promise:o}=this.actionsApiPromise(r,n);return Ct.executeOrQueueDeferredAction(sl(n)),o}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=yi,n=this.getSaveActionPayload(e),{promise:o}=this.actionsApiPromise(r,n);return T(sl(n)),o}deleteCaseInCreateStage(e,r=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let n=Ah,o=e,i=o&&o.includes(d.MODAL),s=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),a=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),c=ze.buildActionObject({caseID:s,caseType:a,containerItemID:e,context:o,ignoreCaseDeletion:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.PARENTCASEINFO));c.isProcessAction=l,c.parentCaseInfo=u;let p=`${d.APP.APP}/${ge.PRIMARY}`,m=st(p,ge.PRIMARY);c.parentContext=m,i&&(c.targetName=d.MODAL,c.containerName=ge.MODAL,c.isModalAction=i),T(gV(c));let{promise:f}=this.actionsApiPromise(n,c);return f.then(()=>{e_({caseID:s,context:this.c11nEnv.getContextName()})})}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if(typeof e!="number")return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:r}=_e.getRestEndPoint("getRecents")||{};r=`${r}?maxResultsToFetch=${e}`;let n=gt.getServerURL()+r;return k(n,{method:"GET",headers:{}})}updateRecents(e,r,n,o){let{restApi:i}=_e.getRestEndPoint("updateRecents")||{},s=`${gt.getServerURL()}${i}`;return k(s,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:r,classID:e,ID:o}})}logout(){let{restApi:e}=_e.getRestEndPoint("Logout")||{},r=`${gt.getServerURL()}${e}`;return k(r,{method:"GET",headers:{}}).then(n=>(Object.keys(Ie.rootNodes).forEach(o=>{Th.cleanCaches(o)}),Ie.rootNodes={},sessionStorage.clear(),ps(),Promise.resolve(n)))}invoke(e,r={}){let n={method:r.method||"GET",body:r.body};return k(e,n,this.c11nEnv.getContextName())}showCasePreview(e,r={}){this.loadView(e,P.getDefaultQualifiedName("pyCasePreview"),{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...r})}showDataPreview(e,r,n){return e?typeof e!="string"?Promise.reject(new TypeError("dataContext must be string")):r?typeof r!="object"?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(P.getDefaultQualifiedName("pyDataPreview"),e,r,{container:ge.PREVIEW,containerName:ge.PREVIEW,context:E.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,r,n){let o=ze.buildActionObject({caseId:e,viewName:r,caseClassName:this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&typeof n=="object"?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),o={...o,...n}):o={...o,containerName:this.c11nEnv.getContainerName()};let i=Bl,{promise:s}=this.actionsApiPromise(i,o,!1);return T({type:i,payload:{...o}}),s}showPage(e,r,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!r)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if(typeof r!="string")return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,r,n);let o=ze.buildActionObject({viewName:e,className:r},this.c11nEnv),i=Pr,{promise:s}=this.actionsApiPromise(i,o);return br.getPreviewMode()&&(o.debugInfo={debugId:g.generateUniqueID()}),T({type:i,payload:{...o,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=qy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,insightID:e}}),i}showDashboard(e,r={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));let n=ze.buildActionObject({},this.c11nEnv),o=Wy,{promise:i}=this.actionsApiPromise(o,n);return T({type:o,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:r.skipSemanticUrl||!1,dashboardID:e}}),i}showData(e,r,n,o={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!r)return Promise.reject(new Error("dataContext is required parameter"));if(typeof r!="string")return Promise.reject(new TypeError("dataContext must be string"));let i=ze.buildActionObject({pageName:e,dataContext:r,dataContextParameters:n,RemoteSystemID:ae.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),s=ic;o?.containerName||(o.containerName=v.getRenderingMode()==="HYBRID"?al.getRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME):Vt.getTargetViewContainerName(s));let{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,...o,skipSemanticUrl:!!o.skipSemanticUrl}}),a}changeHandler(e,r){ze.changeHandler(e,r)}eventHandler(e,r){ze.eventHandler(e,r)}triggerFieldChange(e,r,n=!1,o={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){let i=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=J.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(r),this.c11nEnv.isInsideList()&&!o.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,r,o);let c=this.c11nEnv.getValue(d.CLASS_ID),l=e?e.split(".").filter(u=>!!u):[];l.length>1&&(l.pop(),c=oe(`.${l.join(".")}.classID`,s,i)),e=g.trimDotForProperty(e),T({type:Tn,payload:{reference:a,value:r,context:i,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:c}})}updateFieldValue(e,r,n={}){let{removePropertyFromChangedList:o=!1,isArrayDeepMerge:i=!0,contextPageReference:s="",isListEntry:a=!1,skipDirtyValidation:c=!1,associatedProperty:l,skipPageInstructionGeneration:u=!1}=n,p=this.c11nEnv.getContextName(),m=this.c11nEnv.getPageReference(),f=s?.startsWith(m)?s.replace(m,""):s;m=s||m;let h=J.getContextPath(m,e),S=!1;this.c11nEnv.isInsideList()&&!u&&this.c11nEnv.getListActions().updateProperty(f?`${f}${e}`:e,r,{isArrayDeepMerge:i,skipDirtyValidation:c}),this.c11nEnv.isBulkAction()&&(S=!0),e||(e=this.c11nEnv.getStateProps().value),dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:m,context:p,isListEntry:a}),T({type:bt,payload:{reference:h,value:r,context:p,isArrayDeepMerge:i,skipDirtyValidation:c,...S&&{isStrictTracking:S},...o&&{removePropertyFromChangedList:o},...l&&{associatedProperty:`${m}${l}`}}})}activateModalContainerItem(e){let r=Xy,{context:n}=e,o=n&&n.includes(d.MODAL),i=ze.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);o&&(i.containerName=d.MODAL,i.isModalAction=o),T({type:r,payload:i});let{promise:s}=this.actionsApiPromise(r,i);return s}refreshCaseView(e,r,n,o={}){let{promise:i,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:a,propertyName:c,preserveClientChanges:l,classID:u,context:p,optionalPayload:m,isArrayDeepMerge:f}=o,h={actionMgrID:s,caseViewAction:!0,preserveClientChanges:l,propertyName:c,classID:u,isArrayDeepMerge:f,optionalPayload:m};o.refreshFor&&(h.refreshFor=o?.refreshFor),o.resetForm&&(h.resetForm=o?.resetForm),o.skipPayloadGeneration&&(h.skipPayloadGeneration=o?.skipPayloadGeneration);let S=p||this.c11nEnv.getContextName(),A=this.c11nEnv.getPageReference(),C=this.c11nEnv.getValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:_}=C||{};if(a&&I&&_===d.ACTION){let N=this.c11nEnv.getValue(E.CASE_INFO.ASSIGNMENT_ID),{actionID:x,interestPage:H,interestPageActionID:G,isLocalAction:re}=C;Cu(e,N,x,S,H,G,re,I,_,h)}else!I&&a&&(OU(S,A)||Ac(S,A))?_u(S,n,h):Pc(e,r,S,n,h);return i}refreshEmbeddedDataWithAction(e,r,n,o,i,s,a,c,l={}){let{promise:u}=this.actionsApiPromise(Ut.REFRESH_DATA),p=this.c11nEnv.getContextName();return Cu(e,r,n,p,o||this.c11nEnv.getPageReference(),i,s,a,c,l),u}openEmbeddedDataModal(e,r,n,o,i,s,a,c,l=!1,u=E.MODAL){let p=Ui,m=r.getCaseInfo().getKey(),{localAction:f,assignmentID:h,actionID:S}=bse(r,a),A=r.getPageReference(),C=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;A.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!m&&(m=r.getCaseInfo().getObjectKey(),C=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let I=r.getMetadata(),_=Array.isArray(I?.config?.children)?I.config.children[0]?.children||[]:[],N={readOnly:l,targetProperty:n,index:o,viewID:e,ID:m,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(C),heading:s,editType:a,interestPageActionID:a===d.ACTION?c:void 0,actionID:S,isLocalAction:f,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!f&&a===d.ACTION?h:void 0,columns:_},x=ze.buildActionObject(N,this.c11nEnv);if(a===d.ACTION){let re=g.getETag(x.context);x.headers={"If-Match":re}}let{promise:H}=this.actionsApiPromise(p,x);return v.getFeatureMap().granularUIRefresh&&_.forEach(re=>{let j=fe.trimAnnotation(re.config.value),ne=lt(j.startsWith(".")?j.replace(".",""):j,re.config.classID);ne&&!Array.isArray(ne)&&ne.isDeclarativeTarget&&Ie.addFieldNode(r.getContextName(),A+C,r.viewName??"",j,"",{isDeclarativeTarget:!0,propertyName:j,pageReference:A+C})}),T({type:p,payload:{...x,containerName:u,skipSemanticUrl:!0}}),H}getEmbeddedDataView(e,r,n,o,i,s="",a="",c=!1,l=""){let u=lS,p=r.getCaseInfo().getKey(),m=r.getValue(E.CASE_INFO.IS_LOCAL_ACTION),f=r.getValue(E.CASE_INFO.ASSIGNMENT_ID),h=wV(r,s,m),S=r.getPageReference(),A=typeof o=="string"?`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${o}`:`${r.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${o}]`;S.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!p&&(p=r.getCaseInfo().getObjectKey(),A=`${r.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${o}]`);let C={readOnly:c,targetProperty:n,index:o,viewID:e,ID:p,actionType:i,interestPage:g.convertPageRefToClipboardPageNotation(A),editType:s,interestPageActionID:s===d.ACTION?a:void 0,actionID:h,isLocalAction:m,operationFlag:d.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:typeof o=="string",assignmentID:!m&&s===d.ACTION?f:void 0,containerName:l},I=ze.buildActionObject(C,this.c11nEnv);if(s===d.ACTION){let N=g.getETag(I.context);I.headers={"If-Match":N}}let{promise:_}=this.actionsApiPromise(u,I);return T({type:u,payload:{...I,skipSemanticUrl:!0}}),_}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=uS,n=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(d.getProperty(E.CASE_INFO.ASSIGNMENT_ID)),i=this.c11nEnv.getPageReference().replace(d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),""),s=pe(e),a=this.c11nEnv.getValue(d.getProperty(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:c,editType:l,isLocalAction:u,actionID:p,viewName:m,parentContext:f}=a;i.startsWith(E.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue(E.OBJECT_INFO.OBJECT_INFO_ID),i=this.c11nEnv.getPageReference().replace(E.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),dt({context:s,stateObj:W(s),clearContextMessages:!0});let h={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:m,isFormValid:xr(s),interestPage:g.convertPageRefToClipboardPageNotation(i),parentContext:f,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:l,actionID:p,operationFlag:d.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:c,isLocalAction:u,assignmentID:o};e&&e.includes(d.MODAL)&&(h.containerName=d.MODAL,h.isModalAction=!0);let S=ze.buildActionObject(h,this.c11nEnv);if(l===d.ACTION){let C=g.getETag(S.context);S.headers={"If-Match":C}}let{promise:A}=this.actionsApiPromise(r,S);if(Or(s)){let[C,I,_]=Vi.getPageListNameAndIndexFromPageName(this.c11nEnv.getPageReference());Ie.mutatePageList(f,C,I,{type:Wn,rowIndex:_}),T({type:Wn,payload:{pageReference:this.c11nEnv.getPageReference(),context:f,isListEntry:!0}})}return Ct.executeOrQueueDeferredAction({type:r,payload:{...S,context:s}}),A}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(typeof e!="string")return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));let r=pe(e),n=this.c11nEnv.getPageReference(),{promise:o,actionMgrID:i}=this.actionsApiPromise(lc);return _u(r,n,{actionMgrID:i,isFillFormWithAI:!0,preserveClientChanges:!1}),o}handleSubscript(e,r){if(!Na(E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));let o=dS,i=ze.buildActionObject({containerItemID:e},r);T({type:o,payload:{...i,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:xr(e),context:e}});let{promise:s}=this.actionsApiPromise(o,i);return s}showSubscriptCreateView(e,r,n,o=E.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){let i=ze.buildActionObject({viewName:o,className:e,referenceListStr:r,subscriptName:n},this.c11nEnv),s=Pr,{promise:a}=this.actionsApiPromise(s,i);return T({type:s,payload:{...i,containerName:E.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}deleteWork(e,r,n){if(!e)return Promise.reject(new Error("workId is required parameter"));let o=YI,i=B.isExternalCaseType(r),s=ze.buildActionObject({workId:e,caseTypeID:r,isExternalCase:i,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:a}=this.actionsApiPromise(o,s);return T(kx({...s})),a}deleteDataRecord(e,r){if(!e)return Promise.reject(new Error("className is required parameter"));if(!r)return Promise.reject(new Error("keys is required parameter"));let n=YI,o=ze.buildActionObject({className:e,keys:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return T(kx({...o})),i}},$V=lD;var uD=class{c11nEnv;constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(d.getProperty(d.DATA_INFO.DATA_INFO_CONTEXT_KEY))}},MV=uD;var t_=class{fieldType;constructor(e){this.fieldType=e}applyFallback(e){let r=Xr.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||r?.currencyISOCode||"USD"}};var r_=class{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new t_(e);default:return}}};var An={DATAPAGE:"DATAPAGE",VIEW:"VIEW",FIELD:"FIELD",CASE:"CASE",PARAGRAPH:"PARAGRAPH",PORTAL:"PORTAL"};var kV=/[\\^$.*+?()[\]{}|]/g,Tse=RegExp(kV.source);function vse(t){return t=jy(t),t&&Tse.test(t)?t.replace(kV,"\\$&"):t}var LV=vse;var Rse=/\{(\d+)\}/,Pse=t=>{let e=t.split(Rse),r=[],n=new Map,o="",i=0;return e.forEach((s,a)=>{if(a%2===0){o+=LV(s),i+=s.length;return}let c=Number(s),l=n.get(c);if(l!==void 0){o+=`\\${l}`;return}r.push(c),n.set(c,r.length),o+="(.+?)"}),{key:t,pattern:new RegExp(`^${o}$`),groupToPlaceholder:r,literalLength:i}},UV=(t,e)=>{if(!t)return;let r;for(let s of Object.keys(e)){let a=Pse(s),c=a.pattern.exec(t);c&&(!r||a.literalLength>r.template.literalLength)&&(r={template:a,captures:c.slice(1)})}if(!r)return;let{template:n,captures:o}=r,i=[];return n.groupToPlaceholder.forEach((s,a)=>{i[s]=o[a]}),{message:e[n.key],args:i}};var _i=(t,e,r,n)=>{let o=[An.VIEW,An.FIELD,An.PARAGRAPH],s=[An.DATAPAGE,An.PARAGRAPH].includes(t)&&n?`#${n}`:"",a=t===An.DATAPAGE?"@BASECLASS":r;return t===An.DATAPAGE||o.includes(t)?`${a}!${t}!${e}${s}`.toUpperCase():`${t}!${e}${s}`.toUpperCase()},zd=class t{locale;localeReference;static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";static CASE_HISTORY="CASEHISTORY";lookupList=[];constructor(e,r){this.localeReference=r,this.locale=e}getLocalizedText(e,r){let n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,t.COMPONENT_FIELDS,t.COMMON_LABELS],o=this.#t(e,n)||e;return(r?this.#e(o,r):o)||e}getLocalizedMessage(e,r){let n=this.#t(e,[t.MESSAGES,t.COMMON_LABELS])??e;return(r?this.#e(n,r):n)||e}getLocalizedDataPage(e,r,n,o){if(!r||!n||!e)return e;let s=[_i(An.DATAPAGE,r,void 0,n),t.COMMON_LABELS,...this.lookupList],a=this.#t(e,s)??e;return(o?this.#e(a,o):a)||e}getLocalizedCaseHistory(e){if(!e)return e;let r=Ci(this.locale).localeStore[t.CASE_HISTORY];if(!r||Object.keys(r).length===0)return e;let n=UV(e,r);if(!n?.message)return e;let o=n.args.map(i=>this.getLocalizedText(i));return this.#e(n.message,o,!0)}#e(e,r,n=!1){if(r.length===0)return e;let o=n?0:1;return e.replace(/\{(\d+)\}/g,(i,s)=>r[`${Number(s)-o}`]??i)}#t(e,r=this.lookupList){if(r.length===0)return;let n=Ci(this.locale);for(let o of r){let i=this.#r(e,n.localeStore[o]);if(i)return i}}#r(e,r={}){let n=r[e];if(typeof n=="string")return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}};var dD=class{_dataSourceMap;constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,r){r&&Object.keys(r).length>0?this._dataSourceMap[e]=r: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,r,n){if(this.hasContextName(e)){let o=this.getContextObjectByName(e);if(o)if(Array.isArray(n))o[r]=n;else{let i=o[r];o[r]=[...new Set([...i,n])]}}else{let o={};Array.isArray(n)?o[r]=n:o[r]=[n],this.addContextName(e,o)}}deletePropertyInContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);n&&r in n&&delete n[r]}}getPropertyFromContext(e,r){if(this.hasContextName(e)){let n=this.getContextObjectByName(e);if(n&&r in n)return n[r]}return[]}getDependencies(e,r){let n=this.getPropertyFromContext(e,r),o=new Set(n);return n.forEach(i=>{o.add(i)}),[...o]}},xa=new dD;var pD={};qt(pD,{fetchViewResources:()=>vh,refreshViewByName:()=>Ose,updateViewResources:()=>n_});var n_=async t=>{let e=Le(t),r=g.getIn(e,d.COMPONENTS);Gi(e,{},!0),await fo(r)},vh=(t,e,r)=>J.resolveView(t,e,r),jV=(t,e,r,n)=>{let o=t[e];if(!o)return!1;let i=g.getIn(o,E.CASE_INFO.CASE_INFO_CLASSID);return g.getIn(o,d.CASE_INFO.VIEW_NAME)===r&&(!n||i===n)},zV=t=>{let{accessedOrder:e,items:r}=t;if(!e||!r)return null;let n=e[e.length-1];return n?r[n]?.context??null:null},Nse=(t,e)=>{let r=De();if(!r)return null;let n=r.getState(),{data:o,containers:i}=n;if(!i||!o)return null;let s=`${E.APP.APP}/primary`;if(i[s]){let a=zV(i[s]);if(a&&jV(o,a,t,e))return a}for(let a of Object.keys(i)){if(a===s)continue;let c=zV(i[a]);if(c&&jV(o,c,t,e))return c}return null},Ose=(t,e="",r="")=>{let n=r||null;if(!n){let a=`${E.APP.APP}/primary`;n=Nse(t,e),n||(n=Ar(a))}if(!n)return Promise.reject(new Error(`Unable to find an active context for view "${t}".`));let o=W(n);if(!o)return Promise.reject(new Error(`No data found for context "${n}".`));let i=g.getIn(o,E.CASE_INFO.CASE_INFO_ID)||"",s=ct({options:{context:n,pageReference:E.CASE_INFO.CASE_INFO_CONTENT}});return mD(),s.getPConnect().getActionsApi().refreshCaseView(i,t,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally(()=>{fD()})};var gD=class{meta;datasource;options;index;datasourceObj;constructor(e,r,n){this.meta=e,this.datasource=r,this.index=0,this.options=n,this.datasourceObj=J.getPropertyValue(r,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");let e=J.getContextPath(this.datasource,this.index);return this.index+=1,ct({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}},hD=gD;var yD=class{children;options;index;constructor(e,r){this.children=e,this.index=0,this.options=r}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");let e=this.index,r=this.children[e];this.index+=1;let n=r?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return ct({meta:r,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}},xse=(t,e)=>{let r=!!t?.repeat;if(!!t?.["repeat-self"])return new hD(t,t.context||"",e);if(r){let o=Da(`${e.context}.${d.SUMMARY_OF_LISTS}`,t.pageReference,e.context);return new hD(t.children[0],o||t.context,e)}if(t?.children)return new yD(t.children,e)},FV=xse;var cl=class{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,r){let n=[];if(e&&["portal","view"].includes(r)){let{accessedOrder:o,items:i}=e;if(o&&i){let s=o[o.length-1];i[s]&&i[s].view&&Object.keys(i[s].view).length>0&&n.push(i[s])}}return n}static getDependentProperties=e=>{let r=[];return e._rawConfig?.config?.parameters?r=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(r=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map(n=>n?.value)),r.filter(n=>_r.isProperty(n)).map(n=>_r.getPropertyName(n))}},Dse=new cl;Object.freeze(Dse);var SD,o_=(t,e,r)=>{t&&(Object.keys(t).forEach(n=>{if(n!=="children"){let o=t[n],i=fe.trimAnnotation(o);if((typeof i=="string"||typeof o=="string")&&(g.isValidAnnotation(o)&&g.isPropertyRef(i)||o.startsWith("@W ")||o.startsWith("@DW ")||o.startsWith("@E ")||o.startsWith("@PARAGRAPH ")||o.startsWith("@ATTACHMENT ")))r&&r.parentKey&&(r.isObjHasValue=!0),o.startsWith("@PARAGRAPH ")?e[n]=o:e[n]=i;else if(Array.isArray(i))i.forEach((s,a)=>{let c={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||[],e[n][a]=Object.create({}),o_(s,e[n][a],c)});else if(i&&typeof i=="object"&&i.type!=="exp"){let s={parentStateObj:e,parentKey:n,isObjHasValue:!!e[n]};e[n]=e[n]||{},o_(i,e[n],s)}}}),r&&!r.isObjHasValue&&delete r.parentStateObj[r.parentKey])},VV=(t,e)=>{t._inheritedProps=t._inheritedProps||[],t.inheritedProps=[...t._inheritedProps,...g.deepClone(e.inheritedProps)]},ea=class{useCustomContext;_rawConfig;_classID;index;_ruleClass;viewName;meta;_isRoot;options;_isExpressionExist;_isWhenExist;_isValidatorExist;_pageReference;_referenceContext;_contextName;_stateProps;_actions;_children;_additionalRegisteredProps;_caseInfo;_dataInfo;parentViewName;_referenceList;_isInsideList;_inheritedConfig;_localeRuleName;_containerTarget;_readOnly;_hasSuggestions;_isState;_type;_actionsApi;categoryName;_relativePath;_dpResolver;constructor(e){let{meta:r,isRoot:n,options:o={},useCustomContext:i}=e;this.meta=r,this._isRoot=n,this.options=o,this.useCustomContext=i,this._rawConfig=r?.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=o.viewName,this.parentViewName=o.viewName??"",this._referenceList=o.referenceList||"",this._isInsideList=o.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=o.localeReference,this._containerTarget=o.target,this._readOnly=r?.config?.readOnly||o.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=o.categoryName||"",this._relativePath=o.relativePath??"",o.inheritedConfig&&Object.keys(o.inheritedConfig).length>0&&(this._inheritedConfig=g.deepClone(o.inheritedConfig)),r?.config?.inheritedProps&&VV(this._inheritedConfig,r?.config),this.meta?.config?.value&&typeof this.meta?.config?.value=="string"&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=ei.formatePageReferenceToArrayIndex(this.meta.config.value)),o_(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=Dt.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=E.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let s=this.options.pageReference;this.options.pageReference&&(s=fe.handleAnnotation(this.options.pageReference,this)),this._pageReference=J.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),this._type==="reference"&&(this._rawConfig=r);let a=this._type==="reference"&&g.isWhenExist({visibility:this.meta?.config?.visibility}),c=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions),l=!1;if(this._type!=="reference"&&r&&(this._rawConfig=J.resolveReference(r,this)),this._rawConfig){let u=this.getRawConfigProps();u&&(this._localeRuleName=fe.trimAnnotation(u.localeReference)||o.localeReference,this._isExpressionExist=g.isExpressionExist(u),this._isWhenExist=g.isWhenExist(u),this._isValidatorExist=Dt.isValidatorExist(u),l=this._checkAndSetDecisionParagraph("label",u?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&(this.viewName=fe.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&tj(this)}(a||c||l)&&lE(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,r,n){let o=!1;if(r&&r.startsWith(d.PARAGRAPH_ANNOTATION)){let i=fe.trimAnnotation(r);o=ho.isDecisionParagraph(i,n??this.getCurrentClassID()),o&&this.setStateProps({[e]:r})}return o}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||this._pageReference===""){let r=fe.trimAnnotation(this.getPropertyName());e=this.getFieldMetadata(r)?.isDeclarativeTarget||!1}return e}_getPropertyName(){let e=fe.trimAnnotation(this.getPropertyName());return this._pageReference===""&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){let e=this._getPropertyName(),{value:r,contextPage:n,label:o,required:i,readOnly:s,disabled:a,visibility:c,validationType:l,caption:u,allowMultiple:p,useRFC822Validation:m,displayAs:f}=this.getRawConfigProps();if(this.getValue(this._pageReference)||this._pageReference===""){let h=this._type==="Address"&&this._rawConfig?.config?.associatedView?fe.trimAnnotation(this._rawConfig.config.associatedView):"",S=o||u,A=this._rawConfig?.type,C={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(r),label:S?.startsWith("@")?fe.handleAnnotation(S,this,void 0):S,required:i,readOnly:s,disabled:a,visibility:c||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:r,validationType:l,...n&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(n)}`},componentName:A,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:p,isDeclarativeTarget:this.isDeclarativeTarget(),...f&&{displayAs:f},...this._type==="Email"&&{useRFC822Validation:m}};Ie.addFieldNode(this._contextName,this._pageReference,(h||this.categoryName||this.viewName)??"",e,this.getValue(e),C)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&this._type!=="Address")Ie.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",fe.trimAnnotation(this.getPropertyName()),this.index);else if(this._type==="Address"&&this._rawConfig?.config?.associatedView)Ie.removeViewNode(this._contextName,this._pageReference,fe.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{let e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,n={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};Ie.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,n)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===d.VIEW&&this._rawConfig.name&&this.viewName){let r={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};Ie.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,r)}this._rawConfig?.type==="Group"&&this._rawConfig?.config?.id&&Ie.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),this._rawConfig?.type==="Address"&&this._rawConfig?.config?.associatedView&&Ie.addViewNode(this._contextName,this._pageReference,fe.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),this._rawConfig?.type?.toLowerCase()==="deferload"&&this._rawConfig.config?.name&&Ie.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",r="",n=g.getWhenNames(this._rawConfig?.config),o=this.getRawConfigProps();if(o?.type&&o?.type?.toLowerCase()===d.VIEW)r=d.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{r=d.CONTEXT_TREE_NODE_TYPES.FIELD;let i=this.getPropertyName();e=fe.isProperty(i)?fe.trimAnnotation(i):""}e&&n.forEach(i=>{Ie.addWhenNode(this.getContextName(),this.getPageReference(),r,e,i,{pageReference:this.getPageReference(),context:this.getContextName()})})}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this._inheritedConfig.displayMode!=="DISPLAY_ONLY"&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY"&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==d.VIEW||this._rawConfig.config?.renderMode==="Editable")&&this._rawConfig?.config?.referenceList&&this._rawConfig.config?.displayMode!=="DISPLAY_ONLY")){let{value:e,label:r,required:n,contextPage:o,readOnly:i,disabled:s,visibility:a,validationType:c,selectionMode:l,selectionList:u,selectionKey:p,referenceList:m,renderMode:f,caption:h,uniqueField:S}=this.getRawConfigProps(),A=r||h,C=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(C=this.getSelfReferencingDatapageKeys()),Ie.addPageListNode(this._contextName,this._pageReference,this.viewName??"",fe.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:fe.trimAnnotation(this.getPropertyName()),label:A?.startsWith("@")?fe.handleAnnotation(A,this,void 0):A,required:n,readOnly:i,disabled:s,...o&&{contextPageRef:`${this._pageReference}${fe.trimAnnotation(o)}`},visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:c,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:l,selectionList:u,renderMode:f,referenceList:m,selectionKey:p,index:this.index,uniqueField:S,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?C:void 0});let I=this.getValue(fe.trimAnnotation(this.getPropertyName()),this._pageReference)||[];Ie.updatePageListNode(this._contextName,this._pageReference,fe.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){g.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){let e=this.getCaseInfo().getClassName(),r=this.getCurrentView();if(!r||!e)return;let n=vh(r,this,e);if(!n)return;let o=this.getRawMetadata()?.config?.referenceList;if(!o)return;let i={};typeof n.config?.parameters=="object"&&n.config.parameters!==null&&(i=n.config.parameters);let s=g.generateDataPageHashWithParameters(i,o,this),a=Mo(),c=a?a[o]?.[s]:{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:void 0}getParameterizedDataPageFieldValue(e,r){return this._dpResolver??=new cE(this),this._dpResolver.resolve(e,r)}getCaseInfo(){return this._caseInfo||(this._caseInfo=new QS(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new MV(this)),this._dataInfo}getCaseLocaleReference(e){let r=this.getRawConfigProps(),n=e||this.getValue(d.getProperty(d.CASE_INFO.CASE_TYPE_ID))||this.getValue(d.CLASS_ID,d.getProperty(d.DATA_INFO.DATA_INFO_CONTENT))||r?.referenceClass||r?.className;return n?_i(An.CASE,n):null}getListActions(){return QL(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(){let e=this.getComponentConfig(),r;return e.selectionMode==="multi"?r="selectionList":e.selectionMode==="single"&&e.selectionKey?r="selectionKey":e.renderMode==="Editable"?r="referenceList":this._type==="Address"?r="addressProp":r="value",this.getComponentConfig()[r]}getFullReference(){let e=this.getPageReference(),r=this.getPropertyName();return J.getContextPath(e,r)}getContextName(){return this._contextName}getContainerName(){let{type:e}=this.getMetadata()||{},r=[d.CONTAINERS.ROOT_CONTAINER,d.CONTAINERS.VIEW_CONTAINER,d.CONTAINERS.FLOW_CONTAINER,d.CONTAINERS.MODAL_VIEW_CONTAINER,d.CONTAINERS.PREVIEW_VIEW_CONTAINER,d.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=ge.PRIMARY,name:o,routingInfo:i}=this.getComponentConfig();return(e&&r.includes(e)||i==="@ROUTING_INFO")&&o?o: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){let r=Se?.getStore()?.getState()?.data[`${this.getContextName()}/${d.SUGGESTION}`],n=this.getStateProps()?.value,o=J.getContextPath(this.getPageReference(),n),i=r?$n.getSuggestionsContext(this.getContextName()).getField(o):void 0;this._hasSuggestions=!!i,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){let r={...Xr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return r_.getStrategy(this._type)?.applyFallback(r),this.populateSuggestionProps(r),this.resolveConfigProps(r,e),g.resolveStringBooleans(e)}getLocalizationService(e){let r=this.getComponentName(),n=e||(r==="View"?this._rawConfig?.config?.template:r),o=v.getLocale()??"en-US",i=new zd(o,n),s=this.getCaseLocaleReference();return i.setLookupList(["APP!APPLICATION"]),s&&i.setLookupList([s]),i}getRawConfigProps(){let{_deepProps:e,...r}={...Xr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(r),r}resolveConfigProps(e,r={}){return e&&(J.resolveProps(e,r,this),fe.handleComponentMapping(r,{type:this.getComponentName()||"",config:e},this)),r}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),o_(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach(r=>{delete this._additionalRegisteredProps[r]}),!0}populateAdditionalProps(e){let r=a=>a?.map(c=>({...c,message:this.getLocalizationService()?.getLocalizedMessage(c.message)??c.message})),n=this.getComponentName(),o=this.getComponentConfig(),i=n===d.ROOT_CONTAINER&&e.renderingMode!=="portal";if(n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||n===d.OBJECTACTIONCONTAINER){let a=se(`${d.APP.APP}/${this.getContainerName()}`),c=Gt({context:a,category:E.PAGE});e.pageMessages=r(c),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:a}=this.getStateProps();a===void 0&&this.getComponentConfig()?.selectionMode==="multi"?a=this.getStateProps().selectionList||fe.trimAnnotation(this.getRawConfigProps().selectionList):!a&&this.getComponentConfig()?.renderMode==="Editable"&&this.getStateProps().referenceList&&(a=this.getStateProps().referenceList);let c=Gt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.MESSAGES.MESSAGES_TYPE_ERROR}),l=Gt({property:a,pageReference:this.getPageReference(),context:this.getContextName(),type:E.MESSAGES.MESSAGES_TYPE_INFO});c&&c[0]&&(e.validatemessage=c.map(p=>this.getLocalizationService().getLocalizedMessage(p.message).replace(/\.$/,"")).join(". ")+(c[c.length-1].message.endsWith(".")?".":""),e.status=d.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status,c?.find(p=>p.type==="error"&&p.subType==="required")&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:a,subType:"required"})),l&&l[0]&&(e.infoMessage=l[0].message,e.status=d.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===d.ROOT_CONTAINER){let a=WT(i,se(`${d.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(a)?r(a):a,this._stateProps.httpMessages=e.httpMessages;let c=$n.getSharedState("isLoggedOut");e.isLoggedOut=c,this._stateProps.isLoggedOut=c;let l=Gt({context:d.APP.ROOT,category:"PAGE"});e.pageMessages=r(l),this._stateProps.pageMessages=e.pageMessages}if(n===d.HYBRID_VIEW_CONTAINER){let a=Gt({context:d.APP.APP,category:d.HTTP});e.httpMessages=r(a),this._stateProps.httpMessages=a}if(n===d.APP_SHELL&&e.portalDocMode===d.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=fn.getOpenedCaseItems(`${E.APP.APP}/${d.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===d.APP_SHELL){let a=d.APP.APP,c=se(`${a}/${this.getContainerName()}`),l=[...Gt({context:a,category:"PAGE"})||[],...Gt({context:c,category:"PAGE"})||[]],u=l.length>0?l:void 0;e.pageMessages=u&&r(u),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===d.SCALARLIST&&(this._stateProps.value=e.value),n===d.APP_SHELL||n===d.MODAL_VIEW_CONTAINER||n===d.CASE_CREATE_STAGE||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW){let a=Gt({context:d.APP.APP,category:"HTTP"}),c=v.getRenderingMode()==="HYBRID"?`${this.getContextName()}/${this.getContainerName()}`:`${d.APP.APP}/${this.getContainerName()}`,l=Gt({context:se(c),category:"HTTP"});a?l&&(a=a.concat(Gt({context:se(c),category:"HTTP"}))):a=Gt({context:se(c),category:"HTTP"}),e.httpMessages=a&&a.map(u=>this.getLocalizationService().getLocalizedMessage(u.message)),this._stateProps.httpMessages=e.httpMessages,a?.forEach(u=>{u.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...u.errorDetails):u.errorDetails,this._stateProps.errorDetails=e.errorDetails),u.correlationID&&(e.correlationID=u.correlationID)})}if(n===d.VIEW_CONTAINER||n===d.FLOW_CONTAINER||n===d.MODAL_VIEW_CONTAINER||n===d.PREVIEW_VIEW_CONTAINER||n===d.ROOT_CONTAINER||n===d.OBJECTACTIONCONTAINER){if(e.routingInfo=um(this.getContainerName(),this._contextName),n===d.ROOT_CONTAINER&&(e.rootConfig=cl.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===d.FLOW_CONTAINER||n===d.OBJECTACTIONCONTAINER){let a=Gt({context:this.getContextName(),category:d.CASEMESSAGES}),c=this.getContextName();e.caseMessages=a,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;let l=Ke(c)[0];if(l){let u=se(l),p=Se?.getStore()?.getState()?.data;p&&u&&(e.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=p[u]?.caseInfo?.lastUpdateTime);let m=Gt({context:u,category:E.PAGE}),f=Gt({context:u,category:"HTTP"});e.httpMessages=r(f),e.pageMessages=r(m),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,f?.forEach(h=>{h.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...h.errorDetails):h.errorDetails,this._stateProps.errorDetails=e.errorDetails),h.correlationID&&(e.correlationID=h.correlationID)})}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=W(d.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map(a=>a.name),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map(a=>a.name),n===d.MODAL_VIEW_CONTAINER){let a=e.routingInfo?.accessedOrder||[],c=a[a.length-1];c&&(e.loadingInfo=this.getLoadingStatus(c))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else o.template===d.CASE_VIEW||o.template===d.RULE_VIEW||o.template===d.SELF_SERVICE_CASE_VIEW||o.template===d.CASE_PREVIEW||o.template===d.RULE_PREVIEW||o.template===d.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===d.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.getInheritedProps()?.shouldAutoRefresh&&this.meta?.config?.value?.includes("@P")&&this.meta.config._autoRefresh_===void 0&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.doesContextExist()&&this.updateContextTree()}populateFieldMetadata(e){let{value:r,datasource:n,listType:o}=this.getComponentConfig(),{propertyValue:i,propertyAnnotation:s}=this.getPropertyDetails(o,n,r);if(i&&typeof i=="string"&&(i.includes(s)||i.includes(d.ATTACHMENT_ANNOTATION))){let a=fe.getPropertyName(i),c=this.getFieldMetadata(a);c&&this.updateConfigData(e,c,a)}}resolvePropertyMetadata(e,r){if(!e)return e;let n=ED(`${this._pageReference}.${r}`,this._contextName);if(!Array.isArray(e)){let{additionalInformation:o,classID:i}=e;this._checkAndSetDecisionParagraph("additionalInformation",o??void 0,i)?this._additionalRegisteredProps.additionalInformation=o:o&&this.setStateProps({additionalInformation:n}),e.additionalInformation=n;let{inputFormat:a}=e;if(typeof a=="string"&&a.startsWith("@")){let c=fe.handleAnnotation(a,this);typeof c=="object"&&c!==null&&"pattern"in c&&typeof c.pattern=="string"?e.inputFormat={pattern:c.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;let r=e.split(".");if(r.length<2){let s=this.getValue(d.CLASS_ID);return!s&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(s=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(lt(e,s),e)}let n=r.pop(),o=r.join(".")?".":"",i=this.getValue(`${o}${r.join(".")}${d.CLASS_ID}`);return i||(i=g.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(lt(n,i),e)}getCurrentPageFieldMetadata(e=null){let r=this.getPageReference().split(".");e!==null&&(r=e.split("."));let n=r.pop();return this.resolvePropertyMetadata(lt(n,this.getValue(`${r.join(".")}${d.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(d.CLASS_ID)}getCaseSummary(){let e={...this.getDataObject()[d.getProperty(E.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(d.getProperty(E.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>Ac(this.getContextName(),this.getPageReference())}}getReferencedUser(e){let r=this.getValue("referencedUsers");if(Array.isArray(r)){let n=r.find(o=>o.UserID===e);if(n)return{userId:n.UserID,UserName:n.UserName}}return r&&r[e]?r[e]:null}getCaseStages(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[E.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){let{value:r}=this.getStateProps();r&&(e.error=this.getContextDataValue(`${this.getPageReference()+r}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+r}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new uV(this)}isEditable(){return!!(this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||this._rawConfig.config.renderMode==="Editable"&&this._rawConfig.config.referenceList)&&!(typeof this._rawConfig.config?.value=="string"&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.hasOwn(this._rawConfig.config,"readOnly")&&(this._rawConfig.config.readOnly==="true"||this._rawConfig.config.readOnly===!0))&&!(Object.hasOwn(this._rawConfig.config,"disabled")&&this._rawConfig.config.disabled===!0))}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&typeof this._rawConfig?.config?.visibility=="string"?fe.handleAnnotation(this._rawConfig?.config?.visibility,this):typeof this.options?.visibility=="string"?fe.handleAnnotation(this.options?.visibility,this):!0}isReadOnly(){return this._readOnly===void 0?!1:this._readOnly==="true"||this._readOnly===!0?!0:typeof this._readOnly=="string"?fe.handleAnnotation(this._readOnly,this)===!0:!1}hasChildren(){return!!this._children}getComputedVisibility(e=[]){let r=this._type==="reference"&&!!this.getReferencedView(),n=r?this.getReferencedViewPConnect().getPConnect():this,o=e;if(r){let u=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(u))return!1;o=[...e,u]}if(this.getConfigProps().visibility===!1)return!1;if(n.getConfigProps().requiresVisibleChildren===!1||this.getConfigProps().requiresVisibleChildren===!1)return!0;let i=n.getConfigProps(),s={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]},a=n._type&&s.includeTypes.includes(n._type)&&!s.excludeTemplates.includes(i.template);if(i.highlightedData&&i.highlightedData.length&&i.showHighlightedData&&(a=!1),!a)return!0;let l=n.getChildren();return l?l.some(u=>u.getPConnect().getComputedVisibility(o)):!1}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,r){this._actions[e]=r}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!!(this._rawConfig&&this._rawConfig.isRefreshable)}getDataObject(e){return W(e||this.getContextName())}getImagePath(e){return`${Be.getConstellationServiceUrl()}/v860/${Be.getAppAlias()}/image/${e}?org=${_e.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){let e=this.options?.inheritedProps?.find(o=>o?.prop==="shouldAutoRefresh");e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);let r=FV(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:this._type==="Group"?this._rawConfig?.config?.id:null,relativePath:this._relativePath}),n=[];for(;r?.hasNext();){let o=r.next();(!this.isBulkAction()||!this.#r(o))&&n.push(o)}return r?.resetIndex(),n}return[]}setInheritedProp(e,r,n=!1){this._inheritedConfig[e]=r;let o=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(n||o)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:r})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){let e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#e(e){let r=this.getDeepInheritedConfig();return r?{...e,inheritedConfig:{...e.inheritedConfig,...r}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,r,n){let o=n||this.getLocaleRuleName(),i=o&&r?`${o}#${r}`:o,s=this.getLocalizationService(i).getLocalizedText(e);return s===e?this.getLocalizationService().getLocalizedText(e):s}getLocaleRuleNameFromKeys(e,r,n){return`${e}!${r}!${n}`}getValue(e,r){if(e=e?.replace(/\((\d+)\)/g,(i,s)=>`[${parseInt(s,10)-1}]`),this.useCustomContext)return e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce((i,s)=>i?.[s]??void 0,this.useCustomContext);let n=r||this.getPageReference(),o=e?.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(o){let i=o[1].split(".").length,s=o[2]||"",a=n?.split(".")||[];n=a.slice(0,Math.max(a.length-i,0)).join("."),s?e=`.${s}`:(e=n,n="")}return this._hasSuggestions&&this.getStateProps()?.value===e?J.getPropertyValue(e,n,`${this._contextName}/${d.SUGGESTION}`):J.getPropertyValue(e,n,this._contextName)}setInheritedConfig(e){if(!e)return;let{readOnly:r,displayMode:n,referenceType:o,hideLabel:i}=e;i&&(this._inheritedConfig.hideLabel=i),o&&(this._inheritedConfig.referenceType=o),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||r)&&(this._inheritedConfig.readOnly=r),e.inheritedProps&&(e.inheritedProps?.forEach(s=>{s.prop==="required"&&(this._inheritedConfig[s.prop]=s.value)}),VV(this._inheritedConfig,e))}getInheritedProps(){let e={},r={};return this._inheritedConfig.inheritedProps?.forEach(n=>{r[n.prop]=n.value}),J.resolveProps(r,e,this),e}setValue(e,r,n,o=!1,i={}){if(!g.isValidPropertyReference(e))return;let s,a,{isArrayDeepMerge:c}=i;this.isInsideList()&&this.getListActions().updateProperty(e,r),this.isBulkAction()&&(s=!0,r||(a=!0)),T({type:"SET_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,initialValue:n,isImplicit:o,context:this.getContextName(),...c!==void 0&&{isArrayDeepMerge:c},...s&&{isStrictTracking:s},...a&&{removePropertyFromChangedList:a}}})}updateDirtyCheckChangeList(e,r){let n={reference:`${this.getPageReference()}${e}`,value:r,context:this.getContextName()};HV(n)}getContextDataValue(e,r){return Wi(r||this.getPageReference(),e,this._contextName)}updateState(e){let r=this._pageReference.indexOf(d.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf("."),o=d.CASE_INFO.CASE_INFO_CONTENT;r!==0&&(o=n>0?this._pageReference.substring(n):this._pageReference),T(Re({context:this._contextName,data:e,rootPageReference:o}))}replaceState(e,r,n={}){if(!g.isValidPropertyReference(e))return;let{skipDirtyValidation:o=!1}=n;T({type:"REPLACE_PROPERTY",payload:{reference:J.getContextPath(this.getPageReference(),e),value:r,context:this.getContextName(),skipDirtyValidation:o}})}reportError(e,r,n){T(Qi(e,r||{},n,r?.formFields))}getComponent(){return SD({getPConnect:()=>this})}createComponent(e,r,n,o){let i=this._pageReference;if(r){let s=Da(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,r,this._contextName);i=J.getContextPath(s||r,n)||r}else if(o&&o.pageReference){let s=o.pageReference;s=fe.handleAnnotation(s,this),i=J.getContextPath(this._pageReference,s)||""}return SD(ct({meta:e,index:this.index,options:this.#e({containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:i,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}),useCustomContext:this.useCustomContext}),o)}getReferencedView(){if(this.meta)return J.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(d.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){let r={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find(o=>o.prop==="shouldAutoRefresh");return n&&!r?.inheritedProps?.some(o=>o.prop==="shouldAutoRefresh")&&r?.inheritedProps?.push(n),delete r?.name,delete r?.type,ct({meta:this.getReferencedView(),options:this.#e({...e?this.options:void 0,...r,context:this.getContextName(),pageReference:r.context?this._resolvePageRef(r.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new kd(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new $V(this)),this._actionsApi}getActionManager(){return w}doesContextExist(e){return Ud(e??this.getContextName())}getGoogleMapsAPIKey(){return gt.getGoogleMapsAPIKey()}getServerURL(){return gt.getServerURL()}getLoadingStatus(e){let r=null;return e?(r=W(e),r=r?r.context_data:null):r=this.getDataObject().context_data,r&&r.isLoading?r.isLoading:!1}clearErrorMessages(e){e?.property?dt({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?dt({type:"error",...e}):(dt({type:"error",...e,context:d.APP.APP}),dt({type:"error",...e,context:se(`${d.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Da(`${this.getPageReference()}.${d.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,r,n){delete e?.classID,this.replaceState(r,e),n?YL(e,r,this):Tj(this.getContextName(),`${this.getPageReference()}${r}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=$n.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,o=J.getContextPath(this.getPageReference(),n),i=r.getField(o);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,i),this.getActionsApi().triggerFieldChange(n,i),r.removeField(o,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){let r=this.getStateProps()?.value||e,n=J.getContextPath(this.getPageReference(),r);this._hasSuggestions=!1,$n.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"}),xa.getDependencies(this._contextName,n)?.forEach(i=>{$n.getSuggestionsContext(this.getContextName()).removeField(i,{actionPerformed:"ignored"})})}}getSelfReferencingDatapageKeys(){let e=[],r=this.getPropertyName(),n=this.getFieldMetadata(r),{datasource:{parameters:o={}}={}}=n||{};return Object.values(o).forEach(i=>{let[,s]=i.split("."),a=r?.split(".").pop();s===a&&e.push(i.substring(i.lastIndexOf(".")+1))}),e}isReadOnlyField(){let{value:e,datasource:r,listType:n}=this.getComponentConfig(),{propertyValue:o,propertyAnnotation:i}=this.getPropertyDetails(n,r,e);if(!o||typeof o!="string"||!(o.includes(i)||o.includes(d.ATTACHMENT_ANNOTATION)))return!1;let s=fe.getPropertyName(o),a=this.getFieldMetadata(s);if(!a)return!1;let c={...this.getComponentConfig(),fieldMetadata:a,template:this._rawConfig?.config?.template};return this.#t(c,s)}#t(e,r){let n=_r.isPropertyInternal(r),o=e.datasource,i=this.getComponentConfig().isSearchField,{isClassKey:s,isSpecial:a,isDeclarativeTarget:c}=e.fieldMetadata??{},l=e.template==="DataReference"||this.meta?.type==="ObjectReference",u=e.listType!==d.ASSOCIATED;return i?!1:!!(c||n||!o&&(s&&!l||a)&&u)}getPropertyDetails(e,r,n){return e===d.ASSOCIATED?{propertyValue:r,propertyAnnotation:d.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:d.PROPERTY_ANNOTATION}}updateConfigData(e,r,n){e.fieldMetadata=r,r.additionalInformation&&(e.additionalInformation=r?.additionalInformation),r.inputFormat&&typeof r.inputFormat!="string"&&(e.inputFormat=r.inputFormat),this.#t(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}))}#r(e){let r=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(cl.allowedComponetsForBulkProcessing[r]===!0||cl.allowedComponetsForBulkProcessing[r]?.[n]===!0)}};function ct(t){let e=new ea(t);return{getPConnect:()=>e}}function BV(t){SD=t}var AD=class t{_grammar;_state;_tree;_exprStr;_endState;_subParser;_position;constructor(e,r,n){this._grammar=e,this._state="expectOperand",this._exprStr=r||"",this._endState=n||{},this._subParser=null}static _setParent(e,r){Object.defineProperty(e,"_parent",{value:r,writable:!0})}_addToken(e){let r=i_[this._state],n=this._exprStr;if(this._exprStr+=e.element,r.subHandler){this._subParser||this._startSubExpression(n);let o=this._subParser?._addToken(e);o&&(this._endSubExpression(),this._state=o)}else if(r.operatorTypes?.[e.tokenType]){let o=r.operatorTypes[e.tokenType],i=CD[e.tokenType];i&&i.call(this,e),o.toState&&(this._state=o.toState)}else{if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}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){let{endStates:r}=i_[this._state];this._subParser=new t(this._grammar,e,r)}_endSubExpression(){i_[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,t._setParent(e,this._position)):this._tree=e,this._position=e}},s_=AD;var wse="literal",bD="identifier",$se=t=>typeof t=="object"&&t!==null&&"operationType"in t,_D={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t&&e},ID={operatorType:"binaryOperator",precedence:1,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:t||e},GV=(t,e,r)=>{let n=t==="",o=e===""||e===null||e===void 0;if(n&&o)return r;if(typeof e=="boolean"){let s=!n&&t!=="false"&&t!=="0"?!!t:!1;return r?s===e:s!==e}return n!==o?!r:r?t===e:t!==e},qV={">":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>e},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t>=e},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<e},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>t<=e},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!1:GV(t,e,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>typeof t=="object"||typeof e=="object"?!0:GV(t,e,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:t=>{let e=typeof t=="object"?t.value:t;return e==="true"||e==="false"?e!=="true":!e}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":_D,AND:_D,and:_D,"||":ID,OR:ID,or:ID,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).includes(String(e))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).includes(String(e))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).startsWith(String(e))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).startsWith(String(e))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(t).endsWith(String(e))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(t).endsWith(String(e))},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!t},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:t=>!!t},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>String(e).split(",").includes(String(t))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(t,e)=>!String(e).split(",").includes(String(t))}},Mse=(t,e,r)=>{if(typeof t.value!="string")return"";let n=t.value.substring(1),o=e?.getFieldMetadata(n)?.type??"";if(o)return o;let{pageReference:i,context:s}=r??{};if(!i||!s)return"";let a=J.resolveClassID(t.value,i,s),c=lt(n,a);return c&&!Array.isArray(c)?c.type??"":""},TD={BinaryExpression:function(e){let r=[],n=e.right,o=e.operator??"",i=e.left;if(!i)return!1;let s=typeof i.value=="boolean"?"True-False":"";r[0]=this.evaluateAST(i),!s&&i.operationType===bD&&(s=Mse(i,this._context,this._contextTreeNodeContext)),r[1]=n?this.evaluateAST(n,s):"";let a=this._grammar[o];return a?.evaluate?a.evaluate(r[0],r[1]):!1},identifier:function(e){let r=typeof e.value=="string"?e.value:"";if(this._localDataObject)return g.getIn(this._localDataObject,r?r.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return J.getLitePropertyValue(this._contextTreeNodeContext,r)??"";if(!this._context)return"";let n=this._context.getFieldMetadata(r)?.type??"",o=this._context.getValue(r)??"";if(n==="Decimal"&&typeof o=="string"){let i=parseFloat(o);return Number.isNaN(i)?"":i}return o},literal:function(e,r){return(r===void 0||r===""||r==="True-False")&&(e.value==="true"||e.value==="false")?e.value==="true":e.value??""},UnaryExpression:function(e){let r=e.operator,n=e.right;if(!r||!n)return!1;let o=this._grammar[r];return o?.evaluate?o.evaluate(n):!1}},CD={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){let r=String(e.value),{precedence:n}=this._grammar[r],o=this._position._parent,i=o?o.operator:null,s=i?this._grammar[i]:null,a=s?s.precedence:null;if(a&&n)for(;o?.operator&&a>=n;)this._position=o,o=o._parent;let c={operationType:"BinaryExpression",operator:r,left:this._position};s_._setParent(this._position,c),o?(this._position=o,this.setPositionInAST(c)):(this._tree=c,this._position=c)},identifier:function(e){let r={operationType:bD,value:e.value};this.setPositionInAST(r)},literal:function(e){this.setPositionInAST({operationType:wse,value:e.value})},subExpression:function(e){$se(e)&&this.setPositionInAST(e)}},i_={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:bD},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:CD.subExpression,endStates:{closeParenthesis:"expectBinOp"}}};var kse=["binaryOperator","unaryOperator","openParenthesis"],Lse=/^\s*$/,WV=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Use="literal",jse="identifier",zse=/\\\\/,Fse=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Vse=["[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]+)"],Bse=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,vD=class t{_grammar;_splitRegex;constructor(e){this._grammar=e}static _isNegative(e){return kse.some(r=>r===e[e.length-1].tokenType)}static _isWhitespace(e){return!!e.match(Lse)}static _createWordboundary(e){return e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e.match(WV)&&(e=`\\b${e}\\b`),e}static _unquote(e){let[r]=e,n=new RegExp(`\\\\${r}`,"g");return e.substr(1,e.length-2).replace(n,r).replace(zse,"\\")}_getSplitRegex(){if(!this._splitRegex){let e=Object.keys(this._grammar).sort((r,n)=>n.length-r.length).map(r=>t._createWordboundary(r),this);this._splitRegex=new RegExp(`(${[Fse.join("|"),e.join("|"),Vse.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){let r=this._getSplitRegex();return e.split(r).filter(n=>n.trim())}_createToken(e){let r={tokenType:Use,value:e,element:e};return e.startsWith('"')||e.startsWith("'")?r.value=t._unquote(e):e.match(Bse)?r.value=parseFloat(e):e==="true"||e==="false"?r.value=e==="true":this._grammar[e]?r.tokenType=this._grammar[e].operatorType:e.match(WV)&&(r.tokenType=jse),r}_getTokens(e){let r=[],n=!1;for(let o=0;o<e.length;o+=1)t._isWhitespace(e[o])?r.length&&(r[r.length-1].element+=e[o]):e[o]==="-"&&t._isNegative(r)?n=!0:(n&&(e[o]=`-${e[o]}`,n=!1),r.push(this._createToken(e[o])));return r}tokenize(e){let r=this._splitExpression(e);return this._getTokens(r)}},KV=vD;var RD=class{_grammar;_expression;_ast;_context;_contextTreeNodeContext;_localDataObject;constructor(e,r){this._grammar={...qV},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=r}buildAST(){let r=new KV(this._grammar).tokenize(this._expression),n=new s_(this._grammar);return n.addTokens(r),this._ast=n.buildAst(),this}evaluate(e,r){return this._context=e,this._contextTreeNodeContext=r,this.evaluateAST(this._ast)}evaluateAST(e,r){return YV(e.operationType,TD)&&TD[e.operationType].call(this,e,r)}},JV=RD;var PD=(t,e)=>{let r=/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,n=t.replace(r,o=>o.replace("=","=="));return new JV(n,e)},ND=t=>t?t.buildAST():!0,OD=(t,e,r)=>t?t.evaluate(e,r):!0,a_=(t,e,r)=>{let n=PD(t,e),o=ND(n);return OD(o,r)},YV=(t,e)=>t in e;var xD=class{static handleExpression(e,r,n,o){let i=this.getContext(e,o),a={actionObject:{action:"decexp",params:{source:e,value:r,targets:n},context:i}};gt.fetchData(a).then(c=>c.json()).then(c=>{this.updateState(c,o)}).catch(c=>console.log(c))}static getContext(e,r){let n=e.substring(0,e.indexOf(".")),o=J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pxObjClass")}`,null,r)||J.getPropertyValue(`${n}.${P.getDefaultQualifiedName("pyClassName")}`,null,r);return{name:n,class:o}}static updateState(e,r){Object.keys(e).forEach(n=>T({type:bt,payload:{context:r,reference:n,value:e[n]}}))}},ZV=xD;var c_={},QV=(t,e)=>c_[e]&&Object.hasOwn(c_[e],t),DD=t=>{let{context:e}=t;QV(t.reference,e)&&ZV.handleExpression(t.reference,t.value,c_[e][t.reference],e)},Jb=(t={})=>{g.copy(t,c_)},Hse=(t,e,r)=>a_(t,e,r?.pConnect.getPConnect());var $D=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},l_=$D;var Fd={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},Gse=5e3,qse=()=>{let t=Number(v.getFeatureMap()?.pyAutoSaveDurationInMS);return t>0?t:Gse},MD='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])',Wse=`${MD}, textarea, [contenteditable="true"]`,Ii=new Map,ms=new Map,d_=new Set,Rh=new Map,Ph=new Map,Vd=new Set,u_=(t,e)=>{Rh.get(t)?.forEach(r=>r(e))},Kse=t=>{let e=Ph.get(t);if(!(!e||e.size===0)){for(let[r,n]of e)ke.executeStateMachine(t,r,n,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||T(sa({reference:r,value:n,context:t,isImplicit:!1,skipDirtyValidation:!1}));Ph.delete(t)}},Jse=(t,e)=>{let r=t,n=r.includes(d.MODAL),o=oe(E.CASE_INFO.CASE_INFO_ID,null,r),i=oe(E.CASE_INFO.ASSIGNMENT_ID,null,r),a=oe(E.CASE_INFO.ACTIVE_ACTION_ID,null,r)||oe(E.CASE_INFO.ASSIGNMENTACTION_ID,null,r),c=oe(E.CASE_INFO.CASE_TYPE_ID,null,r),l=oe("isProcessAction","isProcessAction",r),u=w.getNextActionMgrId(),p={context:r,containerItemID:t,assignmentID:i,actionID:a,caseID:o,containerName:e,caseType:c,isModalAction:n,isFormValid:void 0,isProcessAction:l,saveOnly:!0,autosave:!0,actionMgrID:u},m,f,h=new Promise((S,A)=>{m=S,f=A});if(m&&f)w.register(u,h,m,f,yi,p,!0);else throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return Ct.executeOrQueueDeferredAction(sl(p)),h},p_=(t,e)=>{let r=ms.get(t);r!==void 0&&clearTimeout(r),ms.set(t,setTimeout(()=>{ms.delete(t),e()},qse()))},kD=t=>{let e=qe(t),r=te(e);return!r||!mr(r)?!0:se(r)===e},m_=async t=>{if(d_.has(t)||Vd.has(t))return;let e=Ii.get(t);if(!e||!kD(t))return;let r=typeof document<"u"?document.activeElement:null;if(r&&r===AU(t)&&r.matches(MD)){p_(t,()=>m_(t).catch(()=>{}));return}Kse(t);let n=!1;qb(!0);try{if(!rn.hasUnsavedChanges(t))return;n=rn.isFormValid(t)}finally{qb(!1)}if(!n){u_(t,Fd.SKIPPED);return}d_.add(t),u_(t,Fd.SAVING);try{await Jse(t,e.containerName),rn.clearChangedProperties(t),u_(t,Fd.IDLE)}catch{u_(t,Fd.ERROR)}finally{d_.delete(t)}},XV=()=>{if(!(typeof document>"u"||!document.activeElement?.matches(Wse)))for(let e of Ii.keys())ms.has(e)&&kD(e)&&p_(e,()=>m_(e).catch(()=>{}))},e6=XV,t6=t=>{t.key==="Tab"&&XV()},r6=t=>{let{target:e}=t;if(!(typeof Element>"u"||!(e instanceof Element)||!e.matches(MD)))for(let r of Ii.keys())ms.has(r)&&kD(r)&&(VS(r,e),p_(r,()=>m_(r).catch(()=>{})))},n6=t=>{let e=t?.data?.caseInfo?.settings?.autoSave;if(e!=null)return!!e;let r=t?.containerItemID??t?.context;if(r){let n=oe("caseInfo.settings.autoSave",null,r);if(n!=null)return!!n}return!1},fs=t=>Ii.has(t),o6=(t,e,r)=>{let n=Ph.get(t);n||(n=new Map,Ph.set(t,n)),n.set(e,r)},i6=(t,e)=>{Ii.size===0&&typeof document<"u"&&(document.addEventListener("pointerdown",e6,{passive:!0}),document.addEventListener("keydown",t6,{passive:!0}),document.addEventListener("input",r6,{capture:!0,passive:!0})),Ii.set(t,e)},f_=t=>{let e=ms.get(t);e!==void 0&&clearTimeout(e),ms.delete(t),d_.delete(t),Ii.delete(t),Vd.delete(t),Ph.delete(t),BS(t),Ii.size===0&&typeof document<"u"&&(document.removeEventListener("pointerdown",e6),document.removeEventListener("keydown",t6),document.removeEventListener("input",r6,{capture:!0}))},LD=t=>{let e=`${t}/`;for(let r of[...Ii.keys()])r.startsWith(e)&&f_(r)},s6=(t,e)=>{let r=Rh.get(t);return r||(r=new Set,Rh.set(t,r)),r.add(e),()=>{let n=Rh.get(t);n&&(n.delete(e),n.size===0&&Rh.delete(t))}},g_=t=>{let e=ms.get(t);e!==void 0&&(clearTimeout(e),ms.delete(t))},Bd=t=>{Ii.has(t)&&(Vd.has(t)||p_(t,()=>m_(t).catch(()=>{})))},a6=()=>Vd,c6=t=>{g_(t),Vd.add(t)},l6=t=>{Vd.delete(t),rn.hasUnsavedChanges(t)&&Bd(t)};var{APP:Yse}=d,hr={},wa={},$a={},d6=new Set([kt,Ze,et,Ko]),Zse=new Set([Tn,po,bt,oc,uo,ki,...d6]),Tu="You will lose unsaved changes. Do you want to continue?",_j="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Qse=(t,e,r)=>{let n=wa[e]||{};return Object.keys(n).forEach(o=>{let i=n[o].associatedProperty;Object.hasOwn(n,o)&&(i===void 0||r.has(i))&&g.buildObject(o,t,n[o].value)}),t},xc=(t=Yse.APP,e,r)=>{let n=hr[t]||{},o=wa[t]||{};if(Object.keys(n).length===0&&Object.keys(o).length===0)return{};let i=[],s=null;e||(i=Oc(t,!0)),r||(s=new Set(Oj(t)));let a=new Set(i),c={};return Qse(c,t,a),Object.keys(n).forEach(l=>{let u=!e&&a.has(l)||e;Object.hasOwn(n,l)&&u&&!s?.has(l)&&g.buildObject(l,c,n[l].value)}),c};var Nh=t=>{let{context:e}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;delete hr[e]?.[r],delete wa[e]?.[r]};$L((t,e)=>{Nh({context:t,reference:e});let r=e.lastIndexOf(".");r<1||r===e.length-1||dt({type:d.MESSAGES.MESSAGES_TYPE_ERROR,context:t,pageReference:e.slice(0,r),property:e.slice(r)})});var p6=t=>t&&$a[t],FT=t=>{t&&$a[t]&&($a[t]=!1)},u6=(t,e)=>{let{context:r,initialValue:n="",isStrictTracking:o,associatedProperty:i}=e,s=e.reference.startsWith(".")?e.reference.substr(1):e.reference;t[s]?t[s].previousValue=oe(e.reference,null,r):(t[s]={initialValue:n||oe(e.reference,null,r)},t[s].previousValue=t[s].initialValue),t[s].value=e.value,i&&(t[s].associatedProperty=i),o&&t[s].value===t[s].initialValue&&Nh(e)},m6=t=>{let{payload:e}=t,{context:r}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;Ie.isFieldExists(r,n)||(wa[r]=wa[r]||{},u6(wa[r],e)),hr[r]=hr[r]||{},u6(hr[r],e)},f6=(t,e,r)=>{let n=hr[t]||{},o;r instanceof Set?o=r:r&&r.length>0&&(o=new Set(r)),Object.keys(n).forEach(i=>{o?.has(i)||g.hasIn(e,i)&&(n[i].value=g.getIn(e,i))})},Oh=t=>{let e=hr[t];if(!e)return{};let r={};return Object.keys(e).forEach(n=>{r[n]=e[n].value}),r},HV=({value:t,context:e,reference:r})=>{let n=te(e),o=We(n,e)||{};if(l_.isPageInstruction(r)||o?.subscriptFieldName)return;let i=r?.startsWith(".")?r?.substr(1):r;hr[e]=hr[e]||{},hr[e][i]||(hr[e][i]={initialValue:oe(i,null,e)}),hr[e][i].value=t},Or=t=>t&&hr[t]&&Object.keys(hr[t]).some(e=>hr[t][e].initialValue!==hr[t][e].value)||!!p6(t),UD=(t,e)=>{if(!(t&&e))return!1;let r=hr[t]&&hr[t][e];return r?r.previousValue!==r.value:!1},Xse=()=>Object.keys(hr).some(t=>Or(t)),vu=t=>{t&&hr[t]?(hr[t]={},wa[t]={}):t==="all"&&(hr={},wa={},$a={}),$a[t]&&($a[t]=!1),BS(t)},g6=(t,e,r=new Set)=>{if(r.has(e))return;r.add(e);let n=xa.getDependencies(t,e),o=Cr.getResetDependencies(t,e);[...n,...o].forEach(i=>{let s=g.getPropertyNameFromDependency(i);if(typeof i=="object"&&i.mode==="multiRecord"){let a=s.split("."),c=`.${a.pop()}`,l=a.join(".");ke.isStateMachineExist(t,l,c)?ke.getStateMachine(t,l,c).deleteAll():fs(t)&&(ke.setStateMachine(t,c,l,new yc(c,l,t)),ke.getStateMachine(t,l,c)?.deleteAll(!1))}else l_.isPageInstruction(s)&&ke.executeStateMachine(t,s,""),T({type:bt,payload:{reference:s,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}});g6(t,s,r)})},eae=t=>{let{context:e,pageReference:r,value:n,reference:o}=t;Cr.triggerCascade(e,o,n);let i=xa.getDependencies(e,o),s={context:e,datapages:{}};g6(e,o),i.forEach(a=>{let c=r;a.startsWith(r)||(c="");let l=a.replace(`${c}`,"").split(".").filter(_=>!!_);l.pop();let u=l.join("."),p=oe(`.${u}`,c,e)?.classID||t.classID,m=lt(a.split(".").pop(),p),{datasource:f}=m,h={},S=[];f.parameters.forEach(_=>{_?.value?(h[_.name]=_r.isProperty(_.value)?oe(`.${g.getFullPropertyReference([u,g.getPropertyName(_.value)])}`,c,e):_.value,h[_.name]===void 0||h[_.name]===null||h[_.name]===""?(h[_.name]="",S.push(d.NULL_STRING)):S.push(h[_.name])):(h[_.name]="",S.push(d.NULL_STRING))});let A=f.name.concat(d.UNDERSCORE_STRING,g.getHashedString(S.join(d.HASH_DELIMITER))),{name:C}=f,I=Ur(C);s.datapages[A]={mode:f.mode,propertyName:a,name:f.name,dataViewParameters:h,refreshStrategy:I?.refreshStrategy}}),i.length&&T({type:iS,payload:s})},tae=()=>t=>e=>{let{type:r,payload:n={}}=e||{};if(!r||!Zse.has(r)){t(e);return}if(r===Tn&&(DD(n),eae(n),Ct.registerBlockingAction(n.context).catch(()=>{}),setTimeout(()=>{Dm()?!Ai.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)&&(UD(n.context,n.reference)||Am(n.context))&&Iu(n):((UD(n.context,n.reference)||Am(n.context))&&Iu(n),Ai.triggerRefreshForType("PROP_CHANGE",n.reference,n.context)),Ct.deRegisterBlockingAction(n.context).catch(()=>{})},0)),r===po&&!n?.isDefault){let{context:o,referenceList:i,c11nEnv:s,listIndex:a,instruction:c,skipDirtyValidation:l=!1,skipRefresh:u=!1}=n;a===0&&c==="INSERT"&&s&&rj(s),u||setTimeout(()=>{Ai.triggerRefreshForType("PROP_CHANGE",i,o)||Iu({context:o,pageReference:i})},0),l||($a[`${o}`]=!0)}if(r===bt||r===oc){let{reference:o,isImplicit:i,context:s,skipDirtyValidation:a=!1}=n;Ie.updateFieldNodeValue(s,o,n.value),!l_.isPageInstruction(o)&&!a?m6(e):a||($a[`${s}`]=!0),(n.removePropertyFromChangedList||i)&&Nh(n)}if(r===uo||r===ki){let{transientItemID:o,data:i}=n;g.iterateLeafNodes(i,s=>{Nh({context:o,reference:s.join(".")})})}r&&d6.has(r)&&(vu(n.context),Cr.purgeResetDependencies(n.context),X2(n.context),(n.childContainersContexts||[]).forEach(s=>{vu(s)}),(n.transientItems||[]).forEach(s=>{vu(s)})),t(e)},h6={propertyChangeMiddleware:tae,getChanges:xc,recordChange:m6,isDirty:Xse,isPropertyDirty:UD,isContextDirty:Or,resetChangedProperties:vu,deleteRecordedChange:Nh,isComplexObjectMerged:p6,resetComplexObjectDirtyStatus:FT};var jD=class{getCoreheaders(e){let r=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${d.PRIMARY}`,n=se(r),o=pe(n),i=J.getProperty(d.COREHEADERS,"",o);if(i&&e in i)return i[e]}},y6=new jD;var xh={defaultLimit:16},FD={SINGLE:"single",MULTIPLE:"multiple"},ge={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},zn=()=>De()?.getState()?.containers;function ot(t){return typeof t=="string"&&t.trim()!==""}var ut=t=>ot(t)?De()?.getState().containers[t]:null,jd=(t,e,r)=>{if(!r)return{continueExecution:!1,containerItemID:t};let n=ut(r),o=!1,i=t;return n?.accessedOrder.forEach(s=>{e===n.items[s].key&&(o=!0,i=n.items[s].context)}),{continueExecution:o,containerItemID:i}},We=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[t];return n&&n.items&&n.items[e]||null},LT=t=>ot(t)?De()?.getState().containers[t]?.items:null,Hd=t=>ot(t)?De()?.getState().containers[t]?.accessedOrder||[]:[],rae=t=>ot(t)&&Hd(t)?.length>0||!1,ll=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let o=zn()?.[t],i=o&&o.items||null,s=r||((a,c)=>a===c);if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return!0}return!1},VD=t=>{let{containers:e}=De()?.getState()||{};return!e||!ot(t)?!1:Object.keys(e).some(r=>e[r]?.accessedOrder?.includes(t))},wt=(t,e,r)=>{if(!ot(t)||!ot(e))return null;let o=zn()?.[t],i=o&&o.items||null,s=r||((a,c)=>a?.toLowerCase()===c?.toLowerCase());if(e&&i){for(let a of Object.keys(i))if(s(e,i[a].key))return a}return null},nae=(t,e)=>{let r=(n,o)=>n?.toLowerCase()===o?.toLowerCase();if(t&&e){for(let n of Object.keys(e))if(r(t,e[n].key))return e[n]}return null},oae=t=>{if(!ot(t))return null;let e=zn()??{};for(let r of Object.keys(e))if(e[r]){let o=e[r].items??null,i=nae(t,o);if(i)return i}return null},Ch=(t,e)=>{if(!ot(t)||!ot(e))return!1;let r=zn();return r&&Object.hasOwn(r,`${t}/${e}`)},iae=(t,e)=>{if(!ot(t)||!ot(e))return null;let n=zn()?.[`${t}/${e}`];return n&&n.type},se=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n;e=o&&o.length>0?o[o.length-1]:null}return e},sae=(t,e,r)=>{if(!ot(t)||!ot(e))return!1;let n=wt(t,e,r);return n?n===se(t):!1},S6=(t,e)=>{let r=null,n=zn();if(!n)return null;for(let o of Object.keys(n))if(n[o].items){let i=n[o].items[t];if(i?r=i[e]:r=null,r)break}return r},pe=t=>ot(t)?S6(t,"context"):null,Ar=t=>{if(!ot(t))return null;let e=null,r=zn();if(r&&r[t]){let n=r[t],{accessedOrder:o}=n,i=o&&o.length>0?o[o.length-1]:null;e=pe(i)}return e},Au=t=>{if(!ot(t))return[];let e=t.endsWith("/")?t:`${t}/`,r=[],n=!1,o=zn();if(!o)return[];let i=s=>{let a=[];return Object.keys(s).forEach(l=>{l.startsWith(e)&&l!==e&&a.push(l),l===t&&(n=!0)}),a};for(let s of Object.keys(o))if(o[s].items){let a=i(o[s].items);a&&a.length>0&&(r=r.concat(a)),r=r.sort()}return n?r:[]},Ke=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&e.push(o);return e},wo=t=>{if(!ot(t))return[];let e=[],r=zn();if(!r)return[];let n=`${t}${d.FORWARD_SLASH_STRING}`;for(let o of Object.keys(r))o.startsWith(n)&&(Hd(o)||[]).forEach(s=>{pe(s)!==t&&e.push(pe(s))});return e},Dh=t=>{let e=[...wo(t),t],r=[],n=De()?.getState().data||{};return e.forEach(o=>{Object.hasOwn(n,`${o}/${d.SUGGESTION}`)&&r.push(`${o}/${d.SUGGESTION}`)}),r},It=t=>ot(t)?t&&ut(t)&&ut(t).type===FD.SINGLE:null,mr=t=>ot(t)?t&&ut(t)&&ut(t).type===FD.MULTIPLE:null,jr=t=>ot(t)&&ut(t)&&ut(t).items&&Object.keys(ut(t)?.items).length>0||!1,E6=t=>t&&xh[t]?xh[t]:xh.defaultLimit,aae=(t,e=xh.defaultLimit)=>{ot(t)&&(xh[t]=e)},UT=t=>{if(!ot(t))return!1;let e=!1,r=ut(t),{items:n={}}=r,o=Object.keys(n),i=E6(t);return o&&o.length>0&&o.length>=i&&(e=!0),e},Dc=t=>{if(!t||!ot(t.name)||!ot(t.context))return null;let e=t?.name,r=`${t?.context}/${e}`,n=ut(r),o=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map(a=>n?.items[`${a}`]?.context)||[],i=Ke(`${d.APP.APP}/${d.PREVIEW}`),s=wo(`${d.APP.APP}/${d.PREVIEW}`);return{context:t?.context,name:e,containerItems:[...o,...s],childContainers:i}},wh=t=>{if(!ot(t))return!1;let e=pe(t);return Or(e)||MT(t)},jT=t=>{if(!ot(t))return null;let e,r=ut(t),{accessedOrder:n=[]}=r;for(let o=0;o<n.length;o+=1){let i=n[o];if(!wh(i)){e=i;break}}return e},te=t=>{if(!ot(t))return null;let{containers:e}=De()?.getState()||{};if(e){for(let n of Object.keys(e))if(e[n]?.accessedOrder?.includes(t))return n}let r=t.lastIndexOf(d.UNDERSCORE_STRING);return t.slice(0,r)},ta=async(t,e={})=>{if(!ot(t))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));let r=te(t),n=pe(t),{skipDirtyCheck:o}=e,i=!0,s=[];if(wh(t)&&!o&&(Nn.disableLoadingIndicator({context:n}),i=await oi.confirm(Nr().getLocaleValue(Tu,"Messages")),Nn.enableLoadingIndicator({context:n})),i){let{accessedOrder:a=[],items:c={},type:l}=ut(r);s=a.filter(S=>S!==t);let u=s[s.length-1],p=c[u]||{},{semanticURL:m=d.FORWARD_SLASH_STRING,context:f}=p;r?.includes(ge.MODAL)||(s.length>0&&m&&m!==d.FORWARD_SLASH_STRING?qi({directUrlUpdation:!0,semanticURL:m,options:{containerItemID:u,context:f}}):qi({directUrlUpdation:!0,semanticURL:d.FORWARD_SLASH_STRING,options:{}})),T(Qe({containerItemID:t,context:n,target:r,containerInfo:{newAccessedOrder:s,containerType:l},...e.eventName!==void 0?{eventName:e.eventName}:{}}))}return{newAccessedOrder:s,removeItem:i}},BD=(t,e,r,n)=>{let o="root",i=lr(e,o,!0),s=Z(e,o),a={root:t,containerItemID:i,context:n?"app":i,target:s,containerName:e},c={data:r,context:n?"app":i},l=[Pt(a)];l.push(Re(c)),T(l)},cae=(t,e,r)=>{let n=Hd(t);n=n.filter(i=>i!==e);let o=!1;for(let i=0;i<n.length;i+=1)if(pe(n[i])===r){o=!0;break}return o},HD=t=>{if(!ot(t))return!1;let e=zn(),r=pe(t),n=e?Object.keys(e):[],o=!1;for(let i=0;i<n.length&&(o=cae(n[i],t,r),!o);i+=1);return o},Ei=t=>{Array.isArray(t)||(t=[t]);let e=zn()||{};return t.map(r=>{let n=te(r);return g.getIn(e,[n,"items",r,"transientItems"])||[]}).flat()},lae=t=>{let{transientItemID:e,data:r,options:n}=t,o=g.deepClone(De()?.getState().data[e]);n?.reset&&g.iterateLeafNodes(o,i=>{i[i.length-1]!=="classID"&&g.setIn(o,i,"")}),T(_h({transientItemID:e,data:g.mergeDeep(r,o)}))},uae=t=>{let{transientItemID:e,data:r}=t;T(ZD({transientItemID:e,data:r}))},dae=t=>{let e=g.deepClone(De()?.getState().data[t]);g.iterateLeafNodes(e,r=>{r[r.length-1]!=="classID"&&g.setIn(e,r,"")}),T(YD({transientItemID:t,data:e}))},A6=t=>{let e=g.deepClone(De()?.getState().data[t]);g.iterateLeafNodes(e,r=>g.setIn(e,r,"")),T(QD({transientItemID:t,data:e}))},pae=t=>{De()?.getState().data[t]&&A6(t);let e=t.lastIndexOf("/"),r=e>0?t.substring(0,e):t,n=te(r);T(Ih({transientItemID:t,containerItemID:r,target:n}))},zD=class{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){let r=this?.items?.indexOf(e);r!==void 0&&r!==-1&&this.items.splice(r,1)}},mae=(t,e={})=>{if(!ot(t))return;let r=ut(t),n=Array.isArray(r?.accessedOrder)?r.accessedOrder:[];if(n.length===0)return;let{remove:o,keep:i}=e,s;if(i!==void 0){let a=new Set(i);s=n.filter(c=>!a.has(c))}else if(o!==void 0){let a=new Set(o);s=n.filter(c=>a.has(c))}else s=[...n];for(let a of s){let c=pe(a),l=Ei(a);T(Qe({containerItemID:a,context:c,target:t,...l.length>0&&{transientItems:l}}))}},h_=()=>zD,GD=t=>{let e={containerName:t};e.childContainers=Ke(t),T({type:eS,payload:e})},qD=(t,e)=>{let r=Au(t),{key:n}=We(te(t),t),o=[];r.forEach(i=>{let{key:s}=We(te(i),i);if(s===n){let a={data:{caseInfo:{headers:{etag:e}}},target:te(i),context:i};o.push({type:Er,payload:a})}}),o.length&&T(o)},WD=(t,e)=>{let r=[],n={data:{caseInfo:{headers:{etag:e}}},target:te(t),context:t};r.push({type:Er,payload:n}),r.length&&T(r)},zo=()=>v.isPortalLoaded?"app":"root",fae=()=>y6,KD=(t,e)=>{let r={data:{caseInfo:{lastUpdateTime:e}},target:te(t),context:t};T({type:Er,payload:r})},JD=(t,e)=>{let r=wt(t,e),n=wt(`${r}/workarea`,e);return pe(n)},uE=t=>ot(t)?S6(t,"parentContext"):null,gae=t=>{let{accessedOrder:e}=t;return e&&e.length>0?e[e.length-1]:""},Oa=t=>{if(t&&typeof t=="string"){let e=t.split("/");return e.pop(),e.join("/")}return null},hae=()=>YC;var C6=t=>{typeof window>"u"||(window.document.title=t)},_6=(t,e)=>(t!==void 0&&(t.options=e),{stateObj:t}),I6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.pushState(t,e,r),window.scrollTo(0,0)}catch{throw new Error("Error- Unable to Add to Browser History")}},b6=(t,e,r)=>{if(!(typeof window>"u"))try{window.history.replaceState(t,e,r)}catch{throw new Error("Error- Unable to Replace Browser History")}},T6=t=>t.state?.type==="ui-navigation"?($.publish(E.PUB_SUB_EVENTS.URL_NAVIGATION,t.state),null):t.state?t.state.stateObj:null,v6=t=>{typeof window>"u"||window.addEventListener("popstate",e=>t(e))},R6=()=>{typeof window>"u"||(window.onbeforeunload=()=>null)},Gd=()=>typeof window>"u"?"":ni(window.location.pathname),y_=()=>typeof window>"u"?"":ni(window.location.pathname+window.location.search);var P6=()=>typeof window>"u"?"":window.location.search,$h=(t,e,r)=>{switch(r){case"warning":e?console.warn(t,e):console.warn(t);break;case"error":e?console.error(t,e):console.error(t);break;default:e?console.log(t,e):console.error(t)}};var XD=class{routingInfo;appRoutes;appRoutesMeta;appName;appAlias;orgName;reqContextName;reqServletPath;defaultViewUrlPath;staticRoutePage;defaultClassName;staticRoutesList=[];dynamicRoutesList;appDelimeter;reqServletNameReal;bDefaultPortal;portalName;ignoreFromEndPoint;constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,r)=>{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=r,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(n=>{$o(n)?this.dynamicRoutesList?.push(n):this.staticRoutesList?.push({[n]:e[n]})})};_getDynamicKeyName=e=>{let r=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(r,n)};isDefaultPortal=()=>`${this.bDefaultPortal}`!="false";getPortalName=()=>this.portalName;getApplicationPath=()=>ni(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>ni(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,r)=>{r&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));let n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),e.startsWith("/")&&Yi()&&v.getRenderingMode()!=="PREVIEW"&&this.setDefaultClassName(""),ni(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach(r=>{e.includes(r)&&(e=e.substring(0,e.indexOf(r)))}),e}getRouteDetails=(e,r)=>{if(!r)return this.appRoutes[e];let n="",o={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach(i=>{let s=this.appRoutes[i];s&&s.payload&&s.payload.page===e&&(n=s.routeKey,o={...s.payload})}),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,o={...this.appRoutes[e].payload}),{routeKey:n,payload:o}};transformRemoteCasePayload(e){let{caseClassName:r,caseID:n}=e;if(!ae.isRemoteCase(r))return e;let{RemoteClassGroup:o,RemoteSystemID:i}=ae.getRemoteCase(r??"");return{...e,caseID:n?.replace(r??"",o?.toUpperCase()),RemoteSystemID:i}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);let r=Yi(),n=this.processUrl(e,!0),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0);o||(n=this.processUrl(this.defaultViewUrlPath,!r),o=this._getMatchedRouteInRoutingTable(n,r?this.defaultClassName:void 0)||"");let{routeKey:i,payload:s}=this.getRouteDetails(o,r);if(!this.appRoutesMeta?.[i]?.restApi)return null;let{reqType:a,endPoint:c,params:l}=this.appRoutesMeta[i].restApi,u=this.transformRemoteCasePayload(s),p={routeKey:i,requestType:a,routeEndpoint:c,payload:{...l,...u}};return this._resolveRoute(p,this.processUrl(e,!1),o)};getSemanticURL(e,r,n){return this.buildSemanticURL(e,r,n)}getResolvedSemanticURL(e,r,n={},o){let i=this.getSemanticURL(e,r,n),s=i;$o(i)&&i.match(Ic)?.forEach(u=>{let p=this._getDynamicKeyName(u);n[p]&&(s=s.replace(u,String(n[p])))});let a=x6(s,o),c=new URL(a);return!this.isDefaultPortal()&&this.getPortalName()&&!s2(c.searchParams)&&c.searchParams.append("portal",this.getPortalName()),o&&!c.searchParams.has("lang")&&c.searchParams.append("lang",o),bc(c.toString())}buildDocumentTitle(e,r,n){let o=n??"";return v.getCaseLabelFirstInTitle()?e&&r?`${e} (${r}) - ${o}`:o:e&&r?`${r}: ${e} - ${o}`:o}updateSemanticURLAndDocumentTitle(e,r){let n=/{.+?}/,{key:o,actionName:i,caseClassName:s,isRemoteCase:a,name:c}=e;if(a&&!s)return;let l=this.getSemanticURL(i,{caseClassName:s}).replace(n,String(er(o))),u=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,p={semanticURL:l,directUrlUpdation:!0,options:{acName:u,context:Ar(u)}},m=Gd();l&&!m.includes(l)&&O6(p,r);let f=o.substring(o.lastIndexOf(" ")+1),h=v.environmentInfoObject?.pxApplication?.pyLabel,S=this.buildDocumentTitle(c,f,h);D6(S)}buildSemanticURL(e,r,n){let{urlPattern:o}=this.appRoutesMeta?.[e]||{},i=o?.split("/").length,s=o?.split("/");this.setDefaultClassName(r?.pageClass||this.defaultClassName);let a=Object.keys(this.appRoutes).filter(l=>i===l.split("/").length).filter(l=>{let u=l.split("?")[0].split("/");return s?.every((p,m)=>p.startsWith("{")||p===u[m])});if(a.length===1)return this._getQueryParamsResolvedURL(a[0],n);if(Object.keys(r).length===0)return"";let c=a.find(l=>{let u=this.appRoutes[l].payload,p={...n};delete p.dataViewName,delete p.dataContext;let m=u.dataViewKeys||u.dataContextParameters||{},f=Object.keys(r).every(h=>r[h]===u[h]);return f?!g.isEmpty(m)&&!g.isEmpty(p)?Object.keys(p).every(h=>Object.hasOwn(m,h)):f:!1});return c?this._getQueryParamsResolvedURL(c,n):a.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,r,n=!1){let[o,i]=e.includes("?")?e.split("?"):[e];if(i&&r&&Object.keys(r).length>0){let s={};for(let[u,p]of Object.entries(r))s[u.toLowerCase()]=p;let a=new URLSearchParams(i),c={};for(let[u,p]of a.entries())if(typeof p=="string"&&$o(p)){let m=this._getDynamicKeyName(p),f=m.toLowerCase(),h=n?s:r,S=n?r[m]??h[f]:h[m];S!=null&&(c[u]=S)}else typeof p=="string"&&(c[u]=p);let l=new URLSearchParams(Object.entries(c).map(([u,p])=>[u,String(p??"")]));return`${o}?${bc(l.toString())}`}return o}_getQueryParamsObject(e){let r={};if(!e)return r;for(let n of e.split("&")){let o=n.indexOf("=");if(o!==-1){let i=n.slice(0,o),s=n.slice(o+1);try{r[decodeURIComponent(i)]=decodeURIComponent(s)}catch{r[i]=s}}}return r}getRestEndPoint(e,r){try{return this._buildRestApi(e,r)}catch(n){return console.error(n),null}}_buildRestApi(e,r){if(e&&this.appRoutesMeta?.[e]){let{reqType:n,body:o,params:i}=this.appRoutesMeta[e].restApi,{endPoint:s}=this.appRoutesMeta[e].restApi;r?.params&&r.params.pageName&&(s=`${s}&pageName=${r.params.pageName}`);let a=s.match(Ic);if(a)for(let c=0;c<a.length;c+=1){let l=a[c].replace("{","").replace("}",""),u=new RegExp(a[c],"g");s=s.replace(u,()=>r?.[l]??i?.[l])}if(o){let c={};return Object.keys(o).forEach(u=>{if(r&&this._isSpecialInstruction(u)){let p=o[u];Array.isArray(p)&&p.every(m=>typeof m=="string")&&(c={...c,...this._processInstruction(u,p,r)})}}),{restApi:s,reqType:n,body:c}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,r,n){let o={};return e==="@COPY"&&r.forEach(i=>{o[i]=n?.[i]}),o}doesRestApiExist(e){return!!(this.appRoutesMeta&&this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,r,n,o)=>{if(!e)return;let i=r.indexOf("?"),s=i!==-1?r.substring(i+1):void 0;if(s){let a=`${n.join("/")}?${s}`;return this._getQueryParamsResolvedURL(a,o,!0)}};_resolveRoute=(e,r,n)=>{let o=[],[i,s]=r.includes("?")?r.split("?"):[r],[a,c]=n.includes("?")?n.split("?"):[n],l=i.split("/"),u=a.split("/"),p={};for(let C=0;C<u.length;C+=1)if(o[C]=u[C],$o(u[C])){let I=this._getDynamicKeyName(u[C]);p[I]=l[C],o[C]=l[C]}let m=this._getQueryParamsObject(c),f=this._getQueryParamsObject(s),h={};for(let[C,I]of Object.entries(f))h[C.toLowerCase()]=I;for(let C of Object.keys(m))$o(m[C])?p[C]=f[C]||h[C.toLowerCase()]:p[C]=m[C];let S=this._resolveMatchedRouteQueryParams(s,n,o,f),A=this._resolvePayload(e,p,n);return{...this._resolveRouteEndPoint(A,n),urlPath:S||o.join("/")}};_resolveRouteEndPoint=(e,r)=>{let{routeEndpoint:n}=e;if(!$o(n))return e;let o={};if(o[r]=e,e.payload!==void 0){let i=n.match(Ic);for(let s=0;s<i.length;s+=1){let a=i[s],c=this._getDynamicKeyName(a);if(e.payload[c]!==void 0){let l=e.payload[c];n=n.replace(a,l)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in routeEndpoint- ${c} is missing in payload`,o)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",o);return{...e,routeEndpoint:n}};_resolvePayload=(e,r,n)=>{if(typeof e.payload>"u")return e;let o={};o[n]=e;let i={...e.payload,...this._resolvePayloadRecursive(e.payload,r)};return{...e,payload:i}};_resolvePayloadRecursive(e,r){if(Array.isArray(e))return e.map(o=>this._resolvePayloadRecursive(o,r)).flat();let n={};for(let o of Object.keys(e)){let i=e[o];if(typeof i=="string"&&$o(i)){let s=i.match(Ic)??[];for(let a of s){let c=this._getDynamicKeyName(a);r[c]!==void 0?i=i.replace(a,r[c]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${c}} in payload - {${c}} is missing in semantic url construct`)}n[o]=i}else i&&typeof i=="object"?n[o]=this._resolvePayloadRecursive(i,r):n[o]=i}return n}_getMatchedRouteInRoutingTable=(e,r)=>{let[n]=e.includes("?")?e.split("?"):[e],o=this._findMatchedRouteInStaticList(n,r);if(o!==void 0||(o=this._findMatchedRouteInDynamicList(e),o!==void 0))return o};_findMatchedRouteInStaticList=(e,r)=>{if(!this.staticRoutesList||!e)return;let n=e.toLowerCase(),o=r?.toLowerCase();if(Yi()){let i=this._findMatchingRouteByClass(n,o);if(!i)return;let a=Object.values(i)[0]?.payload?.page||"";return this.setStaticRoutePage(a),Object.keys(i)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,r)=>{if(this.staticRoutesList)return this.staticRoutesList.find(n=>Object.entries(n).some(([o,i])=>{if(!i)return!1;let s=i.payload?.page?.toLowerCase(),a=i.payload?.pageClass?.toLowerCase(),c=s===e||o.toLowerCase()===e;return r?c&&a===r:c}))};_findInStaticList=e=>{if(!this.staticRoutesList)return;let r=this.staticRoutesList.find(n=>Object.keys(n)[0].toLowerCase()===e);return r?Object.keys(r)[0]:void 0};_findMatchedRouteInDynamicList=e=>{let[r,n]=e.includes("?")?e.split("?"):[e],o=r.split("/");return this.dynamicRoutesList?.find(i=>{let[s,a]=i.includes("?")?i.split("?"):[i],c=s.split("/");if(c.length!==o.length)return!1;let l=0;for(l=0;l<c.length;l+=1){let u=c[l].toLowerCase();if(!$o(u)&&u!==o[l]&&n2(u)!==o[l])return!1}if(a){let u=new URLSearchParams(n.toLowerCase()),p=new URLSearchParams(a.toLowerCase()),m=new Set,f=new Set,h=/\{[a-zA-Z]+\}/;for(let S of u.keys())m.add(S);for(let S of p.keys())f.add(S);if(f.size!==m.size)return!1;for(let S of m){if(!f.has(S))return!1;let A=p.get(S);if(u.get(S)!==A&&!h.test(A??""))return!1}}return!0})};_sendWarningAndErrorMessages=(e,r)=>{$h(e,r,"warning"),$h("Error in Generated Routing Table",null,"error"),$h("Back | Forward for this page may NOT work as intended",null,"warning"),$h("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},yae=new XD,_e=yae;var ew=class{environmentInfoObject;isPortalLoaded;pageName;KeyMapping;isAssignmentHeaderHidden;coexistenceMeta;brandingInfo;brandingInfoDark;themeOverrides;darkThemeOverrides;locale;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;isWebEmbed;caseLabelFirstInTitle;nav;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){let r=e?.pxOperator?.pyUserName,n=r?g.decodeHtmlEntities(r):void 0,o={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=o;let i=this.environmentInfoObject?.features||g.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...i,granularUIRefresh:i.granularUIRefresh||i.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,P.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);let s=e.requestContext;if(Array.isArray(s)&&s.length>0){let a=s.filter(c=>c.IncludeInURL).map(c=>c.Key);a.length>0&&S_(a)}us.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}isAnonymousUser(){return this.environmentInfoObject?.isAnonymousUser===!0}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 _e.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 e?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}setTheme(e,r){return r?.type==="dark"?this.darkThemeOverrides=e:this.themeOverrides=e,$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),r?.type==="dark"?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.nav?.orientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.nav={...this.nav,orientation:e},$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.nav.orientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===d.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="Infinity"}isSdkRuntime(){return this.environmentInfoObject?.pyExecutionRuntimeName==="SDK"}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return e?.type==="dark"?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,r){return r?.type==="dark"?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){let n=e.replaceAll("-","_").split("_").slice(0,2);this.locale=n.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(d.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(){let e=Reflect.get(globalThis,"pms");if(typeof e!="object"||e===null)return!1;let r=Reflect.get(e,"plugins");return typeof r=="object"&&r!==null&&(!!Reflect.get(r,"c11n_spa")||!!Reflect.get(r,"c11n"))}isOfflineEnabled(){return typeof navigator<"u"&&(navigator.userAgent||"").includes("pxUsesOffline")}shouldUseURLParams(){return this.environmentInfoObject?.renderingMode==="FULL_PORTAL"&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){br.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){let r=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...r,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}getFeature(...e){if(e.length!==0)return g.getIn(this.getFeatureMap(),e)}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){let r=this.KeyMapping[e];return r!==void 0?r: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}isOpenCasePageAfterCreateInMultiDocEnabled(){return this.getFeatureMap().pyOpenCasePageAfterCreateInMultiDoc||!1}getCaseTypeList(){return this.environmentInfoObject?this.environmentInfoObject?.pyCaseTypeList||[]:[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){let e=this.getFeatureMap().pyLocalizationVersion,r=this.getFeatureMap().localizationVersion;return r!==void 0?r:e!==void 0?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return us.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(){let e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e&&Number(e)}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return typeof window<"u"&&window.document?"Browser":"Native"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(r=>r.pyClassName===e).map(r=>r.pyActionName)??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter(r=>r.pyClassName===e).map(r=>r.pyViewName)??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}setNavAlignment(e){return this.nav?.alignment===e||(this.nav={...this.nav,alignment:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavAlignment=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_ALIGNMENT_CHANGE,e)),e}getNavAlignment(){return this.nav?.alignment??this.environmentInfoObject?.pyNavAlignment}setNavPosition(e){return this.nav?.position===e||(this.nav={...this.nav,position:e},this.environmentInfoObject&&(this.environmentInfoObject.pyNavPosition=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.NAV_POSITION_CHANGE,e)),e}getNavPosition(){return this.nav?.position??this.environmentInfoObject?.pyNavPosition}getMultiStepNavDisplay(){return this.environmentInfoObject?.pyMultiStepNavDisplay??void 0}setMultiStepNavDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyMultiStepNavDisplay=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.MULTI_STEP_NAV_DISPLAY_CHANGE,e)}getCaseStageDisplay(){return this.environmentInfoObject?.pyCaseStageDisplay??void 0}setCaseStageDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyCaseStageDisplay=e),$.publish(d.PUB_SUB_EVENTS.UI_EVENTS.CASE_STAGE_DISPLAY_CHANGE,e)}},v=new ew;var Sae=t=>t.status==="fulfilled",Eae=async t=>{let e=v.getAvailableLocalePacks(),r=v.getLocalizationBundles(t),n;if(t&&e&&e.includes(t)?n=[ve("getLocalizationPack",{queryPayload:{locale:t}})]:r.length>0&&(n=r.map(c=>ve("getLocalizationPack",{queryPayload:{version:c.pyBundleVersion,bundle:c.pyBundleName}}))),!n||n.length===0)return;let o=200,i=201,s=await Promise.allSettled(n),a=Ci(t??"en-US");s.filter(Sae).forEach(({value:c})=>{if([o,i].includes(c.status)&&c.data){let l=c.data;Object.keys(l).forEach(u=>{a.setLocaleForRule(l[u],u)})}})},Aae=async(t=v.getLocale())=>{try{await Eae(t)}catch(e){console.warn(e)}},qd=Aae;var tw=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1),[a,c]=this.getKeyAndValue(s);this.addKeyToMap(a,c),n+=`${s.split(":")[0]}}`,r=i+1}return n}static getKeyAndValue(e){let r=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,r)}}`,e.substring(r+1,n)]}static addKeyToMap(e,r){this.keyMap[e]=r}static replaceWithValue(e){let r=0,n="";for(;r<=e.length;){let o=e.indexOf("{@P ",r);if(o===-1){n+=e.substring(r,e.length);break}n+=e.substring(r,o);let i=e.indexOf("}",r),s=e.substring(o,i+1);n+=this.keyMap[s],r=i+1}return n}},rw=tw;var E_=class{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";localeStore;timezone;availableLangPacks;constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,r)=>{let n=e.LocaleContent,o=r.toUpperCase();o.startsWith("@BASECLASS!DATAPAGE!")&&o.split(/[!#]/).length<4?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&"fields"in s&&this.updateLocaleStore(s,`${o}#${i}`.toUpperCase())}):o==="GENERIC!GENERICFIELDS"?Object.entries(n).forEach(([i,s])=>{s!==null&&typeof s=="object"&&this.sanitizeLocaleField(s,i.toUpperCase())}):this.sanitizeLocaleField(n,o)};updateLocaleStore=(e,r)=>{let n=e.fields||e,o=this.localeStore[r];o?g.mergeDeep(n,o):n&&typeof n=="object"&&(this.localeStore[r]=n)};sanitizeLocaleField=(e,r)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(r.toUpperCase())&&Object.entries(e).forEach(([,o])=>{o!==null&&typeof o=="object"&&"fields"in o&&this.updateLocaleStore(o,r)}),this.updateLocaleStore(e,r)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,r,n,o){let i=this.#e(n,r),s=this.#t(e);s&&(e=rw.formatLocaleKey(e));let a=i?this.localeStore[i.toUpperCase()]??{}:{},c=o?this.localeStore[o.toUpperCase()]??{}:{};return n?.toUpperCase()==="MESSAGES"&&typeof e=="string"?this.getLocalizedErrorMessage(a,e)||e:s?rw.replaceWithValue(a[e]||c[e]||e):a[e]||c[e]||e}#e(e,r){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?r?`${e}#${r}`:e:e||r}getParagraphLocaleValue(e,r){let n=`${e}!${d.PARAGRAPH}!${r}`,o=this.localeStore[n.toUpperCase()];if(o){let i=typeof globalThis.atob=="function"?decodeURIComponent(globalThis.atob(o.content).split("").map(s=>`%${`00${s.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")):o.content;return{category:o.category,content:i}}return null}getPortalLocaleReference(e){return v.getLocalizationVersion()!==2?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${v.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];let r=v.getUseLocale(),n=[],o=PCore.getLocaleUtils().localeStore;if(e=e.filter(i=>!o[i]),e=e.map(i=>i.toUpperCase()),e.length>0){let i=e.map(a=>({localeRuleKey:a,promise:Be.getSvcLocale(r,`${a}.json`)})),s=await Promise.allSettled(i.map(a=>a.promise));await Promise.all(s.map(async(a,c)=>{if(a.status==="fulfilled"){let l=i[c],u;try{u=await a.value.json()}catch{u=null}u&&n.push({localeRuleKey:l.localeRuleKey,jsonData:u})}}))}return n}async loadLocaleResources(e){await us.loadLocaleBundle(e),await Promise.all(e.map(r=>qd(r)))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,r){let n=r,o=[];for(let i=0;i<e.length;){let s=e[i];if(s.length!==0){let a=n.indexOf(s);if(a===-1)return null;if(i>0){let c=n.slice(0,a);o.push(c)}n=n.slice(a+s.length)}i+=1}return n&&o.push(n),o}getLocalizedErrorMessage(e,r){let n="";if(e[r])return e[r];for(let o of Object.keys(e)){let i=o.split(/\{\d+\}/),s=this.matchPatternWithText(i,r);if(s){let a=e[o];if(n=this.replacePlaceHolders(s,a),n)return n}}return n}replacePlaceHolders(e,r){for(let n=0;n<e.length;){if(!r.includes(`{${n+1}}`))return"";r=r.replace(`{${n+1}}`,e[n]),n+=1}return r}async isCurrentLocalePackAvailable(){let e=v.getLocale();return this.availableLangPacks||(this.availableLangPacks=await Be.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#t(e){let r=!1;return e&&typeof e=="string"&&(r=e.includes("@P ")),r}},Nr=t=>{let e=t??v.getLocale()??"en-US";return Ci(e)};xe.registerHandler("@L",(t,e)=>e?e.getLocalizationService(e.getLocaleRuleName()).getLocalizedText(t):t);xe.registerHandler("@P",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));xe.registerHandler("@E",(t,e,r)=>{try{let n=PD(t),o=ND(n);return OD(o,e,r)}catch{}return!0});xe.registerHandler("@W",(t,e,r)=>{let n;if(r){let{pageReference:o,context:i}=r;n=Wi(o,`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`,i)}else n=e.getContextDataValue(`.${d.SUMMARY_OF_WHEN_CONDITIONS}.${t}`);return n===!0||n==="true"});function Cae(t,e,r,n){let o="",i=r;if(e.join(d.HASH_DELIMITER)&&(o=g.getHashedString(e.join(d.HASH_DELIMITER)),i=r+d.UNDERSCORE_STRING+o),n){let l=Mo(),u=l?l[r]?.[i]:{};return Array.isArray(u?.[P.getDefaultQualifiedName("pxResults")])?u[P.getDefaultQualifiedName("pxResults")]:[]}let c=(t.getDataObject()?.[r]||{})?.[i]||{};return Array.isArray(c?.[P.getDefaultQualifiedName("pxResults")])?c[P.getDefaultQualifiedName("pxResults")]:[]}function _ae(t,e,r){let n=fe.getPropertyName(t?.propertyForDisplayText??""),o=fe.getPropertyName(t?.propertyForValue??""),i=r?.lastIndexOf(".")??-1,s=i>0?r?.substring(0,i):"",a=r?.substring(i+1),c=s?`${e.getPageReference()}.${s}`:void 0,l=`.${d.SUMMARY_OF_EXPRESSIONS}.${t?.name}`,u=e.getContextDataValue(l,c)??e.getContextDataValue(l)??[];if(Array.isArray(u)&&u.some(p=>Object.hasOwn(p,"field"))){let p=u.find(m=>m.field===a);u=Array.isArray(p?.results)?p.results:[]}return u.map(p=>({key:p[o]||p[`.${o}`],value:p[n]||p[`.${n}`]}))}xe.registerHandler("@ASSOCIATED",(t,e)=>{let r={},n=[],o="",i="",s=e.getPageReference();if(t.startsWith(".")){o=`${s}.${t.substring(1)}`;let _=t.split(".").filter(N=>!!N);_.length>1&&(_.pop(),i=_.join(".")),r=e.getFieldMetadata(t.substring(1))}else r=e.getFieldMetadata(t),o=t;let a=r?.datasource?.tableType,c=r?.datasource?.mode===d.READONLY,l=r?.datasource?.name||"",u=e.getComponentConfig();if(u&&u.deferDatasource&&((typeof u.datasourceMetadata!="object"||u.datasourceMetadata===null)&&(u.datasourceMetadata=`@FIELD_META ${t}`,e.setStateProps({datasourceMetadata:u.datasourceMetadata})),a===d.DATA_PAGE))return null;if(a===d.DECISION||a===d.RULE_REFERENCE)return _ae(r?.datasource,e,t.substring(1));if(a!==d.DATA_PAGE){let _=e.getLocalizationService(r?.localeReference);return r?.datasource?.records?.map(N=>({key:N.key,value:_.getLocalizedText(N.value)}))}let p=fe.getPropertyName(r?.datasource?.propertyForDisplayText),m=fe.getPropertyName(r?.datasource?.propertyForValue),f=Array.isArray(r?.datasource?.parameters)?r?.datasource?.parameters:[],h=e.getContextName(),S=[];if(f.forEach(_=>{if(fe.isProperty(_?.value)){let N=oe(`.${g.getFullPropertyReference([i,fe.getPropertyName(_.value)])}`,s,h);S.push(g.getFullPropertyReference([s,i,fe.getPropertyName(_?.value)])),(N==null||N==="")&&(N=d.NULL_STRING),n.push(N)}else n.push(_?.value||d.NULL_STRING)}),h){let _=xa.getContextObjectByName(h)||{};S.forEach(N=>{if(N in _){let x=_[N];_[N]=[...new Set([...x,o])]}else _[N]=[o]}),xa.addContextName(h,_)}let A=Cae(e,n,l,c),C=e.getLocalizationService(),I=_=>C.getLocalizedDataPage(_,l,p);return A.map(_=>{let N=_[p]||_[`.${p}`];return typeof N=="string"&&(N=I(N)),{key:_[m]||_[`.${m}`],value:N}})});xe.registerHandler("@ROUTING_INFO",(t,e)=>um(e.getContainerName(),e.getContextName()));xe.registerHandler("@ENV",(t,e)=>{let r=aE(t);return r?r(e):t});xe.registerHandler("@DATASOURCE",(t,e)=>{let r=e.getSharedDataPageForReferenceList()||e.getValue(t)||[],n=e.getComponentConfig(),o=Object.keys(n).find(i=>n[i]?.source?.includes(t));if(o){let{fields:i,copyAll:s,filterDownloadedFields:a}=n[o],c=[];return r.forEach(l=>{let u={};s||a?Object.keys(l).forEach(p=>{let m=fe.getPropertyName(p);u[m]=l[m]}):Object.keys(i).forEach(p=>{let m=fe.getPropertyName(i[p]);u[p]=l[m]}),c.push(u)}),c}return[]});xe.registerHandler("@FIELD_META",(t,e)=>{let r={};t.startsWith(".")?r=e.getFieldMetadata(t.substring(1)):r=e.getFieldMetadata(t);let n;if(r&&r.datasource&&r.datasource.parameters){let o="",i=t.split(".").filter(s=>!!s);if(i.length>1&&(i.pop(),o=`.${i.join(".")}`),Array.isArray(r.datasource.parameters)){let s=[];r.datasource.parameters.forEach(a=>{let c={},{name:l,value:u}=a;c.name=l,typeof u=="string"&&u.startsWith("@P")?c.value=`@P ${o}${u.substring(3)}`:c.value=u,s.push(e.resolveConfigProps(c))}),n=s}else n=e.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r});xe.registerHandler("@USER",(t,e,r)=>{let n=r?J.getLitePropertyValue(r,t):e.getValue(t),o=r?J.getReferencedUser(n,r):e.getReferencedUser(n);return{userId:n,userName:o?o.UserName:null}});xe.registerHandler("@ACTIVE_CASES",(t,e)=>fn.getOpenedCaseItems(`${e.getContextName()}/${e.getContainerName()}`));xe.registerHandler("@LR",t=>t);xe.registerHandler("@CASE",(t,e)=>t===d.ID?e.getCaseInfo().getKey():t);xe.registerHandler("@SHARED",t=>$n.getSharedState(t));xe.registerHandler("@PARAGRAPH",(t,e)=>{let{useDecision:r,isBanner:n,messageType:o,dismissBanner:i}=ho.getParagraphProperties(t,e),s=ho.hasDecisionBannerContent(t,e);return r&&s?ho.processBannerDecisionParagraph(t,e):n?{htmlContent:ho.processParagraph(t,e),messageType:o,dismissBanner:i}:ho.processParagraph(t,e)});xe.registerHandler("@FORMAT",(t,e)=>{let r=e.getCurrentClassID(),n=nw(t,r);if(!n?.dynamicContents?.length)return null;let{dynamicContents:o}=n;for(let i=0;i<o.length-1;i+=1)if(J.resolveWhen(o[i].when,e))return{pattern:o[i].content};return{pattern:o[o.length-1].content}});xe.registerHandler("@FILTERED_LIST",(t,e)=>{let r=t.substring(1,t.indexOf("[")),n=t.substring(t.indexOf("]")+2),o=t.substring(t.indexOf("[")+1,t.indexOf("]"));if(!e)return null;let{useCustomContext:i}=e,s;return g.isEmpty(i)?s=e.getValue(`.${r}`):(s=i,s=g.getIn(s,r)),s&&n.length>0?(o&&(s=s.filter(a=>a_(o,a))),s.map(a=>g.getIn(a,n))):null});xe.registerHandler("@ADDRESS",(t,e)=>{let r=e.getValue(t)?.[P.getDefaultQualifiedName("pyCountry")];return r?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${r}`:PCore.getDefaultQualifiedName("pyAddressForm")});xe.registerHandler("@DATATYPE",(t,e)=>e.getValue(t));xe.registerHandler("@ATTACHMENT",(t,e,r)=>{let n;return r?n=J.getLitePropertyValue(r):n=e.getValue(t),du.prepareAttachmentData(n)});var Iae=t=>t.startsWith(".")?t.slice(1):t,w6=t=>{let e=t.lastIndexOf(".");return e<0?t:t.slice(e+1)};xe.registerHandler("@FL",(t,e)=>{let r=Iae(t),n=e.getFieldMetadata(r);return!n||!n.label?w6(r):e.getLocalizationService(n.localeReference).getLocalizedText(n.label)});xe.registerHandler("@DEFERRED",(t,e)=>e.getFieldMetadata(t)?.isDeclarativeTarget?{isDeferred:!0,propertyName:t}:e.getValue(t));xe.registerHandler("@GENAICOACH",(t,e)=>ow(t,e.getCurrentClassID()));xe.registerHandler("@AIAGENT",(t,e)=>{let r=iw(t,e.getCurrentClassID());if(r)return r;let n=e.getComponentConfig();if(n){let o=n?.coaches?.find(i=>i?.config?.coach?.substring(9)===t&&i?.config?.ruleNamespace)?.config;if(o?.label){let i={label:o.label};e.resolveConfigProps({label:o.label},i);let s=i.label;return{insName:v.getFeatureMap()?.isNamespaceEnabled&&t.includes(d.DOUBLE_UNDERSCORE_STRING)?t:`${o.ruleNamespace}${d.DOUBLE_UNDERSCORE_STRING}${t}`,label:e.getLocalizedValue(s),type:"agent"}}}return null});xe.registerHandler("@REFRESH",(t,e)=>{let r=e.getCaseInfo().getKey(),n=e.getContextName(),o=e.getPageReference(),i={autoDetectRefresh:!0,preserveClientChanges:!1};Ai.registerForRefresh("PROP_CHANGE",e.getActionsApi().refreshCaseView.bind(e.getActionsApi(),r,"",o,{...i,refreshFor:`${o.replace("caseInfo.content","")}${t}`,resetForm:!0}),`${o}${t}`,`${n}/${o}`,n)});xe.registerHandler("@DW",(t,e,r)=>{let n,o=`${d.CONTEXT_DATA}.${d.SUMMARY_OF_DYNAMIC_WHENS}.${t}`;if(r){let{context:i}=r??{};n=oe(o,null,i)}else n=e.getValue(o);return n===!0||n==="true"});xe.registerHandler("@CA",(t,e,r)=>r?J.getLitePropertyValue(r):e.getValue(t));function A_(t){return t&&t.startsWith("@")?t.replace(/^@\w+\s+\./,""):t}function bae(t,e){let r=t.value&&typeof t.value=="string"&&A_(t.value);return r?r===e:!1}function $6(t,e){let r=t.authorContext;return typeof r!="string"||!r?!1:(r.startsWith(".")?r.substring(1):r)===e}function aw(t,e,r){let n=t.config;if(!n?.name||typeof n.name!="string")return null;let o=e(n.name);return o?Array.isArray(o)?o.length===1?o[0]:o.find(i=>i.classID===n.ruleClass)??o.find(i=>i.classID===r)??null:o:null}function k6(t,e,r,n,o=[]){if(t.config&&bae(t.config,e)&&o.push({type:t?.type,config:t.config}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i],a=s.type==="reference"?aw(s,r,n):s;a&&k6(a,e,r,n,o)}return o}var Tae=new Set(["autocomplete","dropdown","combobox"]);function L6(t){let e=t.config;return e?e.template==="DataReference"&&typeof e.displayAs=="string"&&Tae.has(e.displayAs.toLowerCase())&&e.selectionMode!=="multi":!1}function vae(t){let e=t?.children;return Array.isArray(e)&&e.length>0?e[0]:null}function Rae(t){let e=t.config??{},r={};return(e.contextClass!==void 0||e.targetObjectClass!==void 0)&&(r.contextClass=e.contextClass??e.targetObjectClass),e.referenceList!==void 0&&(r.referenceList=e.referenceList),r.parameters=e.parameters,r.name=e.name,r}function Pae(t){let r=(Array.isArray(t?.inheritedProps)?t.inheritedProps:[]).reduce((o,i)=>(typeof i!="object"||i===null||Array.isArray(i)||"prop"in i&&typeof i.prop=="string"&&"value"in i&&(o[i.prop]=i.value),o),{}),n={};return n.referenceType=t.referenceType,n.ruleClass=t.ruleClass,n.authorContext=t.authorContext,t.visibility!==void 0&&(n.visibility=t.visibility),t.readOnly!==void 0&&(n.readOnly=t.readOnly),t.disabled!==void 0&&(n.disabled=t.disabled),t.required!==void 0&&(n.required=t.required),t.isManyToMany!==void 0&&(n.isManyToMany=t.isManyToMany),{...n,...r}}function U6(t,e,r){let n=Rae(t),o=vae(t),i=Pae(e),s={...o?.config,...n,...i};return Array.isArray(r)&&r.length>0&&(s.descriptors=r),s.dataRelationshipContext=s.contextClass&&s.name?s.name:null,{type:o?.type,config:s}}function Nae(t,e,r,n,o){try{if(!t.name||typeof t.name!="string")return null;let i=e(t.name),s;if(Array.isArray(i))s=i;else if(i)s=[i];else return null;let a=s.find(l=>l.classID===t.ruleClass);if(!a||!L6(a))return null;let c=[];if(o){let l=typeof t.ruleClass=="string"&&t.ruleClass?t.ruleClass:n,u=o(r,l);u&&typeof u=="object"&&"descriptors"in u&&u.descriptors&&Array.isArray(u.descriptors)&&u.descriptors.length>0&&(c=u.descriptors)}return U6(a,t,c)}catch{return null}}function j6(t,e,r,n=[],o="",i){if(t.config&&$6(t.config,e)){let s=Nae(t.config,r,e,o,i);s&&n.push(s)}if(!t.children)return n;for(let s=0;s<t.children.length;s+=1){let a=t.children[s],c=a.type==="reference"&&!(a.config&&$6(a.config,e))?aw(a,r,o):a;c&&j6(c,e,r,n,o,i)}return n}function Oae(t,e){return!t||typeof t!="object"?null:Array.isArray(t)?t.find(n=>n.classID===e)??null:t}function xae(t){let e=v.getInlineEditActionViews(t);return e&&e.length>0?e[0]:P.getDefaultQualifiedName("pyEdit")}function z6(t,e){let r=xae(t),n=e(r);return Oae(n,t)}function cw(t,e,r,n){let o=z6(e,r);if(!o)return[];let i=k6(o,t,r,e);return i.length>0?i:j6(o,t,r,[],e,n)}function M6(t,e){let r=t.parameters;return!r||typeof r!="object"||Array.isArray(r)?!1:Object.values(r).some(n=>{let o=A_(n);return e.some(i=>o===i||o.startsWith(`${i}.`))})}function sw(t,e,r,n,o=[]){if(t.config&&M6(t.config,e)&&t.type!=="View"&&o.push({type:t.type,config:t.config,children:t.children}),!t.children)return o;for(let i=0;i<t.children.length;i+=1){let s=t.children[i];if(s&&s.type==="reference"&&s.config){let a=aw(s,r,n);a&&a.config&&(L6(a)&&M6(a.config,e)?o.push(U6(a,s.config)):sw(a,e,r,n,o))}else sw(s,e,r,n,o)}return o}function F6(t,e,r,n){let o=z6(e,r);if(!o)return[];let i=cw(t,e,r);if(!i||i.length===0)return[];let s=[],a=A_(i[0].config.value);if(a&&s.push(a),n){let c=n(t,e);c&&!Array.isArray(c)&&(c?.descriptors||[]).forEach(u=>{let p=A_(u);p&&!s.includes(p)&&s.push(p)})}return sw(o,s,r,e)}var V6={},B6={},__={},fw=0,I_=!1,gw={},C_={},dw={},pw={},mw={},Ma={},H6={},G6={},q6={},lw={},uw={},Dae=(t,e,r,n)=>{let o=Array.isArray(r)?r:[r];(Array.isArray(n)?n:[n]).forEach(s=>{let a=o.findIndex(c=>c.classID===s.classID);if(a===-1)o.push(s);else{let c={isDeclarativeTarget:!1},l={...o[a],...c,...s};o[a]=l}}),e[t]=o.length===1?o[0]:o},Fn=(t={},e={})=>{if(Object.keys(e).length===0){g.copy(t,e);return}Object.keys(t).forEach(r=>{let n=t[r],o=e[r];o?Dae(r,e,o,n):e[r]=n})},lt=(t,e="")=>{if(!t)return null;let r=C_[t];if(!r)return null;if(!e)return g.deepClone(r);let n;return Array.isArray(r)?n=r.find(o=>o.classID.toLowerCase()===e.toLowerCase()||o.associationClassID?.toLowerCase()===e.toLowerCase())||null:n=r.classID.toLowerCase()===e.toLowerCase()||r.associationClassID?.toLowerCase()===e.toLowerCase()||(r.type==="Page"||r.type==="Page List")&&r?.pageClass?.toLowerCase()===e.toLowerCase()?r:null,n?g.deepClone(n):null},Ci=t=>(lw[t]||(lw[t]=new E_),lw[t]),wae=(t,e)=>(uw[t]||(uw[t]=e()),uw[t]),b_=(t,e,r,n=[])=>{if(!e||!t)return null;if(!t.includes(".")){let a,c=lt(t,e);return n.length&&(a=n.join(".")),{...c,embeddedType:r,category:a}}let[o,...i]=t.split("."),s=lt(o,e);return s&&n.push(s.label),b_(i.join("."),s?.pageClass,s?.type,n)},hw=t=>{Object.keys(t).length!==0&&(Fn(t,__),I_&&(fw+=1))},$ae=()=>fw,mD=()=>{I_=!0},fD=()=>{I_=!1},yw=t=>{Fn(t,gw)},Mae=t=>{t.views&&Object.keys(t.views).length>0&&(Fn(t.views,__),I_&&(fw+=1)),t.navigations&&Fn(t.navigations,gw),t.personalizations&&Fn(t.personalizations,pw),t.insights&&Fn(t.insights,mw),t.paragraphs&&Fn(t.paragraphs,V6),t.formats&&Fn(t.formats,B6),t.dataTypes&&Fn(t.dataTypes,Ma),t.datapages&&Fn(t.datapages,H6),t.genAICoaches&&Fn(t.genAICoaches,G6),t.AIAgents&&Fn(t.AIAgents,q6)},kae=t=>{let e=t.fields||{};Object.keys(e).forEach(r=>{let n=e[r];if(Array.isArray(n)){if(n.forEach(o=>{t.datapages&&o.datasource&&o.datasource.tableType==="DataPage"&&(o.datasource.mode=t.datapages?.[o.datasource.name].mode);let i=_i(An.FIELD,r,o.definedOnClassID??o.classID);o.localeReference=i}),n.length===1){let[o]=n;e[r]=o}}else t.datapages&&n?.datasource&&n.datasource.tableType==="DataPage"&&(n.datasource.mode=t.datapages[n.datasource.name].mode)})},bm=t=>{Mae(t),kae(t);let{datapages:e={}}=t;Object.keys(e).forEach(r=>{dw[r]=e[r]}),Fn(t.fields,C_)},Na=t=>__[t],oT=(t,e)=>{let r=__[t];return Array.isArray(r)?r.some(n=>n.classID===e):r?.classID===e},Sw=t=>gw[t],Ur=t=>t in dw?dw[t]:null,T_=t=>t in pw?pw[t]:null,Ew=t=>t in mw?mw[t]:null,Aw=t=>{let e={};return Object.keys(C_).forEach(r=>{let n=C_[r],o;Array.isArray(n)?o=n.find(i=>t===i.classID):t===n.classID&&(o=n),o&&(e[r]=g.deepClone(o))}),e},Lae=(t,e)=>{let n=lt(t,e)?.datasource?.parameters;return n?g.deepClone(n):null},Rc=(t,e)=>{let r=null,n=V6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},nw=(t,e)=>{let r=null,n=B6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},ow=(t,e)=>{let r=null,n=G6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},iw=(t,e)=>{let r=null,n=q6[t];return n&&(Array.isArray(n)?r=n.find(o=>o.classID===e):n.classID===e&&(r=n)),r?g.deepClone(r):null},Ux=t=>{if(t in Ma){let{savableDataPage:e}=Ma[t];return e}return null},jx=t=>{let e=H6[t];if(!e)return null;let{classID:r,isAlternateKeyStorage:n,parameters:o}=e;if(n)return o.map(s=>({keyName:s.name,isAlternateKeyStorage:n,linkedField:s.linkedField}));let i=Ma[r];return i?i.classKeys.map(s=>({keyName:s,isAlternateKeyStorage:n})):[]},zx=t=>{if(t in Ma){let{lookupDataPage:e}=Ma[t];return e}return null},Fx=t=>{if(Object.hasOwn(Ma,t)){let{lookupDataPageInfo:e}=Ma[t];return e}return null},ED=(t,e)=>{let r=t.split("."),n=r.pop(),o=new ea({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID())?.additionalInformation;if(!i?.includes("@PARAGRAPH"))return i;let s=fe.trimAnnotation(i);return ho.processParagraph(s,o)},Uae=(t,e)=>{let r=t.split("."),n=r.pop(),o=new ea({options:{pageReference:`${r.join(".")}`,context:e}}),i=lt(n,o.getCurrentClassID()),s={};return o._classID=o.getCurrentClassID(),o.resolveConfigProps(i,s),s},jae=(t,e)=>cw(t,e,Na,lt),zae=(t,e)=>F6(t,e,Na,lt);var Cw=class t{name;cascadeSubscribers;cascadeResetSubscribers;listChangeSubscribers;constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,r,n,o,i,s="singleRecord"){if(!e||!n||!o?.length)return;let a=n.startsWith(".")?`${r}.${n.substring(1)}`:n,c=this.cascadeResetSubscribers[e]||{},l=this._handlePageReference(r,n,i);o.forEach(u=>{if(!u)return;let p=u.startsWith(".")?u.substring(1):u;if(p=this._resolveDependentPropertyReference(l,p),p in c){let m=c[p];m.find(h=>h.propertyName===a)||m.push({propertyName:a,mode:s})}else c[p]=[{propertyName:a,mode:s}]}),Object.keys(c).length>0&&(this.cascadeResetSubscribers[e]=c)}deregisterResetDependencies(e,r,n,o,i){if(!e||!n||!o?.length)return;let s=n.startsWith(".")?`${r}.${n.substring(1)}`:n,a=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(r,n,i);o.forEach(l=>{if(l){let u=l.startsWith(".")?l.substring(1):l;if(u=this._resolveDependentPropertyReference(c,u),u in a){let p=a[u];g.removeExistingDependentProperty(p,s)}}}),Object.keys(a).length>0&&(this.cascadeResetSubscribers[e]=a)}getResetDependencies(e,r){return this.cascadeResetSubscribers[e]?.[r]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,r,n,o,i){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach(s=>{this.cascadeSubscribers[e][`${r}${s}`]=this.cascadeSubscribers[e][`${r}${s}`]||{};let a=this.cascadeSubscribers[e][`${r}${s}`];if(!a[i]){a[i]=o;let c=oe(s,r,e);a.previousValue=typeof c=="object"?null:c}})}registerListField(e,r,n,o,i){let s=t._getFieldsForList(e,r,n);s.length>0&&(this.registerFields(e,r,s,o,i),Ld.enableCascade(e))}unRegisterListField(e,r,n,o){let i=t._getFieldsForList(e,r,n);i.length>0&&this.unRegisterFields(e,r,i,o)}static _getFieldsForList(e,r,n){let o=[],i=lt(n,oe("classID",r,e));return i&&!Array.isArray(i)&&i.datasource&&i.datasource.parameters&&Object.values(i.datasource.parameters).forEach(s=>{if(fe.isProperty(s)){let a=fe.trimAnnotation(s);o.push(a)}}),o}unRegisterFields(e,r,n,o){this.cascadeSubscribers[e]&&n?.forEach(i=>{if(!this.cascadeSubscribers[e][`${r}${i}`])return;let s=this.cascadeSubscribers[e][`${r}${i}`];s[o]&&delete s[o]})}triggerCascade(e,r,n,o){let i=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][r]&&(Object.keys(this.cascadeSubscribers[e][r]).forEach(s=>{let a=this.cascadeSubscribers[e][r];s!=="previousValue"&&a.previousValue!==n&&(i=!0,o?o.add(a[s]):a[s](r,n))}),i&&(this.cascadeSubscribers[e][r].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,r=[],n=[]){if(!e)return;let o=new Set;n.forEach(i=>{let s=oe(i,"",e);this.triggerCascade(e,i,s,o)}),o.forEach(i=>{i()}),!(this.listChangeSubscribers.length===0||r.length===0)&&r.forEach(i=>{this.listChangeSubscribers.forEach(s=>{let a=oe(i,"",e);s(e,i,a)})})}_updateChangedProperties(e,r,n,o,i,s,a,c){let l=n&&c.some(u=>o.startsWith(u));if(e!==r||l){let u=o.lastIndexOf("."),p=o.substring(0,u),m=o.substring(u);if(Nu.getMessages({type:"error",property:m,context:i,pageReference:p})?.length>0&&a.push(o),!n)return;s.push(o)}}isChangedListPropertyExist(e){let r=!0;return(this.listChangeSubscribers.length===0||!g.isValidPageListProperty(e))&&(r=!1),r}_getServerProperties(e,r,n,o,i,s,a){if(typeof e!="object"){i.push(n.replace(/\.(\d+)/g,"[$1]"));let l=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");let u=oe(n,"",r);if(u===void 0&&!e&&e!==0)return;this._updateChangedProperties(u,e,l,n,r,o,s,a);return}let c=Object.keys(e??{});for(let l=0,u=c.length;l<u;l+=1){let p=c[l],m=`${n}.${p}`;if(Array.isArray(e[p])){let f=oe(m,"",r);(!f||f?.length!==e[p].length)&&a.push(m.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[p],r,m,o,i,s,a)}}getServerProperties(e,r,n=d.CASE_INFO.CASE_INFO_CONTENT){let o=[],i=[],s=[],a=[],c=g.getIn(e,n);return!c||!r?{changedListProperty:o,leafProperty:s,changedPropertyWithError:i}:(this._getServerProperties(c,r,n,o,s,i,a),{changedListProperty:o,leafProperty:s,changedPropertyWithError:i})}_handlePageReference(e,r,n){let o=e;if(n==="Page"&&r.startsWith(".")&&r.slice(1).includes(".")){let i=r.substring(0,r.lastIndexOf("."));o=`${e}${i}`}return o}_resolveDependentPropertyReference(e,r){let n=r.match(/^(Parent(?:\.Parent)*)(?:\.(.*))?$/);if(!n)return g.getFullPropertyReference([e,r]);let o=n[1].split(".").length,i=n[2]||"",s=e.split("."),a=s.slice(0,Math.max(s.length-o,0)).join(".");return i?a?`${a}.${i}`:i:a}registerForListChanges(e=()=>{}){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}},Cr=new Cw;var Fae=/\.(?![^[]+\])|\[|\]/g,Vae=new Set(["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"]),Iw=null,oo=t=>t?.split(Fae).filter(Boolean),bw=t=>{Iw=t},De=()=>Iw,T=t=>{if(!t)return;let e=[],r=[],n=[];!Array.isArray(t)&&t.type==="MERGE_DATA"&&({changedListProperty:e,leafProperty:r,changedPropertyWithError:n}=Cr.getServerProperties(t.payload.data,t.payload.context,t.payload.rootPageReference)),Iw?.dispatch(t),!Array.isArray(t)&&t.type==="MERGE_DATA"&&(n.length&&!t.payload.skipValidation&&n.map(i=>{let s=i.lastIndexOf(".");return{property:i.substring(s),pageReference:i.substring(0,s)}}).forEach(({property:i,pageReference:s})=>{Nu.clearMessages({type:"error",property:i,pageReference:s,context:t.payload.context});let a=Ie.getFieldReferenceForProperty(t.payload.context,`${s}${i}`);if(a){let c=J.resolveContextTreeNodeProps(a.props);Dt.validate(c.componentName?.toLowerCase(),c.propertyName,J.getLitePropertyValue(c,c.propertyName),c)}}),Cr.handleServerChanges(t.payload.context,e,r))},W=t=>De()?.getState().data?.[t],Mo=()=>De()?.getState().data[d.SHARED],Bae=t=>!!(t&&!t.startsWith('"')&&!t.startsWith("'")),Hae=t=>t&&t.trim().substring(1,t.length-1),_w=(t,e,r)=>{if(!Bae(t))return Hae(t);let n=t?.startsWith(".")?e+t:t,o=oo(n);return g.getIn(r,o)},oe=(t,e,r)=>_w(t,e,W(r)),Wi=(t,e,r)=>t?_w(e,`${d.CONTEXT_DATA}.${t}`,W(r)):_w(e,`${d.CONTEXT_DATA}`,W(r)),Gae=(t,e,r)=>{let n=oo(`${e}.${r}`);return g.getIn(t,n)},Da=(t,e,r)=>Gae(W(r),`${d.CONTEXT_DATA}.${t}`,e),qae=t=>{let{context:e}=t;if(De()?.getState().data[e])return VI;let{action:n}=t;return Vae.has(n)?St:VI},Tw=(t,e)=>{let r=oo(e);return g.deleteIn(t,r)},W6=t=>!Array.isArray(t)&&typeof t=="object",v_=(t,e=[],r=[])=>{let n=new Set(r);Array.isArray(e)&&e.length>0&&e.forEach(o=>{o.allowMultiple?o.allowMultiple&&!n.has(o.path)&&g.setIn(t,o.path,[]):g.setIn(t,o.path,{})}),r.length>0&&g.rearrangeProperties(r,t)},xt=(t,e,r={})=>{let{isArrayDeepMerge:n,propertiesToReplace:o=[],propertiesToReArrange:i=[]}=r;Array.isArray(t)&&!e&&(e=[]),(o.length>0||i.length>0)&&v_(t,o,i);let s=(a,c)=>{if(W6(a)&&c!==null&&typeof c!="string"&&typeof c!="number"&&typeof c!="boolean")return Array.isArray(c)?c:Di(a,c,s);if(Array.isArray(a)&&c!==null&&Array.isArray(c)){if(n)return Di(a,c,s);{let l=c.length;if(typeof n>"u"&&l===a.length)return Di(a,c,s)}}return c===""&&a&&typeof a=="object"?a:c};return s(t,e)},vw=(t,e,r,n={isArrayDeepMerge:!0})=>{let{isArrayDeepMerge:o}=n,i=oo(e),s=g.getIn(t,i);if(typeof r=="object"&&r!==null){if(s===r)return t;let a=xt(s,r,{isArrayDeepMerge:o});return g.setIn(t,i,a)}return g.setIn(t,i,r)},Rw=(t,e,r)=>{let n=oo(e);return g.setIn(t,n,r)},ps=()=>{let t=Vs,{promise:e,actionMgrID:r}=w.actionManagerPromise(t);return T({type:t,payload:{actionMgrID:r}}),e},Ud=t=>!!De()?.getState()?.data?.[t];var Wae=" @#$%=!<>/\\",Kae=/^[^/]+\/[^/]+\.[^/.]+$/,Jae=typeof structuredClone=="function",Pw=class t{static mergeDeep(e,r){return Di(r,e)}static hasIn(e,r){return B1(e,r)}static getIn(e,r,n){return im(e,r,n)}static setIn(e,r,n){return G1(e,r,n)}static deleteIn(e,r){return z1(e,r)}static isObjectEmpty(e){return!e||Object.entries(e).length===0}static isEmpty(e){return _k(e)}static deepClone(e={}){if(e===null||typeof e!="object")return e;if(Jae)try{return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))}static copy(e,r){Object.keys(e).forEach(n=>{r[n]=e[n]})}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let r=0;r<e.length;r+=1)if(Wae.includes(e[r]))return!1;return!0}static isValidPropertyReference(e){return typeof e!="string"?!1:e===""||e.trim()!==""}static isWhenExist(e){let r=["visibility","disabled","readOnly","required"],n=!1;for(let o of Object.keys(e)){let i=e[o];i&&typeof i=="object"&&!Array.isArray(i)?n=n||t.isWhenExist(i):r.includes(o)&&typeof i=="string"&&i?.startsWith("@W ")&&(n=!0)}return!n&&e?.type==="multirecordlist"&&e?.renderMode==="Editable"&&(n=Object.keys(e?.allowActions??{}).some(o=>typeof e?.allowActions?.[o]=="string"&&e.allowActions[o]?.startsWith("@W "))),n}static getWhenNames(e){let r=["visibility","disabled","readOnly","required"],n="",o=new Set;if(e&&Object.keys(e).forEach(i=>{let s=e[i];r.includes(i)&&typeof s=="string"&&s.startsWith("@W ")&&(n=fe.trimAnnotation(s),o.add(n))}),e?.type==="multirecordlist"&&e?.renderMode==="Editable"){let i=e?.allowActions??{};Object.keys(i).forEach(s=>{typeof i[s]=="string"&&i[s]?.startsWith("@W ")&&(n=fe.trimAnnotation(i[s]),o.add(n))})}return[...o]}static isExpressionExist(e){let r=["disabled","visibility","readOnly","required"],n=!1;for(let o of Object.keys(e))r.includes(o)&&typeof e[o]=="string"&&e[o]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,r){let n={},o=n;return r.indexOf(".")>0?r.split(".").forEach(s=>{if(s.includes("[")){let[a]=s.split("[");n[a]=[],n=n[a],s=s.substring(s.indexOf("[")+1,s.lastIndexOf("]"))}n[s]={},n=n[s]}):(n[r]={},n=n[r]),Object.keys(e).forEach(i=>{let s=i;i.startsWith(".")&&(s=i.substring(1)),n[s]=e[i]}),o}static buildObject=(e,r,n)=>{if(n===void 0)return;let o=e.split("."),i=0;for(;i<o.length-1;i+=1){let s=o[i];s?.toString().length&&!r[s]&&(r[s]={}),r[s]&&(r=r[s])}typeof n=="object"?(r[o[i]]||(r[o[i]]=Array.isArray(n)?[]:{}),xt(r[o[i]],n,{isArrayDeepMerge:!0})):r[o[i]]=n};static crc32(e){let r=-1,n=t.getUtf8Bytes(e);for(let o of n)r=r>>>8^t.CRC32_TABLE[(r^o)&255];return(r^-1)>>>0}static getUtf8Bytes(e){if(t.utf8Encoder===null&&typeof globalThis.TextEncoder=="function"&&(t.utf8Encoder=new globalThis.TextEncoder),t.utf8Encoder)return Array.from(t.utf8Encoder.encode(e));let r=[];for(let n=0;n<e.length;n+=1){let o=t.getCodePoint(e,n);r.push(...t.encodeCodePoint(o.value)),n=o.nextIndex}return r}static getCodePoint(e,r){let n=e.charCodeAt(r),o=e.charCodeAt(r+1);return n>=55296&&n<=56319&&o>=56320&&o<=57343?{value:65536+(n-55296<<10)+(o-56320),nextIndex:r+1}:n>=55296&&n<=57343?{value:65533,nextIndex:r}:{value:n,nextIndex:r}}static encodeCodePoint(e){return e<=127?[e]:e<=2047?[192|e>>>6,128|e&63]:e<=65535?[224|e>>>12,128|e>>>6&63,128|e&63]:[240|e>>>18,128|e>>>12&63,128|e>>>6&63,128|e&63]}static CRC32_TABLE=(()=>{let e=[];for(let r=0;r<256;r+=1){let n=r;for(let o=0;o<8;o+=1)n=n&1?3988292384^n>>>1:n>>>1;e[r]=n>>>0}return e})();static utf8Encoder=null;static getHashedString(e){return t.crc32(e).toString(16)}static getPropertyName(e){if(e){let r=e.startsWith("@P"),n=r?e.indexOf(" "):-1;return r?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return typeof e=="string"?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(r){return console.error("not a Valid JSON",r),!1}}static isEqual(e,r){return lo(e,r)}static isContains(e,r){let n=Object.keys(e);for(let o=0;o<n.length;o+=1)if(e[n[o]]&&t.isEqual(e[n[o]],r))return!0;return!1}static removeExistingDependentProperty(e,r){let n=e.findIndex(o=>o.propertyName===r);n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter(r=>!!r).join("."):""}static iterateLeafNodes(e,r){let n=(o,i=[])=>{Object.entries(o).forEach(([s,a])=>{i.push(Array.isArray(o)?Number(s):s),Array.isArray(a)?a.forEach((c,l)=>{i.push(l),n(c,i),i.pop()}):a!==null&&typeof a=="object"?n(a,i):r(i.slice(),a),i.pop()})};n(e)}static resolveStringBooleans(e){let r=["required","readOnly","visibility"],n=o=>o==="true";return Object.keys(e).forEach(o=>{r.includes(o)&&typeof e[o]=="string"&&(e[o]=n(e[o]))}),e}static generateUniqueID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=typeof performance<"u"&&typeof performance.now=="function"?performance.now().toString(36).replace(".",""):Math.random().toString(36).slice(2);return`${Date.now().toString(36)}${e}`}static unflatten(e){let r={};return Object.entries(e).forEach(([n,o])=>{let i=n.split("."),s;i.reduce((a,c,l)=>(a[c]?s=a[c]:Number.isNaN(Number(i[l+1]))?i.length-1===l?s=o:s={}:s=[],a[c]=s,a[c]),r)}),r}static flatten(e,r,n){r||(r=""),Array.isArray(e)?e.forEach((o,i)=>{t.flatten(o,`${r}[${i}]`,n)}):typeof e=="object"&&e!==null?Object.keys(e).forEach(o=>{let i=r?`${r}.${o}`:o;t.flatten(e[o],i,n)}):n[r]=e}static buildInstructionPageReference(e,r){let o=e.startsWith(d.OBJECT_INFO.OBJECT_INFO)?`${e}${r}`.replace(d.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${r}`.replace(d.CASE_INFO.CASE_INFO_CONTENT,"").replace(d.DATA_INFO.DATA_INFO_CONTENT,"");return ei.formatPageReference(o)}static convertPageRefToClipboardPageNotation(e){let r=/\[\d+\]/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)+1}`).replace("[","(").replace("]",")"))}static convertClipboardPageToPageRefNotation(e){let r=/\(\d+\)/g;return e.replace(r,n=>n.replace(/\d+/g,o=>`${parseInt(o,10)-1}`).replace("(","[").replace(")","]"))}static segmentsMatch=(e,r)=>{let n=e.split("."),o=r.split(".");return n.length!==o.length?!1:n.every((i,s)=>{if(i===o[s])return!0;if(i.endsWith("()")){let a=i.slice(0,-2),c=o[s];return c.startsWith(a)&&/^\[\d+\]$/.test(c.slice(a.length))}return!1})};static isString(e){return typeof e=="string"}static rejectPendingActions(e){return e.forEach(r=>r.payload.actionMgrID&&w.rejectActionByID(r.payload.actionMgrID)),!0}static isValidAnnotation(e){let r=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),n=e.indexOf(" "),o=e.substring(0,n);return r.has(o)}static trimDotForProperty(e){return typeof e=="string"&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if(typeof document<"u"){let o=document.createElement("textarea");return o.innerHTML=e,o.value}let r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#x27;":"'","&#x2F;":"/","&#47;":"/"},n=e;return Object.entries(r).forEach(([o,i])=>{n=n.split(o).join(i)}),n=n.replace(/&#(\d+);/g,(o,i)=>String.fromCharCode(parseInt(i,10))),n=n.replace(/&#x([a-f\d]+);/gi,(o,i)=>String.fromCharCode(parseInt(i,16))),n}static convertObjectWithStringToBoolean(e){if(e&&!(Array.isArray(e)||typeof e!="object"))return Object.keys(e).forEach(r=>{let n,o=e[r];typeof o=="string"?o==="true"?n=!0:o==="false"?n=!1:n=o:typeof o=="object"?(n=o,t.convertObjectWithStringToBoolean(o)):n=o,e[r]=n}),e}static rearrangeProperties(e,r){e.forEach(n=>{let o=t.getIn(r,n);if(!o)return;let i=Object.hasOwn(o,P.getDefaultQualifiedName("pyCount"));if(i&&(o=o.pxResults),!o)return;let s=o.filter(c=>!c.error),a=o.filter(c=>c.error);t.setIn(r,i?`${n}.pxResults`:n,[...s,...a])})}static getETag(e){if(!e)return;let r=e,n=r?.split("/")||[],o=["workarea","modal","actionarea"],i=n.findIndex(s=>o.some(a=>s.startsWith(a)));return i!==-1&&(r=n.slice(0,i+1).join("/")),De()?.getState()?.data[r]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return t.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,r,n){let o=[],i="",s=n.getPageReference(),a=n.getContextName();Object.keys(e).forEach(u=>{let p=e[u],m=fe.isProperty(p)?oe(`.${fe.getPropertyName(p)}`,s,a):p;(m==null||m==="")&&(m=d.NULL_STRING),o.push(m)});let c=r,l=o.join(d.HASH_DELIMITER);return l&&(i=t.getHashedString(l),c=r+d.UNDERSCORE_STRING+i),c}static parsePegaDateTimeToTimestamp(e){if(!e)return null;let r=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!r){let p=new Date(e).getTime();return Number.isNaN(p)?null:p}let[,n,o,i,s,a,c,l]=r.map(Number);return new Date(n,o-1,i,s,a,c,l).getTime()}static formatToUTCDate(e,r){if(!e)return e;let n=new Date(e);if(Number.isNaN(n.getTime()))return e;let o=(m,f=2)=>String(m).padStart(f,"0"),i=n.getUTCFullYear(),s=o(n.getUTCMonth()+1),a=o(n.getUTCDate());if(r==="Date")return`${i}${s}${a}`;let c=o(n.getUTCHours()),l=o(n.getUTCMinutes()),u=o(n.getUTCSeconds()),p=o(n.getUTCMilliseconds(),3);return`${i}${s}${a}T${c}${l}${u}.${p} GMT`}static isLeafProperty(e){return!!e&&!e.includes(".")}static getMetadataType(e,r,n){let o=t.isLeafProperty(e)?lt(e,r):n.getFieldMetadata(e);return Array.isArray(o)?o[0]?.type:o?.type}static toStringParameterValue(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,r,n,o,i){if(n&&Object.hasOwn(n,e))return n[e];if(!_r.isProperty(r))return r;let a=i!==null?_r.getPropertyName(r):_r.getLeafPropertyName(r);return o.getValue(`.${a}`)}static formatParameterValue(e,r,n,o,i){if(!_r.isProperty(r))return e;let a=o!==null?_r.getPropertyName(r):_r.getLeafPropertyName(r);if(!a)return e;let c=t.getMetadataType(a,i,n);if(!c)return e;let l=t.toStringParameterValue(e);return c==="Date"?l?l.includes("T")?t.formatToUTCDate(l,"Date"):t.formatToUTCDate(`${l}T00:00:00Z`,"Date"):e:c==="DateTime"&&l?t.formatToUTCDate(l,"DateTime"):e}static resolveAndFormatParameters(e,r,n,o,i){let s={};for(let a of Object.keys(e)){let c=e[a];if(typeof c!="string")s[a]=c;else{let l=t.resolveParameterValue(a,c,i,r,n);s[a]=t.formatParameterValue(l,c,r,n,o)}}return s}static normalizePropertyRef(e){let r=e.replace(/\[\d+\]/g,"");return r.startsWith(".")?r.substring(1):r}static resolvePageClass(e,r){if(!r)return;e=this.normalizePropertyRef(e);let n=e.split("."),o;n.length>1?o=n.slice(0,-1):o=n;let i=r;for(let s of o){let a=lt(s,i);if(!a||(Array.isArray(a)&&a[0]?.pageClass?i=a[0].pageClass:!Array.isArray(a)&&a.pageClass&&(i=a.pageClass),!i))return}return i}static isNestedObject(e){return Ds(e)&&!Array.isArray(e)}static pruneKeys=(e,r,n=!1)=>{if(!Rr(e))return e;let o=r instanceof Set?r:new Set(r);return n?(t.isNestedObject(e)?Object.keys(e).forEach(i=>{let s=e[i];if(o.has(i)){let a=Object.getOwnPropertyDescriptor(e,i);a&&a.configurable?delete e[i]:Reflect.set(e,i,void 0)}else s&&(Ds(s)||Array.isArray(s))&&t.pruneKeys(s,o,!0)}):Array.isArray(e)&&e.forEach(i=>{(Ds(i)||Array.isArray(i))&&t.pruneKeys(i,o,!0)}),e):Array.isArray(e)?e.map(i=>Ds(i)||Array.isArray(i)?t.pruneKeys(i,o,!1):i):t.isNestedObject(e)?Object.keys(e).reduce((i,s)=>{if(!o.has(s)){let a=e[s];i[s]=Ds(a)||Array.isArray(a)?t.pruneKeys(a,o,!1):a}return i},{}):e};static normalizeStaticContentKey(e){let r=this.getWebFilePath(e);if(!r)return e.trim();let n=r.decodedFileName.lastIndexOf(".");if(n<1||n===r.decodedFileName.length-1)return e.trim();let o=r.decodedFileName.slice(0,n),i=r.decodedFileName.slice(n+1);return`${r.marker.toUpperCase()}!${o.toUpperCase()}!${i.toUpperCase()}`}static isWebFilePath(e){return this.getWebFilePath(e)!==void 0}static getWebFilePath(e){let r=e.trim();if(!Kae.test(r))return;let n=r.indexOf("/"),o=r.slice(0,n),s=r.slice(n+1).split(/[?#]/)[0];try{let a=decodeURIComponent(s);return a.includes("/")||a.includes("\\")?void 0:{marker:o,decodedFileName:a}}catch{return}}},g=Pw;var Yae=d.SUMMARY_OF_LISTS,Zae=d.SUMMARY_OF_WHEN_CONDITIONS,Nw=class t{static updateData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static updateContextData(e){Object.keys(e).forEach(r=>{T(Re({context:r,data:e[r]}))})}static resolveWhen(e,r){return!!r.getContextDataValue(`.${Zae}.${e}`)}static resolveFieldValue(e,r){return r.getLocalizedValue(e)}static resolveNavigation(e,r){let n=this.resolveName(e,r);return Sw(typeof n=="string"?n:"")}static resolveView(e,r,n=""){let o=Na(this.resolveName(e,r)),i=[];if(Array.isArray(o)&&o.length>0){if(r&&o.length>1){if(n||(n=r.getValue(d.CLASS_ID)||""),!n)return;i=o.filter(s=>s[d.CLASSID]===n)}return i.length===0?o[0]:i[0]}return o}static resolveName(e,r){return e&&typeof e=="string"&&e.startsWith("param.")?(e=e.substring(6),r.getContextDataValue(`.$parameters.${e}`)):(e&&typeof e=="string"&&e.startsWith("@")&&(e=fe.handleAnnotation(e,r)),e)}static getContextPath(e,r){return typeof r!="number"&&!r?e:(r=fe.trimAnnotation(r),typeof r=="number"||typeof r=="string"?typeof r=="number"&&Number.isInteger(r)?`${e}[${r}]`:typeof r=="string"&&r.startsWith(".")?e+r:r:e)}static getRuleClass(e,r,n){let o;if(r)o=r.startsWith(d.CLASS_ANNOTATION)?r.split(d.CLASS_ANNOTATION)[1].trim():this.resolveClassID(r,e.getPageReference(),e.getContextName(),e.getValue(d.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){let i=e.getFieldMetadata(n.authorContext);if(i){let s=["refer","copy"].includes(i.dataRetrievalType),a=i.type==="Page List";o=s&&a?i.pageClass:i.classID}o||(o=n.ruleClass)}return o}static resolveReference(e,r){let{type:n}=e,o;if(n==="reference"){let{config:i}=e,s=i?.type,{ref:a,name:c,context:l}=i||{},u=this.getRuleClass(r,l,i);return r&&(r._ruleClass=u),s==="navigation"?o=this.resolveNavigation(a||c,r):s==="view"?o=this.resolveView(a||c,r,u||""):s==="widget"&&(o={type:"Widget",config:{name:c,ruleClass:u}}),o}return e}static resolvePropertyReference(e,r,n){return oe(r,e,n)}static getProperty(e,r,n){let o=this.resolvePropertyReference(r,e,n);if(o==null||o.length===0){let i=Da(`${r}.${Yae}`,e,n);i&&(o=this.resolvePropertyReference(r,i,n))}return o}static getPropertyValue(e,r,n){return e=fe.trimAnnotation(e),this.getProperty(e,r,n)}static getReferencedUser(e,r){let n=t.getLitePropertyValue(r,"referencedUsers");if(Array.isArray(n)){let o=n.find(i=>i.UserID===e);if(o)return{userId:o.UserID,UserName:o.UserName}}return n?.[e]}static getLitePropertyValue(e,r){if(!e)return;let{useCustomContext:n,propertyName:o,hasSuggestions:i,pageReference:s,context:a}=e,c=r||o||"";return n?(c=c.startsWith(".")?c.substring(1):c,c.split(".").reduce((l,u)=>l?.[u]??void 0,n)):i&&c===o?t.getPropertyValue(c,s,a?`${a}/${d.SUGGESTION}`:void 0):t.getPropertyValue(c,s,a||void 0)}static _handlePropString(e,r,n,o,i){n.startsWith("@")?e[r]=fe.handleAnnotation(n,o,i):e[r]=n}static _resolveProps(e,r,n){e&&Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?this._handlePropString(e,o,i,r,n):Array.isArray(i)?i.forEach(s=>{this._resolveProps(typeof s=="object"?s:e[s],r,n)}):typeof i=="object"&&this._resolveProps(e[o],r,n)})}static resolveProps(e,r,n){return!e||!r||(g.mergeDeep(e,r),this._resolveProps(r,n,void 0)),r}static resolveContextTreeNodeProps(e){let r={};return e?(g.mergeDeep(e,r),this._resolveProps(r,void 0,e),g.resolveStringBooleans(r)):r}static resolvePropertyPageClass(e,r){let n=g.resolvePageClass(e,r),o=e.substring(e.lastIndexOf(".")+1),i=lt(o,n),s;if(i)return Array.isArray(i)?s=i[0]?.pageClass:s=i.pageClass,s}static resolveClassID(e,r,n,o){let i=fe.trimAnnotation(e),s=i.startsWith(".")?`${r}${i}`:i;for(;s;){let a=oe(d.CLASS_ID,s,n);if(a)return a;if(o){let l=this.resolvePropertyPageClass(i,o);if(l)return l}let c=s.lastIndexOf(".");if(c===-1)break;s=s.substring(0,c)}return null}},J=Nw;var Ow=class{actionHandlers;constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,r){this.actionHandlers[e]=r}},Qae=new Ow,R_=Qae;function Xae(t){return typeof t=="object"&&t!==null}var xw=class{static#e=[];static#t=!1;static getActionHandlers=(e,r,n)=>{let o=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==r||e.forEach(s=>{let a=R_.getHandler(s.action),{config:c}=s;o.push({handler:a,config:c})}),o};static isEditable=e=>{let{tagName:r}=e;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||r==="DATETIME"};static isNonKeyInput=e=>{let{tagName:r,type:n}=e;return r==="SELECT"||n==="checkbox"||n==="radio"};static#r=(e,r,n)=>{for(let o=0;o<e.length;o+=1){let i=e[o],s={actionHandler:i.handler,component:r,eventType:n,config:i.config};this.#e.push(s)}};static buildActionObject=(e,r)=>{let n={...e};return n.context=v.getRuntime()==="Browser"?r.getContextName():n.context,n.pageReference=r.getPageReference(),n.actionMgrID=w.getNextActionMgrId(),n};static#n=e=>{let r=e.actionHandler,n=e.component,{config:o}=e,i={};J.resolveProps(o,i,n),r&&(r(e.eventType,i,n),this.#o())};static#o=()=>{if(!this.#t){if(this.#e.length===0)return;let e=this.#e.shift();if(!e)return;this.#n(e),e.config&&e.config.parallel==="true"&&this.#e.length>0&&this.#o()}};static#i=()=>{this.#o()};static#s=(e,r,n)=>{this.#r(e,r,n),this.#i()};static getFullRef=e=>{let r=e.getPageReference(),n=e.getComponentConfig().value;return J.getContextPath(r,n)};static#a(e,r){let o=e.getComponentConfig().behaviours||[];for(let i=0;i<o.length;i+=1){let{behaviour:s,actions:a}=o[i];if(a){let c=this.getActionHandlers(a,s,r);c&&c.length>0&&this.#s(c,e,r)}}}static changeHandler=(e,r)=>{let n=e.getStateProps().value,o=e.getContextName();if(dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:o}),(v.getRuntime()==="Browser"?"nativeEvent"in r&&r.nativeEvent instanceof Event||r instanceof Event:"nativeEvent"in r&&!!r.nativeEvent||r instanceof Event)||!("value"in r)||r.value!==null&&(!("prop"in r)||r.prop===void 0)){let{target:s}=r;s===null&&r&&"auxiliaryTarget"in r&&r.auxiliaryTarget&&(s=r.auxiliaryTarget);let a;s===void 0?a="value"in r?r.value:void 0:"value"in s?a=s.value:a=s.innerText;let c=this.getFullRef(e);T({type:bt,payload:{reference:c,value:a,context:o}}),(s===void 0||!this.isEditable(s)||this.isNonKeyInput(s))&&T({type:Tn,payload:{reference:c,pageReference:e.getPageReference(),value:a,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}})}else if(Xae(r)){let s=e.getPageReference(),a=e.getStateProps();for(let c of Object.keys(r)){let l=a[c],u=r[c];T({type:bt,payload:{reference:J.getContextPath(s,l),value:u,context:o}}),T({type:Tn,payload:{reference:J.getContextPath(s,l),value:u,context:o}})}}};static blurHandler=(e,r)=>{let{target:n}=r;n===null&&r&&"auxiliaryTarget"in r&&(n=r.auxiliaryTarget);let{value:o,validationValue:i}=n,s=this.getFullRef(e),a=e.getContextName();n.clearMessages&&dt({type:E.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:a}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?i:o),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,o),this.isNonKeyInput(n)||T({type:Tn,payload:{reference:s,pageReference:e.getPageReference(),value:o,context:a,propertyName:e.getComponentConfig().value,classID:e.getValue(d.CLASS_ID)}}))};static eventHandler=(e,r)=>{let{type:n}=r;switch(n){case"change":this.changeHandler(e,r);break;case"blur":this.blurHandler(e,r);break;default:break}n&&this.#a(e,n)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#o()};static isQueueEmpty=()=>this.#e.length===0;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},ze=xw;var Dw="CREATE_WORK",K6=t=>({type:Dw,payload:t});var ww=(t,e)=>{let r=e.UserID;if(r==null)return;let n=String(r);if(t.has(n)){let o=t.get(n);t.set(n,{...o,...e})}else t.set(n,e)},ece=t=>{if(t.length<2)return;let e=new Map;for(let r of t)ww(e,r);t.length=0;for(let r of e.values())t.push(r)};function tce(t,e,r){let n;if(!Array.isArray(t)&&typeof t=="object"){n=g.getIn(r,d.REFERENCED_USERS,{}),g.setIn(e,d.REFERENCED_USERS,{...n,...t});return}if(n=g.getIn(r,d.REFERENCED_USERS,[]),n.length===0){ece(t);return}let o=new Map;for(let i of n)ww(o,i);for(let i of t)ww(o,i);t.length=0;for(let i of o.values())t.push(i)}function rce(t,e,r,n,o,i,s){let a=n.substring(0,n.indexOf("[")),c=n.substring(n.indexOf("[")+1,n.indexOf("]")),l=e[a],u=`${g.trimDotForProperty(o)}.${a}`;s.includes(u)&&Object.hasOwn(l,P.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,t[n]),i.push(a),r.add(`${o}.${n}`))}function nce(t,e,r){let n=new Set(r);Object.keys(t).forEach(o=>{(Array.isArray(t[o])&&!n.has(o)||!Array.isArray(t[o])&&!Object.hasOwn(e,o))&&delete t[o]})}var J6=(t,e,r,n,o="")=>{let i=[];Object.keys(t).forEach(s=>{typeof t[s]=="object"&&s.includes("[")?rce(t,e,r,s,o,i,n):t[s]&&typeof t[s]=="object"?(e[s]||(e[s]=Array.isArray(t[s])?[]:{}),J6(t[s],e[s],r,n,`${o}.${s}`)):e[s]=t[s]}),nce(e,t,i)},oce=(t,e,r)=>{let n=new Set;t.forEach(o=>{o=g.trimDotForProperty(o);let[i,s,a]=Vi.getPageListNameAndIndexFromPageName(o);if(i&&s&&a&&!n.has(`${i}.${s}`)){let c=g.getIn(r,`${i}.${s}`)||[];Array.isArray(c)&&c.forEach((l,u)=>{u!==+a&&g.setIn(e,`${i}.${s}[${u}]`,l)}),n.add(`${i}.${s}`)}})},ice=(t,e,r)=>{if(!r||r.length===0)return e;let n=Oh(t),o={},i=!1;return r.forEach(s=>{Object.hasOwn(n,s)&&g.hasIn(e,oo(s).slice(0,-1))&&(g.setIn(o,s,n[s]),i=!0)}),i?xt(e,o,{isArrayDeepMerge:!0}):e},Re=(t,e={})=>{let{serverPrecedenceFields:r=[],propertiesToReplace:n=[],propertiesToReArrange:o=[],preserveFields:i}=e,{context:s,data:a,isArrayDeepMerge:c,preserveClientChanges:l=!1}=t,u=xc(s,!0),p=W(s),m={};if(l&&p&&a){m=g.deepClone(p);let S=g.deepClone(a);o.length>0&&g.rearrangeProperties(o,m);let A=new Set;J6(u,m,A,o),oce(A,m,S)}let f=a?g.getIn(a,d.REFERENCED_USERS):void 0;f!==void 0&&tce(f,a,p);let h=a;if(l){let S=g.getIn(t?.data,d.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),A=B.isExternalObject(S),C=A?{[d.OBJECT_INFO.OBJECT_INFO]:{[d.CONTENT]:{...m[d.OBJECT_INFO.OBJECT_INFO]?.[d.CONTENT]}}}:{[d.CASE_INFO.CASE_INFO]:{[d.CONTENT]:{...m[d.CASE_INFO.CASE_INFO]?.[d.CONTENT]}}},I=A?d.OBJECT_INFO.OBJECT_INFO_CONTENT:d.CASE_INFO.CASE_INFO_CONTENT;r.forEach(_=>{let N=`${I}.${_}`;g.deleteIn(C,N)}),h=xt(a,C,{isArrayDeepMerge:c??!0})}else f6(s,a,i),h=ice(s,a,i);return{type:Er,payload:{...t,data:h,...n.length>0?{propertiesToReplace:n}:null,...o.length>0?{propertiesToReArrange:o}:null}}},sce=t=>({type:Ik,payload:t}),Pm=t=>({type:Bl,payload:t}),ace=t=>({type:Pr,payload:t}),cce=t=>({type:bk,payload:t}),lce=t=>({type:Go,payload:t}),Gx=t=>({type:Kl,payload:t}),wc=t=>({type:qo,payload:t}),Pt=t=>({type:St,payload:t}),qx=t=>({type:Ms,payload:t}),_h=t=>({type:ks,payload:t}),YD=t=>({type:uo,payload:t}),ZD=t=>({type:Ls,payload:t}),QD=t=>({type:ki,payload:t}),tr=t=>{let{containerItemID:e}=t;t.suggestionContexts=Dh(e);let r=t?.data?.caseInfo?.content,n=Object.keys(r||{}).length>0;return t.propertiesToReplace||(t.propertiesToReplace=n?B.getPropertiesToReplace(e):[]),{type:kt,payload:t}},Mh=t=>{let{context:e}=t;return{type:ws,payload:{context:e}}},gs=t=>{let{context:e}=t;return{type:To,payload:{context:e}}},uce=t=>({type:Us,payload:t}),rr=t=>({type:nr,payload:t}),wm=t=>({type:Fs,payload:t}),Qe=t=>{let{context:e,containerItemID:r}=t,n=e;return n||(n=pe(r)),t.context=n,t.deleteContext=!HD(r),t.childContainers=Ke(r),t.childContainersContexts=wo(r),t.transientItems=Ei([...t.childContainersContexts,r]),t.suggestionContexts=Dh(r),r===e&&(t.caseID=oe(d.CASE_INFO.CASE_INFO_ID,"",e)||oe(d.OBJECT_INFO.OBJECT_INFO_ID,"",e),t.RemoteSystemID=oe(d.CASE_INFO.REMOTESYSTEMID,"",e)),{type:Ze,payload:t}},$w=t=>{let{containerItemID:e}=t;return t.transientItems=Ei([...wo(e),e]),{type:Ko,payload:t}},Ih=t=>{let{transientItemID:e}=t;return t.transientItems=[e],{type:Wo,payload:t}},kn=t=>{let{context:e,containerItemID:r}=t,n=e;if(n||(n=pe(r)),t.context=n,t.childContainers=Ke(r),t.childContainersContexts=wo(r),t.transientItems=Ei([...t.childContainersContexts,r]),t.suggestionContexts=Dh(r),r===e){t.caseID=oe(d.CASE_INFO.CASE_INFO_ID,"",e),t.RemoteSystemID=oe(d.CASE_INFO.REMOTESYSTEMID,"",e);let o=oe(d.CASE_INFO.CASE_INFO_CLASSNAME,"",e);ae.isTraditionalRemoteCase(o)&&(t.skipReleaseLockRequest=!0)}return{type:et,payload:t}},dce=t=>({type:vo,payload:t}),pce=t=>({type:$i,payload:t}),mce=t=>({type:Qy,payload:t}),V=(t,...e)=>(ze.resume(),t(...e)),Qi=(t,e,r,n,o)=>({type:Te,payload:{msg:t,err:e,context:r,formFields:n,actionMgrID:o}}),Mw=t=>({type:Jo,payload:t}),kw=t=>({type:Ql,payload:t}),Kn=t=>({type:po,payload:t}),fce=t=>({type:Hk,payload:t}),DT=t=>({type:Gl,payload:t}),sa=t=>({type:bt,payload:t});var gce="VIEW",hce="PAGE",Fw="add",Z6="replace",Uw=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"],P_="",kh="Home",Q6="",jw=!0,N_=t=>(jw=t,jw),X6=()=>jw,At=(t,e,r)=>_e.getSemanticURL(t,e,r),Tc=(t,e)=>_e.getRestEndPoint(t,e),U=(t,e)=>{let r=gt.getServerURL(),n=Tc(t,e);return n?(n.restApi?.startsWith("/")||(n.restApi=`/${n.restApi}`),r?.endsWith("/")&&(r=r.substring(0,r.length-1)),n.restApi=r+n.restApi,n):{}},yce=t=>{if(t&&t.root){let{root:e}=t,{resources:r}=t,{views:n}=r,i=e.config,s=i.type,a=i.name;if(s.toUpperCase()===gce){let c=n[a],l=c;Array.isArray(c)&&c.length>0&&([l]=c);let u=l.config;if(u.type){let p=u.type;return!!(u.urlPath&&p.toUpperCase()===hce)}}return!1}return!1},Y6=(t,e,r)=>{let{root:n,resources:o}=t,{views:i}=o,{config:s}=n,a=Fw,c="";if(r)c=r;else{let u=i[s.name],p=u;Array.isArray(u)&&u.length>0&&([p]=u),c=p.config.urlPath}let l=c.match(Ic);if(l){let u=g.getIn(e,s.context);c=c.replace(l[0],u.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:a}},Sce=(t,e,r)=>{for(let[o,i]of e.entries())!t.has(o)&&Uw.includes(o)&&t.append(o,i);r&&!t.has("lang")&&t.append("lang",r);let n=_e.getRoutingInfo()?.embedQueryParams;if(n)for(let[o,i]of Object.entries(n))t.has(o)||t.append(o,String(i));return t},zw=(t,e)=>{let r=`${t}/${e}`;if(!(v.getRenderingMode()==="EMBED"))return r;let o=_e.getRoutingInfo()?.authServiceAlias;if(!o)return r;let i=encodeURIComponent(o),s;try{s=new URL(r)}catch{return r}let a=s.pathname.split("/").filter(Boolean),c=a.findIndex(p=>p.toLowerCase()==="app");if(c<0)return r;a[c-1]?.toLowerCase()!=="prauth"&&a.splice(c,0,"PRAuth");let u=a.findIndex(p=>p.toLowerCase()==="app")+2;return(u===a.length||a[u]!==i)&&a.splice(u,0,i),s.pathname=`/${a.join("/")}`,s.toString().replace(/\/$/,"")},Ece=(t,e,r,n,o)=>{let i=_e.getStaticRoutePage(),s=kh?.toLowerCase();return(i?.toLowerCase()===s||n.toLowerCase()===s)&&!o.has("noPortal")?zw(e,r):t},e9=(t,e,r,n)=>{let o,i;ni(e)?o=zw(t,e):o=t;let s=ni(r?.pxURLPath||"");s&&(o=`${o}/${s}`);try{i=new URL(o).searchParams,o=o.includes("?")?o.split("?")[0]:o}catch(l){return console.log("Invalid url",l),""}let a=new URLSearchParams(P6());if(Yi()?(o=Ece(o,t,e,s,a),_e.setStaticRoutePage("")):s.toLowerCase()===kh.toLowerCase()&&!a.has("noPortal")&&(o=zw(t,e)),!_e.isDefaultPortal()){let l=_e.getPortalName();a.has("portal")?a.set("portal",l):a.append("portal",l)}i=Sce(i,a,n);let c=bc(i.toString());return c&&(o+=`?${c}`),o},Ace=(t,e,r)=>{if(t=t&&t!==""?t:_e.getApplicationName(),t=i2(t),r===`${P_}/${e}/`)return{title:t};let o=new URL(r).pathname.replace(`${e}/`,""),i=o.split("/");return o2(o)?{title:`${t} - ${i[i.length-1]}`}:{title:`${t} - ${i[0]}`}},t9=(t,{urlPathObjParam:e,infoParam:r,optionsParam:n,queryParam:o},i=!1,s)=>{let a,c,l;if(window.PCore.getBehaviorOverride("dynamicSemanticUrl")===!1)return;if(i)a=e,c=r,l=n;else{let{uiResources:f,data:h}=t;({options:l}=t),e&&e.pxURLPath&&$o(e.pxURLPath)?a=Y6(f,h,e.pxURLPath):a=e||Y6(f,h),c=_e.getEndPointInfo(a.pxURLPath),a.pxURLPath=c.urlPath}let u=e9(P_,_e.getApplicationPath(),a,s),{title:p}=Ace(Q6,_e.getApplicationPath(),u),m=_6(c,{...l,title:p});a?.historyAction===Fw?I6(m,p,u):a?.historyAction===Z6&&(o&&(u+=`?${o}`),b6(m,p,u))},r9=(t,e)=>{let r=null;t.directUrlUpdation&&(r={historyAction:Fw,pxURLPath:""},r.pxURLPath=t.semanticURL),t9(t,{urlPathObjParam:r,infoParam:null,optionsParam:null},!1,e)},O6=(t,e)=>{r9(t,e)},x6=(t,e)=>{let r={pxURLPath:t};return e9(P_,_e.getApplicationPath(),r,e)},qi=t=>{let{uiResources:e}=t;X6()&&(t.directUrlUpdation||yce(e))&&r9(t)},n9=t=>{let e={routeEndpoint:t.routeEndpoint,requestType:t.requestType,payload:t.payload,routeKey:t.routeKey,options:null};return t.options&&(e.options=t.options),e},Cce=t=>t?ae.isRemoteCase(t)&&(ae.isTraditionalRemoteCase(t)||ae.isRemoteCaseVersionDifferent(t)):!1,o9=(t,e,r)=>{let{caseClassName:n,workID:o}=t.payload,{containerName:i,context:s}=e,{RemoteClassGroup:a,RemoteSystemID:c,name:l}=ae.getRemoteCase(n),u={...t,headers:{RemoteSystemID:c},className:n,isTraditionalRemoteCase:ae.isTraditionalRemoteCase(n),isRemoteCase:ae.isRemoteCase(n),action:mS,viewName:gS,gadgetId:B.getUniqueGadgetId(),context:r??s,skipSemanticUrl:!0,insKey:`${a?.toUpperCase()} ${o}`,containerName:i,name:l};T(rt["showPage"](u))},Lw=!1,_ce=async t=>{if(Lw){Lw=!1;return}let e="showHistory",r=T6(t);if(r){let n=zo(),o=se(`${n}/primary`);if(o&&wh(o)){let i=Nr().getLocaleValue(Tu,"Messages");if(!await oi.confirm(i)){Lw=!0,window.history.go(1);return}}ae.isRemoteCase(r.payload?.caseClassName)?o9({...r},r.options):T(rt[e](n9(r)))}},Lh=()=>{let t=_e.getApplicationPath(),e=Gd();return t!==e},i9=(t,e)=>{let r={restApi:""};try{if(Lh()&&!e){let n=Gd(),o=_e.processUrl(n,!0),i=_e._getMatchedRouteInRoutingTable(o)||"",s=_e.getRoutingInfo(),a=_e.processUrl(n,!1).split("/"),c=a[a.length-1],l=s?.routes?.[i]?.payload?.caseID?.replace("{workID}",c).replace("{id}",c);r=_e.getRestEndPoint("loadView",{caseID:l,viewID:t})||{}}else r=_e.getRestEndPoint("showView",{page:t,pageClass:e})||{}}catch{}return r},s9=()=>{if(Lh()){let t=_e.processUrl(Gd(),!0);return!!_e._getMatchedRouteInRoutingTable(t)}return!1},Ice=(t,e)=>{let r=_e.getRoutingInfo();if(Yi()&&Object.values(r?.routes??{}).find(c=>c?.payload?.pageClass===e&&c?.payload?.page===t))return t;let n=t.split(" ").join(""),o=t.split(" ").join("-").toLowerCase(),i=a2(t);return r?.routes?.[n]?n:r?.routes?.[o]?o:r?.routes?.[i]?i:t},bce=t=>{kh=t};var Tce=()=>{let t=v.getIsExtraCallRequiredForDefaultHome();return t===!0||t==="true"},a9=t=>{let{acName:e,context:r,defaultViewLabel:n,ruleName:o,className:i}=t,s=Ice(o||n,i);bce(s),_e.setDefaultRoute(s),_e.setDefaultClassName(i);let a=lr(e,r),c=Z(e,r),l=Tce(),u={historyAction:Z6,pxURLPath:""},p,m=null,f={acName:c,context:a,actionConfig:{context:a}};if(l||!l&&Lh()){let h=iE(y_());v.shouldUseURLParams()&&(m=h.includes("?")?h.split("?")[1]:null),p=c2(h,f),u.pxURLPath=p.urlPath,typeof p.payload?.pageClass<"u"&&(p.payload.pageClass=De()?.getState()?.data?.app?.pyPortal?.classID);let S="showHistory",A={routeEndpoint:p.routeEndpoint,requestType:p.requestType,payload:p.payload,options:f,routeKey:p.routeKey};Cce(p?.payload?.caseClassName)?o9(A,t,f.context):T(rt[S](n9(A)))}else p=_e.getEndPointInfo(kh),u.pxURLPath="";t9(null,{urlPathObjParam:u,infoParam:p,optionsParam:f,queryParam:m},!0)},Uh=(t,e=!1)=>{P_=t.domain,e===!1&&X6()&&(v6(_ce),R6()),_e.init(t,kh)},c9=t=>{_e.addRoutes(t)},l9=t=>{t&&(Q6=t.pyLabel)},D6=t=>{C6(t)},S_=t=>{for(let e of t)Uw.includes(e)||Uw.push(e)};function Hr(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Rce=typeof Symbol=="function"&&Symbol.observable||"@@observable",u9=Rce,Vw=()=>Math.random().toString(36).substring(7).split("").join("."),Pce={INIT:`@@redux/INIT${Vw()}`,REPLACE:`@@redux/REPLACE${Vw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vw()}`},O_=Pce;function x_(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Bw(t,e,r){if(typeof t!="function")throw new Error(Hr(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Hr(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(Bw)(t,e)}let n=t,o=e,i=new Map,s=i,a=0,c=!1;function l(){s===i&&(s=new Map,i.forEach((A,C)=>{s.set(C,A)}))}function u(){if(c)throw new Error(Hr(3));return o}function p(A){if(typeof A!="function")throw new Error(Hr(4));if(c)throw new Error(Hr(5));let C=!0;l();let I=a++;return s.set(I,A),function(){if(C){if(c)throw new Error(Hr(6));C=!1,l(),s.delete(I),i=null}}}function m(A){if(!x_(A))throw new Error(Hr(7));if(typeof A.type>"u")throw new Error(Hr(8));if(typeof A.type!="string")throw new Error(Hr(17));if(c)throw new Error(Hr(9));try{c=!0,o=n(o,A)}finally{c=!1}return(i=s).forEach(I=>{I()}),A}function f(A){if(typeof A!="function")throw new Error(Hr(10));n=A,m({type:O_.REPLACE})}function h(){let A=p;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Hr(11));function I(){let N=C;N.next&&N.next(u())}return I(),{unsubscribe:A(I)}},[u9](){return this}}}return m({type:O_.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:f,[u9]:h}}function Nce(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:O_.INIT})>"u")throw new Error(Hr(12));if(typeof r(void 0,{type:O_.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function d9(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let n=Object.keys(r),o,i;try{Nce(r)}catch(s){i=s}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<n.length;p++){let m=n[p],f=r[m],h=a[m],S=f(h,c);if(typeof S>"u"){let A=c&&c.type;throw new Error(Hr(14))}u[m]=S,l=l||S!==h}return l=l||n.length!==Object.keys(a).length,l?u:a}}function jh(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function p9(...t){return e=>(r,n)=>{let o=e(r,n),i=()=>{throw new Error(Hr(15))},s={getState:o.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(s));return i=jh(...a)(o.dispatch),{...o,dispatch:i}}}function m9(t){return x_(t)&&"type"in t&&typeof t.type=="string"}var _9=Symbol.for("immer-nothing"),f9=Symbol.for("immer-draftable"),sn=Symbol.for("immer-state");function Fo(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var io=Object,Kd=io.getPrototypeOf,M_="constructor",F_="prototype",Ww="configurable",k_="enumerable",w_="writable",zh="value",bi=t=>!!t&&!!t[sn];function so(t){return t?I9(t)||B_(t)||!!t[f9]||!!t[M_]?.[f9]||H_(t)||G_(t):!1}var Oce=io[F_][M_].toString(),g9=new WeakMap;function I9(t){if(!t||!t0(t))return!1;let e=Kd(t);if(e===null||e===io[F_])return!0;let r=io.hasOwnProperty.call(e,M_)&&e[M_];if(r===Object)return!0;if(!Wd(r))return!1;let n=g9.get(r);return n===void 0&&(n=Function.toString.call(r),g9.set(r,n)),n===Oce}function V_(t,e,r=!0){Bh(t)===0?(r?Reflect.ownKeys(t):io.keys(t)).forEach(o=>{e(o,t[o],t)}):t.forEach((n,o)=>e(o,n,t))}function Bh(t){let e=t[sn];return e?e.type_:B_(t)?1:H_(t)?2:G_(t)?3:0}var Hw=(t,e,r=Bh(t))=>r===2?t.has(e):io[F_].hasOwnProperty.call(t,e),Kw=(t,e,r=Bh(t))=>r===2?t.get(e):t[e],L_=(t,e,r,n=Bh(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function xce(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var B_=Array.isArray,H_=t=>t instanceof Map,G_=t=>t instanceof Set,t0=t=>typeof t=="object",Wd=t=>typeof t=="function",Gw=t=>typeof t=="boolean";function Dce(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var hs=t=>t.copy_||t.base_;var r0=t=>t.modified_?t.copy_:t.base_;function Jw(t,e){if(H_(t))return new Map(t);if(G_(t))return new Set(t);if(B_(t))return Array[F_].slice.call(t);let r=I9(t);if(e===!0||e==="class_only"&&!r){let n=io.getOwnPropertyDescriptors(t);delete n[sn];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],a=n[s];a[w_]===!1&&(a[w_]=!0,a[Ww]=!0),(a.get||a.set)&&(n[s]={[Ww]:!0,[w_]:!0,[k_]:a[k_],[zh]:t[s]})}return io.create(Kd(t),n)}else{let n=Kd(t);if(n!==null&&r)return{...t};let o=io.create(n);return io.assign(o,t)}}function n0(t,e=!1){return q_(t)||bi(t)||!so(t)||(Bh(t)>1&&io.defineProperties(t,{set:D_,add:D_,clear:D_,delete:D_}),io.freeze(t),e&&V_(t,(r,n)=>{n0(n,!0)},!1)),t}function wce(){Fo(2)}var D_={[zh]:wce};function q_(t){return t===null||!t0(t)?!0:io.isFrozen(t)}var U_="MapSet",Yw="Patches",h9="ArrayMethods",b9={};function ul(t){let e=b9[t];return e||Fo(0,t),e}var y9=t=>!!b9[t];var Fh,T9=()=>Fh,$ce=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:y9(U_)?ul(U_):void 0,arrayMethodsPlugin_:y9(h9)?ul(h9):void 0});function S9(t,e){e&&(t.patchPlugin_=ul(Yw),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Zw(t){Qw(t),t.drafts_.forEach(Mce),t.drafts_=null}function Qw(t){t===Fh&&(Fh=t.parent_)}var E9=t=>Fh=$ce(Fh,t);function Mce(t){let e=t[sn];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function A9(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[sn].modified_&&(Zw(e),Fo(4)),so(t)&&(t=C9(e,t));let{patchPlugin_:o}=e;o&&o.generateReplacementPatches_(r[sn].base_,t,e)}else t=C9(e,r);return kce(e,t,!0),Zw(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==_9?t:void 0}function C9(t,e){if(q_(e))return e;let r=e[sn];if(!r)return j_(e,t.handledSet_,t);if(!W_(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);P9(r,t)}return r.copy_}function kce(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&n0(e,r)}function v9(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var W_=(t,e)=>t.scope_===e,Lce=[];function R9(t,e,r,n){let o=hs(t),i=t.type_;if(n!==void 0&&Kw(o,n,i)===e){L_(o,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;V_(o,(c,l)=>{if(bi(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let s=t.draftLocations_.get(e)??Lce;for(let a of s)L_(o,a,r,i)}function Uce(t,e,r){t.callbacks_.push(function(o){let i=e;if(!i||!W_(i,o))return;o.mapSetPlugin_?.fixSetContents(i);let s=r0(i);R9(t,i.draft_??i,s,r),P9(i,o)})}function P9(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let o=n.getPath(t);o&&n.generatePatches_(t,o,e)}v9(t)}}function jce(t,e,r){let{scope_:n}=t;if(bi(r)){let o=r[sn];W_(o,n)&&o.callbacks_.push(function(){$_(t);let s=r0(o);R9(t,r,s,e)})}else so(r)&&t.callbacks_.push(function(){let i=hs(t);t.type_===3?i.has(r)&&j_(r,n.handledSet_,n):Kw(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&j_(Kw(t.copy_,e,t.type_),n.handledSet_,n)})}function j_(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||bi(t)||e.has(t)||!so(t)||q_(t)||(e.add(t),V_(t,(n,o)=>{if(bi(o)){let i=o[sn];if(W_(i,r)){let s=r0(i);L_(t,n,s,t.type_),v9(i)}}else so(o)&&j_(o,e,r)})),t}function zce(t,e){let r=B_(t),n={type_:r?1:0,scope_:e?e.scope_:T9(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,i=z_;r&&(o=[n],i=Vh);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,[a,n]}var z_={get(t,e){if(e===sn)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let o=hs(t);if(!Hw(o,e,t.type_))return Vce(t,o,e);let i=o[e];if(t.finalized_||!so(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&Dce(e))return i;if(i===qw(t.base_,e)||Fce(t,e,i)){$_(t);let s=t.type_===1?+e:e,a=e0(t.scope_,i,t,s);return t.copy_[s]=a}return i},has(t,e){return e in hs(t)},ownKeys(t){return Reflect.ownKeys(hs(t))},set(t,e,r){let n=N9(hs(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let o=qw(hs(t),e),i=o?.[sn];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(xce(r,o)&&(r!==void 0||Hw(t.base_,e,t.type_)))return!0;$_(t),Xw(t)}return t.copy_[e]===r&&(r!==void 0||Hw(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),jce(t,e,r)),!0},deleteProperty(t,e){return $_(t),qw(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Xw(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=hs(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[w_]:!0,[Ww]:t.type_!==1||e!=="length",[k_]:n[k_],[zh]:r[e]}},defineProperty(){Fo(11)},getPrototypeOf(t){return Kd(t.base_)},setPrototypeOf(){Fo(12)}},Vh={};for(let t in z_){let e=z_[t];Vh[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Vh.deleteProperty=function(t,e){return Vh.set.call(this,t,e,void 0)};Vh.set=function(t,e,r){return z_.set.call(this,t[0],e,r,t[0])};function qw(t,e){let r=t[sn];return(r?hs(r):t)[e]}function Fce(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!so(r)||r[sn]?!1:t.baseRefs_.has(r)}function Vce(t,e,r){let n=N9(e,r);return n?zh in n?n[zh]:n.get?.call(t.draft_):void 0}function N9(t,e){if(!(e in t))return;let r=Kd(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Kd(r)}}function Xw(t){t.modified_||(t.modified_=!0,t.parent_&&Xw(t.parent_))}function $_(t){t.copy_||(t.assigned_=new Map,t.copy_=Jw(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Bce=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(Wd(e)&&!Wd(r)){let i=r;r=e;let s=this;return function(c=i,...l){return s.produce(c,u=>r.call(this,u,...l))}}Wd(r)||Fo(6),n!==void 0&&!Wd(n)&&Fo(7);let o;if(so(e)){let i=E9(this),s=e0(i,e,void 0),a=!0;try{o=r(s),a=!1}finally{a?Zw(i):Qw(i)}return S9(i,n),A9(o,i)}else if(!e||!t0(e)){if(o=r(e),o===void 0&&(o=e),o===_9&&(o=void 0),this.autoFreeze_&&n0(o,!0),n){let i=[],s=[];ul(Yw).generateReplacementPatches_(e,o,{patches_:i,inversePatches_:s}),n(i,s)}return o}else Fo(1,e)},this.produceWithPatches=(e,r)=>{if(Wd(e))return(s,...a)=>this.produceWithPatches(s,c=>e(c,...a));let n,o;return[this.produce(e,r,(s,a)=>{n=s,o=a}),n,o]},Gw(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Gw(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Gw(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){so(t)||Fo(8),bi(t)&&(t=O9(t));let e=E9(this),r=e0(e,t,void 0);return r[sn].isManual_=!0,Qw(e),r}finishDraft(t,e){let r=t&&t[sn];(!r||!r.isManual_)&&Fo(9);let{scope_:n}=r;return S9(n,e),A9(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));let n=ul(Yw).applyPatches_;return bi(t)?n(t,e):this.produce(t,o=>n(o,e))}};function e0(t,e,r,n){let[o,i]=H_(e)?ul(U_).proxyMap_(e,r):G_(e)?ul(U_).proxySet_(e,r):zce(e,r);return(r?.scope_??T9()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Uce(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),o}function O9(t){return bi(t)||Fo(10,t),x9(t)}function x9(t){if(!so(t)||q_(t))return t;let e=t[sn],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Jw(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=Jw(t,!0);return V_(r,(o,i)=>{L_(r,o,x9(i))},n),e&&(e.finalized_=!1),r}var Hce=new Bce,o0=Hce.produce;function D9(t){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,t):o(i)}var w9=D9(),$9=D9;var Gce=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jh:jh.apply(null,arguments)},_We=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},qce=t=>t&&typeof t.match=="function";function ka(t,e){function r(...n){if(e){let o=e(...n);if(!o)throw new Error(K_(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>m9(n)&&n.type===t,r}var j9=class Hh extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Hh.prototype)}static get[Symbol.species](){return Hh}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Hh(...e[0].concat(this)):new Hh(...e.concat(this))}};function M9(t){return so(t)?o0(t,()=>{}):t}function Wce(t){return typeof t=="boolean"}var Kce=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=e??{},s=new j9;return r&&(Wce(r)?s.push(w9):s.push($9(r.extraArgument))),s},Jce="RTK_autoBatch";var k9=t=>e=>{setTimeout(e,t)},Yce=(t,e)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),r())},i=t(o),s=setTimeout(o,e)},Zce=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),o=!0,i=!1,s=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Yce(window.requestAnimationFrame,100):k9(10):t.type==="callback"?t.queueNotification:k9(t.timeout),l=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let p=()=>o&&u(),m=n.subscribe(p);return a.add(u),()=>{m(),a.delete(u)}},dispatch(u){try{return o=!u?.meta?.[Jce],i=!o,i&&(s||(s=!0,c(l))),n.dispatch(u)}finally{o=!0}}})},Qce=t=>function(r){let{autoBatch:n=!0}=r??{},o=new j9(t);return n&&o.push(Zce(typeof n=="object"?n:void 0)),o};function z9(t){let e=Kce(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(x_(r))c=d9(r);else throw new Error(K_(1));let l;typeof n=="function"?l=n(e):l=e();let u=jh;o&&(u=Gce({trace:!1,...typeof o=="object"&&o}));let p=p9(...l),m=Qce(p),f=typeof a=="function"?a(m):m(),h=u(...f);return Bw(c,s,h)}function Xce(t){let e={},r=[],n,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(K_(28));if(a in e)throw new Error(K_(29));return e[a]=s,o},addAsyncThunk(i,s){return s.pending&&(e[i.pending.type]=s.pending),s.rejected&&(e[i.rejected.type]=s.rejected),s.fulfilled&&(e[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),o},addMatcher(i,s){return r.push({matcher:i,reducer:s}),o},addDefaultCase(i){return n=i,o}};return t(o),[e,r,n]}function ele(t){return typeof t=="function"}function Ti(t,e){let[r,n,o]=Xce(e),i;if(ele(t))i=()=>M9(t());else{let a=M9(t);i=()=>a}function s(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,p)=>{if(p)if(bi(u)){let f=p(u,c);return f===void 0?u:f}else{if(so(u))return o0(u,m=>p(m,c));{let m=p(u,c);if(m===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return u},a)}return s.getInitialState=i,s}var tle=(t,e)=>qce(t)?t.match(e):t(e);function rle(...t){return e=>t.some(r=>tle(r,e))}var nle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ole=(t=21)=>{let e="",r=t;for(;r--;)e+=nle[Math.random()*64|0];return e},ile=["name","message","stack","code"],i0=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},L9=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},sle=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of ile)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},U9="External signal was aborted",ale=(()=>{function t(e,r,n){let o=ka(e+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ka(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),s=ka(e+"/rejected",(c,l,u,p,m)=>({payload:p,error:(n&&n.serializeError||sle)(c||"Rejected"),meta:{...m||{},arg:u,requestId:l,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,p,m)=>{let f=n?.idGenerator?n.idGenerator(c):ole(),h=new AbortController,S,A;function C(_){A=_,h.abort()}l&&(l.aborted?C(U9):l.addEventListener("abort",()=>C(U9),{once:!0}));let I=(async function(){let _;try{let x=n?.condition?.(c,{getState:p,extra:m});if(lle(x)&&(x=await x),x===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let H=new Promise((G,re)=>{S=()=>{re({name:"AbortError",message:A||"Aborted"})},h.signal.addEventListener("abort",S,{once:!0})});u(i(f,c,n?.getPendingMeta?.({requestId:f,arg:c},{getState:p,extra:m}))),_=await Promise.race([H,Promise.resolve(r(c,{dispatch:u,getState:p,extra:m,requestId:f,signal:h.signal,abort:C,rejectWithValue:((G,re)=>new i0(G,re)),fulfillWithValue:((G,re)=>new L9(G,re))})).then(G=>{if(G instanceof i0)throw G;return G instanceof L9?o(G.payload,f,c,G.meta):o(G,f,c)})])}catch(x){_=x instanceof i0?s(null,f,c,x.payload,x.meta):s(x,f,c)}finally{S&&h.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&s.match(_)&&_.meta.condition||u(_),_})();return Object.assign(I,{abort:C,requestId:f,arg:c,unwrap(){return I.then(cle)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:rle(s,o),typePrefix:e})}return t.withTypes=()=>t,t})();function cle(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function lle(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ule=Symbol.for("rtk-slice-createasyncthunk"),bWe={[ule]:ale};var F9="listener",V9="completed",B9="cancelled",TWe=`task-${B9}`,vWe=`task-${V9}`,RWe=`${F9}-${B9}`,PWe=`${F9}-${V9}`;var{assign:H9}=Object;var s0="listenerMiddleware";var dle=H9(ka(`${s0}/add`),{withTypes:()=>dle}),NWe=ka(`${s0}/removeAll`),ple=H9(ka(`${s0}/remove`),{withTypes:()=>ple});function K_(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var a0=(t=>{let e=new Set,r=e,n=()=>{e===r&&(e=new Set(e))},o=s=>{let a=!0;return n(),e.add(s),()=>{a&&(n(),e.delete(s),a=!1)}},i=()=>{let s=Array.from(e);r=e,s.forEach(a=>a())};return(...s)=>{let a=t(...s),c=!1,l=!1,u=m=>Array.isArray(m)?m.map(u):a.dispatch(m),p=m=>{let f=l;f||(c=!1,l=!0);let h=u(m),S=c&&!f;return f||(c=!1,l=!1),S&&i(),h};return a.subscribe(()=>{l?c=!0:i()}),{...a,dispatch:p,subscribe:o}}});var G9=t=>!!t&&typeof t=="object"&&!Array.isArray(t),mle=(t,e)=>{if(Object.keys(e).length===0)return;Zt.updateDataPageStore(e),t[d.SHARED]||(t[d.SHARED]={});let r=t[d.SHARED];Object.entries(e).forEach(([n,o])=>{let i=r[n];G9(i)&&G9(o)?r[n]={...i,...o}:r[n]=o})},La=(t,e)=>{let{data:{shared:r={}}={},context:n}=e;if(Object.keys(r).length===0){n&&g.deleteIn(t,[n,"shared"]);return}mle(t,r),n&&g.deleteIn(t,[n,"shared"])},dl=(t,e,r=!1)=>{let{context:n,caseViewMode:o=r?void 0:d.PERFORM_MODE,containerName:i}=e;i!==ge.WORKAREA&&o&&g.setIn(t,[n,"context_data","caseViewMode"],o)},c0=(t,e)=>{let{context:r}=e;g.setIn(t,[r,"context_data","actionType"],e.actionType),g.setIn(t,[r,"context_data","assignmentID"],e.assignmentID)},q9=(t,e)=>{let{context:r}=e;g.deleteIn(t,[r,"context_data","blocking_action_counter"]),g.deleteIn(t,[r,"context_data","deferred_action_queue"])};var Gh=t=>t!==null&&typeof t=="object",W9=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},l0=(t,e=[])=>{e.forEach(r=>g.deleteIn(t,r))},u0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,r)})},J_=(t,e,r={})=>{let{deleteAssignmentSpecificResources:n=!0,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r;g.deleteIn(t,[e,"nextAssignmentInfo"]),i&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableActions"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"availableProcesses"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"assignments"])),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"activeActionID"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"childCases"]),o&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"confirmationLinks"]),g.deleteIn(t,[e,"caseMessages"])),n&&(g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"actionButtons"]),g.deleteIn(t,[e,d.CASE_INFO.CASE_INFO,"navigation"]))},fle=(t,e)=>{let{containerItemID:r,context:n,deleteContext:o}=e;o&&g.deleteIn(t,[n]),g.deleteIn(t,[r])},gle={},hle=Ti(gle,t=>{t.addCase(St,(e,r)=>{if(!r.payload.data||e[r.payload.context])return;r.payload.doDeleteCaseSummary&&J_(e,r.payload.context);let{target:n}=r.payload;n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))?e[r.payload.context]=r.payload.data:e[r.payload.containerItemID]=r.payload.data,dl(e,r.payload),c0(e,r.payload),La(e,r.payload),q9(e,r.payload)}).addCase(kt,(e,r)=>{r.payload.doDeleteCaseSummary&&J_(e,r.payload.context,{deleteAssignmentSpecificResources:r.payload.deleteAssignmentSpecificResources});let{target:n,propertiesToReplace:o=[]}=r.payload;if(n&&(n.includes(d.WORKAREA)||n.includes(d.MODAL))){let i=e[r.payload.context];Gh(i)&&(e[r.payload.context]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}else{let i=e[r.payload.containerItemID];Gh(i)&&(e[r.payload.containerItemID]=xt(i,r.payload.data,{propertiesToReplace:[...o]}))}(r.payload.actionType||r.payload.assignmentID)&&c0(e,r.payload),dl(e,r.payload),La(e,r.payload),l0(e,r.payload.suggestionContexts)}).addCase(Ze,(e,r)=>{let{childContainersContexts:n=[]}=r.payload;fle(e,r.payload),u0(e,n),W9(e,r.payload.transientItems),l0(e,r.payload.suggestionContexts)}).addCase(qo,(e,r)=>{let{containerItems:n}=r.payload;Array.isArray(n)?n.forEach(o=>{g.deleteIn(e,[o])}):g.deleteIn(e,[n])}).addCase(Us,(e,r)=>{let{context:n,contextToBeRemoved:o,data:i,childContainersContextsToBeRemoved:s}=r.payload;J_(e,r.payload.context),dl(e,r.payload);let a=e[n],c=e[o];if(!Gh(a)||!Gh(c))return;let l=xt(a,c);Gh(l)&&(e[n]=xt(l,i),g.deleteIn(e,[o]),u0(e,s),La(e,r.payload))}).addCase(et,(e,r)=>{let{context:n,pulseReplace:o=!0,childContainersContexts:i=[]}=r.payload,{data:s}=r.payload,a=g.getIn(e[n],"pulse"),c=g.getIn(e[n],"OperatorID"),l=g.getIn(e[n],"pxRequestor");g.setIn(e,n,s),l&&g.setIn(e,[n,"pxRequestor"],s.pxRequestor?g.mergeDeep(l,s.pxRequestor):l),c&&g.setIn(e,[n,"OperatorID"],s.OperatorID?g.mergeDeep(c,s.OperatorID):c),!o&&a&&g.setIn(e,[n,"pulse"],a),dl(e,r.payload),La(e,r.payload),u0(e,i),W9(e,r.payload.transientItems),l0(e,r.payload.suggestionContexts)}).addCase(pn,(e,r)=>{let{context:n,doDeleteConfirmationDetails:o=!0,skipMergeAssignmentsAndActions:i=!0}=r.payload;J_(e,n,{doDeleteConfirmationDetails:o,skipMergeAssignmentsAndActions:i})}).addCase(Ms,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.setIn(e,n,o)}).addCase(Wo,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(Ko,(e,r)=>{let{transientItems:n}=r.payload;n.forEach(o=>g.deleteIn(e,o))}).addCase(ks,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(uo,(e,r)=>{let{transientItemID:n,data:o}=r.payload;xt(g.getIn(e,n),o)}).addCase(ki,(e,r)=>{let{transientItemID:n,data:o}=r.payload;Object.keys(o??{}).forEach(i=>{g.deleteIn(e,[n,i])})}).addCase(Ls,(e,r)=>{let{transientItemID:n,data:o}=r.payload;g.deleteIn(e,n),g.setIn(e,n,o)}).addCase(Gl,(e,r)=>{let{key:n,value:o}=r.payload;g.setIn(e,`${d.SHARED}.${n}`,o)}).addCase(Jl,(e,r)=>{let{context:n,data:o}=r.payload;return g.setIn(e,n,o)})}),d0=hle;function K9(t){if(typeof t=="object"&&t!==null&&"payload"in t&&typeof t.payload=="object"&&t.payload!==null){let e=t.payload.context;return typeof e=="string"?e:void 0}}var yle=ka(Xl),Sle=Ti({},t=>{t.addCase(Er,(e,r)=>{let{propertiesToReplace:n=[],propertiesToReArrange:o=[],uiRootReference:i="",interestPath:s}=r.payload,a=i&&typeof r.payload.context=="string"?`${r.payload.context}.${i}`:r.payload.context,c=typeof a=="string"?oo(a):[],l={isArrayDeepMerge:r.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...o]};if(i&&c.length)g.setIn(e,c,xt(g.getIn(e,c),g.getIn(r.payload.data,oo(i)),l));else if(s){let u=g.getIn(e[r.payload.context],s),p=g.getIn(r.payload.data,s),m=xt(u,p,{isArrayDeepMerge:!0}),f=g.getIn(r.payload.data.context_data,s);v_(e[r.payload.context],[...n],[...o]),g.setIn(e[r.payload.context],s,m),e[r.payload.context]&&f&&g.setIn(e[r.payload.context].context_data,s,xt(g.getIn(e[r.payload.context].context_data,s),f,{isArrayDeepMerge:!0}))}else e[r.payload.context]=xt(e[r.payload.context],r.payload.data,l);dl(e,r.payload,!0),La(e,r.payload)}).addCase(bt,(e,r)=>{let{context:n,reference:o,value:i,isArrayDeepMerge:s}=r.payload;vw(e[n],o,i,{isArrayDeepMerge:s})}).addCase(oc,(e,r)=>{let{context:n,reference:o,value:i}=r.payload;Rw(e[n],o,i)}).addCase(Wl,(e,r)=>{Tw(e[r.payload.context],r.payload.reference)}).addCase(ws,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!0)}).addCase(To,(e,r)=>{g.setIn(e[r.payload.context],"context_data.isLoading",!1)}).addCase($s,(e,r)=>{let n=K9(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!0))}).addCase(Hl,(e,r)=>{let n=K9(r);n&&(e[n]||(e[n]={}),g.setIn(e[n],"context_data.isOffline",!1))}).addCase(Jo,(e,r)=>{let{data:n}=r.payload;La(e,{data:{shared:n}})}).addCase(Ql,(e,r)=>{let{dataPagesToBeRemoved:n=[]}=r.payload;if(!e.shared||n.length===0)return;let o=new Map;n.forEach(i=>{let{dataPageName:s,dataPageNameWithHash:a}=i,c=o.get(s);c?c.push(a):o.set(s,[a])}),o.forEach((i,s)=>{i.forEach(c=>{g.deleteIn(e.shared,[s,c])});let a=g.getIn(e.shared,[s]);a&&Object.keys(a).length===0&&g.deleteIn(e.shared,[s])})}).addCase(cc,(e,r)=>{let n=g.getIn(e[r.payload.context].context_data,"blocking_action_counter",0);r.payload.isInitiateBlockingAction?g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n+1):g.setIn(e[r.payload.context].context_data,"blocking_action_counter",n-1)}).addCase(yle,(e,r)=>{e.locale=g.getIn(r.payload,"locale","")})}),J9=Sle;var Z9=/\[(\d+)\]$/gi,Q9=/(\d+)/gi,Ele=/\[\d+\]$/,X9=(t,e,r,n=[d.CONTEXT_DATA,d.CASE_INFO.CASE_INFO,d.CONTENT])=>{let o=g.getIn(e,n);if(o){let s=AE(o,[],[]);for(let a of s)g.setIn(t[r],[...n,...a],{})}},Y9=(t,e,r,n)=>{let{property:o,pageReference:i,category:s,type:a,subType:c}=n.payload,l=g.getIn(t[e],r);if(l&&s===d.CASEMESSAGES)g.setIn(t[e],Qn(o,i,s),"");else if(l&&l.length>0&&Array.isArray(l)){let u;c?u=l.filter(p=>!(p.type===a&&p.subType===c)):u=l.filter(p=>p.type!==a),r&&r.length>0&&g.setIn(t[e],Qn(o,i,s),u)}},Ale=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,stateObj:s}=e.payload,{context:a}=e.payload,c=a;if(s)return X9(t,s,a),t;let l=Qn(r,n,o,i);return o===d.PAGE&&a?.includes(ge.WORKAREA)&&(c=qe(a)),Y9(t,c,l,e),Y9(t,a,l,e),t},Cle=t=>{let e=t.map(r=>{let n=r.match(Z9),o=null;if(n?.length){let i=n[0].match(Q9);i?.length&&(o=parseInt(i[0],10))}return{key:r,hasIndex:!!n,numericIndex:o}});return e.sort((r,n)=>!r.hasIndex&&!n.hasIndex?r.key.localeCompare(n.key):!r.hasIndex&&n.hasIndex?-1:r.numericIndex!==null&&n.numericIndex!==null?r.numericIndex-n.numericIndex:1),e.map(r=>r.key)},_le=(t,e)=>{let{property:r,pageReference:n,category:o,isListEntry:i,deletingIndex:s,stateObj:a}=e.payload,{context:c}=e.payload;if(a)return X9(t,a,c),t;let l=Qn(r,n,o,i);if(Number.isInteger(s)){g.deleteIn(t[c],l);let u=l.slice(0,l.length-1),p=g.getIn(t[c],u)||{},m=Cle(Object.keys(p));p=m.map(f=>p[f]),p.forEach((f,h)=>{let S=m[h].match(Z9);if(S?.length){let A=parseInt(S[0].match(Q9)[0],10);A>s&&(g.deleteIn(t[c],u.concat(m[h])),g.setIn(t[c],u.concat(m[h].replace(Ele,`[${A-1}]`)),f))}})}else g.setIn(t[c],l,{});return t};function Ile(t){let e=null,r=t.lastIndexOf(".");return r<0?null:(e=t.substring(0,r),e&&`caseInfo.content.${e}`.replace(/\(/g,"[").replace(/\)/g,"]"))}function eB(t,e){return g.getIn(t,e)?.dataInfo?.content!==void 0}var tB=(t,e)=>{let r=g.getIn(t,e);return B.isObjectCaseType(r?.objectInfo?.objectTypeID)===!0};function rB(t,e){let r=zr.FIELD_MESSAGES_PATH;return eB(t,e)?r=zr.DATA_OBJECT_FIELD_MESSAGES_PATH:tB(t,e)&&(r=zr.OBJECT_FIELD_MESSAGES_PATH),r}var ble=(t,e,r)=>{let n=g.getIn(r,d.ERROR_FIELD_IN_PAGE).slice(1),o=g.getIn(r,d.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(o){let i="caseInfo.content";eB(t,e)?i="dataInfo.content":tB(t,e)&&(i="objectInfo.content");let s=n?`${i}.${n}`:i;s=s.replace(/\(/g,"[").replace(/\)/g,"]");let a=Qn(o,s,d.PROPERTY),c=g.getIn(t[e],`${s}.classID`),l=lt(o,c),u=v.getLocale()??"en-US",p=new zd(u,l?.localeReference),m={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...l?.label&&{fieldLabel:p.getLocalizedText(l.label)}},f=g.getIn(t[e],a,[]);if(g.isContains(f,m))return;g.setIn(t[e],a,[...f,m])}},Tle=(t,e,r)=>{r.forEach(n=>{ble(t,e,n)})},vle=t=>{let e=[];return t.forEach(r=>{let n=r.erroneousInputOutputFieldInPage?.replace(/^\./,"");e.push({type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:r.localizedValue,...n&&{fieldInPage:n}})}),e};function Rle(t,e){let{err:r,formFields:n}=e.payload,{context:o}=e.payload,{fieldErrors:i,pageErrors:s}=mj(r.errorDetails,n),a=rB(t,o);if(g.setIn(t,[o,...a],{}),g.setIn(t,[o,...zr.PAGE_MESSAGES_PATH],[]),i.forEach(c=>{let l=g.getIn(c,d.ERROR_FIELD_IN_PAGE);if(l){let u=l.slice(1);if(u){let p=Ile(u);if(!p)return!1;let m=u.substring(u.lastIndexOf(".")+1),f=Qn(m,p,d.PROPERTY);g.setIn(t,[o,...f],[])}}}),i.length>0&&Tle(t,o,i),s.length>0){let c=vle(s);t[o]||(o=d.APP.APP),g.setIn(t,[o,...zr.PAGE_MESSAGES_PATH],c)}else o.includes&&o.includes(ge.WORKAREA)&&(o=qe(o)),g.deleteIn(t,[o,...zr.PAGE_MESSAGES_PATH]);return t}var Ple=Ti({},t=>{t.addCase(Te,(e,r)=>r.payload.err.errorDetails&&(r.payload.err.errorClassification===E.VALIDATION_FAIL||r.payload.err.errorClassification===E.INVALID_INPUTS||(r.payload.err?.displayButtonsOnErrors?.length??0)>0)?Rle(e,r):e).addCase(kt,(e,r)=>{let{context:n}=r.payload,o=[n,...rB(e,n)],i=[n,...zr.PAGE_MESSAGES_PATH];if(g.setIn(e,o,{}),g.setIn(e,i,[]),n&&n.includes(ge.WORKAREA)){let a=[Po(n),...zr.PAGE_MESSAGES_PATH];g.setIn(e,a,[])}}).addCase(Wn,(e,r)=>{let{isListEntry:n,clearAll:o,context:i}=r.payload;return o?(g.deleteIn(e,[i,d.CONTEXT_DATA]),e):n?_le(e,r):Ale(e,r)}).addCase(Fs,(e,r)=>{let{messages:n,property:o,pageReference:i,context:s,category:a}=r.payload,c=Qn(o,i,a);n&&n.length>0&&Array.isArray(n)&&c&&c.length>0&&g.setIn(e[s],Qn(o,i,a),n)})}),p0=Ple;var nB=(t,e,r,n,o)=>{g.setIn(t[e],[...r,n],o)},Nle=(t,e,r,n,o)=>{let i=xt(g.getIn(t[e],[...r,n],{}),o);g.setIn(t[e],[...r,n],i)},Ole=(t,e,r,n,o)=>{let i=g.getIn(t[e],r,[]);typeof n=="string"?delete i[n]:i.splice(n,1),g.setIn(t[e],r,i),Ie.deleteListNode(e,[o],i.length)},xle=(t,e,r,n,o)=>{if(n===o)return;let i=g.getIn(t[e],[...r,n],{}),s=g.getIn(t[e],r,[]);s.splice(n,1),s.splice(o,0,i),g.setIn(t[e],r,s),wj(t,e,r?.join("."),n,o)},Dle=(t,e,r,n)=>{let o=g.getIn(t[e],r)||[],i=!1;n.forEach(s=>{let{instruction:a,content:c,listIndex:l}=s;a===d.LIST_ACTIONS.SELECT?(o[l]=c,i=!0):delete o[l]}),i&&Js(e,r?.join(".")),g.setIn(t[e],r,o.filter(Boolean))},wle=(t,e,r)=>{g.setIn(t[e],r,[])},$le=(t,e,r,n)=>{g.setIn(t[e],r,n)},Mle=(t,e,r)=>{g.setIn(t[e],r,{})},kle=Ti({},t=>{t.addCase(po,(e,r)=>{let{instruction:n,actions:o,context:i,referenceList:s,listIndex:a,groupIndex:c,listMoveToIndex:l,content:u={}}=r.payload,p=oo(s);switch(n){case d.LIST_ACTIONS.ADD:nB(e,i,p,c,u);break;case d.LIST_ACTIONS.INSERT:nB(e,i,p,a,u);break;case d.LIST_ACTIONS.UPDATE:Nle(e,i,p,a??c,u);break;case d.LIST_ACTIONS.DELETE:Ole(e,i,p,a??c,s);break;case d.LIST_ACTIONS.MOVE:xle(e,i,p,a,l);break;case d.LIST_ACTIONS_TYPE.SELECT_DESELECT:Dle(e,i,p,o);break;case d.LIST_ACTIONS_TYPE.DESELECT_ALL:wle(e,i,p);break;case d.LIST_ACTIONS.REPLACE:$le(e,i,p,u);break;case d.LIST_ACTIONS.DELETEPAGE:Mle(e,i,p);break;default:break}})}),oB=kle;var iB=(t,e)=>{if(t||(t=qh().data),e.type===Vs)return qh().data;switch(e.type){case Er:case bt:case oc:case Wl:case ws:case To:case $s:case Hl:case Jo:case Ql:case cc:case Xl:return J9(t,e);case Te:case Wn:case Fs:return p0(t,e);case kt:return p0(d0(t,e),e);case St:case Ze:case qo:case Us:case et:case pn:case Ms:case Wo:case Ko:case ks:case uo:case ki:case Ls:case Gl:case Jl:return d0(t,e);case po:return oB(t,e);default:return t}};var sB={},m0=(t,e=[])=>{e.forEach(r=>{g.deleteIn(t,[r])})},Lle=(t,e,r,n)=>{t===""&&g.deleteIn(e,[r,"items",n,"key"])},Ule=(t,e,r,n,o)=>{n||(o?g.setIn(t,[e,"items",r,"pageName"],o):g.deleteIn(t,[e,"items",r,"pageName"]))},f0=(t,e)=>{let{type:r,payload:n}=e,o=r===kt,{target:i,context:s,semanticURL:a="",root:c,containerItemID:l,childContainers:u,flowName:p,resourceType:m="",key:f="",clearView:h=!1,pageName:S}=n;return c?g.setIn(t,[i,"items",l,"view"],c):h&&g.deleteIn(t,[i,"items",l,"view"]),s&&g.setIn(t,[i,"items",l,"context"],s),p&&g.setIn(t,[i,"items",l,"flowName"],p),(!o||o&&f)&&g.setIn(t,[i,"items",l,"key"],f.trim()),Lle(f,t,i,l),(!o||o&&a)&&g.setIn(t,[i,"items",l,"semanticURL"],a),(!o||o&&m)&&g.setIn(t,[i,"items",l,"resourceType"],m),Ule(t,i,l,o,S),m0(t,u),t},jle=({prevItems:t,prevAccessedOrder:e,containerItemID:r,root:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,isBulkAction:f,showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:I,hideDefaultActionButtons:_,referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:re,index:j,actionID:ne,acTertiary:be,isMultiRecordData:he,parentContext:Me,isDeleteConfirmation:Fe,workId:Ce,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt,heading:yr,pageName:Xt})=>({accessedOrder:[...e,r],items:{...t,[r]:{view:n,semanticURL:o,key:i,flowName:s,readOnly:a,context:c,isInCreateStage:l,resourceType:u,actionName:p,isMinimizable:m,...f&&{isBulkAction:f},showProgress:h,progressMessage:S,modalOptions:A,isTraditionalRemoteCase:C,resourceStatus:I,..._&&{hideDefaultActionButtons:_},referenceList:N,subscriptName:x,subscriptFieldName:H,pageGroupName:G,isPageGroup:re,index:j,...ne&&{actionID:ne},...be&&{acTertiary:be},...he&&{isMultiRecordData:he},...Me&&{parentContext:Me},...Xt&&{pageName:Xt},...Fe&&{isDeleteConfirmation:Fe,workId:Ce,caseTypeID:Ye,className:Oe,keys:ft,enableBackNavigation:Qt},heading:yr}}}),zle=(t,e)=>{let{target:r,context:n,isInCreateStage:o,isBulkAction:i,semanticURL:s,root:a,containerItemID:c,actionMgrID:l,key:u,flowName:p,resourceType:m,actionName:f,isMinimizable:h,showProgress:S,progressMessage:A,modalOptions:C,resourceStatus:I,hideDefaultActionButtons:_,actionID:N,isMultiRecordData:x,acTertiary:H,parentContext:G,heading:re,isTraditionalRemoteCase:j,readOnly:ne,referenceList:be,subscriptName:he,subscriptFieldName:Me,pageGroupName:Fe,isPageGroup:Ce,index:Ye,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:ln,pageName:_o}=e.payload,vr=t[r],Vn=vr&&vr.type,qr=vr&&vr.accessedOrder||[],zt=vr&&vr.items||{};if(t[r]&&Vn==="single"&&qr.length>0){f0(t,e);return}let ao=jle({prevItems:zt,prevAccessedOrder:qr,containerItemID:c,root:a,semanticURL:s,key:u,flowName:p,readOnly:ne,context:n,isInCreateStage:o,resourceType:m,actionName:f,isMinimizable:h,isBulkAction:i,showProgress:S,progressMessage:A,modalOptions:C,isTraditionalRemoteCase:j,resourceStatus:I,hideDefaultActionButtons:_,referenceList:be,subscriptName:he,subscriptFieldName:Me,pageGroupName:Fe,isPageGroup:Ce,index:Ye,actionID:N,acTertiary:H,isMultiRecordData:x,parentContext:G,isDeleteConfirmation:Oe,workId:ft,caseTypeID:Qt,className:yr,keys:Xt,enableBackNavigation:ln,heading:re,pageName:_o});w.resolveActionByID(l,null,!1),t[r]||(t[r]={accessedOrder:[],items:{}},Vn!==void 0&&(t[r].type=Vn)),g.setIn(t,[r,"accessedOrder"],ao.accessedOrder),g.setIn(t,[r,"items",c],ao.items[c])},Fle=(t,e,r)=>{let n=t&&t[e]?.type,o=t&&t[e]?.accessedOrder||[];return n==="single"?o.length>0?o:[...o,r]:o.includes(r)?o:[...o,r]},Vle=(t,e)=>{let{actionMgrID:r,data:n,target:o,containerItemID:i}=e.payload,s=t;try{let a=Fle(t,o,i);g.setIn(t,[o,"items",i,"transientItems"],[]),g.setIn(t,[o,"accessedOrder"],a),s=f0(t,e),w.resolveActionByID(r,n,!1)}catch{w.rejectActionByID(r,!1)}return s},Ble=Ti(sB,t=>{t.addCase(Vs,()=>sB).addCase(Kl,(e,r)=>{let{context:n,name:o,type:i,actionMgrID:s}=r.payload,a=`${n}/${o}`;if(w.resolveActionByID(s,null,!1),e[a])return e;g.setIn(e,[a],{type:i,accessedOrder:[],items:{}})}).addCase(eS,(e,r)=>{let{containerName:n,childContainers:o=[]}=r.payload;g.deleteIn(e,[n]),o.forEach(i=>{g.deleteIn(e,[i])})}).addCase(qo,(e,r)=>{let{context:n,name:o,actionMgrID:i,childContainers:s}=r.payload,a=`${n}/${o}`;w.resolveActionByID(i,null,!1),g.setIn(e,[a,"accessedOrder"],[]),g.setIn(e,[a,"items"],{}),Array.isArray(s)&&s.forEach(c=>{g.deleteIn(e,[c])})}).addCase(St,(e,r)=>{zle(e,r)}).addCase(kt,(e,r)=>{let{actionMgrID:n,data:o}=r.payload;try{f0(e,r),w.resolveActionByID(n,o,!1)}catch{w.rejectActionByID(n,!1)}}).addCase(et,(e,r)=>Vle(e,r)).addCase(nr,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i}=r.payload;try{let s=g.getIn(e,[n,"accessedOrder"]).filter(a=>a!==o);s.push(o),g.setIn(e,[n,"accessedOrder"],s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Us,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),m0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Ze,(e,r)=>{let{target:n,containerItemID:o,actionMgrID:i,childContainers:s}=r.payload;try{let a=g.getIn(e,[n,"accessedOrder"]).filter(c=>c!==o);g.setIn(e,[n,"accessedOrder"],a),g.deleteIn(e,[n,"items",o]),m0(e,s),w.resolveActionByID(i,null,!1)}catch{w.rejectActionByID(i,!1)}}).addCase(Ms,(e,r)=>{let{transientItemID:n,target:o,contextName:i}=r.payload,s=g.getIn(e,[o,"items",i,"transientItems"])??[];g.setIn(e,[o,"items",i,"transientItems"],[...s,n])}).addCase(Ko,(e,r)=>{let{target:n,containerItemID:o}=r.payload;g.deleteIn(e,[n,"items",o,"transientItems"])}).addCase(Wo,(e,r)=>{let{target:n,transientItemID:o,containerItemID:i}=r.payload,a=(g.getIn(e,[n,"items",i,"transientItems"])??[]).filter(c=>c!==o);g.setIn(e,[n,"items",i,"transientItems"],a)})}),aB=Ble;var cB={},qh=()=>cB,Hle=t=>{let e=t.Data||t.data,{uiResources:r={}}=t,n=r[d.CONTEXT_DATA]||t[d.CONTEXT_DATA];cB={data:{locale:v.getLocale(),[d.APP.APP]:{...e,[d.CONTEXT_DATA]:n}},containers:{}}},lB=t=>(Hle(t),{data:iB,containers:aB});var g0=(t,e=!1)=>t===d.ACTION?e?Ut.REFRESH_CASE_DATA:Ut.REFRESH_ASSIGNMENT_DATA:Ut.REFRESH_CASE_VIEW,h0=(t,e,r)=>{let n=[];e&&r&&n.push({page:e,actionID:r});let o=t;for(;o;){let i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",o);if(!i?.isMultiRecordData||i.editType!==d.ACTION||!i.interestPage||!i.interestPageActionID)break;i.interestPage!==e&&n.unshift({page:i.interestPage,actionID:i.interestPageActionID}),o=i.parentContext}return n},Y_=t=>{let{context:e}=t,n={...Rt(e,{skipUUID:!1}).content,contextData:!1},o=bu(e);g.isEmpty(o)||(n=Nc(o,n));let i=g0(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,n.interestPageActionID=t.interestPageActionID,v.isInfinityRuntime()&&(n.actionIdArrayToBeProcessed=h0(e,t.interestPage,t.interestPageActionID))),n.interestPage=t.interestPage,q(k(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:we(l.headers)})),me(": Error occurred during ajax call : ",e))};var Z_=[d.CASE_INFO.CASE_INFO_CONTENT,d.OBJECT_INFO.OBJECT_INFO_CONTENT],Gle=(t,e)=>`${Z_.find(n=>g.hasIn(t,n))??d.CASE_INFO.CASE_INFO_CONTENT}${g.convertClipboardPageToPageRefNotation(e)}`,y0=async(t,e)=>{let{context:r,serverPrecedenceFields:n,requestType:o}=e,i=Vt.getTargetViewContainerName(vn),s=Z(i,r),a={acName:s,context:r},c=Le(t,{[E.STOPMERGEACTIONS]:!0,[E.ACTIONS.DELETEAVIALACTIONS]:!0});c.directUrlUpdation=!1,o===Ut.REFRESH&&await Pe(c,e,a);let u=$e(c,{target:s,context:r});e.interestPage&&(u.interestPath=Gle(u.data,e.interestPage)),u.isArrayDeepMerge=e.options?.isArrayDeepMerge,u.preserveClientChanges=e.options?.preserveClientChanges!==void 0?e.options.preserveClientChanges:!0;let p=B.getPropertiesToReArrange(r);return{payload:u,mergeOptions:{serverPrecedenceFields:n,propertiesToReArrange:p}}},uB=async(t,e)=>{let{context:r}=e,{payload:n,mergeOptions:o}=await y0(t,e),i=V(Re,n,o),s=i.payload?.data?.pageInstructions;return s?.length>0&&(delete i.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(r,s)),T(i),n};var qle=()=>{let t=`${d.APP.APP}/${d.PRIMARY}`,e=se(t);return(e?Ar(`${e}/${d.WORKAREA}`):null)??Ar(t)},dB=async t=>{let e=qle();if(!e)return;let{data:r}=Nx(t);typeof r!="object"||r===null||await uB(r,{context:e,serverPrecedenceFields:[],requestType:Ut.REFRESH})};var E0=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),pB=t=>E0(t)||t===void 0||t===null,mB=t=>E0(t)?t:void 0,S0=(t,e)=>t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`),fB=(t,e,r,n,o=[])=>{let i={stalePaths:[],conflictPaths:[]},s=(c,l,u,p)=>{o.some(m=>S0(p,m)||S0(m,p))||lo(u,l)||(lo(c,l)?i.stalePaths.push(p):lo(c,u)||i.conflictPaths.push(p))},a=(c,l,u,p)=>{if(!(l===u||o.some(m=>S0(p,m)))){if(E0(c)&&pB(l)&&pB(u)){Object.keys(c).forEach(m=>{a(c[m],mB(l)?.[m],mB(u)?.[m],`${p}.${m}`)});return}Array.isArray(c)||Array.isArray(l)||Array.isArray(u)||s(c,l,u,p)}};return a(t,e,r,n),i};var ys={},{VIEW:Wle,FIELD:Kle}=d.CONTEXT_TREE_NODE_TYPES,Jle=["refreshFor","propertyName","optionalPayload","resetForm","skipPayloadGeneration","isFillFormWithAI"],X_={},eI={},tI={},C0={},rI={},nI={},_0=new Set,gB=0,Yle=(t,e)=>{let r=[];return Object.keys(t).forEach(n=>{(!Object.hasOwn(e,n)||e[n]!==t[n])&&r.push(n)}),r},hB=t=>{let e=Oh(t.context);return{changedPropertyValues:e,preserveFields:t.preRequestSnapshot?Yle(e,t.preRequestSnapshot):[]}},Zle=t=>{if(!t)return;let e=rI[t];return delete rI[t],e},Qle=t=>{if(!t)return;let e=nI[t];return delete nI[t],e},Xle=(t,e)=>{let r=t.mergePayload?.preserveClientChanges===!1?e.preserveFields:Object.keys(e.changedPropertyValues),{serverPrecedenceFields:n}=t.mergeOptions,o=(n??[]).flatMap(i=>Z_.map(s=>`${s}.${i}`));return[...r,...o]},eue=t=>typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t,tue=(t,e)=>{let r=t.mergePayload?.data;if(t.preRequestData===void 0||!r)return!1;let n=W(t.context),o=t.mergePayload.interestPath?[t.mergePayload.interestPath]:Z_,i=Xle(t,e),s=!1;return o.forEach(a=>{let c=g.getIn(r,a);if(c===void 0)return;let{stalePaths:l,conflictPaths:u}=fB(c,g.getIn(t.preRequestData,a),g.getIn(n,a),a,i);l.forEach(p=>{let m=g.getIn(n,p);m===void 0?g.deleteIn(r,p):g.setIn(r,p,eue(m))}),(l.length>0||u.length>0)&&(s=!0)}),s},rue=t=>{let e=w.getNextActionMgrId(),r={...t.options,actionMgrID:e};Jle.forEach(n=>{delete r[n]}),_0.add(e),T(oa({...t,options:r}))},nue=t=>t.some(r=>r.isReconciliation)?void 0:[...t].reverse().find(r=>{let n={...r.actionConfig?.options};return r.actionConfig&&!n.isFillFormWithAI})?.actionConfig,yB=t=>t.actionConfig?.actionType===lc,oue=t=>{let e=0,r=()=>{},n=new Promise(o=>{r=o});return $.publish(E.PUB_SUB_EVENTS.ON_FILL_FORM_WITH_AI_COMPLETE,{context:t,registerField:()=>{e+=1},deregisterField:()=>{e-=1,e===0&&r()}}),e===0&&r(),n},SB=async t=>{yB(t)&&(await oue(t.context),t.actionMgrID&&w.resolveActionByID(t.actionMgrID,t.mergePayload)),Ct.deRegisterBlockingAction(t.context).catch(()=>{})},EB=(t,e,r)=>{let n=e&&tue(t,r),{preserveFields:o}=r,i=o.length>0?{...t.mergeOptions,preserveFields:o}:t.mergeOptions,s=V(Re,t.mergePayload,i),a=g.getIn(s,"payload.data.pageInstructions");return a&&a.length>0&&(delete s.payload?.data?.pageInstructions,ke.mergeServerPageInstructions(t.context,a)),T(s),t.actionMgrID&&!yB(t)&&w.resolveActionByID(t.actionMgrID,t.mergePayload),n},iue=t=>{delete eI[t];let e=X_[t];if(delete X_[t],!e||e.length===0)return;e.sort((a,c)=>a.seq-c.seq);let r=e.length>1,n=!1,o=new Set;e.map(a=>({item:a,changeState:hB(a)})).forEach(({item:a,changeState:c})=>{n=EB(a,r,c)||n,o.add(a.context)}),o.forEach(a=>{$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:a})});let s=n?nue(e):void 0;s&&rue(s),e.forEach(SB)},sue=(t,e,r)=>{if(!t)return;tI[t]=e,gB+=1,C0[t]=gB,rI[t]=Oh(r),nI[t]=W(r),(eI[e]??(eI[e]=new Set)).add(t)},aue=t=>t?C0[t]??0:0,A0=t=>{if(!t)return;let e=tI[t];if(!e)return;delete tI[t],delete C0[t],delete rI[t],delete nI[t],_0.delete(t);let r=eI[e];r&&(r.delete(t),r.size===0&&iue(e))},cue=t=>(EB(t,!1,hB(t)),$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:t.context}),SB(t)),lue=t=>{let{ID:e,actionID:r,context:n}=t;return`${e}.${n}.${r}`},uue=(t,e,r)=>{let n=e.value.data[r]?.objectInfo?.headers,o=e.value.data[r]?.caseInfo?.headers;return!B.shouldUseUnifiedHandling()&&t&&n?n:o},due=t=>{let{reqHeaders:e}=t;e&&(t.headers=t.headers||{},e.etag&&(t.headers["if-match"]=e.etag))},pue=t=>(_t()||Z4(t)>0)&&ys[t],mue=(t,e,r)=>{let{mcpAction:n,body:o}=t;return n&&_t()&&GC({body:o,responseType:t.responseType})?pr(n.actionName,{queryPayload:n.queryPayload,body:qC(o),headers:ra({headers:t.headers,body:o},e)},t.cancelConfig?.token):k(t.url,t,e,{cancelContext:r})},fue=(t,e)=>{let r=[];for(let n=0;n<ys[t].length;){let o=ys[t][n],i=sj(o,e);if(i===OT)return!1;i===!0&&(r.push(n),o.cancelConfig?.cancel()),n+=1}for(let n=r.length-1;n>=0;n-=1)ys[t].splice(r[n],1);return!0},gue=(t,e)=>{let{context:r}=t;due(t);let n=lue(e);if(e.interestPage&&(t.interestPage=e.interestPage),pue(n)&&!fue(n,t)){let i=Object.assign(new Error,{code:"ERR_CANCELED"});return Promise.reject(i)}let o=pu();return t.signal=o.token,t.cancelConfig=o,ys[n]?ys[n].push(t):ys[n]=[t],$.publish(E.PUB_SUB_EVENTS.ON_REFRESH_START,{context:r}),Dm()&&sue(e.options?.actionMgrID,n,r),mue(t,r,n).then(i=>(delete ys[n],i)).catch(i=>{throw i&&i.code!=="ERR_CANCELED"&&delete ys[n],i})},Q_=(t,e)=>({routeKey:t,restAPI:U(t,e)}),hue=(t,e)=>{let{isObjectType:r,isExternalObject:n,actionID:o,context:i,isExternalCase:s,casetypeID:a}=t,c=d.getDefaultQualifiedName(d.VIEW_NAMES.OBJECT_CREATE_VIEW);if(e||r&&NT(i)){let l=n&&o===c?Ut.REFRESH_EXTERNAL_OBJECT:Ut.REFRESH_CASE_DATA,u=B.shouldUseUnifiedHandling();return n&&o===c&&u&&(l=Ut.REFRESH_EXTERNAL_CASE_DATA),Q_(l,t)}return Q_(s&&a&&o===c?Ut.REFRESH_EXTERNAL_CASE_DATA:Ut.REFRESH_ASSIGNMENT_DATA,t)},yue=(t,e,r,n,o)=>{o={...o,calculations:{fields:e,whens:r}};let{routeKey:i,restAPI:s}=Q_(n?Ut.RECALCULATE_CASE_DATA:Ut.RECALCULATE_ASSIGNMENT_DATA,t),a=Ut.RECALCULATE;return{routeKey:i,restAPI:s,requestBody:o,requestType:a}},Sue=(t,e)=>{let{caseWideAction:r,caseViewAction:n,fieldsWithDeclarativeTargets:o,fieldsWithWhen:i,isViewsWithWhen:s,interestPage:a,options:c,isMultiRecordData:l,editType:u,isLocalAction:p,interestPageActionID:m,context:f}=t,{optionalPayload:h}=c;h&&(e.content={...h});let S,A={},C={...e},I=Ut.REFRESH;return n||l&&u===d.ACTION?(S=g0(u,p),l&&u===d.ACTION&&(C.interestPageActionID=m,v.isInfinityRuntime()&&(C.actionIdArrayToBeProcessed=h0(f))),A=U(S,t),C={...C,interestPage:a}):s||c.refreshFor?{routeKey:S,restAPI:A}=hue(t,r):(o.length>0||i.length>0)&&({routeKey:S,restAPI:A,requestBody:C,requestType:I}=yue(t,o,i,r,C)),{routeKey:S,restAPI:A,requestBody:C,requestType:I}},Eue=(t,e,r,n,o)=>{let i=lt(t,e);if(!i||i.dataRetrievalType!=="copy")return;let s=g.getIn(r,`content.content.${t}`);if(!s||typeof s!="object")return;(n?Object.keys(s).filter(c=>c!==n):Object.keys(s)).length>0&&o.push(t)},Aue=(t,e)=>t.pipe(ee(Ut.REFRESH_DATA,lc),O(r=>{let n=r.payload;return n.actionType=r.type,n}),Qo(r=>!Eu(r?.options?.actionMgrID)),z(r=>{let{context:n,contextData:o,options:i,isObjectType:s}=r,{propertyName:a="",classID:c="",isObjectWideAction:l,skipPayloadGeneration:u}=i,p=u?{content:{}}:Rt(n,{skipUUID:!1,isObjectWideAction:l}),m=[],f=[],h=!1;v.getFeatureMap().granularUIRefresh?({fieldsWithDeclarativeTargets:m=[],whens:f=[]}=cj(n),h=f.some(Oe=>Oe.type===Wle)):h=!0;let A=f.filter(Oe=>Oe.type===Kle),C=g.getPropertyName(a),I=C?C.split("."):[],_=I.pop(),N=I.join("."),x=[];N&&Eue(N,c,p,_,x),r.serverPrecedenceFields=x;let H={...p.content,contextData:o},G=bu(n);g.isEmpty(G)||(H=Nc(G,H));let re=Sue({...r,fieldsWithDeclarativeTargets:m,fieldsWithWhen:A,isViewsWithWhen:h},H);Ct.registerBlockingAction(n).catch(()=>{});let{routeKey:j,restAPI:ne,requestBody:be,requestType:he}=re;r={...r,requestType:he},r.requestType=he;let{reqType:Me,restApi:Fe}=ne,Ce={...uue(s,e,n)};Ce&&!Ce.etag&&r.isMultiRecordData&&r.editType===d.ACTION&&(Ce.etag=g.getETag(r.context));let Ye={reqHeaders:Ce,context:n,method:Me,body:be,url:oj(r,Fe),...j&&{mcpAction:{actionName:j,queryPayload:ij(r)}}};return q(gue(Ye,r)).pipe(O(Oe=>{let ft=aj(Oe?.data,i?.classID,s);return i?.resetForm&&Ie.removeContextTreeNode(n),{response:{...ft},actionConfig:r,actionMgrID:r.options.actionMgrID,headers:we(Oe.headers)}}),me(": Error occurred during fetch call at refreshData Epic : ",r.context,r?.options?.actionMgrID))}),z(async r=>{if(r&&r.type===Te)return Ct.deRegisterBlockingAction(r.payload?.context).catch(()=>{}),r.payload?.err?.code==="ERR_CANCELED"?(A0(r.payload?.actionMgrID),[]):($.publish(d.ON_REFRESH_ERROR,{context:r.payload?.context}),A0(r.payload?.actionMgrID),ue(r));let{actionConfig:n,response:o,actionMgrID:i}=r,{context:s}=n,{payload:a,mergeOptions:c}=await y0(o,n),l=i?tI[i]:void 0,u={seq:aue(i),actionMgrID:i,context:s,mergePayload:a,mergeOptions:c,preRequestSnapshot:Zle(i),preRequestData:Qle(i),actionConfig:n,isReconciliation:_0.has(i)};return l?(X_[l]??(X_[l]=[])).push(u):await cue(u),A0(i),[]}));T4(t=>{dB(t).catch(e=>{console.error("Failed to merge MCP tool result into the store",e)})});var Cue=[Aue],AB=Cue;var _ue=t=>t.pipe(ee(iS),z(async e=>{let{context:r}=e.payload,n={},o={},i=Object.keys(e.payload.datapages).map(a=>{let c=e.payload.datapages[a];if(c.mode===d.READONLY&&c?.refreshStrategy){let{timeoutSecs:l="",type:u=""}=c?.refreshStrategy||{},p=Mo()[c.name];if(p&&a in p){let m=p[a],{loadTime:f}=m;if(!or.isTimeElapsed(f,l,u))return}}return or.getData(c.name,{dataViewParameters:c.dataViewParameters},r).then(l=>{let u=c.mode===d.READONLY?o:n,p=P.getDefaultQualifiedName("pxResults");u[c.name]?u[c.name][a]={[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}:u[c.name]={[a]:{[p]:l.data.data,parameters:c.dataViewParameters,loadTime:l.data?.fetchDateTime}}}).catch(()=>{})});await Promise.allSettled(i);let s=[];return Object.keys(n).length&&s.push(Re({context:r,data:n})),Object.keys(o).length&&s.push(Mw({data:o,context:r})),T(s),[]})),Iue=[_ue],CB=Iue;var bue=t=>typeof t=="object"&&t!==null&&"ID"in t&&typeof t.ID=="string"&&"state"in t&&typeof t.state=="string",I0=class t{static EDIT_OPEN="edit_open";static EDIT_SAVE="edit_save";static EDIT_SUBMIT="edit_submit";static EDIT_CANCEL="edit_cancel";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static openCaseViewByCaseId=new Set;static collabConfig;static EDITING_STATE="editing";static PAGE_CATEGORY=d.PAGE;static WARNING_TYPE="warning";static INFO_TYPE="info";static ERROR_TYPE="error";static LOCALE_CATEGORY="Messages";static STALE_DATA_TYPE="error";static STALE_ASSIGNMENT_TYPE="error";static EDIT_WARNING_MESSAGE="Changes may be lost: Others are editing – only the first save or submit is kept.";static STALE_DATA_MESSAGE="The case was updated by another user. Please refresh to view the latest information.";static STALE_ASSIGNMENT_MESSAGE="This assignment is no longer available because it was completed or updated by another user.";static NO_EDITORS_INFO_MESSAGE="Changes can now be saved: No more editors active.";static NO_EDITORS_INFO_SUBTYPE="collaboration-no-editors";static caseContextById={};static collaborationBannerByContext={};static assignmentIdByContext={};static DEPARTURE_STATES=new Set(["closed"]);static ACTION_STATE_MESSAGES={saved:"Changes may be lost: Other user has saved this assignment.",submitted:"Changes may be lost: Other user has submitted this assignment."};static ASSIGNMENT_AWARE_STATES=new Set(["saved","submitted","stage_changed"]);static INTERACTION_STATE_BY_EVENT={edit_open:"editing",edit_save:"saved",edit_submit:"submitted",edit_cancel:"viewing",view_open:"viewing",view_close:"closed"};static normalizeInteractionState(e){return this.INTERACTION_STATE_BY_EVENT[e]??e}static getLocalizedMessage(e){return Nr().getLocaleValue(e,this.LOCALE_CATEGORY)}static assignmentContextsByCaseId={};static caseIdByAssignmentContext={};static editorStateByCaseId={};static localInteractionStateByCaseId={};static respondedToViewOpenByCaseId={};static pendingActionStateByCaseId={};static suppressEditingWarningOnNextAssignmentLoadByCaseId={};static pendingSaveCaseIds=new Set;static cancelTransitionCaseIds=new Set;static getCollaborationState(e){let r=Object.entries(e?.message??{})[0];if(!r)return null;let[n,o]=r;if(typeof o=="string")return{userID:n,state:this.normalizeInteractionState(o),eventType:o};if(typeof o!="object"||o===null||!("state"in o)||typeof o.state!="string")return null;let i=this.normalizeInteractionState(o.state),s="assignmentId"in o&&typeof o.assignmentId=="string"&&o.assignmentId||("assignmentID"in o&&typeof o.assignmentID=="string"?o.assignmentID:void 0);return{userID:n,state:i,eventType:o.state,assignmentId:s}}static init(e){e&&(this.collabConfig=e)}static isCollaborationEnabled(){return!!(t.collabConfig?.appEnabled&&t.collabConfig?.portalEnabled)}static isLaunchpadRuntime(){return!v.isInfinityRuntime()}static dispatchCollaboratorAction=(e,r,n,o,i)=>{T({type:"LIST_ACTION",payload:{instruction:e,context:r,referenceList:o,listIndex:n,content:i,skipDirtyValidation:!0,skipRefresh:!0}})};static handleCaseCollaboratorsUpdate(e,r,n){let o=this.getCollaborationState(n);if(!o)return;let{userID:i,state:s,eventType:a,assignmentId:c}=o;if(i===v.getOperatorIdentifier())return;this.respondToCollaboratorViewOpen(e,i,a,s);let l=this.DEPARTURE_STATES.has(s),u=this.editorStateByCaseId[e]??(this.editorStateByCaseId[e]={});l?delete u[i]:u[i]=s;let p={ID:i,state:s},m=[r,this.caseContextById[e],...this.getAssignmentContextsForCase(e)].filter(h=>!!h);new Set([...m,...m.map(h=>qe(h))]).forEach(h=>{let S=oe(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",h)||[],A=S.findIndex(C=>C.ID===i);A!==-1?l?this.dispatchCollaboratorAction("DELETE",h,A,d.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",h,null,`${d.CASE_INFO.CASE_INFO_COLLABORATORS}[${A}]`,p):l||this.dispatchCollaboratorAction("INSERT",h,S.length,d.CASE_INFO.CASE_INFO_COLLABORATORS,p)}),this.isLaunchpadRuntime()&&this.updateLaunchpadCollaborationState(e,s,c)}static updateLaunchpadCollaborationState(e,r,n){let o=this.getAssignmentContextsForCase(e);this.ASSIGNMENT_AWARE_STATES.has(r)&&((r==="saved"||r==="submitted")&&(this.pendingActionStateByCaseId[e]={state:r,assignmentId:n}),o.forEach(a=>this.updateStaleState(a,r,n)));let i=this.getRemoteEditorCount(e),s=this.pendingActionStateByCaseId[e];o.forEach(a=>{this.refreshCollaborationBanner(a,i,s)})}static getCaseIdFromContext(e){let r=oe(d.CASE_INFO.CASE_INFO_ID,"",e);return typeof r=="string"&&r?r:void 0}static resolveCaseIdForAssignmentContext(e,r){if(r){let n=this.getCaseIdFromContext(r);if(n)return n;let o=this.caseIdByAssignmentContext[r];if(o)return o}return e}static getAssignmentContextsForCase(e){let r=this.assignmentContextsByCaseId[e]??[];if(r.length>0)return r;let n=[];return Object.entries(this.caseIdByAssignmentContext).forEach(([o,i])=>{(i===e||this.getCaseIdFromContext(o)===e)&&n.push(o)}),n}static getMessageTypeForBanner(e){return e.endsWith("-error")||e==="stale-assignment"?this.ERROR_TYPE:e==="stale-data"?this.STALE_DATA_TYPE:e}static clearCurrentBanner(e,r){dt({category:this.PAGE_CATEGORY,context:e,type:this.getMessageTypeForBanner(r)})}static getStaleBannerDetails(e){return e?{bannerType:"stale-assignment",messageType:this.STALE_ASSIGNMENT_TYPE,message:this.getLocalizedMessage(this.STALE_ASSIGNMENT_MESSAGE)}:{bannerType:"stale-data",messageType:this.STALE_DATA_TYPE,message:this.getLocalizedMessage(this.STALE_DATA_MESSAGE)}}static isLocalActionContext(e){return e.includes(d.MODAL)||oe(d.CASE_INFO.IS_LOCAL_ACTION,"",e)===!0}static isAssignmentContext(e){return e.includes(d.WORKAREA)||e.includes(d.MODAL)}static restoreCollaboratorsFromContext(e,r){if(this.editorStateByCaseId[e])return;let n=[r,qe(r)],o;for(let a of n)if(o=oe(d.CASE_INFO.CASE_INFO_COLLABORATORS,"",a),Array.isArray(o))break;if(!Array.isArray(o))return;let i=v.getOperatorIdentifier(),s={};o.forEach(a=>{if(!bue(a)||a.ID===i)return;let c=this.normalizeInteractionState(a.state);this.DEPARTURE_STATES.has(c)?delete s[a.ID]:s[a.ID]=c}),this.editorStateByCaseId[e]=s}static respondToCollaboratorViewOpen(e,r,n,o){if(this.DEPARTURE_STATES.has(o)){this.respondedToViewOpenByCaseId[e]?.delete(r);return}if(n!==this.VIEW_OPEN&&o!=="viewing")return;let i=this.respondedToViewOpenByCaseId[e]??new Set;if(this.respondedToViewOpenByCaseId[e]=i,i.has(r))return;let s=this.localInteractionStateByCaseId[e];if(!s)return;i.add(r);let a=s===this.EDITING_STATE?this.EDIT_OPEN:this.VIEW_OPEN;this.publishCaseEvent(a,e)}static updateStaleState(e,r,n){if(!this.isLaunchpadRuntime())return;let o=n?this.assignmentIdByContext[e]===n:!1,i=!this.isLocalActionContext(e)&&o&&(r==="submitted"||r==="stage_changed");if(Pu(e)&&!i)return;let{bannerType:s,messageType:a,message:c}=this.getStaleBannerDetails(i),l=this.collaborationBannerByContext[e];l!==s&&(l&&this.clearCurrentBanner(e,l),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:a,message:c}]}),this.collaborationBannerByContext[e]=s,i?(HT(e,!0),this.hideAssignmentActions(e)):HT(e,!1))}static hideAssignmentActions(e){if(!this.isLaunchpadRuntime()||!W(e))return;let r=oe(d.CASE_INFO.ACTION_BUTTONS,"",e),n=Array.isArray(r?.main)?r.main:[],o=Array.isArray(r?.secondary)?r.secondary:[],i=s=>{if(!s)return!1;let a=typeof s.actionID=="string"?s.actionID.toLowerCase():"",c=typeof s.jsAction=="string"?s.jsAction.toLowerCase():"";return a==="cancel"||c==="cancelassignment"};T({type:bt,payload:{context:e,reference:d.CASE_INFO.ACTION_BUTTONS,value:{main:n.filter(s=>i(s)),secondary:o.filter(s=>i(s))}}})}static isAssignmentStale(e){return Pu(e)}static isContextStale(e){return SE(e)}static getMatchingPendingAction(e,r){let n=typeof r=="string"?{state:r}:r,o=this.assignmentIdByContext[e];if(n&&(!n.assignmentId||n.assignmentId===o))return n}static refreshCollaborationBanner(e,r,n){if(!this.isLaunchpadRuntime())return;let o=this.getMatchingPendingAction(e,n);if(o){let i=this.collaborationBannerByContext[e];if(i==="stale-data"||i==="stale-assignment")return;let s=o.state==="submitted"?"submitted-error":"saved-error";if(this.collaborationBannerByContext[e]!==s){let a=this.ACTION_STATE_MESSAGES[o.state];a&&this.showActionBanner(e,this.getLocalizedMessage(a),o.state)}return}this.updateCollaborationBanner(e,r)}static getRemoteEditorCount(e){let r=this.editorStateByCaseId[e]??{};return Object.values(r).filter(n=>n===this.EDITING_STATE).length}static clearPendingActionStates(e){delete this.pendingActionStateByCaseId[e]}static isCaseStillLoaded(e){let r=this.caseContextById[e];return r?oe(d.CASE_INFO.CASE_INFO_ID,"",r)===e:!1}static updateCollaborationBanner(e,r){let n=this.collaborationBannerByContext[e];this.isAssignmentStale(e)||n==="stale-data"||(r>0?((n==="saved-error"||n==="submitted-error")&&dt({category:this.PAGE_CATEGORY,context:e,type:this.ERROR_TYPE}),n===this.INFO_TYPE&&dt({category:this.PAGE_CATEGORY,context:e,type:this.INFO_TYPE}),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.WARNING_TYPE,message:this.getLocalizedMessage(this.EDIT_WARNING_MESSAGE)}]}),this.collaborationBannerByContext[e]=this.WARNING_TYPE):(n===this.WARNING_TYPE||n==="saved-error"||n==="submitted-error")&&(dt({category:this.PAGE_CATEGORY,context:e,type:n===this.WARNING_TYPE?this.WARNING_TYPE:this.ERROR_TYPE}),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.INFO_TYPE,message:this.getLocalizedMessage(this.NO_EDITORS_INFO_MESSAGE),subType:this.NO_EDITORS_INFO_SUBTYPE,dismissible:!0,context:e}]}),this.collaborationBannerByContext[e]=this.INFO_TYPE))}static clearCollaborationBanner(e){let r=this.collaborationBannerByContext[e];r&&(this.clearCurrentBanner(e,r),xj(e),delete this.collaborationBannerByContext[e])}static showActionBanner(e,r,n){let o=this.collaborationBannerByContext[e];o&&this.clearCurrentBanner(e,o),Pn({category:this.PAGE_CATEGORY,context:e,messages:[{type:this.ERROR_TYPE,message:r}]}),this.collaborationBannerByContext[e]=n==="submitted"?"submitted-error":"saved-error"}static handleLocalSubmit=e=>{let r=e?.caseID;if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentId||(e.context?oe(d.CASE_INFO.ASSIGNMENT_ID,"",e.context):void 0),o=e.isModalAction===!0&&e.isModalLaunchedFromPrimaryValue===!0,i=e.isLocalAction===!0||o;i||(this.suppressEditingWarningOnNextAssignmentLoadByCaseId[r]=!0),this.publishCaseEvent(i?this.EDIT_SAVE:this.EDIT_SUBMIT,r,n)};static handleLocalSave=e=>{let r=e?.caseID||(e?.context?oe(d.CASE_INFO.CASE_INFO_ID,"",e.context):"");if(!r)return;this.pendingSaveCaseIds.add(r);let n=e.assignmentID;this.publishCaseEvent(this.EDIT_SAVE,r,n)};static handleLocalCancel=e=>{e?.caseID&&(this.localInteractionStateByCaseId[e.caseID]="viewing",this.pendingSaveCaseIds.add(e.caseID),this.clearPendingActionStates(e.caseID),this.publishCancelTransition(e.caseID))};static publishCancelTransition(e){if(this.cancelTransitionCaseIds.has(e)){this.cancelTransitionCaseIds.delete(e);return}this.cancelTransitionCaseIds.add(e),setTimeout(()=>this.cancelTransitionCaseIds.delete(e),0),this.publishCaseEvent(this.EDIT_CANCEL,e)}static handleCaseEditClose=e=>{e&&(this.localInteractionStateByCaseId[e]="viewing",this.pendingSaveCaseIds.add(e),this.publishCancelTransition(e))};static handleAssignmentLoad=e=>{let{caseKey:r,actionInContext:n}=e??{};if(!n||!this.isAssignmentContext(n))return;let o=this.resolveCaseIdForAssignmentContext(r,n);if(!o)return;this.caseCollabSubIds[o]||this.subscribeToCollaborators(o,n),this.pendingSaveCaseIds.delete(o),this.restoreCollaboratorsFromContext(o,n);let i=this.getRemoteEditorCount(o);this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o]&&(delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[o],i=0);let s=this.assignmentContextsByCaseId[o]??(this.assignmentContextsByCaseId[o]=[]);s.includes(n)||s.push(n),this.caseIdByAssignmentContext[n]=o;let a=e.assignmentID;a&&(this.assignmentIdByContext[n]=a),this.clearCollaborationBanner(n),this.refreshCollaborationBanner(n,i,this.pendingActionStateByCaseId[o])};static closeAssignmentContext(e){this.clearCollaborationBanner(e);let r=this.caseIdByAssignmentContext[e];if(delete this.caseIdByAssignmentContext[e],delete this.assignmentIdByContext[e],!r)return;let n=this.assignmentContextsByCaseId[r];if(!n)return;let o=n.indexOf(e);o!==-1&&n.splice(o,1),n.length===0&&delete this.assignmentContextsByCaseId[r]}static handleAssignmentUnload=e=>{let r=e?.actionInContext;r&&this.closeAssignmentContext(r)};static subscribeToCollaborators(e,r){let n=Tt.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},o=>this.handleCaseCollaboratorsUpdate(e,r,o));this.caseCollabSubIds[e]=n,this.caseContextById[e]=r}static unsubscribeToCollaborators(e){Tt.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e];let r=this.caseContextById[e];r&&(this.clearCollaborationBanner(r),delete this.caseContextById[e]);let n=this.assignmentContextsByCaseId[e];n&&n.slice().forEach(o=>this.closeAssignmentContext(o)),delete this.editorStateByCaseId[e],delete this.localInteractionStateByCaseId[e],delete this.respondedToViewOpenByCaseId[e],delete this.pendingActionStateByCaseId[e],this.pendingSaveCaseIds.delete(e),this.cancelTransitionCaseIds.delete(e),delete this.suppressEditingWarningOnNextAssignmentLoadByCaseId[e]}static publishCaseEvent(e,r,n){Tt.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:r}},message:n?{state:e,assignmentId:n}:e})}static handleCaseLoadEvent(e){let{caseId:r,context:n}=e,o=!this.openCaseViewByCaseId.has(r);this.openCaseViewByCaseId.add(r);let i=this.caseCollabSubIds[r];o&&i&&Tt.unsubscribe(i),(!i||o)&&this.subscribeToCollaborators(r,n),this.restoreCollaboratorsFromContext(r,n),this.localInteractionStateByCaseId[r]??="viewing",this.publishCaseEvent(this.VIEW_OPEN,r)}static shouldKeepCaseSubscriptionOnUnload(e){return this.pendingSaveCaseIds.has(e)||(this.assignmentContextsByCaseId[e]??[]).length>0||this.isCaseStillLoaded(e)}static handleCaseUnloadEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),!this.shouldKeepCaseSubscriptionOnUnload(r)&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static handleCaseClosedEvent(e){let{caseId:r}=e;this.openCaseViewByCaseId.delete(r),r&&this.caseCollabSubIds[r]&&(this.publishCaseEvent(this.VIEW_CLOSE,r),delete this.localInteractionStateByCaseId[r],this.unsubscribeToCollaborators(r))}static getCaseEventCallback(e,r){switch(e){case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN:return n=>{this.cancelTransitionCaseIds.delete(n),this.localInteractionStateByCaseId[n]=this.EDITING_STATE,this.publishCaseEvent(r,n)};case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD:return n=>this.handleCaseLoadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD:return n=>this.handleCaseUnloadEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED:return n=>this.handleCaseClosedEvent(n);case d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE:return n=>this.handleCaseEditClose(n);default:throw new Error(`Unhandled eventKey: ${e}`)}}static subscribeToEvent(e,r,n){let o=this.getCaseEventCallback(e,r);$.subscribe(e,o,n)}static unsubscribeFromEvent(e,r){$.unsubscribe(e,r)}static subscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,this.VIEW_CLOSE,"case_view_closed"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CANCEL,"case_edit_close"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,this.handleLocalSubmit,"case_collab_submit"),$.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,this.handleLocalSave,"case_collab_save"),$.subscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,this.handleLocalCancel,"case_collab_cancel"),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,this.handleAssignmentLoad,"case_collab_assignment_load"),$.subscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,this.handleAssignmentUnload,"case_collab_assignment_unload"))}static unsubscribeToCaseEvents(){(this.isCollaborationEnabled()||this.isLaunchpadRuntime())&&(this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_CLOSED,"case_view_closed"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,"case_collab_submit"),$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,"case_collab_save"),$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_CANCEL,"case_collab_cancel"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,"case_collab_assignment_load"),$.unsubscribe(d.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,"case_collab_assignment_unload"))}},Ss=I0;var b0=class t{broadcastChannel;callback;isReverseCoexistenceCase;broadcastEventToIframe;isDirtyDialogActive;onCreateCallback;openAssignmentParams;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}getUniqueId=()=>{let e=Reflect.get(globalThis,"uniqueId");return typeof e=="number"?e:void 0};setUniqueId=()=>{Reflect.set(globalThis,"uniqueId",new Date().getTime())};initBroadcastChannel=()=>{typeof globalThis.BroadcastChannel=="function"&&(this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{let{uniqueId:r}=e.data;if(r===this.getUniqueId())switch(e.data.action){case t.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case t.LOAD_PREVIEW:{this.loadPreview(e);break}case t.UPDATE_COEXISTENCE_DRILLDOWN_CASE:{this.updateCoexistenceDrilldownCase(e);break}case t.OPEN_ASSIGNMENT_ACTION:{this.openAssignment(e);break}case t.GET_NEXT_WORK_ACTION:{this.getNextWork(e);break}case t.OPEN_WORK_BY_HANDLE:{this.openWorkByHandle(e);break}case t.CLOSE_CONTAINER_ACTION:{this.closeContainer(e);break}case t.CANCEL_CASE:{this.handleCaseCancel();break}case t.CREATE_WORK:{this.createWork(e);break}default:break}})};displayDirtyPopup=e=>{if(this.broadcastEventToIframe=e.data.fromInfinity??!1,!this.isDirtyDialogActive)if(e.data.isFormDirty){if(this.shouldBypassDirtyPopupForStaleAssignment()){this.callback?.call(this);return}$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0}else this.callback?.call(this)};shouldBypassDirtyPopupForStaleAssignment=()=>{let e=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,r=Ar(e),n=r?se(r):"";if(!n)return!1;let o=pe(n);return[n,o].filter(s=>typeof s=="string"&&s.length>0).some(s=>Ss.isAssignmentStale(s))};handleCaseCancel=()=>{let e=Ke(E.APP.APP),r=e[e.length-1],n=se(r),o=W(n)?.caseInfo?.ID;if(o&&n&&ct({}).getPConnect().getActionsApi().getDescendants(o,n),$r(n)){let i=Oa(n);i&&ct({}).getPConnect().getActionsApi().getDescendants(o,i)}};loadPreview=e=>{let{pyID:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&ct({}).getPConnect().getActionsApi().showCasePreview(r,{caseClassName:n})};navigateToDefaultPage=()=>{let e=P.getDefaultQualifiedName("Data-Portal"),r=P.getDefaultQualifiedName("pyHome"),n=ct({isRoot:!0}),o=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages,i;Array.isArray(o)&&o[0]&&(i=o[0]);let s=i?.pyClassName||e,a=i?.pyRuleName||r;n.getPConnect().getActionsApi().showPage(a,s)};closeContainer=e=>{let{uniqueId:r}=e.data;r===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{let{key:r,caseClassName:n,actionApi:o,caseLabel:i,uniqueId:s}=e.data;if(s!==this.getUniqueId())return;let a=o;o===t.OPEN_WORK_ITEM&&(a=t.OPEN_WORK_BY_HANDLE),_e.updateSemanticURLAndDocumentTitle({key:r,caseClassName:n,actionName:a,name:i}),ct({}).getPConnect().getActionsApi().updateRecents(n,r.substring(r.lastIndexOf(" ")+1),i,r)};openAssignment=e=>{let{pzInsKey:r,caseClassName:n,uniqueId:o}=e.data;o===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(r&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=r:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),r&&n&&ct({}).getPConnect().getActionsApi().openAssignment(r,n,{containerName:E.PRIMARY,context:E.APP.APP})),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{let{uniqueId:r}=e.data;if(r===this.getUniqueId()){let n=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(n)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{let{key:r,caseClassName:n,uniqueId:o}=e.data;if(o===this.getUniqueId()){let i=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`;ct({meta:{},options:{context:Ar(i)}}).getPConnect().getActionsApi().openWorkByHandle(r,n)}};createWork=e=>{let{strClassName:r,uniqueId:n,strFlowParams:o,caseInitProperties:i}=e.data;if(n===this.getUniqueId()){let s=`${E.APP.APP}${d.FORWARD_SLASH_STRING}${E.PRIMARY}`,a=ct({meta:{},options:{context:Ar(s)}}),c=i+o,l=new URLSearchParams(c.slice(1)),u=this.setStartingFields(l);a.getPConnect().getActionsApi().createWork(r,{startingFields:u})}};setStartingFields=e=>{let r={};return e.forEach((n,o)=>{o&&(r[o]=n)}),r};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),$.subscribe(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{$.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),$.unsubscribeAllWithEventType(E.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{this.broadcastChannel===null&&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:t.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:t.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,r,n)=>{this.broadcastChannel===null&&this.init(!1),this.broadcastChannel?.postMessage({action:t.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=r,this.openAssignmentParams=n}},Jd=new b0;var Co={NEXT_ASSIGNMENT_ID:"data.nextAssignmentInfo.ID",FIRST_ASSIGNMENT_ID:"data.caseInfo.assignments.0.ID",NEXT_ASSIGNMENT_INFO:"nextAssignmentInfo",NEXT_ASSIGNMENT_INFO_CONTEXT:"nextAssignmentInfo.context"},T0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(tS)},oI=t=>t.initiatingContext||t.context,Ua=async(t,e)=>It(t)?{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1}:{...await vt(t,e),dirtyCheckPerformed:!0},v0=t=>{if(B.shouldUseUnifiedHandling())return t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1;let e=g.getIn(t,[d.DATA,d.CASE_INFO.CASE_INFO]);return Yt(e)&&mu(v.getOperatorIdentifier(),e)},_B=(t,e)=>{let r=v0(t),{skipBrowserSemanticUrlUpdate:n=!1,isTraditionalUICase:o}=e,i=o&&!Qs();g.setIn(t,["directUrlUpdation"],(!r||i)&&!n)},IB=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,bB=(t,e,r)=>!en(t)&&It(e)&&(r??!0),TB=t=>mr(t)&&v.isOpenCasePageAfterCreateInMultiDocEnabled();var Tue="Error occurred during ajax call at createWork Epic : ",vB=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return(t.isTraditionalUICase||!s&&t.renderInline===!0&&o!==it.FORM)&&(s=P.getDefaultQualifiedName("pyDetails")),q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(Tue,n))};var ja=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,t)},Yd=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},RB=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,t)};var vue=(t,e)=>B.isExternalCaseType(t)&&e?e:zo(),Rue=t=>{let e=0,r=[],n={},o,i=!1,s=!1,a="",c="";return t.pipe(ee(Dw),gr(100),O(l=>({actionMgrID:e}=l.payload,l.payload)),z(l=>{let{context:u}=l;if(o=l.class,s=!1,a="",c="",B.isExternalCaseType(o)&&(dt({context:u,stateObj:W(u),clearContextMessages:!0}),!xr(u))){let f={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,f),gc()}let p=T0(l),m=Z(p,u);return i=Dn(o),q(Ua(m,{loadingContext:u})).pipe(z(({continueExecution:f,removeActionPayload:h,dirtyCheckPerformed:S})=>f?(s=S,l.isTraditionalUICase=i,vB(l,{removeActionPayload:h})):(w.rejectActionByID(e),Et)))}),z(async l=>{if(l?.type===Te)return l.payload.context=vue(o,l.payload.context),r.push(ue(l)),r;let{actionInPayload:u,response:p,headers:m,removeActionPayload:f}=l,h=oI(u),S=B.isExternalCaseType(u.class),A=v0(p);(u.renderInline||v.getDefaultCasePage()||i)&&(A=!1),g.setIn(p.data,E.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);let C=T0({...u,isInCreateStage:A}),I=Z(C,u.context),_=st(I,C,u.context),{openCaseViewAfterCreate:N}=u;if(!s&&bB(C,I,N)){let{continueExecution:Ce}=await vt(I,{loadingContext:u.context});if(!Ce)return w.rejectActionByID(e),r}let x=u?.openCaseViewAfterCreate??!0,H=Le(p);if(!x&&!A&&!TB(I)){let Ce=aT(p),{businessID:Ye,caseType:Oe,resolvedURL:ft,caseTypeName:Qt}=ZS(p);return n={caseId:Ye,label:Qt,href:ft},ja(n),Yd({caseId:Ye,assignmentId:Ce,caseType:Oe,ID:Bt(H),initiatingContext:h}),S&&cT(u),r}let G=String(er(Bt(H))),re=At("createWork",{caseClassName:On(H)});re=re.replace(/{.+?}/,G),H.semanticURL=re,pt.setComponentCache(G,Ge.addDebugHeaders(u.debugInfo)),_B(H,u);let j={acName:I,context:_},ne=wn(_);await Pe(H,u,j);let be=IB(H),he={target:I,context:_,initiatingContext:h,containerItemID:_,headers:m,semanticURL:re,isInCreateStage:A,isMinimizable:A,caseViewMode:be,currentCaseViewMode:ne,assignmentContext:g.getIn(H,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(H,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.CASE,openCaseViewAfterCreate:u.openCaseViewAfterCreate,modalOptions:u.modalOptions,debugInfo:u.debugInfo};xn(he,H);let Me=$e(H,he);i&&(Me.data.caseInfo.content.coexistenceAction="openAssignment"),B.setTraditionalGadgetId(Me.data);let Fe=Ht(I,Me);return tn(Fe)&&ri(r,{removeActionPayload:f,target:I}),S&&cT(u),r.push(Fe),dr(H,he),RB({caseId:G}),a=be,c=Bt(H),r}),O(()=>{let l=Qs(),u=Yt(g.getIn(r[0]?.payload,"data.caseInfo"));return i&&l&&u?Jd.postCreateCaseMessage(r[0]?.payload?.nextAssignmentInfo?.ID,gn,r):gn(r),a===E.CASE_VIEW_MODE.PERFORM&&Ki(c),mt(r,e),n={},r=[],a="",c="",r}))},PB=Rue;var{RESOURCE_TYPES:xB}=E,DB=t=>{let{isModalAction:e,viewType:r,isInCreateStage:n,isCaseWideAction:o}=t;return e&&n&&!o?it.PAGE:r||it.FORM},wB=t=>{let{isCaseWideAction:e,caseTypeID:r}=t;return B.shouldUseUnifiedHandling()?e||B.isObjectCaseType(r)?WI:qI:e?WI:qI},iI=(t,e)=>{let{containerItemID:r,context:n,actionMgrID:o,isInCreateStage:i,isModalAction:s}=e;if(i&&s){let a=Lr(r),c=Z(a,n);t.push(V(rr,{containerItemID:r,target:c,actionMgrID:o}))}},za=(t,e)=>{let{containerItemID:r,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}=e,s=pe(r),a=`${s?.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.MODAL}`;t.push(V(Qe,{containerItemID:r,context:s,target:a,skipReleaseLockRequest:n,isInCreateStage:o,isProcessAction:i}))},Pue=(t,e)=>{let r=t?.assignmentID,o=(e?.data?.caseInfo?.assignments??[])[0]?.ID;return r!==o},R0=t=>oe(".openCaseViewAfterCreate",d.CONTEXT_DATA,t)??!0,Nue=(t,e)=>mr(t)&&(R0(e)||v.isOpenCasePageAfterCreateInMultiDocEnabled()),Oue=t=>t.initiatingContext||oe(".initiatingContext",d.CONTEXT_DATA,t?.context),xue=async(t,{translatedDXAPIResponse:e,actionInPayload:r},n,o,i)=>{let{caseID:s}=r,a=WU(e),c=o?Yn(e):On(e),{caseViewMode:l,headers:u,semanticURL:p,actionMgrID:m,directUrlUpdation:f,key:h,flowName:S,resourceType:A}=n,C=te(r?.context),I=We(C,r?.context)?.acTertiary,_=Oue(r);Object.assign(i,{caseId:s,assignmentId:a,caseType:c,isSubmitFromBlendedUI:I,..._&&{initiatingContext:_}}),za(t,{...r,skipReleaseLockRequest:!0});let N=`${r?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,x=st(N,ge.PRIMARY),H=Ge.getCoreHeadersFromContext(r.context)||!1,G=$e(e,{target:N,context:x,containerItemID:x,caseViewMode:l,headers:u,semanticURL:p,key:h,flowName:S,resourceType:A,directUrlUpdation:f,debugInfo:H&&H.debugInfo&&{debugId:H.debugInfo[d.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(It(N)){let re=W(x),ne=`You will lose unsaved changes for ${KU({data:re})}. Do you want to continue?`;if(R0(r.context)){let{continueExecution:be}=await vt(N,{dirtyMessage:ne});if(!be)return n.directUrlUpdation=!1,w.rejectActionByID(m),gc();G.currentCaseViewMode=wn(G?.context),t.push(V(kn,G)),r.__deferCaseActionsPayload=G}else return t}else if(Nue(N,r.context))t.push(V(Pt,G));else return t;return e.directUrlUpdation=f,e.semanticURL=p,await Pe(e,{...G,acName:N},{acName:N,context:x}),t},Due=(t,e,r)=>{let n=/^app\/preview_[0-9]*/g,{containerItemID:o,caseID:i}=e;if(o&&n.test(o)&&$r(o)){let{caseClassName:s}=r,a=qe(o),c=pe(a);t.push(V(Pm,{containerItemID:a,context:c,container:ge.PREVIEW,containerName:ge.PREVIEW,caseId:i,viewName:E.PREVIEW_VIEW_NAME,caseClassName:s,updateData:!0}))}},wue=(t,e,r)=>{let{containerItemID:n}=e,o=pe(n),{data:i,caseViewMode:s}=r;if(o&&$r(n)){let a=Po(o),c={data:i,caseViewMode:s,context:a};g.setIn(c.data,["context_data","caseViewMode"],s),t.push({type:pn,payload:{context:a}});let l=B.getPropertiesToReplace(n);t.push(V(Re,c,{propertiesToReplace:l})),e.shouldUpdateCaseActionsInParentContext=!0,e.__deferCaseActionsPayload=e}},$B=(t,e)=>{let{isCaseWideAction:r,assignmentID:n,actionID:o}=e;return{isCaseWideAction:r,caseID:Bt(t),assignmentID:r?null:n,actionID:o||null}},sI=(t,{isModalAction:e,target:r,transientItemID:n})=>{if(e){let i=t.find(({type:s})=>s===et);i?.payload&&(r=i.payload.target,n=i.payload.containerItemID)}let o=$w({target:r,containerItemID:n});o.payload.transientItems.length&&t.push(o)},$ue=(t,e,r)=>{if(e.isProcessAction&&(za(r,{...e,skipReleaseLockRequest:!0}),t)){let n=`${e?.containerItemID.includes("root")?d.APP.ROOT:d.APP.APP}/${ge.PRIMARY}`,o=st(n,ge.PRIMARY),i={insKey:t.ID,className:t.content.classID,context:o,acTargetName:d.PRIMARY,isChild:!0},s={type:Go,payload:{...i}};r.push(s)}},MB=t=>/^app\/preview_[0-9]*/g.test(t),pl=(t,e)=>{let r=/^app\/primary_[0-9]*/g,n=qe(t);return MB(t)?!1:n===e?!0:r.test(n)},aI=t=>{if(!R0(t.context)){let e,r=t?.caseTypeID,n=t?.caseTypeName;return t.businessID?e=t.businessID:e=t.workID,{caseID:e,caseTypeID:r,caseTypeName:n}}return{}},Mue=(t,e)=>{let r=te(t);return wt(r,e)},kue=(t,e=!1,r=!1)=>{let o=w.getNextActionMgrId(),i=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",t),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",t);return{ID:i,actionID:s,context:t,caseWideAction:e,contextData:r,options:{actionMgrID:o}}},NB=(t,e,r,n)=>{let{data:o,caseViewMode:i}=e,s={data:o,caseViewMode:i,context:r};if(g.setIn(s.data,["context_data","caseViewMode"],i),t.push({type:pn,payload:{context:r}}),n){let c={data:Ve.transformObjectToCase(o),caseViewMode:i,context:r};t.push(V(Re,c))}t.push(V(Re,s))},Lue=t=>{if(!t?.isCaseWideAction)return!1;let e=t.context;return!!((e?qe(e):void 0)?.includes(ge.MODAL)&&e?.includes(ge.MODAL))},Uue=async(t,e,r,n,o,i,s,a,c,l)=>{let{headers:u}=c,p=l?d.OBJECT_INFO.OBJECT_INFO:d.CASE_INFO.CASE_INFO,m=Lue(n);if(t)if(m){za(o,{...n,skipReleaseLockRequest:!0}),e.doDeleteCaseSummary=n.doDeleteCaseSummary,e.deleteAssignmentSpecificResources=!1;let f=e?.data?.[p]?.content;(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(e.root=void 0,delete e.data?.caseMessages);let{data:h,caseViewMode:S}=e,A={data:h,caseViewMode:S,context:r};A?.data&&g.setIn(A.data,["context_data","caseViewMode"],S),o.push(V(Re,A))}else{if(typeof c?.response?.uiResources?.root!="object"){let ne=(Oe,ft)=>{let Qt=Oe.findIndex(yr=>yr.ID===ft);if(Qt!==-1){let[yr]=Oe.splice(Qt,1);Oe.unshift(yr)}return Oe},be=W(t),he=c?.response?.data?.caseInfo?.assignments??[],Me=be?.caseInfo?.assignments??[],Fe=wn(t)===d.PERFORM_MODE,Ce=he[0]?.ID!==Me[0]?.ID,Ye=he.length>0&&Me.length>0;Fe&&Ce&&Ye&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=ne(he,Me[0]?.ID))}let f=It(te(t)),h=!1,S=te(r),A=ut(S),C=se(S);C&&A?.items?.[C]?.key===c?.actionInPayload?.caseID&&(h=!0),za(o,{...n,skipReleaseLockRequest:!0});let I=Lr(t),_={target:te(t),containerItemID:t,context:t,containerName:I};e.doDeleteCaseSummary=n.doDeleteCaseSummary;let N=Po(r),x=W(N),H=W(n.context),G=x[p]?.ID,re=H[p]?.ID,j=W(t)?.caseInfo?.ID;if(f&&G===re||!f&&(s===""||_.containerItemID.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&j===e.data?.caseInfo?.ID||!i&&e.root&&Object.keys(e.root).length===0&&j===e.data?.caseInfo?.ID))(e?.data[p]?.content===void 0||e.data[p].content!==void 0&&typeof e.data[p].content=="object"&&Object.keys(e.data[p].content).length===0)&&(e.root=void 0,delete e.data?.caseMessages),t.includes(d.WORKAREA)&&e.caseViewMode===d.REVIEW_MODE&&Pue(n,a)&&(e.flowName=" ",e.clearView=!0,e.root?.config?.name!==d.PY_CONFIRM&&(e.root=void 0)),t.includes(d.ACTIONAREA)?o.push(V(Re,{...e,key:s,resourceType:"",..._})):We(_.target,_.containerItemID)?.resourceType!==xB.PAGE&&j===e.data?.caseInfo?.ID&&o.push(V(tr,{...e,key:s,resourceType:"",..._}));else if(i){let ne=te(t),be=wt(ne,s);if(be)_.target=ne,_.context=be,_.containerItemID=be,o.push(V(tr,{...e,key:s,resourceType:"",..._}));else{let he=Ke(r)[0];if(n.target=he,n.context=st(he,d.WORKAREA,r),n?.context){n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let Me=n.containerItemID;o.push(V(rr,{parentContainerTarget:he,containerItemID:Me}))}}}if(n.target=te(t),n.containerName=Lr(t),n.context=t,n.containerItemID=t,n.shouldUpdateCaseActionsInParentContext=!0,g.setIn(e,"acName",_.target),await Pe(a,e),n.__deferCaseActionsPayload=n,h&&(r.includes(d.WORKAREA)&&$r(r)&&(r=Po(r)),NB(o,e,r,l)),!i&&e.caseViewMode===d.PERFORM_MODE){let ne=Mue(t,s),be={data:{[p]:{headers:u}},context:ne};o.push(V(Re,be)),o.push(oa(kue(ne)))}}else{za(o,n);let f=!1,h=te(r),S=ut(h),A=se(h);if(A&&S?.items?.[A]?.key===c?.actionInPayload?.caseID&&(f=!0),i){let C=Ke(r)[0];n.target=C,n.context=st(C,d.WORKAREA,r),n.containerItemID=n.context,o.push(V(Pt,{...n,...e}));let I=n.containerItemID;o.push(V(rr,{parentContainerTarget:C,containerItemID:I}))}f&&NB(o,e,r,l)}},kB=(t,e,r,n,o)=>{let i,s=te(e);mr(s)?i=wt(s,r.data?.caseInfo?.ID):i=se(s);let a=!0;if(t&&i){let c=J.getPropertyValue(E.CASE_INFO.ASSIGNMENTACTION_ID,"",i),l=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,"",i);if(c){let p=r?.data?.caseInfo?.assignments?.find(m=>m.ID===l)?.actions;p&&!p.some(m=>m?.ID===c)&&(a=!1)}}return n&&t&&a&&Wi(null,d.CASE_VIEW_MODE_PROP,i)===d.PERFORM_MODE&&o},jue=async(t,e,r,n,o,i,s)=>{let a=i?"objectInfo":"caseInfo";$ue(t.data[a].parentCaseInfo,e,o);let c=t?.data[a]?.parentCaseInfo?.ID;if(c){let l=te(e?.context),u=We(l,e?.context)?.parentContext,p=te(u);e?.isProcessAction&&ll(p,c)&&KD(u,t?.data[a]?.lastUpdateTime)}r.resourceType=xB.CASE,r.directUrlUpdation=!0,e.isProcessAction||await xue(o,{translatedDXAPIResponse:n,actionInPayload:e},r,i,s)},LB=async(t,e,r)=>{let n={assignmentID:t?.data?.caseInfo?.assignments[0]?.ID,className:t?.data?.caseInfo?.content?.classID,containerName:ge.PRIMARY,targetContainerName:ge.PRIMARY,viewType:it.PAGE,isLastStepInCreateStage:!0,context:r},o={type:$i,payload:{...n}};e.push(o)},P0=async(t,e,r,n,o)=>{t.doDeleteCaseSummary=e.doDeleteCaseSummary,t.caseViewMode===d.REVIEW_MODE&&(t.flowName=" ",t.clearView=!0);let{containerItemID:i}=e;It(te(i))||g.setIn(t.data,["context_data","caseViewMode"],t.caseViewMode);let s=B.getPropertiesToReplace(i);o.push(V(tr,{...t,...n,propertiesToReplace:s})),g.setIn(t,"acName",n.target),await Pe(r,t),wue(o,e,t)},cI=async(t,e,r,n,o,i,s,a,c,l={})=>{let{isCaseWideAction:u,isInCreateStage:p,containerItemID:m}=t,f=qe(t.context),h=nE(o,c),S=c?Yn(o):On(o),A=p&&!h&&!u,C=Ke(f)[0],I=C?se(C):f,_=Lr(m),N=pe(m),x=Object.freeze({target:t.target,containerItemID:m,context:N,containerName:_});A&&!MB(t.context)?await jue(a,t,e,o,i,c,l):pl(t.context,I)?await Uue(I,e,f,t,i,r,n,o,s,c):(u||c)&&!pl(t.context,I)?(za(i,t),Due(i,t,{caseClassName:S})):await P0(e,t,o,x,i)},lI=(t,e,r)=>{let{isModalAction:n,isCaseWideAction:o,caseID:i,assignmentID:s,isLocalAction:a}=e,c=pl(e.context,r),l=t?.data?.caseInfo?.stages,u=t?.data?.caseInfo?.stageID;XS({caseID:i,context:e.context,assignmentId:s,isLocalAction:!!a,isModalAction:n,isModalLaunchedFromPrimaryValue:c,isCaseWideAction:o,stages:l,stageID:u})},UB=(t,e)=>{let{assignmentID:r}=e;return t?.data?.caseInfo?.assignments?.some(n=>n.ID===r&&n?.canPerform==="true")},uI=t=>{let e=t?.payload?.err?.errorDetails,r=t?.payload?.context;e?.forEach(n=>{n[d.ERROR_FIELD_IN_PAGE]=n[d.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,a=>`[${parseInt(a.substring(1,a.length-1),10)-1}]`);let o=n[d.ERROR_FIELD_IN_PAGE].slice(1),i=n[d.ERROR_IN_PAGE_IDENTIFIER],s=i.startsWith(".")?i.slice(1):i;if(s){let a=o?`caseInfo.content.${o}`:"caseInfo.content";a=d.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));let c=Qn(s,a,d.PROPERTY),l={type:E.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue};Ie.mutateField(r,a,c[c.length-1],{messages:[l],type:E.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:i})}})},OB=t=>{let e=W("app")?.pyPortal?.pyPrimaryNavPages,r=Array.isArray(e)?e[0]:null;return r?(rn.clearChangedProperties(t),[{type:Pr,payload:{className:r.pyClassName,containerName:d.PRIMARY,context:d.APP.APP,pageReference:"pyPortal",viewName:r.pyRuleName,skipSemanticUrl:""}}]):[]},jB=async t=>{let{target:e,containerItemID:r,context:n}=t,o=Ar("app/primary"),i=We(e,r)?.parentContext,s=!!e&&mr(e),a=mr("app/primary");if(s&&i!==d.APP.APP){if(await ta(r,{skipDirtyCheck:!0}),Hd(e).length===0)return OB(n)}else if(o&&a&&!i)await ta(o,{skipDirtyCheck:!0,eventName:"Dismiss case"});else return OB(n);return[]};var N0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(Yo)},zB=t=>t?.uiResources?.root?.config?.name===P.getDefaultQualifiedName("pzCreateDetails")||!1,Zd=(t,e)=>{let r=zB(t),{skipBrowserSemanticUrlUpdate:n=!1}=e;g.setIn(t,["directUrlUpdation"],!r&&!n)},Qd=t=>t.confirmationNote?d.REVIEW_MODE:d.PERFORM_MODE,Xd=(t,e)=>{let r;return t.renderInline||v.getDefaultCasePage()?r=!1:r=zB(e),r},FB=(t,e)=>{B.isExternalObject(t.class)&&(t.containerItemID=t.context,za(e,t))},VB=(t,e)=>!t&&!e,BB=(t,e,r)=>!en(t)&&It(e)&&!B.isExternalObject(r),HB=(t,e,r)=>{if(tn(t)){let{removeActionPayload:n,target:o}=e;ri(r,{removeActionPayload:n,target:o})}},GB=t=>{B.isExternalObject(t.class)&&ja({content:Nr().getLocaleValue("Successfully submitted!","Assignment")})},qB=t=>{B.isExternalObject(t)&&Ve.setNeedsMapping(!1)};var O0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(Bs)};var zue="Error occurred during ajax call at createObject Epic : ",WB=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(zue,n))};var KB="CREATE_EXTERNAL_CASE";var Fue=t=>{let e=0,r=[],n=!1;return t.pipe(ee(KB),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=O0(i),c=Z(a,s);return n=!1,q(Ua(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,WB(i,{removeActionPayload:u})):(w.rejectActionByID(e),Et)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=zo(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=oI(s),p=Xd(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let m=O0({...s,isInCreateStage:p}),f=Z(m,s.context),h=st(f,m,s.context);if(!n&&!en(m)&&It(f)){let{continueExecution:H}=await vt(f,{loadingContext:s.context});if(!H)return w.rejectActionByID(e),r}let S=Le(a),A=At(uc,{caseClassName:On(S)});A=A.replace(/{.+?}/,String(er(Bt(S)))),S.semanticURL=A,Zd(S,s),await Pe(S,s,{acName:f,context:h});let I=Qd(S),_={target:f,context:h,initiatingContext:u,headers:c,semanticURL:A,caseViewMode:I,containerItemID:h,isInCreateStage:p,isMinimizable:p,assignmentContext:g.getIn(S,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(S,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalCaseCreationFlow:!0};xn(_,S);let N=$e(S,_),x=Ht(f,N);return tn(x)&&ri(r,{removeActionPayload:l,target:f}),r.push(x),pE(r),r}),O(()=>(gn(r),mt(r,e),r=[],r)))},JB=Fue;var{RESOURCE_TYPES:Vue}=E,Wh=(t,e={})=>{let{viewType:r,containerName:n,targetContainerName:o,isChild:i}=t,s=Ji(e);return RU(s)&&t?.stageID===s.stageID?it.PAGE:r||((sT(n)||sT(o))&&!i?it.FORM:it.PAGE)},YB=(t,e)=>{let r=Ji(t),n;v.getDefaultCasePage()?n=!1:n=Yt(r);let{isChild:o,containerName:i,isTraditionalUICase:s}=e,a=o&&n,c=n&&!e.isActionFromToDoList;return(a||c)&&!s&&!e.renderInline?d.MODAL:i||Lt(qn,e)},ZB=async(t,e,r)=>{let{semanticURL:n,containerItemID:o,isParallelAssignment:i,insKey:s}=e,{target:a,actionInPayload:c}=r,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=pe(o);await Pe({directUrlUpdation:!l,semanticURL:n},c,{acName:a,target:a,context:u}),t.push(V(rr,{containerItemID:o,target:a,isParallelAssignment:i,insKey:s,resourceType:Vue.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))},QB=(t,e)=>{let r=Ji(t),n=Bt(t),o=Yt(r),{skipBrowserSemanticUrlUpdate:i=!1,viewType:s,isTraditionalUICase:a}=e,c=a&&!Qs(),l=s===it.PAGE&&(!o||c)&&!i,{caseTypeID:u}=r;if(l){let p=At(Kt,{caseClassName:u}).replace(/{.+?}/,String(er(n)));t.semanticURL=p,t.directUrlUpdation=!0}},XB=t=>{let e=t?.headers??{};return t?.isRemote&&(e=we(e,t.remoteClassName)),e},Bue=(t,e,r,n,o)=>{Wh(t,e)===it.FORM?(r.caseViewMode=n||d.PERFORM_MODE,o.push(V(tr,r))):o.push(V(kn,r))},Hue=(t,e,r,n,o)=>{if(ri(t,{removeActionPayload:e,target:r}),pj(n.key,r))n.context=Ar(r),n.containerItemID=n.context,t.push(V(kn,n));else if((o?.isChild||o?.isRemote)&&o?.isMultiDoc){let i=te(o.context);n.target=i,n.context=o.context,n.containerItemID=o.context,t.push(V(kn,n))}else{let i=te(n.context),s=wt(i,n.key);s?(n.target=i,n.context=s,n.containerItemID=s,t.push(V(kn,n))):t.push(V(Pt,n))}},e8=(t,e,r,n,o,i,s)=>{It(e)&&jr(e)?Bue(n,o,t,i,r):Hue(r,s,e,t,n)},t8=(t,e)=>{t.acTertiary&&(e.data.caseInfo.isFirstAssignment=t.acTertiary)},r8=(t,e)=>{if(t=ae.getRemoteCaseClassBySourceClass(t)??t,ae.isRemoteCase(t)){let{RemoteClassName:r,RemoteSystemID:n,name:o}=ae.getRemoteCase(t);if(e.headers?.RemoteSystemID||w.setRemoteCaseHeaderByContext(e,n),ae.isTraditionalRemoteCase(t)||ae.getRemoteAppPlatformVersion(n)){e.assignmentID=e.assignments?.[0]?.ID;let i={className:t,name:o,action:pS,remoteClassName:r};w.setTraditionalRemoteCaseParams(e,i)}}},Gue=t=>{let{inlineViewType:e,caseTypeID:r,RedirectURL:n}=t;if(e&&e.toLowerCase().includes("remote"))return!1;let o=ae.getRemoteCaseClassBySourceClass(r)??r;return!ae.isRemoteCase(o)&&!!n},n8=(t,e,r)=>{if(!t||!e||!Gue(e)||!e.RedirectURL)return!1;try{let n=new URL(e.RedirectURL);if(n.protocol==="https:")return globalThis.open(n.href,"_blank","noopener,noreferrer"),w.resolveActionByID(r),!0}catch{}return!1},o8=(t,e,r,n)=>{if(It(t)&&$r(e)){let o=r?.data?.caseInfo?.assignments;if(Array.isArray(o)&&o.length>0){let i=qe(e);n.push(V(Re,{context:i,data:{caseInfo:{assignments:o}}},{propertiesToReplace:[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}]}))}}},i8=(t,e)=>{t&&(e.data.caseInfo.content.coexistenceAction="openAssignment")};var que="Error occurred during ajax call at openAssignment Epic : ",s8=({restUrl:t,reqType:e,requestHeaders:r,debugInfo:n,context:o,isGetNextWork:i,doNotMergeMessagesForStatusCode:s,mcpAction:a})=>{if(_t())return pr(a.actionName,{...a.payload,headers:r});let c=B.appendExcludeQueryParamToUrl(t);return k(c,{method:e,headers:{"if-match":r&&r.etag,...r,...n&&{...Ge.addDebugHeaders(n)}}},o,{doNotMergeHttpMessagesForStatusCode:i?s:""})},a8=(t,e)=>{let r=Wh(t),{headers:n,context:o,assignmentID:i,isGetNextWork:s,debugInfo:a,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:p,isLastStepInCreateStage:m}=t,f="404",h,S;s?{restApi:h,reqType:S}=U(KI,{viewType:r}):c?{restApi:h,reqType:S}=U(GI,{caseID:u,stageID:l}):{restApi:h,reqType:S}=U(qn,{assignmentID:i,viewType:r});let{removeActionPayload:A}=e,C=v.getDefaultCasePage(),I="",_=t.pageName;t.isTraditionalUICase&&(_=P.getDefaultQualifiedName("pyDetails")),C?I=`${h}?viewType=${r}&pageName=${C}`:_?I=`${h}?viewType=${r}&pageName=${_}`:I=`${h}?viewType=${r}`,p&&Object.keys(p).forEach(G=>{I+=`&${G}=${p[G]}`});let N=XB(t),x=qn;s?x=KI:c&&(x=GI);let H=G=>({actionName:x,payload:{queryPayload:{...p,assignmentID:i,caseID:u,stageID:l,viewType:r,params:{pageName:G}}}});return q(s8({restUrl:I,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(C||_)})).pipe(O(G=>v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT)&&!m?Yt(G.data.data.caseInfo)?G:(I=_?I.replaceAll(_,P.getDefaultQualifiedName("pyDetails")):I,v.setDefaultCasePage(P.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I}):G),z(G=>G?.isReloadWithDifferentViewTypeRequired?s8({restUrl:I,reqType:S,requestHeaders:N,debugInfo:a,context:o,isGetNextWork:s,doNotMergeMessagesForStatusCode:f,mcpAction:H(P.getDefaultQualifiedName("pyDetails"))}):ye(G)),O(G=>{let{key:re,flowName:j}=$T(i);return Ve.analyseResponse(G),{response:{...G.data,key:re,flowName:j},actionInPayload:t,viewType:r,removeActionPayload:A,headers:we({...n,...G.headers})}}),me(que,o))};var{RESOURCE_TYPES:Wue}=E,Kue=(t,e)=>{e!==void 0&&t.push({status:Number(e)})},Jue=(t,e)=>t&&String(t.canPerform)==="false"?d.REVIEW_MODE:e??d.PERFORM_MODE,c8=t=>{let e=v.getRuntime()==="Browser",r=0,n=[],o=[],i=!1,s=!1;return t.pipe(ee(Pa),O(a=>({actionMgrID:r}=a.payload,{...a.payload,...e?{insKey:a.payload.assignmentID}:{assignmentID:a.payload.assignmentID}})),z(a=>{i=a.isGetNextWork;let{context:c}=a,l;(a?.isChild||a?.isRemote)&&a?.isMultiDoc?l=it.FORM:l=Wh(a),a.viewType=l;let u=Lt(qn,a),p=Z(u,c),{activate:m,activateContainerActionPayload:f}=Zi(Wue.ASSIGNMENT,p,a);if(m&&!a.isParallelCall)return ye({type:nr,activateContainerActionPayload:f,actionInPayload:a});let h=se(p),S;return f?.isParallelAssignment?S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}):h?S=vt(p,{loadingContext:c}):S=Promise.resolve({continueExecution:!0,removeActionPayload:{}}),q(S).pipe(z(({continueExecution:A,removeActionPayload:C})=>A?(s=Dn(a.className),a.isTraditionalUICase=s,v.isWSSPortal()&&(a.headers={...a.headers,[d.X_ORIGIN_CHANNEL]:"WSS"}),a8(a,{removeActionPayload:C})):(w.rejectActionByID(r),Et)))}),z(async a=>{if(a?.type===Te){if(i){let{payload:Ye}=a,{err:Oe}=Ye;Kue(o,Oe?.response?.status)}return n.push(ue(a)),n}let{type:c,actionInPayload:l,response:u,viewType:p,headers:m,removeActionPayload:f,activateContainerActionPayload:h}=a;if(u?.redirectInfo?.jsAction==="openStage"){let Ye=u?.redirectInfo?.stageID,Oe=Pa,ft=u?.data?.caseInfo?.ID;l.isOpenStage=!0,l.stageID=Ye,l.jsActionQueryParams=u?.redirectInfo?.jsActionQueryParams;let Qt={type:Oe,payload:{...l,caseID:ft,headers:m}};return n.push(Qt),n}if(n8(i,u?.data?.caseInfo,r))return n;let{context:S,caseViewMode:A,debugInfo:C}=l,I=u?.data?.caseInfo?.assignments?.find(Ye=>Ye.ID===l.assignmentID);l.caseViewMode=Jue(I,A);let _=u?.data?.caseInfo?.caseTypeID;s=Dn(_),l.isTraditionalUICase=s;let N=YB(u,l);s&&(N=l.containerName??N);let x=Z(N,S);if(c===nr)return await ZB(n,h,{actionInPayload:l,target:x}),n;let H=u?.data?.caseInfo?.content,G=u?.data?.caseInfo?.ID,re=u?.uiResources?.root?.config?.name,j=u?.uiResources?.root?.config?.context;H&&!H[P.getDefaultQualifiedName("pyViewName")]&&re&&l.viewType!=="page"&&(g.setIn(H,P.getDefaultQualifiedName("pyViewName"),re),g.setIn(H,P.getDefaultQualifiedName("pyViewContext"),j));let ne=Le(u);QB(ne,l);let be=st(x,N,S),he={...l.debugInfo,debugId:l.debugInfo?.debugId??Ge.getCoreHeadersFromContext(S)?.debugInfo?.[d.COREHEADER_APP_DEBUG_ID]};he.debugId&&pt.setComponentCache(G,Ge.addDebugHeaders(he)),await Pe(ne,l,{acName:x,target:x,context:be});let Fe={target:x,context:be,containerItemID:be,headers:m,parentContext:qe(l?.context),isMinimizable:Yt(g.getIn(ne,"data.caseInfo")),doDeleteCaseSummary:l.doDeleteCaseSummary,acTertiary:l.acTertiary,resourceType:E.ASSIGNMENT,debugInfo:C,shouldUpdateCaseActionsInParentContext:!0,caseID:G};xn(Fe,ne,{skipFlowNameUpdate:l?.caseViewMode===d.REVIEW_MODE});let Ce=$e(ne,Fe);return l.isProcessAction&&(Ce.data.isProcessAction=l.isProcessAction),i8(s,Ce),B.setTraditionalGadgetId(Ce.data),t8(l,Ce),Ce.caseViewMode=l.caseViewMode,e8(Ce,x,n,l,u,A,f),r8(_,Ce.data.caseInfo),o8(x,Ce.containerItemID,ne,n),p===it.FORM&&$r(Ce.containerItemID)&&(Ce.skipMergeAssignmentsAndActions=!1,yo(Ce,n,j)),dr(ne,Fe),zU({actionInContext:S,assignmentID:l.assignmentID,caseKey:Ce.key,target:x}),Ki(Ce.key),n}),O(()=>{let a=r,c=Qs(),l=Yt(g.getIn(n[0]?.payload,"data.caseInfo"));return s&&c&&l?Jd.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,T,n):T(n),mt(n,a,o),n[0]?.payload?.isParallelAssignment&&T({type:Pa,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n}))};var Yue="Error occurred during ajax call at openWorkByHandle Epic : ",x0=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t?.pageName?t?.pageName:v.getDefaultCasePage(),l=U(Kt,{caseID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),u=B.appendExcludeQueryParamToUrl(u),q(_t()?pr(Kt,{queryPayload:{caseID:r,params:{viewType:s==="none"?"none":"page",pageName:c}}}):k(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m),{response:m.data,actionInPayload:t,headers:we({...n,...m.headers}),removeActionPayload:a})),me(Yue,o,t.actionMgrID))};var l8=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Lt(Kt,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u},!1,!!s),t.push(V(rr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},u8=(t,e)=>{let{isRemoteCase:r,remoteCaseClass:n}=e,o=Bt(t),i=r?n:On(t),s={id:e?.insKey},a=At(Kt,{caseClassName:i},s);return a=a?.replace("{workID}",String(er(o)))?.replace("{id}",e?.insKey),a};var d8="OPEN_WORK_BY_HANDLE";var{RESOURCE_TYPES:D0}=E,Zue=(t,e)=>{let r=wt(t,e);if(!r)return null;let n=We(t,r);if(!(n?.resourceType===D0.ASSIGNMENT&&typeof n?.context=="string"&&n.context!==""))return null;let i=typeof n.semanticURL=="string"?n.semanticURL.trim():"";return i?{target:t,containerItemID:r,semanticURL:i,insKey:e}:null},Que=async(t,e,r)=>{let n=e?.containerItemID||null,o=n&&Ke(n)[0]?se(Ke(n)[0]):n,i=o||n,s=pe(i)||i,a=te(s)||te(i),c=s?wn(s):void 0,l=o?W(o)?.caseInfo?.ID:void 0,u=t?.insKey;if(!s||!i||c!==d.REVIEW_MODE||o===n||!l||!u||l!==u)return;let p;try{p=await fb(x0({...t,context:s,viewType:"none"},{removeActionPayload:void 0}))}catch{return}if(!p||Je(p.type))return;let m=Le(p.response),f=[{path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],h={...m?.data,caseInfo:{...m?.data?.caseInfo??{},assignments:m?.data?.caseInfo?.assignments??[]}};r.push(V(kn,{containerItemID:i,target:a,context:s,data:h,caseViewMode:d.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:f}))},Xue=async(t,e,r)=>{let{actionInPayload:n,activateContainerActionPayload:o,type:i,response:s,removeActionPayload:a,headers:c}=t,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:p}=n,m=Lt(Kt,n),f=Z(m,l);if(rE(i))await l8(e,{activateContainerActionPayload:o,actionInPayload:n}),await Que(n,o,e);else{let A=st(f,m,l,{buildNew:!0}),C=Le(s),I=u8(C,n);C.semanticURL=I,C.directUrlUpdation=!u,await Pe(C,n,{acName:f,context:A},!1,!!u);let N=$e(C,{target:f,context:A,containerItemID:A,semanticURL:I,headers:c,debugInfo:p});N.caseViewMode=d.REVIEW_MODE,N.resourceType=D0.CASE,r&&(N.data.caseInfo.content.coexistenceAction="openWorkByHandle",N.data.caseID=N.data.caseInfo.ID),B.setTraditionalGadgetId(N.data),xn(N,C,{skipFlowNameUpdate:!0}),N.currentCaseViewMode=wn(t?.actionInPayload?.context);let x=Ht(f,N);a.containerItemID&&tn(x)&&e.push(V(Qe,{containerItemID:a.containerItemID,target:f})),e.push(x),dr(C,N)}let h=n.insKey;tE({caseKey:h,actionInContext:l,target:f});let S=s?.data?.caseInfo?.assignments?.[0]?.ID;S&&h&&Rm({actionInContext:l,assignmentID:S,caseKey:h})},p8=t=>{let e=0,r=[],n=!1;return t.pipe(ee(d8),O(o=>({actionMgrID:e,isAutoRedirection:n=!1}=o.payload,o.payload)),z(o=>{let{context:i,isChild:s,viewType:a}=o,c=Lt(Kt,o),l=Z(c,i),{activate:u,activateContainerActionPayload:p}=Zi(D0.CASE,l,o),m=It(l);if(!u&&!m&&o.insKey&&l){let S=Zue(l,o.insKey);S&&(u=!0,p=S)}let f=u&&!s&&a!=="none",h=a!=="none"&&!f?vt(l,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return n&&pt.setComponentCache("redirectionInProgress",!0),q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?f?(mE(p),ye({type:nr,activateContainerActionPayload:p,actionInPayload:o})):x0(o,{removeActionPayload:A}):(n&&pt.setComponentCache("redirectionInProgress",!1),w.rejectActionByID(e),Et)))}),z(async o=>{if(o&&Je(o.type))return r.push(ue(o)),r;let i=W(o?.actionInPayload?.context),s=Dn(o?.actionInPayload.className);if(o?.actionInPayload?.viewType==="none"){if(i?.context_data?.caseViewMode!=="perform"){let a=Le(o?.response),c={data:{...a?.data},context:o?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:pn,payload:{context:c.context,doDeleteConfirmationDetails:!1}}),s&&c.data.caseInfo?.content&&(c.data.caseInfo.content.coexistenceAction="openWorkByHandle",c.data.caseID=c.data.caseInfo.ID),B.setTraditionalGadgetId(c.data),r.push(V(Re,c));let l=te(o?.actionInPayload?.context),u=Lr(o?.actionInPayload?.context),p=Object.freeze({target:l,containerItemID:o?.actionInPayload?.context,context:o?.actionInPayload?.context,containerName:u});if($r(o?.actionInPayload?.context)){let m=$e(o?.response,{...p});yo({...m,isArrayDeepMerge:!0},r)}o.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,o.actionInPayload.containerItemID=o?.actionInPayload?.context,o.actionInPayload.caseID=o?.actionInPayload?.insKey,dr(a,o?.actionInPayload)}}else await Xue(o,r,s);return r}),O(()=>(n&&pt.setComponentCache("redirectionInProgress",!1),T(r),mt(r,e),r=[],r)))};var m8="FINISH_ASSIGNMENT";var ede="Error occurred during ajax call at finishAssignment Epic : ",f8=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},outcome:a,jsActionQueryParams:c,headers:l}=t,{state$:u}=e,p=DB(t),m=wB(t),f={assignmentID:r,actionID:n,caseID:o,viewType:p},{restApi:h}=U(m,f),{reqType:S}=U(m,f);p&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${p}`:`${h}?viewType=${p}`),a&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${a}`:`${h}?outcome=${a}`),h=fu(c,h),h=B.appendExcludeQueryParamToUrl(h),t.viewType=p;let{content:A}=Rt(i),C=u.value.data[i]?.caseInfo?.headers||{},{etag:I}=C,_={"if-match":I,...l,...s};return q(_t()?pr(m,{queryPayload:{...c,...f,outcome:a},body:A,headers:_}):k(h,{method:S,body:A,headers:_},i)).pipe(O(N=>{let{data:x,headers:H}=N;return Ve.analyseResponse(x),{response:x,actionInPayload:t,headers:we({..._,...H})}}),me(ede,i))};var g8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,t)},dI=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},w0=t=>{$.publish(d.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,t)},h8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,t)},y8=t=>{$.publish(d.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,t)},S8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,t)};var{RESOURCE_TYPES:tde}=E,rde=t=>{let e=De()?.getState()?.data,r=e?Object.keys(e).find(o=>o.includes(d.WORKAREA)):void 0;return/^app\/primary(_\d+)?$/.test(t)&&!r},E8=(t,e)=>{let r=0,n=[],o={},i="",s={},a=!1,c=!1;return t.pipe(ee(m8),z(l=>{let u,p,m,f=v.isCoexistenceAppOfType(d.APP_TYPE.UIKIT);if({actionMgrID:r}=l.payload,i=l.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!xr(i)||KT(i)){let h={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,h),Ct.handleDeferredActionCompletion(l.payload.context).then(()=>{w0({errorType:E.ERROR_TYPE.CLIENT})}),ye([])}return ye(l.payload).pipe(z(h=>{pt.setComponentCache("lastActionID",h?.actionID),iI(n,h);let S={...h};return f8(S,{state$:e})}),z(async h=>{if(h&&h.type===Te){KS(h);let zt=ue(h);return n.push(zt),n}Ao.clearContextedCache(i);let{headers:S,actionInPayload:A,response:C}=h,{containerItemID:I,context:_=pe(I),isModalAction:N,isInCreateStage:x}=A;a=A.isCaseWideAction,c=A.isProcessAction;let H=te(I);A.target=H;let G=Lr(I),re=Object.freeze({target:A.target,containerItemID:I,context:_,containerName:G});g.setIn(C.data,d.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),g.setIn(C.data,d.CASE_INFO_IS_LOCAL_ACTION,!1),C?.uiResources?.root?.config?.name&&A.viewType!=="page"&&g.setIn(C.data,d.CASE_INFO.VIEW_NAME,C?.uiResources?.root?.config?.name),dI({submitResponse:C});let j=Le(C,{[E.STOPMERGEACTIONS]:!C.nextAssignmentInfo}),ne=On(j),be=qe(A.context),he=Ke(be)[0]?se(Ke(be)[0]):be,Me=nE(j),Fe=x&&!Me;N&&!x&&!pl(A.context,he)&&(j=dE(j,W(I)));let Ce=$e(j,{headers:S,actionMgrID:r,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:rde(he||"")});if(oE(Ce.data,A),Ce.caseClassName=ne,Ce.resourceType=tde.ASSIGNMENT,Ce.headers=S,j?.uiResources?.root?.type==="AutoClose"){let zt=De()?.getState()?.data?.[re.context]?.caseInfo,{ID:ao,name:Ha,content:Ga}=zt;return n=await jB(A),y8({ID:ao,caseName:Ha,content:Ga,status:Ji(j).status}),n}let Oe,ft,Qt=j?.data?.caseInfo?.assignments?.some(zt=>zt.ID===A.assignmentID),yr=UB(j,A),Xt=kB(Qt,he,j,N,yr),ln=A?.actionID===E.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT,_o=It(te(he));if(j?.data?.nextAssignmentInfo&&!ln)Ce.caseViewMode=d.PERFORM_MODE,Oe=Bt(j),ft=!0;else if(Xt&&!ln)j?.confirmationNote&&j?.uiResources?.root?.config?.name===d.PY_CONFIRM?Ce.caseViewMode=d.REVIEW_MODE:Ce.caseViewMode=d.PERFORM_MODE,Oe=Bt(j),_o&&(Ce.flowName=" "),Ce.deleteAssignmentSpecificResources=!1,ft=!1;else{Ce.caseViewMode=d.REVIEW_MODE,g.setIn(Ce.data,"context_data.caseViewMode",d.REVIEW_MODE);let zt=PU(j?.data?.caseInfo);j?.confirmationNote&&(zt||j?.uiResources?.root?.config?.name===d.PY_CONFIRM)&&!_o?Oe=Bt(j):Oe="",ft=!1}let vr=Bt(j),Vn=!1;xn(Ce,j,{skipFlowNameUpdate:Ce?.caseViewMode===d.REVIEW_MODE||Xt});let qr=At("createWork",{caseClassName:ne}).replace(/{.+?}/,String(er(vr)));if(j.semanticURL=qr,Ce.semanticURL=qr,N?(await cI(A,Ce,ft,Oe,j,n,h,C,!1,s),Fe&&(o=aI(A),Ce.caseViewMode===d.PERFORM_MODE&&Ki(vr))):x&&f&&!Me?(v.setDefaultCasePage(d.PY_DETAILS),await LB(C,n,qe(_))):(await P0(Ce,A,j,re,n),Vn=ft&&Ce.caseViewMode===d.PERFORM_MODE&&!a&&!c),he?.includes(d.ACTIONAREA)&&_===he){rn.clearChangedProperties(_);let zt=W(he);n=[{type:Mi,payload:{actionID:zt.caseInfo.activeActionID,context:he,containerItemID:I,target:te(he),actionMgrID:w.getNextActionMgrId(),containerName:d.ACTIONAREA,localActionType:E.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:zt.caseInfo.ID}}]}if(Xs(h,n),Ct.handleDeferredActionCompletion(i).catch(()=>{}),lI(Ce,A,he),Vn&&Ki(vr),!j?.data?.nextAssignmentInfo){let zt=$B(j,A);yu(vr),eE({...zt,containerItemID:I})}return sI(n,{transientItemID:I,target:H,isModalAction:N}),p=j,m=A,u=A,n}),O(()=>{let h=n.find(S=>S.type===Te);return h?(Ct.handleDeferredActionCompletion(i).then(()=>{w0({errorType:E.ERROR_TYPE.SERVER})}).catch(()=>{}),uI(h),w.rejectActionByID(r)):w.resolveActionByID(r,o),s?.caseId&&g8(s),gn(n),vm()&&p&&m&&dr(p,m.__deferCaseActionsPayload??m),!h&&(a||c)&&h8({updateState:!0}),!h&&u&&S8(u),n=[],o={},s={},n}))}))};var A8="CANCEL_ASSIGNMENT";var Fa=t=>{let e={},{routeKey:r,isModalAction:n,caseID:o,context:i,RemoteSystemID:s}=t;s&&(e.RemoteSystemID=s);let a=r||wk,{restApi:c,reqType:l}=U(a,{ID:o,caseID:o,viewType:it.PAGE}),u=pt.getComponentCache(o),p=u&&typeof u=="object"?u:{},m=B.appendExcludeQueryParamToUrl(c);return q(k(m,{method:l,headers:{...e,...p}},i,{includeRemoteSystemIdIfPresent:!!s})).pipe(O(f=>(pt.resetComponentCache(o),n?{actionInPayload:t}:{response:f.data,actionInPayload:t,headers:we(f.headers)})),me(": Error occurred during ajax call at release lock request : ",i))};var $0=(t,e)=>{let{isModalAction:r}=e;return Fa({routeKey:xk,isModalAction:r,...t})};var C8=t=>{let{isModalAction:e,containerItemID:r}=t;return e?ge.MODAL:Lr(r)},_8=async(t,e)=>{let{childContainerItemID:r,caseViewMode:n,referencedUsers:o,response:i}=e,s=qe(r),a=pe(s),c=!1,l=i?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);let u={context:a,data:{...i.data,referencedUsers:o,context_data:{caseViewMode:n}}},p=[];c&&p.push({path:d.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),p.length>0?t.push(V(Re,u,{propertiesToReplace:p})):t.push(V(Re,u))};var nde=(t,e)=>{let r=pe(e);return(r&&r!==t?[t,r]:[t]).some(o=>Ss.isContextStale(o))},I8=t=>{let e=0,r=[];return t.pipe(ee(A8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{isModalAction:o}=n;n.context||(n.context=pe(n.containerItemID));let{context:i}=n,s=C8(n),a=Z(s,i);return nde(i,n.containerItemID)?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q($0(n,{isModalAction:o}))):q(vt(a,{loadingContext:i})).pipe(z(({continueExecution:c})=>c?(n.RemoteSystemID=ae.getRemoteHeaderByContext(n.context)??void 0,q($0(n,{isModalAction:o}))):(w.rejectActionByID(e),Et)))}),z(n=>{if(n&&n.type===Te)return r.push(ue(n)),q([r]);let{actionInPayload:o,response:i}=n,{containerItemID:s,isModalAction:a,isInCreateStage:c}=o,l=o.caseID??Bt(i);i?.data.caseInfo&&(i.data.caseInfo.availableProcesses=i.data.caseInfo.availableProcesses??[]);let u=te(s),p=pe(s),m={target:a?`${d.APP.APP}/${d.MODAL}`:u,containerItemID:s,caseViewMode:a?d.PERFORM_MODE:d.REVIEW_MODE,context:p,actionMgrID:e,key:Bt(i),skipReleaseLockRequest:!1};return c&&r.push(V(tr,m)),!a&&$r(s)&&_8(r,{childContainerItemID:s,caseViewMode:d.REVIEW_MODE,referencedUsers:i?.data.referencedUsers,response:i}),l&&yu(l),m.skipReleaseLockRequest=!0,n.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,dr(n?.response,n?.actionInPayload),r.push(V(Qe,m)),q([r])}),O(()=>(T(r),mt(r,e),r=[],r)))};var b8="NAVIGATE_TO_STEP";var ode="Error occurred during ajax call at navigateToStep Epic : ",T8=(t,e)=>{let{ID:r,stepID:n,containerItemID:o,context:i=pe(o),isInCreateStage:s}=t,{state$:a}=e,c=s?it.PAGE:it.FORM,l={ID:r,stepID:n,viewType:c},{restApi:u,reqType:p}=U($k,l),{content:m}=Rt(i),f=a.value.data[i].caseInfo.headers,h=B.appendExcludeQueryParamToUrl(u);return q(k(`${h}`,{method:p,body:m,headers:{"if-match":f&&f.etag}},i)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:we({...f,...S.headers})})),me(ode,i))};var{RESOURCE_TYPES:ide}=E,v8=(t,e)=>{let r=0,n=[];return t.pipe(ee(b8),Ft(o=>{({actionMgrID:r}=o.payload);let i,s;return ye(o.payload).pipe(z(a=>(Mm(a.context),T8(a,{state$:e}))),z(async a=>{if(a&&Je(a.type))return n.push(ue(a)),n;let{actionInPayload:c,response:l,headers:u}=a,{containerItemID:p,context:m=pe(p),isModalAction:f}=c;Ao.clearContextedCache(c.context);let h=te(p),S=Lr(p),A=Object.freeze({target:h,containerItemID:p,context:m,containerName:S}),C=l?.data?.caseInfo?.content,I=l?.uiResources?.root?.config?.name,_=l?.uiResources?.root?.config?.context;C&&!C[P.getDefaultQualifiedName("pyViewName")]&&I&&c.viewType!=="page"&&(g.setIn(C,P.getDefaultQualifiedName("pyViewName"),I),g.setIn(C,P.getDefaultQualifiedName("pyViewContext"),_)),i=Le(l);let N={acName:h,...A};await Pe(i,c,N),s=$e(i,{...A,headers:u}),l?.nextAssignmentInfo||(s.caseViewMode=d.REVIEW_MODE),Xs(a,n),s.doDeleteCaseSummary=c.doDeleteCaseSummary,s.resourceType=ide.ASSIGNMENT,s.caseID=Bt(i),xn(s,i),oE(s.data,c);let x=i.data?.caseInfo?.stages,H=i.data?.caseInfo?.stageID;if(XS({caseID:Bt(i),context:c.context,assignmentId:c.assignmentID,isLocalAction:!!c.isLocalAction,isModalAction:f,stages:x,stageID:H}),$r(p)){let G=B.getPropertiesToReplace(p);yo(s,n,"",{propertiesToReplace:G})}return n.push(V(tr,s)),s.shouldUpdateCaseActionsInParentContext=!0,n}),O(()=>(T(n),i&&s&&dr(i,s),mt(n,r),n=[],n)))}))};var R8=t=>{let{caseID:e,context:r}=t,{restApi:n,reqType:o}=U(rS,{ID:e});return q(k(n,{method:o},r)).pipe(O(i=>(Ve.analyseResponse(i.data),{response:i.data,actionInPayload:t,headers:we(i.headers)})),me(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",r))};var P8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,t)};var sde=(t,e)=>{let r=0,n,o=[];return t.pipe(ee(Ah),O(i=>({actionMgrID:r,caseType:n}=i.payload,i.payload)),z(i=>i.ignoreCaseDeletion?ye({actionInPayload:i}):R8(i)),z(async i=>{if(i&&Je(i.type)){let{payload:m}=i,f=ue({...i,...m,actionMgrID:r});return o.push(f),o}let{actionInPayload:s}=i,{context:a,isModalAction:c}=s,l=c?ge.MODAL:ge.PRIMARY,u=Z(l,a);if(!c&&u){let m={acName:u,target:u,context:a},f=e.value.containers[u],{semanticURL:h}=NU(f);await Pe({directUrlUpdation:!0,semanticURL:h},s,m)}if(s.isProcessAction&&s.parentCaseInfo){let m={insKey:s.parentCaseInfo.ID,className:s.parentCaseInfo.content.classID,context:s.parentContext,acTargetName:d.PRIMARY,isChild:!0},f={type:Go,payload:{...m}};o.push(f)}let p={target:u,containerItemID:a,context:a,caseDeleted:!0};return o.push(V(Qe,p)),o}),O(()=>(T(o),mt(o,r)===d.PROMISE_VALUE.RESOLVE&&P8({caseType:n}),o=[],o)))},N8=sde;var O8=(t,e)=>{let{assignmentID:r,actionID:n,context:o}=t,{restApi:i,reqType:s}=U(Dk,{assignmentID:r,actionID:n}),{content:a}=Rt(o),c=e.value.data[o]?.caseInfo?.headers,l=B.appendExcludeQueryParamToUrl(i);return q(k(l,{method:s,body:a,headers:{"if-match":c&&c.etag}},o)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:we(u.headers)})),me(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",o))};var x8=t=>{$.publish(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,t)};var M0=(t,e=!1)=>{let{action:r,state$:n,actionMgrID:o}=t,i=r.payload.autosave===!0,s,a=[];return ye(r.payload).pipe(z(c=>(s=oe("caseInfo.ID","",c.context)||void 0,O8(c,n))),hc(c=>{if(c&&Je(c.type))return ye(c);let{containerItemID:l}=c&&c.actionInPayload,u=qe(l),p=te(u),m=ut(p),f=Ke(u)[0],h=f?se(f):u;!It(te(h))&&({containerItemID:h}=jd(h,c.actionInPayload.caseID,f));let A=se(p);r.payload.canUpdateAvailableActions&&hu(c.response);let C=ae.getRemoteHeaderByContext(c.actionInPayload.context),I={...c.actionInPayload,RemoteSystemID:C===null?void 0:C},_=N=>V(Re,{context:N,data:{caseInfo:{...c.response.data?.caseInfo||{},headers:c.headers}}});if(h&&a.push(_(h)),m?.items?.[A]?.key===c?.actionInPayload?.caseID){let N={context:u,data:{...c.response.data,caseInfo:{...c.response.data?.caseInfo||{},headers:c.headers}}},x=B.getPropertiesToReplace(l);a.push(V(Re,N,{propertiesToReplace:x}))}return i||a.push(V(tr,{context:l})),Xs(c,a),Fa(I)}),z(async c=>{if(c&&Je(c.type)){let{payload:S}=c,A=ue({...c,...S,actionMgrID:o});a.push(A);let C=t.action.payload.modalLoadingContainer;if(C){let I=C.context,{context_data:_}=W(I)||{};_?.isLoading&&ta(I)}return a}let{actionInPayload:l,response:u}=c,{context:p,containerName:m}=l,h={target:Z(m,p),containerItemID:p,context:p};return l.shouldUpdateCaseActionsInParentContext=!0,dr(u,l),!e&&!i&&a.push(V(Qe,h)),a}),O(()=>(T(a),mt(a,o),i||x8({context:r.payload.context,caseID:s,assignmentID:r.payload.assignmentID}),e||(a=[]),Ct.isDeferredActionInProgress(r.payload.context)&&Ct.handleDeferredActionCompletion(r.payload.context),a)))},ade=(t,e)=>{let r=0,n;return t.pipe(ee(yi),Ft(o=>{let{saveOnly:i}=o.payload;return{actionMgrID:r,caseType:n}=o.payload,M0({action:o,state$:e,actionMgrID:r,caseType:n},i)}))},D8=ade;var w8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t)},$8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,t,e)};var pI=t=>{let{callbacks:e}=t;e?.submit&&$8(n=>{e.submit(n),w8("expressLocalActionSubmit")},"expressLocalActionSubmit")},M8=t=>{let e=0,r,n=[],o={value:De()?.getState()};return ye(t).pipe(ee(yi),Ft(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e,caseType:r}=i.payload,!s){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),ye([])}return M0({action:i,state$:o,actionMgrID:e,caseType:r,actionsOut:n},!0)}))};var{LOCAL_ACTION_TYPE:k8}=d,{RESOURCE_TYPES:cde}=E,lde=t=>{let e=t.localActionType?.toLowerCase();return e===k8.CASE_WIDE||e===k8.EXPRESS||e&&t.isPromotedAction?js:nS},ep=(t,e)=>{let{actionID:r,assignmentID:n,caseID:o,context:i,openActionType:s,modalLoadingContainer:a,headers:c}=t,{isProcessAction:l}=e,u=l?Zl:lde(t),p=it.FORM,{reqType:m}=U(u,{caseID:o,ID:n,actionID:r,viewType:p}),{restApi:f}=U(u,{caseID:o,ID:n,actionID:r,viewType:p});t.actionType=u===js?d.CASE:d.ASSIGNMENT,f&&!f.includes("viewType=")&&(f=f.includes("?")?`${f}&viewType=${p}`:`${f}?viewType=${p}`),f=B.appendExcludeQueryParamToUrl(f);let h=a?.context??i;return q(k(f,{method:m,headers:c},h)).pipe(O(S=>({response:S.data,actionInPayload:t,headers:we(S.headers,"",t.headers)})),me(`: Error occurred during ajax call at ${s} Epic : `,h))},mI=(t,e)=>{let{isProcessAction:r}=e,n=r?Zl:nS;t.openActionType=n;let o=Lt(n,t),i;if(o==="modal"){if(!Do.isOnline()||t.isAppOffline)return w.rejectActionByID(t.actionMgrID),Promise.resolve();i=Ke(t.contextName)[0]?Ke(t.contextName)[0]:te(t.contextName);let s=i?se(i):t.contextName,a=pe(s),c=Lt(t.openActionType,t),l=Z(c,t.context),u=Yr(t.context,lr(c,t.context));if(T(Pt({target:l,context:u,containerItemID:u,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:t.caseID,caseInfo:{ID:t.caseID}},headers:{...t.headers}})),T(Mh({context:u})),t.modalLoadingContainer={target:l,context:u},!Ke(t.contextName)[0]||!t.continueExecution||!Or(a))return ep(t,e);t.saveActionPayload.modalLoadingContainer=t.modalLoadingContainer,t.saveActionPayload.canUpdateAvailableActions=!t.saveActionPayload.isModalAction;let p=sl(t.saveActionPayload);return q([p]).pipe(z(m=>M8(m)),z(m=>m.length===1&&Je(m[0].type)?q(vt(i,{loadingContext:t.context})).pipe(z(({continueExecution:f})=>f?ep(t,e):(w.rejectActionByID(t.actionMgrID),Et))):ep(t,e)),O(m=>m))}return ep(t,e)},ude=t=>t==="async"?"submitBulkActionAsync":"submitBulkAction",dde=t=>t.containerItemID?.includes(d.ACTIONAREA)&&t.context?.includes(d.ACTIONAREA),tp=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=n,u=Le(t),p=Lt(s,n),m=c?.target??Z(p,o),f,h,S=!1;!jr(m)||mr(m)&&!ll(m,t.data.caseInfo.ID)?(h=lr(p,o),en(p)&&(h=Yr(o,h)),f=h,S=!0):(mr(m)?f=wt(m,t.data.caseInfo.ID):f=se(m),h=pe(f)),await Pe(u,n,{acName:m,target:m,containerName:p,context:h}),(u?.data?.caseInfo?.content===void 0||u.data.caseInfo.content!==void 0&&typeof u.data.caseInfo.content=="object"&&Object.keys(u.data.caseInfo.content).length===0)&&delete u.data?.caseMessages;let C=u.uiResources?.root,I;C?I=d.PERFORM_MODE:I=d.REVIEW_MODE;let _=$e(u,{target:m,context:h,containerItemID:f,caseViewMode:I,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:en(p),resourceType:cde.ASSIGNMENT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,assignmentID:n.assignmentID,actionType:n.actionType,skipMergeAssignmentsAndActions:l});C&&xn(_,u),en(p)&&delete _.doDeleteCaseSummary,n.openActionType===ac&&(_.isBulkAction=!0,_.data.caseInfo.actionButtons.main[0].jsAction=ude(n.runningMode),_.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",_.data.caseInfo.cases=n.selectedList,_.data.caseInfo.isAssignment=n.isAssignment);let N;if(S?N=Pt:n.isProcessAction||dde(n)?N=kn:N=tr,_.data.context_data.isProcessAction=n.isProcessAction,e.push(V(N,_)),S||e.push(V(gs,_)),S){let G=Ke(n.contextName),re=wt(G,t.data.caseInfo.ID);if(re){let j={data:{caseInfo:{headers:r}},context:re};e.push(V(Re,j))}}f!==se(m)&&e.push(V(rr,{target:m,containerItemID:f})),$r(f)&&!c?.context&&yo(_,e);let x=_.nextAssignmentInfo?.context==="other";return n.isProcessAction&&!Dn(_.nextAssignmentInfo?.className)&&!x&&Xs({response:u,actionInPayload:{...n,containerItemID:f}},e),_.caseViewMode===d.REVIEW_MODE&&e.push(V(Qe,_)),_.shouldUpdateCaseActionsInParentContext=!0,g.getIn(t.data,["caseInfo","isLocalAction"])||dr(u,_),e};var L8="OPEN_LOCAL_ACTION";var U8=(t,e)=>mI(t,e);var pde=t=>{let e=0,r=[];return t.pipe(ee(L8),O(n=>({actionMgrID:e}=n.payload,n.payload)),Qo(()=>!Eu(e)),z(n=>U8(n,{actionMgrID:e})),z(async n=>{if(!n)return Et;if(Je(n.type)){let l=ue(n);r.push(l);let{context_data:u}=W(n.payload.context)||{};return u?.isLoading&&r.push(V(gs,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;g.setIn(s,"data.caseInfo.activeActionID",a);let c=g.getIn(s,"data.caseInfo.ID");return Ki(c),g.setIn(s.data,d.CASE_INFO_IS_LOCAL_ACTION,!0),o.refreshConditions&&g.setIn(s.data,d.CASE_INFO_REFRESH_CONDITIONS,o.refreshConditions),await tp(s,r,{headers:i,actionInPayload:o}),pI(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},j8=pde;var z8=t=>{let{actionID:e,context:r,openActionType:n,caseTypeID:o,bulkContextID:i="",bulkContextType:s=""}=t,a=ac,{reqType:c,restApi:l}=U(a,{caseTypeID:o,actionID:e,bulkContextID:i,bulkContextType:s});return q(k(l,{method:c},r)).pipe(O(u=>({response:u.data,actionInPayload:t,headers:we(u.headers)})),me(`: Error occurred during ajax call at ${n} Epic : `,r))};var F8=t=>{$.unsubscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)},V8=(t,e)=>{$.subscribe(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t,e)};var B8=(t,e)=>{let{context:r}=t,{actionMgrID:n}=e;t.openActionType=ac;let o=Lt(ac,t),i=Z(o,r);return q(vt(i,{loadingContext:r})).pipe(z(({continueExecution:s})=>s?z8(t):(w.rejectActionByID(n),Et)))},H8=t=>{let{callbacks:e}=t;e?.submit&&V8(n=>{e.submit(n),F8("bulkActionSubmit")},"bulkActionSubmit")};var G8="OPEN_BULK_ACTION";var mde=t=>{let e=0,r=[];return t.pipe(ee(G8),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>B8(n,{actionMgrID:e})),z(async n=>{if(n&&Je(n.type??"")){let c=ue(n);return r.push(c),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.caseInfo.activeActionID",a),await tp(s,r,{headers:i,actionInPayload:o}),H8(o),r}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},q8=mde;var W8=t=>{let{actionID:e,context:r,cases:n,classID:o,isAssignment:i}=t,{content:s}=Rt(r,{nonEmptyAndChangedData:!0}),a=5;try{$n.getSharedState(P.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"))?.find(A=>A[P.getDefaultQualifiedName("pyClassName")]===o)?.pyList.split(",").includes(e)&&(a=1)}catch(S){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',S)}let c=n.map(S=>({ID:S})),l=c.length/a,u=i?Uk:oS,{reqType:p,restApi:m}=U(u,{actionID:e}),f=[],h=c.length;for(let S=0;S<h;S+=l){let A=c.slice(S,S+l);i?s.assignments=A:s.cases=A,A.length&&f.push(q(k(m,{method:p,body:s},r)).pipe(O(C=>{let{data:I,headers:_}=C;return{response:I,actionInPayload:t,headers:we({..._})}}),me("Error occurred during ajax call at submitbulkaction Epic : ",r)))}return gb(f)};var K8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var J8="SUBMIT_BULK_ACTION";var Y8=t=>{let e=0,r=[],n,o="";return t.pipe(ee(J8),Ft(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(z(a=>(n=a,W8(n))),z(a=>{let c=0,l=0,u=[],{containerItemID:p,context:m}=n;return a.forEach(f=>{let{response:h}=f;c+=Number(h.successCount),l+=Number(h.failureCount),l&&h.results.forEach(S=>{S.status!=="200"&&S.error&&S.error.errorDetails&&S.error.errorDetails.forEach(A=>{u.push({ID:S.BusinessID,message:A.localizedValue})})})}),o=`${c} record(s) updated`,K8({submitResponse:a}),n.target=v.getRenderingMode()==="HYBRID"?te(p):`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:p,context:m,target:n.target,skipReleaseLockRequest:!0})),l&&r.push(V(wm,{messages:[{type:"error",message:l===1?"1 record failed to update":`${l} records failed to update`,errorDetails:u,showHeader:!1}],context:qe(m)||m,category:"HTTP",showHeader:!1})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var Z8=t=>{let{actionID:e,context:r,cases:n}=t,{content:o}=Rt(r,{nonEmptyAndChangedData:!0});o.cases=n.map(c=>({ID:c}));let i=oS,{reqType:s,restApi:a}=U(i,{actionID:e,runningMode:"async"});return q(k(a,{method:s,body:o},r)).pipe(O(c=>{let{data:l,headers:u}=c;return{response:l,actionInPayload:t,headers:we({...u})}}),me("Error occurred during ajax call at submitbulkactionasync Epic : ",r))};var Q8=t=>{$.publish(d.PUB_SUB_EVENTS.EVENT_BULKACTION,t)};var X8="SUBMIT_BULK_ACTION_ASYNC";var e5=t=>{let e=0,r=[],n,o={};return t.pipe(ee(X8),Ft(i=>{let{isFormValid:s}=i.payload;if({actionMgrID:e}=i.payload,!s){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,a),ye([])}return ye(i.payload).pipe(Ft(a=>(n=a,Z8(n))),O(a=>{let{containerItemID:c,context:l}=n,{response:u}=a;return o={caseID:u.caseID,caseTypeID:"BackgroundJob"},Q8({submitResponse:u}),n.target=`${d.APP.APP}/${ge.MODAL}`,r.push(V(Qe,{containerItemID:c,context:l,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r)))}))};var t5=(t,e)=>mI(t,e);var fde=t=>{let e=0,r=[];return t.pipe(ee(JC),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let i=Lt(Zl,n),s=Z(i,n.context);return q(vt(s,{loadingContext:n.context})).pipe(z(({continueExecution:a})=>a?(Mm(n.context),t5(n,{actionMgrID:e,isProcessAction:!0})):(w.rejectActionByID(n.actionMgrID),Et)))}),z(async n=>{if(n&&Je(n.type)){let a=ue(n);return r.push(a),r}let{actionInPayload:o,headers:i,response:s}=n;return await tp(s,r,{headers:i,actionInPayload:o}),r}),O(()=>(gn(r),mt(r,e),r=[],r)))},r5=fde;var n5=t=>{let e=0,r=[];return t.pipe(ee(Ze,et),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{containerItemID:o,caseID:i,context:s,caseDeleted:a,skipReleaseLockRequest:c,currentCaseViewMode:l,isProcessAction:u,isInCreateStage:p,deleteWork:m}=n,f=l===d.PERFORM_MODE,h=i&&f;return m?ye([]):u&&p?Fa(n):o===s&&!a&&!c&&h?Fa(n):o?.includes(d.MODAL)&&wn(Oa(o))===d.REVIEW_MODE?Fa(n):ye([])}),z(n=>(n&&Je(n.type)&&r.push(ue(n)),r)),O(()=>(T(r),mt(r,e),r=[],r)))};var gde=t=>{let{context:e,containerItemID:r}=t.payload;if(typeof r!="string"||!r)return!1;let n=pe(r);return(n&&n!==e?[e,n]:[e||r]).some(i=>typeof i=="string"&&!!i&&Ss.isAssignmentStale(i))},o5=t=>t.pipe(ee(Yl),LS(()=>kS(100)),O(e=>{if(gde(e))return T({type:wi,payload:e.payload}),[];let{actionMgrID:r,isChildCase:n,isModalAction:o,isProcessAction:i,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:l,context:u}=e.payload;return w.resolveActionByID(r),$.publish(d.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:o,hideDelete:i?!1:n,isDataObject:s,skipReleaseLockRequest:a,isInCreateStage:c,containerItemID:u||l}),[]})),i5=t=>t.pipe(ee(Xy),LS(()=>kS(100)),O(e=>{let{actionMgrID:r,context:n,containerName:o,containerItemID:i}=e.payload,s=Z(o,n);return w.resolveActionByID(r),T(V(rr,{containerItemID:i,target:s,doDeleteCaseSummary:!1})),[]}));var s5=t=>{let e=0,r=[],n="";return t.pipe(ee(Ui),O(o=>({actionMgrID:e}=o.payload,o.payload)),z(o=>Y_(o)),z(async o=>{if(o&&o.type===Te)return r.push(ue(o)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0}};let{actionInPayload:i,response:s,headers:a}=o,c=i.containerName,l=Z(c,i.context),u=st(l,c,i.context);u=Yr(i.context,u);let{pageReference:p,targetProperty:m,index:f,subscriptFieldName:h,pageGroupName:S,actionType:A,isPageGroup:C}=i,I=p?.startsWith(E.OBJECT_INFO.OBJECT_INFO),_=null;I?(_=Ve.transformCaseData(s),_.uiResources.root.config.context=`${p}${m}[${f}]`):_=s;let N=_?.uiResources?.root?.config?.name??i.interestPageActionID,x=Le(_);x.key=i.ID,x.data?.caseInfo?(x.data.caseInfo.ID=i.ID,pV(x,f,h,A,S)):x.data?.objectInfo&&(x.data.objectInfo.ID=i.ID);let{interestPageActionID:H,editType:G,isLocalAction:re,actionID:j}=i,ne={isMultiRecordData:!0,viewName:i.viewID,parentContext:i.context,interestPage:i.interestPage,interestPageActionID:H,editType:G,isLocalAction:re,actionID:j};x.uiResources.context_data.modalView=ne;let be=W(i.context)?.context_data?.caseInfo,he=`${i.pageReference}${i.targetProperty}`,Me=qT(be,he,i.index);x.uiResources.context_data.caseInfo={...x.uiResources.context_data.caseInfo,content:g.mergeDeep(x.uiResources.context_data.caseInfo?.content,Me?.content)};let Fe=J.getProperty(d.CASE_INFO.REMOTESYSTEMID,"",i.context);await Pe(x,i,{acName:l,context:u});let Ye={target:l,context:u,containerItemID:u,headers:a,index:f,subscriptFieldName:h,pageGroupName:S,isPageGroup:C};Fe&&(Ye.headers={...Ye.headers,RemoteSystemID:Fe});let Oe=$e(x,Ye);Oe.resourceStatus=i.actionType,Oe.isMultiRecordData=!0,Oe.readOnly=i.readOnly,Oe.parentContext=i.context,Oe.heading=i.heading,Oe.data.caseInfo&&G===d.ACTION&&(Oe.data.caseInfo={...Oe.data.caseInfo,...mV(i),isLocalAction:i.isLocalAction}),Oe.clearStateMachine=!1,i.viewName=N;let ft=Ht(l,Oe);n=u,r.push(ft);let Qt={changedListProperty:[],leafProperty:[]};return G===d.ACTION&&(ke.registerForServerChanges(),Qt=Cr.getServerProperties(Oe.data,u)),{actionsOut:r,actionInPayload:i,serverProps:Qt}}),O(({actionInPayload:o,serverProps:i={changedListProperty:[],leafProperty:[]}})=>{if(_c(r)?w.rejectActionByID(e):w.resolveActionByID(e),o.skipPageInstructions||dV(n,o.pageReference,o.targetProperty,o.index,o.actionType),T(r),r=[],o.editType===d.ACTION){Cr.handleServerChanges(n,i.changedListProperty,i.leafProperty),ke.unRegisterForServerChanges();let s=d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),a=g.convertClipboardPageToPageRefNotation(o.interestPage),c=s+a;o.columns.forEach(l=>{let u=fe.trimAnnotation(l.config.value),p=oe(u,c,n),m=lt(u.startsWith(".")?u.split(".").pop():u,l.config.classID);Ie.getFieldNode(n,c,o.viewName,u)||Ie.addFieldNode(n,c,o.viewName,u,p,{isDeclarativeTarget:!!m?.isDeclarativeTarget,context:n,propertyName:u,pageReference:c,value:l.config.value,isInsideList:/\[\d+\]/.test(c)||/\[\d+\]/.test(u)})})}return r}))};var hde=(t,e=!1)=>t===d.ACTION?e?Ut.REFRESH_CASE_DATA:Ut.REFRESH_ASSIGNMENT_DATA:Ut.REFRESH_CASE_VIEW,a5=t=>{let{context:e}=t,n={...Rt(e).content,contextData:!1},o=bu(e);g.isEmpty(o)||(n=Nc(o,n));let i=hde(t.editType,t.isLocalAction),{restApi:s,reqType:a}=U(i,{ID:!t.isLocalAction&&t.editType===d.ACTION?t.assignmentID:t.ID,actionID:t.actionID,viewID:t.viewID}),c=s;return t.editType===d.ACTION&&(c+=`?operation=${t.operationFlag}`,n.interestPageActionID=t.interestPageActionID),n.interestPage=t.interestPage,q(k(c,{method:a,body:n,headers:t.headers},e)).pipe(O(l=>({actionInPayload:t,response:l.data,headers:we(l.headers)})),me(": Error occurred during getEmbeddedDataView request : ",e))};var yde=()=>({rootView:null,data:null,uiResources:null,containerContext:null}),c5=(t,e,r)=>typeof r=="string"?`${t}${e}.${r}`:`${t}${e}[${r}]`,Sde=t=>{let{containerName:e,context:r}=t;if(!e)return{context:r,containerContext:null,target:null};let n=Z(e,r),o=st(n,e,r)||e,i=Yr(r,o);return{context:i,containerContext:i,target:n}},Ede=(t,e,r,n,o)=>{if(o){let i=Ve.transformCaseData(t);return i.uiResources.root.config.context=c5(e,r,n),i}return t},Ade=(t,e,r)=>{let n=c=>typeof c=="object"&&c!==null,o=(c,l)=>{if(n(c))return c[l]},s=e.replace(/^\./,"").split("."),a=t;for(let c of s)a=o(a,c);return typeof r=="string"?o(a,r)??null:Array.isArray(a)?a[r]??null:null},Cde=(t,e,r,n,o)=>{let i=t.data?.caseInfo?.content;if(i){let a=Ade(i,n,o);a&&T(sa({context:e,reference:r,value:a}))}let s=t.uiResources?.context_data;s&&T(sa({context:e,reference:d.CONTEXT_DATA,value:s}))},l5=t=>{let e=0,r=[];return t.pipe(ee(lS),O(n=>{let{payload:o}=n;return{actionMgrID:e}=o,o}),z(n=>a5(n)),hc(async n=>{let o=yde();if(n?.type===Te)return r.push(ue(n)),{actionsOut:r,actionInPayload:{skipPageInstructions:!0},responseData:o};let{actionInPayload:i,response:s,headers:a}=n,{pageReference:c,targetProperty:l,index:u,containerName:p}=i,m=c?.startsWith(E.OBJECT_INFO.OBJECT_INFO),{context:f,containerContext:h,target:S}=Sde(i),A=Ede(s,c,l,u,m),C=Le(A);C.key=i.ID;let I=c5(c,l,u);if(await Pe(C,i,p?{acName:S,context:f}:{context:f}),p&&S){let H=$e(C,{target:S,context:f,containerItemID:f,headers:a,index:u});H.resourceStatus=i.actionType,H.isMultiRecordData=!0,H.readOnly=i.readOnly,H.parentContext=i.context,H.clearStateMachine=!1;let G=Ht(S,H);r.push(G)}else Cde(C,f,I,l,u);let N=C.uiResources?.root||null;return N?.config&&(N.config.context=I),o.rootView=N,o.data=C.data,o.uiResources=C.uiResources,o.containerContext=h,{actionsOut:r,actionInPayload:i,responseData:o}}),O(({actionsOut:n,responseData:o})=>{_c(n)?w.rejectActionByID(e):w.resolveActionByID(e,o);let i=n;return r=[],i}))};var u5=(t,e)=>{let{pageReference:r,isMultiRecordData:n}=e,o=J.getPropertyValue(d.getProperty(E.CASE_INFO.CASE_INFO_ID),r,t.parentContext),i=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=J.getPropertyValue(E.CASE_INFO.ASSIGNMENT_ID,r,t.parentContext),a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,r,t.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:p}=a,f=t.pageReference.substring(0,t.pageReference?.lastIndexOf(".")).replace(d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),"");a.editType==="action"?Cu(o,s,u,t.parentContext,c,l,p,n,a.editType):Pc(o,i,t.parentContext,f,{})};var _de=(t,e)=>{if(t&&e.editType==="action"&&t.type!==Te){let{context:r,pageReference:n}=e,o={context:r},{response:i}=t,s=n?.startsWith(E.OBJECT_INFO.OBJECT_INFO),a=null;s?(a=Ve.transformCaseData(i),a.uiResources.root.config.context=n):a=i;let c=Le(a);c.key=e.ID,c.data?.caseInfo?c.data.caseInfo.ID=e.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=e.ID);let l=$e(c,o);l.skipValidation=!0;let u=V(Re,l);ke.registerForServerChangesSync(),T(u),ke.unRegisterForServerChanges()}return t},d5=t=>{let e="",r=[],n;return t.pipe(ee(uS),Ft(o=>{n=o.payload;let{isFormValid:i}=o.payload;if({actionMgrID:e}=o.payload,!i){let s={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,s),Ct.handleDeferredActionCompletion(o.payload.context),ye([])}return ye(o.payload).pipe(z(s=>(n=s,Y_(n))),z(async s=>_de(s,n)),z(async s=>{if(s&&s.type===Te){let m=ue(s);return r.push(m),r}let{containerItemID:a,context:c,pageReference:l,interestPage:u}=n,p=u?.replace(/\(\d+\)$/,"");return ZL(c,n.parentContext,l.startsWith(E.OBJECT_INFO.OBJECT_INFO_CONTENT)?d.getProperty(E.OBJECT_INFO.OBJECT_INFO_CONTENT):d.getProperty(E.CASE_INFO.CASE_INFO_CONTENT),!1,p),r.push(V(Qe,{containerItemID:a,context:c,target:n.target,skipReleaseLockRequest:!0})),r}),O(()=>{if(_c(r))w.rejectActionByID(e),Ct.handleDeferredActionCompletion(n.context);else{w.resolveActionByID(e),Ct.handleDeferredActionCompletion(n.context);let{pageReference:s}=o.payload,a=J.getPropertyValue(d.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,n.parentContext);a?u5(n,{isMultiRecordData:a,pageReference:s}):_u(n.parentContext,d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),{})}return T(r),r=[],r}))}))};var Ide="Error ocurred during ajax call at getDescendants Epic : ",p5=t=>{let{caseID:e,headers:r,debugInfo:n,context:o}=t,i=U(Pk,{caseID:e}),{restApi:s}=i,{reqType:a}=i;return q(k(s,{method:a,headers:{...r,...n&&{...Ge.addDebugHeaders(n)}}},o)).pipe(O(c=>({actionInPayload:t,response:c.data,headers:we({...r,...c.headers})})),me(Ide,o))};var m5=t=>{let e=0,r=[];return t.pipe(ee(sD),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>p5(n)),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;let{actionInPayload:o,response:i}=n,s={};if(g.setIn(s,"caseInfo.childCases",i?.childCases??[]),i?.uiResources?.resources&&bm(i.uiResources.resources),i?.uiResources?.components)try{await fo(i.uiResources.components)}catch(c){return r.push(ue({payload:{...o,err:c}})),r}i?.uiResources?.localeReferences&&g.setIn(s,"localeReferences",i.uiResources.localeReferences),i?.uiResources?.childCases_context_data&&g.setIn(s,"childCases_context_data",i.uiResources.childCases_context_data);let a={data:s,context:o?.context};return r.push(V(Re,a)),r}),O(()=>(T(r),mt(r,e),r=[],r)))};var f5=(t,e)=>{let r={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};w.rejectActionByID(t,!0,r),Ct.handleDeferredActionCompletion(e)},g5=(t,e,r)=>{Or(e)&&t.push(V(Qe,{containerItemID:r,skipReleaseLockRequest:!0}))},h5=({itemData:t,workareaContainerData:e,subscriptData:r,pageGroupName:n,activeWorkArea:o,subscriptFieldName:i,actionMgrID:s,containerItemID:a})=>{let c={referenceList:t?.referenceList,ID:e?.caseInfo?.ID,index:r[i],containerName:E.MODAL,pageReference:E.CASE_INFO.CASE_INFO_CONTENT,viewID:E.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:E.RESOURCE_STATUS.CREATE,interestPage:`.${n}.${r[i]??""}`,targetProperty:`.${n??""}`,pageGroupName:n,context:o??"",subscriptFieldName:i};return{type:Ui,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:s,containerItemID:a,doDeleteCaseSummary:!1,isFormValid:!0}}};var y5=t=>{let e="",r=[],n,o={};return t.pipe(ee(dS),Ft(i=>{n=i.payload;let{isFormValid:s}=i.payload;return{actionMgrID:e}=i.payload,s?ye(i.payload).pipe(z(a=>(n=a,ye({}))),z(async()=>{let{containerItemID:a}=n,c=W(a),l=a,u=c?.dataInfo.content;delete u.classID;let p=qe(l),m=Ke(p).length,f=Ke(p)[m-1]?se(Ke(p)[m-1]):p,h=te(a),S=We(h,a)||{},A=S?.referenceList?.replaceAll(".",""),C=S?.subscriptName,I=W(f),_={...I,caseInfo:{content:{...u}}},N={containerItemID:f,data:_};r.push(V(tr,N)),g5(r,l,a);let x=h5({itemData:S,workareaContainerData:I,subscriptData:u,pageGroupName:A,activeWorkArea:f,subscriptFieldName:C,actionMgrID:e,containerItemID:a});return r.push(x),o=u,r}),O(()=>(w.resolveActionByID(e,o),T(r),r=[],r))):(f5(e,i.payload.context),ye([]))}))};var bde=[PB,JB,c8,p8,j8,q8,Y8,e5,r5,E8,v8,I8,n5,D8,N8,o5,i5,s5,l5,d5,m5,y5],S5=bde;var{RESOURCE_TYPES:k0}=E,fI="pyCasePreview",Tde=(t,e,r,n,o)=>{t&&o===ge.PREVIEW?(r.data.caseInfo.progress=!1,delete r.root,dr(r,r),n.actionsOut=V(tr,{...r,containerName:o})):t?(n.actionsOut=[],n.actionsOut.push(V(rr,{target:e,containerItemID:t}))):n.actionsOut=V(Pt,{...r,containerName:o})},vde=(t,e)=>{let r=B.isObjectCaseType(t.caseClassName);if(t.key&&!r){let n=te(t?.context),o=wt(n,t.key),i=t?.context;(o||t.updateData||JU(i))&&e.actionsOut.push(V(Re,t))}else e.actionsOut.push(V(Re,t))},Rde=t=>{let{containerName:e,updateData:r,viewLoadingContainer:n}=t,o=e||Vt.getTargetViewContainerName(vn),i=n?.target??Z(o,t.context),s=n?.context??(e===ge.PREVIEW&&r?t.context:st(i,o,t.context,{buildNew:!!e}));return{target:i,context:s}},Pde=(t,e)=>{let r=U("loadView",e);t.viewContext===k0.PAGE&&(r=U(vn,{page:t.viewName,pageClass:t.pageClass}));let n=P.getDefaultQualifiedName(fI);return t.containerName===ge.PREVIEW&&t.caseId&&t.viewContext!==k0.PAGE&&(t.viewName===n||t.viewName===fI)&&(r=U(Kt,{caseID:t.caseId,params:{pageName:n}})),r},Nde=t=>t.pipe(ee(Bl),O(e=>e.payload),Qo(e=>!Eu(e.actionMgrID)),z(e=>{let r={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===ge.PREVIEW&&e.context&&e.caseId&&!e.updateData){let s=Z(ge.PREVIEW,e.context),a=st(s,ge.PREVIEW,e.context,{buildNew:!0}),c=decodeURI(e.caseId);T(Pt({...e,context:a,target:s,containerItemID:a,key:c,caseViewMode:d.REVIEW_MODE,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:c,caseInfo:{ID:c,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:s,context:a}}let n={};if(r.RemoteSystemID)n.RemoteSystemID=r.RemoteSystemID;else if(ae.isRemoteCase(r.caseClassName)){let{RemoteSystemID:s}=ae.getRemoteCase(r.caseClassName);n.RemoteSystemID=s}let{restApi:o,reqType:i}=Pde(e,r);return q(k(B.appendExcludeQueryParamToUrl(o),{method:i,headers:n},e.context)).pipe(O(s=>{let a=decodeURI(e.caseId),c="";return typeof s.data=="string"?s.data?c=JSON.parse(s.data):(console.error("response data is empty!!"),c={}):c=s.data,{response:{...c,key:a},actionConfig:e,headers:we(s.headers),rootView:g.getIn(c,d.ROOT)}}),me(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))}),z(async e=>{let r={};if(e?.type===Te){if(r.actionsOut=ue(e),e?.payload?.context?.includes(ge.PREVIEW)){let a={...W(e.payload.context),caseInfo:{progress:!1,error:!0}},c=Z(ge.PREVIEW,e.payload.context);r.actionsOut=V(tr,{key:a.key,target:c,containerName:ge.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:a})}return r}try{r.actionMgrID=e?.actionConfig?.actionMgrID,r.rootView=e?.rootView;let{actionConfig:s,response:a,headers:c}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete a?.data?.caseInfo?.assignments,delete a?.data?.caseInfo?.availableActions,delete a?.data?.caseInfo?.availableProcesses);let{containerItemID:l,containerName:u}=s,{target:p,context:m}=Rde(s);s.context=m;let f={acName:p,context:m},h={};h=Le(a),h.directUrlUpdation=!1,await Pe(h,s,f);let S={...s,target:p,context:m,containerItemID:l||m,headers:c},A=$e(h,S);if(A.resourceType=k0.CASE,s.viewName===d.PY_CONFIRM&&(A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],d.REVIEW_MODE)),u&&!A.updateData){A.caseViewMode=d.REVIEW_MODE,g.setIn(A.data,["context_data","caseViewMode"],A.caseViewMode);let C=te(A?.context),I=wt(C,A.key);Tde(I,C,A,r,u)}else{A.preserveClientChanges=!0,r.actionsOut=[],u===ge.PREVIEW&&r.actionsOut.push({type:pn,payload:{context:m,skipMergeAssignmentsAndActions:!1}});let{viewName:C}=s;C===P.getDefaultQualifiedName(fI)&&dr(A,A),vde(A,r)}}catch(s){console.error(s),r.rootView={type:"error",payload:s}}let{caseId:n,context:o,viewName:i}=e.actionConfig;return i===P.getDefaultQualifiedName(fI)&&FU({caseId:n,context:o}),r}),O(({rootView:e,actionsOut:r,actionMgrID:n=0})=>(w.resolveActionByID(n,e),Ve.setNeedsMapping(!1),r))),Ode=t=>{let e=0,r=[];return t.pipe(ee(Pr),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);let{debugInfo:o,context:i,viewName:s,className:a,skipSemanticUrl:c=!1,containerName:l=Vt.getTargetViewContainerName(vn)}=n,u=o&&{...Ge.addDebugHeaders(o)},p=Z(l,i),m="";if(!c){let{semanticURL:S,activate:A,activateContainerActionPayload:C}=fj(s,a,p);if(m=S,A)return mE(C),ye({type:nr,activateContainerActionPayload:C,actionConfig:n})}let h=se(p)?vt(p,{loadingContext:i}):Promise.resolve({continueExecution:!0,removeActionPayload:{}});return q(h).pipe(z(({continueExecution:S,removeActionPayload:A})=>S?q((()=>{if(_t())return pr("openPage",{pageName:s,pageClass:a,headers:u});let{restApi:I,reqType:_}=U(vn,{page:s,pageClass:a});return k(I,{method:_,headers:u},i)})()).pipe(O(I=>{let _={};return typeof I.data=="string"?_=JSON.parse(I.data):_=I.data,{response:{..._,key:m,semanticURL:m},actionConfig:n,headers:we(I.headers),removeActionPayload:A,skipSemanticUrl:c}}),me(": Error ocurred during ajax call at showPage Epic : ",n.context)):(w.rejectActionByID(e),Et)))}),z(async n=>{let o={};if(o.actionManagerID=n?.actionConfig?.actionMgrID,n&&n.type===Te)return r.push(ue(n)),o;let{type:i}=n,{actionConfig:s,skipSemanticUrl:a}=n,c=s.containerName||Vt.getTargetViewContainerName(Pr),l=Z(c,s.context);$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className});let{remoteCasePayload:u,updatedType:p}=hj(i,n,s,l);if(i=p??i,s.isDeferLoaded){let{response:m,headers:f={}}=n,{isCreateDataObject:h,context:S}=s,A=Le(m,{isCreateDataObject:h});A.directUrlUpdation=!a,await Pe(A,s,{acName:l,context:S});let _=$e(A,{containerItemID:S,target:l,headers:f,context:S});o.rootView=g.getIn(A,d.ROOT),r.push(V(Re,_))}else if(i===nr){let{activateContainerActionPayload:{semanticURL:m,containerItemID:f}}=n,h=pe(f),S={acName:l,context:h};s.isTraditionalRemoteCase||await Pe({directUrlUpdation:!0,semanticURL:m},s,S,!0),r.push(V(rr,{target:l,containerItemID:f}))}else{let m=st(l,c,s.context),{response:f,headers:h={},removeActionPayload:S}=n,A=Le(f,{isCreateDataObject:s.isCreateDataObject});A.directUrlUpdation=!a;let C={acName:l,context:m},I=wn(m);await Pe(A,s,C);let _={target:l,context:m,containerItemID:m,headers:h,debugInfo:s.debugInfo,currentCaseViewMode:I,referenceList:s?.referenceListStr,subscriptName:s?.subscriptName,pageName:s.viewName},N=$e(A,_);N.resourceType=E.PAGE,s.isCreateDataObject&&(N.resourceType=E.RESOURCE_TYPES.DATA,N.resourceStatus=E.RESOURCE_STATUS.CREATE,delete N.data.caseInfo,N.referenceList=s.referenceListStr,N.subscriptName=s.subscriptName),yj(s,u,N),N.data??={},N.data.traditionalGadgetId=B.getUniqueGadgetId();let x=Ht(l,N);S.containerItemID&&tn(x)&&r.push(V(Qe,{containerItemID:S.containerItemID,target:l})),r.push(x)}return $.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:l,pageName:n.actionConfig.viewName,pageClass:n.actionConfig.className}),o}),O(({actionManagerID:n=0,rootView:o})=>{w.resolveActionByID(n,o),T(r),r=[]}),Fi())},xde=[Nde,Ode],E5=xde;var Dde="Error occurred during ajax call at showData Epic : ",wde=(t,e,r)=>{let{context:n,pageName:o,dataContext:i,dataContextParameters:s,semanticURL:a,skipSemanticUrl:c,RemoteSystemID:l}=t,{removeActionPayload:u}=e,p={};return p.RemoteSystemID=l,q((()=>{if(_t())return pr(Ro,{queryPayload:{pageName:o},body:{dataContext:i,dataContextParameters:s}});let{restApi:f,reqType:h,body:S}=U(Ro,{pageName:o,dataContext:i,dataContextParameters:s});return k(f,{method:h,headers:p,body:S},n)})()).pipe(O(f=>({response:{...f.data,key:a,semanticURL:a},actionConfig:t,headers:we(f.headers),removeActionPayload:u,skipSemanticUrl:c})),me(Dde,t.context,String(r)))},L0=wde;var{RESOURCE_TYPES:U0}=E,$de=(t,e)=>{let{context:r,pageName:n,dataContext:o,dataContextParameters:i,skipSemanticUrl:s=!1,isDeferLoaded:a=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:p}=t,m=Z(u,r),f="",h={context:r,pageName:n,dataContext:o,dataContextParameters:i,semanticURL:f,skipSemanticUrl:s,containerName:u,isDeferLoaded:a,parentAction:c,resourceType:l,RemoteSystemID:p};if(!s){f=At(Ro,{pageName:n,dataViewName:o},i),h.semanticURL=f;let{activate:S,activateContainerActionPayload:A}=Zi(U0.PAGE,m,{semanticURL:f});return S?ye({type:nr,activateContainerActionPayload:A,actionConfig:t}):q(vt(m,{loadingContext:r})).pipe(z(({continueExecution:C,removeActionPayload:I})=>C?L0(h,{removeActionPayload:I},e):(w.rejectActionByID(e),Et)))}return L0(h,{removeActionPayload:{}},e)},Mde=t=>{let e=0,r=[],n;return t.pipe(ee(ic),hc(o=>({actionMgrID:e}=o.payload,ye(o.payload).pipe(z(i=>$de(i,e)),z(async i=>{if(i&&i.type===Te)return r.push(ue(i)),r;let{type:s,actionConfig:a,headers:c,response:l,skipSemanticUrl:u}=i;n=g.getIn(l,d.ROOT);let{containerName:p,parentAction:m,resourceType:f}=a,h=Z(p,a.context),S,A=wn(a?.context);if(a.isDeferLoaded){S=Le(l),S.directUrlUpdation=!u;let C={acName:h,context:a.context};await Pe(S,a,C);let I={target:h,headers:c,context:a.context,containerItemID:i.containerItemID},_=$e(S,I);return r=V(Re,_),r}if(s===nr){let{activateContainerActionPayload:{semanticURL:C,containerItemID:I}}=i,_=pe(I);await Pe({directUrlUpdation:!0,semanticURL:C},a,{acName:h,context:_},!0),r.push(V(rr,{target:h,containerItemID:I,resourceType:U0.DATA}))}else if(f==="DATA"&&m===Li){let{context:C}=a,I=l?.data,_={context:C,data:I};r.push(V(Re,_))}else{let C=st(h,p,a.context),{removeActionPayload:I}=i;S=Le(l),S.directUrlUpdation=!u,await Pe(S,a,{acName:h,context:C});let x=$e(S,{target:h,context:C,containerItemID:C,headers:c,currentCaseViewMode:A});x.resourceType=U0.DATA;let H=Ht(h,x);I.containerItemID&&tn(H)&&r.push(V(Qe,{containerItemID:I.containerItemID,target:h})),pE(r),r.push(H)}return r}),O(()=>(w.resolveActionByID(e,n),T(r),r=[],r))))))},A5=Mde;var kde="Error occurred during ajax call at deleteDataObject Epic",Lde=t=>{let{dataViewName:e,context:r,dataViewParameters:n}=t,o={data_view_ID:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))},{restApi:i,reqType:s}=U(Fk,o);return q(k(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t})),me(kde,r))},C5=Lde;var Ude=t=>{let e=0,r=[];return t.pipe(ee(sS),gr(100),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>C5(n)),z(async n=>{if(n&&n.type===Te){let{payload:o}=n,i=ue({...n,...o,actionMgrID:e});return r.push(i),r}return[]}),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e),T(r),r=[],r)))},_5=Ude;var jde="Error occurred during ajax call at GET data object actions : ",zde=t=>{let{dataViewID:e,dataViewParameters:r,context:n}=t,o={data_view_ID:e},{restApi:i,reqType:s}=U(zk,o);return q(k(i,{method:s,body:{dataViewParameters:r}},n)).pipe(O(a=>({...a.data})),me(jde,t.context))},I5=zde;var Fde=t=>{let e=0,r=[],n=100,o={};return t.pipe(ee(Zy),gr(n),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>I5(i)),z(async i=>i&&i.type===Te?(r.push(ue(i)),r):(o=i,[])),O(()=>(r.length===1&&Je(r[0].type)?w.rejectActionByID(e):w.resolveActionByID(e,o),T(r),r=[],r)))},b5=Fde;var Vde=[A5,Kx,Jx,Yx,_5,b5,Zx,Qx],T5=Vde;var{RESOURCE_TYPES:{CASE:Bde,DATA:Hde,OBJECT:Gde,PAGE:qde}}=E,Wde=(t,e,r)=>{e===qde&&r&&(t.pageName=r)},ml=[],fl=!1,rp=!1,gI=null,Kh=null,j0={},Kde=t=>t.pipe(ee(Qy),fm(200),O(e=>e.payload),z(e=>{rp=!1,$.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rp=!0});let r=br.getPreviewMode()&&Ge.addDebugHeaders({debugId:g.generateUniqueID()});j0.dataContext=e.payload.dataViewName,j0.dataContextParameters=e.payload.dataViewKeys;let{context:n,requestType:o,routeKey:i}=e,{routeEndpoint:s}=e;s&&(s.indexOf("viewType={viewType}")>0?s=s.replace("{viewType}","page"):s.indexOf('viewType=""')>0&&(s=s.replace('viewType=""','viewType="page"'))),fl=i===Jr,fl&&Ve.setNeedsMapping(!0);let a=gt.getServerURL()+s,c=e.options.context,l,u={},p=e?.payload?.caseClassName;if(ae.isRemoteCase(p)){let{RemoteSystemID:m}=ae.getRemoteCase(p);u.RemoteSystemID=m}if(v.isWSSPortal()&&(u[d.X_ORIGIN_CHANNEL]="WSS"),o==="POST"){l=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`);let m=kT(i),f;switch(m){case Bde:case Gde:f={caseTypeID:l.caseTypeID,processID:l.processID,content:{}};break;case Hde:f=j0;break;default:f=l}return q(k(a,{method:o,body:f,headers:{...u,...r}},n)).pipe(O(h=>({response:{...h.data},payload:e,headers:we(h.headers,"",u)})),me(": Error occurred during ajax call at historyEpic : ",e))}return q(k(B.appendExcludeQueryParamToUrl(a),{method:"GET",headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(m=>({response:m.data,payload:e,headers:{...we(m.headers),...r}})),zi(m=>{if(i===zs){let f={messages:[{type:"error",message:m.response.data.errorDetails[0].localizedValue}],category:"PAGE"};pt.setComponentCache("assignments-launchAssignment-Error",f);let h=iE(y_()),S=_e.getEndPointInfo(h.split("/assignments")[0]),A=gt.getServerURL()+S.routeEndpoint;return e={...e,routeKey:Kt,resetSemanticURL:!0},q(k(A,{method:S.reqType,headers:{...u,...r}},c.substring(0,c.lastIndexOf("/")))).pipe(O(C=>({response:C.data,payload:e,headers:{...we(C.headers),...r}})))}return ye(Qi(": Error occurred during ajax call at historyEpic : ",m,n))}))}),z(async e=>{if(rp)return ml;if($.subscribe(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,()=>{rp=!0}),e&&e.type===Te)return ue(e);let{headers:r={},response:n,payload:o}=e,i=Le(n,{[E.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=o.options.acName,a=It(s)&&jr(s)?se(s):e.payload.options.context,c=a;r.RemoteSystemID=o?.payload?.RemoteSystemID,Kh={target:s,context:a,containerItemID:c,headers:r,debugInfo:{debugId:r[d.COREHEADER_APP_DEBUG_ID]}};let l=o?.payload?.pageClass,u=o?.payload?.page,p=fl?Jr:Kt,m=fl?o.payload.objectID:o.payload.workID,f=fl?"{objectID}":"{workID}",h=fl?`objects/${m}`:"";o?.payload?.caseName&&m&&(h=At(p,{caseName:e.payload.payload.caseName}),h=h?.replace(f,m)||"",l=o?.payload?.caseClassName),(o?.routeKey===zs||o?.resetSemanticURL)&&YU(c,i),Ej(o?.routeKey,i),Aj(i),$.publish(E.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:u,pageClass:l}),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:l});let S=g.getIn(i,d.COMPONENTS);S&&await fo(S),Gi(i,o.options.actionConfig,!0),$.publish(E.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:u,pageClass:l});let A=$e(i,Kh),C=kT(e.payload.routeKey);return A=gj(C,{...n.data,semanticURL:h,caseViewMode:d.REVIEW_MODE},A),A.data.traditionalGadgetId=B.getUniqueGadgetId(),Wde(A,C,u),ml.push(Ht(s,A)),gI=i,Sj(a,ml),ml}),O(()=>(rp||T(ml),gI&&Kh&&dr(gI,Kh),ml=[],fl=!1,rp=!1,Kh=null,gI=null,ml)),me("Error occurred")),Jde=[Kde],v5=Jde;var Yde=t=>{let e=0;return t.pipe(ee(Vs),O(r=>({actionMgrID:e}=r.payload,r.payload)),O(()=>{let r=De()?.getState(),n=qh();return lo(r,n)&&e>0?w.resolveActionByID(e,{}):w.rejectActionByID(e),[]}),Fi())},Zde=[Yde],R5=Zde;var Qde=t=>{let e=0,r=[];return t.pipe(ee(qy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,insightID:s}=n,a="",c;i||(a=At(sc,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),c=_e.getEndPointInfo(a));let{restApi:l,reqType:u}=U(sc,{...c?.payload||[],insightID:s});return q(k(l,{method:u},o)).pipe(O(p=>{let m={};return typeof p.data=="string"?m=JSON.parse(p.data):m=p.data,{response:{...m,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Vt.getTargetViewContainerName(Pr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=$e(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Ht(a,S);return r.push(A),r}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),Fi())},Xde=[Qde],P5=Xde;var epe=t=>{let e=0,r=[];return t.pipe(ee(Wy),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,skipSemanticUrl:i=!1,dashboardID:s}=n,a="";i||(a=At(lm,{dashboardID:s}),a=a.replace("{dashboardID}",s));let{restApi:c,reqType:l}=U(lm,{dashboardID:s});return q(k(c,{method:l},o)).pipe(O(u=>{let p={};return typeof u.data=="string"?p=JSON.parse(u.data):p=u.data,{response:{...p,key:a,semanticURL:a},actionConfig:n,skipSemanticUrl:i}}),me(": Error occurred during ajax call at showPage Epic : ",n.context))}),z(async n=>{if(n&&n.type===Te)return r.push(ue(n)),r;let{actionConfig:o,skipSemanticUrl:i}=n,s=Vt.getTargetViewContainerName(Pr),a=Z(s,o.context),c=st(a,s,o.context),{response:l}=n,u=Le(l);u.directUrlUpdation=!i,await Pe(u,o,{acName:a,context:c},!i,i);let S=$e(u,{target:a,context:c,containerItemID:c});S.resourceType=E.PAGE;let A=Ht(a,S);return r.push(A)}),O(()=>{w.resolveActionByID(e),T(r),r=[]}),Fi())},tpe=[epe],N5=tpe;var rpe="Error occurred during ajax call at createObject Epic : ",O5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(rpe,n))};var x5="CREATE_OBJECT";var npe=(t,e)=>B.isExternalObject(t)&&e?e:zo(),ope=t=>{let e=0,r=[],n={},o,i=100,s=!1;return t.pipe(ee(x5),gr(i),Ft(a=>{if({actionMgrID:e}=a.payload,B.isExternalObject(a.payload.class)&&!xr(a.payload.context)){let c={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(e,!0,c),ye([])}return ye(a.payload).pipe(z(c=>{let{context:l}=c;o=c.class;let u=N0(c),p=Z(u,l);return s=!1,q(Ua(p,{loadingContext:l})).pipe(z(({continueExecution:m,removeActionPayload:f,dirtyCheckPerformed:h})=>m?(s=h,O5(c,{removeActionPayload:f})):(w.rejectActionByID(e),Et)))}),z(async c=>{if(c&&c.type===Te)return c.payload.context=npe(o,c.payload.context),r.push(ue(c)),r;let{actionInPayload:l,response:u,headers:p,removeActionPayload:m}=c,f=Xd(l,u);g.setIn(u.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let h=N0({...l,isInCreateStage:f}),S=Z(h,l.context),A=st(S,h,l.context);if(FB(l,r),!s&&BB(h,S,o)){let{continueExecution:ne}=await vt(S,{loadingContext:l.context});if(!ne)return w.rejectActionByID(e),r}let C=l?.openCaseViewAfterCreate??!0;if(VB(C,f)){let{businessID:ne,caseType:be,resolvedURL:he}=ZS(u);return n={id:ne,label:be,href:he},ja(n),Yd({caseId:ne,caseType:be}),r}GB(l);let I=Le(u),_=String(er(go(I))),N=At(Yo,{caseClassName:Yn(I)});N=N.replace(/{.+?}/,_),I.semanticURL=N,pt.setComponentCache(_,Ge.addDebugHeaders(l.debugInfo)),Zd(I,l),await Pe(I,l,{acName:S,context:A});let H=Qd(I),G={target:S,context:A,headers:p,semanticURL:N,caseViewMode:H,containerItemID:A,isInCreateStage:f,isMinimizable:f,assignmentContext:g.getIn(I,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(I,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:l.openCaseViewAfterCreate,modalOptions:l.modalOptions,debugInfo:l.debugInfo};ti(G,I);let re=$e(I,G),j=Ht(S,re);return HB(j,{removeActionPayload:m,target:S},r),r.push(j),r}),O(()=>(gn(r),mt(r,e),setTimeout(()=>qB(o)),n={},r=[],r)))}))},D5=ope;var ipe="Error occurred during ajax call at executeObjectWideAction Epic : ",w5=(t,e)=>{let{assignmentID:r,actionID:n,caseID:o,context:i,additionalHeaders:s={},jsActionQueryParams:a}=t,{state$:c}=e,l=it.PAGE,u=Jk,p={assignmentID:r,actionID:n,viewType:l,objectID:o},{restApi:m}=U(u,p),{reqType:f}=U(u,p);l&&!m?.includes("viewType=")&&(m=m?.includes("?")?`${m}&viewType=${l}`:`${m}?viewType=${l}`),m=fu(a,m),t.viewType=l;let{content:h}=Rt(i,{isObjectWideAction:!0}),S=c.value.data[i]?.objectInfo?.headers||{},{etag:A}=S,C={"if-match":A,...s};return q(k(m,{method:f,body:h,headers:C},i)).pipe(O(I=>{let{data:_,headers:N}=I;return Ve.analyseResponse(I.data),{actionInPayload:t,response:_,headers:we({...C,...N})}}),me(ipe,i))};var spe=(t,e)=>{let{isCaseWideAction:r}=e;return{isCaseWideAction:r,caseID:go(t)}},$5=spe;var{RESOURCE_TYPES:ape}=E,cpe=(t,e)=>{let r=0,n=[],o={},i="";return t.pipe(ee(ru),Ft(s=>{if({actionMgrID:r}=s.payload,i=s.payload.context,dt({context:i,stateObj:W(i),clearContextMessages:!0}),!xr(i)){let a={type:E.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return w.rejectActionByID(r,!0,a),Ct.handleDeferredActionCompletion(s.payload.context),ye([])}return ye(s.payload).pipe(z(a=>{iI(n,a);let c={...a};return w5(c,{state$:e})}),z(async a=>{if(a?.type===Te){let ne=ue(a);return n.push(ne),n}Ao.clearContextedCache(i);let{headers:c,actionInPayload:l,response:u}=a,{containerItemID:p,isModalAction:m,isInCreateStage:f}=l,h=te(p);l.target=h,g.setIn(u.data,d.OBJECT_INFO_IS_LOCAL_ACTION,!1),dI({submitResponse:u});let S=Le(u,{[E.STOPMERGEACTIONS]:!u.nextAssignmentInfo}),A=Yn(S),C=qe(l.context),I=Ke(C)[0]?se(Ke(C)[0]):C,_=kU(S),N=f&&!_;m&&!f&&!pl(l.context,I)&&(S=dE(S,W(p)));let x=$e(S,{headers:c,actionMgrID:r,directUrlUpdation:!1});LU(x.data,l),x.caseClassName=A,x.resourceType=ape.ASSIGNMENT,x.headers=c;let H=!1,G=go(S);ti(x,S);let re=At(Yo,{caseClassName:A}).replace(/{.+?}/,String(er(G)));S.semanticURL=re,x.semanticURL=re,await cI(l,x,H,G,S,n,a,u,!0),N&&(o=aI(l),Yd({caseId:l.caseID,caseType:l.caseTypeID,assignmentId:l.assignmentID})),UU(a,n),Ct.handleDeferredActionCompletion(i),lI(x,l,I);let j=$5(S,l);return eE({...j,containerItemID:p}),sI(n,{transientItemID:p,target:h,isModalAction:m}),n}),O(()=>{let a=n.find(c=>c.type===Te);return a?(Ct.handleDeferredActionCompletion(i),uI(a),w.rejectActionByID(r)):w.resolveActionByID(r,o),gn(n),Ve.setNeedsMapping(!1),n=[],o={},n}))}))},M5=cpe;var lpe="Error occurred during ajax call at getObject Epic : ",k5=(t,e)=>{let{insKey:r,headers:n,context:o,debugInfo:i,viewType:s}=t,{removeActionPayload:a}=e,c=t.pageName?t.pageName:d.VIEW_NAMES.PY_DETAILS,l=U(Jr,{objectID:r,params:{pageName:c}}),{restApi:u}=l,{reqType:p}=l;return s==="none"&&(u=`${u?.split("viewType")[0]}viewType=none`),q(k(u,{method:p,headers:{...n,...i&&{...Ge.addDebugHeaders(i)}}},o)).pipe(O(m=>(Ve.analyseResponse(m.data),{response:m.data,actionInPayload:t,headers:we({...n,...m.headers}),removeActionPayload:a})),me(lpe,o))};var L5=async(t,e)=>{let{activateContainerActionPayload:{semanticURL:r,containerItemID:n},actionInPayload:o,actionInPayload:{context:i,skipBrowserSemanticUrlUpdate:s,doDeleteCaseSummary:a}}=e,c=Lt(Jr,o),l=Z(c,i),u=pe(n);await Pe({directUrlUpdation:!s,semanticURL:r},o,{acName:l,containerName:c,target:l,context:u}),t.push(V(rr,{containerItemID:n,target:l,context:u,doDeleteCaseSummary:a}))},U5=t=>{let e=go(t),r=Yn(t),n=At(Jr,{objectClassName:r});return n=n?.replace("{objectID}",String(er(e))),n};var j5="GET_OBJECT";var{RESOURCE_TYPES:z5}=E,upe=async(t,e)=>{let{actionInPayload:r,activateContainerActionPayload:n,type:o,response:i,removeActionPayload:s,headers:a}=t,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=Lt(Jr,r),m=Z(p,c);if(rE(o))await L5(e,{activateContainerActionPayload:n,actionInPayload:r});else{let h=st(m,p,c,{buildNew:!0}),S=Le(i),A=U5(S);S.semanticURL=A,S.directUrlUpdation=!l,await Pe(S,r,{acName:m,context:h});let I=$e(S,{target:m,context:h,containerItemID:h,semanticURL:A,headers:a,debugInfo:u});I.caseViewMode=d.REVIEW_MODE,I.resourceType=z5.OBJECT,ti(I,S);let _=Ht(m,I);s.containerItemID&&tn(_)&&e.push(V(Qe,{containerItemID:s.containerItemID,target:m})),e.push(_)}let f=r.insKey;tE({caseKey:f,actionInContext:c})},dpe=t=>{let e=0,r=[];return t.pipe(ee(j5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>{let{context:o,isChild:i,viewType:s}=n,a=Lt(Jr,n),c=Z(a,o),l=s!=="none"?vt(c,{loadingContext:o}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0});return q(l).pipe(z(({continueExecution:u,removeActionPayload:p})=>{if(!u)return w.rejectActionByID(e),Et;let{activate:m,activateContainerActionPayload:f}=Zi(z5.OBJECT,c,n);return m&&!i&&s!=="none"?ye({type:nr,activateContainerActionPayload:f,actionInPayload:n}):k5(n,{removeActionPayload:p})}))}),z(async n=>{if(n&&Je(n.type))return r.push(ue(n)),r;if(n?.actionInPayload?.viewType==="none"){if(W(n?.actionInPayload?.context)?.context_data?.caseViewMode!==d.PERFORM_MODE){let s={data:{...Le(n?.response)?.data},context:n?.actionInPayload?.context,isArrayDeepMerge:!0};r.push({type:pn,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r.push(V(Re,s));let a=te(n?.actionInPayload?.context),c=Lr(n?.actionInPayload?.context),l=Object.freeze({target:a,containerItemID:n?.actionInPayload?.context,context:n?.actionInPayload?.context,containerName:c});if(YS(n?.actionInPayload?.context)){let u=$e(n?.response,{...l});yo({...u,isArrayDeepMerge:!0},r)}}}else await upe(n,r);return r}),O(()=>(T(r),mt(r,e),r=[],r)))},F5=dpe;var V5="OPEN_OBJECT_ACTION";var ppe=(t,e,r,n)=>{let o,i,s=!1,a=mr(t);return!jr(t)||a&&!ll(t,n)?(i=lr(e,r),en(e)&&(i=Yr(r,i)),o=i,s=!0):(o=a?wt(t,n):se(t),i=pe(o)),{context:i,containerItemID:o,isNewContainerItem:s}},mpe=t=>t?d.PERFORM_MODE:d.REVIEW_MODE,fpe=t=>t?Pt:tr,z0=t=>{let{actionID:e,caseID:r,context:n,openActionType:o,modalLoadingContainer:i}=t,s=it.FORM,a=U(fS,{objectID:r,actionID:e,viewType:s}),{reqType:c}=a,{restApi:l}=a;t.actionType=d.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${s}`:`${l}?viewType=${s}`);let u=i?.context??n;return q(k(l,{method:c,headers:{}},u)).pipe(O(p=>(Ve.analyseResponse(p.data),{response:p.data,actionInPayload:t,headers:we(p.headers)})),me(`: Error occurred during ajax call at ${o} Epic : `,u))},B5=async(t,e,{headers:r,actionInPayload:n})=>{let{context:o,actionName:i,openActionType:s,doDeleteCaseSummary:a,modalLoadingContainer:c}=n,l=Le(t,{info:E.OBJECT_INFO.OBJECT_INFO}),u=Lt(s,n),p=c?.target??Z(u,o),{context:m,containerItemID:f,isNewContainerItem:h}=ppe(p,u,o,t.data.objectInfo.ID);await Pe(l,n,{acName:p,target:p,containerName:u,context:m});let A=l.uiResources?.root,C=mpe(A),I=$e(l,{target:p,context:m,containerItemID:f,caseViewMode:C,doDeleteCaseSummary:a,headers:r,actionName:i,isMinimizable:!1,isInCreateStage:en(u),resourceType:E.RESOURCE_TYPES.OBJECT,isProcessAction:n.isProcessAction,showProgress:n.showProgress,progressMessage:n.progressMessage,actionType:n.actionType});if(A&&ti(I,l),en(u)&&delete I.doDeleteCaseSummary,e.push(V(fpe(h),I)),h||e.push(V(gs,I)),h){let _=Ke(n.contextName),N=wt(_,t.data.objectInfo.ID);if(N){let x={data:{objectInfo:{headers:r}},context:N};e.push(V(Re,x))}}return f!==se(p)&&e.push(V(rr,{target:p,containerItemID:f})),YS(f)&&!c?.context&&yo(I,e),e};var gpe=t=>{if(t.openActionType=fS,Lt(t.openActionType,t)===d.MODAL){let r=Lt(t.openActionType,t),n=Z(r,t.context),o=Yr(t.context,lr(r,t.context));return T(Pt({target:n,context:o,containerItemID:o,key:t.caseID,caseViewMode:d.PERFORM_MODE,actionName:t.name,showProgress:!0,root:{type:"reference",config:{context:d.getProperty(d.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:t.caseID,objectInfo:{ID:t.caseID}}})),T(Mh({context:o})),t.modalLoadingContainer={target:n,context:o},z0(t)}return z0(t)},H5=gpe;var hpe=t=>{let e=0,r=[];return t.pipe(ee(V5),O(n=>({actionMgrID:e}=n.payload,n.payload)),z(n=>H5(n)),z(async n=>{if(Je(n.type)){let c=ue(n);return r.push(c),W(n.payload.context)?.context_data?.isLoading&&r.push(V(gs,n.payload)),r}let{actionInPayload:o,headers:i,response:s}=n,{actionID:a}=o;return g.setIn(s,"data.objectInfo.activeActionID",a),g.setIn(s.data,d.getProperty(d.OBJECT_INFO_IS_LOCAL_ACTION),!0),o.refreshConditions&&g.setIn(s.data,d.getProperty(d.CASE_INFO_REFRESH_CONDITIONS),o.refreshConditions),await B5(s,r,{headers:i,actionInPayload:o}),pI(o),r}),O(()=>(T(r),mt(r,e),r=[],r)))},G5=hpe;var F0=t=>{let{containerName:e,isInCreateStage:r}=t;return r?d.MODAL:e||Vt.getTargetViewContainerName(Bs)};var ype="Error occurred during ajax call at createObject Epic : ",q5=(t,e)=>{let{class:r,context:n,viewType:o=it.PAGE}=t,{removeActionPayload:i}=e,s=t?.pageName?t?.pageName:v.getDefaultCasePage();return q(gi.createCase(r,{...t,pageName:s,viewType:o,context:n,retrieveActionViewForNewObject:!0})).pipe(O(({response:a,headers:c})=>(Ve.analyseResponse(a),{response:a,actionInPayload:t,headers:c,removeActionPayload:i})),me(ype,n))};var W5="CREATE_EXTERNAL_OBJECT";var Spe=t=>{let e=0,r=[],n=!1;return t.pipe(ee(W5),gr(100),O(i=>({actionMgrID:e}=i.payload,i.payload)),z(i=>{let{context:s}=i,a=F0(i),c=Z(a,s);return n=!1,q(Ua(c,{loadingContext:s})).pipe(z(({continueExecution:l,removeActionPayload:u,dirtyCheckPerformed:p})=>l?(n=p,q5(i,{removeActionPayload:u})):(w.rejectActionByID(e),Et)))}),z(async i=>{if(i&&i.type===Te)return i.payload.context=zo(),r.push(ue(i)),r;let{actionInPayload:s,response:a,headers:c,removeActionPayload:l}=i,u=Xd(s,a);g.setIn(a.data,d.getProperty(d.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);let p=F0({...s,isInCreateStage:u}),m=Z(p,s.context),f=st(m,p,s.context);if(!n&&!en(p)&&It(m)){let{continueExecution:x}=await vt(m,{loadingContext:s.context});if(!x)return w.rejectActionByID(e),r}let h=Le(a),S=At(Bs,{caseClassName:Yn(h)});S=S.replace(/{.+?}/,String(er(go(h)))),h.semanticURL=S,Zd(h,s),await Pe(h,s,{acName:m,context:f});let C=Qd(h),I={target:m,context:f,headers:c,semanticURL:S,caseViewMode:C,containerItemID:f,isInCreateStage:u,isMinimizable:u,assignmentContext:g.getIn(h,Co.NEXT_ASSIGNMENT_INFO_CONTEXT),nextAssignmentInfo:g.getIn(h,Co.NEXT_ASSIGNMENT_INFO),resourceType:E.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo,isExternalObjectCreationFlow:!0};ti(I,h);let _=$e(h,I),N=Ht(m,_);return tn(N)&&ri(r,{removeActionPayload:l,target:m}),r.push(N),r}),O(()=>(gn(r),mt(r,e),r=[],r)))},K5=Spe;var J5=t=>{let{workId:e,context:r,isExternalCase:n}=t,o=n?rS:Zk,{restApi:i,reqType:s}=U(o,{ID:e});return q(k(i,{method:s},r)).pipe(O(a=>({response:a.data,actionInPayload:t,headers:we(a.headers)})),me("Error occurred during ajax call at deleteWork Epic : ",r))};var Y5=t=>{$.publish(d.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,t)};var Epe=t=>{let e=0,r,n=[];return t.pipe(ee(Mx),O(o=>({actionMgrID:e,caseTypeID:r}=o.payload,o.payload)),z(o=>{if(!o.skipDeleteConfirmation&&!o.ignoreWorkDeletion){let i=ge.MODAL,s=Z(i,o.context),a=Yr(o.context,lr(i,o.context));return T([V(Pt,{target:s,context:a,containerItemID:a,containerName:i,isDeleteConfirmation:!0,actionName:"Delete",workId:o.workId,caseTypeID:r,className:o.className,keys:o.keys,...o.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:r}}})]),w.resolveActionByID(e),Et}return o.ignoreWorkDeletion?ye({actionInPayload:o}):J5(o)}),z(async o=>{if(o&&Je(o.type)){let{payload:a}=o;return n.push(ue({...o,...a,actionMgrID:e})),n}let{actionInPayload:i}=o,{context:s}=i;if(ja({content:Nr().getLocaleValue("Deleted successfully!","Messages")}),s?.includes(d.PREVIEW)&&n.push(V(wc,Dc({context:d.APP.APP,name:d.PREVIEW}))),s?.includes(d.MODAL)){let a=ge.MODAL,c=Z(a,s);We(c,s)?.enableBackNavigation&&window?.history?.back()}return n}),O(()=>(T(n),mt(n,e)===d.PROMISE_VALUE.RESOLVE&&Y5({caseTypeID:r}),n=[],n)))},Z5=Epe;var Ape=[D5,F5,M5,G5,K5,Z5],Q5=Ape;var X5=yV(...AB,...S5,...E5,...v5,...T5,...CB,...R5,...P5,...N5,...Q5);var Cpe=new Set([St,kt,Ze,et,ks,Ls,Wo]),_pe=()=>t=>e=>{let{type:r="",payload:n={}}=e||{},{category:o,context:i,transientItemID:s}=n;if(o==="HTTP"||!Cpe.has(r)){t(e);return}fE(i||s),Ie.removeContextTreeNode(i||s),(r===St||r===Ze)&&n?.target?.indexOf("modal")!==-1&&$.publish(E.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,r),t(e)},eH=_pe;var gl={},Ipe=new Set([St,Er,Jo,et,Ze]),tH=t=>(gl[t]||(gl[t]={}),gl[t]),bpe=(t,e,r)=>{let n=tH(t),o=tH(d.CONTEXT),i=n[e]??[];n[e]=[...new Set([...i,r])];let s=o[r]??[];o[r]=[...new Set([...s,e])]},Tpe=(t,e)=>{let r=e.lastIndexOf("_"),n=r>-1?e.slice(0,r):e,o=gl[n],i=o?.[e];if(i){let s=i.indexOf(t);s>-1&&i.splice(s,1)}return i&&i.length>0?null:(o&&(delete o[e],Object.keys(o).length===0&&delete gl[n]),{dataPageName:n,dataPageNameWithHash:e})},V0=t=>{if(!t)return;let e=gl[d.CONTEXT],n=(e?.[t]??[]).map(o=>Tpe(t,o)).filter(o=>!!o);e&&(delete e[t],Object.keys(e).length===0&&delete gl[d.CONTEXT]),n.length>0&&T(kw({dataPagesToBeRemoved:n}))},rH=(t={},e)=>{e&&Object.keys(t).forEach(r=>{let n=t[r];Object.keys(n??{}).forEach(o=>{bpe(r,o,e)})})};var vpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{V0(r)})},Rpe=(t,e)=>{let{data:r={},context:n=null,childContainersContexts:o=[]}=e??{};if(vpe(t,o),t===St||t===Er||t===Jo){let i=t===Jo?r:r.shared;rH(i,n);return}if(t===et){V0(n),rH(r.shared,n);return}t===Ze&&V0(n)},Ppe=()=>t=>e=>{(Array.isArray(e)?e:[e]).forEach(n=>{let o=n?.type;Ipe.has(o)&&Rpe(o,n?.payload)}),t(e)},nH=Ppe;var{PUB_SUB_EVENTS:oH}=E,Npe=new Set([Ze,et]),Ope=(t,e,r,n,o,i)=>{let s=t.getState(),{resourceType:a,key:c,context:l}=g.getIn(s,["containers",e,"items",r])||{},u=g.getIn(s,["data",l,d.CONTEXT_DATA,"initiatingContext"]),p={resourceType:a,key:c,context:l,containerItemID:r,...u&&{initiatingContext:u},...n!==void 0?{eventName:n}:{}};$.publish(oH.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,p),e===`${E.APP.APP}/${d.PRIMARY}`&&i===d.CONTAINER_TYPE.MULTIPLE&&$.publish(oH.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:c,newAccessedOrder:o})},xpe=(t,e)=>{e&&e.length>0&&(t===et||t===Ze)&&e.forEach(r=>{r&&Th.cleanCaches(r)})},Dpe=t=>e=>r=>{let n=o=>{if(!Npe.has(o.type))return;let{type:i,payload:{target:s,containerItemID:a,context:c,deleteContext:l,childContainersContexts:u=[],containerInfo:{newAccessedOrder:p,containerType:m}={newAccessedOrder:new Array,containerType:""},eventName:f}={}}=o;i===Ze&&Ope(t,s,a,f,p,m),xpe(i,u),c&&(i===et||i===Ze&&l)&&Th.cleanCaches(c)};Array.isArray(r)?r.forEach(n):n(r),e(r)},iH=Dpe;var wpe=t=>t===`${d.APP.APP}/${d.PRIMARY}`,$pe=new Set([St,et,Ze]),B0=t=>t===`${d.APP.APP}/${d.MODAL}`,Mpe=(t,e,r,n,o)=>{t&&e&&(B0(o)?GU({caseId:t,caseClass:r,context:n||""}):BU({caseId:t,caseClass:r,context:n||""}))},kpe=(t,e)=>{t&&(B0(e)?qU({caseId:t,caseClass:"",context:""}):HU({caseId:t}))},Lpe=()=>t=>e=>{if(!e||typeof e!="object"||!("type"in e)||typeof e.type!="string"||!$pe.has(e.type)){t(e);return}let{type:r}=e,{payload:n}=e,{target:o,key:i,context:s,data:a}=n||{};if(wpe(o)||B0(o)){let c=a?.caseInfo?.ID,l=s||"",u=oe(d.CASE_INFO.CASE_INFO_ID,"",l)||"",p=a?.caseInfo?.caseTypeID||"";if((r===et||r===Ze)&&kpe(u,o),r===St||r===et){t(e),Mpe(i,!!c,p,l,o);return}}t(e)},sH=Lpe;var Upe=new Set([St,kt,et,Ze,uo]),jpe=()=>t=>e=>{if(!e||!Upe.has(e.type)){t(e);return}let{payload:{context:r=null,transientItemID:n=null,clearStateMachine:o=!0}={},type:i}=e;r&&(i===St||i===kt||i===et||i===Ze)&&o&&(Em(r),ym(r)),n&&i===uo&&(Em(n),ym(n)),t(e)},aH=jpe;var zpe=new Set([St,et,Ze,kt]),np=t=>typeof t=="object"&&t!==null,Fpe=t=>np(t)&&typeof t.context=="string",Vpe=t=>({context:t.context,data:np(t.data)?t.data:{},resourceType:typeof t.resourceType=="string"?t.resourceType:"",caseID:typeof t.caseID=="string"?t.caseID:void 0}),Bpe=t=>np(t)&&typeof t.type=="string",lH=t=>t?.toString().includes(d.MODAL)??!1,vi=t=>g.getIn(t,d.CASE_INFO.ASSIGNMENT_ID),Jh=t=>g.getIn(t,["caseInfo","ID"]),cH=t=>{if(!t)return;let e=W(t);return np(e)?e:void 0},Hpe=(t,e,r,n)=>{let o=Jh(e),i=vi(e);!o||!i||o===r&&i===n||Su({actionInContext:t,assignmentID:i,caseKey:o})},Gpe=(t,e,r,n)=>{if(t===Ze){Su(n);return}(t===kt||t===et)&&Hpe(e,r,n.caseKey,n.assignmentID),Rm(n)},uH=t=>{let e=Object.keys(Tt.subscribers);for(let r=0;r<e.length;r+=1){let n=e[r],o=Tt.subscribers[n],{matcher:i,criteria:s}=o.filter;i==="COACH_UPDATE"&&s?.caseId===t&&Tt.unsubscribe(n)}},qpe=(t,e,r)=>{if(r===d.RESOURCE_TYPES.ASSIGNMENT){let n=vi(e),o=g.getIn(e,["caseInfo","ID"]);if(n&&o)return{actionInContext:t,assignmentID:n,caseKey:o}}else if(r===d.RESOURCE_TYPES.CASE&&t?.includes("workarea")){let n=g.getIn(e,["caseInfo","ID"]),o=vi(e);if(n&&o)return{actionInContext:t,assignmentID:o,caseKey:n}}},Wpe=(t,e,r)=>{if(r!==d.RESOURCE_TYPES.ASSIGNMENT)return;let n=W(t),o=vi(n),i=vi(e),s=Jh(e)??Jh(n);if(o&&o!==i&&s&&Su({actionInContext:t,assignmentID:o,caseKey:s}),i&&s)return{actionInContext:t,assignmentID:i,caseKey:s}},Kpe=(t,e)=>{if(t?.includes("workarea")){let r=vi(W(t));r&&Su({actionInContext:t,assignmentID:r,caseKey:e})}else uH(e)},Jpe=(t,e,r,n)=>{if(t?.includes("workarea")){let o=vi(W(t));o&&Su({actionInContext:t,assignmentID:o,caseKey:n})}else uH(n);if(r===d.RESOURCE_TYPES.ASSIGNMENT){let o=vi(e);if(o)return{actionInContext:t,assignmentID:o,caseKey:n}}},Ype=(t,e)=>{let r=np(t.payload)?t.payload:void 0;if(!r||!lH(r.target))return!1;let n=typeof r.context=="string"?r.context:void 0,o=np(r.data)?r.data:void 0,i=typeof r.caseID=="string"?r.caseID:void 0,s=typeof r.assignmentID=="string"?r.assignmentID:void 0,a=cH(n);e(t);let c=t.type===Ze?a:cH(n),l=i??Jh(o)??Jh(c),u=s??vi(o)??vi(c);if(!n||!l||!u)return!0;let p={actionInContext:n,assignmentID:u,caseKey:l};return Gpe(t.type,n,a,p),!0},Zpe=(t,e)=>{if(lH(e.target))return;let{context:r,data:n,resourceType:o,caseID:i}=e;if(t===St)return qpe(r,n,o);if(t===kt)return Wpe(r,n,o);if(t===Ze&&i){Kpe(r,i);return}if(t===et&&i)return Jpe(r,n,o,i)},Qpe=()=>t=>e=>{if(!Bpe(e)||!zpe.has(e.type)){t(e);return}let{type:r,payload:n}=e;if(Ype(e,t))return;let o;Fpe(n)&&(o=Zpe(r,Vpe(n))),t(e),o&&Rm(o)},dH=Qpe;var pH=new Set([vo,wi,Ky,Rk,Mi,HI]),Xpe=new Set([St,et,kt,Ze,BI,Ui,Tn,po,...pH]),eme=(t,e)=>t===Mi?e.saveActionPayload?.containerItemID:t===HI?e.saveContainerItemID??e.context:e.containerItemID??e.context,tme=(t,e)=>{if(!n6(e))return!1;let r=e.containerItemID||t,n=e.target||te(r),o=We(n,r),i=e.resourceType||o?.resourceType,s=e.key||o?.key;return i===d.RESOURCE_TYPES.ASSIGNMENT&&!!s},rme=(t,e,r)=>{t===St||t===et||t===kt&&e.data?(fs(r)&&f_(r),t===et&&LD(r),tme(r,e)&&i6(r,{containerName:e.containerName??""})):t===Ze&&(fs(r)&&f_(r),LD(r))},nme=(t,e)=>{if(t!==Ze||!e.includes(d.MODAL))return;let r=Po(e),n=`${r}/`;for(let o of a6())(o===r||o.startsWith(n))&&l6(o)},ome=(t,e)=>{if(e.context){if(t===Tn){VS(e.context,null),Bd(e.context);return}t===po&&!e?.isDefault&&!e?.skipDirtyValidation&&Bd(e.context)}},ime=(t,e,r)=>{if(t===BI){e.autosave||g_(r);return}if(t===Ui){c6(r);return}pH.has(t)&&g_(r)},sme=t=>typeof t=="object"&&t!==null,ame=()=>t=>e=>{if(e&&typeof e=="object"&&"type"in e&&"payload"in e&&typeof e.type=="string"&&Xpe.has(e.type)&&sme(e.payload)){let{type:r,payload:n}=e,o=eme(r,n);o&&(nme(r,o),rme(r,n,o),fs(o)&&(ome(r,n),ime(r,n,o)))}t(e)},mH=ame;var fH=SV(),cme=t=>{if(De()!==null){ps();return}let e=[h6.propertyChangeMiddleware,eH,nH,aH,fH,dH,mH,sH,iH],r=z9({reducer:lB(t),middleware:n=>n({serializableCheck:!1,thunk:!1}).concat(e),enhancers:n=>n().prepend(a0).concat(a0)});fH.run(X5),bw(r)},hl=cme;var lme=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],H0=t=>lme.includes(t.split("-")[0])?"rtl":"ltr";async function ume(t){if(!t)return;let e=v.getLocale();v.setLocale(t);let r=v.getLocale();if(!(!r||r===e)){if(S_(["lang"]),typeof window<"u"){let n=new URL(window.location.href);n.searchParams.set("lang",r),window.history.replaceState(window.history.state,"",n.toString())}v.isInfinityRuntime()&&await us.loadLocaleBundle([r]),await qd(r),typeof document<"u"&&(document.documentElement.lang=r,document.documentElement.dir=H0(r)),T({type:Xl,payload:{locale:r}}),$.publish(d.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:r,previousLocale:e})}}var gH=ume;var dme=t=>typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(e=>typeof e=="string"),G0=class{#e(e,r,n,o,i){let s=!1;return e.IncludeInURL&&r!==void 0&&(o[e.Key]=r,e.Key==="portal"&&r!==n&&(s=!0)),Array.isArray(e.IncludeInHeaders)&&r!==void 0&&e.IncludeInHeaders.forEach(a=>{i[a.Value]||(i[a.Value]=[]),i[a.Value].push(`${e.Key}=${r}`)}),s}#t(e,r,n){let o={},i={},s=!1;return Array.isArray(e)&&e.forEach(a=>{let c=r[a.Key];this.#e(a,c,n,o,i)&&(s=!0)}),{urlParams:o,headerMap:i,isPortalChanged:s}}#r(e){let r=pt.getComponentCache("lastActionID"),n=vc.truncateNamespace(e),o=vc.truncateNamespace(typeof r=="string"?r:(r??"").toString());return n===o}#n({message:e}){let{RequestContext:r,ActionName:n}=e;if(!this.#r(n))return;let o=JSON.parse(r);if(!dme(o))throw new TypeError("RequestContext must be a JSON object with string values.");let i=o,s=v.environmentInfoObject?.requestContext,c=(typeof globalThis.location?.href=="string"?new URL(globalThis.location.href):null)?.searchParams.get("portal")??null,{urlParams:l,headerMap:u,isPortalChanged:p}=this.#t(s,i,c);pt.setURLParams(l),$.publish(d.PUB_SUB_EVENTS.EVENT_REQUEST_CONTEXT_CHANGED,i),Object.entries(u).forEach(([m,f])=>{let S=Ge.getRegisteredHeaders()[m]?.split(";").map(C=>C.trim())||[],A=new Map;[...S,...f].forEach(C=>{let I=C.indexOf("=");I!==-1&&A.set(C.slice(0,I),C)}),Ge.registerHeader(m,[...A.values()].join("; "))}),pt.setComponentCache("lastActionID",""),p&&globalThis.location&&globalThis.location.reload()}subscribeToGlobalEvents(){let e=g.generateUniqueID(),n={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:v.getOperatorIdentifier()||""}};Tt.subscribe(n,this.#n.bind(this),void 0,e)}},hH=new G0;var yH="displaySaveAssignmentBrowserNotification",q0=!1,SH=t=>{q0||($.subscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e=>{t("Save Assignment",e)},yH),q0=!0)},EH=()=>{$.unsubscribe(d.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,yH),q0=!1};var Yh=()=>{if(!(typeof globalThis>"u"))return globalThis.Notification},W0=()=>{let t=v?.environmentInfoObject;return t?.features?.pyEnableBrowserNotifications===!0||t?.pyFeatures?.pyEnableBrowserNotifications===!0},pme=()=>typeof document>"u"?"visible":document.visibilityState,hI=()=>typeof window<"u"&&typeof document<"u",AH=t=>{if(!t||typeof window>"u")return!1;try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}},K0=!1,Es={initialize(){!hI()||K0||!W0()||(SH(Es.notifyFromEvent),K0=!0,Yh()?.permission==="default"&&Es.requestPermission().catch(()=>{}))},destroy(){EH(),K0=!1},async requestPermission(){if(!hI()||!W0())return"denied";let t=Yh();if(!t)return"denied";if(t.permission!=="default")return t.permission;let e=t.requestPermission(),r=await Promise.resolve(e);try{Object.defineProperty(t,"permission",{configurable:!0,value:r})}catch{}return r},canShowNativeNotifications(){if(!hI()||!W0())return!1;let t=Yh();return!!(t&&t.permission==="granted")},notify(t){if(!hI()||!Es.canShowNativeNotifications()||t.notifyWhenVisible===!1&&pme()==="visible")return null;let e=Yh();if(!e)return null;let r=t.href??(t.caseTypeID&&(t.caseId||t.caseID)?gu.getSemanticURLForToaster(t.caseTypeID,t.caseId??t.caseID??""):void 0),n=AH(r)?r:void 0,o=t.title??t.label??t.caseTypeName??"Notification",i=t.body??t.caseId??t.caseID??t.caseTypeName??"",s=t.tag??t.caseId??t.caseID??t.caseTypeID??o,a=new e(o,{body:i,tag:s,icon:t.icon,silent:t.silent,requireInteraction:t.requireInteraction,data:{...t.data,href:n}});return a.addEventListener("click",()=>{Es.openNotificationTarget(n),a.close()}),a},async showNotification(t){let e=Yh();return e?.permission==="granted"?Es.notify(t):e?.permission==="denied"||await Es.requestPermission()!=="granted"?null:Es.notify(t)},openNotificationTarget(t){AH(t)&&(window.focus(),window.location.assign(t))},notifyFromEvent(t,e){let r={...e,title:e.title??t,body:e.assignmentID?`Assignment ${e.assignmentID} has been saved.`:e.body};Es.showNotification(r).catch(()=>{})}},yI=Es;var mme=()=>{$.publish(d.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})},CH={publishConstellationLoadedEvent:mme};var J0=class{activateContainerItemOnSwitch(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().activateContainerItem(o)}removeContainerItemOnClose(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=wt(r,e),o={target:r,containerItemID:n};ct({}).getPConnect().getContainerManager().removeContainerItem(o)}showCasePreview(e,r){let o=ct({meta:{type:"PreviewViewContainer",config:{name:d.PREVIEW}},options:{context:d.APP.APP,target:"root/hybrid_preview"}});o.getPConnect().getContainerManager().resetContainers({name:d.PRIMARY,context:d.APP.APP}),Ch(d.APP.APP,d.PREVIEW)||o.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:d.PREVIEW}),o.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:r})}closeCasePreview(){ct({}).getPConnect().getContainerManager().resetContainers({name:d.PREVIEW,context:d.APP.APP})}isFormDirty(e){let r=`${d.APP.APP}/${d.PRIMARY}`,n=JD(r,e);return rn.isStateModified(n)}getEventUtils(){return CH}getBroadcastUtils(){return Jd}isTraditionalUICase(e){return Dn(e)}},Zh=new J0;var Y0=class{static openCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.openCase(e,r,d.PRIMARY,n)}static createCase(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.createCase(e,r,d.PRIMARY,n)}static getNextWork(e=E.APP.APP,r={}){return r.renderInline=!0,r.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(r.pageName)),r.pageName=P.getDefaultQualifiedName(r.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),r.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),r?.disableAssignmentHeader?v.disableAssignmentHeader(r.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.getNextWork(e,d.PRIMARY,r)}static openAssignment(e,r=E.APP.APP,n={}){return n.renderInline=!0,n.pageName?(v.setDefaultCasePage(P.getDefaultQualifiedName(n.pageName)),n.pageName=P.getDefaultQualifiedName(n.pageName)):(v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),n.pageName=P.getDefaultQualifiedName(d.PY_DETAILS)),n?.disableAssignmentHeader?v.disableAssignmentHeader(n.disableAssignmentHeader):v.disableAssignmentHeader(!1),fn.openAssignment(e,r,d.PRIMARY,n)}static openPage(e,r,n=E.APP.APP,o={}){let i=Pr;o?.defaultCasePage?(v.setDefaultCasePage(P.getDefaultQualifiedName(o.defaultCasePage)),o.defaultCasePage=P.getDefaultQualifiedName(o.defaultCasePage)):v.setDefaultCasePage(P.getDefaultQualifiedName(d.PY_DETAILS)),o?.disableAssignmentHeader?v.disableAssignmentHeader(o.disableAssignmentHeader):v.disableAssignmentHeader(!1);let s={viewName:e,className:r,acTargetName:d.PRIMARY,actionMgrID:w.getNextActionMgrId(),context:n},{promise:a}=w.actionManagerPromise(i,s.actionMgrID);return T({type:i,payload:{...s}}),a}static getCurrentContextAPI(e,r=E.APP.APP){let n={meta:{config:{}},options:{context:r,pageReference:e,containerName:d.PRIMARY}};return ct(n).getPConnect()}},SI=Y0;var AI={};qt(AI,{buildResizeMessage:()=>_H,mashup:()=>EI});function fme(){try{let{ancestorOrigins:t}=globalThis.location;if(t&&t.length>0)return t[0]??""}catch{}return""}function Z0(t){if(!t||t==="*"||t==="null")return"";try{let e=new URL(t);return e.protocol!=="https:"&&e.protocol!=="http:"||e.origin==="null"?"":e.origin}catch{return""}}function _H(t){if(t.contentRect)return{height:t.contentRect.height};let e=Array.isArray(t.contentBoxSize)?t.contentBoxSize[0]:t.contentBoxSize;return"blockSize"in e?{height:e.blockSize}:"height"in e&&typeof e.height=="number"?{height:e.height}:{height:0}}var Q0=class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if(typeof globalThis.location>"u"||typeof globalThis.document>"u")return;let{resizing:r,parentOrigin:n}=e;this.gadgetName=globalThis.window.name,this.resize=r==="stretch",this.parentOrigin="",n?this.parentOrigin=Z0(n):globalThis.document.referrer?this.parentOrigin=Z0(globalThis.document.referrer):this.parentOrigin=Z0(fme());let o=globalThis.document.getElementsByTagName("app-root")[0];o&&(o.classList.add("mashup"),globalThis.window.parent!==globalThis.window&&this.resize&&this._registerResizeObserver(o))}send(e){if(typeof globalThis.window>"u"||typeof globalThis.location>"u")return;let{action:r,message:n}=e,o=JSON.stringify({gadgetName:this.gadgetName,action:r,message:n});globalThis.window.parent.postMessage(o,this.parentOrigin||globalThis.location.origin)}_registerResizeObserver(e){if(typeof globalThis.ResizeObserver!="function")return;new globalThis.ResizeObserver(n=>{for(let o of n){let i=_H(o);this.send({action:"resize",message:i})}}).observe(e)}_updateUrl(e){typeof globalThis.history>"u"||(globalThis.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:d.APP.ROOT,acName:"primary"}))}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin||typeof e.data!="string")return!1;let r;try{r=JSON.parse(e.data)}catch{return!1}return r.action==="UpdateUrl"&&this._updateUrl(r.message.url),!0}getMessageHandler(){return this.boundOnMessage}},EI=new Q0;typeof window<"u"&&window.addEventListener("message",EI.getMessageHandler(),!1);var IH={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},gme={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},hme="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",bH="portal-less-styles",X0=class{createC11nEnv=e=>ct(e);getContextUtils=()=>nu;getRoutingManager=()=>Hs;getComponentsRegistry=()=>Gs;getStateManager=()=>Se;getActionCreators=()=>rt;getStreamObservable=()=>GS;getActionProcessor=()=>ze;getActionHandler=()=>R_;renderApp=(e,r)=>{let n={context:d.APP.APP},i={...g.getIn(e,d.ROOT),options:n};hl(e),Gi(e,n,!0);let s=this.createC11nEnv({meta:i,isRoot:!0});$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:r})};updateStoreWithUiRoot=async(e,r,n)=>{let{data:o,uiResources:i={}}=e,{root:s}=i,a=g.getIn(i,d.CONTEXT_DATA),c=Le(e);await Pe(c,{},{},!1,!0);let l={...o,[d.CONTEXT_DATA]:a};BD(s,r,l,n)};fetchEndPointResource=(e,r,n)=>{k(e,{method:"GET"},d.APP.ROOT).then(o=>{o.status===200&&this.updateStoreWithUiRoot(o.data,r,n)})};loadComponent=async(e,r,n)=>{await fo(n);let o=this.createC11nEnv({meta:e,isRoot:!0});De()||hl({}),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:o,domContainerID:r})};setStaticServerUrl=(e,r,n)=>{Be.initServer(e,r,n)};loadView=async(e,r,n=[])=>{gt.init();let o=Le(e),i=g.getIn(o,d.VIEWS),s=g.getIn(o,d.NAVIGATIONS),a=g.getIn(o,d.COMPONENTS)||[];a.push(...n);let c=g.getIn(o,d.STATIC_SERVER_URL),l=g.getIn(o,d.APPLICATION_DATA);i&&hw(i),s&&yw(s),l9(l),c&&Be.initServer(c),await fo(a,c),this.renderApp(o,r)};initAppShell=(e,r,n)=>{Uh(e),Vt.buildActionTargetMap(r),gt.init(n)};initRoutingTable=(e,r)=>{Uh(e,!0),gt.init(r)};setAppAlias=e=>{Be.setAppAlias(e)};getHomeRestApi=e=>{let r=gt.getServerURL(),{restApi:n}=Tc("home",{portalName:e});return`${r}${n}`};getViewRestApi=(e,r)=>{let{restApi:n}=i9(e,r);return gt.getServerURL()+n};loadRootComponent=async(e,r,n=[],o,i,s)=>{let{config:a}=r||{},c=a?.name;if(De()||hl({}),s){let h=`${d.APP.ROOT}/${c}`;GD(h),h_().deleteContainerItem(h)}(h_().getContainerItems()||[]).length>1&&!c?.startsWith("hybrid_")&&c!=="authoring-preview"&&ps(),T(Re({data:{},context:d.APP.ROOT}));let u=this.createC11nEnv({meta:r,options:{context:d.APP.ROOT,pageReference:"",target:`${d.APP.ROOT}/${c}`}}),p=u.getPConnect(),m=`${p.getContextName()}/${p.getContainerName()}`;!se(m)&&a?.renderingMode!=="noPortal"&&p.getContainerManager().initializeContainers({type:"single"});let f=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await fo(f),$.publish(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:u,domContainerID:e,componentName:"RootContainer",portalTarget:o,styleSheetTarget:i})};loadViewByName=(e,r,n,o)=>{let i=this.getViewRestApi(e,n);i===gt.getServerURL()&&(i=this.getHomeRestApi(r)),this.fetchEndPointResource(i,o)};loadPortalView=(e,r)=>{let o=this.getHomeRestApi(e);this.fetchEndPointResource(o,r,!0)};configureForBrowserBookmark=e=>{a9(e)};checkIfSemanticURL=()=>Lh();onPCoreReady=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{$.subscribe(E.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Xr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{gt.setGoogleMapsAPIKey(e)};setFetchDefaultHeaders=e=>{Jn(e)};setFetchAuthInfo=e=>{Hi(e)};getCaseApi=()=>fn;getMashupApi=()=>SI;enableAppRouting=e=>{N_(e)};initStore=()=>hl({});getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then(o=>o.json())};getBootstrapConfigViaSB=async(e,r,n)=>{let o=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"",i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${o}`;return k(i,{method:"GET",headers:new Headers(r)}).then(s=>{if(s.data)return s.data;throw Error("D_pxBootstrapConfig load failed.",{cause:s.status})})};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,n=ct({meta:IH,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,r=!0)=>{if(r){let o=(document.querySelector(e)??document.getElementsByTagName(e)[0])?.parentNode;if(o&&!document.getElementById(bH)){let i=document.createElement("style");i.id=bH,i.textContent=hme,o.appendChild(i)}}await this.loadRootComponent(e,IH,[d.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&EI.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,r,n=[],o,i)=>{let{customRendering:s=!1,onPCoreReadyCallback:a,staticContentServerUrl:c,dynamicSetCookie:l=!1,renderingMode:u,locale:p,envType:m,themeID:f,customCookies:h=!1,enableRouting:S}=e,{restServerUrl:A,authInfo:C,authorizationHeader:I,appAlias:_,theme:N={}}=e,x=e.additionalHeaders?{...e.additionalHeaders}:{},H=e.extras?.defaultPortalName;H&&(x={...x,"X-Pega-Portal-Name":H});let G=null,re=!I&&C&&!C.authType;if(C||(e.authInfo={},C=e.authInfo),(I&&Object.keys(C).length===0||h&&!re&&!C.authType)&&(C.authType="custom"),C.customCookies=h,!I&&C.tokenInfo?.access_token){let{tokenInfo:he}=C;I=`${he.token_type} ${he.access_token}`}if(C.tokenInfo?.csrf&&(x={...x,pzCTkn:C.tokenInfo.csrf}),_&&_.indexOf("/")===-1&&(_=`app/${_}`),m==="LAUNCHPAD"){x={...x,"X-Constellation-App":"Pega"},A=A.endsWith("/dx")?A:`${A}/dx`;let he=f?`?themeID=${f}`:"";globalThis.PCore&&(G=await this.getLPConfig(`${A}/api/application/v2/environmentInfo${he}`,I,x,h)),Object.keys(N).length===0&&G?.theme?.definition&&(N=JSON.parse(G.theme.definition).Theme)}else re?G=await this.preInitBootstrapConfig(e,_,x,f):G=await this.getBootstrapConfigExtended(_?`${A}/${_}`:`${A}`,I,x,f,h,p);let j=G?.pyConfigJSON?JSON.parse(G.pyConfigJSON):{...G};m==="LAUNCHPAD"&&await this.applyEnvironmentInfoResponse(j),j.restServerConfig=A,j.dynamicSemanticUrl=!1,j.dynamicSetCookie=l,j.enableRouting=!1,j.serviceConfig?Object.assign(j.serviceConfig,{contextPath:"",appAlias:_}):j.serviceConfig={contextPath:"",appAlias:_,staticContentServer:c,appStaticContentServer:"no-appstatic"},j.additionalHeaders={Authorization:I,...x},j.envType=m,j.dynamicLoadComponents=!s,j.dynamicSemanticUrl=!s,j.noHistory=!0,j.theme=N??{};let ne=f&&j?.themeObject?j.themeObject:null;j.theme=ne||N,j.renderingMode=u??j.renderingMode,j.locale=p||j.locale,e.semanticUrlArgs&&(j.semanticUrlArgs=e.semanticUrlArgs);let be=c||j.serviceConfig.staticContentServer;if(j.isSdk?(j.enableRouting=S,j.dynamicSemanticUrl=j.enableRouting,j.environmentInfo||(j.environmentInfo={}),j.environmentInfo.pyExecutionRuntimeName=E.APP.SDK_RUNTIME,Be.initServer(c,"no-appstatic")):(j.serviceConfig.staticContentServer=be,j.serviceConfig.appStaticContentServer=j.serviceConfig.appStaticContentServer||"no-appstatic",Be.initServer(be,be)),j.renderingMode==="EMBED"&&C?.authentication_service&&C.authentication_service!=="pega"&&(j.routingInfo||(j.routingInfo={}),j.routingInfo.authServiceAlias=C.authentication_service),await op.initCoreConfig(j),a&&$.subscribe(E.PUB_SUB_EVENTS.EVENT_RENDER_APP,a,"renderAppCallback"),j.envType==="LAUNCHPAD"&&j.renderingMode==="EMBED"&&v.setIsWebEmbed(!0),C&&["OAuth2.0","custom"].includes(C?.authType)&&this.setFetchAuthInfo(C),!s){let he=v.environmentInfoObject?.pyInfinityStaticService,Me=null;if(he){let Ye=await Zt.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(Ye.data)&&Ye.data.length>0&&(Me=Ye.data)}let Fe=async(Ye,Oe)=>{try{let ft=async()=>{await this.importReactRoot(),Ye(!0)};$.subscribe("component-map-loaded",ft),"ReactRoot"in Gs.getLazyMap()&&Ye(!0)}catch(ft){Oe(ft)}};await new Promise(Fe),op.initCoreContainers(),await this.loadRootContainerWithHybrid(r,n,o,i),Me&&await Promise.all(Me.map(({pyComponentMap:Ye,pxUpdateDateTime:Oe})=>Be.importCustomComponentMap(Ye,Oe)))}};loadRootContainerWithHybrid=(e,r=[],n,o)=>(r.push(d.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",d.LOAD_VIEW_STRING),this.loadRootComponent(e,gme,r,n,o));getBootstrapConfigExtended=async(e,r,n,o,i,s)=>{let a={};o&&(a.themeID=o),s&&(a.locale=s);let c=o||s?`?dataViewParameters=${encodeURIComponent(JSON.stringify(a))}`:"",l=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${c}`,u=r?{Authorization:r,...n}:n;return fetch(l,{method:"GET",headers:new Headers(u),credentials:r&&!i?"same-origin":"include"}).then(p=>{if(p.ok)return p.json();throw Error("D_pxBootstrapConfig load failed.",{cause:p.status})})};getLPConfig=async(e,r,n,o)=>{let i=new Headers({...n,...r&&{Authorization:r}}),s=await fetch(e,{method:"GET",headers:i,credentials:r&&!o?"same-origin":"include"});if(!s.ok)throw new Error("environmentInfo load failed.",{cause:s.status});return s.json()};applyEnvironmentInfoResponse=async e=>{let{environmentInfo:r,pyCaseTypeList:n,theme:o,keyMapping:i}=e,{pxApplication:s,features:a,pxLocale:c}=r,l={simpleTable:{pageInstructionUUIDGeneration:!1},...a},u=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),p=u==="ETC/UNKNOWN"?"America/New_York":u;e.environmentInfo={...r,pxApplication:{...s},features:l,pyCaseTypeList:n,pxLocale:{...c,pyTimeZone:p}},e.timezone=p;let m=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every(S=>m.includes(S)),theme:o,keyMapping:i,features:l}};importReactRoot=async()=>{let e=[];return Gs.getComponent("ReactRoot").modules.forEach(r=>{e.push(r())}),Promise.allSettled(e)};preInitBootstrapConfig=async(e,r,n,o)=>{let{restServerUrl:i,customRendering:s=!1,staticContentServerUrl:a,dynamicSetCookie:c=!1,authInfo:l,renderingMode:u,locale:p,timezone:m="America/New_York",envType:f,theme:h={}}=e,S=o??null,A={restServerUrl:i,restServerConfig:i,dynamicSetCookie:c,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:r,staticContentServer:a,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:f,dynamicLoadComponents:!s,dynamicSemanticUrl:!s,noHistory:!0,themeIDObj:S,theme:S||h,renderingMode:u,locale:p,timezone:m,tokens:{C11NB2S:""}};return Be.initServer(a,"no-appstatic"),await op.init(A),l&&["OAuth2.0","custom"].includes(l?.authType)&&this.setFetchAuthInfo(l),this.getBootstrapConfigViaSB(r?`${i}/${r}`:`${i}`,n,o)}},Gr=new X0;var e$=class{appAlias;appAliasWithoutServlet;googleMapKey;staticContentServer;appStaticContentServer;contextPath;messagingService;reAuthUrl;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}},TH=e$;var t$=class{routingInfo;actionModel;additionalHeaders;tokens;semanticUrl;queryParams;noPortal;portalTemplate;timezone;noHistory;viewName;fieldDefaults;theme;restServerConfig;dynamicLoadComponents;dynamicSemanticUrl;enableRouting;locale;environmentInfo;isAnonymousUser;renderingMode;remoteCaseMapping;envType;serviceConfig;behaviorOverrides;initBroadcast;storePercentageAsDecimal;cookieComplianceMethod;isExtraCallRequiredForDefaultHome;enablePriorityAndUrgencyImprovements;portalType;collab;requestContext;pzencv1zzz;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.isAnonymousUser=e.isAnonymousUser??!1,this.renderingMode=e.renderingMode??"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping??{},this.envType=e.envType,this.serviceConfig=new TH(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}},vH=t$;var r$="@P .viewConfig",yme="@ROUTING_INFO",ip=0,n$=class{async init(e){let r=new vH(e);N_(r.enableRouting),hl({}),Xr.updateFieldDefaults(r.fieldDefaults),Xr.setFieldDefault("Percentage","storePercentageAsDecimal",r.storePercentageAsDecimal),this.#t(r.routingInfo,r.actionModel,{server:r.restServerConfig,reAuthUrl:r.serviceConfig.reAuthUrl});let{appAliasWithoutServlet:n,appAlias:o,googleMapKey:i,staticContentServer:s,appStaticContentServer:a}=r.serviceConfig;Be.setAppAlias(n||o),gt.setGoogleMapsAPIKey(i),Be.initServer(s,a,r.tokens.C11NB2S),ae.setRemoteCaseMapping(r.remoteCaseMapping),Ss.init(r.collab),Ss.subscribeToCaseEvents(),vc.subscribeToCaseEvents(),Tt.subscribeToCaseEvents(),Tt.setConnectionConfig({messagingService:r.serviceConfig.messagingService}),r.initBroadcast&&Zh.getBroadcastUtils().init();let c=this.#o(r.renderingMode);r.additionalHeaders=r.additionalHeaders||{},r.additionalHeaders[d.X_ORIGIN_CHANNEL]??=c,Ge.setDefaultHeaders(r.additionalHeaders),Ge.setRequestContext(r.requestContext),r.envType==="Infinity"&&await this.loadEnvironmentInfoFromDataPage(r);let l={...r.environmentInfo,isAnonymousUser:r.isAnonymousUser===!0,encCSRFToken:r.pzencv1zzz,renderingMode:r.renderingMode,...r.portalTemplate?{pyPortalTemplate:r.portalTemplate}:{}};l.pyCaseTypeList?.forEach(m=>{let f=m.pyWorkTypeImplementationClassName;f&&(m.localeReference=_i(An.CASE,f))}),this.#i(r,l.features?.isNamespaceEnabled),this.configureTheme(r.theme),v.setCookieComplianceMethod(r.cookieComplianceMethod),v.setIsExtraCallRequiredForDefaultHome(r.isExtraCallRequiredForDefaultHome),v.setEnablePriorityAndUrgencyImprovements(r.enablePriorityAndUrgencyImprovements),v.setEnvironmentInfo(l);let p=new URLSearchParams(globalThis.location?.search??"").get("lang")||r.locale||globalThis.navigator?.language||"en-US";v.setLocale(p),typeof document<"u"&&(document.documentElement.lang=p,document.documentElement.dir=H0(p)),Nr().setTimezone(r.timezone),pt.init(),r.envType!=="Infinity"&&hH.subscribeToGlobalEvents(),yI.initialize(),r.initBroadcast&&Zh.getBroadcastUtils().init(),await qd()}configureTheme=e=>{if(e){let r=e.light,n=e.dark;r!==void 0&&n!==void 0?(this.#n(r),this.#n(n,{type:"dark"})):v.setTheme(e)}};getBootstrapConfig=async(e,r)=>{let n=`${r.token_type} ${r.access_token}`,o=`${e}/api/application/v2/data_views/${P.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(o,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{let{containerType:r="single"}=e,o=ct({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return o.getPConnect().getContainerManager().initializeContainers({type:r,name:"primary",context:"app"}),{props:{getPConnect:o.getPConnect}}};importReactRoot=async()=>{let e=[];return Gr.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach(r=>{e.push(r())}),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,r,n)=>{try{X4(e)}catch(i){console.error("Design system load blocked: untrusted or malformed URL",i);return}let o=(i,s="true")=>new Promise((a,c)=>{if(typeof document>"u"){c(new Error("document is not available in this environment"));return}let l=document.createElement("script");l.type="text/javascript",l.src=i,l.async=s==="true",l.onload=()=>a(void 0),l.onerror=()=>c(new Error("Failed to load resource from Design System")),document.body.appendChild(l)});try{await o(`${e}component/project/${r}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(i){console.log(i)}};buildSemanticUrl=(e,r,n,o,i)=>{let s=new URLSearchParams(r),a=n==="true"&&!!e,c=new URLSearchParams(globalThis.location?.search??"").get("lang");c&&!s.has("lang")&&s.set("lang",c);let l=null,u=null,p=null;if(e){let S=(e.startsWith("/")?e.substring(1):e).split("/");l=S[0]||null,u=S[1]||null,S[2]==="assignments"&&S[3]&&(p=S[3])}let m=[o];l&&m.push(l),u&&m.push(u),p&&m.push("assignments",p),a&&(s.has("noPortal")||s.append("noPortal","true"),u&&i&&s.append("view",i));let f=s.toString();return m.join("/")+(f?`?${f}`:"")};initCoreConfig=async e=>{let{routingInfo:r,serviceConfig:n,semanticUrl:o,queryParams:i,noPortal:s,noHistory:a,viewName:c,theme:l,restServerConfig:u,dynamicLoadComponents:p=!0,dynamicSemanticUrl:m=!0,renderingMode:f="FULL_PORTAL",envType:h,extras:S}=e,{appAlias:A,contextPath:C}=n,I=globalThis.location,_=I?.origin??"",N=u??_,x={};if(C&&(N+=C),A&&h!=="LAUNCHPAD"&&(N+=`/${A}`),e.restServerConfig=N,this.#r(),m===!0){let ne=this.buildSemanticUrl(o,i,s,N,c);!a&&ne&&typeof globalThis.history<"u"&&globalThis.history.replaceState({},"home",ne)}else if(f!=="HYBRID"){let ne=I?.href??"",be=ne.indexOf("?");be>0&&typeof globalThis.history<"u"&&globalThis.history.pushState({},"home",ne.substring(0,be)),x.dynamicSemanticUrl=!1}else console.log(`renderingMode :${f}`);p!==!0&&(x.dynamicLoadComponents=!1);let H=null;if(A){let ne=A.indexOf("/app/");H=ne>=0?A.substring(ne+1):A}if((x.dynamicSemanticUrl===!1||x.dynamicLoadComponents===!1)&&PCore.setBehaviorOverrides(x),e.appAlias=H,l)if(typeof l=="object")e.theme=l;else try{e.theme=JSON.parse(l)}catch{e.theme={}}let re=I?`${I.protocol}//${I.host}`:r.domain;if(f==="EMBED")try{re=new URL(e.restServerConfig).origin}catch{}let j={...r,domain:re,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=j,e.initBroadcast=v.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence==="true",e.noPortal&&(e.noPortal==="true"||e.noPortal===!0)&&(e.renderingMode="EMBED"),S?.cspNonce&&Reflect.set(globalThis,"__webpack_nonce__",S.cspNonce),v.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,r,n,o,i,s,a,c,l=[])=>{ip+=1;let u=c||`mashup${ip}`,p={type:"RootContainer",config:{viewConfig:r$,renderingMode:"view",name:u}};await Gr.loadRootComponent(e,p,i,s,a),await this.loadCustomComponentLibrariesIfEnabled(l),Gr.loadViewByName(r,n,o,u)};launchView=(e,r,n=[],o,i,s,a)=>{ip+=1;let c;a==="hybrid"?c=`hybrid_${ip}`:a?c=a:c=`mashup${ip}`;let l={type:"RootContainer",config:{viewConfig:r$,renderingMode:"portal",name:c}};a===d.HYBRID&&al.setRuntimeParam(d.HYRBID_ROOT_CONTAINERNAME,c),al.setRuntimeParams(o),Gr.loadRootComponent(e,l,n,i,s).then(()=>Gr.updateStoreWithUiRoot(r,c,!1))};launchPortal=async(e,r,n=`portal${ip+=1}`,o=[],i=[])=>{let s="LoadingComponent",a={type:"RootContainer",config:{viewConfig:r$,renderingMode:"portal",skeleton:s,name:n}},c=[...o,s];v.isPortalLoaded=!0;try{return await Gr.loadRootComponent(e,a,c),await this.loadCustomComponentLibrariesIfEnabled(i),Gr.loadPortalView(r,n)}catch(l){throw console.error(`Failed to launch portal ${r}:`,l),l}};launchMashup=(e,r=!0,n=[])=>{let o={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:yme,name:"primary"}}]};if(r&&!document.getElementById("portal-less-styles")){let l=document.getElementsByTagName(e)[0]?.parentNode;if(l){let u=document.createElement("style");u.id="portal-less-styles",u.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",l.appendChild(u)}}(async()=>(await Gr.loadRootComponent(e,o,[d.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)))();let s=Reflect.get(globalThis,"parent"),a=Reflect.get(globalThis,"window");s&&s!==a&&import(`${Be.getStaticServerUrl()}constellation-mashup-bridge.js`).then(l=>{l.mashup.init({resizing:"stretch"})})};loadEnvironmentInfoFromDataPage=async e=>{if(e.portalType==="wss"&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){let r=e.environmentInfo.pyDataPages;setTimeout(()=>{this.loadDataPagesIntoEnvironmentInfo(r).catch(n=>{console.error("Error loading data pages into environment info:",n)})},d.PRIORITY.TRIVIAL)}};loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;let r=v.environmentInfoObject;if(!r)return;let n=e.filter(({pyName:a,pyPath:c})=>!a||!c?(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1):!0);if(n.length===0)return;let o=await Promise.allSettled(n.map(async({pyName:a,pyPath:c})=>{try{let l=await Zt.getPageDataAsync(a,"",{});return{pyPath:c,response:l}}catch(l){return console.error(`Failed to load data page ${a}:`,l),null}})),i=o.length,s=!1;for(let a=0;a<i;a+=1){let c=o[a];if(c.status==="fulfilled"&&c.value){let{pyPath:l,response:u}=c.value;this.setNestedProperty(r,l,u),s=!0}}s&&v.setEnvironmentInfo(r)};#e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,r,n){let o=r.startsWith(".")?r.slice(1):r;if(!o){typeof n=="object"&&n!==null&&Object.assign(e,n);return}let i=o.split("."),s=i.length,a=e;for(let c=0;c<s-1;c+=1){let l=i[c],u=a[l];if(this.#e(u))a=u;else{let p={};a[l]=p,a=p}}a[i[s-1]]=n}start=async(e,r)=>{let n=e.extras?.defaultPortalName;n&&(e.additionalHeaders={...e.additionalHeaders||{},"X-Pega-Portal-Name":n});let{serviceConfig:{appStaticContentServer:o},ccV2LibId:i,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:c}=e;await this.initCoreConfig(e);let l=v.environmentInfoObject?.pyC11nDXCBDevURL,u=a==="true"&&c!=="other",p=async()=>{await this.importReactRoot();let S=[];l?S.push(Be.importCustomComponentMap("")):i&&S.push(Be.importCustomComponentMap(i)),u&&S.push(this.importDesignSystemComponentMap(o,s,c)),S.length&&await Promise.all(S),r?.()},m=Gr.getComponentsRegistry();return"ReactRoot"in m.getLazyMap()?!0:m.getComponent("ReactRoot")?(await p(),!0):new Promise(S=>{let A=async()=>{await p(),$.unsubscribe("component-map-loaded","component-map-loaded-id"),S(!0)};$.subscribeOnce("component-map-loaded",A,"component-map-loaded-id")})};registerForDebugInfo=e=>{if(v.setPreviewMode(),!e)return;let r=({debugInfo:n})=>{let o=n?.["X-Pega-App-Debug-ID"];o&&e.postMessage({appDebugID:o})};$.subscribe("fetchSuccess",r,"fetchSuccess"),$.subscribe("fetchFailure",r,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",r=>{r?.data?.enableTracer?br.enableTracer():br.disableTracer()})};loadEnvironmentInfo=async e=>{let r=Reflect.get(globalThis,"pms"),n=typeof r=="object"&&r!==null?Reflect.get(r,"device"):void 0,o=typeof n=="object"&&n!==null&&Reflect.get(n,"systemName")==="Android";if(e.theme&&!o)try{let i=JSON.parse(e.theme.definition),s=i.Branding,a=i.Theme;v.setBrandingInfo(s),v.setTheme(a)}catch{v.setBrandingInfo({}),v.setTheme({})}if(e.darkTheme&&!o){let i={type:"dark"};try{let s=JSON.parse(e.darkTheme.definition);v.setBrandingInfo(s.Branding,i),v.setTheme(s.Theme,i)}catch{v.setBrandingInfo({},i),v.setTheme(void 0,i)}}e.keyMapping&&v.setKeyMapping(e.keyMapping),v.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&(v.environmentInfoObject?.pyInfinityStaticService||_t())&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){let r=e.map(n=>this.importSingleCustomComponent(n));await Promise.all(r)}importSingleCustomComponent(e){return typeof e=="object"&&"pyComponentMap"in e?Be.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):Be.importCustomComponentMap(e)}#t(e,r,n){Uh(e),Vt.buildActionTargetMap(r),gt.init(n)}#r(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach(r=>{r.setAttribute("href",r.href)})}#n(e,r){if(e===null)return;if(typeof e=="object"){v.setTheme(e,r);return}let n;try{n=JSON.parse(e)}catch{v.setTheme(r?.type==="dark"?void 0:{},r);return}v.setTheme(n,r)}#o(e){return e===d.EMBED?d.X_ORIGIN_CHANNEL_EMBEDDED_BROWSER:d.X_ORIGIN_CHANNEL_BROWSER}#i(e,r){r&&(e.additionalHeaders.Prefer="namespaced",Ge.setDefaultHeaders(e.additionalHeaders))}},Sme=new n$,op=Sme;var Eme="createViewRuleByID",Ame="getViewRuleByID",Cme="updateViewRuleByID",_me="deleteViewRuleByID",Ime="getCalculatedFieldsInViewByID",bme=(t,e)=>{let{restApi:r,reqType:n}=U(Eme);return k(r,{method:n,body:t},e).then(o=>o.data)},Tme=(t,e)=>{let{restApi:r,reqType:n}=U(Ame,{ID:t});return k(r,{method:n},e).then(o=>o.data)},vme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Cme,{ID:t});return k(n,{method:o,body:e},r).then(i=>i.data)},Rme=(t,e)=>{let{restApi:r,reqType:n}=U(_me,{ID:t});return k(r,{method:n},e).then(o=>o.data)},Pme=(t,e,r)=>{let{restApi:n,reqType:o}=U(Ime,{caseID:t,viewID:e});return k(n,{method:o,body:{calculations:{fields:r}}}).then(i=>i.data)},RH={createViewRule:bme,getViewRule:Tme,updateViewRule:vme,deleteViewRule:Rme,getCalculatedFields:Pme};var Nme="addCaseFollower",Ome="deleteCaseFollower",xme="getCaseFollowers",Dme={"Content-Type":"application/json"},wme=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({users:e.map(i=>({ID:i}))});return ve(Nme,{body:o,queryPayload:n,headers:Dme},r)},$me=(t,e,r)=>ve(Ome,{queryPayload:{caseID:t,followerID:e}},r),Mme=(t,e)=>ve(xme,{queryPayload:{caseID:t}},e).then(n=>n.data.followers),PH={addCaseFollower:wme,deleteCaseFollower:$me,getCaseFollowers:Mme};var kme="addRelatedCases",Lme="removeRelatedCase",Ume="getRelatedCases",jme=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({cases:e});return ve(kme,{body:o,queryPayload:n},r)},zme=(t,e,r)=>ve(Lme,{queryPayload:{caseID:t,relatedCaseID:e}},r),Fme=(t,e)=>ve(Ume,{queryPayload:{caseID:t}},e).then(n=>n.data.relatedCases),NH={addRelatedCases:jme,removeRelatedCase:zme,getRelatedCases:Fme};var o$="operatorDetails",Vme="operatorDetailsByBusinessID",Bme=(t,e=!1)=>{let{reqType:r}=U(o$,{});if(r==="GET"){let n={encodedOperatorId:encodeURIComponent(`{"opname":"${t}"}`)};return ve(o$,{queryPayload:n})}return e?ve(Vme,{body:{dataViewParameters:{BusinessID:t}}}):ve(o$,{body:{dataViewParameters:{ID:t}}})},OH={getOperatorDetails:Bme};var xH="postCustomFeedMessages",Hme="postFeedMessages",Gme="deleteFeedMessage",qme="getFeedMessages",Wme="likeFeedMessages",Kme="unlikeFeedMessages",Jme="getMentionSuggestions",Yme="getTagSuggestions",Zme="getFeedMessageLikes",Qme="editFeedMessage",Xme="getMentionTypes",efe="getViewRuleByMessageType",tfe="refreshCustomPostTypeView",sp={"Content-Type":"application/json"},i$=class{mentionsTagsCancelTokenSource;mentions;constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,r,n,o,i,s,a)=>{let c=s.getLocalizationService();a||(this.mentions=[]);let l="";o&&Array.isArray(o)&&o?.length>0&&(o.forEach(f=>{f.on&&(l=`${l}${f.id},`)}),l===""&&(l="ClearFilters"));let u="";a&&(u=s.getValue("pulse.pageLastEntry"));let p={filterForContext:r==="pyDataFeed"?encodeURIComponent(e):e,feedID:r,feedClass:n,filterBy:l,pageSize:10,olderThan:u};for(let f=0;f<i.length;f+=1)i[f].cancel();let m=hi();return i.push(m),ve(qme,{queryPayload:p,cancelTokenSource:m},s.getContextName()).then(async f=>{if(f.status===200&&f.data){i.pop();let h=[],S={},A=!1,C=[];if(f?.data){if(C=Array.isArray(f.data.data.MessageTypes)&&f.data.data.MessageTypes.length?f.data.data.MessageTypes:[],f?.data?.data?.FeedList){let I=f.data.data.FeedList?.pxResults;Array.isArray(I)&&I?.length>0&&I.forEach((_,N)=>{_.ID=_.pzInsKey!==""?_.pzInsKey:`message${N}`,h.push(_.ID),S[_.ID]=_,_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(x=>{x?.mentions&&Array.isArray(x?.mentions)&&x.mentions?.length>0&&this.mentions.push(...x.mentions)}),!A&&!["pzPostDetails","pzPrivatePostDetails"].includes(_.pyMessageViewReference)&&(A=!0)})}if(A&&await n_({uiResources:f.data.uiResources}),!o&&(o=[{id:"All",label:c.getLocalizedText("All"),on:!0,disabled:!1}],f?.data?.data?.FeedFilters)){let I=f.data.data.FeedFilters?.pxResults,_=!0;if(I&&Array.isArray(I)&&I?.length>0){I.forEach(x=>{let H={id:x.pyFeedSourceReference,label:c.getLocalizedText(x.pyLabel),disabled:!1,on:x.pySelected==="true"};H.on||(_=!1),o.push(H)});let N=o.find(x=>x.id==="All");N&&(N.on=_)}}}if(a&&s.getValue("pulse.messageIDs")){let I=s.getValue("pulse.messages");I={...I,...S},Object.values(I).forEach(_=>{_?.mentions&&Array.isArray(_?.mentions)&&_.mentions?.length>0&&this.mentions.push(_.mentions),_?.pxResults&&Array.isArray(_?.pxResults)&&_.pxResults?.length>0&&_.pxResults.forEach(N=>{N?.mentions&&Array.isArray(N?.mentions)&&N.mentions?.length>0&&this.mentions.push(...N.mentions)})})}if(VD(s.getContextName())){s.updateState({pulse:{messages:a&&s.getValue("pulse.messageIDs")?{...s.getValue("pulse.messages"),...S}:S,messageIDs:a&&s.getValue("pulse.messageIDs")?[...s.getValue("pulse.messageIDs"),...h]:h,nextPageFirstEntry:f?.data?.nextPageFirstEntry||"",pageLastEntry:f?.data?.pageLastEntry||"",postTypes:C,pulseContext:e}});let I=[...new Map(this.mentions.flat()?.map(_=>[_.mentionsID,_])).values()].filter(_=>Object.hasOwn(_,"mentionsType")).filter(_=>!_?.mentionsType?.toLowerCase().includes("user"));return{feedFilters:o,caseMentions:I}}}else return s.reportError(`getFeeds call failed ${f.status}`,f.data),f}).catch(f=>{if(!Sh(f))return s.reportError(": Error occurred during ajax call at getFeeds API : ",f.response),f.response})};postMessage=(e,r,n,o=[],i=!1,s=[])=>{let a={message:r,context:e,parentMessageId:i?e:"",attachments:o,pyRecipients:s.length?s:void 0},c=s.length===0?{body:JSON.stringify(a),headers:sp}:{body:JSON.stringify(a),queryPayload:{type:"PegaSocial-Post-Private"},headers:sp};return ve(s.length?xH:Hme,c,n.getContextName()).then(l=>{if((l.status===201||l.status===200)&&l.data){let u=l?.data;if(i){u.parentMessageID=e;let{pxResults:h,caseMentions:S}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:h}}}}),S}let{messages:p,messageIDs:m,caseMentions:f}=this.buildMessageObject(u,i,n,o.length>0);return n.updateState({pulse:{messages:p,messageIDs:m}}),f}return n.reportError(`postMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",l.response),l.response})};postCustomMessage=(e,r,n)=>ve(xH,{body:r,queryPayload:{type:e},headers:sp},n.getContextName()).then(async i=>{if(i.status===201&&i.data){let s=i.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};vh(s.messageViewReference,n,r.context)||await n_({uiResources:i.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 ${i.status}`,i),""}).catch(i=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",i.response),i.response});editMessage=({messageID:e,parentMessageID:r,message:n,pConnectObj:o,isReply:i=!1,recipients:s=[]})=>{let a=JSON.stringify({message:n,...s.length&&{pyRecipients:s}});return ve(Qme,{queryPayload:{messageID:e},body:a,headers:sp},o.getContextName()).then(l=>{if(l?.status===200&&l?.data){let u=l?.data;if(i){u.parentMessageID=r;let{pxResults:f,caseMentions:h}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:{[r]:{pxResults:f}}}}),h}let{messages:p,caseMentions:m}=this.buildMessageObject(u,i,o,!1);return o.updateState({pulse:{messages:p}}),m}return o.reportError(`editMessage call failed with status ${l.status}`,l),""}).catch(l=>{throw o.reportError(": Error occurred during ajax call at editMessage API : ",l.response),l.response})};buildMessageObject=(e,r,n,o=!1)=>{let i={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:o,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:typeof e?.isEdited=="string"?e?.isEdited==="true":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},s=n.getValue("pulse.messages");if(r){let{pxResults:c=[]}=Object.values(s)?.find(u=>u?.ID===i?.parentMessageID)||{},l=c?.findIndex(u=>u?.pzInsKey===i?.ID);if(l!==-1){let u=[...c];u[l]={...u[l],...i},c=u}else c=[...c,i];return{pxResults:c,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(c)}}let a=n.getValue("pulse.messageIDs");if(a){let c=a.includes(i.ID)?{...s[i.ID],...i}:i,l={...s,[i.ID]:c},u=a.includes(i.ID)?a:[i.ID,...a];return{messages:l,messageIDs:u,caseMentions:this.getCaseMentions(Object.values(l))}}};getCaseMentions=e=>{let r=e?.filter(n=>n?.mentions&&Array.isArray(n?.mentions)&&n.mentions?.length>0)?.map(n=>n.mentions)?.concat(this.mentions);return[...new Map(r.flat()?.map(n=>[n.mentionsID,n])).values()].filter(n=>Object.hasOwn(n,"mentionsType")).filter(n=>!n?.mentionsType?.toLowerCase().includes("user"))};likeMessage=({pulseContext:e,likedBy:r,messageID:n,isReply:o,pConnectObj:i})=>{let s=r?Kme:Wme,a=JSON.stringify({ContextClass:e});ve(s,{body:a,queryPayload:{pulseContext:e},headers:sp},i.getContextName()).then(l=>{if(l.status===200)if(o){let u=i.getValue(`pulse.messages.${n}`),p=u?.pxResults&&Array.isArray(u?.pxResults)&&u.pxResults?.length>0&&u.pxResults?.map(m=>{if(m={...m},m.pzInsKey===e){let f=0,h=!1,S=m.pyLikes?m?.pyLikes?.pxLikeCount:0;r?(f=S-1,h=!1):(f=S+1,h=!0),m.pyLikes={pxLikeCount:f,pxIsLiked:h}}return m});i.updateState({pulse:{messages:{[n]:{pxResults:p}}}})}else{let u={...i.getValue(`pulse.messages.${n}`)},p=u.pyLikes?u.pyLikes.pxLikeCount:0,m=0,f=!1;r?(m=p-1,f=!1):(m=p+1,f=!0),u.pyLikes={pxLikeCount:m,pxIsLiked:f},i.updateState({pulse:{messages:{[e]:u}}})}else i.reportError(`likeMessage call failed with status ${l.status}`,l)}).catch(l=>{i.reportError(": Error occurred during ajax call at likeMessage API : ",l.response.data)})};deleteMessage=(e,r,n,o)=>{let i=e;r&&(i=n),ve(Gme,{queryPayload:{messageID:i}},o.getContextName()).then(a=>{if(a.status===200)if(r){let c=o.getValue(`pulse.messages.${e}`),l=c?.pxResults&&Array.isArray(c?.pxResults)&&c.pxResults?.length>0&&c.pxResults?.filter(u=>u.pzInsKey!==n);o.updateState({pulse:{messages:{[e]:{pxResults:l}}}})}else{let c=o.getValue("pulse.messageIDs"),l=c&&Array.isArray(c)&&c?.length>0&&c?.filter(p=>p!==e),u={...o.getValue("pulse.messages")};delete u[e],o.updateState({pulse:{messageIDs:l,messages:u}})}else o.reportError(`deleteMessage call failed with status ${a.status}`,a)}).catch(a=>{o.reportError(": Error occurred during ajax call at deleteMessage API : ",a.response)})};getLikedUsers=(e,r)=>ve(Zme,{queryPayload:{messageID:e}},r.getContextName());getMentionSuggestions=(e,r)=>{let{pulseContext:n,searchFor:o,mentionsType:i,listSize:s=5}=e,a={pulseContext:n,searchFor:o,mentionsType:i,listSize:s};for(let l=0;l<this.mentionsTagsCancelTokenSource.length;l+=1)this.mentionsTagsCancelTokenSource[l].cancel();let c=hi();return this.mentionsTagsCancelTokenSource.push(c),ve(Jme,{queryPayload:a,cancelTokenSource:c},r.getContextName()).then(l=>(this.mentionsTagsCancelTokenSource=[],l.status===200&&l.data?l?.data:(r.reportError(`Get mention suggestions call failed ${l.status}`,l.data),[]))).catch(l=>{Sh(l)||r.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",l.response.data)})};getMentionTypes=e=>ve(Xme,{},e.getContextName());getPostTypeView=(e,r,n)=>ve(efe,{queryPayload:{type:e,contextID:n??""}},r.getContextName());refreshCustomPostTypeView=(e,r,n,o)=>ve(tfe,{body:r,queryPayload:{type:e,contextID:o??""},headers:sp},n.getContextName());getTagSuggestions=(e,r)=>{let{searchFor:n,listSize:o=5}=e,i={searchFor:n,listSize:o};for(let a=0;a<this.mentionsTagsCancelTokenSource.length;a+=1)this.mentionsTagsCancelTokenSource[a].cancel();let s=hi();return this.mentionsTagsCancelTokenSource.push(s),ve(Yme,{queryPayload:i,cancelTokenSource:s},r.getContextName()).then(a=>{this.mentionsTagsCancelTokenSource=[];let c=[];return a.status===200&&a?.data?c=a?.data?.tags&&Array.isArray(a?.data?.tags)&&a.data.tags.length>0&&a.data.tags?.map(l=>`#${l}`):r.reportError(`Get tag suggestions call failed ${a.status}`,a.data),c}).catch(a=>{Sh(a)||r.reportError(": Error occurred during ajax call at getTagSuggestions API : ",a.response.data)})}},DH=new i$;var rfe="addTagsToCase",nfe="deleteCaseTag",ofe="getCaseTags",ife=(t,e)=>{let r={caseID:t,viewID:P.getDefaultQualifiedName("pyTaggedCases")};return ve("loadView",{queryPayload:r},e.getContextName()).then(n=>n?.data).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",n.response)})},sfe=(t,e)=>ve(ofe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.tagsList).catch(n=>{e.reportError(": Error occurred during ajax call at fetchTags API : ",n.response)}),afe=(t,e,r)=>{let n={caseID:t},o=JSON.stringify({tags:e});return ve(rfe,{body:o,queryPayload:n},r.getContextName()).then(i=>i?.data?.results).catch(i=>{r.reportError(": Error occurred during ajax call at postTags API : ",i.response)})},cfe=(t,e,r)=>ve(nfe,{queryPayload:{caseID:t,tagID:e}},r.getContextName()).catch(o=>{r.reportError(": Error occurred during ajax call at removeTag API : ",o.response)}),lfe=t=>{let e=P.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return Zt.getPageDataAsync(e,t.getContextName(),{},{invalidateCache:!0}).catch(r=>{t.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",r.response)})},wH={getTaggedCases:ife,getTags:sfe,postTags:afe,removeTag:cfe,getTagsLandingPageURL:lfe};var CI=(t,e)=>{qD(e.getContextName(),t.etag),WD(e.getContextName(),t.etag)};var ufe="getAllParticipants",dfe="getParticipantRoles",pfe="getParticipantRoleView",mfe="getParticipant",ffe="createParticipant",gfe="updateParticipant",hfe="deleteParticipant",yfe=(t,e)=>ve(ufe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.data.content.pyParticipants).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipants API : ",n.response)}),Sfe=(t,e)=>ve(dfe,{queryPayload:{caseID:t}},e.getContextName()).then(n=>n?.data?.participant_roles).catch(n=>{e.reportError(": Error occurred during ajax call at getParticipantRoles API : ",n.response)}),Efe=(t,e,r)=>ve(mfe,{queryPayload:{caseID:t,participantID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at getParticipant API : ",o.response)}),Afe=async(t,e,r,n,o)=>{let i={caseID:t},s={...r,participantRoleID:e},a={"if-match":n.getCaseSummary().headers.etag};return new Promise((c,l)=>{ve(ffe,{body:s,queryPayload:i,headers:a},n.getContextName()).then(u=>{CI(u.headers,n),c()}).catch(u=>{u.response.data.errorDetails?.forEach(m=>{m.erroneousInputOutputFieldInPage=m.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let p=Oc(o||n.getContextName());n.reportError(": Error occurred during ajax call at createParticipant API : ",{...u.response.data,formFields:p},o),l(u.response)})})},Cfe=async(t,e,r,n,o)=>{let i={caseID:t,participantID:e},s={"if-match":n.getCaseSummary().headers.etag};return new Promise((a,c)=>{ve(gfe,{body:r,queryPayload:i,headers:s},n.getContextName()).then(l=>{CI(l.headers,n),a()}).catch(l=>{l.response.data.errorDetails?.forEach(p=>{p.erroneousInputOutputFieldInPage=p.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")});let u=Oc(o||n.getContextName());n.reportError(": Error occurred during ajax call at updateParticipant API : ",{...l.response.data,formFields:u},o),c(l.response)})})},_fe=(t,e,r)=>{let n={caseID:t,participantID:e},o={"if-match":r.getCaseSummary().headers.etag};return new Promise((i,s)=>{ve(hfe,{queryPayload:n,headers:o},r.getContextName()).then(a=>{CI(a.headers,r),i()}).catch(a=>{r.reportError(": Error occurred during ajax call at deleteParticipant API : ",a.response),s(a.response)})})},Ife=(t,e,r)=>ve(pfe,{queryPayload:{caseID:t,participant_roleID:e}},r.getContextName()).then(o=>o?.data).catch(o=>{r.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",o.response)}),$H={getParticipants:yfe,getRoleView:Ife,getParticipantRoles:Sfe,getParticipant:Efe,createParticipant:Afe,updateParticipant:Cfe,deleteParticipant:_fe};var bfe="createListPersonalization",Tfe="deleteListPersonalization",vfe="updateListPersonalization",Rfe="getUIListPersonalizations",_I=()=>Zs("getDataFromSRS");function s$(t=[]){return t.reduce((e,r)=>(e[r.personalizationID]={name:r.name,personalizationState:JSON.parse(r.personalizationState||"{}")},e),{})}var a$="create",c$="update",kH="delete";function Qh(t,e,r,n){let o=T_(e);if(o){switch(t){case a$:case c$:{let{markAsDefault:i,...s}=n;Object.entries(s).length>0&&(o.allPersonalizations[r]=s),i&&(o.defaultPersonalization=r);break}case kH:{delete o.allPersonalizations[r],o.defaultPersonalization===r&&(o.defaultPersonalization="");break}default:return null}return o}return null}function MH(t){return typeof t=="object"&&t!==null}function Pfe(t){if(!MH(t))return null;let e=t[P.getDefaultQualifiedName("ID")];if(typeof e!="string"||!e)return null;let r=t[P.getDefaultQualifiedName("PersonalizationState")],n=typeof r=="string"?r:JSON.stringify(r);try{let i=JSON.parse(n);if(!MH(i)||Array.isArray(i))return null}catch{return null}let o=t[P.getDefaultQualifiedName("Name")];return{personalization:{personalizationID:e,name:typeof o=="string"?o:"",personalizationState:n},isDefault:!!t[P.getDefaultQualifiedName("MarkAsDefault")]}}async function LH(t){let e=v.getOperatorIdentifier(),n=(await Zt.getDataAsync(P.getDefaultQualifiedName("InsightPersonalizationListByOperatorAndInsight"),void 0,{InsightID:t,UserID:e})).data;return(Array.isArray(n)?n:[]).reduce((i,s)=>{let a=Pfe(s);return a&&i.push(a),i},[])}async function Nfe(t){let e=await LH(t),r="",n=[];for(let o of e)o.isDefault&&(r=o.personalization.personalizationID),n.push(o.personalization);return{defaultPersonalization:r,allPersonalizations:n}}var Va={};async function Ofe(t,e,r){let n=P.getDefaultQualifiedName("InsightPersonalization"),i=(await ve("createWork",{body:{caseTypeID:n,content:{[P.getDefaultQualifiedName("InsightID")]:t,[P.getDefaultQualifiedName("Name")]:r.name??"",[P.getDefaultQualifiedName("MarkAsDefault")]:r.markAsDefault??!1,[P.getDefaultQualifiedName("PersonalizationState")]:JSON.stringify(r.personalizationState)},processID:P.getDefaultQualifiedName("pyStartCase")},queryPayload:{viewType:"none",caseClassName:n}})).data?.ID??e;return Va[e]=i,i}async function UH(t,e){let r=P.getDefaultQualifiedName("Edit"),{restApi:n,reqType:o}=U("caseWideActions",{caseID:t,actionID:r}),s=(await k(`${n}?viewType=form`,{method:o}))?.headers?.etag;if(!s)throw new Error(`Missing etag for personalization case ${t}`);let a={};e.markAsDefault!==void 0&&(a[P.getDefaultQualifiedName("MarkAsDefault")]=e.markAsDefault),e.name!==void 0&&(a[P.getDefaultQualifiedName("Name")]=e.name),e.personalizationState!==void 0&&(a[P.getDefaultQualifiedName("PersonalizationState")]=JSON.stringify(e.personalizationState));let{restApi:c,reqType:l}=U("executeCaseWideActions",{caseID:t,actionID:r});await k(`${c}?viewType=form`,{method:l,headers:{"if-match":s},body:{content:a,pageInstructions:[]}})}async function jH(t,e){await(await LH(t)).filter(({isDefault:o,personalization:i})=>o&&i.personalizationID!==e).reduce((o,{personalization:i})=>o.then(()=>UH(i.personalizationID,{markAsDefault:!1})),Promise.resolve())}async function xfe(t){let e=P.getDefaultQualifiedName("MarkAsInactive"),{restApi:r,reqType:n}=U("caseWideActions",{caseID:t,actionID:e}),i=(await k(`${r}?viewType=form`,{method:n}))?.headers?.etag;if(!i)throw new Error(`Missing etag for personalization case ${t}`);let{restApi:s,reqType:a}=U("executeCaseWideActions",{caseID:t,actionID:e});await k(`${s}?viewType=form`,{method:a,headers:{"if-match":i},body:{content:{[P.getDefaultQualifiedName("ReasonForStatusUpdate")]:Nr().getLocaleValue("Insight Personalization delete")},pageInstructions:[]}})}var Dfe=async t=>{if(_I()){let o=await Nfe(t);return Array.isArray(o.allPersonalizations)&&(o.allPersonalizations=s$(o.allPersonalizations)),o}let e=T_(t);if(e)return Array.isArray(e.allPersonalizations)&&(e.allPersonalizations=s$(e.allPersonalizations)),Promise.resolve(e);let{restApi:r,reqType:n}=U(Rfe,{listID:t});return k(r,{method:n,body:{}}).then(o=>{let{data:i}=o;return{allPersonalizations:s$(i.allPersonalizations),defaultPersonalization:i.defaultPersonalization}})},wfe=async(t,e,r)=>{if(_I()){let i=await Ofe(t,e,r);return Qh(a$,t,e,r),r.markAsDefault&&await jH(t,i),{data:i}}let{restApi:n,reqType:o}=U(bfe,{listID:t});return Qh(a$,t,e,r),k(n,{method:o,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}}).then(i=>{let s=i.data;return Va[e]=s,i})},$fe=async(t,e,r)=>{let n=Va[e]||e;if(_I()){await UH(n,r),Qh(c$,t,e,r),r.markAsDefault&&await jH(t,n);return}Qh(c$,t,e,r);let{restApi:o,reqType:i}=U(vfe,{listID:t,personalizationID:n})||{};return k(o,{method:i,body:{...r,personalizationState:JSON.stringify(r.personalizationState)}})},Mfe=async(t,e)=>{let r=Va[e]||e;if(Qh(kH,t,e),_I()){await xfe(r),Va[e]&&delete Va[e];return}let{restApi:n,reqType:o}=U(Tfe,{listID:t,personalizationID:r});return k(n,{method:o,body:{}}).then(i=>(Va[e]&&delete Va[e],i))};function kfe(t){return t?{createPersonalization:wfe.bind(null,t),updatePersonalization:$fe.bind(null,t),deletePersonalization:Mfe.bind(null,t),fetchPersonalizations:Dfe.bind(null,t)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}}var zH=kfe;var Dr=typeof window<"u"?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},FH="getDataObjects",Lfe="getDataPageObjects",Ufe="getDataPages",jfe="getListData",zfe="getInsightIDs",HH="getInsightByID",Ffe="getClassResources",Vfe="createInsight",Bfe="deleteInsight",Hfe="exportToExcel",Gfe="exportToCSV",qfe="scheduleInsight",Wfe="updateScheduledInsight",Kfe="deleteScheduledInsight",Jfe="translateStrings",Yfe="updateInsight",Zfe=["LocalList","RemoteList","PromptList","DataPage"],ap=null;function Qfe(t=!0){if(ap)return ap;let e=or.getAppCacheKey(Lfe);if(t&&Dr.getItem(e))return Promise.resolve(JSON.parse(`${Dr.getItem(e)}`));let r={datapageRequestType:"explorable"},{restApi:n,reqType:o}=U(Ufe,r);return ap=k(n,{method:o,datapageRequestType:"explorable"}),ap.then(i=>{ap=null,Dr.setItem(e,JSON.stringify(i))}),ap}function Xfe(){let t=or.getAppCacheKey(FH);if(Dr.getItem(t))return Promise.resolve(JSON.parse(`${Dr.getItem(t)}`));let{restApi:e,reqType:r}=U(FH,{}),n=k(e,{method:r});return n.then(o=>{Dr.setItem(t,JSON.stringify(o))}),n}var VH=[],ege=async t=>{let e=t.filter(i=>!VH.includes(i));if(e.length===0)return;let r={classIDs:t.join(",")},{restApi:n,reqType:o}=U(Ffe,r);return k(n,{method:o}).then(i=>{i.data.resources&&(VH.push(...e),HS(i.data.resources))})};function tge(t){let e=or.getAppCacheKey(`DefaultColumns_${Object.values(t).join("_")}`);if(Dr.getItem(e))return Promise.resolve(JSON.parse(`${Dr.getItem(e)}`));let r={dataViewName:P.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:n,reqType:o}=U(jfe,r),i=k(n,{method:o,body:{dataViewParameters:t}});return i.then(s=>{Dr.setItem(e,JSON.stringify(s))}),i}function rge(t){return"type"in t&&"classID"in t}function nge(t){let e=Ur(t);if(e&&e.classID){let r=Aw(e.classID),n=e.rdFields,o=(n&&!Array.isArray(n)?n.fields:void 0)?.filter(i=>i.indexOf(".")>0);if(o&&!g.isEmpty(o)){let i=o.reduce((s,a)=>{let c=b_(a,e.classID);return c&&rge(c)&&(s[a]=c),s},{});r={...r,...i}}if(r&&Object.keys(r).length>0){for(let i of Object.keys(r))r[i].type.startsWith("Page")?delete r[i]:r[i]?.datasource&&Zfe.includes(r[i].datasource.tableType)&&(r[i].fieldType="Picklist");return{sourceFields:r,sourceMetadata:e}}}return{}}function oge(t,e,r){if(!e){let i=Ur(t),s=Array.isArray(i?.rdFields)?i?.rdFields:i?.rdFields?.fields;return s?Promise.resolve({data:{data:s.map(a=>({pyFieldName:a}))}}):Promise.resolve({data:{data:[]}})}let n=or.getAppCacheKey(`RDColumns-${t}`);if(Dr.getItem(n))return Promise.resolve(JSON.parse(`${Dr.getItem(n)}`));let o=or.getData(P.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:t}},r);return o.then(i=>{Dr.setItem(n,JSON.stringify(i))}),o}function ige(t="",e=""){let r=or.getAppCacheKey(`PFColumns-${t}${e}`);if(Dr.getItem(r))return Promise.resolve(JSON.parse(`${Dr.getItem(r)}`));let n=or.getData(P.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:t,ClassName:e}});return n.then(o=>{Dr.setItem(r,JSON.stringify(o))}),n}var l$={},u$=t=>or.getAppCacheKey(`PrimaryFields-${t}`),sge=async(t,e,r,n,o)=>{let i=or.getData(P.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...e&&{topLevelClassID:e},...n&&{joinedClassIDs:n.join(",")},...r&&{topLevelDataPageID:r}}},o).then(s=>{let a=s.data?.data||[],c={};t.forEach(l=>{c[l]=[]}),a.forEach(l=>{let u=l.classID,p=l[P.getDefaultQualifiedName("pyFieldName")];c[u].push(p)}),Object.entries(c).forEach(([l,u])=>{let p=u$(l);Dr.setItem(p,JSON.stringify(u))})}).finally(()=>{t.forEach(s=>{delete l$[s]})});return t.forEach(s=>{l$[s]=i}),i};function age(t,e){let r=[],n=[],o=!1,i=[],s=[];return t&&s.push(t),e&&e.length>0&&s.push(...e),s.forEach(a=>{let c=u$(a);if(Dr.getItem(c))return;let l=l$[a];if(l){n.push(l);return}r.push(a),a===t?o=!0:i.push(a)}),{allClasses:s,promisesToAwait:n,classesToFetch:r,isTopLevelClassPresent:o,joinedClassesToFetch:i}}async function cge(t,e,r,n){let{allClasses:o,promisesToAwait:i,classesToFetch:s,isTopLevelClassPresent:a,joinedClassesToFetch:c}=age(t,r);return s.length&&i.push(sge(s,a?t:void 0,a?e:void 0,c.length>0?c:void 0,n)),Promise.allSettled(i).then(()=>{let l={};return o.forEach(u=>{let p=u$(u);if(Dr.getItem(p))try{l[u]=JSON.parse(`${Dr.getItem(p)}`)}catch{}}),{data:l}})}function lge(t){let e;return t[1].category?e=t[1].category:t[0].indexOf(":")>0&&(e=t[0].substring(0,t[0].indexOf(":"))),e}function GH(t){return typeof t=="object"&&t!==null}function uge(t){return GH(t)&&typeof t.classID=="string"&&Array.isArray(t.fields)}function dge(t){return{...t[1],fieldID:t[0],fieldType:t[1].fieldType||(t[1].isUserReference?"User reference":void 0),category:lge(t),classID:t[1].associationClassID?t[1].associationClassID:t[1].classID}}function BH({data:t}){let e=(i,s)=>_i("FIELD",i,s),r=typeof t.classID=="string"?t.classID:"",n=_i("CASE",r);t.classNameLocaleReference=n;let o=Array.isArray(t.fields)?t.fields:[];for(let i=0;i<o.length;i+=1){let s=o[i];if(GH(s)){let a={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},c=s.definedOnClassIDs;if(typeof c=="string"){let l=c.split(":").reverse(),p=(typeof s.fieldID=="string"?s.fieldID:"").split("!").pop()?.split(":").reverse()||[];l[0]&&p[0]&&(a.nameLocaleReference=e(p[0],l[0])),l[1]&&p[1]&&(a.categoryLocaleReference=e(p[1],l[1])),l[2]&&p[2]?a.parentCategoryLocaleReference=e(p[2],l[2]):s.parentCategory&&(a.parentCategoryLocaleReference=n)}Object.assign(s,a)}}return{data:t}}function pge(t,e,r){if(!e){let{sourceMetadata:o,sourceFields:i}=nge(t);if(o&&i&&Object.keys(i).length>0){let s={...o,fields:Object.entries(i).map(dge)};if(uge(s)){let a=BH({data:s});return Promise.resolve(a)}}}let n={dataSource:t,columns:[],parameters:{},associationFilter:r,matchPosition:"",ignoreCase:!1};return Ao.init(n).then(({dataSourceMetaData:o})=>o?BH({data:o}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}})}function mge(){let{restApi:t,reqType:e}=U(zfe);return k(t,{method:e})}function fge(t){let e=Ew(t);if(e)return Promise.resolve({data:{pyInsights:[e]}});let r={insightID:t},{restApi:n,reqType:o}=U(HH,r);return k(n,{method:o})}function gge(t){let e={insightID:t.join(",")},{restApi:r,reqType:n}=U(HH,e);return k(r,{method:n})}function hge(t){let{restApi:e,reqType:r}=U(Vfe);return k(e,{method:r,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function yge(t,e){let r={insightID:t},{restApi:n,reqType:o}=U(Yfe,r),i;return"UpdateDateTime"in e&&(i=e.UpdateDateTime),k(n,{method:o,body:JSON.stringify(e),headers:{"if-match":i,"Content-Type":"application/json"}})}function Sge(t){let e={insightID:t},{restApi:r,reqType:n}=U(Bfe,e);return k(r,{method:n})}function Ege(t){let{restApi:e,reqType:r}=U(Hfe);return k(e,{method:r,body:JSON.stringify(t)})}function Age(t){let{restApi:e,reqType:r}=U(Gfe);return k(e,{method:r,body:JSON.stringify(t)})}var Cge=(t,e)=>{let r={insightID:t},{restApi:n,reqType:o}=U(qfe,r);return k(n,{method:o,body:JSON.stringify(e)})},_ge=(t,e,r)=>{let n={insightID:t,scheduleID:e},{restApi:o,reqType:i}=U(Wfe,n);return k(o,{method:i,body:JSON.stringify(r)})},Ige=(t,e)=>{let r={insightID:t,scheduleID:e},{restApi:n,reqType:o}=U(Kfe,r);return k(n,{method:o})};function bge(t){let{restApi:e,reqType:r}=U(Jfe);return k(e,{method:r,body:JSON.stringify(t)})}var qH={getDataObjects:Xfe,getDataPageObjects:Qfe,getDataViewMetadata:pge,getDefaultColumns:tge,getFieldsForDataSource:oge,getPrimaryFieldsForDataSource:ige,getPrimaryFieldsForInsights:cge,getInsightIDs:mge,getInsightByID:fge,getInsightsByID:gge,loadClassResources:ege,createInsight:hge,updateInsight:yge,deleteInsight:Sge,exportToExcel:Ege,exportToCSV:Age,scheduleInsight:Cge,updateScheduledInsight:_ge,deleteScheduledInsight:Ige,translateStrings:bge};var d$=class{addRoutes=e=>c9(e)},WH=new d$;var p$=class{static registerModule(e,r,n){Object.assign(n,{[e]:()=>r})}},KH=p$;var m$=class{static getPostActionEvent=()=>E.PUB_SUB_EVENTS.EVENT_POST_ACTION;static getCaseEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze(E.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)},JH=m$;var f$=class{genericFailedMessage;constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},YH=new f$;var Tge=t=>{Hi({tokenInfo:t}),t?.csrf&&!t?.access_token?Jn({pzCTkn:t?.csrf}):Jn({Authorization:`${t?.token_type} ${t?.access_token}`}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},vge=t=>US.init(t),Rge=async()=>sU(),Pge=t=>{Jn({Authorization:t}),setTimeout(()=>$.publish("updateSession",{updateStatus:"success"}),0)},ZH={setTokens:Tge,revokeTokens:Rge,getAuthInstance:vge,setAuthorizationHeader:Pge};var b$={};qt(b$,{SDK_VERSION:()=>I$,compareSdkPCoreVersions:()=>uhe,createCustomEvent:()=>vhe,dateFormatInfoDefault:()=>iG,filterForFieldValueList:()=>She,getAllFields:()=>yhe,getAutoFlexClass:()=>Ihe,getBooleanValue:()=>ihe,getCurrentTimezone:()=>ahe,getDateFormatInfo:()=>che,getFilteredStages:()=>Che,getInitials:()=>she,getInstructions:()=>Ehe,getIsAssignmentView:()=>aG,getLocale:()=>sG,getOptionList:()=>ghe,getReferenceList:()=>lhe,getSDKAssignmentUtils:()=>Rhe,getSDKCaseUtils:()=>Phe,getSDKContainerUtils:()=>Nhe,getSDKDashboardUtils:()=>Ohe,getSdkVersion:()=>dhe,getUniqueControlID:()=>nhe,getVBodyClass:()=>_he,handleEvent:()=>hhe,initPConnectField:()=>Ahe,isLastStep:()=>bhe,resetControlID:()=>ohe,resolveContext:()=>The,setVisibilityForList:()=>_$});var g$={};qt(g$,{findCurrentIndices:()=>XH,flattenSteps:()=>QH,getAssignmentValidationMessages:()=>wge,getRefreshProps:()=>eG,handleAssignmentButtonPress:()=>$ge,handleSaveActionSuccess:()=>tG,hasNavigation:()=>Nge,isVerticalNavigation:()=>Oge,parseActionButtons:()=>Dge,registerRefresh:()=>xge});function QH(t,e=[]){for(let r of t)r.steps?QH(r.steps,e):e.push(r);return e}function XH(t,e,r){let n=0;for(let o of t)o.visited_status==="current"?(e[r]=n,o.step_status=""):o.visited_status==="success"?(n+=1,o.step_status="completed"):(n+=1,o.step_status=""),o.steps&&XH(o.steps,e,r+1);return e}function Nge(t){if(!t)return!1;let e=t.template?.toLowerCase()==="standard",r=t.steps?.length===1;return!e&&!r}function Oge(t){return t?.template?.toLowerCase()==="vertical"}function eG(t){return t?t.filter(e=>e.event==="Changes"&&e.field).map(e=>[e.field,e.field?.substring(1)??""]):[]}function xge(t){let e=t.getCaseInfo().getActionRefreshConditions?.(),r=t.getContextName(),n=t.getPageReference();PCore.getRefreshManager().deRegisterForRefresh(r);let o=eG(e);if(o.length===0)return;let i=t.getCaseInfo().getKey(),s={autoDetectRefresh:!0,preserveClientChanges:!1},a=PCore.getRefreshManager();for(let c of o)a.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),i,"",n,{...s,refreshFor:c[0]}),`${n}.${c[1]}`,`${r}/${n}`,r)}function Dge(t){return{main:t?.main??[],secondary:t?.secondary??[]}}function wge(t,e){try{return PCore.getMessageManager().getValidationErrorMessages(t,e)??[]}catch{return[]}}function tG(t,e,r){t.cancelAssignment(e,!1).then(()=>{PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,r)})}function $ge(t){let{sAction:e,sButtonType:r,itemKey:n,isInModal:o,getPConnect:i,actionsApi:s,localizedVal:a,localeCategory:c,showToast:l}=t;if(r==="secondary")switch(e){case"navigateToStep":{s.navigateToStep("previous",n).then(()=>{}).catch(()=>{l(a("Navigation failed!",c))});break}case"saveAssignment":{let u=i(),p=u.getCaseInfo().getKey(),m=u.getCaseInfo().getAssignmentID();s.saveAssignment?.(n)?.then(()=>{let f=u.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);tG(s,n,{caseType:f,caseID:p,assignmentID:m})})?.catch(()=>{l(a("Save failed",c))});break}case"cancelAssignment":{let{PUB_SUB_EVENTS:u}=PCore.getConstants(),{publish:p}=PCore.getPubSubUtils(),m=i(),f=m.getCaseInfo().isAssignmentInCreateStage(),h=m.getCaseInfo().isLocalAction()||!!(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION&&m.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));f&&o&&!h?s.cancelCreateStageAssignment(n).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))}):s.cancelAssignment(n,!1).then(S=>{p(u.EVENT_CANCEL,S)}).catch(()=>{l(a("Cancel failed!",c))});break}case"rejectCase":{s.rejectCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Rejection failed!",c))});break}default:break}else if(r==="primary")switch(e){case"finishAssignment":{s.finishAssignment(n).then(()=>{}).catch(()=>{l(a("Submit failed!",c))});break}case"approveCase":{s.approveCase?.(n)?.then(()=>{})?.catch(()=>{l(a("Approve failed!",c))});break}default:break}}var h$={};qt(h$,{extractTabsInfo:()=>Lge,filterSummaryFields:()=>Mge,getChildRegionByName:()=>kge,openCaseEditAction:()=>jge,resolveCaseTypeIcon:()=>Uge});function Mge(t){let e=t().getRawMetadata(),r=e.children?.[0],n=e.children?.[1],o=r?.children??[],i=n?.children??[],s=o.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent"),a=i.filter(c=>t().resolveConfigProps(c.config).visibility!==!1&&c.type!=="TextContent");return[s,a]}function kge(t,e){for(let r of t){let n=r.props?.getPConnect?.();if(n){let o=n.getRawMetadata?.();if(o?.type?.toLowerCase()==="region"&&o?.name?.toLowerCase()===e.toLowerCase())return r}}return null}function Lge(t){let e=[],r=[],n=t?.props?.getPConnect?.()?.getChildren?.();return n?(n.forEach((o,i)=>{let s=o.getPConnect().getConfigProps(),{label:a}=s,{inheritedProps:c,visibility:l}=s;if(!a&&c){let u=c.find(p=>p.prop==="label");u&&(a=u.value)}(l===void 0||l===!0)&&(e.push({name:a??"",id:i}),r.push({type:"DeferLoad",config:s}))}),{vertTabInfo:e,deferLoadInfo:r}):{vertTabInfo:e,deferLoadInfo:r}}function Uge(t,e){let r=t?t.replace("pi pi-",""):e;return!r||r.includes(".")?"polaris-solid":r}function jge(t,e){let r=t.getActionsApi();r.openLocalAction.bind(r)(e.ID,{...e,containerName:"modal",type:"express"})}var E$={};qt(E$,{addContainerItem:()=>Vge,addFlowContainerItem:()=>Hge,configureBrowserBookmark:()=>Bge,getActiveCaseActionName:()=>rG,getFirstCaseActionName:()=>Yge,getToDoAssignments:()=>Jge,getTodoVisibility:()=>S$,hasContainerItems:()=>Gge,isCaseWideLocalAction:()=>y$,isContainerInitialized:()=>zge,isRenderWithToDoWrapper:()=>Zge,setContainerLimit:()=>Fge,showBanner:()=>Kge});function zge(t){let e=t.getContextName(),r=t.getContainerName();return PCore.getContainerUtils().isContainerInitialized(e,r)??!1}function Fge(t,e,r,n){let{CONTAINER_TYPE:o}=PCore.getConstants();if(r===o.MULTIPLE&&n){let i=t.getContextName();PCore.getContainerUtils().setContainerLimit(`${i}/${e}`,n)}}function Vge(t){let e=t.getContainerManager(),r=t.getContextName();e.addContainerItem({context:r,semanticURL:""})}function Bge(t){let e=p=>p,r=t.getContextName(),n=t.getContainerName(),o=PCore.getEnvironmentInfo(),{APP:i}=PCore.getConstants(),s=t.getValue(`pyPortal.${e("pyPrimaryNavPages")}`),a="",c="",l="",u=o?.environmentInfoObject?.pyExecutionRuntimeName===i.INFINITY_RUNTIME;if(Array.isArray(s)&&s.length>0){let p=s[0],m=p.NavigationPages?.[0];u?m?.[e("pyRuleName")]?(a=m[e("pyRuleName")],c=m[e("pyClassName")]??""):p?.[e("pyRuleName")]?(a=p[e("pyRuleName")],c=p[e("pyClassName")]??""):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")]):m?.[e("pyLabel")]?l=m[e("pyLabel")]:p?.[e("pyLabel")]&&(l=p[e("pyLabel")])}try{PCore.configureForBrowserBookmark({context:r,containerName:n,acName:n,semanticURL:"",defaultViewLabel:l,ruleName:a,className:c})}catch{}}function Hge(t){let e=t.getContainerManager(),r=t.getContextName(),n=t.getValue("context_data.caseViewMode"),o,i;if(n!=="review"){let s=r.substring(0,r.lastIndexOf("_")),a=PCore.getContainerUtils().getActiveContainerItemName(s),c=PCore.getContainerUtils().getContainerItemData(s,a);c&&({key:o,flowName:i}=c)}e.addContainerItem({semanticURL:"",key:o,flowName:i,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:t.getDataObject(r)})}function Gge(t){let e=t.getContextName(),r=t.getContainerName();return!!PCore.getContainerUtils().hasContainerItems(`${e}/${r}`)}function cp(){return PCore.getConstants().CASE_INFO}function rG(t){let e=cp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ACTIVE_ACTION_ID);return r?.find(i=>i.ID===n)?.name??""}function y$(t){let e=cp(),r=t.getValue(e.ACTIVE_ACTION_ID),n=t.getValue(e.CASE_INFO_ACTIONS);return n&&r?n.find(i=>i.ID===r)?.type==="Case":!1}function nG(t){let e=cp(),r=t.getValue(e.CHILD_ASSIGNMENTS),n=[];if(r&&r.length>0){for(let{assignments:o,Name:i}of r)if(o)for(let s of o)n.push({...s,caseName:i})}return n}function qge(t){return!!t.getValue("caseMessages")}function Wge(t){let e=cp(),r=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS),n=nG(t);return!!(r||n.length>0||y$(t))}function Kge(t){let e=t();return qge(e)||!Wge(e)}function S$(t){return t.getValue("context_data.caseViewMode")!=="perform"}function Jge(t){let e=cp(),r=t.getValue(e.CASE_INFO_ACTIONS),n=t.getValue(e.ASSIGNMENT_LABEL),o=t.getValue(e.D_CASE_ASSIGNMENTS_RESULTS)??[],s=nG(t).map(c=>({...c,isChild:!0})),a=[...o,...s];if(r&&!S$(t)){let c=rG(t);return a.map(l=>({...l,name:c||n}))}return a}function Yge(t){let e=cp();return t.getValue(e.CASE_INFO_ACTIONS)?.[0]?.name??""}function Zge(t,e){let r=t(),{showWithToDo:n}=e;return!!(n&&(!y$(r)||S$(r)))}var A$={};qt(A$,{combineFilters:()=>Qge,convertDateToGMT:()=>Xge,createFilter:()=>oG,getFilterExpression:()=>the,getFormattedDate:()=>ehe,getLayoutDataFromRegion:()=>rhe});function oG(t,e,r="EQ"){return{condition:{lhs:{field:e},comparator:r,rhs:{value:t}}}}function Qge(t,e){return t&&t.length?e?{AND:[e,...t]}:t.length>1?{AND:[...t]}:t[0]:e}function Xge(t){let{valueAsISOString:e}=t;return e?e.substring(0,e.indexOf("T")):void 0}function ehe(t){if(t)return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}function the(t,e,r){if(t==="")return null;let n="EQ";return r.type==="TextInput"&&!r.isNumber&&(n="CONTAINS"),r.config.filterType==="RelativeDates"?"":oG(t,e,n)}function rhe(t){let e={width:"full",fillAvailable:!0,minWidth:[300,"px"]};return t.props?.getPConnect()?.getChildren()?.map((r,n)=>{let o=r?.getPConnect();return{id:o?.getComponentName()?`${o.getComponentName()}--${n}`:`item--${n}`,content:o?.getComponent(),layoutConfig:{...e,...o?.getConfigProps().layoutConfig}}})}var I$="0.1.0",iG={dateFormatString:"MM/DD/YYYY",dateFormatStringLong:"MMM DD, YYYY",dateFormatStringLC:"mm/dd/yyyy",dateFormatMask:"__/__/____"},C$=0;function nhe(){return C$+=1,`control-${C$}`}function ohe(){C$=0}function ihe(t){if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="on"||e===""}return!!t}function she(t){if(!t)return"";let e=t.charAt(0),r=t.lastIndexOf(" "),n=t.lastIndexOf(".");return r>0?e+=t.substring(r+1).charAt(0):n>0&&(e+=t.substring(n+1).charAt(0)),e.toUpperCase()}function sG(t=""){if(t)return t;let e=PCore.getEnvironmentInfo().getLocale?.();return e||(typeof document<"u"&&document.documentElement?.lang?document.documentElement.lang:Intl.DateTimeFormat().resolvedOptions().locale)}function ahe(t){if(t)return t;let e=PCore.getLocaleUtils().getTimeZoneInUse?.();return e||Intl.DateTimeFormat().resolvedOptions().timeZone}function che(){let t=PCore.getLocaleUtils(),e={...iG},r=sG(),n=new Date(Date.parse("30 November 2023 12:00:00 GMT")),o=new Intl.DateTimeFormat(r).format(n),i=o.indexOf("11"),s=o.indexOf("30"),a=o.indexOf("2023"),c=t.getLocaleValue("month_placeholder","CosmosFields")!=="month_placeholder"||t.getLocaleValue("day_placeholder","CosmosFields")!=="day_placeholder"||t.getLocaleValue("year_placeholder","CosmosFields")!=="year_placeholder",l=[{loc:i,format:"MM",longFormat:"MMM",placeholder:c?t.getLocaleValue("month_placeholder","CosmosFields"):"mm",mask:"__",separator:o[i+2]},{loc:s,format:"DD",longFormat:"DD",placeholder:c?t.getLocaleValue("day_placeholder","CosmosFields"):"dd",mask:"__",separator:o[s+2]},{loc:a,format:"YYYY",longFormat:"YYYY",placeholder:c?t.getLocaleValue("year_placeholder","CosmosFields"):"yyyy",mask:"____",separator:o[a+4]}];return l.sort((u,p)=>u.loc-p.loc),e.dateFormatString=`${l[0].format}${l[0].separator}${l[1].format}${l[1].separator}${l[2].format}`,e.dateFormatStringLong=`${l[0].longFormat} ${l[1].longFormat}, ${l[2].longFormat}`,e.dateFormatStringLC=`${l[0].placeholder}${l[0].separator}${l[1].placeholder}${l[1].separator}${l[2].placeholder}`,e.dateFormatMask=`${l[0].mask}${l[0].separator}${l[1].mask}${l[1].separator}${l[2].mask}`,e}function lhe(t){let e=t.getComponentConfig(),r=String(e.referenceList??"").replace("@P ","");if(r.includes("D_")){let n=t.resolveDatasourceReference?.(r);n!=null&&(typeof n=="object"&&"pxResults"in n?r=n.pxResults:typeof n=="string"&&n.startsWith("D_")&&!n.endsWith(".pxResults")&&(r=`${n}.pxResults`))}return r}function uhe(){console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. SDK version: ${I$}. Ensure the Constellation version matches your Infinity server.`)}function dhe(){return I$}function phe(t){if(typeof t=="string")return t;if(t)return String(t)}function mhe(t){return typeof t.datasource=="object"&&Array.isArray(t.datasource)?t.datasource:[]}function fhe(t,e){let r=t.datasource;if(typeof r=="string"&&e[r])return[];let n=t.listOutput;if(typeof r=="object"&&!Array.isArray(n)){let o=r.source;n=Array.isArray(o)?o:[]}return(n??[]).forEach(o=>{o.value=o.text??o.value}),n??[]}function ghe(t,e={}){let r=t.listType;return r?r.toLowerCase()==="associated"?mhe(t):r.toLowerCase()==="datapage"?fhe(t,e):[]:[]}function hhe(t,e,r,n){switch(e){case"change":t.updateFieldValue(r,n);break;case"blur":t.triggerFieldChange(r,n);break;case"changeNblur":t.updateFieldValue(r,n),t.triggerFieldChange(r,n);break;default:break}}function yhe(t){let e=t.getRawMetadata()?.children;return Array.isArray(e)?e.map(r=>(Array.isArray(r.children)?r.children:[]).map(o=>o.config??{})):[]}function She(t){return t.filter(({visibility:e})=>e!==!1).map(({value:e,label:r})=>({id:(r??"").toLowerCase(),name:r??"",value:e}))}function aG(t){let e=String(t.getValue(E.CASE_INFO.CASE_INFO_CLASSID)??""),n=`${String(t.getValue(E.CASE_INFO.ASSIGNMENTACTION_ID)??"")}!${e}`,o=`${t.getCurrentView()}!${t.getCurrentClassID()}`;return n===o}function Ehe(t,e="casestep"){let r=phe(t.getValue(E.CASE_INFO.INSTRUCTIONS)),n=aG(t);switch(e){case"casestep":return n&&r?.length?r:void 0;case"none":return;default:return e.startsWith("@PARAGRAPH")?void 0:e}}function _$(t,e){let{selectionMode:r,selectionList:n,renderMode:o,referenceList:i}=t.getComponentConfig(),s=E.LIST_SELECTION_MODE;(r===s.MULTI&&n||o==="Editable"&&i)&&t.getListActions()?.setVisibility(e)}function Ahe(t){if(t.isEditable()){let e=t.getActionsApi();e&&(t.setAction?.("onChange",r=>{e.changeHandler?.(t,r)}),t.setAction?.("onBlur",r=>{e.eventHandler?.(t,r)}))}return t.addFormField(),_$(t,!0),()=>{t.removeFormField?.(),_$(t,!1),t.removeNode()}}function Che(t){return Array.isArray(t)?t.filter(e=>e.type!=="Alternate"||e.type==="Alternate"&&e.visited_status==="active"):[]}function _he(t,e){let r="psdk-vertical-step-body";return t<e-1?`${r} psdk-vertical-step-line`:r}function Ihe(t,e){let r=e.length,n=e[r-1],o=e.findIndex(a=>a.ID===t?.ID),i=t.visited_status==="current",s=o===r-2&&n?.visited_status==="current";return i||s?"flex-auto":""}function bhe(t,e){return t===e-1}function The(t){return t?t.replace(/\((\d+)\)/g,(e,r)=>`[${parseInt(r,10)-1}]`):null}function vhe(t,e){return typeof window<"u"?new CustomEvent(t,{detail:{additionalData:e}}):null}function Rhe(){return g$}function Phe(){return h$}function Nhe(){return E$}function Ohe(){return A$}var T$=class{getDebouncedSubject(e){return new Ws().pipe(fm(e))}},cG=new T$;var xhe=(()=>{let t="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",e="\\\\[\\x00-\\x7f]",r=`"(?:[^\\r"\\\\\\x80-\\xff]|${e})*"`,n=`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${e})*\\]`,o=`(?:${t}|${r})`,i=`(?:${t}|${n})`,s=`${o}(?:\\.${o})*`,a=`${i}(?:\\.${i})*`;return new RegExp(`^${s}@${a}$`)})();function Dhe(t){return xhe.test(t)}var whe=(()=>{let e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+",u=`${`(?:${`${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}`;return new RegExp(`^${u}$`)})();function $he(t){return whe.test(t)}Dt.register("email",(t,{useRFC822Validation:e})=>{let r=null,n=e?Dhe(t):$he(t);return t&&!n&&(r="Enter a valid email address"),r});Dt.register("integer",t=>{let e=null;return t&&!/^(-)?\d+$/.test(t)&&(e="Invalid number"),e});Dt.register("required",t=>Array.isArray(t)&&t.length===0||t==null||t===""?"Cannot be blank":null);function Mhe(t){if(Be.isStaticContentReference(t))return!0;try{let e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"||e.protocol==="ftp:"}catch{return!1}}Dt.register("url",t=>{let e=null;return t&&!Mhe(t)&&(e="Enter a valid url"),e});var II={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[2-467])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","(?:400|[5-9]\\d\\d)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-37-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[013]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[0-79]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:472[2-47-9]|983[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}",[7,8,9,10],[["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function v$(t,e,r){var n=Array.prototype.slice.call(e);n.push(II);var o=t.apply(this,n);return r&&o&&Object.setPrototypeOf(o,r),o}function R$(t,e){t=t.split("-"),e=e.split("-");for(var r=t[0].split("."),n=e[0].split("."),o=0;o<3;o++){var i=Number(r[o]),s=Number(n[o]);if(i>s)return 1;if(s>i)return-1;if(!isNaN(i)&&isNaN(s))return 1;if(isNaN(i)&&!isNaN(s))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var khe={}.constructor;function Ri(t){return t!=null&&t.constructor===khe}var Lhe=/^\d+$/;function P$(t){return Lhe.test(t)}var Uhe="1.2.0",jhe="1.7.35",lG=" ext. ",yt=class{constructor(e){x$(e),this.metadata=e,pG.call(this,e)}getCountries(){return Object.keys(this.metadata.countries).filter(e=>e!=="001")}getCountryMetadata(e){return this.metadata.countries[e]}nonGeographic(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}hasCountry(e){return this.getCountryMetadata(e)!==void 0}hasCallingCode(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{let r=this.countryCallingCodes()[e];if(r&&r.length===1&&r[0]==="001")return!0}}isNonGeographicCallingCode(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}country(e){return this.selectNumberingPlan(e)}selectNumberingPlan(e,r){let n,o;if(e&&(P$(e)?o=e:n=e),r&&(o=r),n&&n!=="001"){let i=this.getCountryMetadata(n);if(!i)throw new Error(`Unknown country: ${n}`);this.numberingPlan=new bI(i,this)}else if(o){if(!this.hasCallingCode(o))throw new Error(`Unknown calling code: ${o}`);this.numberingPlan=new bI(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}getCountryCodesForCallingCode(e){let r=this.countryCallingCodes()[e];if(r)return r.length===1&&r[0].length===3?void 0:r}getCountryCodeForCallingCode(e){let r=this.getCountryCodesForCallingCode(e);if(r)return r[0]}getNumberingPlanMetadata(e){let r=this.getCountryCodeForCallingCode(e);if(r)return this.getCountryMetadata(r);if(this.nonGeographic()){let n=this.nonGeographic()[e];if(n)return n}else{let n=this.countryCallingCodes()[e];if(n&&n.length===1&&n[0]==="001")return this.metadata.countries["001"]}}countryCallingCode(){return this.numberingPlan.callingCode()}IDDPrefix(){return this.numberingPlan.IDDPrefix()}defaultIDDPrefix(){return this.numberingPlan.defaultIDDPrefix()}nationalNumberPattern(){return this.numberingPlan.nationalNumberPattern()}possibleLengths(){return this.numberingPlan.possibleLengths()}formats(){return this.numberingPlan.formats()}nationalPrefixForParsing(){return this.numberingPlan.nationalPrefixForParsing()}nationalPrefixTransformRule(){return this.numberingPlan.nationalPrefixTransformRule()}leadingDigits(){return this.numberingPlan.leadingDigits()}hasTypes(){return this.numberingPlan.hasTypes()}type(e){return this.numberingPlan.type(e)}ext(){return this.numberingPlan.ext()}countryCallingCodes(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}chooseCountryByCountryCallingCode(e){return this.selectNumberingPlan(e)}hasSelectedNumberingPlan(){return this.numberingPlan!==void 0}},bI=class{constructor(e,r){this.globalMetadataObject=r,this.metadata=e,pG.call(this,r.metadata)}callingCode(){return this.metadata[0]}_getDefaultCountryMetadataForThisCallingCode(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}getDefaultCountryMetadataForRegion(){return this._getDefaultCountryMetadataForThisCallingCode()}IDDPrefix(){if(!(this.v1||this.v2))return this.metadata[1]}defaultIDDPrefix(){if(!(this.v1||this.v2))return this.metadata[12]}nationalNumberPattern(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}possibleLengths(){if(!this.v1)return this.metadata[this.v2?2:3]}_getFormats(e){return e[this.v1?2:this.v2?3:4]}formats(){return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map(r=>new N$(r,this))}nationalPrefix(){return this.metadata[this.v1?3:this.v2?4:5]}_getNationalPrefixFormattingRule(e){return e[this.v1?4:this.v2?5:6]}nationalPrefixFormattingRule(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}_nationalPrefixForParsing(){return this.metadata[this.v1?5:this.v2?6:7]}nationalPrefixForParsing(){return this._nationalPrefixForParsing()||this.nationalPrefix()}nationalPrefixTransformRule(){return this.metadata[this.v1?6:this.v2?7:8]}_getNationalPrefixIsOptionalWhenFormatting(){return!!this.metadata[this.v1?7:this.v2?8:9]}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}leadingDigits(){return this.metadata[this.v1?8:this.v2?9:10]}types(){return this.metadata[this.v1?9:this.v2?10:11]}hasTypes(){return this.types()&&this.types().length===0?!1:!!this.types()}type(e){if(this.hasTypes()&&uG(this.types(),e))return new O$(uG(this.types(),e),this)}ext(){return this.v1||this.v2?lG:this.metadata[13]||lG}},N$=class{constructor(e,r){this._format=e,this.metadata=r}pattern(){return this._format[0]}format(){return this._format[1]}leadingDigitsPatterns(){return this._format[2]||[]}nationalPrefixFormattingRule(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}nationalPrefixIsOptionalWhenFormattingInNationalFormat(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}nationalPrefixIsMandatoryWhenFormattingInNationalFormat(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}usesNationalPrefix(){return!!(this.nationalPrefixFormattingRule()&&!zhe.test(this.nationalPrefixFormattingRule()))}internationalFormat(){return this._format[5]||this.format()}},zhe=/^\(?\$1\)?$/,O$=class{constructor(e,r){this.type=e,this.metadata=r}pattern(){return this.metadata.v1?this.type:this.type[0]}possibleLengths(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}};function uG(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function x$(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Ri(t)||!Ri(t.countries))throw new Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${Ri(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+Fhe(t)+": "+t}.`)}var Fhe=t=>typeof t;function Xh(t,e){let r=new yt(e);if(r.hasCountry(t))return r.selectNumberingPlan(t).countryCallingCode();throw new Error(`Unknown country: ${t}`)}function dG(t,e){return e.countries.hasOwnProperty(t)}function pG(t){let{version:e}=t;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?R$(e,Uhe)===-1?this.v2=!0:R$(e,jhe)===-1?this.v3=!0:this.v4=!0:this.v1=!0}function D$(t,e){let r=t.slice();for(let n of e)t.indexOf(n)<0&&r.push(n);return r.sort((n,o)=>n-o)}function yl(t,e,r){return mG(t,void 0,e,r)}function mG(t,e,r,n){r&&(n=new yt(n.metadata),n.selectNumberingPlan(r));let o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return mG(t,"MOBILE",r,n);let c=n.type("MOBILE");c&&(i=D$(i,c.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";let s=t.length,a=i[0];return a===s?"IS_POSSIBLE":a>s?"TOO_SHORT":i[i.length-1]<s?"TOO_LONG":i.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function w$(t,e,r){e===void 0&&(e={});let n=new yt(r);if(e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.country||t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);n.selectNumberingPlan(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return $$(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function $$(t,e){return yl(t,void 0,e)==="IS_POSSIBLE"}function an(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var Vhe=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Sl(t,e,r){if(e=e||{},!t.country&&!t.countryCallingCode)return;let n=new yt(r);n.selectNumberingPlan(t.country||t.countryCallingCode);let o=e.v2?t.nationalNumber:t.phone;if(an(o,n.nationalNumberPattern())){if(M$(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||M$(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(let i of Vhe)if(M$(o,i,n))return i}}function M$(t,e,r){let n=r.type(e);return!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(t.length)<0?!1:an(t,n.pattern())}function k$(t,e,r){e=e||{};let n=new yt(r);if(n.selectNumberingPlan(t.country||t.countryCallingCode),n.hasTypes())return Sl(t,e,n.metadata)!==void 0;let o=e.v2?t.nationalNumber:t.phone;return an(o,n.nationalNumberPattern())}var Bhe=/^[A-Z]{2}$/;function L$(t){return Bhe.test(t)}var Hhe=!1;function U$(t,e){let r,n,o=new yt(e);return L$(t)?(r=t,o.selectNumberingPlan(r),n=o.countryCallingCode()):(n=t,Hhe&&o.isNonGeographicCallingCode(n)&&(r="001")),{country:r,callingCode:n}}function j$(t,e,r){let o=new yt(r).getCountryCodesForCallingCode(t);return o?o.filter(i=>Ghe(e,i,r)):[]}function Ghe(t,e,r){let n=new yt(r);return n.selectNumberingPlan(e),n.numberingPlan.possibleLengths().indexOf(t.length)>=0}var cn="0-90-9٠-٩۰-۹",qhe="-‐-―−ー-";var Whe="  ­​⁠ ",Khe="()()[]\\[\\]",Jhe="~⁓∼~",lp=`${qhe}//..${Whe}${Khe}${Jhe}`,ey="++";var Yhe=new RegExp("(["+cn+"])");function z$(t,e,r,n){if(!e)return;let o=new yt(n);o.selectNumberingPlan(e||r);let i=new RegExp(o.IDDPrefix());if(t.search(i)!==0)return;t=t.slice(t.match(i)[0].length);let s=t.match(Yhe);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}function F$(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){let r=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(t);if(n){let o,i,s=n.length-1,a=s>0&&n[s];if(e.nationalPrefixTransformRule()&&a)o=t.replace(r,e.nationalPrefixTransformRule()),s>1&&(i=n[1]);else{let l=n[0];o=t.slice(l.length),a&&(i=n[1])}let c;if(a){let l=t.indexOf(n[1]);t.slice(0,l)===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=n[0];return{nationalNumber:o,nationalPrefix:c,carrierCode:i}}}return{nationalNumber:t}}function V$(t,e,r){let n=new yt(r);for(let o of e)if(n.selectNumberingPlan(o),n.leadingDigits()){if(t&&t.search(n.leadingDigits())===0)return o}else if(Sl({phone:t,country:o},void 0,n.metadata))return o}var Zhe=!1;function ty(t,{nationalNumber:e,metadata:r}){if(Zhe&&r.isNonGeographicCallingCode(t))return"001";let n=r.getCountryCodesForCallingCode(t);if(n)return n.length===1?n[0]:V$(e,n,r.metadata)}function up(t,e,r){let{carrierCode:n,nationalNumber:o}=F$(t,r);if(o!==t){if(!Qhe(t,o,r))return{nationalNumber:t};if(r.numberingPlan.possibleLengths()&&(e||(e=ty(r.numberingPlan.callingCode(),{nationalNumber:o,metadata:r})),!Xhe(o,e,r)))return{nationalNumber:t}}return{nationalNumber:o,carrierCode:n}}function Qhe(t,e,r){return!(an(t,r.nationalNumberPattern())&&!an(e,r.nationalNumberPattern()))}function Xhe(t,e,r){switch(yl(t,e,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function B$(t,e,r,n,o){if(!(e||r||n))return{number:t};let i=e||r?Xh(e||r,o):n;if(t.indexOf(i)===0){let s=new yt(o);s.selectNumberingPlan(e||r||n);let a=t.slice(i.length),{nationalNumber:c}=up(a,void 0,s),{nationalNumber:l}=up(t,void 0,s);if(!an(l,s.nationalNumberPattern())&&an(c,s.nationalNumberPattern())||yl(l,void 0,s)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function ry(t,e,r,n,o){if(!t)return{};let i;if(t[0]!=="+"){let c=z$(t,e||r,n,o);if(c&&c!==t)i=!0,t="+"+c;else{if(e||r||n){let{countryCallingCode:l,number:u}=B$(t,e,r,n,o);if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:u}}return{number:t}}}if(t[1]==="0")return{};let s=new yt(o),a=2;for(;a-1<=3&&a<=t.length;){let c=t.slice(1,a);if(s.hasCallingCode(c))return s.selectNumberingPlan(c),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:t.slice(a)};a++}return{}}function H$(t){return t.replace(new RegExp(`[${lp}]+`,"g")," ").trim()}var eye=/(\$\d)/;function G$(t,e,{useInternationalFormat:r,withNationalPrefix:n,carrierCode:o,metadata:i}){let s=t.replace(new RegExp(e.pattern()),r?e.internationalFormat():n&&e.nationalPrefixFormattingRule()?e.format().replace(eye,e.nationalPrefixFormattingRule()):e.format());return r?H$(s):s}var tye=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function q$(t,e,r){let n=new yt(r);if(n.selectNumberingPlan(t||e),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(tye.test(n.IDDPrefix()))return n.IDDPrefix()}var rye=";ext=",dp=t=>`([${cn}]{1,${t}})`;function ny(t){var e="20",r="15",n="9",o="6",i="[  \\t,]*",s="[:\\..]?[  \\t,-]*",a="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",l="(?:[xx##~~]|int|int)",u="[- ]+",p="[  \\t]*",m="(?:,{2}|;)",f=rye+dp(e),h=i+c+s+dp(e)+a,S=i+l+s+dp(n)+a,A=u+dp(o)+"#",C=p+m+s+dp(r)+a,I=p+"(?:,)+"+s+dp(n)+a;return f+"|"+h+"|"+S+"|"+A+"|"+C+"|"+I}var nye="["+cn+"]{"+2+"}",oye="["+ey+"]{0,1}(?:["+lp+"]*["+cn+"]){3,}["+lp+cn+"]*",iye=new RegExp("^["+ey+"]{0,1}(?:["+lp+"]*["+cn+"]){1,2}$","i"),sye=oye+"(?:"+ny()+")?",aye=new RegExp("^"+nye+"$|^"+sye+"$","i");function W$(t){return t.length>=2&&aye.test(t)}function fG(t){return iye.test(t)}function gG({number:t,ext:e}){if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${e?";ext="+e:""}`}var hG={formatExtension:(t,e,r)=>`${t}${r.ext()}${e}`};function J$(t,e,r,n){r?r=uye({},hG,r):r=hG;let o=new yt(n);if(t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error(`Unknown country: ${t.country}`);o.selectNumberingPlan(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";let i=o.countryCallingCode(),s=r.v2?t.nationalNumber:t.phone,a;switch(e){case"NATIONAL":return s?(a=vI(s,t.carrierCode,"NATIONAL",o,r),K$(a,t.ext,o,r.formatExtension)):"";case"INTERNATIONAL":return s?(a=vI(s,null,"INTERNATIONAL",o,r),a=`+${i} ${a}`,K$(a,t.ext,o,r.formatExtension)):`+${i}`;case"E.164":return`+${i}${s}`;case"RFC3966":return gG({number:`+${i}${s}`,ext:t.ext});case"IDD":if(!r.fromCountry)return;let c=lye(s,t.carrierCode,i,r.fromCountry,o);return c?K$(c,t.ext,o,r.formatExtension):void 0;default:throw new Error(`Unknown "format" argument passed to "formatNumber()": "${e}"`)}}function vI(t,e,r,n,o){let i=cye(n.formats(),t);return i?G$(t,i,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:e,metadata:n}):t}function cye(t,e){return dye(t,r=>{if(r.leadingDigitsPatterns().length>0){let n=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(e.search(n)!==0)return!1}return an(e,r.pattern())})}function K$(t,e,r,n){return e?n(t,e,r):t}function lye(t,e,r,n,o){if(Xh(n,o.metadata)===r){let a=vI(t,e,"NATIONAL",o);return r==="1"?r+" "+a:a}let s=q$(n,void 0,o.metadata);if(s)return`${s} ${r} ${vI(t,null,"INTERNATIONAL",o)}`}function uye(...t){let e=1;for(;e<t.length;){if(t[e])for(let r in t[e])t[0][r]=t[e][r];e++}return t[0]}function dye(t,e){let r=0;for(;r<t.length;){if(e(t[r]))return t[r];r++}}function Y$(){return Y$=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y$.apply(null,arguments)}var Ba=class{constructor(e,r,n){if(!e)throw new TypeError("First argument is required");if(typeof e!="string")throw new TypeError("First argument must be a string");if(e[0]==="+"&&!r)throw new TypeError("`metadata` argument not passed");if(Ri(r)&&Ri(r.countries)){n=r;let s=e;if(!pye.test(s))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');let{countryCallingCode:a,number:c}=ry(s,void 0,void 0,void 0,n);if(r=c,e=a,!r)throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if(typeof r!="string")throw new TypeError("`nationalNumber` argument must be a string");x$(n);let{country:o,callingCode:i}=U$(e,n);this.country=o,this.countryCallingCode=i,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=()=>n}setExt(e){this.ext=e}getPossibleCountries(){return this.country?[this.country]:j$(this.countryCallingCode,this.nationalNumber,this.getMetadata())}isPossible(){return w$(this,{v2:!0},this.getMetadata())}isValid(){return k$(this,{v2:!0},this.getMetadata())}isNonGeographic(){return new yt(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}isEqual(e){return this.number===e.number&&this.ext===e.ext}getType(){return Sl(this,{v2:!0},this.getMetadata())}format(e,r){return J$(this,e,r?Y$({},r,{v2:!0}):{v2:!0},this.getMetadata())}formatNational(e){return this.format("NATIONAL",e)}formatInternational(e){return this.format("INTERNATIONAL",e)}getURI(e){return this.format("RFC3966",e)}},pye=/^\+\d+$/;var Cn=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype),this.name=this.constructor.name}};var yG=new RegExp("(?:"+ny()+")$","i");function Z$(t){let e=t.search(yG);if(e<0)return{};let r=t.slice(0,e),n=t.match(yG),o=1;for(;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}var mye={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function SG(t){return mye[t]}function RI(t){let e="";for(let r of t.split(""))e+=fye(r,e)||"";return e}function fye(t,e,r){if(t==="+"){if(e){typeof r=="function"&&r("end");return}return"+"}return SG(t)}var X$="+",gye="[\\-\\.\\(\\)]?",EG="(["+cn+"]|"+gye+")",hye="^\\"+X$+EG+"*["+cn+"]"+EG+"*$",yye=new RegExp(hye,"g"),Q$=cn,Sye="["+Q$+"]+((\\-)*["+Q$+"])*",Eye="a-zA-Z",Aye="["+Eye+"]+((\\-)*["+Q$+"])*",Cye="^("+Sye+"\\.)*"+Aye+"\\.?$",_ye=new RegExp(Cye,"g"),eM="tel:",PI=";phone-context=",AG=";isub=";function tM(t){let e=t.indexOf(PI);if(e<0)return null;let r=e+PI.length;if(r>=t.length)return"";let n=t.indexOf(";",r);return n>=0?t.substring(r,n):t.substring(r)}function CG(t){return t===null?!0:t.length===0?!1:yye.test(t)||_ye.test(t)}function rM(t,{extractFormattedPhoneNumber:e}){let r=tM(t);if(!CG(r))throw new Cn("NOT_A_NUMBER");let n;if(r===null)n=e(t)||"";else{n="",r.charAt(0)===X$&&(n+=r);let i=t.indexOf(eM),s;i>=0?s=i+eM.length:s=0;let a=t.indexOf(PI);n+=t.substring(s,a)}let o=n.indexOf(AG);if(o>0&&(n=n.substring(0,o)),n!=="")return n}var bye=250,Tye=new RegExp("["+ey+cn+"]"),vye=new RegExp("[^"+cn+"#]+$"),Rye=!1;function nM(t,e,r){e=e||{};let n=new yt(r);if(e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new Cn("INVALID_COUNTRY"):new Error(`Unknown country: ${e.defaultCountry}`);let{number:o,ext:i,error:s}=Nye(t,e.v2,e.extract);if(!o){if(e.v2)throw s==="TOO_SHORT"?new Cn("TOO_SHORT"):new Cn("NOT_A_NUMBER");return{}}let{country:a,nationalNumber:c,countryCallingCode:l,countryCallingCodeSource:u,carrierCode:p}=xye(o,e.defaultCountry,e.defaultCallingCode,n);if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new Cn("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(e.v2)throw new Cn("TOO_SHORT");return{}}if(c.length>17){if(e.v2)throw new Cn("TOO_LONG");return{}}if(e.v2){let f=new Ba(l,c,n.metadata);return a&&(f.country=a),p&&(f.carrierCode=p),i&&(f.ext=i),f.__countryCallingCodeSource=u,f}let m=(e.extended?n.hasSelectedNumberingPlan():a)?an(c,n.nationalNumberPattern()):!1;return e.extended?{country:a,countryCallingCode:l,carrierCode:p,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&$$(c,n)),phone:c,ext:i}:m?Oye(a,c,i):{}}function Pye(t,e,r){if(!t)return;if(t.length>bye){if(r)throw new Cn("TOO_LONG");return}if(e===!1)return t;let n=t.search(Tye);if(!(n<0))return t.slice(n).replace(vye,"")}function Nye(t,e,r){let n=rM(t,{extractFormattedPhoneNumber:i=>Pye(i,r,e)});if(!n)return{};if(!W$(n))return fG(n)?{error:"TOO_SHORT"}:{};let o=Z$(n);return o.ext?o:{number:n}}function Oye(t,e,r){let n={country:t,phone:e};return r&&(n.ext=r),n}function xye(t,e,r,n){let{countryCallingCodeSource:o,countryCallingCode:i,number:s}=ry(RI(t),void 0,e,r,n.metadata),a;if(i)n.selectNumberingPlan(i);else if(s&&(e||r))e?(a=e,n.selectNumberingPlan(e),i=n.numberingPlan.callingCode()):(n.selectNumberingPlan(r),i=r,Rye&&n.isNonGeographicCallingCode(i)&&(a="001"));else return{};if(!s)return{countryCallingCodeSource:o,countryCallingCode:i};let{nationalNumber:c,carrierCode:l}=up(RI(s),void 0,n),u=ty(i,{nationalNumber:c,metadata:n});return u&&(a=u,u==="001"||n.selectNumberingPlan(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:c,carrierCode:l}}function oM(){return oM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},oM.apply(null,arguments)}function iM(t,e,r){return nM(t,oM({},e,{v2:!0}),r)}function sM(){return sM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sM.apply(null,arguments)}function aM(t){let[e,r,n,o]=Array.prototype.slice.call(t),i,s,a;if(typeof e=="string")i=e;else throw new TypeError("A text for parsing must be a string.");if(!r||typeof r=="string")o?(s=n,a=o):(s=void 0,a=n),r&&(s=sM({defaultCountry:r},s));else if(Ri(r))n?(s=r,a=n):a=r;else throw new Error(`Invalid second argument: ${r}`);return{text:i,options:s,metadata:a}}function cM(){return cM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cM.apply(null,arguments)}function lM(t,e,r){e&&e.defaultCountry&&!dG(e.defaultCountry,r)&&(e=cM({},e,{defaultCountry:void 0}));try{return iM(t,e,r)}catch(n){if(!(n instanceof Cn))throw n}}function oy(){let{text:t,options:e,metadata:r}=aM(arguments);return lM(t,e,r)}var NI=class extends Ba{constructor(e){super(e,II)}};function OI(){return v$(oy,arguments,NI.prototype)}var _G="Enter a valid phone number";Dt.register("phone",t=>{let e=null;t&&!/^\+?\d+$/.test(t)&&(e=_G);let n=t?.startsWith("+");if(t&&n){let o=OI(t);(!o||!o.isPossible()||t!==o.number)&&(e=_G)}return e});var IG="​",bG="‌",Dye=t=>{if(t&&t.startsWith(IG)&&t.endsWith(IG))return"invalid";if(t&&t.startsWith(bG)&&t.endsWith(bG))return"incomplete"},uM=(t,e)=>{switch(Dye(e)??e){case"invalid":return`Incorrect ${t}`;case"incomplete":return`Incomplete ${t}`;default:return null}};Dt.register("datetime",t=>uM("date and time",t));Dt.register("date",t=>uM("date",t));Dt.register("time",t=>uM("time",t));var TG=t=>{let e="Error with one or more files";for(let r of t)if(r?.error)return e;return null};Dt.register("attachment",t=>{let e=null,r="Error with one or more files";return t&&("pyCount"in t&&Array.isArray(t.pxResults)?e=TG(t.pxResults):Array.isArray(t)?e=TG(t):"error"in t&&t.error&&(e=r)),e});var El=()=>{let t={},e=typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;e&&(t["user-timezone"]=e);let r=typeof navigator<"u"?navigator.language:void 0;return r&&(t["user-locale"]=r),t},RG="createConversation",xI="sendMessage",PG="getConversations",NG="getMessages",OG="createConversationForAgent",vG="sendMessageForAgent",wye="getConversationsForAgent",$ye="getMessagesForAgent",Mye="likeAgentMessage",kye="dislikeAgentMessage",Lye="getAgent",xG="getCoach",DG=(t,e,r,n,o,i,s)=>{for(let c of s)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=hi();return s.push(a),ve(t,{queryPayload:PG===t?{assistantID:e,contextID:r,pageSize:n,pageIndex:o}:{agentID:e,contextID:r,pageSize:n,pageIndex:o},cancelTokenSource:a,headers:El()},i).finally(()=>{let c=s.indexOf(a);c!==-1&&s.splice(c,1)})},wG=(t,e,r,n,o)=>{for(let s of o)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=hi();return o.push(i),ve(t,{queryPayload:NG===t?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},cancelTokenSource:i,headers:El()},n).then(s=>(o.pop(),s))},$G=(t,e,r,n,o,i,s=!1)=>{for(let c of o)c?.cancel&&typeof c.cancel=="function"&&c.cancel();let a=hi();return o.push(a),ve(t,{body:JSON.stringify({contextID:e,executeStarterQuestion:!1,...i&&i.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...t===OG&&s&&{showAgentRecommendations:s}}),cancelTokenSource:a,queryPayload:t===RG?{assistantID:r}:{agentID:r},headers:El()},n).then(c=>(o.pop(),c))},MG=(t,e,r,n,o,i,s)=>{let a={...n&&{request:n},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...s&&s.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},...i&&i?.length>0&&{attachments:i}};return ve(t,{body:JSON.stringify(a),queryPayload:t===xI?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},headers:El()},o)},kG=(t,e,r,n,o,i,s,a)=>{let c={...n&&{request:n},...s&&s.additionalInstruction&&{additionalInstruction:s.additionalInstruction},...i&&i.length>0&&{attachments:i},...s&&s.toolsReviewed&&s.toolsReviewed.length>0&&{toolsReviewed:s.toolsReviewed},capabilities:{stream:{isEnabled:!0},...s&&s.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...s&&s.questionnaire&&{questionnaire:s.questionnaire}},l=t===xI?{assistantID:e,conversationID:r}:{agentID:e,conversationID:r},{restApi:u,reqType:p}=U(t,l),m={method:p,headers:{Accept:"text/event-stream",...El()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...a&&{signal:a.token}};return k(u,m,o)},LG=(t,e,r,n,o)=>{for(let s of n)s?.cancel&&typeof s.cancel=="function"&&s.cancel();let i=hi();return n.push(i),ve(t,{queryPayload:t===xG?{assistantID:e,...o&&{contextID:o}}:{agentID:e,...o&&{contextID:o}},cancelTokenSource:i},r).then(s=>(n.pop(),s)).catch(s=>{throw n.pop(),s})},Uye=(t,e,r,n,o,i=[])=>DG(PG,t,e,r,n,o,i),jye=(t,e,r,n,o,i=[])=>DG(wye,t,e,r,n,o,i),zye=(t,e,r,n=[])=>wG(NG,t,e,r,n),Fye=(t,e,r,n=[])=>wG($ye,t,e,r,n),Vye=(t,e,r,n=[])=>$G(RG,t,e,r,n),Bye=(t,e,r,n=[],o,i)=>$G(OG,t,e,r,n,o,i),Hye=(t,e,r,n,o)=>o?.enableStreaming?kG(xI,t,e,r,n,void 0,o):MG(xI,t,e,r,n),Gye=(t,e,r,n,o,i)=>i?.enableStreaming?kG(vG,t,e,r,n,o,i,i.cancelTokenSource):MG(vG,t,e,r,n,o,i),qye=(t,e,r,n=[])=>LG(Lye,t,e,n,r),Wye=(t,e,r,n=[])=>LG(xG,t,e,n,r),Kye=(t,e,r,n)=>{let o={queryPayload:{agentID:t,conversationID:e,messageID:r},headers:El()};return ve(Mye,o,n)},Jye=(t,e,r,n,o="")=>{let i={queryPayload:{agentID:t,conversationID:e,messageID:r},body:JSON.stringify({feedbackText:o}),headers:El()};return ve(kye,i,n)},UG={createConversation:Vye,sendMessage:Hye,createConversationForAgent:Bye,sendMessageForAgent:Gye,getAgent:qye,getCoach:Wye,likeAgentMessage:Kye,unLikeAgentMessage:Jye,getConversations:Uye,getConversationsForAgent:jye,getMessages:zye,getMessagesForAgent:Fye};var dM=class{async rewriteText(e){let{originalText:r,rewriteAction:n,additionalInstructions:o,context:i}=e,s=v.isInfinityRuntime(),a=v.getRewriteGenAIDP()??P.getDefaultQualifiedName("D_RewriteWithAI"),c={OriginalText:r,RewriteAction:n,AdditionalInstructions:o||""};try{let l,u;if(s){let p=await Zt.getPageDataAsync(a,i,c),f=Object.fromEntries(Object.entries(p)).pyResponseData;l=typeof f=="string"?f:void 0}else{let m=(await Zt.getDataAsync(a,i,c)).data[0],f=m[P.getDefaultQualifiedName("Content")];l=typeof f=="string"?f:void 0;let h=m[P.getDefaultQualifiedName("ErrorMessage")];u=typeof h=="string"?h:void 0}return l?{success:!0,rewrittenText:l}:{success:!1,errorMessage:u||"AI rewrite failed: No rewritten text returned"}}catch(l){return{success:!1,errorMessage:l instanceof Error?l.message:"An unexpected error occurred during AI rewrite"}}}},jG=new dM;var pM=class{classAccessMap=new Map;static instance;constructor(){let e=v.getClassesAccessList();e.length!==0?this.classAccessMap=e.reduce((r,n)=>(r.set(n.pyClassName,n.pyHasCreateAccess),r),new Map):this.classAccessMap=v.getCaseTypeList().reduce((r,n)=>(r.set(n.pyWorkTypeImplementationClassName,n.hasCreateAccess??!0),r),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}},zG=pM;var mM=class{static AUTOSAVE_SAVE_STATUS=Fd;static isAutosaveEnabledForContext(e){return fs(e)}static subscribeAutosaveStatus(e,r){return s6(e,r)}static notifyChange(e,r,n){fs(e)&&(o6(e,r,n),Bd(e))}},FG=mM;var fM=class t{static behaviorOverrides={};getPersonalizationUtils=zH;constructor(){t.behaviorOverrides={}}getPCoreVersion=()=>"27.1.0";onPCoreReady=e=>Gr.onPCoreReady(e);onPCoreCleanup=e=>Gr.onPCoreCleanup(e);getComponentsRegistry=()=>Gr.getComponentsRegistry();checkIfSemanticURL=()=>Gr.checkIfSemanticURL();isValidSemanticURL=()=>s9();getRoutingUtils=()=>WH;getViewResources=()=>pD;configureForBrowserBookmark=e=>Gr.configureForBrowserBookmark(e);getStore=()=>De();resetStore=()=>ps();getMessageManager=()=>Nu;getCoexistenceManager=()=>Zh;getStoreValue=(e,r,n)=>oe(e,r,n);getContainerUtils=()=>na;getAnnotationUtils=()=>_r;getFieldUtils=()=>ei;getFieldDefaultUtils=()=>Xr;getAssetLoader=()=>Be;getAttachmentUtils=()=>du;getViewRuleApi=()=>RH;getFeedUtils=()=>DH;getTagUtils=()=>wH;getGenAIAssistantUtils=()=>UG;getGenAIUtils=()=>jG;getStakeholderUtils=()=>$H;getUserApi=()=>OH;getCaseFollowerApi=()=>PH;getCaseUtils=()=>B;getStateUtils=()=>$n;getRelatedCasesApi=()=>NH;getDataApi=()=>Ao;getDataApiUtils=()=>or;getAnalyticsUtils=()=>qH;getLocaleUtils=e=>{let r=e??v.getLocale()??"en-US";return Ci(r)};registerLocaleManager=e=>{let r=this.getLocaleUtils();Object.keys(e).forEach(n=>{r[n]=e[n]})};setBehaviorOverrides=e=>{t.behaviorOverrides=e};setBehaviorOverride=(e,r)=>{t.behaviorOverrides[e]=r};getBehaviorOverrides=()=>t.behaviorOverrides;getBehaviorOverride=e=>t.behaviorOverrides[e];getAsynchronousUtils=()=>cG;createPConnect=e=>ct(e);getPubSubUtils=()=>$;registerComponentCreator=e=>{BV(e)};getConstants=()=>Object.freeze(E);getResolvedConstantValue=e=>d.getProperty(e);getEvents=()=>JH;getRestClient=()=>WC;getMashupApi=()=>SI;getEnvironmentInfo=()=>v;switchLocale=e=>gH(e);getRuntimeParamsAPI=()=>al;getSemanticUrlUtils=()=>gu;getRemoteCaseUtils=()=>ae;getNavigationUtils=()=>pt;getSDKUtils=()=>b$;registerModule=(e,r)=>KH.registerModule(e,r,this);getErrorHandler=()=>YH;getFormUtils=()=>rn;getAutosaveUtils=()=>FG;getMessagingServiceManager=()=>Tt;getMetadataUtils=()=>Zn;getDataPageUtils=()=>Zt;getDataTypeUtils=()=>Si;getCascadeManager=()=>Cr;isDeepEqual=(e,r)=>lo(e,r);getAuthUtils=()=>ZH;getDebugger=()=>br;getDeferLoadManager=()=>Ld;getExpressionEngine=()=>wD;getActionsSequencer=()=>Ct;getRefreshManager=()=>Ai;getInitialiser=()=>op;getBootstrapUtils=()=>Gr;getContextTreeManager=()=>Ie;getAccessPrivilege=()=>zG.getInstance();getObjectTransformer=()=>Ve;getAllStateMachines=(e,r,n)=>!r||!n?ke.getAllStateMachinesByContext(e):ke.getAllStateMachines(e,r,n);isNamespaceEnabled=()=>P.isNamespaceEnabled();getQualifiedName=(e,r)=>P.getQualifiedName(e,r);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>P;getNetworkUtils=()=>Do;getMashupBridge=()=>AI;getConfirmDialogService=()=>oi;getBrowserNotificationService=()=>yI;getMCPClient=()=>mh},VG=new fM;globalThis.PCore=VG;var dbt=VG;export{dbt as default};
64
64
  /*! Bundled license information:
65
65
 
66
66
  @modelcontextprotocol/client/dist/src-DDAAhLnO.mjs: