/** * Skipped minification because the original files appears to be already minified. * Original file: /npm/sm-crypto@0.3.2/dist/sm4.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ window.sm4=function(r){function n(o){if(t[o])return t[o].exports;var e=t[o]={i:o,l:!1,exports:{}};return r[o].call(e.exports,e,e.exports,n),e.l=!0,e.exports}var t={};return n.m=r,n.c=t,n.d=function(r,t,o){n.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.p="",n(n.s=7)}({7:function(r,n,t){"use strict";function o(r){if(Array.isArray(r)){for(var n=0,t=Array(r.length);n>>6),n.push(128|63&e);else if(e<=55295||e>=57344&&e<=65535)n.push(224|e>>>12),n.push(128|e>>>6&63),n.push(128|63&e);else{if(!(e>=65536&&e<=1114111))throw n.push(e),new Error("input is not supported");t++,n.push(240|e>>>18&28),n.push(128|e>>>12&63),n.push(128|e>>>6&63),n.push(128|63&e)}}return n}function f(r){for(var n=[],t=0,o=r.length;t=240&&r[t]<=247?(n.push(String.fromCodePoint(((7&r[t])<<18)+((63&r[t+1])<<12)+((63&r[t+2])<<6)+(63&r[t+3]))),t+=3):r[t]>=224&&r[t]<=239?(n.push(String.fromCodePoint(((15&r[t])<<12)+((63&r[t+1])<<6)+(63&r[t+2]))),t+=2):r[t]>=192&&r[t]<=223?(n.push(String.fromCodePoint(((31&r[t])<<6)+(63&r[t+1]))),t++):n.push(String.fromCodePoint(r[t]));return n.join("")}function s(r,n){return r<>>32-n}function a(r){return(255&w[r>>>24&255])<<24|(255&w[r>>>16&255])<<16|(255&w[r>>>8&255])<<8|255&w[255&r]}function c(r){return r^s(r,2)^s(r,10)^s(r,18)^s(r,24)}function p(r){return r^s(r,13)^s(r,23)}function h(r,n,t){for(var o=new Array(4),e=new Array(4),i=0;i<4;i++)e[0]=255&r[4*i],e[1]=255&r[4*i+1],e[2]=255&r[4*i+2],e[3]=255&r[4*i+3],o[i]=e[0]<<24|e[1]<<16|e[2]<<8|e[3];for(var u,f=0;f<32;f+=4)u=o[1]^o[2]^o[3]^t[f+0],o[0]^=c(a(u)),u=o[2]^o[3]^o[0]^t[f+1],o[1]^=c(a(u)),u=o[3]^o[0]^o[1]^t[f+2],o[2]^=c(a(u)),u=o[0]^o[1]^o[2]^t[f+3],o[3]^=c(a(u));for(var s=0;s<16;s+=4)n[s]=o[3-s/4]>>>24&255,n[s+1]=o[3-s/4]>>>16&255,n[s+2]=o[3-s/4]>>>8&255,n[s+3]=255&o[3-s/4]}function v(r,n,t){for(var o=new Array(4),e=new Array(4),i=0;i<4;i++)e[0]=255&r[0+4*i],e[1]=255&r[1+4*i],e[2]=255&r[2+4*i],e[3]=255&r[3+4*i],o[i]=e[0]<<24|e[1]<<16|e[2]<<8|e[3];o[0]^=2746333894,o[1]^=1453994832,o[2]^=1736282519,o[3]^=2993693404;for(var u,f=0;f<32;f+=4)u=o[1]^o[2]^o[3]^A[f+0],n[f+0]=o[0]^=p(a(u)),u=o[2]^o[3]^o[0]^A[f+1],n[f+1]=o[1]^=p(a(u)),u=o[3]^o[0]^o[1]^A[f+2],n[f+2]=o[2]^=p(a(u)),u=o[0]^o[1]^o[2]^A[f+3],n[f+3]=o[3]^=p(a(u));if(t===g)for(var s,c=0;c<16;c++)s=n[c],n[c]=n[31-c],n[31-c]=s}function l(r,n,t){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=s.padding,c=void 0===a?"pkcs#5":a,p=s.mode,l=s.iv,w=void 0===l?[]:l,A=s.output,m=void 0===A?"string":A;if("cbc"===p&&("string"==typeof w&&(w=e(w)),16!==w.length))throw new Error("iv is invalid");if("string"==typeof n&&(n=e(n)),16!==n.length)throw new Error("key is invalid");if(r="string"==typeof r?t!==g?u(r):e(r):[].concat(o(r)),"pkcs#5"===c&&t!==g)for(var b=y-r.length%y,P=0;P=y;){var E=r.slice(C,C+16),O=new Array(16);if("cbc"===p)for(var _=0;_