forked from felixhayashi/jsurl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
url.min.js
1 lines (1 loc) · 2.93 KB
/
url.min.js
1
;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';9 1e=(5(){"1K 1B";9 h={m:\'m\',L:\'1k\',o:\'o\',8:\'1j\',t:\'1i\',w:\'w\'},1f={"1h":1q,"1C":1F,"1H":14,"1M":15,"1w":14,"1m":15},1d=5(a,b){9 d=1s,Q=d.1z(\'a\'),b=b||d.13.W,N=b.u(/\\/\\/(.*?)(?::(.*?))?@/)||[],i;Q.W=b;p(i J h){a[i]=Q[h[i]]||\'\'}a.m=a.m.l(/:$/,\'\');a.t=a.t.l(/^\\?/,\'\');a.w=q(a.w.l(/^#/,\'\'));a.F=q(N[1]||\'\');a.E=q(N[2]||\'\');a.o=(1f[a.m]==a.o||a.o==0)?\'\':a.o;k(!a.m&&!/^([a-z]+:)?\\/\\//.1t(b)){9 c=Z 1e(d.13.W.u(/(.*\\/)/)[0]),G=c.8.D(\'/\'),C=a.8.D(\'/\'),K=[\'m\',\'F\',\'E\',\'L\',\'o\'],s=K.y;G.1c();p(i=0;i<s;i++){a[K[i]]=c[K[i]]}11(C[0]==\'..\'){G.1c();C.1J()}a.8=(b.I(0)!=\'/\'?G.Y(\'/\'):\'\')+\'/\'+C.Y(\'/\')}H{a.8=a.8.l(/^\\/?/,\'/\')}a.18((a.8.I(0)==\'/\'?a.8.19(1):a.8).D(\'/\'));1a(a)},r=5(s){j 1y(s).l(/\'/g,\'%1p\')},q=5(s){s=s.l(/\\+/g,\' \');s=s.l(/%([1n][0-v-f])%([X][0-v-f])%([X][0-v-f])/M,5(a,b,c,d){9 e=x(b,16)-1l,V=x(c,16)-U;k(e==0&&V<1o){j a}9 f=x(d,16)-U,n=(e<<12)+(V<<6)+f;k(n>1r){j a}j T.S(n)});s=s.l(/%([1u][0-v-f])%([X][0-v-f])/M,5(a,b,c){9 d=x(b,16)-1v;k(d<2){j a}9 e=x(c,16)-U;j T.S((d<<6)+e)});s=s.l(/%([0-7][0-v-f])/M,5(a,b){j T.S(x(b,16))});j s},1a=5(f){9 g=f.t;f.t=Z(5(b){9 c=/([^=&]+)(=([^&]*))?/g,u;11((u=c.1g(b))){9 d=1x(u[1].l(/\\+/g,\' \')),R=u[3]?q(u[3]):\'\';k(4[d]!=1A){k(!(4[d]A 1b)){4[d]=[4[d]]}4[d].1D(R)}H{4[d]=R}}4.1E=5(){p(9 a J 4){k(!(4[a]A P)){1G 4[a]}}};4.17=5(){9 a=0,d;p(d J 4){k(!(4[d]A P)){a++}}j a};4.1I=5(){j 4.17()===0};4.O=5(){9 s=\'\',e=r,i,B;p(i J 4){k(4[i]A P){1L}k(4[i]A 1b){9 a=4[i].y;k(a){p(B=0;B<a;B++){s+=s?\'&\':\'\';s+=e(i)+\'=\'+e(4[i][B])}}H{s+=(s?\'&\':\'\')+e(i)+\'=\'}}H{s+=s?\'&\':\'\';s+=e(i)+\'=\'+e(4[i])}}j s}})(g)};j 5(c){4.18=5(a){9 b=\'\',i=0,s;k(a&&a.y&&a+\'\'!==a){k(4.10()){b=\'/\'}p(s=a.y;i<s;i++){a[i]=r(a[i])}4.8=b+a.Y(\'/\')}a=(4.8.I(0)===\'/\'?4.8.19(1):4.8).D(\'/\');p(i=0,s=a.y;i<s;i++){a[i]=q(a[i])}j a};4.r=r;4.q=q;4.10=5(){j 4.m||4.8.I(0)===\'/\'};4.O=5(){j((4.m&&(4.m+\'://\'))+(4.F&&(r(4.F)+(4.E&&(\':\'+r(4.E)))+\'@\'))+(4.L&&4.L)+(4.o&&(\':\'+4.o))+(4.8&&4.8)+(4.t.O()&&(\'?\'+4.t))+(4.w&&(\'#\'+r(4.w))))};1d(4,c)}}());',62,111,'||||this|function|||path|var||||||||||return|if|replace|protocol||port|for|decode|encode||query|match|9a|hash|parseInt|length||instanceof|ii|selfPath|split|pass|user|basePath|else|charAt|in|props|host|gi|auth|toString|Function|link|value|fromCharCode|String|0x80|n2|href|89ab|join|new|isAbsolute|while||location|80|443||count|paths|slice|parseQs|Array|pop|parse|Url|defaultPorts|exec|ftp|search|pathname|hostname|0xE0|wss|ef|32|27|21|0xFFFF|document|test|cd|0xC0|ws|decodeURIComponent|encodeURIComponent|createElement|null|strict|gopher|push|clear|70|delete|http|isEmpty|shift|use|continue|https'.split('|'),0,{}));