!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("cryptoPro",[],r):"object"==typeof exports?exports.cryptoPro=r():e.cryptoPro=r()}(window,(function(){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var _=r[n]={i:n,l:!1,exports:{}};return e[n].call(_.exports,_,_.exports,t),_.l=!0,_.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},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,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var _ in e)t.d(n,_,function(r){return e[r]}.bind(null,_));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=17)}([function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r._afterPluginsLoaded=void 0;var a=t(1),s=!1,o=!1;r._afterPluginsLoaded=function(e){var r=Boolean(window.Promise);return function(){for(var i=[],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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r._getCadesCert=void 0;var a=t(0),s=t(38),o=t(39);r._getCadesCert=a._afterPluginsLoaded((function(e){return n(void 0,void 0,void 0,(function(){var r,t;return _(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,4]),[4,s._getCadesUserCert(e)];case 1:return r=n.sent(),[3,4];case 2:return t=n.sent(),console.log(t),[4,o._getCadesContainerCert(e)];case 3:return r=n.sent(),[3,4];case 4:return[2,r]}}))}))}))},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._extractCommonName=void 0,r._extractCommonName=function(e){var r,t;return null===(t=null===(r=e.match(/CN="?(.+?)"?(?:,|$)/))||void 0===r?void 0:r[1])||void 0===t?void 0:t.replace(/"{2}/g,'"')}},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._getDateObj=void 0,r._getDateObj=function(e){return e.getVarDate?e.getVarDate():e}},function(e,r,t){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=t(44),_=t(45),a=t(46);function s(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,r){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function E(e,r){if(i.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 t=e.length;if(0===t)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Y(e).length;default:if(n)return G(e).length;r=(""+r).toLowerCase(),n=!0}}function f(e,r,t){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return b(this,r,t);case"utf8":case"utf-8":return y(this,r,t);case"ascii":return R(this,r,t);case"latin1":case"binary":return w(this,r,t);case"base64":return P(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function p(e,r,t,n,_){if(0===e.length)return-1;if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=_?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(_)return-1;t=e.length-1}else if(t<0){if(!_)return-1;t=0}if("string"==typeof r&&(r=i.from(r,n)),i.isBuffer(r))return 0===r.length?-1:A(e,r,t,n,_);if("number"==typeof r)return r&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?_?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):A(e,[r],t,n,_);throw new TypeError("val must be string, number or Buffer")}function A(e,r,t,n,_){var a,s=1,o=e.length,i=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||r.length<2)return-1;s=2,o/=2,i/=2,t/=2}function c(e,r){return 1===s?e[r]:e.readUInt16BE(r*s)}if(_){var u=-1;for(a=t;ao&&(t=o-i),a=t;a>=0;a--){for(var l=!0,d=0;d_&&(n=_):n=_;var a=r.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;s>8,_=t%256,a.push(_),a.push(n);return a}(r,e.length-t),e,t,n)}function P(e,r,t){return 0===r&&t===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(r,t))}function y(e,r,t){t=Math.min(e.length,t);for(var n=[],_=r;_239?4:c>223?3:c>191?2:1;if(_+l<=t)switch(l){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[_+1]))&&(i=(31&c)<<6|63&a)>127&&(u=i);break;case 3:a=e[_+1],s=e[_+2],128==(192&a)&&128==(192&s)&&(i=(15&c)<<12|(63&a)<<6|63&s)>2047&&(i<55296||i>57343)&&(u=i);break;case 4:a=e[_+1],s=e[_+2],o=e[_+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(i=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&i<1114112&&(u=i)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),_+=l}return function(e){var r=e.length;if(r<=4096)return String.fromCharCode.apply(String,e);var t="",n=0;for(;n0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,r,t,n,_){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===t&&(t=e?e.length:0),void 0===n&&(n=0),void 0===_&&(_=this.length),r<0||t>e.length||n<0||_>this.length)throw new RangeError("out of range index");if(n>=_&&r>=t)return 0;if(n>=_)return-1;if(r>=t)return 1;if(this===e)return 0;for(var a=(_>>>=0)-(n>>>=0),s=(t>>>=0)-(r>>>=0),o=Math.min(a,s),c=this.slice(n,_),u=e.slice(r,t),l=0;l_)&&(t=_),e.length>0&&(t<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return O(this,e,r,t);case"utf8":case"utf-8":return h(this,e,r,t);case"ascii":return T(this,e,r,t);case"latin1":case"binary":return I(this,e,r,t);case"base64":return M(this,e,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r,t);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function R(e,r,t){var n="";t=Math.min(e.length,t);for(var _=r;_n)&&(t=n);for(var _="",a=r;at)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,t,n,_,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>_||re.length)throw new RangeError("Index out of range")}function m(e,r,t,n){r<0&&(r=65535+r+1);for(var _=0,a=Math.min(e.length-t,2);_>>8*(n?_:1-_)}function L(e,r,t,n){r<0&&(r=4294967295+r+1);for(var _=0,a=Math.min(e.length-t,4);_>>8*(n?_:3-_)&255}function F(e,r,t,n,_,a){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function x(e,r,t,n,a){return a||F(e,0,t,4),_.write(e,r,t,n,23,4),t+4}function U(e,r,t,n,a){return a||F(e,0,t,8),_.write(e,r,t,n,52,8),t+8}i.prototype.slice=function(e,r){var t,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(_*=256);)n+=this[e+--r]*_;return n},i.prototype.readUInt8=function(e,r){return r||D(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,r){return r||D(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,r){return r||D(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,r){return r||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,r){return r||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,r,t){e|=0,r|=0,t||D(e,r,this.length);for(var n=this[e],_=1,a=0;++a=(_*=128)&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function(e,r,t){e|=0,r|=0,t||D(e,r,this.length);for(var n=r,_=1,a=this[e+--n];n>0&&(_*=256);)a+=this[e+--n]*_;return a>=(_*=128)&&(a-=Math.pow(2,8*r)),a},i.prototype.readInt8=function(e,r){return r||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,r){r||D(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(e,r){r||D(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(e,r){return r||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,r){return r||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,r){return r||D(e,4,this.length),_.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,r){return r||D(e,4,this.length),_.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,r){return r||D(e,8,this.length),_.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,r){return r||D(e,8,this.length),_.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,r,t,n){(e=+e,r|=0,t|=0,n)||N(this,e,r,t,Math.pow(2,8*t)-1,0);var _=1,a=0;for(this[r]=255&e;++a=0&&(a*=256);)this[r+_]=e/a&255;return r+t},i.prototype.writeUInt8=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},i.prototype.writeUInt16LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):m(this,e,r,!0),r+2},i.prototype.writeUInt16BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):m(this,e,r,!1),r+2},i.prototype.writeUInt32LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):L(this,e,r,!0),r+4},i.prototype.writeUInt32BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},i.prototype.writeIntLE=function(e,r,t,n){if(e=+e,r|=0,!n){var _=Math.pow(2,8*t-1);N(this,e,r,t,_-1,-_)}var a=0,s=1,o=0;for(this[r]=255&e;++a>0)-o&255;return r+t},i.prototype.writeIntBE=function(e,r,t,n){if(e=+e,r|=0,!n){var _=Math.pow(2,8*t-1);N(this,e,r,t,_-1,-_)}var a=t-1,s=1,o=0;for(this[r+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[r+a+1]&&(o=1),this[r+a]=(e/s>>0)-o&255;return r+t},i.prototype.writeInt8=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},i.prototype.writeInt16LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):m(this,e,r,!0),r+2},i.prototype.writeInt16BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):m(this,e,r,!1),r+2},i.prototype.writeInt32LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):L(this,e,r,!0),r+4},i.prototype.writeInt32BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},i.prototype.writeFloatLE=function(e,r,t){return x(this,e,r,!0,t)},i.prototype.writeFloatBE=function(e,r,t){return x(this,e,r,!1,t)},i.prototype.writeDoubleLE=function(e,r,t){return U(this,e,r,!0,t)},i.prototype.writeDoubleBE=function(e,r,t){return U(this,e,r,!1,t)},i.prototype.copy=function(e,r,t,n){if(t||(t=0),n||0===n||(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n=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-r=0;--_)e[_+r]=this[_+t];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(_=0;_>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(a=r;a55295&&t<57344){if(!_){if(t>56319){(r-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(r-=3)>-1&&a.push(239,191,189);continue}_=t;continue}if(t<56320){(r-=3)>-1&&a.push(239,191,189),_=t;continue}t=65536+(_-55296<<10|t-56320)}else _&&(r-=3)>-1&&a.push(239,191,189);if(_=null,t<128){if((r-=1)<0)break;a.push(t)}else if(t<2048){if((r-=2)<0)break;a.push(t>>6|192,63&t|128)}else if(t<65536){if((r-=3)<0)break;a.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return a}function Y(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 B(e,r,t,n){for(var _=0;_=r.length||_>=e.length);++_)r[_+t]=e[_];return _}}).call(this,t(43))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getCertificates=void 0;var a,s=t(0),o=t(10),i=t(12);r.getCertificates=s._afterPluginsLoaded((function(e){return void 0===e&&(e=!1),n(void 0,void 0,void 0,(function(){var r,t,n,s,c;return _(this,(function(_){switch(_.label){case 0:if(!e&&a)return[2,a];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,o.getUserCertificates(e)];case 2:return r=_.sent(),[3,4];case 3:return t=_.sent(),console.error(t),r=[],[3,4];case 4:return _.trys.push([4,6,,7]),[4,i.getContainerCertificates(e)];case 5:if(n=_.sent(),r)for(s=n.length-1,void 0;s;)r.find((function(e){return e.thumbprint===n[s].thumbprint}))||r.push(n[s]),s--;else r=n;return[3,7];case 6:return c=_.sent(),console.error(c),[3,7];case 7:if(!r)throw new Error("Нет доступных сертификатов");return[2,a=r]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUserCertificates=void 0;var certificate_1=__webpack_require__(4),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_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,r,t;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{(r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),t=_generateCadesFn_1.__cadesAsyncToken__+r.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCadesProp=void 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}),exports.getContainerCertificates=void 0;var certificate_1=__webpack_require__(4),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getContainerCertificates=_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,r,t;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.CADESCOM_CONTAINER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{(r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),t=_generateCadesFn_1.__cadesAsyncToken__+r.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getAllCertificates=void 0;var a,s=t(0),o=t(14),i=t(15);r.getAllCertificates=s._afterPluginsLoaded((function(e){return void 0===e&&(e=!1),n(void 0,void 0,void 0,(function(){var r,t,n,s,c;return _(this,(function(_){switch(_.label){case 0:if(!e&&a)return[2,a];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,o.getAllUserCertificates(e)];case 2:return r=_.sent(),[3,4];case 3:return t=_.sent(),console.error(t),r=[],[3,4];case 4:return _.trys.push([4,6,,7]),[4,i.getAllContainerCertificates(e)];case 5:if(n=_.sent(),r)for(s=n.length-1,void 0;s;)r.find((function(e){return e.thumbprint===n[s].thumbprint}))||r.push(n[s]),s--;else r=n;return[3,7];case 6:return c=_.sent(),console.error(c),[3,7];case 7:if(!r)throw new Error("Нет доступных сертификатов");return[2,a=r]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserCertificates=void 0;var certificate_1=__webpack_require__(4),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getAllUserCertificates=_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,r,t;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{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllContainerCertificates=void 0;var certificate_1=__webpack_require__(4),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getAllContainerCertificates=_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,r,t;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.CADESCOM_CONTAINER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSystemInfo=void 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,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t),Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),_=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||r.hasOwnProperty(t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),_(t(18),r)},function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t),Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),_=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||r.hasOwnProperty(t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),_(t(19),r),_(t(10),r),_(t(14),r),_(t(12),r),_(t(15),r),_(t(9),r),_(t(13),r),_(t(16),r),_(t(34),r),_(t(37),r),_(t(40),r),_(t(41),r),_(t(42),r),_(t(47),r),_(t(48),r),_(t(4),r),_(t(49),r),_(t(50),r)},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getCertificate=void 0;var a=t(0),s=t(9),o=t(13);r.getCertificate=a._afterPluginsLoaded((function(e,r){return void 0===r&&(r=!0),n(void 0,void 0,void 0,(function(){var t,n;return _(this,(function(_){switch(_.label){case 0:if(!e)throw new Error("Отпечаток не указан");return r?[4,s.getCertificates()]:[3,2];case 1:return t=_.sent(),[3,4];case 2:return[4,o.getAllCertificates()];case 3:t=_.sent(),_.label=4;case 4:if(!(n=t.find((function(r){return r.thumbprint===e}))))throw new Error('Сертификат с отпечатком: "'+e+'" не найден');return[2,n]}}))}))}))},function(module,exports){!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isSafari=0,isYandex=0,canPromise=!!window.Promise,cadesplugin_loaded_event_recieved=!1,isFireFoxExtensionLoaded=!1,cadesplugin;cadesplugin=canPromise?new Promise((function(e,r){plugin_resolve=e,plugin_reject=r})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,r){var t=ru_cryptopro_npcades_10_native_bridge.callbacks[e];t&&t.apply(null,r)},call:function(e,r,t){var n=t&&"function"==typeof t,_=n?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;n&&(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(r,s)))}catch(e){alert(e)}document.documentElement.appendChild(a),a.parentNode.removeChild(a),a=null}};cadesplugin.JSModuleVersion="2.3.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,r=navigator.userAgent,t=r.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(t[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(r)||[])[1]||""}:"Chrome"===t[1]&&null!=(e=r.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=r.match(/version\/(\d+)/i))&&t.splice(1,1,e[1]),{name:t[0],version:t[1]})}function cpcsp_console_log(e,r){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",r),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",r),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",r))):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_MEMORY_STORE=0,cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CAPICOM_SMART_CARD_USER_STORE=4,cadesplugin.CADESCOM_MEMORY_STORE=0,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_SMART_CARD_USER_STORE=4,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.CADESCOM_XADES_DEFAULT=16,cadesplugin.CADESCOM_XADES_BES=32,cadesplugin.CADESCOM_XADES_T=80,cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1=1488,cadesplugin.CADESCOM_XMLDSIG_TYPE=0,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.XmlDsigGost3411Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256",cadesplugin.XmlDsigGost3410Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256",cadesplugin.XmlDsigGost3411Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512",cadesplugin.XmlDsigGost3410Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512",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_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO=256,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,cadesplugin.CADESCOM_InstallCertChainToContainer=536870912,cadesplugin.CADESCOM_UseContainerStore=1073741824,cadesplugin.ENABLE_CARRIER_TYPE_CSP=1,cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM=2,cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM=4,cadesplugin.ENABLE_ANY_CARRIER_TYPE=7,cadesplugin.DISABLE_EVERY_CARRIER_OPERATION=0,cadesplugin.ENABLE_CARRIER_OPEN_ENUM=1,cadesplugin.ENABLE_CARRIER_CREATE=2,cadesplugin.ENABLE_ANY_OPERATION=3,cadesplugin.CADESCOM_PRODUCT_CSP=0,cadesplugin.CADESCOM_PRODUCT_OCSP=1,cadesplugin.CADESCOM_PRODUCT_TSP=2,cadesplugin.MEDIA_TYPE_REGISTRY=1,cadesplugin.MEDIA_TYPE_HDIMAGE=2,cadesplugin.MEDIA_TYPE_CLOUD=4,cadesplugin.MEDIA_TYPE_SCARD=8,cadesplugin.XCN_CRYPT_STRING_BASE64HEADER=0,cadesplugin.AT_KEYEXCHANGE=1,cadesplugin.AT_SIGNATURE=2,cadesplugin.CARRIER_FLAG_REMOVABLE=1,cadesplugin.CARRIER_FLAG_UNIQUE=2,cadesplugin.CARRIER_FLAG_PROTECTED=4,cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER=8,cadesplugin.CARRIER_FLAG_SECURE_MESSAGING=16,cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE=64,cadesplugin.CARRIER_FLAG_VIRTUAL=128}function async_spawn(e){function r(e,r){var a;try{a=t[e](r)}catch(e){return Promise.reject(e)}return a.done?a.value:Promise.resolve(a.value).then(n,_)}var t=e(Array.prototype.slice.call(arguments,1)),n=r.bind(r,"next"),_=r.bind(r,"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()&&("Edg"===browserSpecs.name||("YaBrowser"===browserSpecs.name?(isYandex=!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(r){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(r){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 r=e.message;return r?e.number&&(r+=" (0x"+decimalToHexString(e.number)+")"):r=e,r}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(r){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 firefox_or_safari_nmcades_onload(){window.cadesplugin_extension_loaded_callback&&window.cadesplugin_extension_loaded_callback(),isFireFoxExtensionLoaded=!0,cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}function nmcades_api_onload(){isIE()||isFireFox||isSafari||window.cadesplugin_extension_loaded_callback&&window.cadesplugin_extension_loaded_callback(),window.postMessage("cadesplugin_echo_request","*"),window.addEventListener("message",(function(e){if("string"==typeof e.data&&e.data.match("cadesplugin_loaded")&&!cadesplugin_loaded_event_recieved){if(isFireFox||isSafari){var r=e.data.substring(e.data.indexOf("url:")+4);if(!r.match("^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$")&&!r.match("^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$"))return cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,'Bad url "'+r+'" for load CryptoPro Extension for CAdES Browser plug-in'),void plugin_loaded_error();var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",r),t.onerror=plugin_loaded_error,t.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(t)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error);cadesplugin_loaded_event_recieved=!0}}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((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)):((e=document.createElement("script")).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))}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 r=document.createElement("object");r.setAttribute("id","certEnrollClassFactory"),r.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),r.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(r);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){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&&(isFireFoxExtensionLoaded||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(r){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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getDecodedExtendedKeyUsage=void 0;var s=t(3),o=t(0);r.getDecodedExtendedKeyUsage=o._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,r){var t;return n(n({},e),((t={})[r]=s.OIDS_DICTIONARY[r]||null,t))}),{})]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getExtendedKeyUsage=void 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,r=[];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,r.push(t),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return r})))}))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getInfo=void 0;var a=t(0),s=t(1),o=t(31),i=t(11);r.getInfo=a._afterPluginsLoaded((function(e,r){return n(this,void 0,void 0,(function(){var t,n;return _(this,(function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),[4,i.getCadesProp.call(this,r)];case 1:return t=_.sent(),[3,3];case 2:throw n=_.sent(),console.error(n),new Error(s._extractMeaningfulErrorMessage(n)||"Ошибка при извлечении информации из сертификата");case 3:return[2,o._parseCertInfo(e,t)]}}))}))}))},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._parseCertInfo=void 0;var n=t(3);r._parseCertInfo=function(e,r){var t=r.match(/([а-яА-Яa-zA-Z0-9\s.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);if(t)return t.map((function(r){var t,_,a,s=r.trim().match(/^([а-яА-Яa-zA-Z0-9\s.]+)=(.+?),?$/),o=null==s?void 0:s[1],i=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==o?void 0:o.match(/^OID\.(.*)/),u=null==c?void 0:c[1],l=!1;if(u){var d=n.OIDS_DICTIONARY[u];d&&(o=d,l=!0)}var C=null===(a=e.find((function(e){return e.possibleNames.find((function(e){return e===o}))})))||void 0===a?void 0:a.translation;return C&&(o=C,l=!0),{description:i,title:o,isTranslated:l}}))}},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.hasExtendedKeyUsage=void 0;var a=t(0);r.hasExtendedKeyUsage=a._afterPluginsLoaded((function(e){return n(this,void 0,void 0,(function(){var r;return _(this,(function(t){switch(t.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return r=t.sent(),[2,Array.isArray(e)?e.every((function(e){return r.some((function(r){return r===e}))})):r.some((function(r){return r===e}))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isValid=void 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,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.isValidSystemSetup=void 0;var a=t(0),s=t(1),o=t(35),i=t(36),c=t(16);r.isValidSystemSetup=a._afterPluginsLoaded((function(){return n(void 0,void 0,void 0,(function(){var e,r;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 r=t.sent(),console.error(r),new Error(s._extractMeaningfulErrorMessage(r)||"Настройки ЭП на данной машине не верны");case 3:if(!o._isSupportedCadesVersion(e.cadesVersion))throw new Error("Не поддерживаемая версия плагина");if(!i._isSupportedCSPVersion(e.cspVersion))throw new Error("Не поддерживаемая версия CSP");return[2,!0]}}))}))}))},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._isSupportedCadesVersion=void 0,r._isSupportedCadesVersion=function(e){var r=e.match(/(\d+)\.(\d+)\.(\d+)/);if(!r)return!1;var t=r[1],n=(r[2],r[3]);return!(Number(t)<2)&&!(2===Number(t)&&Number(n)<12438)}},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._isSupportedCSPVersion=void 0;r._isSupportedCSPVersion=function(e){var r;return e=null===(r=e.match(/\d+?\b(?:\.\d+)?/))||void 0===r?void 0:r[0],Number(e)>=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createXMLSignature=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(5);exports.createXMLSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,unencryptedMessage){return __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,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.SignedXML")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Certificate(cadesCertificate),_generateCadesFn_1.__cadesAsyncToken__,e.propset_CheckCertificate(!0),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Content(unencryptedMessage),_generateCadesFn_1.__cadesAsyncToken__,r.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED),_generateCadesFn_1.__cadesAsyncToken__,r.propset_SignatureMethod("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256"),_generateCadesFn_1.__cadesAsyncToken__,r.propset_DigestMethod("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{t=_generateCadesFn_1.__cadesAsyncToken__+r.Sign(e)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return t})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getCadesUserCert=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports._getCadesUserCert=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint){var cadesplugin=window.cadesplugin;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t,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{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов из хранилища пользователя")}if(!t)throw new Error("Нет доступных сертификатов в хранилище пользователя");try{if(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+r.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден в хранилище пользователя');n=_generateCadesFn_1.__cadesAsyncToken__+r.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата из хранилища пользователя")}return e.Close(),n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getCadesContainerCert=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports._getCadesContainerCert=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint){var cadesplugin=window.cadesplugin;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t,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.CADESCOM_CONTAINER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища закрытого ключа")}try{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов из хранилища закрытого ключа")}if(!t)throw new Error("Нет доступных сертификатов в хранилище закрытого ключа");try{if(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+r.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден в хранилище закрытого ключа');n=_generateCadesFn_1.__cadesAsyncToken__+r.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата из хранилища закрытого ключа")}return e.Close(),n})))}))},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDetachedSignature=void 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__(5),_getDateObj_1=__webpack_require__(7);exports.createDetachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,messageHash){return __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,r,t,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.HashedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),n=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var _,a,s=_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(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,n.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+n.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,n.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке сертификата")}try{_generateCadesFn_1.__cadesAsyncToken__,r.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256),_generateCadesFn_1.__cadesAsyncToken__,r.SetHashValue(messageHash)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке хеша")}try{a=_generateCadesFn_1.__cadesAsyncToken__+t.SignHash(r,n,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDetachedSignature=void 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__(5),_getDateObj_1=__webpack_require__(7);exports.addDetachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,signedMessage,messageHash){return __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,r,t,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.HashedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),n=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var _,a,s=_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(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,n.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+n.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,n.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке сертификата")}try{_generateCadesFn_1.__cadesAsyncToken__,r.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256),_generateCadesFn_1.__cadesAsyncToken__,r.SetHashValue(messageHash)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке хеша")}try{_generateCadesFn_1.__cadesAsyncToken__,t.VerifyHash(r,signedMessage,cadesplugin.CADESCOM_PKCS7_TYPE),a=_generateCadesFn_1.__cadesAsyncToken__+t.CoSignHash(r,n,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createAttachedSignature=void 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__(5),_getDateObj_1=__webpack_require__(7);exports.createAttachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,unencryptedMessage){return __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,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_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 n,_,a,s=_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(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{n=Buffer.from(unencryptedMessage).toString("base64")}catch(e){throw console.error(e),new Error("Ошибка при преобразовании сообщения в Base64")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+t.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,r.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Content(n),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{a=_generateCadesFn_1.__cadesAsyncToken__+r.SignCades(t,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))}).call(this,__webpack_require__(8).Buffer)},function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,r,t){"use strict";r.byteLength=function(e){var r=c(e),t=r[0],n=r[1];return 3*(t+n)/4-n},r.toByteArray=function(e){var r,t,n=c(e),s=n[0],o=n[1],i=new a(function(e,r,t){return 3*(r+t)/4-t}(0,s,o)),u=0,l=o>0?s-4:s;for(t=0;t>16&255,i[u++]=r>>8&255,i[u++]=255&r;2===o&&(r=_[e.charCodeAt(t)]<<2|_[e.charCodeAt(t+1)]>>4,i[u++]=255&r);1===o&&(r=_[e.charCodeAt(t)]<<10|_[e.charCodeAt(t+1)]<<4|_[e.charCodeAt(t+2)]>>2,i[u++]=r>>8&255,i[u++]=255&r);return i},r.fromByteArray=function(e){for(var r,t=e.length,_=t%3,a=[],s=0,o=t-_;so?o:s+16383));1===_?(r=e[t-1],a.push(n[r>>2]+n[r<<4&63]+"==")):2===_&&(r=(e[t-2]<<8)+e[t-1],a.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return a.join("")};for(var n=[],_=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=r),[t,t===r?0:4-t%4]}function u(e,r,t){for(var _,a,s=[],o=r;o>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},function(e,r){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ r.read=function(e,r,t,n,_){var a,s,o=8*_-n-1,i=(1<>1,u=-7,l=t?_-1:0,d=t?-1:1,C=e[r+l];for(l+=d,a=C&(1<<-u)-1,C>>=-u,u+=o;u>0;a=256*a+e[r+l],l+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=256*s+e[r+l],l+=d,u-=8);if(0===a)a=1-c;else{if(a===i)return s?NaN:1/0*(C?-1:1);s+=Math.pow(2,n),a-=c}return(C?-1:1)*s*Math.pow(2,a-n)},r.write=function(e,r,t,n,_,a){var s,o,i,c=8*a-_-1,u=(1<>1,d=23===_?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:a-1,E=n?1:-1,f=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(o=isNaN(r)?1:0,s=u):(s=Math.floor(Math.log(r)/Math.LN2),r*(i=Math.pow(2,-s))<1&&(s--,i*=2),(r+=s+l>=1?d/i:d*Math.pow(2,1-l))*i>=2&&(s++,i/=2),s+l>=u?(o=0,s=u):s+l>=1?(o=(r*i-1)*Math.pow(2,_),s+=l):(o=r*Math.pow(2,l-1)*Math.pow(2,_),s=0));_>=8;e[t+C]=255&o,C+=E,o/=256,_-=8);for(s=s<<_|o,c+=_;c>0;e[t+C]=255&s,C+=E,s/=256,c-=8);e[t+C-E]|=128*f}},function(e,r){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addAttachedSignature=void 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__(5),_getDateObj_1=__webpack_require__(7);exports.addAttachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,signedMessage){return __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,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_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 n,_,a,s=_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(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{n=Buffer.from(signedMessage).toString("base64")}catch(e){throw console.error(e),new Error("Ошибка при преобразовании сообщения в Base64")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+t.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,r.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Content(n),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,r.VerifyCades(signedMessage,cadesplugin.CADESCOM_PKCS7_TYPE),a=_generateCadesFn_1.__cadesAsyncToken__+r.CoSignCades(t,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))}).call(this,__webpack_require__(8).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=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++,n=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=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createHash=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.createHash=_afterPluginsLoaded_1._afterPluginsLoaded((function(unencryptedMessage){return __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,r,t=_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__,t.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256),_generateCadesFn_1.__cadesAsyncToken__,t.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,t.Hash(e)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации хэширования")}try{r=_generateCadesFn_1.__cadesAsyncToken__+t.Value}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при создании хэша")}return r})))]}))}))}))}).call(this,__webpack_require__(8).Buffer)},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCspVersion=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getCspVersion=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cspVersion=null;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),cspVersion=_generateCadesFn_1.__cadesAsyncToken__+e.CSPVersion(),cspVersion=_generateCadesFn_1.__cadesAsyncToken__+cspVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении версии системы")}return cspVersion})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPluginVersion=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_generateCadesFn_1=__webpack_require__(2),_extractMeaningfulErrorMessage_1=__webpack_require__(1);exports.getPluginVersion=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesVersion=null;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),(cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.PluginVersion)||(cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.Version),cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+cadesVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении информации о плагине")}return cadesVersion})))}))}])})); //# sourceMappingURL=crypto-pro-js.min.js.map