@pega/constellationjs 1.0.37 → 1.0.39

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.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see constellation-core.e03d8738.js.LICENSE.txt */
2
+ var e={933:(e,t,n)=>{var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function a(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function s(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:s()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var a=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&s(),a},subscribe:a})}}},923:(e,t,n)=>{e.exports=n(933)},868:(e,t,n)=>{e.exports=n(867)},155:(e,t,n)=>{var r=n(30),a=n(79),s=n(687),o=n(512),i=n(791),c=n(924),d=n(903),l=n(517),u=n(307),p=n(97),h=n(384);e.exports=function(e){return new Promise((function(t,n){var f,g=e.data,y=e.headers,m=e.responseType;function I(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(g)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var E=new XMLHttpRequest;if(e.auth){var A=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(A+":"+_)}var S=i(e.baseURL,e.url);function $(){if(E){var r="getAllResponseHeaders"in E?c(E.getAllResponseHeaders()):null,s={data:m&&"text"!==m&&"json"!==m?E.response:E.responseText,status:E.status,statusText:E.statusText,headers:r,config:e,request:E};a((function(e){t(e),I()}),(function(e){n(e),I()}),s),E=null}}if(E.open(e.method.toUpperCase(),o(S,e.params,e.paramsSerializer),!0),E.timeout=e.timeout,"onloadend"in E?E.onloadend=$:E.onreadystatechange=function(){E&&4===E.readyState&&(0!==E.status||E.responseURL&&0===E.responseURL.indexOf("file:"))&&setTimeout($)},E.onabort=function(){E&&(n(new u("Request aborted",u.ECONNABORTED,e,E)),E=null)},E.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,e,E,E)),E=null},E.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new u(t,r.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,E)),E=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||d(S))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;C&&(y[e.xsrfHeaderName]=C)}"setRequestHeader"in E&&r.forEach(y,(function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete y[t]:E.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(E.withCredentials=!!e.withCredentials),m&&"json"!==m&&(E.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&E.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&E.upload&&E.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){E&&(n(!e||e&&e.type?new p:e),E.abort(),E=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),g||(g=null);var b=h(S);b&&-1===["http","https","file"].indexOf(b)?n(new u("Unsupported protocol "+b+":",u.ERR_BAD_REQUEST,e)):E.send(g)}))}},867:(e,t,n)=>{var r=n(30),a=n(843),s=n(891),o=n(316),i=function e(t){var n=new s(t),i=a(s.prototype.request,n);return r.extend(i,s.prototype,n),r.extend(i,n),i.create=function(n){return e(o(t,n))},i}(n(904));i.Axios=s,i.CanceledError=n(97),i.CancelToken=n(747),i.isCancel=n(416),i.VERSION=n(578).version,i.toFormData=n(251),i.AxiosError=n(307),i.Cancel=i.CanceledError,i.all=function(e){return Promise.all(e)},i.spread=n(545),i.isAxiosError=n(232),e.exports=i,e.exports.default=i},747:(e,t,n)=>{var r=n(97);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},a.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},97:(e,t,n)=>{var r=n(307);function a(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(30).inherits(a,r,{__CANCEL__:!0}),e.exports=a},416:e=>{e.exports=function(e){return!(!e||!e.__CANCEL__)}},891:(e,t,n)=>{var r=n(30),a=n(512),s=n(36),o=n(884),i=n(316),c=n(791),d=n(84),l=d.validators;function u(e){this.defaults=e,this.interceptors={request:new s,response:new s}}u.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=i(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&d.assertOptions(n,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var s,c=[];if(this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)})),!a){var u=[o,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(c),s=Promise.resolve(t);u.length;)s=s.then(u.shift(),u.shift());return s}for(var p=t;r.length;){var h=r.shift(),f=r.shift();try{p=h(p)}catch(e){f(e);break}}try{s=o(p)}catch(e){return Promise.reject(e)}for(;c.length;)s=s.then(c.shift(),c.shift());return s},u.prototype.getUri=function(e){e=i(this.defaults,e);var t=c(e.baseURL,e.url);return a(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(i(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(i(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}u.prototype[e]=t(),u.prototype[e+"Form"]=t(!0)})),e.exports=u},307:(e,t,n)=>{var r=n(30);function a(e,t,n,r,a){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}r.inherits(a,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var s=a.prototype,o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){o[e]={value:e}})),Object.defineProperties(a,o),Object.defineProperty(s,"isAxiosError",{value:!0}),a.from=function(e,t,n,o,i,c){var d=Object.create(s);return r.toFlatObject(e,d,(function(e){return e!==Error.prototype})),a.call(d,e.message,t,n,o,i),d.name=e.name,c&&Object.assign(d,c),d},e.exports=a},36:(e,t,n)=>{var r=n(30);function a(){this.handlers=[]}a.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},791:(e,t,n)=>{var r=n(957),a=n(50);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},884:(e,t,n)=>{var r=n(30),a=n(630),s=n(416),o=n(904),i=n(97);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new i}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=a.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return c(e),t.data=a.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(c(e),t&&t.response&&(t.response.data=a.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},316:(e,t,n)=>{var r=n(30);e.exports=function(e,t){t=t||{};var n={};function a(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:a(void 0,e[n]):a(e[n],t[n])}function o(e){if(!r.isUndefined(t[e]))return a(void 0,t[e])}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:a(void 0,e[n]):a(void 0,t[n])}function c(n){return n in t?a(e[n],t[n]):n in e?a(void 0,e[n]):void 0}var d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=d[e]||s,a=t(e);r.isUndefined(a)&&t!==c||(n[e]=a)})),n}},79:(e,t,n)=>{var r=n(307);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},630:(e,t,n)=>{var r=n(30),a=n(904);e.exports=function(e,t,n){var s=this||a;return r.forEach(n,(function(n){e=n.call(s,e,t)})),e}},904:(e,t,n)=>{var r=n(30),a=n(122),s=n(307),o=n(517),i=n(251),c={"Content-Type":"application/x-www-form-urlencoded"};function d(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,u={transitional:o,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(155)),l),transformRequest:[function(e,t){if(a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return d(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,s=r.isObject(e),o=t&&t["Content-Type"];if((n=r.isFileList(e))||s&&"multipart/form-data"===o){var c=this.env&&this.env.FormData;return i(n?{"files[]":e}:e,c&&new c)}return s||"application/json"===o?(d(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw s.from(e,s.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(159)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(c)})),e.exports=u},517:e=>{e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},578:e=>{e.exports={version:"0.27.2"}},843:e=>{e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},512:(e,t,n)=>{var r=n(30);function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(r.isURLSearchParams(t))s=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))})))})),s=o.join("&")}if(s){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},50:e=>{e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},687:(e,t,n)=>{var r=n(30);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,a,s,o){var i=[];i.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),r.isString(a)&&i.push("path="+a),r.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},957:e=>{e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},232:(e,t,n)=>{var r=n(30);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},903:(e,t,n)=>{var r=n(30);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},122:(e,t,n)=>{var r=n(30);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},159:e=>{e.exports=null},924:(e,t,n)=>{var r=n(30),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,o={};return e?(r.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(o[t]&&a.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},384:e=>{e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},545:e=>{e.exports=function(e){return function(t){return e.apply(null,t)}}},251:(e,t,n)=>{var r=n(30);e.exports=function(e,t){t=t||new FormData;var n=[];function a(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(s,o){if(r.isPlainObject(s)||r.isArray(s)){if(-1!==n.indexOf(s))throw Error("Circular reference detected in "+o);n.push(s),r.forEach(s,(function(n,s){if(!r.isUndefined(n)){var i,c=o?o+"."+s:s;if(n&&!o&&"object"==typeof n)if(r.endsWith(s,"{}"))n=JSON.stringify(n);else if(r.endsWith(s,"[]")&&(i=r.toArray(n)))return void i.forEach((function(e){!r.isUndefined(e)&&t.append(c,a(e))}));e(n,c)}})),n.pop()}else t.append(o,a(s))}(e),t}},84:(e,t,n)=>{var r=n(578).version,a=n(307),s={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){s[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};s.transitional=function(e,t,n){function s(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,i){if(!1===e)throw new a(s(r," has been removed"+(t?" in "+t:"")),a.ERR_DEPRECATED);return t&&!o[r]&&(o[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new a("options must be an object",a.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),s=r.length;s-- >0;){var o=r[s],i=t[o];if(i){var c=e[o],d=void 0===c||i(c,o,e);if(!0!==d)throw new a("option "+o+" must be "+d,a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new a("Unknown option "+o,a.ERR_BAD_OPTION)}},validators:s}},30:(e,t,n)=>{var r,a=n(843),s=Object.prototype.toString,o=(r=Object.create(null),function(e){var t=s.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function i(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function c(e){return Array.isArray(e)}function d(e){return void 0===e}var l=i("ArrayBuffer");function u(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=i("Date"),f=i("File"),g=i("Blob"),y=i("FileList");function m(e){return"[object Function]"===s.call(e)}var I=i("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}var A,_=(A="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return A&&e instanceof A});e.exports={isArray:c,isArrayBuffer:l,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||s.call(e)===t||m(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:p,isUndefined:d,isDate:h,isFile:f,isBlob:g,isFunction:m,isStream:function(e){return u(e)&&m(e.pipe)},isURLSearchParams:I,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:E,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):c(n)?t[r]=n.slice():t[r]=n}for(var r=0,a=arguments.length;r<a;r++)E(arguments[r],n);return t},extend:function(e,t,n){return E(t,(function(t,r){e[r]=n&&"function"==typeof t?a(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,a,s,o={};t=t||{};do{for(a=(r=Object.getOwnPropertyNames(e)).length;a-- >0;)o[s=r[a]]||(t[s]=e[s],o[s]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:i,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(d(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:_,isFileList:y}},303:e=>{e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,s[a]))return!1;for(a=r;0!=a--;){var o=s[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},492:(e,t,n)=>{var r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,l=c||d||Function("return this")(),u=Object.prototype.toString,p=Math.max,h=Math.min,f=function(){return l.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=s.test(e);return n||o.test(e)?i(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,s,o,i,c,d=0,l=!1,u=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function I(t){var n=r,s=a;return r=a=void 0,d=t,o=e.apply(s,n)}function E(e){var n=e-c;return void 0===c||n>=t||n<0||u&&e-d>=s}function A(){var e=f();if(E(e))return _(e);i=setTimeout(A,function(e){var n=t-(e-c);return u?h(n,s-(e-d)):n}(e))}function _(e){return i=void 0,m&&r?I(e):(r=a=void 0,o)}function S(){var e=f(),n=E(e);if(r=arguments,a=this,c=e,n){if(void 0===i)return function(e){return d=e,i=setTimeout(A,t),l?I(e):o}(c);if(u)return i=setTimeout(A,t),I(c)}return void 0===i&&(i=setTimeout(A,t)),o}return t=y(t)||0,g(n)&&(l=!!n.leading,s=(u="maxWait"in n)?p(y(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m),S.cancel=function(){void 0!==i&&clearTimeout(i),d=0,r=c=a=i=void 0},S.flush=function(){return void 0===i?o:_(f())},S}},308:(e,t,n)=>{var r="__lodash_hash_undefined__",a=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,i=s||o||Function("return this")();function c(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var a=e.length,s=-1;++s<a;)if(t(e[s],s,e))return s;return-1}(e,l);for(var r=-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}(e,t)>-1}function d(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function l(e){return e!=e}function u(e,t){return e.has(t)}var p,h=Array.prototype,f=Function.prototype,g=Object.prototype,y=i["__core-js_shared__"],m=(p=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",I=f.toString,E=g.hasOwnProperty,A=g.toString,_=RegExp("^"+I.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=i.Symbol,$=g.propertyIsEnumerable,C=h.splice,b=S?S.isConcatSpreadable:void 0,P=Math.max,v=L(i,"Map"),O=L(Object,"create");function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.__data__=new R;++t<n;)this.add(e[t])}function x(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function w(e,t,n,r,a){var s=-1,o=e.length;for(n||(n=j),a||(a=[]);++s<o;){var i=e[s];t>0&&n(i)?t>1?w(i,t-1,n,r,a):d(a,i):r||(a[a.length]=i)}return a}function M(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!W(e)||m&&m in e)return!1;var t=H(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:a;return t.test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e){return G(e)||function(e){return B(e)&&E.call(e,"callee")&&(!$.call(e,"callee")||"[object Arguments]"==A.call(e))}(e)||!!(b&&e&&e[b])}T.prototype.clear=function(){this.__data__=O?O(null):{}},T.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},T.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return E.call(t,e)?t[e]:void 0},T.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:E.call(t,e)},T.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():C.call(t,n,1),0))},N.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},N.prototype.has=function(e){return x(this.__data__,e)>-1},N.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new T,map:new(v||N),string:new T}},R.prototype.delete=function(e){return M(this,e).delete(e)},R.prototype.get=function(e){return M(this,e).get(e)},R.prototype.has=function(e){return M(this,e).has(e)},R.prototype.set=function(e,t){return M(this,e).set(e,t),this},D.prototype.add=D.prototype.push=function(e){return this.__data__.set(e,r),this},D.prototype.has=function(e){return this.__data__.has(e)};var U,F,k=(U=function(e,t){return B(e)?function(e,t,n,r){var a=-1,s=c,o=!0,i=e.length,d=[],l=t.length;if(!i)return d;t.length>=200&&(s=u,o=!1,t=new D(t));e:for(;++a<i;){var p=e[a],h=p;if(p=0!==p?p:0,o&&h==h){for(var f=l;f--;)if(t[f]===h)continue e;d.push(p)}else s(t,h,r)||d.push(p)}return d}(e,w(t,1,B,!0)):[]},F=P(void 0===F?U.length-1:F,0),function(){for(var e=arguments,t=-1,n=P(e.length-F,0),r=Array(n);++t<n;)r[t]=e[F+t];t=-1;for(var a=Array(F+1);++t<F;)a[t]=e[t];return a[F]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(U,this,a)});function V(e,t){return e===t||e!=e&&t!=t}var G=Array.isArray;function B(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!H(e)}(e)}function H(e){var t=W(e)?A.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=k},174:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),g=Array.prototype,y=Function.prototype,m=Object.prototype,I=f["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,$=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=f.Symbol,b=g.splice,P=M(f,"Map"),v=M(Object,"create"),O=C?C.prototype:void 0,T=O?O.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e,t){for(var n=e.length;n--;)if(F(e[n][0],t))return n;return-1}function w(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function M(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!V(e)||E&&E in e)return!1;var t=function(e){var t=V(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}N.prototype.clear=function(){this.__data__=v?v(null):{}},N.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},N.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},N.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:_.call(t,e)},N.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new N,map:new(P||R),string:new N}},D.prototype.delete=function(e){return w(this,e).delete(e)},D.prototype.get=function(e){return w(this,e).get(e)},D.prototype.has=function(e){return w(this,e).has(e)},D.prototype.set=function(e,t){return w(this,e).set(e,t),this};var L=U((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(G(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(d,(function(e,n,r,a){t.push(r?a.replace(l,"$1"):n||e)})),t}));function j(e){if("string"==typeof e||G(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(U.Cache||D),n}function F(e,t){return e===t||e!=e&&t!=t}U.Cache=D;var k=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function G(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:function(e,t){t=function(e,t){if(k(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!G(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return k(e)?e:L(e)}(t);for(var n=0,r=t.length;null!=e&&n<r;)e=e[j(t[n++])];return n&&n==r?e:void 0}(e,t);return void 0===r?n:r}},828:(e,t,n)=>{e=n.nmd(e);var r,a,s,o="[object Map]",i="[object Promise]",c="[object Set]",d="[object WeakMap]",l="[object DataView]",u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),g=t&&!t.nodeType&&t,y=g&&e&&!e.nodeType&&e,m=y&&y.exports===g,I=Function.prototype,E=Object.prototype,A=f["__core-js_shared__"],_=(r=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",S=I.toString,$=E.hasOwnProperty,C=E.toString,b=RegExp("^"+S.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m?f.Buffer:void 0,v=E.propertyIsEnumerable,O=P?P.isBuffer:void 0,T=(a=Object.keys,s=Object,function(e){return a(s(e))}),N=V(f,"DataView"),R=V(f,"Map"),D=V(f,"Promise"),x=V(f,"Set"),w=V(f,"WeakMap"),M=!v.call({valueOf:1},"valueOf"),L=B(N),j=B(R),U=B(D),F=B(x),k=B(w);function V(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!K(e)||function(e){return!!_&&_ in e}(e))return!1;var t=Y(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:u;return t.test(B(e))}(n)?n:void 0}var G=function(e){return C.call(e)};function B(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(N&&G(new N(new ArrayBuffer(1)))!=l||R&&G(new R)!=o||D&&G(D.resolve())!=i||x&&G(new x)!=c||w&&G(new w)!=d)&&(G=function(e){var t=C.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?B(n):void 0;if(r)switch(r){case L:return l;case j:return o;case U:return i;case F:return c;case k:return d}return t});var H=Array.isArray;function W(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Y(e)}var q=O||function(){return!1};function Y(e){var t=K(e)?C.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function K(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(W(e)&&(H(e)||"string"==typeof e||"function"==typeof e.splice||q(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&W(e)}(e)&&$.call(e,"callee")&&(!v.call(e,"callee")||"[object Arguments]"==C.call(e))}(e)))return!e.length;var t=G(e);if(t==o||t==c)return!e.size;if(M||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)}(e))return!T(e).length;for(var n in e)if($.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Array]",i="[object Boolean]",c="[object Date]",d="[object Error]",l="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",f="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",I="[object WeakMap]",E="[object ArrayBuffer]",A="[object DataView]",_=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[s]=$[o]=$[E]=$[i]=$[A]=$[c]=$[d]=$[l]=$[u]=$[p]=$[h]=$[g]=$[y]=$[m]=$[I]=!1;var C="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,P=C||b||Function("return this")(),v=t&&!t.nodeType&&t,O=v&&e&&!e.nodeType&&e,T=O&&O.exports===v,N=T&&C.process,R=function(){try{return N&&N.binding&&N.binding("util")}catch(e){}}(),D=R&&R.isTypedArray;function x(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function w(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function M(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var L,j,U,F=Array.prototype,k=Function.prototype,V=Object.prototype,G=P["__core-js_shared__"],B=k.toString,H=V.hasOwnProperty,W=(L=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",q=V.toString,Y=RegExp("^"+B.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=T?P.Buffer:void 0,z=P.Symbol,J=P.Uint8Array,X=V.propertyIsEnumerable,Q=F.splice,Z=z?z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=K?K.isBuffer:void 0,ne=(j=Object.keys,U=Object,function(e){return j(U(e))}),re=Oe(P,"DataView"),ae=Oe(P,"Map"),se=Oe(P,"Promise"),oe=Oe(P,"Set"),ie=Oe(P,"WeakMap"),ce=Oe(Object,"create"),de=De(re),le=De(ae),ue=De(se),pe=De(oe),he=De(ie),fe=z?z.prototype:void 0,ge=fe?fe.valueOf:void 0;function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ie;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new me(e);this.size=t.size}function _e(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=H.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[Z]=n:delete e[Z]),a}(e):function(e){return q.call(e)}(e)}function $e(e){return ke(e)&&Se(e)==s}function Ce(e,t,n,r,a){return e===t||(null==e||null==t||!ke(e)&&!ke(t)?e!=e&&t!=t:function(e,t,n,r,a,l){var f=Me(e),I=Me(t),_=f?o:Ne(e),S=I?o:Ne(t),$=(_=_==s?h:_)==h,C=(S=S==s?h:S)==h,b=_==S;if(b&&Le(e)){if(!Le(t))return!1;f=!0,$=!1}if(b&&!$)return l||(l=new Ae),f||Ve(e)?be(e,t,n,r,a,l):function(e,t,n,r,a,s,o){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!s(new J(e),new J(t)));case i:case c:case p:return xe(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case u:var l=w;case y:var h=1&r;if(l||(l=M),e.size!=t.size&&!h)return!1;var f=o.get(e);if(f)return f==t;r|=2,o.set(e,t);var I=be(l(e),l(t),r,a,s,o);return o.delete(e),I;case"[object Symbol]":if(ge)return ge.call(e)==ge.call(t)}return!1}(e,t,_,n,r,a,l);if(!(1&n)){var P=$&&H.call(e,"__wrapped__"),v=C&&H.call(t,"__wrapped__");if(P||v){var O=P?e.value():e,T=v?t.value():t;return l||(l=new Ae),a(O,T,n,r,l)}}return!!b&&(l||(l=new Ae),function(e,t,n,r,a,s){var o=1&n,i=Pe(e),c=i.length;if(c!=Pe(t).length&&!o)return!1;for(var d=c;d--;){var l=i[d];if(!(o?l in t:H.call(t,l)))return!1}var u=s.get(e);if(u&&s.get(t))return u==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=o;++d<c;){var f=e[l=i[d]],g=t[l];if(r)var y=o?r(g,f,l,t,e,s):r(f,g,l,e,t,s);if(!(void 0===y?f===g||a(f,g,n,r,s):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var m=e.constructor,I=t.constructor;m==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof I&&I instanceof I||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,a,l))}(e,t,n,r,Ce,a))}function be(e,t,n,r,a,s){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var l=-1,u=!0,p=2&n?new Ee:void 0;for(s.set(e,t),s.set(t,e);++l<i;){var h=e[l],f=t[l];if(r)var g=o?r(f,h,l,t,e,s):r(h,f,l,e,t,s);if(void 0!==g){if(g)continue;u=!1;break}if(p){if(!x(t,(function(e,t){if(o=t,!p.has(o)&&(h===e||a(h,e,n,r,s)))return p.push(t);var o}))){u=!1;break}}else if(h!==f&&!a(h,f,n,r,s)){u=!1;break}}return s.delete(e),s.delete(t),u}function Pe(e){return function(e,t,n){var r=t(e);return Me(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ge,Te)}function ve(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Fe(e)||function(e){return!!W&&W in e}(e))&&(je(e)?Y:_).test(De(e))}(n)?n:void 0}ye.prototype.clear=function(){this.__data__=ce?ce(null):{},this.size=0},ye.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ye.prototype.get=function(e){var t=this.__data__;if(ce){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0},ye.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:H.call(t,e)},ye.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ce&&void 0===t?r:t,this},me.prototype.clear=function(){this.__data__=[],this.size=0},me.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,0))},me.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},me.prototype.has=function(e){return _e(this.__data__,e)>-1},me.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ye,map:new(ae||me),string:new ye}},Ie.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},Ie.prototype.get=function(e){return ve(this,e).get(e)},Ie.prototype.has=function(e){return ve(this,e).has(e)},Ie.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,r),this},Ee.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new me,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof me){var r=n.__data__;if(!ae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,s=[];++n<r;){var o=e[n];t(o)&&(s[a++]=o)}return s}(ee(e),(function(t){return X.call(e,t)})))}:function(){return[]},Ne=Se;function Re(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function De(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function xe(e,t){return e===t||e!=e&&t!=t}(re&&Ne(new re(new ArrayBuffer(1)))!=A||ae&&Ne(new ae)!=u||se&&Ne(se.resolve())!=f||oe&&Ne(new oe)!=y||ie&&Ne(new ie)!=I)&&(Ne=function(e){var t=Se(e),n=t==h?e.constructor:void 0,r=n?De(n):"";if(r)switch(r){case de:return A;case le:return u;case ue:return f;case pe:return y;case he:return I}return t});var we=$e(function(){return arguments}())?$e:function(e){return ke(e)&&H.call(e,"callee")&&!X.call(e,"callee")},Me=Array.isArray,Le=te||function(){return!1};function je(e){if(!Fe(e))return!1;var t=Se(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ke(e){return null!=e&&"object"==typeof e}var Ve=D?function(e){return function(t){return e(t)}}(D):function(e){return ke(e)&&Ue(e.length)&&!!$[Se(e)]};function Ge(e){return function(e){return null!=e&&Ue(e.length)&&!je(e)}(e)?function(e,t){var n=Me(e),r=!n&&we(e),a=!n&&!r&&Le(e),s=!n&&!r&&!a&&Ve(e),o=n||r||a||s,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var d in e)!H.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Re(d,c))||i.push(d);return i}(e):function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||V)}(e))return ne(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e,t){return Ce(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,s="[object Arguments]",o="[object Function]",i="[object Object]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[s]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[o]=l["[object Map]"]=l["[object Number]"]=l[i]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var u,p,h,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,y=f||g||Function("return this")(),m=t&&!t.nodeType&&t,I=m&&e&&!e.nodeType&&e,E=I&&I.exports===m,A=E&&f.process,_=function(){try{return I&&I.require&&I.require("util").types||A&&A.binding&&A.binding("util")}catch(e){}}(),S=_&&_.isTypedArray,$=Array.prototype,C=Function.prototype,b=Object.prototype,P=y["__core-js_shared__"],v=C.toString,O=b.hasOwnProperty,T=(u=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",N=b.toString,R=v.call(Object),D=RegExp("^"+v.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=E?y.Buffer:void 0,w=y.Symbol,M=y.Uint8Array,L=(x&&x.allocUnsafe,p=Object.getPrototypeOf,h=Object,function(e){return p(h(e))}),j=Object.create,U=b.propertyIsEnumerable,F=$.splice,k=w?w.toStringTag:void 0,V=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=x?x.isBuffer:void 0,B=Math.max,H=Date.now,W=ie(y,"Map"),q=ie(Object,"create"),Y=function(){function e(){}return function(t){if(!Ee(t))return{};if(j)return j(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=this.__data__=new z(e);this.size=t.size}function Q(e,t,n){(void 0!==n&&!pe(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Z(e,t,n){var r=e[t];O.call(e,t)&&pe(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(pe(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?function(e){var t=O.call(e,k),n=e[k];try{e[k]=void 0;var r=!0}catch(e){}var a=N.call(e);return r&&(t?e[k]=n:delete e[k]),a}(e):function(e){return N.call(e)}(e)}function re(e){return Ae(e)&&ne(e)==s}function ae(e,t,n,r,a){e!==t&&function(e,t,n){for(var r=-1,a=Object(e),s=n(e),o=s.length;o--;){var i=s[++r];if(!1===t(a[i],i))break}}(t,(function(s,o){if(a||(a=new X),Ee(s))!function(e,t,n,r,a,s,o){var c=le(e,n),d=le(t,n),l=o.get(d);if(l)Q(e,n,l);else{var u,p,h,f,g=s?s(c,d,n+"",e,t,o):void 0,y=void 0===g;if(y){var m=fe(d),I=!m&&ye(d),E=!m&&!I&&_e(d);g=d,m||I||E?fe(c)?g=c:function(e){return Ae(e)&&ge(e)}(c)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):I?(y=!1,g=function(e,t){return e.slice()}(d)):E?(y=!1,f=new(h=(u=d).buffer).constructor(h.byteLength),new M(f).set(new M(h)),p=f,g=new u.constructor(p,u.byteOffset,u.length)):g=[]:function(e){if(!Ae(e)||ne(e)!=i)return!1;var t=L(e);if(null===t)return!0;var n=O.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&v.call(n)==R}(d)||he(d)?(g=c,he(c)?g=function(e){return function(e,t,n,r){var a=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var i=t[s],c=void 0;void 0===c&&(c=e[i]),a?te(n,i,c):Z(n,i,c)}return n}(e,Se(e))}(c):Ee(c)&&!me(c)||(g=function(e){return"function"!=typeof e.constructor||de(e)?{}:Y(L(e))}(d))):y=!1}y&&(o.set(d,g),a(g,d,r,s,o),o.delete(d)),Q(e,n,g)}}(e,t,o,n,ae,r,a);else{var c=r?r(le(e,o),s,o+"",e,t,a):void 0;void 0===c&&(c=s),Q(e,o,c)}}),Se)}K.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},K.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K.prototype.get=function(e){var t=this.__data__;if(q){var n=t[e];return n===r?void 0:n}return O.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:O.call(t,e)},K.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=q&&void 0===t?r:t,this},z.prototype.clear=function(){this.__data__=[],this.size=0},z.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},z.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},z.prototype.has=function(e){return ee(this.__data__,e)>-1},z.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(W||z),string:new K}},J.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return oe(this,e).get(e)},J.prototype.has=function(e){return oe(this,e).has(e)},J.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new z,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof z){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var se=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:be(t),writable:!0})}:Pe;function oe(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ee(e)||function(e){return!!T&&T in e}(e))&&(me(e)?D:c).test(function(e){if(null!=e){try{return v.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ce(e,t){var n=typeof e;return!!(t=null==t?a:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function le(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=H(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(se);function pe(e,t){return e===t||e!=e&&t!=t}var he=re(function(){return arguments}())?re:function(e){return Ae(e)&&O.call(e,"callee")&&!U.call(e,"callee")},fe=Array.isArray;function ge(e){return null!=e&&Ie(e.length)&&!me(e)}var ye=G||function(){return!1};function me(e){if(!Ee(e))return!1;var t=ne(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ie(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var _e=S?function(e){return function(t){return e(t)}}(S):function(e){return Ae(e)&&Ie(e.length)&&!!l[ne(e)]};function Se(e){return ge(e)?function(e,t){var n=fe(e),r=!n&&he(e),a=!n&&!r&&ye(e),s=!n&&!r&&!a&&_e(e),o=n||r||a||s,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var d in e)o&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ce(d,c))||i.push(d);return i}(e):function(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&O.call(e,r))&&n.push(r);return n}(e)}var $e,Ce=($e=function(e,t,n,r){ae(e,t,n,r)},function(e,t){return ue(function(e,t,n){return t=B(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=B(r.length-t,0),o=Array(s);++a<s;)o[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,i)}}(e,void 0,Pe),e+"")}((function(e,t){var n=-1,r=t.length,a=r>1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(a=$e.length>3&&"function"==typeof a?(r--,a):void 0,s&&function(e,t,n){if(!Ee(n))return!1;var r=typeof t;return!!("number"==r?ge(n)&&ce(t,n.length):"string"==r&&t in n)&&pe(n[t],e)}(t[0],t[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++n<r;){var o=t[n];o&&$e(e,o,n,a)}return e})));function be(e){return function(){return e}}function Pe(e){return e}e.exports=Ce},8:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,g=h||f||Function("return this")(),y=Array.prototype,m=Function.prototype,I=Object.prototype,E=g["__core-js_shared__"],A=(r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",_=m.toString,S=I.hasOwnProperty,$=I.toString,C=RegExp("^"+_.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=g.Symbol,P=y.splice,v=j(g,"Map"),O=j(Object,"create"),T=b?b.prototype:void 0,N=T?T.toString:void 0;function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e,t,n){var r=e[t];S.call(e,t)&&G(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function M(e,t){for(var n=e.length;n--;)if(G(e[n][0],t))return n;return-1}function L(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function j(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||A&&A in e)return!1;var t=function(e){var t=H(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function U(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}R.prototype.clear=function(){this.__data__=O?O(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===a?void 0:n}return S.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:S.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?a:t,this},D.prototype.clear=function(){this.__data__=[]},D.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0||(n==t.length-1?t.pop():P.call(t,n,1),0))},D.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},D.prototype.has=function(e){return M(this.__data__,e)>-1},D.prototype.set=function(e,t){var n=this.__data__,r=M(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new R,map:new(v||D),string:new R}},x.prototype.delete=function(e){return L(this,e).delete(e)},x.prototype.get=function(e){return L(this,e).get(e)},x.prototype.has=function(e){return L(this,e).has(e)},x.prototype.set=function(e,t){return L(this,e).set(e,t),this};var F=V((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(W(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(d,(function(e,n,r,a){t.push(r?a.replace(l,"$1"):n||e)})),t}));function k(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(V.Cache||x),n}function G(e,t){return e===t||e!=e&&t!=t}V.Cache=x;var B=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==$.call(e)}e.exports=function(e,t,n){return null==e?e:function(e,t,n,r){if(!H(e))return e;t=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!W(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return B(e)?e:F(e)}(t);for(var a=-1,s=t.length,c=s-1,d=e;null!=d&&++a<s;){var l=k(t[a]),u=n;if(a!=c){var p=d[l];void 0===(u=void 0)&&(u=H(p)?p:U(t[a+1])?[]:{})}w(d,l,u),d=d[l]}return e}(e,t,n)}},795:(e,t,n)=>{var r,a="__lodash_hash_undefined__",s=1/0,o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=p||h||Function("return this")(),g=Array.prototype,y=Function.prototype,m=Object.prototype,I=f["__core-js_shared__"],E=(r=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",A=y.toString,_=m.hasOwnProperty,S=m.toString,$=RegExp("^"+A.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=f.Symbol,b=g.splice,P=L(f,"Map"),v=L(Object,"create"),O=C?C.prototype:void 0,T=O?O.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function w(e){return G(e)?e:U(e)}function M(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!B(e)||E&&E in e)return!1;var t=function(e){var t=B(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?$:u;return t.test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function j(e,t){if(G(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!H(e))||i.test(e)||!o.test(e)||null!=t&&e in Object(t)}N.prototype.clear=function(){this.__data__=v?v(null):{}},N.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},N.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return n===a?void 0:n}return _.call(t,e)?t[e]:void 0},N.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:_.call(t,e)},N.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?a:t,this},R.prototype.clear=function(){this.__data__=[]},R.prototype.delete=function(e){var t=this.__data__,n=x(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},R.prototype.get=function(e){var t=this.__data__,n=x(t,e);return n<0?void 0:t[n][1]},R.prototype.has=function(e){return x(this.__data__,e)>-1},R.prototype.set=function(e,t){var n=this.__data__,r=x(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new N,map:new(P||R),string:new N}},D.prototype.delete=function(e){return M(this,e).delete(e)},D.prototype.get=function(e){return M(this,e).get(e)},D.prototype.has=function(e){return M(this,e).has(e)},D.prototype.set=function(e,t){return M(this,e).set(e,t),this};var U=k((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(H(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(e)}(e);var t=[];return c.test(e)&&t.push(""),e.replace(d,(function(e,n,r,a){t.push(r?a.replace(l,"$1"):n||e)})),t}));function F(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],s=n.cache;if(s.has(a))return s.get(a);var o=e.apply(this,r);return n.cache=s.set(a,o),o};return n.cache=new(k.Cache||D),n}function V(e,t){return e===t||e!=e&&t!=t}k.Cache=D;var G=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function(e,t){return null==e||function(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=j(t,e)?[t]:w(t)).length;null!=e&&n<r;)e=e[F(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(a);++r<a;)s[r]=e[r+t];return s}(t,0,-1))}(e,t=j(t,e)?[t]:w(t));var n,r,a=F((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&_.call(e,a))||delete e[a]}(e,t)}},386:e=>{class t{constructor(e,t,n,r,a){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=d(n,e),this.xor_out=r,this.reflect=a,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let s=this.gen_table();this.table=s,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=s[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:r,crc_shift:a,mask:s}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++)t=(n[255&(t^e[r])]^t>>>8)&s}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+a^e[o])]<<a^t<<8-a&s<<a;t>>=a}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let r=e[n];this.reflect&&(r=d(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=d(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=d(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=d(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,r=e.length>>n,a=1<<n,s="";for(let o=0;o<r;o++){let r="";for(let s=0;s<a;s++){let a=e[o<<n|s];a="000000000"+a.toString(16),a=a.substr(a.length-t),r+="0x"+a+", "}s+=" "+r+"\n"}return s="[\n"+s.slice(0,-3)+"\n]",s}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,a=void 0!==typeof BigInt&&BigInt(256);class s{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%a)),e/=a;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends s{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends s{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(r&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function d(e,t){let n=0;for(let r=0;r<t;r++)n=n<<1|1&e,e>>=1;return n}const l={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function u(e){}e.exports={CRC:t,crc:function(e,n,r,a,s){let o=new t(e,n,r,a,s);return o.calculate.bind(o)},makeBufferConverter:c,models:l,crc1:u,crc6:u,crc8:u,crc10:u,crc16:u,crc24:u,crc32:u,crc32c:u};for(let t in l){let n=l[t];e.exports[t]=n.calculate.bind(n)}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{n.d(r,{v9:()=>mu,DP:()=>zg,RE:()=>Kg,WM:()=>Pg,gm:()=>ry,Yw:()=>Rg,e6:()=>wg,sd:()=>xg,No:()=>ty,DF:()=>Tg,FC:()=>vg,kU:()=>Bg,gu:()=>ny,LF:()=>Og,vg:()=>Ng,jK:()=>Dg,Dw:()=>Hg,x0:()=>kg,HW:()=>Vg,N2:()=>ay,yC:()=>jg,gn:()=>Yg,JP:()=>Wg,fV:()=>Fg,Hk:()=>qg,K5:()=>Jg,P6:()=>Gg,r_:()=>ey,r7:()=>Zg,gA:()=>Xg,V5:()=>Qg,d0:()=>Ug,JR:()=>Mg});var e={};n.r(e),n.d(e,{getDataPageKeys:()=>Rt,getDataPageMetadata:()=>Ct,getEmbeddedPropertyMetadata:()=>It,getFieldParameters:()=>Ot,getFieldsByClassName:()=>vt,getInsight:()=>Pt,getLookUpDataPage:()=>Dt,getLookUpDataPageInfo:()=>xt,getParagraph:()=>Tt,getPersonalizationMetadata:()=>bt,getPropertyMetadata:()=>mt,getSavableDataPage:()=>Nt,mergeStore:()=>yt,resolveNavigation:()=>$t,resolveView:()=>St,updateNavigationStore:()=>At,updateStores:()=>_t,updateViewStore:()=>Et});var t={};n.r(t),n.d(t,{buildContextName:()=>rr,buildModalContext:()=>ir,buildTransientContextName:()=>ar,getContainerIdFromContext:()=>dr,getParentContext:()=>cr,getParentContextName:()=>nr,getTargetFromContext:()=>or,getTransientContext:()=>sr});var a={};n.r(a),n.d(a,{getResolvedTargetName:()=>Ar,getRoutingInfo:()=>_r,getSemanticURLFromRoutingInfo:()=>Sr});var s={};n.r(s),n.d(s,{evaluate:()=>_a,handleChange:()=>Ea,hasDeclareExpression:()=>Ia,updateDeclareExpressions:()=>Aa});var o={};n.r(o),n.d(o,{publishExpressions:()=>ms,publishResponse:()=>Is});var i={};n.r(i),n.d(i,{CONTAINER_NAMES:()=>Oo,CONTAINER_TYPES:()=>vo,addRootContainerItem:()=>si,areContainerItemsPresent:()=>wo,clearTransientData:()=>di,closeContainerItem:()=>ai,getActiveContainerItemContext:()=>Bo,getActiveContainerItemName:()=>Fo,getActiveContext:()=>mi,getChildContainerItems:()=>Ho,getChildContainers:()=>Wo,getChildContainersContexts:()=>qo,getContainerAPI:()=>pi,getContainerAccessOrder:()=>xo,getContainerData:()=>No,getContainerItemData:()=>Ro,getContainerItemName:()=>Lo,getContainerItems:()=>Do,getContainerLimit:()=>Xo,getContainerParentContext:()=>Ai,getContainerType:()=>Uo,getContextByTargetAndKey:()=>Ei,getDataContextName:()=>Go,getLeastRecentlyUsedNonDirtyContainerItemID:()=>ni,getRootContainerName:()=>yi,getSuggestionContexts:()=>Yo,getTargetFromContainerItemID:()=>ri,getTransientItems:()=>ci,hasContainerItems:()=>Jo,isContainerDirty:()=>ti,isContainerInitialized:()=>jo,isContainerItemActive:()=>ko,isContainerItemContextBeingUsedInOtherContainers:()=>ii,isContainerItemExists:()=>Mo,isContainerLimitReached:()=>Zo,isContainerMultipleMode:()=>zo,isContainerSingleMode:()=>Ko,purgeTransientData:()=>li,removeContainer:()=>hi,resetContainersPayload:()=>ei,setContainerLimit:()=>Qo,updateCaseContextEtag:()=>gi,updateParentLastUpdateTime:()=>Ii,updateRelatedContextEtag:()=>fi});var c={};n.r(c),n.d(c,{activateContainerItem:()=>Xi,addContainerItem:()=>Hi,addMessages:()=>Qi,addSharedData:()=>cc,addTransientItem:()=>Wi,addWork:()=>ki,clearTransientData:()=>Yi,createWork:()=>wi,error:()=>ic,finishAssignment:()=>rc,initContainers:()=>Gi,listAction:()=>lc,loadView:()=>Ui,mergeData:()=>Li,openAssignment:()=>ac,openWorkByHandle:()=>Vi,postProcess:()=>oc,purgeTransientData:()=>Ki,removeAllTransientItems:()=>ec,removeContainerItem:()=>Zi,removeSharedData:()=>dc,removeTransientItem:()=>tc,replaceContainerItem:()=>nc,resetContainers:()=>Bi,setSharedProperty:()=>pc,setStateProperty:()=>hc,showCasePreview:()=>uc,showHarness:()=>ji,showHistory:()=>sc,showPage:()=>Fi,upMergeAndRemoveContainerItem:()=>Ji,updateContainerItem:()=>zi,updateTransientData:()=>qi});var d={};n.r(d),n.d(d,{dispatch:()=>Mc,getActionType:()=>Gc,getContextValue:()=>kc,getDataObject:()=>Lc,getReferenceTokens:()=>Dc,getSharedDataObject:()=>jc,getStore:()=>wc,getValue:()=>Fc,isMergeable:()=>Hc,lookupContextValue:()=>Vc,mergeDeep:()=>Wc,removeItem:()=>Bc,replaceValue:()=>Yc,setStore:()=>xc,updateValue:()=>qc});var l={};n.r(l),n.d(l,{doesRestApiExist:()=>Od,getCancelTokenSource:()=>Td,getCaseApi:()=>Dd,getHeaderProcessor:()=>bd,invokeCustomRestApi:()=>vd,invokeRestApi:()=>Pd,isRequestCanceled:()=>Nd,registerInterceptor:()=>Rd});var u={};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}n.r(u),n.d(u,{fetchViewResources:()=>Fd,updateViewResources:()=>Ud});var m="function"==typeof Symbol&&Symbol.observable||"@@observable",I=function(){return Math.random().toString(36).substring(7).split("").join(".")},E={INIT:"@@redux/INIT"+I(),REPLACE:"@@redux/REPLACE"+I(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+I()}};function A(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(y(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(y(1));return n(_)(e,t)}if("function"!=typeof e)throw new Error(y(2));var a=e,s=t,o=[],i=o,c=!1;function d(){i===o&&(i=o.slice())}function l(){if(c)throw new Error(y(3));return s}function u(e){if("function"!=typeof e)throw new Error(y(4));if(c)throw new Error(y(5));var t=!0;return d(),i.push(e),function(){if(t){if(c)throw new Error(y(6));t=!1,d();var n=i.indexOf(e);i.splice(n,1),o=null}}}function p(e){if(!A(e))throw new Error(y(7));if(void 0===e.type)throw new Error(y(8));if(c)throw new Error(y(9));try{c=!0,s=a(s,e)}finally{c=!1}for(var t=o=i,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:E.INIT}),(r={dispatch:p,subscribe:u,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(y(10));a=e,p({type:E.REPLACE})}})[m]=function(){var e,t=u;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(y(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[m]=function(){return this},e},r}function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var $=function(e,t){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},$(e,t)};function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}$(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function b(e,t){var n,r,a,s,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function P(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return o}function O(e,t,n){if(n||2===arguments.length)for(var r,a=0,s=t.length;a<s;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function T(e){return this instanceof T?(this.v=e,this):new T(e)}function N(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{!function(e){e.value instanceof T?Promise.resolve(e.value.v).then(c,d):l(s[0][2],e)}(a[e](t))}catch(e){l(s[0][3],e)}}function c(e){i("next",e)}function d(e){i("throw",e)}function l(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}function R(e){return"function"==typeof e}function D(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}Object.create,Object.create;var x=D((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function w(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var M=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=P(s),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var c=this.initialTeardown;if(R(c))try{c()}catch(e){a=e instanceof x?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var l=P(d),u=l.next();!u.done;u=l.next()){var p=u.value;try{U(p)}catch(e){a=null!=a?a:[],e instanceof x?a=O(O([],v(a)),v(e.errors)):a.push(e)}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(a)throw new x(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)U(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&w(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&w(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),L=M.EMPTY;function j(e){return e instanceof M||e&&"closed"in e&&R(e.remove)&&R(e.add)&&R(e.unsubscribe)}function U(e){R(e)?e():e.unsubscribe()}var F=function(e){function t(t,n){return e.call(this)||this}return C(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(M),k={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=k.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,O([e,t],v(n))):setInterval.apply(void 0,O([e,t],v(n)))},clearInterval:function(e){var t=k.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},V=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return C(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,a=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(a,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(a,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),k.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&k.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,w(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(F),G=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return C(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(V),B={now:function(){return(B.delegate||Date).now()},delegate:void 0},H=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=B.now,e}(),W=function(e){function t(t,n){void 0===n&&(n=H.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return C(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(H),q=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t}(W))(G),Y={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=Y.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,O([e,t],v(n))):setTimeout.apply(void 0,O([e,t],v(n)))},clearTimeout:function(e){var t=Y.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function K(e){Y.setTimeout((function(){throw e}))}function z(){}var J=X("C",void 0,void 0);function X(e,t,n){return{kind:e,value:t,error:n}}function Q(e){e()}var Z=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,j(t)&&t.add(n)):n.destination=ae,n}return C(t,e),t.create=function(e,t,n){return new te(e,t,n)},t.prototype.next=function(e){this.isStopped?re(function(e){return X("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?re(X("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?re(J,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(M);Function.prototype.bind;var ee=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ne(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ne(e)}else ne(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ne(e)}},e}(),te=function(e){function t(t,n,r){var a,s=e.call(this)||this;return a=R(t)||!t?{next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:t,s.destination=new ee(a),s}return C(t,e),t}(Z);function ne(e){K(e)}function re(e,t){var n=null;n&&Y.setTimeout((function(){return n(e,t)}))}var ae={closed:!0,next:z,error:function(e){throw e},complete:z},se="function"==typeof Symbol&&Symbol.observable||"@@observable";function oe(e){return e}function ie(e){return 0===e.length?oe:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var ce=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,a=function(e){return e&&e instanceof Z||function(e){return e&&R(e.next)&&R(e.error)&&R(e.complete)}(e)&&j(e)}(e)?e:new te(e,t,n);return Q((function(){var e=r,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?r._subscribe(a):r._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=de(t))((function(t,r){var a=new te({next:function(t){try{e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[se]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ie(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=de(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function de(e){var t;return null!==(t=null!=e?e:undefined)&&void 0!==t?t:Promise}var le=D((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),ue=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return C(t,e),t.prototype.lift=function(e){var t=new pe(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new le},t.prototype.next=function(e){var t=this;Q((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=P(t.currentObservers),s=a.next();!s.done;s=a.next())s.value.next(e)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;Q((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;Q((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,s=n.observers;return r||a?L:(this.currentObservers=null,s.push(e),new M((function(){t.currentObservers=null,w(s,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new ce;return e.source=this,e},t.create=function(e,t){return new pe(e,t)},t}(ce),pe=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return C(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:L},t}(ue),he=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function fe(e){return R(null==e?void 0:e.then)}function ge(e){return R(e[se])}function ye(e){return Symbol.asyncIterator&&R(null==e?void 0:e[Symbol.asyncIterator])}function me(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Ie="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ee(e){return R(null==e?void 0:e[Ie])}function Ae(e){return N(this,arguments,(function(){var t,n,r;return b(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,T(t.read())];case 3:return n=a.sent(),r=n.value,n.done?[4,T(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,T(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function _e(e){return R(null==e?void 0:e.getReader)}function Se(e){if(e instanceof ce)return e;if(null!=e){if(ge(e))return a=e,new ce((function(e){var t=a[se]();if(R(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(he(e))return r=e,new ce((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(fe(e))return n=e,new ce((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,K)}));if(ye(e))return $e(e);if(Ee(e))return t=e,new ce((function(e){var n,r;try{for(var a=P(t),s=a.next();!s.done;s=a.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}e.complete()}));if(_e(e))return $e(Ae(e))}var t,n,r,a;throw me(e)}function $e(e){return new ce((function(t){(function(e,t){var n,r,a,s;return function(e,t,n,r){return new(n||(n=Promise))((function(t,a){function s(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){e.done?t(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,o)}i((r=r.apply(e,[])).next())}))}(this,0,void 0,(function(){var o,i;return b(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=P(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,a){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,a,(t=e[n](t)).done,t.value)}))}}}(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Ce(e,t,n,r,a){void 0===r&&(r=0),void 0===a&&(a=!1);var s=t.schedule((function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(s),!a)return s}function be(e){return function(t){if(function(e){return R(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function Pe(e,t,n,r,a){return new ve(e,t,n,r,a)}var ve=function(e){function t(t,n,r,a,s,o){var i=e.call(this,t)||this;return i.onFinalize=s,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=a?function(e){try{a(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return C(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(Z);function Oe(e,t){return void 0===t&&(t=0),be((function(n,r){n.subscribe(Pe(r,(function(n){return Ce(r,e,(function(){return r.next(n)}),t)}),(function(){return Ce(r,e,(function(){return r.complete()}),t)}),(function(n){return Ce(r,e,(function(){return r.error(n)}),t)})))}))}function Te(e,t){return void 0===t&&(t=0),be((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Ne(e,t){if(!e)throw new Error("Iterable cannot be null");return new ce((function(n){Ce(n,t,(function(){var r=e[Symbol.asyncIterator]();Ce(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Re(e,t){return t?function(e,t){if(null!=e){if(ge(e))return function(e,t){return Se(e).pipe(Te(t),Oe(t))}(e,t);if(he(e))return function(e,t){return new ce((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(fe(e))return function(e,t){return Se(e).pipe(Te(t),Oe(t))}(e,t);if(ye(e))return Ne(e,t);if(Ee(e))return function(e,t){return new ce((function(n){var r;return Ce(n,t,(function(){r=e[Ie](),Ce(n,t,(function(){var e,t,a;try{t=(e=r.next()).value,a=e.done}catch(e){return void n.error(e)}a?n.complete():n.next(t)}),0,!0)})),function(){return R(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(_e(e))return function(e,t){return Ne(Ae(e),t)}(e,t)}throw me(e)}(e,t):Se(e)}function De(e,t){return be((function(n,r){var a=0;n.subscribe(Pe(r,(function(n){r.next(e.call(t,n,a++))})))}))}function xe(e,t,n){return void 0===n&&(n=1/0),R(t)?xe((function(n,r){return De((function(e,a){return t(n,e,r,a)}))(Se(e(n,r)))}),n):("number"==typeof t&&(n=t),be((function(t,r){return function(e,t,n,r,a,s,o,i){var c=[],d=0,l=0,u=!1,p=function(){!u||c.length||d||t.complete()},h=function(e){d++;var a=!1;Se(n(e,l++)).subscribe(Pe(t,(function(e){t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{d--;for(var e=function(){var e=c.shift();h(e)};c.length&&d<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Pe(t,(function(e){return d<r?h(e):c.push(e)}),(function(){u=!0,p()}))),function(){}}(t,r,e,n)})))}var we=function(e,t){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},we(e,t)};Object.create,Object.create;var Me=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new ue,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}we(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(ce),Le=n(923),je=n(722),Ue=n.n(je),Fe=n(431),ke=n.n(Fe),Ve=n(386),Ge=n(795),Be=n.n(Ge),He=n(174),We=n.n(He),qe=n(8),Ye=n.n(qe),Ke=n(828),ze=n.n(Ke);const Je={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xe;const Qe=new Uint8Array(16);function Ze(){if(!Xe&&(Xe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xe(Qe)}const et=[];for(let e=0;e<256;++e)et.push((e+256).toString(16).slice(1));const tt=function(e,t,n){if(Je.randomUUID&&!t&&!e)return Je.randomUUID();const r=(e=e||{}).random||(e.rng||Ze)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(et[e[t+0]]+et[e[t+1]]+et[e[t+2]]+et[e[t+3]]+"-"+et[e[t+4]]+et[e[t+5]]+"-"+et[e[t+6]]+et[e[t+7]]+"-"+et[e[t+8]]+et[e[t+9]]+"-"+et[e[t+10]]+et[e[t+11]]+et[e[t+12]]+et[e[t+13]]+et[e[t+14]]+et[e[t+15]]).toLowerCase()}(r)},nt={APP:{APP:"app",ROOT:"root",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"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},WORKLIST:"worklist",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:"pzCreateDetails",PREVIEW_VIEW_NAME:"pyCasePreview",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"caseInfo.content.pyViewName",ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"D_pyAdditionalCaseActions"}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGMENT:"Assignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_DONE:"showPageDone"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"}},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",ASSIGMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"}},rt={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PRIMARY:"primary",MODAL:"modal",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",CONTENT:"content",HTTP:"HTTP",PROPERTY:"PROPERTY",MESSAGES:"messages__",PAGE_ERRORS:"page_level_errors",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",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",UI_RESOURCERS:"uiResources",UI_RESOURCERS_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCERS:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",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",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",CONTEXT_DATA_MODAL_VIEW:{IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext"},...nt},at=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(-1!==e.indexOf("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),a=Number(r)+1;return`${e.substring(0,t)}(${a})${e.substring(n+1)}`}return e}));return t.join(".")}};class st{static mergeDeep(e,t){return ke()(t,e)}static getIn(e,t,n){return We()(e,t,n)}static setIn(e,t,n){return Ye()(e,t,n)}static deleteIn(e,t){return Be()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return ze()(e)}static deepClone(e){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;t+=1)if(-1!==" @#$%=!<>/\\".indexOf(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@W ")&&(n=!0);return n}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=n;return t.indexOf(".")>0?t.split(".").forEach((e=>{if(-1!==e.indexOf("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]})):(n[t]={},n=n[t]),Object.keys(e).forEach((t=>{let r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let a=0;for(;a<r.length-1;a+=1){const e=r[a];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[a]]||(t[r[a]]=Array.isArray(n)?[]:{}),Wc(t[r[a]],n,{isArrayDeepMerge:!0})):t[r[a]]=n};static getHashedString(e){return(0,Ve.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return Ue()(e,t)}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([a,s])=>{r.push(Array.isArray(e)?Number(a):a),Array.isArray(s)?(s.forEach(((e,t)=>{t>0&&r.pop(),r.push(t),n(e,r)})),r.pop()):"object"==typeof s?n(s,r):t(r.slice(),s),r.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){return tt()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let a;r.reduce(((e,t,s)=>(a=e[t]?e[t]:Number.isNaN(Number(r[s+1]))?r.length-1===s?n:{}:[],e[t]=a,e[t])),t)})),t}static flatten(e,t="",n){Array.isArray(e)?e.forEach(((e,r)=>{st.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const a=t?`${t}.${r}`:r;st.flatten(e[r],a,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(rt.CASE_INFO.CASE_INFO_CONTENT,"").replace(rt.DATA_INFO.DATA_INFO_CONTENT,"");return at.formatPageReference(n)}static buildAttachmentsFormData(e=[]){return e.map((e=>e.delete?{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:e.responseProps.pzInsKey}:{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}))}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>parseInt(e,10)+1)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>parseInt(e,10)-1)).replace("(","[").replace(")","]")))}static isString(e){return"string"==typeof e}}const ot=st,it={},ct=[],dt=[],lt={},ut={},pt={},ht={},ft={},gt={},yt=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],a=t[n];if(a){const e=Array.isArray(a)?a:[a];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},a={...e[n],...r,...t};e[n]=a}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):ot.copy(e,t)},mt=(e,t)=>{if(!e)return null;const n=lt[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase())):n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass.toLowerCase()===t.toLowerCase()?n:null,r},It=(e,t,n)=>{if(!t||!e)return null;if(!e.includes("."))return{...mt(e,t),embeddedType:n};const[r,...a]=e.split("."),s=mt(r,t);return It(a.join("."),s?.pageClass,s?.type)},Et=e=>{yt(e,ct)},At=e=>{yt(e,dt)},_t=e=>{if(e.views&&yt(e.views,ct),e.navigations&&yt(e.navigations,dt),e.personalizations&&yt(e.personalizations,pt),e.insights&&yt(e.insights,ht),e.paragraphs&&yt(e.paragraphs,it),e.dataTypes&&yt(e.dataTypes,ft),e.datapages&&yt(e.datapages,gt),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{ut[e]=t[e]}))}yt(e.fields,lt)},St=e=>ct[e],$t=e=>dt[e],Ct=e=>e in ut?ut[e]:null,bt=e=>e in pt?pt[e]:null,Pt=e=>e in ht?ht[e]:null,vt=e=>{const t={};return Object.keys(lt).forEach((n=>{const r=lt[n];let a;Array.isArray(r)?a=r.find((t=>e===t.classID)):e===r.classID&&(a=r),a&&(t[n]=ot.deepClone(a))})),t},Ot=(e,t)=>{const n=mt(e,t)?.datasource?.parameters;return n?ot.deepClone(n):null},Tt=(e,t)=>{let n=null;const r=it[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?ot.deepClone(n).content:null},Nt=e=>{if(e in ft){const{savableDataPage:t}=ft[e];return t}return null},Rt=e=>{const t=[];let n=[];if(e in gt){const r=gt[e].classID,{isAlternateKeyStorage:a}=gt[e];return a?gt[e].parameters.forEach((e=>t.push({keyName:e.name,isAlternateKeyStorage:a,linkedField:e.linkedField}))):(n=ft[r].classKeys,n.forEach((e=>t.push({keyName:e,isAlternateKeyStorage:a})))),t}return null},Dt=e=>{if(e in ft){const{lookupDataPage:t}=ft[e];return t}return null},xt=e=>{if(Object.prototype.hasOwnProperty.call(ft,e)){const{lookupDataPageInfo:t}=ft[e];return t}return null},wt=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){ot.copy(e,this.componentMap)}mergeOverrideMap(e={}){ot.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}},Mt=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},Lt=class{static handleAnnotation(e,t){const n=e.indexOf(" "),r=-1===n?e:e.substring(0,n),a=Mt.getHandler(r);return a?a(e.substring(n+1),t):e}static trimAnnotation(e){if(!ot.isString(e))return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return Mt.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=wt.getComponent(t.type);if(!r||!r.mapping)return;const a=r.mapping(t.config);if(a&&a["@map"]){const t=a["@map"],{source:r}=t;if(!r)return;const s=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,s);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];s.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let a=n[r];a&&0===a.indexOf(".")?(a=a.substring(1),t[r]=e[a]):t[r]=a})),r.push(t)}))}}}static getPropertyName(e){if(e&&ot.isString(e)){const t=e.startsWith(rt.PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(ot.isString(e)&&e?.startsWith(rt.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return ot.isString(e)&&!!e?.startsWith(rt.PROPERTY_ANNOTATION)}};var jt=n(492),Ut=n.n(jt);const Ft="SET_PROPERTY",kt="REPLACE_PROPERTY",Vt="FIELD_CHANGE",Gt="LOAD_VIEW",Bt="SHOW_PAGE",Ht="SHOW_DATA",Wt="SHOW_INSIGHT",qt="SHOW_DASHBOARD",Yt="SET_LOADING",Kt="RESET_LOADING",zt="SET_SHARED_PROPERTY",Jt="CREATE_WORK",Xt="OPEN_WORK_BY_HANDLE",Qt="UPDATE_DOCUMENT",Zt="FINISH_ASSIGNMENT",en="CANCEL_ASSIGNMENT",tn="OPEN_ASSIGNMENT",nn="MERGE_DATA",rn="REMOVE_ITEM",an="SHOW_HISTORY",sn="ERROR",on="INIT_CONTAINERS",cn="RESET_CONTAINERS",dn="ADD_CONTAINER_ITEM",ln="REMOVE_CONTAINER_ITEM",un="ADD_TRANSIENT_ITEM",pn="UPDATE_TRANSIENT_DATA",hn="REMOVE_TRANSIENT_ITEM",fn="REMOVE_ALL_TRANSIENT_ITEMS",gn="CLEAR_TRANSIENT_DATA",yn="PURGE_TRANSIENT_DATA",mn="ACTIVATE_CONTAINER_ITEM",In="UPDATE_CONTAINER_ITEM",En="UPMERGE_AND_REMOVE_CONTAINER_ITEM",An="REPLACE_CONTAINER_ITEM",_n="ACTIVATE_MODAL_CONTAINER_ITEM",Sn="REMOVE_CONTAINER",$n="ADD_SUGGESTION_CONTEXT",Cn="showView",bn="showData",Pn="showInsight",vn="showDashboard",On="openWorkByHandle",Tn="openAssignment",Nn="createNewWork",Rn="SHOW_CANCEL_ALERT",Dn="openLocalAction",xn="openProcessAction",wn="caseWideActions",Mn="openBulkAction",Ln="ADD_MESSAGES",jn="CLEAR_MESSAGES",Un="RESET_STORE",Fn="FETCH_DATAPAGE",kn="ADD_SHARED_DATA",Vn="REMOVE_SHARED_DATA",Gn="LIST_ACTION",Bn="DELETE_CASE_SUMMARY",Hn="ALTER_BLOCKING_ACTION_COUNT",Wn="OPEN_EMBEDDED_DATA_MODAL",qn="SUBMIT_EMBEDDED_DATA_MODAL",Yn="FILL_FORM_WITH_AI";let Kn,zn,Jn;const Xn=e=>{e&&(Kn=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},Kn.BASEURL=e.server,Kn.ACTIONURL=e["action-end-point"],Kn.DATAURL=e["data-end-point"],Jn=e.reAuthUrl)},Qn=()=>Jn,Zn=()=>Kn.BASEURL,er={},tr=new Map,nr=e=>{let t=rt.EMPTY_STRING;return t=e&&e.includes(rt.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},rr=(e,t,n=!1)=>{let r=rt.EMPTY_STRING;if(t&&e){let a=`${t}${rt.FORWARD_SLASH_STRING}${e}`;const s=No(a);if(s||t!==rt.APP.APP&&t!==rt.APP.ROOT)if(s){if(n&&er[a])return r=`${a}${rt.UNDERSCORE_STRING}${er[a]}`,r;er[a]?er[a]+=1:er[a]=1,r=`${a}${rt.UNDERSCORE_STRING}${er[a]}`}else r=rr(e,nr(t));else a=`${t}${rt.FORWARD_SLASH_STRING}${rt.PRIMARY}`,er[a]?er[a]+=1:er[a]=1,r=`${a}${rt.UNDERSCORE_STRING}${er[a]}`}return r},ar=(e,t)=>{if(e&&t){const n=(tr[t]?.[e]??0)+1;return tr[t]||(tr[t]={}),tr[t][e]=n,`${t}${rt.FORWARD_SLASH_STRING}${e}_${n}`}return""},sr=(e,t)=>{if(e&&t){const n=tr[t]?.[e];return n?`${t}${rt.FORWARD_SLASH_STRING}${e}_${n}`:ar(e,t)}return""},or=e=>{let t=rt.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},ir=(e,t)=>{if(null===e)return t;const[,n]=t.split(rt.FORWARD_SLASH_STRING);return e+rt.FORWARD_SLASH_STRING+n},cr=e=>{const t=e.indexOf(rt.FORWARD_SLASH_STRING),n=e.lastIndexOf(rt.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},dr=e=>{const t=e.split(rt.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+rt.FORWARD_SLASH_STRING+t[2]},lr=/{(.*?)}/i,ur=/{(.*?)}/g,pr=e=>null!==e.match(lr),hr=e=>(e&&("/"===e[0]&&(e=e.substring(1,e.length)),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1))),e),fr=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},gr=()=>hr(window.location.pathname),yr=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}},mr=class{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>yc.getProperty(".RemoteSystemID",rt.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))}},Ir=new class{constructor(){this.routingInfo,this.appRoutes,this.appRoutesMeta,this.appName,this.appAlias,this.orgName,this.reqContextName,this.reqServletPath,this.defaultViewUrlPath,this.staticRoutesList=[],this.dynamicRoutesList=[],this.appDelimeter,this.reqServletNameReal,this.bDefaultPortal,this.portalName}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this._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.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta},this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{pr(e)?this.dynamicRoutesList.push(e):this.staticRoutesList.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>`${this.getReqContextName()}/${this.getReqServletNameReal()}`;getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>hr(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return e=e.replace(n,""),hr(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t));const{routeKey:r,payload:a}=this.appRoutes[n],{reqType:s,endPoint:o,params:i}=this.appRoutesMeta[r].restApi,c={...a},{caseClassName:d,caseID:l}=c;if(mr.isRemoteCase(d)){const{RemoteClassGroup:e,RemoteSystemID:t}=mr.getRemoteCase(d);c.caseID=l?.replace(d,e?.toUpperCase()),c.RemoteSystemID=t}const u={routeKey:r,requestType:s,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(u,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this._buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let a=r;pr(r)&&r.match(ur).forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,n[t]))}));const s=Lr(a),o=new URL(s);return!this.getPortalName()||o.searchParams.toString().indexOf("portal=")>=0||o.searchParams.append("portal",this.getPortalName()),o.toString()}_buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta[e],a=r.split("/").length,s=r.split("/"),o=Object.keys(this.appRoutes).filter((e=>a===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return s.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const r=this.appRoutes[e].payload,a={...n};delete a.dataViewName,delete a.dataContext;const s=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(ot.isEmpty(s)||ot.isEmpty(a)?o:Object.keys(a).every((e=>Object.prototype.hasOwnProperty.call(s,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,a]=e.includes("?")?e.split("?"):[e];if(a){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const s=new URLSearchParams(a),o={};for(const[r,a]of s.entries())if("string"==typeof a&&pr(a)){const s=this._getDynamicKeyName(a);o[r]=n?t[s]||e[s.toLowerCase()]:t[s]}else"string"==typeof a&&(o[r]=a);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=r;return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta[e]){const{reqType:n,body:r}=this.appRoutesMeta[e].restApi;let{endPoint:a}=this.appRoutesMeta[e].restApi;t&&t.params&&t.params.pageName&&(a=`${a}&pageName=${t.params.pageName}`);const s=a.match(ur);if(s)for(let e=0;e<s.length;e+=1){const n=s[e].replace("{","").replace("}",""),r=new RegExp(s[e],"g");a=a.replace(r,t[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:a,reqType:n,body:e}}return{restApi:a,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[a,s]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=a.split("/"),d=o.split("/"),l={};for(let e=0;e<d.length;e+=1)r[e]=d[e],pr(d[e])&&(l[this._getDynamicKeyName(d[e])]=c[e],r[e]=c[e]);const u=this._getQueryParamsObject(i),p=this._getQueryParamsObject(s),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in u)pr(u[e])?l[e]=p[e]||h[e.toLowerCase()]:l[e]=u[e];let f;s&&(f=this._getQueryParamsResolvedURL(n,p,!0));const g=this._resolvePayload(e,l,n);return{...this._resolveRouteEndPoint(g,n),urlPath:f||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!pr(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(ur);for(let a=0;a<t.length;a+=1){const s=t[a],o=this._getDynamicKeyName(s);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(s,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let a=e[r];if("string"==typeof a&&pr(a)){const e=a.match(ur);for(let n=0;n<e.length;n+=1){const r=e[n],s=this._getDynamicKeyName(r);if(void 0!==t[s]){const e=t[s];a=a.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${s}} in payload- {${s}} is missing in semantic url construct`)}n[r]=a}else"object"==typeof a&&(n[r]=this._resolvePayloadRecursive(a,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList.find((e=>{const[t,a]=e.includes("?")?e.split("?"):[e],s=t.split("/");if(s.length!==r.length)return!1;let o=0;for(o=0;o<s.length;o+=1){const e=s[o].toLowerCase();if(!pr(e)&&e!==r[o]&&fr(e)!==r[o])return!1}if(a){const e=new URLSearchParams(n),t=new URLSearchParams(a),r=new Set,s=new Set;for(const t of e.keys())r.add(t.toLowerCase());for(const e of t.keys())s.add(e.toLowerCase());if(s.size!==r.size)return!1;for(const e of r)if(!s.has(e))return!1}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{yr(e,t,"warning"),yr("Error in Generated Routing Table",null,"error"),yr("Back | Forward for this page may NOT work as intended",null,"warning"),yr("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},Er=Ir,Ar=(e,t)=>{if(!e||!t)return null;let n,r=rt.EMPTY_STRING;return t&&(r=`${t}${rt.FORWARD_SLASH_STRING}${e}`,n=No(r),n||-1!==t.indexOf("/")?n||(r=Ar(e,nr(t))):r=`${t}${rt.FORWARD_SLASH_STRING}${e}`),r},_r=(e,t)=>{const n=Ar(e,t);return n&&No(n)?No(n):{}},Sr=(e,t)=>Er.getSemanticURL(Cn,{page:e},t),$r="replace",Cr=["portal","noPortal","preview","debug","devtool"];let br="",Pr="Home",vr="",Or=!0;const Tr=()=>Or,Nr=(e,t,n)=>Er.getSemanticURL(e,t,n),Rr=(e,t)=>Er.getRestEndPoint(e,t),Dr=(e,t)=>{let n=Zn();const r=Rr(e,t);return r?(r.restApi.startsWith("/")||(r.restApi=`/${r.restApi}`),n.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):null},xr=(e,t,n)=>{const{root:r,resources:a}=e,{views:s}=a,{config:o}=r;let i="";if(n)i=n;else{const e=s[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e),i=t.config.urlPath}const c=i.match(ur);if(c){const e=ot.getIn(t,o.context);i=i.replace(c[0],e.pyID)}return"/"===i[0]&&(i=i.substring(1,i.length)),{pxURLPath:i,historyAction:"add"}},wr=(e,t,n)=>{let r,a;r=hr(t)?`${e}/${t}`:e;const s=hr(n.pxURLPath);s&&(r=`${r}/${s}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==Pr.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!Er.isDefaultPortal()){const e=Er.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return a=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&Cr.includes(n)&&e.append(n,r);return e})(a,c),a.toString()&&(r+=`?${a.toString()}`),r},Mr=(e,t=!1,{urlPathObjParam:n,infoParam:r,optionsParam:a})=>{let s,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(t)s=n,o=r,i=a;else{const{uiResources:t,data:r}=e;({options:i}=e),s=n&&n.pxURLPath&&pr(n.pxURLPath)?xr(t,r,n.pxURLPath):n||xr(t,r),o=Er.getEndPointInfo(s.pxURLPath),s.pxURLPath=o.urlPath}const c=wr(br,Er.getApplicationPath(),s),{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:Er.getApplicationName()),n===`${br}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),a=r.split("/");return/\d/.test(r)?{title:`${e} - ${a[a.length-1]}`}:{title:`${e} - ${a[0]}`}})(vr,Er.getApplicationPath(),c),l=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:d});"add"===s.historyAction?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(l,d,c):s.historyAction===$r&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(l,d,c)},Lr=e=>{const t={pxURLPath:e};return wr(br,Er.getApplicationPath(),t)},jr=e=>{const{uiResources:t}=e;Tr()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,a=t.config,s=a.type,o=a.name;if("VIEW"===s.toUpperCase()){const e=r[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&(e=>{let t=null;e.directUrlUpdation&&(t={historyAction:"add",pxURLPath:""},t.pxURLPath=e.semanticURL),Mr(e,!1,{urlPathObjParam:t,infoParam:null,optionsParam:null})})(e)},Ur=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},Fr=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&Mc(c.showHistory(Ur(t)))},kr=()=>Er.getApplicationPath()!==gr(),Vr=(e,t=!1)=>{var n;br=e.domain,!1===t&&Tr()&&(n=Fr,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),Er.init(e,Pr)},Gr=new class{error=e=>{console.error(e)}},Br=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}}(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels},Hr=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null}setEnvironmentInfo(e){this.environmentInfoObject=e}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 Er.getPortalName()}getApplicationName(){return this.environmentInfoObject.pxApplication.pyRuleName}getUseLocale(){return this.environmentInfoObject.pxLocale.pyUseLocale}getAccessGroup(){return this.environmentInfoObject.pxOperator.pyAccessGroup}getTimeZone(){return this.environmentInfoObject.pxLocale.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return this.brandingInfo=e,this.brandingInfo}setLocale(e){this.locale=e.replace("_","-"),this.environmentInfoObject&&this.environmentInfoObject.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(rt.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}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}getFeatureMap(){return this.environmentInfoObject.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}},Wr="text/javascript",qr=new class{constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null}getTypes={SCRIPT:"script",STYLE:"link"};getStaticServerUrl(){return this.staticServerURL}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return"/"===this.staticServerURL.charAt(this.staticServerURL.length-1)?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=Hr.getBuiltOnAppNames(),a=this.loadAndFilterPegaComponentsConfig(e,r),s=this.loadAndCustomerComponentsConfig(t),o=this.fetchSDKComponent(t),i=[];if(await Promise.all([a,s,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=(e=[])=>{const[t=[],n=[],r=[]]=e,a=[...t,...n];return this.appStaticUrl?a.map((e=>{const{name:t,type:n,subtype:a}=e,s=r.reduce(((e,r)=>(t===r.name&&n===r.type&&a===r.subtype&&(e=r),e)),{});return Object.keys(s).length>0?{...e,alternateDesignSystemConfig:{...s}}:e})):a};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((r=>{let a=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(a=!1):r[e.field]!==e.value&&(a=!1)})),a&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((e=>{this.componentsConfig=e})).catch()}else e=Promise.resolve();return e}async loadAndCustomerComponentsConfig(e){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,a=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(n.alternateDesignSystemURL&&1===a?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);a.data.components[0].alternateDesignSystemConfig=r}return a}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const a=document.createElement("script");a.src=window.URL.createObjectURL(new Blob([r],{type:Wr})),a.onload=()=>t(e),a.onerror=()=>n(e),document.head.appendChild(a)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t={};return t=e?this.loaderObj[e]:(e,t)=>new Promise(((n,r)=>{const a=document.createElement(t);"script"===t?(a.onload=()=>{n(e)},a.onerror=()=>{r(e)},a.type=Wr,a.charset="UTF-8",a.async=!1,a.src=e):(a.type="text/css",a.rel="stylesheet",a.href=e),document.head.appendChild(a)})).catch((e=>{console.log(e)})),t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let a=n?Object.values(e)[0]:this.getStaticServerUrl();a=a.endsWith("/")?a:`${a}/`,this.loadedAssets[t]||(-1!==t.indexOf(".js")?r.push(this.getLoader()(a+t,this.getTypes.SCRIPT)):-1!==t.indexOf(".css")&&this.getLoader()(a+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n)?.tenant_id,{restApi:a,reqType:s}=Rr("getAssetsFromIsolations",{isolationID:r,assetPath:e})||{},o=`${this.appStaticUrl}${a}`;return fetch(o,{method:s,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}};class Yr{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent||e;this.localeStore[t]=n};getLocaleForRule=(e=this.GENERIC_BUNDLE_KEY)=>this.localeStore[e];resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n=this.GENERIC_BUNDLE_KEY){t=t?`${t}.fields`:"fields";const r=this.localeStore[n.toUpperCase()];return(r?ot.getIn(r,t,{}):{})[e]||e}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}static async getLocaleJsons(e){const t=Hr.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:qr.getSvcLocale(t,`${e}.json`)}))),a=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(a.map((async(e,t)=>{if("fulfilled"===e.status){const a=r[t];let s;try{s=await e.value.json()}catch{s=null}s&&n.push({localeRuleKey:a.localeRuleKey,jsonData:s})}})))}return n}async loadLocaleResources(e){const t=Hr.getUseLocale(),n=Hr.getBaseLocale();if(Hr&&t&&t!==n&&e?.length>0)try{(await Yr.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}}const Kr=new Yr;class zr{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=ra[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],r=na[e.tokenType];r&&r.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=ra[this._state];this._subParser=new zr(this._grammar,e,t)}_endSubExpression(){ra[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,zr._setParent(e,this._position)):this._tree=e,this._position=e}}const Jr=zr,Xr="identifier",Qr={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Zr={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},ea={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Qr,AND:Qr,and:Qr,"||":Zr,OR:Zr,or:Zr,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.indexOf(t)>-1},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>-1===e.indexOf(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(t)},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},ta={BinaryExpression:function(e){const t=[];return t[0]=this.evaluateAST(e.left),t[1]=e.right?this.evaluateAST(e.right):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]:this._context.getValue(e.value)},literal:function(e){return"true"===e.value||"false"===e.value?"true"===e.value:e.value},UnaryExpression:function(e){return this._grammar[e.operator].evaluate(e.right)}},na={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};Jr._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:Xr,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},ra={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:Xr},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:na.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},aa=["binaryOperator","unaryOperator","openParenthesis"],sa=/^\s*$/,oa=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,ia=/\\\\/,ca=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],da=["[a-zA-Z_.\\$][(0-9)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]+)"],la=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class ua{constructor(e){this._grammar=e}static _isNegative(e){return aa.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(sa)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(oa)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(ia,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>ua._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[ca.join("|"),e.join("|"),da.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=ua._unquote(e):e.match(la)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(oa)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)ua._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&ua._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const pa=ua,ha=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new class{constructor(e,t){this._grammar={...ea},this._expression=e,this._ast=null,this._context={},this._localDataObject=t}buildAST(){const e=new pa(this._grammar).tokenize(this._expression),t=new Jr(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e){return this._context=e,this.evaluateAST(this._ast)}evaluateAST(e){return ta[e.operationType].call(this,e)}}(n,t)},fa=e=>!e||e.buildAST(),ga=(e,t)=>!e||e.evaluate(t),ya=(e,t,n)=>{const r=ha(e,t),a=fa(r);return ga(a,n)},ma={},Ia=(e,t)=>ma[t]&&Object.prototype.hasOwnProperty.call(ma[t],e),Ea=e=>{const{context:t}=e;Ia(e.reference,t)&&class{static handleExpression(e,t,n,r){(e=>fetch(Kn.BASEURL+Kn.ACTIONURL,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:this.getContext(e,r)}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:yc.getProperyValue(`${n}.pxObjClass`,null,t)||yc.getProperyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>Mc({type:Ft,payload:{context:t,reference:n,value:e[n]}})))}}.handleExpression(e.reference,e.value,ma[t][e.reference],t)},Aa=(e={})=>{ot.copy(e,ma)},_a=(e,t,n)=>ya(e,t,n?.pConnect.getPConnect()),Sa=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const r=this.getContextObjectByName(e);if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}},$a=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}}(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t){t?(e.getValue(this.target)||[]).forEach(((e,n)=>{t.forEach((t=>{const r=Ya(t),a={[r]:e[r]};this.update(a,n+1,!0,{isDefault:!0})}))})):Ga.getEditableFields(this.contextName).filter((t=>t.fieldC11nEnv.getReferenceList()===e.getStateProps().referenceList)).forEach((e=>{const{fieldC11nEnv:t}=e,n=t.getStateProps()?.value;t.isInsideList()&&n&&t.getListActions().updateProperty(n,t.getValue(n),{isDefault:!0})}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,r){const a=class{static execute(e,t,n,r,a,s){const o={instruction:"UPDATE",content:{...ot.unflatten(r)}},i={content:{...o.content},target:ot.buildInstructionPageReference(a,t),listIndex:n,instruction:"UPDATE"};return s||Mc(lc({...o,listIndex:n-1,context:e,referenceList:`${a}${t}`})),i}}.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:s=!1}=r;if(this.initChangeList(t-1),!s){const n=this.changeList?.[this.targetPageReference]?.[t-1].content||{};this.changeList[this.targetPageReference][t-1]=Wc(n,e,r)}if(this.current?.automatic!==s||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(a),s&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=Wc(t,ot.unflatten(e),r)}}delete(e,t){const n=class{static execute(e,t,n,r,a){const s={target:ot.buildInstructionPageReference(r,t),listIndex:n,instruction:"DELETE"};return a||Mc(lc({instruction:"DELETE",listIndex:n-1,context:e,referenceList:`${r}${t}`})),s}}.execute(this.contextName,this.target,e,this.pageReference,t);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n)}insert(e,t,n){const r=class{static execute(e,t,n,r,a,s){const o={};Object.prototype.hasOwnProperty.call(r,"nonFormProperties")&&(r.nonFormProperties.forEach((e=>{o[e]=r[e],delete r[e]})),delete r.nonFormProperties);const i={instruction:"INSERT",content:{...ot.unflatten(r)}},c=JSON.parse(JSON.stringify(i));delete c.content.classID;const d={target:ot.buildInstructionPageReference(a,t),content:{...c.content},listIndex:n,instruction:"INSERT"};return s||(i.content={...i.content,...o},Mc(lc({...i,listIndex:n-1,context:e,referenceList:`${a}${t}`}))),d}}.execute(this.contextName,this.target,t,e,this.pageReference,n);this.initChangeList(t-1);const a=this.changeList?.[this.targetPageReference]?.[t-1].content||{};this.changeList[this.targetPageReference][t-1]=Wc(a,e),this.insertNode(r)}replacePage(e){const t=class{static execute(e,t,n,r){return{content:{...{...ot.unflatten(n)}},target:ot.buildInstructionPageReference(r,t),instruction:"REPLACE"}}}.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=class{static execute(e,t,n,r,a){const s={target:ot.buildInstructionPageReference(a,t),listMoveToIndex:r,listIndex:n,instruction:"MOVE"};return Mc(lc({listIndex:n-1,listMoveToIndex:r-1,context:e,referenceList:`${a}${t}`,instruction:"MOVE"})),s}}.execute(this.contextName,this.target,e,t,this.pageReference);this.insertNode(r)}deleteAll(e){const t=class{static execute(e,t,n,r){return Mc(lc({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${r}`})),{instruction:"DELETE ALL",target:ot.buildInstructionPageReference(n,t)}}}.execute(this.contextName,this.target,this.pageReference,e);this.changeList[this.targetPageReference]=[],this.insertNode(t)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=Wc(t,e)}},Ca={},ba={},Pa={},va=(e,t,n)=>{const r=e.getContextName();Ca[r]||(Ca[r]={}),Ca[r][t]||(Ca[r][t]={content:[]}),ba[r]||(ba[r]=[],Pa[r]=[]),Ba.isStateMachineExist(r,n,t)||Ba.setStateMachine(r,t,n,new $a(t,n,r))},Oa=e=>at.formatPageReference(e),Ta=(e,t)=>{const n=ba[e],r=Pa[e],a=Ya(t),s=a?.substring(0,a.indexOf("["));r?.indexOf(s)<0&&Pa[e].push(s),n?.indexOf(a)<0&&ba[e].push(a)},Na=e=>{delete ba[e]},Ra=e=>Ba.buildPageInstructionsByContext(e,!0),Da=e=>{Ba.clearStateMachines(e),delete Ca[e]},xa=(e,t,n,r)=>{let[,a]=t.split(`${e}[${r}]`);""!==a&&void 0!==a&&(a=a.startsWith(".")?a.substring(1):a,Object.keys(n).forEach((e=>{n[`${a}.${e}`]=n[e],delete n[e]})))},wa=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Ma=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(wa(e,n)){let n=ot.getPropertyName(e);if(n=n.substr(n.indexOf(".")+1).split("."),n.length>1){let e=ot.getIn(t,n)||null;if(!e){const r=`!P!${n.join(":")}`;e=ot.getIn(t,r)||null}ot.setIn(r,n,e)}else{const e=ot.getIn(t,n);r[n[n.length-1]]=e}}})),r},La=(e,t,n,r,a)=>{const s=e.getValue(t)||{};n&&Object.keys(s).length>0&&e.clearErrorMessages({property:r?a:e.getStateProps().value})},ja=e=>{if(!e)return!1;const t=Ra(e);return Array.isArray(t)&&t.length>0},Ua=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?ot.mergeDeep(e,this.fieldDefaults):ot.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class Fa{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRquired(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;if("true"===o.required||!0===o.required){let s=r;"string"==typeof s&&(s=s.trim()),"radiobuttons"===e&&(s=o.value);const c=(PCore.getStoreValue(`.attachmentsList.${t.replace(".","")}`,"context_data",a)||[]).filter((e=>!e.delete));"attachment"===e&&0===c?.length&&(s=""),"checkbox"!==e||s&&"false"!==s||(s=""),i=this.getValidator("required")(s),Fa.messageDispatcher(t,n,a,i,o.label)}return i}validateType(e,t,n,r,a,s){const o=s.getConfigProps();let i=null;const c={pageReference:s.getPageReference(),context:a,property:t,target:s.getTarget()};let d=Ua.getDefaultsforType(s.getComponentName())?.["client-validations"];!1!==d&&this.getValidator(e)&&(i=this.getValidator(e)(r,c),""!==r&&Fa.messageDispatcher(t,n,a,i,o.label));const l=o.validationType;return d=l&&Ua.getDefaultsforType(l)?.["client-validations"],!1!==d&&l&&this.getValidator(l)&&(i=this.getValidator(l)(r,c),Fa.messageDispatcher(t,n,a,i,o.label)),i}validate(e,t,n,r){const a=r.getContextName();let s=null;if(!r.getConfigProps().disabled&&!r.getConfigProps().readOnly){const o=r.getPageReference();r.skipRequiredValidation()||(s=this.validateRquired(e,t,o,n,a,r)),s||(s=this.validateType(e,t,o,n,a,r))}return{message:s}}static messageDispatcher(e,t,n,r,a){if(r){const s=[];s.push({type:nt.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:a,message:r}),bi({messages:s,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const ka=new Fa;class Va{static getChanges(e){return{...ls(e)}}static isStateModified(e){return hs(e)||ja(e)||!!ps(e)}static isFormValid(e){return ns(e)}static clearChangedProperties(e){return Da(e),Na(e),fs(e)}static getEditableFields(e){return rs(e)}static setCustomValidator(e,t){ka.register(e,t)}static isPropertyEditable(e,t){const n=Va.getEditableFields(e);let r=!1;return n.forEach((e=>{e.name===t&&(r=!0)})),r}}const Ga=Va,Ba=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,r){const a=`${n}${t}`,{stateMachine:s}=this.getStateMachineObjByPath(a,e,!0);if(s&&s.targetPageReference!==r.targetPageReference)return s.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][a]||(this.unConnectedStates[e][a]={}),void(this.unConnectedStates[e][a]=r);this.states[e]||(this.states[e]={}),this.states[e][a]||(this.states[e][a]={}),this.states[e][a]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((e=>{const a=n[e];if(a.visibility){const e=a.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),ot.flatten(n,"",r),r}getStateMachinesByContext(e){return this.states?.[e]}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let a=null;for(;e&&!this.isStateMachineExist(t,"",e);)a=null,n&&e.endsWith("]")?(a=e.match(r),a=a[a.length-1].substring(1,a[a.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:a}:{}}executeStateMachine(e,t,n,r=!0,a={}){const{stateMachineTarget:s,index:o}=this.getStateMachineObjByPath(t,e,r);if(!s)return!1;let[,i]=t.split(s);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Ya(i)]:n},d=this.getStateMachine(e,"",s);return null!==o?d.update(c,Number(o)+1,!0,a):d.updatePage(ot.unflatten(c)),!0}registerForServerChanges(){Nc.registerForListChanges(((e,t,n)=>{t.indexOf(".classID")<0&&Ga.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Nc.unRegisterForListChanges()}},Ha={},Wa={},qa={},Ya=e=>"."===e.charAt(0)?e.substring(1):e,Ka=(e="",t="")=>`${Ya(t)}${e?".":""}${Ya(e)}`,za=e=>{delete Ha[e],delete Wa[e],delete qa[e]},Ja=(e,t,n)=>{let r=t;return qa[e]?.[n]&&Object.keys(qa[e][n]).length&&Object.keys(qa[e][n]).forEach((a=>{if(qa[e][n][a]?.getConfigProps().visibility){const s=qa[e][n][a];s.isMounted=t.isMounted,r=s}})),r},Xa=(e,t,n)=>{if(Ha[e]){const r=Ya(Ka(t,n)),a=Ja(e,Ha[e].fieldOrder[r],r);a&&(a.isError=!1,qa[e]?.[r]&&Object.keys(qa[e][r]).forEach((t=>{qa[e][r][t].isError=!1})))}},Qa=()=>Ha,Za=e=>{const t=e.isExpressionExist();return!1!==e.isMounted&&(t&&!1!==e.getConfigProps().visibility||!t&&(void 0===e.getConfigProps().visibility||"true"===e.getConfigProps().visibility||!0===e.getConfigProps().visibility))},es=e=>{const t=e.getConfigProps().readOnly;return!0===t||"true"===t},ts=(e,t={})=>{const n=[];let r=[];const a=[],s=Qa(),{ignoreFieldsInsideList:o=!0}=t;if(s[e])for(const t in s[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(s[e].fieldOrder,t)){const a=s[e].fieldOrder[t],i=Za(a),c=a.isInsideList(),d=a.getStateProps()?.value||a.getStateProps()?.selectionList;if(i&&a.isEditable()&&!es(a))if("Attachment"===a.getMetadata().type){let n=(PCore.getStoreValue(`.attachmentsList.${d.replace(".","")}`,"context_data",e)||[]).filter((e=>`${a.options.pageReference}.${e.label}`===t));n=ot.buildAttachmentsFormData(n),n.length>0&&(r=[...r,...n])}else c&&(!c||o)||Array.isArray(a.getValue(t))?c&&!es(a)&&d&&Ba.executeStateMachine(e,t,a.getValue(d),!1):Ba.executeStateMachine(e,t,a.getValue(d))||n.push(t)}if(Wa[e])for(const t in Wa[e].fieldOrder)Object.prototype.hasOwnProperty.call(Wa[e].fieldOrder,t)&&a.push(t);return{formInputs:n,attachments:r,formPageFields:a}},ns=e=>{const t=Qa();let n,r=!0;if(t[e])for(const a in t[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(t[e].fieldOrder,a)){const s=Ja(e,t[e].fieldOrder[a],a);let o="value",i=s.getStateProps()[o];if(!i){const e=s.getComponentConfig();"multi"===e.selectionMode?o="selectionList":"Editable"===e.renderMode&&(o="referenceList"),i=s.getStateProps()[o]}const c=Za(s);!c||s.isError||es(s)||s.getConfigProps().disabled||s.getValidationApi().validate(s.getValue(i)),!n&&s.isError&&c&&(n=a),r&&s.isError&&c&&(r=!1)}return r},rs=e=>{const t=[],n=Qa();if(n[e])for(const r in n[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(n[e].fieldOrder,r)){const a=n[e].fieldOrder[r];if(Za(a)&&!es(a)&&!a.getConfigProps()?.disabled&&"Attachment"!==a.getMetadata()?.type&&"multirecordlist"!==a.getMetadata()?.config?.type){const e=a.getConfigProps()?.label||a.getConfigProps()?.caption,n=a.getComponentName().toLowerCase();t.push({name:r,label:e,type:n,fieldC11nEnv:a})}}return t},as=class{static getPropertyName(e){return Lt.getPropertyName(e)}static isProperty(e){return Lt.isProperty(e)}static getLeafPropertyName(e){return Lt.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}},ss=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},{APP:os}=rt;let is={},cs={};const ds="You will lose unsaved changes. Do you want to continue?",ls=(e=os.APP,t,n)=>{let r=[],a=[];t||(r=(e=>{const t=Qa(),n=[];if(t[e])for(const r in t[e].fieldOrder)!Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)||!1!==t[e].fieldOrder[r].getConfigProps().visibility&&!1!==t[e].fieldOrder[r].isMounted||n.push(r);return n})(e)),n||(a=(e=>{const t=Qa(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)&&!0===t[e].fieldOrder[r].getConfigProps().readOnly&&n.push(r);return n})(e));const s={},o=is[e]||{};return Object.keys(o).forEach((e=>{Object.prototype.hasOwnProperty.call(o,e)&&-1===r.indexOf(e)&&-1===a.indexOf(e)&&ot.buildObject(e,s,o[e].value)})),s},us=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete is[t]?.[n]},ps=e=>cs[e],hs=e=>{const t=Ra(e)||{};return is[e]&&Object.keys(is[e]).some((t=>is[e][t].initialValue!==is[e][t].value))||Object.keys(t).length>0},fs=e=>{e&&is[e]?is[e]={}:"all"===e&&(is={},cs={}),cs[e]&&(cs[e]=!1)},gs=e=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===Vt&&(Ea(r),(e=>{const t=ot.getPropertyName(e.propertyName),{context:n,pageReference:r,value:a}=e;Nc.triggerCascade(n,`${r}.${t}`,a);const s=Sa.getDependencies(n,`${r}.${t}`),o=Nc.getResetDependencies(n,`${r}.${t}`),i={context:n,datapages:{}};[...s,...o].forEach((e=>{const t=ot.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=t.split("."),r=`.${e.pop()}`,a=e.join(".");Ba.getStateMachine(n,a,r).deleteAll(r)}else Mc({type:Ft,payload:{reference:t,value:"",context:n,isArrayDeepMerge:!0,isImplicit:!0}})})),s.forEach((t=>{let a=r;t.startsWith(r)||(a="");const s=t.replace(`${a}`,"").split(".").filter((e=>!!e));s.pop();const o=s.join("."),c=Fc(`.${o}`,a,n)?.classID||e.classID,d=mt(t.split(".").pop(),c),{datasource:l}=d,u={};let p=[];l.parameters.forEach((e=>{e?.value?(u[e.name]=as.isProperty(e.value)?Fc(`.${ot.getFullPropertyReference([o,ot.getPropertyName(e.value)])}`,a,n):e.value,void 0===u[e.name]||null===u[e.name]||""===u[e.name]?(u[e.name]="",p.push(rt.NULL_STRING)):p.push(u[e.name])):(u[e.name]="",p.push(rt.NULL_STRING))})),p=l.name.concat(rt.UNDERSCORE_STRING,ot.getHashedString(p.join(rt.HASH_DELIMITER)));const{name:h}=l,f=Ct(h);i.datapages[p]={mode:l.mode,propertyName:t,name:l.name,dataViewParameters:u,refreshStrategy:f?.refreshStrategy}})),s.length&&Mc({type:Fn,payload:i})})(r),(((e,t)=>{if(!e||!t)return!1;const n=is[e]&&is[e][t];return!!n&&n.previousValue!==n.value})(r.context,r.reference)||ja(r.context,r.reference))&&Pc(r),PCore.getRefreshManager().triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===Gn){const{context:e,referenceList:t}=r;Pc({context:e,pageReference:t})}if(n===Ft||n===kt){const{reference:e,isImplicit:n,context:a,skipDirtyValidation:s=!1}=r;ss.isPageInstruction(e)||s?s||(cs[`${a}`]=!0):(e=>{const{payload:t}=e,{context:n,initialValue:r="",isStrictTracking:a}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;is[n]=is[n]||{},is[n][s]?is[n][s].previousValue=Fc(t.reference,null,n):(is[n][s]={initialValue:r||Fc(t.reference,null,n)},is[n][s].previousValue=is[n][s].initialValue),is[n][s].value=t.value,a&&is[n][s].value===is[n][s].initialValue&&us(t)})(t),(r.removePropertyFromChangedList||n)&&us(r)}if(n===gn||n===yn){const{transientItemID:e,data:t}=r;ot.iterateLeafNodes(t,(t=>{us({context:e,value:"",reference:t.join(".")})}))}n&&[In,ln,An].includes(n)&&(fs(r.context),Nc.purgeResetDependencies(r.context),Ac(r.context),(r.childContainersContexts||[]).forEach((e=>{fs(e)})),(r.transientItems||[]).forEach((e=>{fs(e)}))),e(t)},ys={},ms=(e,t)=>{e.DeclareExpressions&&Aa({[t.context]:e.DeclareExpressions})},Is=(e,t,n=!1)=>{const r=ot.getIn(e,rt.RESOURCERS);r&&((e=>{e&&_t(e)})(r),ms(r,t),(e=>{var t;e.Theme&&(t=e.Theme,ot.copy(t,ys))})(r)),n||jr({...e,options:t})},Es="component-loader",As={},_s=async(e,t)=>{const n=qr.getLoader(),r=t||qr.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(qr.getLoader(Es))return await qr.getLoader(Es)(e||[],r);const a=[];return e.forEach((e=>{if(As[e])return;const t=wt.getComponent(e);if(t)(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;a.push(n(t,qr.getTypes.SCRIPT))})),(t.styles||[]).forEach((e=>{a.push(n(r+e,qr.getTypes.STYLE))})),As[e]=!0;else{const t=`${qr.getConstellationServiceUrl()}/v860/${qr.getAppAlias()}/component/${e}.js`;a.push(n(t,qr.getTypes.SCRIPT))}})),Promise.all(a)},Ss=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&Mc({type:Yt,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>setTimeout((()=>t(e)),this.pauseDuration)));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&Mc({type:Kt,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]=this.contextArray[e]+1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]=this.contextArray[e]-1)}},$s=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,a="unknown",s,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:a,promise:t,resolve:n,reject:r,actionPayload:s};return this.actionMgrActions[e]=i,o&&Ss.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const a=new Promise(((e,t)=>{n=e,r=t}));return this.register(t,a,n,r,e),{actionMgrID:t,promise:a}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let a=e;return r?(setTimeout((()=>{r.resolve(t)}),0),Ss.disableLoadingIndicator(r.actionPayload,n)):a=null,a}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let a=e;return r?(r.reject(n),Ss.disableLoadingIndicator(r.actionPayload,t)):a=null,a}};class Cs{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const bs=Cs,Ps=e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}return!1},vs=(e,t)=>{if(e&&t){const n=ot.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:a}=n;return"worklist"===a?.toLowerCase()&&r===e}return!1},Os=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},Ts=(e,t)=>{const n=yc.getProperyValue(nt.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=yc.getProperyValue(nt.CASE_INFO.AVAILABLEACTIONS,t,e);let a=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(a=e.type.toLowerCase()===nt.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}return e&&!r&&(a=Lc(e)?.context_data?.actionType===rt.CASE),a},Ns=e=>kc(null,rt.CASE_VIEW_MODE_PROP,e)===rt.PERFORM_MODE&&(-1!==e.indexOf(rt.WORKAREA)||-1!==e.indexOf(rt.MODAL)),Rs=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},Ds=(e,t,n={})=>{let r,a,s,o,i,c;const d=Lc(e);return n?.isTriggeredFromDifferentContext?(r=d.caseInfo.assignments[0].ID,a=d.caseInfo.ID,s=d.caseInfo.assignments,o=d.caseInfo.activeActionID,i=d.caseInfo.availableActions,c=d.caseInfo):(r=t.getValue(nt.CASE_INFO.ASSIGNMENT_ID),a=t.getValue(nt.CASE_INFO.CASE_INFO_ID),s=t.getValue(nt.CASE_INFO.ASSIGNMENTS),o=t.getValue(nt.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(nt.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(nt.CASE_INFO.CASE_INFO)),{assignmentID:r,caseID:a,assignments:s,localActionID:o,caseActions:i,caseInfo:c}},xs=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let a=0,s=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(s=a),a+=1})),r.splice(s,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,a){this.subscribers[e]=this.subscribers[e]||[];let s=!1;if(a&&this.subscribers[e].forEach((e=>{s=e.id===t&&e.contextName===r})),!s){const a=new class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}}(e,t,n,r);this.subscribers[e].push(a)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}},ws=class{static subscribe(e,t,n,r=!1,a="app"){xs.subscribe(e,n,t,a,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){xs.publish(e,t)}static unsubscribe(e,t,n="app"){xs.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){xs.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){xs.clearContext(e)}},Ms=e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Ls={CASE_INFO:`${rt.DATA}.${rt.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${rt.DATA}.${rt.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${rt.DATA}.${rt.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${rt.DATA}.${rt.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${rt.DATA}.${rt.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${rt.DATA}.${rt.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${rt.DATA}.${rt.CASE_INFO.ASSIGNMENT_ID}`},js=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||bs.getTargetViewContainerName(e)},Us=e=>{const t=e.lastIndexOf(rt.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(rt.UNDERSCORE_STRING);return e.substring(t,n)},Fs=e=>e===Oo.WORKAREA,ks=e=>e===Oo.MODAL,Vs=e=>e===sn,Gs=e=>e&&e.find((e=>e.type===sn)),Bs=e=>ot.getIn(e,Ls.CASE_INFO,{}),Hs=e=>e?e.split(" ").pop():void 0,Ws=e=>ot.getIn(e,Ls.CASE_CLASS_NAME,rt.EMPTY_STRING),qs=e=>{const t=Bs(e);return Ps(t)&&vs(Hr.getOperatorIdentifier(),t)},Ys=e=>ot.getIn(e,Ls.CASE_INFO_ID,rt.EMPTY_STRING),Ks=e=>ot.getIn(e,Ls.CASE_FIRST_ASSIGNMENT_ID,rt.EMPTY_STRING),zs=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:a}=n;e.push(oc(Zi,{containerItemID:t,context:a||Go(t),target:r}))}},Js=e=>{const t=wc();if(!e)return!1;const n=nr(e),r=ri(n),a=ri(e);if(!r||!a)return!1;const s=Ro(r,n),o=Ro(a,e);if(!s||!o)return!1;const{key:i}=s||{};let{key:c}=o||{};return c||(c=t.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},Xs=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,a=Ys(t);ot.setIn(e,"key",a);const s=Ps(Bs(t));if(!r&&(e=>{const t=ot.getIn(e,Ls.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=Ks(t),[,r]=n.split("!");(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:s}),ot.setIn(e,"flowName",r)}},Qs=(e,t)=>{const{attachmentsExist:n}=t;n&&ot.setIn(e,nt.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),ot.setIn(e,nt.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},Zs=(e,t,n)=>{let r=rt.PROMISE_VALUE.RESOLVE;return Gs(e)?(r=rt.PROMISE_VALUE.REJECT,n?$s.rejectActionByID(t,!0,n):$s.rejectActionByID(t)):$s.resolveActionByID(t),r},eo=e=>"true"===Hr.getCaseTypeList().filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase,{RESOURCE_TYPES:to}=nt,no={PAGE:"page",FORM:"form"},ro={[to.CASE]:[Nn,On,Tn],[to.PAGE]:[Cn,Pn],[to.DATA]:[bn]},ao=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:a}=n;return e[nt.REMOTE_SYSTEM_ID]||e[nt.REMOTE_SYSTEM_ID.toLowerCase()]||a?r.RemoteSystemID=e[nt.REMOTE_SYSTEM_ID]||e[nt.REMOTE_SYSTEM_ID.toLowerCase()]||a:mr.isRemoteCase(t)&&(r.RemoteSystemID=mr.getRemoteHeader(t)),r},so=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1}=t;let a={};a=((e,t={})=>{const n={},r=Lc(e),{ignoreFieldsInsideList:a=!0}=t;if(r&&r.caseInfo&&r.caseInfo.content){const{formInputs:t,attachments:s,formPageFields:o}=ts(e,{ignoreFieldsInsideList:a});s&&s.length>0&&ot.buildObject("caseInfo.attachments",n,s),o&&o.length>0&&o.forEach((e=>{let t=ot.getIn(r,e);"object"==typeof t&&(t=ot.deepClone(t),delete t?.classID),ot.buildObject(e,n,t)})),t&&t.length>0?t.forEach((e=>{ot.buildObject(e,n,ot.getIn(r,e))})):ot.buildObject("caseInfo.content",n,{})}if(r&&r.dataInfo&&r.dataInfo.content){const{formInputs:t}=ts(e,{ignoreFieldsInsideList:a});t&&t.length>0&&t.forEach((e=>{ot.buildObject(e,n,ot.getIn(r,e))}))}return n})(e),n&&delete a?.caseInfo?.content;const s=ls(e,!1);r&&Object.entries(a?.caseInfo?.content).forEach((([t,n])=>{const r=Lc(e),s=We()(r,nt.CASE_INFO.CASE_INFO_CLASSID);("True-False"===mt(t,s)?.type&&!n||""===n)&&delete a.caseInfo.content[t]}));const o=ke()(s,a);let i={},c=!1;o&&o.caseInfo&&(i={...o.caseInfo},o.caseInfo.attachments&&(c=!0));const d=(l=e,Ba.buildPageInstructionsByContext(l));var l;d&&(i.pageInstructions=d);const u=(e=>ba[e]||[])(e);return u.forEach((e=>{i&&i.content&&ot.deleteIn(i.content,(e=>{if(!e)return"";const t=e.split(".");let n="";for(const e of t)if(e){if(-1!==e.indexOf("[")&&-1!==e.indexOf("]"))return n+=`['${e}']`,n;n+=`['${e}']`}return n})(e))})),o&&o.dataInfo?{...o.dataInfo,pageInstructions:i.pageInstructions}:{content:i,attachmentsExist:c}},oo=(e,t)=>{let n,r,a={};const s=ot.getIn(e,rt.UI_RESOURCERS),o=ot.getIn(e,"confirmationNote");s?(n=ot.getIn(e,rt.UI_RESOURCERS_CONTEXT_DATA),r=ot.getIn(e,rt.ROOT),a=ot.getIn(e,rt.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:d,key:l,flowName:u}=e,p=ot.getIn(e,"nextAssignmentInfo",null),h=ot.getIn(e,"nextAssignmentInfo.context",""),f=ot.getIn(e,"confirmationLinks",null),{isInCreateStage:g,openCaseViewAfterCreate:y,debugInfo:m}=t;return{data:{...i,key:l,flowName:u,coreHeaders:m&&{debugInfo:{[rt.COREHEADER_APP_DEBUG_ID]:m.debugId}},caseInfo:{...i.caseInfo,actionButtons:a,headers:t.headers},[rt.CONTEXT_DATA]:g?{...i[rt.CONTEXT_DATA],...n,openCaseViewAfterCreate:y,errors:c}:{...i[rt.CONTEXT_DATA],...n,errors:c}},semanticURL:d,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:f,key:l,root:r,...t}},io=async(e,t,n,r=!1,a=!1)=>{const s=ot.getIn(e,rt.LOCALE_REFERENCES);await Kr.loadLocaleResources(s);const o=ot.getIn(e,rt.COMPONENTS);if(o)try{await _s(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?jr({...e,options:i,directUrlUpdation:!0}):Is(e,i,a)},co=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},lo=e=>{if(e){const[,t]=e.split("!");return{key:co(e),flowName:t}}return{}},uo=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:a}=t,s=n&&n.response?n.response.data:"",o=(e=>{const t=Qa(),n=[];if(t[e])for(const r in t[e].fieldOrder)Object.prototype.hasOwnProperty.call(t[e].fieldOrder,r)&&!1!==t[e].fieldOrder[r].getConfigProps().visibility&&n.push(r.substring(r.indexOf("content")+8));return n})(r);return a&&$s.rejectActionByID(a),oc(ic,"Error action triggered",s,r,o)},po=(e,t)=>Ko(e)&&Jo(e)?oc(nc,t):oc(Hi,t),ho=(e,t,n=rt.APP.APP,r={})=>{let a=null;const{buildNew:s=!0}=r;return Ko(e)?a=Jo(e)?Fo(e):rr(t,n):zo(e)&&(Jo(e)&&!s?a=Bo(e):Jo(e)&&!s||(a=rr(t,n))),a},fo=e=>e&&e.type===dn,go=e=>{let t=!1;const n=qo(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&hs(r)){t=!0;break}}return t},yo=(e,t={})=>{let n=!1,r=!1,a={},s=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:d,skipChildDirtyState:l=!1}=t;if(Ko(e)){const t=Fo(e),r=Go(t);hs(r)&&(n=!0),l||n||(n=go(t))}else if(zo(e)&&Zo(e)){let t=ni(e);t||(t=Fo(e),r=!0),a.containerItemID=t,a.context=Go(t)}if(n){const e=d||ds;o=window.confirm(Kr.getLocaleValue(e,"Messages"))}if(!o&&n&&(a={},s=!1),r){const e=Kr.getLocaleValue("You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.","Messages");c?i=window.confirm(e):(window.alert(e),s=!1)}return!i&&r&&(a={},s=!1),{continueExecution:s,removeActionPayload:a}},mo=(e,t)=>{let n=!1;const r=Hr.isCoexistenceAppOfType(rt.APP_TYPE.UIKIT),{insKey:a,isParallelCall:s,skipFlowNameCheck:o}=t;if(!a)return{};const[,i]=a.split("!")||"",c=o?a:co(a),d=Lo(e,c);let l={},u=!1;if(d&&!r&&(n=!0,l=Ro(e,d),!o)){let e=l?.flowName;const t=Us(d),r=Ho(d);if(r.length){const n=Ar(t,r[0]);e=Ro(n,r[0])?.flowName}else n=e===i;(e!==i||s)&&(u=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:u,containerItemID:d,semanticURL:l.semanticURL,insKey:a}}},Io=(e,t,n)=>e===to.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,a=Lo(e,r);return a&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:a,semanticURL:r}}})(t,n):e===to.ASSIGNMENT?mo(t,n):e===to.CASE?mo(t,{...n,skipFlowNameCheck:!0}):{},Eo=(e=[])=>{Jo(`${rt.APP.APP}/${rt.PREVIEW}`)&&e.push(oc(Bi,ei({context:nt.APP.APP,name:rt.PREVIEW})))},Ao=e=>{let t;for(const n of Object.keys(ro))if(ro[n].includes(e)){t=n;break}return t},_o=(e,t)=>{const{data:n={},context:r,caseViewMode:a}=e,s={data:{...n},caseViewMode:a,context:nr(r)};ot.deleteIn(s.data,"shared"),ot.setIn(s.data,["context_data","caseViewMode"],a),t.push({type:Bn,payload:{context:s.context}}),t.push(oc(Li,s))},So=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=ot.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=ot.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:ot.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:ot.getIn(t,["payload","context"]),context:ot.getIn(t,["payload","context"])},r={type:en,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),Mc(e),e=e.filter((e=>e.type!==en))}const a=((e,t,n)=>({assignmentID:e,vcName:rt.PRIMARY,targetContainerName:ot.getIn(t,["payload","target"]),context:ot.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);Ko(a.targetContainerName)||t?.payload?.containerName!==rt.WORKAREA||(a.isMultiDoc=!0,e=[]);const s={type:tn,payload:{...a}};e.push(s),Mc(e)}else Mc(e)}},$o=(e,t)=>ke()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Co=e=>{let t={},n=Ai(e);for(;n;){const e=so(n);t=$o(e.content,t),n=Ai(n)}return t},bo=new class{getCoreheaders(e){const t=`${nt.APP.APP}${rt.FORWARD_SLASH_STRING}${rt.PRIMARY}`,n=Fo(t),r=Go(n),a=yc.getProperty(rt.COREHEADERS,"",r);if(a&&e in a)return a[e]}},Po={defaultLimit:16},vo={SINGLE:"single",MULTIPLE:"multiple"},Oo={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},To=()=>wc()?.getState()?.containers,No=e=>e?wc().getState().containers[e]:(Gr.error("getContainerData: target is the required parameter"),null),Ro=(e,t)=>{if(!e||!t)return Gr.error("getContainerItemData: target and containerItem are required parameter"),null;const n=To()[e];return n&&n.items&&n.items[t]||null},Do=e=>e?wc().getState().containers[e]?.items||{}:(Gr.error("getContainerItems: target is the required parameter"),null),xo=e=>e?wc().getState().containers[e]?.accessedOrder||[]:(Gr.error("getContainerAccessOrder: target is the required parameter"),[]),wo=e=>e?xo(e)?.length>0||!1:(Gr.error("areContainerItemsPresent: target is the required parameter"),!1),Mo=(e,t,n)=>{if(!e||!t)return Gr.error("isContainerItemExists: target and key are required parameters"),!1;const r=To()[e],a=r&&r.items||null,s=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(s(t,a[e].key))return!0;return!1},Lo=(e,t,n)=>{if(!e||!t)return Gr.error("getContainerItemName: target and key are required parameters"),null;const r=To()[e],a=r&&r.items||null,s=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(s(t,a[e].key))return e;return null},jo=(e,t)=>{if(!e||!t)return Gr.error("isContainerInitialized: context and name are required parameters"),!1;const n=To();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},Uo=(e,t)=>{if(!e||!t)return Gr.error("getContainerType: context and name are required parameters"),null;const n=To()[`${e}/${t}`];return n&&n.type},Fo=e=>{if(!e)return Gr.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=To();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r;t=a&&a.length>0?a[a.length-1]:null}return t},ko=(e,t,n)=>{if(!e||!t)return Gr.error("isContainerItemActive: target and key are required parameters"),!1;const r=Lo(e,t,n);return!!r&&r===Fo(e)},Vo=(e,t)=>{let n=null;const r=To();for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&r[a].items){const s=r[a].items[e];if(n=s?s[t]:null,n)break}return n},Go=e=>e?Vo(e,"context"):(Gr.error("getDataContextName: containerItemName is required parameters"),null),Bo=e=>{if(!e)return Gr.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=To();if(n&&n[e]){const r=n[e],{accessedOrder:a}=r,s=a&&a.length>0?a[a.length-1]:null;t=Go(s)}return t},Ho=e=>{if(!e)return Gr.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const a=To(),s=n=>{const a=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&a.push(n),n===e&&(r=!0)})),a};for(const e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&a[e].items){const t=s(a[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Wo=e=>{if(!e)return Gr.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=To();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},qo=e=>{if(!e)return Gr.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=To();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&(xo(r)||[]).forEach((n=>{Go(n)!==e&&t.push(Go(n))}));return t},Yo=e=>{const t=[...qo(e),e],n=[],r=wc().getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${rt.SUGGESTION}`)&&n.push(`${e}/${rt.SUGGESTION}`)})),n},Ko=e=>e?e&&No(e)&&No(e).type===vo.SINGLE:(Gr.error("isContainerSingleMode: target is required parameters"),null),zo=e=>e?e&&No(e)&&No(e).type===vo.MULTIPLE:(Gr.error("isContainerMultipleMode: target is required parameters"),null),Jo=e=>e?No(e)&&No(e).items&&Object.keys(No(e)?.items).length>0||!1:(Gr.error("hasContainerItems: target is required parameters"),!1),Xo=e=>e&&Po[e]?Po[e]:Po.defaultLimit,Qo=(e,t=Po.defaultLimit)=>{e?Po[e]=t:Gr.error("setContainerLimit: target is required parameter")},Zo=e=>{if(!e)return Gr.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=No(e),{items:r={}}=n,a=Object.keys(r),s=Xo(e);return a&&a.length>0&&a.length>=s&&(t=!0),t},ei=e=>{if(!e||!e.name||!e.context)return Gr.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=No(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],a=Wo(`${rt.APP.APP}/${rt.PREVIEW}`),s=qo(`${rt.APP.APP}/${rt.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...s],childContainers:a}},ti=e=>{if(!e)return Gr.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=Go(e);return hs(t)||go(e)},ni=e=>{if(!e)return Gr.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=No(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!ti(n)){t=n;break}}return t},ri=e=>{if(!e)return Gr.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=wc().getState();for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(rt.UNDERSCORE_STRING);return e.substring(0,n)},ai=(e,t={})=>{if(!e)return Gr.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=ri(e),r=Go(e),{skipDirtyCheck:a}=t;let s=!0,o=[];if(ti(e)&&!a&&(s=window.confirm(Kr.getLocaleValue(ds,"Messages"))),s){const{accessedOrder:t=[],items:a={},type:s}=No(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=a[i]||{},{semanticURL:d=rt.FORWARD_SLASH_STRING,context:l}=c;o.length>0&&d&&d!==rt.FORWARD_SLASH_STRING?jr({directUrlUpdation:!0,semanticURL:d,options:{containerItemID:i,context:l}}):jr({directUrlUpdation:!0,semanticURL:rt.FORWARD_SLASH_STRING,options:{}}),Mc(Zi({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:s}}))}return Promise.resolve({newAccessedOrder:o})},si=(e,t,n,r)=>{const a="root",s=rr(t,a,!0),o=Ar(t,a),i={data:n,context:r?"app":s},c=[Hi({root:e,containerItemID:s,context:r?"app":s,target:o,containerName:t})];c.push(Li(i)),Mc(c)},oi=(e,t,n)=>{let r=xo(e);r=r.filter((e=>e!==t));let a=!1;for(let e=0;e<r.length;e+=1)if(Go(r[e])===n){a=!0;break}return a},ii=e=>{if(!e)return Gr.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=To(),n=Go(e),r=Object.keys(t);let a=!1;for(let t=0;t<r.length&&(a=oi(r[t],e,n),!a);t+=1);return a},ci=e=>{Array.isArray(e)||(e=[e]);const t=To()||{};return e.map((e=>{const n=ri(e);return ot.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},di=e=>{const t=ot.deepClone(wc().getState().data[e]);ot.iterateLeafNodes(t,(e=>ot.setIn(t,e,""))),Mc(Yi({transientItemID:e,data:t}))},li=e=>{const t=ot.deepClone(wc().getState().data[e]);ot.iterateLeafNodes(t,(e=>ot.setIn(t,e,""))),Mc(Ki({transientItemID:e,data:t}))};class ui{static items;static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const pi=()=>ui,hi=e=>{const t={containerName:e};t.childContainers=Wo(e),Mc({type:Sn,payload:t})},fi=(e,t)=>{const n=Ho(e),{key:r}=Ro(ri(e),e),a=[];n.forEach((e=>{const{key:n}=Ro(ri(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:ri(e),context:e};a.push({type:nn,payload:n})}})),a.length&&Mc(a)},gi=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:ri(e),context:e};n.push({type:nn,payload:r}),n.length&&Mc(n)},yi=()=>Hr.isPortalLoaded?"app":"root",mi=()=>bo,Ii=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:ri(e),context:e};Mc({type:nn,payload:n})},Ei=(e,t)=>{const n=Lo(e,t),r=Lo(`${n}/workarea`,t);return Go(r)},Ai=e=>e?Vo(e,"parentContext"):(Gr.error("getContainerParentContext: containerItemName is required parameters"),null),_i={CONTENT_FIELDS_PATH:[rt.CONTEXT_DATA,rt.CASE_INFO.CASE_INFO,rt.CONTENT],FIELD_MESSAGES_PATH:[rt.CONTEXT_DATA,rt.CASE_INFO.CASE_INFO,rt.CONTENT,rt.SUMMARY_OF_MESSAGES,rt.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[rt.CONTEXT_DATA,rt.SUMMARY_OF_MESSAGES,rt.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[rt.CONTEXT_DATA,rt.SUMMARY_OF_MESSAGES,rt.HTTP_MESSAGES],CASE_MESSAGE_PATH:[rt.CASEMESSAGES]},Si=(e="",t="",n,r)=>{let a,s=[];null!==e&&(a=e&&"."===e[0]?e.substr(1).split("."):e.split("."));const o=t&&"."===t[0]?t.substr(1):t;if(n===rt.PROPERTY&&e||e){s=[rt.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)s.push(a[e]);s.push(rt.SUMMARY_OF_MESSAGES,rt.PROPERTY_MESSAGES,a[a.length-1])}else n===nt.PAGE?s=[..._i.PAGE_MESSAGES_PATH]:n===rt.HTTP?s=[..._i.HTTP_MESSAGES_PATH]:n===rt.CASEMESSAGES?s=[..._i.CASE_MESSAGE_PATH]:r&&(s=[rt.CONTEXT_DATA,...o.split(".")]);return s.filter(Boolean)},$i=e=>{const{type:t,property:n,category:r,context:a,pageReference:s}=e;let o;n&&(o=n.slice(1));const i=Lc(a);let c=[];const d=ot.getIn(i,Si(o,s,r));return t&&"all"!==t?(d&&Array.isArray(d)&&d.length>0&&(c=d.filter((e=>e.type===t))),c):d},Ci=e=>{const{property:t,pageReference:n,category:r,context:a,type:s,isListEntry:o,clearContextMessages:i}=e,c={context:a,type:s};t&&!o?(c.property=t,c.pageReference=n):o?(c.pageReference=n,c.isListEntry=o):c.category=r,Mc(i?{type:jn,payload:{stateObj:e.stateObj,context:a}}:{type:jn,payload:c})},bi=e=>{const{messages:t,property:n,pageReference:r,category:a,context:s}=e,o={messages:t,context:s};n?(o.property=n,o.pageReference=r):o.category=a,Mc({type:Ln,payload:o})},Pi=(e,t,n)=>{for(const r of Object.keys(e))t.push(r),r===rt.SUMMARY_OF_MESSAGES?n.push([...t]):"object"==typeof e[r]&&Pi(e[r],t,n),t.pop();return n},vi=(e,t)=>{let n=$i({context:rt.APP.ROOT,category:"HTTP"});if(e){const e=$i({context:t,category:"HTTP"});n?e&&(n=n.concat($i({context:t,category:"HTTP"}))):n=$i({context:t,category:"HTTP"})}return n},Oi=e=>{let t=null;t=Wo(e)[0]?Fo(Wo(e)[0]):e,t&&Ci({context:t,stateObj:Lc(t),clearContextMessages:!0})},Ti={addMessages:bi,getValidationErrorMessages:e=>{const t=Lc(e),n=[],r=ot.getIn(t,[..._i.FIELD_MESSAGES_PATH])||{};Object.keys(r).forEach((e=>{r[e].length&&r[e][0].type===rt.MESSAGES.MESSAGES_TYPE_ERROR&&(r[e][0].fieldLabel?n.push({label:`${r[e][0].fieldLabel}:`,description:r[e][0].message}):n.push(r[e][0].message))}));const a=ot.getIn(t,[..._i.CONTENT_FIELDS_PATH])||{};return Object.keys(a).forEach((e=>{if(e!==rt.SUMMARY_OF_MESSAGES&&a[e][rt.SUMMARY_OF_MESSAGES]&&a[e][rt.SUMMARY_OF_MESSAGES][rt.PROPERTY_MESSAGES]){const t=a[e][rt.SUMMARY_OF_MESSAGES][rt.PROPERTY_MESSAGES];Object.keys(t).forEach((e=>{t[e].length&&t[e][0].type===rt.MESSAGES.MESSAGES_TYPE_ERROR&&(t[e][0].fieldLabel?n.push({label:`${t[e][0].fieldLabel}:`,description:t[e][0].message}):n.push(t[e][0].message))}))}})),n},getMessages:$i,clearMessages:Ci,getRootContainerHttpMessages:vi,clearContextMessagesInActiveWorkArea:Oi},Ni=Ti,Ri=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},Di=class{static#e=[];static#t=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=Ri.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#n=(e,t,n)=>{for(let r=0;r<e.length;r++){const a=e[r],s={actionHandler:a.handler,component:t,eventType:n,config:a.config};this.#e.push(s)}};static buildActionObject=(e,t)=>{const n={...e};return n.context=t.getContextName(),n.pageReference=t.getPageReference(),n.actionMgrID=$s.getNextActionMgrId(),n};static#r=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,a={};yc.resolveProps(r,a,n),t&&(t(e.eventType,a,n),this.#a())};static#a=()=>{if(!this.#t){if(0===this.#e.length)return;const e=this.#e.shift();this.#r(e),e.config&&"true"===e.config.parallel&&this.#e.length>0&&this.#a()}};static#s=()=>{this.#a()};static#o=(e,t,n)=>{this.#n(e,t,n),this.#s()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return yc.getContextPath(t,n)};static#i(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:a,actions:s}=n[r];if(s){const n=this.getActionHandlers(s,a,t);n&&n.length>0&&this.#o(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();if(Ci({type:nt.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r}),t instanceof Event||t.nativeEvent instanceof Event||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const a=void 0===n?t.value:"value"in n?n.value:n.innerText,s=this.getFullRef(e);Mc({type:Ft,payload:{reference:s,value:a,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||Mc({type:Vt,payload:{reference:s,pageReference:e.getPageReference(),value:a,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(rt.CLASS_ID)}})}else{const n=e.getPageReference(),a=e.getStateProps();for(const e of Object.keys(t)){const s=a[e],o=t[e];Mc({type:Ft,payload:{reference:yc.getContextPath(n,s),value:o,context:r}}),Mc({type:Vt,payload:{reference:yc.getContextPath(n,s),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:a}=n,s=this.getFullRef(e),o=e.getContextName();n.clearMessages&&Ci({type:nt.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?a:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&Mc({type:Vt,payload:{reference:s,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(rt.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#i(e,n)};static pause=()=>{this.#t=!0};static resume=()=>{this.#t=!1,this.#a()};static isQueueEmpty=()=>0===this.#e.length;static clearQueue=()=>{this.#e=[]};static getActionsQueue=()=>this.#e;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},xi="CREATE_WORK",wi=e=>({type:xi,payload:e}),Mi=(e,t)=>{const n=[];for(const r in e)if("object"==typeof e[r]&&-1!==r.indexOf("[")){const a=r.substring(0,r.indexOf("[")),s=r.substring(r.indexOf("[")+1,r.indexOf("]"));t[a].splice(s,1,e[r]),n.push(a)}else"object"==typeof e[r]?(t[r]||(t[r]=Array.isArray(e[r])?[]:{}),Mi(e[r],t[r])):t[r]=e[r];for(const r in t)(Array.isArray(t[r])&&-1===n.indexOf(r)||!Array.isArray(t[r])&&!Object.hasOwnProperty.call(e,r))&&delete t[r]},Li=(e,t={})=>{const{serverPrecedenceFields:n=[]}=t,{context:r,data:a,isArrayDeepMerge:s,preserveClientChanges:o=!1}=e,i=ls(r,!0);((e,t={})=>{const n=Ba.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{ot.buildObject(e,t,n[e])}))})(r,i);const c=Lc(r);let d={};c&&void 0!==c&&(d=JSON.parse(JSON.stringify(c)),Mi(i,d));const l={caseInfo:{content:{...d?.caseInfo?.content}}};let u=a;return o&&(n.forEach((e=>{ot.deleteIn(l,`caseInfo.content.${e}`)})),u=Wc(a,l,{isArrayDeepMerge:!s})),{type:nn,payload:{...e,data:u}}},ji=e=>({type:"SHOW_HARNESS",payload:e}),Ui=e=>({type:Gt,payload:e}),Fi=e=>({type:Bt,payload:e}),ki=e=>({type:"ADD_WORK",payload:e}),Vi=e=>({type:Xt,payload:e}),Gi=e=>({type:on,payload:e}),Bi=e=>({type:cn,payload:e}),Hi=e=>({type:dn,payload:e}),Wi=e=>({type:un,payload:e}),qi=e=>({type:pn,payload:e}),Yi=e=>({type:gn,payload:e}),Ki=e=>({type:yn,payload:e}),zi=e=>{const{containerItemID:t}=e;return e.suggestionContexts=Yo(t),{type:In,payload:e}},Ji=e=>({type:En,payload:e}),Xi=e=>({type:mn,payload:e}),Qi=e=>({type:Ln,payload:e}),Zi=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Go(n)),e.context=r,e.deleteContext=!ii(n),e.childContainers=Wo(n),e.childContainersContexts=qo(n),e.transientItems=ci([...e.childContainersContexts,n]),e.suggestionContexts=Yo(n),n===t&&(e.caseID=Fc(rt.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=Fc(rt.CASE_INFO.REMOTESYSTEMID,"",t)),{type:ln,payload:e}},ec=e=>{const{containerItemID:t}=e;return e.transientItems=ci([...qo(t),t]),{type:fn,payload:e}},tc=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:hn,payload:e}},nc=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=Go(n)),e.context=r,e.childContainers=Wo(n),e.childContainersContexts=qo(n),e.transientItems=ci([...e.childContainersContexts,n]),e.suggestionContexts=Yo(n),n===t&&(e.caseID=Fc(rt.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=Fc(rt.CASE_INFO.REMOTESYSTEMID,"",t)),{type:An,payload:e}},rc=e=>({type:Zt,payload:e}),ac=e=>({type:tn,payload:e}),sc=e=>({type:an,payload:e}),oc=(e,...t)=>(Di.resume(),e(...t)),ic=(e,t,n,r,a)=>({type:sn,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:a}}),cc=e=>({type:kn,payload:e}),dc=e=>({type:Vn,payload:e}),lc=e=>({type:Gn,payload:e}),uc=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),pc=e=>({type:zt,payload:e}),hc=e=>({type:Ft,payload:e}),fc=rt.SUMMARY_OF_LISTS,gc=rt.SUMMARY_OF_WHEN_CONDITIONS,yc=class{static updateData(e){Object.keys(e).forEach((t=>{Mc(Li({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{Mc(Li({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${gc}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return $t([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=St([this.resolveName(e,t)]);let a=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(rt.CLASS_ID)),a=r.filter((e=>e[rt.CLASSID]===n))),0===a.length?r[0]:a[0]):r}static resolveName(e,t){return 0===e.indexOf("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e.startsWith("@")&&(e=Lt.handleAnnotation(e,t)),e)}static getContextPath(e,t){return"number"!=typeof t&&!t||"number"!=typeof(t=Lt.trimAnnotation(t))&&"string"!=typeof t?e:"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:"."===t.charAt(0)?e+t:t}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,a=n.type,{ref:s,name:o,context:i}=n;let c;return i&&(c=i.startsWith(rt.CLASS_ANNOTATION)?i.split(rt.CLASS_ANNOTATION)[1].trim():this.resolveClassID(i,t.getPageReference(),t.getContextName())),"navigation"===a?r=this.resolveNavigation(s||o,t):"view"===a?r=this.resolveView(s||o,t,c||""):"widget"===a&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return Fc(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const a=Vc(`${t}.${fc}`,e,n);a&&(r=this.resolvePropertyReference(t,a,n))}return r}static getProperyValue(e,t,n){return e=Lt.trimAnnotation(e),this.getProperty(e,t,n)}static _handlePropString(e,t,n,r){n.startsWith("@")?e[t]=Lt.handleAnnotation(n,r):e[t]=n}static _resolveProps(e,t){e&&Object.keys(e).forEach((n=>{const r=e[n];"string"==typeof r?this._handlePropString(e,n,r,t):Array.isArray(r)?r.forEach((n=>{this._resolveProps("object"==typeof n?n:e[n],t)})):"object"==typeof r&&this._resolveProps(e[n],t)}))}static resolveProps(e,t,n){return e&&t?(ot.mergeDeep(e,t),this._resolveProps(t,n),t):t}static resolveClassID(e,t,n){let r=`${t}${Lt.trimAnnotation(e)}`;for(;r;){const e=Fc(rt.CLASS_ID,r,n);if(e)return e;r=r.substring(0,r.lastIndexOf("."))}return null}},mc="REFRESH_DATA",Ic=e=>({type:mc,payload:e}),Ec={},Ac=e=>{e&&Ec[e]&&delete Ec[e]},_c=Ut()(((e,t,n,r,a)=>{if(!(e&&n&&t))return;const s=a.actionMgrID||$s.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...a,actionMgrID:s}};a.isFillFormWithAI?Mc((e=>({type:Yn,payload:e}))(o)):Mc(Ic(o))}),100),Sc=(e,t,n,r,a)=>{e&&n&&t&&(r&&(r=ot.convertPageRefToClipboardPageNotation(r)),Mc(Ic({ID:e,viewID:t,context:n,options:a,caseViewAction:!0,interestPage:r})))},$c=(e,t,n)=>{Ec[t]||(Ec[t]={}),Ec[t][e]||(Ec[t][e]={pageReference:n})},Cc=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;return!!mt(n.propertyName,e.getValue(rt.CLASS_ID,n.pageName))?.isDeclarativeTarget},bc=(e,t,n)=>{const r=Ts(e,t),a=yc.getProperyValue(nt.CASE_INFO.ACTIVE_ACTION_ID,t,e)?yc.getProperyValue(nt.CASE_INFO.ACTIVE_ACTION_ID,t,e):yc.getProperyValue(nt.CASE_INFO.ASSIGNMENTACTION_ID,t,e),s=r?yc.getProperyValue(nt.CASE_INFO.CASE_INFO_ID,t,e):yc.getProperyValue(nt.CASE_INFO.ASSIGNMENT_ID,t,e);_c(s,a,e,r,n)},Pc=e=>{const{context:t,pageReference:n}=e,r=(e=>Ec[e]&&Object.keys(Ec[e]).length>0&&Ns(e))(t);if(r)if(yc.getProperyValue(rt.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=yc.getProperyValue(nt.CASE_INFO.CASE_INFO_ID,n,t),r=yc.getProperyValue(rt.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),a=n.replace(rt.CASE_INFO.CASE_INFO_CONTENT,"");Sc(e,r,t,a,{})}else bc(t,n,{})},vc=(e,t)=>(e?.options?.refreshFor&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&(t+="?fillFormWithAI=true"),t),Oc=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,a){const s={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][a]=s}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:r,pageReference:a}=n;Sc(e,r,t,a,{})}}};class Tc{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,a,s="singleRecord"){if(!e||!t||!n||!r?.length>0)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,a);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=ot.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:s})}else i[t]=[{propertyName:o,mode:s}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,r,a){if(!e||!t||!n||!r?.length>0)return;const s=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,a);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=ot.getFullPropertyReference([i,t]),t in o){const e=o[t];ot.removeExistingDependentProperty(e,s)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n=[],r,a){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const s=this.cascadeSubscribers[e][`${t}${n}`];if(!s[a]){s[a]=r;const o=Fc(n,t,e);s.previousValue="object"==typeof value?null:o}}))}registerListField(e,t,n,r,a){const s=Tc._getFieldsForList(e,t,n);s.length>0&&(this.registerFields(e,t,s,r,a),Oc.enableCascade(e))}unRegisterListField(e,t,n,r){const a=Tc._getFieldsForList(e,t,n);a.length>0&&this.unRegisterFields(e,t,a,r)}static _getFieldsForList(e,t,n){const r=[],a=mt(n,Fc("classID",t,e));return a&&a.datasource&&a.datasource.parameters&&Object.values(a.datasource.parameters).forEach((e=>{if(Lt.isProperty(e)){const t=Lt.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n=[],r){this.cascadeSubscribers[e]&&n.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const a=this.cascadeSubscribers[e][`${t}${n}`];a[r]&&delete a[r]}))}triggerCascade(e,t,n,r){let a=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((s=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==s&&o.previousValue!==n&&(a=!0,r?r.add(o[s]):o[s](t,n))})),a&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t,n=rt.CASE_INFO.CASE_INFO_CONTENT){if(!e||!t)return;const r=new Set,a=ot.getIn(e,n);a&&Object.keys(a).length>0&&(this._handleCascadeObject(a,t,n,r),r.forEach((e=>{e()})))}_handleCascadeObject(e,t,n,r){"object"==typeof e?Object.keys(e).forEach((a=>{const s=`${n}.${a}`;this._handleCascadeObject(e[a],t,s,r)})):(this.triggerCascade(t,n,e,r),this._triggerListChanges(t,n,e))}_handlePageReference(e,t,n){let r=e;return"Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1&&(r=`${e}${t.substring(0,t.lastIndexOf("."))}`),r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}_triggerListChanges(e,t,n){0!==this.listChangeSubscribers.length&&/[a-zA-Z]+\.(\d+)\./g.test(t)&&(t=t.replace(/\.(\d+)/g,"[$1]"),this.listChangeSubscribers.forEach((r=>{r(e,t,n)})))}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Nc=new Tc;let Rc=null;const Dc=e=>e.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),xc=e=>{Rc=e},wc=()=>Rc,Mc=e=>{e&&(wc()?.dispatch(e),"MERGE_DATA"===e.type&&Nc.handleServerChanges(e.payload.data,e.payload.context,e.payload.rootPageReference))},Lc=e=>wc().getState().data?.[e],jc=()=>wc().getState().data[rt.SHARED],Uc=(e,t,n)=>{if(!(r=e)||'"'===r.charAt(0)||"'"===r.charAt(0))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const a="."===e.charAt(0)?t+e:e,s=Dc(a);return ot.getIn(n,s)},Fc=(e,t,n)=>Uc(e,t,Lc(n)),kc=(e,t,n)=>Uc(t,e?`${rt.CONTEXT_DATA}.${e}`:`${rt.CONTEXT_DATA}`,Lc(n)),Vc=(e,t,n)=>((e,t,n)=>{const r=Dc(`${t}.${n}`);return ot.getIn(e,r)})(Lc(n),`${rt.CONTEXT_DATA}.${e}`,t),Gc=e=>{const{context:t}=e;if(wc().getState().data[t])return Qt;const{action:n}=e;return-1!==["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].indexOf(n)?dn:Qt},Bc=(e,t)=>{const n=Dc(t);return ot.deleteIn(e,n)},Hc=e=>!Array.isArray(e)&&"object"==typeof e,Wc=(e,t,n={})=>{const{isArrayDeepMerge:r}=n;Array.isArray(e)&&!t&&(t=[]);const a=(e,t)=>{if(Hc(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return ke()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return ke()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return ke()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},qc=(e,t,n,r={})=>{const{isArrayDeepMerge:a=!0}=r,s=Dc(t);if("object"==typeof n){const t=Wc(ot.getIn(e,s),n,{isArrayDeepMerge:a});return ot.setIn(e,s,t)}return ot.setIn(e,s,n)},Yc=(e,t,n)=>{const r=Dc(t);return ot.setIn(e,r,n)};var Kc=n(868),zc=n.n(Kc);function Jc(e,t,n){var r=R(e)||t||n?{next:e,error:t,complete:n}:e;return r?be((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var a=!0;e.subscribe(Pe(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;a=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;a=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;a&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):oe}class Xc{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Xc(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Id(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Ed()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:Er.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const d=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",l=new Uint8Array(64);window.crypto?.getRandomValues(l),this.config.codeVerifier=this.base64UrlSafeEncode(l),this.updateConfig(this.config,!1);const u=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${s}?client_id=${r}&response_type=code&redirect_uri=${a}&scope=openid${u}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${d}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t,this.config)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri;const t=e.indexOf("//"),n=-1!==t?e.indexOf("/",t+2):-1;return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t,!1);const n=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,a=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,s=this.config.tokenUri?this.config.tokenUri:this.config.endPoints.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),d=e||c.get("code"),l=new URLSearchParams;return l.append("client_id",n),r&&l.append("client_secret",r),l.append("grant_type","authorization_code"),l.append("code",d),l.append("redirect_uri",a),l.append("code_verifier",o),ud(s,{method:"POST",headers:new Headers({"content-type":"application/x-www-form-urlencoded"}),body:l.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),md({tokenInfo:e}),yd({Authorization:`${e?.token_type} ${e?.access_token}`});const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const Qc=Xc,Zc=(e,t)=>{(async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Qc(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=Zn()+(Qn()?`${Qn()}`:"/?reAuth=true");return t})(t).then((t=>{const n={openReauthMessageModal:!0,reAutheticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};ws.publish(nt.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},ed=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),td=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},nd=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[rt.COREHEADER_APP_DEBUG_ID]:e.debugId,[rt.COREHEADER_APP_DEBUG_LEVELS]:Br.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=yc.getProperty(rt.COREHEADERS,"",e);return t?{...t,debugInfo:Br.getPreviewMode()&&{...t.debugInfo,[rt.COREHEADER_APP_DEBUG_LEVELS]:Br.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(rt.SKIPCOREHEADERS))return void delete e[rt.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&mr.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},rd=nd,ad="updateSession",sd={},od=new class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};let id={},cd={},dd={},ld="";const ud=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:a=null,cancelContext:s=n,includeRemoteSystemIdIfPresent:o=!0}=r;ld=a,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,withoutDefaultHeaders:d=!1,...l}=t,{Authorization:u,...p}=t.headers||{};d||rd.injectCoreAdditionalHeaders(p,t.body,n,{includeRemoteSystemIdIfPresent:o}),s&&sd[s]>=0?sd[s]+=sd[s]:s&&void 0===sd[s]&&(sd[s]=1);let h=d?{...p}:{...rd.getDefaultHeaders(),...rd.getRegisteredHeaders(),...p,context:n};return e&&ed(e,cd)&&od.getUpdateSessionStatus()||!od.getUpdateSessionStatus()?(ed(e,cd)&&"OAuth2.0"===cd?.authType&&(h={...p}),Re(zc()({context:n,...l,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},headers:{...h,"X-Constellation-App":"Pega"}})).pipe(Jc((()=>{const e=rd.getCoreHeadersFromContext(h.context);e&&(e=>{ws.publish(rt.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))).toPromise()):pd(e,t,n,od)},pd=(e,t,n,r)=>new Promise(((a,s)=>{ws.subscribe(ad,(o=>{r.setUpdateSessionStatus(!o.updateStatus.length>0),"success"===o.updateStatus?ud(e,t,n).then((e=>a(e))).catch((e=>s(e))):s(o.updateStatus.error)}),ad)})),hd=e=>{sd[e]>0&&(sd[e]-=sd[e],0===sd[e]&&delete sd[e])};zc().interceptors.request.use((e=>(id.request&&(e=id.request(e)),e)),(e=>Promise.reject(e))),zc().interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),bi({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||($i({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&Ci({type:"error",category:"HTTP",context:e.config.headers.context}),$i({type:"error",category:e.config.headers.context===rt.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&Ci({type:"error",category:"PAGE",context:e.config.headers.context})),hd(e.config.headers.context)),id.response&&(e=id.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&hd(e.config.headers.context),!e.response||!e.response.status||401!==e.response.status||e.config&&ed(e.config.url,cd)||ws.subscribe(ad,(e=>{od.setUpdateSessionStatus(!e.updateStatus.length>0)}),ad),((e,t,n,r)=>{if(e.config&&ed(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(ws.unsubscribeAllWithEventType(ad),t.setUpdateSessionStatus(!0),"custom"===n?.authType){ws.publish(nt.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:a}=td(e);return pd(n,r,a,t)}return((e,t,n)=>{const{config:r}=e,{url:a,config:s,callback:o}=(e=>{let t="",n={},r={};if("OAuth2.0"===e?.authType){t=e.endPoints.token;const a=new URLSearchParams;a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),a.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:a.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},r={success:(t,n)=>{const{data:r}=t,a={access_token:r?.access_token,refresh_token:r?.refresh_token};md({tokenInfo:{...e.tokenInfo,...a}}),yd({Authorization:`${r?.token_type} ${r?.access_token}`}),n.headers={...n.headers,Authorization:`${r?.token_type} ${r?.access_token}`};const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(r)},failure:t=>{if(e.popupReauth)return Zc(t,e);ws.publish(nt.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${Zn()}/updateSession`,n={method:"GET",headers:{}},r={failure:Zc};return{url:t,config:n,callback:r}})(n),i=r.headers&&r.headers.context;r.data&&(r.body=r.data);const c=pd(r.url,r,i,t);return ud(a,s).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),ws.publish("updateSession",{updateStatus:"success"}),c.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&ed(e.config.url,n)?(o?.failure?.(r.url,n),c):Promise.reject(e)))})(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=td(e);return ud(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[nt.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[nt.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),bi({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)})(e,od,cd,e.response&&e.response.status&&e.response.status===Number(ld)?ld:null))));const fd=()=>zc().CancelToken.source(),gd=e=>zc().isCancel(e),yd=e=>{rd.setDefaultHeaders(e)},md=e=>{cd={...cd,...e}},Id=e=>{dd={...dd,...e}},Ed=()=>({...dd}),Ad={},_d=e=>{const t=fd();return Ad[e]=t,t},Sd={uploadAttachment:(e,t,n,r)=>{const a=new FormData;a.append("appendUniqueIdToFileName",!0),a.append("file",e);const{restApi:s,reqType:o}=Dr("uploadAttachment",{});return ud(s,{method:o,headers:{"Content-Type":"multipart/form-data"},body:a,onUploadProgress:t,signal:_d(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID}))).catch(n?n(gd,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete Ad[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const a={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,a.signal=_d(n).token}const{restApi:s,reqType:o}=Dr("linkCaseAttachment",{caseID:e});return ud(s,{...a,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:a}=Dr("getCaseAttachments",{caseID:e,includeThumbnail:n});return ud(r,{method:a},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:a}=Dr("getAttachmentCategories",{caseID:e,type:t});return ud(r,{method:a},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Dr("downloadAttachment",{attachmentID:e});return ud(r,{method:a,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:a}=Dr("editAttachment",{attachmentID:e});return ud(r,{method:a,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Dr("deleteAttachment",{attachmentID:e});return ud(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Dr("downloadDocument",{documentID:e});return ud(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:a}=Dr("deleteDocument",{caseID:e,documentID:t});return ud(r,{method:a},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"D_pxGetDocumentURL";return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{Ad[e]&&(Ad[e].cancel(),delete Ad[e])}},$d={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Dr("createViewRuleByID");return ud(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Dr("getViewRuleByID",{ID:e});return ud(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:a}=Dr("updateViewRuleByID",{ID:e});return ud(r,{method:a,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Dr("deleteViewRuleByID",{ID:e});return ud(n,{method:r},t).then((e=>e.data))}},Cd=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:a,viewType:s=no.PAGE,pageName:o,context:i=rt.APP.APP,debugInfo:c,headers:d}=t;let l={};n&&n.content&&(l=n.content);const u={caseTypeID:e,content:{...l,...r},processID:a};return Pd("createWork",{body:u,queryPayload:{caseClassName:e,viewType:s,params:{pageName:o}},headers:{...d,...c&&{...rd.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:u,headers:ao(t.headers,e,d)})))}},bd=()=>({registerHeader:(...e)=>rd.registerHeader(...e),unRegisterHeader:(...e)=>rd.unRegisterHeader(...e),getRegisteredHeaders:()=>rd.getRegisteredHeaders()}),Pd=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:a={},responseType:s},o)=>{const{restApi:i,reqType:c}=Dr(e,n),d={method:c,headers:a,body:t,...s&&{responseType:s}};return r&&(d.signal=r.token),ud(i,d,o)},vd=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:a=!1},s)=>(e.startsWith("http:")||e.startsWith("https:")||(e=Zn()+e),ud(e,{method:t,headers:r,body:n,withoutDefaultHeaders:a},s)),Od=e=>Er.doesRestApiExist(e),Td=()=>fd(),Nd=e=>gd(e),Rd=e=>{(e=>{id=e})(e)},Dd=()=>Cd,xd={addCaseFollower:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({users:t.map((e=>({ID:e})))});return Pd("addCaseFollower",{body:a,queryPayload:r},n)},deleteCaseFollower:(e,t,n)=>Pd("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Pd("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},wd={addRelatedCases:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({cases:t});return Pd("addRelatedCases",{body:a,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Pd("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Pd("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},Md="operatorDetails",Ld={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Dr(Md,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Pd(Md,{queryPayload:t})}return t?Pd("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Pd(Md,{body:{dataViewParameters:{ID:e}}})}},jd=(e,t)=>{if(e.confirmationLinks&&(e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return t=((e,t)=>{const n=[e];return t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const n=e,{uiResources:{actionButtons:r,navigation:a},nextAssignmentInfo:s}=n;if(n.data&&n.data.caseInfo){r&&(n.data.caseInfo.actionButtons=r),a&&(n.data.caseInfo.navigation=a),t&&t[nt.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions;const{assignments:s,availableActions:o=[]}=n.data.caseInfo;if(!(s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions))||t&&t[nt.STOPMERGEACTIONS]||(s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||o.push(e)})),n.data.caseInfo.availableActions=o),e.confirmationNote){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}}return t&&t.isCreateDataObject&&(n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),s&&(n.data.nextAssignmentInfo=s),n},Ud=async e=>{const t=jd(e),n=ot.getIn(t,rt.COMPONENTS);Is(t,{},!0),await _s(n)},Fd=(e,t,n)=>yc.resolveView(e,t,n),kd={"Content-Type":"application/json"},Vd=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,a,s,o)=>{o||(this.mentions=[]);let i="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(i=`${i}${e.id},`)})),""===i&&(i="ClearFilters"));let c="";o&&(c=s.getValue("pulse.nextPageFirstEntry"));const d={filterForContext:e,feedID:t,feedClass:n,filterBy:i,pageSize:9,olderThan:c};for(let e=0;e<a.length;e+=1)a[e].cancel();const l=Td();return a.push(l),Pd("getFeedMessages",{queryPayload:d,cancelTokenSource:l},s.getContextName()).then((async e=>{if(200===e.status&&e.data){a.pop();const t=[],n={};let i=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)})),i||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(i=!0)}))}if(i&&await Ud({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:"All",on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:e.pyLabel,disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&s.getValue("pulse.messageIDs")){let r=s.getValue("pulse.messageIDs"),a=s.getValue("pulse.messages");r=[...r,...t],a={...a,...n},Object.values(a).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions)}))})),s.updateState({pulse:{messages:a,messageIDs:r,nextPageFirstEntry:e.data.nextPageFirstEntry?e.data.nextPageFirstEntry:""}})}else s.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e.data.nextPageFirstEntry?e.data.nextPageFirstEntry:""}});const c=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:c}}return s.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{Nd(e)||s.reportError(": Error ocurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,a)=>{const s=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return Pd("postFeedMessages",{body:s,headers:kd},a.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const s=t?.data;if(r){s.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(s,r,a,n.length>0);return a.updateState({pulse:{messages:o,messageIDs:i}}),c}return a.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{a.reportError(": Error ocurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:a=!1})=>{const s=JSON.stringify({message:n});return Pd("editFeedMessage",{queryPayload:{messageID:e},body:s,headers:kd},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(a){n.parentMessageID=t;const{pxResults:e,caseMentions:s}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),s}const{messages:s,caseMentions:o}=this.buildMessageObject(n,a,r,!1);return r.updateState({pulse:{messages:s}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error ocurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const a={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},s=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(s)?.find((e=>e?.ID===a?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===a?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...a},e=n}else e=[...e,a];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(a.ID)?{...s[a.ID],...a}:a,t={...s,[a.ID]:e};return{messages:t,messageIDs:o.includes(a.ID)?o:[a.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:a})=>{const s=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Pd(s,{body:o,queryPayload:{pulseContext:e},headers:kd},a.getContextName()).then((s=>{if(200===s.status)if(r){const r=a.getValue(`pulse.messages.${n}`),s=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const a=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=a-1,r=!1):(e=a+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));a.updateState({pulse:{messages:{[n]:{pxResults:s}}}})}else{const r={...a.getValue(`pulse.messages.${n}`)},s=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=s-1,i=!1):(o=s+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},a.updateState({pulse:{messages:{[e]:r}}})}else a.reportError(`likeMessage call failed with status ${s.status}`,s)})).catch((e=>{a.reportError(": Error ocurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let a=e;t&&(a=n),Pd("deleteFeedMessage",{queryPayload:{messageID:a}},r.getContextName()).then((a=>{if(200===a.status)if(t){const t=r.getValue(`pulse.messages.${e}`),a=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:a}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),a={...r.getValue("pulse.messages")};delete a[e],r.updateState({pulse:{messageIDs:n,messages:a}})}else r.reportError(`deleteMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error ocurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Pd("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error ocurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:a,listSize:s=5}=e,o={pulseContext:n,searchFor:r,mentionsType:a,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Td();return this.mentionsTagsCancelTokenSource.push(i),Pd("getMentionSuggestions",{queryPayload:o,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{Nd(e)||t.reportError(": Error ocurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Pd("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error ocurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,a={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const s=Td();return this.mentionsTagsCancelTokenSource.push(s),Pd("getTagSuggestions",{queryPayload:a,cancelTokenSource:s},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{Nd(e)||t.reportError(": Error ocurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},Gd={getTaggedCases:(e,t)=>Pd("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Pd("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error ocurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const r={caseID:e},a=JSON.stringify({tags:t});return Pd("addTagsToCase",{body:a,queryPayload:r},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error ocurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>Pd("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error ocurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>PCore.getDataPageUtils().getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error ocurred during ajax call getTagsLandingPageURL API : ",t.response)}))},Bd=(e,t)=>{fi(t.getContextName(),e.etag),gi(t.getContextName(),e.etag)},Hd={getParticipants:(e,t)=>Pd("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>Pd("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>Pd("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error ocurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>Pd("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error ocurred during ajax call at getParticipant API : ",e.response)})),createParticipant:(e,t,n,r)=>{const a={caseID:e},{content:s}=n,o={content:s,participantRoleID:t},i={"if-match":r.getCaseSummary().headers.etag};return Pd("createParticipant",{body:o,queryPayload:a,headers:i},r.getContextName()).then((e=>{Bd(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at createParticipant API : ",e.response)}))},updateParticipant:(e,t,n,r)=>{const{content:a}=n,s={content:a},o={caseID:e,participantID:t},i={"if-match":r.getCaseSummary().headers.etag};return Pd("updateParticipant",{body:s,queryPayload:o,headers:i},r.getContextName()).then((e=>{Bd(e.headers,r)})).catch((e=>{r.reportError(": Error ocurred during ajax call at updateParticipant API : ",e.response)}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},a={"if-match":n.getCaseSummary().headers.etag};return Pd("deleteParticipant",{queryPayload:r,headers:a},n.getContextName()).then((e=>{Bd(e.headers,n)})).catch((e=>{n.reportError(": Error ocurred during ajax call at deleteParticipant API : ",e.response)}))}},Wd=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}};function qd(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const Yd="create",Kd="update",zd="delete";function Jd(e,t,n,r){const a=PCore.getMetadataUtils().getPersonalizationMetadata(t);if(a){switch(e){case Yd:case Kd:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(a.allPersonalizations[n]=t),e&&(a.defaultPersonalization=n);break}case zd:delete a.allPersonalizations[n],a.defaultPersonalization===n&&(a.defaultPersonalization="");break;default:return null}return a}return null}const Xd={},Qd=e=>{const t=PCore.getMetadataUtils().getPersonalizationMetadata(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=qd(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Dr("getUIListPersonalizations",{listID:e});return ud(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:qd(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},Zd=(e,t,n)=>{const{restApi:r,reqType:a}=Dr("createListPersonalization",{listID:e});return Jd(Yd,e,t,n),ud(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return Xd[t]=n,e}))},el=(e,t,n)=>{const r=Xd[t]||t;Jd(Kd,e,t,n);const{restApi:a,reqType:s}=Dr("updateListPersonalization",{listID:e,personalizationID:r});return ud(a,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},tl=(e,t)=>{const n=Xd[t]||t;Jd(zd,e,t);const{restApi:r,reqType:a}=Dr("deleteListPersonalization",{listID:e,personalizationID:n});return ud(r,{method:a,body:{}}).then((e=>(Xd[t]&&delete Xd[t],e)))},nl=function(e){return e?{createPersonalization:Zd.bind(null,e),updatePersonalization:el.bind(null,e),deletePersonalization:tl.bind(null,e),fetchPersonalizations:Qd.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},rl=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=No(t);if(n){const r=Fo(t),{items:a={}}=n;return a[r]&&a[r].key===e}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:a}=Dr("loadView",n);return ud(r,{method:a},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:a}=Dr(wn,n);return ud(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const a={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:s}=Dr(wn,a),o=t[e];return ud(`${s}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>Lc(e)?.caseMessages},al={getData:(e,t,n,r={})=>((e,t,n,r={})=>{const a={dataViewName:e},{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:d}=Dr("getListData",a);return ud(c,{method:d,body:t,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:a,reqType:s}=Dr("getListDataCount",r);return ud(a,{method:s,body:t},n)},getDataViewMetadata:(e,t,n)=>{const r={dataViewName:e},a=!!n,s=a?"postDataViewMetadata":"getDataViewMetadata",{restApi:o,reqType:i}=Dr(s,r);return ud(o,a?{method:i,body:{associationFilter:n}}:{method:i},t)},getDataObjectView:(e,t,n,r,a={})=>{const{skipClearErrorMessages:s,signal:o,doNotMergeMessagesForStatusCode:i}=a,c={data_view_ID:e,view_ID:t},d={dataViewParameters:n},{restApi:l,reqType:u}=Dr("readDataObject",c);return ud(l,{method:u,body:d,...o&&{signal:o},...s&&{skipClearErrorMessages:s}},r,i)},getCaseEditMetadata:(e,t)=>rl.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>rl.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>rl.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:a,listClass:s,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:d,reqType:l}=Dr("moveListRecords",c);return ud(d,{method:l,body:{content:{sourceID:n,destinationID:r,context:a,listClass:s}}},t)},isTimeElapsed:(e,t="",n="")=>{if(t){if(e&&n===rt.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===rt.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Wo("root").find((e=>e.includes("authoring-preview")))?`${rt.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${qr.getAppAlias()}-${e}`};var sl=n(308),ol=n.n(sl);const il=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),a=Object.keys(e);0===ol()(r,a).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};dl.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}}("CASE",t)}return this.subscriptions[e]}};class cl{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),a=this.users[e];if(a)return a.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const s={matcher:"PRESENCE",criteria:{userId:e}};return dl.subscribe(s,this._handleUserPresence.bind(this)),r}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],dl.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=qr.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{console.log(`MS : ${Date.now()}`);const e=new WebSocket(`${r}?token=${n}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(`MS catch : ${Date.now()}`),console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=null),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),e&&4001===e.code||this.connectionConfig.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){clearInterval(this.reInitInterval),this.reInitInterval=null;let e=[];null!==this.webSocket&&1===this.webSocket.readyState&&(this.inProgressSubscriptions.forEach((({messageSubscriber:t,id:n})=>{e.includes(n)||(e.push(n),this.subscribeToSocket(t,n))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[]),e=null}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data recieved from messaging service",e.data)}if(t&&t.msgId&&this.webSocket.send(`{"ack":"${t.msgId}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const a=this.subscribers[r];a.filter.matcher===e&&ot.isEqual(a.filter.criteria,n)&&a.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e)}else console.error("filter missing from recieved data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5e3))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const a=r||`${Date.now()}_${this.connectionsCount}`,s=new class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}}(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(s,a),a):(this.inProgressSubscriptions.push({messageSubscriber:s,id:a}),null===this.webSocket&&this.initConnection(this.connectionConfig),a)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static getCaseSubscription=e=>il.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:qr.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(qr.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occured while fetching: ${e}`)}))};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const dl=cl,ll=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,a=n*r;let s=a-r;for(;s<a;s+=1){if(!this.records[s])return this.maxRecords===s?t:[];t.push(this.records[s])}return t}return this.records}mergeRecords(e,t){if(t){const{pageNumber:n,pageSize:r}=t,a=n*r;let s=0;for(let t=a-r+1-1;t<a;t+=1)this.records[t]=e[s],s+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=Wc(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}},ul=new class{isCacheDisabled=!1;constructor(){this.datastore={},this.subscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}getData(e,t={},n,r){const a=this._generateHash(e,t,r);if(null===a)return[];if(this.datastore[e]&&this.datastore[e][a]){const t=this.datastore[e][a];return t.isDirty?[]:t.getRecords(n)}return[]}_generateHash(e,t,n){const r=Ct(e);if(!r)return null;const a=r.parameters||[];let s="",o=e;const i=[];return a.forEach((e=>{t[e.name]?i.push(t[e.name]):i.push(e.defaultValue||rt.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(rt.HASH_DELIMITER)&&(s=ot.getHashedString(i.join(rt.HASH_DELIMITER)),o=e+rt.UNDERSCORE_STRING+s),o}async getDataAsync(e,t,n={},r,a,s={}){if(this._subscribeToMessageService(e),s.purgeDataPageCache&&(this.datastore[e]={}),!this._isCacheable(e,a)||s.invalidateCache){const o=await this._fetchData(e,n,r,a,t,s),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,a);if(o.length>0)return{data:o};const i=await this._fetchData(e,n,r,a,t,s);return{...i.data,data:this._mergeDataStore(e,n,r,a,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){const{restApi:a,reqType:s}=Dr(rt.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:JSON.stringify(n)}),o={method:s};if(r&&r.invalidateCache&&delete this.datastore[e],r&&!r.invalidateCache&&this.datastore[e])return this.datastore[e];const i=a&&0===Object.keys(n).length?a.split("?")[0]:a;return ud(encodeURI(i),o,t).then((t=>(this._isPerInteraction(e)||(this.datastore[e]=t.data||{}),t.data)))}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.datastore[t]||(this.datastore[t]={});const n=e[t];Object.keys(n).forEach((n=>{if(this.datastore[t][n])this.datastore[t][n].mergeRecords(e[t][n].pxResults);else{const r=new ll;this.datastore[t][n]=r,r.mergeRecords(e[t][n].pxResults)}}))}))}_mergeDataStore(e,t,n,r,a){const s=this._generateHash(e,t,r),o=a?.data?.data;if(!o||0===o.length)return[];if(null===s)return o;this.datastore[e]||(this.datastore[e]={}),this.datastore[e][s]||(this.datastore[e][s]=new ll);const i=this.datastore[e][s];return i.mergeRecords(o,n),i.isDirty=!1,i.getRecords(n)}async _fetchData(e,t,n,r,a,s){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=s,d={dataViewParameters:t};return i&&(d.includeTotalCount=!0),o&&(d.useExtendedTimeout=!0),n&&(d.paging=n),r&&(d.query=r),await al.getData(e,d,a,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}_handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t._handleMessage({message:{datapage:e}})}subscribeToUpdate(e,t,n,r,a,s){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},this.subscribers[e].callback[s]||(this.subscribers[e].callback[s]=a),this._subscribeToCascadeUpdates(e,t,n,r,s)}unsubscribe(e,t,n,r,a){delete this.subscribers[e]?.callback[a],t&&t.length>0&&Nc.unRegisterFields(n,r,t,a)}_subscribeToCascadeUpdates(e,t,n,r,a){t&&t.length>0&&Nc.registerFields(n,r,t,this._handleCascadeUpdate.bind({dataPageName:e,scope:this}),a)}_subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};dl.subscribe(t,this._handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}_handleMessage(e){const{msgId:t,message:n}=e,{datapage:r}=n,a=this.subscribers[r];this._markDataInstancsDirty(r),a&&a.callback&&Object.keys(a.callback).forEach((n=>{a.callback[n](e.message,!!t)}))}_markDataInstancsDirty(e){this.datastore[e]&&Object.keys(this.datastore[e]).forEach((t=>{this.datastore[e][t].isDirty=!0}))}_isPerInteraction(e){const t=Ct(e);return t&&t.refreshStrategy&&"reloadOncePerInteraction"===t.refreshStrategy.type}_isCacheable(e,t){return!(this._isPerInteraction(e)||!this.isCacheEnabled||t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}};class pl{constructor(){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache={},this.pageNumber=0}static _searchResultsCache={};static init(e,t){return new Promise(((n,r)=>{const a=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`))].join(rt.HASH_DELIMITER),s=ot.getHashedString(a),o=`${e.dataSource}_${s}`,i=al.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const a=JSON.parse(window.sessionStorage.getItem(i));if(t&&pl._searchResultsCache?.[t]?.[o])n(pl._searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&pl._searchResultsCache?.persisted?.[o])n(pl._searchResultsCache.persisted[o]);else{const s=new pl;s.listType=e.listType,s.dataSource=e.dataSource,e.enablePagination?(s.enablePagination=e.enablePagination,s.pageSize=e.pageSize):s.maxResultsDisplay=e.maxResultsDisplay,s.parameters=e.parameters,s.columns=e.columns,s.matchPosition=e.matchPosition,s.context=t,JSON.stringify(a.associationFilter)===JSON.stringify(e.associationFilter)?(s.dataSourceMetaData=a.dataSourceMetaData,s.isQueryable=a.isQueryable,s.isInitialised=a.isInitialised,s.associationFilter=a.associationFilter,pl.initializeCache(t,e,o,s),n(s)):(s.associationFilter=e.associationFilter,s.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,pl.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)})))}}else if(e.deferDatasource){const r=new pl;r.listType=e.listType,r.dataSource=e.dataSource,e.enablePagination?(r.enablePagination=e.enablePagination,r.pageSize=e.pageSize):r.maxResultsDisplay=e.maxResultsDisplay,r.dataSourceMetaData=e.dataSourceMetaData,r.parameters=e.parameters,r.columns=e.columns,r.matchPosition=e.matchPosition;const a=PCore.getMetadataUtils().getDataPageMetadata(e.dataSource);r.isQueryable=a.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=a,window.sessionStorage.setItem(i,JSON.stringify({isQueryable:a.isQueryable,dataSourceMetaData:a,isInitialised:!0})),r.context=t,pl.initializeCache(t,e,o,r),n(r)}else{const a=new pl;a.listType=e.listType,a.dataSource=e.dataSource,e.enablePagination?(a.enablePagination=e.enablePagination,a.pageSize=e.pageSize):a.maxResultsDisplay=e.maxResultsDisplay,a.dataSourceMetaData=e.dataSourceMetaData,a.parameters=e.parameters,a.columns=e.columns,a.matchPosition=e.matchPosition,a.context=t,a.associationFilter=e.associationFilter,a.fetchMetaData(t).then((r=>{window.sessionStorage.setItem(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,pl.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)}))}}))}static clearContextedCache(e){delete pl._searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===pl._searchResultsCache[e]&&(pl._searchResultsCache[e]={}),pl._searchResultsCache[e][n]=r):(void 0===pl._searchResultsCache.persisted&&(pl._searchResultsCache.persisted={}),pl._searchResultsCache.persisted[n]=r)}fetchMetaData(e){return al.getDataViewMetadata(this.dataSource,e,this.associationFilter)}getData(e){if(this.isQueryable){const t=this.buildSchemaForQueryableDP(e);return ul.getDataAsync(this.dataSource,this.context,t.dataViewParameters,t.paging,t.query)}return this.fetchNonQueryableResults(e)}memoizedGetData(e){if(this.enablePagination?e in this.cache&&this.pageNumber in this.cache[e]:e in this.cache)return this.enablePagination?this.cache[e][this.pageNumber]:this.cache[e];const t=this.getData(e);return this.enablePagination?(this.cache[e]=this.cache[e]||{},this.cache[e][this.pageNumber]=t):this.cache[e]=t,t}fetchData(e,t){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,null!=e&&(e=e.toLowerCase()),this.memoizedGetData(e)):Promise.reject()}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e){return this.fetchedNQData?new Promise((t=>t({data:this.filterNonQueryableData(e)}))):this.dataSourceMetaData.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()?new Promise(((t,n)=>{const r=this.buildSchemaForNonQueryableDP();ul.getDataAsync(this.dataSource,this.context,r.dataViewParameters).then((n=>(this.nonQueryableData=n.data?[...n.data]:[],this.fetchedNQData=!0,t({data:this.filterNonQueryableData(e)})))).catch((e=>n(e)))})):null}filterNonQueryableData(e){const t=this.columns.filter((e=>e.useForSearch)).map((e=>e.value));return this.nonQueryableData.reduce(((n,r)=>(Object.keys(r).every((a=>!(t.includes(a)&&r[a]&&this.positionMatches(r[a],e)&&(n.push({...r}),1)))),n)),[])}positionMatches(e,t){switch(this.matchPosition){case"start":return e.toLowerCase().startsWith(t.toLowerCase());case"contains":return e.toLowerCase().includes(t.toLowerCase());case"equals":return e.toLowerCase()===t.toLowerCase();default:return!1}}buildSelect(){const e=[],t=[];return this.columns.forEach((n=>{if(!t.includes(n.value)){t.push(n.value);const r={field:n.value};e.push(r)}})),e}buildFilters(e){let t={};const n={};this.columns.forEach(((t,r)=>{if(t.useForSearch){const a=`F${r}`,s={field:t.value},o={value:e};let i="CONTAINS";"start"===this.matchPosition?i="STARTS_WITH":"equals"===this.matchPosition&&(i="EQ");const c={...Number.isNaN(parseFloat(e))&&{ignoreCase:"true"},lhs:s,rhs:o,comparator:i};n[a]=c}}));const r=Object.keys(n).join(" OR ");return t={filterConditions:n,logic:r},t}buildQuery(e){return e?{select:this.buildSelect(),filter:this.buildFilters(e),distinctResultsOnly:"true"}:{select:this.buildSelect(),distinctResultsOnly:"true"}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e){return{dataViewParameters:this.parameters,query:this.buildQuery(e),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const hl=pl,fl="getDataObjects",gl=["LocalList","RemoteList","PromptList","DataPage"];let yl=null;function ml(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const Il={getDataObjects:function(){const e=al.getAppCacheKey(fl);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=Dr(fl,{}),r=ud(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(yl)return yl;const t=al.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=Dr("getDataPages",{datapageRequestType:"explorable"});return yl=ud(n,{method:r,datapageRequestType:"explorable"}),yl.then((e=>{yl=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),yl},getDataViewMetadata:function(e,t=!1,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=PCore.getMetadataUtils().getDataPageMetadata(e);if(t&&t.classID){let e=PCore.getMetadataUtils().getFieldsByClassName(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!ot.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=PCore.getMetadataUtils().getEmbeddedPropertyMetadata(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(t.rdFields?.fields??t.rdFields),a=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||a&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&gl.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:ml(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n};return PCore.getDataApi().init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=al.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=Dr("getListData",{dataViewName:"D_pzGetDefaultColumns"}),a=ud(n,{method:r,body:{dataViewParameters:e}});return a.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=PCore.getMetadataUtils().getDataPageMetadata(e),n=t?.rdFields?.fields??t?.rdFields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const r=al.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const a=PCore.getDataApiUtils().getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return a.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),a},getPrimaryFieldsForDataSource:function(e="",t=""){const n=al.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=PCore.getDataApiUtils().getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getInsightIDs:function(){const{restApi:e,reqType:t}=Dr("getInsightIDs");return ud(e,{method:t})},getInsightByID:function(e){const t=PCore.getMetadataUtils().getInsight(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:a}=Dr("getInsightByID",n);return ud(r,{method:a})},createInsight:function(e){const{restApi:t,reqType:n}=Dr("createInsight");return ud(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:a}=Dr("updateInsight",n);return ud(r,{method:a,body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Dr("deleteInsight",t);return ud(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Dr("exportToExcel");return ud(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:a}=Dr("scheduleInsight",n);return ud(r,{method:a,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:a,reqType:s}=Dr("updateScheduledInsight",r);return ud(a,{method:s,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:a}=Dr("deleteScheduledInsight",n);return ud(r,{method:a})},translateStrings:function(e){const{restApi:t,reqType:n}=Dr("translateStrings");return ud(t,{method:n,body:JSON.stringify(e)})}},El=new class{addRoutes=e=>{return t=e,void Er.addRoutes(t);var t}},Al="OPEN_PROCESS_ACTION",_l="OPEN_ASSIGNMENT",Sl="DELETE_CASE_IN_CREATE_STAGE",$l="SAVE_AND_CLOSE",Cl=e=>({type:$l,payload:e}),bl=class{static getSavableDataPage(e){return Nt(e)}static getLookUpDataPage(e){return Dt(e)}static getLookUpDataPageInfo(e){return xt(e)}static getDataPageKeys(e){return Rt(e)}},Pl=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=$s.getNextActionMgrId();let n,r;const a=new Promise(((e,t)=>{n=e,r=t}));return $s.register(t,a,n,r,e),{actionMgrID:t,promise:a}};initializeContainers(e){const t=this.c11nEnv,n={context:t.getContextName(),name:t.getContainerName(),type:rt.CONTAINER_TYPE.SINGLE},{actionMgrID:r,promise:a}=this.containerManagerPromise("INIT_CONTAINERS"),s={...n,...e,actionMgrID:r};return Mc(Gi(s)),a}addContainerItem(e){const t=dn,n=this.c11nEnv,r=n.getMetadata(),{children:a}=r;let s;a&&([s]=a);const o=n.getContextName(),i=n.getContainerName(),c=rr(i,o,e?.containerType===rt.CONTAINER_TYPE.SINGLE),d=Ar(i,o),l={root:{...s,config:{...s?.config,context:s?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:d,containerName:i};e=JSON.parse(JSON.stringify(e)),[rt.WORKAREA].includes(i)&&delete e.data.coreHeaders;const{actionMgrID:u,promise:p}=this.containerManagerPromise(t),h={...l,...e,actionMgrID:u};return Mc(Hi(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=In,n={context:Go(e.containerItemID),target:ri(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return Mc(zi(s)),a}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t={target:ri(e.containerItemID)},{actionMgrID:n,promise:r}=this.containerManagerPromise("ACTIVATE_CONTAINER_ITEM"),a={...t,...e,actionMgrID:n};return Mc(Xi(a)),r}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=ln,n={context:Go(e.containerItemID),target:ri(e.containerItemID)},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),s={...n,...e,actionMgrID:r};return Mc(Zi(s)),a}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=ei(e),{actionMgrID:n,promise:r}=this.containerManagerPromise("RESET_CONTAINERS"),a={...t,...e,actionMgrID:n};return Mc(Bi(a)),r}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),a=sr(t,r),s=ci(r);return a&&s.includes(a)||Mc(Wi({transientItemID:a,contextName:r,target:ri(r),data:n})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!ci(r).includes(t))return;Mc(qi({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:a}=e;if(a&&r){if(!ci(t).includes(a))return;Mc(tc({target:n,containerItemID:r,transientItemID:a}))}}};var vl=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Ol(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,a=e.length;return n=1===a?function(t){return vl(t.type,e[0])}:function(t){for(var n=0;n<a;n++)if(vl(t.type,e[n]))return!0;return!1},be((function(e,t){var a=0;e.subscribe(Pe(t,(function(e){return n.call(r,e,a++)&&t.next(e)})))}))}function Tl(e,t){return be((function(n,r){var a=null,s=0,o=!1,i=function(){return o&&!a&&r.complete()};n.subscribe(Pe(r,(function(n){null==a||a.unsubscribe();var o=0,c=s++;Se(e(n,c)).subscribe(a=Pe(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){a=null,i()})))}),(function(){o=!0,i()})))}))}function Nl(e){return e&&R(e.schedule)}function Rl(e){return e[e.length-1]}function Dl(e){return Nl(Rl(e))?e.pop():void 0}function xl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Re(e,Dl(e))}function wl(e){return be((function(t,n){var r,a=null,s=!1;a=t.subscribe(Pe(n,void 0,void 0,(function(o){r=Se(e(o,wl(e)(t))),a?(a.unsubscribe(),a=null,r.subscribe(n)):s=!0}))),s&&(a.unsubscribe(),a=null,r.subscribe(n))}))}var Ml=new ce((function(e){return e.complete()}));function Ll(e){return e?function(e){return new ce((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Ml}var jl=n(303),Ul=n.n(jl);const Fl=(e,t,n)=>wl((r=>(console.error(e,r),xl(ic(e,r,t,null,n))))),kl=(e,t)=>n=>new ce((r=>{let a={},s=0;return n.pipe(xe((n=>{const r=Date.now();let o;return o=t||Ul(),o&&o(n,a)&&r-s<e?Ll():(a=n,s=r,xl(n))}))).subscribe(r)})),Vl=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let s=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(s)n.push({type:nn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(a.length>0))return;{const t=a.shift();s=!s,n.push(t),n.push({type:nn,payload:{context:e,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}})}}Mc(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=Lc(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,a=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let s=t.context_data?.is_deferred_action_in_progress??!1;return a.length<=0&&!s&&(r<=0?(n.push(e),s=!s):a.push(e),n.unshift({type:nn,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:a,blocking_action_counter:r,is_deferred_action_in_progress:s}}}}),Mc(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=Lc(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(Mc({type:nn,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){return e?Lc(e)?(Mc({type:Hn,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));const t={...Lc(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(Mc({type:Hn,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=Lc(e);if(t){const n={...t};n.context_data?.deferred_action_queue&&delete n.context_data.deferred_action_queue,n.context_data?.blocking_action_counter&&delete n.context_data.blocking_action_counter,n.context_data?.is_deferred_action_in_progress&&delete n.context_data.is_deferred_action_in_progress,Mc({type:nn,payload:{context:e,data:{...n}}}),Ss.disableLoadingIndicator({context:e})}}},{RESOURCE_TYPES:Gl}=nt,Bl=class{static openCase(e,t,n,r){const a={insKey:e,acTargetName:n,actionMgrID:$s.getNextActionMgrId(),context:t,...r},s=Xt;r&&r.channelName&&(a.headers={},a.headers[rt.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=$s.actionManagerPromise(s,a.actionMgrID);return Mc({type:s,payload:a}),o}static openAssignment(e,t,n,r){const a={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:$s.getNextActionMgrId(),context:t,...r},s=tn;r&&r.channelName&&(a.headers={},a.headers[rt.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=$s.actionManagerPromise(s,a.actionMgrID);return Mc({type:s,payload:{...a}}),o}static createCase(e,t,n,r){const a=Jt,s={class:e,acTargetName:n,actionMgrID:$s.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(s.headers={},s.headers[rt.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=$s.actionManagerPromise(a,s.actionMgrID);return Mc({type:a,payload:{...s}}),o}static getNextWork(e,t,n){const r=tn,a={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:$s.getNextActionMgrId(),context:e,...n},{promise:s}=$s.actionManagerPromise(r,a.actionMgrID);return Mc({type:r,payload:{...a}}),s}static getOpenedCaseItems(e){const t=[],n=No(e);if(n){const{items:r={}}=n,a=Object.keys(r),s=Fo(e);a.forEach((n=>{if(r[n]&&(r[n].resourceType===Gl.CASE||r[n].resourceType===Gl.ASSIGNMENT)){const{key:a="",context:o}=r[n],i=r[n],c=a.substring(a.indexOf(" ")+1),d=Fc(".caseTypeID","caseInfo",o),l=s===n;t.push({...i,key:a,workID:a,caseID:c,className:d,context:o,containerItemID:n,target:e,active:l})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=Dr(On,t);return ud(n,{method:r})};static getCaseBulkActions=e=>{const{restApi:t,reqType:n}=Dr("getBulkActions"),r=e.map((e=>({ID:e}))),a=r.length,s=a/5,o={},i=[];for(let e=0;e<a;e+=s)o.cases=r.slice(e,e+s),o.cases.length&&i.push(ud(t,{method:n,body:o}));return Promise.all(i).then((e=>{let t=[];for(let n=0;n<e.length;n+=1)0!==n?t.length&&(t=t.filter((t=>e[n].data.availableActions.some((e=>t.ID===e.ID))))):t=e[n].data.availableActions;return t}))}};class Hl{constructor(e){Hl._instance=this,this.context=`${e}/${rt.SUGGESTION}`,wc().getState().data?.[this.context]||Mc({type:$n,payload:{context:this.context,data:{}}})}getField(e){return Fc(e,"",this.context)}setField(e,t){Mc({type:Ft,payload:{reference:e,value:t,context:this.context}})}removeField(e){Mc({type:rn,payload:{reference:e,context:this.context}})}setState(e){Mc(Li({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Wl=Hl,ql=class{static getSharedState(e){const t=0===e.indexOf(".")?e.substring(1):e,n=jc();return n?ot.getIn(n,t):null}static setSharedState(e,t){e&&Mc(pc({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:a=!0,pageReference:s}=r;e&&t&&Mc(hc({context:e,reference:s?`${s}.${t}`:t,value:n,isArrayDeepMerge:a}))}static getSuggestionsContext(e){return new Wl(e)}},Yl=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=yc.getProperyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=yc.getContextPath(this.datasource,this.index);return this.index+=1,tu({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Kl{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.children[this.index];return this.index+=1,tu({meta:e,options:this.options})}resetIndex(){this.index=0}}class zl{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>as.isProperty(e))).map((e=>as.getPropertyName(e)))}}const Jl=new zl;Object.freeze(Jl);let Xl=null;const Ql=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const a=e[r],s=Lt.trimAnnotation(a);if("string"!=typeof s&&"string"!=typeof a||!(ot.isPropertyRef(s)||a.startsWith("@W ")||a.startsWith("@E "))){if(Array.isArray(s))s.forEach(((e,n)=>{const a={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),Ql(e,t[r][n],a)}));else if(s&&"object"==typeof s&&"exp"!==s.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},Ql(s,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=s}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Zl=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...ot.deepClone(t.inheritedProps)]};class eu{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:a}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=a,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo,this.viewName=r.viewName,this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,r.inheritedConfig&&(this._inheritedConfig=ot.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Zl(this._inheritedConfig,t?.config),Ql(this._rawConfig,this._stateProps),this._isState=!ot.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=ot.isExpressionExist(this._rawConfig.config),this._isWhenExist=ot.isWhenExist(this._rawConfig.config),this._isValidatorExist=ka.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=nt.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let s=this.options.pageReference;if(s&&(s=Lt.handleAnnotation(this.options.pageReference,this)),this._pageReference=yc.getContextPath(s||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&ot.isWhenExist({visibility:this.meta?.config.visibility})&&$c(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=yc.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=Lt.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=ot.isExpressionExist(e),this._isWhenExist=ot.isWhenExist(e),this._isValidatorExist=ka.isValidatorExist(e)),this._children=this._rawConfig.children,this.options.hasForm&&this._rawConfig.config&&(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&(!this._rawConfig.config.readOnly||"true"!==this._rawConfig.config.readOnly)&&((e,t,n)=>{((e,t,n)=>{if(Ha[e]){const r=Ha[e].fieldOrder[t];((e,t,n,r)=>{n&&n.getStateProps().visibility!==r.getStateProps().visibility&&(qa[e]||(qa[e]={}),qa[e][t]||(qa[e][t]={}),qa[e][t][r.getStateProps().visibility]=r)})(e,t,r,n),r&&!r.getConfigProps().readOnly&&n.getConfigProps().readOnly||(Ha[e].fieldOrder[t]=n),Ha[e].fieldOrder[t].isError=!1}else Ha[e]={fieldOrder:{[t]:n}},Ha[e].fieldOrder[t].isError=!1})(e,Ya(t),n)})(this._contextName,this.getFullReference(),this),this._rawConfig?.type?.toLowerCase()===rt.VIEW&&this._rawConfig.name&&(this.viewName=Lt.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&(e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata().config?.value;if(n){const r=mt(Lt.getLeafPropertyName(n),yc.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(t&&Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=Cc(e,r)),n};t.some(r)}else if(t&&"object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=Cc(e,t[r]),n))break;return n})(e,r?.datasource?.parameters))}}t&&$c(e.getCurrentView(),e.getContextName(),e.getPageReference())})(this)}}setXRayInfo(e){ot.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){ot.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new class{constructor(e){this.c11nEnv=e}getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:a}=Dr("getCaseStages",n);return ud(r,{method:a},t).then((e=>e.data.stages))}getCaseTypeName(){return this.c11nEnv.getValue(rt.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(rt.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(rt.CASE_INFO.CASE_TYPE_ID)}getKey(){return this.c11nEnv.getValue(rt.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(rt.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(rt.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(rt.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(rt.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(rt.CASE_INFO.PARENTCASEINFO)}isPerform(){return!!this.c11nEnv.getValue("nextAssignmentInfo")}isReview(){return!this.isPerform()}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(rt.CASE_INFO.CASE_INFO);return Ps(e)}isLocalAction(){const e=this.c11nEnv.getValue(rt.CASE_INFO.CASE_INFO);return Os(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===rt.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=Ro(t,n),{config:a}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=a?.type===rt.VIEW?a?.name:null}(e&&e.startsWith(rt.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(rt.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(rt.CASE_INFO.ACTIVE_ACTION_ID),t=nr(this.c11nEnv.getContextName());let n;t&&(n=Lc(t));const r=n?.caseInfo?.availableActions,a=Lc(this.c11nEnv.getContextName())?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(rt.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(rt.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(rt.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(rt.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}}(this)),this._caseInfo}getListActions(){return(e=>({insert:(t,n,r,a={})=>((e,t,n,r,a)=>{const{skipStateUpdate:s=!1}=a,o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),d=Oa(i);va(n,d,c),Ta(o,`${i}[${t}]`),xa(i,c,e,t);const l={instruction:rt.LIST_ACTIONS.INSERT,content:{...ot.unflatten(e)}};delete JSON.parse(JSON.stringify(l)).content.classID,Ba.getStateMachine(o,c,d).insert(e,t+1,s)})(t,n,e,r,a),update:(t,n,r)=>((e,t,n=0,r={})=>{const{skipStateUpdate:a=!0,pageRef:s}=r,o=t.getContextName();let i=t.getReferenceList();const c=s||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(nt.CONTENT)+nt.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const d=Oa(i);va(t,d,c),Ta(o,`${i}[${n}]`),xa(i,c,e,n),Ba.getStateMachine(o,c,d).update(e,n+1,a,r)})(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const a=n.getPageReference(),{stateMachineTarget:s}=Ba.getStateMachineObjByPath(`${a}${e}`,n.getContextName(),!0);if(!s){let e=a.substring(0,a.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&va(n,t,e)}Ba.executeStateMachine(n.getContextName(),`${a}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),a=t.getReferenceList(),s=n||t.getPageReference(),o=`${s+a}[${e}]`,i=Oa(a);Ci({type:nt.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0}),va(t,i,s),Ta(r,`${a}[${e}]`),Ba.getStateMachine(r,s,i).delete(e+1);const c=Ba.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((t=>{t.includes(`${s}${i}[${e}]`)&&(c[t]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),a=n.getReferenceList(),s=n.getPageReference(),o=Oa(a);va(n,o,s),Ta(r,`${a}[${t}]`),Ba.getStateMachine(r,s,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={})=>((e,t,n)=>new Promise((r=>{const{skipPageInstructions:a=!1}=n,{selectionMode:s,selectionList:o,required:i}=t.getConfigProps(),c=s===rt.LIST_SELECTION_MODE.MULTI,d=t.getContextName();let l=t.getPageReference(),u=c?o.substring(1):l.substring(l.lastIndexOf(".")+1);const p=t.getRawMetadata();let h=null;const f=p.config.dataRelationshipContext&&"SimpleTableSelect"===p.type&&"single"===p.config?.selectionMode;f&&(u=p.config.dataRelationshipContext,h=l.concat(".").concat(u),l=h);const g=c?`${l}${o}`:l,y=c?t.getFieldMetadata(`${u}`):t.getCurrentPageFieldMetadata(h),{datasource:{parameters:m={}}}=y,I={...m};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{let n=ot.getPropertyName(t);n=n.substr(n.indexOf(".")+1).split("."),e[n.join(".")]=t}))})(I,y,c),c){let n=o;n=Oa(n);const r=t.getValue(g)||[];va(t,n,l);const s=[];let i=r.length;e.forEach((e=>{const t=Ma(m,e,u),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!a){const r=Ba.getStateMachine(d,l,n);e.$selected?r.insert(t,p+1,!0):r.delete(p+1,!0)}s.push({instruction:e.$selected?rt.LIST_ACTIONS.SELECT:rt.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),Mc(lc({instruction:rt.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:d,referenceList:`${l}.${u}`,actions:s}))}else{const n=Ma(I,e[0],u);t.getActionsApi().updateFieldValue("",n,f?{contextPageReference:l}:{}),t.getActionsApi().triggerFieldChange("",n)}La(t,g,i,c,u),r()})))(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),a=[];let s=t.getPageReference();const o=n===rt.LIST_SELECTION_MODE.MULTI;let i=o?r.substring(1):s.substring(s.lastIndexOf(".")+1);const c=t.getRawMetadata();let d=null;c.config.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,d=s.concat(".").concat(i),s=d);const l=o?`${s}${r}`:s;let u=t.getValue(l)||[];if(Array.isArray(u)||(u=[u]),e)return Promise.resolve(u);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(d);return u.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const r=n.substring(n.lastIndexOf(".")+1);return wa(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&a.push(t.trim())})),Promise.resolve(a)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),a=e.getPageReference(),s=t,o=`${a}${t}`;return new Promise((t=>{let i=s;i=Oa(i),va(e,i,a),Ba.getStateMachine(r,a,i).deleteAll(s),La(e,o,n,!0,s),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:a,renderMode:s,referenceList:o}=e.getComponentConfig();let i;if(r===rt.LIST_SELECTION_MODE.MULTI&&a?i=a:"Editable"===s&&o&&(i=e.getStateProps().referenceList),i){i=Oa(i);const r=Ba.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n)=>((e,t,n)=>{const r=e.getContextName(),a=e.getPageReference(),s=Oa(t);va(e,s,a),Ba.getStateMachine(r,a,s).initPageInstructions(e,n)})(e,t,n),deleteAll:t=>((e,t)=>{const n=e.getPageReference(),r=Oa(t);va(e,t,n),Ba.getStateMachine(e.getContextName(),n,r).deleteAll(t)})(e,t),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),a=e.getContextName();va(e,t,r),Ta(a,ot.buildInstructionPageReference(r,t)),Ba.getStateMachine(a,r,t).replacePage(n)})(e,t,n)}))(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}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}getFullReference(){const e=this.getPageReference(),t=this.getComponentConfig();let n="value";"multi"===t.selectionMode?n="selectionList":"Editable"===t.renderMode&&(n="referenceList");const r=this.getComponentConfig()[n];return yc.getContextPath(e,r)}getContextName(){return this._contextName}getContainerName(){const{acTargetName:e="primary",type:t,name:n}=this.getComponentConfig();return"view"!==t?.toLowerCase()&&n?n:this.options.containerName||e}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e={}){if(this._rawConfig?.config&&Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=d?.getStore()?.getState()?.data[`${this.getContextName()}/${rt.SUGGESTION}`],n=this.getStateProps()?.value,r=yc.getContextPath(this.getPageReference(),n),a=t?ql.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!a,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Ua.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),ot.resolveStringBooleans(e)}getRawConfigProps(){const e={...Ua.getDefaultsforType(this._type),...this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(yc.resolveProps(e,t,this),Lt.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Ql(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===rt.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===rt.MODAL_VIEW_CONTAINER||t===rt.CASE_CREATE_STAGE||t===rt.FLOW_CONTAINER){const n=t===rt.FLOW_CONTAINER?this.getContextName():Fo(`${rt.APP.APP}/${this.getContainerName()}`),r=$i({context:n,category:nt.PAGE});e.pageMessages=r,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList:!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=$i({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:nt.MESSAGES.MESSAGES_TYPE_ERROR}),r=$i({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:nt.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>Kr.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=rt.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=rt.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===rt.ROOT_CONTAINER){const t=vi(r,Fo(`${rt.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages}if(t===rt.ROOT_CONTAINER){const t=$i({context:rt.APP.ROOT,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(t===rt.APP_SHELL&&e.portalDocMode===rt.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Bl.getOpenedCaseItems(`${nt.APP.APP}/${rt.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===rt.APP_SHELL){const t=$i({context:rt.APP.APP,category:"PAGE"});e.pageMessages=t?t.map((e=>e.message)):t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===rt.SCALARLIST&&(this._stateProps.value=e.value),t===rt.APP_SHELL||t===rt.MODAL_VIEW_CONTAINER||t===rt.CASE_CREATE_STAGE||n.template===rt.CASE_PREVIEW){let t=$i({context:rt.APP.APP,category:"HTTP"});const n=$i({context:Fo(`${rt.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat($i({context:Fo(`${rt.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=$i({context:Fo(`${rt.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>e.message)):t,this._stateProps.httpMessages=e.httpMessages,t?.map((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(t===rt.VIEW_CONTAINER||t===rt.FLOW_CONTAINER||t===rt.MODAL_VIEW_CONTAINER||t===rt.PREVIEW_VIEW_CONTAINER||t===rt.ROOT_CONTAINER){if(e.routingInfo=_r(this.getContainerName(),this._contextName),t===rt.ROOT_CONTAINER&&(e.rootConfig=zl.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===rt.FLOW_CONTAINER){const t=$i({context:this.getContextName(),category:rt.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=Wo(n)[0];if(r){const t=Fo(r);e.lastUpdateTime=d?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=d?.getStore()?.getState()?.data?.[t]?.caseInfo?.lastUpdateTime}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===rt.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else n.template===rt.CASE_VIEW||n.template===rt.CASE_PREVIEW||n.template===rt.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===rt.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e)}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig();let a="",s="";if(r===rt.ASSOCIATED?(a=n,s=rt.ASSOCIATED_PROPERTY_ANNOTATION):(a=t,s=rt.PROPERTY_ANNOTATION),a&&"string"==typeof a&&a.includes(s)){const t=Lt.getPropertyName(a),n=this.getFieldMetadata(t);n&&(e.fieldMetadata=n,(e.fieldMetadata.isDeclarativeTarget||as.isPropertyInternal(t)||!e.datasource&&(e.fieldMetadata.isClassKey||e.fieldMetadata.isSpecial)&&e.listType!==rt.ASSOCIATED)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})))}}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(rt.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),mt(e,t)}return mt(t.pop(),this.getValue(`.${t.join(".")}${rt.CLASS_ID}`))}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return mt(n,this.getValue(`${t.join(".")}${rt.CLASS_ID}`))}getCurrentClassID(){return this.getValue(rt.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[nt.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(nt.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>Ts(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[nt.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[nt.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new class{constructor(e){this.c11nEnv=e}validate(e,t){if(!t&&!(t=this.c11nEnv.getStateProps().value)){const e=this.c11nEnv.getComponentConfig();"multi"===e.selectionMode?t=this.c11nEnv.getStateProps().selectionList:"Editable"===e.renderMode&&(t=this.c11nEnv.getStateProps().referenceList)}const n=ka.validate(this.c11nEnv.getComponentName().toLowerCase(),t,e,this.c11nEnv);return n?.message?{status:!1,message:n?.message}:{status:!0}}}(this)}isEditable(){return this._rawConfig&&this._rawConfig.config&&!(this._inheritedConfig&&this._inheritedConfig.readOnly)&&(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)&&!("string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST"))&&!(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly))&&!(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;const t=e.getConfigProps(),n={includeTypes:["Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const a=e.getChildren();return!!a&&a.some((e=>e.getPConnect().getComputedVisibility()))}getChildrenIterato(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return this._rawConfig&&this._rawConfig.isRefreshable}getDataObject(e){return Lc(e||this.getContextName())}getImagePath(e){return`${qr.getConstellationServiceUrl()}/v860/${qr.getAppAlias()}/image/${e}?org=${Er.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=((e,t)=>{const n=!!e.repeat;if(e["repeat-self"])return new Yl(e,e.context,t);if(n){const n=Vc(`${t.context}.${rt.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new Yl(e.children[0],n||e.context,t)}return e.children?new Kl(e.children,t):void 0})(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}),t=[];for(;e.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!0!==zl.allowedComponetsForBulkProcessing[e]&&!0!==zl.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e.resetIndex(),t}return null}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName();return Kr.getLocaleValue(e,t,r)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),rt.PARAGRAPH,e);return Kr.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return this.useCustomContext?(e=0===e.indexOf?.(".")?e.substring(1):e).split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext):this._hasSuggestions&&this.getStateProps()?.value===e?yc.getProperyValue(e,this.getPageReference(),`${this._contextName}/${rt.SUGGESTION}`):yc.getProperyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:a}=e;a&&(this._inheritedConfig.hideLabel=a),r&&(this._inheritedConfig.referenceType=r),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),Zl(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),yc.resolveProps(t,e,this),e}setValue(e,t,n,r){let a,s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(s=!0)),Mc({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...a&&{isStrictTracking:a},...s&&{removePropertyFromChangedList:s}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(ss.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;is[t]=is[t]||{},is[t][r]||(is[t][r]={initialValue:Fc(r,null,t)}),is[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return kc(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(rt.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=rt.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),Mc(Li({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;Mc({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){Mc(ic(e,t||{},n))}getComponent(){return Xl({getPConnect:()=>this})}createComponent(e,t,n,r){let a=this._pageReference;if(t){const e=Vc(`${this.getPageReference()}.${rt.SUMMARY_OF_LISTS}`,t,this._contextName);a=yc.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=Lt.handleAnnotation(e,this),a=yc.getContextPath(this._pageReference,e)||""}return Xl(tu({meta:e,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:a,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly}}),r)}getReferencedView(){if(this.meta)return yc.resolveReference(this.meta,this)}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,tu({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:this.getPageReference()}})}getContainerManager(){return new Pl(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new class{constructor(e){this.c11nEnv=e}MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className 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.";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&-1!==n.indexOf(rt.MODAL),a=this.c11nEnv.getValue(nt.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(nt.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(nt.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(nt.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(nt.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(nt.CASE_INFO.CASE_TYPE_ID),d=t?void 0:ns(this.c11nEnv.getContextName()),l=this.c11nEnv.getValue("isProcessAction","isProcessAction",n);return Di.buildActionObject({context:n,containerItemID:e,assignmentID:s,actionID:o,caseID:a,containerName:i,caseType:c,isModalAction:r,isFormValid:d,isProcessAction:l,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t=null,n=!0)=>{let r,a,s=null;s=t&&null!==t.actionMgrID?t.actionMgrID:$s.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,a=t}));return $s.register(s,o,r,a,e,t,n),{actionMgrID:s,promise:o}};showDataObjectCreateView(e,t=nt.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Di.buildActionObject({viewName:t,className:e},this.c11nEnv),r=Bt,{promise:a}=this.actionsApiPromise(r,n);return Mc({type:r,payload:{...n,containerName:nt.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),a}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!hs(t))return new Pl(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0});const n=Rn,r=Di.buildActionObject({containerItemID:e,context:t},this.c11nEnv),a=t&&-1!==t.indexOf(rt.MODAL);Mc({type:n,payload:{...r,isModalAction:a,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:s}=this.actionsApiPromise(n,r);return s}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=wc().getState(),n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error("Data object class not found"));const r=bl.getSavableDataPage(n),a=e&&-1!==e.indexOf(rt.MODAL),s=Di.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:o}=this.actionsApiPromise("CREATE_DATA_OBJECT",s);return Mc({type:"CREATE_DATA_OBJECT",payload:{...s,isModalAction:a,isFormValid:ns(e)}}),o}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=bl.getSavableDataPage(e),r=bl.getDataPageKeys(n),a={};for(const e of r)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const s=Di.buildActionObject({dataViewName:n,dataViewParameters:a},this.c11nEnv),{promise:o}=this.actionsApiPromise("DELETE_DATA_OBJECT",s);return Mc({type:"DELETE_DATA_OBJECT",payload:{...s}}),o}getDataObjectView(e,t,n={}){const r={};if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError("keyProperties is required parameter"));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const a=bl.getLookUpDataPage(e),s=bl.getDataPageKeys(a);for(const e of s)r[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Di.buildActionObject({dataLookUp:a,requestPayload:r,viewName:n.viewName||nt.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:rt.MODAL,keyProperties:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("VIEW_DATA_OBJECT",o);return Mc({type:"VIEW_DATA_OBJECT",payload:{...o}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=wc().getState(),r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error("Data object class not found"));const a=bl.getSavableDataPage(r);bl.getDataPageKeys(a).forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]}));const s=e&&-1!==e.indexOf(rt.MODAL),o=Di.buildActionObject({containerItemID:e,dataPageID:a,key:t},this.c11nEnv),{promise:i}=this.actionsApiPromise("UPDATE_DATA_OBJECT",o);return Mc({type:"UPDATE_DATA_OBJECT",payload:{...o,isModalAction:s,isFormValid:ns(e)}}),i}createWork(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{},r=Jt,a=Di.buildActionObject({class:e,flowType:"pyStartCase",containerName:rt.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:s}=this.actionsApiPromise(r,a);if(t.channelName&&(a.headers=a.headers||{},a.headers[rt.X_ORIGIN_CHANNEL]=t.channelName),mr.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n}=mr.getRemoteCase(e);a.class=t,a.headers=a.headers||{},a.headers.RemoteSystemID=n}return Br.getPreviewMode()&&(a.debugInfo={debugId:ot.generateUniqueID()}),Mc({type:r,payload:{...a}}),s}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||rt.PRIMARY,containerName:n.targetContainer||rt.PRIMARY},a=Xt,s=Di.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[rt.X_ORIGIN_CHANNEL]=n.channelName),s.className=t,mr.isRemoteCase(t)){const{RemoteSystemID:e}=mr.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e,s.isRemoteCase=!0,s.remoteCaseClass=t}return Br.getPreviewMode()&&![rt.WORKAREA].includes(n.targetContainer)&&(s.debugInfo={debugId:ot.generateUniqueID()}),Mc({type:a,payload:{...n,...s}}),o}openAssignment(e,t,n={}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms&&window.pms.plugins&&window.pms.plugins.c11n&&window.pms.plugins.c11n.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList};n.isChild&&(r.containerName=rt.PRIMARY,r.isChild=n.isChild);const a=_l,s=Di.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(a,s);if(n.channelName&&(s.headers=s.headers||{},s.headers[rt.X_ORIGIN_CHANNEL]=n.channelName),mr.isRemoteCase(t)){const{RemoteSystemID:e}=mr.getRemoteCase(t);s.headers=s.headers||{},s.headers.RemoteSystemID=e}s.className=t,s.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Br.getPreviewMode()&&![rt.WORKAREA].includes(n.containerName)&&(s.debugInfo={debugId:ot.generateUniqueID()});const i={context:s.context||n.context,containerName:s.containerName||n.containerName,targetContainerName:s.containerName||n.containerName,viewType:s.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return Mc({type:a,payload:{...s,...i}}),o}finishAssignment(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=Go(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r.lastIndexOf("/workarea"))),(e=>{const t=Qa();if(t[e])for(const n in t[e].fieldOrder)if(Object.prototype.hasOwnProperty.call(t[e].fieldOrder,n)&&t[e].fieldOrder[n].getConfigProps().hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:Kr.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return bi({messages:e,context:r,category:nt.PAGE}),Promise.reject({type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const a=Zt,s=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:d,caseInfo:l}=Ds(e,this.c11nEnv,{isTriggeredFromDifferentContext:s}),u=Ps(l);let p,h=!1;d?h="Case"===d.find((e=>e.ID===c))?.type:p=Lc(n);let{assignmentID:f}=Ds(e,this.c11nEnv,{isTriggeredFromDifferentContext:s});p?.context_data?.actionType&&(h=p.context_data.actionType===rt.CASE,f=f||p.context_data.assignmentID);const g=((e,t,n)=>{let r;const a=e?.find((e=>e.ID===t))?.actions,s=a?.filter((e=>e.ID===rt.FIX_BROKEN_ASSIGNMENTS));return r=n&&s?.length>0?s[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),r})(i,f,c),[y,m]=o.split(" "),I={class:y,actionID:g,assignmentID:f,caseID:o,workID:m,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:h,doDeleteCaseSummary:!0,isInCreateStage:u};-1!==e?.indexOf(rt.MODAL)&&(I.containerName=rt.MODAL,I.isModalAction=!0),I.outcome=t.outcomeID,l?.isLocalAction&&(I.viewType=no.FORM);const E=Di.buildActionObject(I,this.c11nEnv),{promise:A}=this.actionsApiPromise(a,E),_=this.c11nEnv.getValue("isProcessAction","isProcessAction",n);return E.isProcessAction=_,Vl.executeOrQueueDeferredAction({type:a,payload:{...E,context:n}}),A}getNextWork(){const e=_l,t=Di.buildActionObject({containerName:rt.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return Mc({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=_l,n=this.c11nEnv.getValue(nt.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,a=Di.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:s}=this.actionsApiPromise(t,a),o={type:t,payload:{...a,caseID:n,headers:r}};return Mc(o),s}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue(nt.CASE_INFO.CASES),r=this.c11nEnv.getValue(nt.CASE_INFO.ACTIVE_ACTION_ID),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&-1!==e.indexOf(rt.MODAL)&&(a.containerName=rt.MODAL,a.isModalAction=!0);const s=Di.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s),i=Go(e);return Mc({type:t,payload:{...s,context:i,cases:n,actionID:r,isFormValid:ns(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));const{selectedList:n}=t,r=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},s="OPEN_BULK_ACTION",o=Di.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return Mc({type:s,payload:{...o}}),i}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ln,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${rt.APP.APP}/${rt.MODAL}`,caseViewMode:rt.PERFORM_MODE,deleteContext:!0};Mc({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Mc({type:Ft,payload:{reference:nt.CASE_INFO.APPROVALFLAG,value:rt.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(Mc({type:Ft,payload:{reference:nt.CASE_INFO.APPROVALFLAG,value:rt.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue(nt.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Ft,payload:{reference:nt.CASE_INFO.DUPLICATECASEFLAG,value:rt.DUPLICATE,context:e}},r={type:Ft,payload:{reference:nt.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return Mc([n,r]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:Ft,payload:{reference:nt.CASE_INFO.DUPLICATECASEFLAG,value:rt.IGNORE,context:e}},n={type:Ft,payload:{reference:nt.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Ft,payload:{reference:nt.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return Mc([t,n,r]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=t.assignKey||this.c11nEnv.getValue(nt.CASE_INFO.ASSIGNMENT_ID),r=t.caseID||this.c11nEnv.getValue(nt.CASE_INFO.CASE_INFO_ID),a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,localActionType:a,...t},o="OPEN_LOCAL_ACTION",i=Di.buildActionObject(s,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:d}=this.actionsApiPromise(o,i),l=Wo(c)[0];let u,p=!1;if(!l)return u=c,Mc({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;u=Fo(l);const h=No(l);if(h?.accessedOrder.forEach((e=>{r===h.items[e].key&&(p=!0,u=h.items[e].context)})),!p)return Mc({type:o,payload:{...i,contextName:c,continueExecution:p}}),d;const f=u,g=f&&-1!==f.indexOf(rt.MODAL),y=t.assignKey||this.c11nEnv.getValue(nt.CASE_INFO.ASSIGNMENT_ID),m=Lc(u),I=m?.caseInfo?.assignments?m.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(nt.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction",f),S=Di.buildActionObject({context:f,containerItemID:u,assignmentID:y,actionID:I,caseID:r,containerName:E,caseType:A,isModalAction:g,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=u;const $=Go(u),C=this.c11nEnv.getCaseSummary(),b=Ps(C),P=Di.buildActionObject({caseID:r,containerItemID:u,cancelContext:$},this.c11nEnv);let v={};return g?(P.acTargetName=rt.MODAL,P.isInCreateStage=b,P.isModalAction=g,v={...P}):v={...P,acName:Ar(this.c11nEnv.getContainerName(),P.context)},Mc({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:v,continueExecution:p}}),d}openProcessAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string"));const n=this.c11nEnv.getValue(nt.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,r=this.c11nEnv.getValue(nt.CASE_INFO.CASE_INFO_ID)||t.caseID,a=t.type,s={caseID:r,assignmentID:n,vcName:t.target,actionName:t?.name,assignKey:n,actionID:e,doDeleteCaseSummary:!0,processActionType:a,isProcessAction:!0,...t},o=Al,i=Di.buildActionObject(s,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return Mc({type:o,payload:{...i}}),c}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(nt.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(nt.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(nt.CASE_INFO.ASSIGNMENT_ID),a=Ps(this.c11nEnv.getCaseSummary()),s={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:a};t&&-1!==t.indexOf(rt.MODAL)&&(s.acTargetName=rt.MODAL);const o=Di.buildActionObject(s,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=Go(t);return Mc({type:n,payload:{...o,containerItemID:t,context:c}}),i}cancelAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=nt,n=en,r=Go(e),a=e&&e.indexOf(rt.MODAL)>-1,s=this.c11nEnv.getCaseSummary(),o=Ps(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Di.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv);let d={};a?(c.acTargetName=rt.MODAL,c.isInCreateStage=o,c.isModalAction=a,d={...c}):d={...c,acName:Ar(this.c11nEnv.getContainerName(),c.context)},Mc({type:n,payload:d});const{promise:l}=this.actionsApiPromise(n,c);return l}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=nt,n=e,r=Rn,a=e&&e.indexOf(rt.MODAL)>-1,s=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Di.buildActionObject({caseID:s,containerItemID:e,context:n},this.c11nEnv);if(!hs(n))return new Pl(this.c11nEnv).removeContainerItem({containerItemID:e});Mc({type:r,payload:{...o,isModalAction:a}});const{promise:i}=this.actionsApiPromise(r,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=nt,n=Rn,r=e,a=r&&-1!==r.indexOf(rt.MODAL),s=this.c11nEnv.getCaseSummary(),o=Ps(s),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Di.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),d=this.c11nEnv.getValue("isProcessAction","isProcessAction",r),l=Hr.isCoexistenceAppOfType(rt.APP_TYPE.UIKIT);if(c.isProcessAction=d,o&&(a||l)&&!Os(s)){const t=this.c11nEnv.getValue("caseInfo.isFirstAssignment"),o=hs(r);if(this.shouldDeleteCaseInCreateStage(o,t,l))return this.deleteCaseInCreateStage(e);Mc({type:n,payload:{...c,isModalAction:a,isChildCase:Rs(s)}})}const{promise:u}=this.actionsApiPromise(n,c);return u}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=this.getSaveActionPayload(e,!0),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return Mc(Cl(t)),n}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=this.getSaveActionPayload(e),{promise:n}=this.actionsApiPromise("SAVE_AND_CLOSE",t);return Mc(Cl(t)),n}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=e,r=n&&-1!==n.indexOf(rt.MODAL),a=this.c11nEnv.getValue(nt.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getValue(nt.CASE_INFO.CASE_TYPE_ID),o=Di.buildActionObject({caseID:a,caseType:s,containerItemID:e,context:n,ignoreCaseDeletion:t},this.c11nEnv),i=this.c11nEnv.getValue("isProcessAction","isProcessAction",n),c=this.c11nEnv.getValue(nt.CASE_INFO.PARENTCASEINFO);o.isProcessAction=i,o.parentCaseInfo=c;const d=`${rt.APP.APP}/${Oo.PRIMARY}`,l=ho(d,Oo.PRIMARY);o.parentContext=l,r&&(o.targetName=rt.MODAL,o.containerName=Oo.MODAL,o.isModalAction=r),Mc((e=>({type:Sl,payload:e}))(o));const{promise:u}=this.actionsApiPromise("DELETE_CASE_IN_CREATE_STAGE",o);return u}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=Er.getRestEndPoint("getRecents");t=`${t}?maxResultsToFetch=${e}`;const n=Zn()+t;return ud(n,{method:"GET",headers:{}})}logout(){const{restApi:e}=Er.getRestEndPoint("Logout"),t=Zn()+e;return ud(t,{method:"GET",headers:{}})}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return ud(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Oo.PREVIEW,containerName:Oo.PREVIEW,context:nt.APP.APP,...t})}showDataPreview(e,t,n={}){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData("pyDataPreview",e,t,{container:Oo.PREVIEW,containerName:Oo.PREVIEW,context:nt.APP.APP,...n,skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let r=Di.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(nt.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:mr.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n&&(r={...r,...n});const a=Gt,{promise:s}=this.actionsApiPromise(a,r,!1);return Mc({type:a,payload:{...r}}),s}showPage(e,t,n={}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));const r=Di.buildActionObject({viewName:e,className:t},this.c11nEnv),a=Bt,{promise:s}=this.actionsApiPromise(a,r);return Br.getPreviewMode()&&(r.debugInfo={debugId:ot.generateUniqueID()}),Mc({type:a,payload:{...r,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),s}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=Di.buildActionObject({},this.c11nEnv),r=Wt,{promise:a}=this.actionsApiPromise(r,n);return Mc({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),a}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Di.buildActionObject({},this.c11nEnv),r=qt,{promise:a}=this.actionsApiPromise(r,n);return Mc({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),a}showData(e,t,n,r={}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const a=Di.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),s=Ht,{promise:o}=this.actionsApiPromise(s,a);return Mc({type:s,payload:{...a,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Di.changeHandler(e,t)}eventHandler(e,t){Di.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),s=yc.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(rt.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=Fc(`.${i.join(".")}.classID`,a,r)),Mc({type:Vt,payload:{reference:s,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:a=!0,contextPageReference:s=null,isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName(),d=null===s?this.c11nEnv.getPageReference():s,l=yc.getContextPath(d,e);let u=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t,{isArrayDeepMerge:a}),this.c11nEnv.isBulkAction()&&(u=!0),e||(e=this.c11nEnv.getStateProps().value),Ci({type:nt.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:c,isListEntry:o}),Mc({type:Ft,payload:{reference:l,value:t,context:c,isArrayDeepMerge:a,skipDirtyValidation:i,...u&&{isStrictTracking:u},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=_n,{context:n}=e,r=n&&-1!==n.indexOf(rt.MODAL),a=Di.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(a.containerName=rt.MODAL,a.isModalAction=r),Mc({type:t,payload:a});const{promise:s}=this.actionsApiPromise(t,a);return s}refreshCaseView(e,t,n,r={}){const{promise:a,actionMgrID:s}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:d}=r,l={actionMgrID:s,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:d};r.refreshFor&&(l.refreshFor=r?.refreshFor);const u=this.c11nEnv.getContextName(),p=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(rt.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>Ns(e)&&!Ts(e,t))(u,p)||Ts(u,p))?bc(u,n,l):Sc(e,t,u,n,l),a}openEmbeddedDataModal(e,t,n,r,a){const s=Wn,o=t.getCaseInfo().getKey(),i=`${t.getPageReference().replace(nt.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,c={targetProperty:n,index:r,viewID:e,ID:o,actionType:a,interestPage:ot.convertPageRefToClipboardPageNotation(i)},d=Di.buildActionObject(c,this.c11nEnv),{promise:l}=this.actionsApiPromise(s,d);return Mc({type:s,payload:{...d,containerName:nt.MODAL,skipSemanticUrl:!0}}),l}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=qn,n=this.c11nEnv.getPageReference().replace(nt.CASE_INFO.CASE_INFO_CONTENT,""),r=Go(e),a={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(nt.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(rt.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:ns(r),interestPage:ot.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(rt.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT)};e&&-1!==e.indexOf(rt.MODAL)&&(a.containerName=rt.MODAL,a.isModalAction=!0);const s=Di.buildActionObject(a,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,s);return Mc({type:t,payload:{...s,context:r}}),o}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=Go(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:a}=this.actionsApiPromise(Yn);return bc(t,n,{actionMgrID:a,isFillFormWithAI:!0,preserveClientChanges:!1}),r}}(this)),this._actionsApi}getActionManager(){return $s}getGoogleMapsAPIKey(){return zn}getServerURL(){return Zn()}getLoadingStatus(e){let t=null;return e?(t=Lc(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&!!t.isLoading&&t.isLoading}clearErrorMessages(e){e?.property?Ci({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?Ci({type:"error",...e}):(Ci({type:"error",...e,context:rt.APP.APP}),Ci({type:"error",...e,context:Fo(`${rt.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return Vc(`${this.getPageReference()}.${rt.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&(Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")||Object.prototype.hasOwnProperty.call(this._rawConfig.config,"readonlyContextList"))&&((e,t,n)=>{if(Ha[e]){const r=Ka(t,n);Ha[e].fieldOrder[r]&&(Ha[e].fieldOrder[r].isMounted=!1)}})(this.getContextName(),Lt.trimAnnotation(this.getRawConfigProps()?.value)||Lt.trimAnnotation(this.getRawConfigProps()?.readonlyContextList),this.getPageReference())}addFormField(){this._rawConfig&&this.options.hasForm&&this._rawConfig.config&&Object.prototype.hasOwnProperty.call(this._rawConfig.config,"value")&&this._type!==rt.SCALARLIST&&((e,t,n)=>{if(Ha[e]){const r=Ka(t,n);Ha[e].fieldOrder[r]&&(Ha[e].fieldOrder[r].isMounted=!0)}})(this.getContextName(),Lt.trimAnnotation(this.getRawConfigProps()?.value),this.getPageReference())}setPageValue(e,t){delete e?.classID,this.setValue(t,e),((e,t,n)=>{const r=Ya(t);Wa[e]?Wa[e].fieldOrder[r]=n:Wa[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=ql.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=yc.getContextPath(this.getPageReference(),n),a=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,a),this.getActionsApi().triggerFieldChange(n,a),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=yc.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,ql.getSuggestionsContext(this.getContextName()).removeField(n)}}}function tu(e){const t=new eu(e);return{getPConnect:()=>t}}const nu=new class{constructor(){this.bchannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1}#c=()=>{window.uniqueId=(new Date).getTime(),this.setReverseCoexistenceCaseLoaded(!0),this.bchannel=new BroadcastChannel("coexistence"),this.bchannel.onmessage=e=>{switch(e.data.action){case"displayDirtyPopup":this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(ws.publish(rt.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback.call());break;case"loadPreview":{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;r===window.uniqueId&&tu({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n});break}}},ws.subscribe(nt.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),ws.subscribe(nt.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};#d=()=>{ws.unsubscribeAllWithEventType(nt.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),ws.unsubscribeAllWithEventType(nt.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.bchannel=null,this.isDirtyDialogActive=!1};init=()=>{this.#c()};destroy=()=>{this.#d()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.bchannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.bchannel.postMessage({action:"displayDirtyPopupFromConstellation",uniqueId:window.uniqueId}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.bchannel.postMessage({action:"handleDiscardInInfinity",uniqueId:window.uniqueId}),this.broadcastEventToIframe=!1):(this.callback.call(),this.callback=null),this.isDirtyDialogActive=!1}},ru={publishConstellationLoadedEvent:()=>{ws.publish(rt.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}},au=new class{activateContainerItemOnSwitch(e){const t=`${rt.APP.APP}/${rt.PRIMARY}`,n={target:t,containerItemID:Lo(t,e)};tu({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${rt.APP.APP}/${rt.PRIMARY}`,n={target:t,containerItemID:Lo(t,e)};tu({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){tu({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){tu({}).getPConnect().getContainerManager().resetContainers({name:rt.PREVIEW,context:rt.APP.APP})}isFormDirty(e){const t=`${rt.APP.APP}/${rt.PRIMARY}`,n=Ei(t,e);return Ga.isStateModified(n)}getEventUtils(){return ru}getBroadcastUtils(){return nu}isTraditionalUICase(e){return eo(e)}},su=class{static openCase(e,t=nt.APP.APP,n={}){return n.renderInline=!0,n.pageName?mu.getEnvironmentInfo().setDefaultCasePage(n.pageName):(mu.getEnvironmentInfo().setDefaultCasePage(rt.PY_DETAILS),n.pageName=rt.PY_DETAILS),n?.disableAssignmentHeader?mu.getEnvironmentInfo().disableAssignmentHeader(n.disableAssignmentHeader):mu.getEnvironmentInfo().disableAssignmentHeader(!1),Bl.openCase(e,t,rt.PRIMARY,n)}static createCase(e,t=nt.APP.APP,n={}){return n.renderInline=!0,n.pageName?mu.getEnvironmentInfo().setDefaultCasePage(n.pageName):(mu.getEnvironmentInfo().setDefaultCasePage(rt.PY_DETAILS),n.pageName=rt.PY_DETAILS),n?.disableAssignmentHeader?mu.getEnvironmentInfo().disableAssignmentHeader(n.disableAssignmentHeader):mu.getEnvironmentInfo().disableAssignmentHeader(!1),Bl.createCase(e,t,rt.PRIMARY,n)}static getNextWork(e=nt.APP.APP,t={}){return t.renderInline=!0,t.pageName?mu.getEnvironmentInfo().setDefaultCasePage(t.pageName):(mu.getEnvironmentInfo().setDefaultCasePage(rt.PY_DETAILS),t.pageName=rt.PY_DETAILS),t?.disableAssignmentHeader?mu.getEnvironmentInfo().disableAssignmentHeader(t.disableAssignmentHeader):mu.getEnvironmentInfo().disableAssignmentHeader(!1),Bl.getNextWork(e,rt.PRIMARY,t)}static openAssignment(e,t=nt.APP.APP,n={}){return n.renderInline=!0,n.pageName?mu.getEnvironmentInfo().setDefaultCasePage(n.pageName):(mu.getEnvironmentInfo().setDefaultCasePage(rt.PY_DETAILS),n.pageName=rt.PY_DETAILS),n?.disableAssignmentHeader?mu.getEnvironmentInfo().disableAssignmentHeader(n.disableAssignmentHeader):mu.getEnvironmentInfo().disableAssignmentHeader(!1),Bl.openAssignment(e,t,rt.PRIMARY,n)}static openPage(e,t,n=nt.APP.APP,r={}){const a=Bt;r?.defaultCasePage?mu.getEnvironmentInfo().setDefaultCasePage(r.defaultCasePage):mu.getEnvironmentInfo().setDefaultCasePage(rt.PY_DETAILS),r?.disableAssignmentHeader?mu.getEnvironmentInfo().disableAssignmentHeader(r.disableAssignmentHeader):mu.getEnvironmentInfo().disableAssignmentHeader(!1);const s={viewName:e,className:t,acTargetName:rt.PRIMARY,actionMgrID:$s.getNextActionMgrId(),context:n},{promise:o}=$s.actionManagerPromise(a,s.actionMgrID);return Mc({type:a,payload:{...s}}),o}static getCurrentContextAPI(e,t=nt.APP.APP){const n={meta:{config:{}},options:{context:t,pageReference:e,containerName:rt.PRIMARY}};return mu.createPConnect(n).getPConnect()}},ou={getResolvedSemanticURL:(e,t,n)=>Er.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:On,ACTION_SHOWDATA:bn,ACTION_SHOWVIEW:Cn})},iu=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}};class cu{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,a){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:a}]}registerForRefresh(e,t,n,r,a){const s=r.split("/").join(rt.HASH_DELIMITER),o=ot.getHashedString(s);"PROP_CHANGE"===e?this.propChangeRefreshMap?.[a]?.[n]?!this.propChangeRefreshMap[a][n].some((e=>e.uniqueHash===o))&&this.propChangeRefreshMap[a][n].push({uniqueHash:o,callback:t}):cu.initializeRefreshCache(this.propChangeRefreshMap,a,n,o,t):this.refreshMap?.[a]?.[`${e}-${n}`]?!this.refreshMap[a][`${e}-${n}`].some((e=>e.uniqueHash===o))&&this.refreshMap[a][`${e}-${n}`].push({uniqueHash:o,callback:t}):cu.initializeRefreshCache(this.refreshMap,a,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const du=new cu,lu={setTokens:e=>{md({tokenInfo:e}),yd({Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>ws.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>(async()=>new Promise(((e,t)=>{const n={...cd};if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:a=null}=n.tokenInfo,{revoke:s}=n.endPoints,{client_id:o,client_secret:i}=n,c={"content-type":"application/x-www-form-urlencoded"};i&&(c.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const d=["access_token"];a&&d.push("refresh_token"),d.forEach((async e=>{const t=new URLSearchParams;i||t.append("client_id",o),t.append("token","access_token"===e?r:a),t.append("token_type_hint",e),await fetch(s,{method:"POST",headers:new Headers(c),body:t.toString()})})),yd({Authorization:null}),md({tokenInfo:null}),e()})))(),getAuthInstance:e=>Qc.init(e),setAuthorizationHeader:e=>{yd({Authorization:e}),setTimeout((()=>ws.publish("updateSession",{updateStatus:"success"})),0)}},uu=new class{constructor(){this.userSettings={}}#l(e){return e?.toString().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.#l(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.#l(e));return ot.isValidJson(t)||t};removeComponentState=e=>{sessionStorage.removeItem(this.#l(e))};#u=async()=>{const{restApi:e,reqType:t}=Dr("getUserSettings")||{};ud(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))};init=()=>{Hr.getUserSettings()?this.userSettings=Hr.getUserSettings():this.#u()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return ot.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));const{restApi:n,reqType:r}=Dr("updateUserSettings");return ud(n,{method:r,body:ot.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))}};var pu=new W(V),hu=pu;function fu(e,t){return void 0===t&&(t=pu),be((function(n,r){var a=null,s=null,o=null,i=function(){if(a){a.unsubscribe(),a=null;var e=s;s=null,r.next(e)}};function c(){var n=o+e,s=t.now();if(s<n)return a=this.schedule(void 0,n-s),void r.add(a);i()}n.subscribe(Pe(r,(function(n){s=n,o=t.now(),a||(a=t.schedule(c,e),r.add(a))}),(function(){i(),r.complete()}),void 0,(function(){s=a=null})))}))}const gu=new class{getDebouncedSubject(e){return(new ue).pipe(fu(e))}};class yu{constructor(){yu.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"8.23.0";onPCoreReady=e=>Jg(e);getComponentsRegistry=()=>Tg();checkIfSemanticURL=()=>zg();isValidSemanticURL=()=>(()=>{if(kr()){const e=Er.processUrl(gr(),!0);return!!Er._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>El;getViewResources=()=>u;configureForBrowserBookmark=e=>Kg(e);getStore=()=>wc();resetStore=()=>{const e=Un,{promise:t,actionMgrID:n}=$s.actionManagerPromise(e);return Mc({type:e,payload:{actionMgrID:n}}),t};getMessageManager=()=>Ni;getCoexistenceManager=()=>au;getStoreValue=(e,t,n)=>Fc(e,t,n);getContainerUtils=()=>i;getAnnotationUtils=()=>as;getFieldUtils=()=>at;getFieldDefaultUtils=()=>Ua;getAssetLoader=()=>qr;getAttachmentUtils=()=>Sd;getViewRuleApi=()=>$d;getFeedUtils=()=>Vd;getTagUtils=()=>Gd;getStakeholderUtils=()=>Hd;getUserApi=()=>Ld;getCaseFollowerApi=()=>xd;getCaseUtils=()=>rl;getStateUtils=()=>ql;getRelatedCasesApi=()=>wd;getPersonalizationUtils=nl;getDataApi=()=>hl;getDataApiUtils=()=>al;getAnalyticsUtils=()=>Il;getLocaleUtils=()=>Kr;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{yu.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{yu.behaviorOverrides[e]=t};getBehaviorOverrides=()=>yu.behaviorOverrides;getBehaviorOverride=e=>yu.behaviorOverrides[e];getAsynchronousUtils=()=>gu;createPConnect=e=>tu(e);getPubSubUtils=()=>ws;registerComponentCreator=e=>{!function(e){Xl=e}(e)};getConstants=()=>Object.freeze(nt);getEvents=()=>class{static getCaseEvent=()=>Object.freeze(nt.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(nt.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(nt.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(nt.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)};getRestClient=()=>l;getMashupApi=()=>su;getEnvironmentInfo=()=>Hr;getRuntimeParamsAPI=()=>Wd;getSemanticUrlUtils=()=>ou;getRemoteCaseUtils=()=>mr;getNavigationUtils=()=>uu;registerModule=(e,t)=>class{static registerModule(e,t,n){n[e]=()=>t}}.registerModule(e,t,this);getErrorHandler=()=>iu;getFormUtils=()=>Ga;getMessagingServiceManager=()=>dl;getMetadataUtils=()=>e;getDataPageUtils=()=>ul;getDataTypeUtils=()=>bl;getCascadeManager=()=>Nc;isDeepEqual=(e,t)=>Ue()(e,t);getAuthUtils=()=>lu;getDebugger=()=>Br;getDeferLoadManager=()=>Oc;getExpressionEngine=()=>s;getActionsSequencer=()=>Vl;getRefreshManager=()=>du}const mu=new yu;function Iu(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Eu(e){return!!e&&!!e[rp]}function Au(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ap}(e)||Array.isArray(e)||!!e[np]||!!(null===(t=e.constructor)||void 0===t?void 0:t[np])||bu(e)||Pu(e))}function _u(e,t,n){void 0===n&&(n=!1),0===Su(e)?(n?Object.keys:sp)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function Su(e){var t=e[rp];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:bu(e)?2:Pu(e)?3:0}function $u(e,t){return 2===Su(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cu(e,t,n){var r=Su(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function bu(e){return Qu&&e instanceof Map}function Pu(e){return Zu&&e instanceof Set}function vu(e){return e.o||e.t}function Ou(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=op(e);delete t[rp];for(var n=sp(t),r=0;r<n.length;r++){var a=n[r],s=t[a];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Tu(e,t){return void 0===t&&(t=!1),Ru(e)||Eu(e)||!Au(e)||(Su(e)>1&&(e.set=e.add=e.clear=e.delete=Nu),Object.freeze(e),t&&_u(e,(function(e,t){return Tu(t,!0)}),!0)),e}function Nu(){Iu(2)}function Ru(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Du(e){var t=ip[e];return t||Iu(18,e),t}function xu(){return Ju}function wu(e,t){t&&(Du("Patches"),e.u=[],e.s=[],e.v=t)}function Mu(e){Lu(e),e.p.forEach(Uu),e.p=null}function Lu(e){e===Ju&&(Ju=e.l)}function ju(e){return Ju={p:[],l:Ju,h:e,m:!0,_:0}}function Uu(e){var t=e[rp];0===t.i||1===t.i?t.j():t.O=!0}function Fu(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||Du("ES5").S(t,e,r),r?(n[rp].P&&(Mu(t),Iu(4)),Au(e)&&(e=ku(t,e),t.l||Gu(t,e)),t.u&&Du("Patches").M(n[rp].t,e,t.u,t.s)):e=ku(t,n,[]),Mu(t),t.u&&t.v(t.u,t.s),e!==tp?e:void 0}function ku(e,t,n){if(Ru(t))return t;var r=t[rp];if(!r)return _u(t,(function(a,s){return Vu(e,r,t,a,s,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Gu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=4===r.i||5===r.i?r.o=Ou(r.k):r.o,s=a,o=!1;3===r.i&&(s=new Set(a),a.clear(),o=!0),_u(s,(function(t,s){return Vu(e,r,a,t,s,n,o)})),Gu(e,a,!1),n&&e.u&&Du("Patches").N(r,n,e.u,e.s)}return r.o}function Vu(e,t,n,r,a,s,o){if(Eu(a)){var i=ku(e,a,s&&t&&3!==t.i&&!$u(t.R,r)?s.concat(r):void 0);if(Cu(n,r,i),!Eu(i))return;e.m=!1}else o&&n.add(a);if(Au(a)&&!Ru(a)){if(!e.h.D&&e._<1)return;ku(e,a),t&&t.A.l||Gu(e,a)}}function Gu(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&Tu(t,n)}function Bu(e,t){var n=e[rp];return(n?vu(n):e)[t]}function Hu(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Wu(e){e.P||(e.P=!0,e.l&&Wu(e.l))}function qu(e){e.o||(e.o=Ou(e.t))}function Yu(e,t,n){var r=bu(t)?Du("MapSet").F(t,n):Pu(t)?Du("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:xu(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},a=r,s=cp;n&&(a=[r],s=dp);var o=Proxy.revocable(a,s),i=o.revoke,c=o.proxy;return r.k=c,r.j=i,c}(t,n):Du("ES5").J(t,n);return(n?n.A:xu()).p.push(r),r}function Ku(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ou(e)}var zu,Ju,Xu="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Qu="undefined"!=typeof Map,Zu="undefined"!=typeof Set,ep="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,tp=Xu?Symbol.for("immer-nothing"):((zu={})["immer-nothing"]=!0,zu),np=Xu?Symbol.for("immer-draftable"):"__$immer_draftable",rp=Xu?Symbol.for("immer-state"):"__$immer_state",ap=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),sp="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,op=Object.getOwnPropertyDescriptors||function(e){var t={};return sp(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ip={},cp={get:function(e,t){if(t===rp)return e;var n=vu(e);if(!$u(n,t))return function(e,t,n){var r,a=Hu(t,n);return a?"value"in a?a.value:null===(r=a.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!Au(r)?r:r===Bu(e.t,t)?(qu(e),e.o[t]=Yu(e.A.h,r,e)):r},has:function(e,t){return t in vu(e)},ownKeys:function(e){return Reflect.ownKeys(vu(e))},set:function(e,t,n){var r=Hu(vu(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var a=Bu(vu(e),t),s=null==a?void 0:a[rp];if(s&&s.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,a)&&(void 0!==n||$u(e.t,t)))return!0;qu(e),Wu(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==Bu(e.t,t)||t in e.t?(e.R[t]=!1,qu(e),Wu(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=vu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){Iu(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Iu(12)}},dp={};_u(cp,(function(e,t){dp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),dp.deleteProperty=function(e,t){return dp.set.call(this,e,t,void 0)},dp.set=function(e,t,n){return cp.set.call(this,e[0],t,n,e[0])};var lp=function(){function e(e){var t=this;this.g=ep,this.D=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var a=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return s.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var o;if("function"!=typeof n&&Iu(6),void 0!==r&&"function"!=typeof r&&Iu(7),Au(e)){var i=ju(t),c=Yu(t,e,void 0),d=!0;try{o=n(c),d=!1}finally{d?Mu(i):Lu(i)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return wu(i,r),Fu(e,i)}),(function(e){throw Mu(i),e})):(wu(i,r),Fu(o,i))}if(!e||"object"!=typeof e){if(void 0===(o=n(e))&&(o=e),o===tp&&(o=void 0),t.D&&Tu(o,!0),r){var l=[],u=[];Du("Patches").M(e,o,l,u),r(l,u)}return o}Iu(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(a))}))};var r,a,s=t.produce(e,n,(function(e,t){r=e,a=t}));return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return[e,r,a]})):[s,r,a]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){Au(e)||Iu(8),Eu(e)&&(e=function(e){return Eu(e)||Iu(22,e),function e(t){if(!Au(t))return t;var n,r=t[rp],a=Su(t);if(r){if(!r.P&&(r.i<4||!Du("ES5").K(r)))return r.t;r.I=!0,n=Ku(t,a),r.I=!1}else n=Ku(t,a);return _u(n,(function(t,a){r&&function(e,t){return 2===Su(e)?e.get(t):e[t]}(r.t,t)===a||Cu(n,t,e(a))})),3===a?new Set(n):n}(e)}(e));var t=ju(this),n=Yu(this,e,void 0);return n[rp].C=!0,Lu(t),n},t.finishDraft=function(e,t){var n=(e&&e[rp]).A;return wu(n,t),Fu(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!ep&&Iu(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var a=Du("Patches").$;return Eu(e)?a(e,t):this.produce(e,(function(e){return a(e,t)}))},e}(),up=new lp,pp=up.produce;up.produceWithPatches.bind(up),up.setAutoFreeze.bind(up),up.setUseProxies.bind(up),up.applyPatches.bind(up),up.createDraft.bind(up),up.finishDraft.bind(up);const hp=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{ul.updateDataPageStore(t),Object.keys(t).forEach((n=>{ot.getIn(e,[rt.SHARED,n])?Object.keys(t[n]).forEach((r=>{ot.setIn(e,[rt.SHARED,n,r],t[n][r])})):ot.setIn(e,[rt.SHARED,n],t[n])}))})(e,n),r&&ot.deleteIn(e,[r,"shared"])},fp=(e,t,n=!1)=>{const{context:r,caseViewMode:a=(n?void 0:rt.PERFORM_MODE),containerName:s}=t;s!==Oo.WORKAREA&&a&&ot.setIn(e,[r,"context_data","caseViewMode"],a)},gp=(e,t=[])=>{t.forEach((t=>ot.deleteIn(e,t)))},yp=(e,t=[])=>{t.forEach((t=>ot.deleteIn(e,t)))},mp=(e,t=[])=>{t.forEach((t=>{ot.deleteIn(e,t)}))},Ip=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:a=!0}=n;ot.deleteIn(e,[t,"nextAssignmentInfo"]),ot.deleteIn(e,[t,"caseInfo","availableActions"]),ot.deleteIn(e,[t,"caseInfo","availableProcesses"]),ot.deleteIn(e,[t,"caseInfo","activeActionID"]),ot.deleteIn(e,[t,"caseInfo","assignments"]),ot.deleteIn(e,[t,"caseInfo","childCases"]),a&&(ot.deleteIn(e,[t,"caseInfo","confirmationLinks"]),ot.deleteIn(e,[t,"caseMessages"])),r&&(ot.deleteIn(e,[t,"caseInfo","actionButtons"]),ot.deleteIn(e,[t,"caseInfo","navigation"]))};const Ep=[(e,t)=>pp(e,(e=>{switch(t.type){case nn:return e[t.payload.context]=Wc(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge}),fp(e,t.payload,!0),hp(e,t.payload),e;case Ft:{const{context:n,reference:r,value:a,isArrayDeepMerge:s}=t.payload;return qc(e[n],r,a,{isArrayDeepMerge:s}),e}case kt:{const{context:n,reference:r,value:a}=t.payload;return Yc(e[n],r,a),e}case rn:return Bc(e[t.payload.context],t.payload.reference),e;case Yt:return ot.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case Kt:return ot.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case kn:{const{data:n}=t.payload;return hp(e,{data:{shared:n}}),e}case Vn:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;ot.deleteIn(e.shared,[n,r]);const a=ot.getIn(e.shared,[n]);a&&0===Object.keys(a).length&&ot.deleteIn(e.shared,[n])})),e}case Hn:{const n=ot.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?ot.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):ot.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),(e={},t)=>pp(e,(e=>{switch(t.type){case dn:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&Ip(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(rt.WORKAREA)&&-1===n.indexOf(rt.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,fp(e,t.payload),((e,t)=>{const{context:n}=t;ot.setIn(e,[n,"context_data","actionType"],t.actionType),ot.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)})(e,t.payload),hp(e,t.payload),e}case In:{t.payload.doDeleteCaseSummary&&Ip(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n}=t.payload;return!n||-1===n.indexOf(rt.WORKAREA)&&-1===n.indexOf(rt.MODAL)?e[t.payload.containerItemID]=Wc(e[t.payload.containerItemID],t.payload.data):e[t.payload.context]=Wc(e[t.payload.context],t.payload.data),fp(e,t.payload),hp(e,t.payload),yp(e,t.payload.suggestionContexts),e}case ln:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:a}=t;a&&ot.deleteIn(e,[r]),ot.deleteIn(e,[n])})(e,t.payload),mp(e,n),gp(e,t.payload.transientItems),yp(e,t.payload.suggestionContexts),e}case cn:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{ot.deleteIn(e,[t])})):ot.deleteIn(e,[n]),e}case En:{const{context:n,contextToBeRemoved:r,data:a,childContainersContextsToBeRemoved:s}=t.payload;return Ip(e,t.payload.context),fp(e,t.payload),e[n]=Wc(e[n],e[r]),e[n]=Wc(e[n],a),ot.deleteIn(e,[r]),mp(e,s),hp(e,t.payload),e}case An:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:a=[]}}=t;let{payload:{data:s}}=t;const o=ot.getIn(e[n],"pulse");let i=ot.getIn(e[n],"OperatorID"),c=ot.getIn(e[n],"pxRequestor");return c&&s.pxRequestor&&(c=ot.mergeDeep(c,s.pxRequestor)),i&&s.OperatorID&&(i=ot.mergeDeep(i,s.OperatorID)),!r&&o&&(s=qc(s,"pulse",o),s=qc(s,"OperatorID",i),s=qc(s,"pxRequestor",c)),ot.setIn(e,n,s),fp(e,t.payload),hp(e,t.payload),mp(e,a),gp(e,t.payload.transientItems),yp(e,t.payload.suggestionContexts),e}case Bn:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return Ip(e,n,{doDeleteConfirmationDetails:r}),e}case un:{const{transientItemID:n,data:r}=t.payload;return ot.setIn(e,n,r)}case hn:case fn:{const{transientItems:n}=t.payload;return n.forEach((t=>ot.deleteIn(e,t))),e}case pn:case gn:{const{transientItemID:n,data:r}=t.payload;return Wc(ot.getIn(e,n),r),e}case yn:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&ot.deleteIn(e,[n,t]);return e}case zt:{const{key:n,value:r}=t.payload;return ot.setIn(e,`${rt.SHARED}.${n}`,r),e}case $n:{const{context:n,data:r}=t.payload;return ot.setIn(e,n,r)}default:return e}})),(e=bp().data,t)=>pp(e,(e=>{switch(t.type){case sn:return t.payload.err.errorDetails&&"Validation fail"===t.payload.err.errorClassification?function(e,t){const{err:n,formFields:r}=t.payload;let{context:a}=t.payload;const{fieldErrors:s,pageErrors:o}=((e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[rt.ERROR_IN_PAGE_IDENTIFIER]&&e[rt.ERROR_FIELD_IN_PAGE]):{const a=`${e[rt.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),s=`${a}${e[rt.ERROR_IN_PAGE_IDENTIFIER]}`,o=ot.deepClone(e);o[rt.ERROR_FIELD_IN_PAGE]=a,t.includes(s.slice(1))?r.push(o):n.push(e);break}case Boolean(e[rt.ERROR_IN_PAGE_IDENTIFIER]&&!e[rt.ERROR_FIELD_IN_PAGE]):{const a=e[rt.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(a)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}})(n.errorDetails,r);if(ot.setIn(e,[a,..._i.FIELD_MESSAGES_PATH],{}),ot.setIn(e,[a,..._i.PAGE_MESSAGES_PATH],[]),s.forEach((t=>{if(t[rt.ERROR_FIELD_IN_PAGE]){const n=t[rt.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),s=Si(r,t,rt.PROPERTY);ot.setIn(e,[a,...s],[])}}})),s.length>0&&((e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[rt.ERROR_FIELD_IN_PAGE].slice(1),a=n[rt.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(a){let s=r?`caseInfo.content.${r}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const o=Si(a,s,rt.PROPERTY),i={type:nt.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue},c=ot.getIn(e[t],o,[]);ot.setIn(e[t],o,[...c,i])}})(e,t,n)}))})(e,a,s),o.length>0){const t=(e=>{const t=[];return e.map((e=>{t.push({type:nt.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);a.includes&&a.includes(Oo.WORKAREA)&&(a=nr(a)),e[a]||(a=rt.APP.APP),ot.setIn(e,[a,..._i.PAGE_MESSAGES_PATH],t)}else a.includes&&a.includes(Oo.WORKAREA)&&(a=nr(a)),ot.deleteIn(e,[a,..._i.PAGE_MESSAGES_PATH]);return e}(e,t):e;case In:{const{context:n}=t.payload,r=[n,..._i.FIELD_MESSAGES_PATH],a=[n,..._i.PAGE_MESSAGES_PATH];if(ot.setIn(e,r,{}),ot.setIn(e,a,[]),n&&n.includes(Oo.WORKAREA)){const t=[cr(n),..._i.PAGE_MESSAGES_PATH];ot.setIn(e,t,[])}return e}case jn:return((e,t)=>{const{property:n,pageReference:r,category:a,type:s,isListEntry:o,stateObj:i}=t.payload;let{context:c}=t.payload;if(i)return((e,t,n,r=[rt.CONTEXT_DATA,rt.CASE_INFO.CASE_INFO,rt.CONTENT])=>{const a=ot.getIn(t,r);if(a){const t=Pi(a,[],[]);for(const a of t)ot.setIn(e[n],[...r,...a],{})}})(e,i,c),e;const d=Si(n,r,a,o);if(o)ot.setIn(e[c],d,{});else{a===rt.PAGE&&c.includes&&c.includes(Oo.WORKAREA)&&(c=nr(c));const t=ot.getIn(e[c],d);if(t&&a===rt.CASEMESSAGES)ot.setIn(e[c],Si(n,r,a),"");else if(t&&t.length>0&&Array.isArray(t)){const o=t.filter((e=>e.type!==s));d&&d.length>0&&ot.setIn(e[c],Si(n,r,a),o)}}return e})(e,t);case Ln:{const{messages:n,property:r,pageReference:a,context:s,category:o}=t.payload,i=Si(r,a,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&ot.setIn(e[s],Si(r,a,o),n),e}default:return e}})),(e,t)=>pp(e,(e=>{if(t.type===Gn){const{instruction:n,actions:r,context:a,referenceList:s,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,d=Dc(s);switch(n){case rt.LIST_ACTIONS.INSERT:((e,t,n,r,a)=>{ot.setIn(e[t],[...n,r],a)})(e,a,d,o,c);break;case rt.LIST_ACTIONS.UPDATE:((e,t,n,r,a)=>{const s=Wc(ot.getIn(e[t],[...n,r],{}),a);ot.setIn(e[t],[...n,r],s)})(e,a,d,o,c);break;case rt.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const a=ot.getIn(e[t],n,[]);a.splice(r,1),ot.setIn(e[t],n,a)})(e,a,d,o);break;case rt.LIST_ACTIONS.MOVE:((e,t,n,r,a)=>{const s=ot.getIn(e[t],[...n,r],{}),o=ot.getIn(e[t],n,[]);o.splice(r,1),o.splice(a,0,s),ot.setIn(e[t],n,o)})(e,a,d,o,i);break;case rt.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const a=ot.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:s,listIndex:o}=e;r===rt.LIST_ACTIONS.SELECT?(a[o]=s,n.forEach((e=>{Ta(t,e)}))):delete a[o]})),ot.setIn(e[t],n,a.filter(Boolean))})(e,a,d,r);break;case rt.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{ot.setIn(e[t],n,[])})(e,a,d)}}return e}))],Ap=(e=bp().data,t)=>t.type===Un?bp().data:(Ep.forEach((n=>{e=n(e,t)})),e),_p=(e,t=[])=>{t.forEach((t=>{ot.deleteIn(e,[t])}))},Sp=(e,t)=>{const{type:n,payload:r}=t,a=n===In,{target:s,context:o,semanticURL:i="",root:c,containerItemID:d,childContainers:l,flowName:u,resourceType:p="",key:h="",clearView:f=!1}=r;return c?ot.setIn(e,[s,"items",d,"view"],c):f&&ot.deleteIn(e,[s,"items",d,"view"]),o&&ot.setIn(e,[s,"items",d,"context"],o),u&&ot.setIn(e,[s,"items",d,"flowName"],u),(!a||a&&h)&&ot.setIn(e,[s,"items",d,"key"],h.trim()),(!a||a&&i)&&ot.setIn(e,[s,"items",d,"semanticURL"],i),(!a||a&&p)&&ot.setIn(e,[s,"items",d,"resourceType"],p),_p(e,l),e},$p=(e=bp().containers,t)=>t.type===Un?bp().containers:pp(e,(e=>{switch(t.type){case on:{const{context:n,name:r,type:a,actionMgrID:s}=t.payload,o=`${n}/${r}`;let i=null;return $s.resolveActionByID(s,null,!1),e[o]||(i={type:a,accessedOrder:[],items:{}},ot.setIn(e,[o],i)),e}case Sn:{const{containerName:n,childContainers:r=[]}=t.payload;return ot.deleteIn(e,[n]),r.forEach((t=>{ot.deleteIn(e,[t])})),e}case cn:{const{context:n,name:r,actionMgrID:a,childContainers:s}=t.payload,o=`${n}/${r}`;return $s.resolveActionByID(a,null,!1),ot.setIn(e,[o,"accessedOrder"],[]),ot.setIn(e,[o,"items"],{}),Array.isArray(s)&&s.forEach((t=>{ot.deleteIn(e,[t])})),e}case dn:{const{target:n,context:r,isInCreateStage:a,isBulkAction:s,semanticURL:o,root:i,containerItemID:c,actionMgrID:d,key:l,flowName:u,resourceType:p,actionName:h,isMinimizable:f,showProgress:g,progressMessage:y,modalOptions:m,resourceStatus:I,isMultiRecordData:E,acTertiary:A,parentContext:_}=t.payload,S=e[n],$=S&&S.type,C=S&&S.accessedOrder||[],b=S&&S.items||{};let P=null;return e[n]&&"single"===$&&C.length>0?Sp(e,t):(P={accessedOrder:[...C,c],items:{...b,[c]:{view:i,semanticURL:o,key:l,flowName:u,context:r,isInCreateStage:a,resourceType:p,actionName:h,isMinimizable:f,...s&&{isBulkAction:s},showProgress:g,progressMessage:y,modalOptions:m,resourceStatus:I,...A&&{acTertiary:A},...E&&{isMultiRecordData:E},..._&&{parentContext:_}}}},$s.resolveActionByID(d,null,!1),e[n]=ke()(e[n],P),e)}case In:{const{actionMgrID:n,data:r}=t.payload;let a=e;try{a=Sp(e,t),$s.resolveActionByID(n,r,!1)}catch{$s.rejectActionByID(n,!1)}return a}case An:return((e,t)=>{const{actionMgrID:n,data:r,target:a,containerItemID:s}=t.payload;let o=e;try{ot.setIn(e,[a,"items",s,"transientItems"],[]),o=Sp(e,t),$s.resolveActionByID(n,r,!1)}catch{$s.rejectActionByID(n,!1)}return o})(e,t);case mn:{const{target:n,containerItemID:r,actionMgrID:a}=t.payload;try{const t=ot.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),ot.setIn(e,[n,"accessedOrder"],t),$s.resolveActionByID(a,null,!1)}catch{$s.rejectActionByID(a,!1)}return e}case En:case ln:{const{target:n,containerItemID:r,actionMgrID:a,childContainers:s}=t.payload;try{const t=ot.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));ot.setIn(e,[n,"accessedOrder"],t),ot.deleteIn(e,[n,"items",r]),_p(e,s),$s.resolveActionByID(a,null,!1)}catch{$s.rejectActionByID(a,!1)}return e}case un:{const{transientItemID:n,target:r,contextName:a}=t.payload,s=ot.getIn(e,[r,"items",a,"transientItems"])??[];return ot.setIn(e,[r,"items",a,"transientItems"],[...s,n])}case fn:{const{target:n,containerItemID:r}=t.payload;return ot.deleteIn(e,[n,"items",r,"transientItems"]),e}case hn:{const{target:n,transientItemID:r,containerItemID:a}=t.payload,s=(ot.getIn(e,[n,"items",a,"transientItems"])??[]).filter((e=>e!==r));return ot.setIn(e,[n,"items",a,"transientItems"],s)}default:return e}}));let Cp={};const bp=()=>Cp;function Pp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Dl(e),r=function(e,t){return"number"==typeof Rl(e)?e.pop():1/0}(e),a=e;return a.length?1===a.length?Se(a[0]):function(e){return void 0===e&&(e=1/0),xe(oe,e)}(r)(Re(a,n)):Ml}const vp={},Op=[(e,t)=>e.pipe(Ol(mc,Yn),De((e=>e.payload)),xe((e=>{const{context:n,caseWideAction:r,contextData:a,caseViewAction:s,interestPage:o,options:i}=e;let c={};const{propertyName:d="",classID:l=""}=i,u=so(n),p=ot.getPropertyName(d),h=p?p.split("."):[],f=h.pop(),g=h.join("."),y=[];if(g){const e=mt(g,l);if(e&&"copy"===e.dataRetrievalType){const e=ot.getIn(u,`content.content.${g}`)||{};Object.keys(e).length>0&&Object.keys(e).filter((e=>e!==f)).forEach((t=>{delete e[t],y.push(`${g}`)}))}}e.serverPrecedenceFields=y;let m={...u.content,contextData:a};const I=Co(n);ot.isEmpty(I)||(m=$o(I,m)),r?c=Dr("refreshCaseData",e):s?(c=Dr("refreshCaseView",e),m.interestPage=o):c=Dr("refreshAssignmentData",e);const{restApi:E}=c,{reqType:A}=c,_=t.value.data[n]?.caseInfo?.headers;return Re(((e,t,n)=>{const{url:r,context:a}=e;if(e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag}),!n)return ud(`${r}`,e,a);const s=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);(e=>sd[e])(s)>0&&vp[s]&&vp[s].forEach((e=>e.cancelConfig.cancel()));const o=fd();return e.signal=o.token,e.cancelConfig=o,vp[s]?vp[s].push(e):vp[s]=[e],ud(e.url,e,a,{cancelContext:s}).then((e=>(delete vp[s],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete vp[s],e}))})({body:m,reqHeaders:_,context:n,method:A,url:vc(e,E)},e,!s&&!r)).pipe(De((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:ao(t.headers)}))),Fl(": Error ocurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),xe((async e=>{if(e&&e.type===sn)return uo(e);const{actionConfig:t,response:n,headers:r,actionMgrID:a}=e,{context:s,serverPrecedenceFields:o}=t,i=bs.getTargetViewContainerName(Cn),c=Ar(i,s),d={acName:c,context:s},l=jd(n,{[nt.STOPMERGEACTIONS]:!0,[nt.ACTIONS.DELETEAVIALACTIONS]:!0});l.directUrlUpdation=!1,await io(l,t,d);const u=oo(l,{target:c,context:s});u.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=oc(Li,u,{serverPrecedenceFields:o});return Ba.registerForServerChanges(),Mc(p),Ba.unRegisterForServerChanges(),$s.resolveActionByID(a,u),[]})))],Tp=Op,Np=[e=>e.pipe(Ol(Fn),xe((async e=>{const{context:t}=e.payload,n={},r={},a=Object.keys(e.payload.datapages).map((a=>{const s=e.payload.datapages[a];if(s.mode===rt.READONLY&&s?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=s?.refreshStrategy||{},n=jc()[s.name];if(n&&a in n){const r=n[a],{loadTime:s}=r;if(!al.isTimeElapsed(s,e,t))return}}return al.getData(s.name,{dataViewParameters:s.dataViewParameters},t).then((e=>{const t=s.mode===rt.READONLY?r:n;t[s.name]?t[s.name][a]={pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[s.name]={[a]:{pxResults:e.data.data,parameters:s.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(a);const s=[];return Object.keys(n).length&&s.push(Li({context:t,data:n})),Object.keys(r).length&&s.push(cc({data:r,context:t})),Mc(s),[]})))],Rp=Np,Dp=e=>{const{containerName:t,isInCreateStage:n}=e;return n?rt.MODAL:t||bs.getTargetViewContainerName(Nn)},xp=e=>{const t=ot.getIn(e,[rt.DATA,rt.CASE_INFO.CASE_INFO]);return Ps(t)&&vs(Hr.getOperatorIdentifier(),t)},{RESOURCE_TYPES:wp}=nt,Mp=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:a,isChild:s}=e,o=Bs(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?no.PAGE:n||(!Fs(r)&&!Fs(a)||s?no.PAGE:no.FORM)},Lp=(e,t,n,r,a,s,o)=>ud(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...rd.addDebugHeaders(r)}}},a,{doNotMergeHttpMessagesForStatusCode:s?o:""}),{RESOURCE_TYPES:jp}=nt,{RESOURCE_TYPES:Up}=nt,{RESOURCE_TYPES:Fp}=nt,kp=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,a=Go(n),s=`${a.includes("root")?rt.APP.ROOT:rt.APP.APP}/${Oo.MODAL}`;e.push(oc(Zi,{containerItemID:n,context:a,target:s,skipReleaseLockRequest:r}))},Vp=e=>Fc(".openCaseViewAfterCreate",rt.CONTEXT_DATA,e)??!0,Gp=e=>/^app\/preview_[0-9]*/g.test(e),Bp=(e,t)=>{const n=nr(e);return!Gp(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},Hp=async(e,t,n,r,a)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===rt.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0),a.push(oc(zi,{...e,...r})),ot.setIn(e,"acName",r.target),await io(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:a}=t,s=Go(a);if(Js(a)){const t=cr(s),a={data:n,caseViewMode:r,context:t};ot.setIn(a.data,["context_data","caseViewMode"],r),e.push({type:Bn,payload:{context:t}}),e.push(oc(Li,a))}})(a,t,e)},Wp=async(e,t,n,r,a,s,o,i)=>{const{isCaseWideAction:c,isInCreateStage:d,containerItemID:l}=e,u=nr(e.context),p=qs(a),h=Ws(a),f=d&&!p,g=Wo(u)[0],y=g?Fo(g):u,m=Us(l),I=Go(l),E=Object.freeze({target:e.target,containerItemID:l,context:I,containerName:m});f&&!Gp(e.context)?await(async(e,t,n,r,a)=>{((e,t,n)=>{if(t.isProcessAction&&(kp(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?rt.APP.ROOT:rt.APP.APP}/${Oo.PRIMARY}`,a=ho(r,Oo.PRIMARY),s={insKey:e.ID,className:e.content.classID,context:a,acTargetName:rt.PRIMARY,isChild:!0},o={type:Xt,payload:{...s}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,a),n.resourceType=Fp.CASE,n.directUrlUpdation=!0,t.isProcessAction||await(async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:a}=n,s=(o=t,ot.getIn(o,Ls.NEXT_ASSIGNMENT_INFO_ID,rt.EMPTY_STRING));var o;const i=Ws(t),{caseViewMode:c,headers:d,semanticURL:l,actionMgrID:u,directUrlUpdation:p,key:h,flowName:f,resourceType:g}=r;(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:a,assignmentId:s,caseType:i}),kp(e,{...n,skipReleaseLockRequest:!0});const y=`${n?.containerItemID.includes("root")?rt.APP.ROOT:rt.APP.APP}/${Oo.PRIMARY}`,m=ho(y,Oo.PRIMARY),I=rd.getCoreHeadersFromContext(n.context)||!1,E=oo(t,{target:y,context:m,containerItemID:m,caseViewMode:c,headers:d,semanticURL:l,key:h,flowName:f,resourceType:g,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[rt.COREHEADER_APP_DEBUG_ID]}});if(Ko(y)){const t=Lc(m),a=Ys({data:t}),[,s]=a?a.split(" "):[],o=`You will lose unsaved changes for ${s}. Do you want to continue?`,{continueExecution:i}=yo(y,{dirtyMessage:o});if(!i)return r.directUrlUpdation=!1,$s.rejectActionByID(u),Ll();if(!Vp(n.context))return e;e.push(oc(nc,E))}else e.push(oc(Hi,E));return t.directUrlUpdation=p,t.semanticURL=l,await io(t,{...E,acName:y},{acName:y,context:m}),e})(a,{translatedDXAPIResponse:r,actionInPayload:t},n)})(i,e,t,a,s):Bp(e.context,y)?await(async(e,t,n,r,a,s,o,i,c)=>{const{headers:d}=c;if(e){const l=Ko(ri(e));let u=!1;const p=ri(n),h=No(p),f=Fo(p);h?.items?.[f]?.key===c?.actionInPayload?.caseID&&(u=!0),kp(a,r);const g=Us(e),y={target:ri(e),containerItemID:e,context:e,containerName:g};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const m=cr(n),I=Lc(m),E=Lc(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(l&&A===_||!l&&""===o)a.push(oc(zi,{...t,key:o,resourceType:"",...y}));else if(s){const s=ri(e),i=Lo(s,o);if(i)y.target=s,y.context=i,y.containerItemID=i,a.push(oc(zi,{...t,key:o,resourceType:"",...y}));else{const e=Wo(n)[0];r.target=e,r.context=ho(e,rt.WORKAREA,n),r.containerItemID=r.context,a.push(oc(Hi,{...r,...t}));const s=r.containerItemID;a.push(oc(Xi,{parentContainerTarget:e,containerItemID:s}))}}if(r.target=ri(e),r.containerName=Us(e),r.context=e,r.containerItemID=e,ot.setIn(t,"acName",y.target),await io(i,t),u){const{data:e,caseViewMode:r}=t;n.includes(rt.WORKAREA)&&Js(n)&&(n=cr(n));const s={data:e,caseViewMode:r,context:n};ot.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:Bn,payload:{context:n}}),a.push(oc(Li,s))}if(!s&&t.caseViewMode===rt.PERFORM_MODE){const t=((e,t)=>{const n=ri(e);return Lo(n,t)})(e,o),n={data:{caseInfo:{headers:d}},context:t};a.push(oc(Li,n)),a.push(Ic(((e,t=!1,n=!1)=>{const r=$s.getNextActionMgrId();return{ID:yc.getProperyValue(nt.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:yc.getProperyValue(nt.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{kp(a,r);let e=!1;const o=ri(n),i=No(o),d=Fo(o);if(i?.items?.[d]?.key===c?.actionInPayload?.caseID&&(e=!0),s){const e=Wo(n)[0];r.target=e,r.context=ho(e,rt.WORKAREA,n),r.containerItemID=r.context,a.push(oc(Hi,{...r,...t}));const s=r.containerItemID;a.push(oc(Xi,{parentContainerTarget:e,containerItemID:s}))}if(e){const{data:e,caseViewMode:r}=t,s={data:e,caseViewMode:r,context:n};ot.setIn(s.data,["context_data","caseViewMode"],r),a.push({type:Bn,payload:{context:n}}),a.push(oc(Li,s))}}})(y,t,u,e,s,n,r,a,o):!c||p||Bp(e.context,y)?await Hp(t,e,a,E,s):(kp(s,e),((e,t,n)=>{const{containerItemID:r,caseID:a}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,s=nr(r),o=Go(s);e.push(oc(Ui,{containerItemID:s,context:o,container:Oo.PREVIEW,containerName:Oo.PREVIEW,caseId:a,viewName:nt.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(s,e,{caseClassName:h}))},{RESOURCE_TYPES:qp}=nt,Yp=e=>{const t={},{routeKey:n,isModalAction:r,caseID:a,context:s,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:d}=Dr(i,{ID:a,caseID:a,viewType:no.PAGE});return Br.getPreviewMode()&&(t[rt.SKIPCOREHEADERS]=!0),Re(ud(c,{method:d,headers:t},s,{includeRemoteSystemIdIfPresent:!!o})).pipe(De((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:ao(t.headers)})),Fl(": Error ocurred during ajax call at release lock request : ",s))},{RESOURCE_TYPES:Kp}=nt,zp=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:a}=e;let s=[];return xl(n.payload).pipe(xe((e=>((e,t)=>{const{assignmentID:n,actionID:r,context:a}=e,{restApi:s,reqType:o}=Dr("save",{assignmentID:n,actionID:r}),{content:i}=so(a),c=t.value.data[a]?.caseInfo?.headers;return Re(ud(s,{method:o,body:i,headers:{"if-match":c&&c.etag}},a)).pipe(De((t=>({response:t.data,actionInPayload:e,headers:ao(t.headers)}))),Fl(": Error ocurred during ajax call at saveAndCloseAssignment Epic at save action : ",a))})(e,r))),xe((e=>{if(e&&Vs(e.type))return xl(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?rt.APP.ROOT:rt.APP.APP}/${Oo.PRIMARY}`,n=ho(t,Oo.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:rt.PRIMARY,isChild:!0},a={type:Xt,payload:{...r}};s.push(a)}let t=!1;const{containerItemID:n}=e&&e.actionInPayload,r=nr(n),a=ri(r),o=No(a),i=Fo(a);if(o?.items?.[i]?.key===e?.actionInPayload?.caseID&&(t=!0),t){const t={context:r,data:{...e.response.data}};s.push(oc(Li,t))}return e.actionInPayload.RemoteSystemID=mr.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Yp(e.actionInPayload)})),xe((async e=>{if(e&&Vs(e.type)){const{payload:t}=e,n=uo({...e,...t,actionMgrID:a});return s.push(n),s}const{actionInPayload:n}=e,{context:r,containerName:o}=n,i={target:Ar(o,r),containerItemID:r,context:r};return t||s.push(oc(Zi,i)),s})),De((()=>(Mc(s),Zs(s,a),t||(s=[]),s))))},{LOCAL_ACTION_TYPE:Jp}=rt,{RESOURCE_TYPES:Xp}=nt,Qp=(e,t)=>{const{actionID:n,assignmentID:r,caseID:a,context:s,openActionType:o}=e,{isProcessAction:i}=t,c=i?xn:(e=>{const t=e.localActionType.toLowerCase();return t===Jp.CASE_WIDE||t===Jp.EXPRESS?wn:Dn})(e),d=no.FORM,{reqType:l}=Dr(c,{caseID:a,ID:r,actionID:n,viewType:d});let{restApi:u}=Dr(c,{caseID:a,ID:r,actionID:n,viewType:d});return e.actionType=c===wn?rt.CASE:rt.ASSIGNMENT,u.indexOf("viewType=")<0&&(u=u.indexOf("?")<0?`${u}?viewType=${d}`:`${u}&viewType=${d}`),Re(ud(u,{method:l,headers:{}},s)).pipe(De((t=>({response:t.data,actionInPayload:e,headers:ao(t.headers)}))),Fl(`: Error ocurred during ajax call at ${o} Epic : `,s))},Zp=(e,t)=>{const{isProcessAction:n}=t,r=n?xn:Dn;let a;if(e.openActionType=r,"modal"===js(r,e)){a=Wo(e.contextName)[0]?Wo(e.contextName):ri(e.contextName);const n=a?Fo(a):e.contextName,r=Go(n);return Wo(e.contextName)[0]&&e.continueExecution&&hs(r)?Re([Cl(e.saveActionPayload)]).pipe(xe((e=>(e=>{let t,n=0;const r=[],a={value:wc().getState()};return xl(e).pipe(Ol($l),Tl((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!s){const e={type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $s.rejectActionByID(n,!0,e),xl([])}return zp({action:e,state$:a,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),xe((n=>{if(1===n.length&&Vs(n[0].type)){const{continueExecution:n}=yo(a);if(!n)return $s.rejectActionByID(e.actionMgrID),Ml.pipe(Jc((()=>Ll()))).toPromise();if(n)return Qp(e,t)}return Qp(e,t)})),De((e=>e))):Qp(e,t)}return Qp(e,t)},eh=async(e,t,{headers:n,actionInPayload:r})=>{const{context:a,actionName:s,openActionType:o,doDeleteCaseSummary:i}=r,c=jd(e),d=js(o,r),l=Ar(d,a);let u,p,h=!1;!Jo(l)||zo(l)&&!Mo(l,e.data.caseInfo.ID)||ks(d)?(p=rr(d,a),ks(d)&&(p=ir(a,p)),u=p,h=!0):(u=zo(l)?Lo(l,e.data.caseInfo.ID):Fo(l),p=Go(u));const f={acName:l,target:l,containerName:d,context:p};await io(c,r,f);const g=c.uiResources?.root;let y;y=g?rt.PERFORM_MODE:rt.REVIEW_MODE;const m=oo(c,{target:l,context:p,containerItemID:u,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:s,isMinimizable:!1,isInCreateStage:ks(d),resourceType:Xp.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});g&&Xs(m,c),ks(d)&&delete m.doDeleteCaseSummary,r.openActionType===Mn&&(m.isBulkAction=!0,m.data.caseInfo.actionButtons.main[0].jsAction="submitBulkAction",m.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",m.data.caseInfo.cases=r.selectedList);const I=h?Hi:zi;if(t.push(oc(I,m)),h){const a=Wo(r.contextName),s=Lo(a,e.data.caseInfo.ID);if(s){const e={data:{caseInfo:{headers:n}},context:s};t.push(oc(Li,e))}}return u!==Fo(l)&&t.push(oc(Xi,{target:l,containerItemID:u})),Js(u)&&_o(m,t),t};var th=Array.isArray,nh=Object.getPrototypeOf,rh=Object.prototype,ah=Object.keys;function sh(e){if(1===e.length){var t=e[0];if(th(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&nh(r)===rh){var n=ah(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var oh=Array.isArray;function ih(e){return De((function(t){return function(e,t){return oh(t)?e.apply(void 0,O([],v(t))):e(t)}(e,t)}))}function ch(e,t){return void 0===e&&(e=0),void 0===t&&(t=pu),e<0&&(e=0),function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=hu);var r=-1;return null!=t&&(Nl(t)?n=t:r=t),new ce((function(t){var a=function(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;a<0&&(a=0);var s=0;return n.schedule((function(){t.closed||(t.next(s++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}(e,e,t)}function dh(e){return be((function(t,n){var r=!1,a=null,s=null,o=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=a;a=null,n.next(e)}};t.subscribe(Pe(n,(function(t){null==s||s.unsubscribe(),r=!0,a=t,s=Pe(n,o,z),Se(e(t)).subscribe(s)}),(function(){o(),n.complete()}),void 0,(function(){a=s=null})))}))}const lh=e=>{const{context:t}=e;let n={...so(t).content,contextData:!1};const r=Co(t);ot.isEmpty(r)||(n=$o(r,n));const{restApi:a,reqType:s}=Dr("refreshCaseView",e);return n.interestPage=e.interestPage,Re(ud(a,{method:s,body:n},t)).pipe(De((t=>({actionInPayload:e,response:t.data,headers:ao(t.headers)}))),Fl(": Error ocurred during ajax call : ",t))},uh=[e=>{let t=0,n=[],r="",a=!1;return e.pipe(Ol(xi),kl(100),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{context:n}=e,r=Dp(e),s=Ar(r,n),{continueExecution:o,removeActionPayload:i}=(e=>Ko(e)?{continueExecution:!0,removeActionPayload:{}}:yo(e))(s);return a=eo(e.class),o?(e.isTraditionalUICase=a,((e,t)=>{const{class:n,context:r,viewType:a=no.PAGE}=e,{removeActionPayload:s}=t;let o=e?.pageName?e?.pageName:Hr.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),Re(Cd.createCase(n,{...e,pageName:o,viewType:a,context:r})).pipe(De((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:s}))),Fl("Error ocurred during ajax call at createWork Epic : ",r))})(e,{removeActionPayload:i})):($s.rejectActionByID(t),Ll())})),xe((async e=>{if(e&&e.type===sn)return e.payload.context=yi(),n.push(uo(e)),n;const{actionInPayload:s,response:o,headers:i,removeActionPayload:c}=e;let d;d=!(s.renderInline||Hr.getDefaultCasePage()||a)&&xp(o),ot.setIn(o.data,"caseInfo.isFirstAssignment",!0);const l=Dp({...s,isInCreateStage:d}),u=Ar(l,s.context),p=ho(u,l,s.context);if(!ks(l)&&Ko(u)){const{continueExecution:e}=yo(u);if(!e)return $s.rejectActionByID(t),Ll()}if(!(s?.openCaseViewAfterCreate??1)&&!d){const e=ot.getIn(o.data,"caseInfo.content");r=`${e.pyID} ${Kr.getLocaleValue("has been created.","Assignment")}`;const t=Ks(o),a=Ws(o);return(e=>{ws.publish(rt.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)})({toastMessage:r}),(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:`${e.pyID}`,assignmentId:t,caseType:a}),n}const h=jd(o);let f=Nr("createWork",{caseClassName:Ws(h)});f=f.replace(/{.+?}/,Hs(Ys(h))),h.semanticURL=f,((e,t)=>{const n=xp(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:a}=t;ot.setIn(e,["directUrlUpdation"],(!n||a)&&!r)})(h,s);const g={acName:u,context:p};await io(h,s,g);const y={target:u,context:p,containerItemID:p,headers:i,semanticURL:f,isInCreateStage:d,isMinimizable:d,caseViewMode:h.confirmationNote?rt.REVIEW_MODE:rt.PERFORM_MODE,assignmentContext:ot.getIn(h,"nextAssignmentInfo.context"),nextAssignmentInfo:ot.getIn(h,"nextAssignmentInfo"),resourceType:nt.CASE,openCaseViewAfterCreate:s.openCaseViewAfterCreate,modalOptions:s.modalOptions,debugInfo:s.debugInfo};Xs(y,h);const m=oo(h,y);a&&(m.data.caseInfo.content.coexistenceAction="openAssignment");const I=po(u,m);return fo(I)&&zs(n,{removeActionPayload:c,target:u}),n.push(I),Eo(n),n})),De((()=>(So(n),Zs(n,t),r="",n=[],n))))},e=>{let t=0,n=[];const r=[];let a=!1,s=!1;return e.pipe(Ol(_l),De((e=>(({actionMgrID:t}=e.payload),{...e.payload,insKey:e.payload.assignmentID}))),xe((e=>{a=e.isGetNextWork;const{context:n}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?no.FORM:Mp(e),e.viewType=r;const o=js(Tn,e),i=Ar(o,n),{activate:c,activateContainerActionPayload:d}=Io(jp.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return xl({type:mn,activateContainerActionPayload:d,actionInPayload:e});const{continueExecution:l,removeActionPayload:u}=d?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:yo(i);return l?(s=eo(e.className),e.isTraditionalUICase=s,((e,t)=>{const n=Mp(e),{headers:r,context:a,assignmentID:s,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:d,caseID:l,jsActionQueryParams:u,isLastStepInCreateStage:p}=e,{restApi:h,reqType:f}=o?Dr("getNextWork",{viewType:n}):c?Dr("openStage",{caseID:l,stageID:d}):Dr(Tn,{assignmentID:s,viewType:n}),{removeActionPayload:g}=t,y=Hr.getDefaultCasePage();let m,I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),m=y?`${h}?viewType=${n}&pageName=${y}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,u&&Object.keys(u).forEach((e=>{m+=`&${e}=${u[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=ao(t,e.remoteClassName)),t})(e);return Re(Lp(m,f,E,i,a,o,"404")).pipe(De((e=>Hr.isCoexistenceAppOfType(rt.APP_TYPE.UIKIT)&&!p?Ps(e.data.data.caseInfo)?e:(m=m.replaceAll(I,"pyDetails"),Hr.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:m}):e)),xe((e=>e?.isReloadWithDifferentViewTypeRequired?Lp(m,f,E,i,a,o,"404"):xl(e))),De((t=>{const{key:a,flowName:o}=lo(s);return{response:{...t.data,key:a,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:g,headers:ao({...r,...t.headers})}})),Fl("Error ocurred during ajax call at openAssignment Epic : ",a))})(e,{removeActionPayload:u})):($s.rejectActionByID(t),Ll())})),xe((async e=>{if(e?.type===sn){if(a){const{payload:t}=e,{err:n}=t,a=n.response.status;r.push({status:Number(a)})}return n.push(uo(e)),n}const{type:t,actionInPayload:o,response:i,viewType:c,headers:d,removeActionPayload:l,activateContainerActionPayload:u}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=_l,r=i?.data?.caseInfo?.ID;o.isOpenStage=!0,o.stageID=e,o.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...o,caseID:r,headers:d}};return n.push(a),n}const{context:p,caseViewMode:h,debugInfo:f}=o;let g=((e,t)=>{const n=Bs(e);let r;r=!Hr.getDefaultCasePage()&&Ps(n);const{isChild:a,containerName:s}=t,o=a&&r,i=r&&!t.isActionFromToDoList;return o||i?rt.MODAL:s||js(Tn,t)})(i,o);s&&(g=o.containerName);const y=Ar(g,p);if(t===mn)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:a,isParallelAssignment:s,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:d=!1}=c,l=Go(a);await io({directUrlUpdation:!d,semanticURL:r},c,{acName:i,target:i,context:l}),e.push(oc(Xi,{containerItemID:a,target:i,isParallelAssignment:s,insKey:o,resourceType:wp.CASE,context:l,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(n,u,{actionInPayload:o,target:y}),Eo(n),n;const m=jd(i);((e,t)=>{const n=Bs(e),r=Ys(e),a=Ps(n),{skipBrowserSemanticUrlUpdate:s=!1,viewType:o,isTraditionalUICase:i}=t,c=o===no.PAGE&&(!a||i)&&!s,{caseTypeID:d}=n;if(c){const t=Nr(On,{caseClassName:d}).replace(/{.+?}/,Hs(r));e.semanticURL=t,e.directUrlUpdation=!0}})(m,o);const I=ho(y,g,p),E={acName:y,target:y,context:I};await io(m,o,E);const A={target:y,context:I,containerItemID:I,headers:d,isMinimizable:Ps(ot.getIn(m,"data.caseInfo")),doDeleteCaseSummary:o.doDeleteCaseSummary,acTertiary:o.acTertiary,resourceType:nt.CASE,debugInfo:f};Xs(A,m,{skipFlowNameUpdate:o?.caseViewMode===rt.REVIEW_MODE});const _=oo(m,A);return o.isProcessAction&&(_.data.isProcessAction=o.isProcessAction),s&&(_.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t,n,r,a,s,o)=>{Ko(t)&&Jo(t)?((e,t,n,r,a)=>{Mp(e,t)===no.FORM?(n.caseViewMode=r||rt.PERFORM_MODE,a.push(oc(zi,n))):a.push(oc(nc,n))})(r,a,e,s,n):((e,t,n,r,a)=>{if(zs(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=Fo(t);let r=null;return n&&(r=Ro(t,n)),r?.key===e&&zo(t)})(r.key,n))r.context=Bo(n),r.containerItemID=r.context,e.push(oc(nc,r));else if((a?.isChild||a?.isRemote)&&a?.isMultiDoc){const t=ri(a.context);r.target=t,r.context=a.context,r.containerItemID=a.context,e.push(oc(nc,r))}else{const t=ri(r.context),n=Lo(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(oc(nc,r))):e.push(oc(Hi,r))}})(n,o,t,e,r)})(_,y,n,o,i,h,l),c===no.FORM&&Js(_.containerItemID)&&_o(_,n),Eo(n),(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:o.assignmentID,caseKey:_.key}),n})),De((()=>{const e=t;return Mc(n),Zs(n,e,r),n[0]?.payload?.isParallelAssignment&&Mc({type:_l,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n})))},e=>{let t=0,n=[];return e.pipe(Ol("OPEN_WORK_BY_HANDLE"),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{context:n,isChild:r,viewType:a}=e,s=js(On,e),o=Ar(s,n);let i,c=!0;if("none"!==a){const e=yo(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return $s.rejectActionByID(t),Ll();const{activate:d,activateContainerActionPayload:l}=Io(Up.CASE,o,e);return d&&!r&&"none"!==a?xl({type:mn,activateContainerActionPayload:l,actionInPayload:e}):((e,t)=>{const{insKey:n,headers:r,context:a,debugInfo:s,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:Hr.getDefaultCasePage(),d=Dr(On,{caseID:n,params:{pageName:c}});let{restApi:l}=d;const{reqType:u}=d;return"none"===o&&(l=`${l.split("viewType")[0]}viewType=none`),Re(ud(l,{method:u,headers:{...r,...s&&{...rd.addDebugHeaders(s)}}},a)).pipe(De((t=>({response:t.data,actionInPayload:e,headers:ao({...r,...t.headers}),removeActionPayload:i}))),Fl("Error ocurred during ajax call at openWorkByHandle Epic : ",a))})(e,{removeActionPayload:i})})),xe((async e=>{if(e&&Vs(e.type))return n.push(uo(e)),n;const t=Lc(e?.actionInPayload?.context),r=eo(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t={data:{...jd(e?.response)?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:Bn,payload:{context:t.context,doDeleteConfirmationDetails:!1}}),r&&(t.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(oc(Li,t));const a=ri(e?.actionInPayload?.context),s=Us(e?.actionInPayload?.context),o=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:s});if(Js(e?.actionInPayload?.context)){const t=oo(e?.response,{...o});_o({...t,isArrayDeepMerge:!0},n)}}}else await(async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:a,type:s,response:o,removeActionPayload:i,headers:c}=e,{context:d,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=r,p=js(On,r),h=Ar(p,d);if(s===mn)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:a,actionInPayload:{context:s,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=js(On,a),d=Ar(c,s),l=Go(r);await io({directUrlUpdation:!o,semanticURL:n},a,{acName:d,containerName:c,target:d,context:l}),e.push(oc(Xi,{containerItemID:r,target:d,context:l,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:a,actionInPayload:r});else{const e=ho(h,p,d,{buildNew:!0}),a=jd(o),s=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,a=Ys(e),s=n?r:Ws(e);let o=Nr(On,{caseClassName:s});return o=o&&o.replace("{workID}",Hs(a)),o})(a,r);a.semanticURL=s,a.directUrlUpdation=!l;const f={acName:h,context:e};await io(a,r,f);const g=oo(a,{target:h,context:e,containerItemID:e,semanticURL:s,headers:c,debugInfo:u});g.caseViewMode=rt.REVIEW_MODE,g.resourceType=Up.CASE,n&&(g.data.caseInfo.content.coexistenceAction="openWorkByHandle"),Xs(g,a,{skipFlowNameUpdate:!0});const y=po(h,g);i.containerItemID&&fo(y)&&t.push(oc(Zi,{containerItemID:i.containerItemID,target:h})),t.push(y)}Eo(t),(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:d})})(e,n,r);return n})),De((()=>(Mc(n),Zs(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ol("OPEN_LOCAL_ACTION"),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>((e,t)=>Zp(e,t))(e,{actionMgrID:t}))),xe((async e=>{if(!e)return Ml;if(Vs(e.type)){const t=uo(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return ot.setIn(a,"data.caseInfo.activeActionID",s),ot.setIn(a.data,rt.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&ot.setIn(a.data,rt.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await eh(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),ws.unsubscribe(rt.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,"expressLocalActionSubmit")},ws.subscribe(rt.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,"expressLocalActionSubmit"))})(t),n})),De((()=>(Mc(n),Zs(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ol("OPEN_BULK_ACTION"),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Mn;const a=js(Mn,e),s=Ar(a,n),{continueExecution:o}=yo(s);return o?(e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:a,bulkContextID:s="",bulkContextType:o=""}=e,{reqType:i,restApi:c}=Dr("openBulkAction",{caseTypeID:a,actionID:t,bulkContextID:s,bulkContextType:o});return Re(ud(c,{method:i},n)).pipe(De((t=>({response:t.data,actionInPayload:e,headers:ao(t.headers)}))),Fl(`: Error ocurred during ajax call at ${r} Epic : `,n))})(e):($s.rejectActionByID(r),Ll())})(e,{actionMgrID:t}))),xe((async e=>{if(e&&Vs(e.type)){const t=uo(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e,{actionID:s}=t;return ot.setIn(a,"data.caseInfo.activeActionID",s),await eh(a,n,{headers:r,actionInPayload:t}),(e=>{const{callbacks:t}=e;var n;t?.submit&&(n=e=>{t.submit(e),ws.unsubscribe(rt.PUB_SUB_EVENTS.EVENT_BULKACTION,"bulkActionSubmit")},ws.subscribe(rt.PUB_SUB_EVENTS.EVENT_BULKACTION,n,"bulkActionSubmit"))})(t),n})),De((()=>(1===n.length&&Vs(n[0].type)?$s.rejectActionByID(t):$s.resolveActionByID(t),Mc(n),n=[],n))))},e=>{let t,n=0,r=[],a="";return e.pipe(Ol("SUBMIT_BULK_ACTION"),Tl((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const e={type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $s.rejectActionByID(n,!0,e),xl([])}return xl(e.payload).pipe(xe((e=>(t=e,(e=>{const{actionID:t,context:n,cases:r,classID:a}=e,{content:s}=so(n,{nonEmptyAndChangedData:!0});let o=5;try{ql.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults")?.find((e=>e.pyClassName===a))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,{reqType:d,restApi:l}=Dr("performBulkAction",{actionID:t}),u=[],p=i.length;for(let t=0;t<p;t+=c)s.cases=i.slice(t,t+c),s.cases.length&&u.push(Re(ud(l,{method:d,body:s},n)).pipe(De((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:ao({...r})}})),Fl("Error ocurred during ajax call at submitbulkaction Epic : ",n)));return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return R(Rl(e))?e.pop():void 0}(e),r=sh(e),a=r.args,s=r.keys,o=new ce((function(e){var t=a.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Se(a[t]).subscribe(Pe(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(s?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(s,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(ih(n)):o}(u)})(t)))),xe((e=>{let n=0,s=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),s+=Number(t.failureCount),s&&t.results.map((e=>{"200"!==e.status&&e.error&&o.push({ID:e.BusinessID,message:e.error.errorDetails[0].localizedValue})}))})),a=`${n} record(s) updated`,(e=>{ws.publish(rt.PUB_SUB_EVENTS.EVENT_BULKACTION,e)})({submitResponse:e}),t.target=`${rt.APP.APP}/${Oo.MODAL}`,r.push(oc(Zi,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),s&&r.push(oc(Qi,{messages:[{type:"error",message:`${s} records failed to update`,errorDetails:o,showHeader:!1}],context:nr(c)||c,category:"HTTP",showHeader:!1})),r})),De((()=>($s.resolveActionByID(n,a),Mc(r),r=[],r))))})))},e=>{let t=0,n=[];return e.pipe(Ol(Al),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>(Oi(e.context),((e,t)=>Zp(e,t))(e,{actionMgrID:t,isProcessAction:!0})))),xe((async e=>{if(e&&Vs(e.type)){const t=uo(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:a}=e;return await eh(a,n,{headers:r,actionInPayload:t}),n})),De((()=>(So(n),Zs(n,t),n=[],n))))},(e,t)=>{let n=0,r=[],a="",s="";return e.pipe(Ol("FINISH_ASSIGNMENT"),Tl((e=>{const o=Hr.isCoexistenceAppOfType(rt.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),s=e.payload.context,!ns(s)){const t={type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $s.rejectActionByID(n,!0,t),Vl.handleDeferredActionCompletion(e.payload.context),xl([])}return Ci({context:s,stateObj:Lc(s),clearContextMessages:!0}),xl(e.payload).pipe(xe((e=>(((e,t)=>{const{containerItemID:n,context:r,actionMgrID:a,isInCreateStage:s,isModalAction:o}=t;if(s&&o){const t=Us(n),s=Ar(t,r);e.push(oc(Xi,{containerItemID:n,target:s,actionMgrID:a}))}})(r,e),((e,t)=>{const{assignmentID:n,actionID:r,caseID:a,context:s,additionalHeaders:o={},isCaseWideAction:i,outcome:c}=e,{state$:d}=t,l=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r}=e;return t&&r?no.PAGE:n||no.FORM})(e),u=(e=>{const{isCaseWideAction:t}=e;return t?wn:"finishAssignment"})(e),p={assignmentID:n,actionID:r,caseID:a,viewType:l};let{restApi:h}=Dr(u,p),{reqType:f}=Dr(u,p);l&&h.indexOf("viewType=")<0&&(h=h.indexOf("?")<0?`${h}?viewType=${l}`:`${h}&viewType=${l}`),c&&h.indexOf("outcome")<0&&(h=h.indexOf("?")<0?`${h}?outcome=${c}`:`${h}&outcome=${c}`),i&&(f="PATCH");const{content:g,attachmentsExist:y}=so(s);e.attachmentsExist=y;const m=d.value.data[s]?.caseInfo?.headers||{},{etag:I}=m,E={"if-match":I,...o};return Re(ud(h,{method:f,body:g,headers:E},s)).pipe(De((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:ao({...E,...r})}})),Fl("Error ocurred during ajax call at finishAssignment Epic : ",s))})({...e},{state$:t})))),xe((async e=>{if(e&&e.type===sn){const t=uo(e);return r.push(t),r}const{headers:t,actionInPayload:s,response:i}=e,{containerItemID:c,context:d=Go(c),isModalAction:l,isInCreateStage:u}=s,p=ri(c);s.target=p;const h=Us(c),f=Object.freeze({target:s.target,containerItemID:c,context:d,containerName:h});ot.setIn(i.data,"caseInfo.isFirstAssignment",!1),ot.setIn(i.data,rt.CASE_INFO_IS_LOCAL_ACTION,!1),(e=>{ws.publish(rt.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:i});let g=jd(i,{[nt.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const y=Ws(g),m=nr(s.context),I=Wo(m)[0]?Fo(Wo(m)[0]):m,E=qs(g),A=u&&!E;!l||u||Bp(s.context,I)||(g=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(g,Lc(c)));const _=oo(g,{headers:t,actionMgrID:n,directUrlUpdation:!1});let S,$;Qs(_.data,s),_.caseClassName=y,_.resourceType=qp.ASSIGNMENT,_.headers=t;const C=g?.data?.caseInfo?.assignments?.some((e=>e.ID===s.assignmentID)),b=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(g,s),P=((e,t,n,r,a)=>{let s;const o=ri(t);return s=zo(o)?Lo(o,n.data.caseInfo.ID):Fo(o),r&&e&&kc(null,rt.CASE_VIEW_MODE_PROP,s)===rt.PERFORM_MODE&&a})(C,I,g,l,b);g?.data?.nextAssignmentInfo?(_.caseViewMode=rt.PERFORM_MODE,S=Ys(g),$=!0):P?(_.caseViewMode=rt.PERFORM_MODE,S=Ys(g),_.flowName=" ",_.deleteAssignmentSpecificResources=!1,$=!1):(_.caseViewMode=rt.REVIEW_MODE,S="",$=!1);const v=Ys(g);Xs(_,g,{skipFlowNameUpdate:_?.caseViewMode===rt.REVIEW_MODE||P});const O=Nr("createWork",{caseClassName:y}).replace(/{.+?}/,Hs(v));var T;if(g.semanticURL=O,_.semanticURL=O,l?(await Wp(s,_,$,S,g,r,e,i),A&&(a=Vp((T=s).context)?"":`${T.workID} ${Kr.getLocaleValue("has been created.","Assignment")}`)):u&&o&&!E?(Hr.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Oo.PRIMARY,targetContainerName:Oo.PRIMARY,viewType:no.PAGE,isLastStepInCreateStage:!0,context:n},a={type:tn,payload:{...r}};t.push(a)})(i,r,nr(d))):await Hp(_,s,g,f,r),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:a,caseID:s}=t,o=Bp(t.context,n);Ms({caseID:s,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:a,stages:e?.data?.caseInfo?.stages||[]})})(_,s,I),!g?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:a}=t;return{isCaseWideAction:n,caseID:Ys(e),assignmentID:n?null:r,actionID:n?a:null}})(g,s);(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:c})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===An));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const a=ec({target:n,containerItemID:r});a.payload.transientItems.length&&e.push(a)})(r,{transientItemID:c,target:p,isModalAction:l}),r})),De((()=>(Vl.handleDeferredActionCompletion(s),r.find((e=>e.type===sn))?$s.rejectActionByID(n):$s.resolveActionByID(n,a),So(r),r=[],a="",r))))})))},(e,t)=>{let n=0,r=[];return e.pipe(Ol("NAVIGATE_TO_STEP"),Tl((e=>(({actionMgrID:n}=e.payload),xl(e.payload).pipe(xe((e=>((e,t)=>{const{ID:n,stepID:r,containerItemID:a,context:s=Go(a),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?no.PAGE:no.FORM},{restApi:d,reqType:l}=Dr("navigateToStep",c),{content:u}=so(s),p=i.value.data[s].caseInfo.headers;return Re(ud(`${d}`,{method:l,body:u,headers:{"if-match":p&&p.etag}},s)).pipe(De((t=>({response:t.data,actionInPayload:e,headers:ao({...p,...t.headers})}))),Fl("Error ocurred during ajax call at navigateToStep Epic : ",s))})(e,{state$:t}))),xe((async e=>{if(e&&Vs(e.type))return r.push(uo(e)),r;const{actionInPayload:t,response:n,headers:a}=e,{containerItemID:s,context:o=Go(s),isModalAction:i}=t,c=ri(s),d=Us(s),l=Object.freeze({target:c,containerItemID:s,context:o,containerName:d}),u=jd(n),p={acName:c,...l};await io(u,t,p);const h=oo(u,{...l,headers:a});h.doDeleteCaseSummary=t.doDeleteCaseSummary,h.resourceType=Kp.ASSIGNMENT,Xs(h,u),Qs(h.data,t);const f=u.data.caseInfo.stages;return Ms({caseID:Ys(u),isModalAction:i,stages:f}),Js(s)&&_o(h,r),r.push(oc(zi,h)),Eo(r),r})),De((()=>(Mc(r),Zs(r,n),r=[],r))))))))},e=>{let t=0,n=[];return e.pipe(Ol("CANCEL_ASSIGNMENT"),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{isModalAction:t}=e;return e.context||(e.context=Go(e.containerItemID)),e.RemoteSystemID=mr.getRemoteHeaderByContext(e.context)??void 0,((e,t)=>{const{isModalAction:n}=t;return Yp({routeKey:"cancelAssignment",isModalAction:n,...e})})(e,{isModalAction:t})})),xe((async e=>{if(e&&e.type===sn)return n.push(uo(e)),n;const{actionInPayload:r,response:a}=e,{containerItemID:s,isModalAction:o,isInCreateStage:i}=r,c=ri(s),d=Go(s),l={target:o?`${rt.APP.APP}/${rt.MODAL}`:c,containerItemID:s,caseViewMode:o?rt.PERFORM_MODE:rt.REVIEW_MODE,context:d,actionMgrID:t,key:Ys(a)};return i&&n.push(oc(zi,l)),!o&&Js(s)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r}=t,a=nr(n),s={context:Go(a),data:{context_data:{caseViewMode:r}}};e.push(oc(Li,s))})(n,{childContainerItemID:s,caseViewMode:rt.REVIEW_MODE}),l.skipReleaseLockRequest=!0,n.push(oc(Zi,l)),n})),De((()=>(Mc(n),Zs(n,t),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ol(ln,An),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:a,skipReleaseLockRequest:s}=e;return t!==r||!n||a||s?xl([]):Yp(e)})),xe((e=>(e&&Vs(e.type)&&n.push(uo(e)),n))),De((()=>(Mc(n),Zs(n,t),n=[],n))))},(e,t)=>{let n,r=0;return e.pipe(Ol($l),Tl((e=>{const{saveOnly:a}=e.payload;return({actionMgrID:r,caseType:n}=e.payload),zp({action:e,state$:t,actionMgrID:r,caseType:n},a)})))},(e,t)=>{let n,r=0,a=[];return e.pipe(Ol(Sl),De((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),xe((e=>e.ignoreCaseDeletion?xl({actionInPayload:e}):(e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:a}=Dr("deleteCaseInCreateStage",{ID:t});return Re(ud(r,{method:a},n)).pipe(De((t=>({response:t.data,actionInPayload:e,headers:ao(t.headers)}))),Fl(": Error ocurred during ajax call at deleteCaseInCreateStage Epic : ",n))})(e))),xe((async e=>{if(e&&Vs(e.type)){const{payload:t}=e,n=uo({...e,...t,actionMgrID:r});return a.push(n),a}const{actionInPayload:n}=e,{context:s,isModalAction:o}=n,i=o?Oo.MODAL:Oo.PRIMARY,c=Ar(i,s);if(!o){const e={acName:c,target:c,context:s},r=t.value.containers[c],{semanticURL:a}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await io({directUrlUpdation:!0,semanticURL:a},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:rt.PRIMARY,isChild:!0},t={type:Xt,payload:{...e}};a.push(t)}const d={target:c,containerItemID:s,context:s,caseDeleted:!0};return a.push(oc(Zi,d)),a})),De((()=>(Mc(a),Zs(a,r)===rt.PROMISE_VALUE.RESOLVE&&(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)})({caseType:n}),a=[],a))))},e=>e.pipe(Ol(Rn),dh((()=>ch(100))),De((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:a,isDataObject:s,skipReleaseLockRequest:o}=e.payload;return $s.resolveActionByID(t),ws.publish(rt.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!a&&n,isDataObject:s,skipReleaseLockRequest:o}),[]}))),e=>e.pipe(Ol(_n),dh((()=>ch(100))),De((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:a}=e.payload,s=Ar(r,n);return $s.resolveActionByID(t),Mc(oc(Xi,{containerItemID:a,target:s,doDeleteCaseSummary:!1})),[]}))),e=>{let t=0,n=[],r="";return e.pipe(Ol(Wn),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>lh(e))),xe((async e=>{if(e&&e.type===sn)return n.push(uo(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:a}=e,s=t.containerName,o=Ar(s,t.context);let i=ho(o,s,t.context);i=ir(t.context,i);const c=jd(a);c.key=t.ID,c.data.caseInfo.ID=t.ID;const d={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context};c.uiResources.context_data.modalView=d;const l={acName:o,context:i};await io(c,t,l);const u=oo(c,{target:o,context:i,containerItemID:i});u.resourceStatus=t.actionType,u.isMultiRecordData=!0,u.parentContext=t.context;const p=po(o,u);return r=i,n.push(p),Eo(n),{actionsOut:n,actionInPayload:t}})),De((({actionInPayload:e})=>(Gs(n)?$s.rejectActionByID(t):$s.resolveActionByID(t),Mc(n),n=[],e.skipPageInstructions||((e,t,n,r,a)=>{a===rt.RESOURCE_STATUS.CREATE&&(Ba.isStateMachineExist(e,t,n)||Ba.setStateMachine(e,n,t,new $a(n,t,e)),Ba.getStateMachine(e,t,n).insert({},r+1,!0))})(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},e=>{let t,n=0,r=[];return e.pipe(Ol(qn),Tl((e=>{t=e.payload;const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $s.rejectActionByID(n,!0,e),xl([])}return xl(e.payload).pipe(xe((e=>(t=e,lh(t)))),xe((async e=>{if(e&&e.type===sn){const t=uo(e);return r.push(t),r}const{containerItemID:n,context:a}=t;var s,o,i,c;return s=a,o=t.parentContext,i=nt.CASE_INFO.CASE_INFO_CONTENT,c=!0,Ra(s).forEach((e=>{const t=ot.convertClipboardPageToPageRefNotation(e.target);Ba.isStateMachineExist(o,i,t)||Ba.setStateMachine(o,t,i,new $a(t,i,o));const n=Ba.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c);break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":n.delete(e.listIndex,c);break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":{const e=t.substring(t.lastIndexOf("."),t.length);n.deleteAll(e);break}}})),r.push(oc(Zi,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),r})),De((()=>(Gs(r)?$s.rejectActionByID(n):($s.resolveActionByID(n),bc(t.parentContext,"caseInfo.content",{})),Mc(r),r=[],r))))})))}],ph=uh;function hh(){return be((function(e,t){e.subscribe(Pe(t,z))}))}const{RESOURCE_TYPES:fh}=nt,gh=[e=>e.pipe(Ol(Gt),De((e=>e.payload)),xe((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID},n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(mr.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=mr.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:a}=Dr("loadView",t);return e.viewContext===fh.PAGE&&({restApi:r,reqType:a}=Dr(Cn,{page:e.viewName,pageClass:e.pageClass})),Re(ud(r,{method:a,headers:n},e.context)).pipe(De((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:ao(t.headers),rootView:ot.getIn(r,rt.ROOT)}})),Fl(": Error ocurred during ajax call at loadView Epic : ",e.context))})),xe((async e=>{const t={};if(e?.type===sn)return t.actionsOut=uo(e),t;try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:r,headers:a}=e,{containerItemID:s,container:o,updateData:i}=n,c=o||bs.getTargetViewContainerName(Cn),d=Ar(c,n.context),l=o===Oo.PREVIEW&&i?n.context:ho(d,c,n.context,{buildNew:!!o});n.context=l;const u={acName:d,context:l};let p={};p=o===Oo.PREVIEW?jd(r):jd(r,{[nt.STOPMERGEACTIONS]:!0,[nt.ACTIONS.DELETEAVIALACTIONS]:!0}),p.directUrlUpdation=!1,await io(p,n,u);const h={...n,target:d,context:l,containerItemID:s||l,headers:a},f=oo(p,h);if(f.resourceType=fh.CASE,o&&!i){f.caseViewMode=rt.REVIEW_MODE,f.caseViewMode=rt.REVIEW_MODE;const e=ri(f?.context);((e,t,n,r,a)=>{e?(r.actionsOut=[],r.actionsOut.push(oc(Xi,{target:t,containerItemID:e}))):r.actionsOut=oc(Hi,{...n,container:a})})(Lo(e,f.key),e,f,t,o)}else f.preserveClientChanges=!0,t.actionsOut=oc(Li,f)}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:a}=e.actionConfig;return"pyCasePreview"===a&&(e=>{ws.publish(rt.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),De((({rootView:e,actionsOut:t,actionMgrID:n=0})=>($s.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Ol(Bt),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{debugInfo:n,context:r,viewName:a,className:s,skipSemanticUrl:o=!1,containerName:i=bs.getTargetViewContainerName(Cn)}=e,c=n&&{...rd.addDebugHeaders(n)},d=Ar(i,r);let l="",u={},p=!1;if(!o){if(l=Nr(Cn,{page:a}),d&&l){const{activate:t,activateContainerActionPayload:n}=Io(fh.PAGE,d,{semanticURL:l});if(t)return xl({type:mn,activateContainerActionPayload:n,actionConfig:e})}if(({continueExecution:p,removeActionPayload:u}=yo(d)),!p)return $s.rejectActionByID(t),Ll()}const{restApi:h,reqType:f}=Dr(Cn,{page:a,pageClass:s});return Re(ud(h,{method:f,headers:c},r)).pipe(De((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:l,semanticURL:l},actionConfig:e,headers:ao(t.headers),removeActionPayload:u,skipSemanticUrl:o}})),Fl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),xe((async e=>{if(e&&e.type===sn)return n.push(uo(e)),n;const{type:t,actionConfig:r,skipSemanticUrl:a}=e,s=r.containerName||bs.getTargetViewContainerName(Bt),o=Ar(s,r.context);if(t===mn){const{activateContainerActionPayload:{semanticURL:t,containerItemID:a}}=e,s={acName:o,context:Go(a)};await io({directUrlUpdation:!0,semanticURL:t},r,s,!0),n.push(oc(Xi,{target:o,containerItemID:a}))}else{const t=ho(o,s,r.context),{response:i,headers:c={},removeActionPayload:d}=e,l=jd(i,{isCreateDataObject:r.isCreateDataObject});l.directUrlUpdation=!a;const u={acName:o,context:t};await io(l,r,u);const p={target:o,context:t,containerItemID:t,headers:c,debugInfo:r.debugInfo},h=oo(l,p);h.resourceType=nt.PAGE,r.isCreateDataObject&&(h.resourceType=nt.RESOURCE_TYPES.DATA,h.resourceStatus=nt.RESOURCE_STATUS.CREATE,delete h.data.caseInfo);const f=po(o,h);d.containerItemID&&fo(f)&&n.push(oc(Zi,{containerItemID:d.containerItemID,target:o})),n.push(f),Eo(n)}return ws.publish(nt.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),De((()=>{$s.resolveActionByID(t),Mc(n),n=[]})),hh())}],yh=gh,{RESOURCE_TYPES:mh}=nt,Ih=[e=>{let t,n=0,r=[];return e.pipe(Ol(Ht),De((e=>(({actionMgrID:n}=e.payload),e.payload))),xe((e=>{const{context:t,pageName:r,dataContext:a,dataContextParameters:s,skipSemanticUrl:o=!1,containerName:i=bs.getTargetViewContainerName(Bt),isDeferLoaded:c=!1}=e,d=Ar(i,t);let l="",u={},p=!1;if(!o){l=Nr(bn,{pageName:r,dataViewName:a},s);const{activate:t,activateContainerActionPayload:o}=Io(mh.PAGE,d,{semanticURL:l});if(t)return xl({type:mn,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:p,removeActionPayload:u}=yo(d)),!p)return $s.rejectActionByID(n),Ll()}return((e,t)=>{const{context:n,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:d,reqType:l,body:u}=Dr(bn,{pageName:r,dataContext:a,dataContextParameters:s});return Re(ud(d,{method:l,body:u},n)).pipe(De((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:ao(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),Fl("Error ocurred during ajax call at showData Epic : ",e.context))})({context:t,pageName:r,dataContext:a,dataContextParameters:s,semanticURL:l,skipSemanticUrl:o,containerName:i,isDeferLoaded:c},{removeActionPayload:u})})),xe((async e=>{if(e&&e.type===sn)return r.push(uo(e)),r;const{type:n,actionConfig:a,headers:s,response:o,skipSemanticUrl:i}=e;t=ot.getIn(o,rt.ROOT);const{containerName:c}=a,d=Ar(c,a.context);let l;if(a.isDeferLoaded){l=jd(o),l.directUrlUpdation=!i;const t={acName:d,context:a.context};await io(l,a,t);const n={target:d,context:a.context,containerItemID:e.containerItemID,headers:s},c=oo(l,n);return r=oc(Li,c),r}if(n===mn){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,s={acName:d,context:Go(n)};await io({directUrlUpdation:!0,semanticURL:t},a,s,!0),r.push(oc(Xi,{target:d,containerItemID:n,resourceType:mh.DATA}))}else{const t=ho(d,c,a.context),{removeActionPayload:n}=e;l=jd(o),l.directUrlUpdation=!i;const u={acName:d,context:t};await io(l,a,u);const p=oo(l,{target:d,context:t,containerItemID:t,headers:s});p.resourceType=mh.DATA;const h=po(d,p);n.containerItemID&&fo(h)&&r.push(oc(Zi,{containerItemID:n.containerItemID,target:d})),r.push(h),Eo(r)}return r})),De((()=>($s.resolveActionByID(n,t),Mc(r),r=[],r))))},e=>{let t=0,n=[];return e.pipe(Ol("CREATE_DATA_OBJECT"),kl(100),Tl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $s.rejectActionByID(t,!0,e),xl([])}return xl(e.payload).pipe(xe((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a}=e,s={data_view_ID:t},{restApi:o,reqType:i}=Dr("createDataObject",s),c=so(a);return Re(ud(o,{method:i,headers:r,body:{data:c.content}},a)).pipe(De((t=>({response:t.data,actionInPayload:e}))),Fl("Error ocurred during ajax call at createDataObject Epic",n))})(e))),xe((async e=>{if(e&&e.type===sn){const{payload:r}=e,a=uo({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?Oo.MODAL:Oo.PRIMARY,i={target:Ar(o,a),containerItemID:a,context:a};return n.push(oc(Zi,i)),n})),De((()=>(1===n.length&&Vs(n[0].type)?$s.rejectActionByID(t):$s.resolveActionByID(t),Mc(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Ol("VIEW_DATA_OBJECT"),kl(100),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>(e=>{const{dataLookUp:t,context:n,headers:r,viewName:a,requestPayload:s}=e,o={data_view_ID:t,view_ID:a},{restApi:i,reqType:c}=Dr("readDataObject",o);return Re(ud(i,{method:c,headers:r,body:{dataViewParameters:s}},n)).pipe(De((t=>({response:t.data,actionInPayload:e}))),Fl("Error ocurred during ajax call at getDataObjectView Epic",n))})(e))),xe((async e=>{if(e&&e.type===sn){const{payload:r}=e,a=uo({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r,response:a,headers:s={}}=e,{containerName:o}=r,i=Ar(o,r.context),c=ho(i,o,r.context),d={acName:i,context:c};await io(a,r,d);const l=oo(a,{target:i,context:c,containerItemID:c,headers:s});return l.resourceType=nt.RESOURCE_TYPES.DATA,l.resourceStatus=nt.RESOURCE_STATUS.UPDATE,l.key=JSON.stringify(r.requestPayload),n.push(oc(Hi,l)),n})),De((()=>(1===n.length&&Vs(n[0].type)?$s.rejectActionByID(t):$s.resolveActionByID(t),Mc(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Ol("UPDATE_DATA_OBJECT"),kl(100),Tl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:nt.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return $s.rejectActionByID(t,!0,e),xl([])}return xl(e.payload).pipe(xe((e=>(e=>{const{dataPageID:t,context:n,headers:r,containerItemID:a,key:s}=e,o={data_view_ID:t},{restApi:i,reqType:c}=Dr("updateDataObject",o),d=so(a);return Re(ud(i,{method:c,headers:r,body:{data:{...d.content,...s},pageInstructions:d.pageInstructions||[]}},a)).pipe(De((t=>({response:t.data,actionInPayload:e}))),Fl("Error ocurred during ajax call at updateDataObject Epic",n))})(e))),xe((async e=>{if(e&&e.type===sn){const{payload:r}=e,a=uo({...e,...r,actionMgrID:t});return n.push(a),n}const{actionInPayload:r}=e,{containerItemID:a,isModalAction:s}=r,o=s?Oo.MODAL:Oo.PRIMARY,i={target:Ar(o,a),containerItemID:a,context:a};return n.push(oc(Zi,i)),n})),De((()=>(1===n.length&&Vs(n[0].type)?$s.rejectActionByID(t):$s.resolveActionByID(t),Mc(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Ol("DELETE_DATA_OBJECT"),kl(100),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>(e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,a={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:s,reqType:o}=Dr("deleteDataObject",a);return Re(ud(s,{method:o},n)).pipe(De((t=>({response:t.data,actionInPayload:e}))),Fl("Error ocurred during ajax call at deleteDataObject Epic",n))})(e))),xe((async e=>{if(e&&e.type===sn){const{payload:r}=e,a=uo({...e,...r,actionMgrID:t});return n.push(a),n}return[]})),De((()=>(1===n.length&&Vs(n[0].type)?$s.rejectActionByID(t):$s.resolveActionByID(t),Mc(n),n=[],n))))}],Eh=Ih,{RESOURCE_TYPES:{CASE:Ah,DATA:_h}}=nt;let Sh=[];const $h={},Ch=[e=>e.pipe(Ol(an),fu(200),De((e=>e.payload)),xe((e=>{const t=Br.getPreviewMode()&&rd.addDebugHeaders({debugId:ot.generateUniqueID()});$h.dataContext=e.payload.dataViewName,$h.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:a}=e;let{routeEndpoint:s}=e;s=s&&s.indexOf("viewType={viewType}")>0?s.replace("{viewType}","page"):s&&s.indexOf('viewType=""')>0?s.replace('viewType=""','viewType="page"'):s;const o=Zn()+s,i=e.options.context;let c;const d={},l=e?.payload?.caseClassName;if(mr.isRemoteCase(l)){const{RemoteSystemID:e}=mr.getRemoteCase(l);d.RemoteSystemID=e}if("POST"===r){let i;switch(c=e.payload,s.indexOf("viewType=")<0&&(s=`${s}?viewType=page`),Ao(a)){case Ah:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case _h:i=$h;break;default:i=c}return Re(ud(o,{method:r,body:i,headers:{...d,...t}},n)).pipe(De((t=>({response:{...t.data},payload:e,headers:ao(t.headers)}))),Fl(": Error ocurred during ajax call at historyEpic : ",e))}return Re(ud(o,{method:"GET",headers:{...d,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(De((n=>({response:n.data,payload:e,headers:{...ao(n.headers),...t}}))))})),xe((async e=>{if(e&&e.type===sn)return uo(e);const{headers:t={},response:n,payload:r}=e,a=jd(n,{[nt.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),s=r.options.acName,o=Ko(s)&&Jo(s)?Fo(s):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:s,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[rt.COREHEADER_APP_DEBUG_ID]}},d=ot.getIn(a,rt.LOCALE_REFERENCES);await Kr.loadLocaleResources(d);const l=ot.getIn(a,rt.COMPONENTS);l&&await _s(l),Is(a,r.options.actionConfig,!0);let u="";const p=r?.payload?.page;let h=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(u=Nr(On,{caseName:e.payload.payload.caseName}),u=u&&u.replace("{workID}",e.payload.payload.workID)||"",h=r?.payload?.caseClassName),ws.publish(nt.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:s,pageName:p,pageClass:h});let f=oo(a,c);return f=((e,t,n)=>{if(e===to.CASE){if(t?.caseInfo?.assignments){const{key:e,flowName:r}=lo(t.caseInfo.assignments[0].ID);n.key=e,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=rt.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(Ao(e.payload.routeKey),{...n.data,semanticURL:u,caseViewMode:rt.REVIEW_MODE},f),Sh.push(po(s,f)),Eo(Sh),Sh})),De((()=>(Mc(Sh),Sh=[],Sh))),Fl("Error occured"))],bh=[e=>{let t=0,n=[];return e.pipe(Ol(Wt),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let a="";n||(a=Nr(Pn,{insightID:"{insightID}"}),a=a.replace("{insightID}",r));const{restApi:s,reqType:o}=Dr(Pn,{insightID:r});return Re(ud(s,{method:o},t)).pipe(De((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Fl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),xe((async e=>{if(e&&e.type===sn)return n.push(uo(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=bs.getTargetViewContainerName(Bt),s=Ar(a,t.context),o=ho(s,a,t.context),{response:i}=e,c=jd(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await io(c,t,d,l,u);const p=oo(c,{target:s,context:o,containerItemID:o});p.resourceType=nt.PAGE;const h=po(s,p);return n.push(h),Eo(n),n})),De((()=>{$s.resolveActionByID(t),Mc(n),n=[]})),hh())}],Ph=[e=>{let t=0,n=[];return e.pipe(Ol(qt),De((e=>(({actionMgrID:t}=e.payload),e.payload))),xe((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let a="";n||(a=Nr(vn,{dashboardID:r}),a=a.replace("{dashboardID}",r));const{restApi:s,reqType:o}=Dr(vn,{dashboardID:r});return Re(ud(s,{method:o},t)).pipe(De((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Fl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),xe((async e=>{if(e&&e.type===sn)return n.push(uo(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,a=bs.getTargetViewContainerName(Bt),s=Ar(a,t.context),o=ho(s,a,t.context),{response:i}=e,c=jd(i);c.directUrlUpdation=!r;const d={acName:s,context:o},l=!r,u=r;await io(c,t,d,l,u);const p=oo(c,{target:s,context:o,containerItemID:o});p.resourceType=nt.PAGE;const h=po(s,p);return n.push(h)})),De((()=>{$s.resolveActionByID(t),Mc(n),n=[]})),hh())}],vh=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pp.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...Tp,...ph,...yh,...Ch,...Eh,...Rp,(e=>{let t=0;return e.pipe(Ol(Un),De((e=>(({actionMgrID:t}=e.payload),e.payload))),De((e=>{const n=wc().getState(),r=bp();return Ul()(n,r)&&t>0?$s.resolveActionByID(t,{}):$s.rejectActionByID(t),[]})),hh())}),...bh,...Ph),Oh=e=>e.type||(e.messages&&e.messages[0].type)===nt.MESSAGES.MESSAGES_TYPE_ERROR,Th=e=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:a,property:s,pageReference:o,context:i,referenceList:c}=r;"HTTP"!==a&&n===Ln&&Oh(r)?((e,t,n)=>{if(Ha[e]){const r=Ya(Ka(t,n)),a=Ja(e,Ha[e].fieldOrder[r],r);a&&(a.isError=!0)}})(i,s,o):"HTTP"!==a&&n===jn&&Oh(r)&&void 0!==s?Xa(i,s,o):"HTTP"!==a&&-1!==[dn,In,ln,An].indexOf(n)?za(i):n===Gn&&Xa(i,s,c),e(t)},Nh={},Rh=e=>{const t=ot.getIn(Nh,[rt.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),a=ot.getIn(Nh,[r,t],[]),s=a&&a.length>0&&a.indexOf(e);if(s>-1&&a.splice(s,1),!a||a&&0===a.length){ot.deleteIn(Nh,[r,t]);const e=ot.getIn(Nh,[r]);e&&0===Object.keys(e).length&&ot.deleteIn(Nh,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),ot.deleteIn(Nh,[rt.CONTEXT,e]);const r=ot.getIn(Nh,[rt.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&ot.deleteIn(Nh,[rt.CONTEXT]),n.length>0&&Mc(dc({dataPagesToBeRemoved:n}))},Dh=(e={},t)=>{Object.keys(e).forEach((n=>{const r=ot.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=ot.getIn(Nh,[rt.CONTEXT,n]);if(ot.getIn(Nh,[e])){const r=ot.getIn(Nh,[e,t],[]);ot.setIn(Nh,[e,t],[...new Set([...r,n])])}else ot.setIn(Nh,[e,t],[n]);r?ot.setIn(Nh,[rt.CONTEXT,n],[...new Set([...r,t])]):ot.setIn(Nh,[rt.CONTEXT,n],[t])})(n,e,t)}))}))},xh=e=>e=>t=>{const{payload:{data:n={},context:r,childContainersContexts:a=[]}={},type:s}=t;if(a&&a.length>0&&(s===An||s===ln)&&a.forEach((e=>{Rh(e)})),s===dn||s===nn||s===kn){const e=s===kn?n:n.shared;Dh(e,r)}else s===In||s===An?(Rh(r),Dh(n.shared,r)):s===ln&&Rh(r);e(t)},wh=class{static cleanCaches(e){Nc.purgeCascadeFields(e),Oc.removeContext(e),hl.clearContextedCache(e),ws.cleanContextSubscribers(e),za(e),dl.clearContext(e),du.deRegisterForRefresh(e)}},Mh=e=>t=>n=>{const{type:r,payload:{target:a,containerItemID:s,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:d}={}}={}}=n,{PUB_SUB_EVENTS:l}=nt;if(r===ln){const{resourceType:t,key:n,context:r}=ot.getIn(e.getState(),["containers",a,"items",s])||{},o={resourceType:t,key:n,context:r,containerItemID:s};ws.publish(l.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),a===`${nt.APP.APP}/${rt.PRIMARY}`&&d===rt.CONTAINER_TYPE.MULTIPLE&&ws.publish(l.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===An||r===ln)&&i.forEach((e=>{wh.cleanCaches(e)})),r!==An&&r!==ln||wh.cleanCaches(o),t(n)},Lh=e=>e=>t=>{const{payload:{context:n}={},type:r}=t;!n||r!==dn&&r!==In&&r!==An&&r!==ln||(Da(n),Na(n)),e(t)},jh=function(e){void 0===e&&(e={});var t,n=new(0,q.constructor)(q.schedulerActionCtor),r=new ue,a=function(a){t=a;var s=new ue,o=new ue,i=s.asObservable().pipe(Oe(n)),c=new Me(o.pipe(Oe(n)),t.getState());return r.pipe(De((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),xe((function(e){return Re(e).pipe(Te(n),Oe(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),s.next(n),r}}};return a.run=function(e){r.next(e)},a}(),Uh=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||S;if(null!==wc())mu.resetStore();else{const n=_((e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[rt.CONTEXT_DATA]||e[rt.CONTEXT_DATA];Cp={data:{[rt.APP.APP]:{...t,[rt.CONTEXT_DATA]:r}},containers:{}}})(e),function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:E.INIT}))throw new Error(y(12));if(void 0===n(void 0,{type:E.PROBE_UNKNOWN_ACTION()}))throw new Error(y(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var r=!1,a={},i=0;i<o.length;i++){var c=o[i],d=n[c],l=e[c],u=d(l,t);if(void 0===u)throw t&&t.type,new Error(y(14));a[c]=u,r=r||u!==l}return(r=r||o.length!==Object.keys(e).length)?a:e}}({data:Ap,containers:$p})))(e),t(Le.reduxBatch,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(y(15))},a={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(a)}));return r=S.apply(void 0,s)(n.dispatch),g(g({},n),{},{dispatch:r})}}}(gs,Th,xh,Lh,jh,Mh),Le.reduxBatch));jh.run(vh),xc(n)}};ka.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,a=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${a}(\\x2e${a})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t=Kr.getLocaleValue("Invalid Email","Messages")),t})),ka.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=Kr.getLocaleValue("Invalid number","Messages")),t})),ka.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?Kr.getLocaleValue("Cannot be blank","Messages"):null)),ka.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t=Kr.getLocaleValue("Invalid URL","Messages")),t}));const Fh={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|[46])\\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(?: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,[["(?:(?: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]))\\d{3}|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]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[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}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-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(?:28|4[14]|5)|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]|22"],"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","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-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[047]"]]]],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","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-2])\\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-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\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-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\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","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],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-79]"]],["(\\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-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|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|73)|90[25])[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(?:00|2[125-9]|33|44|66|77|88)|622)[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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-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]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\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{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],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],[["(\\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{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[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[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[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"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])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0(4(?:[14]4|56)|[579])?"],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","[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",[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",["5"],"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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-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],[["(\\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{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"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",["[189]"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"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)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"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{6})","$1",["[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,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-579])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\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-2]))|(?: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","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|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","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{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"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","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1289]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-2])\\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","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([3-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","9008\\d{3}|(?:[2-467]\\d\\d|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-46-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","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,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",["[67]"],"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-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[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]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\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","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]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[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(?:(?:2[14]|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|4[47])|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(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|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]|28|3[129]|4[1-35689]|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[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|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|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|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",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[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,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\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]"]],["(\\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",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|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[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[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]],0,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","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\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|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",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-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|63)|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]|636)|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]|636[457-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",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"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[045]|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[27-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])|5(?:2|3[045]|4[0-369]|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])|49|51|6(?:[0-24]|36|5[0-3589]|72|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]))|(?:49|55|83)[29]|(?: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]|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]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|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]","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]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|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(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|829(?:2|66)|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",["[257-9]"],"0$1"]],"0"],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-8]\\d|99)\\d{7}",[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",["60|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","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|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",["30[013-9]"],"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-7]|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","(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"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]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",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",["2(?:[0367]|4[3-8])"]],["(\\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",["2(?:[0367]|4[3-8])"]],["(\\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]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|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{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29[1289]|389)","529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\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",["6"],"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","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-2])\\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",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"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",["[12]1"],"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","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"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{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:[27]2|44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",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-79]"]],["(\\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[04]"]]]],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","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"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","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[29]\\d{7,9}|50\\d{5}(?:\\d{2,3})?|6[0-35-9]\\d{6}|7\\d{7,8}|8\\d{4,9}|(?:11\\d|[34])\\d{7}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-579]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|[89]0","50(?:[0367]|88)|[89]0"],"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)|[59]|80"],"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|86"],"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",["(?: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","(?: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","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"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","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,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",["[26]1|3[289]|4[1246-8]|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-6])"],"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[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-3]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:0[0-46]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|6[0-6]|7[0-27]|8[0-8]|9[0-479]))|9(?:399[0-3]|479[0-2]|76(?:2[27]|3[0-37]|9\\d)))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,0,["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[2378]\\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",["[237-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,"3[04-689]|[489]",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",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[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{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\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],[["(\\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-6]|[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[0139]|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|[57]9)\\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)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6(?:0[5-7]|[1-35-9])|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\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-8]"]]]],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","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\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-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"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|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],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{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],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-6]\\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",["6"],"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-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"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{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?: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,[["5056(?:[0-35-9]\\d|4[46])\\d{4}|(?:4722|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|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-47-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]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|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-389]|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]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","(?:0004|4)\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10,13],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"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{4})","$1 $2 $3",["4"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[35-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],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],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{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"],"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)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\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","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\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",["[23]"],"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","(?:(?:(?:26|63)9|80\\d)\\d|9398)\\d{5}",[9],0,"0",0,0,0,0,"269|63|9398"],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|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"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}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],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,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[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|51"]],["(\\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})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,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[013-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 kh(e){return kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kh(e)}function Vh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hh(e){var t,n,r,a=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,s=[],o=!0,i=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(s.push(r.value),4!==s.length);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(i)throw a}}return s}}(e)||function(e,t){if(e){if("string"==typeof e)return Bh(e,4);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bh(e,4):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e)),s=a[0],o=a[1],i=a[2],c=a[3];if("string"!=typeof s)throw new TypeError("A text for parsing must be a string.");if(t=s,o&&"string"!=typeof o){if(!Wh(o))throw new Error("Invalid second argument: ".concat(o));i?(n=o,r=i):r=o}else c?(n=i,r=c):(n=void 0,r=i),o&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vh(Object(n),!0).forEach((function(t){Gh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:o},n));return{text:t,options:n,metadata:r}}var Wh=function(e){return"object"===kh(e)},qh="0-90-9٠-٩۰-۹",Yh="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function Kh(e){return Kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kh(e)}function zh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jh(e){var t="function"==typeof Map?new Map:void 0;return Jh=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Xh(e,arguments,ef(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Zh(n,e)},Jh(e)}function Xh(e,t,n){return Xh=Qh()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&Zh(a,n.prototype),a},Xh.apply(null,arguments)}function Qh(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Zh(e,t){return Zh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zh(e,t)}function ef(e){return ef=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ef(e)}var tf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zh(e,t)}(r,e);var t,n=function(e){var t=Qh();return function(){var n,r=ef(e);if(t){var a=ef(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zh(e)}(this,n)}}(r);function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),t=n.call(this,e),Object.setPrototypeOf(zh(t),r.prototype),t.name=t.constructor.name,t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(Jh(Error));function nf(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var s=Number(n[a]),o=Number(r[a]);if(s>o)return 1;if(o>s)return-1;if(!isNaN(s)&&isNaN(o))return 1;if(isNaN(s)&&!isNaN(o))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function rf(e){return rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rf(e)}function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function of(e,t,n){return t&&sf(e.prototype,t),n&&sf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var cf=" ext. ",df=/^\d+$/,lf=function(){function e(t){af(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!yf(e)||!yf(e.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 ".concat(yf(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+mf(e)+": "+e,"."))}(t),this.metadata=t,Ef.call(this,t)}return of(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&df.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new uf(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new uf(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),uf=function(){function e(t,n){af(this,e),this.globalMetadataObject=n,this.metadata=t,Ef.call(this,n.metadata)}return of(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map((function(t){return new pf(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&gf(this.types(),e))return new ff(gf(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?cf:this.metadata[13]||cf}}]),e}(),pf=function(){function e(t,n){af(this,e),this._format=t,this.metadata=n}return of(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||hf.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),hf=/^\(?\$1\)?$/,ff=function(){function e(t,n){af(this,e),this.type=t,this.metadata=n}return of(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function gf(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var yf=function(e){return"object"===rf(e)},mf=function(e){return rf(e)};function If(e,t){if((t=new lf(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Ef(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===nf(t,"1.2.0")?this.v2=!0:-1===nf(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var Af=function(e){return"([".concat(qh,"]{1,").concat(e,"})")};function _f(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="[  \\t]*";return";ext="+Af("20")+"|"+t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+Af("20")+"#?|"+t+"(?:[xx##~~]|int|int)"+n+Af("9")+"#?|[- ]+"+Af("6")+"#|"+r+"(?:,{2}|;)"+n+Af("15")+"#?|"+r+"(?:,)+"+n+Af("9")+"#?"}var Sf="[++]{0,1}(?:["+Yh+"]*["+qh+"]){3,}["+Yh+qh+"]*",$f=new RegExp("^[++]{0,1}(?:["+Yh+"]*["+qh+"]){1,2}$","i"),Cf=Sf+"(?:"+_f()+")?",bf=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+Cf+"$","i"),Pf=new RegExp("(?:"+_f()+")$","i"),vf={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 Of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tf(e){for(var t,n="",r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Of(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Of(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=r()).done;)n+=Nf(t.value,n)||"";return n}function Nf(e,t){if("+"===e){if(t)return;return"+"}return function(e){return vf[e]}(e)}function Rf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Df(e,t){return xf(e,void 0,t)}function xf(e,t,n){var r=n.type(t),a=r&&r.possibleLengths()||n.possibleLengths();if(!a)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!n.type("FIXED_LINE"))return xf(e,"MOBILE",n);var s=n.type("MOBILE");s&&(a=function(e,t){for(var n,r=e.slice(),a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Rf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rf(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=a()).done;){var s=n.value;e.indexOf(s)<0&&r.push(s)}return r.sort((function(e,t){return e-t}))}(a,s.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var o=e.length,i=a[0];return i===o?"IS_POSSIBLE":i>o?"TOO_SHORT":a[a.length-1]<o?"TOO_LONG":a.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function wf(e,t){return"IS_POSSIBLE"===Df(e,t)}function Mf(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Lf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jf=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Uf(e,t,n){if(t=t||{},e.country){(n=new lf(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Mf(r,n.nationalNumberPattern())){if(Ff(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Ff(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Lf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lf(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(jf);!(a=s()).done;){var o=a.value;if(Ff(r,o,n))return o}}}}function Ff(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Mf(e,t.pattern())}var kf=/(\$\d)/,Vf=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bf(Object(n),!0).forEach((function(t){Wf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qf={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Yf(e,t,n,r,a){var s=function(e,t){for(var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gf(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(n=r()).done;){var a=n.value;if(a.leadingDigitsPatterns().length>0){var s=a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length-1];if(0!==t.search(s))continue}if(Mf(t,a.pattern()))return a}}(r.formats(),e);return s?function(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,s=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(kf,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Yh,"]+"),"g")," ").trim()}(s):s}(e,s,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix,carrierCode:t,metadata:r}):e}function Kf(e,t,n,r){return t?r(e,t,n):e}function zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zf(Object(n),!0).forEach((function(t){Xf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qf=function(){function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var a=function(e,t){var n,r,a=new lf(t);return Zf(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e,{country:n,countryCallingCode:r}}(t,r),s=a.country,o=a.countryCallingCode;this.country=s,this.countryCallingCode=o,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n;return t=e,(n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,n){var r=new lf(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new lf(n);return r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,n)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new lf(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return wf(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return e=this,t={v2:!0},n=this.getMetadata(),t=t||{},(n=new lf(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==Uf(e,t,n.metadata):Mf(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new lf(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Uf(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,n,r){if(n=n?Hf(Hf({},qf),n):qf,r=new lf(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,s=r.countryCallingCode(),o=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return o?Kf(a=Yf(o,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return o?(a=Yf(o,null,"INTERNATIONAL",r,n),Kf(a="+".concat(s," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(s);case"E.164":return"+".concat(s).concat(o);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(s).concat(o),ext:e.ext});case"IDD":if(!n.fromCountry)return;var i=function(e,t,n,r,a){if(If(r,a.metadata)===n){var s=Yf(e,t,"NATIONAL",a);return"1"===n?n+" "+s:s}var o=function(e,t,n){var r=new lf(n);return r.selectNumberingPlan(e,void 0),r.defaultIDDPrefix()?r.defaultIDDPrefix():Vf.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,0,a.metadata);if(o)return"".concat(o," ").concat(n," ").concat(Yf(e,null,"INTERNATIONAL",a))}(o,e.carrierCode,s,n.fromCountry,r);return Kf(i,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}(this,e,t?Jf(Jf({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Zf=function(e){return/^[A-Z]{2}$/.test(e)},eg=new RegExp("(["+qh+"])");function tg(e,t){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,s,o,i=r.length-1,c=i>0&&r[i];if(t.nationalPrefixTransformRule()&&c)a=e.replace(n,t.nationalPrefixTransformRule()),i>1&&(s=r[1]);else{var d=r[0];a=e.slice(d.length),c&&(s=r[1])}if(c){var l=e.indexOf(r[1]);e.slice(0,l)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=r[0];return{nationalNumber:a,nationalPrefix:o,carrierCode:s}}}return{nationalNumber:e}}(e,t),r=n.carrierCode,a=n.nationalNumber;if(a!==e){if(!function(e,t,n){return!(Mf(e,n.nationalNumberPattern())&&!Mf(t,n.nationalNumberPattern()))}(e,a,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch(Df(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(a,t))return{nationalNumber:e}}return{nationalNumber:a,carrierCode:r}}function ng(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rg="(["+qh+"]|[\\-\\.\\(\\)]?)",ag=new RegExp("^\\+"+rg+"*["+qh+"]"+rg+"*$","g"),sg=new RegExp("^(["+qh+"]+((\\-)*["+qh+"])*\\.)*[a-zA-Z]+((\\-)*["+qh+"])*\\.?$","g"),og="tel:",ig=";phone-context=",cg=new RegExp("[++"+qh+"]"),dg=new RegExp("[^"+qh+"#]+$");function lg(e,t,n){if(t=t||{},n=new lf(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new tf("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=function(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(ig);if(t<0)return null;var n=t+ig.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(ag.test(e)||sg.test(e))}(a))throw new tf("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="","+"===a.charAt(0)&&(n+=a);var s,o=e.indexOf(og);s=o>=0?o+og.length:0;var i=e.indexOf(ig);n+=e.substring(s,i)}var c=n.indexOf(";isub=");if(c>0&&(n=n.substring(0,c)),""!==n)return n}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(e)if(e.length>250){if(n)throw new tf("TOO_LONG")}else{if(!1===t)return e;var r=e.search(cg);if(!(r<0))return e.slice(r).replace(dg,"")}}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&bf.test(e)}(r))return function(e){return $f.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(Pf);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(Pf),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);return a.ext?a:{number:r}}(e,t.v2,t.extract),a=r.number,s=r.ext,o=r.error;if(!a){if(t.v2){if("TOO_SHORT"===o)throw new tf("TOO_SHORT");throw new tf("NOT_A_NUMBER")}return{}}var i=function(e,t,n,r){var a,s=function(e,t,n,r){if(!e)return{};var a;if("+"!==e[0]){var s=function(e,t,n,r){if(t){var a=new lf(r);a.selectNumberingPlan(t,n);var s=new RegExp(a.IDDPrefix());if(0===e.search(s)){var o=(e=e.slice(e.match(s)[0].length)).match(eg);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,t,n,r);if(!s||s===e){if(t||n){var o=function(e,t,n,r){var a=t?If(t,r):n;if(0===e.indexOf(a)){(r=new lf(r)).selectNumberingPlan(t,n);var s=e.slice(a.length),o=tg(s,r).nationalNumber,i=tg(e,r).nationalNumber;if(!Mf(i,r.nationalNumberPattern())&&Mf(o,r.nationalNumberPattern())||"TOO_LONG"===Df(i,r))return{countryCallingCode:a,number:s}}return{number:e}}(e,t,n,r),i=o.countryCallingCode,c=o.number;if(i)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:i,number:c}}return{number:e}}a=!0,e="+"+s}if("0"===e[1])return{};r=new lf(r);for(var d=2;d-1<=3&&d<=e.length;){var l=e.slice(1,d);if(r.hasCallingCode(l))return r.selectNumberingPlan(l),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:l,number:e.slice(d)};d++}return{}}(Tf(e),t,n,r.metadata),o=s.countryCallingCodeSource,i=s.countryCallingCode,c=s.number;if(i)r.selectNumberingPlan(i);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),!!t&&(a=t),i=n||If(t,r.metadata)}if(!c)return{countryCallingCodeSource:o,countryCallingCode:i};var d=tg(Tf(c),r),l=d.nationalNumber,u=d.carrierCode,p=function(e,t){var n=t.nationalNumber,r=t.defaultCountry,a=t.metadata,s=a.getCountryCodesForCallingCode(e);return s?1===s.length?s[0]:function(e,t){var n=t.countries,r=t.defaultCountry,a=t.metadata;a=new lf(a);for(var s,o=[],i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ng(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ng(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(s=i()).done;){var c=s.value;if(a.country(c),a.leadingDigits()){if(e&&0===e.search(a.leadingDigits()))return c}else if(Uf({phone:e,country:c},void 0,a.metadata)){if(!r)return c;if(c===r)return c;o.push(c)}}if(o.length>0)return o[0]}(n,{countries:s,defaultCountry:r,metadata:a.metadata}):void 0}(i,{nationalNumber:l,defaultCountry:t,metadata:r});return p&&(a=p,"001"===p||r.country(a)),{country:a,countryCallingCode:i,countryCallingCodeSource:o,nationalNumber:l,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),c=i.country,d=i.nationalNumber,l=i.countryCallingCode,u=i.countryCallingCodeSource,p=i.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new tf("INVALID_COUNTRY");return{}}if(!d||d.length<2){if(t.v2)throw new tf("TOO_SHORT");return{}}if(d.length>17){if(t.v2)throw new tf("TOO_LONG");return{}}if(t.v2){var h=new Qf(l,d,n.metadata);return c&&(h.country=c),p&&(h.carrierCode=p),s&&(h.ext=s),h.__countryCallingCodeSource=u,h}var f=!!(t.extended?n.hasSelectedNumberingPlan():c)&&Mf(d,n.nationalNumberPattern());return t.extended?{country:c,countryCallingCode:l,carrierCode:p,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!wf(d,n)),phone:d,ext:s}:f?function(e,t,n){var r={country:e,phone:t};return n&&(r.ext=n),r}(c,d,s):{}}function ug(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ug(Object(n),!0).forEach((function(t){hg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ug(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fg(Object(n),!0).forEach((function(t){yg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mg(e,t,n){t&&t.defaultCountry&&!function(e,t){return void 0!==t.countries[e]}(t.defaultCountry,n)&&(t=gg(gg({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return lg(e,pg(pg({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof tf))throw e}}function Ig(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ig(Object(n),!0).forEach((function(t){Ag(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ig(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ag(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _g(){var e=Hh(arguments),t=e.text,n=e.options,r=e.metadata,a=mg(t,n=Eg(Eg({},n),{},{extract:!1}),r);return a&&a.isPossible()||!1}ka.register("phone",(e=>{let t=null;e&&!/^\+?\d+$/.test(e)&&(t=Kr.getLocaleValue("Invalid Phone","Messages"));const n=/^\+/.test(e);return e&&n&&(function(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(Fh),e.apply(this,n)}(_g,arguments)}(e)||(t=Kr.getLocaleValue("Invalid Phone","Messages"))),t}));const Sg=(e,t)=>{switch(t){case"invalid":return Kr.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return Kr.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};ka.register("datetime",(e=>Sg("DateTime",e))),ka.register("date",(e=>Sg("Date",e))),ka.register("time",(e=>Sg("Time",e))),Mt.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),Mt.registerHandler("@P",((e,t)=>t.getValue(e))),Mt.registerHandler("@E",((e,t)=>{try{const n=ha(e),r=fa(n);return ga(r,t)}catch(e){}return!0})),Mt.registerHandler("@W",((e,t)=>{const n=t.getContextDataValue(`.${rt.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===n||"true"===n})),Mt.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let a="",s="";const o=t.getPageReference();if(e.startsWith(".")){a=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),s=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),a=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===rt.READONLY,d=n?.datasource?.name||"",l=t.getComponentConfig();if(l&&l.deferDatasource)return l.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:l.datasourceMetadata}),i!==rt.DATA_PAGE?n?.datasource?.records:null;if(i!==rt.DATA_PAGE)return n?.datasource?.records;const u=Lt.getPropertyName(n?.datasource?.propertyForDisplayText),p=Lt.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],f=t.getContextName(),g=[];if(h.forEach((e=>{if(Lt.isProperty(e?.value)){let t=Fc(`.${ot.getFullPropertyReference([s,Lt.getPropertyName(e.value)])}`,o,f);g.push(ot.getFullPropertyReference([o,s,Lt.getPropertyName(e?.value)])),null!=t&&""!==t||(t=rt.NULL_STRING),r.push(t)}else r.push(e?.value||rt.NULL_STRING)})),f){const e=Sa.getContextObjectByName(f)||{};g.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,a])]}else e[t]=[a]})),Sa.addContextName(f,e)}const y=function(e,t,n,r){let a="",s=n;if(t.join(rt.HASH_DELIMITER)&&(a=ot.getHashedString(t.join(rt.HASH_DELIMITER)),s=n+rt.UNDERSCORE_STRING+a),r){const e=jc(),t=e?e[n]?.[s]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=e.getDataObject()[n][s];return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,d,c);return y.map((e=>({key:e[p]||e[`.${p}`],value:e[u]||e[`.${u}`]})))})),Mt.registerHandler("@ROUTING_INFO",((e,t)=>_r(t.getContainerName(),t.getContextName()))),Mt.registerHandler("@ENV",((e,t)=>{switch(e){case rt.ENV_INFO_KEYS.APPLICATION_NAME:return Hr.getApplicationName();case rt.ENV_INFO_KEYS.ACCESS_GROUP:return Hr.getAccessGroup();case rt.ENV_INFO_KEYS.USER_NAME:return Hr.getOperatorName();case rt.ENV_INFO_KEYS.USER_ID:return Hr.getOperatorIdentifier();case rt.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(Hr.getApplicationLabel());case rt.ENV_INFO_KEYS.USER_IMAGE:return Hr.getOperatorImageInsKey();case rt.ENV_INFO_KEYS.LOCALE:return Hr.getUseLocale();case rt.ENV_INFO_KEYS.TIMEZONE:return Hr.getTimeZone();case rt.ENV_INFO_KEYS.WORK_GROUP:return Hr.getOperatorWorkGroup();default:return e}})),Mt.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),a=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(a){const{fields:e,copyAll:t}=r[a],s=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=Lt.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const a=Lt.getPropertyName(e[t]);r[t]=n[a]})),s.push(r)})),s}return[]})),Mt.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let a="";const s=e.split(".").filter((e=>!!e));if(s.length>1&&(s.pop(),a=`.${s.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:s,value:o}=n;r.name=s,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${a}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),Mt.registerHandler("@USER",((e,t)=>{const n=t.getValue(e),r=t.getReferencedUser(n);return{userId:n,userName:r?r.UserName:null}})),Mt.registerHandler("@ACTIVE_CASES",((e,t)=>Bl.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Mt.registerHandler("@LR",(e=>e)),Mt.registerHandler("@CASE",((e,t)=>e===rt.ID?t.getCaseInfo().getKey():e)),Mt.registerHandler("@SHARED",(e=>ql.getSharedState(e)));const $g=new DOMParser;let Cg;const bg=e=>{if(e){let t=$g.parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id");if(t=t.replace(/[^a-zA-Z.]+/g,""),t){const e=Cg.getValue(t);return Cg.registerAdditionalProps({[t]:`@P ${t}`}),e}}};Mt.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?((e,t)=>((e,t)=>{Cg=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,bg);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t))(n,t):null})),Mt.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),a=e.substring(e.indexOf("[")+1,e.indexOf("]")),{useCustomContext:s}=t;let o;return ot.isEmpty(s)?o=t.getValue(`.${n}`):(o=s,o=ot.getIn(o,n)),o&&r.length>0?(a&&(o=o.filter((e=>ya(a,e)))),o.map((e=>ot.getIn(e,r)))):null})),Mt.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),Mt.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const Pg=e=>tu(e),vg=()=>t,Og=()=>a,Tg=()=>wt,Ng=()=>d,Rg=()=>c,Dg=()=>o,xg=()=>Di,wg=()=>Ri,Mg=async(e,t,n)=>{const r=jd(e),{data:a,uiResources:s={}}=e,o=ot.getIn(s,rt.CONTEXT_DATA);await io(r,{},{},!1,!0);const i={...a,[rt.CONTEXT_DATA]:o},{root:c}=s;mu.getContainerUtils().addRootContainerItem(c,t,i,n)},Lg=(e,t,n)=>{ud(e,{method:"GET"},rt.APP.ROOT).then((async e=>{const{data:r,status:a}=e;200===a&&Mg(r,t,n)}))},jg=async(e,t,n)=>_s(n).then((()=>{const n=Pg({meta:e,isRoot:!0});wc()||Uh({}),ws.publish(nt.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})})),Ug=(e,t,n)=>{qr.initServer(e,t,n)},Fg=async(e,t,n=[])=>{Xn();const r=jd(e),a=ot.getIn(r,rt.VIEWS),s=ot.getIn(r,rt.NAVIGATIONS),o=ot.getIn(r,rt.COMPONENTS)||[];o.push(...n);const i=ot.getIn(r,rt.STATIC_SERVER_URL),c=ot.getIn(r,rt.APPLICATION_DATA);a&&Et(a),s&&At(s),(e=>{e&&(vr=e.pyLabel)})(c),i&&qr.initServer(i),await _s(o,i).then((()=>((e,t)=>{const n={context:rt.APP.APP},r={...ot.getIn(e,rt.ROOT),options:n};Uh(e),Is(e,n,!0);const a=Pg({meta:r,isRoot:!0});ws.publish(nt.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:a,domContainerID:t})})(r,t)))},kg=(e,t,n)=>{Vr(e),bs.buildActionTargetMap(t),Xn(n)},Vg=(e,t)=>{Vr(e,!0),Xn(t)},Gg=e=>{qr.setAppAlias(e)},Bg=e=>{const{restApi:t}=Rr("home",{portalName:e});return Zn()+t},Hg=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(kr()&&!t){const t=gr(),r=Er.processUrl(t,!0),a=Er._getMatchedRouteInRoutingTable(r),s=Er.getRoutingInfo(),o=Er.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=s.routes[a].payload;c=c.replace("{workID}",i),n=Er.getRestEndPoint("loadView",{caseID:c,viewID:e})}else n=Er.getRestEndPoint("showView",{page:e,pageClass:t})}catch(e){}return n})(e,t);return Zn()+n},Wg=async(e,t,n=[],r,a,s)=>{const{config:{name:o}={}}=t;wc()||Uh({}),s&&(mu.getContainerUtils().removeContainer(`${rt.APP.ROOT}/${o}`),mu.getContainerUtils().getContainerAPI().deleteContainerItem(`${rt.APP.ROOT}/${o}`)),mu.getContainerUtils().getContainerAPI().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&mu.resetStore(),Mc(Li({data:{},context:rt.APP.ROOT}));const i=Pg({meta:t,options:{context:rt.APP.ROOT,pageReference:"",target:`${rt.APP.ROOT}/${o}`}}),c=i.getPConnect(),d=c.getContextName(),l=c.getContainerName(),u=c.getContainerManager(),p=`${d}/${l}`;mu.getContainerUtils().getActiveContainerItemName(p)||"noPortal"===t.config.renderingMode||u.initializeContainers({type:"single"});const h=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return _s(h).then((()=>{ws.publish(nt.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:a})}))},qg=(e,t,n,r)=>{let a=Hg(e,n);a===Zn()&&(a=Bg(t)),Lg(a,r)},Yg=(e,t)=>{const n=Bg(e);Lg(n,t,!0)},Kg=e=>{(e=>{const{acName:t,context:n,defaultViewLabel:r}=e,a=(e=>{const t=Er.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase();return t.routes[n]?n:t.routes[r]?r:e})(r);(e=>{Pr=e})(a),Er.setDefaultRoute(a);const s=rr(t,n),o=Ar(t,n),i={historyAction:$r,pxURLPath:""};let d;const l={acName:o,context:s,actionConfig:{context:s}};if(kr()){const e=(e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),a=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&a.set(e,t);const s=new URLSearchParams(a).toString();return s?`${t}?${s}`:t}return e})(hr(window.location.pathname+window.location.search));d=Er.getEndPointInfo(e),i.pxURLPath=d.urlPath,void 0!==d.payload?.pageClass&&(d.payload.pageClass=wc()?.getState()?.data?.app?.pyPortal?.classID);const t={},n="showHistory";t.routeEndpoint=d.routeEndpoint,t.requestType=d.requestType,t.payload=d.payload,t.options=l,t.routeKey=d.routeKey,Mc(c[n](Ur(t)))}else d=Er.getEndPointInfo(Pr),i.pxURLPath="";Mr(null,!0,{urlPathObjParam:i,infoParam:d,optionsParam:l})})(e)},zg=()=>kr(),Jg=e=>{ws.subscribe(nt.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")},Xg=e=>{Ua.updateFieldDefaults(e)},Qg=e=>{(e=>{zn=e})(e)},Zg=e=>{yd(e)},ey=e=>{md(e)},ty=()=>Bl,ny=()=>su,ry=e=>{Or=e},ay=()=>Uh({})})();var a=r.v9,s=r.DP,o=r.RE,i=r.WM,c=r.gm,d=r.Yw,l=r.e6,u=r.sd,p=r.No,h=r.DF,f=r.FC,g=r.kU,y=r.gu,m=r.LF,I=r.vg,E=r.jK,A=r.Dw,_=r.x0,S=r.HW,$=r.N2,C=r.yC,P=r.gn,b=r.JP,v=r.fV,O=r.Hk,T=r.K5,R=r.P6,N=r.r_,D=r.r7,x=r.gA,w=r.V5,M=r.d0,L=r.JR;export{a as PCoreInstance,s as checkIfSemanticURL,o as configureForBrowserBookmark,i as createC11nEnv,c as enableAppRouting,d as getActionCreators,l as getActionHandler,u as getActionProcessor,p as getCaseApi,h as getComponentsRegistry,f as getContextUtils,g as getHomeRestApi,y as getMashupApi,m as getRoutingManager,I as getStateManager,E as getStreamObservable,A as getViewRestApi,_ as initAppShell,S as initRoutingTable,$ as initStore,C as loadComponent,P as loadPortalView,b as loadRootComponent,v as loadView,O as loadViewByName,T as onPCoreReady,R as setAppAlias,N as setFetchAuthInfo,D as setFetchDefaultHeaders,x as setFieldsDefaultConfigs,w as setGoogleMapsAPIKey,M as setStaticServerUrl,L as updateStoreWithUiRoot};