diff --git a/dist/crypto-pro.js b/dist/crypto-pro.js index f45fd9d..d756eb5 100644 --- a/dist/crypto-pro.js +++ b/dist/crypto-pro.js @@ -1637,11 +1637,11 @@ var CryptoPro = // Открываем хранилище try { - 'yield' + oStore.Open( + void('yield' + oStore.Open( cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED - ); + )); } catch (err) { reject('Ошибка при открытии хранилища: ' + err.message); return; @@ -1726,11 +1726,11 @@ var CryptoPro = // Открываем хранилище try { - 'yield' + oStore.Open( + void('yield' + oStore.Open( cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED - ); + )); } catch (err) { reject('Ошибка при открытии хранилища: ' + err.message); return; @@ -1845,8 +1845,8 @@ var CryptoPro = clientTime = cryptoCommon.getDateObj(clientTime); try { - 'yield' + oAttrs.propset_Name(cryptoConstants.Time.AUTHENTICATED_ATTRIBUTE_SIGNING_TIME); - 'yield' + oAttrs.propset_Value(clientTime); + void('yield' + oAttrs.propset_Name(cryptoConstants.Time.AUTHENTICATED_ATTRIBUTE_SIGNING_TIME)); + void('yield' + oAttrs.propset_Value(clientTime)); } catch (err) { reject('Ошибка при установке данных подписи: ' + err.message); return; @@ -1854,12 +1854,12 @@ var CryptoPro = // Задаем настройки для подписи try { - 'yield' + oSigner.propset_Certificate(cert); + void('yield' + oSigner.propset_Certificate(cert)); attrs = 'yield' + oSigner.AuthenticatedAttributes2; - 'yield' + attrs.Add(oAttrs); - 'yield' + oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY); - 'yield' + oSignedData.propset_Content(dataBase64); - 'yield' + oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY); + void('yield' + attrs.Add(oAttrs)); + void('yield' + oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY)); + void('yield' + oSignedData.propset_Content(dataBase64)); + void('yield' + oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)); } catch (err) { reject('Не удалось установить настройки для подписи: ' + err.message); return; @@ -1900,15 +1900,15 @@ var CryptoPro = // Задаем настройки для подписи try { - 'yield' + oSigner.propset_Certificate(cert); + void('yield' + oSigner.propset_Certificate(cert)); // Добавляем данные для подписи - 'yield' + signerXML.propset_Content(dataXML); + void('yield' + signerXML.propset_Content(dataXML)); // Устанавливаем тип подписи - 'yield' + signerXML.propset_SignatureType(cnts.SignatureType.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED); + void('yield' + signerXML.propset_SignatureType(cnts.SignatureType.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)); // Устанавливаем алгоритм подписи - 'yield' + signerXML.propset_SignatureMethod(cnts.GostXmlDSigUrls.XmlDsigGost3410Url); + void('yield' + signerXML.propset_SignatureMethod(cnts.GostXmlDSigUrls.XmlDsigGost3410Url)); // Устанавливаем алгоритм хэширования - 'yield' + signerXML.propset_DigestMethod(cnts.GostXmlDSigUrls.XmlDsigGost3411Url); + void('yield' + signerXML.propset_DigestMethod(cnts.GostXmlDSigUrls.XmlDsigGost3411Url)); } catch (err) { reject('Не удалось установить настройки для подписи: ' + err.message); return; diff --git a/dist/crypto-pro.js.map b/dist/crypto-pro.js.map index 686b4ac..03fdbdc 100644 --- a/dist/crypto-pro.js.map +++ b/dist/crypto-pro.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 0693c3e4e84f7492cb5c","webpack:///./index.js","webpack:///../~/bowser/bowser.js","webpack:///../~/webpack/buildin/amd-define.js","webpack:///../vendor/cadesplugin_api.js","webpack:///./api.js","webpack:///./common.js","webpack:///./oids.js","webpack:///./constants.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;AACL;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA,G;;;;;;ACvFA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA,oBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,MAAM;AACpB,eAAc,SAAS;AACvB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,gBAAgB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAqD;AACrD,mDAAkD;AAClD,mDAAkD;AAClD;AACA,eAAc,cAAc;AAC5B,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA,eAAc,OAAO;AACrB,eAAc,QAAQ;AACtB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB;AACtB;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,QAAQ;AACtB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;ACnkBD,8BAA6B,mDAAmD;;;;;;;ACAhF,EAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA,oCAAmC;AACnC;AACA;AACA;AACA,iBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0DAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,U;AACA;AACA;AACA,6CAA4C,iBAAiB,WAAW,UAAU,YAAY,aAAa;AAC3G,sFAAqF,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AAChN,yFAAwF,iBAAiB,yBAAyB,WAAW;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;;AAErC;AACA;AACA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAgD,iBAAiB,WAAW,UAAU,YAAY,aAAa;AAC/G,0FAAyF,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AACpN,6FAA4F,iBAAiB,yBAAyB,WAAW;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB,qCAAoC;AACpC,kBAAiB;AACjB;AACA;AACA;AACA;AACA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA,kBAAiB;AACjB,cAAa;AACb,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAC;;;;;;;ACxrBD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA2B;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB;AACjB;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,QAAQ;AACnB,cAAa,QAAQ,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;;AAErB;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,QAAQ;AACnB,cAAa,QAAQ,wDAAwD;AAC7E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,QAAQ,wDAAwD;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACxiBA;AACA;;AAEA;AACA,UAAS,4EAA4E;AACrF,UAAS,+CAA+C;AACxD,UAAS,8CAA8C;AACvD,UAAS,kDAAkD;AAC3D,UAAS,4CAA4C;AACrD,UAAS,4CAA4C;AACrD,UAAS,gDAAgD;AACzD,UAAS,8CAA8C;AACvD,UAAS,0DAA0D;AACnE,UAAS,+CAA+C;AACxD,UAAS,qDAAqD;AAC9D,UAAS,2DAA2D;AACpE,UAAS,wDAAwD;AACjE,UAAS,kDAAkD;AAC3D,UAAS,2CAA2C;AACpD,UAAS;AACT;;AAEA;AACA,UAAS,4EAA4E;AACrF,UAAS,2DAA2D;AACpE,UAAS,4CAA4C;AACrD,UAAS,4CAA4C;AACrD,UAAS,gDAAgD;AACzD,UAAS,8CAA8C;AACvD,UAAS,0CAA0C;AACnD,UAAS,+CAA+C;AACxD,UAAS,qDAAqD;AAC9D,UAAS,2DAA2D;AACpE,UAAS,wDAAwD;AACjE,UAAS,kDAAkD;AAC3D,UAAS,2CAA2C;AACpD,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,2BAA0B,WAAW;;AAErC;AACA,6EAA4E;AAC5E;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8CAA6C;AAC7C,2BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC,EAAE;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAiB;AACjB,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB;AACjB;AACA;;AAEA;AACA,cAAa;AACb,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,aAAa;AACxB,cAAa,QAAQ,gCAAgC;AACrD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,kBAAiB;AACjB,cAAa;AACb;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;;AAEA;AACA,MAAK,IAAI;;AAET;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACpTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,G","file":"crypto-pro.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 0693c3e4e84f7492cb5c\n **/","var bowser = require('bowser/bowser'),\n browserInfo = bowser._detect(navigator.userAgent),\n global = Function('return this')(),\n canPromise = Boolean(global.Promise),\n CryptoProConfig = global.CryptoProConfig,\n canAsync,\n cadesplugin,\n cryptoService,\n _errorMsg = '',\n _isLoaded = false,\n _onLoadCbQueue = [];\n\nglobal.allow_firefox_cadesplugin_async = browserInfo.firefox && browserInfo.version >= 52;\n\nrequire('../vendor/cadesplugin_api');\n\ncadesplugin = global.cadesplugin;\n\ncanAsync = Boolean(cadesplugin.CreateObjectAsync);\n\ncryptoService = require('./api');\n\nfunction execOnloadQueue() {\n _onLoadCbQueue.forEach(function (callback) {\n callback();\n });\n}\n\nfunction passToWaitOnLoad(callback) {\n if (Object.prototype.toString.call(callback) === '[object Function]') {\n _onLoadCbQueue.push(callback);\n }\n}\n\nfunction callOnLoad(method) {\n _isLoaded ? method() : passToWaitOnLoad(method);\n}\n\nfunction finishLoading() {\n _isLoaded = true;\n\n execOnloadQueue();\n}\n\nfunction call() {\n var args = Array.prototype.slice.call(arguments),\n methodName = args.shift();\n\n return new Promise(function (resolve, reject) {\n callOnLoad(function () {\n var method;\n\n if (_errorMsg) {\n reject(_errorMsg);\n return;\n }\n\n method = cryptoService[methodName];\n\n if (!method) {\n reject('Метод \"' + methodName + '\" не доступен');\n return;\n }\n\n method.apply(null, args).then(resolve, reject);\n });\n });\n}\n\nif (cadesplugin) {\n // Уровень отладки (LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_ERROR)\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n if (canPromise) {\n cadesplugin.then(finishLoading, function () {\n _errorMsg = 'КриптоПРО ЭЦП Browser Plug-In не доступен';\n finishLoading();\n });\n } else {\n throw new Error('Не поддерживаются промисы. Необходим полифилл.');\n }\n} else {\n throw new Error('Не подключен модуль для работы с cades plugin');\n}\n\nmodule.exports = {\n call: call\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","/*!\n * Bowser - a browser detector\n * https://github.com/ded/bowser\n * MIT License | (c) Dustin Diaz 2015\n */\n\n!function (name, definition) {\n if (typeof module != 'undefined' && module.exports) module.exports = definition()\n else if (typeof define == 'function' && define.amd) define(name, definition)\n else this[name] = definition()\n}('bowser', function () {\n /**\n * See useragents.js for examples of navigator.userAgent\n */\n\n var t = true\n\n function detect(ua) {\n\n function getFirstMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[1]) || '';\n }\n\n function getSecondMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[2]) || '';\n }\n\n var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase()\n , likeAndroid = /like android/i.test(ua)\n , android = !likeAndroid && /android/i.test(ua)\n , nexusMobile = /nexus\\s*[0-6]\\s*/i.test(ua)\n , nexusTablet = !nexusMobile && /nexus\\s*[0-9]+/i.test(ua)\n , chromeos = /CrOS/.test(ua)\n , silk = /silk/i.test(ua)\n , sailfish = /sailfish/i.test(ua)\n , tizen = /tizen/i.test(ua)\n , webos = /(web|hpw)os/i.test(ua)\n , windowsphone = /windows phone/i.test(ua)\n , samsungBrowser = /SamsungBrowser/i.test(ua)\n , windows = !windowsphone && /windows/i.test(ua)\n , mac = !iosdevice && !silk && /macintosh/i.test(ua)\n , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)\n , edgeVersion = getFirstMatch(/edge\\/(\\d+(\\.\\d+)?)/i)\n , versionIdentifier = getFirstMatch(/version\\/(\\d+(\\.\\d+)?)/i)\n , tablet = /tablet/i.test(ua)\n , mobile = !tablet && /[^-]mobi/i.test(ua)\n , xbox = /xbox/i.test(ua)\n , result\n\n if (/opera/i.test(ua)) {\n // an old Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n } else if (/opr|opios/i.test(ua)) {\n // a new Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: getFirstMatch(/(?:opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/SamsungBrowser/i.test(ua)) {\n result = {\n name: 'Samsung Internet for Android'\n , samsungBrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/coast/i.test(ua)) {\n result = {\n name: 'Opera Coast'\n , coast: t\n , version: versionIdentifier || getFirstMatch(/(?:coast)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/yabrowser/i.test(ua)) {\n result = {\n name: 'Yandex Browser'\n , yandexbrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/ucbrowser/i.test(ua)) {\n result = {\n name: 'UC Browser'\n , ucbrowser: t\n , version: getFirstMatch(/(?:ucbrowser)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/mxios/i.test(ua)) {\n result = {\n name: 'Maxthon'\n , maxthon: t\n , version: getFirstMatch(/(?:mxios)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/epiphany/i.test(ua)) {\n result = {\n name: 'Epiphany'\n , epiphany: t\n , version: getFirstMatch(/(?:epiphany)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/puffin/i.test(ua)) {\n result = {\n name: 'Puffin'\n , puffin: t\n , version: getFirstMatch(/(?:puffin)[\\s\\/](\\d+(?:\\.\\d+)?)/i)\n }\n }\n else if (/sleipnir/i.test(ua)) {\n result = {\n name: 'Sleipnir'\n , sleipnir: t\n , version: getFirstMatch(/(?:sleipnir)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/k-meleon/i.test(ua)) {\n result = {\n name: 'K-Meleon'\n , kMeleon: t\n , version: getFirstMatch(/(?:k-meleon)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (windowsphone) {\n result = {\n name: 'Windows Phone'\n , windowsphone: t\n }\n if (edgeVersion) {\n result.msedge = t\n result.version = edgeVersion\n }\n else {\n result.msie = t\n result.version = getFirstMatch(/iemobile\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/msie|trident/i.test(ua)) {\n result = {\n name: 'Internet Explorer'\n , msie: t\n , version: getFirstMatch(/(?:msie |rv:)(\\d+(\\.\\d+)?)/i)\n }\n } else if (chromeos) {\n result = {\n name: 'Chrome'\n , chromeos: t\n , chromeBook: t\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n } else if (/chrome.+? edge/i.test(ua)) {\n result = {\n name: 'Microsoft Edge'\n , msedge: t\n , version: edgeVersion\n }\n }\n else if (/vivaldi/i.test(ua)) {\n result = {\n name: 'Vivaldi'\n , vivaldi: t\n , version: getFirstMatch(/vivaldi\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (sailfish) {\n result = {\n name: 'Sailfish'\n , sailfish: t\n , version: getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/seamonkey\\//i.test(ua)) {\n result = {\n name: 'SeaMonkey'\n , seamonkey: t\n , version: getFirstMatch(/seamonkey\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/firefox|iceweasel|fxios/i.test(ua)) {\n result = {\n name: 'Firefox'\n , firefox: t\n , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \\/](\\d+(\\.\\d+)?)/i)\n }\n if (/\\((mobile|tablet);[^\\)]*rv:[\\d\\.]+\\)/i.test(ua)) {\n result.firefoxos = t\n }\n }\n else if (silk) {\n result = {\n name: 'Amazon Silk'\n , silk: t\n , version : getFirstMatch(/silk\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/phantom/i.test(ua)) {\n result = {\n name: 'PhantomJS'\n , phantom: t\n , version: getFirstMatch(/phantomjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/slimerjs/i.test(ua)) {\n result = {\n name: 'SlimerJS'\n , slimer: t\n , version: getFirstMatch(/slimerjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/blackberry|\\bbb\\d+/i.test(ua) || /rim\\stablet/i.test(ua)) {\n result = {\n name: 'BlackBerry'\n , blackberry: t\n , version: versionIdentifier || getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (webos) {\n result = {\n name: 'WebOS'\n , webos: t\n , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\\/(\\d+(\\.\\d+)?)/i)\n };\n /touchpad\\//i.test(ua) && (result.touchpad = t)\n }\n else if (/bada/i.test(ua)) {\n result = {\n name: 'Bada'\n , bada: t\n , version: getFirstMatch(/dolfin\\/(\\d+(\\.\\d+)?)/i)\n };\n }\n else if (tizen) {\n result = {\n name: 'Tizen'\n , tizen: t\n , version: getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n };\n }\n else if (/qupzilla/i.test(ua)) {\n result = {\n name: 'QupZilla'\n , qupzilla: t\n , version: getFirstMatch(/(?:qupzilla)[\\s\\/](\\d+(?:\\.\\d+)+)/i) || versionIdentifier\n }\n }\n else if (/chromium/i.test(ua)) {\n result = {\n name: 'Chromium'\n , chromium: t\n , version: getFirstMatch(/(?:chromium)[\\s\\/](\\d+(?:\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/chrome|crios|crmo/i.test(ua)) {\n result = {\n name: 'Chrome'\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (android) {\n result = {\n name: 'Android'\n , version: versionIdentifier\n }\n }\n else if (/safari|applewebkit/i.test(ua)) {\n result = {\n name: 'Safari'\n , safari: t\n }\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if (iosdevice) {\n result = {\n name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'\n }\n // WTF: version is not part of user agent in web apps\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if(/googlebot/i.test(ua)) {\n result = {\n name: 'Googlebot'\n , googlebot: t\n , version: getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i) || versionIdentifier\n }\n }\n else {\n result = {\n name: getFirstMatch(/^(.*)\\/(.*) /),\n version: getSecondMatch(/^(.*)\\/(.*) /)\n };\n }\n\n // set webkit or gecko flag for browsers based on these engines\n if (!result.msedge && /(apple)?webkit/i.test(ua)) {\n if (/(apple)?webkit\\/537\\.36/i.test(ua)) {\n result.name = result.name || \"Blink\"\n result.blink = t\n } else {\n result.name = result.name || \"Webkit\"\n result.webkit = t\n }\n if (!result.version && versionIdentifier) {\n result.version = versionIdentifier\n }\n } else if (!result.opera && /gecko\\//i.test(ua)) {\n result.name = result.name || \"Gecko\"\n result.gecko = t\n result.version = result.version || getFirstMatch(/gecko\\/(\\d+(\\.\\d+)?)/i)\n }\n\n // set OS flags for platforms that have multiple browsers\n if (!result.windowsphone && !result.msedge && (android || result.silk)) {\n result.android = t\n } else if (!result.windowsphone && !result.msedge && iosdevice) {\n result[iosdevice] = t\n result.ios = t\n } else if (mac) {\n result.mac = t\n } else if (xbox) {\n result.xbox = t\n } else if (windows) {\n result.windows = t\n } else if (linux) {\n result.linux = t\n }\n\n // OS version extraction\n var osVersion = '';\n if (result.windowsphone) {\n osVersion = getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i);\n } else if (iosdevice) {\n osVersion = getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i);\n osVersion = osVersion.replace(/[_\\s]/g, '.');\n } else if (android) {\n osVersion = getFirstMatch(/android[ \\/-](\\d+(\\.\\d+)*)/i);\n } else if (result.webos) {\n osVersion = getFirstMatch(/(?:web|hpw)os\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.blackberry) {\n osVersion = getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i);\n } else if (result.bada) {\n osVersion = getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.tizen) {\n osVersion = getFirstMatch(/tizen[\\/\\s](\\d+(\\.\\d+)*)/i);\n }\n if (osVersion) {\n result.osversion = osVersion;\n }\n\n // device type extraction\n var osMajorVersion = osVersion.split('.')[0];\n if (\n tablet\n || nexusTablet\n || iosdevice == 'ipad'\n || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile)))\n || result.silk\n ) {\n result.tablet = t\n } else if (\n mobile\n || iosdevice == 'iphone'\n || iosdevice == 'ipod'\n || android\n || nexusMobile\n || result.blackberry\n || result.webos\n || result.bada\n ) {\n result.mobile = t\n }\n\n // Graded Browser Support\n // http://developer.yahoo.com/yui/articles/gbs\n if (result.msedge ||\n (result.msie && result.version >= 10) ||\n (result.yandexbrowser && result.version >= 15) ||\n\t\t (result.vivaldi && result.version >= 1.0) ||\n (result.chrome && result.version >= 20) ||\n (result.samsungBrowser && result.version >= 4) ||\n (result.firefox && result.version >= 20.0) ||\n (result.safari && result.version >= 6) ||\n (result.opera && result.version >= 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] >= 6) ||\n (result.blackberry && result.version >= 10.1)\n || (result.chromium && result.version >= 20)\n ) {\n result.a = t;\n }\n else if ((result.msie && result.version < 10) ||\n (result.chrome && result.version < 20) ||\n (result.firefox && result.version < 20.0) ||\n (result.safari && result.version < 6) ||\n (result.opera && result.version < 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] < 6)\n || (result.chromium && result.version < 20)\n ) {\n result.c = t\n } else result.x = t\n\n return result\n }\n\n var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')\n\n bowser.test = function (browserList) {\n for (var i = 0; i < browserList.length; ++i) {\n var browserItem = browserList[i];\n if (typeof browserItem=== 'string') {\n if (browserItem in bowser) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Get version precisions count\n *\n * @example\n * getVersionPrecision(\"1.10.3\") // 3\n *\n * @param {string} version\n * @return {number}\n */\n function getVersionPrecision(version) {\n return version.split(\".\").length;\n }\n\n /**\n * Array::map polyfill\n *\n * @param {Array} arr\n * @param {Function} iterator\n * @return {Array}\n */\n function map(arr, iterator) {\n var result = [], i;\n if (Array.prototype.map) {\n return Array.prototype.map.call(arr, iterator);\n }\n for (i = 0; i < arr.length; i++) {\n result.push(iterator(arr[i]));\n }\n return result;\n }\n\n /**\n * Calculate browser version weight\n *\n * @example\n * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1\n * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1\n * compareVersions(['1.10.2.1', '1.10.2.1']); // 0\n * compareVersions(['1.10.2.1', '1.0800.2']); // -1\n *\n * @param {Array} versions versions to compare\n * @return {Number} comparison result\n */\n function compareVersions(versions) {\n // 1) get common precision for both versions, for example for \"10.0\" and \"9\" it should be 2\n var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));\n var chunks = map(versions, function (version) {\n var delta = precision - getVersionPrecision(version);\n\n // 2) \"9\" -> \"9.0\" (for precision = 2)\n version = version + new Array(delta + 1).join(\".0\");\n\n // 3) \"9.0\" -> [\"000000000\"\", \"000000009\"]\n return map(version.split(\".\"), function (chunk) {\n return new Array(20 - chunk.length).join(\"0\") + chunk;\n }).reverse();\n });\n\n // iterate in reverse order by reversed chunks array\n while (--precision >= 0) {\n // 4) compare: \"000000009\" > \"000000010\" = false (but \"9\" > \"10\" = true)\n if (chunks[0][precision] > chunks[1][precision]) {\n return 1;\n }\n else if (chunks[0][precision] === chunks[1][precision]) {\n if (precision === 0) {\n // all version chunks are same\n return 0;\n }\n }\n else {\n return -1;\n }\n }\n }\n\n /**\n * Check if browser is unsupported\n *\n * @example\n * bowser.isUnsupportedBrowser({\n * msie: \"10\",\n * firefox: \"23\",\n * chrome: \"29\",\n * safari: \"5.1\",\n * opera: \"16\",\n * phantom: \"534\"\n * });\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function isUnsupportedBrowser(minVersions, strictMode, ua) {\n var _bowser = bowser;\n\n // make strictMode param optional with ua param usage\n if (typeof strictMode === 'string') {\n ua = strictMode;\n strictMode = void(0);\n }\n\n if (strictMode === void(0)) {\n strictMode = false;\n }\n if (ua) {\n _bowser = detect(ua);\n }\n\n var version = \"\" + _bowser.version;\n for (var browser in minVersions) {\n if (minVersions.hasOwnProperty(browser)) {\n if (_bowser[browser]) {\n if (typeof minVersions[browser] !== 'string') {\n throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));\n }\n\n // browser version and min supported version.\n return compareVersions([version, minVersions[browser]]) < 0;\n }\n }\n }\n\n return strictMode; // not found\n }\n\n /**\n * Check if browser is supported\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function check(minVersions, strictMode, ua) {\n return !isUnsupportedBrowser(minVersions, strictMode, ua);\n }\n\n bowser.isUnsupportedBrowser = isUnsupportedBrowser;\n bowser.compareVersions = compareVersions;\n bowser.check = check;\n\n /*\n * Set our detect method to the main bowser object so we can\n * reuse it to test other user agents.\n * This is needed to implement future tests.\n */\n bowser._detect = detect;\n\n return bowser\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/bowser/bowser.js\n ** module id = 1\n ** module chunks = 0\n **/","module.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/webpack/buildin/amd-define.js\n ** module id = 2\n ** module chunks = 0\n **/",";(function () {\n //already loaded\n if(window.cadesplugin)\n return;\n\n var pluginObject;\n var plugin_resolved = 0;\n var plugin_reject;\n var plugin_resolve;\n var isOpera = 0;\n var isFireFox = 0;\n\tvar isEdge = 0;\n var failed_extensions = 0;\n\n var canPromise = !!window.Promise;\n var cadesplugin;\n\n if(canPromise)\n {\n cadesplugin = new Promise(function(resolve, reject)\n {\n plugin_resolve = resolve;\n plugin_reject = reject;\n });\n } else\n {\n cadesplugin = {};\n }\n \n function check_browser() {\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if(/trident/i.test(M[1])){\n tem= /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return {name:'IE',version:(tem[1] || '')};\n }\n if(M[1]=== 'Chrome'){\n tem= ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if(tem!= null) return {name:tem[1].replace('OPR', 'Opera'),version:tem[2]};\n }\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\n if((tem= ua.match(/version\\/(\\d+)/i))!= null) M.splice(1, 1, tem[1]);\n return {name:M[0],version:M[1]};\n }\n var browserSpecs = check_browser();\n\n function cpcsp_console_log(level, msg){\n //IE9 не может писать в консоль если не открыта вкладка developer tools\n if(typeof(console) == 'undefined')\n return;\n if (level <= cadesplugin.current_log_level ){\n if (level == cadesplugin.LOG_LEVEL_DEBUG)\n console.log(\"DEBUG: %s\", msg);\n if (level == cadesplugin.LOG_LEVEL_INFO)\n console.info(\"INFO: %s\", msg);\n if (level == cadesplugin.LOG_LEVEL_ERROR)\n console.error(\"ERROR: %s\", msg);\n return;\n }\n }\n\n function set_log_level(level){\n if (!((level == cadesplugin.LOG_LEVEL_DEBUG) ||\n (level == cadesplugin.LOG_LEVEL_INFO) ||\n (level == cadesplugin.LOG_LEVEL_ERROR))){\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\n return;\n }\n cadesplugin.current_log_level = level;\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_DEBUG)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_INFO)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_ERROR)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\n if(isNativeMessageSupported())\n {\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_DEBUG)\n window.postMessage(\"set_log_level=debug\", \"*\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_INFO)\n window.postMessage(\"set_log_level=info\", \"*\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_ERROR)\n window.postMessage(\"set_log_level=error\", \"*\");\n }\n }\n\n function set_constantValues()\n {\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\n \n cadesplugin.CAPICOM_MY_STORE = \"My\";\n\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\n\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\n\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\n cadesplugin.CADESCOM_CADES_BES = 1;\n cadesplugin.CADESCOM_CADES_T = 0x5;\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\n\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\n\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\n\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\n\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\n\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\n\n cadesplugin.CAPICOM_OID_OTHER = 0;\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\n\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\n cadesplugin.CAPICOM_EKU_OTHER = 0;\n\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\n\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\n\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\n\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\n\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\n\n cadesplugin.LOG_LEVEL_DEBUG = 4;\n cadesplugin.LOG_LEVEL_INFO = 2;\n cadesplugin.LOG_LEVEL_ERROR = 1;\n }\n\n function async_spawn(generatorFunc) {\n function continuer(verb, arg) {\n var result;\n try {\n result = generator[verb](arg);\n } catch (err) {\n return Promise.reject(err);\n }\n if (result.done) {\n return result.value;\n } else {\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\n }\n }\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\n var onFulfilled = continuer.bind(continuer, \"next\");\n var onRejected = continuer.bind(continuer, \"throw\");\n return onFulfilled();\n }\n\n function isIE() {\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\n return (browserSpecs.name == 'IE' || browserSpecs.name == 'MSIE');\n }\n\n function isIOS() {\n var retVal = (navigator.userAgent.match(/ipod/i) ||\n navigator.userAgent.match(/ipad/i) ||\n navigator.userAgent.match(/iphone/i));\n return retVal;\n }\n\n function isNativeMessageSupported()\n {\n // В IE работаем через NPAPI\n if(isIE())\n return false;\n // В Edge работаем через NativeMessage\n if(browserSpecs.name == 'Edge') {\n isEdge = true;\n return true;\n }\n // В Chrome, Firefox и Opera работаем через асинхронную версию в зависимости от версии\n if(browserSpecs.name == 'Opera') {\n isOpera = true;\n if(browserSpecs.version >= 33){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name == 'Firefox') {\n isFireFox = true;\n if(browserSpecs.version >= 52){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name == 'Chrome') {\n if(browserSpecs.version >= 42){\n return true;\n }\n else{\n return false;\n }\n }\n }\n\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\n function CreateObject(name) {\n if (isIOS()) {\n // На iOS для создания объектов используется функция\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\n }\n if (isIE()) {\n // В Internet Explorer создаются COM-объекты\n if (name.match(/X509Enrollment/i)) {\n try {\n // Объекты CertEnroll создаются через CX509EnrollmentWebClassFactory\n var objCertEnrollClassFactory = document.getElementById(\"certEnrollClassFactory\");\n return objCertEnrollClassFactory.CreateObject(name);\n }\n catch (e) {\n throw(\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\n }\n }\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\n try {\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\n return objWebClassFactory.CreateObject(name);\n }\n catch (e) {\n // Для версий плагина ниже 2.0.12538\n return new ActiveXObject(name);\n }\n }\n // создаются объекты NPAPI\n return pluginObject.CreateObject(name);\n }\n\n function decimalToHexString(number) {\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1;\n }\n\n return number.toString(16).toUpperCase();\n }\n \n function GetMessageFromException(e) {\n var err = e.message;\n if (!err) {\n err = e;\n } else if (e.number) {\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\n }\n return err;\n }\n\n function getLastError(exception) {\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\n return GetMessageFromException(exception);\n }\n\n try {\n return pluginObject.getLastError();\n } catch(e) {\n return GetMessageFromException(exception);\n }\n }\n\n // Функция для удаления созданных объектов\n function ReleasePluginObjects() {\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\n }\n\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\n function CreateObjectAsync(name) {\n return pluginObject.CreateObjectAsync(name);\n }\n\n //Функции для IOS\n var ru_cryptopro_npcades_10_native_bridge = {\n callbacksCount : 1,\n callbacks : {},\n\n // Automatically called by native layer when a result is available\n resultForCallback : function resultForCallback(callbackId, resultArray) {\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\n if (!callback) return;\n callback.apply(null,resultArray);\n },\n\n // Use this in javascript to request native objective-c code\n // functionName : string (I think the name is explicit :p)\n // args : array of arguments\n // callback : function with n-arguments that is going to be called when the native code returned\n call : function call(functionName, args, callback) {\n var hasCallback = callback && typeof callback == \"function\";\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\n\n if (hasCallback)\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\n\n var iframe = document.createElement(\"IFRAME\");\n var arrObjs = new Array(\"_CPNP_handle\");\n try{\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\n } catch(e){\n alert(e);\n }\n document.documentElement.appendChild(iframe);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }\n };\n\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\n var tmpobj;\n var ex;\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\n ex = e;\n var str='tmpobj='+response;\n eval(str);\n if (typeof (tmpobj) == \"string\"){\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\n }\n });\n if(ex)\n throw ex;\n return tmpobj;\n }\n\n function show_firefox_missing_extension_dialog()\n {\n if (!window.cadesplugin_skip_extension_install)\n { \n var ovr = document.createElement('div');\n ovr.id = \"cadesplugin_ovr\";\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\n ovr.innerHTML = \"
\" +\n \"\" +\n \"

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

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

