/home/ivoiecob/email.hirewise-va.com/static/js/1988.app.b5a0f3cc6ab4f5feef8d.min.js
/*! For license information please see 1988.app.b5a0f3cc6ab4f5feef8d.min.js.LICENSE.txt */
"use strict";(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[1988],{"6A93":(t,n,r)=>{function e(){var t,n,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function c(r,e,i,a){var c=e&&e.prototype instanceof u?e:u,p=Object.create(c.prototype);return o(p,"_invoke",function(r,e,o){var i,a,c,u=0,p=o||[],y=!1,h={p:0,n:0,v:t,a:E,f:E.bind(t,4),d:function(n,r){return i=n,a=0,c=t,h.n=r,s}};function E(r,e){for(a=r,c=e,n=0;!y&&u&&!o&&n<p.length;n++){var o,i=p[n],E=h.p,l=i[2];r>3?(o=l===e)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=E&&((o=r<2&&E<i[1])?(a=0,h.v=e,h.n=i[1]):E<l&&(o=r<3||i[0]>e||e>l)&&(i[4]=r,i[5]=e,h.n=l,a=0))}if(o||r>1)return s;throw y=!0,e}return function(o,p,l){if(u>1)throw TypeError("Generator is already running");for(y&&1===p&&E(p,l),a=p,c=l;(n=a<2?t:c)||!y;){i||(a?a<3?(a>1&&(h.n=-1),E(a,c)):h.n=c:h.v=c);try{if(u=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(y=h.n<0)?c:r.call(e,h))!==s)break}catch(n){i=t,a=1,c=n}finally{u=1}}return{value:n,done:y}}}(r,i,a),!0),p}var s={};function u(){}function p(){}function y(){}n=Object.getPrototypeOf;var h=[][i]?n(n([][i]())):(o(n={},i,function(){return this}),n),E=y.prototype=u.prototype=Object.create(h);function l(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,o(t,a,"GeneratorFunction")),t.prototype=Object.create(E),t}return p.prototype=y,o(E,"constructor",y),o(y,"constructor",p),p.displayName="GeneratorFunction",o(y,a,"GeneratorFunction"),o(E),o(E,a,"Generator"),o(E,i,function(){return this}),o(E,"toString",function(){return"[object Generator]"}),(e=function(){return{w:c,m:l}})()}function o(t,n,r,e){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,n,r,e){function a(n,r){o(t,n,function(t){return this._invoke(n,r,t)})}n?i?i(t,n,{value:r,enumerable:!e,configurable:!e,writable:!e}):t[n]=r:(a("next",0),a("throw",1),a("return",2))},o(t,n,r,e)}function i(t,n,r,e,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?n(s):Promise.resolve(s).then(e,o)}function a(t){return function(){var n=this,r=arguments;return new Promise(function(e,o){var a=t.apply(n,r);function c(t){i(a,e,o,c,s,"next",t)}function s(t){i(a,e,o,c,s,"throw",t)}c(void 0)})}}var c=r("a7T2"),s=r("p09A"),u=r("LKDt"),p=r("oJUS"),y=r("D2Gh"),h=r("KIwC"),E=r("v25v"),l=r("PMEU"),f=r("wOV2"),O=r("oMpj");function P(){this.key=s.observable(),this.keyName=s.observable()}P.prototype.key=null,P.prototype.getKey=function(t,n,r,e){var o=this.loadKeyFromStorage(),i=new Promise(function(t,i){var a=c.bind(function(n){this.decryptKeyData(o,n).then(c.bind(function(n){this.generateKeyFromArray(n).then(function(n){t(n)}).catch(function(t){i(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))})},this)).catch(function(t){i(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))})},this);o?!this.key()||e?r?a(r):l.showPopup(f,[a,function(){c.isFunction(n)&&n()}]):t(this.key()):i(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/INFO_EMPTY_JSCRYPTO_KEY")))}.bind(this));this.loadKeyNameFromStorage(),i.then(c.bind(function(n){this.onKeyGenerateSuccess(n),c.isFunction(t)&&t(n)},this)).catch(c.bind(function(t){c.isFunction(n)&&n(),this.onKeyGenerateError(t)},this))},P.prototype.loadKeyNameFromStorage=function(){p.hasData(this.getStorageName())&&this.keyName(p.getData(this.getStorageName()).keyname)},P.prototype.loadKeyFromStorage=function(){var t="";return p.hasData(this.getStorageName())&&(t=p.getData(this.getStorageName()).keydata),t},P.prototype.generateKeyFromArray=function(t){return window.crypto.subtle.importKey("raw",t,{name:"AES-CBC"},!0,["encrypt","decrypt"])},P.prototype.onKeyGenerateSuccess=function(t){this.key(t)},P.prototype.onKeyGenerateError=function(t){t&&t.message&&y.showError(t.message)},P.prototype.generateKey=a(e().m(function t(){var n;return e().w(function(t){for(;;)switch(t.p=t.n){case 0:return n=!1,t.p=1,t.n=2,window.crypto.subtle.generateKey({name:"AES-CBC",length:256},!0,["encrypt","decrypt"]);case 2:n=t.v,t.n=4;break;case 3:t.p=3,t.v,y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_GENERATE_KEY"));case 4:return t.a(2,n)}},t,null,[[1,3]])})),P.prototype.convertKeyToString=function(){var t=a(e().m(function t(n){var r,o;return e().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r="",!n){t.n=4;break}return t.p=1,t.n=2,window.crypto.subtle.exportKey("raw",n);case 2:o=t.v,r=E.Array2HexString(new Uint8Array(o)),t.n=4;break;case 3:t.p=3,t.v,y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_EXPORT_KEY"));case 4:return t.a(2,r)}},t,null,[[1,3]])}));return function(n){return t.apply(this,arguments)}}(),P.prototype.generateAndExportKey=function(){var t=a(e().m(function t(n,r){var o,i,s=this;return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.generateKey();case 1:return o=t.v,t.n=2,this.convertKeyToString(o);case 2:i=t.v,l.showPopup(O,[function(){var t=a(e().m(function t(a){var h;return e().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,s.encryptKeyData(i,a);case 1:h=t.v,p.setData(s.getStorageName(),{keyname:r,keydata:h}),s.loadKeyNameFromStorage(),s.onKeyGenerateSuccess(o),c.isFunction(n)&&n(),t.n=3;break;case 2:t.p=2,t.v,y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY"));case 3:return t.a(2)}},t,null,[[0,2]])}));return function(n){return t.apply(this,arguments)}}(),function(){}]);case 3:return t.a(2)}},t,this)}));return function(n,r){return t.apply(this,arguments)}}(),P.prototype.getKeyFromString=function(){var t=a(e().m(function t(n){var r,o;return e().w(function(t){for(;;)switch(t.p=t.n){case 0:return r=null,(o=E.HexString2Array(n)).length>0?o=new Uint8Array(o):y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")),t.p=1,t.n=2,this.generateKeyFromArray(o);case 2:r=t.v,t.n=4;break;case 3:t.p=3,t.v,y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY"));case 4:return t.a(2,r)}},t,this,[[1,3]])}));return function(n){return t.apply(this,arguments)}}(),P.prototype.importKeyFromString=function(t,n,r,e){try{l.showPopup(O,[c.bind(function(o){this.encryptKeyData(n,o).then(c.bind(function(n){p.setData(this.getStorageName(),{keyname:t,keydata:n}),this.getKey(r,e,o)},this)).catch(function(){y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")),c.isFunction(e)&&e()})},this),function(){c.isFunction(e)&&e()}])}catch(t){y.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_IMPORT_KEY")),c.isFunction(e)&&e()}},P.prototype.exportKey=function(){return window.crypto.subtle.exportKey("raw",this.key())},P.prototype.deleteKey=function(){try{this.key(null),this.keyName(null),p.removeData(this.getStorageName())}catch(t){return{error:t}}return{status:"ok"}},P.prototype.decryptKeyData=function(t,n){var r=new Uint8Array(16);return new Promise(function(e,o){t?this.deriveKeyFromPasswordPromise(n,c.bind(function(n){crypto.subtle.decrypt({name:"AES-CBC",iv:r},n,new Uint8Array(E.HexString2Array(t))).then(c.bind(function(t){e(new Uint8Array(t))},this)).catch(function(){o(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))})},this),function(){o(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}):o(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}.bind(this))},P.prototype.encryptKeyData=function(t,n){var r=null,e=null,o=new Uint8Array(16);return new Promise(function(i,a){t?((r=E.HexString2Array(t)).length>0?r=new Uint8Array(r):a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY"))),this.deriveKeyFromPasswordPromise(n,c.bind(function(t){crypto.subtle.encrypt({name:"AES-CBC",iv:o},t,r).then(c.bind(function(t){e=E.Array2HexString(new Uint8Array(t)),i(e)},this)).catch(function(){a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))})},this),function(){a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))})):a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}.bind(this))},P.prototype.deriveKeyFromPasswordPromise=function(t,n,r){window.crypto.subtle.importKey("raw",function(t){if(window.TextEncoder)return new TextEncoder("utf-8").encode(t);for(var n=unescape(encodeURIComponent(t)),r=new Uint8Array(n.length),e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}(t),{name:"PBKDF2"},!1,["deriveKey"]).then(c.bind(function(t){window.crypto.subtle.deriveKey({name:"PBKDF2",salt:window.crypto.getRandomValues(new Uint8Array(16)),iterations:1e5,hash:"SHA-256"},t,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"]).then(function(t){c.isFunction(n)&&n(t)}).catch(function(){c.isFunction(r)&&r()})},this)).catch(function(){c.isFunction(r)&&r()})},P.prototype.getStorageName=function(){var t=h.UserId||0;return"aurora_paranoid_user_".concat(t,"_encrypted-crypto-key")},t.exports=new P},oMpj:(t,n,r)=>{var e=r("M4cL"),o=r("a7T2"),i=r("p09A"),a=r("69av"),c=r("LKDt"),s=r("D2Gh");function u(){a.call(this),this.keyPassword=i.observable(""),this.keyPasswordConfirm=i.observable(""),this.fOnPasswordEnterCallback=null,this.fOnWrongPasswordCallback=null,this.fOnCancellCallback=null}o.extendOwn(u.prototype,a.prototype),u.prototype.PopupTemplate="CoreParanoidEncryptionWebclientPlugin_EncryptKeyPasswordPopup",u.prototype.onOpen=function(t,n){this.fOnPasswordEnterCallback=t,this.fOnCancellCallback=n},u.prototype.encryptKey=function(){""===e.trim(this.keyPassword())?this.showError(c.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_PASSWORD_CANT_BE_BLANK")):e.trim(this.keyPassword())!==e.trim(this.keyPasswordConfirm())?this.showError(c.i18n("COREWEBCLIENT/ERROR_PASSWORDS_DO_NOT_MATCH")):(o.isFunction(this.fOnPasswordEnterCallback)&&this.fOnPasswordEnterCallback(e.trim(this.keyPassword())),this.closePopup())},u.prototype.cancelPopup=function(){o.isFunction(this.fOnCancellCallback)&&this.fOnCancellCallback(),this.closePopup()},u.prototype.onShow=function(){this.keyPassword(""),this.keyPasswordConfirm("")},u.prototype.showError=function(t){s.showError(t)},t.exports=new u},v25v:(t,n,r)=>{var e=r("a7T2"),o={Array2HexString:function(t){var n="";return e.each(t,function(t){var r=t.toString(16);n+=(1===r.length?"0":"")+r}),n},HexString2Array:function(t){var n=[];if(0===t.length||t.length%2!=0)return n;for(var r=0;r<t.length;r+=2)n.push(parseInt(t.substr(r,2),16));return n}};t.exports=o},wOV2:(t,n,r)=>{var e=r("a7T2"),o=r("p09A"),i=r("69av");function a(){i.call(this),this.keyPassword=o.observable(""),this.fOnPasswordEnterCallback=null,this.fOnCancellCallback=null}e.extendOwn(a.prototype,i.prototype),a.prototype.PopupTemplate="CoreParanoidEncryptionWebclientPlugin_DecryptKeyPasswordPopup",a.prototype.onOpen=function(t,n){this.fOnPasswordEnterCallback=t,this.fOnCancellCallback=n},a.prototype.decryptKey=function(){e.isFunction(this.fOnPasswordEnterCallback)&&this.fOnPasswordEnterCallback(this.keyPassword()),this.closePopup()},a.prototype.cancelPopup=function(){e.isFunction(this.fOnCancellCallback)&&this.fOnCancellCallback(),this.closePopup()},a.prototype.onShow=function(){this.keyPassword("")},t.exports=new a}}]);