crypto-pro-js/dist/crypto-pro.min.js

2 lines
64 KiB
JavaScript
Raw Normal View History

2020-07-04 09:37:44 +03:00
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("cryptoPro",[],n):"object"==typeof exports?exports.cryptoPro=n():e.cryptoPro=n()}(window,(function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var _=n[r]={i:r,l:!1,exports:{}};return e[r].call(_.exports,_,_.exports,t),_.l=!0,_.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var _ in e)t.d(r,_,function(n){return e[n]}.bind(null,_));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=8)}([function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(1),s=!1,i=!1;n._afterPluginsLoaded=function(e){var n=Boolean(window.Promise);return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return r(this,void 0,void 0,(function(){var r,c;return _(this,(function(_){switch(_.label){case 0:if(!i){try{t(11)}catch(e){throw console.error(e),new Error(a._extractMeaningfulErrorMessage(e)||"Ошибка при подключении модуля для работы с Cades plugin")}i=!0}if(r=window.cadesplugin,!n)throw new Error("Необходим полифилл для Promise");if(!r)throw new Error("Не подключен модуль для работы с Cades plugin");s||(r.set_log_level(r.LOG_LEVEL_ERROR),s=!0),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,r];case 2:return _.sent(),[3,4];case 3:throw c=_.sent(),console.error(c),new Error(a._extractMeaningfulErrorMessage(c)||"Ошибка при инициализации модуля для работы с Cades plugin");case 4:return[4,e.apply(this,o)];case 5:return[2,_.sent()]}}))}))}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._extractMeaningfulErrorMessage=function(e){var n,t=(null===(n=window.cadesplugin)||void 0===n?void 0:n.getLastError)&&window.cadesplugin.getLastError(e);if(!(null==t?void 0:t.message)){if(!e.message)return null;t=e}if(!/[а-яА-Я]/.test(t.message))return null;var r=t.message.match(/^(.*?)(?:(?:\.?\s?\(?0x)|(?:\.?$))/);return r?r[1]:null}},
//# sourceMappingURL=crypto-pro.min.js.map