\" +\n \"
\";\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n\n ovr.addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n ovr.style.visibility=\"visible\";\n }\n }\n\n\n //Выводим окно поверх других с предложением установить расширение для Opera.\n //Если установленна переменная cadesplugin_skip_extension_install - не предлагаем установить расширение\n function install_opera_extension()\n {\n if (!window.cadesplugin_skip_extension_install)\n {\n document.addEventListener('DOMContentLoaded', function() {\n var ovr = document.createElement('div');\n ovr.id = \"cadesplugin_ovr\";\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\n ovr.innerHTML = \"
\" +\n \"\" +\n \"

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

\" +\n \"
\";\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\n var btn_install = document.getElementById(\"cadesplugin_install\");\n btn_install.addEventListener('click', function(event) {\n opr.addons.installExtension(\"epebfcehmdedogndhlcacafjaacknbcm\",\n function()\n {\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n location.reload();\n },\n function(){})\n });\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n\n ovr.addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n ovr.style.visibility=\"visible\";\n document.getElementById(\"cadesplugin_ovr_item\").addEventListener('click',function(e){\n e.stopPropagation();\n });\n });\n }else\n {\n plugin_loaded_error(\"Плагин недоступен\");\n }\n }\n\n function firefox_or_edge_nmcades_onload() {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n\n function nmcades_api_onload () {\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\n window.addEventListener(\"message\", function (event){\n if (typeof(event.data) != \"string\" || !event.data.match(\"cadesplugin_loaded\"))\n return;\n if(isFireFox || isEdge)\n {\n // Для Firefox вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", url);\n fileref.onerror = plugin_loaded_error;\n fileref.onload = firefox_or_edge_nmcades_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n // Для Firefox и Edge у нас только по одному расширению.\n failed_extensions++;\n }else {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n }, false);\n }\n\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge\n function load_extension()\n {\n\n if(isFireFox || isEdge){\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\n nmcades_api_onload();\n return;\n } else {\n // в асинхронном варианте для chrome и opera подключаем оба расширения\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }\n }\n\n //Загружаем плагин для NPAPI\n function load_npapi_plugin()\n {\n var elem = document.createElement('object');\n elem.setAttribute(\"id\", \"cadesplugin_object\");\n elem.setAttribute(\"type\", \"application/x-cades\");\n elem.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\n pluginObject = document.getElementById(\"cadesplugin_object\");\n if(isIE())\n {\n var elem1 = document.createElement('object');\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\n elem1.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\n var elem2 = document.createElement('object');\n elem2.setAttribute(\"id\", \"webClassFactory\");\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\n elem2.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\n }\n }\n\n //Отправляем событие что все ок.\n function plugin_loaded()\n {\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_resolve();\n }else {\n window.postMessage(\"cadesplugin_loaded\", \"*\");\n }\n }\n\n //Отправляем событие что сломались.\n function plugin_loaded_error(msg)\n {\n if(isNativeMessageSupported())\n {\n //в асинхронном варианте подключаем оба расширения, если сломались оба пробуем установить для Opera\n failed_extensions++;\n if(failed_extensions<2)\n return;\n if(isOpera && (typeof(msg) == 'undefined'|| typeof(msg) == 'object'))\n {\n install_opera_extension();\n return;\n }\n }\n if(typeof(msg) == 'undefined' || typeof(msg) == 'object')\n msg = \"Плагин недоступен\";\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(msg);\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n }\n\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\n function check_load_timeout()\n {\n if(plugin_resolved == 1)\n return;\n if(isFireFox)\n {\n show_firefox_missing_extension_dialog();\n }\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n\n }\n\n //Вспомогательная функция для NPAPI\n function createPromise(arg)\n {\n return new Promise(arg);\n }\n\n function check_npapi_plugin (){\n try {\n var oAbout = CreateObject(\"CAdESCOM.About\");\n plugin_loaded();\n }\n catch (err) {\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\n // Объект создать не удалось, проверим, установлен ли\n // вообще плагин. Такая возможность есть не во всех браузерах\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\n if (mimetype) {\n var plugin = mimetype.enabledPlugin;\n if (plugin) {\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\n }else\n {\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\n }\n }else\n {\n plugin_loaded_error(\"Плагин недоступен\");\n }\n }\n }\n\n //Проверяем работает ли плагин\n function check_plugin_working()\n {\n var div = document.createElement(\"div\");\n div.innerHTML = \"\";\n var isIeLessThan9 = (div.getElementsByTagName(\"iecheck\").length == 1);\n if (isIeLessThan9) {\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\n return;\n }\n\n if(isNativeMessageSupported())\n {\n load_extension();\n }else if(!canPromise) {\n window.addEventListener(\"message\", function (event){\n if (event.data != \"cadesplugin_echo_request\")\n return;\n load_npapi_plugin();\n check_npapi_plugin();\n },\n false);\n }else\n {\n if(document.readyState === \"complete\"){\n load_npapi_plugin();\n check_npapi_plugin();\n } else {\n window.addEventListener(\"load\", function (event) {\n load_npapi_plugin();\n check_npapi_plugin();\n }, false);\n }\n }\n }\n\n function set_pluginObject(obj)\n {\n pluginObject = obj;\n }\n\n //Export\n cadesplugin.JSModuleVersion = \"2.1.0\";\n cadesplugin.async_spawn = async_spawn;\n cadesplugin.set = set_pluginObject;\n cadesplugin.set_log_level = set_log_level;\n cadesplugin.getLastError = getLastError;\n\n if(isNativeMessageSupported())\n {\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\n }\n\n if(!isNativeMessageSupported())\n {\n cadesplugin.CreateObject = CreateObject;\n }\n\n if(window.cadesplugin_load_timeout)\n {\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\n }\n else\n {\n setTimeout(check_load_timeout, 20000);\n }\n\n set_constantValues();\n\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\n window.cadesplugin = cadesplugin;\n check_plugin_working();\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../vendor/cadesplugin_api.js\n ** module id = 3\n ** module chunks = 0\n **/","var cryptoCommon = require('./common'),\n cryptoConstants = require('./constants'),\n _certListCache;\n\nfunction Certificate(item) {\n this._cert = item._cert;\n this.thumbprint = item.thumbprint;\n this.subjectName = item.subjectName;\n this.issuerName = item.issuerName;\n this.validFrom = item.validFrom;\n this.validTo = item.validTo;\n}\n\n/**\n * Проверяет, валиден ли сертификат\n * */\nCertificate.prototype.isValid = function isValid() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function isValid() {\n var result;\n\n try {\n result = 'yield' + cert.IsValid();\n result = 'yield' + result.Result;\n } catch (err) {\n reject('Ошибка при проверке сертификата: ', err.message);\n return;\n }\n\n resolve(result);\n }));\n });\n};\n\n/**\n * Достает указанное свойство у сертификата\n * */\nCertificate.prototype.getProp = function (propName) {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getProp() {\n var result;\n\n try {\n result = 'yield' + cert[propName];\n } catch (err) {\n reject('Ошибка при обращении к свойству сертификата: ', err.message);\n return;\n }\n\n resolve(result);\n }));\n });\n};\n\n/**\n * Экспорт base64 представления сертификата пользователя\n * */\nCertificate.prototype.exportBase64 = function exportBase64() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function exportBase64() {\n var base64;\n\n try {\n base64 = 'yield' + cert.Export(0);\n } catch (err) {\n reject('Ошибка при экспорте сертификата: ', err.message);\n return;\n }\n\n resolve(base64);\n }));\n });\n};\n\n/**\n * Возвращает информацию об алгоритме\n * */\nCertificate.prototype.getAlgorithm = function getAlgorithm() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getAlgorithm() {\n var result = {},\n algorithm;\n\n try {\n algorithm = 'yield' + cert.PublicKey();\n algorithm = 'yield' + algorithm.Algorithm;\n\n result.algorithm = 'yield' + algorithm.FriendlyName;\n result.oid = 'yield' + algorithm.Value;\n } catch (err) {\n reject('Ошибка при получении алгоритма: ', err.message);\n return;\n }\n\n resolve(result);\n }));\n });\n};\n\n/**\n * Разбирает SubjectName сертификата по тэгам\n * */\nCertificate.prototype.getOwnerInfo = function getOwnerInfo() {\n return getCertInfo.call(this, cryptoCommon.subjectNameTagsTranslations, 'SubjectName');\n};\n\n/**\n * Разбирает IssuerName сертификата по тэгам\n * */\nCertificate.prototype.getIssuerInfo = function getIssuerInfo() {\n return getCertInfo.call(this, cryptoCommon.issuerNameTagsTranslations, 'IssuerName');\n};\n\n/**\n * Получение OID сертификата\n *\n * @returns {Array} Возвращает массив OID (улучшенного ключа)\n * */\nCertificate.prototype.getExtendedKeyUsage = function getExtendedKeyUsage() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getExtendedKeyUsage() {\n var OIDS = [],\n count,\n item;\n\n try {\n count = 'yield' + cert.ExtendedKeyUsage();\n count = 'yield' + count.EKUs;\n count = 'yield' + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n item = 'yield' + cert.ExtendedKeyUsage();\n item = 'yield' + item.EKUs;\n item = 'yield' + item.Item(count);\n item = 'yield' + item.OID;\n\n OIDS.push(item);\n\n count--;\n }\n }\n } catch (err) {\n reject('Ошибка при получении ОИД\\'ов: ', err.message);\n return;\n }\n\n resolve(OIDS);\n }));\n });\n};\n\nCertificate.prototype.getDecodedExtendedKeyUsage = cryptoCommon.getDecodedExtendedKeyUsage;\n\nCertificate.prototype.hasExtendedKeyUsage = cryptoCommon.hasExtendedKeyUsage;\n\n/**\n * Проверяет корректность настроек ЭП на машине\n * */\nfunction isValidEDSSettings() {\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function isValidEDSSettings() {\n var result;\n\n try {\n result = 'yield' + cryptoCommon.createObj('CAdESCOM.About');\n } catch (error) {\n reject('Настройки ЭП на данной машине не верны');\n }\n\n resolve();\n }));\n });\n}\n\n/**\n * Получить сертификат в формате cades по хэшу\n * */\nfunction getCadesCert(hash) {\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getCadesCert() {\n var oStore = 'yield' + cryptoCommon.createObj('CAdESCOM.Store'),\n certs,\n certCnt,\n cert;\n\n if (!oStore) {\n reject('Не удалось получить доступ к хранилищу сертификатов');\n return;\n }\n\n // Открываем хранилище\n try {\n 'yield' + oStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED\n );\n } catch (err) {\n reject('Ошибка при открытии хранилища: ' + err.message);\n return;\n }\n\n // Получаем доступ к сертификатам\n try {\n certs = 'yield' + oStore.Certificates;\n certCnt = 'yield' + certs.Count;\n } catch (err) {\n reject('Ошибка получения списка сертификатов: ' + err.message);\n return;\n }\n\n if (!certCnt) {\n reject('Нет доступных сертификатов');\n return;\n }\n\n // Получаем сертификат по хэшу\n try {\n certs = 'yield' + certs.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, hash);\n\n if (certs.Count) {\n cert = 'yield' + certs.Item(1);\n } else {\n throw new Error(hash);\n }\n } catch (err) {\n reject('Не удалось получить сертификат по хэшу: ' + err.message);\n return;\n }\n\n oStore.Close();\n\n resolve(cert);\n }));\n });\n}\n\n/**\n * Разбирает информацию сертификата по тэгам\n * */\nfunction getCertInfo(tags, propName) {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getCertInfo() {\n var propInfo;\n\n try {\n propInfo = 'yield' + cert[propName];\n } catch (err) {\n reject('Ошибка при извлечении данных из сертификата: ', err.message);\n return;\n }\n\n resolve(cryptoCommon.parseCertInfo(tags, propInfo));\n }));\n });\n}\n\n/**\n * Возвращает список сертификатов, доступных в системе\n *\n * @param {Boolean} [resetCache=false] -- нужно ли сбросить кэш списка сертификатов\n * @returns {Promise} -- со списком сертификатов {Array}\n * */\nfunction getCertsList(resetCache) {\n return new Promise(function (resolve, reject) {\n if (!resetCache && _certListCache) {\n resolve(_certListCache);\n return;\n }\n\n eval(cryptoCommon.generateAsyncFn(function getCertsList() {\n var oStore = 'yield' + cryptoCommon.createObj('CAdESCOM.Store'),\n result = [],\n certs,\n count,\n item;\n\n // Открываем хранилище\n try {\n 'yield' + oStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED\n );\n } catch (err) {\n reject('Ошибка при открытии хранилища: ' + err.message);\n return;\n }\n\n // Получаем доступ к сертификатам\n try {\n certs = 'yield' + oStore.Certificates;\n\n if (certs) {\n certs = 'yield' + certs.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n * */\n certs = 'yield' + certs.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n cryptoConstants.PropId.CAPICOM_PROPID_KEY_PROV_INFO\n );\n\n count = 'yield' + certs.Count;\n }\n } catch (err) {\n reject('Ошибка получения списка сертификатов: ' + err.message);\n return;\n }\n\n if (!count) {\n reject('Нет доступных сертификатов');\n return;\n }\n\n try {\n while (count) {\n item = 'yield' + certs.Item(count);\n\n result.push(new Certificate({\n _cert: 'yield' + item,\n thumbprint: 'yield' + item.Thumbprint,\n subjectName: 'yield' + item.SubjectName,\n issuerName: 'yield' + item.IssuerName,\n validFrom: 'yield' + item.ValidFromDate,\n validTo: 'yield' + item.ValidToDate\n }));\n\n count--;\n }\n } catch (err) {\n reject('Ошибка обработки сертификатов: ' + err.message);\n return;\n }\n\n oStore.Close();\n\n _certListCache = cryptoCommon.prepareCertsInfo(result);\n\n resolve(_certListCache);\n }));\n });\n}\n\n/**\n * Получить сертификат по хэшу\n * */\nfunction getCert(hash) {\n return new Promise(function (resolve, reject) {\n if (!hash) {\n reject('Хэш не указан');\n return;\n }\n\n getCertsList().then(function (list) {\n var foundCert;\n\n list.some(function (cert) {\n if (hash === cert.thumbprint) {\n foundCert = cert;\n return true;\n }\n });\n\n if (foundCert) {\n resolve(foundCert);\n } else {\n reject('Сертификат с хэшем: \"' + hash + '\" не найден');\n }\n }, reject);\n });\n}\n\n/**\n * Создает подпись base64 строки по hash'у сертификата\n *\n * @param {String} hash -- fingerprint (thumbprint) сертификата\n * @param {String} dataBase64 -- строковые данные в формате base64\n * @param {Boolean} signType -- тип подписи открепленная (true) / присоединенная (false) (default: true)\n * @returns {Promise} -- обещание, которое зарезолвится с данными о подписи {String}\n * */\nfunction signData(hash, dataBase64, signType) {\n signType = typeof signType === 'undefined' ? true : Boolean(signType);\n\n return new Promise(function (resolve, reject) {\n getCadesCert(hash).then(function (cert) {\n eval(cryptoCommon.generateAsyncFn(function signData() {\n var clientTime = new Date(),\n oAttrs = 'yield' + cryptoCommon.createObj('CADESCOM.CPAttribute'),\n oSignedData = 'yield' + cryptoCommon.createObj('CAdESCOM.CadesSignedData'),\n oSigner = 'yield' + cryptoCommon.createObj('CAdESCOM.CPSigner'),\n attrs,\n signature;\n\n clientTime = cryptoCommon.getDateObj(clientTime);\n\n try {\n 'yield' + oAttrs.propset_Name(cryptoConstants.Time.AUTHENTICATED_ATTRIBUTE_SIGNING_TIME);\n 'yield' + oAttrs.propset_Value(clientTime);\n } catch (err) {\n reject('Ошибка при установке данных подписи: ' + err.message);\n return;\n }\n\n // Задаем настройки для подписи\n try {\n 'yield' + oSigner.propset_Certificate(cert);\n attrs = 'yield' + oSigner.AuthenticatedAttributes2;\n 'yield' + attrs.Add(oAttrs);\n 'yield' + oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);\n 'yield' + oSignedData.propset_Content(dataBase64);\n 'yield' + oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY);\n } catch (err) {\n reject('Не удалось установить настройки для подписи: ' + err.message);\n return;\n }\n\n try {\n signature = 'yield' + oSignedData.SignCades(\n oSigner,\n cadesplugin.CADESCOM_CADES_BES,\n signType\n );\n } catch (err) {\n reject('Не удалось создать подпись: ' + err.message);\n return;\n }\n\n resolve(signature);\n }));\n }, reject);\n });\n}\n\n/**\n * Создает подпись XML строки по hash'у сертификата\n *\n * @param {String} hash -- fingerprint (thumbprint) сертификата\n * @param {String} dataXML -- данные в формате XML\n * @returns {Promise} -- обещание, которое зарезолвится с данными о подписи {String}\n * */\nfunction signDataXML(hash, dataXML) {\n return new Promise(function (resolve, reject) {\n getCadesCert(hash).then(function (cert) {\n eval(cryptoCommon.generateAsyncFn(function signDataXML() {\n var oSigner = 'yield' + cryptoCommon.createObj('CAdESCOM.CPSigner'),\n signerXML = 'yield' + cryptoCommon.createObj('CAdESCOM.SignedXML'),\n cnts = cryptoConstants,\n signature;\n\n // Задаем настройки для подписи\n try {\n 'yield' + oSigner.propset_Certificate(cert);\n // Добавляем данные для подписи\n 'yield' + signerXML.propset_Content(dataXML);\n // Устанавливаем тип подписи\n 'yield' + signerXML.propset_SignatureType(cnts.SignatureType.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED);\n // Устанавливаем алгоритм подписи\n 'yield' + signerXML.propset_SignatureMethod(cnts.GostXmlDSigUrls.XmlDsigGost3410Url);\n // Устанавливаем алгоритм хэширования\n 'yield' + signerXML.propset_DigestMethod(cnts.GostXmlDSigUrls.XmlDsigGost3411Url);\n } catch (err) {\n reject('Не удалось установить настройки для подписи: ' + err.message);\n return;\n }\n\n try {\n signature = 'yield' + signerXML.Sign(oSigner);\n } catch (err) {\n reject('Не удалось создать подпись: ' + err.message);\n return;\n }\n\n resolve(signature);\n }));\n }, reject);\n });\n}\n\n/**\n * Возвращает информацию о версии CSP и плагина\n * */\nfunction getSystemInfo() {\n var sysInfo = cryptoCommon.getEnvInfo();\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getSystemInfo() {\n var e;\n\n try {\n e = 'yield' + cryptoCommon.createObj('CAdESCOM.About');\n\n sysInfo.cadesVersion = 'yield' + e.PluginVersion;\n // Возможен вызов в ранних версиях в виде sysInfo.cspVersion = 'yield' + e.CSPVersion('', 75);\n sysInfo.cspVersion = 'yield' + e.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = 'yield' + e.Version;\n }\n\n sysInfo.cadesVersion = 'yield' + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = 'yield' + sysInfo.cspVersion.toString();\n\n resolve(sysInfo);\n } catch (err) {\n reject('Ошибка при получении информации о системе: ', err.message);\n }\n }));\n });\n}\n\n/**\n * Promise обертка для синхронного вызова проверки версии CSP\n * */\nfunction isValidCSPVersion(version) {\n return new Promise(function (resolve) {\n resolve(cryptoCommon.isValidCSPVersion(version));\n });\n}\n\n/**\n * Promise обертка для синхронного вызова проверки версии плагина\n * */\nfunction isValidCadesVersion(version) {\n return new Promise(function (resolve) {\n resolve(cryptoCommon.isValidCadesVersion(version));\n });\n}\n\nmodule.exports = {\n isValidEDSSettings: isValidEDSSettings,\n getCertsList: getCertsList,\n getCert: getCert,\n signData: signData,\n signDataXML: signDataXML,\n getSystemInfo: getSystemInfo,\n isValidCSPVersion: isValidCSPVersion,\n isValidCadesVersion: isValidCadesVersion\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./api.js\n ** module id = 4\n ** module chunks = 0\n **/","var bowser = require('bowser/bowser');\nvar oids = require('./oids');\n\nvar subjectNameTagsTranslations = [\n {possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя'},\n {possibleNames: ['CN'], translation: 'Владелец'},\n {possibleNames: ['SN'], translation: 'Фамилия'},\n {possibleNames: ['G'], translation: 'Имя Отчество'},\n {possibleNames: ['C'], translation: 'Страна'},\n {possibleNames: ['S'], translation: 'Регион'},\n {possibleNames: ['STREET'], translation: 'Адрес'},\n {possibleNames: ['O'], translation: 'Компания'},\n {possibleNames: ['OU'], translation: 'Отдел/подразделение'},\n {possibleNames: ['T'], translation: 'Должность'},\n {possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН'},\n {possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП'},\n {possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС'},\n {possibleNames: ['ИНН', 'INN'], translation: 'ИНН'},\n {possibleNames: ['E'], translation: 'Email'},\n {possibleNames: ['L'], translation: 'Город'}\n ],\n\n issuerNameTagsTranslations = [\n {possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя'},\n {possibleNames: ['CN'], translation: 'Удостоверяющий центр'},\n {possibleNames: ['S'], translation: 'Регион'},\n {possibleNames: ['C'], translation: 'Страна'},\n {possibleNames: ['STREET'], translation: 'Адрес'},\n {possibleNames: ['O'], translation: 'Компания'},\n {possibleNames: ['OU'], translation: 'Тип'},\n {possibleNames: ['T'], translation: 'Должность'},\n {possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН'},\n {possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП'},\n {possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС'},\n {possibleNames: ['ИНН', 'INN'], translation: 'ИНН'},\n {possibleNames: ['E'], translation: 'Email'},\n {possibleNames: ['L'], translation: 'Город'}\n ];\n\nfunction generateAsyncFn(cb) {\n var canAsync = cadesplugin.CreateObjectAsync;\n var dynamicScriptName = cb.name || 'asyncFn';\n\n cb = String(cb);\n\n var args = cb.match(/^function[\\s\\w]*?\\((.*?)\\)/);\n\n args = (args && args[1]) || '';\n\n cb = cb.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n\n function GeneratorFunction() {\n return (new Function('', 'return Object.getPrototypeOf(function*(){}).constructor'))();\n }\n\n cb = String(new (canAsync ? GeneratorFunction() : Function)(args, cb));\n\n cb = cb.replace(/cryptoCommon\\.createObj(\\([\\s\\S]*?\\))/gm, 'cadesplugin.CreateObject' + (canAsync ? 'Async' : '') + '$1');\n cb = cb.replace(/(\"|')(yield)(\\1)\\s*?\\+\\s*?\\b/gm, canAsync ? '$2 ' : '');\n\n if (!canAsync) {\n cb = cb.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return (canAsync ?\n 'cadesplugin.async_spawn(' + cb + ');'\n : '(' + cb + ')();') + '//# sourceURL=evaled-' + dynamicScriptName + '.js';\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n * */\nfunction parseCertInfo(tags, infoString) {\n /**\n * Пример входной строки:\n *\n\n T=Генеральный директор, UnstructuredName=\"INN=7811514257/KPP=781101001/OGRN=1127847087884\",\n STREET=\"Крыленко, д.3, лит.Б\", CN=Король Анатолий Евгеньевич, G=Анатолий Евгеньевич, SN=Король,\n OU=Администрация, O=\"ООО \"\"Аксиома\"\"\", L=Санкт-Петербург, S=78 г. Санкт-Петербург, C=RU, E=korol@sferasro.ru,\n INN=007811514257, OGRN=1127847087884, SNILS=11617693460\n\n * */\n var result = infoString.match(/([а-яА-Яa-zA-Z0-9\\.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (result) {\n result = result.map(function (group) {\n /**\n * Пример входной строки:\n *\n\n UnstructuredName=\"INN=7811514257/KPP=781101001/OGRN=1127847087884\",\n\n * */\n var parts = group.match(/^([а-яА-Яa-zA-Z0-9\\.]+)=(.+?),?$/),\n title = parts && parts[1],\n descr = parts && parts[2],\n translated = false,\n oidTitle;\n\n // Если тайтл содержит ОИД, пытаемся расшифровать\n if (/^OID./.test(title)) {\n oidTitle = title.match(/^OID\\.(.*)/);\n\n if (oidTitle && oidTitle[1]) {\n oidTitle = oids[oidTitle[1]];\n\n if (oidTitle) {\n title = oidTitle;\n }\n }\n }\n\n // Вырезаем лишние кавычки\n descr = descr.replace(/^\"(.*)\"/, '$1');\n descr = descr.replace(/\"{2}/g, '\"');\n\n tags.some(function (tag) {\n return tag.possibleNames.some(function (possible) {\n var match = possible === title;\n\n if (match) {\n title = tag.translation;\n translated = true;\n }\n\n return match;\n });\n });\n\n return {\n title: title,\n descr: descr,\n translated: translated\n };\n });\n }\n\n return result;\n}\n\n/**\n * Возвращает дату в формате (dd.mm.yyyy hh:mm:ss) из строки, формата, используемого плагином cryptoPro\n * */\nfunction getReadableDate(date) {\n date = new Date(date);\n\n return ([\n date.getDate(),\n date.getMonth() + 1,\n date.getFullYear()\n ].join('.') + ' ' + [\n date.getHours(),\n date.getMinutes(),\n date.getSeconds()\n ].join(':')).replace(/\\b(\\d)\\b/g, '0$1');\n}\n\n/**\n * Преобразует дату для IE\n * */\nfunction getDateObj(dateObj) {\n return bowser.msie ? dateObj.getVarDate() : dateObj;\n}\n\n/**\n * Подготавливает информацию о сертификатах\n * */\nfunction prepareCertsInfo(items) {\n return items.map(function (c) {\n c.name = c.subjectName.match(/CN=(.+?)(?:,|$)/);\n\n // Удалось ли вытащить Common Name\n if (c.name && c.name[1]) {\n c.name = c.name[1];\n }\n\n c.validFrom = getReadableDate(c.validFrom);\n c.validTo = getReadableDate(c.validTo);\n\n c.label = c.name + ' (до ' + c.validTo + ')';\n\n return c;\n });\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы\n * */\nfunction getDecodedExtendedKeyUsage() {\n var that = this;\n\n return new Promise(function (resolve) {\n that.getExtendedKeyUsage().then(function (certOids) {\n resolve(certOids.reduce(function (oidsLst, oid) {\n oid = {\n id: oid,\n descr: oids[oid] || null\n };\n\n if (oid.descr) {\n oidsLst.unshift(oid);\n } else {\n oidsLst.push(oid);\n }\n\n return oidsLst;\n }, []));\n });\n });\n}\n\n/**\n * Проверка наличия ОИД'а(ОИД'ов) у сертификата\n *\n * @param {String|Array} oids - ОИД'ы для проверки\n * @returns {Promise} с отложенным результатом типа {Boolean}\n * */\nfunction hasExtendedKeyUsage(oids) {\n var that = this;\n\n return new Promise(function (resolve) {\n that.getExtendedKeyUsage().then(function (certOids) {\n var result;\n\n if (Array.isArray(oids)) {\n result = oids.every(function (oidToCheck) {\n return certOids.some(function (certOid) {\n return certOid === oidToCheck;\n });\n });\n } else {\n result = certOids.some(function (certOid) {\n return certOid === oids;\n });\n }\n\n resolve(result);\n });\n });\n}\n\n/**\n * Выводит информацию о системе пользователя\n * */\nfunction getEnvInfo() {\n var parsed = bowser._detect(navigator.userAgent),\n info = {\n browserName: parsed.name,\n browserVersion: parsed.version\n };\n\n if (parsed.mac) {\n info.os = 'Mac';\n } else if (parsed.windows) {\n info.os = 'Windows';\n } else if (parsed.linux) {\n info.os = 'Linux';\n }\n\n return info;\n}\n\n/**\n * Подходящая ли версия CSP\n * */\nfunction isValidCSPVersion(version) {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/);\n\n return version >= 3.6;\n}\n\n/**\n * Подходящая ли версия cades плагина\n * */\nfunction isValidCadesVersion(version) {\n version = version.split('.').reduce(function (verInfo, number, i) {\n if (i === 0) {\n verInfo.major = number;\n } else if (i === 1) {\n verInfo.minor = number;\n } else if (i === 2) {\n verInfo.patch = number;\n }\n\n return verInfo;\n }, {});\n\n if (version.major < 2) {\n return false;\n }\n\n return version.patch >= 12438;\n}\n\nmodule.exports = {\n generateAsyncFn: generateAsyncFn,\n subjectNameTagsTranslations: subjectNameTagsTranslations,\n issuerNameTagsTranslations: issuerNameTagsTranslations,\n parseCertInfo: parseCertInfo,\n getReadableDate: getReadableDate,\n getDateObj: getDateObj,\n prepareCertsInfo: prepareCertsInfo,\n getDecodedExtendedKeyUsage: getDecodedExtendedKeyUsage,\n hasExtendedKeyUsage: hasExtendedKeyUsage,\n getEnvInfo: getEnvInfo,\n isValidCSPVersion: isValidCSPVersion,\n isValidCadesVersion: isValidCadesVersion\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./common.js\n ** module id = 5\n ** module chunks = 0\n **/","module.exports = {\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.6.2.1.7.2': 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.2.1.7.1': 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9': 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.3.8.100.1.10': 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11': 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13': 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.6.3': 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.5.1.24.2.1.3': 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1': 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3': 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./oids.js\n ** module id = 6\n ** module chunks = 0\n **/","module.exports = {\n // CAPICOM_STORE_LOCATION enumeration\n StoreLocation: {\n CAPICOM_MEMORY_STORE: 0,\n CAPICOM_LOCAL_MACHINE_STORE: 1,\n CAPICOM_CURRENT_USER_STORE: 2,\n CAPICOM_ACTIVE_DIRECTORY_USER_STORE: 3,\n CAPICOM_SMART_CARD_USER_STORE: 4\n },\n // CAPICOM_STORE_OPEN_MODE enumeration\n StoreOpenMode: {\n CAPICOM_STORE_OPEN_READ_ONLY: 0,\n CAPICOM_STORE_OPEN_READ_WRITE: 1,\n CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED: 2,\n CAPICOM_STORE_OPEN_EXISTING_ONLY: 128,\n CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED: 256\n },\n // CAPICOM_CERTIFICATE_FIND_TYPE enumeration\n CertFindType: {\n CAPICOM_CERTIFICATE_FIND_SHA1_HASH: 0,\n CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME: 1,\n CAPICOM_CERTIFICATE_FIND_ISSUER_NAME: 2,\n CAPICOM_CERTIFICATE_FIND_ROOT_NAME: 3,\n CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME: 4,\n CAPICOM_CERTIFICATE_FIND_EXTENSION: 5,\n CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY: 6,\n CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY: 7,\n CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY: 8,\n CAPICOM_CERTIFICATE_FIND_TIME_VALID: 9,\n CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID: 10,\n CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED: 11,\n CAPICOM_CERTIFICATE_FIND_KEY_USAGE: 12\n },\n Time: {\n AUTHENTICATED_ATTRIBUTE_SIGNING_TIME: 0\n },\n Check: {\n CHECK_NONE: 0,\n CHECK_TRUSTED_ROOT: 1,\n CHECK_TIME_VALIDITY: 2,\n CHECK_SIGNATURE_VALIDITY: 4,\n CHECK_ONLINE_REVOCATION_STATUS: 8,\n CHECK_OFFLINE_REVOCATION_STATUS: 16,\n TRUST_IS_NOT_TIME_VALID: 1,\n TRUST_IS_NOT_TIME_NESTED: 2,\n TRUST_IS_REVOKED: 4,\n TRUST_IS_NOT_SIGNATURE_VALID: 8,\n TRUST_IS_NOT_VALID_FOR_USAGE: 16,\n TRUST_IS_UNTRUSTED_ROOT: 32,\n TRUST_REVOCATION_STATUS_UNKNOWN: 64,\n TRUST_IS_CYCLIC: 128,\n TRUST_IS_PARTIAL_CHAIN: 65536,\n TRUST_CTL_IS_NOT_TIME_VALID: 131072,\n TRUST_CTL_IS_NOT_SIGNATURE_VALID: 262144,\n TRUST_CTL_IS_NOT_VALID_FOR_USAGE: 524288,\n },\n // CAPICOM_PROPID enumeration\n PropId: {\n CAPICOM_PROPID_UNKNOWN: 0,\n CAPICOM_PROPID_KEY_PROV_HANDLE: 1,\n CAPICOM_PROPID_KEY_PROV_INFO: 2,\n CAPICOM_PROPID_SHA1_HASH: 3,\n CAPICOM_PROPID_HASH_PROP: 3,\n CAPICOM_PROPID_MD5_HASH: 4,\n CAPICOM_PROPID_KEY_CONTEXT: 5,\n CAPICOM_PROPID_KEY_SPEC: 6,\n CAPICOM_PROPID_IE30_RESERVED: 7,\n CAPICOM_PROPID_PUBKEY_HASH_RESERVED: 8,\n CAPICOM_PROPID_ENHKEY_USAGE: 9,\n CAPICOM_PROPID_CTL_USAGE: 9,\n CAPICOM_PROPID_NEXT_UPDATE_LOCATION: 10,\n CAPICOM_PROPID_FRIENDLY_NAME: 11,\n CAPICOM_PROPID_PVK_FILE: 12,\n CAPICOM_PROPID_DESCRIPTION: 13,\n CAPICOM_PROPID_ACCESS_STATE: 14,\n CAPICOM_PROPID_SIGNATURE_HASH: 15,\n CAPICOM_PROPID_SMART_CARD_DATA: 16,\n CAPICOM_PROPID_EFS: 17,\n CAPICOM_PROPID_FORTEZZA_DATA: 18,\n CAPICOM_PROPID_ARCHIVED: 19,\n CAPICOM_PROPID_KEY_IDENTIFIER: 20,\n CAPICOM_PROPID_AUTO_ENROLL: 21,\n CAPICOM_PROPID_PUBKEY_ALG_PARA: 22,\n CAPICOM_PROPID_CROSS_CERT_DIST_POINTS: 23,\n CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH: 24,\n CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH: 25,\n CAPICOM_PROPID_ENROLLMENT: 26,\n CAPICOM_PROPID_DATE_STAMP: 27,\n CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH: 28,\n CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH: 29,\n CAPICOM_PROPID_EXTENDED_ERROR_INFO: 30,\n CAPICOM_PROPID_RENEWAL: 64,\n CAPICOM_PROPID_ARCHIVED_KEY_HASH: 65,\n CAPICOM_PROPID_FIRST_RESERVED: 66,\n CAPICOM_PROPID_LAST_RESERVED: 0x00007FFF,\n CAPICOM_PROPID_FIRST_USER: 0x00008000,\n CAPICOM_PROPID_LAST_USER: 0x0000FFFF\n },\n // CADESCOM_XML_SIGNATURE_TYPE enumeration\n SignatureType: {\n CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED: 0,\n CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING: 1,\n CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE: 2\n },\n // CADESCOM_HASH_ALGORITHM enumeration\n HashAlgorithm: {\n CADESCOM_HASH_ALGORITHM_CP_GOST_3411: 100,\n CADESCOM_HASH_ALGORITHM_MD2: 1,\n CADESCOM_HASH_ALGORITHM_MD4: 2,\n CADESCOM_HASH_ALGORITHM_MD5: 3,\n CADESCOM_HASH_ALGORITHM_SHA_256: 4,\n CADESCOM_HASH_ALGORITHM_SHA_384: 5,\n CADESCOM_HASH_ALGORITHM_SHA_512: 6,\n CADESCOM_HASH_ALGORITHM_SHA1: 0\n },\n CadesType: {\n CADESCOM_CADES_DEFAULT: 0,\n CADESCOM_CADES_BES: 1,\n CADESCOM_CADES_X_LONG_TYPE_1: 0x5d\n },\n ContentEncoding: {\n CADESCOM_BASE64_TO_BINARY: 0x01,\n CADESCOM_STRING_TO_UCS2LE: 0x00\n },\n StoreNames: {\n CAPICOM_MY_STORE: 'My'\n },\n Chain: {\n CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT: 0,\n CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN: 1,\n CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY: 2\n },\n GostXmlDSigUrls: {\n XmlDsigGost3410Url: 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411',\n XmlDsigGost3411Url: 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411',\n XmlDsigGost3410UrlObsolete: 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411',\n XmlDsigGost3411UrlObsolete: 'http://www.w3.org/2001/04/xmldsig-more#gostr3411'\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./constants.js\n ** module id = 7\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 5f5b25deeadb956e6583","webpack:///./index.js","webpack:///../~/bowser/bowser.js","webpack:///../~/webpack/buildin/amd-define.js","webpack:///../vendor/cadesplugin_api.js","webpack:///./api.js","webpack:///./common.js","webpack:///./oids.js","webpack:///./constants.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;AACL;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA,G;;;;;;ACvFA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA,oBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,MAAM;AACpB,eAAc,SAAS;AACvB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,gBAAgB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAqD;AACrD,mDAAkD;AAClD,mDAAkD;AAClD;AACA,eAAc,cAAc;AAC5B,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA,eAAc,OAAO;AACrB,eAAc,QAAQ;AACtB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB;AACtB;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,QAAQ;AACtB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;ACnkBD,8BAA6B,mDAAmD;;;;;;;ACAhF,EAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA,oCAAmC;AACnC;AACA;AACA;AACA,iBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0DAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,U;AACA;AACA;AACA,6CAA4C,iBAAiB,WAAW,UAAU,YAAY,aAAa;AAC3G,sFAAqF,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AAChN,yFAAwF,iBAAiB,yBAAyB,WAAW;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;;AAErC;AACA;AACA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAgD,iBAAiB,WAAW,UAAU,YAAY,aAAa;AAC/G,0FAAyF,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AACpN,6FAA4F,iBAAiB,yBAAyB,WAAW;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB,qCAAoC;AACpC,kBAAiB;AACjB;AACA;AACA;AACA;AACA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA,kBAAiB;AACjB,cAAa;AACb,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAC;;;;;;;ACxrBD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA2B;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB;AACjB;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,QAAQ;AACnB,cAAa,QAAQ,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;;AAErB;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,QAAQ;AACnB,cAAa,QAAQ,wDAAwD;AAC7E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,QAAQ,wDAAwD;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA,cAAa;AACb,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACxiBA;AACA;;AAEA;AACA,UAAS,4EAA4E;AACrF,UAAS,+CAA+C;AACxD,UAAS,8CAA8C;AACvD,UAAS,kDAAkD;AAC3D,UAAS,4CAA4C;AACrD,UAAS,4CAA4C;AACrD,UAAS,gDAAgD;AACzD,UAAS,8CAA8C;AACvD,UAAS,0DAA0D;AACnE,UAAS,+CAA+C;AACxD,UAAS,qDAAqD;AAC9D,UAAS,2DAA2D;AACpE,UAAS,wDAAwD;AACjE,UAAS,kDAAkD;AAC3D,UAAS,2CAA2C;AACpD,UAAS;AACT;;AAEA;AACA,UAAS,4EAA4E;AACrF,UAAS,2DAA2D;AACpE,UAAS,4CAA4C;AACrD,UAAS,4CAA4C;AACrD,UAAS,gDAAgD;AACzD,UAAS,8CAA8C;AACvD,UAAS,0CAA0C;AACnD,UAAS,+CAA+C;AACxD,UAAS,qDAAqD;AAC9D,UAAS,2DAA2D;AACpE,UAAS,wDAAwD;AACjE,UAAS,kDAAkD;AAC3D,UAAS,2CAA2C;AACpD,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,2BAA0B,WAAW;;AAErC;AACA,6EAA4E;AAC5E;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8CAA6C;AAC7C,2BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC,EAAE;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAiB;AACjB,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB;AACjB;AACA;;AAEA;AACA,cAAa;AACb,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA,YAAW,aAAa;AACxB,cAAa,QAAQ,gCAAgC;AACrD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,kBAAiB;AACjB,cAAa;AACb;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA,UAAS;AACT,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;;AAEA;AACA,MAAK,IAAI;;AAET;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACpTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,G","file":"crypto-pro.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 5f5b25deeadb956e6583\n **/","var bowser = require('bowser/bowser'),\n browserInfo = bowser._detect(navigator.userAgent),\n global = Function('return this')(),\n canPromise = Boolean(global.Promise),\n CryptoProConfig = global.CryptoProConfig,\n canAsync,\n cadesplugin,\n cryptoService,\n _errorMsg = '',\n _isLoaded = false,\n _onLoadCbQueue = [];\n\nglobal.allow_firefox_cadesplugin_async = browserInfo.firefox && browserInfo.version >= 52;\n\nrequire('../vendor/cadesplugin_api');\n\ncadesplugin = global.cadesplugin;\n\ncanAsync = Boolean(cadesplugin.CreateObjectAsync);\n\ncryptoService = require('./api');\n\nfunction execOnloadQueue() {\n _onLoadCbQueue.forEach(function (callback) {\n callback();\n });\n}\n\nfunction passToWaitOnLoad(callback) {\n if (Object.prototype.toString.call(callback) === '[object Function]') {\n _onLoadCbQueue.push(callback);\n }\n}\n\nfunction callOnLoad(method) {\n _isLoaded ? method() : passToWaitOnLoad(method);\n}\n\nfunction finishLoading() {\n _isLoaded = true;\n\n execOnloadQueue();\n}\n\nfunction call() {\n var args = Array.prototype.slice.call(arguments),\n methodName = args.shift();\n\n return new Promise(function (resolve, reject) {\n callOnLoad(function () {\n var method;\n\n if (_errorMsg) {\n reject(_errorMsg);\n return;\n }\n\n method = cryptoService[methodName];\n\n if (!method) {\n reject('Метод \"' + methodName + '\" не доступен');\n return;\n }\n\n method.apply(null, args).then(resolve, reject);\n });\n });\n}\n\nif (cadesplugin) {\n // Уровень отладки (LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_ERROR)\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n if (canPromise) {\n cadesplugin.then(finishLoading, function () {\n _errorMsg = 'КриптоПРО ЭЦП Browser Plug-In не доступен';\n finishLoading();\n });\n } else {\n throw new Error('Не поддерживаются промисы. Необходим полифилл.');\n }\n} else {\n throw new Error('Не подключен модуль для работы с cades plugin');\n}\n\nmodule.exports = {\n call: call\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","/*!\n * Bowser - a browser detector\n * https://github.com/ded/bowser\n * MIT License | (c) Dustin Diaz 2015\n */\n\n!function (name, definition) {\n if (typeof module != 'undefined' && module.exports) module.exports = definition()\n else if (typeof define == 'function' && define.amd) define(name, definition)\n else this[name] = definition()\n}('bowser', function () {\n /**\n * See useragents.js for examples of navigator.userAgent\n */\n\n var t = true\n\n function detect(ua) {\n\n function getFirstMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[1]) || '';\n }\n\n function getSecondMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[2]) || '';\n }\n\n var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase()\n , likeAndroid = /like android/i.test(ua)\n , android = !likeAndroid && /android/i.test(ua)\n , nexusMobile = /nexus\\s*[0-6]\\s*/i.test(ua)\n , nexusTablet = !nexusMobile && /nexus\\s*[0-9]+/i.test(ua)\n , chromeos = /CrOS/.test(ua)\n , silk = /silk/i.test(ua)\n , sailfish = /sailfish/i.test(ua)\n , tizen = /tizen/i.test(ua)\n , webos = /(web|hpw)os/i.test(ua)\n , windowsphone = /windows phone/i.test(ua)\n , samsungBrowser = /SamsungBrowser/i.test(ua)\n , windows = !windowsphone && /windows/i.test(ua)\n , mac = !iosdevice && !silk && /macintosh/i.test(ua)\n , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)\n , edgeVersion = getFirstMatch(/edge\\/(\\d+(\\.\\d+)?)/i)\n , versionIdentifier = getFirstMatch(/version\\/(\\d+(\\.\\d+)?)/i)\n , tablet = /tablet/i.test(ua)\n , mobile = !tablet && /[^-]mobi/i.test(ua)\n , xbox = /xbox/i.test(ua)\n , result\n\n if (/opera/i.test(ua)) {\n // an old Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n } else if (/opr|opios/i.test(ua)) {\n // a new Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: getFirstMatch(/(?:opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/SamsungBrowser/i.test(ua)) {\n result = {\n name: 'Samsung Internet for Android'\n , samsungBrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/coast/i.test(ua)) {\n result = {\n name: 'Opera Coast'\n , coast: t\n , version: versionIdentifier || getFirstMatch(/(?:coast)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/yabrowser/i.test(ua)) {\n result = {\n name: 'Yandex Browser'\n , yandexbrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/ucbrowser/i.test(ua)) {\n result = {\n name: 'UC Browser'\n , ucbrowser: t\n , version: getFirstMatch(/(?:ucbrowser)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/mxios/i.test(ua)) {\n result = {\n name: 'Maxthon'\n , maxthon: t\n , version: getFirstMatch(/(?:mxios)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/epiphany/i.test(ua)) {\n result = {\n name: 'Epiphany'\n , epiphany: t\n , version: getFirstMatch(/(?:epiphany)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/puffin/i.test(ua)) {\n result = {\n name: 'Puffin'\n , puffin: t\n , version: getFirstMatch(/(?:puffin)[\\s\\/](\\d+(?:\\.\\d+)?)/i)\n }\n }\n else if (/sleipnir/i.test(ua)) {\n result = {\n name: 'Sleipnir'\n , sleipnir: t\n , version: getFirstMatch(/(?:sleipnir)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/k-meleon/i.test(ua)) {\n result = {\n name: 'K-Meleon'\n , kMeleon: t\n , version: getFirstMatch(/(?:k-meleon)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (windowsphone) {\n result = {\n name: 'Windows Phone'\n , windowsphone: t\n }\n if (edgeVersion) {\n result.msedge = t\n result.version = edgeVersion\n }\n else {\n result.msie = t\n result.version = getFirstMatch(/iemobile\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/msie|trident/i.test(ua)) {\n result = {\n name: 'Internet Explorer'\n , msie: t\n , version: getFirstMatch(/(?:msie |rv:)(\\d+(\\.\\d+)?)/i)\n }\n } else if (chromeos) {\n result = {\n name: 'Chrome'\n , chromeos: t\n , chromeBook: t\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n } else if (/chrome.+? edge/i.test(ua)) {\n result = {\n name: 'Microsoft Edge'\n , msedge: t\n , version: edgeVersion\n }\n }\n else if (/vivaldi/i.test(ua)) {\n result = {\n name: 'Vivaldi'\n , vivaldi: t\n , version: getFirstMatch(/vivaldi\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (sailfish) {\n result = {\n name: 'Sailfish'\n , sailfish: t\n , version: getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/seamonkey\\//i.test(ua)) {\n result = {\n name: 'SeaMonkey'\n , seamonkey: t\n , version: getFirstMatch(/seamonkey\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/firefox|iceweasel|fxios/i.test(ua)) {\n result = {\n name: 'Firefox'\n , firefox: t\n , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \\/](\\d+(\\.\\d+)?)/i)\n }\n if (/\\((mobile|tablet);[^\\)]*rv:[\\d\\.]+\\)/i.test(ua)) {\n result.firefoxos = t\n }\n }\n else if (silk) {\n result = {\n name: 'Amazon Silk'\n , silk: t\n , version : getFirstMatch(/silk\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/phantom/i.test(ua)) {\n result = {\n name: 'PhantomJS'\n , phantom: t\n , version: getFirstMatch(/phantomjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/slimerjs/i.test(ua)) {\n result = {\n name: 'SlimerJS'\n , slimer: t\n , version: getFirstMatch(/slimerjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/blackberry|\\bbb\\d+/i.test(ua) || /rim\\stablet/i.test(ua)) {\n result = {\n name: 'BlackBerry'\n , blackberry: t\n , version: versionIdentifier || getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (webos) {\n result = {\n name: 'WebOS'\n , webos: t\n , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\\/(\\d+(\\.\\d+)?)/i)\n };\n /touchpad\\//i.test(ua) && (result.touchpad = t)\n }\n else if (/bada/i.test(ua)) {\n result = {\n name: 'Bada'\n , bada: t\n , version: getFirstMatch(/dolfin\\/(\\d+(\\.\\d+)?)/i)\n };\n }\n else if (tizen) {\n result = {\n name: 'Tizen'\n , tizen: t\n , version: getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n };\n }\n else if (/qupzilla/i.test(ua)) {\n result = {\n name: 'QupZilla'\n , qupzilla: t\n , version: getFirstMatch(/(?:qupzilla)[\\s\\/](\\d+(?:\\.\\d+)+)/i) || versionIdentifier\n }\n }\n else if (/chromium/i.test(ua)) {\n result = {\n name: 'Chromium'\n , chromium: t\n , version: getFirstMatch(/(?:chromium)[\\s\\/](\\d+(?:\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/chrome|crios|crmo/i.test(ua)) {\n result = {\n name: 'Chrome'\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (android) {\n result = {\n name: 'Android'\n , version: versionIdentifier\n }\n }\n else if (/safari|applewebkit/i.test(ua)) {\n result = {\n name: 'Safari'\n , safari: t\n }\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if (iosdevice) {\n result = {\n name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'\n }\n // WTF: version is not part of user agent in web apps\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if(/googlebot/i.test(ua)) {\n result = {\n name: 'Googlebot'\n , googlebot: t\n , version: getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i) || versionIdentifier\n }\n }\n else {\n result = {\n name: getFirstMatch(/^(.*)\\/(.*) /),\n version: getSecondMatch(/^(.*)\\/(.*) /)\n };\n }\n\n // set webkit or gecko flag for browsers based on these engines\n if (!result.msedge && /(apple)?webkit/i.test(ua)) {\n if (/(apple)?webkit\\/537\\.36/i.test(ua)) {\n result.name = result.name || \"Blink\"\n result.blink = t\n } else {\n result.name = result.name || \"Webkit\"\n result.webkit = t\n }\n if (!result.version && versionIdentifier) {\n result.version = versionIdentifier\n }\n } else if (!result.opera && /gecko\\//i.test(ua)) {\n result.name = result.name || \"Gecko\"\n result.gecko = t\n result.version = result.version || getFirstMatch(/gecko\\/(\\d+(\\.\\d+)?)/i)\n }\n\n // set OS flags for platforms that have multiple browsers\n if (!result.windowsphone && !result.msedge && (android || result.silk)) {\n result.android = t\n } else if (!result.windowsphone && !result.msedge && iosdevice) {\n result[iosdevice] = t\n result.ios = t\n } else if (mac) {\n result.mac = t\n } else if (xbox) {\n result.xbox = t\n } else if (windows) {\n result.windows = t\n } else if (linux) {\n result.linux = t\n }\n\n // OS version extraction\n var osVersion = '';\n if (result.windowsphone) {\n osVersion = getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i);\n } else if (iosdevice) {\n osVersion = getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i);\n osVersion = osVersion.replace(/[_\\s]/g, '.');\n } else if (android) {\n osVersion = getFirstMatch(/android[ \\/-](\\d+(\\.\\d+)*)/i);\n } else if (result.webos) {\n osVersion = getFirstMatch(/(?:web|hpw)os\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.blackberry) {\n osVersion = getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i);\n } else if (result.bada) {\n osVersion = getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.tizen) {\n osVersion = getFirstMatch(/tizen[\\/\\s](\\d+(\\.\\d+)*)/i);\n }\n if (osVersion) {\n result.osversion = osVersion;\n }\n\n // device type extraction\n var osMajorVersion = osVersion.split('.')[0];\n if (\n tablet\n || nexusTablet\n || iosdevice == 'ipad'\n || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile)))\n || result.silk\n ) {\n result.tablet = t\n } else if (\n mobile\n || iosdevice == 'iphone'\n || iosdevice == 'ipod'\n || android\n || nexusMobile\n || result.blackberry\n || result.webos\n || result.bada\n ) {\n result.mobile = t\n }\n\n // Graded Browser Support\n // http://developer.yahoo.com/yui/articles/gbs\n if (result.msedge ||\n (result.msie && result.version >= 10) ||\n (result.yandexbrowser && result.version >= 15) ||\n\t\t (result.vivaldi && result.version >= 1.0) ||\n (result.chrome && result.version >= 20) ||\n (result.samsungBrowser && result.version >= 4) ||\n (result.firefox && result.version >= 20.0) ||\n (result.safari && result.version >= 6) ||\n (result.opera && result.version >= 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] >= 6) ||\n (result.blackberry && result.version >= 10.1)\n || (result.chromium && result.version >= 20)\n ) {\n result.a = t;\n }\n else if ((result.msie && result.version < 10) ||\n (result.chrome && result.version < 20) ||\n (result.firefox && result.version < 20.0) ||\n (result.safari && result.version < 6) ||\n (result.opera && result.version < 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] < 6)\n || (result.chromium && result.version < 20)\n ) {\n result.c = t\n } else result.x = t\n\n return result\n }\n\n var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')\n\n bowser.test = function (browserList) {\n for (var i = 0; i < browserList.length; ++i) {\n var browserItem = browserList[i];\n if (typeof browserItem=== 'string') {\n if (browserItem in bowser) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Get version precisions count\n *\n * @example\n * getVersionPrecision(\"1.10.3\") // 3\n *\n * @param {string} version\n * @return {number}\n */\n function getVersionPrecision(version) {\n return version.split(\".\").length;\n }\n\n /**\n * Array::map polyfill\n *\n * @param {Array} arr\n * @param {Function} iterator\n * @return {Array}\n */\n function map(arr, iterator) {\n var result = [], i;\n if (Array.prototype.map) {\n return Array.prototype.map.call(arr, iterator);\n }\n for (i = 0; i < arr.length; i++) {\n result.push(iterator(arr[i]));\n }\n return result;\n }\n\n /**\n * Calculate browser version weight\n *\n * @example\n * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1\n * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1\n * compareVersions(['1.10.2.1', '1.10.2.1']); // 0\n * compareVersions(['1.10.2.1', '1.0800.2']); // -1\n *\n * @param {Array} versions versions to compare\n * @return {Number} comparison result\n */\n function compareVersions(versions) {\n // 1) get common precision for both versions, for example for \"10.0\" and \"9\" it should be 2\n var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));\n var chunks = map(versions, function (version) {\n var delta = precision - getVersionPrecision(version);\n\n // 2) \"9\" -> \"9.0\" (for precision = 2)\n version = version + new Array(delta + 1).join(\".0\");\n\n // 3) \"9.0\" -> [\"000000000\"\", \"000000009\"]\n return map(version.split(\".\"), function (chunk) {\n return new Array(20 - chunk.length).join(\"0\") + chunk;\n }).reverse();\n });\n\n // iterate in reverse order by reversed chunks array\n while (--precision >= 0) {\n // 4) compare: \"000000009\" > \"000000010\" = false (but \"9\" > \"10\" = true)\n if (chunks[0][precision] > chunks[1][precision]) {\n return 1;\n }\n else if (chunks[0][precision] === chunks[1][precision]) {\n if (precision === 0) {\n // all version chunks are same\n return 0;\n }\n }\n else {\n return -1;\n }\n }\n }\n\n /**\n * Check if browser is unsupported\n *\n * @example\n * bowser.isUnsupportedBrowser({\n * msie: \"10\",\n * firefox: \"23\",\n * chrome: \"29\",\n * safari: \"5.1\",\n * opera: \"16\",\n * phantom: \"534\"\n * });\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function isUnsupportedBrowser(minVersions, strictMode, ua) {\n var _bowser = bowser;\n\n // make strictMode param optional with ua param usage\n if (typeof strictMode === 'string') {\n ua = strictMode;\n strictMode = void(0);\n }\n\n if (strictMode === void(0)) {\n strictMode = false;\n }\n if (ua) {\n _bowser = detect(ua);\n }\n\n var version = \"\" + _bowser.version;\n for (var browser in minVersions) {\n if (minVersions.hasOwnProperty(browser)) {\n if (_bowser[browser]) {\n if (typeof minVersions[browser] !== 'string') {\n throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));\n }\n\n // browser version and min supported version.\n return compareVersions([version, minVersions[browser]]) < 0;\n }\n }\n }\n\n return strictMode; // not found\n }\n\n /**\n * Check if browser is supported\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function check(minVersions, strictMode, ua) {\n return !isUnsupportedBrowser(minVersions, strictMode, ua);\n }\n\n bowser.isUnsupportedBrowser = isUnsupportedBrowser;\n bowser.compareVersions = compareVersions;\n bowser.check = check;\n\n /*\n * Set our detect method to the main bowser object so we can\n * reuse it to test other user agents.\n * This is needed to implement future tests.\n */\n bowser._detect = detect;\n\n return bowser\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/bowser/bowser.js\n ** module id = 1\n ** module chunks = 0\n **/","module.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/webpack/buildin/amd-define.js\n ** module id = 2\n ** module chunks = 0\n **/",";(function () {\n //already loaded\n if(window.cadesplugin)\n return;\n\n var pluginObject;\n var plugin_resolved = 0;\n var plugin_reject;\n var plugin_resolve;\n var isOpera = 0;\n var isFireFox = 0;\n\tvar isEdge = 0;\n var failed_extensions = 0;\n\n var canPromise = !!window.Promise;\n var cadesplugin;\n\n if(canPromise)\n {\n cadesplugin = new Promise(function(resolve, reject)\n {\n plugin_resolve = resolve;\n plugin_reject = reject;\n });\n } else\n {\n cadesplugin = {};\n }\n \n function check_browser() {\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if(/trident/i.test(M[1])){\n tem= /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return {name:'IE',version:(tem[1] || '')};\n }\n if(M[1]=== 'Chrome'){\n tem= ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if(tem!= null) return {name:tem[1].replace('OPR', 'Opera'),version:tem[2]};\n }\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\n if((tem= ua.match(/version\\/(\\d+)/i))!= null) M.splice(1, 1, tem[1]);\n return {name:M[0],version:M[1]};\n }\n var browserSpecs = check_browser();\n\n function cpcsp_console_log(level, msg){\n //IE9 не может писать в консоль если не открыта вкладка developer tools\n if(typeof(console) == 'undefined')\n return;\n if (level <= cadesplugin.current_log_level ){\n if (level == cadesplugin.LOG_LEVEL_DEBUG)\n console.log(\"DEBUG: %s\", msg);\n if (level == cadesplugin.LOG_LEVEL_INFO)\n console.info(\"INFO: %s\", msg);\n if (level == cadesplugin.LOG_LEVEL_ERROR)\n console.error(\"ERROR: %s\", msg);\n return;\n }\n }\n\n function set_log_level(level){\n if (!((level == cadesplugin.LOG_LEVEL_DEBUG) ||\n (level == cadesplugin.LOG_LEVEL_INFO) ||\n (level == cadesplugin.LOG_LEVEL_ERROR))){\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\n return;\n }\n cadesplugin.current_log_level = level;\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_DEBUG)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_INFO)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_ERROR)\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\n if(isNativeMessageSupported())\n {\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_DEBUG)\n window.postMessage(\"set_log_level=debug\", \"*\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_INFO)\n window.postMessage(\"set_log_level=info\", \"*\");\n if (cadesplugin.current_log_level == cadesplugin.LOG_LEVEL_ERROR)\n window.postMessage(\"set_log_level=error\", \"*\");\n }\n }\n\n function set_constantValues()\n {\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\n \n cadesplugin.CAPICOM_MY_STORE = \"My\";\n\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\n\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\n\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\n cadesplugin.CADESCOM_CADES_BES = 1;\n cadesplugin.CADESCOM_CADES_T = 0x5;\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\n\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\n\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\n\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\n\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\n\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\n\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\n\n cadesplugin.CAPICOM_OID_OTHER = 0;\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\n\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\n cadesplugin.CAPICOM_EKU_OTHER = 0;\n\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\n\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\n\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\n\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\n\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\n\n cadesplugin.LOG_LEVEL_DEBUG = 4;\n cadesplugin.LOG_LEVEL_INFO = 2;\n cadesplugin.LOG_LEVEL_ERROR = 1;\n }\n\n function async_spawn(generatorFunc) {\n function continuer(verb, arg) {\n var result;\n try {\n result = generator[verb](arg);\n } catch (err) {\n return Promise.reject(err);\n }\n if (result.done) {\n return result.value;\n } else {\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\n }\n }\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\n var onFulfilled = continuer.bind(continuer, \"next\");\n var onRejected = continuer.bind(continuer, \"throw\");\n return onFulfilled();\n }\n\n function isIE() {\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\n return (browserSpecs.name == 'IE' || browserSpecs.name == 'MSIE');\n }\n\n function isIOS() {\n var retVal = (navigator.userAgent.match(/ipod/i) ||\n navigator.userAgent.match(/ipad/i) ||\n navigator.userAgent.match(/iphone/i));\n return retVal;\n }\n\n function isNativeMessageSupported()\n {\n // В IE работаем через NPAPI\n if(isIE())\n return false;\n // В Edge работаем через NativeMessage\n if(browserSpecs.name == 'Edge') {\n isEdge = true;\n return true;\n }\n // В Chrome, Firefox и Opera работаем через асинхронную версию в зависимости от версии\n if(browserSpecs.name == 'Opera') {\n isOpera = true;\n if(browserSpecs.version >= 33){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name == 'Firefox') {\n isFireFox = true;\n if(browserSpecs.version >= 52){\n return true;\n }\n else{\n return false;\n }\n }\n if(browserSpecs.name == 'Chrome') {\n if(browserSpecs.version >= 42){\n return true;\n }\n else{\n return false;\n }\n }\n }\n\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\n function CreateObject(name) {\n if (isIOS()) {\n // На iOS для создания объектов используется функция\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\n }\n if (isIE()) {\n // В Internet Explorer создаются COM-объекты\n if (name.match(/X509Enrollment/i)) {\n try {\n // Объекты CertEnroll создаются через CX509EnrollmentWebClassFactory\n var objCertEnrollClassFactory = document.getElementById(\"certEnrollClassFactory\");\n return objCertEnrollClassFactory.CreateObject(name);\n }\n catch (e) {\n throw(\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\n }\n }\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\n try {\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\n return objWebClassFactory.CreateObject(name);\n }\n catch (e) {\n // Для версий плагина ниже 2.0.12538\n return new ActiveXObject(name);\n }\n }\n // создаются объекты NPAPI\n return pluginObject.CreateObject(name);\n }\n\n function decimalToHexString(number) {\n if (number < 0) {\n number = 0xFFFFFFFF + number + 1;\n }\n\n return number.toString(16).toUpperCase();\n }\n \n function GetMessageFromException(e) {\n var err = e.message;\n if (!err) {\n err = e;\n } else if (e.number) {\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\n }\n return err;\n }\n\n function getLastError(exception) {\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\n return GetMessageFromException(exception);\n }\n\n try {\n return pluginObject.getLastError();\n } catch(e) {\n return GetMessageFromException(exception);\n }\n }\n\n // Функция для удаления созданных объектов\n function ReleasePluginObjects() {\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\n }\n\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\n function CreateObjectAsync(name) {\n return pluginObject.CreateObjectAsync(name);\n }\n\n //Функции для IOS\n var ru_cryptopro_npcades_10_native_bridge = {\n callbacksCount : 1,\n callbacks : {},\n\n // Automatically called by native layer when a result is available\n resultForCallback : function resultForCallback(callbackId, resultArray) {\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\n if (!callback) return;\n callback.apply(null,resultArray);\n },\n\n // Use this in javascript to request native objective-c code\n // functionName : string (I think the name is explicit :p)\n // args : array of arguments\n // callback : function with n-arguments that is going to be called when the native code returned\n call : function call(functionName, args, callback) {\n var hasCallback = callback && typeof callback == \"function\";\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\n\n if (hasCallback)\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\n\n var iframe = document.createElement(\"IFRAME\");\n var arrObjs = new Array(\"_CPNP_handle\");\n try{\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\n } catch(e){\n alert(e);\n }\n document.documentElement.appendChild(iframe);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }\n };\n\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\n var tmpobj;\n var ex;\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\n ex = e;\n var str='tmpobj='+response;\n eval(str);\n if (typeof (tmpobj) == \"string\"){\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\n }\n });\n if(ex)\n throw ex;\n return tmpobj;\n }\n\n function show_firefox_missing_extension_dialog()\n {\n if (!window.cadesplugin_skip_extension_install)\n { \n var ovr = document.createElement('div');\n ovr.id = \"cadesplugin_ovr\";\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\n ovr.innerHTML = \"
\" +\n \"\" +\n \"

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

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

