{"version":3,"file":"vendor.parse-asn1.182c8f8105061daa.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAa;;AAEb;;AAEA,cAAc,mBAAO,CAAC,KAAO;;AAE7B,cAAc,mCAA4B;AAC1C,YAAY,mBAAO,CAAC,KAAa;AACjC,iBAAiB,mBAAO,CAAC,KAAkB;AAC3C,gBAAgB,mBAAO,CAAC,KAAiB;AACzC,gBAAgB,mBAAO,CAAC,KAAiB;;;;;;;;;ACV5B;;AAEb,iBAAiB,mBAAO,CAAC,KAAY;AACrC,iBAAiB,mBAAO,CAAC,KAAY;AACrC,iBAAiB,mBAAO,CAAC,KAAU;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACxDa;;AAEb;;AAEA,gBAAgB,8CAA8B;AAC9C,qBAAqB,mDAAiC;AACtD,qBAAqB,mDAAiC;AACtD,YAAY,mBAAO,CAAC,KAAQ;;;;;;;;;ACP5B;AACA;AACY;;AAEZ,WAAW,mBAAO,CAAC,IAAS;;AAE5B,gDAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB;;AAErB,gBAAgB;AAChB;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;;AAEpB;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED,iBAAiB;AACjB;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;ACzHY;;AAEb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA,gBAAgB,mBAAO,CAAC,KAAO;;;;;;;;ACpB/B;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,KAAgB;AAClC,cAAc,mBAAO,CAAC,IAAgB;AACtC,aAAa,mCAA6B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9BA;AACA;;AAEY;;AAEZ,UAAU,mBAAO,CAAC,IAAS;;AAE3B;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;ACxFa;;AAEb,iBAAiB,8CAAoC;AACrD,sBAAsB,mDAAuC;AAC7D,sBAAsB,mDAAuC;AAC7D,eAAe,mBAAO,CAAC,KAAqB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;AC7nBa;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;AACnC,iBAAiB,8CAAoC;AACrD,eAAe,mCAA8B;;AAE7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAqB;;AAErB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,SAAqB;;AAErB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;ACxJa;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;;AAEnC,eAAe,mBAAO,CAAC,KAAO;AAC9B,sBAAsB,mDAAuC;AAC7D,aAAa,mBAAO,CAAC,KAAc;;AAEnC;AACA,YAAY,mBAAO,CAAC,KAAkB;;AAEtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;;AAEA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;AC9Ua;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;ACzDjB,WAAW,mBAAO,CAAC,KAAQ;AAC3B,YAAY,mBAAO,CAAC,KAAc;AAClC,cAAc,mBAAO,CAAC,KAAW;AACjC,cAAc,mBAAO,CAAC,IAAgB;AACtC,aAAa,mBAAO,CAAC,KAAQ;AAC7B,aAAa,mCAA6B;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ga;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;AACnC,eAAe,mCAA8B;AAC7C,aAAa,mBAAO,CAAC,KAAc;;AAEnC;AACA,YAAY,mBAAO,CAAC,KAAkB;;AAEtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C;;AAEA;AACA;AACA;;AAEA,kDAAkD,OAAO;AACzD;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA,IAAI;AACJ;AACA,oBAAoB,eAAe;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA,iBAAiB,eAAe;AAChC;AACA;;AAEA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,YAAY;AAChC;;AAEA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,YAAY,iBAAiB;AAC7B;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;ACtSa;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;;AAEnC,mBAAmB,mBAAO,CAAC,KAAO;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;;;;;;;;ACtBa;;AAEb;;AAEA,eAAe,mBAAO,CAAC,KAAO;AAC9B,eAAe,mBAAO,CAAC,KAAO;;;;;;;;;ACLjB;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;;AAEnC;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,SAAgB;;AAEhB;AACA;AACA;;AAEA;AACA;;AAEA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ha;;AAEb;;AAEA,eAAe,mBAAO,CAAC,KAAO;AAC9B,eAAe,mBAAO,CAAC,KAAO;;;;;;;;;ACLjB;;AAEb,iBAAiB,mBAAO,CAAC,KAAU;AACnC,eAAe,mCAA8B;;AAE7C,mBAAmB,mBAAO,CAAC,KAAO;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA","sources":["webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/api.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/index.js","webpack://admin/./node_modules/parse-asn1/asn1.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/index.js","webpack://admin/./node_modules/parse-asn1/fixProc.js","webpack://admin/./node_modules/parse-asn1/certificate.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/node.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/buffer.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/der.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/constants/der.js","webpack://admin/./node_modules/parse-asn1/index.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/der.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/pem.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/index.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/base/reporter.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/encoders/index.js","webpack://admin/./node_modules/parse-asn1/node_modules/asn1.js/lib/asn1/decoders/pem.js"],"sourcesContent":["'use strict';\n\nconst asn1 = exports;\n\nasn1.bignum = require('bn.js');\n\nasn1.define = require('./asn1/api').define;\nasn1.base = require('./asn1/base');\nasn1.constants = require('./asn1/constants');\nasn1.decoders = require('./asn1/decoders');\nasn1.encoders = require('./asn1/encoders');\n","'use strict';\n\nconst encoders = require('./encoders');\nconst decoders = require('./decoders');\nconst inherits = require('inherits');\n\nconst api = exports;\n\napi.define = function define(name, body) {\n  return new Entity(name, body);\n};\n\nfunction Entity(name, body) {\n  this.name = name;\n  this.body = body;\n\n  this.decoders = {};\n  this.encoders = {};\n}\n\nEntity.prototype._createNamed = function createNamed(Base) {\n  const name = this.name;\n\n  function Generated(entity) {\n    this._initNamed(entity, name);\n  }\n  inherits(Generated, Base);\n  Generated.prototype._initNamed = function _initNamed(entity, name) {\n    Base.call(this, entity, name);\n  };\n\n  return new Generated(this);\n};\n\nEntity.prototype._getDecoder = function _getDecoder(enc) {\n  enc = enc || 'der';\n  // Lazily create decoder\n  if (!this.decoders.hasOwnProperty(enc))\n    this.decoders[enc] = this._createNamed(decoders[enc]);\n  return this.decoders[enc];\n};\n\nEntity.prototype.decode = function decode(data, enc, options) {\n  return this._getDecoder(enc).decode(data, options);\n};\n\nEntity.prototype._getEncoder = function _getEncoder(enc) {\n  enc = enc || 'der';\n  // Lazily create encoder\n  if (!this.encoders.hasOwnProperty(enc))\n    this.encoders[enc] = this._createNamed(encoders[enc]);\n  return this.encoders[enc];\n};\n\nEntity.prototype.encode = function encode(data, enc, /* internal */ reporter) {\n  return this._getEncoder(enc).encode(data, reporter);\n};\n","'use strict';\n\nconst base = exports;\n\nbase.Reporter = require('./reporter').Reporter;\nbase.DecoderBuffer = require('./buffer').DecoderBuffer;\nbase.EncoderBuffer = require('./buffer').EncoderBuffer;\nbase.Node = require('./node');\n","// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n'use strict'\n\nvar asn1 = require('asn1.js')\n\nexports.certificate = require('./certificate')\n\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n  this.seq().obj(\n    this.key('version').int(),\n    this.key('modulus').int(),\n    this.key('publicExponent').int(),\n    this.key('privateExponent').int(),\n    this.key('prime1').int(),\n    this.key('prime2').int(),\n    this.key('exponent1').int(),\n    this.key('exponent2').int(),\n    this.key('coefficient').int()\n  )\n})\nexports.RSAPrivateKey = RSAPrivateKey\n\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n  this.seq().obj(\n    this.key('modulus').int(),\n    this.key('publicExponent').int()\n  )\n})\nexports.RSAPublicKey = RSAPublicKey\n\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n  this.seq().obj(\n    this.key('algorithm').use(AlgorithmIdentifier),\n    this.key('subjectPublicKey').bitstr()\n  )\n})\nexports.PublicKey = PublicKey\n\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n  this.seq().obj(\n    this.key('algorithm').objid(),\n    this.key('none').null_().optional(),\n    this.key('curve').objid().optional(),\n    this.key('params').seq().obj(\n      this.key('p').int(),\n      this.key('q').int(),\n      this.key('g').int()\n    ).optional()\n  )\n})\n\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n  this.seq().obj(\n    this.key('version').int(),\n    this.key('algorithm').use(AlgorithmIdentifier),\n    this.key('subjectPrivateKey').octstr()\n  )\n})\nexports.PrivateKey = PrivateKeyInfo\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n  this.seq().obj(\n    this.key('algorithm').seq().obj(\n      this.key('id').objid(),\n      this.key('decrypt').seq().obj(\n        this.key('kde').seq().obj(\n          this.key('id').objid(),\n          this.key('kdeparams').seq().obj(\n            this.key('salt').octstr(),\n            this.key('iters').int()\n          )\n        ),\n        this.key('cipher').seq().obj(\n          this.key('algo').objid(),\n          this.key('iv').octstr()\n        )\n      )\n    ),\n    this.key('subjectPrivateKey').octstr()\n  )\n})\n\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo\n\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n  this.seq().obj(\n    this.key('version').int(),\n    this.key('p').int(),\n    this.key('q').int(),\n    this.key('g').int(),\n    this.key('pub_key').int(),\n    this.key('priv_key').int()\n  )\n})\nexports.DSAPrivateKey = DSAPrivateKey\n\nexports.DSAparam = asn1.define('DSAparam', function () {\n  this.int()\n})\n\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n  this.seq().obj(\n    this.key('version').int(),\n    this.key('privateKey').octstr(),\n    this.key('parameters').optional().explicit(0).use(ECParameters),\n    this.key('publicKey').optional().explicit(1).bitstr()\n  )\n})\nexports.ECPrivateKey = ECPrivateKey\n\nvar ECParameters = asn1.define('ECParameters', function () {\n  this.choice({\n    namedCurve: this.objid()\n  })\n})\n\nexports.signature = asn1.define('signature', function () {\n  this.seq().obj(\n    this.key('r').int(),\n    this.key('s').int()\n  )\n})\n","'use strict';\n\nconst constants = exports;\n\n// Helper\nconstants._reverse = function reverse(map) {\n  const res = {};\n\n  Object.keys(map).forEach(function(key) {\n    // Convert key to integer if it is stringified\n    if ((key | 0) == key)\n      key = key | 0;\n\n    const value = map[key];\n    res[value] = key;\n  });\n\n  return res;\n};\n\nconstants.der = require('./der');\n","// adapted from https://github.com/apatil/pemstrip\nvar findProc = /Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m\nvar startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m\nvar fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m\nvar evp = require('evp_bytestokey')\nvar ciphers = require('browserify-aes')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = function (okey, password) {\n  var key = okey.toString()\n  var match = key.match(findProc)\n  var decrypted\n  if (!match) {\n    var match2 = key.match(fullRegex)\n    decrypted = Buffer.from(match2[2].replace(/[\\r\\n]/g, ''), 'base64')\n  } else {\n    var suite = 'aes' + match[1]\n    var iv = Buffer.from(match[2], 'hex')\n    var cipherText = Buffer.from(match[3].replace(/[\\r\\n]/g, ''), 'base64')\n    var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key\n    var out = []\n    var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)\n    out.push(cipher.update(cipherText))\n    out.push(cipher.final())\n    decrypted = Buffer.concat(out)\n  }\n  var tag = key.match(startRegex)[1]\n  return {\n    tag: tag,\n    data: decrypted\n  }\n}\n","// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js\n// thanks to @Rantanen\n\n'use strict'\n\nvar asn = require('asn1.js')\n\nvar Time = asn.define('Time', function () {\n  this.choice({\n    utcTime: this.utctime(),\n    generalTime: this.gentime()\n  })\n})\n\nvar AttributeTypeValue = asn.define('AttributeTypeValue', function () {\n  this.seq().obj(\n    this.key('type').objid(),\n    this.key('value').any()\n  )\n})\n\nvar AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {\n  this.seq().obj(\n    this.key('algorithm').objid(),\n    this.key('parameters').optional(),\n    this.key('curve').objid().optional()\n  )\n})\n\nvar SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {\n  this.seq().obj(\n    this.key('algorithm').use(AlgorithmIdentifier),\n    this.key('subjectPublicKey').bitstr()\n  )\n})\n\nvar RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {\n  this.setof(AttributeTypeValue)\n})\n\nvar RDNSequence = asn.define('RDNSequence', function () {\n  this.seqof(RelativeDistinguishedName)\n})\n\nvar Name = asn.define('Name', function () {\n  this.choice({\n    rdnSequence: this.use(RDNSequence)\n  })\n})\n\nvar Validity = asn.define('Validity', function () {\n  this.seq().obj(\n    this.key('notBefore').use(Time),\n    this.key('notAfter').use(Time)\n  )\n})\n\nvar Extension = asn.define('Extension', function () {\n  this.seq().obj(\n    this.key('extnID').objid(),\n    this.key('critical').bool().def(false),\n    this.key('extnValue').octstr()\n  )\n})\n\nvar TBSCertificate = asn.define('TBSCertificate', function () {\n  this.seq().obj(\n    this.key('version').explicit(0).int().optional(),\n    this.key('serialNumber').int(),\n    this.key('signature').use(AlgorithmIdentifier),\n    this.key('issuer').use(Name),\n    this.key('validity').use(Validity),\n    this.key('subject').use(Name),\n    this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),\n    this.key('issuerUniqueID').implicit(1).bitstr().optional(),\n    this.key('subjectUniqueID').implicit(2).bitstr().optional(),\n    this.key('extensions').explicit(3).seqof(Extension).optional()\n  )\n})\n\nvar X509Certificate = asn.define('X509Certificate', function () {\n  this.seq().obj(\n    this.key('tbsCertificate').use(TBSCertificate),\n    this.key('signatureAlgorithm').use(AlgorithmIdentifier),\n    this.key('signatureValue').bitstr()\n  )\n})\n\nmodule.exports = X509Certificate\n","'use strict';\n\nconst Reporter = require('../base/reporter').Reporter;\nconst EncoderBuffer = require('../base/buffer').EncoderBuffer;\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst assert = require('minimalistic-assert');\n\n// Supported tags\nconst tags = [\n  'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n  'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n  'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n  'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n];\n\n// Public methods list\nconst methods = [\n  'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n  'any', 'contains'\n].concat(tags);\n\n// Overrided methods list\nconst overrided = [\n  '_peekTag', '_decodeTag', '_use',\n  '_decodeStr', '_decodeObjid', '_decodeTime',\n  '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n  '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n  '_encodeNull', '_encodeInt', '_encodeBool'\n];\n\nfunction Node(enc, parent, name) {\n  const state = {};\n  this._baseState = state;\n\n  state.name = name;\n  state.enc = enc;\n\n  state.parent = parent || null;\n  state.children = null;\n\n  // State\n  state.tag = null;\n  state.args = null;\n  state.reverseArgs = null;\n  state.choice = null;\n  state.optional = false;\n  state.any = false;\n  state.obj = false;\n  state.use = null;\n  state.useDecoder = null;\n  state.key = null;\n  state['default'] = null;\n  state.explicit = null;\n  state.implicit = null;\n  state.contains = null;\n\n  // Should create new instance on each method\n  if (!state.parent) {\n    state.children = [];\n    this._wrap();\n  }\n}\nmodule.exports = Node;\n\nconst stateProps = [\n  'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n  'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n  'implicit', 'contains'\n];\n\nNode.prototype.clone = function clone() {\n  const state = this._baseState;\n  const cstate = {};\n  stateProps.forEach(function(prop) {\n    cstate[prop] = state[prop];\n  });\n  const res = new this.constructor(cstate.parent);\n  res._baseState = cstate;\n  return res;\n};\n\nNode.prototype._wrap = function wrap() {\n  const state = this._baseState;\n  methods.forEach(function(method) {\n    this[method] = function _wrappedMethod() {\n      const clone = new this.constructor(this);\n      state.children.push(clone);\n      return clone[method].apply(clone, arguments);\n    };\n  }, this);\n};\n\nNode.prototype._init = function init(body) {\n  const state = this._baseState;\n\n  assert(state.parent === null);\n  body.call(this);\n\n  // Filter children\n  state.children = state.children.filter(function(child) {\n    return child._baseState.parent === this;\n  }, this);\n  assert.equal(state.children.length, 1, 'Root node can have only one child');\n};\n\nNode.prototype._useArgs = function useArgs(args) {\n  const state = this._baseState;\n\n  // Filter children and args\n  const children = args.filter(function(arg) {\n    return arg instanceof this.constructor;\n  }, this);\n  args = args.filter(function(arg) {\n    return !(arg instanceof this.constructor);\n  }, this);\n\n  if (children.length !== 0) {\n    assert(state.children === null);\n    state.children = children;\n\n    // Replace parent to maintain backward link\n    children.forEach(function(child) {\n      child._baseState.parent = this;\n    }, this);\n  }\n  if (args.length !== 0) {\n    assert(state.args === null);\n    state.args = args;\n    state.reverseArgs = args.map(function(arg) {\n      if (typeof arg !== 'object' || arg.constructor !== Object)\n        return arg;\n\n      const res = {};\n      Object.keys(arg).forEach(function(key) {\n        if (key == (key | 0))\n          key |= 0;\n        const value = arg[key];\n        res[value] = key;\n      });\n      return res;\n    });\n  }\n};\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function(method) {\n  Node.prototype[method] = function _overrided() {\n    const state = this._baseState;\n    throw new Error(method + ' not implemented for encoding: ' + state.enc);\n  };\n});\n\n//\n// Public methods\n//\n\ntags.forEach(function(tag) {\n  Node.prototype[tag] = function _tagMethod() {\n    const state = this._baseState;\n    const args = Array.prototype.slice.call(arguments);\n\n    assert(state.tag === null);\n    state.tag = tag;\n\n    this._useArgs(args);\n\n    return this;\n  };\n});\n\nNode.prototype.use = function use(item) {\n  assert(item);\n  const state = this._baseState;\n\n  assert(state.use === null);\n  state.use = item;\n\n  return this;\n};\n\nNode.prototype.optional = function optional() {\n  const state = this._baseState;\n\n  state.optional = true;\n\n  return this;\n};\n\nNode.prototype.def = function def(val) {\n  const state = this._baseState;\n\n  assert(state['default'] === null);\n  state['default'] = val;\n  state.optional = true;\n\n  return this;\n};\n\nNode.prototype.explicit = function explicit(num) {\n  const state = this._baseState;\n\n  assert(state.explicit === null && state.implicit === null);\n  state.explicit = num;\n\n  return this;\n};\n\nNode.prototype.implicit = function implicit(num) {\n  const state = this._baseState;\n\n  assert(state.explicit === null && state.implicit === null);\n  state.implicit = num;\n\n  return this;\n};\n\nNode.prototype.obj = function obj() {\n  const state = this._baseState;\n  const args = Array.prototype.slice.call(arguments);\n\n  state.obj = true;\n\n  if (args.length !== 0)\n    this._useArgs(args);\n\n  return this;\n};\n\nNode.prototype.key = function key(newKey) {\n  const state = this._baseState;\n\n  assert(state.key === null);\n  state.key = newKey;\n\n  return this;\n};\n\nNode.prototype.any = function any() {\n  const state = this._baseState;\n\n  state.any = true;\n\n  return this;\n};\n\nNode.prototype.choice = function choice(obj) {\n  const state = this._baseState;\n\n  assert(state.choice === null);\n  state.choice = obj;\n  this._useArgs(Object.keys(obj).map(function(key) {\n    return obj[key];\n  }));\n\n  return this;\n};\n\nNode.prototype.contains = function contains(item) {\n  const state = this._baseState;\n\n  assert(state.use === null);\n  state.contains = item;\n\n  return this;\n};\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode(input, options) {\n  const state = this._baseState;\n\n  // Decode root node\n  if (state.parent === null)\n    return input.wrapResult(state.children[0]._decode(input, options));\n\n  let result = state['default'];\n  let present = true;\n\n  let prevKey = null;\n  if (state.key !== null)\n    prevKey = input.enterKey(state.key);\n\n  // Check if tag is there\n  if (state.optional) {\n    let tag = null;\n    if (state.explicit !== null)\n      tag = state.explicit;\n    else if (state.implicit !== null)\n      tag = state.implicit;\n    else if (state.tag !== null)\n      tag = state.tag;\n\n    if (tag === null && !state.any) {\n      // Trial and Error\n      const save = input.save();\n      try {\n        if (state.choice === null)\n          this._decodeGeneric(state.tag, input, options);\n        else\n          this._decodeChoice(input, options);\n        present = true;\n      } catch (e) {\n        present = false;\n      }\n      input.restore(save);\n    } else {\n      present = this._peekTag(input, tag, state.any);\n\n      if (input.isError(present))\n        return present;\n    }\n  }\n\n  // Push object on stack\n  let prevObj;\n  if (state.obj && present)\n    prevObj = input.enterObject();\n\n  if (present) {\n    // Unwrap explicit values\n    if (state.explicit !== null) {\n      const explicit = this._decodeTag(input, state.explicit);\n      if (input.isError(explicit))\n        return explicit;\n      input = explicit;\n    }\n\n    const start = input.offset;\n\n    // Unwrap implicit and normal values\n    if (state.use === null && state.choice === null) {\n      let save;\n      if (state.any)\n        save = input.save();\n      const body = this._decodeTag(\n        input,\n        state.implicit !== null ? state.implicit : state.tag,\n        state.any\n      );\n      if (input.isError(body))\n        return body;\n\n      if (state.any)\n        result = input.raw(save);\n      else\n        input = body;\n    }\n\n    if (options && options.track && state.tag !== null)\n      options.track(input.path(), start, input.length, 'tagged');\n\n    if (options && options.track && state.tag !== null)\n      options.track(input.path(), input.offset, input.length, 'content');\n\n    // Select proper method for tag\n    if (state.any) {\n      // no-op\n    } else if (state.choice === null) {\n      result = this._decodeGeneric(state.tag, input, options);\n    } else {\n      result = this._decodeChoice(input, options);\n    }\n\n    if (input.isError(result))\n      return result;\n\n    // Decode children\n    if (!state.any && state.choice === null && state.children !== null) {\n      state.children.forEach(function decodeChildren(child) {\n        // NOTE: We are ignoring errors here, to let parser continue with other\n        // parts of encoded data\n        child._decode(input, options);\n      });\n    }\n\n    // Decode contained/encoded by schema, only in bit or octet strings\n    if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n      const data = new DecoderBuffer(result);\n      result = this._getUse(state.contains, input._reporterState.obj)\n        ._decode(data, options);\n    }\n  }\n\n  // Pop object\n  if (state.obj && present)\n    result = input.leaveObject(prevObj);\n\n  // Set key\n  if (state.key !== null && (result !== null || present === true))\n    input.leaveKey(prevKey, state.key, result);\n  else if (prevKey !== null)\n    input.exitKey(prevKey);\n\n  return result;\n};\n\nNode.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {\n  const state = this._baseState;\n\n  if (tag === 'seq' || tag === 'set')\n    return null;\n  if (tag === 'seqof' || tag === 'setof')\n    return this._decodeList(input, tag, state.args[0], options);\n  else if (/str$/.test(tag))\n    return this._decodeStr(input, tag, options);\n  else if (tag === 'objid' && state.args)\n    return this._decodeObjid(input, state.args[0], state.args[1], options);\n  else if (tag === 'objid')\n    return this._decodeObjid(input, null, null, options);\n  else if (tag === 'gentime' || tag === 'utctime')\n    return this._decodeTime(input, tag, options);\n  else if (tag === 'null_')\n    return this._decodeNull(input, options);\n  else if (tag === 'bool')\n    return this._decodeBool(input, options);\n  else if (tag === 'objDesc')\n    return this._decodeStr(input, tag, options);\n  else if (tag === 'int' || tag === 'enum')\n    return this._decodeInt(input, state.args && state.args[0], options);\n\n  if (state.use !== null) {\n    return this._getUse(state.use, input._reporterState.obj)\n      ._decode(input, options);\n  } else {\n    return input.error('unknown tag: ' + tag);\n  }\n};\n\nNode.prototype._getUse = function _getUse(entity, obj) {\n\n  const state = this._baseState;\n  // Create altered use decoder if implicit is set\n  state.useDecoder = this._use(entity, obj);\n  assert(state.useDecoder._baseState.parent === null);\n  state.useDecoder = state.useDecoder._baseState.children[0];\n  if (state.implicit !== state.useDecoder._baseState.implicit) {\n    state.useDecoder = state.useDecoder.clone();\n    state.useDecoder._baseState.implicit = state.implicit;\n  }\n  return state.useDecoder;\n};\n\nNode.prototype._decodeChoice = function decodeChoice(input, options) {\n  const state = this._baseState;\n  let result = null;\n  let match = false;\n\n  Object.keys(state.choice).some(function(key) {\n    const save = input.save();\n    const node = state.choice[key];\n    try {\n      const value = node._decode(input, options);\n      if (input.isError(value))\n        return false;\n\n      result = { type: key, value: value };\n      match = true;\n    } catch (e) {\n      input.restore(save);\n      return false;\n    }\n    return true;\n  }, this);\n\n  if (!match)\n    return input.error('Choice not matched');\n\n  return result;\n};\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer(data) {\n  return new EncoderBuffer(data, this.reporter);\n};\n\nNode.prototype._encode = function encode(data, reporter, parent) {\n  const state = this._baseState;\n  if (state['default'] !== null && state['default'] === data)\n    return;\n\n  const result = this._encodeValue(data, reporter, parent);\n  if (result === undefined)\n    return;\n\n  if (this._skipDefault(result, reporter, parent))\n    return;\n\n  return result;\n};\n\nNode.prototype._encodeValue = function encode(data, reporter, parent) {\n  const state = this._baseState;\n\n  // Decode root node\n  if (state.parent === null)\n    return state.children[0]._encode(data, reporter || new Reporter());\n\n  let result = null;\n\n  // Set reporter to share it with a child class\n  this.reporter = reporter;\n\n  // Check if data is there\n  if (state.optional && data === undefined) {\n    if (state['default'] !== null)\n      data = state['default'];\n    else\n      return;\n  }\n\n  // Encode children first\n  let content = null;\n  let primitive = false;\n  if (state.any) {\n    // Anything that was given is translated to buffer\n    result = this._createEncoderBuffer(data);\n  } else if (state.choice) {\n    result = this._encodeChoice(data, reporter);\n  } else if (state.contains) {\n    content = this._getUse(state.contains, parent)._encode(data, reporter);\n    primitive = true;\n  } else if (state.children) {\n    content = state.children.map(function(child) {\n      if (child._baseState.tag === 'null_')\n        return child._encode(null, reporter, data);\n\n      if (child._baseState.key === null)\n        return reporter.error('Child should have a key');\n      const prevKey = reporter.enterKey(child._baseState.key);\n\n      if (typeof data !== 'object')\n        return reporter.error('Child expected, but input is not object');\n\n      const res = child._encode(data[child._baseState.key], reporter, data);\n      reporter.leaveKey(prevKey);\n\n      return res;\n    }, this).filter(function(child) {\n      return child;\n    });\n    content = this._createEncoderBuffer(content);\n  } else {\n    if (state.tag === 'seqof' || state.tag === 'setof') {\n      // TODO(indutny): this should be thrown on DSL level\n      if (!(state.args && state.args.length === 1))\n        return reporter.error('Too many args for : ' + state.tag);\n\n      if (!Array.isArray(data))\n        return reporter.error('seqof/setof, but data is not Array');\n\n      const child = this.clone();\n      child._baseState.implicit = null;\n      content = this._createEncoderBuffer(data.map(function(item) {\n        const state = this._baseState;\n\n        return this._getUse(state.args[0], data)._encode(item, reporter);\n      }, child));\n    } else if (state.use !== null) {\n      result = this._getUse(state.use, parent)._encode(data, reporter);\n    } else {\n      content = this._encodePrimitive(state.tag, data);\n      primitive = true;\n    }\n  }\n\n  // Encode data itself\n  if (!state.any && state.choice === null) {\n    const tag = state.implicit !== null ? state.implicit : state.tag;\n    const cls = state.implicit === null ? 'universal' : 'context';\n\n    if (tag === null) {\n      if (state.use === null)\n        reporter.error('Tag could be omitted only for .use()');\n    } else {\n      if (state.use === null)\n        result = this._encodeComposite(tag, primitive, cls, content);\n    }\n  }\n\n  // Wrap in explicit\n  if (state.explicit !== null)\n    result = this._encodeComposite(state.explicit, false, 'context', result);\n\n  return result;\n};\n\nNode.prototype._encodeChoice = function encodeChoice(data, reporter) {\n  const state = this._baseState;\n\n  const node = state.choice[data.type];\n  if (!node) {\n    assert(\n      false,\n      data.type + ' not found in ' +\n            JSON.stringify(Object.keys(state.choice)));\n  }\n  return node._encode(data.value, reporter);\n};\n\nNode.prototype._encodePrimitive = function encodePrimitive(tag, data) {\n  const state = this._baseState;\n\n  if (/str$/.test(tag))\n    return this._encodeStr(data, tag);\n  else if (tag === 'objid' && state.args)\n    return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);\n  else if (tag === 'objid')\n    return this._encodeObjid(data, null, null);\n  else if (tag === 'gentime' || tag === 'utctime')\n    return this._encodeTime(data, tag);\n  else if (tag === 'null_')\n    return this._encodeNull();\n  else if (tag === 'int' || tag === 'enum')\n    return this._encodeInt(data, state.args && state.reverseArgs[0]);\n  else if (tag === 'bool')\n    return this._encodeBool(data);\n  else if (tag === 'objDesc')\n    return this._encodeStr(data, tag);\n  else\n    throw new Error('Unsupported tag: ' + tag);\n};\n\nNode.prototype._isNumstr = function isNumstr(str) {\n  return /^[0-9 ]*$/.test(str);\n};\n\nNode.prototype._isPrintstr = function isPrintstr(str) {\n  return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);\n};\n","'use strict';\n\nconst inherits = require('inherits');\nconst Reporter = require('../base/reporter').Reporter;\nconst Buffer = require('safer-buffer').Buffer;\n\nfunction DecoderBuffer(base, options) {\n  Reporter.call(this, options);\n  if (!Buffer.isBuffer(base)) {\n    this.error('Input not Buffer');\n    return;\n  }\n\n  this.base = base;\n  this.offset = 0;\n  this.length = base.length;\n}\ninherits(DecoderBuffer, Reporter);\nexports.DecoderBuffer = DecoderBuffer;\n\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {\n  if (data instanceof DecoderBuffer) {\n    return true;\n  }\n\n  // Or accept compatible API\n  const isCompatible = typeof data === 'object' &&\n    Buffer.isBuffer(data.base) &&\n    data.constructor.name === 'DecoderBuffer' &&\n    typeof data.offset === 'number' &&\n    typeof data.length === 'number' &&\n    typeof data.save === 'function' &&\n    typeof data.restore === 'function' &&\n    typeof data.isEmpty === 'function' &&\n    typeof data.readUInt8 === 'function' &&\n    typeof data.skip === 'function' &&\n    typeof data.raw === 'function';\n\n  return isCompatible;\n};\n\nDecoderBuffer.prototype.save = function save() {\n  return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };\n};\n\nDecoderBuffer.prototype.restore = function restore(save) {\n  // Return skipped data\n  const res = new DecoderBuffer(this.base);\n  res.offset = save.offset;\n  res.length = this.offset;\n\n  this.offset = save.offset;\n  Reporter.prototype.restore.call(this, save.reporter);\n\n  return res;\n};\n\nDecoderBuffer.prototype.isEmpty = function isEmpty() {\n  return this.offset === this.length;\n};\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {\n  if (this.offset + 1 <= this.length)\n    return this.base.readUInt8(this.offset++, true);\n  else\n    return this.error(fail || 'DecoderBuffer overrun');\n};\n\nDecoderBuffer.prototype.skip = function skip(bytes, fail) {\n  if (!(this.offset + bytes <= this.length))\n    return this.error(fail || 'DecoderBuffer overrun');\n\n  const res = new DecoderBuffer(this.base);\n\n  // Share reporter state\n  res._reporterState = this._reporterState;\n\n  res.offset = this.offset;\n  res.length = this.offset + bytes;\n  this.offset += bytes;\n  return res;\n};\n\nDecoderBuffer.prototype.raw = function raw(save) {\n  return this.base.slice(save ? save.offset : this.offset, this.length);\n};\n\nfunction EncoderBuffer(value, reporter) {\n  if (Array.isArray(value)) {\n    this.length = 0;\n    this.value = value.map(function(item) {\n      if (!EncoderBuffer.isEncoderBuffer(item))\n        item = new EncoderBuffer(item, reporter);\n      this.length += item.length;\n      return item;\n    }, this);\n  } else if (typeof value === 'number') {\n    if (!(0 <= value && value <= 0xff))\n      return reporter.error('non-byte EncoderBuffer value');\n    this.value = value;\n    this.length = 1;\n  } else if (typeof value === 'string') {\n    this.value = value;\n    this.length = Buffer.byteLength(value);\n  } else if (Buffer.isBuffer(value)) {\n    this.value = value;\n    this.length = value.length;\n  } else {\n    return reporter.error('Unsupported type: ' + typeof value);\n  }\n}\nexports.EncoderBuffer = EncoderBuffer;\n\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {\n  if (data instanceof EncoderBuffer) {\n    return true;\n  }\n\n  // Or accept compatible API\n  const isCompatible = typeof data === 'object' &&\n    data.constructor.name === 'EncoderBuffer' &&\n    typeof data.length === 'number' &&\n    typeof data.join === 'function';\n\n  return isCompatible;\n};\n\nEncoderBuffer.prototype.join = function join(out, offset) {\n  if (!out)\n    out = Buffer.alloc(this.length);\n  if (!offset)\n    offset = 0;\n\n  if (this.length === 0)\n    return out;\n\n  if (Array.isArray(this.value)) {\n    this.value.forEach(function(item) {\n      item.join(out, offset);\n      offset += item.length;\n    });\n  } else {\n    if (typeof this.value === 'number')\n      out[offset] = this.value;\n    else if (typeof this.value === 'string')\n      out.write(this.value, offset);\n    else if (Buffer.isBuffer(this.value))\n      this.value.copy(out, offset);\n    offset += this.length;\n  }\n\n  return out;\n};\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst bignum = require('bn.js');\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DERDecoder(entity) {\n  this.enc = 'der';\n  this.name = entity.name;\n  this.entity = entity;\n\n  // Construct base tree\n  this.tree = new DERNode();\n  this.tree._init(entity.body);\n}\nmodule.exports = DERDecoder;\n\nDERDecoder.prototype.decode = function decode(data, options) {\n  if (!DecoderBuffer.isDecoderBuffer(data)) {\n    data = new DecoderBuffer(data, options);\n  }\n\n  return this.tree._decode(data, options);\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n  Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._peekTag = function peekTag(buffer, tag, any) {\n  if (buffer.isEmpty())\n    return false;\n\n  const state = buffer.save();\n  const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: \"' + tag + '\"');\n  if (buffer.isError(decodedTag))\n    return decodedTag;\n\n  buffer.restore(state);\n\n  return decodedTag.tag === tag || decodedTag.tagStr === tag ||\n    (decodedTag.tagStr + 'of') === tag || any;\n};\n\nDERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {\n  const decodedTag = derDecodeTag(buffer,\n    'Failed to decode tag of \"' + tag + '\"');\n  if (buffer.isError(decodedTag))\n    return decodedTag;\n\n  let len = derDecodeLen(buffer,\n    decodedTag.primitive,\n    'Failed to get length of \"' + tag + '\"');\n\n  // Failure\n  if (buffer.isError(len))\n    return len;\n\n  if (!any &&\n      decodedTag.tag !== tag &&\n      decodedTag.tagStr !== tag &&\n      decodedTag.tagStr + 'of' !== tag) {\n    return buffer.error('Failed to match tag: \"' + tag + '\"');\n  }\n\n  if (decodedTag.primitive || len !== null)\n    return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n\n  // Indefinite length... find END tag\n  const state = buffer.save();\n  const res = this._skipUntilEnd(\n    buffer,\n    'Failed to skip indefinite length body: \"' + this.tag + '\"');\n  if (buffer.isError(res))\n    return res;\n\n  len = buffer.offset - state.offset;\n  buffer.restore(state);\n  return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n};\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {\n  for (;;) {\n    const tag = derDecodeTag(buffer, fail);\n    if (buffer.isError(tag))\n      return tag;\n    const len = derDecodeLen(buffer, tag.primitive, fail);\n    if (buffer.isError(len))\n      return len;\n\n    let res;\n    if (tag.primitive || len !== null)\n      res = buffer.skip(len);\n    else\n      res = this._skipUntilEnd(buffer, fail);\n\n    // Failure\n    if (buffer.isError(res))\n      return res;\n\n    if (tag.tagStr === 'end')\n      break;\n  }\n};\n\nDERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,\n  options) {\n  const result = [];\n  while (!buffer.isEmpty()) {\n    const possibleEnd = this._peekTag(buffer, 'end');\n    if (buffer.isError(possibleEnd))\n      return possibleEnd;\n\n    const res = decoder.decode(buffer, 'der', options);\n    if (buffer.isError(res) && possibleEnd)\n      break;\n    result.push(res);\n  }\n  return result;\n};\n\nDERNode.prototype._decodeStr = function decodeStr(buffer, tag) {\n  if (tag === 'bitstr') {\n    const unused = buffer.readUInt8();\n    if (buffer.isError(unused))\n      return unused;\n    return { unused: unused, data: buffer.raw() };\n  } else if (tag === 'bmpstr') {\n    const raw = buffer.raw();\n    if (raw.length % 2 === 1)\n      return buffer.error('Decoding of string type: bmpstr length mismatch');\n\n    let str = '';\n    for (let i = 0; i < raw.length / 2; i++) {\n      str += String.fromCharCode(raw.readUInt16BE(i * 2));\n    }\n    return str;\n  } else if (tag === 'numstr') {\n    const numstr = buffer.raw().toString('ascii');\n    if (!this._isNumstr(numstr)) {\n      return buffer.error('Decoding of string type: ' +\n                          'numstr unsupported characters');\n    }\n    return numstr;\n  } else if (tag === 'octstr') {\n    return buffer.raw();\n  } else if (tag === 'objDesc') {\n    return buffer.raw();\n  } else if (tag === 'printstr') {\n    const printstr = buffer.raw().toString('ascii');\n    if (!this._isPrintstr(printstr)) {\n      return buffer.error('Decoding of string type: ' +\n                          'printstr unsupported characters');\n    }\n    return printstr;\n  } else if (/str$/.test(tag)) {\n    return buffer.raw().toString();\n  } else {\n    return buffer.error('Decoding of string type: ' + tag + ' unsupported');\n  }\n};\n\nDERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {\n  let result;\n  const identifiers = [];\n  let ident = 0;\n  let subident = 0;\n  while (!buffer.isEmpty()) {\n    subident = buffer.readUInt8();\n    ident <<= 7;\n    ident |= subident & 0x7f;\n    if ((subident & 0x80) === 0) {\n      identifiers.push(ident);\n      ident = 0;\n    }\n  }\n  if (subident & 0x80)\n    identifiers.push(ident);\n\n  const first = (identifiers[0] / 40) | 0;\n  const second = identifiers[0] % 40;\n\n  if (relative)\n    result = identifiers;\n  else\n    result = [first, second].concat(identifiers.slice(1));\n\n  if (values) {\n    let tmp = values[result.join(' ')];\n    if (tmp === undefined)\n      tmp = values[result.join('.')];\n    if (tmp !== undefined)\n      result = tmp;\n  }\n\n  return result;\n};\n\nDERNode.prototype._decodeTime = function decodeTime(buffer, tag) {\n  const str = buffer.raw().toString();\n\n  let year;\n  let mon;\n  let day;\n  let hour;\n  let min;\n  let sec;\n  if (tag === 'gentime') {\n    year = str.slice(0, 4) | 0;\n    mon = str.slice(4, 6) | 0;\n    day = str.slice(6, 8) | 0;\n    hour = str.slice(8, 10) | 0;\n    min = str.slice(10, 12) | 0;\n    sec = str.slice(12, 14) | 0;\n  } else if (tag === 'utctime') {\n    year = str.slice(0, 2) | 0;\n    mon = str.slice(2, 4) | 0;\n    day = str.slice(4, 6) | 0;\n    hour = str.slice(6, 8) | 0;\n    min = str.slice(8, 10) | 0;\n    sec = str.slice(10, 12) | 0;\n    if (year < 70)\n      year = 2000 + year;\n    else\n      year = 1900 + year;\n  } else {\n    return buffer.error('Decoding ' + tag + ' time is not supported yet');\n  }\n\n  return Date.UTC(year, mon - 1, day, hour, min, sec, 0);\n};\n\nDERNode.prototype._decodeNull = function decodeNull() {\n  return null;\n};\n\nDERNode.prototype._decodeBool = function decodeBool(buffer) {\n  const res = buffer.readUInt8();\n  if (buffer.isError(res))\n    return res;\n  else\n    return res !== 0;\n};\n\nDERNode.prototype._decodeInt = function decodeInt(buffer, values) {\n  // Bigint, return as it is (assume big endian)\n  const raw = buffer.raw();\n  let res = new bignum(raw);\n\n  if (values)\n    res = values[res.toString(10)] || res;\n\n  return res;\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n  if (typeof entity === 'function')\n    entity = entity(obj);\n  return entity._getDecoder('der').tree;\n};\n\n// Utility methods\n\nfunction derDecodeTag(buf, fail) {\n  let tag = buf.readUInt8(fail);\n  if (buf.isError(tag))\n    return tag;\n\n  const cls = der.tagClass[tag >> 6];\n  const primitive = (tag & 0x20) === 0;\n\n  // Multi-octet tag - load\n  if ((tag & 0x1f) === 0x1f) {\n    let oct = tag;\n    tag = 0;\n    while ((oct & 0x80) === 0x80) {\n      oct = buf.readUInt8(fail);\n      if (buf.isError(oct))\n        return oct;\n\n      tag <<= 7;\n      tag |= oct & 0x7f;\n    }\n  } else {\n    tag &= 0x1f;\n  }\n  const tagStr = der.tag[tag];\n\n  return {\n    cls: cls,\n    primitive: primitive,\n    tag: tag,\n    tagStr: tagStr\n  };\n}\n\nfunction derDecodeLen(buf, primitive, fail) {\n  let len = buf.readUInt8(fail);\n  if (buf.isError(len))\n    return len;\n\n  // Indefinite form\n  if (!primitive && len === 0x80)\n    return null;\n\n  // Definite form\n  if ((len & 0x80) === 0) {\n    // Short form\n    return len;\n  }\n\n  // Long form\n  const num = len & 0x7f;\n  if (num > 4)\n    return buf.error('length octect is too long');\n\n  len = 0;\n  for (let i = 0; i < num; i++) {\n    len <<= 8;\n    const j = buf.readUInt8(fail);\n    if (buf.isError(j))\n      return j;\n    len |= j;\n  }\n\n  return len;\n}\n","'use strict';\n\n// Helper\nfunction reverse(map) {\n  const res = {};\n\n  Object.keys(map).forEach(function(key) {\n    // Convert key to integer if it is stringified\n    if ((key | 0) == key)\n      key = key | 0;\n\n    const value = map[key];\n    res[value] = key;\n  });\n\n  return res;\n}\n\nexports.tagClass = {\n  0: 'universal',\n  1: 'application',\n  2: 'context',\n  3: 'private'\n};\nexports.tagClassByName = reverse(exports.tagClass);\n\nexports.tag = {\n  0x00: 'end',\n  0x01: 'bool',\n  0x02: 'int',\n  0x03: 'bitstr',\n  0x04: 'octstr',\n  0x05: 'null_',\n  0x06: 'objid',\n  0x07: 'objDesc',\n  0x08: 'external',\n  0x09: 'real',\n  0x0a: 'enum',\n  0x0b: 'embed',\n  0x0c: 'utf8str',\n  0x0d: 'relativeOid',\n  0x10: 'seq',\n  0x11: 'set',\n  0x12: 'numstr',\n  0x13: 'printstr',\n  0x14: 't61str',\n  0x15: 'videostr',\n  0x16: 'ia5str',\n  0x17: 'utctime',\n  0x18: 'gentime',\n  0x19: 'graphstr',\n  0x1a: 'iso646str',\n  0x1b: 'genstr',\n  0x1c: 'unistr',\n  0x1d: 'charstr',\n  0x1e: 'bmpstr'\n};\nexports.tagByName = reverse(exports.tag);\n","var asn1 = require('./asn1')\nvar aesid = require('./aesid.json')\nvar fixProc = require('./fixProc')\nvar ciphers = require('browserify-aes')\nvar compat = require('pbkdf2')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = parseKeys\n\nfunction parseKeys (buffer) {\n  var password\n  if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n    password = buffer.passphrase\n    buffer = buffer.key\n  }\n  if (typeof buffer === 'string') {\n    buffer = Buffer.from(buffer)\n  }\n\n  var stripped = fixProc(buffer, password)\n\n  var type = stripped.tag\n  var data = stripped.data\n  var subtype, ndata\n  switch (type) {\n    case 'CERTIFICATE':\n      ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo\n      // falls through\n    case 'PUBLIC KEY':\n      if (!ndata) {\n        ndata = asn1.PublicKey.decode(data, 'der')\n      }\n      subtype = ndata.algorithm.algorithm.join('.')\n      switch (subtype) {\n        case '1.2.840.113549.1.1.1':\n          return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')\n        case '1.2.840.10045.2.1':\n          ndata.subjectPrivateKey = ndata.subjectPublicKey\n          return {\n            type: 'ec',\n            data: ndata\n          }\n        case '1.2.840.10040.4.1':\n          ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')\n          return {\n            type: 'dsa',\n            data: ndata.algorithm.params\n          }\n        default: throw new Error('unknown key id ' + subtype)\n      }\n      // throw new Error('unknown key type ' + type)\n    case 'ENCRYPTED PRIVATE KEY':\n      data = asn1.EncryptedPrivateKey.decode(data, 'der')\n      data = decrypt(data, password)\n      // falls through\n    case 'PRIVATE KEY':\n      ndata = asn1.PrivateKey.decode(data, 'der')\n      subtype = ndata.algorithm.algorithm.join('.')\n      switch (subtype) {\n        case '1.2.840.113549.1.1.1':\n          return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')\n        case '1.2.840.10045.2.1':\n          return {\n            curve: ndata.algorithm.curve,\n            privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n          }\n        case '1.2.840.10040.4.1':\n          ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')\n          return {\n            type: 'dsa',\n            params: ndata.algorithm.params\n          }\n        default: throw new Error('unknown key id ' + subtype)\n      }\n      // throw new Error('unknown key type ' + type)\n    case 'RSA PUBLIC KEY':\n      return asn1.RSAPublicKey.decode(data, 'der')\n    case 'RSA PRIVATE KEY':\n      return asn1.RSAPrivateKey.decode(data, 'der')\n    case 'DSA PRIVATE KEY':\n      return {\n        type: 'dsa',\n        params: asn1.DSAPrivateKey.decode(data, 'der')\n      }\n    case 'EC PRIVATE KEY':\n      data = asn1.ECPrivateKey.decode(data, 'der')\n      return {\n        curve: data.parameters.value,\n        privateKey: data.privateKey\n      }\n    default: throw new Error('unknown key type ' + type)\n  }\n}\nparseKeys.signature = asn1.signature\nfunction decrypt (data, password) {\n  var salt = data.algorithm.decrypt.kde.kdeparams.salt\n  var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)\n  var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]\n  var iv = data.algorithm.decrypt.cipher.iv\n  var cipherText = data.subjectPrivateKey\n  var keylen = parseInt(algo.split('-')[1], 10) / 8\n  var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')\n  var cipher = ciphers.createDecipheriv(algo, key, iv)\n  var out = []\n  out.push(cipher.update(cipherText))\n  out.push(cipher.final())\n  return Buffer.concat(out)\n}\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DEREncoder(entity) {\n  this.enc = 'der';\n  this.name = entity.name;\n  this.entity = entity;\n\n  // Construct base tree\n  this.tree = new DERNode();\n  this.tree._init(entity.body);\n}\nmodule.exports = DEREncoder;\n\nDEREncoder.prototype.encode = function encode(data, reporter) {\n  return this.tree._encode(data, reporter).join();\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n  Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._encodeComposite = function encodeComposite(tag,\n  primitive,\n  cls,\n  content) {\n  const encodedTag = encodeTag(tag, primitive, cls, this.reporter);\n\n  // Short form\n  if (content.length < 0x80) {\n    const header = Buffer.alloc(2);\n    header[0] = encodedTag;\n    header[1] = content.length;\n    return this._createEncoderBuffer([ header, content ]);\n  }\n\n  // Long form\n  // Count octets required to store length\n  let lenOctets = 1;\n  for (let i = content.length; i >= 0x100; i >>= 8)\n    lenOctets++;\n\n  const header = Buffer.alloc(1 + 1 + lenOctets);\n  header[0] = encodedTag;\n  header[1] = 0x80 | lenOctets;\n\n  for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)\n    header[i] = j & 0xff;\n\n  return this._createEncoderBuffer([ header, content ]);\n};\n\nDERNode.prototype._encodeStr = function encodeStr(str, tag) {\n  if (tag === 'bitstr') {\n    return this._createEncoderBuffer([ str.unused | 0, str.data ]);\n  } else if (tag === 'bmpstr') {\n    const buf = Buffer.alloc(str.length * 2);\n    for (let i = 0; i < str.length; i++) {\n      buf.writeUInt16BE(str.charCodeAt(i), i * 2);\n    }\n    return this._createEncoderBuffer(buf);\n  } else if (tag === 'numstr') {\n    if (!this._isNumstr(str)) {\n      return this.reporter.error('Encoding of string type: numstr supports ' +\n                                 'only digits and space');\n    }\n    return this._createEncoderBuffer(str);\n  } else if (tag === 'printstr') {\n    if (!this._isPrintstr(str)) {\n      return this.reporter.error('Encoding of string type: printstr supports ' +\n                                 'only latin upper and lower case letters, ' +\n                                 'digits, space, apostrophe, left and rigth ' +\n                                 'parenthesis, plus sign, comma, hyphen, ' +\n                                 'dot, slash, colon, equal sign, ' +\n                                 'question mark');\n    }\n    return this._createEncoderBuffer(str);\n  } else if (/str$/.test(tag)) {\n    return this._createEncoderBuffer(str);\n  } else if (tag === 'objDesc') {\n    return this._createEncoderBuffer(str);\n  } else {\n    return this.reporter.error('Encoding of string type: ' + tag +\n                               ' unsupported');\n  }\n};\n\nDERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {\n  if (typeof id === 'string') {\n    if (!values)\n      return this.reporter.error('string objid given, but no values map found');\n    if (!values.hasOwnProperty(id))\n      return this.reporter.error('objid not found in values map');\n    id = values[id].split(/[\\s.]+/g);\n    for (let i = 0; i < id.length; i++)\n      id[i] |= 0;\n  } else if (Array.isArray(id)) {\n    id = id.slice();\n    for (let i = 0; i < id.length; i++)\n      id[i] |= 0;\n  }\n\n  if (!Array.isArray(id)) {\n    return this.reporter.error('objid() should be either array or string, ' +\n                               'got: ' + JSON.stringify(id));\n  }\n\n  if (!relative) {\n    if (id[1] >= 40)\n      return this.reporter.error('Second objid identifier OOB');\n    id.splice(0, 2, id[0] * 40 + id[1]);\n  }\n\n  // Count number of octets\n  let size = 0;\n  for (let i = 0; i < id.length; i++) {\n    let ident = id[i];\n    for (size++; ident >= 0x80; ident >>= 7)\n      size++;\n  }\n\n  const objid = Buffer.alloc(size);\n  let offset = objid.length - 1;\n  for (let i = id.length - 1; i >= 0; i--) {\n    let ident = id[i];\n    objid[offset--] = ident & 0x7f;\n    while ((ident >>= 7) > 0)\n      objid[offset--] = 0x80 | (ident & 0x7f);\n  }\n\n  return this._createEncoderBuffer(objid);\n};\n\nfunction two(num) {\n  if (num < 10)\n    return '0' + num;\n  else\n    return num;\n}\n\nDERNode.prototype._encodeTime = function encodeTime(time, tag) {\n  let str;\n  const date = new Date(time);\n\n  if (tag === 'gentime') {\n    str = [\n      two(date.getUTCFullYear()),\n      two(date.getUTCMonth() + 1),\n      two(date.getUTCDate()),\n      two(date.getUTCHours()),\n      two(date.getUTCMinutes()),\n      two(date.getUTCSeconds()),\n      'Z'\n    ].join('');\n  } else if (tag === 'utctime') {\n    str = [\n      two(date.getUTCFullYear() % 100),\n      two(date.getUTCMonth() + 1),\n      two(date.getUTCDate()),\n      two(date.getUTCHours()),\n      two(date.getUTCMinutes()),\n      two(date.getUTCSeconds()),\n      'Z'\n    ].join('');\n  } else {\n    this.reporter.error('Encoding ' + tag + ' time is not supported yet');\n  }\n\n  return this._encodeStr(str, 'octstr');\n};\n\nDERNode.prototype._encodeNull = function encodeNull() {\n  return this._createEncoderBuffer('');\n};\n\nDERNode.prototype._encodeInt = function encodeInt(num, values) {\n  if (typeof num === 'string') {\n    if (!values)\n      return this.reporter.error('String int or enum given, but no values map');\n    if (!values.hasOwnProperty(num)) {\n      return this.reporter.error('Values map doesn\\'t contain: ' +\n                                 JSON.stringify(num));\n    }\n    num = values[num];\n  }\n\n  // Bignum, assume big endian\n  if (typeof num !== 'number' && !Buffer.isBuffer(num)) {\n    const numArray = num.toArray();\n    if (!num.sign && numArray[0] & 0x80) {\n      numArray.unshift(0);\n    }\n    num = Buffer.from(numArray);\n  }\n\n  if (Buffer.isBuffer(num)) {\n    let size = num.length;\n    if (num.length === 0)\n      size++;\n\n    const out = Buffer.alloc(size);\n    num.copy(out);\n    if (num.length === 0)\n      out[0] = 0;\n    return this._createEncoderBuffer(out);\n  }\n\n  if (num < 0x80)\n    return this._createEncoderBuffer(num);\n\n  if (num < 0x100)\n    return this._createEncoderBuffer([0, num]);\n\n  let size = 1;\n  for (let i = num; i >= 0x100; i >>= 8)\n    size++;\n\n  const out = new Array(size);\n  for (let i = out.length - 1; i >= 0; i--) {\n    out[i] = num & 0xff;\n    num >>= 8;\n  }\n  if(out[0] & 0x80) {\n    out.unshift(0);\n  }\n\n  return this._createEncoderBuffer(Buffer.from(out));\n};\n\nDERNode.prototype._encodeBool = function encodeBool(value) {\n  return this._createEncoderBuffer(value ? 0xff : 0);\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n  if (typeof entity === 'function')\n    entity = entity(obj);\n  return entity._getEncoder('der').tree;\n};\n\nDERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {\n  const state = this._baseState;\n  let i;\n  if (state['default'] === null)\n    return false;\n\n  const data = dataBuffer.join();\n  if (state.defaultBuffer === undefined)\n    state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();\n\n  if (data.length !== state.defaultBuffer.length)\n    return false;\n\n  for (i=0; i < data.length; i++)\n    if (data[i] !== state.defaultBuffer[i])\n      return false;\n\n  return true;\n};\n\n// Utility methods\n\nfunction encodeTag(tag, primitive, cls, reporter) {\n  let res;\n\n  if (tag === 'seqof')\n    tag = 'seq';\n  else if (tag === 'setof')\n    tag = 'set';\n\n  if (der.tagByName.hasOwnProperty(tag))\n    res = der.tagByName[tag];\n  else if (typeof tag === 'number' && (tag | 0) === tag)\n    res = tag;\n  else\n    return reporter.error('Unknown tag: ' + tag);\n\n  if (res >= 0x1f)\n    return reporter.error('Multi-octet tag encoding unsupported');\n\n  if (!primitive)\n    res |= 0x20;\n\n  res |= (der.tagClassByName[cls || 'universal'] << 6);\n\n  return res;\n}\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst DEREncoder = require('./der');\n\nfunction PEMEncoder(entity) {\n  DEREncoder.call(this, entity);\n  this.enc = 'pem';\n}\ninherits(PEMEncoder, DEREncoder);\nmodule.exports = PEMEncoder;\n\nPEMEncoder.prototype.encode = function encode(data, options) {\n  const buf = DEREncoder.prototype.encode.call(this, data);\n\n  const p = buf.toString('base64');\n  const out = [ '-----BEGIN ' + options.label + '-----' ];\n  for (let i = 0; i < p.length; i += 64)\n    out.push(p.slice(i, i + 64));\n  out.push('-----END ' + options.label + '-----');\n  return out.join('\\n');\n};\n","'use strict';\n\nconst decoders = exports;\n\ndecoders.der = require('./der');\ndecoders.pem = require('./pem');\n","'use strict';\n\nconst inherits = require('inherits');\n\nfunction Reporter(options) {\n  this._reporterState = {\n    obj: null,\n    path: [],\n    options: options || {},\n    errors: []\n  };\n}\nexports.Reporter = Reporter;\n\nReporter.prototype.isError = function isError(obj) {\n  return obj instanceof ReporterError;\n};\n\nReporter.prototype.save = function save() {\n  const state = this._reporterState;\n\n  return { obj: state.obj, pathLen: state.path.length };\n};\n\nReporter.prototype.restore = function restore(data) {\n  const state = this._reporterState;\n\n  state.obj = data.obj;\n  state.path = state.path.slice(0, data.pathLen);\n};\n\nReporter.prototype.enterKey = function enterKey(key) {\n  return this._reporterState.path.push(key);\n};\n\nReporter.prototype.exitKey = function exitKey(index) {\n  const state = this._reporterState;\n\n  state.path = state.path.slice(0, index - 1);\n};\n\nReporter.prototype.leaveKey = function leaveKey(index, key, value) {\n  const state = this._reporterState;\n\n  this.exitKey(index);\n  if (state.obj !== null)\n    state.obj[key] = value;\n};\n\nReporter.prototype.path = function path() {\n  return this._reporterState.path.join('/');\n};\n\nReporter.prototype.enterObject = function enterObject() {\n  const state = this._reporterState;\n\n  const prev = state.obj;\n  state.obj = {};\n  return prev;\n};\n\nReporter.prototype.leaveObject = function leaveObject(prev) {\n  const state = this._reporterState;\n\n  const now = state.obj;\n  state.obj = prev;\n  return now;\n};\n\nReporter.prototype.error = function error(msg) {\n  let err;\n  const state = this._reporterState;\n\n  const inherited = msg instanceof ReporterError;\n  if (inherited) {\n    err = msg;\n  } else {\n    err = new ReporterError(state.path.map(function(elem) {\n      return '[' + JSON.stringify(elem) + ']';\n    }).join(''), msg.message || msg, msg.stack);\n  }\n\n  if (!state.options.partial)\n    throw err;\n\n  if (!inherited)\n    state.errors.push(err);\n\n  return err;\n};\n\nReporter.prototype.wrapResult = function wrapResult(result) {\n  const state = this._reporterState;\n  if (!state.options.partial)\n    return result;\n\n  return {\n    result: this.isError(result) ? null : result,\n    errors: state.errors\n  };\n};\n\nfunction ReporterError(path, msg) {\n  this.path = path;\n  this.rethrow(msg);\n}\ninherits(ReporterError, Error);\n\nReporterError.prototype.rethrow = function rethrow(msg) {\n  this.message = msg + ' at: ' + (this.path || '(shallow)');\n  if (Error.captureStackTrace)\n    Error.captureStackTrace(this, ReporterError);\n\n  if (!this.stack) {\n    try {\n      // IE only adds stack when thrown\n      throw new Error(this.message);\n    } catch (e) {\n      this.stack = e.stack;\n    }\n  }\n  return this;\n};\n","'use strict';\n\nconst encoders = exports;\n\nencoders.der = require('./der');\nencoders.pem = require('./pem');\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\n\nconst DERDecoder = require('./der');\n\nfunction PEMDecoder(entity) {\n  DERDecoder.call(this, entity);\n  this.enc = 'pem';\n}\ninherits(PEMDecoder, DERDecoder);\nmodule.exports = PEMDecoder;\n\nPEMDecoder.prototype.decode = function decode(data, options) {\n  const lines = data.toString().split(/[\\r\\n]+/g);\n\n  const label = options.label.toUpperCase();\n\n  const re = /^-----(BEGIN|END) ([^-]+)-----$/;\n  let start = -1;\n  let end = -1;\n  for (let i = 0; i < lines.length; i++) {\n    const match = lines[i].match(re);\n    if (match === null)\n      continue;\n\n    if (match[2] !== label)\n      continue;\n\n    if (start === -1) {\n      if (match[1] !== 'BEGIN')\n        break;\n      start = i;\n    } else {\n      if (match[1] !== 'END')\n        break;\n      end = i;\n      break;\n    }\n  }\n  if (start === -1 || end === -1)\n    throw new Error('PEM section not found for: ' + label);\n\n  const base64 = lines.slice(start + 1, end).join('');\n  // Remove excessive symbols\n  base64.replace(/[^a-z0-9+/=]+/gi, '');\n\n  const input = Buffer.from(base64, 'base64');\n  return DERDecoder.prototype.decode.call(this, input, options);\n};\n"],"names":[],"sourceRoot":""}