!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("cryptoPro",[],n):"object"==typeof exports?exports.cryptoPro=n():e.cryptoPro=n()}(window,(function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var _=n[r]={i:r,l:!1,exports:{}};return e[r].call(_.exports,_,_.exports,t),_.l=!0,_.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var _ in e)t.d(r,_,function(n){return e[n]}.bind(null,_));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=8)}([function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(1),s=!1,i=!1;n._afterPluginsLoaded=function(e){var n=Boolean(window.Promise);return function(){for(var o=[],c=0;c0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),s=t(4);n.getCertificate=a._afterPluginsLoaded((function(e){return r(void 0,void 0,void 0,(function(){var n,t;return _(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("Отпечаток не указан");return[4,s.getUserCertificates()];case 1:if(n=r.sent(),!(t=n.find((function(n){return n.thumbprint===e}))))throw new Error('Сертификат с отпечатком: "'+e+'" не найден');return[2,t]}}))}))}))},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,n){plugin_resolve=e,plugin_reject=n})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,n){var t=ru_cryptopro_npcades_10_native_bridge.callbacks[e];t&&t.apply(null,n)},call:function(e,n,t){var r=t&&"function"==typeof t,_=r?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;r&&(ru_cryptopro_npcades_10_native_bridge.callbacks[_]=t);var a=document.createElement("IFRAME"),s=new Array("_CPNP_handle");try{a.setAttribute("src","cpnp-js-call:"+e+":"+_+":"+encodeURIComponent(JSON.stringify(n,s)))}catch(e){alert(e)}document.documentElement.appendChild(a),a.parentNode.removeChild(a),a=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,n=navigator.userAgent,t=n.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(t[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(n)||[])[1]||""}:"Chrome"===t[1]&&null!=(e=n.match(/\b(OPR|Edge)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=n.match(/version\/(\d+)/i))&&t.splice(1,1,e[1]),{name:t[0],version:t[1]})}function cpcsp_console_log(e,n){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",n),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",n),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",n))):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 n(e,n){var a;try{a=t[e](n)}catch(e){return Promise.reject(e)}return a.done?a.value:Promise.resolve(a.value).then(r,_)}var t=e(Array.prototype.slice.call(arguments,1)),r=n.bind(n,"next"),_=n.bind(n,"throw");return r()}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(n){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(n){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 n=e.message;return n?e.number&&(n+=" (0x"+decimalToHexString(e.number)+")"):n=e,n}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(n){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="

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.

Скачать расширение

",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="

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо установить расширение из каталога дополнений Opera.

",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 n=e.data.substring(e.data.indexOf("url:")+4),t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",n),t.onerror=plugin_loaded_error,t.onload=firefox_or_edge_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(t),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 n=document.createElement("object");n.setAttribute("id","certEnrollClassFactory"),n.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),n.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(n);var t=document.createElement("object");t.setAttribute("id","webClassFactory"),t.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),t.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(t)}}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(n){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]>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var s=t(3),i=t(0);n.getDecodedExtendedKeyUsage=i._afterPluginsLoaded((function(){return _(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return[2,e.sent().reduce((function(e,n){var t;return r(r({},e),((t={})[n]=s.OIDS_DICTIONARY[n]||null,t))}),{})]}}))}))}))},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,n=[];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 t=void 0;t=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),t=_generateCadesFn_1.__cadesAsyncToken__+t.EKUs,t=_generateCadesFn_1.__cadesAsyncToken__+t.Item(e),t=_generateCadesFn_1.__cadesAsyncToken__+t.OID,n.push(t),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return n})))}))},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),s=t(1),i=t(22),o=t(6);n.getInfo=a._afterPluginsLoaded((function(e,n){return r(this,void 0,void 0,(function(){var t,r;return _(this,(function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),[4,o.getCadesProp.call(this,n)];case 1:return t=_.sent(),[3,3];case 2:throw r=_.sent(),console.error(r),new Error(s._extractMeaningfulErrorMessage(r)||"Ошибка при извлечении информации из сертификата");case 3:return[2,i._parseCertInfo(e,t)]}}))}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(3);n._parseCertInfo=function(e,n){var t=n.match(/([а-яА-Яa-zA-Z0-9.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);if(t)return t.map((function(n){var t,_,a,s=n.match(/^([а-яА-Яa-zA-Z0-9.]+)=(.+?),?$/),i=null==s?void 0:s[1],o=null===(_=null===(t=null==s?void 0:s[2])||void 0===t?void 0:t.replace(/^"(.*)"/,"$1"))||void 0===_?void 0:_.replace(/"{2}/g,'"'),c=null==i?void 0:i.match(/^OID\.(.*)/),l=null==c?void 0:c[1],u=!1;if(l){var d=r.OIDS_DICTIONARY[l];d&&(i=d,u=!0)}var C=null===(a=e.find((function(e){return e.possibleNames.find((function(e){return e===i}))})))||void 0===a?void 0:a.translation;return C&&(i=C,u=!0),{description:o,title:i,isTranslated:u}}))}},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0);n.hasExtendedKeyUsage=a._afterPluginsLoaded((function(e){return r(this,void 0,void 0,(function(){var n;return _(this,(function(t){switch(t.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return n=t.sent(),[2,Array.isArray(e)?e.every((function(e){return n.some((function(n){return n===e}))})):n.some((function(n){return n===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,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._extractCommonName=function(e){var n;return null===(n=e.match(/CN=(.+?)(?:,|$)/))||void 0===n?void 0:n[1]}},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),s=t(1),i=t(27),o=t(28),c=t(7);n.isValidSystemSetup=a._afterPluginsLoaded((function(){return r(void 0,void 0,void 0,(function(){var e,n;return _(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,c.getSystemInfo()];case 1:return e=t.sent(),[3,3];case 2:throw n=t.sent(),console.error(n),new Error(s._extractMeaningfulErrorMessage(n)||"Настройки ЭП на данной машине не верны");case 3:if(!i._isSupportedCadesVersion(e.cadesVersion))throw new Error("Не поддерживаемая версия плагина");if(!o._isSupportedCSPVersion(e.cspVersion))throw new Error("Не поддерживаемая версия CSP");return[2,!0]}}))}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._isSupportedCadesVersion=function(e){var n=e.match(/(\d+)\.(\d+)\.(\d+)/);if(!n)return!1;var t=n[1],r=(n[2],n[3]);return!(Number(t)<2)&&!(2===Number(t)&&Number(r)<12438)}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n._isSupportedCSPVersion=function(e){var n;return e=null===(n=e.match(/\d+?\b(?:\.\d+)?/))||void 0===n?void 0:n[0],Number(e)>=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},__generator=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};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,dataBase64,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,n,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),n=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var r,_,a=_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(a)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Certificate(cadesCertificate),r=_generateCadesFn_1.__cadesAsyncToken__+t.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,r.Add(e),_generateCadesFn_1.__cadesAsyncToken__,n.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,n.propset_Content(dataBase64),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{_=_generateCadesFn_1.__cadesAsyncToken__+n.SignCades(t,cadesplugin.CADESCOM_CADES_BES,detachedSignature)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return _})))]}}))}))}))},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,n,t,r;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{n=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+n.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");try{if(n=_generateCadesFn_1.__cadesAsyncToken__+n.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+n.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден');r=_generateCadesFn_1.__cadesAsyncToken__+n.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата")}return e.Close(),r})))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._getDateObj=function(e){return e.getVarDate?e.getVarDate():e}}])})); //# sourceMappingURL=crypto-pro.min.js.map