mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-24 00:55:00 +03:00
10 lines
89 KiB
JavaScript
10 lines
89 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cryptoPro",[],t):"object"==typeof exports?exports.cryptoPro=t():e.cryptoPro=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),o=!1,s=!1;t._afterPluginsLoaded=function(e){var t=Boolean(window.Promise);return function(){for(var _=[],c=0;c<arguments.length;c++)_[c]=arguments[c];return n(this,void 0,void 0,(function(){var n,c;return a(this,(function(a){switch(a.label){case 0:if(!s){try{r(11)}catch(e){throw console.error(e),new Error(i._extractMeaningfulErrorMessage(e)||"Ошибка при подключении модуля для работы с Cades plugin")}s=!0}if(n=window.cadesplugin,!t)throw new Error("Необходим полифилл для Promise");if(!n)throw new Error("Не подключен модуль для работы с Cades plugin");o||(n.set_log_level(n.LOG_LEVEL_ERROR),o=!0),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n];case 2:return a.sent(),[3,4];case 3:throw c=a.sent(),console.error(c),new Error(i._extractMeaningfulErrorMessage(c)||"Ошибка при инициализации модуля для работы с Cades plugin");case 4:return[4,e.apply(this,_)];case 5:return[2,a.sent()]}}))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._extractMeaningfulErrorMessage=function(e){var t,r=(null===(t=window.cadesplugin)||void 0===t?void 0:t.getLastError)&&window.cadesplugin.getLastError(e);if(!(null==r?void 0:r.message)){if(!e.message)return null;r=e}if(!/[а-яА-Я]/.test(r.message))return null;var n=r.message.match(/^(.*?)(?:(?:\.?\s?\(?0x)|(?:\.?$))/);return n?n[1]:null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__cadesAsyncToken__={},t.__createCadesPluginObject__=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{}},t._generateCadesFn=function(e){var t,r=window.cadesplugin,n=Boolean(r.CreateObjectAsync),a=e.name||"dynamicFn",i=String(e),o=(null===(t=i.match(/^function[\s\w]*?\((.*?)\)/))||void 0===t?void 0:t[1])||"",s=i.replace(/^.*?{([\s\S]*?)}$/,"$1"),_=String(new(n?new Function("","return Object.getPrototypeOf(function*(){}).constructor")():Function)(o,s));return _=(_=_.replace(/\w+?\.__createCadesPluginObject__(\([\s\S]*?\))/gm,"cadesplugin.CreateObject"+(n?"Async":"")+"$1")).replace(/\w+?\.__cadesAsyncToken__\s*?\+\s*?\b/gm,n?"yield ":""),n||(_=_.replace(/propset_(.*?)\((.*?)\)/gm,"$1 = $2")),[n?"cadesplugin.async_spawn("+_+");":"("+_+")();","//# sourceURL=crypto-pro_"+a+".js"].join("")}},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(13)),n(r(14)),n(r(15)),n(r(16))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var certificate_1=__webpack_require__(5),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(25),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getUserCertificates=_afterPluginsLoaded_1._afterPluginsLoaded((function(resetCache){void 0===resetCache&&(resetCache=!1);var cadesplugin=window.cadesplugin;return!resetCache&&certificatesCache?certificatesCache:eval(_generateCadesFn_1._generateCadesFn((function(){var e,t,r;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{(t=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(t=_generateCadesFn_1.__cadesAsyncToken__+t.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),t=_generateCadesFn_1.__cadesAsyncToken__+t.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),r=_generateCadesFn_1.__cadesAsyncToken__+t.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!r)throw new Error("Нет доступных сертификатов");var n=[];try{for(;r;){var a=_generateCadesFn_1.__cadesAsyncToken__+t.Item(r);n.push(new certificate_1.Certificate(a,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+a.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+a.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+a.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+a.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+a.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+a.ValidToDate)),r--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(12))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getCadesProp=_afterPluginsLoaded_1._afterPluginsLoaded((function(propName){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate[propName]}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при обращении к свойству сертификата")}return e})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getSystemInfo=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var sysInfo={cadesVersion:null,cspVersion:null};return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.PluginVersion,sysInfo.cspVersion=_generateCadesFn_1.__cadesAsyncToken__+e.CSPVersion(),sysInfo.cadesVersion||(sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.Version),sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+sysInfo.cadesVersion.toString(),sysInfo.cspVersion=_generateCadesFn_1.__cadesAsyncToken__+sysInfo.cspVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении информации о системе")}return sysInfo})))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(9))},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(10)),n(r(4)),n(r(7)),n(r(26)),n(r(29)),n(r(32)),n(r(5))},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),o=r(4);t.getCertificate=i._afterPluginsLoaded((function(e){return n(void 0,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:if(!e)throw new Error("Отпечаток не указан");return[4,o.getUserCertificates()];case 1:if(t=n.sent(),!(r=t.find((function(t){return t.thumbprint===e}))))throw new Error('Сертификат с отпечатком: "'+e+'" не найден');return[2,r]}}))}))}))},function(module,exports){!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isEdge=0,isSafari=0,failed_extensions=0,canPromise=!!window.Promise,cadesplugin;cadesplugin=canPromise?new Promise((function(e,t){plugin_resolve=e,plugin_reject=t})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,t){var r=ru_cryptopro_npcades_10_native_bridge.callbacks[e];r&&r.apply(null,t)},call:function(e,t,r){var n=r&&"function"==typeof r,a=n?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;n&&(ru_cryptopro_npcades_10_native_bridge.callbacks[a]=r);var i=document.createElement("IFRAME"),o=new Array("_CPNP_handle");try{i.setAttribute("src","cpnp-js-call:"+e+":"+a+":"+encodeURIComponent(JSON.stringify(t,o)))}catch(e){alert(e)}document.documentElement.appendChild(i),i.parentNode.removeChild(i),i=null}};cadesplugin.JSModuleVersion="2.1.2",cadesplugin.async_spawn=async_spawn,cadesplugin.set=set_pluginObject,cadesplugin.set_log_level=set_log_level,cadesplugin.getLastError=getLastError,cadesplugin.is_capilite_enabled=is_capilite_enabled,isNativeMessageSupported()&&(cadesplugin.CreateObjectAsync=CreateObjectAsync,cadesplugin.ReleasePluginObjects=ReleasePluginObjects),isNativeMessageSupported()||(cadesplugin.CreateObject=CreateObject),window.cadesplugin_load_timeout?setTimeout(check_load_timeout,window.cadesplugin_load_timeout):setTimeout(check_load_timeout,2e4),set_constantValues(),cadesplugin.current_log_level=cadesplugin.LOG_LEVEL_ERROR,window.cadesplugin=cadesplugin,check_plugin_working()}function check_browser(){var e,t=navigator.userAgent,r=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===r[1]&&null!=(e=t.match(/\b(OPR|Edge)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&r.splice(1,1,e[1]),{name:r[0],version:r[1]})}function cpcsp_console_log(e,t){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",t),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",t),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",t))):void 0}function set_log_level(e){e===cadesplugin.LOG_LEVEL_DEBUG||e===cadesplugin.LOG_LEVEL_INFO||e===cadesplugin.LOG_LEVEL_ERROR?(cadesplugin.current_log_level=e,cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = DEBUG"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = INFO"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = ERROR"),isNativeMessageSupported()&&(cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&window.postMessage("set_log_level=debug","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&window.postMessage("set_log_level=info","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&window.postMessage("set_log_level=error","*"))):cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,"cadesplugin_api.js: Incorrect log_level: "+e)}function set_constantValues(){cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_CONTAINER_STORE=100,cadesplugin.CAPICOM_MY_STORE="My",cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,cadesplugin.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411",cadesplugin.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",cadesplugin.CADESCOM_CADES_DEFAULT=0,cadesplugin.CADESCOM_CADES_BES=1,cadesplugin.CADESCOM_CADES_T=5,cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1=93,cadesplugin.CADESCOM_PKCS7_TYPE=65535,cadesplugin.CADESCOM_ENCODE_BASE64=0,cadesplugin.CADESCOM_ENCODE_BINARY=1,cadesplugin.CADESCOM_ENCODE_ANY=-1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE=9,cadesplugin.CAPICOM_OID_OTHER=0,cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION=10,cadesplugin.CAPICOM_EKU_CLIENT_AUTH=2,cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON=5,cadesplugin.CAPICOM_EKU_OTHER=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_ATTRIBUTE_OTHER=-1,cadesplugin.CADESCOM_STRING_TO_UCS2LE=0,cadesplugin.CADESCOM_BASE64_TO_BINARY=1,cadesplugin.CADESCOM_DISPLAY_DATA_NONE=0,cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT=1,cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1=0,cadesplugin.CADESCOM_HASH_ALGORITHM_MD2=1,cadesplugin.CADESCOM_HASH_ALGORITHM_MD4=2,cadesplugin.CADESCOM_HASH_ALGORITHM_MD5=3,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256=4,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384=5,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512=6,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,cadesplugin.LOG_LEVEL_DEBUG=4,cadesplugin.LOG_LEVEL_INFO=2,cadesplugin.LOG_LEVEL_ERROR=1,cadesplugin.CADESCOM_AllowNone=0,cadesplugin.CADESCOM_AllowNoOutstandingRequest=1,cadesplugin.CADESCOM_AllowUntrustedCertificate=2,cadesplugin.CADESCOM_AllowUntrustedRoot=4,cadesplugin.CADESCOM_SkipInstallToStore=268435456}function async_spawn(e){function t(e,t){var i;try{i=r[e](t)}catch(e){return Promise.reject(e)}return i.done?i.value:Promise.resolve(i.value).then(n,a)}var r=e(Array.prototype.slice.call(arguments,1)),n=t.bind(t,"next"),a=t.bind(t,"throw");return n()}function isIE(){return"IE"===browserSpecs.name||"MSIE"===browserSpecs.name}function isIOS(){return navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/ipad/i)||navigator.userAgent.match(/iphone/i)}function isNativeMessageSupported(){return!isIE()&&("Edge"===browserSpecs.name?(isEdge=!0,!0):"Opera"===browserSpecs.name?(isOpera=!0,browserSpecs.version>=33):"Firefox"===browserSpecs.name?(isFireFox=!0,browserSpecs.version>=52):"Chrome"===browserSpecs.name?browserSpecs.version>=42:"Safari"===browserSpecs.name?(isSafari=!0,browserSpecs.version>=12):void 0)}function CreateObject(e){if(isIOS())return call_ru_cryptopro_npcades_10_native_bridge("CreateObject",[e]);if(isIE()){if(e.match(/X509Enrollment/i))try{return document.getElementById("webClassFactory").CreateObject(e)}catch(t){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(t){return new ActiveXObject(e)}}return pluginObject.CreateObject(e)}function decimalToHexString(e){return e<0&&(e=4294967295+e+1),e.toString(16).toUpperCase()}function GetMessageFromException(e){var t=e.message;return t?e.number&&(t+=" (0x"+decimalToHexString(e.number)+")"):t=e,t}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(t){return GetMessageFromException(e)}}function ReleasePluginObjects(){return cpcsp_chrome_nmcades.ReleasePluginObjects()}function CreateObjectAsync(e){return pluginObject.CreateObjectAsync(e)}function call_ru_cryptopro_npcades_10_native_bridge(functionName,array){var tmpobj,ex;if(ru_cryptopro_npcades_10_native_bridge.call(functionName,array,(function(e,response){ex=e;var str="tmpobj="+response;eval(str),"string"==typeof tmpobj&&(tmpobj=tmpobj.replace(/\\\n/gm,"\n"),tmpobj=tmpobj.replace(/\\\r/gm,"\r"))})),ex)throw ex;return tmpobj}function show_firefox_missing_extension_dialog(){if(!window.cadesplugin_skip_extension_install){var e=document.createElement("div");e.id="cadesplugin_ovr",e.style="visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)",e.innerHTML="<div id='cadesplugin_ovr_item' style='position:relative; width:400px; margin:100px auto; background-color:#fff; border:2px solid #000; padding:10px; text-align:center; opacity: 1; z-index: 1500'><button id='cadesplugin_close_install' style='float: right; font-size: 10px; background: transparent; border: 1; margin: -5px'>X</button><p>Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.<p><a href='https://www.cryptopro.ru/sites/default/files/products/cades/extensions/firefox_cryptopro_extension_latest.xpi'>Скачать расширение</a></p></div>",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_close_install").addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.style.visibility="visible"}}function install_opera_extension(){window.cadesplugin_skip_extension_install?plugin_loaded_error("Плагин недоступен"):document.addEventListener("DOMContentLoaded",(function(){var e=document.createElement("div");e.id="cadesplugin_ovr",e.style="visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)",e.innerHTML="<div id='cadesplugin_ovr_item' style='position:relative; width:400px; margin:100px auto; background-color:#fff; border:2px solid #000; padding:10px; text-align:center; opacity: 1; z-index: 1500'><button id='cadesplugin_close_install' style='float: right; font-size: 10px; background: transparent; border: 1; margin: -5px'>X</button><p>Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо установить расширение из каталога дополнений Opera.<p><button id='cadesplugin_install' style='font:12px Arial'>Установить расширение</button></p></div>",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_install").addEventListener("click",(function(e){opr.addons.installExtension("epebfcehmdedogndhlcacafjaacknbcm",(function(){document.getElementById("cadesplugin_ovr").style.visibility="hidden",location.reload()}),(function(){}))})),document.getElementById("cadesplugin_close_install").addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.style.visibility="visible",document.getElementById("cadesplugin_ovr_item").addEventListener("click",(function(e){e.stopPropagation()}))}))}function firefox_or_edge_nmcades_onload(){cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}function nmcades_api_onload(){window.postMessage("cadesplugin_echo_request","*"),window.addEventListener("message",(function(e){if("string"==typeof e.data&&e.data.match("cadesplugin_loaded"))if(isFireFox||isEdge||isSafari){var t=e.data.substring(e.data.indexOf("url:")+4),r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r.onerror=plugin_loaded_error,r.onload=firefox_or_edge_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(r),failed_extensions++}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){if(isFireFox||isEdge||isSafari)nmcades_api_onload();else{var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e),(e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e)}}function load_npapi_plugin(){var e=document.createElement("object");if(e.setAttribute("id","cadesplugin_object"),e.setAttribute("type","application/x-cades"),e.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(e),pluginObject=document.getElementById("cadesplugin_object"),isIE()){var t=document.createElement("object");t.setAttribute("id","certEnrollClassFactory"),t.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),t.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(t);var r=document.createElement("object");r.setAttribute("id","webClassFactory"),r.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),r.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(r)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){if(isNativeMessageSupported()){if(++failed_extensions<2)return;if(isOpera&&(void 0===e||"object"==typeof e))return void install_opera_extension()}void 0!==e&&"object"!=typeof e||(e="Плагин недоступен"),plugin_resolved=1,canPromise?plugin_reject(e):window.postMessage("cadesplugin_load_error","*")}function check_load_timeout(){1!==plugin_resolved&&(isFireFox&&show_firefox_missing_extension_dialog(),plugin_resolved=1,canPromise?plugin_reject("Истекло время ожидания загрузки плагина"):window.postMessage("cadesplugin_load_error","*"))}function createPromise(e){return new Promise(e)}function check_npapi_plugin(){try{CreateObject("CAdESCOM.About");plugin_loaded()}catch(t){document.getElementById("cadesplugin_object").style.display="none";var e=navigator.mimeTypes["application/x-cades"];if(e)plugin_loaded_error(e.enabledPlugin?"Плагин загружен, но не создаются обьекты":"Ошибка при загрузке плагина");else plugin_loaded_error("Плагин недоступен")}}function check_plugin_working(){var e=document.createElement("div");e.innerHTML="\x3c!--[if lt IE 9]><i></i><![endif]--\x3e",1===e.getElementsByTagName("i").length?plugin_loaded_error("Internet Explorer версии 8 и ниже не поддерживается"):isNativeMessageSupported()?load_extension():canPromise?"complete"===document.readyState?(load_npapi_plugin(),check_npapi_plugin()):window.addEventListener("load",(function(e){load_npapi_plugin(),check_npapi_plugin()}),!1):window.addEventListener("message",(function(e){"cadesplugin_echo_request"===e.data&&(load_npapi_plugin(),check_npapi_plugin())}),!1)}function set_pluginObject(e){pluginObject=e}function is_capilite_enabled(){return!(void 0===cadesplugin.EnableInternalCSP||!cadesplugin.EnableInternalCSP)}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),a=r(17),i=r(18),o=r(6),s=r(19),_=r(20),c=r(21),u=r(23),l=r(24),d=function(){function e(e,t,r,n,a,i,o){this._cadesCertificate=e,this.name=t,this.issuerName=r,this.subjectName=n,this.thumbprint=a,this.validFrom=i,this.validTo=o}return e.prototype.getOwnerInfo=function(){return c.getInfo.call(this,n.SUBJECT_TAGS_TRANSLATIONS,"SubjectName")},e.prototype.getIssuerInfo=function(){return c.getInfo.call(this,n.ISSUER_TAGS_TRANSLATIONS,"IssuerName")},e.prototype.getExtendedKeyUsage=function(){return _.getExtendedKeyUsage.call(this)},e.prototype.getDecodedExtendedKeyUsage=function(){return s.getDecodedExtendedKeyUsage.call(this)},e.prototype.getAlgorithm=function(){return i.getAlgorithm.call(this)},e.prototype.getCadesProp=function(e){return o.getCadesProp.call(this,e)},e.prototype.isValid=function(){return l.isValid.call(this)},e.prototype.exportBase64=function(){return a.exportBase64.call(this)},e.prototype.hasExtendedKeyUsage=function(e){return u.hasExtendedKeyUsage.call(this,e)},e}();t.Certificate=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CADESCOM_ATTRIBUTE_OTHER=-1,t.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,t.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,t.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,t.CADESCOM_AllowNoOutstandingRequest=1,t.CADESCOM_AllowNone=0,t.CADESCOM_AllowUntrustedCertificate=2,t.CADESCOM_AllowUntrustedRoot=4,t.CADESCOM_BASE64_TO_BINARY=1,t.CADESCOM_CADES_BES=1,t.CADESCOM_CADES_DEFAULT=0,t.CADESCOM_CADES_T=5,t.CADESCOM_CADES_X_LONG_TYPE_1=93,t.CADESCOM_CONTAINER_STORE=100,t.CADESCOM_CURRENT_USER_STORE=2,t.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,t.CADESCOM_DISPLAY_DATA_CONTENT=1,t.CADESCOM_DISPLAY_DATA_NONE=0,t.CADESCOM_ENCODE_ANY=-1,t.CADESCOM_ENCODE_BASE64=0,t.CADESCOM_ENCODE_BINARY=1,t.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,t.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,t.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,t.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,t.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,t.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,t.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,t.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,t.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,t.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,t.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,t.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,t.CADESCOM_HASH_ALGORITHM_MD2=1,t.CADESCOM_HASH_ALGORITHM_MD4=2,t.CADESCOM_HASH_ALGORITHM_MD5=3,t.CADESCOM_HASH_ALGORITHM_SHA1=0,t.CADESCOM_HASH_ALGORITHM_SHA_256=4,t.CADESCOM_HASH_ALGORITHM_SHA_384=5,t.CADESCOM_HASH_ALGORITHM_SHA_512=6,t.CADESCOM_LOCAL_MACHINE_STORE=1,t.CADESCOM_PKCS7_TYPE=65535,t.CADESCOM_STRING_TO_UCS2LE=0,t.CADESCOM_SkipInstallToStore=268435456,t.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,t.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,t.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,t.CAPICOM_ACTIVE_DIRECTORY_USER_STORE=3,t.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,t.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,t.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,t.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,t.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,t.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,t.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,t.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,t.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,t.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,t.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,t.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,t.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,t.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,t.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,t.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,t.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,t.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,t.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,t.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,t.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,t.CAPICOM_CURRENT_USER_STORE=2,t.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,t.CAPICOM_EKU_CLIENT_AUTH=2,t.CAPICOM_EKU_OTHER=0,t.CAPICOM_EKU_SMARTCARD_LOGON=5,t.CAPICOM_LOCAL_MACHINE_STORE=1,t.CAPICOM_MEMORY_STORE=0,t.CAPICOM_MY_STORE="My",t.CAPICOM_OID_KEY_USAGE_EXTENSION=10,t.CAPICOM_OID_OTHER=0,t.CAPICOM_PROPID_ACCESS_STATE=14,t.CAPICOM_PROPID_ARCHIVED=19,t.CAPICOM_PROPID_ARCHIVED_KEY_HASH=65,t.CAPICOM_PROPID_AUTO_ENROLL=21,t.CAPICOM_PROPID_CROSS_CERT_DIST_POINTS=23,t.CAPICOM_PROPID_CTL_USAGE=9,t.CAPICOM_PROPID_DATE_STAMP=27,t.CAPICOM_PROPID_DESCRIPTION=13,t.CAPICOM_PROPID_EFS=17,t.CAPICOM_PROPID_ENHKEY_USAGE=9,t.CAPICOM_PROPID_ENROLLMENT=26,t.CAPICOM_PROPID_EXTENDED_ERROR_INFO=30,t.CAPICOM_PROPID_FIRST_RESERVED=66,t.CAPICOM_PROPID_FIRST_USER=32768,t.CAPICOM_PROPID_FORTEZZA_DATA=18,t.CAPICOM_PROPID_FRIENDLY_NAME=11,t.CAPICOM_PROPID_HASH_PROP=3,t.CAPICOM_PROPID_IE30_RESERVED=7,t.CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH=24,t.CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH=28,t.CAPICOM_PROPID_KEY_CONTEXT=5,t.CAPICOM_PROPID_KEY_IDENTIFIER=20,t.CAPICOM_PROPID_KEY_PROV_HANDLE=1,t.CAPICOM_PROPID_KEY_PROV_INFO=2,t.CAPICOM_PROPID_KEY_SPEC=6,t.CAPICOM_PROPID_LAST_RESERVED=32767,t.CAPICOM_PROPID_LAST_USER=65535,t.CAPICOM_PROPID_MD5_HASH=4,t.CAPICOM_PROPID_NEXT_UPDATE_LOCATION=10,t.CAPICOM_PROPID_PUBKEY_ALG_PARA=22,t.CAPICOM_PROPID_PUBKEY_HASH_RESERVED=8,t.CAPICOM_PROPID_PVK_FILE=12,t.CAPICOM_PROPID_RENEWAL=64,t.CAPICOM_PROPID_SHA1_HASH=3,t.CAPICOM_PROPID_SIGNATURE_HASH=15,t.CAPICOM_PROPID_SMART_CARD_DATA=16,t.CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH=29,t.CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH=25,t.CAPICOM_PROPID_UNKNOWN=0,t.CAPICOM_SMART_CARD_USER_STORE=4,t.CAPICOM_STORE_OPEN_EXISTING_ONLY=128,t.CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED=256,t.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,t.CAPICOM_STORE_OPEN_READ_ONLY=0,t.CAPICOM_STORE_OPEN_READ_WRITE=1,t.CHECK_NONE=0,t.CHECK_OFFLINE_REVOCATION_STATUS=16,t.CHECK_ONLINE_REVOCATION_STATUS=8,t.CHECK_SIGNATURE_VALIDITY=4,t.CHECK_TIME_VALIDITY=2,t.CHECK_TRUSTED_ROOT=1,t.LOG_LEVEL_DEBUG=4,t.LOG_LEVEL_ERROR=1,t.LOG_LEVEL_INFO=2,t.TRUST_CTL_IS_NOT_SIGNATURE_VALID=262144,t.TRUST_CTL_IS_NOT_TIME_VALID=131072,t.TRUST_CTL_IS_NOT_VALID_FOR_USAGE=524288,t.TRUST_IS_CYCLIC=128,t.TRUST_IS_NOT_SIGNATURE_VALID=8,t.TRUST_IS_NOT_TIME_NESTED=2,t.TRUST_IS_NOT_TIME_VALID=1,t.TRUST_IS_NOT_VALID_FOR_USAGE=16,t.TRUST_IS_PARTIAL_CHAIN=65536,t.TRUST_IS_REVOKED=4,t.TRUST_IS_UNTRUSTED_ROOT=32,t.TRUST_REVOCATION_STATUS_UNKNOWN=64,t.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",t.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",t.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",t.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISSUER_TAGS_TRANSLATIONS=[{possibleNames:["UnstructuredName"],translation:"Неструктурированное имя"},{possibleNames:["CN"],translation:"Удостоверяющий центр"},{possibleNames:["C"],translation:"Страна"},{possibleNames:["S"],translation:"Регион"},{possibleNames:["STREET"],translation:"Адрес"},{possibleNames:["O"],translation:"Компания"},{possibleNames:["OU"],translation:"Тип"},{possibleNames:["T"],translation:"Должность"},{possibleNames:["ОГРН","OGRN"],translation:"ОГРН"},{possibleNames:["ОГРНИП","OGRNIP"],translation:"ОГРНИП"},{possibleNames:["СНИЛС","SNILS"],translation:"СНИЛС"},{possibleNames:["ИНН","INN","ИНН организации"],translation:"ИНН"},{possibleNames:["E"],translation:"Email"},{possibleNames:["L"],translation:"Город"}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OIDS_DICTIONARY={"1.2.643.2.2.34.6":"Пользователь Центра Регистрации","1.2.643.2.39.1.1":'Использование в программных продуктах системы "1С:Предприятие 8"',"1.2.643.3.131.1.1":"ИНН","1.2.643.3.141.1.1":"РНС ФСС","1.2.643.3.141.1.2":"КП ФСС","1.2.643.3.2.100.65.13.11":'Использование в системе АИС "Госзакупки" Сахалинской области.',"1.2.643.3.8.100.1":'Сертификат типа "ekey-ГОСТ"',"1.2.643.3.8.100.1.1":"Общее использование в системах ИОК без права заверения финансовых документов","1.2.643.3.8.100.1.10":"Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы","1.2.643.3.8.100.1.11":"Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области","1.2.643.3.8.100.1.12":"Использование в системе государственного заказа Иркутской области","1.2.643.3.8.100.1.13":"Использование в электронной торговой площадке агентства государственного заказа Красноярского края","1.2.643.3.8.100.1.14":'Использование в электронной торговой площадке "Тендер"',"1.2.643.3.8.100.1.2":"Передача отчетности по ТКС","1.2.643.3.8.100.1.3":"Оформление взаимных обязательств, соглашений, договоров, актов и т.п.","1.2.643.3.8.100.1.4":"Внутрикорпоративный документооборот","1.2.643.3.8.100.1.5":"Использование в системах электронной торговли","1.2.643.3.8.100.1.6":'Использование в торгово-закупочной системе "ЭЛЕКТРА"',"1.2.643.3.8.100.1.7":"Использование в системе Портал государственных закупок Ставропольского края.","1.2.643.3.8.100.1.8":"Использование в Единой системе электронной торговли B2B-Center и B2G.","1.2.643.3.8.100.1.9":"Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа","1.2.643.5.1.24.2.1.3":"Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя","1.2.643.5.1.24.2.1.3.1":"Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя","1.2.643.5.1.24.2.2.2":"Формирование документов как результата оказания услуги со стороны органов регистрации прав","1.2.643.5.1.24.2.2.3":"Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя","1.2.643.6.2.1.7.1":"Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций","1.2.643.6.2.1.7.2":"Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов","1.2.643.6.3":"Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений","1.2.643.6.3.1.1":"Использование на электронных площадок отобранных для проведения аукционах в электронной форме","1.2.643.6.3.1.2.1":"Тип участника - Юридическое лицо","1.2.643.6.3.1.2.2":"Тип участника - Физическое лицо","1.2.643.6.3.1.2.3":"Тип участника - Индивидуальный предприниматель","1.2.643.6.3.1.3.1":"Участник размещения заказа","1.2.643.6.3.1.4.1":"Администратор организации","1.2.643.6.3.1.4.2":"Уполномоченный специалист","1.2.643.6.3.1.4.3":"Специалист с правом подписи контракта","1.2.840.113549.1.9.2":"Неструктурированное имя","1.3.6.1.4.1.24138.1.1.8.1":'Обеспечение юридической значимости в Системе "Электронная Торговая Площадка"',"1.3.6.1.4.1.29919.21":'Использование в системе Портал государственных закупок Ростовской области "Рефери".',"1.3.6.1.5.5.7.3.2":"Проверка подлинности клиента","1.3.6.1.5.5.7.3.4":"Защищенная электронная почта","1.3.643.3.8.100.15":'Использование в ЭТП "uTender"'}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUBJECT_TAGS_TRANSLATIONS=[{possibleNames:["UnstructuredName"],translation:"Неструктурированное имя"},{possibleNames:["CN"],translation:"Владелец"},{possibleNames:["SN"],translation:"Фамилия"},{possibleNames:["G"],translation:"Имя Отчество"},{possibleNames:["C"],translation:"Страна"},{possibleNames:["S"],translation:"Регион"},{possibleNames:["STREET"],translation:"Адрес"},{possibleNames:["O"],translation:"Компания"},{possibleNames:["OU"],translation:"Отдел/подразделение"},{possibleNames:["T"],translation:"Должность"},{possibleNames:["ОГРН","OGRN"],translation:"ОГРН"},{possibleNames:["ОГРНИП","OGRNIP"],translation:"ОГРНИП"},{possibleNames:["СНИЛС","SNILS"],translation:"СНИЛС"},{possibleNames:["ИНН","INN","ИНН организации"],translation:"ИНН"},{possibleNames:["E"],translation:"Email"},{possibleNames:["L"],translation:"Город"}]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.exportBase64=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.Export(0)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при экспорте сертификата")}return e})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getAlgorithm=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,t={algorithm:null,oid:null};try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.PublicKey(),e=_generateCadesFn_1.__cadesAsyncToken__+e.Algorithm,t.algorithm=_generateCadesFn_1.__cadesAsyncToken__+e.FriendlyName,t.oid=_generateCadesFn_1.__cadesAsyncToken__+e.Value}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении алгоритма")}return t})))}))},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),s=r(0);t.getDecodedExtendedKeyUsage=s._afterPluginsLoaded((function(){return a(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return[2,e.sent().reduce((function(e,t){var r;return n(n({},e),((r={})[t]=o.OIDS_DICTIONARY[t]||null,r))}),{})]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getExtendedKeyUsage=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,t=[];try{if(e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),e=_generateCadesFn_1.__cadesAsyncToken__+e.EKUs,(e=_generateCadesFn_1.__cadesAsyncToken__+e.Count)>0)for(;e>0;){var r=void 0;r=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),r=_generateCadesFn_1.__cadesAsyncToken__+r.EKUs,r=_generateCadesFn_1.__cadesAsyncToken__+r.Item(e),r=_generateCadesFn_1.__cadesAsyncToken__+r.OID,t.push(r),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return t})))}))},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),o=r(1),s=r(22),_=r(6);t.getInfo=i._afterPluginsLoaded((function(e,t){return n(this,void 0,void 0,(function(){var r,n;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,_.getCadesProp.call(this,t)];case 1:return r=a.sent(),[3,3];case 2:throw n=a.sent(),console.error(n),new Error(o._extractMeaningfulErrorMessage(n)||"Ошибка при извлечении информации из сертификата");case 3:return[2,s._parseCertInfo(e,r)]}}))}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);t._parseCertInfo=function(e,t){var r=t.match(/([а-яА-Яa-zA-Z0-9\s.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);if(r)return r.map((function(t){var r,a,i,o=t.trim().match(/^([а-яА-Яa-zA-Z0-9\s.]+)=(.+?),?$/),s=null==o?void 0:o[1],_=null===(a=null===(r=null==o?void 0:o[2])||void 0===r?void 0:r.replace(/^"(.*)"/,"$1"))||void 0===a?void 0:a.replace(/"{2}/g,'"'),c=null==s?void 0:s.match(/^OID\.(.*)/),u=null==c?void 0:c[1],l=!1;if(u){var d=n.OIDS_DICTIONARY[u];d&&(s=d,l=!0)}var f=null===(i=e.find((function(e){return e.possibleNames.find((function(e){return e===s}))})))||void 0===i?void 0:i.translation;return f&&(s=f,l=!0),{description:_,title:s,isTranslated:l}}))}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(0);t.hasExtendedKeyUsage=i._afterPluginsLoaded((function(e){return n(this,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return t=r.sent(),[2,Array.isArray(e)?e.every((function(e){return t.some((function(t){return t===e}))})):t.some((function(t){return t===e}))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.isValid=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.IsValid(),e=_generateCadesFn_1.__cadesAsyncToken__+e.Result}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при проверке сертификата")}return Boolean(e)})))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._extractCommonName=function(e){var t;return null===(t=e.match(/CN=(.+?)(?:,|$)/))||void 0===t?void 0:t[1]}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),o=r(1),s=r(27),_=r(28),c=r(7);t.isValidSystemSetup=i._afterPluginsLoaded((function(){return n(void 0,void 0,void 0,(function(){var e,t;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,c.getSystemInfo()];case 1:return e=r.sent(),[3,3];case 2:throw t=r.sent(),console.error(t),new Error(o._extractMeaningfulErrorMessage(t)||"Настройки ЭП на данной машине не верны");case 3:if(!s._isSupportedCadesVersion(e.cadesVersion))throw new Error("Не поддерживаемая версия плагина");if(!_._isSupportedCSPVersion(e.cspVersion))throw new Error("Не поддерживаемая версия CSP");return[2,!0]}}))}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isSupportedCadesVersion=function(e){var t=e.match(/(\d+)\.(\d+)\.(\d+)/);if(!t)return!1;var r=t[1],n=(t[2],t[3]);return!(Number(r)<2)&&!(2===Number(r)&&Number(n)<12438)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t._isSupportedCSPVersion=function(e){var t;return e=null===(t=e.match(/\d+?\b(?:\.\d+)?/))||void 0===t?void 0:t[0],Number(e)>=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0});var constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(30),_getDateObj_1=__webpack_require__(31);exports.createSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,messageHash,detachedSignature){return void 0===detachedSignature&&(detachedSignature=!0),__awaiter(void 0,void 0,void 0,(function(){var cadesplugin,cadesCertificate;return __generator(this,(function(_a){switch(_a.label){case 0:return cadesplugin=window.cadesplugin,[4,_getCadesCert_1._getCadesCert(thumbprint)];case 1:return cadesCertificate=_a.sent(),[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,t,r;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var n,a,i=_getDateObj_1._getDateObj(new Date);try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Name(constants_1.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME),_generateCadesFn_1.__cadesAsyncToken__,e.propset_Value(i)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,r.propset_Certificate(cadesCertificate),n=_generateCadesFn_1.__cadesAsyncToken__+r.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,n.Add(e),_generateCadesFn_1.__cadesAsyncToken__,t.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Content(messageHash),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{a=_generateCadesFn_1.__cadesAsyncToken__+t.SignCades(r,cadesplugin.CADESCOM_CADES_BES,detachedSignature)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports._getCadesCert=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint){var cadesplugin=window.cadesplugin;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,t,r,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}if(!e)throw new Error("Не удалось получить доступ к хранилищу сертификатов");try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{t=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,r=_generateCadesFn_1.__cadesAsyncToken__+t.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!r)throw new Error("Нет доступных сертификатов");try{if(t=_generateCadesFn_1.__cadesAsyncToken__+t.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+t.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден');n=_generateCadesFn_1.__cadesAsyncToken__+t.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата")}return e.Close(),n})))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getDateObj=function(e){return e.getVarDate?e.getVarDate():e}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{_(n.next(e))}catch(e){i(e)}}function s(e){try{_(n.throw(e))}catch(e){i(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=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++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.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],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.createHash=_afterPluginsLoaded_1._afterPluginsLoaded((function(unencryptedMessage,algorithm){return void 0===algorithm&&(algorithm="GOST_3411_2012_512"),__awaiter(void 0,void 0,void 0,(function(){var cadesplugin;return __generator(this,(function(_a){return cadesplugin=window.cadesplugin,[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,t,r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.HashedData");try{e=Buffer.from(unencryptedMessage).toString("base64")}catch(e){throw console.error(e),new Error("Ошибка при преобразовании сообщения в Base64")}try{_generateCadesFn_1.__cadesAsyncToken__,r.propset_Algorithm(cadesplugin["CADESCOM_HASH_ALGORITHM_CP_"+algorithm]),_generateCadesFn_1.__cadesAsyncToken__,r.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,r.Hash(e)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации хэширования")}try{t=_generateCadesFn_1.__cadesAsyncToken__+r.Value}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при создании хэша")}return t})))]}))}))}))}).call(this,__webpack_require__(33).Buffer)},function(e,t,r){"use strict";(function(e){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var n=r(35),a=r(36),i=r(37);function o(){return _.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return _.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=_.prototype:(null===e&&(e=new _(t)),e.length=t),e}function _(e,t,r){if(!(_.TYPED_ARRAY_SUPPORT||this instanceof _))return new _(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);_.TYPED_ARRAY_SUPPORT?(e=t).__proto__=_.prototype:e=d(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!_.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),a=(e=s(e,n)).write(t,r);a!==n&&(e=e.slice(0,a));return e}(e,t,r):function(e,t){if(_.isBuffer(t)){var r=0|f(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(u(t),e=s(e,t<0?0:0|f(t)),!_.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function d(e,t){var r=t.length<0?0:0|f(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function f(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(_.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return B(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return v(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return w(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function E(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=_.from(t,n)),_.isBuffer(t))return 0===t.length?-1:h(e,t,r,n,a);if("number"==typeof t)return t&=255,_.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):h(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,r,n,a){var i,o=1,s=e.length,_=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,_/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var u=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===_)return u*o}else-1!==u&&(i-=i-u),u=-1}else for(r+_>s&&(r=s-_),i=r;i>=0;i--){for(var l=!0,d=0;d<_;d++)if(c(e,i+d)!==c(t,d)){l=!1;break}if(l)return i}return-1}function A(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function O(e,t,r,n){return j(B(t,e.length-r),e,r,n)}function I(e,t,r,n){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function T(e,t,r,n){return I(e,t,r,n)}function y(e,t,r,n){return j(G(t),e,r,n)}function M(e,t,r,n){return j(function(e,t){for(var r,n,a,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function b(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,o,s,_,c=e[a],u=null,l=c>239?4:c>223?3:c>191?2:1;if(a+l<=r)switch(l){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[a+1]))&&(_=(31&c)<<6|63&i)>127&&(u=_);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(_=(15&c)<<12|(63&i)<<6|63&o)>2047&&(_<55296||_>57343)&&(u=_);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(_=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&_<1114112&&(u=_)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=_,t.SlowBuffer=function(e){+e!=e&&(e=0);return _.alloc(+e)},t.INSPECT_MAX_BYTES=50,_.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),_.poolSize=8192,_._augment=function(e){return e.__proto__=_.prototype,e},_.from=function(e,t,r){return c(null,e,t,r)},_.TYPED_ARRAY_SUPPORT&&(_.prototype.__proto__=Uint8Array.prototype,_.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&_[Symbol.species]===_&&Object.defineProperty(_,Symbol.species,{value:null,configurable:!0})),_.alloc=function(e,t,r){return function(e,t,r,n){return u(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},_.allocUnsafe=function(e){return l(null,e)},_.allocUnsafeSlow=function(e){return l(null,e)},_.isBuffer=function(e){return!(null==e||!e._isBuffer)},_.compare=function(e,t){if(!_.isBuffer(e)||!_.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},_.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},_.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return _.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=_.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var o=e[r];if(!_.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},_.byteLength=p,_.prototype._isBuffer=!0,_.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)E(this,t,t+1);return this},_.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)E(this,t,t+3),E(this,t+1,t+2);return this},_.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)E(this,t,t+7),E(this,t+1,t+6),E(this,t+2,t+5),E(this,t+3,t+4);return this},_.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?b(this,0,e):g.apply(this,arguments)},_.prototype.equals=function(e){if(!_.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===_.compare(this,e)},_.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},_.prototype.compare=function(e,t,r,n,a){if(!_.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(i,o),c=this.slice(n,a),u=e.slice(t,r),l=0;l<s;++l)if(c[l]!==u[l]){i=c[l],o=u[l];break}return i<o?-1:o<i?1:0},_.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},_.prototype.indexOf=function(e,t,r){return C(this,e,t,r,!0)},_.prototype.lastIndexOf=function(e,t,r){return C(this,e,t,r,!1)},_.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return A(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":return I(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return y(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function w(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function v(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=H(e[i]);return a}function R(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function m(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,a,i){if(!_.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function D(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a<i;++a)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a<i;++a)e[r+a]=t>>>8*(n?a:3-a)&255}function x(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,i){return i||x(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||x(e,0,r,8),a.write(e,t,r,n,52,8),r+8}_.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),_.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=_.prototype;else{var a=t-e;r=new _(a,void 0);for(var i=0;i<a;++i)r[i]=this[i+e]}return r},_.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||m(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},_.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||m(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},_.prototype.readUInt8=function(e,t){return t||m(e,1,this.length),this[e]},_.prototype.readUInt16LE=function(e,t){return t||m(e,2,this.length),this[e]|this[e+1]<<8},_.prototype.readUInt16BE=function(e,t){return t||m(e,2,this.length),this[e]<<8|this[e+1]},_.prototype.readUInt32LE=function(e,t){return t||m(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},_.prototype.readUInt32BE=function(e,t){return t||m(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},_.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||m(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},_.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||m(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},_.prototype.readInt8=function(e,t){return t||m(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},_.prototype.readInt16LE=function(e,t){t||m(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},_.prototype.readInt16BE=function(e,t){t||m(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},_.prototype.readInt32LE=function(e,t){return t||m(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},_.prototype.readInt32BE=function(e,t){return t||m(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},_.prototype.readFloatLE=function(e,t){return t||m(e,4,this.length),a.read(this,e,!0,23,4)},_.prototype.readFloatBE=function(e,t){return t||m(e,4,this.length),a.read(this,e,!1,23,4)},_.prototype.readDoubleLE=function(e,t){return t||m(e,8,this.length),a.read(this,e,!0,52,8)},_.prototype.readDoubleBE=function(e,t){return t||m(e,8,this.length),a.read(this,e,!1,52,8)},_.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},_.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},_.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},_.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},_.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},_.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},_.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},_.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);N(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},_.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);N(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},_.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},_.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},_.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},_.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},_.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},_.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},_.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},_.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},_.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},_.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a,i=n-r;if(this===e&&r<t&&t<n)for(a=i-1;a>=0;--a)e[a+t]=this[a+r];else if(i<1e3||!_.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},_.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!_.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=_.isBuffer(e)?e:B(new _(e,n).toString()),s=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};var k=/[^+\/0-9A-Za-z-_]/g;function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(34))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),o=n[0],s=n[1],_=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),u=0,l=s>0?o-4:o;for(r=0;r<l;r+=4)t=a[e.charCodeAt(r)]<<18|a[e.charCodeAt(r+1)]<<12|a[e.charCodeAt(r+2)]<<6|a[e.charCodeAt(r+3)],_[u++]=t>>16&255,_[u++]=t>>8&255,_[u++]=255&t;2===s&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,_[u++]=255&t);1===s&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,_[u++]=t>>8&255,_[u++]=255&t);return _},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],o=0,s=r-a;o<s;o+=16383)i.push(u(e,o,o+16383>s?s:o+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,_=o.length;s<_;++s)n[s]=o[s],a[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var a,i,o=[],s=t;s<r;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,a){var i,o,s=8*a-n-1,_=(1<<s)-1,c=_>>1,u=-7,l=r?a-1:0,d=r?-1:1,f=e[t+l];for(l+=d,i=f&(1<<-u)-1,f>>=-u,u+=s;u>0;i=256*i+e[t+l],l+=d,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+l],l+=d,u-=8);if(0===i)i=1-c;else{if(i===_)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),i-=c}return(f?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var o,s,_,c=8*i-a-1,u=(1<<c)-1,l=u>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(_=Math.pow(2,-o))<1&&(o--,_*=2),(t+=o+l>=1?d/_:d*Math.pow(2,1-l))*_>=2&&(o++,_/=2),o+l>=u?(s=0,o=u):o+l>=1?(s=(t*_-1)*Math.pow(2,a),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;e[r+f]=255&s,f+=p,s/=256,a-=8);for(o=o<<a|s,c+=a;c>0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}}])}));
|
||
//# sourceMappingURL=crypto-pro.min.js.map
|