\" +\n \"
\";\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n\n ovr.addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n ovr.style.visibility=\"visible\";\n }\n }\n\n\n //Выводим окно поверх других с предложением установить расширение для Opera.\n //Если установленна переменная cadesplugin_skip_extension_install - не предлагаем установить расширение\n function install_opera_extension()\n {\n if (!window.cadesplugin_skip_extension_install)\n {\n document.addEventListener('DOMContentLoaded', function() {\n var ovr = document.createElement('div');\n ovr.id = \"cadesplugin_ovr\";\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\n ovr.innerHTML = \"
\" +\n \"\" +\n \"

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

\" +\n \"
\";\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\n var btn_install = document.getElementById(\"cadesplugin_install\");\n btn_install.addEventListener('click', function(event) {\n opr.addons.installExtension(\"epebfcehmdedogndhlcacafjaacknbcm\",\n function()\n {\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n location.reload();\n },\n function(){})\n });\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n\n ovr.addEventListener('click',function()\n {\n plugin_loaded_error(\"Плагин недоступен\");\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\n });\n ovr.style.visibility=\"visible\";\n document.getElementById(\"cadesplugin_ovr_item\").addEventListener('click',function(e){\n e.stopPropagation();\n });\n });\n }else\n {\n plugin_loaded_error(\"Плагин недоступен\");\n }\n }\n\n function firefox_or_edge_nmcades_onload() {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n\n function nmcades_api_onload () {\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\n window.addEventListener(\"message\", function (event){\n if (typeof(event.data) != \"string\" || !event.data.match(\"cadesplugin_loaded\"))\n return;\n if(isFireFox || isEdge)\n {\n // Для Firefox вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", url);\n fileref.onerror = plugin_loaded_error;\n fileref.onload = firefox_or_edge_nmcades_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n // Для Firefox и Edge у нас только по одному расширению.\n failed_extensions++;\n }else {\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\n }\n }, false);\n }\n\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge\n function load_extension()\n {\n\n if(isFireFox || isEdge){\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\n nmcades_api_onload();\n return;\n } else {\n // в асинхронном варианте для chrome и opera подключаем оба расширения\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\n fileref.onerror = plugin_loaded_error;\n fileref.onload = nmcades_api_onload;\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }\n }\n\n //Загружаем плагин для NPAPI\n function load_npapi_plugin()\n {\n var elem = document.createElement('object');\n elem.setAttribute(\"id\", \"cadesplugin_object\");\n elem.setAttribute(\"type\", \"application/x-cades\");\n elem.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\n pluginObject = document.getElementById(\"cadesplugin_object\");\n if(isIE())\n {\n var elem1 = document.createElement('object');\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\n elem1.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\n var elem2 = document.createElement('object');\n elem2.setAttribute(\"id\", \"webClassFactory\");\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\n elem2.setAttribute(\"style\", \"visibility: hidden\");\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\n }\n }\n\n //Отправляем событие что все ок.\n function plugin_loaded()\n {\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_resolve();\n }else {\n window.postMessage(\"cadesplugin_loaded\", \"*\");\n }\n }\n\n //Отправляем событие что сломались.\n function plugin_loaded_error(msg)\n {\n if(isNativeMessageSupported())\n {\n //в асинхронном варианте подключаем оба расширения, если сломались оба пробуем установить для Opera\n failed_extensions++;\n if(failed_extensions<2)\n return;\n if(isOpera && (typeof(msg) == 'undefined'|| typeof(msg) == 'object'))\n {\n install_opera_extension();\n return;\n }\n }\n if(typeof(msg) == 'undefined' || typeof(msg) == 'object')\n msg = \"Плагин недоступен\";\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(msg);\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n }\n\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\n function check_load_timeout()\n {\n if(plugin_resolved == 1)\n return;\n if(isFireFox)\n {\n show_firefox_missing_extension_dialog();\n }\n plugin_resolved = 1;\n if(canPromise)\n {\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\n } else {\n window.postMessage(\"cadesplugin_load_error\", \"*\");\n }\n\n }\n\n //Вспомогательная функция для NPAPI\n function createPromise(arg)\n {\n return new Promise(arg);\n }\n\n function check_npapi_plugin (){\n try {\n var oAbout = CreateObject(\"CAdESCOM.About\");\n plugin_loaded();\n }\n catch (err) {\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\n // Объект создать не удалось, проверим, установлен ли\n // вообще плагин. Такая возможность есть не во всех браузерах\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\n if (mimetype) {\n var plugin = mimetype.enabledPlugin;\n if (plugin) {\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\n }else\n {\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\n }\n }else\n {\n plugin_loaded_error(\"Плагин недоступен\");\n }\n }\n }\n\n //Проверяем работает ли плагин\n function check_plugin_working()\n {\n var div = document.createElement(\"div\");\n div.innerHTML = \"\";\n var isIeLessThan9 = (div.getElementsByTagName(\"iecheck\").length == 1);\n if (isIeLessThan9) {\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\n return;\n }\n\n if(isNativeMessageSupported())\n {\n load_extension();\n }else if(!canPromise) {\n window.addEventListener(\"message\", function (event){\n if (event.data != \"cadesplugin_echo_request\")\n return;\n load_npapi_plugin();\n check_npapi_plugin();\n },\n false);\n }else\n {\n if(document.readyState === \"complete\"){\n load_npapi_plugin();\n check_npapi_plugin();\n } else {\n window.addEventListener(\"load\", function (event) {\n load_npapi_plugin();\n check_npapi_plugin();\n }, false);\n }\n }\n }\n\n function set_pluginObject(obj)\n {\n pluginObject = obj;\n }\n\n //Export\n cadesplugin.JSModuleVersion = \"2.1.0\";\n cadesplugin.async_spawn = async_spawn;\n cadesplugin.set = set_pluginObject;\n cadesplugin.set_log_level = set_log_level;\n cadesplugin.getLastError = getLastError;\n\n if(isNativeMessageSupported())\n {\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\n }\n\n if(!isNativeMessageSupported())\n {\n cadesplugin.CreateObject = CreateObject;\n }\n\n if(window.cadesplugin_load_timeout)\n {\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\n }\n else\n {\n setTimeout(check_load_timeout, 20000);\n }\n\n set_constantValues();\n\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\n window.cadesplugin = cadesplugin;\n check_plugin_working();\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../vendor/cadesplugin_api.js\n ** module id = 3\n ** module chunks = 0\n **/","var cryptoCommon = require('./common'),\n cryptoConstants = require('./constants'),\n _certListCache;\n\nfunction Certificate(item) {\n this._cert = item._cert;\n this.thumbprint = item.thumbprint;\n this.subjectName = item.subjectName;\n this.issuerName = item.issuerName;\n this.validFrom = item.validFrom;\n this.validTo = item.validTo;\n}\n\n/**\n * Проверяет, валиден ли сертификат\n * */\nCertificate.prototype.isValid = function isValid() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function isValid() {\n var result;\n\n try {\n result = 'yield' + cert.IsValid();\n result = 'yield' + result.Result;\n } catch (err) {\n reject('Ошибка при проверке сертификата: ', err.message);\n return;\n }\n\n resolve(result);\n }));\n });\n};\n\n/**\n * Достает указанное свойство у сертификата\n * */\nCertificate.prototype.getProp = function (propName) {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getProp() {\n var result;\n\n try {\n result = 'yield' + cert[propName];\n } catch (err) {\n reject('Ошибка при обращении к свойству сертификата: ', err.message);\n return;\n }\n\n resolve(result);\n }));\n });\n};\n\n/**\n * Экспорт base64 представления сертификата пользователя\n * */\nCertificate.prototype.exportBase64 = function exportBase64() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function exportBase64() {\n var base64;\n\n try {\n base64 = 'yield' + cert.Export(0);\n } catch (err) {\n reject('Ошибка при экспорте сертификата: ', err.message);\n return;\n }\n\n resolve(base64);\n }));\n });\n};\n\n/**\n * Возвращает информацию об алгоритме\n * */\nCertificate.prototype.getAlgorithm = function getAlgorithm() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getAlgorithm() {\n var result = {},\n algorithm;\n\n try {\n algorithm = 'yield' + cert.PublicKey();\n algorithm = 'yield' + algorithm.Algorithm;\n\n result.algorithm = 'yield' + algorithm.FriendlyName;\n result.oid = 'yield' + algorithm.Value;\n } catch (err) {\n reject('Ошибка при получении алгоритма: ', err.message);\n return;\n }\n\n resolve(result);\n }));\n });\n};\n\n/**\n * Разбирает SubjectName сертификата по тэгам\n * */\nCertificate.prototype.getOwnerInfo = function getOwnerInfo() {\n return getCertInfo.call(this, cryptoCommon.subjectNameTagsTranslations, 'SubjectName');\n};\n\n/**\n * Разбирает IssuerName сертификата по тэгам\n * */\nCertificate.prototype.getIssuerInfo = function getIssuerInfo() {\n return getCertInfo.call(this, cryptoCommon.issuerNameTagsTranslations, 'IssuerName');\n};\n\n/**\n * Получение OID сертификата\n *\n * @returns {Array} Возвращает массив OID (улучшенного ключа)\n * */\nCertificate.prototype.getExtendedKeyUsage = function getExtendedKeyUsage() {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getExtendedKeyUsage() {\n var OIDS = [],\n count,\n item;\n\n try {\n count = 'yield' + cert.ExtendedKeyUsage();\n count = 'yield' + count.EKUs;\n count = 'yield' + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n item = 'yield' + cert.ExtendedKeyUsage();\n item = 'yield' + item.EKUs;\n item = 'yield' + item.Item(count);\n item = 'yield' + item.OID;\n\n OIDS.push(item);\n\n count--;\n }\n }\n } catch (err) {\n reject('Ошибка при получении ОИД\\'ов: ', err.message);\n return;\n }\n\n resolve(OIDS);\n }));\n });\n};\n\nCertificate.prototype.getDecodedExtendedKeyUsage = cryptoCommon.getDecodedExtendedKeyUsage;\n\nCertificate.prototype.hasExtendedKeyUsage = cryptoCommon.hasExtendedKeyUsage;\n\n/**\n * Проверяет корректность настроек ЭП на машине\n * */\nfunction isValidEDSSettings() {\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function isValidEDSSettings() {\n var result;\n\n try {\n result = 'yield' + cryptoCommon.createObj('CAdESCOM.About');\n } catch (error) {\n reject('Настройки ЭП на данной машине не верны');\n }\n\n resolve();\n }));\n });\n}\n\n/**\n * Получить сертификат в формате cades по хэшу\n * */\nfunction getCadesCert(hash) {\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getCadesCert() {\n var oStore = 'yield' + cryptoCommon.createObj('CAdESCOM.Store'),\n certs,\n certCnt,\n cert;\n\n if (!oStore) {\n reject('Не удалось получить доступ к хранилищу сертификатов');\n return;\n }\n\n // Открываем хранилище\n try {\n void('yield' + oStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED\n ));\n } catch (err) {\n reject('Ошибка при открытии хранилища: ' + err.message);\n return;\n }\n\n // Получаем доступ к сертификатам\n try {\n certs = 'yield' + oStore.Certificates;\n certCnt = 'yield' + certs.Count;\n } catch (err) {\n reject('Ошибка получения списка сертификатов: ' + err.message);\n return;\n }\n\n if (!certCnt) {\n reject('Нет доступных сертификатов');\n return;\n }\n\n // Получаем сертификат по хэшу\n try {\n certs = 'yield' + certs.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, hash);\n\n if (certs.Count) {\n cert = 'yield' + certs.Item(1);\n } else {\n throw new Error(hash);\n }\n } catch (err) {\n reject('Не удалось получить сертификат по хэшу: ' + err.message);\n return;\n }\n\n oStore.Close();\n\n resolve(cert);\n }));\n });\n}\n\n/**\n * Разбирает информацию сертификата по тэгам\n * */\nfunction getCertInfo(tags, propName) {\n var cert = this._cert;\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getCertInfo() {\n var propInfo;\n\n try {\n propInfo = 'yield' + cert[propName];\n } catch (err) {\n reject('Ошибка при извлечении данных из сертификата: ', err.message);\n return;\n }\n\n resolve(cryptoCommon.parseCertInfo(tags, propInfo));\n }));\n });\n}\n\n/**\n * Возвращает список сертификатов, доступных в системе\n *\n * @param {Boolean} [resetCache=false] -- нужно ли сбросить кэш списка сертификатов\n * @returns {Promise} -- со списком сертификатов {Array}\n * */\nfunction getCertsList(resetCache) {\n return new Promise(function (resolve, reject) {\n if (!resetCache && _certListCache) {\n resolve(_certListCache);\n return;\n }\n\n eval(cryptoCommon.generateAsyncFn(function getCertsList() {\n var oStore = 'yield' + cryptoCommon.createObj('CAdESCOM.Store'),\n result = [],\n certs,\n count,\n item;\n\n // Открываем хранилище\n try {\n void('yield' + oStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED\n ));\n } catch (err) {\n reject('Ошибка при открытии хранилища: ' + err.message);\n return;\n }\n\n // Получаем доступ к сертификатам\n try {\n certs = 'yield' + oStore.Certificates;\n\n if (certs) {\n certs = 'yield' + certs.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n * */\n certs = 'yield' + certs.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n cryptoConstants.PropId.CAPICOM_PROPID_KEY_PROV_INFO\n );\n\n count = 'yield' + certs.Count;\n }\n } catch (err) {\n reject('Ошибка получения списка сертификатов: ' + err.message);\n return;\n }\n\n if (!count) {\n reject('Нет доступных сертификатов');\n return;\n }\n\n try {\n while (count) {\n item = 'yield' + certs.Item(count);\n\n result.push(new Certificate({\n _cert: 'yield' + item,\n thumbprint: 'yield' + item.Thumbprint,\n subjectName: 'yield' + item.SubjectName,\n issuerName: 'yield' + item.IssuerName,\n validFrom: 'yield' + item.ValidFromDate,\n validTo: 'yield' + item.ValidToDate\n }));\n\n count--;\n }\n } catch (err) {\n reject('Ошибка обработки сертификатов: ' + err.message);\n return;\n }\n\n oStore.Close();\n\n _certListCache = cryptoCommon.prepareCertsInfo(result);\n\n resolve(_certListCache);\n }));\n });\n}\n\n/**\n * Получить сертификат по хэшу\n * */\nfunction getCert(hash) {\n return new Promise(function (resolve, reject) {\n if (!hash) {\n reject('Хэш не указан');\n return;\n }\n\n getCertsList().then(function (list) {\n var foundCert;\n\n list.some(function (cert) {\n if (hash === cert.thumbprint) {\n foundCert = cert;\n return true;\n }\n });\n\n if (foundCert) {\n resolve(foundCert);\n } else {\n reject('Сертификат с хэшем: \"' + hash + '\" не найден');\n }\n }, reject);\n });\n}\n\n/**\n * Создает подпись base64 строки по hash'у сертификата\n *\n * @param {String} hash -- fingerprint (thumbprint) сертификата\n * @param {String} dataBase64 -- строковые данные в формате base64\n * @param {Boolean} signType -- тип подписи открепленная (true) / присоединенная (false) (default: true)\n * @returns {Promise} -- обещание, которое зарезолвится с данными о подписи {String}\n * */\nfunction signData(hash, dataBase64, signType) {\n signType = typeof signType === 'undefined' ? true : Boolean(signType);\n\n return new Promise(function (resolve, reject) {\n getCadesCert(hash).then(function (cert) {\n eval(cryptoCommon.generateAsyncFn(function signData() {\n var clientTime = new Date(),\n oAttrs = 'yield' + cryptoCommon.createObj('CADESCOM.CPAttribute'),\n oSignedData = 'yield' + cryptoCommon.createObj('CAdESCOM.CadesSignedData'),\n oSigner = 'yield' + cryptoCommon.createObj('CAdESCOM.CPSigner'),\n attrs,\n signature;\n\n clientTime = cryptoCommon.getDateObj(clientTime);\n\n try {\n void('yield' + oAttrs.propset_Name(cryptoConstants.Time.AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void('yield' + oAttrs.propset_Value(clientTime));\n } catch (err) {\n reject('Ошибка при установке данных подписи: ' + err.message);\n return;\n }\n\n // Задаем настройки для подписи\n try {\n void('yield' + oSigner.propset_Certificate(cert));\n attrs = 'yield' + oSigner.AuthenticatedAttributes2;\n void('yield' + attrs.Add(oAttrs));\n void('yield' + oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void('yield' + oSignedData.propset_Content(dataBase64));\n void('yield' + oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY));\n } catch (err) {\n reject('Не удалось установить настройки для подписи: ' + err.message);\n return;\n }\n\n try {\n signature = 'yield' + oSignedData.SignCades(\n oSigner,\n cadesplugin.CADESCOM_CADES_BES,\n signType\n );\n } catch (err) {\n reject('Не удалось создать подпись: ' + err.message);\n return;\n }\n\n resolve(signature);\n }));\n }, reject);\n });\n}\n\n/**\n * Создает подпись XML строки по hash'у сертификата\n *\n * @param {String} hash -- fingerprint (thumbprint) сертификата\n * @param {String} dataXML -- данные в формате XML\n * @returns {Promise} -- обещание, которое зарезолвится с данными о подписи {String}\n * */\nfunction signDataXML(hash, dataXML) {\n return new Promise(function (resolve, reject) {\n getCadesCert(hash).then(function (cert) {\n eval(cryptoCommon.generateAsyncFn(function signDataXML() {\n var oSigner = 'yield' + cryptoCommon.createObj('CAdESCOM.CPSigner'),\n signerXML = 'yield' + cryptoCommon.createObj('CAdESCOM.SignedXML'),\n cnts = cryptoConstants,\n signature;\n\n // Задаем настройки для подписи\n try {\n void('yield' + oSigner.propset_Certificate(cert));\n // Добавляем данные для подписи\n void('yield' + signerXML.propset_Content(dataXML));\n // Устанавливаем тип подписи\n void('yield' + signerXML.propset_SignatureType(cnts.SignatureType.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED));\n // Устанавливаем алгоритм подписи\n void('yield' + signerXML.propset_SignatureMethod(cnts.GostXmlDSigUrls.XmlDsigGost3410Url));\n // Устанавливаем алгоритм хэширования\n void('yield' + signerXML.propset_DigestMethod(cnts.GostXmlDSigUrls.XmlDsigGost3411Url));\n } catch (err) {\n reject('Не удалось установить настройки для подписи: ' + err.message);\n return;\n }\n\n try {\n signature = 'yield' + signerXML.Sign(oSigner);\n } catch (err) {\n reject('Не удалось создать подпись: ' + err.message);\n return;\n }\n\n resolve(signature);\n }));\n }, reject);\n });\n}\n\n/**\n * Возвращает информацию о версии CSP и плагина\n * */\nfunction getSystemInfo() {\n var sysInfo = cryptoCommon.getEnvInfo();\n\n return new Promise(function (resolve, reject) {\n eval(cryptoCommon.generateAsyncFn(function getSystemInfo() {\n var e;\n\n try {\n e = 'yield' + cryptoCommon.createObj('CAdESCOM.About');\n\n sysInfo.cadesVersion = 'yield' + e.PluginVersion;\n // Возможен вызов в ранних версиях в виде sysInfo.cspVersion = 'yield' + e.CSPVersion('', 75);\n sysInfo.cspVersion = 'yield' + e.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = 'yield' + e.Version;\n }\n\n sysInfo.cadesVersion = 'yield' + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = 'yield' + sysInfo.cspVersion.toString();\n\n resolve(sysInfo);\n } catch (err) {\n reject('Ошибка при получении информации о системе: ', err.message);\n }\n }));\n });\n}\n\n/**\n * Promise обертка для синхронного вызова проверки версии CSP\n * */\nfunction isValidCSPVersion(version) {\n return new Promise(function (resolve) {\n resolve(cryptoCommon.isValidCSPVersion(version));\n });\n}\n\n/**\n * Promise обертка для синхронного вызова проверки версии плагина\n * */\nfunction isValidCadesVersion(version) {\n return new Promise(function (resolve) {\n resolve(cryptoCommon.isValidCadesVersion(version));\n });\n}\n\nmodule.exports = {\n isValidEDSSettings: isValidEDSSettings,\n getCertsList: getCertsList,\n getCert: getCert,\n signData: signData,\n signDataXML: signDataXML,\n getSystemInfo: getSystemInfo,\n isValidCSPVersion: isValidCSPVersion,\n isValidCadesVersion: isValidCadesVersion\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./api.js\n ** module id = 4\n ** module chunks = 0\n **/","var bowser = require('bowser/bowser');\nvar oids = require('./oids');\n\nvar subjectNameTagsTranslations = [\n {possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя'},\n {possibleNames: ['CN'], translation: 'Владелец'},\n {possibleNames: ['SN'], translation: 'Фамилия'},\n {possibleNames: ['G'], translation: 'Имя Отчество'},\n {possibleNames: ['C'], translation: 'Страна'},\n {possibleNames: ['S'], translation: 'Регион'},\n {possibleNames: ['STREET'], translation: 'Адрес'},\n {possibleNames: ['O'], translation: 'Компания'},\n {possibleNames: ['OU'], translation: 'Отдел/подразделение'},\n {possibleNames: ['T'], translation: 'Должность'},\n {possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН'},\n {possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП'},\n {possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС'},\n {possibleNames: ['ИНН', 'INN'], translation: 'ИНН'},\n {possibleNames: ['E'], translation: 'Email'},\n {possibleNames: ['L'], translation: 'Город'}\n ],\n\n issuerNameTagsTranslations = [\n {possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя'},\n {possibleNames: ['CN'], translation: 'Удостоверяющий центр'},\n {possibleNames: ['S'], translation: 'Регион'},\n {possibleNames: ['C'], translation: 'Страна'},\n {possibleNames: ['STREET'], translation: 'Адрес'},\n {possibleNames: ['O'], translation: 'Компания'},\n {possibleNames: ['OU'], translation: 'Тип'},\n {possibleNames: ['T'], translation: 'Должность'},\n {possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН'},\n {possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП'},\n {possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС'},\n {possibleNames: ['ИНН', 'INN'], translation: 'ИНН'},\n {possibleNames: ['E'], translation: 'Email'},\n {possibleNames: ['L'], translation: 'Город'}\n ];\n\nfunction generateAsyncFn(cb) {\n var canAsync = cadesplugin.CreateObjectAsync;\n var dynamicScriptName = cb.name || 'asyncFn';\n\n cb = String(cb);\n\n var args = cb.match(/^function[\\s\\w]*?\\((.*?)\\)/);\n\n args = (args && args[1]) || '';\n\n cb = cb.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n\n function GeneratorFunction() {\n return (new Function('', 'return Object.getPrototypeOf(function*(){}).constructor'))();\n }\n\n cb = String(new (canAsync ? GeneratorFunction() : Function)(args, cb));\n\n cb = cb.replace(/cryptoCommon\\.createObj(\\([\\s\\S]*?\\))/gm, 'cadesplugin.CreateObject' + (canAsync ? 'Async' : '') + '$1');\n cb = cb.replace(/(\"|')(yield)(\\1)\\s*?\\+\\s*?\\b/gm, canAsync ? '$2 ' : '');\n\n if (!canAsync) {\n cb = cb.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return (canAsync ?\n 'cadesplugin.async_spawn(' + cb + ');'\n : '(' + cb + ')();') + '//# sourceURL=evaled-' + dynamicScriptName + '.js';\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n * */\nfunction parseCertInfo(tags, infoString) {\n /**\n * Пример входной строки:\n *\n\n T=Генеральный директор, UnstructuredName=\"INN=7811514257/KPP=781101001/OGRN=1127847087884\",\n STREET=\"Крыленко, д.3, лит.Б\", CN=Король Анатолий Евгеньевич, G=Анатолий Евгеньевич, SN=Король,\n OU=Администрация, O=\"ООО \"\"Аксиома\"\"\", L=Санкт-Петербург, S=78 г. Санкт-Петербург, C=RU, E=korol@sferasro.ru,\n INN=007811514257, OGRN=1127847087884, SNILS=11617693460\n\n * */\n var result = infoString.match(/([а-яА-Яa-zA-Z0-9\\.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (result) {\n result = result.map(function (group) {\n /**\n * Пример входной строки:\n *\n\n UnstructuredName=\"INN=7811514257/KPP=781101001/OGRN=1127847087884\",\n\n * */\n var parts = group.match(/^([а-яА-Яa-zA-Z0-9\\.]+)=(.+?),?$/),\n title = parts && parts[1],\n descr = parts && parts[2],\n translated = false,\n oidTitle;\n\n // Если тайтл содержит ОИД, пытаемся расшифровать\n if (/^OID./.test(title)) {\n oidTitle = title.match(/^OID\\.(.*)/);\n\n if (oidTitle && oidTitle[1]) {\n oidTitle = oids[oidTitle[1]];\n\n if (oidTitle) {\n title = oidTitle;\n }\n }\n }\n\n // Вырезаем лишние кавычки\n descr = descr.replace(/^\"(.*)\"/, '$1');\n descr = descr.replace(/\"{2}/g, '\"');\n\n tags.some(function (tag) {\n return tag.possibleNames.some(function (possible) {\n var match = possible === title;\n\n if (match) {\n title = tag.translation;\n translated = true;\n }\n\n return match;\n });\n });\n\n return {\n title: title,\n descr: descr,\n translated: translated\n };\n });\n }\n\n return result;\n}\n\n/**\n * Возвращает дату в формате (dd.mm.yyyy hh:mm:ss) из строки, формата, используемого плагином cryptoPro\n * */\nfunction getReadableDate(date) {\n date = new Date(date);\n\n return ([\n date.getDate(),\n date.getMonth() + 1,\n date.getFullYear()\n ].join('.') + ' ' + [\n date.getHours(),\n date.getMinutes(),\n date.getSeconds()\n ].join(':')).replace(/\\b(\\d)\\b/g, '0$1');\n}\n\n/**\n * Преобразует дату для IE\n * */\nfunction getDateObj(dateObj) {\n return bowser.msie ? dateObj.getVarDate() : dateObj;\n}\n\n/**\n * Подготавливает информацию о сертификатах\n * */\nfunction prepareCertsInfo(items) {\n return items.map(function (c) {\n c.name = c.subjectName.match(/CN=(.+?)(?:,|$)/);\n\n // Удалось ли вытащить Common Name\n if (c.name && c.name[1]) {\n c.name = c.name[1];\n }\n\n c.validFrom = getReadableDate(c.validFrom);\n c.validTo = getReadableDate(c.validTo);\n\n c.label = c.name + ' (до ' + c.validTo + ')';\n\n return c;\n });\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы\n * */\nfunction getDecodedExtendedKeyUsage() {\n var that = this;\n\n return new Promise(function (resolve) {\n that.getExtendedKeyUsage().then(function (certOids) {\n resolve(certOids.reduce(function (oidsLst, oid) {\n oid = {\n id: oid,\n descr: oids[oid] || null\n };\n\n if (oid.descr) {\n oidsLst.unshift(oid);\n } else {\n oidsLst.push(oid);\n }\n\n return oidsLst;\n }, []));\n });\n });\n}\n\n/**\n * Проверка наличия ОИД'а(ОИД'ов) у сертификата\n *\n * @param {String|Array} oids - ОИД'ы для проверки\n * @returns {Promise} с отложенным результатом типа {Boolean}\n * */\nfunction hasExtendedKeyUsage(oids) {\n var that = this;\n\n return new Promise(function (resolve) {\n that.getExtendedKeyUsage().then(function (certOids) {\n var result;\n\n if (Array.isArray(oids)) {\n result = oids.every(function (oidToCheck) {\n return certOids.some(function (certOid) {\n return certOid === oidToCheck;\n });\n });\n } else {\n result = certOids.some(function (certOid) {\n return certOid === oids;\n });\n }\n\n resolve(result);\n });\n });\n}\n\n/**\n * Выводит информацию о системе пользователя\n * */\nfunction getEnvInfo() {\n var parsed = bowser._detect(navigator.userAgent),\n info = {\n browserName: parsed.name,\n browserVersion: parsed.version\n };\n\n if (parsed.mac) {\n info.os = 'Mac';\n } else if (parsed.windows) {\n info.os = 'Windows';\n } else if (parsed.linux) {\n info.os = 'Linux';\n }\n\n return info;\n}\n\n/**\n * Подходящая ли версия CSP\n * */\nfunction isValidCSPVersion(version) {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/);\n\n return version >= 3.6;\n}\n\n/**\n * Подходящая ли версия cades плагина\n * */\nfunction isValidCadesVersion(version) {\n version = version.split('.').reduce(function (verInfo, number, i) {\n if (i === 0) {\n verInfo.major = number;\n } else if (i === 1) {\n verInfo.minor = number;\n } else if (i === 2) {\n verInfo.patch = number;\n }\n\n return verInfo;\n }, {});\n\n if (version.major < 2) {\n return false;\n }\n\n return version.patch >= 12438;\n}\n\nmodule.exports = {\n generateAsyncFn: generateAsyncFn,\n subjectNameTagsTranslations: subjectNameTagsTranslations,\n issuerNameTagsTranslations: issuerNameTagsTranslations,\n parseCertInfo: parseCertInfo,\n getReadableDate: getReadableDate,\n getDateObj: getDateObj,\n prepareCertsInfo: prepareCertsInfo,\n getDecodedExtendedKeyUsage: getDecodedExtendedKeyUsage,\n hasExtendedKeyUsage: hasExtendedKeyUsage,\n getEnvInfo: getEnvInfo,\n isValidCSPVersion: isValidCSPVersion,\n isValidCadesVersion: isValidCadesVersion\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./common.js\n ** module id = 5\n ** module chunks = 0\n **/","module.exports = {\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.6.2.1.7.2': 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.2.1.7.1': 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9': 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.3.8.100.1.10': 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11': 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13': 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.6.3': 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.5.1.24.2.1.3': 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1': 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3': 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./oids.js\n ** module id = 6\n ** module chunks = 0\n **/","module.exports = {\n // CAPICOM_STORE_LOCATION enumeration\n StoreLocation: {\n CAPICOM_MEMORY_STORE: 0,\n CAPICOM_LOCAL_MACHINE_STORE: 1,\n CAPICOM_CURRENT_USER_STORE: 2,\n CAPICOM_ACTIVE_DIRECTORY_USER_STORE: 3,\n CAPICOM_SMART_CARD_USER_STORE: 4\n },\n // CAPICOM_STORE_OPEN_MODE enumeration\n StoreOpenMode: {\n CAPICOM_STORE_OPEN_READ_ONLY: 0,\n CAPICOM_STORE_OPEN_READ_WRITE: 1,\n CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED: 2,\n CAPICOM_STORE_OPEN_EXISTING_ONLY: 128,\n CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED: 256\n },\n // CAPICOM_CERTIFICATE_FIND_TYPE enumeration\n CertFindType: {\n CAPICOM_CERTIFICATE_FIND_SHA1_HASH: 0,\n CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME: 1,\n CAPICOM_CERTIFICATE_FIND_ISSUER_NAME: 2,\n CAPICOM_CERTIFICATE_FIND_ROOT_NAME: 3,\n CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME: 4,\n CAPICOM_CERTIFICATE_FIND_EXTENSION: 5,\n CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY: 6,\n CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY: 7,\n CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY: 8,\n CAPICOM_CERTIFICATE_FIND_TIME_VALID: 9,\n CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID: 10,\n CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED: 11,\n CAPICOM_CERTIFICATE_FIND_KEY_USAGE: 12\n },\n Time: {\n AUTHENTICATED_ATTRIBUTE_SIGNING_TIME: 0\n },\n Check: {\n CHECK_NONE: 0,\n CHECK_TRUSTED_ROOT: 1,\n CHECK_TIME_VALIDITY: 2,\n CHECK_SIGNATURE_VALIDITY: 4,\n CHECK_ONLINE_REVOCATION_STATUS: 8,\n CHECK_OFFLINE_REVOCATION_STATUS: 16,\n TRUST_IS_NOT_TIME_VALID: 1,\n TRUST_IS_NOT_TIME_NESTED: 2,\n TRUST_IS_REVOKED: 4,\n TRUST_IS_NOT_SIGNATURE_VALID: 8,\n TRUST_IS_NOT_VALID_FOR_USAGE: 16,\n TRUST_IS_UNTRUSTED_ROOT: 32,\n TRUST_REVOCATION_STATUS_UNKNOWN: 64,\n TRUST_IS_CYCLIC: 128,\n TRUST_IS_PARTIAL_CHAIN: 65536,\n TRUST_CTL_IS_NOT_TIME_VALID: 131072,\n TRUST_CTL_IS_NOT_SIGNATURE_VALID: 262144,\n TRUST_CTL_IS_NOT_VALID_FOR_USAGE: 524288,\n },\n // CAPICOM_PROPID enumeration\n PropId: {\n CAPICOM_PROPID_UNKNOWN: 0,\n CAPICOM_PROPID_KEY_PROV_HANDLE: 1,\n CAPICOM_PROPID_KEY_PROV_INFO: 2,\n CAPICOM_PROPID_SHA1_HASH: 3,\n CAPICOM_PROPID_HASH_PROP: 3,\n CAPICOM_PROPID_MD5_HASH: 4,\n CAPICOM_PROPID_KEY_CONTEXT: 5,\n CAPICOM_PROPID_KEY_SPEC: 6,\n CAPICOM_PROPID_IE30_RESERVED: 7,\n CAPICOM_PROPID_PUBKEY_HASH_RESERVED: 8,\n CAPICOM_PROPID_ENHKEY_USAGE: 9,\n CAPICOM_PROPID_CTL_USAGE: 9,\n CAPICOM_PROPID_NEXT_UPDATE_LOCATION: 10,\n CAPICOM_PROPID_FRIENDLY_NAME: 11,\n CAPICOM_PROPID_PVK_FILE: 12,\n CAPICOM_PROPID_DESCRIPTION: 13,\n CAPICOM_PROPID_ACCESS_STATE: 14,\n CAPICOM_PROPID_SIGNATURE_HASH: 15,\n CAPICOM_PROPID_SMART_CARD_DATA: 16,\n CAPICOM_PROPID_EFS: 17,\n CAPICOM_PROPID_FORTEZZA_DATA: 18,\n CAPICOM_PROPID_ARCHIVED: 19,\n CAPICOM_PROPID_KEY_IDENTIFIER: 20,\n CAPICOM_PROPID_AUTO_ENROLL: 21,\n CAPICOM_PROPID_PUBKEY_ALG_PARA: 22,\n CAPICOM_PROPID_CROSS_CERT_DIST_POINTS: 23,\n CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH: 24,\n CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH: 25,\n CAPICOM_PROPID_ENROLLMENT: 26,\n CAPICOM_PROPID_DATE_STAMP: 27,\n CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH: 28,\n CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH: 29,\n CAPICOM_PROPID_EXTENDED_ERROR_INFO: 30,\n CAPICOM_PROPID_RENEWAL: 64,\n CAPICOM_PROPID_ARCHIVED_KEY_HASH: 65,\n CAPICOM_PROPID_FIRST_RESERVED: 66,\n CAPICOM_PROPID_LAST_RESERVED: 0x00007FFF,\n CAPICOM_PROPID_FIRST_USER: 0x00008000,\n CAPICOM_PROPID_LAST_USER: 0x0000FFFF\n },\n // CADESCOM_XML_SIGNATURE_TYPE enumeration\n SignatureType: {\n CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED: 0,\n CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING: 1,\n CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE: 2\n },\n // CADESCOM_HASH_ALGORITHM enumeration\n HashAlgorithm: {\n CADESCOM_HASH_ALGORITHM_CP_GOST_3411: 100,\n CADESCOM_HASH_ALGORITHM_MD2: 1,\n CADESCOM_HASH_ALGORITHM_MD4: 2,\n CADESCOM_HASH_ALGORITHM_MD5: 3,\n CADESCOM_HASH_ALGORITHM_SHA_256: 4,\n CADESCOM_HASH_ALGORITHM_SHA_384: 5,\n CADESCOM_HASH_ALGORITHM_SHA_512: 6,\n CADESCOM_HASH_ALGORITHM_SHA1: 0\n },\n CadesType: {\n CADESCOM_CADES_DEFAULT: 0,\n CADESCOM_CADES_BES: 1,\n CADESCOM_CADES_X_LONG_TYPE_1: 0x5d\n },\n ContentEncoding: {\n CADESCOM_BASE64_TO_BINARY: 0x01,\n CADESCOM_STRING_TO_UCS2LE: 0x00\n },\n StoreNames: {\n CAPICOM_MY_STORE: 'My'\n },\n Chain: {\n CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT: 0,\n CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN: 1,\n CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY: 2\n },\n GostXmlDSigUrls: {\n XmlDsigGost3410Url: 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411',\n XmlDsigGost3411Url: 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411',\n XmlDsigGost3410UrlObsolete: 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411',\n XmlDsigGost3411UrlObsolete: 'http://www.w3.org/2001/04/xmldsig-more#gostr3411'\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./constants.js\n ** module id = 7\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/src/api.js b/src/api.js index 47487b1..e1d0751 100755 --- a/src/api.js +++ b/src/api.js @@ -201,11 +201,11 @@ function getCadesCert(hash) { // Открываем хранилище try { - 'yield' + oStore.Open( + void('yield' + oStore.Open( cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED - ); + )); } catch (err) { reject('Ошибка при открытии хранилища: ' + err.message); return; @@ -290,11 +290,11 @@ function getCertsList(resetCache) { // Открываем хранилище try { - 'yield' + oStore.Open( + void('yield' + oStore.Open( cadesplugin.CAPICOM_CURRENT_USER_STORE, cadesplugin.CAPICOM_MY_STORE, cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED - ); + )); } catch (err) { reject('Ошибка при открытии хранилища: ' + err.message); return; @@ -409,8 +409,8 @@ function signData(hash, dataBase64, signType) { clientTime = cryptoCommon.getDateObj(clientTime); try { - 'yield' + oAttrs.propset_Name(cryptoConstants.Time.AUTHENTICATED_ATTRIBUTE_SIGNING_TIME); - 'yield' + oAttrs.propset_Value(clientTime); + void('yield' + oAttrs.propset_Name(cryptoConstants.Time.AUTHENTICATED_ATTRIBUTE_SIGNING_TIME)); + void('yield' + oAttrs.propset_Value(clientTime)); } catch (err) { reject('Ошибка при установке данных подписи: ' + err.message); return; @@ -418,12 +418,12 @@ function signData(hash, dataBase64, signType) { // Задаем настройки для подписи try { - 'yield' + oSigner.propset_Certificate(cert); + void('yield' + oSigner.propset_Certificate(cert)); attrs = 'yield' + oSigner.AuthenticatedAttributes2; - 'yield' + attrs.Add(oAttrs); - 'yield' + oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY); - 'yield' + oSignedData.propset_Content(dataBase64); - 'yield' + oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY); + void('yield' + attrs.Add(oAttrs)); + void('yield' + oSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY)); + void('yield' + oSignedData.propset_Content(dataBase64)); + void('yield' + oSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)); } catch (err) { reject('Не удалось установить настройки для подписи: ' + err.message); return; @@ -464,15 +464,15 @@ function signDataXML(hash, dataXML) { // Задаем настройки для подписи try { - 'yield' + oSigner.propset_Certificate(cert); + void('yield' + oSigner.propset_Certificate(cert)); // Добавляем данные для подписи - 'yield' + signerXML.propset_Content(dataXML); + void('yield' + signerXML.propset_Content(dataXML)); // Устанавливаем тип подписи - 'yield' + signerXML.propset_SignatureType(cnts.SignatureType.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED); + void('yield' + signerXML.propset_SignatureType(cnts.SignatureType.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)); // Устанавливаем алгоритм подписи - 'yield' + signerXML.propset_SignatureMethod(cnts.GostXmlDSigUrls.XmlDsigGost3410Url); + void('yield' + signerXML.propset_SignatureMethod(cnts.GostXmlDSigUrls.XmlDsigGost3410Url)); // Устанавливаем алгоритм хэширования - 'yield' + signerXML.propset_DigestMethod(cnts.GostXmlDSigUrls.XmlDsigGost3411Url); + void('yield' + signerXML.propset_DigestMethod(cnts.GostXmlDSigUrls.XmlDsigGost3411Url)); } catch (err) { reject('Не удалось установить настройки для подписи: ' + err.message); return;