mirror of
https://github.com/wahyd4/cdnjs.git
synced 2026-08-22 19:28:40 +10:00
1 line
2.6 KiB
JavaScript
1 line
2.6 KiB
JavaScript
!function(e){function o(e){throw RangeError(O[e])}function n(e,o){for(var n=e.length;n--;)e[n]=o(e[n]);return e}function t(e,o){var t=".";return n(e.split(t),o).join(t)}function r(e){for(var n,t,r=[],f=0,i=e.length;i>f;)n=e.charCodeAt(f++),55296==(63488&n)&&(t=e.charCodeAt(f++),(55296!=(64512&n)||56320!=(64512&t))&&o("utf16decode"),n=((1023&n)<<10)+(1023&t)+65536),r.push(n);return r}function f(e){return n(e,function(e){var n="";return 55296==(63488&e)&&o("utf16encode"),e>65535&&(e-=65536,n+=E(e>>>10&1023|55296),e=56320|1023&e),n+=E(e)}).join("")}function i(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function u(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function c(e,o,n){var t=0;for(e=n?q(e/A):e>>1,e+=q(e/o);e>S*b>>1;t+=x)e=q(e/S);return q(t+(S+1)*e/(e+j))}function d(e){var n,t,r,u,d,l,a,s,p,h,v=[],g=e.length,w=0,j=I,A=m;for(t=e.lastIndexOf(U),0>t&&(t=0),r=0;t>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),v.push(e.charCodeAt(r));for(u=t>0?t+1:0;g>u;){for(d=w,l=1,a=x;u>=g&&o("invalid-input"),s=i(e.charCodeAt(u++)),(s>=x||s>q((C-w)/l))&&o("overflow"),w+=s*l,p=A>=a?y:a>=A+b?b:a-A,!(p>s);a+=x)h=x-p,l>q(C/h)&&o("overflow"),l*=h;n=v.length+1,A=c(w-d,n,0==d),q(w/n)>C-j&&o("overflow"),j+=q(w/n),w%=n,v.splice(w++,0,j)}return f(v)}function l(e){var n,t,f,i,d,l,a,s,p,h,v,g,w,j,A,F=[];for(e=r(e),g=e.length,n=I,t=0,d=m,l=0;g>l;++l)v=e[l],128>v&&F.push(E(v));for(f=i=F.length,i&&F.push(U);g>f;){for(a=C,l=0;g>l;++l)v=e[l],v>=n&&a>v&&(a=v);for(w=f+1,a-n>q((C-t)/w)&&o("overflow"),t+=(a-n)*w,n=a,l=0;g>l;++l)if(v=e[l],n>v&&++t>C&&o("overflow"),v==n){for(s=t,p=x;h=d>=p?y:p>=d+b?b:p-d,!(h>s);p+=x)A=s-h,j=x-h,F.push(E(u(h+A%j,0))),s=q(A/j);F.push(E(u(s,0))),d=c(t,w,f==i),t=0,++f}++t,++n}return F.join("")}function a(e){return t(e,function(e){return T.test(e)?d(e.slice(4).toLowerCase()):e})}function s(e){return t(e,function(e){return F.test(e)?"xn--"+l(e):e})}var p,h,v="function"==typeof define&&"object"==typeof define.amd&&define.amd&&define,g="object"==typeof exports&&exports,w="object"==typeof module&&module,C=2147483647,x=36,y=1,b=26,j=38,A=700,m=72,I=128,U="-",F=/[^ -~]/,T=/^xn--/,O={overflow:"Overflow: input needs wider integers to process.",utf16decode:"UTF-16(decode): illegal UTF-16 sequence",utf16encode:"UTF-16(encode): illegal UTF-16 value","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=x-y,q=Math.floor,E=String.fromCharCode;if(p={version:"0.2.1",utf16:{decode:r,encode:f},decode:d,encode:l,toASCII:s,toUnicode:a},g)if(w&&w.exports==g)w.exports=p;else for(h in p)p.hasOwnProperty(h)&&(g[h]=p[h]);else v?define("punycode",p):e.punycode=p}(this); |